Releases: ghiscoding/slickgrid-universal
v5.0.1
5.0.1 (2024-05-11)
Bug Fixes
- deps: update all non-major dependencies (#1519) (90a5e26) - by @renovate-bot
- editors: only open ms-select drop when exists (#1525) (247daba) - by @ghiscoding
- plugin: Draggable Grouping drop zone should always be 100% wide (#1524) (a6dbf2c) - by @ghiscoding
- plugin: Grid Menu shouldn't be displayed in preheader by default (#1523) (7e0cdc9) - by @ghiscoding
- styling: add missing Dark Mode SASS vars to configure primary color (dc5d402) - by @ghiscoding
v5.0.0 - Modern UI
5.0.0 (2024-05-10)
New Major 5.0 Release
This new release brings a lot of changes oriented toward better UI/UX, our SVG icons are now pure CSS and can be colorized like any other text via the native CSS color
property (which helped a lot improving the Dark Mode Theme).
Another noticeable UI change is the migration of the date picker from Flatpickr
to Vanilla-Calendar-Pro, this new library has ESM support, it has modern styling and an awesome UI/UX. Another change that is mostly internal but is also indirectly connected to the date picker is the migration from MomentJS
to Tempo which is a new modern lib and is also packaged as ESM which is great for Tree Shaking. Lastly DOMPurify
is now optional, giving you the choice to install it or to use something else like isomorphic-dompurify
for SSR support... Please note that even if it is now optional, we strongly suggest that you install it nonetheless that is if you want to stay secure and CSP compliant (see migration below for more info).
I believe that with all of these recent changes, the project is pretty much feature complete and you should not expect any new major releases for a long time (hopefully).
Note
Follow the Migration to 5.0 for all the changes
⚠ BREAKING CHANGES
- pure SVG icons, Moment to Tempo, Flatpickr to Vanilla-Calendar (#1518)
Features
- pure SVG icons, Moment to Tempo, Flatpickr to Vanilla-Calendar (#1518) (21e50db) - by @ghiscoding
Bug Fixes
- core: col name from HTML shouldn't disappear in picker, fixes #1475 (#1476) (15a590b) - by @ghiscoding
- styling: small UI fixes for Salesforce Theme (f9bfb3d) - by @ghiscoding-SE
- tweak setupColumnSort() to fix exception when col no longer exists (#1477) (094d760) - by @ghiscoding
v5.0.0-beta.3
5.0.0-beta.3 (2024-05-09)
5.0 Beta Release, please follow the Migration Guide v5 for all info.
Bug Fixes
- common: consider target size when auto-position picker/modal (#1517) (e3a70b8) - by @ghiscoding
- common: Select Editor should always close with Escape key (#1512) (e37bb28) - by @ghiscoding
- core: tweak setupColumnSort() to fix exception with hidden col (#1509) (94b836a) - by @ghiscoding
- editors: body click or Escape key should cancel Select Editor (#1513) (3d765a9) - by @ghiscoding
- make some more cleanup with now optional DOMPurify (#1508) (7fafbcc) - by @ghiscoding
- plugins: clicking a grid cell should close any open menu (#1515) (383792d) - by @ghiscoding
- styling: improve UI & fix small issues found after testing upstream (#1510) (a4ef70f) - by @ghiscoding
- tooltip: only show tooltip that has value (#1511) (2ff15da) - by @ghiscoding
v5.0.0-beta.2
5.0.0-beta.2 (2024-05-07)
5.0 Beta Release, please follow the Migration Guide v5 for all info.
⚠ BREAKING CHANGES
- migrate from Moment to Tempo (#1507)
- common: make DOMPurify as optional sanitizer grid option (#1503)
- styling: delete "bare" Themes but keep "lite" & add to Bootstrap (#1493)
- common: migrate from
moment
tomoment-tiny
(#1456) - filters: remove native
Filters.select
(#1485) - styling: delete
checkmarkFormatter
and any Font-Awesome related (#1484) - common: migrate from Flatpickr to Vanilla-Calendar (#1466)
- styling: remove SASS
math.div
polyfill (#1483) - styling: convert SVG icons to pure CSS (#1474)
Features
- common: make DOMPurify as optional sanitizer grid option (#1503) (0aa0859) - by @ghiscoding
- common: migrate from
moment
tomoment-tiny
(#1456) (90690f4) - by @ghiscoding - common: migrate from Flatpickr to Vanilla-Calendar (#1466) (fb6e950) - by @ghiscoding
- filters: remove native
Filters.select
(#1485) (fae4c4a) - by @ghiscoding - migrate from Moment to Tempo (#1507) (adef47f) - by @ghiscoding
- styling: convert SVG icons to pure CSS (#1474) (70cda8a) - by @ghiscoding
- styling: delete "bare" Themes but keep "lite" & add to Bootstrap (#1493) (ca5ac06) - by @ghiscoding
- styling: delete
checkmarkFormatter
and any Font-Awesome related (#1484) (2de3fe2) - by @ghiscoding - styling: remove SASS
math.div
polyfill (#1483) (12661a3) - by @ghiscoding
Bug Fixes
- core: col name from HTML shouldn't disappear in picker, fixes #1475 (#1476) (15a590b) - by @ghiscoding
- editor: autocomplete should only save empty when val is null (#1500) (8de1340) - by @ghiscoding
- editor: input editor should call save on focusout or blur of input (#1497) (ccd344e) - by @ghiscoding
- editor: new Date Editor input clear button wasn't working (#1487) (4ac34ee) - by @ghiscoding
- styling: couple of small alignment issues when using flex (#1496) (2188242) - by @ghiscoding
- styling: empty warning should separate icon & text (#1491) (240cbd3) - by @ghiscoding
- styling: properly import Vanilla-Calendar CSS and only once (#1492) (75dce74) - by @ghiscoding
- styling: Row Move icon shouldn't show extra dot (69f7bfc) - by @ghiscoding-SE
- tooltip: don't sanitize empty text, fixes empty tooltip being shown (#1495) (dcc693b) - by @ghiscoding
- tweak setupColumnSort() to fix exception when col no longer exists (#1477) (094d760) - by @ghiscoding
v4.7.0
4.7.0 (2024-04-20)
Quick Info
This new release adds 2x new grid options defaultEditorOptions
and defaultFilterOptions
so that user can define global Editor/Filter options instead of having to duplicate same options on each column editorOptions
/filterOptions
. An example is shown below.
- Note: for
defaultFilterOptions
, we use the same keys as the Editor (date
,select
,slider
, ...) but please note that these 3 filters options have combined options into 1 prop for compound & range filters (e.g.date
is for bothcompoundDate
anddateRange
filter options).
this.gridOptions = {
defaultEditorOptions: {
autocompleter: { debounceWaitMs: 150 }, // auto-typed as AutocompleterOption
date: { minDate: 'today' },
longText: { cols: 50, rows: 5 }
}
}
Bug Fixes
- common: don't try to strip tags on object input to calc cell width (#1453) (5ab671b) - by @ghiscoding
- common: switch back to
autocompleter
with ESM build (#1450) (ad66a12) - by @ghiscoding - core: Editor.keyCaptureList is an array of numbers (#1458) (62a686e) - by @ghiscoding
- OData: sorting columns via
id
instead of field property name, fixes #1467 (#1469) (0a4d402) - by @zewa666 - styling: improve button & text colors for Dark Mode (9414ab4) - by @ghiscoding-SE
- wrong operator comparison (#1461) (abe772b) - by @zewa666
Features
- common: add global
defaultEditorOptions
&defaultFilterOptions
(#1470) (0462f17) - by @ghiscoding - core: add
getFilterArgs()
toSlickDataView
(#1457) (7563126) - by @ghiscoding - notify onValidationError on paste if validation failed (#1462) (38b465c) - by @zewa666
v4.6.1
4.6.1 (2024-03-31)
Quick Info
This release will now work with multiple tooltips on the same cell (e.g. multiple buttons with icons like the "Action" column in Example 22
Bug Fixes
- common: move DOMPurify/SortableJS @types as dependencies (51eaec7) - by @ghiscoding
- common: switch to
autocompleter-es
to get ESM build (#1449) (aa59334) - by @ghiscoding - improve Dark Mode styling for icons barely visible in dark (16b1a6e) - by @ghiscoding
- pubsub: externalize PubSub event to SlickEventData to stop bubbling (#1444) (973d0ab) - by @ghiscoding
- revisit package
exports
to pass "are the types wrong" (#1440) (20229f7) - by @ghiscoding - styling: missing/too many borders compound filters w/group addon (#1446) (863933f) - by @ghiscoding
- tooltip: allow multiple tooltips per grid cell (#1448) (061c4a0) - by @ghiscoding
v4.6.0
4.6.0 (2024-03-23)
Quick Info
This release upgrades multiple-select-vanilla
package, that I also maintained, with a much more modern UI with the use of SVG icons. The SVG icons in that external lib are now also written in pure CSS which helps for Dark Mode (in that mode, the primary color for checked icon is a lighter version of the primary color). Note however that the SVG icons in Slickgrid-Universal are not yet pure CSS since that would introduce breaking changes in Slickgrid-Universal (a new major version will be pushed later on to address that).
⚠️ internalColumnEditor
is deprecated and no longer needed
Note that in the past, SlickGrid and Slickgrid-Universal were using 2 different references for editor
. The original SlickGrid was using editor
as a Class to be later instantiated (e.g. Editors.longText
) but that wasn't very convenient for the end users (you). For that reason I decided a long time ago to take this editor
and reassign to another ref named internalEditor
and then SlickGrid kept using editor
(read from editor.model
) and whenever the user wanted to read the SlickGrid editor after the grid was initialized, the user would have to get it from column.internalEditor
(because after the initialization editor
is SlickGrid's internal editor class not the one provided by the user), but that was so damn confusing... but now that Slickgrid-Universal is a standalone (no longer relying on 6pac/slickgrid
) I decided to get rid of this confusion, so with this new release the editor
remains the same to the user but the one used by SlickGrid just got renamed to editorClass
. So in summary, editor
is the same for the end user and editorClass
is what is defined by model: Editors.longText
and the internal ref swap that Slickgrid-Universal was previously doing is no longer needed internally. Below is an example of when that would be in use
// previously, to add an item to the editor/filter collection
this.columnDefinitions = [{ id: 'complexity', editor: { model: Editors.singleSelect, collection: [{ value: 1, label: 'Simple' }, /*...*/ ]; }];
// then adding an item would require to read `internalColumnEditor`
// after grid init, our `editor` became `internalColumnEditor
- const complexityEditor = this.columnDefinitions[0].internalColumnEditor;
// BUT with this new release, adding a new item to the collection is as simple as
+ const complexityEditor = this.columnDefinitions[0].editor;
complexityEditor.collection.push({ value: 9, label: 'Hard' });
// and if you want to read the SlickGrid editor, you would now use
this.columnDefinitions[0].editorClass; // which is the same as `editor.model`
Bug Fixes
column.editor
andgridOptions.editorFactory
type changed (#1428) (bf8c5b9) - by @ghiscoding- build: add ESLint-TS rules to enforce
type
imports and exports (#1432) (cce4693) - by @ghiscoding - build: add ESLint-TS rules to enforce
type
imports and exports (#1437) (324c4fe) - by @ghiscoding - common: add missing Filter
model
Type ofFilterConstructor
(#1430) (3f3e952) - by @ghiscoding - common: bump ms-select to fix compatibility problem in Salesforce (#1425) (d3d2d39) - by @ghiscoding
- common: Select All checkbox shouldn't disappear w/Dark Mode toggle (#1421) (5fab179) - by @ghiscoding
- Join type (#1427) (21c76cc) - by @zewa666
- styling: add border & box-shadow to Flatpickr in Dark Mode (fdbb6ae) - by @ghiscoding
- styling: add missing orange border for Salesforce modified inputs (e830dd3) - by @ghiscoding
- styling: add more visual cue for column picker uncheck row select (b4712e9) - by @ghiscoding
- styling: don't add filled border all side for group-addon btn (30be835) - by @ghiscoding-SE
- styling: small Composite Editor fixes for Dark Mode (#1417) (7e00087) - by @ghiscoding
Features
- common: add optional "Toggle Dark Mode" in Grid Menu (#1418) (990c1df) - by @ghiscoding
- core: rename SG
editorClass
& deprecateinternalColumnEditor
(#1429) (409115c) - by @ghiscoding - upgrade to ms-select-vanilla v3.x (#1439) (8f2378e) - by @ghiscoding
v4.5.0 - Dark Mode
4.5.0 (2024-03-05)
Dark Mode ✨
This is probably a UX change that many users will be happy to start using, however there are a few important notes to be aware of as shown below.
- Dark Mode must be enabled via a
darkMode
grid option, it will not auto-detect the color scheme from the browser (you can however easily do it yourself). There are a couple of reasons as to why it was created as a grid option, it's mostly related to the fact that a few features in the lib require the creation of certain DOM Elements that are appended to thebody
(e.g. ColumnPicker, GridMenu, LongTextEditor, CompositeEditorModal, ...) and it requires extra code in place that SlickGrid will take care of it for you but can only work via a grid option, and for that reason it simply cannot be just simple CSS classes. - SVG icon color are using a lighter gray by default, if you're using a Font family for the icons then that won't affect you however keep reading. As mentioned earlier, the SVG icons are using a light gray and that is because the same color must be used for both Light & Dark theme because at the moment the project will create the SVG with a fixed
fillColor
defined in SASS and once it is set, you cannot change it... you might ask, well can that be fixed in the future? The answer is Yes but... I did find that we can convert all SVG to pure CSS (using UnoCSS, by AntFu) approach but that will introduce some breaking changes and considering that I recently released a major version, I will wait couple more months to proceed with another major. Part of the breaking changes will be to drop support for Fonts and keep only SVGs internally in a future major release. - the Dark Mode Theme was created using CSS variables, you might need to tweak some of these variables depending on your primary color, see Slickgrid-Universal CSS variables
- also note that I'm not a Designer, so if you feel that some colors are off then please contribute a PR
- you can see Dark Mode demo in Example 1, Example 7, Example 12 or Example 16. All examples have a Toggle Light/Dark Mode button and Example 1 also has the browser auto-detect Dark Mode on the 1st grid only.
Also worth knowing that I also improved multiple-select-vanilla
by adding a new feature to replace tabIndex
by arrow navigation highlight. This feature will let you use the keyboard (up/down arrows or mouse hover) to navigate the select options and choose any of them (via Enter key) and all of that without losing your current focus (which is a lot better than using tabIndex
). This new feature should be a lot more UX friendly.
This is pretty much completing the roadmap of all the features that I wanted to add to this library, this project started 7 years ago and I added a lot of features over the years.
Bug Fixes
- auto-resize not just grid but also headers for Salesforce tabs (#1395) (6180461) - by @ghiscoding
- common: switch to
isomorphic-dompurify
for SSR support (#1413) (b619453), closes /github.com/ghiscoding/Angular-Slickgrid/discussions/838#discussioncomment-8574215 - by @ghiscoding - core: add extra checks for some objects to be a bit more strict (#1404) (8b95c50) - by @ghiscoding
- plugin: the RowMove plugin cell should be selectable (#1408) (8c01a13) - by @ghiscoding
- styling: add full width to grid container (#1409) (eedc162) - by @ghiscoding
- styling: add menu shadow & increase contrast for Dark Mode (bff2da0) - by @ghiscoding
- styling: ms-select filter should use same color as other filters (#1396) (a30d590) - by @ghiscoding
- styling: ms-select highlight bg-color same as nav highlight (fe77341) - by @ghiscoding-SE
- styling: properly align flexbox ms-select icon+text vertically (#1397) (e744d02) - by @ghiscoding
- styling: remove header menu open class for Dark Mode (6a2e7e1) - by @ghiscoding
- styling: tweak Composite Editor form disabled buttons style (5052ba1) - by @ghiscoding
Features
- common: upgrade
multiple-select-vanilla
to v2 (#1401) (d6bb1d7) - by @ghiscoding - deps: simplify package TS Types exports (#1402) (19bac52) - by @ghiscoding
- editor: add
onRendered
lifecycle callback option (#1410) (9d348d6) - by @ghiscoding - styling: add Dark Mode grid option (#1407) (855151b) - by @ghiscoding
v4.4.1
4.4.1 (2024-02-13)
Quick Info (Excel Export)
this new release is mainly targeting @slickgrid-universal/excel-export
🚀
We are migrating from excel-builder.js to a new fork Excel-Builder-Vanilla
, the approach is a very similar to what I have done previously with multiple-select-vanilla
, which is to create new forks of the project, and it is all about modernizing the project. This migration brings a lot of goodies by using this new Excel-Builder-Vanilla
, it was rewritten in TypeScript, dropped Q
(replaced by regular Promise
), dropped Lodash
(now uses native code) and finally replaced JSZip
with fflate
which itself also has an ESM build giving us Tree Shaking and it is also giving us better perf by using Web Workers (when using CSP, you might need to adjust your CSP rules). Why the switch? The reason is mainly to be ESM ready because technologies are evolving and ESM is really the future (the next release of ViteJS is also expected to drop CJS (CommonJS) support). The switch has other benefits too, the most noticeable one being the large decrease of its build size (that is because we dropped Q
and Lodash
).
You might be wondering, why not switch to a more popular library like SheetJS
or ExcelJS
? Well, believe or not, all these projects are still written as CJS with no foreseeable support to ESM builds. For that reason you cannot take advantage of proper Tree Shaking which mean that whoever rely on these projects, are in fact downloading their entire (large) library and all their dependencies. We certainly don't need all of these features (ie: we only want to build an Excel, not read it), all we need is to export to Excel and this is exactly what Excel-Builder-Vanilla
is giving us in an ESM build and it is also extremely small since it's only targeting Excel file creation. 🏗️
Below are the migrating advantages to Excel-Builder-Vanilla
- rewritten in TypeScript (providing us with TS Types (
d.ts
) - dropped very old dependencies that are no longer necessary (
Q
andLodash
) - switched from
JSZip
tofflate
(has ESM support with Tree Shaking and also better perf by using Web Workers) - big decrease in the final build size (our standalone build (.zip), used in Salesforce, dropped by almost 10%)
No breaking change, the changes required were all internal and are totally transparent to the developers since the API is exactly the same as before, the only difference will be your build size decrease ;)
For a very customized view of what you can do with Excel-Builder and Slickgrid-Universal, take a look at the Example 2, try to group by any column and then Export to Excel to see the very customized Excel output.
Note that if you had a JSZip
path defined in your tsconfig.json
, you can now remove it. that is because we migrated to fflate
and it doesn't require any special config.
{
"compilerOptions": {
- "paths": {
- "jszip": [
- "node_modules/jszip/dist/jszip.min.js"
- ]
- }
}
}
Bug Fixes
- ci: disable Husky when pushing new release (#1390) (6f9372e) - by @ghiscoding
- core: replace
any
types by valid types (#1378) (02c4bc1) - by @ghiscoding - demo: change trading demo full screen z-index lower than ms-select (1f4a9ac) - by @ghiscoding
- deps: update all non-major dependencies (#1381) (2562352) - by @renovate-bot
- mouse cell selection with active editor (#1382) (17549b8) - by @zewa666
- publish: do not npm publish
tsconfig.tsbuildinfo
(#1373) (9223338) - by @ghiscoding - common: make "ctrl + c" great again (#1379) (3bf59e) - by @zewa666
Features
- ExcelExport: migrate to Excel-Export-Vanilla (ESM) (#1383) (f3838b3) - by @ghiscoding
v4.3.1
4.3.1 (2024-01-27)
Bug Fixes
- core: frozen grid w/hidden column should remove from DOM (#1372) (2c1346e) - by @ghiscoding
- deps: update all non-major dependencies (#1368) (b49e895) - by @renovate-bot
- Salesforce doesn't support Document Fragment (#1365) (9e3fb5f) - by @ghiscoding
- styling: remove different bg-color on unorderable column (#1358) (91426d1) - by @ghiscoding
Performance Improvements
- core: convert
for..in
toObject.keys().forEach
for better perf (#1370) (29111a9) - by @ghiscoding - decrease calls to setItems & grid invalidate (#1363) (cab6898) - by @ghiscoding
- plugins: decrease number of calls to translate all extensions only once (#1359) (3e002f1) - by @ghiscoding
- plugins: Row Base Editing tooltip title should be translated only once (#1360) (ef4e8f9) - by @ghiscoding