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,341 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
AngularGridInstance,
|
|
4
|
-
Column,
|
|
5
|
-
ColumnEditorDualInput,
|
|
6
|
-
Editors,
|
|
7
|
-
formatNumber,
|
|
8
|
-
Formatters,
|
|
9
|
-
Filters,
|
|
10
|
-
GridOption,
|
|
11
|
-
SlickEventHandler,
|
|
12
|
-
} from '../../library';
|
|
13
|
-
|
|
14
|
-
@Component({
|
|
15
|
-
templateUrl: './example20.component.html',
|
|
16
|
-
styleUrls: ['./example20.component.scss'],
|
|
17
|
-
encapsulation: ViewEncapsulation.None,
|
|
18
|
-
standalone: false,
|
|
19
|
-
})
|
|
20
|
-
export class Example20Component implements OnInit, OnDestroy {
|
|
21
|
-
angularGrid!: AngularGridInstance;
|
|
22
|
-
columnDefinitions!: Column[];
|
|
23
|
-
gridOptions!: GridOption;
|
|
24
|
-
dataset!: any[];
|
|
25
|
-
frozenColumnCount = 2;
|
|
26
|
-
frozenRowCount = 3;
|
|
27
|
-
isFrozenBottom = false;
|
|
28
|
-
gridObj: any;
|
|
29
|
-
slickEventHandler: any;
|
|
30
|
-
|
|
31
|
-
constructor() {
|
|
32
|
-
this.slickEventHandler = new SlickEventHandler();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
ngOnInit(): void {
|
|
36
|
-
this.prepareDataGrid();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
ngOnDestroy() {
|
|
40
|
-
// unsubscribe all SlickGrid events
|
|
41
|
-
this.slickEventHandler.unsubscribeAll();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
45
|
-
this.angularGrid = angularGrid;
|
|
46
|
-
this.gridObj = angularGrid.slickGrid;
|
|
47
|
-
|
|
48
|
-
// with frozen (pinned) grid, in order to see the entire row being highlighted when hovering
|
|
49
|
-
// we need to do some extra tricks (that is because frozen grids use 2 separate div containers)
|
|
50
|
-
// the trick is to use row selection to highlight when hovering current row and remove selection once we're not
|
|
51
|
-
this.slickEventHandler.subscribe(this.gridObj.onMouseEnter, (event: Event) => this.colorizeHoveringRow(event, true));
|
|
52
|
-
this.slickEventHandler.subscribe(this.gridObj.onMouseLeave, (event: Event) => this.colorizeHoveringRow(event, false));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
colorizeHoveringRow(event: Event, isMouseEnter: boolean) {
|
|
56
|
-
const cell = this.gridObj.getCellFromEvent(event);
|
|
57
|
-
const rows = isMouseEnter ? [cell?.row ?? 0] : [];
|
|
58
|
-
this.gridObj.setSelectedRows(rows); // highlight current row
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
prepareDataGrid() {
|
|
63
|
-
this.columnDefinitions = [
|
|
64
|
-
{
|
|
65
|
-
id: 'sel',
|
|
66
|
-
name: '#',
|
|
67
|
-
field: 'id',
|
|
68
|
-
minWidth: 40,
|
|
69
|
-
width: 40,
|
|
70
|
-
maxWidth: 40,
|
|
71
|
-
cannotTriggerInsert: true,
|
|
72
|
-
resizable: false,
|
|
73
|
-
unselectable: true,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
id: 'title',
|
|
77
|
-
name: 'Title',
|
|
78
|
-
field: 'title',
|
|
79
|
-
minWidth: 100,
|
|
80
|
-
width: 120,
|
|
81
|
-
filterable: true,
|
|
82
|
-
sortable: true,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 'percentComplete',
|
|
86
|
-
name: '% Complete',
|
|
87
|
-
field: 'percentComplete',
|
|
88
|
-
resizable: false,
|
|
89
|
-
minWidth: 130,
|
|
90
|
-
width: 140,
|
|
91
|
-
formatter: Formatters.percentCompleteBar,
|
|
92
|
-
type: 'number',
|
|
93
|
-
filterable: true,
|
|
94
|
-
filter: { model: Filters.slider, operator: '>=' },
|
|
95
|
-
sortable: true,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 'start',
|
|
99
|
-
name: 'Start',
|
|
100
|
-
field: 'start',
|
|
101
|
-
minWidth: 100,
|
|
102
|
-
width: 120,
|
|
103
|
-
filterable: true,
|
|
104
|
-
sortable: true,
|
|
105
|
-
formatter: Formatters.dateIso,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
id: 'finish',
|
|
109
|
-
name: 'Finish',
|
|
110
|
-
field: 'finish',
|
|
111
|
-
minWidth: 100,
|
|
112
|
-
width: 120,
|
|
113
|
-
filterable: true,
|
|
114
|
-
sortable: true,
|
|
115
|
-
formatter: Formatters.dateIso,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
id: 'cost',
|
|
119
|
-
name: 'Cost | Duration',
|
|
120
|
-
field: 'cost',
|
|
121
|
-
formatter: this.costDurationFormatter.bind(this),
|
|
122
|
-
minWidth: 150,
|
|
123
|
-
width: 170,
|
|
124
|
-
sortable: true,
|
|
125
|
-
// filterable: true,
|
|
126
|
-
filter: {
|
|
127
|
-
model: Filters.compoundSlider,
|
|
128
|
-
},
|
|
129
|
-
editor: {
|
|
130
|
-
model: Editors.dualInput,
|
|
131
|
-
// the DualInputEditor is of Type ColumnEditorDualInput and MUST include (leftInput/rightInput) in its params object
|
|
132
|
-
// in each of these 2 properties, you can pass any regular properties of a column editor
|
|
133
|
-
// and they will be executed following the options defined in each
|
|
134
|
-
params: {
|
|
135
|
-
leftInput: {
|
|
136
|
-
field: 'cost',
|
|
137
|
-
type: 'float',
|
|
138
|
-
decimal: 2,
|
|
139
|
-
minValue: 0,
|
|
140
|
-
maxValue: 50000,
|
|
141
|
-
placeholder: '< 50K',
|
|
142
|
-
errorMessage: 'Cost must be positive and below $50K.',
|
|
143
|
-
},
|
|
144
|
-
rightInput: {
|
|
145
|
-
field: 'duration',
|
|
146
|
-
type: 'float', // you could have 2 different input type as well
|
|
147
|
-
minValue: 0,
|
|
148
|
-
maxValue: 100,
|
|
149
|
-
title: 'make sure Duration is withing its range of 0 to 100',
|
|
150
|
-
errorMessage: 'Duration must be between 0 and 100.',
|
|
151
|
-
|
|
152
|
-
// Validator Option #1
|
|
153
|
-
// You could also optionally define a custom validator in 1 or both inputs
|
|
154
|
-
/*
|
|
155
|
-
validator: (value, args) => {
|
|
156
|
-
let isValid = true;
|
|
157
|
-
let errorMsg = '';
|
|
158
|
-
if (value < 0 || value > 120) {
|
|
159
|
-
isValid = false;
|
|
160
|
-
errorMsg = 'Duration MUST be between 0 and 120.';
|
|
161
|
-
}
|
|
162
|
-
return { valid: isValid, msg: errorMsg };
|
|
163
|
-
}
|
|
164
|
-
*/
|
|
165
|
-
},
|
|
166
|
-
} as ColumnEditorDualInput,
|
|
167
|
-
|
|
168
|
-
// Validator Option #2 (shared Validator) - this is the last alternative, option #1 (independent Validators) is still the recommended way
|
|
169
|
-
// You can also optionally use a common Validator (if you do then you cannot use the leftInput/rightInput validators at same time)
|
|
170
|
-
// to compare both values at the same time.
|
|
171
|
-
/*
|
|
172
|
-
validator: (values, args) => {
|
|
173
|
-
let isValid = true;
|
|
174
|
-
let errorMsg = '';
|
|
175
|
-
if (values.cost < 0 || values.cost > 50000) {
|
|
176
|
-
isValid = false;
|
|
177
|
-
errorMsg = 'Cost MUST be between 0 and 50k.';
|
|
178
|
-
}
|
|
179
|
-
if (values.duration < 0 || values.duration > 120) {
|
|
180
|
-
isValid = false;
|
|
181
|
-
errorMsg = 'Duration MUST be between 0 and 120.';
|
|
182
|
-
}
|
|
183
|
-
if (values.cost < values.duration) {
|
|
184
|
-
isValid = false;
|
|
185
|
-
errorMsg = 'Cost can never be lower than its Duration.';
|
|
186
|
-
}
|
|
187
|
-
return { valid: isValid, msg: errorMsg };
|
|
188
|
-
}
|
|
189
|
-
*/
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
id: 'effortDriven',
|
|
194
|
-
name: 'Effort Driven',
|
|
195
|
-
field: 'effortDriven',
|
|
196
|
-
minWidth: 100,
|
|
197
|
-
width: 120,
|
|
198
|
-
formatter: Formatters.checkmarkMaterial,
|
|
199
|
-
filterable: true,
|
|
200
|
-
filter: {
|
|
201
|
-
collection: [
|
|
202
|
-
{ value: '', label: '' },
|
|
203
|
-
{ value: true, label: 'True' },
|
|
204
|
-
{ value: false, label: 'False' },
|
|
205
|
-
],
|
|
206
|
-
model: Filters.singleSelect,
|
|
207
|
-
},
|
|
208
|
-
sortable: true,
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
id: 'title1',
|
|
212
|
-
name: 'Title 1',
|
|
213
|
-
field: 'title1',
|
|
214
|
-
minWidth: 100,
|
|
215
|
-
width: 120,
|
|
216
|
-
filterable: true,
|
|
217
|
-
sortable: true,
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
id: 'title2',
|
|
221
|
-
name: 'Title 2',
|
|
222
|
-
field: 'title2',
|
|
223
|
-
minWidth: 100,
|
|
224
|
-
width: 120,
|
|
225
|
-
filterable: true,
|
|
226
|
-
sortable: true,
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
id: 'title3',
|
|
230
|
-
name: 'Title 3',
|
|
231
|
-
field: 'title3',
|
|
232
|
-
minWidth: 100,
|
|
233
|
-
width: 120,
|
|
234
|
-
filterable: true,
|
|
235
|
-
sortable: true,
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
id: 'title4',
|
|
239
|
-
name: 'Title 4',
|
|
240
|
-
field: 'title4',
|
|
241
|
-
minWidth: 100,
|
|
242
|
-
width: 120,
|
|
243
|
-
filterable: true,
|
|
244
|
-
sortable: true,
|
|
245
|
-
},
|
|
246
|
-
];
|
|
247
|
-
|
|
248
|
-
this.gridOptions = {
|
|
249
|
-
autoResize: {
|
|
250
|
-
container: '#demo-container',
|
|
251
|
-
rightPadding: 10,
|
|
252
|
-
},
|
|
253
|
-
enableExcelCopyBuffer: true,
|
|
254
|
-
enableCellNavigation: true,
|
|
255
|
-
editable: true,
|
|
256
|
-
autoEdit: true,
|
|
257
|
-
asyncEditorLoading: true,
|
|
258
|
-
frozenColumn: this.frozenColumnCount,
|
|
259
|
-
frozenRow: this.frozenRowCount,
|
|
260
|
-
// frozenBottom: true, // if you want to freeze the bottom instead of the top, you can enable this property
|
|
261
|
-
|
|
262
|
-
gridMenu: { hideClearFrozenColumnsCommand: false },
|
|
263
|
-
headerMenu: { hideFreezeColumnsCommand: false },
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
// mock a dataset
|
|
267
|
-
this.dataset = this.getData();
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
getData() {
|
|
271
|
-
// Set up some test columns.
|
|
272
|
-
const mockDataset = [];
|
|
273
|
-
for (let i = 0; i < 500; i++) {
|
|
274
|
-
mockDataset[i] = {
|
|
275
|
-
id: i,
|
|
276
|
-
title: 'Task ' + i,
|
|
277
|
-
cost: i % 33 === 0 ? null : Math.random() * 10000,
|
|
278
|
-
duration: i % 8 ? Math.round(Math.random() * 100) + '' : null,
|
|
279
|
-
percentComplete: Math.round(Math.random() * 100),
|
|
280
|
-
start: new Date(2009, 0, 1),
|
|
281
|
-
finish: new Date(2009, 4, 5),
|
|
282
|
-
effortDriven: i % 5 === 0,
|
|
283
|
-
title1: `Some Text ${Math.round(Math.random() * 25)}`,
|
|
284
|
-
title2: `Some Text ${Math.round(Math.random() * 25)}`,
|
|
285
|
-
title3: `Some Text ${Math.round(Math.random() * 25)}`,
|
|
286
|
-
title4: `Some Text ${Math.round(Math.random() * 25)}`,
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
return mockDataset;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/** change dynamically, through slickgrid "setOptions()" the number of pinned columns */
|
|
293
|
-
changeFrozenColumnCount() {
|
|
294
|
-
if (this.gridObj && this.gridObj.setOptions) {
|
|
295
|
-
this.gridObj.setOptions({
|
|
296
|
-
frozenColumn: this.frozenColumnCount,
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/** change dynamically, through slickgrid "setOptions()" the number of pinned rows */
|
|
302
|
-
changeFrozenRowCount() {
|
|
303
|
-
if (this.gridObj && this.gridObj.setOptions) {
|
|
304
|
-
this.gridObj.setOptions({
|
|
305
|
-
frozenRow: this.frozenRowCount,
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
costDurationFormatter(_row: number, _cell: number, _value: any, _columnDef: Column, dataContext: any) {
|
|
311
|
-
const costText = this.isNullUndefinedOrEmpty(dataContext.cost) ? 'n/a' : formatNumber(dataContext.cost, 0, 2, false, '$', '', '.', ',');
|
|
312
|
-
let durationText = 'n/a';
|
|
313
|
-
if (!this.isNullUndefinedOrEmpty(dataContext.duration) && dataContext.duration >= 0) {
|
|
314
|
-
durationText = `${dataContext.duration} ${dataContext.duration > 1 ? 'days' : 'day'}`;
|
|
315
|
-
}
|
|
316
|
-
return `<b>${costText}</b> | ${durationText}`;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
isNullUndefinedOrEmpty(data: any) {
|
|
320
|
-
return data === '' || data === null || data === undefined;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
onValidationError(e: Event, args: any) {
|
|
324
|
-
alert(args.validationResults.msg);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
setFrozenColumns(frozenCols: number) {
|
|
328
|
-
this.gridObj.setOptions({ frozenColumn: frozenCols });
|
|
329
|
-
this.gridOptions = this.gridObj.getOptions();
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/** toggle dynamically, through slickgrid "setOptions()" the top/bottom pinned location */
|
|
333
|
-
toggleFrozenBottomRows() {
|
|
334
|
-
if (this.gridObj && this.gridObj.setOptions) {
|
|
335
|
-
this.gridObj.setOptions({
|
|
336
|
-
frozenBottom: !this.isFrozenBottom,
|
|
337
|
-
});
|
|
338
|
-
this.isFrozenBottom = !this.isFrozenBottom; // toggle the variable
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<div class="container-fluid">
|
|
2
|
-
<h2>
|
|
3
|
-
Example 21: Grid AutoHeight
|
|
4
|
-
<span class="float-end">
|
|
5
|
-
<a
|
|
6
|
-
style="font-size: 18px"
|
|
7
|
-
target="_blank"
|
|
8
|
-
href="https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-autoheight.component.ts"
|
|
9
|
-
>
|
|
10
|
-
<span class="mdi mdi-link-variant"></span> code
|
|
11
|
-
</a>
|
|
12
|
-
</span>
|
|
13
|
-
</h2>
|
|
14
|
-
<div class="subtitle">
|
|
15
|
-
The SlickGrid option "autoHeight" can be used if you wish to keep the full height of the grid without any scrolling
|
|
16
|
-
<ul>
|
|
17
|
-
<li>You define a fixed grid width via "gridWidth" in the View</li>
|
|
18
|
-
<li>You can still use the "autoResize" for the width to be resized automatically (the height will never change in this case)</li>
|
|
19
|
-
<li>
|
|
20
|
-
This dataset has 25 rows, if you scroll down the page you can see the entire set is shown without any grid scrolling (though you
|
|
21
|
-
might have browser scrolling)
|
|
22
|
-
</li>
|
|
23
|
-
</ul>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div class="row row-cols-lg-auto g-1 align-items-center">
|
|
27
|
-
<div class="col">
|
|
28
|
-
<label for="columnSelect">Single Search:</label>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="col">
|
|
31
|
-
<select
|
|
32
|
-
class="form-select"
|
|
33
|
-
data-test="search-column-list"
|
|
34
|
-
name="selectedColumn"
|
|
35
|
-
[(ngModel)]="selectedColumn"
|
|
36
|
-
(ngModelChange)="updateFilter()"
|
|
37
|
-
>
|
|
38
|
-
<option [ngValue]="field" *ngFor="let field of columnDefinitions">{{ field.name }}</option>
|
|
39
|
-
</select>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="col">
|
|
42
|
-
<select
|
|
43
|
-
class="form-select"
|
|
44
|
-
data-test="search-operator-list"
|
|
45
|
-
name="selectedOperator"
|
|
46
|
-
[(ngModel)]="selectedOperator"
|
|
47
|
-
(ngModelChange)="updateFilter()"
|
|
48
|
-
>
|
|
49
|
-
<option [ngValue]="operator" *ngFor="let operator of operatorList">{{ operator }}</option>
|
|
50
|
-
</select>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<div class="col">
|
|
54
|
-
<div class="input-group">
|
|
55
|
-
<input
|
|
56
|
-
type="text"
|
|
57
|
-
class="form-control"
|
|
58
|
-
data-test="search-value-input"
|
|
59
|
-
name="searchValue"
|
|
60
|
-
placeholder="search value"
|
|
61
|
-
autocomplete="off"
|
|
62
|
-
(input)="updateFilter()"
|
|
63
|
-
[(ngModel)]="searchValue"
|
|
64
|
-
/>
|
|
65
|
-
<button
|
|
66
|
-
class="btn btn-outline-secondary d-flex align-items-center pl-2 pr-2"
|
|
67
|
-
data-test="clear-search-value"
|
|
68
|
-
(click)="clearGridSearchInput()"
|
|
69
|
-
>
|
|
70
|
-
<span class="mdi mdi-close"></span>
|
|
71
|
-
</button>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<hr />
|
|
77
|
-
|
|
78
|
-
<angular-slickgrid
|
|
79
|
-
gridId="grid21"
|
|
80
|
-
[columns]="columnDefinitions"
|
|
81
|
-
[options]="gridOptions"
|
|
82
|
-
[dataset]="dataset"
|
|
83
|
-
(onAngularGridCreated)="angularGridReady($event.detail)"
|
|
84
|
-
>
|
|
85
|
-
</angular-slickgrid>
|
|
86
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// sort indication will show behind Grid Menu since we don't have scroll,
|
|
2
|
-
// we can offset these icons to fix that
|
|
3
|
-
#grid23 {
|
|
4
|
-
.slick-header-column:last-child {
|
|
5
|
-
.slick-header-menu-button,
|
|
6
|
-
.slick-resizable-handle,
|
|
7
|
-
.slick-sort-indicator,
|
|
8
|
-
.slick-sort-indicator-numbered {
|
|
9
|
-
margin-right: 18px; // grid menu icon width
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.duration-bg {
|
|
15
|
-
background-color: #e9d4f1 !important;
|
|
16
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import { AngularGridInstance, Column, Formatters, GridOption, OperatorString, SlickDataView, SlickGrid } from '../../library';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
encapsulation: ViewEncapsulation.None,
|
|
6
|
-
styleUrls: ['./example21.component.scss'],
|
|
7
|
-
templateUrl: './example21.component.html',
|
|
8
|
-
standalone: false,
|
|
9
|
-
})
|
|
10
|
-
export class Example21Component implements OnInit {
|
|
11
|
-
angularGrid!: AngularGridInstance;
|
|
12
|
-
grid!: SlickGrid;
|
|
13
|
-
dataView!: SlickDataView;
|
|
14
|
-
columnDefinitions: Column[] = [];
|
|
15
|
-
gridOptions!: GridOption;
|
|
16
|
-
dataset!: any[];
|
|
17
|
-
operatorList: OperatorString[] = ['=', '<', '<=', '>', '>=', '<>', 'StartsWith', 'EndsWith'];
|
|
18
|
-
selectedOperator = '=';
|
|
19
|
-
searchValue = '';
|
|
20
|
-
selectedColumn?: Column;
|
|
21
|
-
|
|
22
|
-
ngOnInit() {
|
|
23
|
-
this.prepareGrid();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
27
|
-
this.angularGrid = angularGrid;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
prepareGrid() {
|
|
31
|
-
this.columnDefinitions = [
|
|
32
|
-
{
|
|
33
|
-
id: 'title',
|
|
34
|
-
name: 'Title',
|
|
35
|
-
field: 'title',
|
|
36
|
-
sortable: true,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: 'duration',
|
|
40
|
-
name: 'Duration (days)',
|
|
41
|
-
field: 'duration',
|
|
42
|
-
sortable: true,
|
|
43
|
-
type: 'number',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: 'complete',
|
|
47
|
-
name: '% Complete',
|
|
48
|
-
field: 'percentComplete',
|
|
49
|
-
formatter: Formatters.percentCompleteBar,
|
|
50
|
-
sortable: true,
|
|
51
|
-
type: 'number',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: 'start',
|
|
55
|
-
name: 'Start',
|
|
56
|
-
field: 'start',
|
|
57
|
-
formatter: Formatters.dateIso,
|
|
58
|
-
sortable: true,
|
|
59
|
-
type: 'date',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 'finish',
|
|
63
|
-
name: 'Finish',
|
|
64
|
-
field: 'finish',
|
|
65
|
-
formatter: Formatters.dateIso,
|
|
66
|
-
sortable: true,
|
|
67
|
-
type: 'date',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: 'effort-driven',
|
|
71
|
-
name: 'Effort Driven',
|
|
72
|
-
field: 'effortDriven',
|
|
73
|
-
formatter: Formatters.checkmarkMaterial,
|
|
74
|
-
sortable: true,
|
|
75
|
-
type: 'number',
|
|
76
|
-
},
|
|
77
|
-
];
|
|
78
|
-
this.selectedColumn = this.columnDefinitions[0];
|
|
79
|
-
|
|
80
|
-
this.gridOptions = {
|
|
81
|
-
// if you want to disable autoResize and use a fixed width which requires horizontal scrolling
|
|
82
|
-
// it's advised to disable the autoFitColumnsOnFirstLoad as well
|
|
83
|
-
// enableAutoResize: false,
|
|
84
|
-
// autoFitColumnsOnFirstLoad: false,
|
|
85
|
-
|
|
86
|
-
autoHeight: true,
|
|
87
|
-
autoResize: {
|
|
88
|
-
container: '#demo-container',
|
|
89
|
-
rightPadding: 10,
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
// enable the filtering but hide the user filter row since we use our own single filter
|
|
93
|
-
enableFiltering: true,
|
|
94
|
-
showHeaderRow: false, // hide the filter row (header row)
|
|
95
|
-
|
|
96
|
-
alwaysShowVerticalScroll: false,
|
|
97
|
-
enableColumnPicker: true,
|
|
98
|
-
enableCellNavigation: true,
|
|
99
|
-
enableRowSelection: true,
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// mock a dataset
|
|
103
|
-
const mockedDataset = [];
|
|
104
|
-
for (let i = 0; i < 25; i++) {
|
|
105
|
-
const randomYear = 2000 + Math.floor(Math.random() * 10);
|
|
106
|
-
const randomMonth = Math.floor(Math.random() * 11);
|
|
107
|
-
const randomDay = Math.floor(Math.random() * 29);
|
|
108
|
-
const randomPercent = Math.round(Math.random() * 100);
|
|
109
|
-
|
|
110
|
-
mockedDataset[i] = {
|
|
111
|
-
id: i,
|
|
112
|
-
title: 'Task ' + i,
|
|
113
|
-
duration: Math.round(Math.random() * 100) + '',
|
|
114
|
-
percentComplete: randomPercent,
|
|
115
|
-
percentCompleteNumber: randomPercent,
|
|
116
|
-
start: new Date(randomYear, randomMonth, randomDay),
|
|
117
|
-
finish: new Date(randomYear, randomMonth + 1, randomDay),
|
|
118
|
-
effortDriven: i % 5 === 0,
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
this.dataset = mockedDataset;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
//
|
|
125
|
-
// -- if any of the Search form input changes, we'll call the updateFilter() method
|
|
126
|
-
//
|
|
127
|
-
|
|
128
|
-
clearGridSearchInput() {
|
|
129
|
-
this.searchValue = '';
|
|
130
|
-
this.updateFilter();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
updateFilter() {
|
|
134
|
-
this.angularGrid.filterService.updateSingleFilter({
|
|
135
|
-
columnId: `${this.selectedColumn!.id || ''}`,
|
|
136
|
-
operator: this.selectedOperator as OperatorString,
|
|
137
|
-
searchTerms: [this.searchValue || ''],
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<div class="container-fluid">
|
|
2
|
-
<h2>
|
|
3
|
-
Example 22: Grids in Bootstrap Tabs
|
|
4
|
-
<span class="float-end">
|
|
5
|
-
<a
|
|
6
|
-
style="font-size: 18px"
|
|
7
|
-
target="_blank"
|
|
8
|
-
href="https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-tabs.component.ts"
|
|
9
|
-
>
|
|
10
|
-
<span class="mdi mdi-link-variant"></span> code
|
|
11
|
-
</a>
|
|
12
|
-
</span>
|
|
13
|
-
</h2>
|
|
14
|
-
<div class="subtitle">
|
|
15
|
-
This example demonstrate the creation of multiple grids in Bootstrap Tabs
|
|
16
|
-
<ol>
|
|
17
|
-
<li>Regular mocked data with javascript</li>
|
|
18
|
-
<li>Load dataset through Http-Client. Also note we need to call a "resizeGrid()" after focusing on this tab</li>
|
|
19
|
-
</ol>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div>
|
|
23
|
-
<tabset>
|
|
24
|
-
<tab heading="Javascript" id="javascript" data-test="javascript-tab">
|
|
25
|
-
<h4>Grid 1 - Load Local Data</h4>
|
|
26
|
-
<angular-slickgrid gridId="grid1" [columns]="columnDefinitions1" [options]="gridOptions1" [dataset]="dataset1"> </angular-slickgrid>
|
|
27
|
-
</tab>
|
|
28
|
-
<tab heading="Http-Client" data-test="http-tab" (selectTab)="resizeGrid2()">
|
|
29
|
-
<h4>Grid 2 - Load a JSON dataset through Http-Client</h4>
|
|
30
|
-
<angular-slickgrid
|
|
31
|
-
gridId="grid2"
|
|
32
|
-
[columns]="columnDefinitions2"
|
|
33
|
-
[options]="gridOptions2"
|
|
34
|
-
[dataset]="dataset2"
|
|
35
|
-
(onAngularGridCreated)="angularGrid2Ready($event.detail)"
|
|
36
|
-
>
|
|
37
|
-
</angular-slickgrid>
|
|
38
|
-
</tab>
|
|
39
|
-
</tabset>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|