Releases: ghiscoding/aurelia-slickgrid
Export to Excel, OData 4 enhancements & few other features and fixes
Intro
This new version brings a feature that I wanted to add for a long time Excel Export, this will also be the new default exporter (via a new flag enableExcelExport
). There is a new settings are very similar to the previous CSV export (which still exists under the flag enableExport
). More info can be found under the new Wiki - Export to Excel. You can see a demo on these 2 examples Grouping and Localization, all of the grids also have the new default Excel Export in their Grid Menu (aka hamburger menu)
New Excel Export
enableExcelExport
excelExportOptions
CSV and/or Text with Tab Delimited (still exist but no longer the default)
enableExport
exportOptions
This new version adds a couple of noteworthy features for OData and also the GridService which can now insert an item on top or bottom of the grid. Another well worth to know addition is the full unit tests coverage >95% of all Editors & Filters (there's only 2 files left to test), of course a couple of issues were found while doing these tests, for example Editors weren't working correctly with complex objects (field with dot notation) and now they do.
OData
In terms of OData features, the count can now be part of the OData query (it's an optin, you need to enable it yourself via the new options enableCount
), you can see the updated OData Example. Also I would be happy to have some volunteers who can help me improve the OData usage by moving the postProcess
necessary code inside the Aurelia-Slickgrid which would cleanup your client code (the GraphQL already uses this technique), I'm asking for volunteer since I don't personally have access to an OData server anymore.
Deprecations
The statistic
property was replaced by metrics
which is a better representing word, the previous property name still works but it's better to change the name when you have a chance. You can see an example here, which can be displayed as Metrics: 2019-10-02 17:03 pm | 6 of 500 items
(you can customize the output)
Last but not least, if you like the lib and haven't yet up voted, please do ⭐️ cheers 😸
Features
- backend: extract Pagination into its own Service to expose methods (#230) (9af863d)
- conditions: add field type float/integer to sorters/filters util (#233) (017f93d)
- export: add delimiter/listSeparator override to use with GraphQL (#232) (c4ae19d)
- export: add Export to Excel feature (#235) (feeb6ad)
- filter: add unit test suite for multiple Filters (#221) (f0a526d)
- insert: add option to insert item at bottom of grid (#229) (ed759e8)
- metrics: deprecated Statistic and renamed to Metrics (#225) (147c894)
- odata: add "enableCount" flag to add to OData query (#224) (5018ca8)
- sorters: consolidate & provide all date sorters (#218) (f8e2127)
- tests: add AutoComplete Filter & Editor Unit Tests (#222) (77bb18b)
- tests: add missing AutoComplete unit tests (dd04d4e)
- tests: add unit tests for SingleSelect & MultipleSelect Filters (#219) (42e38a6)
Bug Fixes
- backend: query should not include pagination option when disabled (#220) (e9731d9)
- editor: autocommit should not save if value is the same as before (#238) (78d1d81)
- editor: provide complex object override path for select editor (#237) (bb467cd)
- editors: complex objects should work with all editors (#226) (b792863)
- filter: should be able to filter even on hidden columns (#236) (390fe8a)
- gridService: addItem/updatedItemById pass array to setSelectedRows (#234) (96d04cc)
- gridService: refactor the code and add more unit tests (8a4d438)
- gridService: upsertItem(s) should trigger onItemAdded/Updated event (#231) (11c3c52)
- styling: styling issue in Firefox after col reordering (#228) (a737cdf)
Optional I18N and Range Filters
This new release introduces couple of new big new features, the 2 biggest ones are the following:
I18N
now optional... you no longer need to installI18N
when using only 1 locale (English or any other locale). If it's other than English, you can also provide a custom locale file, more info in links below.- new Wiki Localization-with-Custom-Locales and a new demo repo. 🎉
- Add new Range Filters, basically allows to have filter between min/max values but combined into 1 column filter. You can use a regular input filter and use the 2 dots notation to separate 2 numbers (e.g.:
5..10
between 5 and 10), and there are also 2 new Filters which are the Slider Range and the Date Range Filters. These new filters also work with the Backend Services (OData, GraphQL) which were updated and tested.- new Wiki Range Filters and new Example 23 to demo this new feature.
Other interesting additions
- add support of OData v4
- add more Cypress E2E tests
Also worth knowing that every single bug reported that were fixed in the past month now also have Cypress tests to avoid seeing these bugs again.
Use and like this library... please make sure to up vote ⭐️
Features
- cypress: add Cypress E2E testing to CircleCI build (#207) (1d3e341)
- filter: add filter search range functionality (#214) (e9298ed)
- filter: add optional placeholder to multiple select (dc6a2f6)
- registry: add npm package info for github package registry (7727c3c)
- tests: add Cypress E2E tests to cover hidden columns (#211) (c76ca3e)
- translate: make I18N an optional dependency (#208) (6bb9056)
Bug Fixes
- dom: ColumnPicker & GridMenu were creating multiple DOM elements (#205) (901da5e)
- editor: fix negative number in floatEditor (c02379b)
- odata: use contains with OData version 4 (#215) (2ff9a91), closes #263
- presets: Grid State & Presets stopped working for columns (#213) (d1949aa)
- selection: selected row should be none after filtering (#210) (315a8b8)
- bs4: fix some Bootstrap 4 styling (432bad0)
- i18n: aurelia-i18n needs to stay a dependency even if optional (6920fbf)
2.13.1
chore(release): 2.13.1
2.13.0
refactor(npm): move npmrc to the correct root folder
Couple of small fixes
Couple of small bug fixes & Service unit tests completion
As of version 2.12.2
, all Services and all Unit Tests are done, the only major testing left to would be Integration Tests (editors, filters, pagination & angular-slickgrid entry file). This also means that all major pieces, all the mechanic if we could say, of the library are now fully tested and a few small issues were detected and fixed while doing all of these nearly 1400 tests and we have now achieve ~75% coverage (also worth to know, there are 7000 lines of code to test, so it's quite a feat). 🎉 😸
Features
- tests: add ExportService full test suite (#201) (01fbb6b)
- tests: add more ResizerService tests (#203) (ad6f698)
Bug Fixes
More Unit Tests and Some Service Code Refactoring due to these tests
Practically all Services are now covered by unit tests (there's only 1 service left to test) on top of all the other other unit tests already done and we are now sitting at over 72% test coverage (1300+ tests). We also replaced moment
with moment-mini
for a smaller lib bundle, since we only use moment
for fixed date format and we don't need any locales (moment-mini
only uses the English locale).
Features
- build: replace moment with moment-mini for smaller build (3a0b2a9)
- tests: add AureliaUtilService full test suite (#195) (a7fca15)
- tests: add more unit tests to FilterService (#199) (7bf603f)
- tests: add some unit tests for FilterService (#198) (6097a8d)
Bug Fixes
Grid Odata Presets - few more Unit Tests
There are now over 1000+ unit tests and we just passed 60% coverage.
Features
- example: add Bootstrap Tabs example (8255772)
- odata: add presets to GridOdata Service (and unit tests) (#193) (64b07fe)
- tests: add GraphqlQueryBuilder unit tests (#189) (3f9edba)
- tests: add missing sorterUtilities test (#188) (a2f5a67)
- tests: add more RowDetailViewExtension unit tests (#187) (ffd9f0f)
Bug Fixes
Grid Service new CRUD methods, CLI integrations... and a lot more
Quick Summary
The library now has over 800+ unit tests (with Jest) and recently reached 50%+ test code coverage, which is a big achievement, that is a lot of tests to write. This version also introduce a lot of refactoring on the CRUD methods (with an extra & newly added upsert
method) available in the Grid Service (which is now fully tested). New method names are replacing the older methods (which will be deprecated in the future). The biggest change is that instead of passing true, false, true
(which is not very explanatory), was converted to an object with the flag properties, see below). All option flags still have their own defaults when no flag are provided (highlightRow: false, selectRow: true, triggerEvent: true
), for example
Before
this.aureliaGrid.gridService.updateDataGridItem(item, false, true);
After
this.aureliaGrid.gridService.updateItem(item, { highlightRow: false, selectRow: true });
Features
- build: add Codecov badge to show coverage (601078a)
- build: add Cypress CI to build plan (4e7b1fa)
- copy: add ExcelCopyBufferOptions to grid option (#178) (b309e82)
- demo: add custom formatter with onCellClick (dd4d109)
- euro: add Euro Formatters and Sorters (day/month/year) (#168) (ab408a1)
- formatter: add formatterOptions to Formatters, Grouping Formatters (#166) (015476d)
- formatters: consolidate all Date Formatters into 1 method call DRY (#169) (4bcb74b)
- gridService: add "upsertItem" method to Grid Service (#179) (e65609b)
- jest: add few more Formatter unit tests & fixed some Formatters (0d8ca4a)
- menu: add options to exclude column titles from Menus (#176) (71d290d)
- resizer: add calculateAvailableSizeBy container option (#161) (2085a62)
- resizer: add new method "pauseResizer" (#183) (72fa5db)
- rowDetail: add option to limit expanded row to only 1 at a time (#177) (e835b34)
- test: add lib index entry point unit tests (#163) (5c6d028)
- tests: add Aggregators full test suite (802521a)
- tests: add Extension Service full test suite (#174) (55c3502)
- tests: add few Grid Service unit tests (#182) (b34b585)
- feat(gridService); change all CRUD methods to options argument
- tests: add Grouping Formatters full test suite (#165) (f9a7872)
- tests: add missing Formatter unit tests (#162) (51c0bbd)
- tests: add more Extensions unit tests (#184) (5f6f3b0)
- tests: add more RowDetailExtension tests (#185) (e4d99e9)
- tests: add Service Utilities full test suite (#167) (e6e4ed8)
- tests: add Sorters full test suite (#164) (d375939)
Bug Fixes
- copy: copy+paste cells was not working (#160) (7d5090a)
- dateEditor: allow backspace for deleting a date (7ddb0cc)
- editor: dynamically adding editor column throws error (#181) (41517d4)
- editor: force user input in autocomplete (15cfa2d)
- editor: integer editor was always showing invalid when null value (#180) (ca7c591)
- gridState: columnPicker & gridMenu not triggering gridState change (#170) (01e5a56)
- height: should throw error when no height or enableAutoResize (70f069c)
- rowDetail: update to latest SlickGrid version to fix scrolling (c159be0)
- selection: styling of row selection is incorrect when adding rows (325ff0b)
- selection: syncGridSelection and preserveHidden (#173) (bc33773)
Single Search Filter and complete restructure of the lib folder & demos
This release includes a complete restructure of the lib folder to make it easier for people to contribute. Now all the library source code can be found under the folder src/aurelia-slickgrid/ and it still also includes the minimum examples code under src/examples/ in order to test the entire library. All the client demos (now 4 of them) were moved to a new repository aurelia-slickgrid-demos which you can clone and run locally, all the instructions are in the new repo.
Also, this new release now includes a few type of testing and more tests will be added in the future as the time permits. The external library that we use for testing are Cypress.io (for E2E) and also Jest (for Unit & Integration Tests).
Features
- e2e: add Jest & Cypress to the lib (#148) (9905245)
- editor: add title attribute to all Editors (#156) (6e0d125)
- filter: add demo of single search filter, closes #152 (#157) (919872e)
- demo | Wiki | ViewModel | animated gif
- filters: add flag to optionally trim filter white spaces (f0496fb)
- jest: write a couple more Jest unit tests (35537ba)
- rowDetail: user can override expand icon logic (#154) (4c887c6)
- rowSelection: user can override row selection checkbox logic (#155) (b5d7546)
Bug Fixes
- backend: Filter presets is getting removed when calling sort (98e8199)
- formatter: rewrite formatter do what it was supposed to do (9100e2c)
- headerMenu: calling "Clear Filter" was calling incorrect grid state (a699c45)
- input: remove autocomplete from all Editors & Filters (6db160e)
- input: remove autocomplete from all Editors & Filters again (437e913)
- pageSizes: setting different sizes extend global sizes, fixes #150 (d64cf9a)
- rowDetail: use latest Github SlickGrid code, temporary fix (c4a319b)
- select: sync multiple-select.js with core lib & fix some js event (a9b6093)