angular-slickgrid 4.1.4 → 4.2.0

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 (242) hide show
  1. package/.browserslistrc +12 -0
  2. package/.codecov.yml +17 -0
  3. package/.editorconfig +18 -0
  4. package/.eslintrc.json +50 -0
  5. package/.github/CODE_OF_CONDUCT.md +76 -0
  6. package/.github/FUNDING.yml +8 -0
  7. package/.github/ISSUE_TEMPLATE/bug_report.yml +54 -0
  8. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  9. package/.github/ISSUE_TEMPLATE/feature_request.yml +44 -0
  10. package/.github/renovate.json5 +26 -0
  11. package/.github/stale.yml +7 -0
  12. package/.github/workflows/main.yml +83 -0
  13. package/.vscode/extensions.json +9 -0
  14. package/.vscode/launch.json +72 -0
  15. package/.vscode/settings.json +7 -0
  16. package/.vscode/tasks.json +77 -0
  17. package/CHANGELOG.md +1172 -0
  18. package/LICENSE +20 -20
  19. package/README.md +182 -180
  20. package/angular.json +148 -0
  21. package/dist/LICENSE +20 -0
  22. package/dist/README.md +182 -0
  23. package/{angular-slickgrid.d.ts → dist/angular-slickgrid.d.ts} +0 -0
  24. package/{app → dist/app}/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +0 -0
  25. package/{app → dist/app}/modules/angular-slickgrid/constants.d.ts +0 -0
  26. package/{app → dist/app}/modules/angular-slickgrid/extensions/index.d.ts +0 -0
  27. package/{app → dist/app}/modules/angular-slickgrid/extensions/slickRowDetailView.d.ts +0 -0
  28. package/{app → dist/app}/modules/angular-slickgrid/global-grid-options.d.ts +0 -0
  29. package/{app → dist/app}/modules/angular-slickgrid/index.d.ts +0 -0
  30. package/{app → dist/app}/modules/angular-slickgrid/models/angularComponentOutput.interface.d.ts +0 -0
  31. package/{app → dist/app}/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +0 -0
  32. package/{app → dist/app}/modules/angular-slickgrid/models/externalTestingDependencies.interface.d.ts +0 -0
  33. package/{app → dist/app}/modules/angular-slickgrid/models/gridOption.interface.d.ts +0 -0
  34. package/{app → dist/app}/modules/angular-slickgrid/models/index.d.ts +0 -0
  35. package/{app → dist/app}/modules/angular-slickgrid/models/rowDetailView.interface.d.ts +0 -0
  36. package/{app → dist/app}/modules/angular-slickgrid/models/slickGrid.interface.d.ts +0 -0
  37. package/{app → dist/app}/modules/angular-slickgrid/modules/angular-slickgrid.module.d.ts +0 -0
  38. package/{app → dist/app}/modules/angular-slickgrid/services/angularUtil.service.d.ts +0 -0
  39. package/{app → dist/app}/modules/angular-slickgrid/services/bsDropdown.service.d.ts +0 -0
  40. package/{app → dist/app}/modules/angular-slickgrid/services/container.service.d.ts +0 -0
  41. package/{app → dist/app}/modules/angular-slickgrid/services/index.d.ts +0 -0
  42. package/{app → dist/app}/modules/angular-slickgrid/services/translater.service.d.ts +0 -0
  43. package/{app → dist/app}/modules/angular-slickgrid/services/utilities.d.ts +0 -0
  44. package/{app → dist/app}/modules/angular-slickgrid/slickgrid-config.d.ts +0 -0
  45. package/{esm2020 → dist/esm2020}/angular-slickgrid.mjs +0 -0
  46. package/dist/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +1171 -0
  47. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/constants.mjs +1 -1
  48. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
  49. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +2 -2
  50. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
  51. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/index.mjs +1 -1
  52. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
  53. package/dist/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +2 -0
  54. package/dist/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +2 -0
  55. package/dist/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +2 -0
  56. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/models/index.mjs +1 -1
  57. package/dist/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +2 -0
  58. package/dist/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +2 -0
  59. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +5 -5
  60. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
  61. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
  62. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/services/container.service.mjs +4 -4
  63. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/services/index.mjs +1 -1
  64. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
  65. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
  66. package/{esm2020 → dist/esm2020}/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
  67. package/{esm2020 → dist/esm2020}/public_api.mjs +1 -1
  68. package/{fesm2015 → dist/fesm2015}/angular-slickgrid.mjs +25 -22
  69. package/dist/fesm2015/angular-slickgrid.mjs.map +1 -0
  70. package/{fesm2020 → dist/fesm2020}/angular-slickgrid.mjs +25 -22
  71. package/dist/fesm2020/angular-slickgrid.mjs.map +1 -0
  72. package/{i18n → dist/i18n}/en.json +89 -89
  73. package/{i18n → dist/i18n}/fr.json +90 -90
  74. package/dist/package.json +79 -0
  75. package/{public_api.d.ts → dist/public_api.d.ts} +0 -0
  76. package/global.d.ts +1 -0
  77. package/ngcc.config.js +13 -0
  78. package/package.json +121 -37
  79. package/screenshots/column-picker.png +0 -0
  80. package/screenshots/composite-editor.png +0 -0
  81. package/screenshots/draggable-grouping.png +0 -0
  82. package/screenshots/editors.png +0 -0
  83. package/screenshots/export-to-file.png +0 -0
  84. package/screenshots/filter_and_sort.png +0 -0
  85. package/screenshots/formatters.png +0 -0
  86. package/screenshots/frozen.png +0 -0
  87. package/screenshots/multipleSelectFilter.png +0 -0
  88. package/screenshots/pagination.png +0 -0
  89. package/screenshots/selectFilter.png +0 -0
  90. package/screenshots/singleFilter.png +0 -0
  91. package/src/app/app-routing.module.ts +83 -0
  92. package/src/app/app.component.html +160 -0
  93. package/src/app/app.component.scss +65 -0
  94. package/src/app/app.component.ts +10 -0
  95. package/src/app/app.module.ts +175 -0
  96. package/src/app/examples/custom-angularComponentEditor.ts +184 -0
  97. package/src/app/examples/custom-angularComponentFilter.ts +126 -0
  98. package/src/app/examples/custom-inputEditor.ts +124 -0
  99. package/src/app/examples/custom-inputFilter.ts +142 -0
  100. package/src/app/examples/custom-titleFormatter.component.ts +8 -0
  101. package/src/app/examples/editor-ng-select.component.ts +37 -0
  102. package/src/app/examples/filter-ng-select.component.ts +32 -0
  103. package/src/app/examples/grid-additem.component.html +48 -0
  104. package/src/app/examples/grid-additem.component.ts +272 -0
  105. package/src/app/examples/grid-angular.component.html +79 -0
  106. package/src/app/examples/grid-angular.component.scss +28 -0
  107. package/src/app/examples/grid-angular.component.ts +370 -0
  108. package/src/app/examples/grid-autoheight.component.html +52 -0
  109. package/src/app/examples/grid-autoheight.component.ts +147 -0
  110. package/src/app/examples/grid-basic.component.html +29 -0
  111. package/src/app/examples/grid-basic.component.ts +82 -0
  112. package/src/app/examples/grid-clientside.component.html +51 -0
  113. package/src/app/examples/grid-clientside.component.ts +293 -0
  114. package/src/app/examples/grid-colspan.component.html +39 -0
  115. package/src/app/examples/grid-colspan.component.scss +11 -0
  116. package/src/app/examples/grid-colspan.component.ts +155 -0
  117. package/src/app/examples/grid-composite-editor.component.html +79 -0
  118. package/src/app/examples/grid-composite-editor.component.scss +19 -0
  119. package/src/app/examples/grid-composite-editor.component.ts +948 -0
  120. package/src/app/examples/grid-contextmenu.component.html +62 -0
  121. package/src/app/examples/grid-contextmenu.component.scss +44 -0
  122. package/src/app/examples/grid-contextmenu.component.ts +473 -0
  123. package/src/app/examples/grid-custom-tooltip.component.html +25 -0
  124. package/src/app/examples/grid-custom-tooltip.component.scss +77 -0
  125. package/src/app/examples/grid-custom-tooltip.component.ts +483 -0
  126. package/src/app/examples/grid-draggrouping.component.html +93 -0
  127. package/src/app/examples/grid-draggrouping.component.ts +397 -0
  128. package/src/app/examples/grid-editor.component.html +88 -0
  129. package/src/app/examples/grid-editor.component.ts +699 -0
  130. package/src/app/examples/grid-formatter.component.html +26 -0
  131. package/src/app/examples/grid-formatter.component.ts +162 -0
  132. package/src/app/examples/grid-frozen.component.html +65 -0
  133. package/src/app/examples/grid-frozen.component.scss +11 -0
  134. package/src/app/examples/grid-frozen.component.ts +303 -0
  135. package/src/app/examples/grid-graphql-nopage.component.html +33 -0
  136. package/src/app/examples/grid-graphql-nopage.component.scss +9 -0
  137. package/src/app/examples/grid-graphql-nopage.component.ts +242 -0
  138. package/src/app/examples/grid-graphql.component.html +87 -0
  139. package/src/app/examples/grid-graphql.component.ts +304 -0
  140. package/src/app/examples/grid-grouping.component.html +80 -0
  141. package/src/app/examples/grid-grouping.component.ts +313 -0
  142. package/src/app/examples/grid-headerbutton.component.html +31 -0
  143. package/src/app/examples/grid-headerbutton.component.scss +10 -0
  144. package/src/app/examples/grid-headerbutton.component.ts +233 -0
  145. package/src/app/examples/grid-headermenu.component.html +31 -0
  146. package/src/app/examples/grid-headermenu.component.scss +25 -0
  147. package/src/app/examples/grid-headermenu.component.ts +159 -0
  148. package/src/app/examples/grid-localization.component.html +54 -0
  149. package/src/app/examples/grid-localization.component.ts +293 -0
  150. package/src/app/examples/grid-menu.component.html +37 -0
  151. package/src/app/examples/grid-menu.component.scss +28 -0
  152. package/src/app/examples/grid-menu.component.ts +229 -0
  153. package/src/app/examples/grid-odata.component.html +116 -0
  154. package/src/app/examples/grid-odata.component.ts +441 -0
  155. package/src/app/examples/grid-range.component.html +74 -0
  156. package/src/app/examples/grid-range.component.ts +291 -0
  157. package/src/app/examples/grid-remote.component.html +37 -0
  158. package/src/app/examples/grid-remote.component.ts +153 -0
  159. package/src/app/examples/grid-resize-by-content.component.html +62 -0
  160. package/src/app/examples/grid-resize-by-content.component.scss +19 -0
  161. package/src/app/examples/grid-resize-by-content.component.ts +780 -0
  162. package/src/app/examples/grid-rowdetail.component.html +35 -0
  163. package/src/app/examples/grid-rowdetail.component.ts +205 -0
  164. package/src/app/examples/grid-rowmove.component.html +49 -0
  165. package/src/app/examples/grid-rowmove.component.ts +234 -0
  166. package/src/app/examples/grid-rowselection.component.html +76 -0
  167. package/src/app/examples/grid-rowselection.component.ts +267 -0
  168. package/src/app/examples/grid-state.component.html +36 -0
  169. package/src/app/examples/grid-state.component.ts +259 -0
  170. package/src/app/examples/grid-tabs.component.html +35 -0
  171. package/src/app/examples/grid-tabs.component.ts +115 -0
  172. package/src/app/examples/grid-trading.component.html +58 -0
  173. package/src/app/examples/grid-trading.component.scss +49 -0
  174. package/src/app/examples/grid-trading.component.ts +319 -0
  175. package/src/app/examples/grid-tree-data-hierarchical.component.html +79 -0
  176. package/src/app/examples/grid-tree-data-hierarchical.component.scss +47 -0
  177. package/src/app/examples/grid-tree-data-hierarchical.component.ts +311 -0
  178. package/src/app/examples/grid-tree-data-parent-child.component.html +108 -0
  179. package/src/app/examples/grid-tree-data-parent-child.component.scss +10 -0
  180. package/src/app/examples/grid-tree-data-parent-child.component.ts +351 -0
  181. package/src/app/examples/home.component.html +41 -0
  182. package/src/app/examples/home.component.ts +9 -0
  183. package/src/app/examples/rowdetail-preload.component.ts +10 -0
  184. package/src/app/examples/rowdetail-view.component.html +36 -0
  185. package/src/app/examples/rowdetail-view.component.ts +54 -0
  186. package/src/app/examples/swt-common-grid-pagination.component.ts +156 -0
  187. package/src/app/examples/swt-common-grid-test.component.html +30 -0
  188. package/src/app/examples/swt-common-grid-test.component.ts +219 -0
  189. package/src/app/examples/swt-common-grid.component.ts +436 -0
  190. package/src/app/examples/swt-logger.service.ts +165 -0
  191. package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.html +4 -0
  192. package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts +1395 -0
  193. package/src/app/modules/angular-slickgrid/constants.ts +97 -0
  194. package/src/app/modules/angular-slickgrid/extensions/index.ts +1 -0
  195. package/src/app/modules/angular-slickgrid/extensions/slickRowDetailView.ts +375 -0
  196. package/src/app/modules/angular-slickgrid/global-grid-options.ts +245 -0
  197. package/src/app/modules/angular-slickgrid/index.ts +11 -0
  198. package/src/app/modules/angular-slickgrid/models/angularComponentOutput.interface.ts +6 -0
  199. package/src/app/modules/angular-slickgrid/models/angularGridInstance.interface.ts +68 -0
  200. package/src/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.ts +37 -0
  201. package/src/app/modules/angular-slickgrid/models/gridOption.interface.ts +12 -0
  202. package/src/app/modules/angular-slickgrid/models/index.ts +6 -0
  203. package/src/app/modules/angular-slickgrid/models/rowDetailView.interface.ts +33 -0
  204. package/src/app/modules/angular-slickgrid/models/slickGrid.interface.ts +7 -0
  205. package/src/app/modules/angular-slickgrid/modules/angular-slickgrid.module.ts +37 -0
  206. package/src/app/modules/angular-slickgrid/services/angularUtil.service.ts +48 -0
  207. package/src/app/modules/angular-slickgrid/services/bsDropdown.service.ts +142 -0
  208. package/src/app/modules/angular-slickgrid/services/container.service.ts +24 -0
  209. package/src/app/modules/angular-slickgrid/services/index.ts +5 -0
  210. package/src/app/modules/angular-slickgrid/services/translater.service.ts +38 -0
  211. package/src/app/modules/angular-slickgrid/services/utilities.ts +19 -0
  212. package/src/app/modules/angular-slickgrid/slickgrid-config.ts +10 -0
  213. package/src/app/slickgrid-custom-variables.scss +10 -0
  214. package/src/assets/.gitkeep +0 -0
  215. package/src/assets/data/collection_100_numbers.json +12 -0
  216. package/src/assets/data/collection_500_numbers.json +52 -0
  217. package/src/assets/data/countries.json +245 -0
  218. package/src/assets/data/country_names.json +245 -0
  219. package/src/assets/data/customers_100.json +102 -0
  220. package/src/assets/i18n/en.json +90 -0
  221. package/src/assets/i18n/fr.json +91 -0
  222. package/src/environments/environment.prod.ts +3 -0
  223. package/src/environments/environment.ts +8 -0
  224. package/src/favicon.ico +0 -0
  225. package/src/index.html +18 -0
  226. package/src/main.ts +13 -0
  227. package/src/polyfills.ts +52 -0
  228. package/src/public_api.ts +1 -0
  229. package/src/styles.scss +66 -0
  230. package/src/typings.d.ts +10 -0
  231. package/tsconfig.app.json +25 -0
  232. package/tsconfig.json +40 -0
  233. package/tsconfig.spec.json +23 -0
  234. package/docs/assets/lib/multiple-select/README.md +0 -17
  235. package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +0 -1168
  236. package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +0 -2
  237. package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +0 -2
  238. package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +0 -2
  239. package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +0 -2
  240. package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +0 -2
  241. package/fesm2015/angular-slickgrid.mjs.map +0 -1
  242. package/fesm2020/angular-slickgrid.mjs.map +0 -1
@@ -0,0 +1,160 @@
1
+ <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
2
+ <a class="navbar-brand ms-2" href="https://github.com/ghiscoding/Angular-Slickgrid">
3
+ <i class="fa fa-github"></i>
4
+ <span>{{title}}</span>
5
+ </a>
6
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-target="#navbarContent"
7
+ aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
8
+ <span class="navbar-toggler-icon"></span>
9
+ </button>
10
+
11
+ <div class="navbar-collapse collapse" id="navbarContent">
12
+ <ul class="navbar-nav mr-auto">
13
+ <li>
14
+ <span class="github-button-container">
15
+ <a href="https://github.com/ghiscoding/angular-slickgrid">
16
+ <img src="https://img.shields.io/github/stars/ghiscoding/angular-slickgrid?style=social">
17
+ </a>
18
+ </span>
19
+ </li>
20
+ <li class="nav-item">
21
+ <a class="nav-link" [routerLink]="['/home']">
22
+ <i class="fa fa-lg fa-home"></i> Home
23
+ </a>
24
+ </li>
25
+ </ul>
26
+ </div>
27
+ </nav>
28
+
29
+ <div class="container-fluid">
30
+ <div class="panel-wm">
31
+ <section id="panel-left" class="panel-wm-left">
32
+ <ul class="well nav nav-pills nav-stacked">
33
+ <li class="nav-item">
34
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/basic']">1- Basic Grid / 2 Grids</a>
35
+ </li>
36
+ <li class="nav-item">
37
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/formatter']">2- Formatters</a>
38
+ </li>
39
+ <li class="nav-item">
40
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/editor']">3- Editors</a>
41
+ </li>
42
+ <li class="nav-item">
43
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/clientside']">4- Client Side Sort/Filter</a>
44
+ </li>
45
+ <li class="nav-item">
46
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/odata']">5- Backend Server with OData</a>
47
+ </li>
48
+ <li class="nav-item">
49
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/gridgraphql']">6- Backend Server with
50
+ GraphQL</a>
51
+ </li>
52
+ <li class="nav-item">
53
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/headerbutton']">7- Header Button Plugin</a>
54
+ </li>
55
+ <li class="nav-item">
56
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/headermenu']">8- Header Menu Plugin</a>
57
+ </li>
58
+ <li class="nav-item">
59
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/gridmenu']">9- Grid Menu (hamburger menu)</a>
60
+ </li>
61
+ <li class="nav-item">
62
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/selection']">10- Row Selection / 2 Grids</a>
63
+ </li>
64
+ <li class="nav-item">
65
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/additem']">11- Add/Update/Highlight Datagrid
66
+ Item</a>
67
+ </li>
68
+ <li class="nav-item">
69
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/localization']">12- Localization (i18n)</a>
70
+ </li>
71
+ <li class="nav-item">
72
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/swt']">13- Backend Server Custom Paging</a>
73
+ </li>
74
+ <li class="nav-item">
75
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/grouping']">14- Grouping &amp; Aggregator</a>
76
+ </li>
77
+ <li class="nav-item">
78
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/colspan']">15- Column Span</a>
79
+ </li>
80
+ <li class="nav-item">
81
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/gridstate']">16- Grid State &amp; Local
82
+ Storage</a>
83
+ </li>
84
+ <li class="nav-item">
85
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/rowmove']">17- Row Move</a>
86
+ </li>
87
+ <li class="nav-item">
88
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/remote']">18- Remote Model</a>
89
+ </li>
90
+ <li class="nav-item">
91
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/draggrouping']">19- Draggable Grouping</a>
92
+ </li>
93
+ <li class="nav-item">
94
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/frozen']">20- Frozen Columns/Rows</a>
95
+ </li>
96
+ <li class="nav-item">
97
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/rowdetail']">21- Row Detail View</a>
98
+ </li>
99
+ <li class="nav-item">
100
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/angular-components']">22- Use of Angular
101
+ Components</a>
102
+ </li>
103
+ <li class="nav-item">
104
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/autoheight']">23- Grid AutoHeight (full
105
+ height)</a>
106
+ </li>
107
+ <li class="nav-item">
108
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/gridtabs']">24- within Bootstrap Tabs</a>
109
+ </li>
110
+ <li class="nav-item">
111
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/range']">25- Filter by Range of Values</a>
112
+ </li>
113
+ <li class="nav-item">
114
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/context']">26- Cell & Context Menu</a>
115
+ </li>
116
+ <li class="nav-item">
117
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/graphql-nopage']">
118
+ 27- GraphQL without Pagination
119
+ </a>
120
+ </li>
121
+ <li class="nav-item">
122
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/tree-data-parent-child']">
123
+ 28- Tree Data (Parent/Child)
124
+ </a>
125
+ </li>
126
+ <li class="nav-item">
127
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/tree-data-hierarchical']">
128
+ 29- Tree Data (Hierarchical)
129
+ </a>
130
+ </li>
131
+ <li class="nav-item">
132
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/composite-editor']">
133
+ 30- Composite Editor Modal
134
+ </a>
135
+ </li>
136
+ <li class="nav-item">
137
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/resize-by-content']">
138
+ 31- Resize by Cell Content
139
+ </a>
140
+ </li>
141
+ <li class="nav-item">
142
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/custom-tooltip']">
143
+ 32- Regular & Custom Tooltip
144
+ </a>
145
+ </li>
146
+ <li class="nav-item">
147
+ <a class="nav-link" routerLinkActive="active" [routerLink]="['/trading']">
148
+ 33- Real-Time Trading Platform
149
+ </a>
150
+ </li>
151
+ </ul>
152
+ </section>
153
+
154
+ <section class="panel-wm-content">
155
+ <div id="demo-container">
156
+ <router-outlet></router-outlet>
157
+ </div>
158
+ </section>
159
+ </div>
160
+ </div>
@@ -0,0 +1,65 @@
1
+ $navbar-height: 56px;
2
+ $side-menu-width: 250px;
3
+
4
+ .body-content {
5
+ margin-top: $navbar-height;
6
+ }
7
+ .lightblue {
8
+ color: lightblue;
9
+ }
10
+ .red {
11
+ color: red;
12
+ }
13
+ .faded {
14
+ opacity: 0.2;
15
+ }
16
+ .faded:hover {
17
+ opacity: 0.5;
18
+ }
19
+
20
+ section {
21
+ margin: 0;
22
+ }
23
+
24
+ /** Sidebar (left) and Content (right) */
25
+ @media (min-width: 1200px) {
26
+ .panel-wm-content .container {
27
+ width: calc(1170px - #{$side-menu-width});
28
+ }
29
+ }
30
+
31
+ .panel-wm {
32
+ padding-top: $navbar-height;
33
+
34
+ .nav-stacked {
35
+ padding-bottom: 30px;
36
+
37
+ .nav-item {
38
+ width: 100%;
39
+ }
40
+ }
41
+
42
+ .nav > li > a {
43
+ padding: 10px 15px;
44
+ border-radius: 0;
45
+ }
46
+
47
+ .panel-wm-content {
48
+ padding-left: ($side-menu-width + 5px);
49
+ padding-right: 15px;
50
+ }
51
+
52
+ .panel-wm-left {
53
+ position: fixed;
54
+ z-index: 400;
55
+ transition: left 0.15s;
56
+ top: calc(#{$navbar-height});
57
+ bottom: 0;
58
+ left: 0;
59
+ background-color: #f5f5f5;
60
+ transform: translate3d(0, 0, 0);
61
+ border-right: 1px solid #d0d0d0;
62
+ overflow-y: auto;
63
+ width: $side-menu-width;
64
+ }
65
+ }
@@ -0,0 +1,10 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'app-root',
5
+ templateUrl: './app.component.html',
6
+ styleUrls: ['./app.component.scss']
7
+ })
8
+ export class AppComponent {
9
+ title = 'Angular-SlickGrid';
10
+ }
@@ -0,0 +1,175 @@
1
+ import { AppRoutingRoutingModule } from './app-routing.module';
2
+ import { BrowserModule } from '@angular/platform-browser';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { HttpClient, HttpClientModule } from '@angular/common/http';
5
+ import { Injector, APP_INITIALIZER, NgModule } from '@angular/core';
6
+ import { LOCATION_INITIALIZED } from '@angular/common';
7
+ import { NgSelectModule } from '@ng-select/ng-select';
8
+ import { TabsModule } from 'ngx-bootstrap/tabs';
9
+ import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';
10
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
11
+
12
+ import { AppComponent } from './app.component';
13
+ import { CustomTitleFormatterComponent } from './examples/custom-titleFormatter.component';
14
+ import { EditorNgSelectComponent } from './examples/editor-ng-select.component';
15
+ import { FilterNgSelectComponent } from './examples/filter-ng-select.component';
16
+ import { GridAddItemComponent } from './examples/grid-additem.component';
17
+ import { GridAutoHeightComponent } from './examples/grid-autoheight.component';
18
+ import { GridBasicComponent } from './examples/grid-basic.component';
19
+ import { GridClientSideComponent } from './examples/grid-clientside.component';
20
+ import { GridColspanComponent } from './examples/grid-colspan.component';
21
+ import { GridContextMenuComponent } from './examples/grid-contextmenu.component';
22
+ import { GridCompositeEditorComponent } from './examples/grid-composite-editor.component';
23
+ import { GridCustomTooltipComponent } from './examples/grid-custom-tooltip.component';
24
+ import { GridDraggableGroupingComponent } from './examples/grid-draggrouping.component';
25
+ import { GridEditorComponent } from './examples/grid-editor.component';
26
+ import { GridAngularComponent } from './examples/grid-angular.component';
27
+ import { GridFormatterComponent } from './examples/grid-formatter.component';
28
+ import { GridFrozenComponent } from './examples/grid-frozen.component';
29
+ import { GridGraphqlComponent } from './examples/grid-graphql.component';
30
+ import { GridGraphqlWithoutPaginationComponent } from './examples/grid-graphql-nopage.component';
31
+ import { GridGroupingComponent } from './examples/grid-grouping.component';
32
+ import { GridHeaderButtonComponent } from './examples/grid-headerbutton.component';
33
+ import { GridHeaderMenuComponent } from './examples/grid-headermenu.component';
34
+ import { GridLocalizationComponent } from './examples/grid-localization.component';
35
+ import { GridMenuComponent } from './examples/grid-menu.component';
36
+ import { GridOdataComponent } from './examples/grid-odata.component';
37
+ import { GridRangeComponent } from './examples/grid-range.component';
38
+ import { GridRemoteComponent } from './examples/grid-remote.component';
39
+ import { GridResizeByContentComponent } from './examples/grid-resize-by-content.component';
40
+ import { GridRowDetailComponent } from './examples/grid-rowdetail.component';
41
+ import { GridRowMoveComponent } from './examples/grid-rowmove.component';
42
+ import { GridRowSelectionComponent } from './examples/grid-rowselection.component';
43
+ import { GridStateComponent } from './examples/grid-state.component';
44
+ import { GridTabsComponent } from './examples/grid-tabs.component';
45
+ import { GridTradingComponent } from './examples/grid-trading.component';
46
+ import { GridTreeDataHierarchicalComponent } from './examples/grid-tree-data-hierarchical.component';
47
+ import { GridTreeDataParentChildComponent } from './examples/grid-tree-data-parent-child.component';
48
+ import { HomeComponent } from './examples/home.component';
49
+ import { RowDetailPreloadComponent } from './examples/rowdetail-preload.component';
50
+ import { RowDetailViewComponent } from './examples/rowdetail-view.component';
51
+
52
+ import { SwtCommonGridTestComponent } from './examples/swt-common-grid-test.component';
53
+ import { SwtCommonGridPaginationComponent } from './examples/swt-common-grid-pagination.component';
54
+ import { SwtCommonGridComponent } from './examples/swt-common-grid.component';
55
+
56
+ // import our custom module, library created using this article
57
+ // https://medium.com/@ngl817/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e
58
+ import { AngularSlickgridModule } from './modules/angular-slickgrid/modules/angular-slickgrid.module';
59
+ // import { SlickgridModule } from 'angular-slickgrid';
60
+
61
+ // load necessary Flatpickr Locale(s), but make sure it's imported AFTER the SlickgridModule import
62
+ import 'flatpickr/dist/l10n/fr';
63
+
64
+ // AoT requires an exported function for factories
65
+ export function createTranslateLoader(http: HttpClient) {
66
+ return new TranslateHttpLoader(http, './assets/i18n/', '.json');
67
+ }
68
+
69
+ // use an Initializer Factory as describe here: https://github.com/ngx-translate/core/issues/517#issuecomment-299637956
70
+ export function appInitializerFactory(translate: TranslateService, injector: Injector) {
71
+ return () => new Promise<any>((resolve: any) => {
72
+ const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
73
+ locationInitialized.then(() => {
74
+ const langToSet = 'en';
75
+ translate.setDefaultLang('en');
76
+ translate.use(langToSet).subscribe({
77
+ next: () => {
78
+ // console.info(`Successfully initialized '${langToSet}' language.'`);
79
+ },
80
+ error: () => console.error(`Problem with '${langToSet}' language initialization.'`),
81
+ complete: () => resolve(null)
82
+ });
83
+ });
84
+ });
85
+ }
86
+
87
+ // @dynamic
88
+ @NgModule({
89
+ declarations: [
90
+ AppComponent,
91
+ CustomTitleFormatterComponent,
92
+ EditorNgSelectComponent,
93
+ FilterNgSelectComponent,
94
+ GridAddItemComponent,
95
+ GridAngularComponent,
96
+ GridAutoHeightComponent,
97
+ GridBasicComponent,
98
+ GridClientSideComponent,
99
+ GridColspanComponent,
100
+ GridCompositeEditorComponent,
101
+ GridContextMenuComponent,
102
+ GridCustomTooltipComponent,
103
+ GridDraggableGroupingComponent,
104
+ GridEditorComponent,
105
+ GridFormatterComponent,
106
+ GridFrozenComponent,
107
+ GridGraphqlComponent,
108
+ GridGraphqlWithoutPaginationComponent,
109
+ GridGroupingComponent,
110
+ GridHeaderButtonComponent,
111
+ GridHeaderMenuComponent,
112
+ GridLocalizationComponent,
113
+ GridMenuComponent,
114
+ GridOdataComponent,
115
+ GridRangeComponent,
116
+ GridRemoteComponent,
117
+ GridResizeByContentComponent,
118
+ GridRowDetailComponent,
119
+ GridRowMoveComponent,
120
+ GridRowSelectionComponent,
121
+ GridStateComponent,
122
+ GridTabsComponent,
123
+ GridTradingComponent,
124
+ GridTreeDataParentChildComponent,
125
+ GridTreeDataHierarchicalComponent,
126
+ RowDetailPreloadComponent,
127
+ RowDetailViewComponent,
128
+ SwtCommonGridTestComponent,
129
+ SwtCommonGridPaginationComponent,
130
+ SwtCommonGridComponent,
131
+ HomeComponent
132
+ ],
133
+ imports: [
134
+ AppRoutingRoutingModule,
135
+ BrowserModule,
136
+ FormsModule,
137
+ HttpClientModule,
138
+ NgSelectModule,
139
+ TabsModule.forRoot(),
140
+ TranslateModule.forRoot({
141
+ loader: {
142
+ provide: TranslateLoader,
143
+ useFactory: (createTranslateLoader),
144
+ deps: [HttpClient]
145
+ }
146
+ }),
147
+ AngularSlickgridModule.forRoot({
148
+ // add any Global Grid Options/Config you might want
149
+ // to avoid passing the same options over and over in each grids of your App
150
+ enableAutoResize: true,
151
+ autoResize: {
152
+ container: '#grid-container',
153
+ rightPadding: 10
154
+ }
155
+ })
156
+ ],
157
+ entryComponents: [
158
+ // dynamically created components
159
+ CustomTitleFormatterComponent,
160
+ EditorNgSelectComponent,
161
+ FilterNgSelectComponent,
162
+ RowDetailPreloadComponent,
163
+ RowDetailViewComponent,
164
+ ],
165
+ providers: [
166
+ {
167
+ provide: APP_INITIALIZER,
168
+ useFactory: appInitializerFactory,
169
+ deps: [TranslateService, Injector],
170
+ multi: true
171
+ }
172
+ ],
173
+ bootstrap: [AppComponent]
174
+ })
175
+ export class AppModule { }
@@ -0,0 +1,184 @@
1
+ import { ComponentRef } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import {
4
+ AngularUtilService,
5
+ Column,
6
+ ColumnEditor,
7
+ Editor,
8
+ EditorValidator,
9
+ EditorValidationResult,
10
+ GridOption,
11
+ SlickGrid,
12
+ unsubscribeAllObservables,
13
+ } from './../modules/angular-slickgrid';
14
+
15
+ /*
16
+ * An example of a 'detached' editor.
17
+ * KeyDown events are also handled to provide handling for Tab, Shift-Tab, Esc and Ctrl-Enter.
18
+ */
19
+ export class CustomAngularComponentEditor implements Editor {
20
+ private _subscriptions: Subscription[] = [];
21
+
22
+ /** Angular Component Reference */
23
+ componentRef!: ComponentRef<any>;
24
+
25
+ /** default item Id */
26
+ defaultId = '';
27
+
28
+ /** default item object */
29
+ defaultItem: any;
30
+
31
+ /** SlickGrid grid object */
32
+ grid: SlickGrid;
33
+
34
+ constructor(private args: any) {
35
+ this.grid = args && args.grid;
36
+ this.init();
37
+ }
38
+
39
+ /** Angular Util Service (could be inside the Grid Options Params or the Editor Params ) */
40
+ get angularUtilService(): AngularUtilService {
41
+ let angularUtilService = this.gridOptions && this.gridOptions.params && this.gridOptions.params.angularUtilService;
42
+ if (!angularUtilService || !(angularUtilService instanceof AngularUtilService)) {
43
+ angularUtilService = this.columnEditor && this.columnEditor.params && this.columnEditor.params.angularUtilService;
44
+ }
45
+ return angularUtilService;
46
+ }
47
+
48
+ /** Get the Collection */
49
+ get collection(): any[] {
50
+ return this.columnDef && this.columnDef.internalColumnEditor!.collection || [];
51
+ }
52
+
53
+ /** Get Column Definition object */
54
+ get columnDef(): Column {
55
+ return this.args && this.args.column || {};
56
+ }
57
+
58
+ /** Get Column Editor object */
59
+ get columnEditor(): ColumnEditor {
60
+ return this.columnDef && this.columnDef.internalColumnEditor || {};
61
+ }
62
+
63
+ /** Getter for the Grid Options pulled through the Grid Object */
64
+ get gridOptions(): GridOption {
65
+ return this.grid?.getOptions?.() as GridOption;
66
+ }
67
+
68
+ get hasAutoCommitEdit(): boolean {
69
+ return this.gridOptions.autoCommitEdit ?? false;
70
+ }
71
+
72
+ /** Get the Validator function, can be passed in Editor property or Column Definition */
73
+ get validator(): EditorValidator | undefined {
74
+ return this.columnEditor.validator || this.columnDef.validator;
75
+ }
76
+
77
+ init() {
78
+ if (!this.columnEditor || !this.columnEditor.params.component || !(this.angularUtilService instanceof AngularUtilService)) {
79
+ throw new Error(`[Angular-Slickgrid] For Editor with Angular Component to work properly, you need to provide your component to the "component" property and make sure to add it to your "entryComponents" array.
80
+ You also need to provide the "AngularUtilService" via the Editor Params OR the Grid Options Params
81
+ Example: this.columnDefs = [{ id: 'title', field: 'title', editor: { model: CustomAngularComponentEditor, collection: [...], params: { component: MyComponent, angularUtilService: this.angularUtilService }}];
82
+ OR this.columnDefs = [{ id: 'title', field: 'title', editor: { model: CustomAngularComponentEditor, collection: [...] }]; this.gridOptions = { params: { angularUtilService: this.angularUtilService }}`);
83
+ }
84
+ if (this.columnEditor && this.columnEditor.params.component) {
85
+ const componentOutput = this.angularUtilService.createAngularComponentAppendToDom(this.columnEditor.params.component, this.args.container);
86
+ this.componentRef = componentOutput && componentOutput.componentRef;
87
+
88
+ // here we override the collection object of the Angular Component
89
+ // but technically you can pass any values you wish to your Component
90
+ Object.assign(this.componentRef.instance, { collection: this.collection });
91
+
92
+ // when our model (item object) changes, we'll call a save of the slickgrid editor
93
+ this._subscriptions.push(
94
+ this.componentRef.instance.onItemChanged.subscribe((item: any) => this.save())
95
+ );
96
+ }
97
+ }
98
+
99
+ save() {
100
+ const validation = this.validate();
101
+ if (validation && validation.valid) {
102
+ if (this.hasAutoCommitEdit) {
103
+ this.args.grid.getEditorLock().commitCurrentEdit();
104
+ } else {
105
+ this.args.commitChanges();
106
+ }
107
+ }
108
+ }
109
+
110
+ cancel() {
111
+ this.componentRef.instance.selectedId = this.defaultId;
112
+ this.componentRef.instance.selectedItem = this.defaultItem;
113
+ if (this.args && this.args.cancelChanges) {
114
+ this.args.cancelChanges();
115
+ }
116
+ }
117
+
118
+ /** optional, implement a hide method on your Angular Component */
119
+ hide() {
120
+ if (this.componentRef && this.componentRef.instance && typeof this.componentRef.instance.hide === 'function') {
121
+ this.componentRef.instance.hide();
122
+ }
123
+ }
124
+
125
+ /** optional, implement a show method on your Angular Component */
126
+ show() {
127
+ if (this.componentRef && this.componentRef.instance && typeof this.componentRef.instance.show === 'function') {
128
+ this.componentRef.instance.show();
129
+ }
130
+ }
131
+
132
+ /** destroy the Angular Component & Subscription */
133
+ destroy() {
134
+ if (this.componentRef && this.componentRef.destroy) {
135
+ this.componentRef.destroy();
136
+ }
137
+
138
+ // also unsubscribe all Angular Subscriptions
139
+ this._subscriptions = unsubscribeAllObservables(this._subscriptions);
140
+ }
141
+
142
+ /** optional, implement a focus method on your Angular Component */
143
+ focus() {
144
+ if (this.componentRef && this.componentRef.instance && typeof this.componentRef.instance.focus === 'function') {
145
+ this.componentRef.instance.focus();
146
+ }
147
+ }
148
+
149
+ applyValue(item: any, state: any) {
150
+ item[this.columnDef.field] = state;
151
+ }
152
+
153
+ getValue() {
154
+ return this.componentRef.instance.selectedId;
155
+ }
156
+
157
+ loadValue(item: any) {
158
+ const itemObject = item && item[this.columnDef.field];
159
+ this.componentRef.instance.selectedId = itemObject && itemObject.id || '';
160
+ this.componentRef.instance.selectedItem = itemObject && itemObject;
161
+ }
162
+
163
+ serializeValue(): any {
164
+ return this.componentRef.instance.selectedItem;
165
+ }
166
+
167
+ isValueChanged() {
168
+ return (!(this.componentRef.instance.selectedId === '' && (this.defaultId === null || this.defaultId === undefined))) && (this.componentRef.instance.selectedId !== this.defaultId);
169
+ }
170
+
171
+ validate(): EditorValidationResult {
172
+ if (this.validator) {
173
+ const value = this.componentRef.instance.selectedId;
174
+ return this.validator(value, this.args);
175
+ }
176
+
177
+ // by default the editor is always valid
178
+ // if user want it to be required, he would have to provide his own validator
179
+ return {
180
+ valid: true,
181
+ msg: null
182
+ };
183
+ }
184
+ }