Skip to content

Commit

Permalink
chore(deps): upgrade to Aurelia-Slickgrid 8.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Aug 7, 2024
1 parent 980c837 commit 83ef359
Show file tree
Hide file tree
Showing 26 changed files with 2,991 additions and 600 deletions.
568 changes: 287 additions & 281 deletions webpack-bs5-demo-with-locales/package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions webpack-bs5-demo-with-locales/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"@aurelia/router": "^2.0.0-beta.20",
"@formkit/tempo": "^0.1.2",
"@popperjs/core": "^2.11.8",
"@slickgrid-universal/composite-editor-component": "^5.4.0",
"@slickgrid-universal/custom-tooltip-plugin": "^5.4.0",
"@slickgrid-universal/excel-export": "^5.4.0",
"@slickgrid-universal/graphql": "^5.4.0",
"@slickgrid-universal/odata": "^5.4.0",
"@slickgrid-universal/rxjs-observable": "^5.4.0",
"@slickgrid-universal/text-export": "^5.4.0",
"@slickgrid-universal/composite-editor-component": "^5.5.0",
"@slickgrid-universal/custom-tooltip-plugin": "^5.5.0",
"@slickgrid-universal/excel-export": "^5.5.0",
"@slickgrid-universal/graphql": "^5.5.0",
"@slickgrid-universal/odata": "^5.5.0",
"@slickgrid-universal/rxjs-observable": "^5.5.0",
"@slickgrid-universal/text-export": "^5.5.0",
"aurelia": "^2.0.0-beta.20",
"aurelia-slickgrid": "^8.4.0",
"aurelia-slickgrid": "^8.5.0",
"bootstrap": "^5.3.3",
"dompurify": "^3.1.6",
"fetch-jsonp": "^1.3.0",
Expand All @@ -46,32 +46,32 @@
"@fnando/sparkline": "^0.3.10",
"@types/bluebird": "^3.5.42",
"@types/fnando__sparkline": "^0.3.7",
"@types/node": "^20.14.11",
"@types/node": "^22.1.0",
"@types/webpack": "^5.28.5",
"aurelia-polyfills": "^1.3.4",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.20",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^12.0.2",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"file-loader": "^6.2.0",
"html-loader": "^5.0.0",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.0",
"mini-css-extract-plugin": "^2.9.0",
"minimatch": "^9.0.5",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.39",
"postcss": "^8.4.41",
"postcss-loader": "^8.1.1",
"promise-polyfill": "^8.3.0",
"sass": "^1.77.8",
"sass-loader": "^14.2.1",
"sass-loader": "^16.0.0",
"style-loader": "^4.0.0",
"through2": "^4.0.2",
"tree-kill": "^1.2.2",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.5.3",
"typescript": "^5.5.4",
"webpack": "^5.93.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
Expand Down
17 changes: 13 additions & 4 deletions webpack-bs5-demo-with-locales/src/examples/slickgrid/example19.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ export class Example19 {
},
enableFiltering: true,
enableRowDetailView: true,
rowSelectionOptions: {
selectActiveRow: true
},
darkMode: this._darkMode,
datasetIdPropertyName: 'rowId', // optionally use a different "id"
rowDetailView: {
Expand Down Expand Up @@ -141,7 +138,19 @@ export class Example19 {
console.log('before toggling row detail', args.item);
return true;
},
}
},
rowSelectionOptions: {
// True (Single Selection), False (Multiple Selections)
selectActiveRow: true
},

// You could also enable Row Selection as well, but just make sure to disable `useRowClick: false`
// enableCheckboxSelector: true,
// enableRowSelection: true,
// checkboxSelector: {
// hideInFilterHeaderRow: false,
// hideSelectAllCheckbox: true,
// },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class Example23 {

const today = new Date();
const presetLowestDay = format(addDay(new Date(), -2), 'YYYY-MM-DD');
const presetHighestDay = format(addDay(new Date(), today.getDate() < 14 ? 30 : 25), 'YYYY-MM-DD');
const presetHighestDay = format(addDay(new Date(), today.getDate() < 14 ? 28 : 25), 'YYYY-MM-DD');

this.gridOptions = {
autoResize: {
Expand Down
103 changes: 103 additions & 0 deletions webpack-bs5-demo-with-locales/src/examples/slickgrid/example38.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<div class="demo38">
<h2>
Example 38: OData (v4) Backend Service with Infinite Scroll
<span class="float-end">
<a style="font-size: 18px" target="_blank"
href="https://github.com/ghiscoding/aurelia-slickgrid/blob/master/packages/demo/src/examples/slickgrid/example38.ts">
<span class="mdi mdi-link-variant"></span> code
</a>
</span>
</h2>

<h6 class="subtitle italic content">
<ul>
<li>
Infinite scrolling allows the grid to lazy-load rows from the server when reaching the scroll bottom (end) position.
In its simplest form, the more the user scrolls down, the more rows get loaded.
If we reached the end of the dataset and there is no more data to load, then we'll assume to have the entire dataset loaded in memory.
This contrast with the regular Pagination approach which will hold only hold data for 1 page at a time.
</li>
<li>NOTES</li>
<ol>
<li>
<code>presets.pagination</code> is not supported with Infinite Scroll and will revert to the first page,
simply because since we keep appending data, we always have to start from index zero (no offset).
</li>
<li>
Pagination is not shown BUT in fact, that is what is being used behind the scene whenever reaching the scroll end (fetching next batch).
</li>
<li>
Also note that whenever the user changes the Sort(s)/Filter(s) it will always reset and go back to zero index (first page).
</li>
</ol>
</ul>
</h6>

<div class="row">
<div class="col-sm-3">
<div class="alert alert-danger" show.bind="errorStatus" data-test="error-status">
<em><strong>Backend Error:</strong> <span innerhtml.bind="errorStatus"></span></em>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-2">
<div class.bind="status.class" role="alert" data-test="status">
<strong>Status: </strong> ${status.text}
<span hidden.bind="!processing">
<i class="mdi mdi-sync mdi-spin"></i>
</span>
</div>
</div>
<div class="col-sm-10">
<div class="alert alert-info" data-test="alert-odata-query">
<strong>OData Query:</strong> <span data-test="odata-query-result">${odataQuery}</span>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-12">
<button class="btn btn-outline-secondary btn-sm" data-test="clear-filters-sorting"
click.trigger="clearAllFiltersAndSorts()" title="Clear all Filters & Sorts">
<i class="mdi mdi-filter-remove-outline"></i>
Clear all Filter & Sorts
</button>
<button class="btn btn-outline-secondary btn-sm" data-test="set-dynamic-filter"
click.trigger="setFiltersDynamically()">
Set Filters Dynamically
</button>
<button class="btn btn-outline-secondary btn-sm" data-test="set-dynamic-sorting"
click.trigger="setSortingDynamically()">
Set Sorting Dynamically
</button>
<button class="btn btn-outline-secondary btn-sm" data-test="group-by-gender"
click.trigger="groupByGender()">
Group by Gender
</button>

<div show.bind="metrics" class="mt-2" style="margin: 10px 0px">
<b>Metrics:</b>
<span>
<span>${metrics.endTime | dateFormat: 'DD MMM, h:mm:ss a'}</span>
<span data-test="itemCount">${metrics.itemCount}</span>
of
<span data-test="totalItemCount">${metrics.totalItemCount}</span>
items
</span>
<span class="badge rounded-pill text-bg-primary" class.bind="tagDataClass" data-test="data-loaded-tag">All Data Loaded!!!</span>
</div>
</div>
</div>

<aurelia-slickgrid
grid-id="grid38"
column-definitions.bind="columnDefinitions"
grid-options.bind="gridOptions"
dataset.bind="dataset"
instances.bind="aureliaGrid"
on-aurelia-grid-created.trigger="aureliaGridReady($event.detail)"
on-row-count-changed.trigger="refreshMetrics($event.detail.args)">
</aurelia-slickgrid>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.demo38 {
.badge {
display: none;
&.fully-loaded {
display: inline-flex;
}
}
}
Loading

0 comments on commit 83ef359

Please sign in to comment.