angular-slickgrid 4.2.0 → 4.2.3

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 (415) hide show
  1. package/LICENSE +20 -20
  2. package/{dist/app → app}/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +2 -2
  3. package/{dist/app → app}/modules/angular-slickgrid/constants.d.ts +0 -0
  4. package/{dist/app → app}/modules/angular-slickgrid/extensions/index.d.ts +0 -0
  5. package/{dist/app → app}/modules/angular-slickgrid/extensions/slickRowDetailView.d.ts +0 -2
  6. package/{dist/app → app}/modules/angular-slickgrid/global-grid-options.d.ts +0 -0
  7. package/{dist/app → app}/modules/angular-slickgrid/index.d.ts +0 -0
  8. package/{dist/app → app}/modules/angular-slickgrid/models/angularComponentOutput.interface.d.ts +0 -0
  9. package/{dist/app → app}/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +0 -0
  10. package/{dist/app → app}/modules/angular-slickgrid/models/externalTestingDependencies.interface.d.ts +0 -0
  11. package/{dist/app → app}/modules/angular-slickgrid/models/gridOption.interface.d.ts +0 -0
  12. package/{dist/app → app}/modules/angular-slickgrid/models/index.d.ts +0 -0
  13. package/{dist/app → app}/modules/angular-slickgrid/models/rowDetailView.interface.d.ts +0 -0
  14. package/{dist/app → app}/modules/angular-slickgrid/models/slickGrid.interface.d.ts +0 -0
  15. package/{dist/app → app}/modules/angular-slickgrid/modules/angular-slickgrid.module.d.ts +0 -0
  16. package/{dist/app → app}/modules/angular-slickgrid/services/angularUtil.service.d.ts +0 -0
  17. package/{dist/app → app}/modules/angular-slickgrid/services/bsDropdown.service.d.ts +0 -0
  18. package/{dist/app → app}/modules/angular-slickgrid/services/container.service.d.ts +1 -0
  19. package/{dist/app → app}/modules/angular-slickgrid/services/index.d.ts +0 -0
  20. package/{dist/app → app}/modules/angular-slickgrid/services/translater.service.d.ts +0 -0
  21. package/{dist/app → app}/modules/angular-slickgrid/services/utilities.d.ts +0 -0
  22. package/{dist/app → app}/modules/angular-slickgrid/slickgrid-config.d.ts +0 -0
  23. package/docs/assets/lib/multiple-select/README.md +17 -0
  24. package/{dist/esm2020 → esm2020}/angular-slickgrid.mjs +0 -0
  25. package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +1170 -0
  26. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/constants.mjs +1 -1
  27. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
  28. package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +298 -0
  29. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
  30. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/index.mjs +1 -1
  31. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
  32. package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +2 -0
  33. package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +2 -0
  34. package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +2 -0
  35. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/index.mjs +1 -1
  36. package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +2 -0
  37. package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +2 -0
  38. package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +43 -0
  39. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
  40. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
  41. package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +29 -0
  42. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/index.mjs +1 -1
  43. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
  44. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
  45. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
  46. package/{dist/esm2020 → esm2020}/public_api.mjs +1 -1
  47. package/{dist/fesm2015 → fesm2015}/angular-slickgrid.mjs +48 -51
  48. package/fesm2015/angular-slickgrid.mjs.map +1 -0
  49. package/{dist/fesm2020 → fesm2020}/angular-slickgrid.mjs +48 -51
  50. package/fesm2020/angular-slickgrid.mjs.map +1 -0
  51. package/{dist/i18n → i18n}/en.json +89 -89
  52. package/{dist/i18n → i18n}/fr.json +90 -90
  53. package/{dist/angular-slickgrid.d.ts → index.d.ts} +0 -0
  54. package/package.json +33 -118
  55. package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
  56. package/test/cypress/node_modules/@cypress/request/README.md +1038 -0
  57. package/test/cypress/node_modules/@cypress/xvfb/README.md +48 -0
  58. package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +437 -0
  59. package/test/cypress/node_modules/@types/node/README.md +16 -0
  60. package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +16 -0
  61. package/test/cypress/node_modules/@types/sizzle/README.md +16 -0
  62. package/test/cypress/node_modules/@types/yauzl/README.md +16 -0
  63. package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +16 -0
  64. package/test/cypress/node_modules/aggregate-error/README.md +61 -0
  65. package/test/cypress/node_modules/ansi-colors/README.md +315 -0
  66. package/test/cypress/node_modules/ansi-escapes/README.md +245 -0
  67. package/test/cypress/node_modules/ansi-regex/README.md +78 -0
  68. package/test/cypress/node_modules/ansi-styles/README.md +152 -0
  69. package/test/cypress/node_modules/arch/README.md +71 -0
  70. package/test/cypress/node_modules/asn1/README.md +50 -0
  71. package/test/cypress/node_modules/assert-plus/README.md +162 -0
  72. package/test/cypress/node_modules/astral-regex/README.md +46 -0
  73. package/test/cypress/node_modules/async/README.md +60 -0
  74. package/test/cypress/node_modules/asynckit/README.md +233 -0
  75. package/test/cypress/node_modules/at-least-node/README.md +25 -0
  76. package/test/cypress/node_modules/aws-sign2/README.md +4 -0
  77. package/test/cypress/node_modules/aws4/README.md +183 -0
  78. package/test/cypress/node_modules/balanced-match/README.md +91 -0
  79. package/test/cypress/node_modules/base64-js/README.md +34 -0
  80. package/test/cypress/node_modules/bcrypt-pbkdf/README.md +45 -0
  81. package/test/cypress/node_modules/blob-util/README.md +623 -0
  82. package/test/cypress/node_modules/bluebird/README.md +57 -0
  83. package/test/cypress/node_modules/brace-expansion/README.md +129 -0
  84. package/test/cypress/node_modules/buffer/README.md +410 -0
  85. package/test/cypress/node_modules/buffer-crc32/README.md +47 -0
  86. package/test/cypress/node_modules/cachedir/README.md +27 -0
  87. package/test/cypress/node_modules/caseless/README.md +45 -0
  88. package/test/cypress/node_modules/chalk/README.md +293 -0
  89. package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +76 -0
  90. package/test/cypress/node_modules/check-more-types/README.md +952 -0
  91. package/test/cypress/node_modules/ci-info/README.md +114 -0
  92. package/test/cypress/node_modules/clean-stack/README.md +76 -0
  93. package/test/cypress/node_modules/cli-cursor/README.md +55 -0
  94. package/test/cypress/node_modules/cli-table3/README.md +218 -0
  95. package/test/cypress/node_modules/cli-truncate/README.md +139 -0
  96. package/test/cypress/node_modules/color-convert/README.md +68 -0
  97. package/test/cypress/node_modules/color-name/README.md +11 -0
  98. package/test/cypress/node_modules/colorette/README.md +102 -0
  99. package/test/cypress/node_modules/colors/README.md +221 -0
  100. package/test/cypress/node_modules/combined-stream/README.md +138 -0
  101. package/test/cypress/node_modules/commander/README.md +737 -0
  102. package/test/cypress/node_modules/common-tags/README.md +687 -0
  103. package/test/cypress/node_modules/core-util-is/README.md +3 -0
  104. package/test/cypress/node_modules/cross-spawn/README.md +96 -0
  105. package/test/cypress/node_modules/cypress/README.md +25 -0
  106. package/test/cypress/node_modules/cypress/mount-utils/README.md +14 -0
  107. package/test/cypress/node_modules/cypress/react/README.md +414 -0
  108. package/test/cypress/node_modules/cypress/vue/README.md +678 -0
  109. package/test/cypress/node_modules/cypress/vue2/README.md +693 -0
  110. package/test/cypress/node_modules/dashdash/README.md +574 -0
  111. package/test/cypress/node_modules/dayjs/README.md +128 -0
  112. package/test/cypress/node_modules/debug/README.md +455 -0
  113. package/test/cypress/node_modules/delayed-stream/README.md +141 -0
  114. package/test/cypress/node_modules/ecc-jsbn/README.md +8 -0
  115. package/test/cypress/node_modules/emoji-regex/README.md +73 -0
  116. package/test/cypress/node_modules/end-of-stream/README.md +54 -0
  117. package/test/cypress/node_modules/enquirer/README.md +1752 -0
  118. package/test/cypress/node_modules/escape-string-regexp/README.md +27 -0
  119. package/test/cypress/node_modules/eventemitter2/README.md +809 -0
  120. package/test/cypress/node_modules/execa/README.md +656 -0
  121. package/test/cypress/node_modules/executable/README.md +64 -0
  122. package/test/cypress/node_modules/extend/README.md +81 -0
  123. package/test/cypress/node_modules/extract-zip/README.md +57 -0
  124. package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +455 -0
  125. package/test/cypress/node_modules/extsprintf/README.md +46 -0
  126. package/test/cypress/node_modules/fd-slicer/README.md +199 -0
  127. package/test/cypress/node_modules/figures/README.md +139 -0
  128. package/test/cypress/node_modules/forever-agent/README.md +4 -0
  129. package/test/cypress/node_modules/form-data/README.md +234 -0
  130. package/test/cypress/node_modules/fs-extra/README.md +264 -0
  131. package/test/cypress/node_modules/fs.realpath/README.md +33 -0
  132. package/test/cypress/node_modules/get-stream/README.md +124 -0
  133. package/test/cypress/node_modules/getos/README.md +79 -0
  134. package/test/cypress/node_modules/getpass/README.md +32 -0
  135. package/test/cypress/node_modules/glob/README.md +375 -0
  136. package/test/cypress/node_modules/global-dirs/README.md +72 -0
  137. package/test/cypress/node_modules/graceful-fs/README.md +133 -0
  138. package/test/cypress/node_modules/has-flag/README.md +89 -0
  139. package/test/cypress/node_modules/http-signature/README.md +80 -0
  140. package/test/cypress/node_modules/human-signals/README.md +155 -0
  141. package/test/cypress/node_modules/ieee754/README.md +51 -0
  142. package/test/cypress/node_modules/indent-string/README.md +70 -0
  143. package/test/cypress/node_modules/inflight/README.md +37 -0
  144. package/test/cypress/node_modules/inherits/README.md +42 -0
  145. package/test/cypress/node_modules/ini/README.md +102 -0
  146. package/test/cypress/node_modules/is-ci/README.md +50 -0
  147. package/test/cypress/node_modules/is-fullwidth-code-point/README.md +39 -0
  148. package/test/cypress/node_modules/is-installed-globally/README.md +31 -0
  149. package/test/cypress/node_modules/is-path-inside/README.md +63 -0
  150. package/test/cypress/node_modules/is-stream/README.md +57 -0
  151. package/test/cypress/node_modules/is-typedarray/README.md +16 -0
  152. package/test/cypress/node_modules/isexe/README.md +51 -0
  153. package/test/cypress/node_modules/isstream/README.md +66 -0
  154. package/test/cypress/node_modules/jsbn/README.md +175 -0
  155. package/test/cypress/node_modules/json-schema/README.md +3 -0
  156. package/test/cypress/node_modules/json-stringify-safe/README.md +52 -0
  157. package/test/cypress/node_modules/jsonfile/README.md +205 -0
  158. package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +76 -0
  159. package/test/cypress/node_modules/jsprim/README.md +287 -0
  160. package/test/cypress/node_modules/lazy-ass/README.md +269 -0
  161. package/test/cypress/node_modules/listr2/README.md +17 -0
  162. package/test/cypress/node_modules/lodash/README.md +39 -0
  163. package/test/cypress/node_modules/lodash.once/README.md +18 -0
  164. package/test/cypress/node_modules/log-symbols/README.md +51 -0
  165. package/test/cypress/node_modules/log-update/README.md +97 -0
  166. package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +66 -0
  167. package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +97 -0
  168. package/test/cypress/node_modules/lru-cache/README.md +166 -0
  169. package/test/cypress/node_modules/merge-stream/README.md +78 -0
  170. package/test/cypress/node_modules/mime-db/README.md +102 -0
  171. package/test/cypress/node_modules/mime-types/README.md +123 -0
  172. package/test/cypress/node_modules/mimic-fn/README.md +69 -0
  173. package/test/cypress/node_modules/minimatch/README.md +209 -0
  174. package/test/cypress/node_modules/ms/README.md +60 -0
  175. package/test/cypress/node_modules/npm-run-path/README.md +115 -0
  176. package/test/cypress/node_modules/once/README.md +79 -0
  177. package/test/cypress/node_modules/onetime/README.md +94 -0
  178. package/test/cypress/node_modules/ospath/README.md +53 -0
  179. package/test/cypress/node_modules/p-map/README.md +89 -0
  180. package/test/cypress/node_modules/path-is-absolute/README.md +59 -0
  181. package/test/cypress/node_modules/path-key/README.md +61 -0
  182. package/test/cypress/node_modules/pend/README.md +41 -0
  183. package/test/cypress/node_modules/performance-now/README.md +30 -0
  184. package/test/cypress/node_modules/pify/README.md +119 -0
  185. package/test/cypress/node_modules/pretty-bytes/README.md +131 -0
  186. package/test/cypress/node_modules/proxy-from-env/README.md +131 -0
  187. package/test/cypress/node_modules/psl/README.md +215 -0
  188. package/test/cypress/node_modules/pump/README.md +65 -0
  189. package/test/cypress/node_modules/punycode/README.md +122 -0
  190. package/test/cypress/node_modules/qs/README.md +475 -0
  191. package/test/cypress/node_modules/request-progress/README.md +78 -0
  192. package/test/cypress/node_modules/restore-cursor/README.md +26 -0
  193. package/test/cypress/node_modules/rimraf/README.md +101 -0
  194. package/test/cypress/node_modules/rxjs/README.md +147 -0
  195. package/test/cypress/node_modules/rxjs/_esm2015/README.md +147 -0
  196. package/test/cypress/node_modules/rxjs/_esm5/README.md +147 -0
  197. package/test/cypress/node_modules/rxjs/src/README.md +147 -0
  198. package/test/cypress/node_modules/safe-buffer/README.md +584 -0
  199. package/test/cypress/node_modules/safer-buffer/README.md +156 -0
  200. package/test/cypress/node_modules/semver/README.md +566 -0
  201. package/test/cypress/node_modules/shebang-command/README.md +34 -0
  202. package/test/cypress/node_modules/shebang-regex/README.md +33 -0
  203. package/test/cypress/node_modules/signal-exit/README.md +39 -0
  204. package/test/cypress/node_modules/slice-ansi/README.md +72 -0
  205. package/test/cypress/node_modules/sshpk/README.md +804 -0
  206. package/test/cypress/node_modules/string-width/README.md +50 -0
  207. package/test/cypress/node_modules/strip-ansi/README.md +46 -0
  208. package/test/cypress/node_modules/strip-final-newline/README.md +30 -0
  209. package/test/cypress/node_modules/supports-color/README.md +77 -0
  210. package/test/cypress/node_modules/throttleit/README.md +32 -0
  211. package/test/cypress/node_modules/tmp/README.md +365 -0
  212. package/test/cypress/node_modules/tough-cookie/README.md +527 -0
  213. package/test/cypress/node_modules/tslib/README.md +142 -0
  214. package/test/cypress/node_modules/tunnel-agent/README.md +4 -0
  215. package/test/cypress/node_modules/tweetnacl/README.md +459 -0
  216. package/test/cypress/node_modules/type-fest/README.md +760 -0
  217. package/test/cypress/node_modules/universalify/README.md +76 -0
  218. package/test/cypress/node_modules/untildify/README.md +30 -0
  219. package/test/cypress/node_modules/uuid/README.md +505 -0
  220. package/test/cypress/node_modules/verror/README.md +528 -0
  221. package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +46 -0
  222. package/test/cypress/node_modules/which/README.md +54 -0
  223. package/test/cypress/node_modules/wrap-ansi/README.md +91 -0
  224. package/test/cypress/node_modules/wrappy/README.md +36 -0
  225. package/test/cypress/node_modules/yallist/README.md +204 -0
  226. package/test/cypress/node_modules/yauzl/README.md +658 -0
  227. package/.browserslistrc +0 -12
  228. package/.codecov.yml +0 -17
  229. package/.editorconfig +0 -18
  230. package/.eslintrc.json +0 -50
  231. package/.github/CODE_OF_CONDUCT.md +0 -76
  232. package/.github/FUNDING.yml +0 -8
  233. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -54
  234. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  235. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -44
  236. package/.github/renovate.json5 +0 -26
  237. package/.github/stale.yml +0 -7
  238. package/.github/workflows/main.yml +0 -83
  239. package/.vscode/extensions.json +0 -9
  240. package/.vscode/launch.json +0 -72
  241. package/.vscode/settings.json +0 -7
  242. package/.vscode/tasks.json +0 -77
  243. package/CHANGELOG.md +0 -1172
  244. package/angular.json +0 -148
  245. package/dist/LICENSE +0 -20
  246. package/dist/README.md +0 -182
  247. package/dist/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +0 -1171
  248. package/dist/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +0 -300
  249. package/dist/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +0 -2
  250. package/dist/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +0 -2
  251. package/dist/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +0 -2
  252. package/dist/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +0 -2
  253. package/dist/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +0 -2
  254. package/dist/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +0 -46
  255. package/dist/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +0 -26
  256. package/dist/fesm2015/angular-slickgrid.mjs.map +0 -1
  257. package/dist/fesm2020/angular-slickgrid.mjs.map +0 -1
  258. package/dist/package.json +0 -79
  259. package/global.d.ts +0 -1
  260. package/ngcc.config.js +0 -13
  261. package/screenshots/column-picker.png +0 -0
  262. package/screenshots/composite-editor.png +0 -0
  263. package/screenshots/draggable-grouping.png +0 -0
  264. package/screenshots/editors.png +0 -0
  265. package/screenshots/export-to-file.png +0 -0
  266. package/screenshots/filter_and_sort.png +0 -0
  267. package/screenshots/formatters.png +0 -0
  268. package/screenshots/frozen.png +0 -0
  269. package/screenshots/multipleSelectFilter.png +0 -0
  270. package/screenshots/pagination.png +0 -0
  271. package/screenshots/selectFilter.png +0 -0
  272. package/screenshots/singleFilter.png +0 -0
  273. package/src/app/app-routing.module.ts +0 -83
  274. package/src/app/app.component.html +0 -160
  275. package/src/app/app.component.scss +0 -65
  276. package/src/app/app.component.ts +0 -10
  277. package/src/app/app.module.ts +0 -175
  278. package/src/app/examples/custom-angularComponentEditor.ts +0 -184
  279. package/src/app/examples/custom-angularComponentFilter.ts +0 -126
  280. package/src/app/examples/custom-inputEditor.ts +0 -124
  281. package/src/app/examples/custom-inputFilter.ts +0 -142
  282. package/src/app/examples/custom-titleFormatter.component.ts +0 -8
  283. package/src/app/examples/editor-ng-select.component.ts +0 -37
  284. package/src/app/examples/filter-ng-select.component.ts +0 -32
  285. package/src/app/examples/grid-additem.component.html +0 -48
  286. package/src/app/examples/grid-additem.component.ts +0 -272
  287. package/src/app/examples/grid-angular.component.html +0 -79
  288. package/src/app/examples/grid-angular.component.scss +0 -28
  289. package/src/app/examples/grid-angular.component.ts +0 -370
  290. package/src/app/examples/grid-autoheight.component.html +0 -52
  291. package/src/app/examples/grid-autoheight.component.ts +0 -147
  292. package/src/app/examples/grid-basic.component.html +0 -29
  293. package/src/app/examples/grid-basic.component.ts +0 -82
  294. package/src/app/examples/grid-clientside.component.html +0 -51
  295. package/src/app/examples/grid-clientside.component.ts +0 -293
  296. package/src/app/examples/grid-colspan.component.html +0 -39
  297. package/src/app/examples/grid-colspan.component.scss +0 -11
  298. package/src/app/examples/grid-colspan.component.ts +0 -155
  299. package/src/app/examples/grid-composite-editor.component.html +0 -79
  300. package/src/app/examples/grid-composite-editor.component.scss +0 -19
  301. package/src/app/examples/grid-composite-editor.component.ts +0 -948
  302. package/src/app/examples/grid-contextmenu.component.html +0 -62
  303. package/src/app/examples/grid-contextmenu.component.scss +0 -44
  304. package/src/app/examples/grid-contextmenu.component.ts +0 -473
  305. package/src/app/examples/grid-custom-tooltip.component.html +0 -25
  306. package/src/app/examples/grid-custom-tooltip.component.scss +0 -77
  307. package/src/app/examples/grid-custom-tooltip.component.ts +0 -483
  308. package/src/app/examples/grid-draggrouping.component.html +0 -93
  309. package/src/app/examples/grid-draggrouping.component.ts +0 -397
  310. package/src/app/examples/grid-editor.component.html +0 -88
  311. package/src/app/examples/grid-editor.component.ts +0 -699
  312. package/src/app/examples/grid-formatter.component.html +0 -26
  313. package/src/app/examples/grid-formatter.component.ts +0 -162
  314. package/src/app/examples/grid-frozen.component.html +0 -65
  315. package/src/app/examples/grid-frozen.component.scss +0 -11
  316. package/src/app/examples/grid-frozen.component.ts +0 -303
  317. package/src/app/examples/grid-graphql-nopage.component.html +0 -33
  318. package/src/app/examples/grid-graphql-nopage.component.scss +0 -9
  319. package/src/app/examples/grid-graphql-nopage.component.ts +0 -242
  320. package/src/app/examples/grid-graphql.component.html +0 -87
  321. package/src/app/examples/grid-graphql.component.ts +0 -304
  322. package/src/app/examples/grid-grouping.component.html +0 -80
  323. package/src/app/examples/grid-grouping.component.ts +0 -313
  324. package/src/app/examples/grid-headerbutton.component.html +0 -31
  325. package/src/app/examples/grid-headerbutton.component.scss +0 -10
  326. package/src/app/examples/grid-headerbutton.component.ts +0 -233
  327. package/src/app/examples/grid-headermenu.component.html +0 -31
  328. package/src/app/examples/grid-headermenu.component.scss +0 -25
  329. package/src/app/examples/grid-headermenu.component.ts +0 -159
  330. package/src/app/examples/grid-localization.component.html +0 -54
  331. package/src/app/examples/grid-localization.component.ts +0 -293
  332. package/src/app/examples/grid-menu.component.html +0 -37
  333. package/src/app/examples/grid-menu.component.scss +0 -28
  334. package/src/app/examples/grid-menu.component.ts +0 -229
  335. package/src/app/examples/grid-odata.component.html +0 -116
  336. package/src/app/examples/grid-odata.component.ts +0 -441
  337. package/src/app/examples/grid-range.component.html +0 -74
  338. package/src/app/examples/grid-range.component.ts +0 -291
  339. package/src/app/examples/grid-remote.component.html +0 -37
  340. package/src/app/examples/grid-remote.component.ts +0 -153
  341. package/src/app/examples/grid-resize-by-content.component.html +0 -62
  342. package/src/app/examples/grid-resize-by-content.component.scss +0 -19
  343. package/src/app/examples/grid-resize-by-content.component.ts +0 -780
  344. package/src/app/examples/grid-rowdetail.component.html +0 -35
  345. package/src/app/examples/grid-rowdetail.component.ts +0 -205
  346. package/src/app/examples/grid-rowmove.component.html +0 -49
  347. package/src/app/examples/grid-rowmove.component.ts +0 -234
  348. package/src/app/examples/grid-rowselection.component.html +0 -76
  349. package/src/app/examples/grid-rowselection.component.ts +0 -267
  350. package/src/app/examples/grid-state.component.html +0 -36
  351. package/src/app/examples/grid-state.component.ts +0 -259
  352. package/src/app/examples/grid-tabs.component.html +0 -35
  353. package/src/app/examples/grid-tabs.component.ts +0 -115
  354. package/src/app/examples/grid-trading.component.html +0 -58
  355. package/src/app/examples/grid-trading.component.scss +0 -49
  356. package/src/app/examples/grid-trading.component.ts +0 -319
  357. package/src/app/examples/grid-tree-data-hierarchical.component.html +0 -79
  358. package/src/app/examples/grid-tree-data-hierarchical.component.scss +0 -47
  359. package/src/app/examples/grid-tree-data-hierarchical.component.ts +0 -311
  360. package/src/app/examples/grid-tree-data-parent-child.component.html +0 -108
  361. package/src/app/examples/grid-tree-data-parent-child.component.scss +0 -10
  362. package/src/app/examples/grid-tree-data-parent-child.component.ts +0 -351
  363. package/src/app/examples/home.component.html +0 -41
  364. package/src/app/examples/home.component.ts +0 -9
  365. package/src/app/examples/rowdetail-preload.component.ts +0 -10
  366. package/src/app/examples/rowdetail-view.component.html +0 -36
  367. package/src/app/examples/rowdetail-view.component.ts +0 -54
  368. package/src/app/examples/swt-common-grid-pagination.component.ts +0 -156
  369. package/src/app/examples/swt-common-grid-test.component.html +0 -30
  370. package/src/app/examples/swt-common-grid-test.component.ts +0 -219
  371. package/src/app/examples/swt-common-grid.component.ts +0 -436
  372. package/src/app/examples/swt-logger.service.ts +0 -165
  373. package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.html +0 -4
  374. package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts +0 -1395
  375. package/src/app/modules/angular-slickgrid/constants.ts +0 -97
  376. package/src/app/modules/angular-slickgrid/extensions/index.ts +0 -1
  377. package/src/app/modules/angular-slickgrid/extensions/slickRowDetailView.ts +0 -375
  378. package/src/app/modules/angular-slickgrid/global-grid-options.ts +0 -245
  379. package/src/app/modules/angular-slickgrid/index.ts +0 -11
  380. package/src/app/modules/angular-slickgrid/models/angularComponentOutput.interface.ts +0 -6
  381. package/src/app/modules/angular-slickgrid/models/angularGridInstance.interface.ts +0 -68
  382. package/src/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.ts +0 -37
  383. package/src/app/modules/angular-slickgrid/models/gridOption.interface.ts +0 -12
  384. package/src/app/modules/angular-slickgrid/models/index.ts +0 -6
  385. package/src/app/modules/angular-slickgrid/models/rowDetailView.interface.ts +0 -33
  386. package/src/app/modules/angular-slickgrid/models/slickGrid.interface.ts +0 -7
  387. package/src/app/modules/angular-slickgrid/modules/angular-slickgrid.module.ts +0 -37
  388. package/src/app/modules/angular-slickgrid/services/angularUtil.service.ts +0 -48
  389. package/src/app/modules/angular-slickgrid/services/bsDropdown.service.ts +0 -142
  390. package/src/app/modules/angular-slickgrid/services/container.service.ts +0 -24
  391. package/src/app/modules/angular-slickgrid/services/index.ts +0 -5
  392. package/src/app/modules/angular-slickgrid/services/translater.service.ts +0 -38
  393. package/src/app/modules/angular-slickgrid/services/utilities.ts +0 -19
  394. package/src/app/modules/angular-slickgrid/slickgrid-config.ts +0 -10
  395. package/src/app/slickgrid-custom-variables.scss +0 -10
  396. package/src/assets/.gitkeep +0 -0
  397. package/src/assets/data/collection_100_numbers.json +0 -12
  398. package/src/assets/data/collection_500_numbers.json +0 -52
  399. package/src/assets/data/countries.json +0 -245
  400. package/src/assets/data/country_names.json +0 -245
  401. package/src/assets/data/customers_100.json +0 -102
  402. package/src/assets/i18n/en.json +0 -90
  403. package/src/assets/i18n/fr.json +0 -91
  404. package/src/environments/environment.prod.ts +0 -3
  405. package/src/environments/environment.ts +0 -8
  406. package/src/favicon.ico +0 -0
  407. package/src/index.html +0 -18
  408. package/src/main.ts +0 -13
  409. package/src/polyfills.ts +0 -52
  410. package/src/public_api.ts +0 -1
  411. package/src/styles.scss +0 -66
  412. package/src/typings.d.ts +0 -10
  413. package/tsconfig.app.json +0 -25
  414. package/tsconfig.json +0 -40
  415. package/tsconfig.spec.json +0 -23
@@ -1,699 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { HttpClient } from '@angular/common/http';
3
- import { TranslateService } from '@ngx-translate/core';
4
- import { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';
5
- import {
6
- AngularGridInstance,
7
- AutocompleteOption,
8
- Column,
9
- Editors,
10
- EditorArguments,
11
- EditorValidator,
12
- FieldType,
13
- Filters,
14
- FlatpickrOption,
15
- Formatter,
16
- Formatters,
17
- GridOption,
18
- LongTextEditorOption,
19
- OnEventArgs,
20
- OperatorType,
21
- SortComparers,
22
- SlickNamespace,
23
- } from './../modules/angular-slickgrid';
24
- import { CustomInputEditor } from './custom-inputEditor';
25
- import { CustomInputFilter } from './custom-inputFilter';
26
- import { Subject } from 'rxjs';
27
-
28
- // using external non-typed js libraries
29
- declare const Slick: SlickNamespace;
30
-
31
- const NB_ITEMS = 100;
32
- const URL_SAMPLE_COLLECTION_DATA = 'assets/data/collection_100_numbers.json';
33
- const URL_COUNTRIES_COLLECTION = 'assets/data/countries.json';
34
- const URL_COUNTRY_NAMES = 'assets/data/country_names.json';
35
-
36
- // you can create custom validator to pass to an inline editor
37
- const myCustomTitleValidator: EditorValidator = (value: any, args?: EditorArguments) => {
38
- // you can get the Editor Args which can be helpful, e.g. we can get the Translate Service from it
39
- const grid = args && args.grid;
40
- const gridOptions = (grid?.getOptions?.() ?? {}) as GridOption;
41
- const translate = gridOptions.i18n;
42
-
43
- // to get the editor object, you'll need to use "internalColumnEditor"
44
- // don't use "editor" property since that one is what SlickGrid uses internally by it's editor factory
45
- const columnEditor = args && args.column && args.column.internalColumnEditor;
46
-
47
- if (value === null || value === undefined || !value.length) {
48
- return { valid: false, msg: 'This is a required field' };
49
- } else if (!/^Task\s\d+$/.test(value)) {
50
- return { valid: false, msg: 'Your title is invalid, it must start with "Task" followed by a number' };
51
- // OR use the Translate Service with your custom message
52
- // return { valid: false, msg: translate.instant('YOUR_ERROR', { x: value }) };
53
- }
54
- return { valid: true, msg: '' };
55
- };
56
-
57
- // create a custom Formatter to show the Task + value
58
- const taskFormatter: Formatter = (row, cell, value, columnDef, dataContext) => {
59
- if (value && Array.isArray(value)) {
60
- const taskValues = value.map((val) => `Task ${val}`);
61
- const values = taskValues.join(', ');
62
- return `<span title="${values}">${values}</span>`;
63
- }
64
- return '';
65
- };
66
- @Component({
67
- templateUrl: './grid-editor.component.html'
68
- })
69
- export class GridEditorComponent implements OnInit {
70
- title = 'Example 3: Editors / Delete';
71
- subTitle = `
72
- Grid with Inline Editors and onCellClick actions (<a href="https://github.com/ghiscoding/Angular-Slickgrid/wiki/Editors" target="_blank">Wiki docs</a>).
73
- <ul>
74
- <li>Multiple Editors & Filters are available: AutoComplete, Checkbox, Date, Slider, SingleSelect, MultipleSelect, Float, Text, LongText... even Custom Editor</li>
75
- <li>When using "enableCellNavigation: true", clicking on a cell will automatically make it active &amp; selected.</li>
76
- <ul><li>If you don't want this behavior, then you should disable "enableCellNavigation"</li></ul>
77
- <li>Inline Editors requires "enableCellNavigation: true" (not sure why though)</li>
78
- <li>
79
- Support Excel Copy Buffer (SlickGrid Copy Manager Plugin), you can use it by simply enabling "enableExcelCopyBuffer" flag.
80
- Note that it will only evaluate Formatter when the "exportWithFormatter" flag is enabled (through "ExportOptions" or the column definition)
81
- </li>
82
- <li>MultipleSelect & SingeSelect Editors & Filters can use a regular "collection" or "collectionAsync" to load it asynchronously</li>
83
- <ul>
84
- <li>Click on "Add Item" and see the Editor/Filter or the "Prerequesites" column change</li>
85
- <li>Any Editor/Filter with a "collection" can be changed dynamically later in the future</li>
86
- </ul>
87
- </ul>
88
- `;
89
-
90
- private _commandQueue: any = [];
91
- angularGrid!: AngularGridInstance;
92
- columnDefinitions!: Column[];
93
- gridOptions!: GridOption;
94
- dataset!: any[];
95
- gridObj: any;
96
- isAutoEdit = true;
97
- alertWarning: any;
98
- updatedObject: any;
99
- selectedLanguage = 'en';
100
- duplicateTitleHeaderCount = 1;
101
-
102
- constructor(private http: HttpClient, private translate: TranslateService) { }
103
-
104
- ngOnInit() {
105
- this.prepareGrid();
106
- }
107
-
108
- angularGridReady(angularGrid: AngularGridInstance) {
109
- this.angularGrid = angularGrid;
110
- this.gridObj = angularGrid.slickGrid;
111
- }
112
-
113
- prepareGrid() {
114
- this.columnDefinitions = [
115
- {
116
- id: 'edit',
117
- field: 'id',
118
- excludeFromColumnPicker: true,
119
- excludeFromGridMenu: true,
120
- excludeFromHeaderMenu: true,
121
- formatter: Formatters.editIcon,
122
- minWidth: 30,
123
- maxWidth: 30,
124
- // use onCellClick OR grid.onClick.subscribe which you can see down below
125
- onCellClick: (e: Event, args: OnEventArgs) => {
126
- console.log(args);
127
- this.alertWarning = `Editing: ${args.dataContext.title}`;
128
- this.angularGrid.gridService.highlightRow(args.row, 1500);
129
- this.angularGrid.gridService.setSelectedRow(args.row);
130
- }
131
- }, {
132
- id: 'delete',
133
- field: 'id',
134
- excludeFromColumnPicker: true,
135
- excludeFromGridMenu: true,
136
- excludeFromHeaderMenu: true,
137
- formatter: Formatters.deleteIcon,
138
- minWidth: 30,
139
- maxWidth: 30,
140
- // use onCellClick OR grid.onClick.subscribe which you can see down below
141
- /*
142
- onCellClick: (e: Event, args: OnEventArgs) => {
143
- console.log(args);
144
- this.alertWarning = `Deleting: ${args.dataContext.title}`;
145
- }
146
- */
147
- }, {
148
- id: 'title',
149
- name: 'Title',
150
- field: 'title',
151
- minWidth: 100,
152
- filterable: true,
153
- sortable: true,
154
- type: FieldType.string,
155
- editor: {
156
- model: Editors.longText,
157
- required: true,
158
- maxLength: 12,
159
- editorOptions: {
160
- // you can change textarea cols,rows (defaults to 40,4)
161
- cols: 42,
162
- rows: 5,
163
- buttonTexts: {
164
- /* you can change button texts (defaults to "Cancel", "Save") */
165
- // cancel: 'Close',
166
- // save: 'Done'
167
-
168
- /* or with translations (defaults to "CANCEL", "SAVE") */
169
- // cancelKey: 'CANCEL',
170
- // saveKey: 'SAVE'
171
- }
172
- } as LongTextEditorOption,
173
- validator: myCustomTitleValidator,
174
- },
175
- onCellChange: (e: Event, args: OnEventArgs) => {
176
- console.log(args);
177
- this.alertWarning = `Updated Title: ${args.dataContext.title}`;
178
- }
179
- }, {
180
- id: 'title2',
181
- name: 'Title, Custom Editor',
182
- field: 'title',
183
- minWidth: 70,
184
- filterable: true,
185
- sortable: true,
186
- type: FieldType.string,
187
- editor: {
188
- model: CustomInputEditor,
189
- placeholder: 'custom',
190
- validator: myCustomTitleValidator, // use a custom validator
191
- },
192
- filter: {
193
- model: CustomInputFilter,
194
- placeholder: '🔎︎ custom',
195
- },
196
- }, {
197
- id: 'duration',
198
- name: 'Duration (days)',
199
- field: 'duration',
200
- minWidth: 100,
201
- filterable: true,
202
- sortable: true,
203
- formatter: Formatters.complexObject,
204
- type: FieldType.number,
205
- exportWithFormatter: true,
206
- filter: { model: Filters.slider, params: { hideSliderNumber: false } },
207
- editor: {
208
- model: Editors.slider,
209
- minValue: 0,
210
- maxValue: 100,
211
- // params: { hideSliderNumber: true },
212
- },
213
- /*
214
- editor: {
215
- // default is 0 decimals, if no decimals is passed it will accept 0 or more decimals
216
- // however if you pass the "decimalPlaces", it will validate with that maximum
217
- alwaysSaveOnEnterKey: true, // defaults to False, when set to true and user presses ENTER it will always call a Save even if value is empty
218
- model: Editors.float,
219
- placeholder: 'enter number',
220
- title: 'Your number must be bigger than 5', // add a custom title, to see it as a real tooltip you'll need to implement something like tipsy jquery lib
221
- minValue: 5,
222
- maxValue: 365,
223
- // the default validation error message is in English but you can override it by using "errorMessage"
224
- // errorMessage: this.i18n.tr('INVALID_FLOAT', { maxDecimal: 2 }),
225
- params: { decimalPlaces: 2 },
226
- },
227
- */
228
- }, {
229
- id: 'complete',
230
- name: '% Complete',
231
- field: 'percentComplete',
232
- minWidth: 100,
233
- filterable: true,
234
- formatter: Formatters.multiple,
235
- type: FieldType.number,
236
- editor: {
237
- model: Editors.singleSelect,
238
-
239
- // We can also add HTML text to be rendered (any bad script will be sanitized) but we have to opt-in, else it will be sanitized
240
- enableRenderHtml: true,
241
- collection: Array.from(Array(101).keys()).map(k => ({ value: k, label: k, symbol: '<i class="fa fa-percent" style="color:cadetblue"></i>' })),
242
- customStructure: {
243
- value: 'value',
244
- label: 'label',
245
- labelSuffix: 'symbol'
246
- },
247
-
248
- // collection: Array.from(Array(101).keys()).map(k => ({ value: k, label: k, labelSuffix: '%' })),
249
- collectionSortBy: {
250
- property: 'label',
251
- sortDesc: true
252
- },
253
- collectionFilterBy: {
254
- property: 'value',
255
- value: 0,
256
- operator: OperatorType.notEqual
257
- },
258
- // you could also provide a collection override to filter/sort based on the item dataContext or whatever else
259
- // collectionOverride: (updatedCollection, args) => {
260
- // console.log(args);
261
- // return updatedCollection.filter((col) => args.dataContext.id % 2 ? col.value < 50 : col.value >= 50);
262
- // },
263
- editorOptions: {
264
- maxHeight: 400
265
- }
266
- },
267
- params: {
268
- formatters: [Formatters.collectionEditor, Formatters.percentCompleteBar],
269
- },
270
- // validator: (value, args) => {
271
- // if (value < 50) {
272
- // return { valid: false, msg: 'Please use at least 50%' };
273
- // }
274
- // return { valid: true, msg: '' };
275
- // }
276
- }, {
277
- id: 'start',
278
- name: 'Start',
279
- field: 'start',
280
- minWidth: 100,
281
- filterable: true,
282
- filter: { model: Filters.compoundDate },
283
- formatter: Formatters.multiple,
284
- params: {
285
- formatters: [Formatters.complexObject, Formatters.dateIso]
286
- },
287
- exportWithFormatter: true,
288
- sortable: true,
289
- type: FieldType.date,
290
- editor: {
291
- model: Editors.date,
292
- },
293
- }, {
294
- id: 'finish',
295
- name: 'Finish',
296
- field: 'finish',
297
- minWidth: 100,
298
- filterable: true,
299
- sortable: true,
300
- filter: { model: Filters.compoundDate },
301
- formatter: Formatters.dateIso,
302
- exportWithFormatter: true,
303
- type: FieldType.date, // dataset cell input format
304
- // outputType: FieldType.dateUs, // date picker format
305
- saveOutputType: FieldType.dateUtc, // save output date formattype: FieldType.date,
306
- editor: {
307
- model: Editors.date,
308
- // override any of the Flatpickr options through "editorOptions"
309
- // please note that there's no TSlint on this property since it's generic for any filter, so make sure you entered the correct filter option(s)
310
- editorOptions: {
311
- minDate: 'today',
312
-
313
- // if we want to preload the date picker with a different date,
314
- // we could toggle the `closeOnSelect: false`, set the date in the picker and re-toggle `closeOnSelect: true`
315
- // closeOnSelect: false,
316
- // onOpen: (selectedDates: Date[] | Date, dateStr: string, instance: FlatpickrInstance) => {
317
- // instance.setDate('2021-12-31', true);
318
- // instance.set('closeOnSelect', true);
319
- // },
320
- } as FlatpickrOption
321
- },
322
- }, {
323
- id: 'cityOfOrigin', name: 'City of Origin', field: 'cityOfOrigin',
324
- filterable: true,
325
- minWidth: 100,
326
- editor: {
327
- model: Editors.autoComplete,
328
- placeholder: '🔎︎ search city',
329
-
330
- // We can use the autocomplete through 3 ways "collection", "collectionAsync" or with your own autocomplete options
331
- // use your own autocomplete options, instead of $.ajax, use http
332
- // here we use $.ajax just because I'm not sure how to configure http with JSONP and CORS
333
- editorOptions: {
334
- forceUserInput: true,
335
- minLength: 3,
336
- source: (request, response) => {
337
- /** with Angular Http, note this demo won't work because of CORS */
338
- // this.http.get(`http://gd.geobytes.com/AutoCompleteCity?q=${request.term}`).subscribe(data => response(data));
339
-
340
- /** with jQuery AJAX will work locally but not on the GitHub demo because of CORS */
341
- $.ajax({
342
- url: 'http://gd.geobytes.com/AutoCompleteCity',
343
- dataType: 'jsonp',
344
- data: {
345
- q: request.term
346
- },
347
- success: (data: any) => response(data)
348
- });
349
- }
350
- } as AutocompleteOption,
351
- },
352
- filter: {
353
- model: Filters.autoComplete,
354
- // placeholder: '🔎︎ search city',
355
-
356
- // We can use the autocomplete through 3 ways "collection", "collectionAsync" or with your own autocomplete options
357
- // collectionAsync: this.http.get(URL_COUNTRIES_COLLECTION),
358
-
359
- // OR use your own autocomplete options, instead of $.ajax, use http
360
- // here we use $.ajax just because I'm not sure how to configure http with JSONP and CORS
361
- filterOptions: {
362
- minLength: 3,
363
- source: (request, response) => {
364
- $.ajax({
365
- url: 'http://gd.geobytes.com/AutoCompleteCity',
366
- dataType: 'jsonp',
367
- data: {
368
- q: request.term
369
- },
370
- success: (data: any) => response(data)
371
- });
372
- }
373
- } as AutocompleteOption,
374
- }
375
- }, {
376
- id: 'countryOfOrigin', name: 'Country of Origin', field: 'countryOfOrigin',
377
- formatter: Formatters.complexObject,
378
- exportWithFormatter: true,
379
- dataKey: 'code',
380
- labelKey: 'name',
381
- type: FieldType.object,
382
- sortComparer: SortComparers.objectString, // this sorter requires the dataKey and assume that obj1[dataKey] will be a string so it can sort it that way
383
- filterable: true,
384
- sortable: true,
385
- minWidth: 100,
386
- editor: {
387
- model: Editors.autoComplete,
388
- customStructure: { label: 'name', value: 'code' },
389
- collectionAsync: this.http.get(URL_COUNTRIES_COLLECTION),
390
- },
391
- filter: {
392
- model: Filters.autoComplete,
393
- customStructure: { label: 'name', value: 'code' },
394
- collectionAsync: this.http.get(URL_COUNTRIES_COLLECTION),
395
- }
396
- }, {
397
- id: 'countryOfOriginName', name: 'Country of Origin Name', field: 'countryOfOriginName',
398
- filterable: true,
399
- sortable: true,
400
- minWidth: 100,
401
- editor: {
402
- model: Editors.autoComplete,
403
- collectionAsync: this.http.get(URL_COUNTRY_NAMES),
404
- },
405
- filter: {
406
- model: Filters.autoComplete,
407
- collectionAsync: this.http.get(URL_COUNTRY_NAMES),
408
- }
409
- }, {
410
- id: 'effort-driven',
411
- name: 'Effort Driven',
412
- field: 'effortDriven',
413
- minWidth: 70,
414
- filterable: true,
415
- type: FieldType.boolean,
416
- filter: {
417
- model: Filters.singleSelect,
418
- collection: [{ value: '', label: '' }, { value: true, label: 'True' }, { value: false, label: 'False' }],
419
- },
420
- formatter: Formatters.checkmark,
421
- editor: {
422
- model: Editors.checkbox,
423
- },
424
- }, {
425
- id: 'prerequisites',
426
- name: 'Prerequisites',
427
- field: 'prerequisites',
428
- minWidth: 100,
429
- filterable: true,
430
- formatter: taskFormatter,
431
- exportWithFormatter: true,
432
- sanitizeDataExport: true,
433
- sortable: true,
434
- type: FieldType.string,
435
- editor: {
436
- placeholder: 'choose option',
437
- collectionAsync: this.http.get<{ value: string; label: string; }[]>(URL_SAMPLE_COLLECTION_DATA),
438
- // OR a regular collection load
439
- // collection: Array.from(Array(100).keys()).map(k => ({ value: k, prefix: 'Task', label: k })),
440
- collectionSortBy: {
441
- property: 'label',
442
- sortDesc: true
443
- },
444
- customStructure: {
445
- label: 'label',
446
- value: 'value',
447
- labelPrefix: 'prefix',
448
- },
449
- collectionOptions: {
450
- separatorBetweenTextLabels: ' '
451
- },
452
- model: Editors.multipleSelect,
453
- required: true
454
- },
455
- filter: {
456
- collectionAsync: this.http.get<{ value: string; label: string; }[]>(URL_SAMPLE_COLLECTION_DATA),
457
- // OR a regular collection load
458
- // collection: Array.from(Array(100).keys()).map(k => ({ value: k, prefix: 'Task', label: k })),
459
- collectionSortBy: {
460
- property: 'label',
461
- sortDesc: true
462
- },
463
- customStructure: {
464
- label: 'label',
465
- value: 'value',
466
- labelPrefix: 'prefix',
467
- },
468
- collectionOptions: {
469
- separatorBetweenTextLabels: ' '
470
- },
471
- model: Filters.multipleSelect,
472
- operator: OperatorType.inContains,
473
- }
474
- }
475
- ];
476
-
477
- this.gridOptions = {
478
- asyncEditorLoading: false,
479
- autoEdit: this.isAutoEdit,
480
- autoCommitEdit: false,
481
- autoResize: {
482
- container: '#demo-container',
483
- rightPadding: 10
484
- },
485
- editable: true,
486
- enableCellNavigation: true,
487
- enableColumnPicker: true,
488
- enableExcelCopyBuffer: true,
489
- enableFiltering: true,
490
- editCommandHandler: (item, column, editCommand) => {
491
- this._commandQueue.push(editCommand);
492
- editCommand.execute();
493
- },
494
- i18n: this.translate
495
- };
496
-
497
- this.dataset = this.mockData(NB_ITEMS);
498
- }
499
-
500
- /** Add a new row to the grid and refresh the Filter collection.
501
- * Note that because Filter elements are always displayed on the screen, we need to tell the Filter,
502
- * we do this via a Subject .next(), that it's collection got changed
503
- * as for the Editor, there's nothing to do since the element is not shown and it will have latest collection next time it shows up
504
- */
505
- addItem() {
506
- const lastRowIndex = this.dataset.length;
507
- const newRows = this.mockData(1, lastRowIndex);
508
-
509
- // wrap into a timer to simulate a backend async call
510
- setTimeout(() => {
511
- const requisiteColumnDef = this.columnDefinitions.find((column: Column) => column.id === 'prerequisites');
512
- if (requisiteColumnDef) {
513
- const filterCollectionAsync = requisiteColumnDef.filter!.collectionAsync;
514
- const editorCollection = requisiteColumnDef.editor!.collection;
515
-
516
- if (Array.isArray(editorCollection)) {
517
- // add the new row to the grid
518
- this.angularGrid.gridService.addItem(newRows[0]);
519
-
520
- // then refresh the Editor "collection", we have 2 ways of doing it
521
-
522
- // Push to the Editor "collection"
523
- editorCollection.push({ value: lastRowIndex, label: lastRowIndex, prefix: 'Task' });
524
-
525
- // or replace entire "collection"
526
- // durationColumnDef.editor.collection = [...collection, ...[{ value: lastRowIndex, label: lastRowIndex }]];
527
-
528
- // for the Filter only, we have a trigger an RxJS/Subject change with the new collection
529
- // we do this because Filter(s) are shown at all time, while on Editor it's unnecessary since they are only shown when opening them
530
- if (filterCollectionAsync instanceof Subject) {
531
- filterCollectionAsync.next(editorCollection);
532
- }
533
- }
534
- }
535
- }, 250);
536
- }
537
-
538
- /**
539
- * Delete last inserted row.
540
- * Note that because Filter elements are always displayed on the screen, we need to tell the Filter,
541
- * we do this via a Subject .next(), that it's collection got changed
542
- * as for the Editor, there's nothing to do since the element is not shown and it will have latest collection next time it shows up
543
- */
544
- deleteItem() {
545
- const requisiteColumnDef = this.columnDefinitions.find((column: Column) => column.id === 'prerequisites');
546
- if (requisiteColumnDef) {
547
- const filterCollectionAsync = requisiteColumnDef.filter!.collectionAsync;
548
- const filterCollection = requisiteColumnDef.filter!.collection;
549
-
550
- if (Array.isArray(filterCollection)) {
551
- // sort collection in descending order and take out last collection option
552
- const selectCollectionObj = this.sortCollectionDescending(filterCollection).pop();
553
-
554
- // then we will delete that item from the grid
555
- this.angularGrid.gridService.deleteItemById(selectCollectionObj.value);
556
-
557
- // for the Filter only, we have a trigger an RxJS/Subject change with the new collection
558
- // we do this because Filter(s) are shown at all time, while on Editor it's unnecessary since they are only shown when opening them
559
- if (filterCollectionAsync instanceof Subject) {
560
- filterCollectionAsync.next(filterCollection);
561
- }
562
- }
563
- }
564
- }
565
-
566
- sortCollectionDescending(collection: any[]) {
567
- return collection.sort((item1, item2) => item1.value - item2.value);
568
- }
569
-
570
- mockData(itemCount: number, startingIndex = 0) {
571
- // mock a dataset
572
- const tempDataset = [];
573
- for (let i = startingIndex; i < (startingIndex + itemCount); i++) {
574
- const randomYear = 2000 + Math.floor(Math.random() * 10);
575
- const randomFinishYear = (new Date().getFullYear() - 3) + Math.floor(Math.random() * 10); // use only years not lower than 3 years ago
576
- const randomMonth = Math.floor(Math.random() * 11);
577
- const randomDay = Math.floor((Math.random() * 29));
578
- const randomPercent = Math.round(Math.random() * 100);
579
- const randomFinish = new Date(randomFinishYear, (randomMonth + 1), randomDay);
580
-
581
- tempDataset.push({
582
- id: i,
583
- title: 'Task ' + i,
584
- duration: (i % 33 === 0) ? null : Math.round(Math.random() * 100) + '',
585
- start: new Date(randomYear, randomMonth, randomDay),
586
- percentComplete: randomPercent,
587
- percentCompleteNumber: randomPercent,
588
- finish: randomFinish < new Date() ? '' : randomFinish, // make sure the random date is earlier than today
589
- effortDriven: (i % 5 === 0),
590
- prerequisites: (i % 2 === 0) && i !== 0 && i < 12 ? [i, i - 1] : [],
591
- countryOfOrigin: (i % 2) ? { code: 'CA', name: 'Canada' } : { code: 'US', name: 'United States' },
592
- countryOfOriginName: (i % 2) ? 'Canada' : 'United States',
593
- cityOfOrigin: (i % 2) ? 'Vancouver, BC, Canada' : 'Boston, MA, United States',
594
- });
595
- }
596
- return tempDataset;
597
- }
598
-
599
- onCellChanged(e: Event, args: any) {
600
- this.updatedObject = args.item;
601
- }
602
-
603
- onCellClicked(e: Event, args: any) {
604
- const metadata = this.angularGrid.gridService.getColumnFromEventArguments(args);
605
- console.log(metadata);
606
-
607
- if (metadata.columnDef.id === 'edit') {
608
- this.alertWarning = `open a modal window to edit: ${metadata.dataContext.title}`;
609
-
610
- // highlight the row, to customize the color, you can change the SASS variable $row-highlight-background-color
611
- this.angularGrid.gridService.highlightRow(args.row, 1500);
612
-
613
- // you could also select the row, when using "enableCellNavigation: true", it automatically selects the row
614
- // this.angularGrid.gridService.setSelectedRow(args.row);
615
- } else if (metadata.columnDef.id === 'delete') {
616
- if (confirm('Are you sure?')) {
617
- this.angularGrid.gridService.deleteItemById(metadata.dataContext.id);
618
- }
619
- }
620
- }
621
-
622
- onValidationError(e: Event, args: any) {
623
- if (args.validationResults) {
624
- alert(args.validationResults.msg);
625
- }
626
- }
627
-
628
- changeAutoCommit() {
629
- this.gridOptions.autoCommitEdit = !this.gridOptions.autoCommitEdit;
630
- this.gridObj.setOptions({
631
- autoCommitEdit: this.gridOptions.autoCommitEdit
632
- });
633
- return true;
634
- }
635
-
636
- dynamicallyAddTitleHeader() {
637
- const newCol = {
638
- id: `title${this.duplicateTitleHeaderCount++}`,
639
- name: 'Title',
640
- field: 'title',
641
- editor: {
642
- model: Editors.text,
643
- required: true,
644
- validator: myCustomTitleValidator, // use a custom validator
645
- },
646
- sortable: true, minWidth: 100, filterable: true,
647
- };
648
-
649
- // you can dynamically add your column to your column definitions
650
- // and then use the spread operator [...cols] OR slice to force Angular to review the changes
651
- this.columnDefinitions.push(newCol);
652
- this.columnDefinitions = this.columnDefinitions.slice(); // or use spread operator [...cols]
653
-
654
- // NOTE if you use an Extensions (Checkbox Selector, Row Detail, ...) that modifies the column definitions in any way
655
- // you MUST use "getAllColumnDefinitions()" from the GridService, using this will be ALL columns including the 1st column that is created internally
656
- // for example if you use the Checkbox Selector (row selection), you MUST use the code below
657
- /*
658
- const allColumns = this.angularGrid.gridService.getAllColumnDefinitions();
659
- allColumns.push(newCol);
660
- this.columnDefinitions = [...allColumns]; // (or use slice) reassign to column definitions for Angular to do dirty checking
661
- */
662
- }
663
-
664
- dynamicallyRemoveLastColumn() {
665
- this.columnDefinitions.pop();
666
- this.columnDefinitions = this.columnDefinitions.slice();
667
-
668
- // NOTE if you use an Extensions (Checkbox Selector, Row Detail, ...) that modifies the column definitions in any way
669
- // you MUST use the code below, first you must reassign the Editor facade (from the internalColumnEditor back to the editor)
670
- // in other words, SlickGrid is not using the same as Angular-Slickgrid uses (editor with a "model" and other properties are a facade, SlickGrid only uses what is inside the model)
671
- /*
672
- const allColumns = this.angularGrid.gridService.getAllColumnDefinitions();
673
- const allOriginalColumns = allColumns.map((column) => {
674
- column.editor = column.internalColumnEditor;
675
- return column;
676
- });
677
-
678
- // remove your column the full set of columns
679
- // and use slice or spread [...] to trigger an Angular dirty change
680
- allOriginalColumns.pop();
681
- this.columnDefinitions = allOriginalColumns.slice();
682
- */
683
- }
684
-
685
- setAutoEdit(isAutoEdit: boolean) {
686
- this.isAutoEdit = isAutoEdit;
687
- this.gridObj.setOptions({ autoEdit: isAutoEdit }); // change the grid option dynamically
688
- return true;
689
- }
690
-
691
- undo() {
692
- const command = this._commandQueue.pop();
693
- const item = this.angularGrid.dataView.getItem(command.row);
694
- if (command && Slick.GlobalEditorLock.cancelCurrentEdit()) {
695
- command.undo();
696
- this.gridObj.gotoCell(command.row, command.cell, false);
697
- }
698
- }
699
- }