cenitu-table 0.4.0-beta.1 → 0.4.0-beta.2
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/README.md +6 -2
- package/README.tr.md +6 -2
- package/dist/cenitu-table.cjs +1 -1
- package/dist/cenitu-table.js +1 -1
- package/dist/index-BRU1fMHd.cjs +235 -0
- package/dist/{index-CKuAiNIg.js → index-CKljYtFr.js} +1834 -1783
- package/dist/react.cjs +1 -1
- package/dist/react.js +105 -88
- package/dist/types/grid/grid.d.ts +15 -3
- package/dist/types/grid/messages.d.ts +2 -0
- package/dist/types/grid/serverMode.d.ts +8 -0
- package/dist/types/react/index.d.ts +4 -0
- package/package.json +1 -1
- package/dist/index-Cl7J9niR.cjs +0 -235
package/README.md
CHANGED
|
@@ -140,14 +140,17 @@ For lists too large to load, the grid describes the rows it needs and your appli
|
|
|
140
140
|
/>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
`query` holds `page`, `pageSize`, `sort: [{ field, desc }]`, `filters` and `search`, always with column ids, so hiding or moving columns cannot break it. Filters are `text`, `list`, `date` (`from`, `to`) or `boolean`. Without React, listen to the `afterQueryChange` hook and pass rows to `grid.setPageRows(rows, total)`.
|
|
143
|
+
`query` holds `page`, `pageSize`, `sort: [{ field, desc }]`, `filters` and `search`, always with column ids, so hiding or moving columns cannot break it. Filters are `text`, `list`, `date` (`from`, `to`), `number` (`min`, `max`) or `boolean`. Without React, listen to the `afterQueryChange` hook and pass rows to `grid.setPageRows(rows, total)`.
|
|
144
144
|
|
|
145
145
|
Rules worth knowing:
|
|
146
146
|
|
|
147
147
|
- Only columns with `sortable` or `serverFilter` get a menu.
|
|
148
148
|
- Sort, filter and page size changes return to page 1.
|
|
149
149
|
- New rows keep the sort marks, filters, column layout, scroll position and, by `rowKey`, the selection.
|
|
150
|
-
-
|
|
150
|
+
- To refuse outdated responses, give `query.requestId` back: `dataRequestId` in React, `setPageRows(rows, total, { requestId })` otherwise.
|
|
151
|
+
- A new array with the same rows is not a new page. While `loading` is true, an empty `data` keeps the old rows.
|
|
152
|
+
- `onBeforeQueryChange` (`beforeQueryChange` hook) can stop a change by returning false, e.g. for unsaved edits. An open editor commits first.
|
|
153
|
+
- `maxSortKeys: 2` offers "Then sort" in the column menu, with priority numbers in the headers.
|
|
151
154
|
- Change events carry `rowKey` and `columnId`; saving edits, also before a page change, is up to the application.
|
|
152
155
|
- Undo history ends with each new page.
|
|
153
156
|
- Formulas are off unless `formulas` is set, and they then see only the loaded page.
|
|
@@ -202,6 +205,7 @@ import { linkRenderer } from 'cenitu-table';
|
|
|
202
205
|
new CenituGrid(el, {
|
|
203
206
|
data,
|
|
204
207
|
rowDetail: (host, row) => void (host.textContent = row.notes), // expand mark in row headers
|
|
208
|
+
rowDetailHeight: 'auto', // or a height in px
|
|
205
209
|
columns: [
|
|
206
210
|
{ data: 'total', summary: 'sum' }, // sum, avg, count, min, max or a function
|
|
207
211
|
{ data: 'site', renderer: linkRenderer((v) => String(v)) }, // http, https, mailto and tel only
|
package/README.tr.md
CHANGED
|
@@ -138,14 +138,17 @@ Tarayıcıya sığmayacak listelerde grid hangi satırlara ihtiyacı olduğunu b
|
|
|
138
138
|
/>
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
`query` içinde `page`, `pageSize`, `sort: [{ field, desc }]`, `filters` ve `search` bulunur. Alanlar her zaman kolon kimliğidir, bu yüzden kolon gizlemek ya da taşımak sorguyu bozmaz. Süzgeç türleri `text`, `list`, `date` (`from`, `to`) ve `boolean`'dır. React olmadan `afterQueryChange` olayını dinleyip satırları `grid.setPageRows(satirlar, toplam)` ile verin.
|
|
141
|
+
`query` içinde `page`, `pageSize`, `sort: [{ field, desc }]`, `filters` ve `search` bulunur. Alanlar her zaman kolon kimliğidir, bu yüzden kolon gizlemek ya da taşımak sorguyu bozmaz. Süzgeç türleri `text`, `list`, `date` (`from`, `to`), `number` (`min`, `max`) ve `boolean`'dır. React olmadan `afterQueryChange` olayını dinleyip satırları `grid.setPageRows(satirlar, toplam)` ile verin.
|
|
142
142
|
|
|
143
143
|
Bilmeniz gerekenler:
|
|
144
144
|
|
|
145
145
|
- Yalnızca `sortable` ya da `serverFilter` tanımlı kolonlarda menü çıkar.
|
|
146
146
|
- Sıralama, süzgeç ve sayfa boyutu değişince 1. sayfaya dönülür.
|
|
147
147
|
- Yeni satırlar gelince sıralama işaretleri, süzgeçler, kolon düzeni, kaydırma konumu ve `rowKey` ile seçim korunur.
|
|
148
|
-
-
|
|
148
|
+
- Eski yanıtları reddetmek için `query.requestId` değerini geri verin: React'te `dataRequestId`, diğerlerinde `setPageRows(satirlar, toplam, { requestId })`.
|
|
149
|
+
- Aynı satırları taşıyan yeni bir dizi yeni sayfa sayılmaz. `loading` açıkken boş `data` eski satırları silmez.
|
|
150
|
+
- `onBeforeQueryChange` (`beforeQueryChange` olayı) `false` döndürerek değişikliği durdurabilir; örneğin kaydedilmemiş düzenlemeler için. Açık editör önce kaydedilir.
|
|
151
|
+
- `maxSortKeys: 2` sütun menüsünde "Sonra sırala" seçeneğini açar; başlıklarda öncelik numaraları görünür.
|
|
149
152
|
- Değişiklik olayları `rowKey` ve `columnId` taşır; düzenlemeleri sayfa değişmeden önce de dahil kaydetmek uygulamaya aittir.
|
|
150
153
|
- Geri alma geçmişi her yeni sayfada sıfırlanır.
|
|
151
154
|
- `formulas` verilmedikçe formüller kapalıdır; açılırsa yalnızca yüklü sayfayı görür.
|
|
@@ -200,6 +203,7 @@ import { linkRenderer } from 'cenitu-table';
|
|
|
200
203
|
new CenituGrid(el, {
|
|
201
204
|
data,
|
|
202
205
|
rowDetail: (alan, satir) => void (alan.textContent = satir.aciklama), // satır başlığında açma işareti
|
|
206
|
+
rowDetailHeight: 'auto', // ya da px cinsinden yükseklik
|
|
203
207
|
columns: [
|
|
204
208
|
{ data: 'tutar', summary: 'sum' }, // sum, avg, count, min, max ya da fonksiyon
|
|
205
209
|
{ data: 'site', renderer: linkRenderer((v) => String(v)) }, // yalnızca http, https, mailto, tel
|
package/dist/cenitu-table.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BRU1fMHd.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.linkRenderer=e.linkRenderer;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;
|
package/dist/cenitu-table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 k, u as _, v as b, w as f, 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, $, a0 as aa } from "./index-
|
|
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 k, u as _, v as b, w as f, 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, $, a0 as aa } from "./index-CKljYtFr.js";
|
|
2
2
|
export {
|
|
3
3
|
e as CSV_MIME,
|
|
4
4
|
r as CellError,
|