angular-slickgrid 8.12.0 → 8.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,19 +40,20 @@ import { type Column, type GridOption } from 'angular-slickgrid';
40
40
 
41
41
  export class GridComponent implements OnInit {
42
42
  columnDefinitions: Column[] = [];
43
- gridOptions!: GridOption;
44
- dataset!: any[];
43
+ gridOptions: GridOption;
44
+ dataset: any[] = [];
45
45
 
46
46
  onInit() {
47
47
  this.columnDefinitions = [
48
- { id: 'username', name: 'Username', field: 'username'},
49
- { id: 'age', name: 'Age', field: 'age' }
48
+ { id: 'firstName', name: 'First Name', field: 'firstName', sortable: true },
49
+ { id: 'lastName', name: 'Last Name', field: 'lastName', sortable: true },
50
+ { id: 'age', name: 'Age', field: 'age', type: 'number', sortable: true }
50
51
  ];
51
- this.gridOptions = { /*...*/ };
52
52
  this.dataset = [
53
- { id: 1, username: 'John', age: 20 },
54
- { id: 2, username: 'Jane', age: 21 }
53
+ { id: 1, firstName: 'John', lastName: 'Doe', age: 20 },
54
+ { id: 2, firstName: 'Jane', lastName: 'Smith', age: 21 }
55
55
  ];
56
+ this.gridOptions = { /*...*/ }; // optional grid options
56
57
  }
57
58
  }
58
59
  ```
@@ -67,26 +68,27 @@ export class GridComponent implements OnInit {
67
68
  ### Troubleshooting
68
69
 
69
70
  > [!WARNING]
70
- > This project **does not** work well with `strictTemplates` because of its use of native Custom Event, so please make sure to either disable `strictTemplates` or cast your event as `any` (see this [discussion](https://github.com/ghiscoding/Angular-Slickgrid/discussions/815) for more info)
71
+ > Because of its use of native Custom Event, this project **does not** work well with `strictTemplates`, so please make sure to either disable `strictTemplates` or cast your event as `any` (see this [discussion](https://github.com/ghiscoding/Angular-Slickgrid/discussions/815) for more info)
71
72
 
72
73
  ### Styling Themes
73
74
 
74
75
  Multiple styling themes are available
76
+ - Default (UI agnostic)
75
77
  - Bootstrap (see all Angular-Slickgrid [live demos](https://ghiscoding.github.io/Angular-Slickgrid/))
76
78
  - Material (see [Slickgrid-Universal](https://ghiscoding.github.io/slickgrid-universal/#/example07))
77
79
  - Salesforce (see [Slickgrid-Universal](https://ghiscoding.github.io/slickgrid-universal/#/example16))
78
80
 
79
- Also note that all of these themes also have **Dark Theme** equivalent and even though Bootstrap if often used as the default, it also works well with any other UI framework like Bulma, Material, ...
81
+ Also note that all of these themes also have **Dark Theme** equivalent and even though Bootstrap is often used for live demos, it does work as well with any other UI framework like Bulma, Material, ...
80
82
 
81
83
  ### Demo page
82
- `Angular-Slickgrid` works with all `Bootstrap` versions, you can see a demo of each one below. It also works well with any other frameworks like Material or Bulma and there are also couple of extra styling themes based on Material & Salesforce which are also available. You can also use different SVG icons, you may want to look at the [Docs - SVG Icons](https://ghiscoding.gitbook.io/angular-slickgrid/styling/svg-icons)
84
+ `Angular-Slickgrid` works with all `Bootstrap` versions, you can see a demo of each one below. It also works well with any other frameworks like Material or Bulma and there are also couple of extra styling themes based on Material & Salesforce which are also available. You can also use different SVG icons, you may want to look at the [Docs - SVG Icons](https://ghiscoding.gitbook.io/angular-slickgrid/styling/svg-icons) for more info.
83
85
 
84
86
  [Angular-Slickgrid-Demos](https://github.com/ghiscoding/angular-slickgrid-demos) includes the following:
85
87
  - [Bootstrap 5 demo](https://ghiscoding.github.io/Angular-Slickgrid) / [examples repo](https://github.com/ghiscoding/angular-slickgrid-demos/tree/master/bootstrap5-demo-with-translate) - Code samples which uses `ngx-translate` to support multiple locales.
86
88
  - [Bootstrap 5 (single Locale)](https://github.com/ghiscoding/angular-slickgrid-demos/tree/master/bootstrap5-demo-with-locales) / [examples repo](https://github.com/ghiscoding/angular-slickgrid-demos/tree/master/bootstrap5-demo-with-locales) - Code Sample with a single Locale (without `ngx-translate`)
87
89
 
88
90
  #### Working Demo
89
- For a complete set of working demos (40+ examples), we strongly suggest you clone [Angular-Slickgrid Demos](https://github.com/ghiscoding/angular-slickgrid-demos) repository (instructions are provided in the demo repo). The repo provides multiple demos and they are updated for every new project release, so it is updated frequently and is also used as the GitHub live demo page for both the [Bootstrap 5 demo](https://ghiscoding.github.io/Angular-Slickgrid) and [Bootstrap 5 demo (single Locale)](https://ghiscoding.github.io/angular-slickgrid-demos).
91
+ For a complete set of working demos (40+ examples), we strongly suggest you clone [Angular-Slickgrid Demos](https://github.com/ghiscoding/angular-slickgrid-demos) repository (instructions are provided inside it). The demo repo provides multiple examples and are updated on every new project release, so it is updated frequently and is also the GitHub live demo page for both the [Bootstrap 5 demo](https://ghiscoding.github.io/Angular-Slickgrid) and [Bootstrap 5 demo (single Locale)](https://ghiscoding.github.io/angular-slickgrid-demos).
90
92
 
91
93
  ```sh
92
94
  git clone https://github.com/ghiscoding/angular-slickgrid-demos
@@ -96,19 +98,19 @@ npm start
96
98
  ```
97
99
 
98
100
  ### Like it? ⭐ it
99
- You like to use **Angular-Slickgrid**? Be sure to upvote ⭐ and maybe support me with caffeine [☕](https://ko-fi.com/ghiscoding) and feel free to contribute. 👷👷‍♀️
101
+ You like to use **Angular-Slickgrid**? Be sure to upvote ⭐ and perhaps support me with caffeine [☕](https://ko-fi.com/ghiscoding) or GitHub sponsoring and feel free to contribute.
100
102
 
101
103
  <a href='https://ko-fi.com/ghiscoding' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' />
102
104
 
103
105
  ### Contributions
104
- If you wish to contribute then make sure to follow the steps shown in the [CONTRIBUTING](https://github.com/ghiscoding/Angular-Slickgrid/blob/master/CONTRIBUTING.md) guide.
106
+ If you wish to contribute, please make sure to follow the steps shown in the [CONTRIBUTING](https://github.com/ghiscoding/Angular-Slickgrid/blob/master/CONTRIBUTING.md) guide.
105
107
 
106
108
  ## Latest News & Releases
107
- Check out the [Releases](https://github.com/ghiscoding/Angular-Slickgrid/releases) section for all latest News & Releases.
109
+ Make sure to check out the [Releases](https://github.com/ghiscoding/Angular-Slickgrid/releases) section for all latest News & Releases.
108
110
 
109
111
  ## Angular Compatibility
110
112
 
111
- > **Note** please be aware that only the latest version of Angular-Slickgrid is supported and will receive bug fixes. The reason older versions are not supported is simply because it's already a lot of work to maintain for a single developer.
113
+ > **Note** please be aware that only the latest major version of Angular-Slickgrid will be supported and receive bug fixes (it's already a lot of work for a single developer like me to support).
112
114
 
113
115
  | Angular-Slickgrid | Angular version | Migration Guide | Notes |
114
116
  |-------------------|-----------------|-----------------|-------|
@@ -121,7 +123,7 @@ Check out the [Releases](https://github.com/ghiscoding/Angular-Slickgrid/release
121
123
  | 2.x | 7-11.x | [Migration 2.x](https://github.com/ghiscoding/Angular-Slickgrid/wiki/Migration-to-2.x) | support multiple grids on same page |
122
124
  | 1.x | 4-6.x | | |
123
125
 
124
- **Note** For a full compatibility table of Angular-Slickgrid with Slickgrid-Universal, please take a look at the [Versions Compatibility Table - Wiki](https://github.com/ghiscoding/Angular-Slickgrid/wiki/Versions-Compatibility-Table).
126
+ **Note** For a full compatibility table of every Angular-Slickgrid versions with Slickgrid-Universal, please take a look at the [Versions Compatibility Table - Wiki](https://github.com/ghiscoding/Angular-Slickgrid/wiki/Versions-Compatibility-Table).
125
127
 
126
128
  For Angular 12+ see the instructions below - [Angular 12 with WebPack 5 - polyfill issue](#angular-12-with-webpack-5---how-to-fix-polyfill-error).
127
129
 
@@ -148,6 +150,8 @@ Slickgrid-Universal has **100%** Unit Test Coverage and all Angular-Slickgrid Ex
148
150
 
149
151
  ## Sponsors
150
152
 
153
+ Thanks to all my sponsors!
154
+
151
155
  <div>
152
156
  <span>
153
157
  <a href="https://github.com/wundergraph" class="Link" title="Wundergraph" target="_blank"><img src="https://avatars.githubusercontent.com/u/64281914" width="50" height="50" valign="middle" /></a>
@@ -138,12 +138,16 @@ export declare class AngularSlickgridComponent<TData = any> implements AfterView
138
138
  * @param showing
139
139
  */
140
140
  showHeaderRow(showing?: boolean): boolean;
141
+ /**
142
+ * Toggle the empty data warning message visibility.
143
+ * @param showWarning
144
+ */
145
+ displayEmptyDataWarning(showWarning?: boolean): void;
141
146
  /**
142
147
  * Loop through all column definitions and copy the original optional `width` properties optionally provided by the user.
143
148
  * We will use this when doing a resize by cell content, if user provided a `width` it won't override it.
144
149
  */
145
150
  protected copyColumnWidthsReference(columnDefinitions: Column[]): void;
146
- protected displayEmptyDataWarning(showWarning?: boolean): void;
147
151
  protected bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView): void;
148
152
  protected bindBackendCallbackFunctions(gridOptions: GridOption): void;
149
153
  protected addBackendInfiniteScrollCallback(): void;