Skip to content

Commit

Permalink
fix(common): switch to isomorphic-dompurify for SSR support (#1413)
Browse files Browse the repository at this point in the history
- related to issue described in Angular-Slickgrid: ghiscoding/Angular-Slickgrid#838 (reply in thread)
  • Loading branch information
ghiscoding authored Mar 5, 2024
1 parent 0ef1211 commit b619453
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 60 deletions.
2 changes: 1 addition & 1 deletion examples/vite-demo-vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"@slickgrid-universal/vanilla-bundle": "workspace:~",
"@slickgrid-universal/vanilla-force-bundle": "workspace:~",
"bulma": "^0.9.4",
"dompurify": "^3.0.9",
"fetch-jsonp": "^1.3.0",
"flatpickr": "^4.6.13",
"isomorphic-dompurify": "^2.4.0",
"moment-mini": "^2.29.4",
"multiple-select-vanilla": "^2.2.0",
"rxjs": "^7.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { BindingEventService } from '@slickgrid-universal/binding';
import { ExcelExportService } from '@slickgrid-universal/excel-export';
import { Slicker, SlickVanillaGridBundle } from '@slickgrid-universal/vanilla-bundle';
import DOMPurify from 'dompurify';
import DOMPurify from 'isomorphic-dompurify';

import { ExampleGridOptions } from './example-grid-options';
import { TranslateService } from '../translate.service';
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
"@slickgrid-universal/utils": "workspace:~",
"autocompleter": "^9.1.2",
"dequal": "^2.0.3",
"dompurify": "^3.0.9",
"excel-builder-vanilla": "3.0.1",
"flatpickr": "^4.6.13",
"isomorphic-dompurify": "^2.4.0",
"moment-mini": "^2.29.4",
"multiple-select-vanilla": "^2.2.0",
"sortablejs": "^1.15.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/core/slickGrid.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-cond-assign */
import Sortable, { SortableEvent } from 'sortablejs';
import DOMPurify from 'dompurify';
import DOMPurify from 'isomorphic-dompurify';
import { BindingEventService } from '@slickgrid-universal/binding';
import {
classNameToList,
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/services/domUtilities.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createDomElement } from '@slickgrid-universal/utils';
import { OptionRowData } from 'multiple-select-vanilla';
import DOMPurify from 'dompurify';
import DOMPurify from 'isomorphic-dompurify';

import type { SearchTerm } from '../enums/index';
import type { Column, GridOption, SelectOption } from '../interfaces/index';
Expand Down
2 changes: 1 addition & 1 deletion packages/custom-tooltip-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"dependencies": {
"@slickgrid-universal/common": "workspace:~",
"@slickgrid-universal/utils": "workspace:~",
"dompurify": "^3.0.9"
"isomorphic-dompurify": "^2.4.0"
},
"devDependencies": {
"@types/dompurify": "^3.0.5"
Expand Down
Loading

0 comments on commit b619453

Please sign in to comment.