slickgrid
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -167,3 +167,3 @@ "use strict"; | ||
} | ||
/** Send a notification, through "onRowBackToViewportRange", that a row came back to the viewport */ | ||
/** Send a notification, through "onRowBackToViewportRange", that a row came back into the viewport visible range */ | ||
notifyBackToViewportWhenDomExist(item, rowId) { | ||
@@ -183,4 +183,4 @@ let rowIndex = item.rowIndex || this._dataView.getRowById(item[this._dataViewIdProperty]); | ||
/** | ||
* This function will sync the out of viewport array whenever necessary. | ||
* The sync can add a row (when necessary, no need to add again if it already exist) or delete a row from the array. | ||
* This function will sync the "out of viewport" array whenever necessary. | ||
* The sync can add a detail row (when necessary, no need to add again if it already exist) or delete a row from the array. | ||
* @param rowId: number | ||
@@ -193,7 +193,7 @@ * @param isAdding: are we adding or removing a row? | ||
} | ||
// Toggle between showing and hiding a row | ||
// Toggle between showing or hiding a row | ||
toggleRowSelection(rowNumber, dataContext) { | ||
this.checkExpandableOverride(rowNumber, dataContext, this._grid) && (this._dataView.beginUpdate(), this.handleAccordionShowHide(dataContext), this._dataView.endUpdate()); | ||
} | ||
/** Collapse all of the open items */ | ||
/** Collapse all of the open detail rows */ | ||
collapseAll() { | ||
@@ -205,3 +205,3 @@ this._dataView.beginUpdate(); | ||
} | ||
/** Colapse an Item so it is not longer seen */ | ||
/** Collapse a detail row so that it is not longer open */ | ||
collapseDetailView(item, isMultipleCollapsing = !1) { | ||
@@ -213,3 +213,3 @@ isMultipleCollapsing || this._dataView.beginUpdate(), this._options.loadOnce && this.saveDetailView(item), item[`${this._keyPrefix}collapsed`] = !0; | ||
} | ||
/** Expand a row given the dataview item that is to be expanded */ | ||
/** Expand a detail row by providing the dataview item that is to be expanded */ | ||
expandDetailView(item) { | ||
@@ -267,5 +267,3 @@ var _a, _b, _c; | ||
} | ||
////////////////////////////////////////////////////////////// | ||
// create the detail ctr node. this belongs to the dev & can be custom-styled as per | ||
////////////////////////////////////////////////////////////// | ||
/** Create the detail ctr node. this belongs to the dev & can be custom-styled as per */ | ||
applyTemplateNewLineHeight(item) { | ||
@@ -294,7 +292,7 @@ var _a; | ||
} | ||
/** return the currently expanded rows */ | ||
/** Return the currently expanded rows */ | ||
getExpandedRows() { | ||
return this._expandedRows; | ||
} | ||
/** The Formatter of the toggling icon of the Row Detail */ | ||
/** The cell Formatter that shows the icon that will be used to toggle the Row Detail */ | ||
detailSelectionFormatter(row, _cell, _val, _column, dataContext, grid) { | ||
@@ -301,0 +299,0 @@ if (this.checkExpandableOverride(row, dataContext, grid)) { |
@@ -77,3 +77,3 @@ import { SlickEvent as SlickEvent_, SlickEventHandler as SlickEventHandler_ } from '../slick.core'; | ||
* | ||
* onRowBackToViewportRange: Fired after the row detail gets toggled | ||
* onRowBackToViewportRange: Fired after a row is back to viewport range (user can visually see the row detail) | ||
* Event args: | ||
@@ -148,7 +148,7 @@ * grid: Reference to the grid. | ||
protected notifyOutOfViewport(item: any, rowId: number | string): void; | ||
/** Send a notification, through "onRowBackToViewportRange", that a row came back to the viewport */ | ||
/** Send a notification, through "onRowBackToViewportRange", that a row came back into the viewport visible range */ | ||
protected notifyBackToViewportWhenDomExist(item: any, rowId: number | string): void; | ||
/** | ||
* This function will sync the out of viewport array whenever necessary. | ||
* The sync can add a row (when necessary, no need to add again if it already exist) or delete a row from the array. | ||
* This function will sync the "out of viewport" array whenever necessary. | ||
* The sync can add a detail row (when necessary, no need to add again if it already exist) or delete a row from the array. | ||
* @param rowId: number | ||
@@ -159,7 +159,7 @@ * @param isAdding: are we adding or removing a row? | ||
protected toggleRowSelection(rowNumber: number, dataContext: any): void; | ||
/** Collapse all of the open items */ | ||
/** Collapse all of the open detail rows */ | ||
collapseAll(): void; | ||
/** Colapse an Item so it is not longer seen */ | ||
/** Collapse a detail row so that it is not longer open */ | ||
collapseDetailView(item: any, isMultipleCollapsing?: boolean): void; | ||
/** Expand a row given the dataview item that is to be expanded */ | ||
/** Expand a detail row by providing the dataview item that is to be expanded */ | ||
expandDetailView(item: any): void; | ||
@@ -177,2 +177,3 @@ /** Saves the current state of the detail view */ | ||
protected getPaddingItem(parent: any, offset: any): any; | ||
/** Create the detail ctr node. this belongs to the dev & can be custom-styled as per */ | ||
protected applyTemplateNewLineHeight(item: any): void; | ||
@@ -192,5 +193,5 @@ /** Get the Column Definition of the first column dedicated to toggling the Row Detail View */ | ||
}; | ||
/** return the currently expanded rows */ | ||
/** Return the currently expanded rows */ | ||
getExpandedRows(): any[]; | ||
/** The Formatter of the toggling icon of the Row Detail */ | ||
/** The cell Formatter that shows the icon that will be used to toggle the Row Detail */ | ||
protected detailSelectionFormatter(row: number, _cell: number, _val: any, _column: Column, dataContext: any, grid: SlickGrid): FormatterResultObject | string; | ||
@@ -197,0 +198,0 @@ /** Resize the Row Detail View */ |
@@ -9,3 +9,3 @@ import type { Aggregator, CustomDataView, Grouping, ItemMetadata, OnGroupCollapsedEventArgs, OnGroupExpandedEventArgs, OnRowCountChangedEventArgs, OnRowsChangedEventArgs, OnRowsOrCountChangedEventArgs, OnSelectedRowIdsChangedEventArgs, OnSetItemsCalledEventArgs, PagingInfo } from './models/index'; | ||
} | ||
export type FilterFn<T> = (a: T, b: T) => boolean; | ||
export type FilterFn<T> = (item: T, args: any) => boolean; | ||
export type DataIdType = number | string; | ||
@@ -125,3 +125,3 @@ export type SlickDataItem = SlickNonDataItem | SlickGroup_ | SlickGroupTotals_ | any; | ||
*/ | ||
setFilter(filterFn: (a: TData, b: TData) => boolean): void; | ||
setFilter(filterFn: FilterFn<TData>): void; | ||
/** Get current Grouping info */ | ||
@@ -128,0 +128,0 @@ getGrouping(): Grouping[]; |
@@ -13,3 +13,3 @@ import type SortableInstance from 'sortablejs'; | ||
* | ||
* SlickGrid v5.0.0 | ||
* SlickGrid v5.0.1 | ||
* | ||
@@ -16,0 +16,0 @@ * NOTES: |
{ | ||
"name": "slickgrid", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "A lightning fast JavaScript grid/spreadsheet", | ||
@@ -45,69 +45,8 @@ "exports": { | ||
"homepage": "https://github.com/6pac/SlickGrid#readme", | ||
"scripts": { | ||
"cypress": "npx cypress open --config-file cypress/cypress.config.ts", | ||
"cypress:ci": "npx cypress run --config-file cypress/cypress.config.ts", | ||
"predev": "rimraf --glob dist/{browser,esm}", | ||
"dev": "node ./scripts/dev-watch.mjs --open", | ||
"serve": "node ./scripts/dev-watch.mjs --serve", | ||
"clean": "rimraf dist", | ||
"lint": "eslint src -c .eslintrc --ext .ts", | ||
"minify": "node ./scripts/minify.js --start", | ||
"prebuild:prod": "rimraf dist && npm run lint", | ||
"build:prod": "node ./scripts/builds.mjs --prod", | ||
"build:types": "tsc --emitDeclarationOnly --incremental --declarationMap --outDir dist/types", | ||
"preview:release": "node ./scripts/release.mjs --create-release github --dry-run --skip-checks", | ||
"release": "node ./scripts/release.mjs --create-release github", | ||
"presass:build": "rimraf dist/styles/css", | ||
"sass:build": "sass src/styles:dist/styles/css --style=compressed --quiet-deps --no-source-map", | ||
"postsass:build": "postcss dist/styles/css/**/* --dir dist/styles/css --base dist/styles/css --no-map --use cssnano --use autoprefixer --style=compressed", | ||
"sass:copy": "copyfiles -f src/styles/*.scss dist/styles/sass", | ||
"serve:demo": "http-server ./ -p 8080 -a localhost -s", | ||
"clean:publish": "echo \"cleaning 'devDependencies' and 'scripts' from package.json\" && clean-publish" | ||
}, | ||
"dependencies": { | ||
"sortablejs": "^1.15.0" | ||
}, | ||
"devDependencies": { | ||
"@4tw/cypress-drag-drop": "^2.2.5", | ||
"@octokit/rest": "^19.0.13", | ||
"@typescript-eslint/eslint-plugin": "^6.7.2", | ||
"@typescript-eslint/parser": "^6.7.2", | ||
"autoprefixer": "^10.4.15", | ||
"browser-sync": "^2.29.3", | ||
"chokidar": "^3.5.3", | ||
"clean-publish": "^4.2.0", | ||
"conventional-changelog": "^5.1.0", | ||
"copyfiles": "^2.4.1", | ||
"cssnano": "^6.0.1", | ||
"cssnano-preset-lite": "^3.0.0", | ||
"cypress": "^13.2.0", | ||
"dotenv": "^16.3.1", | ||
"esbuild": "^0.19.3", | ||
"eslint": "^8.49.0", | ||
"eslint-plugin-cypress": "^2.15.1", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"fs-extra": "^11.1.1", | ||
"git-url-parse": "^13.1.0", | ||
"glob": "^10.3.4", | ||
"http-server": "^14.1.1", | ||
"inquirer": "^9.2.11", | ||
"load-json-file": "^7.0.1", | ||
"new-github-release-url": "^2.0.0", | ||
"path": "^0.12.7", | ||
"picocolors": "^1.0.0", | ||
"postcss": "^8.4.30", | ||
"postcss-cli": "^10.1.0", | ||
"rimraf": "^5.0.1", | ||
"sass": "^1.67.0", | ||
"semver": "^7.5.4", | ||
"servor": "^4.0.2", | ||
"strong-log-transformer": "^2.1.0", | ||
"typescript": "^5.2.2", | ||
"yargs": "^17.7.2" | ||
}, | ||
"browserslist": [ | ||
"last 2 version", | ||
"> 1%", | ||
"IE 11", | ||
"> 0.5%", | ||
"not dead" | ||
@@ -114,0 +53,0 @@ ], |
@@ -15,7 +15,8 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
The project extends on the original SlickGrid foundation while also including the following changes | ||
We extended the project from the original SlickGrid foundation while also including the following changes: | ||
- added a few more Plugins: RowDetail, CellMenu, ContextMenu, GridMenu, CustomTooltip, GridState | ||
- merged [X-SlickGrid](https://github.com/ddomingues/X-SlickGrid) code into the project which brought Frozen Columns/Rows (aka Pinning) | ||
- removed jQueryUI requirement in [v3](https://github.com/6pac/SlickGrid/wiki/Major-version-3.0----Removal-of-jQueryUI-requirement-(replaced-by-SortableJS)) (replaced it with [SortableJS](https://sortablejs.github.io/Sortable/)) | ||
- removed jQuery requirement in [v4](https://github.com/6pac/SlickGrid/wiki/Major-version-4.0---Removal-of-jQuery-requirement) | ||
- modernized the project in [v5](https://github.com/6pac/SlickGrid/wiki/Major-version-5.0-%E2%80%90-ES6-ESM-and-TypeScript-Support) by migrating to TypeScript, we added ES6/ESM build targets and a new Alpine Theme | ||
- modernized the project in [v5](https://github.com/6pac/SlickGrid/wiki/Major-version-5.0-%E2%80%90-ES6-ESM-and-TypeScript-Support) by migrating to TypeScript (we kept IIFE and added ES6/ESM build targets) and a new Alpine Theme | ||
@@ -27,4 +28,7 @@ ### Examples | ||
### Contributions | ||
See [Contributing Guide](https://github.com/6pac/SlickGrid/blob/master/CONTRIBUTING.md) | ||
### E2E Tests with Cypress | ||
We are now starting to add E2E (end to end) tests in the browser with [Cypress](https://www.cypress.io/). You can see [here](https://github.com/6pac/SlickGrid/tree/next/cypress/e2e) the list of Examples that now have E2E tests. We also added these tests to the [GitHub Actions](https://github.com/features/actions) Workflow (CI) to automate certain steps while also making sure that any new commits aren't breaking the build/tests. The concept is that it automatically runs all the E2E tests every time someone pushes a Commit or a Pull Request. We currently have tests for 22+ examples with almost ~300 tests. | ||
We have started to add E2E (end to end) tests in the browser by using [Cypress](https://www.cypress.io/). You can see [here](https://github.com/6pac/SlickGrid/tree/next/cypress/e2e) the list of Examples that now have E2E tests. We also added these tests to the [GitHub Actions](https://github.com/features/actions) Workflow (CI) to automate certain steps while also making sure that any new commits aren't breaking the build/tests. The concept is that it automatically runs all the E2E tests every time someone pushes a Commit or a Pull Request. We currently have tests for over 20+ examples with almost 300 tests. | ||
@@ -31,0 +35,0 @@ We welcome any new contributions (tests or fixes) and if you wish to add Cypress E2E tests, all you need to do is to clone the repo and run the following commands |
@@ -83,3 +83,3 @@ import { SlickEvent as SlickEvent_, SlickEventHandler as SlickEventHandler_, Utils as Utils_ } from '../slick.core'; | ||
* | ||
* onRowBackToViewportRange: Fired after the row detail gets toggled | ||
* onRowBackToViewportRange: Fired after a row is back to viewport range (user can visually see the row detail) | ||
* Event args: | ||
@@ -403,3 +403,3 @@ * grid: Reference to the grid. | ||
/** Send a notification, through "onRowBackToViewportRange", that a row came back to the viewport */ | ||
/** Send a notification, through "onRowBackToViewportRange", that a row came back into the viewport visible range */ | ||
protected notifyBackToViewportWhenDomExist(item: any, rowId: number | string) { | ||
@@ -424,4 +424,4 @@ const rowIndex = (item.rowIndex || this._dataView.getRowById(item[this._dataViewIdProperty])) as number; | ||
/** | ||
* This function will sync the out of viewport array whenever necessary. | ||
* The sync can add a row (when necessary, no need to add again if it already exist) or delete a row from the array. | ||
* This function will sync the "out of viewport" array whenever necessary. | ||
* The sync can add a detail row (when necessary, no need to add again if it already exist) or delete a row from the array. | ||
* @param rowId: number | ||
@@ -441,3 +441,3 @@ * @param isAdding: are we adding or removing a row? | ||
// Toggle between showing and hiding a row | ||
// Toggle between showing or hiding a row | ||
protected toggleRowSelection(rowNumber: number, dataContext: any) { | ||
@@ -453,3 +453,3 @@ if (!this.checkExpandableOverride(rowNumber, dataContext, this._grid)) { | ||
/** Collapse all of the open items */ | ||
/** Collapse all of the open detail rows */ | ||
collapseAll() { | ||
@@ -463,3 +463,3 @@ this._dataView.beginUpdate(); | ||
/** Colapse an Item so it is not longer seen */ | ||
/** Collapse a detail row so that it is not longer open */ | ||
collapseDetailView(item: any, isMultipleCollapsing = false) { | ||
@@ -491,3 +491,3 @@ if (!isMultipleCollapsing) { | ||
/** Expand a row given the dataview item that is to be expanded */ | ||
/** Expand a detail row by providing the dataview item that is to be expanded */ | ||
expandDetailView(item: any) { | ||
@@ -601,5 +601,3 @@ if (this._options?.singleRowExpand) { | ||
////////////////////////////////////////////////////////////// | ||
// create the detail ctr node. this belongs to the dev & can be custom-styled as per | ||
////////////////////////////////////////////////////////////// | ||
/** Create the detail ctr node. this belongs to the dev & can be custom-styled as per */ | ||
protected applyTemplateNewLineHeight(item: any) { | ||
@@ -636,3 +634,3 @@ // the height is calculated by the template row count (how many line of items does the template view have) | ||
/** return the currently expanded rows */ | ||
/** Return the currently expanded rows */ | ||
getExpandedRows() { | ||
@@ -642,3 +640,3 @@ return this._expandedRows; | ||
/** The Formatter of the toggling icon of the Row Detail */ | ||
/** The cell Formatter that shows the icon that will be used to toggle the Row Detail */ | ||
protected detailSelectionFormatter(row: number, _cell: number, _val: any, _column: Column, dataContext: any, grid: SlickGrid): FormatterResultObject | string { | ||
@@ -645,0 +643,0 @@ if (!this.checkExpandableOverride(row, dataContext, grid)) { |
@@ -40,3 +40,3 @@ import type { | ||
} | ||
export type FilterFn<T> = (a: T, b: T) => boolean; | ||
export type FilterFn<T> = (item: T, args: any) => boolean; | ||
export type DataIdType = number | string; | ||
@@ -370,3 +370,3 @@ export type SlickDataItem = SlickNonDataItem | SlickGroup_ | SlickGroupTotals_ | any; | ||
*/ | ||
setFilter(filterFn: (a: TData, b: TData) => boolean) { | ||
setFilter(filterFn: FilterFn<TData>) { | ||
this.filter = filterFn; | ||
@@ -373,0 +373,0 @@ if (this._options.inlineFilters) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
48
6582454
454
55672