Skip to content

Commit

Permalink
fix(frozen): rollback previous commit since the issue was found in Sl…
Browse files Browse the repository at this point in the history
…ickGrid (core)

- also updated interface
- also change SF default grid option
- update SlickGrid (core) package and a few others
  • Loading branch information
ghiscoding committed May 19, 2021
1 parent d7f308b commit 780bcd7
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 162 deletions.
12 changes: 6 additions & 6 deletions examples/webpack-demo-vanilla-bundle/package.json
Expand Up @@ -35,21 +35,21 @@
"devDependencies": {
"@types/jquery": "^3.5.5",
"@types/moment": "^2.13.0",
"@types/node": "^15.0.2",
"@types/node": "^15.3.0",
"@types/webpack": "^5.28.0",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^8.1.1",
"css-loader": "^5.2.4",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^6.2.6",
"fork-ts-checker-webpack-plugin": "^6.2.10",
"html-loader": "^2.1.2",
"html-webpack-plugin": "5.3.1",
"mini-css-extract-plugin": "^1.6.0",
"rxjs": "^7.0.0",
"sass": "^1.32.12",
"sass-loader": "^11.1.0",
"rxjs": "^7.0.1",
"sass": "^1.32.13",
"sass-loader": "^11.1.1",
"style-loader": "^2.0.0",
"ts-loader": "^9.1.2",
"ts-loader": "^9.2.0",
"ts-node": "^9.1.1",
"url-loader": "^4.1.1",
"webpack": "^5.37.0",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -51,12 +51,12 @@
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/node": "^15.0.2",
"@typescript-eslint/eslint-plugin": "^4.23.0",
"@typescript-eslint/parser": "^4.23.0",
"@types/node": "^15.3.0",
"@typescript-eslint/eslint-plugin": "^4.24.0",
"@typescript-eslint/parser": "^4.24.0",
"cypress": "^7.3.0",
"eslint": "^7.26.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import": "^2.23.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
Expand All @@ -69,7 +69,7 @@
"mocha": "^8.4.0",
"mochawesome": "^6.2.2",
"npm-run-all": "^4.1.5",
"rxjs": "^7.0.0",
"rxjs": "^7.0.1",
"serve": "^11.3.2",
"ts-jest": "^26.5.6",
"typescript": "^4.2.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/common/package.json
Expand Up @@ -70,7 +70,7 @@
"jquery-ui-dist": "^1.12.1",
"moment-mini": "^2.24.0",
"multiple-select-modified": "^1.3.12",
"slickgrid": "^2.4.35",
"slickgrid": "^2.4.36",
"un-flatten-tree": "^2.0.12"
},
"devDependencies": {
Expand All @@ -86,7 +86,7 @@
"postcss": "^8.2.15",
"postcss-cli": "^8.3.1",
"rimraf": "^3.0.2",
"sass": "^1.32.12"
"sass": "^1.32.13"
},
"engines": {
"node": ">=14.15.0",
Expand Down
9 changes: 5 additions & 4 deletions packages/common/src/interfaces/slickGrid.interface.ts
Expand Up @@ -417,11 +417,12 @@ export interface SlickGrid {

/**
* Extends grid options with a given hash. If an there is an active edit, the grid will attempt to commit the changes and only continue if the attempt succeeds.
* @params options An object with configuration options.
* @params do we want to supress the grid re-rendering? (defaults to false)
* @params do we want to supress the columns set, via "setColumns()" method? (defaults to false)
* @param {Object} options - an object with configuration options.
* @param {Boolean} suppressRender - do we want to supress the grid re-rendering? (defaults to false)
* @param {Boolean} suppressColumnSet - do we want to supress the columns set, via "setColumns()" method? (defaults to false)
* @param {Boolean} suppressSetOverflow - do we want to suppress the call to `setOverflow`
*/
setOptions(options: GridOption, suppressRender?: boolean, suppressColumnSet?: boolean): void;
setOptions(options: GridOption, suppressRender?: boolean, suppressColumnSet?: boolean, suppressSetOverflow?: boolean): void;

/** Set the Pre-Header Visibility and optionally enable/disable animation (enabled by default) */
setPreHeaderPanelVisibility(visible: boolean, animate?: boolean): void;
Expand Down
4 changes: 2 additions & 2 deletions packages/common/src/services/__tests__/grid.service.spec.ts
Expand Up @@ -1091,7 +1091,7 @@ describe('Grid Service', () => {

service.setPinning(mockPinning);

expect(setOptionsSpy).toHaveBeenCalledWith({ ...mockPinning, alwaysShowVerticalScroll: false }, false, true);
expect(setOptionsSpy).toHaveBeenCalledWith(mockPinning, false, true);
expect(gridOptionSetterSpy).toHaveBeenCalledWith(mockPinning);
expect(autosizeColumnsSpy).toHaveBeenCalled();
});
Expand All @@ -1105,7 +1105,7 @@ describe('Grid Service', () => {

service.setPinning(mockPinning, false);

expect(setOptionsSpy).toHaveBeenCalledWith({ ...mockPinning, alwaysShowVerticalScroll: false }, false, true);
expect(setOptionsSpy).toHaveBeenCalledWith(mockPinning, false, true);
expect(gridOptionSetterSpy).toHaveBeenCalledWith(mockPinning);
expect(autosizeColumnsSpy).not.toHaveBeenCalled();
});
Expand Down
8 changes: 2 additions & 6 deletions packages/common/src/services/grid.service.ts
Expand Up @@ -96,12 +96,8 @@ export class GridService {
* @param {Boolean} suppressColumnSet - do we want to supress the columns set, via "setColumns()" method? (defaults to false)
*/
setPinning(pinningOptions: CurrentPinning, shouldAutosizeColumns = true, suppressRender = false, suppressColumnSet = true) {
const options = pinningOptions as GridOption;
if (typeof pinningOptions?.frozenColumn === 'number' && pinningOptions.frozenColumn >= 0) {
options.alwaysShowVerticalScroll = false; // make sure to never show the verticall scroll when the grid has pinning (frozen column)
}
this.sharedService.slickGrid.setOptions(options, suppressRender, suppressColumnSet);
this.sharedService.gridOptions = { ...this.sharedService.gridOptions, ...options };
this.sharedService.slickGrid.setOptions(pinningOptions, suppressRender, suppressColumnSet);
this.sharedService.gridOptions = { ...this.sharedService.gridOptions, ...pinningOptions };

if (shouldAutosizeColumns) {
this.sharedService.slickGrid.autosizeColumns();
Expand Down
2 changes: 1 addition & 1 deletion packages/rxjs-observable/package.json
Expand Up @@ -40,7 +40,7 @@
],
"dependencies": {
"@slickgrid-universal/common": "^0.13.0",
"rxjs": "^7.0.0"
"rxjs": "^7.0.1"
},
"devDependencies": {
"cross-env": "^7.0.3",
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/vanilla-bundle/package.json
Expand Up @@ -62,7 +62,7 @@
"html-loader": "^2.1.2",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"ts-loader": "^9.1.2",
"ts-loader": "^9.2.0",
"webpack": "^5.37.0"
}
}
Expand Up @@ -61,6 +61,7 @@ export const SalesforceGlobalGridOptions = {
},
headerRowHeight: 35,
rowHeight: 33,
resizeByContentOnlyOnFirstLoad: false,
resizeFormatterPaddingWidthInPx: 8,
resizeMaxItemToInspectCellContentWidth: 500,
eventNamingStyle: EventNamingStyle.lowerCaseWithoutOnPrefix,
Expand Down

0 comments on commit 780bcd7

Please sign in to comment.