gp-grid-core 0.2.2 → 0.2.5
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 +4 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ A framework-agnostic TypeScript library for building high-performance data grids
|
|
|
16
16
|
## Available implementations
|
|
17
17
|
|
|
18
18
|
- [**gp-grid-react**](https://www.npmjs.com/package/gp-grid-react) | Official
|
|
19
|
+
- [**gp-grid-vue**](https://www.npmjs.com/package/gp-grid-vue) | Official
|
|
19
20
|
|
|
20
21
|
## Philosophy
|
|
21
22
|
|
|
@@ -396,7 +397,7 @@ class MyGridAdapter {
|
|
|
396
397
|
|
|
397
398
|
## Donations
|
|
398
399
|
|
|
399
|
-
Keeping this library requires effort and passion, I'm a full time engineer employed on other project and I'm trying my best to keep this work free! For all the features.
|
|
400
|
+
Keeping this library requires effort and passion, I'm a full time engineer employed on other project and I'm trying my best to keep this work free! For all the features.
|
|
400
401
|
|
|
401
402
|
If you think this project helped you achieve your goals, it's hopefully worth a beer! 🍻
|
|
402
403
|
|
|
@@ -420,4 +421,5 @@ bitcoin:bc1qcukwmzver59eyqq442xyzscmxavqjt568kkc9m
|
|
|
420
421
|
|
|
421
422
|
lnurl1dp68gurn8ghj7ampd3kx2ar0veekzar0wd5xjtnrdakj7tnhv4kxctttdehhwm30d3h82unvwqhhx6rpvanhjetdvfjhyvf4xs0xu5p7
|
|
422
423
|
|
|
423
|
-
</div>
|
|
424
|
+
</div>
|
|
425
|
+
|
package/dist/index.d.ts
CHANGED
|
@@ -341,11 +341,11 @@ type BatchInstructionListener = (instructions: GridInstruction[]) => void;
|
|
|
341
341
|
//#endregion
|
|
342
342
|
//#region src/types/renderers.d.ts
|
|
343
343
|
/** Cell renderer params */
|
|
344
|
-
interface CellRendererParams {
|
|
344
|
+
interface CellRendererParams<TData extends Row = Row> {
|
|
345
345
|
/** Cell value */
|
|
346
346
|
value: CellValue;
|
|
347
347
|
/** Row data */
|
|
348
|
-
rowData:
|
|
348
|
+
rowData: TData;
|
|
349
349
|
/** Column definition */
|
|
350
350
|
column: ColumnDefinition;
|
|
351
351
|
/** Row index */
|
|
@@ -360,7 +360,7 @@ interface CellRendererParams {
|
|
|
360
360
|
isEditing: boolean;
|
|
361
361
|
}
|
|
362
362
|
/** Edit renderer params */
|
|
363
|
-
interface EditRendererParams extends CellRendererParams {
|
|
363
|
+
interface EditRendererParams<TData extends Row = Row> extends CellRendererParams<TData> {
|
|
364
364
|
/** Initial value */
|
|
365
365
|
initialValue: CellValue;
|
|
366
366
|
/** On value change */
|
package/dist/index.js
CHANGED
|
@@ -181,7 +181,7 @@ self.onmessage = function(e) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
-
`],{type:`application/javascript`});this.workerUrl=URL.createObjectURL(e),this.worker=new Worker(this.workerUrl),this.worker.onmessage=e=>{let{id:t}=e.data,n=this.pendingRequests.get(t);n&&(this.pendingRequests.delete(t),e.data.type===`sorted`?n.resolve(e.data.data):e.data.type===`sortedIndices`||e.data.type===`sortedMultiColumn`?n.resolve(e.data.indices):e.data.type===`sortedStringHashes`?n.resolve({indices:e.data.indices,collisionRuns:e.data.collisionRuns}):e.data.type===`error`&&n.reject(Error(e.data.error)))},this.worker.onerror=e=>{for(let[t,n]of this.pendingRequests)n.reject(Error(`Worker error: ${e.message}`)),this.pendingRequests.delete(t)}}terminate(){this.worker&&=(this.worker.terminate(),null),this.workerUrl&&=(URL.revokeObjectURL(this.workerUrl),null);for(let[,e]of this.pendingRequests)e.reject(Error(`Worker terminated`));this.pendingRequests.clear(),this.isTerminated=!0}isAvailable(){return!this.isTerminated&&typeof Worker<`u`}};let d=null;function f(){return d||=new u,d}function p(){d&&=(d.terminate(),null)}function m(e){let t=e.toLowerCase(),n=Math.min(t.length,10),r=0;for(let e=0;e<n;e++){let n=t.charCodeAt(e),i;i=n>=97&&n<=122?n-97:n>=48&&n<=57?n-48+26:0,r=r*36+i}for(let e=n;e<10;e++)r*=36;return r}function h(e){let t=e.toLowerCase(),n=[];for(let e=0;e<3;e++){let r=e*10,i=0;for(let e=0;e<10;e++){let n=r+e,a=n<t.length?t.charCodeAt(n):0,o;o=a>=97&&a<=122?a-97:a>=48&&a<=57?a-48+26:0,i=i*36+o}n.push(i)}return n}function g(e){if(e==null)return Number.MAX_VALUE;if(Array.isArray(e))return e.length===0?Number.MAX_VALUE:m(e.join(`, `));if(typeof e==`number`)return e;if(e instanceof Date)return e.getTime();if(typeof e==`string`)return m(e);let t=Number(e);return isNaN(t)?0:t}function ee(e,t){let n=e==null||Array.isArray(e)&&e.length===0,r=t==null||Array.isArray(t)&&t.length===0;if(n&&r)return 0;if(n)return 1;if(r)return-1;if(Array.isArray(e)||Array.isArray(t)){let n=Array.isArray(e)?e.join(`, `):String(e??``),r=Array.isArray(t)?t.join(`, `):String(t??``);return n.localeCompare(r)}let i=Number(e),a=Number(t);return!isNaN(i)&&!isNaN(a)?i-a:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))}function te(e,t,n){return[...e].sort((e,r)=>{for(let{colId:i,direction:a}of t){let t=ee(n(e,i),n(r,i));if(t!==0)return a===`asc`?t:-t}return 0})}function _(e,t,n){let r=Object.entries(t).filter(([,e])=>typeof e==`string`?e.trim()!==``:e.conditions&&e.conditions.length>0);return r.length===0?e:e.filter(e=>{for(let[t,i]of r){let r=n(e,t);if(typeof i==`string`){if(!String(r??``).toLowerCase().includes(i.toLowerCase()))return!1;continue}if(!v(r,i))return!1}return!0})}function v(e,t){if(t.conditions.length===0)return!0;let n=t.conditions[0];if(!n)return!0;let r=y(e,n);for(let n=1;n<t.conditions.length;n++){let i=t.conditions[n-1],a=t.conditions[n],o=i.nextOperator??t.combination,s=y(e,a);o===`and`?r&&=s:r||=s}return r}function y(e,t){switch(t.type){case`text`:return ne(e,t);case`number`:return b(e,t);case`date`:return S(e,t);default:return!0}}function ne(e,t){let n=e==null||e===``||Array.isArray(e)&&e.length===0;if(t.selectedValues&&t.selectedValues.size>0){let r=t.includeBlank===!0&&n;if(Array.isArray(e)){let n=[...e].sort((e,t)=>String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})).join(`, `);return t.selectedValues.has(n)||r}let i=String(e??``);return t.selectedValues.has(i)||r}let r=String(e??``).toLowerCase(),i=String(t.value??``).toLowerCase();switch(t.operator){case`contains`:return r.includes(i);case`notContains`:return!r.includes(i);case`equals`:return r===i;case`notEquals`:return r!==i;case`startsWith`:return r.startsWith(i);case`endsWith`:return r.endsWith(i);case`blank`:return n;case`notBlank`:return!n;default:return!0}}function b(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=Number(e);if(isNaN(r))return!1;let i=t.value??0,a=t.valueTo??0;switch(t.operator){case`=`:return r===i;case`!=`:return r!==i;case`>`:return r>i;case`<`:return r<i;case`>=`:return r>=i;case`<=`:return r<=i;case`between`:return r>=i&&r<=a;default:return!0}}function x(e,t){return e.toDateString()===t.toDateString()}function S(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=e instanceof Date?e:new Date(String(e));if(isNaN(r.getTime()))return!1;let i=t.value instanceof Date?t.value:new Date(String(t.value??``)),a=t.valueTo instanceof Date?t.valueTo:new Date(String(t.valueTo??``)),o=r.getTime(),s=i.getTime(),c=a.getTime();switch(t.operator){case`=`:return x(r,i);case`!=`:return!x(r,i);case`>`:return o>s;case`<`:return o<s;case`between`:return o>=s&&o<=c;default:return!0}}function re(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return null;r=r[e]}return r??null}function C(e,t={}){let{getFieldValue:n=re,useWorker:r=!0}=t,i=r?new u:null;return{async fetch(t){let r=[...e];if(t.filter&&Object.keys(t.filter).length>0&&(r=_(r,t.filter,n)),t.sort&&t.sort.length>0)if(i&&i.isAvailable()&&r.length>=2e5){let e;if(t.sort.length===1){let{colId:a,direction:o}=t.sort[0],s=!1;for(let e of r){let t=n(e,a);if(t!=null){s=typeof t==`string`||Array.isArray(t);break}}if(s){let t=[],s=Array.from({length:3},()=>[]);for(let e of r){let r=n(e,a),i=r==null?``:Array.isArray(r)?r.join(`, `):String(r);t.push(i);let o=h(i);for(let e=0;e<3;e++)s[e].push(o[e])}let c=s.map(e=>new Float64Array(e));e=await i.sortStringHashes(c,o,t)}else{let t=r.map(e=>g(n(e,a)));e=await i.sortIndices(t,o)}}else{let a=[],o=[];for(let{colId:e,direction:i}of t.sort){let t=r.map(t=>g(n(t,e)));a.push(t),o.push(i)}e=await i.sortMultiColumn(a,o)}let a=Array(r.length);for(let t=0;t<e.length;t++)a[t]=r[e[t]];r=a}else r=te(r,t.sort,n);let a=r.length,{pageIndex:o,pageSize:s}=t.pagination,c=o*s;return{rows:r.slice(c,c+s),totalRows:a}}}}function w(e){return C(e)}function T(e){return{async fetch(t){return e(t)}}}function E(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return null;r=r[e]}return r??null}function D(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e++){let t=r[e];if(typeof i!=`object`||!i)return;i=i[t]}typeof i==`object`&&i&&(i[r[r.length-1]]=n)}function O(e){let t=e.toLowerCase(),n=Math.min(t.length,10),r=0;for(let e=0;e<n;e++){let n=t.charCodeAt(e),i;i=n>=97&&n<=122?n-97:n>=48&&n<=57?n-48+26:0,r=r*36+i}for(let e=n;e<10;e++)r*=36;return r}function k(e,t){let n=e==null||Array.isArray(e)&&e.length===0,r=t==null||Array.isArray(t)&&t.length===0;if(n&&r)return 0;if(n)return 1;if(r)return-1;if(Array.isArray(e)||Array.isArray(t)){let n=Array.isArray(e)?e.join(`, `):String(e??``),r=Array.isArray(t)?t.join(`, `):String(t??``);return n.localeCompare(r)}let i=Number(e),a=Number(t);return!isNaN(i)&&!isNaN(a)?i-a:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))}function A(e){if(e==null)return Number.MAX_VALUE;if(typeof e==`number`)return e;if(e instanceof Date)return e.getTime();if(typeof e==`string`)return O(e);let t=Number(e);return isNaN(t)?0:t}function ie(e,t){let n=[];for(let r of t.sortModel){let i=A(t.getFieldValue(e,r.colId));n.push(i)}return n}function j(e,t,n){if(!e||!t)return null;for(let r=0;r<n.length;r++){let i=e[r]-t[r];if(i!==0)return n[r].direction===`asc`?i:-i}return 0}function M(e,t,n,r){for(let{colId:i,direction:a}of n){let n=k(r(e,i),r(t,i));if(n!==0)return a===`asc`?n:-n}return 0}function N(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function P(e,t){let n=e==null||e===``||Array.isArray(e)&&e.length===0;if(t.selectedValues&&t.selectedValues.size>0){let r=t.includeBlank===!0&&n;if(Array.isArray(e)){let n=[...e].sort((e,t)=>String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})).join(`, `);return t.selectedValues.has(n)||r}let i=String(e??``);return t.selectedValues.has(i)||r}let r=String(e??``).toLowerCase(),i=String(t.value??``).toLowerCase();switch(t.operator){case`contains`:return r.includes(i);case`notContains`:return!r.includes(i);case`equals`:return r===i;case`notEquals`:return r!==i;case`startsWith`:return r.startsWith(i);case`endsWith`:return r.endsWith(i);case`blank`:return n;case`notBlank`:return!n;default:return!0}}function F(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=typeof e==`number`?e:parseFloat(String(e));if(isNaN(r))return!1;let i=t.value??0,a=t.valueTo??0;switch(t.operator){case`=`:return r===i;case`!=`:return r!==i;case`>`:return r>i;case`<`:return r<i;case`>=`:return r>=i;case`<=`:return r<=i;case`between`:return r>=i&&r<=a;default:return!0}}function I(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=e instanceof Date?e:new Date(String(e));if(isNaN(r.getTime()))return!1;let i=t.value?t.value instanceof Date?t.value:new Date(t.value):new Date,a=t.valueTo?t.valueTo instanceof Date?t.valueTo:new Date(t.valueTo):new Date;switch(t.operator){case`=`:return N(r,i);case`!=`:return!N(r,i);case`>`:return r>i;case`<`:return r<i;case`between`:return r>=i&&r<=a;default:return!0}}function L(e,t){switch(t.type){case`text`:return P(e,t);case`number`:return F(e,t);case`date`:return I(e,t);default:return!0}}function R(e,t){if(!t.conditions||!t.conditions.length)return!0;let n=t.conditions[0];if(!n)return!0;let r=L(e,n);for(let n=1;n<t.conditions.length;n++){let i=t.conditions[n-1],a=t.conditions[n],o=i.nextOperator??t.combination,s=L(e,a);o===`and`?r&&=s:r||=s}return r}function z(e,t,n){let r=Object.entries(t).filter(([,e])=>e!=null);if(r.length===0)return!0;for(let[t,i]of r){let r=n(e,t);if(typeof i==`string`){if(!String(r??``).toLowerCase().includes(i.toLowerCase()))return!1;continue}if(!R(r,i))return!1}return!0}var B=class{rows=[];rowById=new Map;sortedIndices=[];sortModel=[];sortModelHash=``;filterModel={};filteredIndices=new Set;distinctValues=new Map;rowSortCache=new Map;options;constructor(e=[],t){this.options={getRowId:t.getRowId,getFieldValue:t.getFieldValue??E},this.setData(e)}setData(e){this.rows=[...e],this.rowById.clear(),this.rowSortCache.clear(),this.distinctValues.clear();for(let e=0;e<this.rows.length;e++){let t=this.rows[e],n=this.options.getRowId(t);this.rowById.set(n,e)}this.rebuildSortedIndices(),this.rebuildFilteredIndices(),this.rebuildDistinctValues()}query(e){e.sort&&this.setSortModel(e.sort),e.filter&&this.setFilterModel(e.filter);let t=this.getVisibleIndices(),n=t.length,{pageIndex:r,pageSize:i}=e.pagination,a=r*i,o=Math.min(a+i,n),s=[];for(let e=a;e<o;e++){let n=t[e];n!==void 0&&s.push(this.rows[n])}return{rows:s,totalRows:n}}getRowById(e){let t=this.rowById.get(e);return t===void 0?void 0:this.rows[t]}getRowByIndex(e){return this.rows[e]}getTotalRowCount(){return this.rows.length}getVisibleRowCount(){return Object.keys(this.filterModel).length===0?this.rows.length:this.filteredIndices.size}getDistinctValues(e){let t=this.distinctValues.get(e);return t?Array.from(t):[]}addRows(e){for(let t of e)this.addRow(t)}addRow(e){let t=this.options.getRowId(e);if(this.rowById.has(t)){console.warn(`Row with ID ${t} already exists. Skipping.`);return}let n=this.rows.length;if(this.rows.push(e),this.rowById.set(t,n),this.updateDistinctValuesForRow(e,`add`),this.sortModel.length>0&&this.computeRowHashes(n,e),this.sortModel.length>0){let e=this.binarySearchInsertPosition(n);this.sortedIndices.splice(e,0,n)}else this.sortedIndices.push(n);this.rowPassesFilter(e)&&this.filteredIndices.add(n)}removeRows(e){let t=[];for(let n of e){let e=this.rowById.get(n);e!==void 0&&t.push(e)}if(t.length!==0){t.sort((e,t)=>t-e);for(let e of t)this.removeRowByIndex(e)}}removeRowByIndex(e){let t=this.rows[e];if(!t)return;let n=this.options.getRowId(t);this.updateDistinctValuesForRow(t,`remove`);let r=this.sortedIndices.indexOf(e);r!==-1&&this.sortedIndices.splice(r,1),this.filteredIndices.delete(e),this.rowSortCache.delete(e),this.rowById.delete(n),this.rows.splice(e,1),this.reindexAfterRemoval(e)}reindexAfterRemoval(e){for(let[t,n]of this.rowById.entries())n>e&&this.rowById.set(t,n-1);for(let t=0;t<this.sortedIndices.length;t++)this.sortedIndices[t]>e&&this.sortedIndices[t]--;let t=new Set;for(let n of this.filteredIndices)n>e?t.add(n-1):t.add(n);this.filteredIndices=t;let n=new Map;for(let[t,r]of this.rowSortCache)t>e?n.set(t-1,r):n.set(t,r);this.rowSortCache=n}updateCell(e,t,n){let r=this.rowById.get(e);if(r===void 0){console.warn(`Row with ID ${e} not found.`);return}let i=this.rows[r],a=this.options.getFieldValue(i,t);if(D(i,t,n),this.updateDistinctValueForField(t,a,n),this.sortModel.some(e=>e.colId===t)&&this.sortModel.length>0){this.computeRowHashes(r,i);let e=this.sortedIndices.indexOf(r);e!==-1&&this.sortedIndices.splice(e,1);let t=this.binarySearchInsertPosition(r);this.sortedIndices.splice(t,0,r)}t in this.filterModel&&(this.rowPassesFilter(i)?this.filteredIndices.add(r):this.filteredIndices.delete(r))}updateRow(e,t){for(let[n,r]of Object.entries(t))this.updateCell(e,n,r)}setSortModel(e){let t=JSON.stringify(e);t!==this.sortModelHash&&(this.sortModelHash=t,this.sortModel=[...e],this.rebuildHashCache(),this.rebuildSortedIndices())}getSortModel(){return[...this.sortModel]}setFilterModel(e){JSON.stringify(e)!==JSON.stringify(this.filterModel)&&(this.filterModel={...e},this.rebuildFilteredIndices())}getFilterModel(){return{...this.filterModel}}rebuildSortedIndices(){this.sortedIndices=Array.from({length:this.rows.length},(e,t)=>t),this.sortModel.length!==0&&this.sortedIndices.sort((e,t)=>this.compareRows(e,t))}rebuildHashCache(){if(this.rowSortCache.clear(),this.sortModel.length!==0)for(let e=0;e<this.rows.length;e++)this.computeRowHashes(e,this.rows[e])}computeRowHashes(e,t){if(this.sortModel.length===0)return;let n=ie(t,{sortModel:this.sortModel,sortModelHash:this.sortModelHash,getFieldValue:this.options.getFieldValue}),r=this.rowSortCache.get(e);r||(r={hashes:new Map},this.rowSortCache.set(e,r)),r.hashes.set(this.sortModelHash,n)}compareRows(e,t){let n=this.rowSortCache.get(e),r=this.rowSortCache.get(t),i=n?.hashes.get(this.sortModelHash),a=r?.hashes.get(this.sortModelHash),o=j(i,a,this.sortModel);return o===null?M(this.rows[e],this.rows[t],this.sortModel,this.options.getFieldValue):o}binarySearchInsertPosition(e){let t=0,n=this.sortedIndices.length;for(;t<n;){let r=t+n>>>1,i=this.sortedIndices[r];this.compareRows(e,i)>0?t=r+1:n=r}return t}rebuildFilteredIndices(){if(this.filteredIndices.clear(),Object.entries(this.filterModel).filter(([,e])=>e!=null).length!==0)for(let e=0;e<this.rows.length;e++)this.rowPassesFilter(this.rows[e])&&this.filteredIndices.add(e)}rowPassesFilter(e){return z(e,this.filterModel,this.options.getFieldValue)}getVisibleIndices(){return Object.entries(this.filterModel).filter(([,e])=>e!=null).length>0?this.sortedIndices.filter(e=>this.filteredIndices.has(e)):this.sortedIndices}rebuildDistinctValues(){this.distinctValues.clear();for(let e of this.rows)this.updateDistinctValuesForRow(e,`add`)}updateDistinctValuesForRow(e,t){if(!(typeof e!=`object`||!e)){for(let[n,r]of Object.entries(e))if(r!=null&&t===`add`){let e=this.distinctValues.get(n);if(e||(e=new Set,this.distinctValues.set(n,e)),Array.isArray(r))for(let t of r)t!=null&&e.add(t);else e.add(r)}}}updateDistinctValueForField(e,t,n){if(n!=null){let t=this.distinctValues.get(e);if(t||(t=new Set,this.distinctValues.set(e,t)),Array.isArray(n))for(let e of n)e!=null&&t.add(e);else t.add(n)}}},V=class{queue=[];debounceTimer=null;pendingPromise=null;options;constructor(e){this.options=e}add(e){e.length!==0&&(this.queue.push({type:`ADD`,rows:e}),this.scheduleProcessing())}remove(e){e.length!==0&&(this.queue.push({type:`REMOVE`,rowIds:e}),this.scheduleProcessing())}updateCell(e,t,n){this.queue.push({type:`UPDATE_CELL`,rowId:e,field:t,value:n}),this.scheduleProcessing()}updateRow(e,t){Object.keys(t).length!==0&&(this.queue.push({type:`UPDATE_ROW`,rowId:e,data:t}),this.scheduleProcessing())}flush(){return this.queue.length===0?Promise.resolve():(this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.pendingPromise?new Promise((e,t)=>{let n=this.pendingPromise,r=n.resolve,i=n.reject;n.resolve=()=>{r(),e()},n.reject=e=>{i(e),t(e)}}):new Promise((e,t)=>{this.pendingPromise={resolve:e,reject:t},this.processQueue()}))}hasPending(){return this.queue.length>0}getPendingCount(){return this.queue.length}clear(){this.queue=[],this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.pendingPromise&&=(this.pendingPromise.resolve(),null)}scheduleProcessing(){if(this.options.debounceMs===0){this.processQueue();return}this.debounceTimer===null&&(this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.processQueue()},this.options.debounceMs))}processQueue(){if(this.queue.length===0){this.pendingPromise&&=(this.pendingPromise.resolve(),null);return}let e=this.queue;this.queue=[];let t={added:0,removed:0,updated:0};try{for(let n of e)switch(n.type){case`ADD`:this.options.store.addRows(n.rows),t.added+=n.rows.length;break;case`REMOVE`:this.options.store.removeRows(n.rowIds),t.removed+=n.rowIds.length;break;case`UPDATE_CELL`:this.options.store.updateCell(n.rowId,n.field,n.value),t.updated++;break;case`UPDATE_ROW`:this.options.store.updateRow(n.rowId,n.data),t.updated++;break}this.options.onProcessed&&this.options.onProcessed(t),this.pendingPromise&&=(this.pendingPromise.resolve(),null)}catch(e){this.pendingPromise&&=(this.pendingPromise.reject(e instanceof Error?e:Error(String(e))),null)}}};function H(e,t){let{getRowId:n,getFieldValue:r,debounceMs:i=50,onTransactionProcessed:a}=t,o=new B(e,{getRowId:n,getFieldValue:r}),s=new Set,c=new V({debounceMs:i,store:o,onProcessed:e=>{a?.(e);for(let t of s)t(e)}});return{async fetch(e){return c.hasPending()&&await c.flush(),o.query(e)},addRows(e){c.add(e)},removeRows(e){c.remove(e)},updateCell(e,t,n){c.updateCell(e,t,n)},updateRow(e,t){c.updateRow(e,t)},async flushTransactions(){await c.flush()},hasPendingTransactions(){return c.hasPending()},getDistinctValues(e){return o.getDistinctValues(e)},getRowById(e){return o.getRowById(e)},getTotalRowCount(){return o.getTotalRowCount()},subscribe(e){return s.add(e),()=>{s.delete(e)}}}}const U=`
|
|
184
|
+
`],{type:`application/javascript`});this.workerUrl=URL.createObjectURL(e),this.worker=new Worker(this.workerUrl),this.worker.onmessage=e=>{let{id:t}=e.data,n=this.pendingRequests.get(t);n&&(this.pendingRequests.delete(t),e.data.type===`sorted`?n.resolve(e.data.data):e.data.type===`sortedIndices`||e.data.type===`sortedMultiColumn`?n.resolve(e.data.indices):e.data.type===`sortedStringHashes`?n.resolve({indices:e.data.indices,collisionRuns:e.data.collisionRuns}):e.data.type===`error`&&n.reject(Error(e.data.error)))},this.worker.onerror=e=>{for(let[t,n]of this.pendingRequests)n.reject(Error(`Worker error: ${e.message}`)),this.pendingRequests.delete(t)}}terminate(){this.worker&&=(this.worker.terminate(),null),this.workerUrl&&=(URL.revokeObjectURL(this.workerUrl),null);for(let[,e]of this.pendingRequests)e.reject(Error(`Worker terminated`));this.pendingRequests.clear(),this.isTerminated=!0}isAvailable(){return!this.isTerminated&&typeof Worker<`u`}};let d=null;function f(){return d||=new u,d}function p(){d&&=(d.terminate(),null)}function m(e){let t=e.toLowerCase(),n=Math.min(t.length,10),r=0;for(let e=0;e<n;e++){let n=t.charCodeAt(e),i;i=n>=97&&n<=122?n-97:n>=48&&n<=57?n-48+26:0,r=r*36+i}for(let e=n;e<10;e++)r*=36;return r}function h(e){let t=e.toLowerCase(),n=[];for(let e=0;e<3;e++){let r=e*10,i=0;for(let e=0;e<10;e++){let n=r+e,a=n<t.length?t.charCodeAt(n):0,o;o=a>=97&&a<=122?a-97:a>=48&&a<=57?a-48+26:0,i=i*36+o}n.push(i)}return n}function g(e){if(e==null)return Number.MAX_VALUE;if(Array.isArray(e))return e.length===0?Number.MAX_VALUE:m(e.join(`, `));if(typeof e==`number`)return e;if(e instanceof Date)return e.getTime();if(typeof e==`string`)return m(e);let t=Number(e);return isNaN(t)?0:t}function ee(e,t){let n=e==null||Array.isArray(e)&&e.length===0,r=t==null||Array.isArray(t)&&t.length===0;if(n&&r)return 0;if(n)return 1;if(r)return-1;if(Array.isArray(e)||Array.isArray(t)){let n=Array.isArray(e)?e.join(`, `):String(e??``),r=Array.isArray(t)?t.join(`, `):String(t??``);return n.localeCompare(r)}let i=Number(e),a=Number(t);return!isNaN(i)&&!isNaN(a)?i-a:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))}function te(e,t,n){return[...e].sort((e,r)=>{for(let{colId:i,direction:a}of t){let t=ee(n(e,i),n(r,i));if(t!==0)return a===`asc`?t:-t}return 0})}function _(e,t,n){let r=Object.entries(t).filter(([,e])=>typeof e==`string`?e.trim()!==``:e.conditions&&e.conditions.length>0);return r.length===0?e:e.filter(e=>{for(let[t,i]of r){let r=n(e,t);if(typeof i==`string`){if(!String(r??``).toLowerCase().includes(i.toLowerCase()))return!1;continue}if(!v(r,i))return!1}return!0})}function v(e,t){if(t.conditions.length===0)return!0;let n=t.conditions[0];if(!n)return!0;let r=y(e,n);for(let n=1;n<t.conditions.length;n++){let i=t.conditions[n-1],a=t.conditions[n],o=i.nextOperator??t.combination,s=y(e,a);o===`and`?r&&=s:r||=s}return r}function y(e,t){switch(t.type){case`text`:return ne(e,t);case`number`:return b(e,t);case`date`:return S(e,t);default:return!0}}function ne(e,t){let n=e==null||e===``||Array.isArray(e)&&e.length===0;if(t.selectedValues&&t.selectedValues.size>0){let r=t.includeBlank===!0&&n;if(Array.isArray(e)){let n=[...e].sort((e,t)=>String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})).join(`, `);return t.selectedValues.has(n)||r}let i=String(e??``);return t.selectedValues.has(i)||r}let r=String(e??``).toLowerCase(),i=String(t.value??``).toLowerCase();switch(t.operator){case`contains`:return r.includes(i);case`notContains`:return!r.includes(i);case`equals`:return r===i;case`notEquals`:return r!==i;case`startsWith`:return r.startsWith(i);case`endsWith`:return r.endsWith(i);case`blank`:return n;case`notBlank`:return!n;default:return!0}}function b(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=Number(e);if(isNaN(r))return!1;let i=t.value??0,a=t.valueTo??0;switch(t.operator){case`=`:return r===i;case`!=`:return r!==i;case`>`:return r>i;case`<`:return r<i;case`>=`:return r>=i;case`<=`:return r<=i;case`between`:return r>=i&&r<=a;default:return!0}}function x(e,t){return e.toDateString()===t.toDateString()}function S(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=e instanceof Date?e:new Date(String(e));if(isNaN(r.getTime()))return!1;let i=t.value instanceof Date?t.value:new Date(String(t.value??``)),a=t.valueTo instanceof Date?t.valueTo:new Date(String(t.valueTo??``)),o=r.getTime(),s=i.getTime(),c=a.getTime();switch(t.operator){case`=`:return x(r,i);case`!=`:return!x(r,i);case`>`:return o>s;case`<`:return o<s;case`between`:return o>=s&&o<=c;default:return!0}}function re(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return null;r=r[e]}return r??null}function C(e,t={}){let{getFieldValue:n=re,useWorker:r=!0}=t,i=r?new u:null;return{async fetch(t){let r=[...e];if(t.filter&&Object.keys(t.filter).length>0&&(r=_(r,t.filter,n)),t.sort&&t.sort.length>0)if(i&&i.isAvailable()&&r.length>=2e5){let e;if(t.sort.length===1){let{colId:a,direction:o}=t.sort[0],s=!1;for(let e of r){let t=n(e,a);if(t!=null){s=typeof t==`string`||Array.isArray(t);break}}if(s){let t=[],s=Array.from({length:3},()=>[]);for(let e of r){let r=n(e,a),i=r==null?``:Array.isArray(r)?r.join(`, `):String(r);t.push(i);let o=h(i);for(let e=0;e<3;e++)s[e].push(o[e])}let c=s.map(e=>new Float64Array(e));e=await i.sortStringHashes(c,o,t)}else{let t=r.map(e=>g(n(e,a)));e=await i.sortIndices(t,o)}}else{let a=[],o=[];for(let{colId:e,direction:i}of t.sort){let t=r.map(t=>g(n(t,e)));a.push(t),o.push(i)}e=await i.sortMultiColumn(a,o)}let a=Array(r.length);for(let t=0;t<e.length;t++)a[t]=r[e[t]];r=a}else r=te(r,t.sort,n);let a=r.length,{pageIndex:o,pageSize:s}=t.pagination,c=o*s;return{rows:r.slice(c,c+s),totalRows:a}}}}function w(e){return C(e)}function T(e){return{async fetch(t){return e(t)}}}function E(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return null;r=r[e]}return r??null}function D(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e++){let t=r[e];if(typeof i!=`object`||!i)return;i=i[t]}typeof i==`object`&&i&&(i[r[r.length-1]]=n)}function O(e){let t=e.toLowerCase(),n=Math.min(t.length,10),r=0;for(let e=0;e<n;e++){let n=t.charCodeAt(e),i;i=n>=97&&n<=122?n-97:n>=48&&n<=57?n-48+26:0,r=r*36+i}for(let e=n;e<10;e++)r*=36;return r}function k(e,t){let n=e==null||Array.isArray(e)&&e.length===0,r=t==null||Array.isArray(t)&&t.length===0;if(n&&r)return 0;if(n)return 1;if(r)return-1;if(Array.isArray(e)||Array.isArray(t)){let n=Array.isArray(e)?e.join(`, `):String(e??``),r=Array.isArray(t)?t.join(`, `):String(t??``);return n.localeCompare(r)}let i=Number(e),a=Number(t);return!isNaN(i)&&!isNaN(a)?i-a:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))}function A(e){if(e==null)return Number.MAX_VALUE;if(typeof e==`number`)return e;if(e instanceof Date)return e.getTime();if(typeof e==`string`)return O(e);let t=Number(e);return isNaN(t)?0:t}function ie(e,t){let n=[];for(let r of t.sortModel){let i=A(t.getFieldValue(e,r.colId));n.push(i)}return n}function j(e,t,n){if(!e||!t)return null;for(let r=0;r<n.length;r++){let i=e[r]-t[r];if(i!==0)return n[r].direction===`asc`?i:-i}return 0}function M(e,t,n,r){for(let{colId:i,direction:a}of n){let n=k(r(e,i),r(t,i));if(n!==0)return a===`asc`?n:-n}return 0}function N(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function P(e,t){let n=e==null||e===``||Array.isArray(e)&&e.length===0;if(t.selectedValues&&t.selectedValues.size>0){let r=t.includeBlank===!0&&n;if(Array.isArray(e)){let n=[...e].sort((e,t)=>String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})).join(`, `);return t.selectedValues.has(n)||r}let i=String(e??``);return t.selectedValues.has(i)||r}let r=String(e??``).toLowerCase(),i=String(t.value??``).toLowerCase();switch(t.operator){case`contains`:return r.includes(i);case`notContains`:return!r.includes(i);case`equals`:return r===i;case`notEquals`:return r!==i;case`startsWith`:return r.startsWith(i);case`endsWith`:return r.endsWith(i);case`blank`:return n;case`notBlank`:return!n;default:return!0}}function F(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=typeof e==`number`?e:parseFloat(String(e));if(isNaN(r))return!1;let i=t.value??0,a=t.valueTo??0;switch(t.operator){case`=`:return r===i;case`!=`:return r!==i;case`>`:return r>i;case`<`:return r<i;case`>=`:return r>=i;case`<=`:return r<=i;case`between`:return r>=i&&r<=a;default:return!0}}function I(e,t){let n=e==null||e===``;if(t.operator===`blank`)return n;if(t.operator===`notBlank`)return!n;if(n)return!1;let r=e instanceof Date?e:new Date(String(e));if(isNaN(r.getTime()))return!1;let i=t.value?t.value instanceof Date?t.value:new Date(t.value):new Date,a=t.valueTo?t.valueTo instanceof Date?t.valueTo:new Date(t.valueTo):new Date;switch(t.operator){case`=`:return N(r,i);case`!=`:return!N(r,i);case`>`:return r>i;case`<`:return r<i;case`between`:return r>=i&&r<=a;default:return!0}}function L(e,t){switch(t.type){case`text`:return P(e,t);case`number`:return F(e,t);case`date`:return I(e,t);default:return!0}}function R(e,t){if(!t.conditions||!t.conditions.length)return!0;let n=t.conditions[0];if(!n)return!0;let r=L(e,n);for(let n=1;n<t.conditions.length;n++){let i=t.conditions[n-1],a=t.conditions[n],o=i.nextOperator??t.combination,s=L(e,a);o===`and`?r&&=s:r||=s}return r}function z(e,t,n){let r=Object.entries(t).filter(([,e])=>e!=null);if(r.length===0)return!0;for(let[t,i]of r)if(!R(n(e,t),i))return!1;return!0}var B=class{rows=[];rowById=new Map;sortedIndices=[];sortModel=[];sortModelHash=``;filterModel={};filteredIndices=new Set;distinctValues=new Map;rowSortCache=new Map;options;constructor(e=[],t){this.options={getRowId:t.getRowId,getFieldValue:t.getFieldValue??E},this.setData(e)}setData(e){this.rows=[...e],this.rowById.clear(),this.rowSortCache.clear(),this.distinctValues.clear();for(let e=0;e<this.rows.length;e++){let t=this.rows[e],n=this.options.getRowId(t);this.rowById.set(n,e)}this.rebuildSortedIndices(),this.rebuildFilteredIndices(),this.rebuildDistinctValues()}query(e){e.sort&&this.setSortModel(e.sort),e.filter&&this.setFilterModel(e.filter);let t=this.getVisibleIndices(),n=t.length,{pageIndex:r,pageSize:i}=e.pagination,a=r*i,o=Math.min(a+i,n),s=[];for(let e=a;e<o;e++){let n=t[e];n!==void 0&&s.push(this.rows[n])}return{rows:s,totalRows:n}}getRowById(e){let t=this.rowById.get(e);return t===void 0?void 0:this.rows[t]}getRowByIndex(e){return this.rows[e]}getTotalRowCount(){return this.rows.length}getVisibleRowCount(){return Object.keys(this.filterModel).length===0?this.rows.length:this.filteredIndices.size}getDistinctValues(e){let t=this.distinctValues.get(e);return t?Array.from(t):[]}addRows(e){for(let t of e)this.addRow(t)}addRow(e){let t=this.options.getRowId(e);if(this.rowById.has(t)){console.warn(`Row with ID ${t} already exists. Skipping.`);return}let n=this.rows.length;if(this.rows.push(e),this.rowById.set(t,n),this.updateDistinctValuesForRow(e,`add`),this.sortModel.length>0&&this.computeRowHashes(n,e),this.sortModel.length>0){let e=this.binarySearchInsertPosition(n);this.sortedIndices.splice(e,0,n)}else this.sortedIndices.push(n);this.rowPassesFilter(e)&&this.filteredIndices.add(n)}removeRows(e){let t=[];for(let n of e){let e=this.rowById.get(n);e!==void 0&&t.push(e)}if(t.length!==0){t.sort((e,t)=>t-e);for(let e of t)this.removeRowByIndex(e)}}removeRowByIndex(e){let t=this.rows[e];if(!t)return;let n=this.options.getRowId(t);this.updateDistinctValuesForRow(t,`remove`);let r=this.sortedIndices.indexOf(e);r!==-1&&this.sortedIndices.splice(r,1),this.filteredIndices.delete(e),this.rowSortCache.delete(e),this.rowById.delete(n),this.rows.splice(e,1),this.reindexAfterRemoval(e)}reindexAfterRemoval(e){for(let[t,n]of this.rowById.entries())n>e&&this.rowById.set(t,n-1);for(let t=0;t<this.sortedIndices.length;t++)this.sortedIndices[t]>e&&this.sortedIndices[t]--;let t=new Set;for(let n of this.filteredIndices)n>e?t.add(n-1):t.add(n);this.filteredIndices=t;let n=new Map;for(let[t,r]of this.rowSortCache)t>e?n.set(t-1,r):n.set(t,r);this.rowSortCache=n}updateCell(e,t,n){let r=this.rowById.get(e);if(r===void 0){console.warn(`Row with ID ${e} not found.`);return}let i=this.rows[r],a=this.options.getFieldValue(i,t);if(D(i,t,n),this.updateDistinctValueForField(t,a,n),this.sortModel.some(e=>e.colId===t)&&this.sortModel.length>0){this.computeRowHashes(r,i);let e=this.sortedIndices.indexOf(r);e!==-1&&this.sortedIndices.splice(e,1);let t=this.binarySearchInsertPosition(r);this.sortedIndices.splice(t,0,r)}t in this.filterModel&&(this.rowPassesFilter(i)?this.filteredIndices.add(r):this.filteredIndices.delete(r))}updateRow(e,t){for(let[n,r]of Object.entries(t))this.updateCell(e,n,r)}setSortModel(e){let t=JSON.stringify(e);t!==this.sortModelHash&&(this.sortModelHash=t,this.sortModel=[...e],this.rebuildHashCache(),this.rebuildSortedIndices())}getSortModel(){return[...this.sortModel]}setFilterModel(e){JSON.stringify(e)!==JSON.stringify(this.filterModel)&&(this.filterModel={...e},this.rebuildFilteredIndices())}getFilterModel(){return{...this.filterModel}}rebuildSortedIndices(){this.sortedIndices=Array.from({length:this.rows.length},(e,t)=>t),this.sortModel.length!==0&&this.sortedIndices.sort((e,t)=>this.compareRows(e,t))}rebuildHashCache(){if(this.rowSortCache.clear(),this.sortModel.length!==0)for(let e=0;e<this.rows.length;e++)this.computeRowHashes(e,this.rows[e])}computeRowHashes(e,t){if(this.sortModel.length===0)return;let n=ie(t,{sortModel:this.sortModel,sortModelHash:this.sortModelHash,getFieldValue:this.options.getFieldValue}),r=this.rowSortCache.get(e);r||(r={hashes:new Map},this.rowSortCache.set(e,r)),r.hashes.set(this.sortModelHash,n)}compareRows(e,t){let n=this.rowSortCache.get(e),r=this.rowSortCache.get(t),i=n?.hashes.get(this.sortModelHash),a=r?.hashes.get(this.sortModelHash),o=j(i,a,this.sortModel);return o===null?M(this.rows[e],this.rows[t],this.sortModel,this.options.getFieldValue):o}binarySearchInsertPosition(e){let t=0,n=this.sortedIndices.length;for(;t<n;){let r=t+n>>>1,i=this.sortedIndices[r];this.compareRows(e,i)>0?t=r+1:n=r}return t}rebuildFilteredIndices(){if(this.filteredIndices.clear(),Object.entries(this.filterModel).filter(([,e])=>e!=null).length!==0)for(let e=0;e<this.rows.length;e++)this.rowPassesFilter(this.rows[e])&&this.filteredIndices.add(e)}rowPassesFilter(e){return z(e,this.filterModel,this.options.getFieldValue)}getVisibleIndices(){return Object.entries(this.filterModel).filter(([,e])=>e!=null).length>0?this.sortedIndices.filter(e=>this.filteredIndices.has(e)):this.sortedIndices}rebuildDistinctValues(){this.distinctValues.clear();for(let e of this.rows)this.updateDistinctValuesForRow(e,`add`)}updateDistinctValuesForRow(e,t){if(!(typeof e!=`object`||!e)){for(let[n,r]of Object.entries(e))if(r!=null&&t===`add`){let e=this.distinctValues.get(n);if(e||(e=new Set,this.distinctValues.set(n,e)),Array.isArray(r))for(let t of r)t!=null&&e.add(t);else e.add(r)}}}updateDistinctValueForField(e,t,n){if(n!=null){let t=this.distinctValues.get(e);if(t||(t=new Set,this.distinctValues.set(e,t)),Array.isArray(n))for(let e of n)e!=null&&t.add(e);else t.add(n)}}},V=class{queue=[];debounceTimer=null;pendingPromise=null;options;constructor(e){this.options=e}add(e){e.length!==0&&(this.queue.push({type:`ADD`,rows:e}),this.scheduleProcessing())}remove(e){e.length!==0&&(this.queue.push({type:`REMOVE`,rowIds:e}),this.scheduleProcessing())}updateCell(e,t,n){this.queue.push({type:`UPDATE_CELL`,rowId:e,field:t,value:n}),this.scheduleProcessing()}updateRow(e,t){Object.keys(t).length!==0&&(this.queue.push({type:`UPDATE_ROW`,rowId:e,data:t}),this.scheduleProcessing())}flush(){return this.queue.length===0?Promise.resolve():(this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.pendingPromise?new Promise((e,t)=>{let n=this.pendingPromise,r=n.resolve,i=n.reject;n.resolve=()=>{r(),e()},n.reject=e=>{i(e),t(e)}}):new Promise((e,t)=>{this.pendingPromise={resolve:e,reject:t},this.processQueue()}))}hasPending(){return this.queue.length>0}getPendingCount(){return this.queue.length}clear(){this.queue=[],this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.pendingPromise&&=(this.pendingPromise.resolve(),null)}scheduleProcessing(){if(this.options.debounceMs===0){this.processQueue();return}this.debounceTimer===null&&(this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.processQueue()},this.options.debounceMs))}processQueue(){if(this.queue.length===0){this.pendingPromise&&=(this.pendingPromise.resolve(),null);return}let e=this.queue;this.queue=[];let t={added:0,removed:0,updated:0};try{for(let n of e)switch(n.type){case`ADD`:this.options.store.addRows(n.rows),t.added+=n.rows.length;break;case`REMOVE`:this.options.store.removeRows(n.rowIds),t.removed+=n.rowIds.length;break;case`UPDATE_CELL`:this.options.store.updateCell(n.rowId,n.field,n.value),t.updated++;break;case`UPDATE_ROW`:this.options.store.updateRow(n.rowId,n.data),t.updated++;break}this.options.onProcessed&&this.options.onProcessed(t),this.pendingPromise&&=(this.pendingPromise.resolve(),null)}catch(e){this.pendingPromise&&=(this.pendingPromise.reject(e instanceof Error?e:Error(String(e))),null)}}};function H(e,t){let{getRowId:n,getFieldValue:r,debounceMs:i=50,onTransactionProcessed:a}=t,o=new B(e,{getRowId:n,getFieldValue:r}),s=new Set,c=new V({debounceMs:i,store:o,onProcessed:e=>{a?.(e);for(let t of s)t(e)}});return{async fetch(e){return c.hasPending()&&await c.flush(),o.query(e)},addRows(e){c.add(e)},removeRows(e){c.remove(e)},updateCell(e,t,n){c.updateCell(e,t,n)},updateRow(e,t){c.updateRow(e,t)},async flushTransactions(){await c.flush()},hasPendingTransactions(){return c.hasPending()},getDistinctValues(e){return o.getDistinctValues(e)},getRowById(e){return o.getRowById(e)},getTotalRowCount(){return o.getTotalRowCount()},subscribe(e){return s.add(e),()=>{s.delete(e)}}}}const U=`
|
|
185
185
|
/* =============================================================================
|
|
186
186
|
GP Grid - CSS Variables for Theming
|
|
187
187
|
============================================================================= */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "gp-grid-core",
|
|
3
3
|
"description": "A high-performance, framework-agnostic TypeScript data grid core with virtual scrolling",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -37,6 +37,13 @@
|
|
|
37
37
|
"files": [
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^24.9.1",
|
|
42
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
43
|
+
"tsdown": "^0.15.9",
|
|
44
|
+
"typescript": "~5.8.3",
|
|
45
|
+
"vitest": "^4.0.15"
|
|
46
|
+
},
|
|
40
47
|
"scripts": {
|
|
41
48
|
"dev": "tsdown --watch",
|
|
42
49
|
"build": "tsdown --clean --sourcemap",
|
|
@@ -44,12 +51,5 @@
|
|
|
44
51
|
"test": "vitest",
|
|
45
52
|
"test:ui": "vitest --ui",
|
|
46
53
|
"bench": "vitest bench"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@types/node": "^24.9.1",
|
|
50
|
-
"@vitest/coverage-v8": "^4.0.15",
|
|
51
|
-
"tsdown": "^0.15.9",
|
|
52
|
-
"typescript": "~5.8.3",
|
|
53
|
-
"vitest": "^4.0.15"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|