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,375 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import { ExcelExportService } from '@slickgrid-universal/excel-export';
|
|
3
|
-
import { AngularGridInstance, Column, Formatter, GridOption, type ItemMetadata } from '../../library';
|
|
4
|
-
|
|
5
|
-
const rowCellValueFormatter: Formatter = (row, cell, value) =>
|
|
6
|
-
`<div class="cellValue">${value.toFixed(2)}</div><div class="valueComment">${row}.${cell}</div>`;
|
|
7
|
-
const rowCellValueExportFormatter: Formatter = (_row, _cell, value) => value.toFixed(2);
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
styleUrls: ['example44.component.scss'],
|
|
11
|
-
templateUrl: './example44.component.html',
|
|
12
|
-
encapsulation: ViewEncapsulation.None,
|
|
13
|
-
standalone: false,
|
|
14
|
-
})
|
|
15
|
-
export class Example44Component implements OnInit {
|
|
16
|
-
columnDefinitions: Column[] = [];
|
|
17
|
-
gridOptions!: GridOption;
|
|
18
|
-
angularGrid!: AngularGridInstance;
|
|
19
|
-
dataLn: number | string = 'loading...';
|
|
20
|
-
dataset: any[] = [];
|
|
21
|
-
hideSubTitle = false;
|
|
22
|
-
scrollToRow = 100;
|
|
23
|
-
metadata: Record<number, ItemMetadata> = {
|
|
24
|
-
0: {
|
|
25
|
-
columns: {
|
|
26
|
-
1: { rowspan: 3 },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
2: {
|
|
30
|
-
columns: {
|
|
31
|
-
0: { rowspan: 3 },
|
|
32
|
-
3: { colspan: 3 },
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
3: {
|
|
36
|
-
columns: {
|
|
37
|
-
1: { rowspan: 5, colspan: 1, cssClass: 'cell-var-span' },
|
|
38
|
-
// 1: { rowspan: 3, colspan: 2, cssClass: "cell-var-span" },
|
|
39
|
-
3: { rowspan: 3, colspan: 5 },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
8: {
|
|
43
|
-
columns: {
|
|
44
|
-
1: { rowspan: 80 },
|
|
45
|
-
3: { rowspan: 1999, colspan: 2, cssClass: 'cell-very-high' },
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
12: {
|
|
49
|
-
columns: {
|
|
50
|
-
11: { rowspan: 3 },
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
15: {
|
|
54
|
-
columns: {
|
|
55
|
-
18: { colspan: 4, rowspan: 3 },
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
85: {
|
|
59
|
-
columns: {
|
|
60
|
-
5: { rowspan: 20 },
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
66
|
-
this.angularGrid = angularGrid;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
ngOnInit(): void {
|
|
70
|
-
// define the grid options & columns and then create the grid itself
|
|
71
|
-
this.defineGrid();
|
|
72
|
-
|
|
73
|
-
// mock a dataset
|
|
74
|
-
this.loadData(500);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
defineGrid() {
|
|
78
|
-
this.columnDefinitions = [
|
|
79
|
-
{ id: 'title', name: 'Title', field: 'title', minWidth: 80 },
|
|
80
|
-
{
|
|
81
|
-
id: 'revenueGrowth',
|
|
82
|
-
name: 'Revenue Growth',
|
|
83
|
-
field: 'revenueGrowth',
|
|
84
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
85
|
-
formatter: rowCellValueFormatter,
|
|
86
|
-
type: 'number',
|
|
87
|
-
minWidth: 120,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: 'pricingPolicy',
|
|
91
|
-
name: 'Pricing Policy',
|
|
92
|
-
field: 'pricingPolicy',
|
|
93
|
-
minWidth: 110,
|
|
94
|
-
sortable: true,
|
|
95
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
96
|
-
formatter: rowCellValueFormatter,
|
|
97
|
-
type: 'number',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
id: 'policyIndex',
|
|
101
|
-
name: 'Policy Index',
|
|
102
|
-
field: 'policyIndex',
|
|
103
|
-
minWidth: 100,
|
|
104
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
105
|
-
formatter: rowCellValueFormatter,
|
|
106
|
-
type: 'number',
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: 'expenseControl',
|
|
110
|
-
name: 'Expense Control',
|
|
111
|
-
field: 'expenseControl',
|
|
112
|
-
minWidth: 110,
|
|
113
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
114
|
-
formatter: rowCellValueFormatter,
|
|
115
|
-
type: 'number',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
id: 'excessCash',
|
|
119
|
-
name: 'Excess Cash',
|
|
120
|
-
field: 'excessCash',
|
|
121
|
-
minWidth: 100,
|
|
122
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
123
|
-
formatter: rowCellValueFormatter,
|
|
124
|
-
type: 'number',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
id: 'netTradeCycle',
|
|
128
|
-
name: 'Net Trade Cycle',
|
|
129
|
-
field: 'netTradeCycle',
|
|
130
|
-
minWidth: 110,
|
|
131
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
132
|
-
formatter: rowCellValueFormatter,
|
|
133
|
-
type: 'number',
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: 'costCapital',
|
|
137
|
-
name: 'Cost of Capital',
|
|
138
|
-
field: 'costCapital',
|
|
139
|
-
minWidth: 100,
|
|
140
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
141
|
-
formatter: rowCellValueFormatter,
|
|
142
|
-
type: 'number',
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: 'revenueGrowth2',
|
|
146
|
-
name: 'Revenue Growth',
|
|
147
|
-
field: 'revenueGrowth2',
|
|
148
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
149
|
-
formatter: rowCellValueFormatter,
|
|
150
|
-
type: 'number',
|
|
151
|
-
minWidth: 120,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
id: 'pricingPolicy2',
|
|
155
|
-
name: 'Pricing Policy',
|
|
156
|
-
field: 'pricingPolicy2',
|
|
157
|
-
minWidth: 110,
|
|
158
|
-
sortable: true,
|
|
159
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
160
|
-
formatter: rowCellValueFormatter,
|
|
161
|
-
type: 'number',
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
id: 'policyIndex2',
|
|
165
|
-
name: 'Policy Index',
|
|
166
|
-
field: 'policyIndex2',
|
|
167
|
-
minWidth: 100,
|
|
168
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
169
|
-
formatter: rowCellValueFormatter,
|
|
170
|
-
type: 'number',
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
id: 'expenseControl2',
|
|
174
|
-
name: 'Expense Control',
|
|
175
|
-
field: 'expenseControl2',
|
|
176
|
-
minWidth: 110,
|
|
177
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
178
|
-
formatter: rowCellValueFormatter,
|
|
179
|
-
type: 'number',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
id: 'excessCash2',
|
|
183
|
-
name: 'Excess Cash',
|
|
184
|
-
field: 'excessCash2',
|
|
185
|
-
minWidth: 100,
|
|
186
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
187
|
-
formatter: rowCellValueFormatter,
|
|
188
|
-
type: 'number',
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
id: 'netTradeCycle2',
|
|
192
|
-
name: 'Net Trade Cycle',
|
|
193
|
-
field: 'netTradeCycle2',
|
|
194
|
-
minWidth: 110,
|
|
195
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
196
|
-
formatter: rowCellValueFormatter,
|
|
197
|
-
type: 'number',
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
id: 'costCapital2',
|
|
201
|
-
name: 'Cost of Capital',
|
|
202
|
-
field: 'costCapital2',
|
|
203
|
-
minWidth: 100,
|
|
204
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
205
|
-
formatter: rowCellValueFormatter,
|
|
206
|
-
type: 'number',
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
id: 'revenueGrowth3',
|
|
210
|
-
name: 'Revenue Growth',
|
|
211
|
-
field: 'revenueGrowth3',
|
|
212
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
213
|
-
formatter: rowCellValueFormatter,
|
|
214
|
-
type: 'number',
|
|
215
|
-
minWidth: 120,
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
id: 'pricingPolicy3',
|
|
219
|
-
name: 'Pricing Policy',
|
|
220
|
-
field: 'pricingPolicy3',
|
|
221
|
-
minWidth: 110,
|
|
222
|
-
sortable: true,
|
|
223
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
224
|
-
formatter: rowCellValueFormatter,
|
|
225
|
-
type: 'number',
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
id: 'policyIndex3',
|
|
229
|
-
name: 'Policy Index',
|
|
230
|
-
field: 'policyIndex3',
|
|
231
|
-
minWidth: 100,
|
|
232
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
233
|
-
formatter: rowCellValueFormatter,
|
|
234
|
-
type: 'number',
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
id: 'expenseControl3',
|
|
238
|
-
name: 'Expense Control',
|
|
239
|
-
field: 'expenseControl3',
|
|
240
|
-
minWidth: 110,
|
|
241
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
242
|
-
formatter: rowCellValueFormatter,
|
|
243
|
-
type: 'number',
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
id: 'excessCash3',
|
|
247
|
-
name: 'Excess Cash',
|
|
248
|
-
field: 'excessCash3',
|
|
249
|
-
minWidth: 100,
|
|
250
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
251
|
-
formatter: rowCellValueFormatter,
|
|
252
|
-
type: 'number',
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
id: 'netTradeCycle3',
|
|
256
|
-
name: 'Net Trade Cycle',
|
|
257
|
-
field: 'netTradeCycle3',
|
|
258
|
-
minWidth: 110,
|
|
259
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
260
|
-
formatter: rowCellValueFormatter,
|
|
261
|
-
type: 'number',
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
id: 'costCapital3',
|
|
265
|
-
name: 'Cost of Capital',
|
|
266
|
-
field: 'costCapital3',
|
|
267
|
-
minWidth: 100,
|
|
268
|
-
exportCustomFormatter: rowCellValueExportFormatter,
|
|
269
|
-
formatter: rowCellValueFormatter,
|
|
270
|
-
type: 'number',
|
|
271
|
-
},
|
|
272
|
-
];
|
|
273
|
-
|
|
274
|
-
this.gridOptions = {
|
|
275
|
-
enableCellNavigation: true,
|
|
276
|
-
enableColumnReorder: true,
|
|
277
|
-
enableCellRowSpan: true,
|
|
278
|
-
enableHeaderMenu: false,
|
|
279
|
-
gridHeight: 600,
|
|
280
|
-
gridWidth: 900,
|
|
281
|
-
rowHeight: 30,
|
|
282
|
-
dataView: {
|
|
283
|
-
globalItemMetadataProvider: {
|
|
284
|
-
getRowMetadata: (item: any, row: number) => this.renderDifferentColspan(item, row),
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
enableExcelExport: true,
|
|
288
|
-
externalResources: [new ExcelExportService()],
|
|
289
|
-
rowTopOffsetRenderType: 'top', // rowspan doesn't render well with 'transform', default is 'top'
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
clearScrollTo() {
|
|
294
|
-
this.scrollToRow = 0;
|
|
295
|
-
document.querySelector<HTMLInputElement>('#nRow')?.focus();
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
loadData(count: number) {
|
|
299
|
-
this.dataLn = 'loading...';
|
|
300
|
-
|
|
301
|
-
// add a delay just to show the "loading" text before it loads all data
|
|
302
|
-
setTimeout(() => {
|
|
303
|
-
// mock data
|
|
304
|
-
const tmpArray: any[] = [];
|
|
305
|
-
for (let i = 0; i < count; i++) {
|
|
306
|
-
tmpArray[i] = {
|
|
307
|
-
id: i,
|
|
308
|
-
title: 'Task ' + i,
|
|
309
|
-
revenueGrowth: Math.random() * Math.pow(10, Math.random() * 3),
|
|
310
|
-
pricingPolicy: Math.random() * Math.pow(10, Math.random() * 3),
|
|
311
|
-
policyIndex: Math.random() * Math.pow(10, Math.random() * 3),
|
|
312
|
-
expenseControl: Math.random() * Math.pow(10, Math.random() * 3),
|
|
313
|
-
excessCash: Math.random() * Math.pow(10, Math.random() * 3),
|
|
314
|
-
netTradeCycle: Math.random() * Math.pow(10, Math.random() * 3),
|
|
315
|
-
costCapital: Math.random() * Math.pow(10, Math.random() * 3),
|
|
316
|
-
revenueGrowth2: Math.random() * Math.pow(10, Math.random() * 3),
|
|
317
|
-
pricingPolicy2: Math.random() * Math.pow(10, Math.random() * 3),
|
|
318
|
-
policyIndex2: Math.random() * Math.pow(10, Math.random() * 3),
|
|
319
|
-
expenseControl2: Math.random() * Math.pow(10, Math.random() * 3),
|
|
320
|
-
excessCash2: Math.random() * Math.pow(10, Math.random() * 3),
|
|
321
|
-
netTradeCycle2: Math.random() * Math.pow(10, Math.random() * 3),
|
|
322
|
-
costCapital2: Math.random() * Math.pow(10, Math.random() * 3),
|
|
323
|
-
revenueGrowth3: Math.random() * Math.pow(10, Math.random() * 3),
|
|
324
|
-
pricingPolicy3: Math.random() * Math.pow(10, Math.random() * 3),
|
|
325
|
-
policyIndex3: Math.random() * Math.pow(10, Math.random() * 3),
|
|
326
|
-
expenseControl3: Math.random() * Math.pow(10, Math.random() * 3),
|
|
327
|
-
excessCash3: Math.random() * Math.pow(10, Math.random() * 3),
|
|
328
|
-
netTradeCycle3: Math.random() * Math.pow(10, Math.random() * 3),
|
|
329
|
-
costCapital3: Math.random() * Math.pow(10, Math.random() * 3),
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
// let's keep column 3-4 as the row spanning from row 8 until the end of the grid
|
|
334
|
-
this.metadata[8].columns![3].rowspan = tmpArray.length - 8;
|
|
335
|
-
|
|
336
|
-
this.angularGrid?.dataView?.beginUpdate();
|
|
337
|
-
this.angularGrid?.dataView?.setItems(tmpArray);
|
|
338
|
-
this.angularGrid?.dataView?.endUpdate();
|
|
339
|
-
this.dataLn = count;
|
|
340
|
-
}, 20);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* A callback to render different row column span
|
|
345
|
-
* Your callback will always have the "item" argument which you can use to decide on the colspan
|
|
346
|
-
* Your return object must always be in the form of:: { columns: { [columnName]: { colspan: number|'*' } }}
|
|
347
|
-
*/
|
|
348
|
-
renderDifferentColspan(_item: any, row: number): any {
|
|
349
|
-
return (this.metadata[row] as ItemMetadata)?.attributes
|
|
350
|
-
? this.metadata[row]
|
|
351
|
-
: (this.metadata[row] = { attributes: { 'data-row': row }, ...this.metadata[row] });
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
handleToggleSpans() {
|
|
355
|
-
const cell = this.metadata[3].columns![1];
|
|
356
|
-
if (cell.colspan === 1) {
|
|
357
|
-
cell.rowspan = 3;
|
|
358
|
-
cell.colspan = 2;
|
|
359
|
-
} else {
|
|
360
|
-
cell.rowspan = 5;
|
|
361
|
-
cell.colspan = 1;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
// row index 3 can have a rowspan of up to 5 rows, so we need to invalidate from row 3 + 5 (-1 because of zero index)
|
|
365
|
-
// so: 3 + 5 - 1 => row indexes 3 to 7
|
|
366
|
-
this.angularGrid.slickGrid?.invalidateRows([3, 4, 5, 6, 7]);
|
|
367
|
-
this.angularGrid.slickGrid?.render();
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
handleScrollTo() {
|
|
371
|
-
// const args = event.detail && event.detail.args;
|
|
372
|
-
this.angularGrid.slickGrid?.scrollRowToTop(this.scrollToRow);
|
|
373
|
-
return false;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<div [class]="innerGridClass">
|
|
2
|
-
<h4>{{ model.companyName }} - Order Details (id: {{ model.id }})</h4>
|
|
3
|
-
<div class="container-fluid">
|
|
4
|
-
<angular-slickgrid
|
|
5
|
-
class="innergrid"
|
|
6
|
-
[gridId]="innerGridId"
|
|
7
|
-
[columns]="innerColDefs"
|
|
8
|
-
[options]="innerGridOptions"
|
|
9
|
-
[dataset]="innerDataset"
|
|
10
|
-
(onAngularGridCreated)="angularGridReady($event.detail)"
|
|
11
|
-
(onBeforeGridDestroy)="handleBeforeGridDestroy()"
|
|
12
|
-
>
|
|
13
|
-
</angular-slickgrid>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import { AngularGridInstance, Column, GridOption, GridState } from '../../library';
|
|
3
|
-
|
|
4
|
-
export interface Distributor {
|
|
5
|
-
id: number;
|
|
6
|
-
companyId: number;
|
|
7
|
-
companyName: string;
|
|
8
|
-
city: string;
|
|
9
|
-
streetAddress: string;
|
|
10
|
-
zipCode: string;
|
|
11
|
-
country: string;
|
|
12
|
-
orderData: OrderData[];
|
|
13
|
-
isUsingInnerGridStatePresets: boolean;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface OrderData {
|
|
17
|
-
orderId: string;
|
|
18
|
-
shipCity: string;
|
|
19
|
-
freight: number;
|
|
20
|
-
shipName: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@Component({
|
|
24
|
-
styles: ['.innergrid { --slick-header-menu-display: inline-block; }'],
|
|
25
|
-
templateUrl: './example45-detail.component.html',
|
|
26
|
-
encapsulation: ViewEncapsulation.None,
|
|
27
|
-
standalone: false,
|
|
28
|
-
})
|
|
29
|
-
export class Example45DetailComponent implements OnDestroy, OnInit {
|
|
30
|
-
model!: Distributor;
|
|
31
|
-
innerColDefs: Column[] = [];
|
|
32
|
-
innerGridOptions!: GridOption;
|
|
33
|
-
angularGrid!: AngularGridInstance;
|
|
34
|
-
innerDataset: any[] = [];
|
|
35
|
-
innerGridId = '';
|
|
36
|
-
innerGridClass = '';
|
|
37
|
-
showGrid = false;
|
|
38
|
-
|
|
39
|
-
ngOnInit(): void {
|
|
40
|
-
this.innerGridId = `innergrid-${this.model.id}`;
|
|
41
|
-
this.innerGridClass = `row-detail-${this.model.id}`;
|
|
42
|
-
// define the grid options & columns and then create the grid itself
|
|
43
|
-
this.defineGrid();
|
|
44
|
-
|
|
45
|
-
// mock some data (different in each dataset)
|
|
46
|
-
this.innerDataset = [...this.model.orderData];
|
|
47
|
-
this.showGrid = true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
ngOnDestroy(): void {
|
|
51
|
-
console.log('destroying row detail', this.model.id);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
55
|
-
this.angularGrid = angularGrid;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
defineGrid() {
|
|
59
|
-
// when Grid State found in Session Storage, reapply inner Grid State then reapply it as preset
|
|
60
|
-
let gridState: GridState | undefined;
|
|
61
|
-
if (this.model.isUsingInnerGridStatePresets) {
|
|
62
|
-
const gridStateStr = sessionStorage.getItem(`gridstate_${this.innerGridClass}`);
|
|
63
|
-
if (gridStateStr) {
|
|
64
|
-
gridState = JSON.parse(gridStateStr);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
this.innerColDefs = [
|
|
69
|
-
{ id: 'orderId', field: 'orderId', name: 'Order ID', filterable: true, sortable: true },
|
|
70
|
-
{ id: 'shipCity', field: 'shipCity', name: 'Ship City', filterable: true, sortable: true },
|
|
71
|
-
{ id: 'freight', field: 'freight', name: 'Freight', filterable: true, sortable: true, type: 'number' },
|
|
72
|
-
{ id: 'shipName', field: 'shipName', name: 'Ship Name', filterable: true, sortable: true },
|
|
73
|
-
];
|
|
74
|
-
|
|
75
|
-
this.innerGridOptions = {
|
|
76
|
-
autoResize: {
|
|
77
|
-
container: `.${this.innerGridClass}`,
|
|
78
|
-
rightPadding: 30,
|
|
79
|
-
minHeight: 200,
|
|
80
|
-
},
|
|
81
|
-
enableFiltering: true,
|
|
82
|
-
enableSorting: true,
|
|
83
|
-
rowHeight: 33,
|
|
84
|
-
enableCellNavigation: true,
|
|
85
|
-
datasetIdPropertyName: 'orderId',
|
|
86
|
-
presets: gridState,
|
|
87
|
-
rowTopOffsetRenderType: 'top', // RowDetail and/or RowSpan don't render well with "transform", you should use "top"
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
handleBeforeGridDestroy() {
|
|
92
|
-
if (this.model.isUsingInnerGridStatePresets) {
|
|
93
|
-
const gridState = this.angularGrid.gridStateService.getCurrentGridState();
|
|
94
|
-
sessionStorage.setItem(`gridstate_${this.innerGridClass}`, JSON.stringify(gridState));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
<div id="demo-container" class="container-fluid">
|
|
2
|
-
<h2>
|
|
3
|
-
Example 45: Row Detail with inner Grid
|
|
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/grid45.component.ts"
|
|
9
|
-
>
|
|
10
|
-
<span class="mdi mdi-link-variant"></span> code
|
|
11
|
-
</a>
|
|
12
|
-
</span>
|
|
13
|
-
<button
|
|
14
|
-
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
|
|
15
|
-
type="button"
|
|
16
|
-
data-test="toggle-subtitle"
|
|
17
|
-
(click)="hideSubTitle = !hideSubTitle"
|
|
18
|
-
>
|
|
19
|
-
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
|
|
20
|
-
</button>
|
|
21
|
-
<button class="btn btn-outline-secondary btn-sm btn-icon" (click)="toggleDarkMode()" data-test="toggle-dark-mode">
|
|
22
|
-
<span class="mdi mdi-theme-light-dark"></span>
|
|
23
|
-
<span>Toggle Dark Mode</span>
|
|
24
|
-
</button>
|
|
25
|
-
</h2>
|
|
26
|
-
|
|
27
|
-
<div class="subtitle" [hidden]="hideSubTitle">
|
|
28
|
-
Add functionality to show extra information with a Row Detail View, (<a
|
|
29
|
-
href="https://ghiscoding.gitbook.io/angular-slickgrid/grid-functionalities/row-detail"
|
|
30
|
-
target="_blank"
|
|
31
|
-
>Wiki docs</a
|
|
32
|
-
>), we'll use an inner grid inside our Row Detail Component. Note that because SlickGrid uses Virtual Scroll, the rows and row details
|
|
33
|
-
are often be re-rendered (when row is out of viewport range) and this means unmounting Row Detail Component which indirectly mean that
|
|
34
|
-
all component states (dynamic elements, forms, ...) will be disposed as well, however you can use Grid State/Presets to reapply previous
|
|
35
|
-
state whenever the row detail gets re-rendered when back to viewport.
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<div class="row">
|
|
39
|
-
<div class="col-sm-10">
|
|
40
|
-
<button class="btn btn-outline-secondary btn-sm btn-icon ms-1" data-test="collapse-all-btn" (click)="closeAllRowDetail()">
|
|
41
|
-
Close all Row Details
|
|
42
|
-
</button>
|
|
43
|
-
<button class="btn btn-outline-secondary btn-sm btn-icon mx-1" data-test="redraw-all-btn" (click)="redrawAllRowDetail()">
|
|
44
|
-
Force redraw all Row Details
|
|
45
|
-
</button>
|
|
46
|
-
|
|
47
|
-
<span class="d-inline-flex gap-4px">
|
|
48
|
-
<label for="detailViewRowCount">Detail View Rows Shown: </label>
|
|
49
|
-
<input
|
|
50
|
-
id="detailViewRowCount"
|
|
51
|
-
data-test="detail-view-row-count"
|
|
52
|
-
type="number"
|
|
53
|
-
style="height: 22px; width: 40px"
|
|
54
|
-
[(ngModel)]="detailViewRowCount"
|
|
55
|
-
/>
|
|
56
|
-
<button
|
|
57
|
-
class="btn btn-outline-secondary btn-xs btn-icon"
|
|
58
|
-
style="height: 26px"
|
|
59
|
-
data-test="set-count-btn"
|
|
60
|
-
(click)="changeDetailViewRowCount()"
|
|
61
|
-
>
|
|
62
|
-
Set
|
|
63
|
-
</button>
|
|
64
|
-
<label for="serverdelay" class="ms-2">Server Delay: </label>
|
|
65
|
-
<input
|
|
66
|
-
id="serverdelay"
|
|
67
|
-
[(ngModel)]="serverWaitDelay"
|
|
68
|
-
type="number"
|
|
69
|
-
data-test="server-delay"
|
|
70
|
-
style="height: 26px; width: 55px"
|
|
71
|
-
title="input a fake timer delay to simulate slow server response"
|
|
72
|
-
/>
|
|
73
|
-
<label class="checkbox-inline control-label ms-2" for="useInnerGridStatePresets">
|
|
74
|
-
<input
|
|
75
|
-
type="checkbox"
|
|
76
|
-
id="useInnerGridStatePresets"
|
|
77
|
-
data-test="use-inner-grid-state-presets"
|
|
78
|
-
[checked]="isUsingInnerGridStatePresets"
|
|
79
|
-
(click)="changeUsingInnerGridStatePresets()"
|
|
80
|
-
/>
|
|
81
|
-
<span
|
|
82
|
-
title="should we use Grid State/Presets to keep the inner grid state whenever Row Details are out and back to viewport and re-rendered"
|
|
83
|
-
>
|
|
84
|
-
Use Inner Grid State/Presets
|
|
85
|
-
</span>
|
|
86
|
-
</label>
|
|
87
|
-
|
|
88
|
-
<label class="checkbox-inline control-label ms-2" for="useResizeAutoHeight">
|
|
89
|
-
<input
|
|
90
|
-
type="checkbox"
|
|
91
|
-
id="useResizeAutoHeight"
|
|
92
|
-
data-test="use-auto-height"
|
|
93
|
-
[checked]="isUsingAutoHeight"
|
|
94
|
-
(click)="changeUsingResizerAutoHeight()"
|
|
95
|
-
/>
|
|
96
|
-
Use <code>autoResize.autoHeight</code>
|
|
97
|
-
</label>
|
|
98
|
-
</span>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
<angular-slickgrid
|
|
103
|
-
gridId="grid45"
|
|
104
|
-
[columns]="columnDefinitions"
|
|
105
|
-
[options]="gridOptions"
|
|
106
|
-
[dataset]="dataset"
|
|
107
|
-
(onAngularGridCreated)="angularGridReady($event.detail)"
|
|
108
|
-
>
|
|
109
|
-
</angular-slickgrid>
|
|
110
|
-
</div>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
#grid45 {
|
|
2
|
-
--slick-cell-active-box-shadow: inset 0 0 0 1px #e35ddc;
|
|
3
|
-
|
|
4
|
-
.slick-row.even .slick-cell.cell-very-high {
|
|
5
|
-
background-color: #f0ffe0;
|
|
6
|
-
}
|
|
7
|
-
.slick-row.odd .slick-cell.cell-var-span {
|
|
8
|
-
background-color: #87ceeb;
|
|
9
|
-
}
|
|
10
|
-
.slick-row .slick-cell.rowspan {
|
|
11
|
-
background-color: #95b7a2;
|
|
12
|
-
z-index: 10;
|
|
13
|
-
}
|
|
14
|
-
.slick-row[data-row='3'] .slick-cell.l3.rowspan {
|
|
15
|
-
background-color: #95b7a2;
|
|
16
|
-
}
|
|
17
|
-
.slick-row[data-row='2'] .slick-cell.l3.r5 {
|
|
18
|
-
background-color: #ddfffc;
|
|
19
|
-
}
|
|
20
|
-
.slick-row[data-row='0'] .slick-cell.rowspan,
|
|
21
|
-
.slick-row[data-row='8'] .slick-cell.rowspan {
|
|
22
|
-
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAQ0lEQVQYV2N8/fr1fwY84M6dOwyM+BSBFKioqOBWBFMAsgSrScgKsCpCV4ChCJsCFEW4FMAV4VMAVnT8+PH/IG/iAwDA1DlezHn8bwAAAABJRU5ErkJggg==);
|
|
23
|
-
}
|
|
24
|
-
.slick-row[data-row='8'] .slick-cell.rowspan:nth-child(4) {
|
|
25
|
-
background: #f0ffe0;
|
|
26
|
-
}
|
|
27
|
-
.slick-row[data-row='12'] .slick-cell.rowspan {
|
|
28
|
-
background: #bd8b8b;
|
|
29
|
-
}
|
|
30
|
-
.slick-row[data-row='15'] .slick-cell.rowspan {
|
|
31
|
-
background: #edc12e;
|
|
32
|
-
}
|
|
33
|
-
.slick-row[data-row='85'] .slick-cell.rowspan {
|
|
34
|
-
background: #8baebd;
|
|
35
|
-
}
|
|
36
|
-
.slick-cell.active {
|
|
37
|
-
/* use a different active cell color to make it a bit more obvious */
|
|
38
|
-
box-shadow: inset 0 0 0 1px #e35ddc;
|
|
39
|
-
}
|
|
40
|
-
.cellValue {
|
|
41
|
-
float: right;
|
|
42
|
-
font-size: 14px;
|
|
43
|
-
}
|
|
44
|
-
.valueComment {
|
|
45
|
-
color: #7c8983;
|
|
46
|
-
font-size: 12px;
|
|
47
|
-
font-style: italic;
|
|
48
|
-
width: fit-content;
|
|
49
|
-
}
|
|
50
|
-
}
|