angular-slickgrid 7.3.1 → 7.4.1

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
@@ -19,6 +19,8 @@ One of the best JavasSript datagrid [SlickGrid](https://github.com/mleibman/Slic
19
19
  ## Documentation
20
20
  📕 [Documentation](https://ghiscoding.gitbook.io/angular-slickgrid/getting-started/quick-start) website powered by GitBook.
21
21
 
22
+ For common issues, see the [Troubleshooting Section](#troubleshooting-section) below
23
+
22
24
  ## Installation
23
25
  A good starting point is the **[Docs - Quick Start](https://ghiscoding.gitbook.io/angular-slickgrid/getting-started/quick-start)** and/or simply clone the [Angular-Slickgrid Demos](https://github.com/ghiscoding/angular-slickgrid-demos) repository. Please review all documentation and closed issues before opening any new issue, also consider asking installation and/or general questions on [Stack Overflow](https://stackoverflow.com/search?tab=newest&q=slickgrid) unless you think there's a bug with the library.
24
26
 
@@ -55,11 +57,6 @@ If you wish to contribute then make sure to follow the steps shown in the [CONTR
55
57
  ## Latest News & Releases
56
58
  Check out the [Releases](https://github.com/ghiscoding/Angular-Slickgrid/releases) section for all latest News & Releases.
57
59
 
58
- ## Troubleshooting / Documentation
59
- The [Documentation](https://ghiscoding.gitbook.io/angular-slickgrid/) is powered by GitBook and is where you'll find all the documentation, so please consult the [Angular-Slickgrid - Documentation](https://ghiscoding.gitbook.io/angular-slickgrid/) before opening any issues. The [Docs - Quick Start](https://ghiscoding.gitbook.io/angular-slickgrid/getting-started/quick-start) is a great place to start with. You can also take a look at the [Demo page](https://ghiscoding.github.io/Angular-Slickgrid), it includes sample for most of the features and it keeps growing (so you might want to consult it whenever a new version comes out).
60
-
61
- For common issues, see the [Troubleshooting Section](#troubleshooting-section) below
62
-
63
60
  ## Angular Compatibility
64
61
 
65
62
  > **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.
@@ -90,132 +87,11 @@ Angular-Slickgrid uses `ngx-translate` library to support Locales, it is also re
90
87
  | 8-9 | 12.x |
91
88
  | 7 | 11.x |
92
89
 
93
- ### Fully Tested with [Jest](https://jestjs.io/) (Unit Tests) - [Cypress](https://www.cypress.io/) (E2E Tests)
94
- Angular-Slickgrid and Slickgrid-Universal both have **100%** Unit Test Coverage, that includes over +4,000 unit tests using [Jest](https://jestjs.io/). On the UI side, all Angular-Slickgrid Examples are tested with [Cypress](https://www.cypress.io/), there are over +500 Cypress E2E tests.
95
-
96
- #### How to load data with `HttpClient`?
97
- You might notice that all demos are coded with mocked dataset in each of the examples, that is mainly for demo purposes, but you might be wondering how to connect this with an `HttpClient`? Easy... just replace the mocked data, assigned to the `dataset` property, by your `HttpClient` call and that's about it. The `dataset` property can be changed or refreshed at any time and it will be reflected in the grid, which is why you can use local data and/or connect it with a `Promise` or an `Observable` with `HttpClient` (internally it's just a SETTER that refreshes the grid). See [Example 24](https://ghiscoding.github.io/Angular-Slickgrid/#/gridtabs) for a demo showing how to load a JSON file with `HttpClient`.
98
-
99
- ## Main features
100
- You can see some screenshots below and visit the [Documentation](https://ghiscoding.gitbook.io/angular-slickgrid/getting-started/quick-start) website.
90
+ ### Tested with [Jest](https://jestjs.io/) (Unit Tests) - [Cypress](https://www.cypress.io/) (E2E Tests)
91
+ Slickgrid-Universal has **100%** Unit Test Coverage and all Slickgrid-React Examples are tested with [Cypress](https://www.cypress.io/) as E2E tests.
101
92
 
102
93
  ## Troubleshooting Section
103
94
 
104
- ### Angular 12 with WebPack 5 - how to fix polyfill error
105
- Since Angular 12 switched to WebPack 5, you might get some new errors and you will need to add some polyfills manually to get the Excel Builder (Excel Export) to work.
106
-
107
- #### The error you might get
108
-
109
- ```text
110
- BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
111
- This is no longer the case. Verify if you need this module and configure a polyfill for it.
112
- ```
113
-
114
- #### Steps to fix it
115
- 1. `npm install stream-browserify`
116
- 2. Add a path mapping in `tsconfig.json`:
117
- ```
118
- {
119
- ...
120
- "compilerOptions": {
121
- "paths": {
122
- "stream": [ "./node_modules/stream-browserify" ]
123
- },
124
- ```
125
- 3. Add `stream` to `allowedCommonJsDependencies` in `angular.json`:
126
- ```
127
- "options": {
128
- "allowedCommonJsDependencies": [
129
- "excel-builder-webpacker",
130
- "stream"
131
- ],
132
- ```
133
-
134
- ### `ngcc` Build Warnings (Angular >=8.0 && <16.0)
135
- You might get warnings about SlickGrid while doing a production build, most of them are fine and the best way to fix them, is to simply remove/ignore the warnings to CommonJS packages, all you have to do is to add a file named `ngcc.config.js` in your project root (same location as the `angular.json` file) with the following content (you can also see this [commit](https://github.com/ghiscoding/angular-slickgrid-demos/commit/1fe8092bcd2e99ede5ab048f4a7ebe6254e4bee0) which fixes the Angular-Slickgrid-Demos prod build):
136
- ```js
137
- module.exports = {
138
- packages: {
139
- 'angular-slickgrid': {
140
- ignorableDeepImportMatchers: [
141
- /assign-deep/,
142
- /slickgrid\//,
143
- /flatpickr/,
144
- /dequal/,
145
- ]
146
- },
147
- }
148
- };
149
- ```
150
- You should also add `Angular-Slickgrid` as an allowed CommonJS dependency to your `angular.json` file to silence the warnings.
151
- ```json
152
- "options": {
153
- "allowedCommonJsDependencies": ["angular-slickgrid"]
154
- }
155
- ```
156
-
157
- #### `strictTemplates` error
158
- In Angular 14 and higher, Angular has a `strictTemplates` flag in your `tsconfig.json` file (enabled by default when creating new projects from CLI) which causes issues with Angular-Slickgrid events with errors similar to this:
159
-
160
- > Property 'detail' does not exist on type 'Event'. (onAngularGridCreated)="angularGridReady($event.detail)"
161
-
162
- The reason is because Angular-Slickgrid uses Custom Event for all its events and Angular complains because these Custom Events aren't typed. In order to fix this issue, you have 3 viable approaches:
163
-
164
- 1. disabled `strictTemplates` in your `tsconfig.json` config
165
- 2. cast the event in the View template to `$any` type
166
- - `$any($event)` for example `$any($event).detail.eventData`
167
- 3. cast the event in the component ViewModel to `CustomEvent`
168
- ```html
169
- <angular-slickgrid gridId="grid28"
170
- [columnDefinitions]="columnDefinitions"
171
- [gridOptions]="gridOptions"
172
- [dataset]="dataset"
173
- (onAngularGridCreated)="angularGridReady($event.detail)">
174
- </angular-slickgrid>
175
- ```
176
-
177
- ```ts
178
- angularGridReady(event: CustomEvent) {
179
- this.angularGrid = event.detail as AngularGridInstance;
180
- this.gridObj = this.angularGrid.slickGrid;
181
- }
182
- ```
183
-
184
- The simplest is obviously the option 1 but you lose the strictness on the view templates, more details can found under the discussion [(`strictTemplates`) Template error ](https://github.com/ghiscoding/Angular-Slickgrid/discussions/815), I have also opened a similar Stack Overflow question myself:
185
- [How to use Custom Event (not Event Emitter) without `strictTemplates` to complain about `$event` not being a Custom Event type?](https://stackoverflow.com/questions/68490848/how-to-use-custom-event-not-event-emitter-without-stricttemplates-to-complai).
186
-
187
- ## Screenshots
188
-
189
- Screenshots from the demo app with the `Bootstrap` theme.
190
-
191
- _Note that the styling changed a bit, the best is to simply head over to the [Live Demo](https://ghiscoding.github.io/Angular-Slickgrid) page._
192
-
193
- ### Slickgrid example with Formatters (last column shown is a custom Formatter)
194
-
195
- #### _You can also see the Grid Menu opened (aka hambuger menu)_
196
-
197
- ![Default Slickgrid Example](/screenshots/formatters.png)
198
-
199
- ### Filters and Multi-Column Sort
200
-
201
- ![Filter and Sort](/screenshots/filter_and_sort.png)
202
-
203
- ### Inline Editing
204
-
205
- ![Editors](/screenshots/editors.png)
206
-
207
- ### Pinned (aka frozen) Columns/Rows
208
-
209
- ![Pinned Columns/Rows](/screenshots/frozen.png)
210
-
211
- ### Draggable Grouping & Aggregators
212
-
213
- ![Draggable Grouping](/screenshots/draggable-grouping.png)
214
-
215
- ### Slickgrid Example with Server Side (Filter/Sort/Pagination)
216
- #### Comes with OData & GraphQL support (you can implement custom ones too)
217
-
218
- ![Slickgrid Server Side](/screenshots/pagination.png)
219
-
220
- ### Composite Editor Modal Windows
221
- ![Composite Editor Modal](/screenshots/composite-editor.png)
95
+ - [Angular 12 with WebPack 5 - how to fix polyfill error](https://github.com/ghiscoding/Angular-Slickgrid/wiki/Versions-Compatibility-Table#angular-12-with-webpack-5---how-to-fix-polyfill-error)
96
+ - [`ngcc` Build Warnings (Angular >=8.0 && <16.0)](https://github.com/ghiscoding/Angular-Slickgrid/wiki/Versions-Compatibility-Table#ngcc-build-warnings-angular-80--160)
97
+ - [`strictTemplates` error](https://github.com/ghiscoding/Angular-Slickgrid/wiki/Versions-Compatibility-Table#stricttemplates-error)
@@ -16,14 +16,14 @@ export declare class SlickRowDetailView extends UniversalSlickRowDetailView {
16
16
  protected readonly appRef: ApplicationRef;
17
17
  protected readonly eventPubSubService: EventPubSubService;
18
18
  protected readonly gridContainerElement: HTMLDivElement;
19
- protected rxjs?: RxJsFacade;
19
+ protected rxjs?: RxJsFacade | undefined;
20
20
  rowDetailContainer: ViewContainerRef;
21
21
  protected _preloadComponent: Type<object> | undefined;
22
22
  protected _views: CreatedView[];
23
23
  protected _viewComponent: Type<object>;
24
24
  protected _subscriptions: EventSubscription[];
25
25
  protected _userProcessFn: (item: any) => Promise<any> | Observable<any> | Subject<any>;
26
- constructor(angularUtilService: AngularUtilService, appRef: ApplicationRef, eventPubSubService: EventPubSubService, gridContainerElement: HTMLDivElement, rxjs?: RxJsFacade);
26
+ constructor(angularUtilService: AngularUtilService, appRef: ApplicationRef, eventPubSubService: EventPubSubService, gridContainerElement: HTMLDivElement, rxjs?: RxJsFacade | undefined);
27
27
  get addonOptions(): import("@slickgrid-universal/common").RowDetailViewOption;
28
28
  protected get datasetIdPropName(): string;
29
29
  get eventHandler(): SlickEventHandler;