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.
Files changed (395) hide show
  1. package/LICENSE +1 -1
  2. package/{dist/fesm2022 → fesm2022}/angular-slickgrid.mjs +16 -16
  3. package/package.json +27 -14
  4. package/.gitbook.yaml +0 -5
  5. package/CHANGELOG.md +0 -1691
  6. package/CONTRIBUTING.md +0 -17
  7. package/angular.json +0 -133
  8. package/coverage/base.css +0 -224
  9. package/coverage/block-navigation.js +0 -87
  10. package/coverage/clover.xml +0 -1620
  11. package/coverage/coverage-final.json +0 -9
  12. package/coverage/favicon.png +0 -0
  13. package/coverage/index.html +0 -176
  14. package/coverage/library/components/angular-slickgrid.component.ts.html +0 -5074
  15. package/coverage/library/components/index.html +0 -116
  16. package/coverage/library/constants.ts.html +0 -397
  17. package/coverage/library/extensions/index.html +0 -116
  18. package/coverage/library/extensions/slickRowDetailView.ts.html +0 -1261
  19. package/coverage/library/index.html +0 -116
  20. package/coverage/library/modules/angular-slickgrid.module.ts.html +0 -166
  21. package/coverage/library/modules/index.html +0 -116
  22. package/coverage/library/services/angularUtil.service.ts.html +0 -445
  23. package/coverage/library/services/container.service.ts.html +0 -163
  24. package/coverage/library/services/index.html +0 -161
  25. package/coverage/library/services/translater.service.ts.html +0 -199
  26. package/coverage/library/services/utilities.ts.html +0 -142
  27. package/coverage/prettify.css +0 -1
  28. package/coverage/prettify.js +0 -2
  29. package/coverage/sort-arrow-sprite.png +0 -0
  30. package/coverage/sorter.js +0 -196
  31. package/dist/LICENSE +0 -21
  32. package/dist/README.md +0 -142
  33. package/docs/README.md +0 -5
  34. package/docs/TOC.md +0 -105
  35. package/docs/backend-services/Custom-Backend-Service.md +0 -50
  36. package/docs/backend-services/GraphQL.md +0 -276
  37. package/docs/backend-services/OData.md +0 -245
  38. package/docs/backend-services/graphql/GraphQL-Filtering.md +0 -156
  39. package/docs/backend-services/graphql/GraphQL-JSON-Result.md +0 -85
  40. package/docs/backend-services/graphql/GraphQL-Pagination.md +0 -77
  41. package/docs/backend-services/graphql/GraphQL-Sorting.md +0 -78
  42. package/docs/column-functionalities/cell-menu.md +0 -212
  43. package/docs/column-functionalities/editors/autocomplete-editor.md +0 -466
  44. package/docs/column-functionalities/editors/date-editor-flatpickr.md +0 -71
  45. package/docs/column-functionalities/editors/date-editor-vanilla-calendar.md +0 -91
  46. package/docs/column-functionalities/editors/longtext-editor-textarea.md +0 -80
  47. package/docs/column-functionalities/editors/select-dropdown-editor.md +0 -227
  48. package/docs/column-functionalities/editors.md +0 -604
  49. package/docs/column-functionalities/filters/autocomplete-filter.md +0 -183
  50. package/docs/column-functionalities/filters/compound-filters.md +0 -234
  51. package/docs/column-functionalities/filters/custom-filter.md +0 -117
  52. package/docs/column-functionalities/filters/filter-intro.md +0 -81
  53. package/docs/column-functionalities/filters/input-filter.md +0 -260
  54. package/docs/column-functionalities/filters/range-filters.md +0 -188
  55. package/docs/column-functionalities/filters/select-filter.md +0 -695
  56. package/docs/column-functionalities/filters/single-search-filter.md +0 -77
  57. package/docs/column-functionalities/filters/styling-filled-filters.md +0 -45
  58. package/docs/column-functionalities/formatters.md +0 -325
  59. package/docs/column-functionalities/sorting.md +0 -200
  60. package/docs/developer-guides/csp-compliance.md +0 -64
  61. package/docs/events/Available-Events.md +0 -223
  62. package/docs/events/Grid-&-DataView-Events.md +0 -211
  63. package/docs/getting-started/quick-start.md +0 -230
  64. package/docs/getting-started/troubleshooting.md +0 -80
  65. package/docs/grid-functionalities/Column-Picker.md +0 -22
  66. package/docs/grid-functionalities/Composite-Editor-Modal.md +0 -627
  67. package/docs/grid-functionalities/Context-Menu.md +0 -226
  68. package/docs/grid-functionalities/Custom-Footer.md +0 -80
  69. package/docs/grid-functionalities/Custom-Tooltip-(plugin).md +0 -258
  70. package/docs/grid-functionalities/Export-to-Excel.md +0 -457
  71. package/docs/grid-functionalities/Export-to-Text-File.md +0 -165
  72. package/docs/grid-functionalities/FAQ.md +0 -53
  73. package/docs/grid-functionalities/Global-Options.md +0 -29
  74. package/docs/grid-functionalities/Grid-Auto-Resize.md +0 -218
  75. package/docs/grid-functionalities/Grid-Menu.md +0 -134
  76. package/docs/grid-functionalities/Grid-State-&-Preset.md +0 -245
  77. package/docs/grid-functionalities/Header-Menu-&-Header-Buttons.md +0 -125
  78. package/docs/grid-functionalities/Resize-by-Cell-Content.md +0 -138
  79. package/docs/grid-functionalities/Row-Selection.md +0 -247
  80. package/docs/grid-functionalities/Row-based-edit.md +0 -71
  81. package/docs/grid-functionalities/add-update-highlight.md +0 -258
  82. package/docs/grid-functionalities/column-row-spanning.md +0 -74
  83. package/docs/grid-functionalities/dynamic-item-metadata.md +0 -124
  84. package/docs/grid-functionalities/excel-copy-buffer.md +0 -145
  85. package/docs/grid-functionalities/frozen-columns-rows.md +0 -164
  86. package/docs/grid-functionalities/grouping-and-aggregators.md +0 -269
  87. package/docs/grid-functionalities/header-footer-slots.md +0 -22
  88. package/docs/grid-functionalities/infinite-scroll.md +0 -150
  89. package/docs/grid-functionalities/providing-grid-data.md +0 -61
  90. package/docs/grid-functionalities/row-detail.md +0 -530
  91. package/docs/grid-functionalities/tree-data-grid.md +0 -391
  92. package/docs/localization/Localization---Component-Sample.md +0 -87
  93. package/docs/localization/Localization-with-Custom-Locales.md +0 -66
  94. package/docs/localization/Localization-with-ngx-translate.md +0 -148
  95. package/docs/migrations/migration-to-2.x.md +0 -304
  96. package/docs/migrations/migration-to-3.x.md +0 -295
  97. package/docs/migrations/migration-to-4.x.md +0 -83
  98. package/docs/migrations/migration-to-5.x.md +0 -160
  99. package/docs/migrations/migration-to-6.x.md +0 -128
  100. package/docs/migrations/migration-to-7.x.md +0 -294
  101. package/docs/migrations/migration-to-8.x.md +0 -316
  102. package/docs/migrations/migration-to-9.x.md +0 -219
  103. package/docs/slick-grid-dataview-objects/slickgrid-dataview-objects.md +0 -79
  104. package/docs/styling/dark-mode.md +0 -100
  105. package/docs/styling/styling.md +0 -250
  106. package/docs/testing/testing-patterns.md +0 -73
  107. package/eslint.config.mjs +0 -60
  108. package/ng-package.json +0 -10
  109. package/src/assets/angular-logo.png +0 -0
  110. package/src/assets/angular-logo2.png +0 -0
  111. package/src/assets/data/collection_100_numbers.json +0 -12
  112. package/src/assets/data/collection_500_numbers.json +0 -52
  113. package/src/assets/data/countries.json +0 -245
  114. package/src/assets/data/country_names.json +0 -245
  115. package/src/assets/data/customers_100.json +0 -102
  116. package/src/assets/data/users.csv +0 -5
  117. package/src/assets/i18n/en.json +0 -102
  118. package/src/assets/i18n/fr.json +0 -103
  119. package/src/demos/app-routing.module.ts +0 -108
  120. package/src/demos/app.component.html +0 -187
  121. package/src/demos/app.component.scss +0 -79
  122. package/src/demos/app.component.ts +0 -11
  123. package/src/demos/app.module.ts +0 -196
  124. package/src/demos/environments/environment.dev.ts +0 -3
  125. package/src/demos/environments/environment.prod.ts +0 -3
  126. package/src/demos/environments/environment.ts +0 -8
  127. package/src/demos/examples/custom-angularComponentEditor.ts +0 -187
  128. package/src/demos/examples/custom-angularComponentFilter.ts +0 -123
  129. package/src/demos/examples/custom-buttonFormatter.component.ts +0 -13
  130. package/src/demos/examples/custom-inputEditor.ts +0 -132
  131. package/src/demos/examples/custom-inputFilter.ts +0 -134
  132. package/src/demos/examples/custom-titleFormatter.component.ts +0 -9
  133. package/src/demos/examples/data/collection_100_numbers.json +0 -12
  134. package/src/demos/examples/data/collection_500_numbers.json +0 -52
  135. package/src/demos/examples/data/countries.json +0 -245
  136. package/src/demos/examples/data/country_names.json +0 -245
  137. package/src/demos/examples/data/customers_100.json +0 -102
  138. package/src/demos/examples/data/users.csv +0 -5
  139. package/src/demos/examples/editor-ng-select.component.ts +0 -38
  140. package/src/demos/examples/example01.component.html +0 -48
  141. package/src/demos/examples/example01.component.ts +0 -109
  142. package/src/demos/examples/example02.component.html +0 -45
  143. package/src/demos/examples/example02.component.ts +0 -218
  144. package/src/demos/examples/example03.component.html +0 -118
  145. package/src/demos/examples/example03.component.ts +0 -694
  146. package/src/demos/examples/example04.component.html +0 -87
  147. package/src/demos/examples/example04.component.ts +0 -326
  148. package/src/demos/examples/example05.component.html +0 -151
  149. package/src/demos/examples/example05.component.ts +0 -474
  150. package/src/demos/examples/example06.component.html +0 -163
  151. package/src/demos/examples/example06.component.ts +0 -446
  152. package/src/demos/examples/example07.component.html +0 -56
  153. package/src/demos/examples/example07.component.scss +0 -10
  154. package/src/demos/examples/example07.component.ts +0 -216
  155. package/src/demos/examples/example08.component.html +0 -51
  156. package/src/demos/examples/example08.component.scss +0 -23
  157. package/src/demos/examples/example08.component.ts +0 -195
  158. package/src/demos/examples/example09.component.html +0 -55
  159. package/src/demos/examples/example09.component.scss +0 -22
  160. package/src/demos/examples/example09.component.ts +0 -302
  161. package/src/demos/examples/example10.component.html +0 -103
  162. package/src/demos/examples/example10.component.ts +0 -309
  163. package/src/demos/examples/example11.component.html +0 -91
  164. package/src/demos/examples/example11.component.ts +0 -276
  165. package/src/demos/examples/example12.component.html +0 -98
  166. package/src/demos/examples/example12.component.ts +0 -317
  167. package/src/demos/examples/example13.component.html +0 -96
  168. package/src/demos/examples/example13.component.ts +0 -370
  169. package/src/demos/examples/example14.component.html +0 -50
  170. package/src/demos/examples/example14.component.scss +0 -11
  171. package/src/demos/examples/example14.component.ts +0 -156
  172. package/src/demos/examples/example15.component.html +0 -56
  173. package/src/demos/examples/example15.component.ts +0 -304
  174. package/src/demos/examples/example16.component.html +0 -77
  175. package/src/demos/examples/example16.component.ts +0 -277
  176. package/src/demos/examples/example17.component.html +0 -50
  177. package/src/demos/examples/example17.component.ts +0 -109
  178. package/src/demos/examples/example18.component.html +0 -132
  179. package/src/demos/examples/example18.component.ts +0 -445
  180. package/src/demos/examples/example19-rowdetail.component.html +0 -40
  181. package/src/demos/examples/example19-rowdetail.component.ts +0 -54
  182. package/src/demos/examples/example19.component.html +0 -79
  183. package/src/demos/examples/example19.component.ts +0 -316
  184. package/src/demos/examples/example20.component.html +0 -76
  185. package/src/demos/examples/example20.component.scss +0 -11
  186. package/src/demos/examples/example20.component.ts +0 -341
  187. package/src/demos/examples/example21.component.html +0 -86
  188. package/src/demos/examples/example21.component.scss +0 -16
  189. package/src/demos/examples/example21.component.ts +0 -140
  190. package/src/demos/examples/example22.component.html +0 -41
  191. package/src/demos/examples/example22.component.ts +0 -117
  192. package/src/demos/examples/example23.component.html +0 -111
  193. package/src/demos/examples/example23.component.ts +0 -323
  194. package/src/demos/examples/example24.component.html +0 -120
  195. package/src/demos/examples/example24.component.scss +0 -62
  196. package/src/demos/examples/example24.component.ts +0 -641
  197. package/src/demos/examples/example25.component.html +0 -60
  198. package/src/demos/examples/example25.component.scss +0 -8
  199. package/src/demos/examples/example25.component.ts +0 -255
  200. package/src/demos/examples/example26.component.html +0 -98
  201. package/src/demos/examples/example26.component.scss +0 -42
  202. package/src/demos/examples/example26.component.ts +0 -383
  203. package/src/demos/examples/example27.component.html +0 -138
  204. package/src/demos/examples/example27.component.scss +0 -10
  205. package/src/demos/examples/example27.component.ts +0 -369
  206. package/src/demos/examples/example28.component.html +0 -143
  207. package/src/demos/examples/example28.component.scss +0 -54
  208. package/src/demos/examples/example28.component.ts +0 -453
  209. package/src/demos/examples/example29.component.html +0 -30
  210. package/src/demos/examples/example29.component.ts +0 -70
  211. package/src/demos/examples/example30.component.html +0 -116
  212. package/src/demos/examples/example30.component.scss +0 -20
  213. package/src/demos/examples/example30.component.ts +0 -1070
  214. package/src/demos/examples/example32.component.html +0 -77
  215. package/src/demos/examples/example32.component.scss +0 -8
  216. package/src/demos/examples/example32.component.ts +0 -905
  217. package/src/demos/examples/example33.component.html +0 -50
  218. package/src/demos/examples/example33.component.scss +0 -46
  219. package/src/demos/examples/example33.component.ts +0 -571
  220. package/src/demos/examples/example34.component.html +0 -82
  221. package/src/demos/examples/example34.component.scss +0 -77
  222. package/src/demos/examples/example34.component.ts +0 -434
  223. package/src/demos/examples/example35.component.html +0 -77
  224. package/src/demos/examples/example35.component.scss +0 -18
  225. package/src/demos/examples/example35.component.ts +0 -264
  226. package/src/demos/examples/example36.component.html +0 -56
  227. package/src/demos/examples/example36.component.scss +0 -26
  228. package/src/demos/examples/example36.component.ts +0 -504
  229. package/src/demos/examples/example37.component.html +0 -30
  230. package/src/demos/examples/example37.component.ts +0 -123
  231. package/src/demos/examples/example38.component.html +0 -104
  232. package/src/demos/examples/example38.component.scss +0 -8
  233. package/src/demos/examples/example38.component.ts +0 -420
  234. package/src/demos/examples/example39.component.html +0 -112
  235. package/src/demos/examples/example39.component.scss +0 -8
  236. package/src/demos/examples/example39.component.ts +0 -371
  237. package/src/demos/examples/example40.component.html +0 -76
  238. package/src/demos/examples/example40.component.ts +0 -226
  239. package/src/demos/examples/example41.component.html +0 -50
  240. package/src/demos/examples/example41.component.scss +0 -42
  241. package/src/demos/examples/example41.component.ts +0 -229
  242. package/src/demos/examples/example42.component.html +0 -47
  243. package/src/demos/examples/example42.component.ts +0 -203
  244. package/src/demos/examples/example43.component.html +0 -94
  245. package/src/demos/examples/example43.component.scss +0 -30
  246. package/src/demos/examples/example43.component.ts +0 -449
  247. package/src/demos/examples/example44.component.html +0 -78
  248. package/src/demos/examples/example44.component.scss +0 -50
  249. package/src/demos/examples/example44.component.ts +0 -375
  250. package/src/demos/examples/example45-detail.component.html +0 -15
  251. package/src/demos/examples/example45-detail.component.ts +0 -97
  252. package/src/demos/examples/example45.component.html +0 -110
  253. package/src/demos/examples/example45.component.scss +0 -50
  254. package/src/demos/examples/example45.component.ts +0 -243
  255. package/src/demos/examples/filter-ng-select.component.ts +0 -33
  256. package/src/demos/examples/grid-custom-pager.component.html +0 -60
  257. package/src/demos/examples/grid-custom-pager.component.scss +0 -57
  258. package/src/demos/examples/grid-custom-pager.component.ts +0 -107
  259. package/src/demos/examples/grid-remote.component.html +0 -44
  260. package/src/demos/examples/grid-remote.component.ts +0 -164
  261. package/src/demos/examples/home.component.html +0 -39
  262. package/src/demos/examples/home.component.ts +0 -10
  263. package/src/demos/examples/jsonp.ts +0 -89
  264. package/src/demos/examples/rowdetail-preload.component.ts +0 -10
  265. package/src/demos/examples/swt-common-grid-pagination.component.ts +0 -160
  266. package/src/demos/examples/swt-common-grid-test.component.html +0 -37
  267. package/src/demos/examples/swt-common-grid-test.component.ts +0 -214
  268. package/src/demos/examples/swt-common-grid.component.ts +0 -436
  269. package/src/demos/examples/swt-logger.service.ts +0 -173
  270. package/src/demos/examples/utilities.ts +0 -9
  271. package/src/favicon.ico +0 -0
  272. package/src/index.html +0 -17
  273. package/src/library/components/__tests__/angular-slickgrid.component.spec.ts +0 -2638
  274. package/src/library/components/angular-slickgrid.component.html +0 -5
  275. package/src/library/components/angular-slickgrid.component.ts +0 -1662
  276. package/src/library/constants.ts +0 -105
  277. package/src/library/extensions/__tests__/slickRowDetailView.spec.ts +0 -751
  278. package/src/library/extensions/index.ts +0 -1
  279. package/src/library/extensions/slickRowDetailView.ts +0 -395
  280. package/src/library/global-grid-options.ts +0 -273
  281. package/src/library/index.ts +0 -11
  282. package/src/library/models/angularComponentOutput.interface.ts +0 -6
  283. package/src/library/models/angularGridInstance.interface.ts +0 -76
  284. package/src/library/models/externalTestingDependencies.interface.ts +0 -37
  285. package/src/library/models/gridOption.interface.ts +0 -15
  286. package/src/library/models/index.ts +0 -5
  287. package/src/library/models/rowDetailView.interface.ts +0 -16
  288. package/src/library/modules/angular-slickgrid.module.spec.ts +0 -25
  289. package/src/library/modules/angular-slickgrid.module.ts +0 -27
  290. package/src/library/services/__tests__/angularUtilService.spec.ts +0 -156
  291. package/src/library/services/__tests__/container.service.spec.ts +0 -25
  292. package/src/library/services/__tests__/translater.service.spec.ts +0 -43
  293. package/src/library/services/__tests__/utilities.spec.ts +0 -22
  294. package/src/library/services/angularUtil.service.ts +0 -120
  295. package/src/library/services/container.service.ts +0 -26
  296. package/src/library/services/index.ts +0 -4
  297. package/src/library/services/translater.service.ts +0 -38
  298. package/src/library/services/utilities.ts +0 -19
  299. package/src/library/slickgrid-config.ts +0 -10
  300. package/src/main.ts +0 -13
  301. package/src/public_api.ts +0 -1
  302. package/src/styles.scss +0 -178
  303. package/test/cypress/e2e/example01.cy.ts +0 -367
  304. package/test/cypress/e2e/example02.cy.ts +0 -60
  305. package/test/cypress/e2e/example03.cy.ts +0 -268
  306. package/test/cypress/e2e/example04.cy.ts +0 -254
  307. package/test/cypress/e2e/example05.cy.ts +0 -804
  308. package/test/cypress/e2e/example06.cy.ts +0 -890
  309. package/test/cypress/e2e/example07.cy.ts +0 -384
  310. package/test/cypress/e2e/example08.cy.ts +0 -190
  311. package/test/cypress/e2e/example09.cy.ts +0 -392
  312. package/test/cypress/e2e/example10.cy.ts +0 -650
  313. package/test/cypress/e2e/example11.cy.ts +0 -86
  314. package/test/cypress/e2e/example12.cy.ts +0 -269
  315. package/test/cypress/e2e/example13.cy.ts +0 -246
  316. package/test/cypress/e2e/example14.cy.ts +0 -122
  317. package/test/cypress/e2e/example15.cy.ts +0 -598
  318. package/test/cypress/e2e/example16.cy.ts +0 -427
  319. package/test/cypress/e2e/example17.cy.ts +0 -83
  320. package/test/cypress/e2e/example18.cy.ts +0 -431
  321. package/test/cypress/e2e/example19.cy.ts +0 -263
  322. package/test/cypress/e2e/example20.cy.ts +0 -264
  323. package/test/cypress/e2e/example21.cy.ts +0 -77
  324. package/test/cypress/e2e/example22.cy.ts +0 -94
  325. package/test/cypress/e2e/example23.cy.ts +0 -259
  326. package/test/cypress/e2e/example24.cy.ts +0 -707
  327. package/test/cypress/e2e/example25.cy.ts +0 -193
  328. package/test/cypress/e2e/example26.cy.ts +0 -111
  329. package/test/cypress/e2e/example27.cy.ts +0 -261
  330. package/test/cypress/e2e/example28.cy.ts +0 -740
  331. package/test/cypress/e2e/example29.cy.ts +0 -30
  332. package/test/cypress/e2e/example30.cy.ts +0 -757
  333. package/test/cypress/e2e/example31.cy.ts +0 -69
  334. package/test/cypress/e2e/example32.cy.ts +0 -272
  335. package/test/cypress/e2e/example33.cy.ts +0 -278
  336. package/test/cypress/e2e/example34.cy.ts +0 -84
  337. package/test/cypress/e2e/example35.cy.ts +0 -178
  338. package/test/cypress/e2e/example36.cy.ts +0 -219
  339. package/test/cypress/e2e/example37.cy.ts +0 -52
  340. package/test/cypress/e2e/example38.cy.ts +0 -160
  341. package/test/cypress/e2e/example39.cy.ts +0 -150
  342. package/test/cypress/e2e/example40.cy.ts +0 -126
  343. package/test/cypress/e2e/example41.cy.ts +0 -90
  344. package/test/cypress/e2e/example42.cy.ts +0 -82
  345. package/test/cypress/e2e/example43.cy.ts +0 -482
  346. package/test/cypress/e2e/example44.cy.ts +0 -458
  347. package/test/cypress/e2e/example45.cy.ts +0 -455
  348. package/test/cypress/e2e/home.cy.ts +0 -7
  349. package/test/cypress/fixtures/example.json +0 -5
  350. package/test/cypress/plugins/index.ts +0 -17
  351. package/test/cypress/plugins/utilities.ts +0 -28
  352. package/test/cypress/support/commands.ts +0 -88
  353. package/test/cypress/support/common.ts +0 -47
  354. package/test/cypress/support/drag.ts +0 -101
  355. package/test/cypress/support/index.ts +0 -20
  356. package/test/cypress/tsconfig.json +0 -9
  357. package/test/cypress.config.ts +0 -34
  358. package/test/mockSlickEvent.ts +0 -77
  359. package/test/rxjsResourceStub.ts +0 -69
  360. package/test/test-setup.ts +0 -6
  361. package/test/translateServiceStub.ts +0 -230
  362. package/test/translaterServiceStub.ts +0 -239
  363. package/test/tsconfig.json +0 -17
  364. package/test/vitest-global-mocks.ts +0 -41
  365. package/test/vitest-global-setup.ts +0 -3
  366. package/test/vitest-pretest.ts +0 -5
  367. package/tsconfig.app.json +0 -14
  368. package/tsconfig.json +0 -31
  369. package/tsconfig.spec.json +0 -11
  370. package/types/sortablejs.d.ts +0 -4
  371. package/vite.config.mts +0 -51
  372. /package/{dist/fesm2022 → fesm2022}/angular-slickgrid.mjs.map +0 -0
  373. /package/{dist/i18n → i18n}/en.json +0 -0
  374. /package/{dist/i18n → i18n}/fr.json +0 -0
  375. /package/{dist/index.d.ts → index.d.ts} +0 -0
  376. /package/{dist/library → library}/components/angular-slickgrid.component.d.ts +0 -0
  377. /package/{dist/library → library}/constants.d.ts +0 -0
  378. /package/{dist/library → library}/extensions/index.d.ts +0 -0
  379. /package/{dist/library → library}/extensions/slickRowDetailView.d.ts +0 -0
  380. /package/{dist/library → library}/global-grid-options.d.ts +0 -0
  381. /package/{dist/library → library}/index.d.ts +0 -0
  382. /package/{dist/library → library}/models/angularComponentOutput.interface.d.ts +0 -0
  383. /package/{dist/library → library}/models/angularGridInstance.interface.d.ts +0 -0
  384. /package/{dist/library → library}/models/externalTestingDependencies.interface.d.ts +0 -0
  385. /package/{dist/library → library}/models/gridOption.interface.d.ts +0 -0
  386. /package/{dist/library → library}/models/index.d.ts +0 -0
  387. /package/{dist/library → library}/models/rowDetailView.interface.d.ts +0 -0
  388. /package/{dist/library → library}/modules/angular-slickgrid.module.d.ts +0 -0
  389. /package/{dist/library → library}/services/angularUtil.service.d.ts +0 -0
  390. /package/{dist/library → library}/services/container.service.d.ts +0 -0
  391. /package/{dist/library → library}/services/index.d.ts +0 -0
  392. /package/{dist/library → library}/services/translater.service.d.ts +0 -0
  393. /package/{dist/library → library}/services/utilities.d.ts +0 -0
  394. /package/{dist/library → library}/slickgrid-config.d.ts +0 -0
  395. /package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
@@ -1,125 +0,0 @@
1
- ### Demo
2
-
3
- #### Header Button Plugin
4
- [Demo Page](https://ghiscoding.github.io/Angular-Slickgrid/#/headerbutton) / [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-headerbutton.component.ts)
5
-
6
- #### Header Menu Plugin
7
- [Demo Page](https://ghiscoding.github.io/Angular-Slickgrid/#/headermenu) / [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-headermenu.component.ts)
8
-
9
- ## Header Menu
10
- The `Header Menu` is now part of `Slickgrid-Universal` and is enabled by default via the grid option "enableHeaderMenu" flag.
11
-
12
- ### How to use it?
13
- #### It's Enabled by default
14
- Technically, it's enable by default and so you don't have anything to do to enjoy it. However if you want to customize the content of the Header Menu, then continue reading.
15
-
16
- ## Customization
17
- ### Custom Commands
18
- The Header Menu also comes, by default, with a list of built-in custom commands (all their `positionOrder` are in the reserved range of 40 to 60)
19
- - Sort Ascending (you can hide it with `hideSortCommands: true`)
20
- - Sort Descending (you can hide it with `hideSortCommands: true`)
21
- - Hide Column (you can hide it with `hideColumnHideCommand: true`)
22
-
23
- This section is called Custom Commands because you can also customize this section with your own commands. To do that, you need to fill in 2 properties (an array of `headerMenuItems` that will go under each column definition and define `onCommand` callbacks) in your Grid Options. For example, `Slickgrid-Universal` is configured by default with these settings (you can overwrite any one of them):
24
- ```ts
25
- this.gridOptions = {
26
- enableAutoResize: true,
27
- enableHeaderMenu: true, // <<-- this will automatically add extra custom commands
28
- enableFiltering: true,
29
- headerMenu: {
30
- onCommand: (e, args) => {
31
- if (args.command === 'hide') {
32
- this.controlService.hideColumn(args.column);
33
- this.controlService.autoResizeColumns();
34
- } else if (args.command === 'sort-asc' || args.command === 'sort-desc') {
35
- // get previously sorted columns
36
- const cols: ColumnSort[] = this.sortService.getPreviousColumnSorts(args.column.id + '');
37
-
38
- // add to the column array, the column sorted by the header menu
39
- cols.push({ sortCol: args.column, sortAsc: (args.command === 'sort-asc') });
40
- this.sortService.onLocalSortChanged(this.gridObj, this.gridOptions, this.dataviewObj, cols);
41
-
42
- // update the this.gridObj sortColumns array which will at the same add the visual sort icon(s) on the UI
43
- const newSortColumns: ColumnSort[] = cols.map((col) => {
44
- return { columnId: col.sortCol.id, sortAsc: col.sortAsc };
45
- });
46
- this.gridObj.setSortColumns(newSortColumns); // add sort icon in UI
47
- } else {
48
- alert('Command: ' + args.command);
49
- }
50
- }
51
- }
52
- };
53
- ```
54
- #### Callback Hooks
55
- There are 2 callback hooks which are accessible in the Grid Options
56
- - `onBeforeMenuShow`
57
- - `onCommand`
58
-
59
- For more info on all the available properties of the custom commands, you can read refer to the doc written in the Grid Menu [implementation](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/extensions/slickHeaderButtons.ts) itself.
60
-
61
- ### How to change icon(s) of the default commands?
62
- You can change any of the default command icon(s) by changing the `icon[X-command]`, for example, see below for the defaults.
63
- ```ts
64
- this.gridOptions = {
65
- enableHeaderMenu: true,
66
- headerMenu: {
67
- iconColumnHideCommand: 'mdi mdi-close'
68
- iconSortAscCommand: 'mdi mdi-sort-ascending'
69
- iconSortDescCommand: 'mdi mdi-sort-descending',
70
- },
71
- };
72
- ```
73
- ### How to Disable the Header Menu?
74
- You can disable the Header Menu, by calling `enableHeaderMenu: false` from the Grid Options.
75
- ```ts
76
- this.gridOptions = {
77
- enableHeaderMenu: false
78
- };
79
- ```
80
-
81
- ### How to Exclude Header Menu from a Particular Column?
82
- You can exclude a column from getting a Header Menu by calling `excludeFromHeaderMenu` in your Column Definition. For example, we don't need it on a column that has an edit icon:
83
-
84
- ```ts
85
- this.columnDefinitions = [
86
- { id: 'edit', formatter: Formatters.editIcon, excludeFromHeaderMenu: true, excludeFromExport: true },
87
- { id: 'title', name: 'Title', field: 'title', sortable: true },
88
- { id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true },
89
- ];
90
- ```
91
-
92
- ### Sample
93
- You can add Header Menu to 1 column or all columns like shown below. You can also add sub-menus by nesting `commandItems`
94
-
95
- ```ts
96
- // add custom Header Menu to all columns except "Action"
97
- this.columnDefinitions.forEach(col => {
98
- col.header = {
99
- menu: {
100
- commandItems: [
101
- { command: 'sort-ascending', title: 'Sort Ascending' },
102
- { command: 'sort-descending', title: 'Sort Descending' },
103
- 'divider',
104
- {
105
- // we can also have multiple nested sub-menus
106
- command: 'custom-actions', title: 'Hello', positionOrder: 99,
107
- commandItems: [
108
- { command: 'hello-world', title: 'Hello World' },
109
- { command: 'hello-slickgrid', title: 'Hello SlickGrid' },
110
- {
111
- command: 'sub-menu', title: `Let's play`, cssClass: 'green', subMenuTitle: 'choose your game', subMenuTitleCssClass: 'text-italic salmon',
112
- commandItems: [
113
- { command: 'sport-badminton', title: 'Badminton' },
114
- { command: 'sport-tennis', title: 'Tennis' },
115
- { command: 'sport-racquetball', title: 'Racquetball' },
116
- { command: 'sport-squash', title: 'Squash' },
117
- ]
118
- }
119
- ]
120
- }
121
- ]
122
- }
123
- };
124
- });
125
- ```
@@ -1,138 +0,0 @@
1
- ##### index
2
- - [Usage Demo](#usage)
3
- - [Resize by Content - Grid Options](#resize-by-content---grid-options)
4
- - [Resize by Content - Column Options](#resize-by-content---column-options)
5
-
6
- ### Demo
7
- [Demo](https://ghiscoding.github.io/Angular-Slickgrid/#/resize-by-content) / [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-resize-by-content.component.ts)
8
-
9
- ### Description
10
- The default of Slickgrid-Universal is to fit all columns in the container viewport and for the most part that is a good resize to use and it's fast. However if your grid has a lot of columns then doing a fit to viewport is not exactly great, you have lot of columns a few of these columns will become too small (we strongly suggest adding `minWidth` to every column) and you'll start seeing ellipsis to a few of these columns.
11
-
12
- The Auto-Resize by Cell Content will fix the problem described in previous paragraph, however it will come with a cost. It will read through all the cell content of all your items (because this could slow down the grid a lot, there's a default to not go over a 1000 rows but that could be overridden if you wish). For that reason the **resize by cell content** is an **opt-in** feature.
13
-
14
- How does it work? It loop through the dataset and try to calculate the best possible width, it does so by assuming a few things. For example we assume the a character is by default 7 pixels wide (via `resizeCellCharWidthInPx`), we also assume that not every data will be the same width for example string type might be a little less wide (with chars like "i", "l", "j" are thinner) compare to numbers which are always the same width and so have some ratio option for that (via `resizeDefaultRatioForStringType` and `resizeCalcWidthRatio`).
15
-
16
- There are a few configuration options you can use
17
- - ratio (`resizeDefaultRatioForStringType` and `resizeCalcWidthRatio`)
18
- - extra padding (`resizeExtraWidthPadding`)
19
- - char width
20
- - padding (`resizeCellPaddingWidthInPx`, `resizeFormatterPaddingWidthInPx`, `resizeExtraWidthPadding`)
21
- - max width threshold (`resizeMaxWidthThreshold`)
22
- ... and more
23
-
24
- ### Usage
25
-
26
- ```ts
27
- defineGrid() {
28
- this.columnDefinitions = [
29
- { id: 'action', field: 'action', name: 'Action', width: 50, maxWidth: 50 },
30
- { id: 'firstName', field: 'firstName', name: 'First Name', mindWidth: 100 },
31
- { id: 'lastName', field: 'lastName', name: 'First Name', mindWidth: 100, resizeExtraWidthPadding: 10 },
32
- // ...
33
- ];
34
-
35
- this.gridOptions = {
36
- // ...
37
- enableAutoResize: true,
38
-
39
- // resizing by cell content is opt-in
40
- // we first need to disable the 2 default flags to disable autoFit/autosize
41
- autoFitColumnsOnFirstLoad: false,
42
- enableAutoSizeColumns: false,
43
-
44
- // then enable resize by content with these 2 flags
45
- autosizeColumnsByCellContentOnFirstLoad: true,
46
- enableAutoResizeColumnsByCellContent: true,
47
- };
48
- }
49
- ```
50
-
51
- ### Resize by Content - Grid Options
52
- There a few grid options that you can change to override the default resize options. We listed the grid options below for the resize and they should all be there but just in case, you should also check the [GridOption](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/interfaces/gridOption.interface.ts) and [ResizeByContentOption](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/interfaces/resizeByContentOption.interface.ts) interface.
53
-
54
- ```ts
55
- export interface GridOption {
56
- //...
57
-
58
- /**
59
- * defaults to true, do we want to resize the grid by content only on the first page or anytime the data changes?
60
- * Requires `enableAutoResizeColumnsByCellContent` to be set.
61
- * Also don't get confused with `autosizeColumnsByCellContentOnFirstLoad` that flag won't block resize by content after the first load while `resizeByContentOnlyOnFirstLoad`
62
- */
63
- resizeByContentOnlyOnFirstLoad?: boolean;
64
-
65
- /** Resize by Content multiple options */
66
- resizeByContentOptions?: ResizeByContentOption;
67
- }
68
- ```
69
- and
70
-
71
- ```ts
72
- export interface ResizeByContentOption {
73
- /** defaults to false, if a column `width` is provided (or was previously calculated) should we recalculate it or not when resizing by cell content? */
74
- alwaysRecalculateColumnWidth?: boolean;
75
-
76
- /**
77
- * Defaults to 7, width in pixels of a string character which is used by the resize columns by its content, this can vary depending on which font family/size is used & cell padding.
78
- * This is only used when resizing the columns width by their content, we need to know the width of a character in pixel to do all calculations.
79
- * Requires `enableAutoResizeColumnsByCellContent` to be set.
80
- */
81
- cellCharWidthInPx?: number;
82
-
83
- /** Defaults to 6, cell padding width to add to the calculation when resizing columns by their cell text content (requires `enableAutoResizeColumnsByCellContent` to be set) */
84
- cellPaddingWidthInPx?: number;
85
-
86
- /** Defaults to around ~0.9, what is the ratio to use (on field `type` "string" only) in the calculation when resizing columns by their cell text content (requires `enableAutoResizeColumnsByCellContent` to be set). */
87
- defaultRatioForStringType?: number;
88
-
89
- /** Defaults to 6, padding width to add to the calculation when using a Formatter and resizing columns by their cell text content (requires `enableAutoResizeColumnsByCellContent` to be set). */
90
- formatterPaddingWidthInPx?: number;
91
-
92
- /**
93
- * Defaults to 1000, how many rows are we going to inspect cell content width?
94
- * This is use when calculating all column width by their cell content, it requires `enableAutoResizeColumnsByCellContent` to be set.
95
- */
96
- maxItemToInspectCellContentWidth?: number;
97
-
98
- /**
99
- * Defaults to 5000, how many rows (of a single column) are we going to inspect cell content width?
100
- * This is use when calculating column width by their cell content when calling "Resize by Content" (from header menu and/or double-click to resize single column)
101
- */
102
- maxItemToInspectSingleColumnWidthByContent?: number;
103
-
104
- /** Defaults to 50, what width to remove from new column width when the grid is a frozen (pinned) grid and its column width exceeds the viewport full width. */
105
- widthToRemoveFromExceededWidthReadjustment?: number;
106
- }
107
- ```
108
-
109
- ### Resize by Content - Column Options
110
- We listed the column definition options below for the resize and they should all be there but just in case, you should also check the [Column](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/interfaces/column.interface.ts) interface.
111
-
112
- ```ts
113
- export interface Column {
114
- /** defaults to false, if a column `width` is provided (or was previously calculated) should we recalculate it or not when resizing by cell content? */
115
- resizeAlwaysRecalculateWidth?: boolean;
116
-
117
- /**
118
- * Defaults to 1, a column width ratio to use in the calculation when resizing columns by their cell content.
119
- * We have this ratio number so that if we know that the cell content has lots of thin character (like 1, i, t, ...) we can lower the ratio to take up less space.
120
- * In other words and depending on which font family you use, each character will have different width, characters like (i, t, 1) takes a lot less space compare to (W, H, Q),
121
- * unless of course we use a monospace font family which will have the exact same size for each characters and in that case we leave it to 1 but that rarely happens.
122
- * NOTE: the default ratio is 1, except for string where we use a ratio of around ~0.9 since we have more various thinner characters like (i, l, t, ...).
123
- */
124
- resizeCalcWidthRatio?: number;
125
-
126
- /**
127
- * no defaults, a character width to use when resizing columns by their cell content.
128
- * If nothing is provided it will use `resizeCellCharWidthInPx` defined in the grid options.
129
- */
130
- resizeCharWidthInPx?: number;
131
-
132
- /** no defaults, what is the column max width threshold to not go over when resizing columns by their cell content */
133
- resizeMaxWidthThreshold?: number;
134
-
135
- /** no defaults, what is optional extra width padding to add to the calculation when resizing columns by their cell content */
136
- resizeExtraWidthPadding?: number;
137
- }
138
- ```
@@ -1,247 +0,0 @@
1
- #### index
2
- - [Single Row Selection](#single-row-selection)
3
- - [Multiple Row Selections](#multiple-row-selections)
4
- - [Change Dynamically Single/Multiple Selections](#changing-dynamically-from-single-to-multiple-selections-and-vice-versa)
5
- - [Mixing Single & Multiple Row Selections](#mixing-single--multiple-row-selections)
6
- - [Disable Custom Rows Selections via `selectableOverride`](#disable-custom-rows-selections-via-selectableoverride)
7
- - [Disable External Button when having Empty Selection](#disable-external-button-when-having-empty-selection)
8
- - [Change Row Selections](#change-row-selections)
9
- - Troubleshooting
10
- - [Adding a Column dynamically is removing the Row Selection, why is that?](#adding-a-column-dynamically-is-removing-the-row-selection-why-is-that)
11
-
12
- ### Description
13
- For row selection, you can simply play with couple of grid options (see below) and subscribe to `onSelectedRowsChanged` (a SlickGrid Event that is, it's not an Observable). However please note that `onSelectedRowsChanged` is a function available on the `Grid` object and you will need bind to `(gridChanged)` to get the object when grid is ready. There are 2 types of row selection(s) which you can do.
14
-
15
- **Note:** `enableCheckboxSelector` and `enableExcelCopyBuffer` do not work well together, this is because they both share the same `Row.SelectionModel` and one cancels the other. It is recommended to not use `enableExcelCopyBuffer` in that case.
16
-
17
- ### Demo
18
- [Demo Page](https://ghiscoding.github.io/Angular-Slickgrid/#/selection) / [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-rowselection.component.ts)
19
-
20
- ## Single Row Selection
21
- For a single row selection, you need to have `enableCellNavigation: true`, `enableRowSelection: true` and `multiSelect: false` and as described earlier, subscribe to `onSelectedRowsChanged` (for that you need to bind to `(gridChanged)`).
22
-
23
- **Note:** if you want to change from Multiple Selections to Single Selection (and vice-versa), you could use the grid options `enableCellNavigation` flag, however this is not possible when using Inline Editors since this flag is required. However, there is no other known ways of toggling dynamically.
24
-
25
- #### View
26
- ```html
27
- <angular-slickgrid gridId="grid4"
28
- [columns]="columnDefinitions"
29
- [options]="gridOptions"
30
- [dataset]="dataset"
31
- (onSelectedRowsChanged)="onSelectedRowsChanged($event.detail.eventData, $event.detail.args)">
32
- </angular-slickgrid>
33
- ```
34
-
35
- #### Component
36
- ```ts
37
- this.gridOptions = {
38
- enableAutoResize: true,
39
- enableCellNavigation: true,
40
- enableCheckboxSelector: true,
41
- enableRowSelection: true,
42
- multiSelect: false,
43
- }
44
-
45
- onSelectedRowsChanged(e, args) {
46
- if (Array.isArray(args.rows)) {
47
- this.selectedObjects = args.rows.map(idx => {
48
- const item = grid.getDataItem(idx);
49
- return item.title || '';
50
- });
51
- }
52
- }
53
- ```
54
-
55
- ## Multiple Row Selections
56
- As for multiple row selections, you need to provide an extra grid option of `rowSelectionOptions` which is an object and within it, you need to disable the `selectActiveRow` flag. The other configurations are the same as a Single Selection, which is to enable `enableCheckboxSelector` and `enableRowSelection`. Then as describe earlier, you will subscribe to `onSelectedRowsChanged` (for that you need to bind to `(gridChanged)`).
57
-
58
- #### View
59
- ```html
60
- <angular-slickgrid gridId="grid4"
61
- [columns]="columnDefinitions"
62
- [options]="gridOptions"
63
- [dataset]="dataset"
64
- (onSelectedRowsChanged)="onSelectedRowsChanged($event.detail.eventData, $event.detail.args)">
65
- </angular-slickgrid>
66
- ```
67
-
68
- #### Component
69
- ```typescript
70
- export class Example1 implements OnInit {
71
- ngOnInit() {
72
- this.gridOptions = {
73
- enableAutoResize: true,
74
- enableCellNavigation: true,
75
- enableCheckboxSelector: true,
76
- enableRowSelection: true,
77
- rowSelectionOptions: {
78
- // True (Single Selection), False (Multiple Selections)
79
- selectActiveRow: false
80
- },
81
- }
82
- }
83
-
84
- onSelectedRowsChanged(e, args) {
85
- if (Array.isArray(args.rows)) {
86
- // user clicked on the 1st column, multiple checkbox selection
87
- console.log('multiple row checkbox selected', event, args);
88
- }
89
- }
90
- ```
91
- ## Changing Dynamically from Single to Multiple Selections (and vice-versa)
92
- If you want to change from Multiple Selections to Single Selection (and vice-versa), you could toggle the grid options `enableCellNavigation` flag (`False` when you want Single Selection), however this is not possible when using Inline Editors since this flag is required. Note that there is currently no other ways of toggling dynamically without re-creating the grid.
93
-
94
- ## Mixing Single & Multiple Row Selections
95
- SlickGrid is so powerful and customizable, you could if you wish mix the multiple row selections (cell column 1) and single row selection (any other cell click). For that though, you will need to use 2 SlickGrid Events (`onClick` and `onSelectedRowsChanged`). For example we can do it this way:
96
-
97
- #### View
98
- ```html
99
- <angular-slickgrid gridId="grid4"
100
- [columns]="columnDefinitions"
101
- [options]="gridOptions"
102
- [dataset]="dataset"
103
- (onSelectedRowsChanged)="onSelectedRowsChanged($event.detail.eventData, $event.detail.args)"
104
- (onClick)="onCellClicked($event.detail.eventData, $event.detail.args)">
105
- </angular-slickgrid>
106
- ```
107
-
108
- #### Component
109
- ```typescript
110
- export class Example1 implements OnInit {
111
- onSelectedRowsChanged(e, args) {
112
- // user clicked on the 1st column, multiple checkbox selection
113
- console.log('multiple row checkbox selected', event, args);
114
- }
115
-
116
- onCellClicked(e, args) {
117
- // when clicking on any cell, we will make it the new selected row
118
- // however, we don't want to interfere with multiple row selection checkbox which is on 1st column cell
119
- if (args.cell !== 0) {
120
- grid.setSelectedRows([args.row]);
121
- }
122
- }
123
- }
124
- ```
125
-
126
- ## Disable Custom Rows Selections via `selectableOverride`
127
- You can use `selectableOverride` to provide custom logic to disable certain rows selections, for example the code below will remove the row selection on every second row.
128
-
129
- #### Component
130
- ```typescript
131
- export class Example1 implements OnInit {
132
- prepareGrid() {
133
- this.gridOptions = {
134
- enableRowSelection: true,
135
- enableCheckboxSelector: true,
136
- checkboxSelector: {
137
- // you can override the logic for showing (or not) the expand icon
138
- // for example, display the expand icon only on every 2nd row
139
- selectableOverride: (row: number, dataContext: any, grid: any) => (dataContext.id % 2 === 1)
140
- },
141
- multiSelect: false,
142
- rowSelectionOptions: {
143
- // True (Single Selection), False (Multiple Selections)
144
- selectActiveRow: true,
145
- },
146
- };
147
- }
148
- }
149
- ```
150
-
151
- ### Disable External Button when having Empty Selection
152
- When having an external button that you want to work only when there's row selection, there are 2 ways of doing this.
153
- 1. use the `onSelectedRowsChanged` event (via your View in HTML or via ViewModel)
154
- ```html
155
- <button disabled.bind="isMyButtonDisabled">My Button</button>
156
- <angular-slickgrid gridId="grid2"
157
- [columns]="columnDefinitions"
158
- [options]="gridOptions"
159
- [dataset]="dataset"
160
- (onSelectedRowsChanged)="handleOnSelectedRowsChanged($event.detail.args)">
161
- </angular-slickgrid>
162
- ```
163
- ```ts
164
- isMyButtonDisabled = false;
165
-
166
- handleOnSelectedRowsChanged(args) {
167
- this.isMyButtonDisabled = args?.rows?.length === 0;
168
- }
169
- ```
170
- 2. use the `onGridStateChanged` event (see [Grid State & Presets](Grid-State-&-Preset.md) Wiki)
171
- ```html
172
- <button disabled.bind="isMyButtonDisabled">My Button</button>
173
- <angular-slickgrid gridId="grid2"
174
- [columns]="columnDefinitions"
175
- [options]="gridOptions"
176
- [dataset]="dataset"
177
- (onGridStateChanged)="handleOngridStateChanged($event.detail.args)">
178
- </angular-slickgrid>
179
- ```
180
- ```ts
181
- isMyButtonDisabled = false;
182
-
183
- handleOngridStateChanged(gridState) {
184
- if (Array.isArray(gridState?.rowSelection.dataContextIds)) {
185
- this.isMassSelectionDisabled = gridState.rowSelection.dataContextIds.length === 0;
186
- }
187
- }
188
- ```
189
-
190
- ### Change Row Selections
191
- You can change which row(s) are selected by using the built-in SlickGrid method `setSelectedRows(rowIndexes)` (passing an empty array will clear all selection), however please note that it requires an array of row indexes as you see them in the UI and it won't work that great with Pagination (if that is what you are looking for then take a look at this Stack Overflow [Q&A](https://stackoverflow.com/questions/59629565/want-to-change-gridoption-preselectedrows-row-in-angular-slickgrid-dynamically-o))
192
-
193
- ```html
194
- <angular-slickgrid gridId="grid2"
195
- [columns]="columnDefinitions"
196
- [options]="gridOptions"
197
- [dataset]="dataset"
198
- (onAngularGridCreated)="angularGridReady($event.detail)">
199
- </angular-slickgrid>
200
- ```
201
-
202
- ```ts
203
- export class Example1 {
204
- angularGrid: AngularGridInstance;
205
-
206
- angularGridReady(angularGrid: AngularGridInstance) {
207
- this.angularGrid = angularGrid;
208
- this.gridObj = angularGrid.slickGrid;
209
- }
210
-
211
- changeRowSelections() {
212
- this.angularGrid.slickGrid.setSelectedRows(rowIndexes);
213
-
214
- // OR providing an empty array will clear the row selection
215
- // this.angularGrid.slickGrid.setSelectedRows([]);
216
- }
217
- }
218
- ```
219
-
220
- ## Troubleshooting
221
- ### Adding a Column dynamically is removing the Row Selection, why is that?
222
- The reason is because the Row Selection (checkbox) plugin is a special column and Angular-Slickgrid is adding an extra column dynamically for the Row Selection checkbox and that is **not** reflected in your local copy of `columnDefinitions`. To address this issue, you need to get the Angular-Slickgrid internal copy of all columns (including the extra columns), you can get it via `getAllColumnDefinitions()` from the Grid Service and then you can use to that array and that will work.
223
-
224
- ```html
225
- <angular-slickgrid gridId="grid17"
226
- [columns]="columnDefinitions"
227
- [options]="gridOptions"
228
- [dataset]="dataset"
229
- (onAngularGridCreated)="angularGridReady($event.detail)">
230
- </angular-slickgrid>
231
- ```
232
- ```ts
233
- angularGridReady(angularGrid: AngularGridInstance) {
234
- this.angularGrid = angularGrid;
235
- }
236
-
237
- addNewColumn() {
238
- const newColumn = { /*...*/ };
239
-
240
- const allColumns = this.angularGrid.gridService.getAllColumnDefinitions();
241
- allColumns.push(newColumn);
242
- this.columnDefinitions = allColumns.slice(); // or use spread operator [...cols]
243
-
244
- // you could also use SlickGrid setColumns() method
245
- // this.angularGrid.slickGrid.setColumns(cols);
246
- }
247
- ```
@@ -1,71 +0,0 @@
1
- #### index
2
- - [The action column](#the-action-column)
3
- - [Multiple Row Selections](#multiple-row-selections)
4
- - [Change Dynamically Single/Multiple Selections](#changing-dynamically-from-single-to-multiple-selections-and-vice-versa)
5
- - [Mixing Single & Multiple Row Selections](#mixing-single--multiple-row-selections)
6
- - [Disable Custom Rows Selections via `selectableOverride`](#disable-custom-rows-selections-via-selectableoverride)
7
- - [Disable External Button when having Empty Selection](#disable-external-button-when-having-empty-selection)
8
- - [Change Row Selections](#change-row-selections)
9
- - Troubleshooting
10
- - [Adding a Column dynamically is removing the Row Selection, why is that?](#adding-a-column-dynamically-is-removing-the-row-selection-why-is-that)
11
-
12
- ### Description
13
- The Row based editing plugin makes it possible to keep the grid readonly except for rows which the user explicitely toggles into edit mode.
14
-
15
- **Note:** This plugin enforces the use of the `autoEdit` option and will turn it on with a console warning if its not already.
16
-
17
- ### Demo
18
- [Demo](https://ghiscoding.github.io/Angular-Slickgrid/#/base-row-editing) / [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-base-row-editing.component.ts)
19
-
20
- ## The action column
21
- A new column is rendered that shows an edit/delete button. If the user clicks on edit, a save and cancel button are shown instead and the row toggles into edit mode. By default as the last column but you can override it with the option `columnIndexPosition`. Additionally it's default column id can be overriden using the opiton `columnId`. Furthermore, you can also override the columns label via the `actionsColumnLabel` property.
22
-
23
- ### Single or multiple editable rows
24
- By default you can only toggle a single row into edit mode. If you set the option `allowMultipleRows` to `true` on the other hand, you can toggle as many as you want.
25
-
26
- ### Configuring the action buttons
27
- You can override the styling, the hover text as well as whether a prompt — and with what text — should be shown. It is done by overriding the `actionButtons` property of the [plugins options](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/interfaces/rowBasedEditOption.interface.ts).
28
-
29
- ## Support for the Excel Copy Buffer Plugin
30
- If the [Excel Copy Buffer Plugin](excel-copy-buffer.md) is configured, the Row based editing pluging will override it's behavior by denying pastes on all cells not within a edit mode row. Nevertheless, any existing `BeforePasteCellHandler` will be respected.
31
-
32
- ## How the plugin works
33
- The idea of the plugin is to focus the users editing experience on specific individual rows and and save them individually. This is achieved by letting the user toggle one or more rows into edit mode.
34
- When a that happens a potentially registered `onBeforeEditMode` callback is executed to handle various preparation or cleanup tasks. Now changes can be made to those rows and will be highlighted and tracked. The user may cancel the edit mode at any time and revert all cells changes. If the save button is pressed on the other hand an `onBeforeRowUpdated` hook, which you define via plugin options, is called and expects a `Promise<boolean>`. In that method you'd typically write the changes to your backend and return either true or false based on the operations outcome. If a negative boolean is returned the edit mode is kept, otherwise the row applies the changes and toggles back into readonly mode. That means, no modifications can be done on the grid.
35
-
36
- Here's the respective code shown in Example22:
37
-
38
- #### ViewModel
39
- ```ts
40
- onBeforeRowUpdated(args) {
41
- const { effortDriven, percentComplete, finish, start, duration, title } = args.dataContext;
42
-
43
- if (duration > 40) {
44
- alert('Sorry, 40 is the maximum allowed duration.');
45
- return Promise.resolve(false);
46
- }
47
-
48
- return fakeFetch('your-backend-api/endpoint', {
49
- method: 'POST',
50
- body: JSON.stringify({ effortDriven, percentComplete, finish, start, duration, title }),
51
- headers: {
52
- 'Content-type': 'application/json; charset=UTF-8'
53
- }
54
- }).catch(err => {
55
- console.error(err);
56
- return false;
57
- })
58
- .then(response => {
59
- if (response === false) { // <---- the negative response, e.g validation failed, keep the row as is
60
- return false;
61
- }
62
- if (typeof response === 'object') {
63
- return response!.json();
64
- }
65
- })
66
- .then(json => {
67
- alert(json.message);
68
- return true; // <--- all good, apply changes in grid and toggle row into readonly mode
69
- });
70
- },
71
- ```