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,466 +0,0 @@
1
- #### Index
2
- - [Using fixed `collection` or `collectionAsync`](#using-collection-or-collectionasync)
3
- - [Editor Options (`AutocompleterOption` interface)](#editor-options-autocompleteroption-interface)
4
- - [Using Remote API](#using-external-remote-api)
5
- - [Basic Usage](#remote-api-basic)
6
- - [Basic Usage with Object Result (**preferred way**)](#remote-api-basic-with-object-result)
7
- - [with `renderItem` + custom Layout (`twoRows` or `fourCorners`)](#remote-api-renderitem-callback--custom-layout-tworows-or-fourcorners)
8
- - [Custom Styling - SASS variables](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/styles/_variables.scss#L141)
9
- - [Force User Input](#autocomplete---force-user-input)
10
- - [How to change drop container dimensions?](#how-to-change-drop-container-dimensions)
11
- - [Animated Gif Demo](#animated-gif-demo)
12
- - See the [Editors - Wiki](../Editors.md) for more general info about Editors (validators, event handlers, ...)
13
-
14
- ### Demo
15
- [Demo Page](https://ghiscoding.github.io/Angular-Slickgrid/#/editor) | [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-editor.component.ts)
16
-
17
- ### Introduction
18
- AutoComplete is a functionality that let the user start typing characters and the autocomplete will try to give suggestions according to the characters entered. The collection can be a fixed JSON files (collection of strings or objects) or can also be an external remote resource to an external API. For a demo of what that could look like, take a look at the [animated gif demo](#animated-gif-demo) below.
19
-
20
- We use an external lib named [Autocomplete](https://github.com/kraaden/autocomplete) (aka `autocompleter` on npm) by Kraaden.
21
-
22
- ## Using `collection` or `collectionAsync`
23
- If you want to pass the entire list to the AutoComplete (like a JSON file or a Web API call), you can do so using the `collection` or the `collectionAsync` (the latter will load it asynchronously). You can also see that the Editor and Filter have almost the exact same configuration (apart from the `model` that is obviously different).
24
-
25
- ##### Component
26
- ```typescript
27
- export class GridBasicComponent {
28
- columnDefinitions: Column[];
29
- gridOptions: GridOption;
30
- dataset: any[];
31
-
32
- defineGrid(): void {
33
- // your columns definition
34
- this.columnDefinitions = [
35
- {
36
- id: 'countryOfOrigin', name: 'Country of Origin', field: 'countryOfOrigin',
37
- formatter: Formatters.complexObject,
38
- dataKey: 'code', // our list of objects has the structure { code: 'CA', name: 'Canada' }, since we want to use the code`, we will set the dataKey to "code"
39
- labelKey: 'name', // while the displayed value is "name"
40
- type: 'object',
41
- sorter: Sorters.objectString, // since we have set dataKey to "code" our output type will be a string, and so we can use this objectString, this sorter always requires the dataKey
42
- filterable: true,
43
- sortable: true,
44
- minWidth: 100,
45
- editor: {
46
- model: Editors.autocompleter,
47
- customStructure: { label: 'name', value: 'code' },
48
- collectionAsync: this.http.get('assets/data/countries.json'), // this demo will load the JSON file asynchronously
49
- },
50
- filter: {
51
- model: Filters.autocompleter,
52
- customStructure: { label: 'name', value: 'code' },
53
- collectionAsync: this.http.get('assets/data/countries.json'),
54
- }
55
- }
56
- ];
57
-
58
- this.gridOptions = {
59
- // your grid options config
60
- }
61
- }
62
- }
63
- ```
64
-
65
- ### Collection Label Render HTML
66
- By default HTML is not rendered and the `label` will simply show HTML as text. But in some cases you might want to render it, you can do so by enabling the `enableRenderHtml` flag.
67
-
68
- **NOTE:** this is currently only used by the Editors that have a `collection` which are the `MultipleSelect` & `SingleSelect` Editors.
69
-
70
- ```typescript
71
- this.columnDefinitions = [
72
- {
73
- id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven',
74
- formatter: Formatters.checkmarkMaterial,
75
- type: 'boolean',
76
- editor: {
77
- model: Editors.autocompleter,
78
- placeholder: '🔍 search city',
79
-
80
- // example with a fixed Collection (or collectionAsync)
81
- // previously known as `editorOptions` for < 9.0
82
- options: {
83
- showOnFocus: true, // display the list on focus of the autocomplete (without the need to type anything)
84
- } as AutocompleterOption,
85
- enableRenderHtml: true, // this flag only works with a fixed Collection
86
- // collectionAsync: this.http.get(URL_COUNTRIES_COLLECTION),
87
- collection: [
88
- { value: '', label: '' },
89
- { value: true, label: 'True', labelPrefix: `<i class="mdi mdi-plus"></i> ` },
90
- { value: false, label: 'False', labelPrefix: `<i class="mdi mdi-minus"></i> ` }
91
- ],
92
- }
93
- }
94
- ];
95
- ```
96
-
97
- ### Editor Options (`AutocompleterOption` interface)
98
- All the available options that can be provided as editor `options` to your column definitions can be found under this [AutocompleterOption interface](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/interfaces/autocompleterOption.interface.ts) and you should cast your editor `options` to that interface to make sure that you use only valid options of the autocomplete library.
99
-
100
- ```ts
101
- editor: {
102
- model: Editors.autocompleter,
103
- // previously known as `editorOptions` for < 9.0
104
- options: {
105
- minLength: 3,
106
- } as AutocompleterOption
107
- }
108
- ```
109
-
110
- #### Grid Option `defaultEditorOptions
111
- You could also define certain options as a global level (for the entire grid or even all grids) by taking advantage of the `defaultEditorOptions` Grid Option. Note that they are set via the editor type as a key name (`autocompleter`, `date`, ...) and then the content is the same as editor `options` (also note that each key is already typed with the correct editor option interface), for example
112
-
113
- ```ts
114
- this.gridOptions = {
115
- defaultEditorOptions: {
116
- autocompleter: { debounceWaitMs: 150 }, // typed as AutocompleterOption
117
- }
118
- }
119
- ```
120
-
121
- ## Using External Remote API
122
- You could also use external 3rd party Web API (can be JSONP query or regular JSON). This will make a much shorter result since it will only return a small subset of what will be displayed in the AutoComplete Editor or Filter. For example, we could use GeoBytes which provide a JSONP Query API for the cities of the world, you can imagine the entire list of cities would be way too big to download locally, so this is why we use such API.
123
-
124
- ### Remote API (basic)
125
- The basic functionality will use built-in 3rd party lib styling that is to display a label/value pair item result.
126
-
127
- ##### Component
128
- ```typescript
129
- export class GridBasicComponent {
130
- columnDefinitions: Column[];
131
- gridOptions: GridOption;
132
- dataset: any[];
133
-
134
- defineGrid() {
135
- // your columns definition
136
- this.columnDefinitions = [
137
- {
138
- id: 'product', name: 'Product', field: 'product',
139
- filterable: true,
140
- minWidth: 100,
141
- editor: {
142
- model: Editors.autocompleter,
143
- alwaysSaveOnEnterKey: true,
144
- // previously known as `editorOptions` for < 9.0
145
- options: {
146
- showOnFocus: true,
147
- minLength: 1,
148
- fetch: (searchText, updateCallback) => {
149
- // assuming your API call returns a label/value pair
150
- yourAsyncApiCall(searchText) // typically you'll want to return no more than 10 results
151
- .then(result => updateCallback((results.length > 0) ? results : [{ label: 'No match found.', value: '' }]))
152
- .catch(error => console.log('Error:', error));
153
- },
154
- }
155
- } as AutocompleterOption,
156
- },
157
- ];
158
-
159
- this.gridOptions = {
160
- // your grid options config
161
- }
162
- }
163
- }
164
- ```
165
-
166
- ### Remote API (basic with object result)
167
- This is the preferred way of dealing with the AutoComplete, the main reason is because the AutoComplete uses an `<input/>` and that means we can only keep 1 value and if we do then we lose the text label and so using an Object Result makes more sense. Note however that you'll need a bit more code that is because we'll use the `'object'` and so we need to provide a custom `SortComparer` and also a custom `Formatters` and for them to work we also need to provide a `dataKey` (the value) and a `labelKey` (text label) as shown below.
168
- ```ts
169
- this.columnDefinitions = [
170
- {
171
- id: 'product', name: 'Product', field: 'product',
172
- dataKey: 'id',
173
- labelKey: 'name', // (id/name) pair to override default (value/label) pair
174
- editor: {
175
- model: Editors.autocompleter,
176
- alwaysSaveOnEnterKey: true,
177
- type: 'object',
178
- sortComparer: SortComparers.objectString,
179
- options: {
180
- showOnFocus: true,
181
- minLength: 1,
182
- fetch: (searchText, updateCallback) => {
183
- // assuming your API call returns a label/value pair
184
- yourAsyncApiCall(searchText) // typically you'll want to return no more than 10 results
185
- .then(result => updateCallback((results.length > 0) ? results : [{ label: 'No match found.', value: '' }]))
186
- .catch(error => console.log('Error:', error));
187
- }
188
- },
189
- } as AutocompleterOption,
190
- }
191
- ];
192
- ```
193
-
194
- ### Remote API with `renderItem` + custom layout (`twoRows` or `fourCorners`)
195
- #### See animated gif ([twoRows](#with-tworows-custom-layout-without-optional-left-icon) or [fourCorners](#with-fourcorners-custom-layout-with-extra-optional-left-icon))
196
- The lib comes with 2 built-in custom layouts, these 2 layouts also have SASS variables if anyone wants to style it differently. When using the `renderItem`, it will require the user to provide a `layout` (2 possible options `twoRows` or `fourCorners`) and also a `templateCallback` that will be executed when rendering the AutoComplete Search List Item. For example:
197
-
198
- ##### Component
199
- ```typescript
200
- export class GridBasicComponent {
201
- columnDefinitions: Column[];
202
- gridOptions: GridOption;
203
- dataset: any[];
204
-
205
- defineGrid() {
206
- // your columns definition
207
- this.columnDefinitions = [
208
- {
209
- id: 'product', name: 'Product', field: 'product',
210
- filterable: true,
211
- minWidth: 100,
212
- editor: {
213
- model: Editors.autocompleter,
214
- alwaysSaveOnEnterKey: true,
215
- customStructure: {
216
- label: 'itemName',
217
- value: 'id'
218
- },
219
- // previously known as `editorOptions` for < 9.0
220
- options: {
221
- showOnFocus: true,
222
- minLength: 1,
223
- fetch: (searchText, updateCallback) => {
224
- yourAsyncApiCall(searchText) // typically you'll want to return no more than 10 results
225
- .then(result => updateCallback((results.length > 0) ? results : [{ label: 'No match found.', value: '' }]))
226
- .catch(error => console.log('Error:', error));
227
- }
228
- },
229
- renderItem: {
230
- layout: 'twoRows',
231
- templateCallback: (item: any) => `<div class="autocomplete-container-list">
232
- <div class="autocomplete-left">
233
- <span class="mdi ${item.icon} mdi-26px"></span>
234
- </div>
235
- <div>
236
- <span class="autocomplete-top-left">
237
- <span class="mdi ${item.itemTypeName === 'I' ? 'mdi-information-outline' : 'mdi-content-copy'} mdi-14px"></span>
238
- ${item.itemName}
239
- </span>
240
- <div>
241
- </div>
242
- <div>
243
- <div class="autocomplete-bottom-left">${item.itemNameTranslated}</div>
244
- </div>`,
245
- },
246
- } as AutocompleterOption,
247
- },
248
- ];
249
-
250
- this.gridOptions = {
251
- // your grid options config
252
- }
253
- }
254
- }
255
- ```
256
-
257
- ### Remote API `renderItem` callback + custom layout (`twoRows` or `fourCorners`)
258
- #### See animated gif ([twoRows](#with-tworows-custom-layout-without-optional-left-icon) or [fourCorners](#with-fourcorners-custom-layout-with-extra-optional-left-icon))
259
- The previous example can also be written using the `renderItem` callback and adding `classes`, this is actually what Slickgrid-Universal does internally, you can do it yourself if you wish to have more control on the render callback result.
260
-
261
- ##### Component
262
- ```typescript
263
- export class GridBasicComponent {
264
- columnDefinitions: Column[];
265
- gridOptions: GridOption;
266
- dataset: any[];
267
-
268
- defineGrid() {
269
- // your columns definition
270
- this.columnDefinitions = [
271
- {
272
- id: 'product', name: 'Product', field: 'product',
273
- filterable: true,
274
- minWidth: 100,
275
- editor: {
276
- model: Editors.autocompleter,
277
- alwaysSaveOnEnterKey: true,
278
- customStructure: {
279
- label: 'itemName',
280
- value: 'id'
281
- },
282
- // previously known as `editorOptions` for < 9.0
283
- options: {
284
- showOnFocus: true,
285
- minLength: 1,
286
- classes: {
287
- // choose a custom style layout
288
- // 'ui-autocomplete': 'autocomplete-custom-two-rows',
289
- 'ui-autocomplete': 'autocomplete-custom-four-corners',
290
- },
291
- fetch: (searchText, updateCallback) => {
292
- yourAsyncApiCall(searchText) // typically you'll want to return no more than 10 results
293
- .then(result => updateCallback((results.length > 0) ? results : [{ label: 'No match found.', value: '' }]))
294
- .catch(error => console.log('Error:', error);
295
- },
296
- renderItem: {
297
- layout: 'twoRows',
298
- templateCallback: (item: any) => `<div class="autocomplete-container-list">
299
- <div class="autocomplete-left">
300
- <span class="mdi ${item.icon} mdi-26px"></span>
301
- </div>
302
- <div>
303
- <span class="autocomplete-top-left">
304
- <span class="mdi ${item.itemTypeName === 'I' ? 'mdi-information-outline' : 'mdi-content-copy'} mdi-14px"></span>
305
- ${item.itemName}
306
- </span>
307
- <div>
308
- </div>
309
- <div>
310
- <div class="autocomplete-bottom-left">${item.itemNameTranslated}</div>
311
- </div>`,
312
- },
313
- } as AutocompleterOption,
314
- callbacks: {
315
- // callback on the AutoComplete on the instance
316
- renderItem: {
317
- templateCallback: (item: any) => {
318
- return `<div class="autocomplete-container-list">
319
- <div class="autocomplete-left">
320
- <!--<img src="http://i.stack.imgur.com/pC1Tv.jpg" width="50" />-->
321
- <span class="mdi ${item.icon} mdi-26px"></span>
322
- </div>
323
- <div>
324
- <span class="autocomplete-top-left">
325
- <span class="mdi ${item.itemTypeName === 'I' ? 'mdi-information-outline' : 'mdi-content-copy'} mdi-14px"></span>
326
- ${item.itemName}
327
- </span>
328
- <span class="autocomplete-top-right">${formatNumber(item.listPrice, 2, 2, false, '$')}</span>
329
- <div>
330
- </div>
331
- <div>
332
- <div class="autocomplete-bottom-left">${item.itemNameTranslated}</div>
333
- <span class="autocomplete-bottom-right">Type: <b>${item.itemTypeName === 'I' ? 'Item' : item.itemTypeName === 'C' ? 'PdCat' : 'Cat'}</b></span>
334
- </div>`;
335
- }
336
- },
337
- },
338
- }
339
- ];
340
-
341
- this.gridOptions = {
342
- // your grid options config
343
- }
344
- }
345
- }
346
- ```
347
-
348
- #### with JSONP
349
- Example from an external remote API (geobytes) returning a JSONP response.
350
-
351
- ##### Component
352
- ```typescript
353
- export class GridBasicComponent {
354
- columnDefinitions: Column[];
355
- gridOptions: GridOption;
356
- dataset: any[];
357
-
358
- defineGrid(): void {
359
- // your columns definition
360
- this.columnDefinitions = [
361
- {
362
- id: 'cityOfOrigin', name: 'City of Origin', field: 'cityOfOrigin',
363
- filterable: true,
364
- minWidth: 100,
365
- editor: {
366
- model: Editors.autocompleter,
367
- placeholder: 'search city', // you can provide an optional placeholder to help your users
368
-
369
- // use your own autocomplete options, instead of $.ajax, use http
370
- // here we use $.ajax just because I'm not sure how to configure http with JSONP and CORS
371
- options: {
372
- minLength: 3, // minimum count of character that the user needs to type before it queries to the remote
373
- fetch: (searchText, updateCallback) => {
374
- // assuming your API call returns a label/value pair
375
- yourAsyncApiCall(searchText) // typically you'll want to return no more than 10 results
376
- .then(result => updateCallback((results.length > 0) ? results : [{ label: 'No match found.', value: '' }]))
377
- .catch(error => console.log('Error:', error));
378
- }
379
- },
380
- },
381
- filter: {
382
- model: Editors.autocompleter,
383
- // placeholder: '&#128269; search city', // &#128269; is a search icon, this provide an option placeholder
384
-
385
- // use your own autocomplete options, instead of $.ajax, use http
386
- // here we use $.ajax just because I'm not sure how to configure http with JSONP and CORS
387
- options: {
388
- minLength: 3, // minimum count of character that the user needs to type before it queries to the remote
389
- fetch: (searchText, updateCallback) => {
390
- // assuming your API call returns a label/value pair
391
- yourAsyncApiCall(searchText) // typically you'll want to return no more than 10 results
392
- .then(result => updateCallback((results.length > 0) ? results : [{ label: 'No match found.', value: '' }]))
393
- .catch(error => console.log('Error:', error));
394
- }
395
- },
396
- }
397
- }
398
- ];
399
-
400
- this.gridOptions = {
401
- // your grid options config
402
- }
403
- }
404
- }
405
- ```
406
-
407
- ## Autocomplete - force user input
408
- If you want to add the autocomplete functionality but want the user to be able to input a new option, then follow the example below:
409
-
410
- ```ts
411
- this.columnDefinitions = [{
412
- id: 'area',
413
- name: 'Area',
414
- field: 'area',
415
- editor: {
416
- model: Editors.autocompleter,
417
- options: {
418
- minLength: 0,
419
- forceUserInput: true,
420
- fetch: (searchText, updateCallback) => {
421
- updateCallback(this.areas); // add here the array
422
- },
423
- }
424
- }
425
- },
426
- ];
427
- ```
428
- You can also use the `minLength` to limit the autocomplete text to `0` characters or more, the default number is `3`.
429
-
430
- ### How to change drop container dimensions?
431
- You might want to change the dimensions of the drop container, this 3rd party library has a `customize` method to deal with such a thing. Slickgrid-Universal itself is removing the width using this method, you can however override this method to change the drop container dimensions
432
-
433
- ```ts
434
- this.columnDefinitions = [
435
- {
436
- id: 'product', name: 'Product', field: 'product', filterable: true,
437
- editor: {
438
- model: Editors.autocompleter,
439
- alwaysSaveOnEnterKey: true,
440
-
441
- // example with a Remote API call
442
- options: {
443
- minLength: 1,
444
- fetch: (searchTerm, callback) => {
445
- // ...
446
- },
447
- customize: (_input, _inputRect, container) => {
448
- // change drop container dimensions
449
- container.style.width = '250px';
450
- container.style.height = '325px';
451
- },
452
- } as AutocompleterOption,
453
- },
454
- }
455
- ];
456
- ```
457
-
458
- ## Animated Gif Demo
459
- ### Basic (default layout)
460
- ![](https://user-images.githubusercontent.com/643976/50624023-d5e16c80-0ee9-11e9-809c-f98967953ba4.gif)
461
-
462
- ### with `twoRows` custom layout (without optional left icon)
463
- ![](https://i.imgur.com/V9XzVXS.gif)
464
-
465
- ### with `fourCorners` custom layout (with extra optional left icon)
466
- ![](https://i.imgur.com/LirGZFm.gif)
@@ -1,71 +0,0 @@
1
- ##### index
2
- - [Editor Options](#editor-options)
3
- - [Custom Validator](#custom-validator)
4
- - See the [Editors - Wiki](../Editors.md) for more general info about Editors (validators, event handlers, ...)
5
-
6
- ### Information
7
- The Date Editor is provided through an external library named [Flatpickr](https://flatpickr.js.org/examples/) and all options from that library can be added to your `editorOptions` (see below), so in order to add things like minimum date, disabling dates, ... just review all the [Flatpickr Examples](https://flatpickr.js.org/examples/) and then add them into `editorOptions`. Also just so you know, `editorOptions` is use by all other editors as well to expose external library like Flatpickr, Multiple-Select.js, etc...
8
-
9
- ### Demo
10
- [Demo Page](https://ghiscoding.github.io/Angular-Slickgrid/#/editor) | [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-editor.component.ts)
11
-
12
- ### Editor Options
13
- You can use any of the Flatpickr [options](https://flatpickr.js.org/options/) by adding them to `editorOptions` as shown below.
14
-
15
- #### [FlatpickrOption](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/interfaces/flatpickrOption.interface.ts) Interface.
16
-
17
- ```ts
18
- defineGrid() {
19
- this.columnDefinitions = [
20
- {
21
- id: 'title', name: 'Title', field: 'title',
22
- editor: {
23
- model: Editors.date,
24
- editorOptions: {
25
- minDate: 'today',
26
- disable: [(date: Date) => this.isWeekendDay(date)], // disable weekend days (Sat, Sunday)
27
- } as FlatpickrOption,
28
- },
29
- },
30
- ];
31
- }
32
-
33
- /** Returns true when it's a weekend day (Saturday, Sunday) */
34
- isWeekendDay(date: Date): boolean {
35
- return (date.getDay() === 0 || date.getDay() === 6);
36
- }
37
- ```
38
-
39
- #### Grid Option `defaultEditorOptions
40
- You could also define certain options as a global level (for the entire grid or even all grids) by taking advantage of the `defaultEditorOptions` Grid Option. Note that they are set via the editor type as a key name (`autocompleter`, `date`, ...) and then the content is the same as `editorOptions` (also note that each key is already typed with the correct editor option interface), for example
41
-
42
- ```ts
43
- this.gridOptions = {
44
- defaultEditorOptions: {
45
- date: { minDate: 'today' }, // typed as FlatpickrOption
46
- }
47
- }
48
- ```
49
-
50
- ### Custom Validator
51
- You can add a Custom Validator from an external function or inline (inline is shown below and comes from [Example 3](https://ghiscoding.github.io/Angular-Slickgrid/#/editor))
52
- ```ts
53
- defineGrid() {
54
- this.columnDefinitions = [
55
- {
56
- id: 'title', name: 'Title', field: 'title',
57
- editor: {
58
- model: Editors.date,
59
- required: true,
60
- validator: (value, args) => {
61
- const dataContext = args && args.item;
62
- if (dataContext && (dataContext.completed && !value)) {
63
- return { valid: false, msg: 'You must provide a "Finish" date when "Completed" is checked.' };
64
- }
65
- return { valid: true, msg: '' };
66
- }
67
- },
68
- },
69
- ];
70
- }
71
- ```
@@ -1,91 +0,0 @@
1
- ##### index
2
- - [Editor Options](#editor-options)
3
- - [Custom Validator](#custom-validator)
4
- - [Date Format](#date-format)
5
- - See the [Editors - Wiki](../Editors.md) for more general info about Editors (validators, event handlers, ...)
6
-
7
- ### Information
8
- The Date Editor is provided through an external library named [Vanilla-Calendar-Pro](https://vanilla-calendar.pro) and all options from that library can be added to your `options` (see below), so in order to add things like minimum date, disabling dates, ... just review all the [Vanilla-Calendar-Pro](https://vanilla-calendar.pro/docs/reference/additionally/settings) and then add them into `options`. We use [Tempo](https://tempo.formkit.com/) to parse and format Dates to the chosen format (when `type`, `outputType` and/or `saveType` are provided in your column definition)
9
-
10
- > **Note** Also just so you know, `options` is used by all other editors as well to expose external library like Autocompleter, Multiple-Select, etc...
11
-
12
- ### Demo
13
- [Demo Page](https://ghiscoding.github.io/slickgrid-universal/#/example12) | [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/examples/webpack-demo-vanilla-bundle/src/examples/example12.ts)
14
-
15
- ### Editor Options
16
- You can use any of the Vanilla-Calendar [settings](https://vanilla-calendar.pro/docs/reference/additionally/settings) by adding them to `options` as shown below.
17
-
18
- > **Note** for easier implementation, you should import `VanillaCalendarOption` from Slickgrid-Universal common package.
19
-
20
- ```ts
21
- import { type VanillaCalendarOption } from '@slickgrid-universal/common';
22
-
23
- prepareGrid() {
24
- this.columnDefinitions = [
25
- {
26
- id: 'title', name: 'Title', field: 'title',
27
- type: 'dateIso', // if your type has hours/minutes, then the date picker will include date+time
28
- editor: {
29
- model: Editors.date,
30
- // previously known as `editorOptions` for < 9.0
31
- // also vanilla-calendar was previously v2
32
- // see their migration: https://github.com/uvarov-frontend/vanilla-calendar-pro/wiki/%5BMigration-from-v2.*.*%5D-New-API-for-all-options-and-actions-in-v3.0.0)
33
- options: {
34
- displayDateMin: 'today',
35
- disableDates: ['2022-08-15', '2022-08-20'],
36
- } as VanillaCalendarOption,
37
- },
38
- },
39
- ];
40
- }
41
- ```
42
-
43
- #### Grid Option `defaultEditorOptions
44
- You could also define certain options as a global level (for the entire grid or even all grids) by taking advantage of the `defaultEditorOptions` Grid Option. Note that they are set via the editor type as a key name (`autocompleter`, `date`, ...) and then the content is the same as editor `options` (also note that each key is already typed with the correct editor option interface), for example
45
-
46
- ```ts
47
- this.gridOptions = {
48
- defaultEditorOptions: {
49
- date: { displayDateMin: 'today' }, // typed as VanillaCalendarOption
50
- }
51
- }
52
- ```
53
-
54
- ### Custom Validator
55
- You can add a Custom Validator from an external function or inline (inline is shown below and comes from [Example 12](https://ghiscoding.github.io/slickgrid-universal/#/example12))
56
- ```ts
57
- initializeGrid() {
58
- this.columnDefinitions = [
59
- {
60
- id: 'title', name: 'Title', field: 'title',
61
- editor: {
62
- model: Editors.date,
63
- required: true,
64
- validator: (value, args) => {
65
- const dataContext = args && args.item;
66
- if (dataContext && (dataContext.completed && !value)) {
67
- return { valid: false, msg: 'You must provide a "Finish" date when "Completed" is checked.' };
68
- }
69
- return { valid: true, msg: '' };
70
- }
71
- },
72
- },
73
- ];
74
- }
75
- ```
76
-
77
- ### Date Format
78
- Your column definitions may include a `type` to tell Formatters how to formate your date, this `type` is also used by the Editor when saving.
79
-
80
- ##### What if I want to use a different format when saving?
81
- There are 3 types you can provide to inform the Editor on how to save:
82
- 1. `type` inform the entire column what its type is (used by Formatter, Filter, Editor, Export)
83
- 2. `outputType` what type to display in the Editor vs saving format.
84
- 3. `saveOutputType` the type to use when saving which is different than the one used on cell input (rarely used).
85
-
86
-
87
- The `type` and `outputType` are often used when you want to save something different compare to what you show to the user (for example, show a date in the US Format but save it as ISO or UTC).
88
-
89
- The difference between `outputType` and `saveOutputType` when you wish to display a certain format in the date editor input (while editing), but wish to save in a different format. You will rarely need the `saveOutputType` and for most use cases, the use of both `type` and `outputType` should be enough.
90
-
91
- > **Note** the type detection when saving is the inverse of the list above, whichever comes first from 3 to 1.