angular-slickgrid 9.0.0 → 9.0.2
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/LICENSE +1 -1
- package/{dist/fesm2022 → fesm2022}/angular-slickgrid.mjs +16 -16
- package/package.json +27 -14
- package/.gitbook.yaml +0 -5
- package/CHANGELOG.md +0 -1691
- package/CONTRIBUTING.md +0 -17
- package/angular.json +0 -133
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/clover.xml +0 -1620
- package/coverage/coverage-final.json +0 -9
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -176
- package/coverage/library/components/angular-slickgrid.component.ts.html +0 -5074
- package/coverage/library/components/index.html +0 -116
- package/coverage/library/constants.ts.html +0 -397
- package/coverage/library/extensions/index.html +0 -116
- package/coverage/library/extensions/slickRowDetailView.ts.html +0 -1261
- package/coverage/library/index.html +0 -116
- package/coverage/library/modules/angular-slickgrid.module.ts.html +0 -166
- package/coverage/library/modules/index.html +0 -116
- package/coverage/library/services/angularUtil.service.ts.html +0 -445
- package/coverage/library/services/container.service.ts.html +0 -163
- package/coverage/library/services/index.html +0 -161
- package/coverage/library/services/translater.service.ts.html +0 -199
- package/coverage/library/services/utilities.ts.html +0 -142
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/dist/LICENSE +0 -21
- package/dist/README.md +0 -142
- package/docs/README.md +0 -5
- package/docs/TOC.md +0 -105
- package/docs/backend-services/Custom-Backend-Service.md +0 -50
- package/docs/backend-services/GraphQL.md +0 -276
- package/docs/backend-services/OData.md +0 -245
- package/docs/backend-services/graphql/GraphQL-Filtering.md +0 -156
- package/docs/backend-services/graphql/GraphQL-JSON-Result.md +0 -85
- package/docs/backend-services/graphql/GraphQL-Pagination.md +0 -77
- package/docs/backend-services/graphql/GraphQL-Sorting.md +0 -78
- package/docs/column-functionalities/cell-menu.md +0 -212
- package/docs/column-functionalities/editors/autocomplete-editor.md +0 -466
- package/docs/column-functionalities/editors/date-editor-flatpickr.md +0 -71
- package/docs/column-functionalities/editors/date-editor-vanilla-calendar.md +0 -91
- package/docs/column-functionalities/editors/longtext-editor-textarea.md +0 -80
- package/docs/column-functionalities/editors/select-dropdown-editor.md +0 -227
- package/docs/column-functionalities/editors.md +0 -604
- package/docs/column-functionalities/filters/autocomplete-filter.md +0 -183
- package/docs/column-functionalities/filters/compound-filters.md +0 -234
- package/docs/column-functionalities/filters/custom-filter.md +0 -117
- package/docs/column-functionalities/filters/filter-intro.md +0 -81
- package/docs/column-functionalities/filters/input-filter.md +0 -260
- package/docs/column-functionalities/filters/range-filters.md +0 -188
- package/docs/column-functionalities/filters/select-filter.md +0 -695
- package/docs/column-functionalities/filters/single-search-filter.md +0 -77
- package/docs/column-functionalities/filters/styling-filled-filters.md +0 -45
- package/docs/column-functionalities/formatters.md +0 -325
- package/docs/column-functionalities/sorting.md +0 -200
- package/docs/developer-guides/csp-compliance.md +0 -64
- package/docs/events/Available-Events.md +0 -223
- package/docs/events/Grid-&-DataView-Events.md +0 -211
- package/docs/getting-started/quick-start.md +0 -230
- package/docs/getting-started/troubleshooting.md +0 -80
- package/docs/grid-functionalities/Column-Picker.md +0 -22
- package/docs/grid-functionalities/Composite-Editor-Modal.md +0 -627
- package/docs/grid-functionalities/Context-Menu.md +0 -226
- package/docs/grid-functionalities/Custom-Footer.md +0 -80
- package/docs/grid-functionalities/Custom-Tooltip-(plugin).md +0 -258
- package/docs/grid-functionalities/Export-to-Excel.md +0 -457
- package/docs/grid-functionalities/Export-to-Text-File.md +0 -165
- package/docs/grid-functionalities/FAQ.md +0 -53
- package/docs/grid-functionalities/Global-Options.md +0 -29
- package/docs/grid-functionalities/Grid-Auto-Resize.md +0 -218
- package/docs/grid-functionalities/Grid-Menu.md +0 -134
- package/docs/grid-functionalities/Grid-State-&-Preset.md +0 -245
- package/docs/grid-functionalities/Header-Menu-&-Header-Buttons.md +0 -125
- package/docs/grid-functionalities/Resize-by-Cell-Content.md +0 -138
- package/docs/grid-functionalities/Row-Selection.md +0 -247
- package/docs/grid-functionalities/Row-based-edit.md +0 -71
- package/docs/grid-functionalities/add-update-highlight.md +0 -258
- package/docs/grid-functionalities/column-row-spanning.md +0 -74
- package/docs/grid-functionalities/dynamic-item-metadata.md +0 -124
- package/docs/grid-functionalities/excel-copy-buffer.md +0 -145
- package/docs/grid-functionalities/frozen-columns-rows.md +0 -164
- package/docs/grid-functionalities/grouping-and-aggregators.md +0 -269
- package/docs/grid-functionalities/header-footer-slots.md +0 -22
- package/docs/grid-functionalities/infinite-scroll.md +0 -150
- package/docs/grid-functionalities/providing-grid-data.md +0 -61
- package/docs/grid-functionalities/row-detail.md +0 -530
- package/docs/grid-functionalities/tree-data-grid.md +0 -391
- package/docs/localization/Localization---Component-Sample.md +0 -87
- package/docs/localization/Localization-with-Custom-Locales.md +0 -66
- package/docs/localization/Localization-with-ngx-translate.md +0 -148
- package/docs/migrations/migration-to-2.x.md +0 -304
- package/docs/migrations/migration-to-3.x.md +0 -295
- package/docs/migrations/migration-to-4.x.md +0 -83
- package/docs/migrations/migration-to-5.x.md +0 -160
- package/docs/migrations/migration-to-6.x.md +0 -128
- package/docs/migrations/migration-to-7.x.md +0 -294
- package/docs/migrations/migration-to-8.x.md +0 -316
- package/docs/migrations/migration-to-9.x.md +0 -219
- package/docs/slick-grid-dataview-objects/slickgrid-dataview-objects.md +0 -79
- package/docs/styling/dark-mode.md +0 -100
- package/docs/styling/styling.md +0 -250
- package/docs/testing/testing-patterns.md +0 -73
- package/eslint.config.mjs +0 -60
- package/ng-package.json +0 -10
- package/src/assets/angular-logo.png +0 -0
- package/src/assets/angular-logo2.png +0 -0
- package/src/assets/data/collection_100_numbers.json +0 -12
- package/src/assets/data/collection_500_numbers.json +0 -52
- package/src/assets/data/countries.json +0 -245
- package/src/assets/data/country_names.json +0 -245
- package/src/assets/data/customers_100.json +0 -102
- package/src/assets/data/users.csv +0 -5
- package/src/assets/i18n/en.json +0 -102
- package/src/assets/i18n/fr.json +0 -103
- package/src/demos/app-routing.module.ts +0 -108
- package/src/demos/app.component.html +0 -187
- package/src/demos/app.component.scss +0 -79
- package/src/demos/app.component.ts +0 -11
- package/src/demos/app.module.ts +0 -196
- package/src/demos/environments/environment.dev.ts +0 -3
- package/src/demos/environments/environment.prod.ts +0 -3
- package/src/demos/environments/environment.ts +0 -8
- package/src/demos/examples/custom-angularComponentEditor.ts +0 -187
- package/src/demos/examples/custom-angularComponentFilter.ts +0 -123
- package/src/demos/examples/custom-buttonFormatter.component.ts +0 -13
- package/src/demos/examples/custom-inputEditor.ts +0 -132
- package/src/demos/examples/custom-inputFilter.ts +0 -134
- package/src/demos/examples/custom-titleFormatter.component.ts +0 -9
- package/src/demos/examples/data/collection_100_numbers.json +0 -12
- package/src/demos/examples/data/collection_500_numbers.json +0 -52
- package/src/demos/examples/data/countries.json +0 -245
- package/src/demos/examples/data/country_names.json +0 -245
- package/src/demos/examples/data/customers_100.json +0 -102
- package/src/demos/examples/data/users.csv +0 -5
- package/src/demos/examples/editor-ng-select.component.ts +0 -38
- package/src/demos/examples/example01.component.html +0 -48
- package/src/demos/examples/example01.component.ts +0 -109
- package/src/demos/examples/example02.component.html +0 -45
- package/src/demos/examples/example02.component.ts +0 -218
- package/src/demos/examples/example03.component.html +0 -118
- package/src/demos/examples/example03.component.ts +0 -694
- package/src/demos/examples/example04.component.html +0 -87
- package/src/demos/examples/example04.component.ts +0 -326
- package/src/demos/examples/example05.component.html +0 -151
- package/src/demos/examples/example05.component.ts +0 -474
- package/src/demos/examples/example06.component.html +0 -163
- package/src/demos/examples/example06.component.ts +0 -446
- package/src/demos/examples/example07.component.html +0 -56
- package/src/demos/examples/example07.component.scss +0 -10
- package/src/demos/examples/example07.component.ts +0 -216
- package/src/demos/examples/example08.component.html +0 -51
- package/src/demos/examples/example08.component.scss +0 -23
- package/src/demos/examples/example08.component.ts +0 -195
- package/src/demos/examples/example09.component.html +0 -55
- package/src/demos/examples/example09.component.scss +0 -22
- package/src/demos/examples/example09.component.ts +0 -302
- package/src/demos/examples/example10.component.html +0 -103
- package/src/demos/examples/example10.component.ts +0 -309
- package/src/demos/examples/example11.component.html +0 -91
- package/src/demos/examples/example11.component.ts +0 -276
- package/src/demos/examples/example12.component.html +0 -98
- package/src/demos/examples/example12.component.ts +0 -317
- package/src/demos/examples/example13.component.html +0 -96
- package/src/demos/examples/example13.component.ts +0 -370
- package/src/demos/examples/example14.component.html +0 -50
- package/src/demos/examples/example14.component.scss +0 -11
- package/src/demos/examples/example14.component.ts +0 -156
- package/src/demos/examples/example15.component.html +0 -56
- package/src/demos/examples/example15.component.ts +0 -304
- package/src/demos/examples/example16.component.html +0 -77
- package/src/demos/examples/example16.component.ts +0 -277
- package/src/demos/examples/example17.component.html +0 -50
- package/src/demos/examples/example17.component.ts +0 -109
- package/src/demos/examples/example18.component.html +0 -132
- package/src/demos/examples/example18.component.ts +0 -445
- package/src/demos/examples/example19-rowdetail.component.html +0 -40
- package/src/demos/examples/example19-rowdetail.component.ts +0 -54
- package/src/demos/examples/example19.component.html +0 -79
- package/src/demos/examples/example19.component.ts +0 -316
- package/src/demos/examples/example20.component.html +0 -76
- package/src/demos/examples/example20.component.scss +0 -11
- package/src/demos/examples/example20.component.ts +0 -341
- package/src/demos/examples/example21.component.html +0 -86
- package/src/demos/examples/example21.component.scss +0 -16
- package/src/demos/examples/example21.component.ts +0 -140
- package/src/demos/examples/example22.component.html +0 -41
- package/src/demos/examples/example22.component.ts +0 -117
- package/src/demos/examples/example23.component.html +0 -111
- package/src/demos/examples/example23.component.ts +0 -323
- package/src/demos/examples/example24.component.html +0 -120
- package/src/demos/examples/example24.component.scss +0 -62
- package/src/demos/examples/example24.component.ts +0 -641
- package/src/demos/examples/example25.component.html +0 -60
- package/src/demos/examples/example25.component.scss +0 -8
- package/src/demos/examples/example25.component.ts +0 -255
- package/src/demos/examples/example26.component.html +0 -98
- package/src/demos/examples/example26.component.scss +0 -42
- package/src/demos/examples/example26.component.ts +0 -383
- package/src/demos/examples/example27.component.html +0 -138
- package/src/demos/examples/example27.component.scss +0 -10
- package/src/demos/examples/example27.component.ts +0 -369
- package/src/demos/examples/example28.component.html +0 -143
- package/src/demos/examples/example28.component.scss +0 -54
- package/src/demos/examples/example28.component.ts +0 -453
- package/src/demos/examples/example29.component.html +0 -30
- package/src/demos/examples/example29.component.ts +0 -70
- package/src/demos/examples/example30.component.html +0 -116
- package/src/demos/examples/example30.component.scss +0 -20
- package/src/demos/examples/example30.component.ts +0 -1070
- package/src/demos/examples/example32.component.html +0 -77
- package/src/demos/examples/example32.component.scss +0 -8
- package/src/demos/examples/example32.component.ts +0 -905
- package/src/demos/examples/example33.component.html +0 -50
- package/src/demos/examples/example33.component.scss +0 -46
- package/src/demos/examples/example33.component.ts +0 -571
- package/src/demos/examples/example34.component.html +0 -82
- package/src/demos/examples/example34.component.scss +0 -77
- package/src/demos/examples/example34.component.ts +0 -434
- package/src/demos/examples/example35.component.html +0 -77
- package/src/demos/examples/example35.component.scss +0 -18
- package/src/demos/examples/example35.component.ts +0 -264
- package/src/demos/examples/example36.component.html +0 -56
- package/src/demos/examples/example36.component.scss +0 -26
- package/src/demos/examples/example36.component.ts +0 -504
- package/src/demos/examples/example37.component.html +0 -30
- package/src/demos/examples/example37.component.ts +0 -123
- package/src/demos/examples/example38.component.html +0 -104
- package/src/demos/examples/example38.component.scss +0 -8
- package/src/demos/examples/example38.component.ts +0 -420
- package/src/demos/examples/example39.component.html +0 -112
- package/src/demos/examples/example39.component.scss +0 -8
- package/src/demos/examples/example39.component.ts +0 -371
- package/src/demos/examples/example40.component.html +0 -76
- package/src/demos/examples/example40.component.ts +0 -226
- package/src/demos/examples/example41.component.html +0 -50
- package/src/demos/examples/example41.component.scss +0 -42
- package/src/demos/examples/example41.component.ts +0 -229
- package/src/demos/examples/example42.component.html +0 -47
- package/src/demos/examples/example42.component.ts +0 -203
- package/src/demos/examples/example43.component.html +0 -94
- package/src/demos/examples/example43.component.scss +0 -30
- package/src/demos/examples/example43.component.ts +0 -449
- package/src/demos/examples/example44.component.html +0 -78
- package/src/demos/examples/example44.component.scss +0 -50
- package/src/demos/examples/example44.component.ts +0 -375
- package/src/demos/examples/example45-detail.component.html +0 -15
- package/src/demos/examples/example45-detail.component.ts +0 -97
- package/src/demos/examples/example45.component.html +0 -110
- package/src/demos/examples/example45.component.scss +0 -50
- package/src/demos/examples/example45.component.ts +0 -243
- package/src/demos/examples/filter-ng-select.component.ts +0 -33
- package/src/demos/examples/grid-custom-pager.component.html +0 -60
- package/src/demos/examples/grid-custom-pager.component.scss +0 -57
- package/src/demos/examples/grid-custom-pager.component.ts +0 -107
- package/src/demos/examples/grid-remote.component.html +0 -44
- package/src/demos/examples/grid-remote.component.ts +0 -164
- package/src/demos/examples/home.component.html +0 -39
- package/src/demos/examples/home.component.ts +0 -10
- package/src/demos/examples/jsonp.ts +0 -89
- package/src/demos/examples/rowdetail-preload.component.ts +0 -10
- package/src/demos/examples/swt-common-grid-pagination.component.ts +0 -160
- package/src/demos/examples/swt-common-grid-test.component.html +0 -37
- package/src/demos/examples/swt-common-grid-test.component.ts +0 -214
- package/src/demos/examples/swt-common-grid.component.ts +0 -436
- package/src/demos/examples/swt-logger.service.ts +0 -173
- package/src/demos/examples/utilities.ts +0 -9
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -17
- package/src/library/components/__tests__/angular-slickgrid.component.spec.ts +0 -2638
- package/src/library/components/angular-slickgrid.component.html +0 -5
- package/src/library/components/angular-slickgrid.component.ts +0 -1662
- package/src/library/constants.ts +0 -105
- package/src/library/extensions/__tests__/slickRowDetailView.spec.ts +0 -751
- package/src/library/extensions/index.ts +0 -1
- package/src/library/extensions/slickRowDetailView.ts +0 -395
- package/src/library/global-grid-options.ts +0 -273
- package/src/library/index.ts +0 -11
- package/src/library/models/angularComponentOutput.interface.ts +0 -6
- package/src/library/models/angularGridInstance.interface.ts +0 -76
- package/src/library/models/externalTestingDependencies.interface.ts +0 -37
- package/src/library/models/gridOption.interface.ts +0 -15
- package/src/library/models/index.ts +0 -5
- package/src/library/models/rowDetailView.interface.ts +0 -16
- package/src/library/modules/angular-slickgrid.module.spec.ts +0 -25
- package/src/library/modules/angular-slickgrid.module.ts +0 -27
- package/src/library/services/__tests__/angularUtilService.spec.ts +0 -156
- package/src/library/services/__tests__/container.service.spec.ts +0 -25
- package/src/library/services/__tests__/translater.service.spec.ts +0 -43
- package/src/library/services/__tests__/utilities.spec.ts +0 -22
- package/src/library/services/angularUtil.service.ts +0 -120
- package/src/library/services/container.service.ts +0 -26
- package/src/library/services/index.ts +0 -4
- package/src/library/services/translater.service.ts +0 -38
- package/src/library/services/utilities.ts +0 -19
- package/src/library/slickgrid-config.ts +0 -10
- package/src/main.ts +0 -13
- package/src/public_api.ts +0 -1
- package/src/styles.scss +0 -178
- package/test/cypress/e2e/example01.cy.ts +0 -367
- package/test/cypress/e2e/example02.cy.ts +0 -60
- package/test/cypress/e2e/example03.cy.ts +0 -268
- package/test/cypress/e2e/example04.cy.ts +0 -254
- package/test/cypress/e2e/example05.cy.ts +0 -804
- package/test/cypress/e2e/example06.cy.ts +0 -890
- package/test/cypress/e2e/example07.cy.ts +0 -384
- package/test/cypress/e2e/example08.cy.ts +0 -190
- package/test/cypress/e2e/example09.cy.ts +0 -392
- package/test/cypress/e2e/example10.cy.ts +0 -650
- package/test/cypress/e2e/example11.cy.ts +0 -86
- package/test/cypress/e2e/example12.cy.ts +0 -269
- package/test/cypress/e2e/example13.cy.ts +0 -246
- package/test/cypress/e2e/example14.cy.ts +0 -122
- package/test/cypress/e2e/example15.cy.ts +0 -598
- package/test/cypress/e2e/example16.cy.ts +0 -427
- package/test/cypress/e2e/example17.cy.ts +0 -83
- package/test/cypress/e2e/example18.cy.ts +0 -431
- package/test/cypress/e2e/example19.cy.ts +0 -263
- package/test/cypress/e2e/example20.cy.ts +0 -264
- package/test/cypress/e2e/example21.cy.ts +0 -77
- package/test/cypress/e2e/example22.cy.ts +0 -94
- package/test/cypress/e2e/example23.cy.ts +0 -259
- package/test/cypress/e2e/example24.cy.ts +0 -707
- package/test/cypress/e2e/example25.cy.ts +0 -193
- package/test/cypress/e2e/example26.cy.ts +0 -111
- package/test/cypress/e2e/example27.cy.ts +0 -261
- package/test/cypress/e2e/example28.cy.ts +0 -740
- package/test/cypress/e2e/example29.cy.ts +0 -30
- package/test/cypress/e2e/example30.cy.ts +0 -757
- package/test/cypress/e2e/example31.cy.ts +0 -69
- package/test/cypress/e2e/example32.cy.ts +0 -272
- package/test/cypress/e2e/example33.cy.ts +0 -278
- package/test/cypress/e2e/example34.cy.ts +0 -84
- package/test/cypress/e2e/example35.cy.ts +0 -178
- package/test/cypress/e2e/example36.cy.ts +0 -219
- package/test/cypress/e2e/example37.cy.ts +0 -52
- package/test/cypress/e2e/example38.cy.ts +0 -160
- package/test/cypress/e2e/example39.cy.ts +0 -150
- package/test/cypress/e2e/example40.cy.ts +0 -126
- package/test/cypress/e2e/example41.cy.ts +0 -90
- package/test/cypress/e2e/example42.cy.ts +0 -82
- package/test/cypress/e2e/example43.cy.ts +0 -482
- package/test/cypress/e2e/example44.cy.ts +0 -458
- package/test/cypress/e2e/example45.cy.ts +0 -455
- package/test/cypress/e2e/home.cy.ts +0 -7
- package/test/cypress/fixtures/example.json +0 -5
- package/test/cypress/plugins/index.ts +0 -17
- package/test/cypress/plugins/utilities.ts +0 -28
- package/test/cypress/support/commands.ts +0 -88
- package/test/cypress/support/common.ts +0 -47
- package/test/cypress/support/drag.ts +0 -101
- package/test/cypress/support/index.ts +0 -20
- package/test/cypress/tsconfig.json +0 -9
- package/test/cypress.config.ts +0 -34
- package/test/mockSlickEvent.ts +0 -77
- package/test/rxjsResourceStub.ts +0 -69
- package/test/test-setup.ts +0 -6
- package/test/translateServiceStub.ts +0 -230
- package/test/translaterServiceStub.ts +0 -239
- package/test/tsconfig.json +0 -17
- package/test/vitest-global-mocks.ts +0 -41
- package/test/vitest-global-setup.ts +0 -3
- package/test/vitest-pretest.ts +0 -5
- package/tsconfig.app.json +0 -14
- package/tsconfig.json +0 -31
- package/tsconfig.spec.json +0 -11
- package/types/sortablejs.d.ts +0 -4
- package/vite.config.mts +0 -51
- /package/{dist/fesm2022 → fesm2022}/angular-slickgrid.mjs.map +0 -0
- /package/{dist/i18n → i18n}/en.json +0 -0
- /package/{dist/i18n → i18n}/fr.json +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/library → library}/components/angular-slickgrid.component.d.ts +0 -0
- /package/{dist/library → library}/constants.d.ts +0 -0
- /package/{dist/library → library}/extensions/index.d.ts +0 -0
- /package/{dist/library → library}/extensions/slickRowDetailView.d.ts +0 -0
- /package/{dist/library → library}/global-grid-options.d.ts +0 -0
- /package/{dist/library → library}/index.d.ts +0 -0
- /package/{dist/library → library}/models/angularComponentOutput.interface.d.ts +0 -0
- /package/{dist/library → library}/models/angularGridInstance.interface.d.ts +0 -0
- /package/{dist/library → library}/models/externalTestingDependencies.interface.d.ts +0 -0
- /package/{dist/library → library}/models/gridOption.interface.d.ts +0 -0
- /package/{dist/library → library}/models/index.d.ts +0 -0
- /package/{dist/library → library}/models/rowDetailView.interface.d.ts +0 -0
- /package/{dist/library → library}/modules/angular-slickgrid.module.d.ts +0 -0
- /package/{dist/library → library}/services/angularUtil.service.d.ts +0 -0
- /package/{dist/library → library}/services/container.service.d.ts +0 -0
- /package/{dist/library → library}/services/index.d.ts +0 -0
- /package/{dist/library → library}/services/translater.service.d.ts +0 -0
- /package/{dist/library → library}/services/utilities.d.ts +0 -0
- /package/{dist/library → library}/slickgrid-config.d.ts +0 -0
- /package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
### Why use ngx-translate and not i18n?
|
|
2
|
-
We use `ngx-translate` because the `i18n` from Angular core is yet to support dynamic translation (without reloading the page) which is a must for our project. However it is ~~suppose to land in Angular `6.x`~~ (still postponed) as the `ngx-translate` author wrote [here](https://github.com/ngx-translate/core/issues/495#issuecomment-325570932), he is also 1 of the guy working on implementing it in the Angular core. When the `i18n` Service supports dynamic translation, I will revisit this implementation but in the mean time we will stick with `ngx-translate`.
|
|
3
|
-
|
|
4
|
-
### Demo
|
|
5
|
-
[Demo Page](https://ghiscoding.github.io/Angular-Slickgrid/#/localization) / [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-localization.component.ts) / [Translation Files](https://github.com/ghiscoding/angular-slickgrid/blob/master/src/assets/i18n)
|
|
6
|
-
|
|
7
|
-
#### ngx-translate setup
|
|
8
|
-
[Demo Component](https://github.com/ghiscoding/angular-slickgrid/blob/master/src/app)
|
|
9
|
-
|
|
10
|
-
### Angular Versions
|
|
11
|
-
##### Angular 7
|
|
12
|
-
Angular 7 should be fine with current dependencies in the lib, they are set at `@ngx-translate/core` version `11.x` and `@ngx-translate/http-loader` at version `4.x`
|
|
13
|
-
|
|
14
|
-
##### Angular 4-5-6
|
|
15
|
-
Use `@ngx-translate/core` version `9.x` for Angular 4-5 and version `10.x` for Angular 6. While `@ngx-translate/http-loader` has version `2.x` for Angular 4-5 and version `3.x` for Angular 6.
|
|
16
|
-
```
|
|
17
|
-
npm install @ngx-translate/core@9.1.1 # change to the version that works for you
|
|
18
|
-
npm install @ngx-translate/http-loader@2.0.0 # change to the version that works for you
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Minimal installation (~even if you are not using any other locales~)
|
|
22
|
-
~#### If you are only using 1 locale, you still need to import/configure `ngx-translate` to use `Angular-Slickgrid`~
|
|
23
|
-
~Since `ngx-translate` is now a dependency of `Angular-Slickgrid`, you will need to add `ngx-translate` to your bundle and import/configure it in your App Module. The minimum setup is the following:~
|
|
24
|
-
|
|
25
|
-
Actually, this is no longer true, if you use only 1 locale, you can now disregard `ngx-translate` completely, head over to the new [Wiki - Providing Custom Locale](Localization-with-Custom-Locales.md). But if you still wish to install the minimum installation to get `ngx-translate` then continue the reading.
|
|
26
|
-
|
|
27
|
-
##### Install NPM package
|
|
28
|
-
```typescript
|
|
29
|
-
npm install @ngx-translate/core
|
|
30
|
-
```
|
|
31
|
-
##### App Module
|
|
32
|
-
```typescript
|
|
33
|
-
import { NgModule } from '@angular/core';
|
|
34
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
35
|
-
import { AngularSlickgridModule } from 'angular-slickgrid';
|
|
36
|
-
|
|
37
|
-
@NgModule({
|
|
38
|
-
declarations: [
|
|
39
|
-
AppComponent
|
|
40
|
-
],
|
|
41
|
-
imports: [
|
|
42
|
-
BrowserModule,
|
|
43
|
-
TranslateModule.forRoot()
|
|
44
|
-
],
|
|
45
|
-
providers: [],
|
|
46
|
-
bootstrap: [AppComponent]
|
|
47
|
-
})
|
|
48
|
-
export class AppModule { }
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Regular Installation
|
|
52
|
-
#### NPM
|
|
53
|
-
You need to make sure that you have `@ngx-translate/core` installed. Then optionally, you will need a loader, the most recommended one is `@ngx-translate/http-loader`. For more installation and usage information, you can visit the official [ngx-translate site](https://github.com/ngx-translate/core#installation)
|
|
54
|
-
```bash
|
|
55
|
-
npm install @ngx-translate/core @ngx-translate/http-loader
|
|
56
|
-
|
|
57
|
-
## OR with yarn
|
|
58
|
-
yarn add @ngx-translate/core @ngx-translate/http-loader
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
#### App initializer (optional)
|
|
62
|
-
If you use the recommended `http-loader`, you might encounter some async problem with `Angular-Slickgrid`. The reason is simple, `SlickGrid` is a `jQuery` lib and it's Formatters and everything else needs to return data instantly (not asynchronously) and `Angular-Slickgrid` uses the `.instant(key)` function and the data must be loaded prior to performing the `.instant()`. So to avoid such async problem, it is recommended to use an App Initializer as documented [here](https://github.com/ngx-translate/core/issues/517#issuecomment-299637956), this will make sure that you will start loading the page once all the translation data is ready.
|
|
63
|
-
|
|
64
|
-
#### App Module
|
|
65
|
-
As mentioned in previous paragraph, you can choose multiple type of loader. However, if you choose the recommended `http-loader` and the `App Initializer` describe earlier, then your App module should have something along these lines
|
|
66
|
-
```typescript
|
|
67
|
-
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
68
|
-
import { Injector, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
69
|
-
import { LOCATION_INITIALIZED } from '@angular/common';
|
|
70
|
-
import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';
|
|
71
|
-
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
72
|
-
|
|
73
|
-
// AoT requires an exported function for factories
|
|
74
|
-
export function createTranslateLoader(http: HttpClient) {
|
|
75
|
-
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// use an Initializer Factory as describe here: https://github.com/ngx-translate/core/issues/517#issuecomment-299637956
|
|
79
|
-
export function appInitializerFactory(translate: TranslateService, injector: Injector) {
|
|
80
|
-
return () => new Promise<any>((resolve: any) => {
|
|
81
|
-
const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
|
|
82
|
-
locationInitialized.then(() => {
|
|
83
|
-
const langToSet = 'en';
|
|
84
|
-
translate.setDefaultLang('en');
|
|
85
|
-
translate.use(langToSet).subscribe(() => {
|
|
86
|
-
// console.info(`Successfully initialized '${langToSet}' language.'`);
|
|
87
|
-
}, err => {
|
|
88
|
-
console.error(`Problem with '${langToSet}' language initialization.'`);
|
|
89
|
-
}, () => {
|
|
90
|
-
resolve(null);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
@NgModule({
|
|
97
|
-
declarations: [
|
|
98
|
-
AppComponent
|
|
99
|
-
],
|
|
100
|
-
imports: [
|
|
101
|
-
BrowserModule,
|
|
102
|
-
HttpClientModule,
|
|
103
|
-
TranslateModule.forRoot({
|
|
104
|
-
loader: {
|
|
105
|
-
provide: TranslateLoader,
|
|
106
|
-
useFactory: (createTranslateLoader),
|
|
107
|
-
deps: [HttpClient]
|
|
108
|
-
}
|
|
109
|
-
})
|
|
110
|
-
],
|
|
111
|
-
providers: [
|
|
112
|
-
{
|
|
113
|
-
provide: APP_INITIALIZER,
|
|
114
|
-
useFactory: appInitializerFactory,
|
|
115
|
-
deps: [TranslateService, Injector],
|
|
116
|
-
multi: true
|
|
117
|
-
},
|
|
118
|
-
GridOdataService,
|
|
119
|
-
ResizerService
|
|
120
|
-
],
|
|
121
|
-
bootstrap: [AppComponent]
|
|
122
|
-
})
|
|
123
|
-
export class AppModule { }
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
#### Angular 7
|
|
127
|
-
The new updated version of `ng-packagr` use strict metadata and you might get errors about `Lambda not supported`, to bypass this problem you can add the `@dynamic` over the `@NgModule` as so:
|
|
128
|
-
```ts
|
|
129
|
-
// @dynamic
|
|
130
|
-
@NgModule({
|
|
131
|
-
...
|
|
132
|
-
})
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
#### Locales
|
|
136
|
-
The final step is that you need the actual translations. Note that `ngx-translate` does not support multiple files, with that in mind see below for the following options that you have.
|
|
137
|
-
1. Manually copy the translation keys/values
|
|
138
|
-
2. Manually copy the JSON files to your `src/assets` folder
|
|
139
|
-
2. Modify `angular-cli.json` to copy the JSON files to your `src/assets` folder.
|
|
140
|
-
- I tried following these [instructions](https://github.com/angular/angular-cli/issues/3555#issuecomment-351772402) but that didn't work
|
|
141
|
-
3. Modify your `package.json` and add a script to copy the JSON files to your `src/assets` folder
|
|
142
|
-
- install NPM packages `cross-env` and `copyfiles`
|
|
143
|
-
- add a new script in your `package.json`
|
|
144
|
-
- run the below script **once** with `npm run copy:i18n` and you should now have the JSON files in your `src/assets` folder
|
|
145
|
-
```typescript
|
|
146
|
-
"copy:i18n": "cross-env copyfiles -f node_modules/angular-slickgrid/i18n/*.json src/assets/i18n"
|
|
147
|
-
```
|
|
148
|
-
If you want to manually re-create the translation in your own files, the list of translations that you will need are displayed in the [asset i18n](https://github.com/ghiscoding/angular-slickgrid/tree/master/src/assets/i18n) translation folder (from that file, you need all translations shown before the 'BILLING', the next few ones are for the demo page only)
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
### Services
|
|
2
|
-
- Angular-Slickgrid Services are no longer Singleton and are no longer available as Dependency Injection (DI) anymore, they are instead available in the Angular Grid Instance that can be obtained by the `onAngularGridCreated` Event Emitter (see [below](#onangulargridcreated-instance))
|
|
3
|
-
- **this is the biggest change, so please make sure to review the [code sample below](#onangulargridcreated-instance)**
|
|
4
|
-
|
|
5
|
-
- Event Emitter `(onGridStateServiceChanged)` renamed to `(onGridStateChanged)`
|
|
6
|
-
- `GridExtraUtil` no longer exist, it was containing only 1 function `getColumnDefinitionAndData()` that got moved into the `GridService` and renamed to `getColumnFromEventArguments`
|
|
7
|
-
|
|
8
|
-
### Slick Grid & DataView objects
|
|
9
|
-
The Event Emitters `(onGridCreated)` and `(onDataviewCreated)` still exists but it is now much easier to get the Slick Grid & DataView objects directly from the `(onAngularGridCreated)` Event Emitter (it's an all in 1 emitter that includes Slick objects and Angular-Slickgrid Services)
|
|
10
|
-
- see [below](#onangulargridcreated-instance)
|
|
11
|
-
|
|
12
|
-
### Column Definitions
|
|
13
|
-
- Column Definition `onCellClick` and `onCellChange` function signatures changed to be more in line with SlickGrid subscribed events and also to provide a way to stop event bubbling if user needs that
|
|
14
|
-
- both functions now have 2 arguments e.g.: `onCellChange?: (e: Event, args: OnEventArgs) => void;`, see full example [below](#column-definition-events)
|
|
15
|
-
- all the Editors options were previously passed through the generic `params` property. However this which removes the benefit of intellisense (VScode) and TypeScript Type check, so all of these options got moved into the `editor` options (see below)
|
|
16
|
-
|
|
17
|
-
### Grid Options
|
|
18
|
-
- For consistencies, all **Grid Menu** and **Header Menu** `showX` flags were renamed to `hideX` to align with some of the SlickGrid `hideX` (see [below](#grid-menu-showx-renamed-to-hidex))
|
|
19
|
-
- `exportWithFormatter` is no longer available directly in the Grid Options, it is now under `exportOptions` Grid Options (see [below](#exportwithformatter-flag))
|
|
20
|
-
- `i18n` is now a Grid Options which is easier to deal with instead of using the generic `params` (see [below](#i18n-now-directly-in-grid-options))
|
|
21
|
-
|
|
22
|
-
### Editors
|
|
23
|
-
- all the Editors options were previously passed through the generic `params` property. However this was removing the benefit of intellisense (VScode) and TypeScript Type checking. We moved all of these options into the `editor` that is now a complex object
|
|
24
|
-
- the Grid Option `editor` is now a complex object with the same structure as the `filter` Grid Option. This also mean that all the arguments that were previously passed to the generic `params` are now passed in the `editor` with `model` property
|
|
25
|
-
- this also brings TypeScript types and intellisense to `collection`, `collectionFilterBy` and `collectionSortBy`
|
|
26
|
-
- Custom Editor is now also supported
|
|
27
|
-
- see code change [below](#editor-new-structure)
|
|
28
|
-
|
|
29
|
-
### Filters
|
|
30
|
-
- Select Filter (`FilterType.select`) with `selectOptions` got renamed to `collection`
|
|
31
|
-
- previously we had `searchTerms` (array) and `searchTerm` (singular), but the latter `searchTerm` was dropped in favor of using **only** `searchTerms` to remove duplicate logic code.
|
|
32
|
-
- `FilterType` got removed and you can now use directly `Filters`, also to emphasis the change we renamed the `filter` property `type` to `model`
|
|
33
|
-
- see example [below](#filter-new-structure)
|
|
34
|
-
|
|
35
|
-
### Backend Service API
|
|
36
|
-
- For `BackendServiceApi`, the `service` property now as to contain a `new` instance of the Backend Service that you want to use (`GraphqlService` or `GridOdataService`). See explanation [below](#backend-service-api---service-with-new)
|
|
37
|
-
- All 3 `onX` service methods were renamed to `processOnX` to remove confusion with `onX` Event Emitters with the same names. (see [below](#backend-service-onx-methods-renamed-to-processonx))
|
|
38
|
-
- this will probably **not** concern you, unless you built your own custom Backend Service API
|
|
39
|
-
- `BackendService` method `initOptions` got removed and replaced by `init` which has a different argument signature
|
|
40
|
-
|
|
41
|
-
### @deprecated code removed
|
|
42
|
-
- removed `onBackendEventApi` which was replaced by `backendServiceApi`
|
|
43
|
-
- removed Select Filter `selectOptions`, replaced by `collection`
|
|
44
|
-
- removed `FormElementType` which was replaced by `FilterType`
|
|
45
|
-
- removed `initOptions` function from `backendServiceApi`, which was replaced by `init` with a different signature
|
|
46
|
-
- remove `GridExtraUtil` Service
|
|
47
|
-
|
|
48
|
-
# Code Refactoring Samples & Other Explanations
|
|
49
|
-
### `onAngularGridCreated` instance
|
|
50
|
-
This new instance will contain all the Angular-Slickgrid Services (that were previously available as DI). As you can see below, you simply need to remove all DI and get a reference of the service you want through the `AngularGridInstance`
|
|
51
|
-
|
|
52
|
-
##### `AngularGridInstance` interface
|
|
53
|
-
**Note:**
|
|
54
|
-
- `GridExtraService` is now exported as `GridService`
|
|
55
|
-
- `GroupingAndColspanService` is now exported as `GroupingService`
|
|
56
|
-
- `ControlAndPluginService` is now exported as `PluginService`
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
export interface AngularGridInstance {
|
|
60
|
-
// Slick Grid & DataView objects
|
|
61
|
-
dataView: any;
|
|
62
|
-
slickGrid: any;
|
|
63
|
-
|
|
64
|
-
// Services
|
|
65
|
-
backendService?: BackendService;
|
|
66
|
-
pluginService: ControlAndPluginService;
|
|
67
|
-
exportService: ExportService;
|
|
68
|
-
filterService: FilterService;
|
|
69
|
-
gridService: GridService;
|
|
70
|
-
gridEventService: GridEventService;
|
|
71
|
-
gridStateService: GridStateService;
|
|
72
|
-
groupingService: GroupingAndColspanService;
|
|
73
|
-
resizerService: ResizerService;
|
|
74
|
-
sortService: SortService;
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
##### code change
|
|
79
|
-
###### View
|
|
80
|
-
```diff
|
|
81
|
-
<angular-slickgrid gridId="grid1"
|
|
82
|
-
[columnDefinitions]="columnDefinitions"
|
|
83
|
-
[gridOptions]="gridOptions"
|
|
84
|
-
[dataset]="dataset"
|
|
85
|
-
+ (onAngularGridCreated)="angularGridReady($event)">
|
|
86
|
-
</angular-slickgrid>
|
|
87
|
-
```
|
|
88
|
-
```diff
|
|
89
|
-
export class MyGridDemo implements OnInit {
|
|
90
|
-
+ angularGrid: AngularGridInstance;
|
|
91
|
-
columnDefinitions: Column[];
|
|
92
|
-
gridOptions: GridOption;
|
|
93
|
-
dataset: any[];
|
|
94
|
-
|
|
95
|
-
- constructor(private GridExtraService) {}
|
|
96
|
-
|
|
97
|
-
+ angularGridReady(angularGrid: AngularGridInstance) {
|
|
98
|
-
+ this.angularGrid = angularGrid;
|
|
99
|
-
|
|
100
|
-
+ // Slick Grid & DataView objects
|
|
101
|
-
+ this.gridObj = angularGrid.slickGrid;
|
|
102
|
-
+ this.dataViewObj = angularGrid.dataView;
|
|
103
|
-
+ }
|
|
104
|
-
|
|
105
|
-
addNewItem() {
|
|
106
|
-
const newItem = {
|
|
107
|
-
id: newId,
|
|
108
|
-
title: 'Task ' + newId,
|
|
109
|
-
effortDriven: true,
|
|
110
|
-
// ...
|
|
111
|
-
};
|
|
112
|
-
- this.gridExtraService.addItemToDatagrid(newItem);
|
|
113
|
-
+ this.angularGrid.gridService.addItemToDatagrid(newItem);
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Backend Service API - service with `new`
|
|
118
|
-
```diff
|
|
119
|
-
export class MyGrid {
|
|
120
|
-
- constructor(private graphqlService: GraphqlService, private i18n: I18N) {
|
|
121
|
-
+ constructor(private i18n: I18N) {
|
|
122
|
-
}
|
|
123
|
-
this.gridOptions = {
|
|
124
|
-
backendServiceApi: {
|
|
125
|
-
- service: this.graphqlService,
|
|
126
|
-
+ service: new GraphqlService(),
|
|
127
|
-
preProcess: () => this.displaySpinner(true),
|
|
128
|
-
process: (query) => this.getCustomerApiCall(query),
|
|
129
|
-
postProcess: (result: GraphqlResult) => this.displaySpinner(false)
|
|
130
|
-
},
|
|
131
|
-
params: {
|
|
132
|
-
i18: this.translate
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### `exportWithFormatter` flag
|
|
138
|
-
|
|
139
|
-
Previously available directly in the grid options but is now accessible **only** from the `exportOptions` property. Also worth to know that the `exportOptions` contains much more options, you can see the `exportOptions` interface [here](https://github.com/ghiscoding/angular-slickgrid/blob/master/src/app/modules/angular-slickgrid/models/exportOption.interface.ts).
|
|
140
|
-
|
|
141
|
-
```diff
|
|
142
|
-
this.gridOptions = {
|
|
143
|
-
- exportWithFormatter: true
|
|
144
|
-
exportOptions: {
|
|
145
|
-
+ exportWithFormatter: false,
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### `i18n` now directly in Grid Options
|
|
151
|
-
```diff
|
|
152
|
-
this.gridOptions = {
|
|
153
|
-
enableTranslate: true,
|
|
154
|
-
- params: {
|
|
155
|
-
- i18n: this.translate
|
|
156
|
-
- },
|
|
157
|
-
+ i18n: this.translate,
|
|
158
|
-
};
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### `editor` new structure
|
|
162
|
-
```diff
|
|
163
|
-
import { Column, Editors, GridOption } from 'angular-slickgrid';
|
|
164
|
-
|
|
165
|
-
this.columnDefinitions = [
|
|
166
|
-
{
|
|
167
|
-
id: 'title', name: 'Title', field: 'title',
|
|
168
|
-
type: FieldType.string,
|
|
169
|
-
- editor: Editors.longText,
|
|
170
|
-
+ editor: {
|
|
171
|
-
+ model: Editors.longText
|
|
172
|
-
+ },
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
id: 'title2', name: 'Title, Custom Editor', field: 'title',
|
|
176
|
-
type: FieldType.string,
|
|
177
|
-
+ editor: {
|
|
178
|
-
// new CUSTOM EDITOR added
|
|
179
|
-
+ model: CustomInputEditor // no need to instantiate it
|
|
180
|
-
+ },
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
id: 'prerequisites', name: 'Prerequisites', field: 'prerequisites',
|
|
184
|
-
type: FieldType.string,
|
|
185
|
-
- editor: Editors.multipleSelect,
|
|
186
|
-
+ editor: {
|
|
187
|
-
+ model: Editors.multipleSelect,
|
|
188
|
-
+ collection: Array.from(Array(12).keys()).map(k => ({ value: `Task ${k}`, label: `Task ${k}` })),
|
|
189
|
-
+ collectionSortBy: {
|
|
190
|
-
+ property: 'label',
|
|
191
|
-
+ sortDesc: true
|
|
192
|
-
+ },
|
|
193
|
-
+ collectionFilterBy: {
|
|
194
|
-
+ property: 'label',
|
|
195
|
-
+ value: 'Task 2'
|
|
196
|
-
+ }
|
|
197
|
-
+ },
|
|
198
|
-
- params: {
|
|
199
|
-
- collection: Array.from(Array(12).keys()).map(k => ({ value: `Task ${k}`, label: `Task ${k}` })),
|
|
200
|
-
- collectionSortBy: {
|
|
201
|
-
- property: 'label',
|
|
202
|
-
- sortDesc: true
|
|
203
|
-
- },
|
|
204
|
-
- collectionFilterBy: {
|
|
205
|
-
- property: 'label',
|
|
206
|
-
- value: 'Task 2'
|
|
207
|
-
- }
|
|
208
|
-
- }
|
|
209
|
-
}
|
|
210
|
-
];
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### `filter` new structure
|
|
214
|
-
- `selectOptions` renamed to `collection`
|
|
215
|
-
- `FilterType` replaced by `Filters`
|
|
216
|
-
- `type` renamed to `model`
|
|
217
|
-
- `searchTerm` removed in favor of an array of `searchTerms`
|
|
218
|
-
- Custom Filter is now much simpler, just pass a new instance of your class
|
|
219
|
-
|
|
220
|
-
```diff
|
|
221
|
-
- import { Column, FilterType } from 'angular-slickgrid';
|
|
222
|
-
+ import { Column, Filters } from 'angular-slickgrid';
|
|
223
|
-
|
|
224
|
-
// column definitions
|
|
225
|
-
this.columnDefinitions = [
|
|
226
|
-
{
|
|
227
|
-
id: 'isActive', name: 'Is Active', field: 'isActive',
|
|
228
|
-
type: FieldType.boolean,
|
|
229
|
-
filterable: true,
|
|
230
|
-
filter: {
|
|
231
|
-
- selectOptions: [ { value: '', label: '' }, { value: true, label: 'true' }, { value: false, label: 'false' } ],
|
|
232
|
-
+ collection: [ { value: '', label: '' }, { value: true, label: 'true' }, { value: false, label: 'false' } ],
|
|
233
|
-
- type: FilterType.multipleSelect,
|
|
234
|
-
+ model: Filters.multipleSelect,
|
|
235
|
-
searchTerms: [], // default selection
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
id: 'description', name: 'Description', field: 'description',
|
|
240
|
-
filter: {
|
|
241
|
-
- type: FilterType.custom,
|
|
242
|
-
- customFilter: CustomInputFilter
|
|
243
|
-
+ model: CustomInputFilter // create a new instance to make each Filter independent from each other
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
id: 'isActive', name: 'Is Active', field: 'isActive',
|
|
248
|
-
type: FieldType.boolean,
|
|
249
|
-
filterable: true,
|
|
250
|
-
filter: {
|
|
251
|
-
collection: [ { value: '', label: '' }, { value: true, label: 'true' }, { value: false, label: 'false' } ],
|
|
252
|
-
type: FilterType.multipleSelect,
|
|
253
|
-
- searchTerm: true, // default selection
|
|
254
|
-
+ searchTerms: [true], // default selection
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
];
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Column Definition Events
|
|
261
|
-
`onCellChange` and `onCellClick` now expose Event as the 1st argument to be in line with SlickGrid subscribed event
|
|
262
|
-
```diff
|
|
263
|
-
this.columnDefinitions = [{
|
|
264
|
-
id: 'delete',
|
|
265
|
-
field: 'id',
|
|
266
|
-
formatter: Formatters.deleteIcon,
|
|
267
|
-
- onCellClick: (args: OnEventArgs) => {
|
|
268
|
-
+ onCellClick: (e: Event, args: OnEventArgs) => {
|
|
269
|
-
alert(`Deleting: ${args.dataContext.title}`);
|
|
270
|
-
+ e.stopImmediatePropagation(); // you can stop event bubbling if you wish
|
|
271
|
-
}
|
|
272
|
-
}, {
|
|
273
|
-
id: 'title',
|
|
274
|
-
name: 'Title',
|
|
275
|
-
field: 'title',
|
|
276
|
-
- onCellChange: (args: OnEventArgs) => {
|
|
277
|
-
+ onCellChange: (e: Event, args: OnEventArgs) => {
|
|
278
|
-
alert(`Updated Title: ${args.dataContext.title}`);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
];
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### Grid Menu `showX` renamed to `hideX`
|
|
285
|
-
Since these flags are now inverse, please do not forget to also inverse your `boolean` value.
|
|
286
|
-
|
|
287
|
-
Here is the entire list of Grid Menu
|
|
288
|
-
- `showClearAllFiltersCommand` renamed to `hideClearAllFiltersCommand`
|
|
289
|
-
- `showClearAllSortingCommand` renamed to `hideClearAllSortingCommand`
|
|
290
|
-
- `showExportCsvCommand` renamed to `hideExportCsvCommand`
|
|
291
|
-
- `showExportTextDelimitedCommand` renamed to `hideExportTextDelimitedCommand`
|
|
292
|
-
- `showRefreshDatasetCommand` renamed to `hideRefreshDatasetCommand`
|
|
293
|
-
- `showToggleFilterCommand` renamed to `hideToggleFilterCommand`
|
|
294
|
-
|
|
295
|
-
and here is the list for Header Menu
|
|
296
|
-
showColumnHideCommand
|
|
297
|
-
- `showColumnHideCommand` renamed to `hideColumnHideCommand`
|
|
298
|
-
- `showSortCommands` renamed to `hideSortCommands`
|
|
299
|
-
|
|
300
|
-
### Backend Service `onX` methods renamed to `processOnX`
|
|
301
|
-
Here is the entire list
|
|
302
|
-
- `onFilterChanged` was renamed to `processOnFilterChanged`
|
|
303
|
-
- `onPaginationChanged` was renamed to `processOnPaginationChanged`
|
|
304
|
-
- `onSortChanged` was renamed to `processOnSortChanged`
|