cenitu-table 0.0.0-stage → 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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +172 -2
  3. package/README.tr.md +171 -0
  4. package/dist/cenitu-table.cjs +1 -0
  5. package/dist/cenitu-table.js +55 -0
  6. package/dist/index-BHarWDHD.cjs +184 -0
  7. package/dist/index-BpjIy-X9.js +6264 -0
  8. package/dist/react.cjs +1 -0
  9. package/dist/react.js +71 -0
  10. package/dist/types/export/csv.d.ts +26 -0
  11. package/dist/types/export/download.d.ts +3 -0
  12. package/dist/types/export/index.d.ts +8 -0
  13. package/dist/types/export/numberFormat.d.ts +12 -0
  14. package/dist/types/export/styles.d.ts +14 -0
  15. package/dist/types/export/types.d.ts +49 -0
  16. package/dist/types/export/unzip.d.ts +21 -0
  17. package/dist/types/export/xlsx.d.ts +24 -0
  18. package/dist/types/export/xlsxRead.d.ts +35 -0
  19. package/dist/types/export/xlsxStyles.d.ts +23 -0
  20. package/dist/types/export/xml.d.ts +5 -0
  21. package/dist/types/export/xmlReader.d.ts +15 -0
  22. package/dist/types/export/zip.d.ts +20 -0
  23. package/dist/types/formula/address.d.ts +25 -0
  24. package/dist/types/formula/array-functions.d.ts +1 -0
  25. package/dist/types/formula/arrays.d.ts +13 -0
  26. package/dist/types/formula/ast.d.ts +82 -0
  27. package/dist/types/formula/coerce.d.ts +12 -0
  28. package/dist/types/formula/criteria-functions.d.ts +1 -0
  29. package/dist/types/formula/date-functions.d.ts +1 -0
  30. package/dist/types/formula/dates.d.ts +23 -0
  31. package/dist/types/formula/engine.d.ts +225 -0
  32. package/dist/types/formula/environment.d.ts +9 -0
  33. package/dist/types/formula/functions.d.ts +63 -0
  34. package/dist/types/formula/index.d.ts +10 -0
  35. package/dist/types/formula/interpreter.d.ts +23 -0
  36. package/dist/types/formula/lexer.d.ts +46 -0
  37. package/dist/types/formula/logic-functions.d.ts +1 -0
  38. package/dist/types/formula/lookup-functions.d.ts +1 -0
  39. package/dist/types/formula/math-functions.d.ts +1 -0
  40. package/dist/types/formula/parser.d.ts +12 -0
  41. package/dist/types/formula/restructure.d.ts +98 -0
  42. package/dist/types/formula/stat-functions.d.ts +1 -0
  43. package/dist/types/formula/text-format.d.ts +14 -0
  44. package/dist/types/formula/text-functions.d.ts +2 -0
  45. package/dist/types/formula/values.d.ts +41 -0
  46. package/dist/types/grid/autofill.d.ts +11 -0
  47. package/dist/types/grid/axis.d.ts +21 -0
  48. package/dist/types/grid/binding.d.ts +35 -0
  49. package/dist/types/grid/cellTypes.d.ts +84 -0
  50. package/dist/types/grid/clipboardHtml.d.ts +13 -0
  51. package/dist/types/grid/columnMenu.d.ts +20 -0
  52. package/dist/types/grid/contextMenu.d.ts +15 -0
  53. package/dist/types/grid/filters.d.ts +15 -0
  54. package/dist/types/grid/grid.d.ts +438 -0
  55. package/dist/types/grid/merges.d.ts +24 -0
  56. package/dist/types/grid/messages.d.ts +65 -0
  57. package/dist/types/grid/rowMapper.d.ts +44 -0
  58. package/dist/types/grid/search.d.ts +41 -0
  59. package/dist/types/grid/styles.d.ts +1 -0
  60. package/dist/types/grid/tsv.d.ts +3 -0
  61. package/dist/types/index.d.ts +10 -0
  62. package/dist/types/react/index.d.ts +19 -0
  63. package/package.json +76 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cenitu
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.
package/README.md CHANGED
@@ -1,3 +1,173 @@
1
- # Temporary Holding Version
1
+ # CenituTable
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
+ [![CI](https://github.com/cenitu/cenitu-table/actions/workflows/ci.yml/badge.svg)](https://github.com/cenitu/cenitu-table/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/cenitu-table.svg)](https://www.npmjs.com/package/cenitu-table)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+
7
+ A spreadsheet-like data grid with a built-in, multi-sheet formula engine. Written in TypeScript with **zero runtime dependencies**; an optional React component is included.
8
+
9
+ **[Live demo](https://cenitu.github.io/cenitu-table/)** · [Türkçe](README.tr.md) · [Design notes](docs/SPEC.md)
10
+
11
+ ## Features
12
+
13
+ - **Grid:** virtual scrolling (only visible cells are in the DOM), keyboard navigation (Ctrl+arrows jump to data edges), spreadsheet-compatible copy/cut/paste with styles, undo/redo, column and row resizing, row/column insert and delete, right-click context menu.
14
+ - **Sorting and filtering:** sort by several columns, filter by condition or value from the column menu. Only the view changes; data and formulas stay where they are.
15
+ - **Find and replace:** Ctrl+F / Ctrl+H, also through rows outside the viewport, in displayed values or in formulas.
16
+ - **Formula bar:** the active cell's address and content above the grid, editable.
17
+ - **Autofill:** drag the fill handle to continue number and text series and to copy formulas with relative references; double-click to fill down; Ctrl+D.
18
+ - **Cell types:** numeric (Intl formats: currency, percent), date, checkbox, dropdown; validators, read-only cells, custom renderers.
19
+ - **Formatting:** bold, italic, underline, strike-through, colors, alignment, wrapping (Ctrl+B / I / U), conditional formatting for cells or whole rows.
20
+ - **Layout:** frozen rows and columns, merged cells, hidden columns, column drag-and-drop.
21
+ - **Formula engine:** 100+ functions (SUM, IF, XLOOKUP, SUMIFS, TEXT, date functions…), dynamic arrays that spill (FILTER, SORT, UNIQUE, SEQUENCE), cross-sheet references (`'Other sheet'!A1`), named expressions, incremental recalculation, cycle detection.
22
+ - **Data binding:** rows as arrays or as objects bound to columns by property path; edits are written back to your objects.
23
+ - **Import and export:** read and write XLSX (formulas, formats, styles, frozen panes, merges), export CSV with protection against formula injection, all without any library.
24
+ - **Accessibility:** ARIA grid roles and an announced active cell for screen readers.
25
+ - **React:** `<CenituTable />` from `cenitu-table/react`.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ npm install cenitu-table
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ```ts
36
+ import { CenituGrid } from 'cenitu-table';
37
+
38
+ const grid = new CenituGrid(document.getElementById('grid')!, {
39
+ data: [
40
+ ['Product', 'Qty', 'Price', 'Total'],
41
+ ['Screw', 10, 2.5, '=B2*C2'],
42
+ ['Nut', 20, 1.25, '=B3*C3'],
43
+ ],
44
+ fixedRowsTop: 1,
45
+ columnSorting: true,
46
+ filters: true,
47
+ contextMenu: true,
48
+ columns: [
49
+ { type: 'dropdown', source: ['Screw', 'Nut', 'Washer'] },
50
+ { type: 'numeric', validator: (v) => Number(v) > 0 || 'Must be positive' },
51
+ { type: 'numeric', numericFormat: { style: 'currency', currency: 'EUR' } },
52
+ { type: 'numeric', numericFormat: { style: 'currency', currency: 'EUR' }, readOnly: true },
53
+ ],
54
+ height: 400,
55
+ });
56
+
57
+ grid.addHook('afterChange', (changes, source) => console.log(changes, source));
58
+ grid.getDataAtCell(1, 3); // 25 (computed value)
59
+ grid.getSourceDataAtCell(1, 3); // "=B2*C2"
60
+ ```
61
+
62
+ ### Objects instead of arrays
63
+
64
+ ```ts
65
+ const orders = [{ product: 'Screw', qty: 10, customer: { name: 'Acme' } }];
66
+
67
+ new CenituGrid(el, {
68
+ data: orders,
69
+ columns: [{ data: 'product' }, { data: 'qty', type: 'numeric' }, { data: 'customer.name', title: 'Customer' }],
70
+ dataSchema: () => ({ product: '', qty: 0, customer: { name: '' } }),
71
+ });
72
+ // Edits are written back: orders[0].qty changes when the cell changes.
73
+ ```
74
+
75
+ Formula cells write their computed value into the object and keep it current, so your properties stay plain values. Set `bindFormulas: 'text'` to store the formula text instead.
76
+
77
+ ### Several sheets
78
+
79
+ Give one engine to several grids — one grid per sheet:
80
+
81
+ ```ts
82
+ import { CenituGrid, FormulaEngine } from 'cenitu-table';
83
+
84
+ const engine = FormulaEngine.buildEmpty();
85
+ engine.addNamedExpression('VatRate', 0.2);
86
+ new CenituGrid(el1, { formulas: engine, sheetName: 'Orders', data: orders });
87
+ new CenituGrid(el2, { formulas: engine, sheetName: 'Summary', data: [['=SUM(Orders!F2:F100)*(1+VatRate)']] });
88
+ ```
89
+
90
+ ### Export
91
+
92
+ ```ts
93
+ grid.downloadCSV('orders.csv'); // ";" fields and "," decimals for decimal-comma locales
94
+ await grid.downloadXLSX('book.xlsx', [summaryGrid]); // several sheets in one workbook
95
+ ```
96
+
97
+ ### Import
98
+
99
+ ```ts
100
+ await grid.importXLSX(file, { sheet: 'Orders' }); // a File, Blob or bytes; default is the first sheet
101
+ ```
102
+
103
+ To load a whole workbook, give all grids one engine, so formulas can reach the other sheets:
104
+
105
+ ```ts
106
+ import { CenituGrid, readXLSX, workbookEngine } from 'cenitu-table';
107
+
108
+ const book = await readXLSX(file);
109
+ const engine = workbookEngine(book);
110
+ book.sheets.forEach((sheet, i) => {
111
+ new CenituGrid(hosts[i], { formulas: engine, sheetName: sheet.name }).loadSheet(sheet);
112
+ });
113
+ ```
114
+
115
+ Read: values, formulas, number formats, fonts, fills, alignment, column widths, row heights, hidden columns, frozen panes, merges and defined names. Not read: charts, images, comments, conditional formats, data validation and hidden rows (they are shown). Pass `formulas: 'values'` to take the results stored in the file instead of formulas, for example when a file uses functions the engine does not have.
116
+
117
+ ### Find, formula bar, sorting by several columns
118
+
119
+ ```ts
120
+ new CenituGrid(el, { data, search: true, formulaBar: true, columnSorting: true });
121
+
122
+ grid.openSearch(true); // or Ctrl+F / Ctrl+H with `search: true`
123
+ grid.findNext('screw', { matchCase: false });
124
+ grid.replaceAll('A1', 'B1', { lookIn: 'formulas' }); // one undo step; returns the cells changed
125
+ grid.sortBy([{ col: 2, order: 'desc' }, { col: 0, order: 'asc' }]);
126
+ ```
127
+
128
+ Without `lookIn: 'formulas'`, replacing leaves formula cells alone. `formulaBar` adds a row above the grid, on top of its `height`. The column menu offers "Then sort" once another column is sorted.
129
+
130
+ ### React
131
+
132
+ ```tsx
133
+ import { CenituTable } from 'cenitu-table/react';
134
+
135
+ <CenituTable ref={gridRef} data={data} fixedRowsTop={1} onChange={(changes) => save(changes)} />;
136
+ ```
137
+
138
+ ### Formula engine on its own
139
+
140
+ ```ts
141
+ import { FormulaEngine, registerFunction } from 'cenitu-table';
142
+
143
+ const engine = FormulaEngine.buildFromArray([[1, 2, '=A1+B1']]);
144
+ engine.setCellContents({ row: 0, col: 0 }, 10); // returns the changed cells
145
+ engine.getCellValue({ row: 0, col: 2 }); // 12
146
+ registerFunction('DOUBLE', { minArgs: 1, maxArgs: 1, impl: ([x]) => (x as number) * 2 });
147
+ ```
148
+
149
+ ### Localization
150
+
151
+ ```ts
152
+ import { trTR } from 'cenitu-table';
153
+
154
+ new CenituGrid(el, { locale: 'tr-TR', language: trTR, data });
155
+ ```
156
+
157
+ `locale` drives number and date formatting; `language` holds the UI texts (English by default, Turkish included).
158
+
159
+ ## Development
160
+
161
+ ```bash
162
+ npm install
163
+ npm run dev # demo at http://localhost:5180
164
+ npm test # unit tests (vitest + jsdom)
165
+ npm run test:e2e # browser tests (Playwright: Chromium, Firefox, WebKit)
166
+ npm run build # type check, ESM/CJS bundles and .d.ts in dist/
167
+ ```
168
+
169
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Notable changes are listed in [CHANGELOG.md](CHANGELOG.md).
170
+
171
+ ## License
172
+
173
+ [MIT](LICENSE)
package/README.tr.md ADDED
@@ -0,0 +1,171 @@
1
+ # CenituTable
2
+
3
+ Spreadsheet benzeri bir data grid ve ona bağlı, çok sayfalı bir formül motoru. TypeScript ile yazıldı, **çalışma zamanı bağımlılığı yok**. İsteğe bağlı bir React bileşeni de içeriyor.
4
+
5
+ **[Canlı demo](https://cenitu.github.io/cenitu-table/)** · [English](README.md) · [Tasarım notları](docs/SPEC.md)
6
+
7
+ ## Özellikler
8
+
9
+ - **Grid:** sanal kaydırma (yalnızca görünen hücreler DOM'da), klavye gezinmesi (Ctrl+ok ile veri bloğu sonuna atlama), Excel uyumlu, biçimli kopyala/kes/yapıştır, geri al/yinele, sütun ve satır boyutlandırma, satır/sütun ekleme-silme, sağ tık menüsü.
10
+ - **Sıralama ve filtre:** birden fazla sütuna göre sıralama, sütun menüsünden koşula ya da değere göre filtre. Yalnızca görünüm değişir; veri ve formüller yerinde kalır.
11
+ - **Bul ve değiştir:** Ctrl+F / Ctrl+H; ekran dışındaki satırlarda da çalışır, görünen değerlerde ya da formüllerde arar.
12
+ - **Formül çubuğu:** aktif hücrenin adresi ve içeriği grid'in üstünde gösterilir, buradan düzenlenebilir.
13
+ - **Doldurma tutamacı:** sayı ve metin serileri, göreli kayan formüller, çift tıklamayla otomatik doldurma, Ctrl+D.
14
+ - **Hücre tipleri:** sayı (para, yüzde gibi Intl biçimleri), tarih, onay kutusu, açılır liste; doğrulayıcılar, salt-okunur hücreler, özel çiziciler.
15
+ - **Biçimlendirme:** kalın, italik, altı çizili, üstü çizili, renkler, hizalama, metin kaydırma (Ctrl+B / I / U); hücre ya da tüm satır için koşullu biçimlendirme.
16
+ - **Yerleşim:** sabit satır ve sütunlar, birleştirilmiş hücreler, gizli sütunlar, sürükleyerek sütun taşıma.
17
+ - **Formül motoru:** 100'den fazla fonksiyon (SUM, IF, XLOOKUP, SUMIFS, TEXT, tarih fonksiyonları…), taşan dinamik diziler (FILTER, SORT, UNIQUE, SEQUENCE), sayfalar arası referanslar (`'Diğer Sayfa'!A1`), isimli ifadeler, artımlı yeniden hesaplama, döngü tespiti.
18
+ - **Veri bağlama:** satırlar dizi ya da nesne olarak verilebilir. Nesnelerde sütunlar alan yoluna bağlanır ve düzenlemeler nesnelerinize geri yazılır.
19
+ - **İçe ve dışa aktarma:** XLSX okuma ve yazma (formüller, biçimler, stiller, sabit bölmeler, birleştirmeler), formül enjeksiyonuna karşı korumalı CSV; hiçbir kütüphane kullanmadan.
20
+ - **Erişilebilirlik:** ARIA grid rolleri, ekran okuyucuya duyurulan aktif hücre.
21
+ - **React:** `cenitu-table/react` içinden `<CenituTable />`.
22
+
23
+ ## Kurulum
24
+
25
+ ```bash
26
+ npm install cenitu-table
27
+ ```
28
+
29
+ ## Kullanım
30
+
31
+ ```ts
32
+ import { CenituGrid, trTR } from 'cenitu-table';
33
+
34
+ const grid = new CenituGrid(document.getElementById('grid')!, {
35
+ data: [
36
+ ['Ürün', 'Adet', 'Fiyat', 'Tutar'],
37
+ ['Vida', 10, 2.5, '=B2*C2'],
38
+ ['Somun', 20, 1.25, '=B3*C3'],
39
+ ],
40
+ fixedRowsTop: 1,
41
+ columnSorting: true,
42
+ filters: true,
43
+ contextMenu: true,
44
+ locale: 'tr-TR',
45
+ language: trTR,
46
+ columns: [
47
+ { type: 'dropdown', source: ['Vida', 'Somun', 'Pul'] },
48
+ { type: 'numeric', validator: (v) => Number(v) > 0 || 'Pozitif olmalı' },
49
+ { type: 'numeric', numericFormat: { style: 'currency', currency: 'TRY' } },
50
+ { type: 'numeric', numericFormat: { style: 'currency', currency: 'TRY' }, readOnly: true },
51
+ ],
52
+ height: 400,
53
+ });
54
+
55
+ grid.addHook('afterChange', (changes, source) => console.log(changes, source));
56
+ grid.getDataAtCell(1, 3); // 25 (hesaplanmış değer)
57
+ grid.getSourceDataAtCell(1, 3); // "=B2*C2"
58
+ ```
59
+
60
+ ### Dizi yerine nesneler
61
+
62
+ ```ts
63
+ const siparisler = [{ urun: 'Vida', adet: 10, musteri: { ad: 'Acme' } }];
64
+
65
+ new CenituGrid(el, {
66
+ data: siparisler,
67
+ columns: [{ data: 'urun' }, { data: 'adet', type: 'numeric' }, { data: 'musteri.ad', title: 'Müşteri' }],
68
+ dataSchema: () => ({ urun: '', adet: 0, musteri: { ad: '' } }),
69
+ });
70
+ // Düzenlemeler geri yazılır: hücre değişince siparisler[0].adet de değişir.
71
+ ```
72
+
73
+ Formül hücreleri nesneye hesaplanmış değeri yazar ve güncel tutar; böylece alanlarınız düz değer olarak kalır. Formül metnini saklamak için `bindFormulas: 'text'` kullanın.
74
+
75
+ ### Birden fazla sayfa
76
+
77
+ Tek bir motoru birden fazla grid'e verin (her grid bir sayfa):
78
+
79
+ ```ts
80
+ import { CenituGrid, FormulaEngine } from 'cenitu-table';
81
+
82
+ const engine = FormulaEngine.buildEmpty();
83
+ engine.addNamedExpression('KdvOrani', 0.2);
84
+ new CenituGrid(el1, { formulas: engine, sheetName: 'Siparişler', data: siparisler });
85
+ new CenituGrid(el2, { formulas: engine, sheetName: 'Özet', data: [['=SUM(Siparişler!F2:F100)*(1+KdvOrani)']] });
86
+ ```
87
+
88
+ ### Dışa aktarma
89
+
90
+ ```ts
91
+ grid.downloadCSV('siparisler.csv'); // tr-TR'de ";" ayraç ve "," ondalık
92
+ await grid.downloadXLSX('kitap.xlsx', [ozetGrid]); // birden fazla sayfa tek dosyada
93
+ ```
94
+
95
+ ### İçe aktarma
96
+
97
+ ```ts
98
+ await grid.importXLSX(dosya, { sheet: 'Siparişler' }); // File, Blob ya da bayt dizisi; varsayılan ilk sayfa
99
+ ```
100
+
101
+ Bütün çalışma kitabını yüklemek için tüm grid'lere tek motor verin; böylece formüller diğer sayfalara ulaşır:
102
+
103
+ ```ts
104
+ import { CenituGrid, readXLSX, workbookEngine } from 'cenitu-table';
105
+
106
+ const kitap = await readXLSX(dosya);
107
+ const engine = workbookEngine(kitap);
108
+ kitap.sheets.forEach((sayfa, i) => {
109
+ new CenituGrid(alanlar[i], { formulas: engine, sheetName: sayfa.name }).loadSheet(sayfa);
110
+ });
111
+ ```
112
+
113
+ Okunanlar: değerler, formüller, sayı biçimleri, yazı tipleri, dolgular, hizalama, sütun genişlikleri, satır yükseklikleri, gizli sütunlar, sabit bölmeler, birleştirmeler ve tanımlı adlar. Okunmayanlar: grafikler, resimler, yorumlar, koşullu biçimler, veri doğrulama ve gizli satırlar (görünür hale gelir). Dosyada motorun bilmediği fonksiyonlar varsa `formulas: 'values'` ile formüller yerine dosyadaki sonuçları alabilirsiniz.
114
+
115
+ ### Bul, formül çubuğu, çok sütunlu sıralama
116
+
117
+ ```ts
118
+ new CenituGrid(el, { data, search: true, formulaBar: true, columnSorting: true });
119
+
120
+ grid.openSearch(true); // ya da `search: true` ile Ctrl+F / Ctrl+H
121
+ grid.findNext('vida', { matchCase: false });
122
+ grid.replaceAll('A1', 'B1', { lookIn: 'formulas' }); // tek geri alma adımı; değişen hücre sayısını döndürür
123
+ grid.sortBy([{ col: 2, order: 'desc' }, { col: 0, order: 'asc' }]);
124
+ ```
125
+
126
+ `lookIn: 'formulas'` olmadan değiştirme işlemi formül hücrelerine dokunmaz. `formulaBar`, grid'in `height` değerine ek olarak üstte bir satır kaplar. Bir sütun sıralıyken diğer sütunların menüsünde "Sonra sırala" seçenekleri çıkar.
127
+
128
+ ### React
129
+
130
+ ```tsx
131
+ import { CenituTable } from 'cenitu-table/react';
132
+
133
+ <CenituTable ref={gridRef} data={data} fixedRowsTop={1} onChange={(changes) => kaydet(changes)} />;
134
+ ```
135
+
136
+ ### Yalnızca formül motoru
137
+
138
+ ```ts
139
+ import { FormulaEngine, registerFunction } from 'cenitu-table';
140
+
141
+ const engine = FormulaEngine.buildFromArray([[1, 2, '=A1+B1']]);
142
+ engine.setCellContents({ row: 0, col: 0 }, 10); // değişen hücreleri döndürür
143
+ engine.getCellValue({ row: 0, col: 2 }); // 12
144
+ registerFunction('DOUBLE', { minArgs: 1, maxArgs: 1, impl: ([x]) => (x as number) * 2 });
145
+ ```
146
+
147
+ ### Yerelleştirme
148
+
149
+ ```ts
150
+ import { trTR } from 'cenitu-table';
151
+
152
+ new CenituGrid(el, { locale: 'tr-TR', language: trTR, data });
153
+ ```
154
+
155
+ `locale` sayı ve tarih biçimini belirler; `language` arayüz metinlerini taşır (varsayılan İngilizce, Türkçe dahil).
156
+
157
+ ## Geliştirme
158
+
159
+ ```bash
160
+ npm install
161
+ npm run dev # demo: http://localhost:5180
162
+ npm test # birim testleri (vitest + jsdom)
163
+ npm run test:e2e # tarayıcı testleri (Playwright: Chromium, Firefox, WebKit)
164
+ npm run build # tip denetimi, ESM/CJS paketleri ve dist/ altında .d.ts
165
+ ```
166
+
167
+ Bkz. [CONTRIBUTING.md](CONTRIBUTING.md). Önemli değişiklikler [CHANGELOG.md](CHANGELOG.md)'de.
168
+
169
+ ## Lisans
170
+
171
+ [MIT](LICENSE)
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BHarWDHD.cjs");exports.CSV_MIME=e.CSV_MIME;exports.CellError=e.CellError;exports.CenituGrid=e.CenituGrid;exports.FormulaEngine=e.FormulaEngine;exports.FormulaSyntaxError=e.FormulaSyntaxError;exports.MAX_COLS=e.MAX_COLS;exports.MAX_ROWS=e.MAX_ROWS;exports.RangeValue=e.RangeValue;exports.SHEET_SPAN=e.SHEET_SPAN;exports.XLSX_MIME=e.XLSX_MIME;exports.ZipReader=e.ZipReader;exports.cellKey=e.cellKey;exports.columnIndex=e.columnIndex;exports.columnLabel=e.columnLabel;exports.crc32=e.crc32;exports.dateCodeFromPattern=e.dateCodeFromPattern;exports.dateToSerial=e.dateToSerial;exports.downloadBlob=e.downloadBlob;exports.enUS=e.enUS;exports.formatDateCode=e.formatDateCode;exports.formatSerialDate=e.formatSerialDate;exports.getRegisteredFunctionNames=e.getRegisteredFunctionNames;exports.inverseMove=e.inverseMove;exports.isDateFormat=e.isDateFormat;exports.isError=e.isError;exports.isFormula=e.isFormula;exports.keyToAddress=e.keyToAddress;exports.normalizeRange=e.normalizeRange;exports.numberFormatFromMeta=e.numberFormatFromMeta;exports.parseA1=e.parseA1;exports.parseDateString=e.parseDateString;exports.parseFormula=e.parseFormula;exports.pxToColWidth=e.pxToColWidth;exports.quoteSheetName=e.quoteSheetName;exports.rangeContains=e.rangeContains;exports.readXLSX=e.readXLSX;exports.registerFunction=e.registerFunction;exports.sanitizeSheetNames=e.sanitizeSheetNames;exports.serialToDate=e.serialToDate;exports.setClock=e.setClock;exports.setRandom=e.setRandom;exports.toA1=e.toA1;exports.toCSV=e.toCSV;exports.toXLSX=e.toXLSX;exports.toXLSXCompressed=e.toXLSXCompressed;exports.trTR=e.trTR;exports.unparse=e.unparse;exports.unregisterFunction=e.unregisterFunction;exports.workbookEngine=e.workbookEngine;exports.xlsxParts=e.xlsxParts;exports.zipDeflate=e.zipDeflate;exports.zipStore=e.zipStore;
@@ -0,0 +1,55 @@
1
+ import { a as e, b as r, C as o, F as t, c as n, M as i, d as l, R as m, S, X as d, Z as u, e as C, f as F, g, h as p, j as X, k as c, l as E, m as M, n as R, o as x, p as A, q as D, r as L, s as T, t as _, u as b, v as f, w as k, x as z, y as N, z as h, A as y, B as I, D as P, E as V, G as v, H as w, I as W, J as q, K as B, L as G, N as H, P as K, Q as O, T as U, U as Z, V as j, W as J, Y as Q, _ as Y, $ } from "./index-BpjIy-X9.js";
2
+ export {
3
+ e as CSV_MIME,
4
+ r as CellError,
5
+ o as CenituGrid,
6
+ t as FormulaEngine,
7
+ n as FormulaSyntaxError,
8
+ i as MAX_COLS,
9
+ l as MAX_ROWS,
10
+ m as RangeValue,
11
+ S as SHEET_SPAN,
12
+ d as XLSX_MIME,
13
+ u as ZipReader,
14
+ C as cellKey,
15
+ F as columnIndex,
16
+ g as columnLabel,
17
+ p as crc32,
18
+ X as dateCodeFromPattern,
19
+ c as dateToSerial,
20
+ E as downloadBlob,
21
+ M as enUS,
22
+ R as formatDateCode,
23
+ x as formatSerialDate,
24
+ A as getRegisteredFunctionNames,
25
+ D as inverseMove,
26
+ L as isDateFormat,
27
+ T as isError,
28
+ _ as isFormula,
29
+ b as keyToAddress,
30
+ f as normalizeRange,
31
+ k as numberFormatFromMeta,
32
+ z as parseA1,
33
+ N as parseDateString,
34
+ h as parseFormula,
35
+ y as pxToColWidth,
36
+ I as quoteSheetName,
37
+ P as rangeContains,
38
+ V as readXLSX,
39
+ v as registerFunction,
40
+ w as sanitizeSheetNames,
41
+ W as serialToDate,
42
+ q as setClock,
43
+ B as setRandom,
44
+ G as toA1,
45
+ H as toCSV,
46
+ K as toXLSX,
47
+ O as toXLSXCompressed,
48
+ U as trTR,
49
+ Z as unparse,
50
+ j as unregisterFunction,
51
+ J as workbookEngine,
52
+ Q as xlsxParts,
53
+ Y as zipDeflate,
54
+ $ as zipStore
55
+ };