ng-kinintel 0.0.317

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 (315) hide show
  1. package/README.md +24 -0
  2. package/karma.conf.js +44 -0
  3. package/ng-package.json +7 -0
  4. package/package.json +11 -0
  5. package/src/lib/components/alert-groups/alert-groups.component.html +140 -0
  6. package/src/lib/components/alert-groups/alert-groups.component.sass +4 -0
  7. package/src/lib/components/alert-groups/alert-groups.component.spec.ts +25 -0
  8. package/src/lib/components/alert-groups/alert-groups.component.ts +86 -0
  9. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.html +91 -0
  10. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.sass +2 -0
  11. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.spec.ts +25 -0
  12. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.ts +78 -0
  13. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.html +2006 -0
  14. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.sass +106 -0
  15. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.spec.ts +25 -0
  16. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.ts +967 -0
  17. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.html +81 -0
  18. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.sass +0 -0
  19. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.spec.ts +25 -0
  20. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.ts +48 -0
  21. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.html +142 -0
  22. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.sass +0 -0
  23. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.spec.ts +25 -0
  24. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.ts +117 -0
  25. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.html +224 -0
  26. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.sass +0 -0
  27. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.spec.ts +25 -0
  28. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.ts +149 -0
  29. package/src/lib/components/dashboard-editor/configure-item/vis-network-options.json +135 -0
  30. package/src/lib/components/dashboard-editor/dashboard-editor.component.html +205 -0
  31. package/src/lib/components/dashboard-editor/dashboard-editor.component.sass +247 -0
  32. package/src/lib/components/dashboard-editor/dashboard-editor.component.spec.ts +25 -0
  33. package/src/lib/components/dashboard-editor/dashboard-editor.component.ts +645 -0
  34. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.html +1 -0
  35. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.sass +0 -0
  36. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.spec.ts +25 -0
  37. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.ts +16 -0
  38. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.html +167 -0
  39. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.sass +0 -0
  40. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.spec.ts +23 -0
  41. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.ts +47 -0
  42. package/src/lib/components/dashboard-editor/item-component/item-component.component.html +486 -0
  43. package/src/lib/components/dashboard-editor/item-component/item-component.component.sass +137 -0
  44. package/src/lib/components/dashboard-editor/item-component/item-component.component.spec.ts +25 -0
  45. package/src/lib/components/dashboard-editor/item-component/item-component.component.ts +1381 -0
  46. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.html +48 -0
  47. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.sass +3 -0
  48. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.spec.ts +25 -0
  49. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.ts +111 -0
  50. package/src/lib/components/dashboards/dashboards.component.html +175 -0
  51. package/src/lib/components/dashboards/dashboards.component.sass +64 -0
  52. package/src/lib/components/dashboards/dashboards.component.spec.ts +25 -0
  53. package/src/lib/components/dashboards/dashboards.component.ts +176 -0
  54. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.html +138 -0
  55. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.sass +284 -0
  56. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.spec.ts +25 -0
  57. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.ts +462 -0
  58. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.html +35 -0
  59. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.sass +0 -0
  60. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.spec.ts +23 -0
  61. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.ts +21 -0
  62. package/src/lib/components/data-explorer/data-explorer.component.html +326 -0
  63. package/src/lib/components/data-explorer/data-explorer.component.sass +96 -0
  64. package/src/lib/components/data-explorer/data-explorer.component.spec.ts +25 -0
  65. package/src/lib/components/data-explorer/data-explorer.component.ts +267 -0
  66. package/src/lib/components/data-explorer/export-data/export-data.component.html +69 -0
  67. package/src/lib/components/data-explorer/export-data/export-data.component.sass +0 -0
  68. package/src/lib/components/data-explorer/export-data/export-data.component.spec.ts +25 -0
  69. package/src/lib/components/data-explorer/export-data/export-data.component.ts +56 -0
  70. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.html +195 -0
  71. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.sass +0 -0
  72. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.spec.ts +23 -0
  73. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.ts +79 -0
  74. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.html +375 -0
  75. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.sass +21 -0
  76. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.spec.ts +25 -0
  77. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.ts +197 -0
  78. package/src/lib/components/data-picker/data-picker.component.html +127 -0
  79. package/src/lib/components/data-picker/data-picker.component.sass +0 -0
  80. package/src/lib/components/data-picker/data-picker.component.spec.ts +25 -0
  81. package/src/lib/components/data-picker/data-picker.component.ts +90 -0
  82. package/src/lib/components/data-search/data-search.component.html +1 -0
  83. package/src/lib/components/data-search/data-search.component.sass +0 -0
  84. package/src/lib/components/data-search/data-search.component.spec.ts +23 -0
  85. package/src/lib/components/data-search/data-search.component.ts +10 -0
  86. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.html +53 -0
  87. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.sass +0 -0
  88. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.spec.ts +23 -0
  89. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.ts +56 -0
  90. package/src/lib/components/dataset/create-dataset/create-dataset.component.html +25 -0
  91. package/src/lib/components/dataset/create-dataset/create-dataset.component.sass +0 -0
  92. package/src/lib/components/dataset/create-dataset/create-dataset.component.spec.ts +25 -0
  93. package/src/lib/components/dataset/create-dataset/create-dataset.component.ts +44 -0
  94. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.html +28 -0
  95. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.sass +0 -0
  96. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.spec.ts +25 -0
  97. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.ts +22 -0
  98. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.html +196 -0
  99. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.sass +17 -0
  100. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.spec.ts +25 -0
  101. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.ts +422 -0
  102. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.html +30 -0
  103. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.sass +47 -0
  104. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.spec.ts +25 -0
  105. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.ts +78 -0
  106. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.html +86 -0
  107. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.sass +0 -0
  108. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.spec.ts +25 -0
  109. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.ts +49 -0
  110. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.html +68 -0
  111. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.sass +15 -0
  112. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.spec.ts +25 -0
  113. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.ts +65 -0
  114. package/src/lib/components/dataset/dataset-editor/dataset-editor-popup.html +19 -0
  115. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.html +609 -0
  116. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.sass +267 -0
  117. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.spec.ts +25 -0
  118. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.ts +1228 -0
  119. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.html +309 -0
  120. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.sass +41 -0
  121. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.spec.ts +25 -0
  122. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.ts +215 -0
  123. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.html +33 -0
  124. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.sass +3 -0
  125. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.spec.ts +23 -0
  126. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.ts +20 -0
  127. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.html +52 -0
  128. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.sass +14 -0
  129. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.spec.ts +25 -0
  130. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.ts +58 -0
  131. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.html +47 -0
  132. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.sass +25 -0
  133. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.spec.ts +25 -0
  134. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.ts +49 -0
  135. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.html +49 -0
  136. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.sass +2 -0
  137. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.spec.ts +25 -0
  138. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.ts +39 -0
  139. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.html +195 -0
  140. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.sass +14 -0
  141. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.spec.ts +25 -0
  142. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.ts +82 -0
  143. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.html +78 -0
  144. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.sass +16 -0
  145. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.spec.ts +25 -0
  146. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.ts +32 -0
  147. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.html +24 -0
  148. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.sass +22 -0
  149. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.spec.ts +25 -0
  150. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.ts +64 -0
  151. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.html +177 -0
  152. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.sass +80 -0
  153. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.spec.ts +25 -0
  154. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.ts +113 -0
  155. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.html +32 -0
  156. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.sass +0 -0
  157. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.spec.ts +23 -0
  158. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.ts +20 -0
  159. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.html +37 -0
  160. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.sass +0 -0
  161. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.spec.ts +23 -0
  162. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.ts +19 -0
  163. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.html +69 -0
  164. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.sass +0 -0
  165. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.spec.ts +23 -0
  166. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.ts +58 -0
  167. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.html +195 -0
  168. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.sass +0 -0
  169. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.spec.ts +23 -0
  170. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.ts +128 -0
  171. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.html +34 -0
  172. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.sass +3 -0
  173. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.spec.ts +23 -0
  174. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.ts +21 -0
  175. package/src/lib/components/dataset/dataset.component.html +317 -0
  176. package/src/lib/components/dataset/dataset.component.sass +73 -0
  177. package/src/lib/components/dataset/dataset.component.spec.ts +25 -0
  178. package/src/lib/components/dataset/dataset.component.ts +320 -0
  179. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.html +133 -0
  180. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.sass +51 -0
  181. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.spec.ts +23 -0
  182. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.ts +140 -0
  183. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.html +257 -0
  184. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.sass +0 -0
  185. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.spec.ts +23 -0
  186. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.ts +148 -0
  187. package/src/lib/components/datasource/create-datasource/create-datasource.component.html +430 -0
  188. package/src/lib/components/datasource/create-datasource/create-datasource.component.sass +162 -0
  189. package/src/lib/components/datasource/create-datasource/create-datasource.component.spec.ts +25 -0
  190. package/src/lib/components/datasource/create-datasource/create-datasource.component.ts +789 -0
  191. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.html +119 -0
  192. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.sass +8 -0
  193. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.spec.ts +25 -0
  194. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.ts +163 -0
  195. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.html +239 -0
  196. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.sass +0 -0
  197. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.spec.ts +23 -0
  198. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.ts +182 -0
  199. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.html +167 -0
  200. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.sass +87 -0
  201. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.spec.ts +23 -0
  202. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.ts +164 -0
  203. package/src/lib/components/datasource/datasource.component.html +165 -0
  204. package/src/lib/components/datasource/datasource.component.sass +4 -0
  205. package/src/lib/components/datasource/datasource.component.spec.ts +25 -0
  206. package/src/lib/components/datasource/datasource.component.ts +174 -0
  207. package/src/lib/components/datasource/document-datasource/document-datasource.component.html +558 -0
  208. package/src/lib/components/datasource/document-datasource/document-datasource.component.sass +84 -0
  209. package/src/lib/components/datasource/document-datasource/document-datasource.component.spec.ts +25 -0
  210. package/src/lib/components/datasource/document-datasource/document-datasource.component.ts +351 -0
  211. package/src/lib/components/export-project/export-project.component.html +280 -0
  212. package/src/lib/components/export-project/export-project.component.sass +0 -0
  213. package/src/lib/components/export-project/export-project.component.spec.ts +23 -0
  214. package/src/lib/components/export-project/export-project.component.ts +29 -0
  215. package/src/lib/components/feeds/feed/feed.component.html +144 -0
  216. package/src/lib/components/feeds/feed/feed.component.sass +0 -0
  217. package/src/lib/components/feeds/feed/feed.component.spec.ts +25 -0
  218. package/src/lib/components/feeds/feed/feed.component.ts +102 -0
  219. package/src/lib/components/feeds/feeds.component.html +210 -0
  220. package/src/lib/components/feeds/feeds.component.sass +4 -0
  221. package/src/lib/components/feeds/feeds.component.spec.ts +25 -0
  222. package/src/lib/components/feeds/feeds.component.ts +163 -0
  223. package/src/lib/components/job-tasks/job-tasks.component.html +22 -0
  224. package/src/lib/components/job-tasks/job-tasks.component.sass +0 -0
  225. package/src/lib/components/job-tasks/job-tasks.component.spec.ts +25 -0
  226. package/src/lib/components/job-tasks/job-tasks.component.ts +19 -0
  227. package/src/lib/components/marketplace/marketplace.component.html +143 -0
  228. package/src/lib/components/marketplace/marketplace.component.sass +0 -0
  229. package/src/lib/components/marketplace/marketplace.component.spec.ts +23 -0
  230. package/src/lib/components/marketplace/marketplace.component.ts +73 -0
  231. package/src/lib/components/metadata/metadata.component.html +62 -0
  232. package/src/lib/components/metadata/metadata.component.sass +0 -0
  233. package/src/lib/components/metadata/metadata.component.spec.ts +25 -0
  234. package/src/lib/components/metadata/metadata.component.ts +67 -0
  235. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.html +82 -0
  236. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.sass +21 -0
  237. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.spec.ts +25 -0
  238. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.ts +123 -0
  239. package/src/lib/components/notification-groups/notification-groups.component.html +125 -0
  240. package/src/lib/components/notification-groups/notification-groups.component.sass +4 -0
  241. package/src/lib/components/notification-groups/notification-groups.component.spec.ts +25 -0
  242. package/src/lib/components/notification-groups/notification-groups.component.ts +98 -0
  243. package/src/lib/components/project-picker/project-picker.component.html +167 -0
  244. package/src/lib/components/project-picker/project-picker.component.sass +1 -0
  245. package/src/lib/components/project-picker/project-picker.component.spec.ts +25 -0
  246. package/src/lib/components/project-picker/project-picker.component.ts +138 -0
  247. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.html +120 -0
  248. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.sass +0 -0
  249. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.spec.ts +23 -0
  250. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.ts +161 -0
  251. package/src/lib/components/project-settings/project-settings.component.html +353 -0
  252. package/src/lib/components/project-settings/project-settings.component.sass +0 -0
  253. package/src/lib/components/project-settings/project-settings.component.spec.ts +23 -0
  254. package/src/lib/components/project-settings/project-settings.component.ts +178 -0
  255. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.html +96 -0
  256. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.sass +0 -0
  257. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.spec.ts +23 -0
  258. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.ts +48 -0
  259. package/src/lib/components/query-caching/query-caching.component.html +122 -0
  260. package/src/lib/components/query-caching/query-caching.component.sass +0 -0
  261. package/src/lib/components/query-caching/query-caching.component.spec.ts +23 -0
  262. package/src/lib/components/query-caching/query-caching.component.ts +184 -0
  263. package/src/lib/components/shared-with-me/shared-with-me.component.html +115 -0
  264. package/src/lib/components/shared-with-me/shared-with-me.component.sass +0 -0
  265. package/src/lib/components/shared-with-me/shared-with-me.component.spec.ts +23 -0
  266. package/src/lib/components/shared-with-me/shared-with-me.component.ts +123 -0
  267. package/src/lib/components/snapshots/snapshots.component.html +408 -0
  268. package/src/lib/components/snapshots/snapshots.component.sass +4 -0
  269. package/src/lib/components/snapshots/snapshots.component.spec.ts +25 -0
  270. package/src/lib/components/snapshots/snapshots.component.ts +286 -0
  271. package/src/lib/components/tag-picker/tag-picker.component.html +155 -0
  272. package/src/lib/components/tag-picker/tag-picker.component.sass +2 -0
  273. package/src/lib/components/tag-picker/tag-picker.component.spec.ts +25 -0
  274. package/src/lib/components/tag-picker/tag-picker.component.ts +82 -0
  275. package/src/lib/components/task-time-periods/task-time-periods.component.html +93 -0
  276. package/src/lib/components/task-time-periods/task-time-periods.component.sass +7 -0
  277. package/src/lib/components/task-time-periods/task-time-periods.component.spec.ts +25 -0
  278. package/src/lib/components/task-time-periods/task-time-periods.component.ts +50 -0
  279. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.html +111 -0
  280. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.sass +0 -0
  281. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.spec.ts +25 -0
  282. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.ts +38 -0
  283. package/src/lib/guards/dashboard-changes.guard.spec.ts +16 -0
  284. package/src/lib/guards/dashboard-changes.guard.ts +27 -0
  285. package/src/lib/ng-kinintel.module.ts +272 -0
  286. package/src/lib/objects/action-event.spec.ts +7 -0
  287. package/src/lib/objects/action-event.ts +27 -0
  288. package/src/lib/services/alert.service.spec.ts +16 -0
  289. package/src/lib/services/alert.service.ts +49 -0
  290. package/src/lib/services/dashboard.service.spec.ts +16 -0
  291. package/src/lib/services/dashboard.service.ts +79 -0
  292. package/src/lib/services/data-processor.service.spec.ts +16 -0
  293. package/src/lib/services/data-processor.service.ts +61 -0
  294. package/src/lib/services/data-search.service.spec.ts +16 -0
  295. package/src/lib/services/data-search.service.ts +31 -0
  296. package/src/lib/services/dataset.service.spec.ts +16 -0
  297. package/src/lib/services/dataset.service.ts +234 -0
  298. package/src/lib/services/datasource.service.spec.ts +16 -0
  299. package/src/lib/services/datasource.service.ts +116 -0
  300. package/src/lib/services/external.service.spec.ts +16 -0
  301. package/src/lib/services/external.service.ts +29 -0
  302. package/src/lib/services/feed.service.spec.ts +16 -0
  303. package/src/lib/services/feed.service.ts +48 -0
  304. package/src/lib/services/notification.service.spec.ts +16 -0
  305. package/src/lib/services/notification.service.ts +38 -0
  306. package/src/lib/services/project.service.spec.ts +16 -0
  307. package/src/lib/services/project.service.ts +146 -0
  308. package/src/lib/services/tag.service.spec.ts +16 -0
  309. package/src/lib/services/tag.service.ts +61 -0
  310. package/src/public-api.ts +46 -0
  311. package/src/test.ts +17 -0
  312. package/tsconfig.lib.json +24 -0
  313. package/tsconfig.lib.prod.json +10 -0
  314. package/tsconfig.spec.json +17 -0
  315. package/tslint.json +17 -0
@@ -0,0 +1,2006 @@
1
+ <div class="pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 -z-10" id="sidebarWrapper2">
2
+ <div [ngClass]="{'translate-x-0': sideOpen, 'translate-x-full': !sideOpen}"
3
+ (click)="$event.stopPropagation()"
4
+ class="pointer-events-auto w-screen max-w-md transform transition ease-in-out duration-500 sm:duration-700"
5
+ id="docSidebar">
6
+ <div class="flex h-full flex-col overflow-y-scroll bg-white py-6 shadow-xl">
7
+ <div class="px-4 sm:px-6">
8
+ <div class="flex items-start justify-between">
9
+ <div></div>
10
+ <div class="ml-3 flex h-7 items-center">
11
+ <button type="button" (click)="openSide.next(false)"
12
+ class="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none">
13
+ <span class="sr-only">Close panel</span>
14
+ <!-- Heroicon name: outline/x -->
15
+ <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
16
+ stroke="currentColor" aria-hidden="true">
17
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
18
+ d="M6 18L18 6M6 6l12 12"/>
19
+ </svg>
20
+ </button>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ <div class="relative flex-1 px-4 sm:px-6">
25
+ <ki-html-documentation [columns]="docColumns"></ki-html-documentation>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+
31
+ <div class="configure-header">
32
+ Configure {{dashboardItemType.label}}
33
+ <button mat-button (click)="saveDashboard()">
34
+ <div class="flex items-center">
35
+ <mat-icon class="mr-1">chevron_left</mat-icon>
36
+ Back to Dashboard
37
+ </div>
38
+ </button>
39
+ </div>
40
+ <nav class="h-10 flex border-b border-gray-200 bg-white" aria-label="Breadcrumb">
41
+ <ol role="list" class="flex w-full px-4">
42
+ <li class="flex">
43
+ <div class="flex items-center">
44
+ <a mat-dialog-close [routerLink]="['/']" class="text-gray-600 hover:text-gray-800 flex items-center">
45
+ <span class="material-symbols-outlined">home</span>
46
+ </a>
47
+ </div>
48
+ </li>
49
+
50
+ <li class="flex truncate">
51
+ <div class="flex items-center">
52
+ <svg class="h-full w-6 flex-shrink-0 text-gray-200" viewBox="0 0 24 44" preserveAspectRatio="none"
53
+ fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
54
+ <path d="M.293 0l22 22-22 22h1.414l22-22-22-22H.293z"/>
55
+ </svg>
56
+ <a mat-dialog-close [routerLink]="['/dashboards']"
57
+ class="capitalize ml-4 text-sm font-medium text-gray-500 hover:text-gray-700">
58
+ Dashboards</a>
59
+ </div>
60
+ </li>
61
+
62
+ <li class="flex truncate">
63
+ <div class="flex items-center">
64
+ <svg class="h-full w-6 flex-shrink-0 text-gray-200" viewBox="0 0 24 44" preserveAspectRatio="none"
65
+ fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
66
+ <path d="M.293 0l22 22-22 22h1.414l22-22-22-22H.293z"/>
67
+ </svg>
68
+ <a (click)="saveDashboard()"
69
+ class="capitalize ml-4 text-sm font-medium text-gray-500 hover:text-gray-700">
70
+ Dashboard Editor</a>
71
+ </div>
72
+ </li>
73
+
74
+ <li class="flex" *ngIf="dashboardDatasetInstance">
75
+ <div class="flex items-center">
76
+ <svg class="h-full w-6 flex-shrink-0 text-gray-200" viewBox="0 0 24 44" preserveAspectRatio="none"
77
+ fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
78
+ <path d="M.293 0l22 22-22 22h1.414l22-22-22-22H.293z"/>
79
+ </svg>
80
+ <a class="ml-4 text-sm font-medium text-gray-500 hover:text-gray-700" aria-current="page">
81
+ {{dashboardItemType.label}} Editor
82
+ </a>
83
+ <ng-template [ngIf]="dashboardDatasetInstance && dashboardDatasetInstance.source">
84
+ <span
85
+ class="flex items-center border border-gray-200 text-xs px-2 py-0 rounded-xl ml-2 font-thin bg-gray-100">
86
+ <span class="uppercase tracking-wider text-gray-700 font-medium">Querying:</span>
87
+ <ng-template [ngIf]="dashboardDatasetInstance.source.datasourceInstanceKey">
88
+ <img *ngIf="['custom', 'snapshot'].indexOf(dashboardDatasetInstance.source.type) === -1"
89
+ src="/assets/favicon-rev.png" class="w-2.5 mx-1.5">
90
+ <span *ngIf="dashboardDatasetInstance.source.type === 'custom'"
91
+ class="material-symbols-outlined h-4 w-4 text-lg leading-4 mx-1.5">upload_file</span>
92
+ <span *ngIf="dashboardDatasetInstance.source.type === 'snapshot'"
93
+ class="material-symbols-outlined h-4 w-4 text-lg leading-4 mx-1.5">history</span>
94
+ </ng-template>
95
+ <ng-template [ngIf]="!dashboardDatasetInstance.source.datasourceInstanceKey">
96
+ <span class="material-symbols-outlined h-4 w-4 text-lg leading-4 mx-1.5">query_stats</span>
97
+ </ng-template>
98
+ &nbsp;{{dashboardDatasetInstance.source.title}}
99
+ <span class="material-symbols-outlined ml-2 cursor-pointer" title="Change source query"
100
+ (click)="changeSource()">change_circle</span>
101
+ </span>
102
+ </ng-template>
103
+ </div>
104
+ </li>
105
+ </ol>
106
+ </nav>
107
+ <div class="configure-content">
108
+
109
+ <rsz-layout class="row top" [directions]="['bottom']" [rFlex]="true">
110
+ <div class="cell-contents p-0">
111
+ <div *ngIf="!dashboardDatasetInstance" class="flex items-center justify-center h-full w-full">
112
+ <div class="flex items-center flex-col">
113
+ <button mat-stroked-button color="primary" class="config-button"
114
+ (click)="selectedDatasource()">
115
+ Configure {{dashboardItemType.label}}
116
+ </button>
117
+ <p class="font-light w-3/4 text-center mt-4">
118
+ Please configure this {{dashboardItemType.label}} using a data feed or stored query.
119
+ </p>
120
+ </div>
121
+ </div>
122
+
123
+ <ki-dataset-editor #datasetEditorComponent *ngIf="dashboardDatasetInstance" [(datasetInstanceSummary)]="dashboardDatasetInstance"
124
+ (dataLoaded)="dataLoaded($event)" [admin]="admin" [dashboardLayoutSettings]="general"
125
+ [dashboardParameters]="widgetParameters"></ki-dataset-editor>
126
+ </div>
127
+ </rsz-layout>
128
+
129
+ <rsz-layout class="row bottom" [directions]="['none']" [rFlex]="false">
130
+ <mat-tab-group class="gray-header h-full">
131
+ <mat-tab label="Header">
132
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
133
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
134
+ <div class="flex items-start flex-1">
135
+ <div class="pt-1.5">
136
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Header Settings</h1>
137
+ <p class="text-xs font-medium text-gray-500">
138
+ Enter HTML/Text for the Title and Description fields
139
+ </p>
140
+ </div>
141
+ </div>
142
+ <div class="flex flex-col-reverse justify-stretch">
143
+ <a (click)="openSide.next(true)"
144
+ class="text-xs ml-2 hover:underline flex items-center primary text-cta">
145
+ view help docs&nbsp;
146
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20"
147
+ fill="currentColor">
148
+ <path
149
+ d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"/>
150
+ <path
151
+ d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"/>
152
+ </svg>
153
+ </a>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ <div class="flex justify-between">
158
+ <div class="w-1/2">
159
+ <div class="p-4">
160
+ <label class="mb-2">
161
+ Title
162
+ <input type="text" [(ngModel)]="general.name">
163
+ <small class="font-normal">Title of the item</small>
164
+ </label>
165
+ <label class="mb-2">
166
+ Description
167
+ <textarea class="font-mono w-full"
168
+ cols="30" rows="5" [(ngModel)]="general.description"></textarea>
169
+ <small class="font-normal">Description of the data item.</small>
170
+ </label>
171
+
172
+ </div>
173
+ </div>
174
+ <div class="w-1/2">
175
+ <div class="p-4">
176
+ <div class="flex items-center">
177
+ <mat-checkbox class="mr-2" [(ngModel)]="general.transparent"></mat-checkbox>
178
+ <p class="mb-0 mt-1">Transparent background</p>
179
+ </div>
180
+ <small class="mb-4 block font-normal">Make this dashboard items background transparent -
181
+ requires page refresh to take affect</small>
182
+
183
+ <ng-template [ngIf]="dashboard.layoutSettings && dashboard.layoutSettings.parameters && Object.keys(dashboard.layoutSettings.parameters).length">
184
+ <div class="flex items-center">
185
+ <mat-checkbox class="mr-2" [(ngModel)]="general.showParameterBar"></mat-checkbox>
186
+ <p class="mb-0 mt-1">Show Parameter Bar</p>
187
+ </div>
188
+ <small class="mb-4 block font-normal">
189
+ Enable which parameters to show in this widget. Values entered here will only reload
190
+ this widget.
191
+ </small>
192
+
193
+ <ng-template [ngIf]="general.showParameterBar">
194
+ <div class="border-l-2 pl-4">
195
+ <div *ngFor="let parameterKey of Object.keys(dashboard.layoutSettings.parameters)"
196
+ class="flex items-center">
197
+ <mat-checkbox class="mr-2" [(ngModel)]="general.parameterBar[parameterKey]"></mat-checkbox>
198
+ <p class="mb-0 mt-1">{{dashboard.layoutSettings.parameters[parameterKey].title}}</p>
199
+ </div>
200
+ </div>
201
+
202
+ </ng-template>
203
+
204
+ </ng-template>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+
210
+ </mat-tab>
211
+ <mat-tab label="Footer">
212
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
213
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
214
+ <div class="flex items-start flex-1">
215
+ <div class="pt-1.5">
216
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Footer Settings</h1>
217
+ <p class="text-xs font-medium text-gray-500">
218
+ Enter HTML/Text for the footer field
219
+ </p>
220
+ </div>
221
+ </div>
222
+ <div class="flex flex-col-reverse justify-stretch">
223
+ <a (click)="openSide.next(true)"
224
+ class="text-xs ml-2 hover:underline flex items-center primary text-cta">
225
+ view help docs&nbsp;
226
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20"
227
+ fill="currentColor">
228
+ <path
229
+ d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"/>
230
+ <path
231
+ d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"/>
232
+ </svg>
233
+ </a>
234
+ </div>
235
+ </div>
236
+ </div>
237
+ <div class="w-1/2">
238
+ <div class="p-4">
239
+ <label class="mb-2">
240
+ Footer
241
+ <input type="text" [(ngModel)]="general.footer">
242
+ <small class="font-normal">Text to display at the bottom of the item</small>
243
+ </label>
244
+
245
+ <label class="mb-2">
246
+ Call to action
247
+ <select matNativeControl [(ngModel)]="callToAction" [compareWith]="setCallToActionItem"
248
+ (ngModelChange)="ctaUpdate($event)">
249
+ <option value="">None</option>
250
+ <option [ngValue]="{type: 'custom'}">Custom Link</option>
251
+ <optgroup label="Dashboards">
252
+ <option *ngFor="let dashboard of dashboards"
253
+ [ngValue]="{type: 'dashboard', value: dashboard.id, label: dashboard.title}">{{dashboard.title}}</option>
254
+ </optgroup>
255
+ <optgroup *ngIf="admin" label="DAP Data Feeds">
256
+ <option *ngFor="let dapFeed of dapFeeds"
257
+ [ngValue]="{type: 'feed', value: dapFeed.id, label: dapFeed.title}">{{dapFeed.title}}</option>
258
+ </optgroup>
259
+ </select>
260
+ <small class="font-normal">Select the destination for the action link</small>
261
+ </label>
262
+ <ng-template [ngIf]="callToAction.type === 'custom'">
263
+ <p>Please enter the link for this call to action.</p>
264
+
265
+ <label class="mb-2">
266
+ Link
267
+ <input type="text" [(ngModel)]="callToAction.link">
268
+ </label>
269
+
270
+ </ng-template>
271
+
272
+ <label class="mb-2">
273
+ Set action label
274
+ <input type="text" [(ngModel)]="callToAction.label">
275
+ </label>
276
+
277
+ <ng-template [ngIf]="callToAction && callToAction.parameters && dashboardParameters.length">
278
+ <p>Please enter the following parameters to use with this dashboard</p>
279
+
280
+ <ng-template ngFor let-param [ngForOf]="dashboardParameters">
281
+ <label>{{param.title}}</label>
282
+ <label *ngIf="!callToAction.parameters['custom-'+param.name]"
283
+ class="mb-2 dashboard-param-pick">
284
+ <select matNativeControl [(ngModel)]="callToAction.parameters[param.name]"
285
+ [compareWith]="ctaSelectOption">
286
+ <option [value]="undefined">-- Select Value --</option>
287
+ <option *ngFor="let paramValue of dashboardParamValues"
288
+ [value]="paramValue">
289
+ {{paramValue}}
290
+ </option>
291
+ </select>
292
+ </label>
293
+ <div class="mb-2 flex items-center">
294
+ <mat-checkbox class="mr-1"
295
+ [(ngModel)]="callToAction.parameters['custom-'+param.name]"></mat-checkbox>
296
+ <p class="mb-0 mt-1">Use custom value</p>
297
+ </div>
298
+ <label class="mb-2 dashboard-param-pick">
299
+ <input type="text" *ngIf="callToAction.parameters['custom-'+param.name]"
300
+ placeholder="Enter custom parameter value"
301
+ [(ngModel)]="callToAction.parameters[param.name]">
302
+ </label>
303
+ </ng-template>
304
+
305
+
306
+ </ng-template>
307
+ </div>
308
+
309
+ </div>
310
+ </mat-tab>
311
+ <mat-tab label="Dependencies">
312
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
313
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
314
+ <div class="flex items-start flex-1">
315
+ <div class="pt-1.5">
316
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Dependency Settings</h1>
317
+ <p class="text-xs font-medium text-gray-500">
318
+ If the loading of this widget is dependant on the results of another,
319
+ you can set the dependency here.
320
+ </p>
321
+ </div>
322
+ </div>
323
+ </div>
324
+ </div>
325
+ <div class="flex justify-between">
326
+ <div class="w-1/2">
327
+ <div class="p-4">
328
+ <label class="mb-2">
329
+ Select the dashboard item(s) this depends on
330
+ <mat-select [(ngModel)]="dependencies.instanceKeys" multiple>
331
+ <mat-option *ngFor="let instance of dashboard.datasetInstances"
332
+ [value]="instance.instanceKey">
333
+ {{dashboard.layoutSettings.general ? (dashboard.layoutSettings.general[instance.instanceKey] ? dashboard.layoutSettings.general[instance.instanceKey].name || instance.instanceKey : instance.instanceKey) : instance.instanceKey }}
334
+ </mat-option>
335
+ </mat-select>
336
+ </label>
337
+
338
+ <ng-template ngFor let-instanceKey [ngForOf]="dependencies.instanceKeys">
339
+ <label class="mb-2">
340
+ Dependency result type for
341
+ {{dashboard.layoutSettings.general ? (dashboard.layoutSettings.general[instanceKey] ? dashboard.layoutSettings.general[instanceKey].name || instanceKey : instanceKey) : instanceKey }}
342
+ <mat-select [(ngModel)]="dependencies[instanceKey]" [compareWith]="depSelection"
343
+ (ngModelChange)="updateInstanceFilterFields($event, instanceKey)">
344
+ <mat-option [value]="{type: null}">-- Select Type --</mat-option>
345
+ <mat-option [value]="{type: 'LOADED'}">Loaded</mat-option>
346
+ <mat-option
347
+ [value]="{type: 'MATCH', filterJunction: _.clone(filterJunction), key: instanceKey}">
348
+ Matches Criteria
349
+ </mat-option>
350
+ </mat-select>
351
+ </label>
352
+
353
+ <ng-template
354
+ [ngIf]="dependencies[instanceKey] && dependencies[instanceKey].type === 'MATCH'">
355
+ <div class="w-full flex items-center"
356
+ *ngIf="!dependencies[instanceKey].filterFields">
357
+ Loading filter component...
358
+ </div>
359
+ <ki-dataset-filters *ngIf="dependencies[instanceKey].filterFields" class="ml-0"
360
+ [filterJunction]="dependencies[instanceKey].filterJunction"
361
+ [filterFields]="dependencies[instanceKey].filterFields"></ki-dataset-filters>
362
+ </ng-template>
363
+
364
+ </ng-template>
365
+
366
+ </div>
367
+ </div>
368
+ <div class="w-1/2">
369
+ <div class="p-4">
370
+ <label class="mb-2">
371
+ No data notice message
372
+ <input type="text" [(ngModel)]="dependencies.notice">
373
+ <small class="font-normal">Enter the message to display when no data is returned from
374
+ dependency.</small>
375
+ </label>
376
+ </div>
377
+ </div>
378
+ </div>
379
+
380
+ </mat-tab>
381
+ <mat-tab label="Action">
382
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
383
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
384
+ <div class="flex items-start flex-1">
385
+ <div class="pt-1.5">
386
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Action Settings</h1>
387
+ <p class="text-xs font-medium text-gray-500">
388
+ Configure available actions that can be performed on this item.
389
+ </p>
390
+ </div>
391
+ </div>
392
+ </div>
393
+ </div>
394
+ <div class="w-1/2">
395
+ <div class="p-4">
396
+ <div class="font-medium mb-2">
397
+ Navigate to another dashboard or URL by clicking on this widget item.
398
+ </div>
399
+
400
+ <label class="mb-2">
401
+ Destination
402
+ <select matNativeControl [(ngModel)]="actionItem" [compareWith]="setCallToActionItem"
403
+ (ngModelChange)="ctaUpdate($event)">
404
+ <option value="">None</option>
405
+ <option [ngValue]="{type: 'custom'}">Custom Link</option>
406
+ <optgroup label="Dashboards">
407
+ <option *ngFor="let dashboard of dashboards"
408
+ [ngValue]="{type: 'dashboard', value: dashboard.id, label: dashboard.title}">{{dashboard.title}}</option>
409
+ </optgroup>
410
+ <optgroup label="Shared Dashboards">
411
+ <option *ngFor="let dashboard of sharedDashboards"
412
+ [ngValue]="{type: 'dashboard', value: dashboard.id, label: dashboard.title}">{{dashboard.title}}</option>
413
+ </optgroup>
414
+ <optgroup label="Private Dashboards" *ngIf="privateDashboards.length">
415
+ <option *ngFor="let dashboard of privateDashboards"
416
+ [ngValue]="{type: 'dashboard', value: dashboard.id, label: dashboard.title}">{{dashboard.title}}</option>
417
+ </optgroup>
418
+ </select>
419
+ <small class="font-normal">Select the destination for the action link</small>
420
+ </label>
421
+ <ng-template [ngIf]="actionItem.type === 'custom'">
422
+ <p>Please enter the link for this call to action.</p>
423
+
424
+ <label class="mb-2">
425
+ Link
426
+ <input type="text" [(ngModel)]="actionItem.link">
427
+ </label>
428
+
429
+ </ng-template>
430
+
431
+ <ng-template [ngIf]="actionItem && actionItem.parameters && dashboardParameters.length">
432
+ <p>Please enter the following parameters to use with this dashboard</p>
433
+
434
+ <ng-template ngFor let-param [ngForOf]="dashboardParameters">
435
+ <label>{{param.title}}</label>
436
+ <label *ngIf="!actionItem.parameters['custom-'+param.name]"
437
+ class="mb-2 dashboard-param-pick">
438
+ <select matNativeControl [(ngModel)]="actionItem.parameters[param.name]"
439
+ [compareWith]="ctaSelectOption">
440
+ <option [value]="undefined">-- Select Value --</option>
441
+ <ng-template [ngIf]="dataset">
442
+ <option *ngFor="let column of dataset.columns"
443
+ [value]="'[['+column.name+']]'">
444
+ {{column.title}}
445
+ </option>
446
+ </ng-template>
447
+ </select>
448
+ </label>
449
+ <div class="mb-2 flex items-center">
450
+ <mat-checkbox class="mr-1"
451
+ [(ngModel)]="actionItem.parameters['custom-'+param.name]"></mat-checkbox>
452
+ <p class="mb-0 mt-1">Use custom value</p>
453
+ </div>
454
+ <label class="mb-2 dashboard-param-pick">
455
+ <input type="text" *ngIf="actionItem.parameters['custom-'+param.name]"
456
+ placeholder="Enter custom parameter value"
457
+ [(ngModel)]="actionItem.parameters[param.name]">
458
+ </label>
459
+ </ng-template>
460
+
461
+
462
+ </ng-template>
463
+ </div>
464
+ </div>
465
+ </mat-tab>
466
+ <mat-tab label="Text" *ngIf="dashboardItemType.type === 'text'">
467
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
468
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
469
+ <div class="flex items-start flex-1">
470
+ <div class="pt-1.5">
471
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Text Settings</h1>
472
+ <p class="text-xs font-medium text-gray-500">
473
+ Enter HTML/Text for this item.
474
+ </p>
475
+ </div>
476
+ </div>
477
+ <div class="flex flex-col-reverse justify-stretch">
478
+ <a (click)="openSide.next(true)"
479
+ class="text-xs ml-2 hover:underline flex items-center primary text-cta">
480
+ view help docs&nbsp;
481
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20"
482
+ fill="currentColor">
483
+ <path
484
+ d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"/>
485
+ <path
486
+ d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"/>
487
+ </svg>
488
+ </a>
489
+ </div>
490
+ </div>
491
+ </div>
492
+ <ngx-codemirror
493
+ [(ngModel)]="textData.value"
494
+ [options]="{lineNumbers: true,theme: 'ttcn',mode: 'htmlmixed',autoRefresh: true,smartIndent: true,extraKeys: {'Ctrl-Space': 'autocomplete'}}">
495
+
496
+ </ngx-codemirror>
497
+ </mat-tab>
498
+ <mat-tab label="Image" *ngIf="dashboardItemType.type === 'image'">
499
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
500
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
501
+ <div class="flex items-start flex-1">
502
+ <div class="pt-1.5">
503
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Image Settings</h1>
504
+ <p class="text-xs font-medium text-gray-500">
505
+ Set the image to be displayed in this widget.
506
+ </p>
507
+ </div>
508
+ </div>
509
+ </div>
510
+ </div>
511
+ <div class="w-1/2">
512
+ <div class="p-4">
513
+ <label class="mb-2">
514
+ Select the column that corresponds to the desired image
515
+ <select matNativeControl [(ngModel)]="imageData.column"
516
+ (ngModelChange)="setImageData($event)">
517
+ <option [value]="undefined">-- Select Column --</option>
518
+ <ng-template [ngIf]="dataset">
519
+ <option *ngFor="let column of dataset.columns"
520
+ [value]="column.name">
521
+ {{column.title}}
522
+ </option>
523
+ </ng-template>
524
+ </select>
525
+ </label>
526
+ </div>
527
+ </div>
528
+ </mat-tab>
529
+ <mat-tab label="Table" *ngIf="dashboardItemType.type === 'table'">
530
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
531
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
532
+ <div class="flex items-start flex-1">
533
+ <div class="pt-1.5">
534
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Table Row Settings</h1>
535
+ <p class="text-xs font-medium text-gray-500">
536
+ Adjust the settings to be applied to each table row.
537
+ </p>
538
+ </div>
539
+ </div>
540
+ </div>
541
+ </div>
542
+ <div class="w-1/2">
543
+ <div class="p-4">
544
+ <div class="mb-4 flex items-center">
545
+ <mat-checkbox class="mr-2" [(ngModel)]="tabular.expandRows"></mat-checkbox>
546
+ <p class="mb-0 mt-1">Expand rows. By default rows are compressed and restrict wrapping.</p>
547
+ </div>
548
+
549
+ <div class="mb-4 flex items-center">
550
+ <mat-checkbox class="mr-2" [(ngModel)]="tabular.hidePager"></mat-checkbox>
551
+ <p class="mb-0 mt-1">Hide the pager at the bottom of the table.</p>
552
+ </div>
553
+
554
+ <div class="mb-4 flex items-center">
555
+ <mat-checkbox class="mr-2" [(ngModel)]="tabular.actionRows"></mat-checkbox>
556
+ <p class="mb-0 mt-1">Make table rows clickable</p>
557
+ </div>
558
+
559
+ <ng-template [ngIf]="tabular.actionRows">
560
+ <label class="mb-2">
561
+ Call to action
562
+ <select matNativeControl [(ngModel)]="tabular.cta"
563
+ [compareWith]="setCallToActionItem"
564
+ (ngModelChange)="ctaUpdate($event)">
565
+ <option value="">None</option>
566
+ <option [ngValue]="{type: 'custom', windowLocation: 'EXISTING'}">Custom Link
567
+ </option>
568
+ <optgroup label="Dashboards">
569
+ <option *ngFor="let dashboard of dashboards"
570
+ [ngValue]="{type: 'dashboard', value: dashboard.id, label: dashboard.title, windowLocation: 'EXISTING'}">{{dashboard.title}}</option>
571
+ </optgroup>
572
+ <optgroup label="Shared Dashboards">
573
+ <option *ngFor="let dashboard of sharedDashboards"
574
+ [ngValue]="{type: 'dashboard', value: dashboard.id, label: dashboard.title, windowLocation: 'EXISTING'}">{{dashboard.title}}</option>
575
+ </optgroup>
576
+ </select>
577
+ <small class="font-normal">Select the destination for the action link</small>
578
+ </label>
579
+ <ng-template [ngIf]="tabular.cta && tabular.cta.type === 'custom'">
580
+ <p>Please enter the link for this call to action.</p>
581
+
582
+ <label class="mb-2">
583
+ Link
584
+ <input type="text" [(ngModel)]="tabular.cta.link">
585
+ </label>
586
+
587
+ </ng-template>
588
+
589
+ <ng-template [ngIf]="tabular.cta && dashboardParameters.length">
590
+ <p>Please enter the following parameters to use with this dashboard</p>
591
+
592
+ <ng-template ngFor let-param [ngForOf]="dashboardParameters">
593
+ <label>{{param.title}}</label>
594
+ <label *ngIf="!tabular.cta.parameters['custom-'+param.name]"
595
+ class="mb-2 dashboard-param-pick">
596
+ <select matNativeControl [(ngModel)]="tabular.cta.parameters[param.name]"
597
+ [compareWith]="ctaSelectOption">
598
+ <option>-- Select Value --</option>
599
+ <ng-template [ngIf]="dataset">
600
+ <option *ngFor="let column of dataset.columns"
601
+ [value]="'[['+column.name+']]'">
602
+ {{column.title}}
603
+ </option>
604
+ </ng-template>
605
+ </select>
606
+ </label>
607
+ <div class="mb-2 flex items-center">
608
+ <mat-checkbox class="mr-2"
609
+ [(ngModel)]="tabular.cta.parameters['custom-'+param.name]"></mat-checkbox>
610
+ <p class="mb-0 mt-1">Use custom value</p>
611
+ </div>
612
+ <label class="mb-2 dashboard-param-pick">
613
+ <input type="text" *ngIf="tabular.cta.parameters['custom-'+param.name]"
614
+ placeholder="Enter custom parameter value"
615
+ [(ngModel)]="tabular.cta.parameters[param.name]">
616
+ </label>
617
+ </ng-template>
618
+ </ng-template>
619
+
620
+ <mat-radio-group *ngIf="tabular.cta" [(ngModel)]="tabular.cta.windowLocation">
621
+ <mat-radio-button class="mr-4" value="EXISTING">Existing Window</mat-radio-button>
622
+ <mat-radio-button value="_blank">New Window/Tab</mat-radio-button>
623
+ </mat-radio-group>
624
+ </ng-template>
625
+ </div>
626
+
627
+ </div>
628
+
629
+
630
+ </mat-tab>
631
+ <mat-tab label="Columns" *ngIf="dashboardItemType.type === 'table'">
632
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
633
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
634
+ <div class="flex items-start flex-1">
635
+ <div class="pt-1.5">
636
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Table Column Settings</h1>
637
+ <p class="text-xs font-medium text-gray-500">
638
+ Apply specific cell formatting to each table column.
639
+ </p>
640
+ </div>
641
+ </div>
642
+ </div>
643
+ </div>
644
+ <div class="w-1/2">
645
+ <div class="p-4">
646
+ <label class="mb-2">
647
+ Select the column to format
648
+ <select matNativeControl [(ngModel)]="tableCells.column"
649
+ (ngModelChange)="setColumn($event)">
650
+ <option [value]="undefined">-- Select Column --</option>
651
+ <ng-template [ngIf]="dataset">
652
+ <option *ngFor="let column of dataset.columns"
653
+ [value]="column.name">
654
+ {{column.title}}
655
+ </option>
656
+ </ng-template>
657
+ </select>
658
+ </label>
659
+
660
+ <ng-template [ngIf]="tableCells[tableCells.column]">
661
+ <label class="mb-4">
662
+ Specify Max Column Width
663
+ <div class="mt-1 relative rounded-md shadow-sm w-1/4">
664
+ <input type="number" [(ngModel)]="tableCells[tableCells.column].maxWidth"
665
+ class="block w-full pl-7 pr-12 sm:text-sm border-gray-300 rounded-md"
666
+ placeholder="Enter width">
667
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
668
+ <span class="text-gray-500 sm:text-sm"> px </span>
669
+ </div>
670
+ </div>
671
+ </label>
672
+
673
+ <label class="mb-2">
674
+ Column Format
675
+ <select matNativeControl [(ngModel)]="tableCells[tableCells.column].type"
676
+ (ngModelChange)="setColumnFormat($event)">
677
+ <option [value]="undefined">Automatic</option>
678
+ <option *ngFor="let format of columnFormats"
679
+ [value]="format.type">
680
+ {{format.title}}
681
+ </option>
682
+ </select>
683
+ </label>
684
+
685
+ <ki-table-cell-formatter *ngIf="tableCells[tableCells.column].type"
686
+ [type]="tableCells[tableCells.column].type"
687
+ [data]="tableCells[tableCells.column].data"
688
+ [openSide]="openSide" [dataset]="dataset"
689
+ [currencies]="currencies" [dashboards]="dashboards"
690
+ [sharedDashboards]="sharedDashboards"
691
+ [privateDashboards]="privateDashboards"
692
+ [actionEvents]="actionEvents">
693
+ </ki-table-cell-formatter>
694
+
695
+ </ng-template>
696
+
697
+ </div>
698
+ </div>
699
+ </mat-tab>
700
+ <mat-tab label="Metric" *ngIf="dashboardItemType.type === 'metric'">
701
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
702
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
703
+ <div class="flex items-start flex-1">
704
+ <div class="pt-1.5">
705
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Metric Settings</h1>
706
+ <p class="text-xs font-medium text-gray-500">
707
+ Select which pieces of information to display.
708
+ </p>
709
+ </div>
710
+ </div>
711
+ </div>
712
+ </div>
713
+ <div class="p-4 flex justify-between">
714
+ <div class="flex-grow p-4">
715
+ <label class="mb-4">
716
+ Main Metric
717
+ <select [(ngModel)]="metric.main" (ngModelChange)="updateMetricDataValues()">
718
+ <option value="">-- Select Main Metric --</option>
719
+ <option [value]="field.name" *ngFor="let field of filterFields">
720
+ {{field.title}}
721
+ </option>
722
+ </select>
723
+ </label>
724
+
725
+ <hr>
726
+
727
+ <label class="mb-4">
728
+ Sub Metric
729
+ <select [(ngModel)]="metric.subMetric" (ngModelChange)="updateMetricDataValues()">
730
+ <option value="">-- Select Sub Metric --</option>
731
+ <option [value]="field.name" *ngFor="let field of filterFields">
732
+ {{field.title}}
733
+ </option>
734
+ </select>
735
+ </label>
736
+
737
+ <mat-slide-toggle [(ngModel)]="metric.showSubChange" class="mb-4"
738
+ (ngModelChange)="updateMetricDataValues()">
739
+ Show Metric Change
740
+ </mat-slide-toggle>
741
+ </div>
742
+
743
+ <div class="w-6/12 p-4">
744
+ <p><b>Preview</b></p>
745
+
746
+ <div class="shadow p-4 flex items-center metric-preview">
747
+
748
+ <div class="w-full">
749
+ <dt class="text-base font-normal text-gray-900">{{metric.title}}</dt>
750
+ <dd class="mt-1 flex items-baseline justify-between md:block lg:flex">
751
+ <div class="flex items-baseline text-2xl font-semibold text-indigo-600">
752
+ {{metric.mainValue}}
753
+ <span *ngIf="metric.subMetric" class="ml-2 text-sm font-medium text-gray-500">from {{metric.subValue}}
754
+ <span class="text-xs">({{metric.subTitle}})</span></span>
755
+ </div>
756
+
757
+ <div *ngIf="metric.showSubChange"
758
+ class="inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium md:mt-2 lg:mt-0"
759
+ [ngClass]="{'bg-green-100 text-green-800': metric.mainValue >= metric.subValue, 'bg-red-100 text-red-800': metric.mainValue < metric.subValue}">
760
+ <!-- Heroicon name: mini/arrow-up -->
761
+ <svg *ngIf="metric.mainValue >= metric.subValue"
762
+ class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-500"
763
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
764
+ aria-hidden="true">
765
+ <path fill-rule="evenodd"
766
+ d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z"
767
+ clip-rule="evenodd"/>
768
+ </svg>
769
+ <svg *ngIf="metric.mainValue < metric.subValue "
770
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
771
+ class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-red-500">
772
+ <path fill-rule="evenodd"
773
+ d="M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z"
774
+ clip-rule="evenodd"/>
775
+ </svg>
776
+ {{metric.difference}}
777
+ </div>
778
+ </dd>
779
+ </div>
780
+
781
+ </div>
782
+ </div>
783
+ </div>
784
+
785
+ </mat-tab>
786
+ <mat-tab label="Chart" *ngIf="chartTypes.indexOf(dashboardItemType.type) > -1">
787
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
788
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
789
+ <div class="flex items-start flex-1">
790
+ <div class="pt-1.5">
791
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Chart Settings</h1>
792
+ <p class="text-xs font-medium text-gray-500">
793
+ Configure the chart data and display options.
794
+ </p>
795
+ </div>
796
+ </div>
797
+ <div class="mt-6 flex flex-col-reverse justify-stretch">
798
+ <a (click)="openSide.next(true)"
799
+ class="text-xs ml-2 hover:underline flex items-center primary">
800
+ view help docs&nbsp;
801
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20"
802
+ fill="currentColor">
803
+ <path
804
+ d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"/>
805
+ <path
806
+ d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"/>
807
+ </svg>
808
+ </a>
809
+ </div>
810
+ </div>
811
+ </div>
812
+ <div class="p-4 flex justify-between">
813
+ <div class="flex-grow p-4">
814
+ <label class="mb-4">
815
+ Chart Type
816
+ <select [(ngModel)]="dashboardItemType.type">
817
+ <option value="line">Line</option>
818
+ <option value="bar">Bar</option>
819
+ <option value="pie">Pie</option>
820
+ <option value="doughnut">Doughnut</option>
821
+ <option value="scatter">Scatter</option>
822
+ </select>
823
+ </label>
824
+
825
+ <label class="mb-4">
826
+ <ng-template
827
+ [ngIf]="dashboardItemType.type !== 'pie' && dashboardItemType.type !== 'doughnut'">
828
+ X Axis Column
829
+ </ng-template>
830
+ <ng-template
831
+ [ngIf]="dashboardItemType.type === 'pie' || dashboardItemType.type === 'doughnut'">
832
+ Labels Column
833
+ </ng-template>
834
+ <select [(ngModel)]="dashboardItemType.xAxis" (ngModelChange)="setChartData()">
835
+ <option value="">-- Select
836
+ <ng-template
837
+ [ngIf]="dashboardItemType.type !== 'pie' && dashboardItemType.type !== 'doughnut'">
838
+ X
839
+ Axis Column
840
+ </ng-template>
841
+ <ng-template
842
+ [ngIf]="dashboardItemType.type === 'pie' || dashboardItemType.type === 'doughnut'">
843
+ Labels Column
844
+ </ng-template>
845
+ --
846
+ </option>
847
+ <option [value]="field.name" *ngFor="let field of filterFields">
848
+ {{field.title}}
849
+ </option>
850
+ </select>
851
+ </label>
852
+
853
+ <label class="mb-4">
854
+ <ng-template
855
+ [ngIf]="dashboardItemType.type !== 'pie' && dashboardItemType.type !== 'doughnut'">
856
+ Y Axis Column
857
+ </ng-template>
858
+ <ng-template
859
+ [ngIf]="dashboardItemType.type === 'pie' || dashboardItemType.type === 'doughnut'">
860
+ Values Column
861
+ </ng-template>
862
+ <select [(ngModel)]="dashboardItemType.yAxis" (ngModelChange)="setChartData()">
863
+ <option value="">-- Select
864
+ <ng-template
865
+ [ngIf]="dashboardItemType.type !== 'pie' && dashboardItemType.type !== 'doughnut'">
866
+ Y
867
+ Axis Column
868
+ </ng-template>
869
+ <ng-template
870
+ [ngIf]="dashboardItemType.type === 'pie' || dashboardItemType.type === 'doughnut'">
871
+ Values Column
872
+ </ng-template>
873
+ --
874
+ </option>
875
+ <option [value]="field.name" *ngFor="let field of filterFields">
876
+ {{field.title}}
877
+ </option>
878
+ </select>
879
+ </label>
880
+
881
+ <ng-template [ngIf]="dashboardItemType.type !== 'pie' && dashboardItemType.type !== 'doughnut'">
882
+ <label class="mb-4">
883
+ Series Column
884
+ <select [(ngModel)]="dashboardItemType.seriesColumn" (ngModelChange)="setChartData()">
885
+ <option value="">-- Select Series Column--</option>
886
+ <option [value]="field.name" *ngFor="let field of filterFields">
887
+ {{field.title}}
888
+ </option>
889
+ </select>
890
+ </label>
891
+
892
+ <label class="mb-4">
893
+ Trend Line Options
894
+ <select [(ngModel)]="dashboardItemType.trendLine" (ngModelChange)="setChartData()">
895
+ <option value="">-- Select Trend Line Option--</option>
896
+ <option value="average">Average Line</option>
897
+ <option value="linear">Linear Line</option>
898
+ <option value="exponential">Exponential Line</option>
899
+ <option value="logarithmic">Logarithmic Line</option>
900
+ <option value="power">Power Line</option>
901
+ <optgroup label="Use Column Data">
902
+ <option [value]="field.name" *ngFor="let field of filterFields">
903
+ {{field.title}}
904
+ </option>
905
+ </optgroup>
906
+ </select>
907
+ <div class="mt-1 text-xs font-normal text-gray-400">
908
+ Select one of the options, or an existing column of data to plot an additional
909
+ line on the graph.
910
+ </div>
911
+ </label>
912
+
913
+ <ng-template [ngIf]="dashboardItemType.trendLine">
914
+ <label class="flex-1">
915
+ Trend Line Colour
916
+ <input type="color" [(ngModel)]="dashboardItemType.trendLineColour"
917
+ (ngModelChange)="setChartData()">
918
+ </label>
919
+ </ng-template>
920
+
921
+ </ng-template>
922
+
923
+ <div class="mt-4 mb-4 align-center justify-between">
924
+ <label class="flex-1">
925
+ Limit Results
926
+ <input type="number" [(ngModel)]="dashboardItemType.limit">
927
+ </label>
928
+ <label class="ml-4 mt-4 flex-1">
929
+ <mat-checkbox [(ngModel)]="dashboardItemType.combineRemaining">
930
+ Combine remaining results
931
+ </mat-checkbox>
932
+ </label>
933
+ </div>
934
+
935
+ <label class="mb-4" *ngIf="dashboardItemType.combineRemaining">
936
+ Remaining results label
937
+ <input type="text" [(ngModel)]="dashboardItemType.combineRemaingingLabel">
938
+ </label>
939
+
940
+ <ng-template [ngIf]="dashboardItemType.type !== 'pie' && dashboardItemType.type !== 'doughnut'">
941
+ <label class="mb-4">
942
+ Y Axes Max value
943
+ <input class="w-1/2" type="number" [(ngModel)]="dashboardItemType.maxValue">
944
+ </label>
945
+
946
+ <mat-slide-toggle [(ngModel)]="dashboardItemType.beginAtZero" class="block mb-4">
947
+ Start Y Axes at Zero
948
+ </mat-slide-toggle>
949
+ </ng-template>
950
+
951
+ <mat-slide-toggle [(ngModel)]="dashboardItemType.legend" class="block mb-4">Show Legend
952
+ </mat-slide-toggle>
953
+ <mat-slide-toggle *ngIf="dashboardItemType.type === 'line'"
954
+ [(ngModel)]="dashboardItemType.fill"
955
+ (ngModelChange)="setChartData()" class="block mb-4">Fill Background
956
+ </mat-slide-toggle>
957
+
958
+ <label class="mb-4">
959
+ Colour Palette
960
+ <select matNativeControl [compareWith]="paletteSelectOption"
961
+ [(ngModel)]="dashboardItemType.colourPalette" (ngModelChange)="updateColourPalette()">
962
+ <option value="">-- Select Colour Palette--</option>
963
+ <option [ngValue]="palette" *ngFor="let palette of colourPalettes">
964
+ {{palette.name}}
965
+ </option>
966
+ </select>
967
+
968
+ <div *ngIf="!colourPalettes.length" class="border-l-4 border-yellow-400 bg-yellow-50 p-4">
969
+ <div class="flex">
970
+ <div class="flex-shrink-0">
971
+ <svg class="h-5 w-5 text-yellow-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
972
+ <path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" />
973
+ </svg>
974
+ </div>
975
+ <div class="ml-3">
976
+ <p class="text-sm text-yellow-700 mb-0 flex">
977
+ <span class="font-normal">No colour palettes available.</span>
978
+ <a [routerLink]="['/project-settings']" target="_blank" class="flex items-center ml-2 font-medium text-yellow-700 underline hover:text-yellow-600">Manage palettes in project settings.<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="h-4 w-4">
979
+ <path d="M6.22 8.72a.75.75 0 0 0 1.06 1.06l5.22-5.22v1.69a.75.75 0 0 0 1.5 0v-3.5a.75.75 0 0 0-.75-.75h-3.5a.75.75 0 0 0 0 1.5h1.69L6.22 8.72Z" />
980
+ <path d="M3.5 6.75c0-.69.56-1.25 1.25-1.25H7A.75.75 0 0 0 7 4H4.75A2.75 2.75 0 0 0 2 6.75v4.5A2.75 2.75 0 0 0 4.75 14h4.5A2.75 2.75 0 0 0 12 11.25V9a.75.75 0 0 0-1.5 0v2.25c0 .69-.56 1.25-1.25 1.25h-4.5c-.69 0-1.25-.56-1.25-1.25v-4.5Z" />
981
+ </svg>
982
+ </a>
983
+ </p>
984
+ </div>
985
+ </div>
986
+ </div>
987
+ </label>
988
+
989
+ <!-- <button mat-flat-button color="accent" (click)="resetDefaultColours()">-->
990
+ <!-- <div class="flex items-center">-->
991
+ <!-- Reset to Default Colours-->
992
+ <!-- </div>-->
993
+ <!-- </button>-->
994
+
995
+
996
+ <ng-template [ngIf]="dashboardItemType.type === 'line' || dashboardItemType.type === 'scatter'">
997
+ <div *ngFor="let dataItem of chartData; let i = index" class="mt-4 align-center justify-between">
998
+ <label class="flex-1">
999
+ {{_.startCase(dataItem.label)}} Colour
1000
+ <input type="color" [(ngModel)]="dashboardItemType.borderColor[i]"
1001
+ (ngModelChange)="setChartData()">
1002
+ </label>
1003
+ </div>
1004
+ </ng-template>
1005
+
1006
+ <ng-template [ngIf]="dashboardItemType.type !== 'line'">
1007
+ <div *ngIf="!dashboardItemType.colourPalette" class="mt-4 mb-4 flex items-end justify-between">
1008
+ <label class="flex-1">
1009
+ Background Colour Range
1010
+ <input type="color" [(ngModel)]="dashboardItemType.backgroundColorFrom"
1011
+ (ngModelChange)="backgroundColourUpdate()">
1012
+ </label>
1013
+ <label class="flex-1">
1014
+ &nbsp;
1015
+ <input type="color" [(ngModel)]="dashboardItemType.backgroundColorTo"
1016
+ (ngModelChange)="backgroundColourUpdate()">
1017
+ </label>
1018
+ </div>
1019
+
1020
+ <div class="mt-4 mb-4 align-center justify-between">
1021
+ <label class="flex-1">
1022
+ Colour Generator Mode
1023
+ <mat-radio-group [(ngModel)]="dashboardItemType.colourMode"
1024
+ (ngModelChange)="backgroundColourUpdate()">
1025
+ <mat-radio-button class="mr-4" value="repeat">Repeat</mat-radio-button>
1026
+ <mat-radio-button class="mr-4" value="lrgb">Gradient</mat-radio-button>
1027
+ <mat-radio-button class="mr-4" value="hsl">HSL</mat-radio-button>
1028
+ <mat-radio-button value="lch">LCH</mat-radio-button>
1029
+ </mat-radio-group>
1030
+ </label>
1031
+ </div>
1032
+
1033
+ <ng-template [ngIf]="Array.isArray(dashboardItemType.backgroundColor)">
1034
+ <label
1035
+ *ngIf="dashboardItemType.backgroundColor && dashboardItemType.backgroundColor.length">
1036
+ Set Individual Colours
1037
+ </label>
1038
+ <div *ngFor="let backColour of dashboardItemType.backgroundColor; let i = index">
1039
+ <ng-template [ngIf]="dataset && dataset.allData[i]">
1040
+ <div class="tracking-wider uppercase text-gray-500 text-xs mt-2"
1041
+ *ngIf="dataset && dataset.allData">
1042
+ {{dataset.allData[i][dashboardItemType.xAxis]}}
1043
+ </div>
1044
+ <input type="color" (change)="updateChart($event.target.value, i)"
1045
+ [name]="'colour' + i" [value]="dashboardItemType.backgroundColor[i]">
1046
+ </ng-template>
1047
+ </div>
1048
+ </ng-template>
1049
+ </ng-template>
1050
+
1051
+
1052
+
1053
+ </div>
1054
+
1055
+ <div class="w-6/12 p-4">
1056
+ <canvas #chart baseChart class="sticky top-10" *ngIf="chartData"
1057
+ [datasets]="chartData"
1058
+ [labels]="dashboardItemType.labels"
1059
+ [options]="{scales: {y: {beginAtZero: dashboardItemType.beginAtZero, max: dashboardItemType.maxValue || null}}, responsive: true}"
1060
+ [legend]="!!dashboardItemType.legend"
1061
+ [type]="dashboardItemType.type"
1062
+ [plugins]="[]">
1063
+ </canvas>
1064
+ </div>
1065
+
1066
+ </div>
1067
+ </mat-tab>
1068
+ <mat-tab label="Word Cloud" *ngIf="dashboardItemType.type === 'words'">
1069
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
1070
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
1071
+ <div class="flex items-start flex-1">
1072
+ <div class="pt-1.5">
1073
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Word Cloud Settings</h1>
1074
+ <p class="text-xs font-medium text-gray-500">
1075
+ Adjust the settings for the Word Cloud generator.
1076
+ </p>
1077
+ </div>
1078
+ </div>
1079
+ </div>
1080
+ </div>
1081
+
1082
+ <div class="w-1/2">
1083
+ <div class="p-4">
1084
+ <label class="mb-2">
1085
+ Use an indexed document data source to populate word cloud, or provide a string from a
1086
+ single column.
1087
+ <mat-radio-group [(ngModel)]="wordCloud.populationMethod">
1088
+ <mat-radio-button value="WHOLE">Word Frequencies</mat-radio-button>
1089
+ <mat-radio-button class="ml-4" value="SINGLE">Single String</mat-radio-button>
1090
+ </mat-radio-group>
1091
+ </label>
1092
+
1093
+ <ng-template [ngIf]="wordCloud.populationMethod === 'SINGLE'">
1094
+ <label class="mb-2">
1095
+ Select which row to use for the word cloud
1096
+ <select matNativeControl [(ngModel)]="wordCloud.row">
1097
+ <option [value]="undefined">-- Select Row --</option>
1098
+ <ng-template [ngIf]="dataset">
1099
+ <option *ngFor="let row of dataset.allData; let i = index"
1100
+ [value]="i">
1101
+ {{_.values(row)[0]}}
1102
+ </option>
1103
+ </ng-template>
1104
+ </select>
1105
+ </label>
1106
+
1107
+ <label class="mb-2">
1108
+ Select the column to use for the word cloud
1109
+ <select matNativeControl [(ngModel)]="wordCloud.column">
1110
+ <option [value]="undefined">-- Select Column --</option>
1111
+ <ng-template [ngIf]="dataset">
1112
+ <option *ngFor="let column of dataset.columns"
1113
+ [value]="column.name">
1114
+ {{column.title}}
1115
+ </option>
1116
+ </ng-template>
1117
+ </select>
1118
+ </label>
1119
+ </ng-template>
1120
+
1121
+ <ng-template [ngIf]="wordCloud.populationMethod === 'WHOLE'">
1122
+ <label class="mb-2">
1123
+ Select the column to use for the words
1124
+ <select matNativeControl [(ngModel)]="wordCloud.column">
1125
+ <option [value]="undefined">-- Select Column --</option>
1126
+ <ng-template [ngIf]="dataset">
1127
+ <option *ngFor="let column of dataset.columns"
1128
+ [value]="column.name">
1129
+ {{column.title}}
1130
+ </option>
1131
+ </ng-template>
1132
+ </select>
1133
+ </label>
1134
+ <label class="mb-2">
1135
+ Select the column to use for the frequency
1136
+ <select matNativeControl [(ngModel)]="wordCloud.frequency">
1137
+ <option [value]="undefined">-- Select Column --</option>
1138
+ <ng-template [ngIf]="dataset">
1139
+ <option *ngFor="let column of dataset.columns"
1140
+ [value]="column.name">
1141
+ {{column.title}}
1142
+ </option>
1143
+ </ng-template>
1144
+ </select>
1145
+ </label>
1146
+ </ng-template>
1147
+
1148
+ </div>
1149
+
1150
+ </div>
1151
+ </mat-tab>
1152
+ <mat-tab label="Network Graph" *ngIf="dashboardItemType.type === 'network'">
1153
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
1154
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
1155
+ <div class="flex items-start flex-1">
1156
+ <div class="pt-1.5">
1157
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Network Graph Settings</h1>
1158
+ <p class="text-xs font-medium text-gray-500">
1159
+ Adjust the settings for the Network Graph.
1160
+ </p>
1161
+ </div>
1162
+ </div>
1163
+ </div>
1164
+ </div>
1165
+
1166
+ <div class="flex">
1167
+ <div class="flex-1 w-1/2">
1168
+ <div class="p-4">
1169
+
1170
+ <div class="w-full bg-white p-4 border rounded">
1171
+ <div class="font-medium mb-3 text-base">Node Data</div>
1172
+ <div class="mb-2 flex items-center justify-between">
1173
+ <label class="flex-1 mb-2 mr-1">
1174
+ ID Column
1175
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.nodeIds"
1176
+ (ngModelChange)="setNetworkChartData(true)">
1177
+ <option value="">-- Select Column --</option>
1178
+ <ng-template [ngIf]="dataset">
1179
+ <option *ngFor="let column of dataset.columns"
1180
+ [value]="column.name">
1181
+ {{column.title}}
1182
+ </option>
1183
+ </ng-template>
1184
+ </select>
1185
+ <div class="text-xs font-normal text-gray-500">IDs must be unique</div>
1186
+ </label>
1187
+ <label class="flex-1 mb-2 ml-1">
1188
+ Label Column
1189
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.nodeLabels"
1190
+ (ngModelChange)="setNetworkChartData(true)">
1191
+ <option value="">-- Select Column --</option>
1192
+ <ng-template [ngIf]="dataset">
1193
+ <option *ngFor="let column of dataset.columns"
1194
+ [value]="column.name">
1195
+ {{column.title}}
1196
+ </option>
1197
+ </ng-template>
1198
+ </select>
1199
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1200
+ </label>
1201
+ <label class="flex-1 mb-2 ml-1">
1202
+ Group Column
1203
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.nodeGroups"
1204
+ (ngModelChange)="setNetworkChartData(true)">
1205
+ <option value="">-- Select Column --</option>
1206
+ <ng-template [ngIf]="dataset">
1207
+ <option *ngFor="let column of dataset.columns"
1208
+ [value]="column.name">
1209
+ {{column.title}}
1210
+ </option>
1211
+ </ng-template>
1212
+ </select>
1213
+ <div class="text-xs font-normal text-gray-500">Set which group nodes belong to.</div>
1214
+ </label>
1215
+ </div>
1216
+
1217
+ <hr class="py-2">
1218
+
1219
+ <div class="flex items-start justify-between">
1220
+ <div>
1221
+ <div class="font-medium text-base">Global Node Options</div>
1222
+ <div class="mb-3 text-xs text-gray-500">Options defined here will apply to all nodes.</div>
1223
+ </div>
1224
+ <button mat-stroked-button color="primary" (click)="addOption('nodeOptions')">
1225
+ <div class="flex items-center">
1226
+ Add Node Option
1227
+ </div>
1228
+ </button>
1229
+ </div>
1230
+
1231
+ <ng-template ngFor let-nodeOption [ngForOf]="networkData.nodeOptions" let-i=index>
1232
+ <div class="mb-2 flex items-center justify-between">
1233
+ <label class="flex-1 mb-2 mr-1">
1234
+ Option
1235
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.nodeOptions[i].key">
1236
+ <option value="">-- Select Option --</option>
1237
+ <option *ngFor="let option of availableNodeOptions"
1238
+ [disabled]="_.find(networkData.nodeOptions, {key: option})"
1239
+ [value]="option">
1240
+ {{option}}
1241
+ </option>
1242
+ </select>
1243
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1244
+ </label>
1245
+ <label class="flex-1 mb-2 ml-1">
1246
+ Option Value
1247
+ <ng-template [ngIf]="networkData.nodeOptions[i].key && visNetworkOptions.nodes[networkData.nodeOptions[i].key].type !== 'boolean'">
1248
+ <input [type]="visNetworkOptions.nodes[networkData.nodeOptions[i].key].type" [(ngModel)]="nodeOption.value">
1249
+ </ng-template>
1250
+ <ng-template [ngIf]="networkData.nodeOptions[i].key && visNetworkOptions.nodes[networkData.nodeOptions[i].key].type === 'boolean'">
1251
+ <select [(ngModel)]="nodeOption.value">
1252
+ <option [value]="true">True</option>
1253
+ <option [value]="false">False</option>
1254
+ </select>
1255
+ </ng-template>
1256
+ <div class="text-xs font-normal text-gray-500">
1257
+ <a href="https://visjs.github.io/vis-network/docs/network/nodes.html"
1258
+ target="_blank" class="text-secondary flex items-center hover:underline">
1259
+ node options documentation
1260
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1261
+ stroke-width="1.5" stroke="currentColor" class="h-3 w-3 ml-1">
1262
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
1263
+ </svg>
1264
+ </a>
1265
+ </div>
1266
+ </label>
1267
+ <button mat-icon-button color="warn" (click)="networkData.nodeOptions.splice(i, 1)">
1268
+ <mat-icon>clear</mat-icon>
1269
+ </button>
1270
+ </div>
1271
+ </ng-template>
1272
+ </div>
1273
+ </div>
1274
+ </div>
1275
+ <div class="flex-1 w-1/2">
1276
+ <div class="p-4">
1277
+
1278
+ <div class="w-full bg-white p-4 border rounded">
1279
+ <div class="flex items-start justify-between">
1280
+ <div class="font-medium mb-3 text-base">Edge Data</div>
1281
+ <button mat-stroked-button color="primary" (click)="pickNetworkEdgeDataset()">
1282
+ <div class="flex items-center">
1283
+ Select Edge Dataset
1284
+ </div>
1285
+ </button>
1286
+ </div>
1287
+
1288
+ <ng-template [ngIf]="networkData.edgeDatasetTitle">
1289
+ <div class="bg-blue-50 p-4 mb-2">
1290
+ <div class="flex">
1291
+ <div class="flex-shrink-0">
1292
+ <svg class="h-5 w-5 text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
1293
+ <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd" />
1294
+ </svg>
1295
+ </div>
1296
+ <div class="ml-3 flex-1 md:flex md:justify-between">
1297
+ <p class="mb-0 text-sm text-blue-700">
1298
+ You are currently using {{networkData.edgeDatasetTitle}} dataset
1299
+ </p>
1300
+ <p class="mb-0 mt-3 text-sm md:ml-6 md:mt-0">
1301
+ <a (click)="clearEdgeDataset()"
1302
+ class="whitespace-nowrap font-medium text-blue-700 hover:text-blue-600 hover:underline">
1303
+ Clear Dataset
1304
+ </a>
1305
+ </p>
1306
+ </div>
1307
+ </div>
1308
+ </div>
1309
+ <div class="flex items-center justify-between">
1310
+ <label class="flex-1 mb-2 mr-1">
1311
+ From Node ID Column
1312
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.fromIds">
1313
+ <option value="">-- Select Column --</option>
1314
+ <ng-template [ngIf]="edgeDataset">
1315
+ <option *ngFor="let column of edgeDataset.columns"
1316
+ [value]="column.name">
1317
+ {{column.title}}
1318
+ </option>
1319
+ </ng-template>
1320
+ </select>
1321
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1322
+ </label>
1323
+ <label class="flex-1 mb-2 ml-1">
1324
+ To Node ID Column
1325
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.toIds">
1326
+ <option value="">-- Select Column --</option>
1327
+ <ng-template [ngIf]="edgeDataset">
1328
+ <option *ngFor="let column of edgeDataset.columns"
1329
+ [value]="column.name">
1330
+ {{column.title}}
1331
+ </option>
1332
+ </ng-template>
1333
+ </select>
1334
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1335
+ </label>
1336
+ </div>
1337
+ </ng-template>
1338
+
1339
+ <div *ngIf="!networkData.edgeDatasetTitle" class="flex items-center justify-between">
1340
+ <label class="flex-1 mb-2 mr-1">
1341
+ From ID
1342
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.fromIds">
1343
+ <option value="">-- Select Column --</option>
1344
+ <ng-template [ngIf]="dataset">
1345
+ <option *ngFor="let column of dataset.columns"
1346
+ [value]="column.name">
1347
+ {{column.title}}
1348
+ </option>
1349
+ </ng-template>
1350
+ </select>
1351
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1352
+ </label>
1353
+ <label class="flex-1 mb-2 ml-1">
1354
+ To ID
1355
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.toIds">
1356
+ <option value="">-- Select Column --</option>
1357
+ <ng-template [ngIf]="dataset">
1358
+ <option *ngFor="let column of dataset.columns"
1359
+ [value]="column.name">
1360
+ {{column.title}}
1361
+ </option>
1362
+ </ng-template>
1363
+ </select>
1364
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1365
+ </label>
1366
+ </div>
1367
+
1368
+ <hr class="py-2">
1369
+
1370
+ <div class="flex items-start justify-between">
1371
+ <div>
1372
+ <div class="font-medium text-base">Global Edge Options</div>
1373
+ <div class="mb-3 text-xs text-gray-500">Options defined here will apply to all edges.</div>
1374
+ </div>
1375
+ <button mat-stroked-button color="primary" (click)="addOption('edgeOptions')">
1376
+ <div class="flex items-center">
1377
+ Add Edge Option
1378
+ </div>
1379
+ </button>
1380
+ </div>
1381
+
1382
+ <ng-template ngFor let-edgeOption [ngForOf]="networkData.edgeOptions" let-i=index>
1383
+ <div class="mb-2 flex items-center justify-between">
1384
+ <label class="flex-1 mb-2 mr-1">
1385
+ Option
1386
+ <select class="w-full" matNativeControl [(ngModel)]="networkData.edgeOptions[i].key">
1387
+ <option value="">-- Select Option --</option>
1388
+ <option *ngFor="let option of availableEdgeOptions"
1389
+ [disabled]="_.find(networkData.edgeOptions, {key: option})"
1390
+ [value]="option">
1391
+ {{option}}
1392
+ </option>
1393
+ </select>
1394
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1395
+ </label>
1396
+ <label class="flex-1 mb-2 ml-1">
1397
+ Option Value
1398
+ <ng-template [ngIf]="networkData.edgeOptions[i].key && visNetworkOptions.edges[networkData.edgeOptions[i].key].type !== 'boolean'">
1399
+ <input [type]="visNetworkOptions.edges[networkData.edgeOptions[i].key].type" [(ngModel)]="edgeOption.value">
1400
+ </ng-template>
1401
+ <ng-template [ngIf]="networkData.edgeOptions[i].key && visNetworkOptions.edges[networkData.edgeOptions[i].key].type === 'boolean'">
1402
+ <select [(ngModel)]="edgeOption.value">
1403
+ <option [value]="true">True</option>
1404
+ <option [value]="false">False</option>
1405
+ </select>
1406
+ </ng-template>
1407
+ <div class="text-xs font-normal text-gray-500">
1408
+ <a href="https://visjs.github.io/vis-network/docs/network/edges.html"
1409
+ target="_blank" class="text-secondary flex items-center hover:underline">
1410
+ edge options documentation
1411
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1412
+ stroke-width="1.5" stroke="currentColor" class="h-3 w-3 ml-1">
1413
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
1414
+ </svg>
1415
+ </a>
1416
+ </div>
1417
+ </label>
1418
+ <button mat-icon-button color="warn" (click)="networkData.edgeOptions.splice(i, 1)">
1419
+ <mat-icon>clear</mat-icon>
1420
+ </button>
1421
+ </div>
1422
+ </ng-template>
1423
+
1424
+ </div>
1425
+
1426
+ </div>
1427
+ </div>
1428
+ </div>
1429
+
1430
+ </mat-tab>
1431
+ <mat-tab label="Groups" *ngIf="dashboardItemType.type === 'network' && networkData.nodeGroups">
1432
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
1433
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
1434
+ <div class="flex items-start flex-1">
1435
+ <div class="pt-1.5">
1436
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Group Options</h1>
1437
+ <p class="text-xs font-medium text-gray-500">
1438
+ Define the options for each group.
1439
+ </p>
1440
+ </div>
1441
+ </div>
1442
+ </div>
1443
+ </div>
1444
+
1445
+ <div class="flex-1 w-1/2">
1446
+ <div class="p-4">
1447
+ <div class="w-full bg-white p-4 border rounded">
1448
+ <div class="font-medium mb-3 text-base">Group Data</div>
1449
+ <ng-template ngFor let-nodeGroup [ngForOf]="nodeGroups">
1450
+
1451
+
1452
+ <div class="mb-2 flex items-center justify-between">
1453
+ <label class="flex-1 mb-2 ml-1">
1454
+ Group Name
1455
+ <input type="text" [value]="nodeGroup || ''" disabled>
1456
+ </label>
1457
+ </div>
1458
+
1459
+
1460
+ <div class="flex items-start justify-between">
1461
+ <div>
1462
+ <div class="font-medium text-base">Group Options</div>
1463
+ <div class="mb-3 text-xs text-gray-500">Set the options for this node.</div>
1464
+ </div>
1465
+ <button mat-stroked-button color="primary" (click)="addGroupOption(nodeGroup)">
1466
+ <div class="flex items-center">
1467
+ Add Group Option
1468
+ </div>
1469
+ </button>
1470
+ </div>
1471
+
1472
+ <ng-template [ngIf]="networkData.nodeGroupOptions && networkData.nodeGroupOptions[nodeGroup]">
1473
+ <ng-template ngFor let-groupOption [ngForOf]="networkData.nodeGroupOptions[nodeGroup]?.options" let-i=index>
1474
+ <div class="mb-2 flex items-center justify-between">
1475
+ <label class="flex-1 mb-2 mr-1">
1476
+ Option
1477
+ <select class="w-full" matNativeControl [(ngModel)]="groupOption.key">
1478
+ <option value="">-- Select Option --</option>
1479
+ <option *ngFor="let option of availableNodeOptions"
1480
+ [disabled]="_.find(networkData.nodeGroupOptions, {key: option})"
1481
+ [value]="option">
1482
+ {{option}}
1483
+ </option>
1484
+ </select>
1485
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1486
+ </label>
1487
+ <label class="flex-1 mb-2 ml-1">
1488
+ Option Value
1489
+ <ng-template [ngIf]="groupOption.key && visNetworkOptions.nodes[groupOption.key].type !== 'boolean'">
1490
+ <input [type]="visNetworkOptions.nodes[groupOption.key].type" [(ngModel)]="groupOption.value">
1491
+ </ng-template>
1492
+ <ng-template [ngIf]="groupOption.key && visNetworkOptions.nodes[groupOption.key].type === 'boolean'">
1493
+ <select [(ngModel)]="groupOption.value">
1494
+ <option [value]="true">True</option>
1495
+ <option [value]="false">False</option>
1496
+ </select>
1497
+ </ng-template>
1498
+ <div class="text-xs font-normal text-gray-500">
1499
+ <a href="https://visjs.github.io/vis-network/docs/network/nodes.html"
1500
+ target="_blank" class="text-secondary flex items-center hover:underline">
1501
+ node options documentation
1502
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1503
+ stroke-width="1.5" stroke="currentColor" class="h-3 w-3 ml-1">
1504
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
1505
+ </svg>
1506
+ </a>
1507
+ </div>
1508
+ </label>
1509
+ <button mat-icon-button color="warn" (click)="networkData.nodeGroupOptions[nodeGroup]?.options.splice(i, 1)">
1510
+ <mat-icon>clear</mat-icon>
1511
+ </button>
1512
+ </div>
1513
+ </ng-template>
1514
+ </ng-template>
1515
+ <hr class="py-2">
1516
+ </ng-template>
1517
+ </div>
1518
+ </div>
1519
+ </div>
1520
+ </mat-tab>
1521
+ <mat-tab label="Nodes" *ngIf="dashboardItemType.type === 'network' && datasetNodes.length">
1522
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
1523
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
1524
+ <div class="flex items-start flex-1">
1525
+ <div class="pt-1.5">
1526
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Node Options</h1>
1527
+ <p class="text-xs font-medium text-gray-500">
1528
+ Define the options for each node.
1529
+ </p>
1530
+ </div>
1531
+ </div>
1532
+ </div>
1533
+ </div>
1534
+
1535
+ <div class="flex">
1536
+ <div class="flex-1 w-1/2">
1537
+ <div class="p-4">
1538
+ <div class="w-full bg-white p-4 border rounded">
1539
+ <div class="flex items-start justify-between">
1540
+ <div>
1541
+ <div class="font-medium text-base">Node Options</div>
1542
+ <div class="mb-3 text-xs text-gray-500">These options will be applied to all nodes
1543
+ based on the column or custom value provided.</div>
1544
+ </div>
1545
+ <button mat-stroked-button color="primary" (click)="addOption('globalNodeOptions')">
1546
+ <div class="flex items-center">
1547
+ Add Node Option
1548
+ </div>
1549
+ </button>
1550
+ </div>
1551
+
1552
+ <ng-template ngFor let-nodeOption [ngForOf]="networkData.globalNodeOptions" let-i=index>
1553
+ <div class="mb-2 flex items-center justify-between">
1554
+ <label class="flex-1 mb-2 mr-1">
1555
+ Option
1556
+ <select class="w-full" matNativeControl [(ngModel)]="nodeOption.key">
1557
+ <option value="">-- Select Option --</option>
1558
+ <option *ngFor="let option of availableNodeOptions"
1559
+ [disabled]="_.find(networkData.globalNodeOptions, {key: option})"
1560
+ [value]="option">
1561
+ {{option}}
1562
+ </option>
1563
+ </select>
1564
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1565
+ </label>
1566
+ <div class="flex items-center">
1567
+ <label class="flex-1 mb-2 ml-1">
1568
+ Data Column
1569
+ <select class="w-full" matNativeControl [(ngModel)]="nodeOption.column"
1570
+ (ngModelChange)="updateOptions(nodeOption, 'datasetNodes')">
1571
+ <option value="">-- Select Column --</option>
1572
+ <option *ngFor="let column of dataset.columns"
1573
+ [value]="column.name">
1574
+ {{column.title}}
1575
+ </option>
1576
+ </select>
1577
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1578
+ </label>
1579
+ <label class="flex-1 mb-2 ml-1">
1580
+ Custom Value
1581
+ <ng-template [ngIf]="nodeOption.key && visNetworkOptions.nodes[nodeOption.key].type !== 'boolean'">
1582
+ <input [type]="visNetworkOptions.nodes[nodeOption.key].type" [(ngModel)]="nodeOption.value" (change)="updateOptions(nodeOption, 'datasetNodes')">
1583
+ </ng-template>
1584
+ <ng-template [ngIf]="nodeOption.key && visNetworkOptions.nodes[nodeOption.key].type === 'boolean'">
1585
+ <select [(ngModel)]="nodeOption.value" (change)="updateOptions(nodeOption, 'datasetNodes')">
1586
+ <option [value]="true">True</option>
1587
+ <option [value]="false">False</option>
1588
+ </select>
1589
+ </ng-template>
1590
+ <div class="text-xs font-normal text-gray-500">
1591
+ <a href="https://visjs.github.io/vis-network/docs/network/nodes.html"
1592
+ target="_blank" class="text-secondary flex items-center hover:underline">
1593
+ node options documentation
1594
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1595
+ stroke-width="1.5" stroke="currentColor" class="h-3 w-3 ml-1">
1596
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
1597
+ </svg>
1598
+ </a>
1599
+ </div>
1600
+ </label>
1601
+ </div>
1602
+
1603
+ <button mat-icon-button color="warn" (click)="networkData.globalNodeOptions.splice(i, 1)">
1604
+ <mat-icon>clear</mat-icon>
1605
+ </button>
1606
+ </div>
1607
+ </ng-template>
1608
+ </div>
1609
+ </div>
1610
+ </div>
1611
+ <div class="flex-1 w-1/2">
1612
+ <div class="p-4">
1613
+ <div class="w-full bg-white p-4 border rounded">
1614
+ <div class="font-medium mb-3 text-base">Node Data</div>
1615
+ <ng-template ngFor let-node [ngForOf]="datasetNodes">
1616
+
1617
+
1618
+ <div class="mb-2 flex items-center justify-between">
1619
+ <label class="flex-1 mb-2 mr-1">
1620
+ Node ID
1621
+ <input type="text" [value]="node.id" disabled>
1622
+ </label>
1623
+ <label class="flex-1 mb-2 ml-1">
1624
+ Node Label
1625
+ <input type="text" [value]="node.label" disabled>
1626
+ </label>
1627
+ <label class="flex-1 mb-2 ml-1">
1628
+ Node Group
1629
+ <input type="text" [value]="node.group || ''" disabled>
1630
+ </label>
1631
+ </div>
1632
+
1633
+
1634
+ <div class="flex items-start justify-between">
1635
+ <div>
1636
+ <div class="font-medium text-base">Node Options</div>
1637
+ <div class="mb-3 text-xs text-gray-500">Set the options for this node.</div>
1638
+ </div>
1639
+ <button mat-stroked-button color="primary" (click)="node.options.unshift({})">
1640
+ <div class="flex items-center">
1641
+ Add Node Option
1642
+ </div>
1643
+ </button>
1644
+ </div>
1645
+
1646
+ <ng-template ngFor let-nodeOption [ngForOf]="node.options" let-i=index>
1647
+ <div class="mb-2 flex items-center justify-between">
1648
+ <label class="flex-1 mb-2 mr-1">
1649
+ Option
1650
+ <select class="w-full" matNativeControl [(ngModel)]="nodeOption.key">
1651
+ <option [value]="undefined">-- Select Column --</option>
1652
+ <option *ngFor="let option of availableNodeOptions"
1653
+ [disabled]="_.find(node.options, {key: option})"
1654
+ [value]="option">
1655
+ {{option}}
1656
+ </option>
1657
+ </select>
1658
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1659
+ </label>
1660
+ <label class="flex-1 mb-2 ml-1">
1661
+ Option Value
1662
+ <ng-template [ngIf]="nodeOption.key && visNetworkOptions.nodes[nodeOption.key].type !== 'boolean'">
1663
+ <input [type]="visNetworkOptions.nodes[nodeOption.key].type" [(ngModel)]="nodeOption.value">
1664
+ </ng-template>
1665
+ <ng-template [ngIf]="nodeOption.key && visNetworkOptions.nodes[nodeOption.key].type === 'boolean'">
1666
+ <select [(ngModel)]="nodeOption.value">
1667
+ <option [value]="true">True</option>
1668
+ <option [value]="false">False</option>
1669
+ </select>
1670
+ </ng-template>
1671
+ <div class="text-xs font-normal text-gray-500">
1672
+ <a href="https://visjs.github.io/vis-network/docs/network/nodes.html"
1673
+ target="_blank" class="text-secondary flex items-center hover:underline">
1674
+ node options documentation
1675
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1676
+ stroke-width="1.5" stroke="currentColor" class="h-3 w-3 ml-1">
1677
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
1678
+ </svg>
1679
+ </a>
1680
+ </div>
1681
+ </label>
1682
+ <button mat-icon-button color="warn" (click)="node.options.splice(i, 1)">
1683
+ <mat-icon>clear</mat-icon>
1684
+ </button>
1685
+ </div>
1686
+ </ng-template>
1687
+ <hr class="py-2">
1688
+ </ng-template>
1689
+ </div>
1690
+ </div>
1691
+ </div>
1692
+ </div>
1693
+ </mat-tab>
1694
+ <mat-tab label="Edges" *ngIf="dashboardItemType.type === 'network' && datasetEdges.length">
1695
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
1696
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
1697
+ <div class="flex items-start flex-1">
1698
+ <div class="pt-1.5">
1699
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Edge Options</h1>
1700
+ <p class="text-xs font-medium text-gray-500">
1701
+ Define the options for each node.
1702
+ </p>
1703
+ </div>
1704
+ </div>
1705
+ </div>
1706
+ </div>
1707
+
1708
+ <div class="flex">
1709
+ <div class="flex-1 w-1/2">
1710
+ <div class="p-4">
1711
+ <div class="w-full bg-white p-4 border rounded">
1712
+ <div class="flex items-start justify-between">
1713
+ <div>
1714
+ <div class="font-medium text-base">Edge Options</div>
1715
+ <div class="mb-3 text-xs text-gray-500">These options will be applied to all edges
1716
+ based on the column or custom value provided.</div>
1717
+ </div>
1718
+ <button mat-stroked-button color="primary" (click)="addOption('globalEdgeOptions')">
1719
+ <div class="flex items-center">
1720
+ Add Edge Option
1721
+ </div>
1722
+ </button>
1723
+ </div>
1724
+
1725
+ <ng-template ngFor let-edgeOption [ngForOf]="networkData.globalEdgeOptions" let-i=index>
1726
+ <div class="mb-2 flex items-center justify-between">
1727
+ <label class="flex-1 mb-2 mr-1">
1728
+ Option
1729
+ <select class="w-full" matNativeControl [(ngModel)]="edgeOption.key">
1730
+ <option [value]="undefined">-- Select Option --</option>
1731
+ <option *ngFor="let option of availableEdgeOptions"
1732
+ [disabled]="_.find(networkData.globalEdgeOptions, {key: option})"
1733
+ [value]="option">
1734
+ {{option}}
1735
+ </option>
1736
+ </select>
1737
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1738
+ </label>
1739
+ <div class="flex items-center">
1740
+ <label class="flex-1 mb-2 ml-1">
1741
+ Data Column
1742
+ <select class="w-full" matNativeControl [(ngModel)]="edgeOption.column"
1743
+ (ngModelChange)="updateOptions(edgeOption, 'datasetEdges')">
1744
+ <option value="">-- Select Option --</option>
1745
+ <option *ngFor="let column of (edgeDataset && edgeDataset.columns) ? edgeDataset.columns : dataset.columns"
1746
+ [value]="column.name">
1747
+ {{column.title}}
1748
+ </option>
1749
+ </select>
1750
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1751
+ </label>
1752
+ <label class="flex-1 mb-2 ml-1">
1753
+ Custom Value
1754
+ <ng-template [ngIf]="edgeOption.key && visNetworkOptions.edges[edgeOption.key].type !== 'boolean'">
1755
+ <input [type]="visNetworkOptions.edges[edgeOption.key].type" [(ngModel)]="edgeOption.value" (change)="updateOptions(edgeOption, 'datasetEdges')">
1756
+ </ng-template>
1757
+ <ng-template [ngIf]="edgeOption.key && visNetworkOptions.edges[edgeOption.key].type === 'boolean'">
1758
+ <select [(ngModel)]="edgeOption.value" (change)="updateOptions(edgeOption, 'datasetEdges')">
1759
+ <option [value]="true">True</option>
1760
+ <option [value]="false">False</option>
1761
+ </select>
1762
+ </ng-template>
1763
+ <div class="text-xs font-normal text-gray-500">
1764
+ <a href="https://visjs.github.io/vis-network/docs/network/nodes.html"
1765
+ target="_blank" class="text-secondary flex items-center hover:underline">
1766
+ node options documentation
1767
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1768
+ stroke-width="1.5" stroke="currentColor" class="h-3 w-3 ml-1">
1769
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
1770
+ </svg>
1771
+ </a>
1772
+ </div>
1773
+ </label>
1774
+ </div>
1775
+
1776
+ <button mat-icon-button color="warn" (click)="networkData.globalEdgeOptions.splice(i, 1)">
1777
+ <mat-icon>clear</mat-icon>
1778
+ </button>
1779
+ </div>
1780
+ </ng-template>
1781
+ </div>
1782
+ </div>
1783
+ </div>
1784
+ <div class="flex-1 w-1/2">
1785
+ <div class="p-4">
1786
+ <div class="w-full bg-white p-4 border rounded">
1787
+ <div class="font-medium mb-3 text-base">Edge Data</div>
1788
+ <ng-template ngFor let-edge [ngForOf]="datasetEdges">
1789
+
1790
+
1791
+ <div class="mb-2 flex items-center justify-between">
1792
+ <label class="flex-1 mb-2 mr-1">
1793
+ From Node
1794
+ <input type="text" [value]="edge.from" disabled>
1795
+ </label>
1796
+ <label class="flex-1 mb-2 ml-1">
1797
+ To Node
1798
+ <input type="text" [value]="edge.to" disabled>
1799
+ </label>
1800
+ </div>
1801
+
1802
+
1803
+ <div class="flex items-start justify-between">
1804
+ <div>
1805
+ <div class="font-medium text-base">Edge Options</div>
1806
+ <div class="mb-3 text-xs text-gray-500">Set the options for this edge.</div>
1807
+ </div>
1808
+ <button mat-stroked-button color="primary" (click)="edge.options.unshift({})">
1809
+ <div class="flex items-center">
1810
+ Add Edge Option
1811
+ </div>
1812
+ </button>
1813
+ </div>
1814
+
1815
+ <ng-template ngFor let-edgeOption [ngForOf]="edge.options" let-i=index>
1816
+ <div class="mb-2 flex items-center justify-between">
1817
+ <label class="flex-1 mb-2 mr-1">
1818
+ Option
1819
+ <select class="w-full" matNativeControl [(ngModel)]="edgeOption.key">
1820
+ <option value="">-- Select Option --</option>
1821
+ <option *ngFor="let option of availableEdgeOptions"
1822
+ [disabled]="_.find(edge.options, {key: option})"
1823
+ [value]="option">
1824
+ {{option}}
1825
+ </option>
1826
+ </select>
1827
+ <div class="text-xs font-normal text-gray-500">&nbsp;</div>
1828
+ </label>
1829
+ <label class="flex-1 mb-2 ml-1">
1830
+ Option Value
1831
+ <ng-template [ngIf]="edgeOption.key && visNetworkOptions.edges[edgeOption.key].type !== 'boolean'">
1832
+ <input [type]="visNetworkOptions.edges[edgeOption.key].type" [(ngModel)]="edgeOption.value">
1833
+ </ng-template>
1834
+ <ng-template [ngIf]="edgeOption.key && visNetworkOptions.edges[edgeOption.key].type === 'boolean'">
1835
+ <select [(ngModel)]="edgeOption.value">
1836
+ <option [value]="true">True</option>
1837
+ <option [value]="false">False</option>
1838
+ </select>
1839
+ </ng-template>
1840
+ <div class="text-xs font-normal text-gray-500">
1841
+ <a href="https://visjs.github.io/vis-network/docs/network/edges.html"
1842
+ target="_blank" class="text-secondary flex items-center hover:underline">
1843
+ edge options documentation
1844
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1845
+ stroke-width="1.5" stroke="currentColor" class="h-3 w-3 ml-1">
1846
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
1847
+ </svg>
1848
+ </a>
1849
+ </div>
1850
+ </label>
1851
+ <button mat-icon-button color="warn" (click)="edge.options.splice(i, 1)">
1852
+ <mat-icon>clear</mat-icon>
1853
+ </button>
1854
+ </div>
1855
+ </ng-template>
1856
+ <hr class="py-2">
1857
+ </ng-template>
1858
+ </div>
1859
+ </div>
1860
+ </div>
1861
+ </div>
1862
+ </mat-tab>
1863
+ <mat-tab label="Alert">
1864
+ <div class="relative">
1865
+ <div *ngIf="!canSetAlerts" class="px-4 sm:px-6 lg:px-8 mt-0">
1866
+ <div class="flex flex-col">
1867
+ <div class="mt-8 border-l-4 border-yellow-400 bg-yellow-50 p-4">
1868
+ <div class="flex">
1869
+ <div class="flex-shrink-0">
1870
+ <svg class="h-5 w-5 text-yellow-400" viewBox="0 0 20 20" fill="currentColor"
1871
+ aria-hidden="true">
1872
+ <path fill-rule="evenodd"
1873
+ d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z"
1874
+ clip-rule="evenodd"/>
1875
+ </svg>
1876
+ </div>
1877
+ <div class="ml-3">
1878
+ <p class="text-sm text-yellow-700 mb-0">
1879
+ Dashboard Alerts are reserved for our Accredited users. Please <a class="font-medium text-yellow-700 underline hover:text-yellow-600"
1880
+ href="https://dnsrf.org/joining-options/index.html">review our Tiers</a> to find out more.
1881
+ </p>
1882
+ </div>
1883
+ </div>
1884
+ </div>
1885
+ </div>
1886
+ </div>
1887
+ <ng-template [ngIf]="canSetAlerts">
1888
+ <div *ngIf="showAlertWarning"
1889
+ class="bg-white shadow sm:rounded-lg absolute top-4 left-0 right-0 w-96 mx-auto z-20">
1890
+ <div class="px-4 py-5 sm:p-6 bg-gray-50">
1891
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="renew-subscription-label">
1892
+ Turn on Dashboard Alerts
1893
+ </h3>
1894
+ <div class="mt-2 sm:flex sm:items-start sm:justify-between">
1895
+ <div class="max-w-xl text-sm text-gray-500">
1896
+ <p id="renew-subscription-description">
1897
+ Alerts for this dashboard are currently <b>off</b>. Slide the toggle to turn
1898
+ them on and start receiving notifications.
1899
+ </p>
1900
+ </div>
1901
+ <div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center">
1902
+ <mat-slide-toggle [(ngModel)]="dashboard.alertsEnabled"></mat-slide-toggle>
1903
+ </div>
1904
+
1905
+ </div>
1906
+ <div class="flex items-center justify-between mt-2">
1907
+ <button mat-stroked-button (click)="showAlertWarning = false">Close</button>
1908
+ <div></div>
1909
+ </div>
1910
+ </div>
1911
+ </div>
1912
+
1913
+ <div [ngClass]="{'filter blur-sm': showAlertWarning}">
1914
+ <div class="px-6 py-3 bg-white border-b border-gray-200">
1915
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
1916
+ <div class="flex items-start flex-1">
1917
+ <div class="pt-1.5">
1918
+ <h1 class="text-xl font-bold text-gray-900 mb-0">Alert Settings</h1>
1919
+ <p class="text-xs font-medium text-gray-500">
1920
+ Configure alerts and notifications for this widget.
1921
+ </p>
1922
+ </div>
1923
+ </div>
1924
+ <div class="flex flex-col-reverse justify-stretch">
1925
+ <button mat-flat-button color="primary" (click)="editAlert(null)">
1926
+ <mat-icon>add</mat-icon>
1927
+ New Alert
1928
+ </button>
1929
+ </div>
1930
+ </div>
1931
+ </div>
1932
+ <table class="min-w-full border-separate" style="border-spacing: 0"
1933
+ *ngIf="dashboardDatasetInstance && dashboardDatasetInstance.alerts && dashboardDatasetInstance.alerts.length">
1934
+ <thead class="bg-gray-100">
1935
+ <tr>
1936
+ <th scope="col"
1937
+ class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3.5 px-4 text-left text-xs font-semibold text-gray-900 backdrop-blur backdrop-filter">
1938
+ Alert
1939
+ </th>
1940
+ <th scope="col"
1941
+ class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3.5 px-4 text-left text-xs font-semibold text-gray-900 backdrop-blur backdrop-filter">
1942
+ Configuration
1943
+ </th>
1944
+ <th scope="col"
1945
+ class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3.5 px-4 backdrop-blur backdrop-filter">
1946
+ <span class="sr-only">Edit</span>
1947
+ </th>
1948
+ </tr>
1949
+ </thead>
1950
+ <tbody class="bg-white">
1951
+ <tr *ngFor="let alert of dashboardDatasetInstance.alerts; let i = index">
1952
+ <td class="whitespace-nowrap border-b border-gray-200 py-2 px-4 text-sm font-medium text-gray-900">
1953
+ {{alert.title}}
1954
+ </td>
1955
+ <td class="whitespace-nowrap border-b border-gray-200 py-2 px-4 text-sm text-gray-500 capitalize"
1956
+ [innerHTML]="getAlertDetails(alert)"></td>
1957
+ <td class="relative whitespace-nowrap border-b border-gray-200 py-2 px-4 text-right text-sm">
1958
+ <div class="align-center justify-end">
1959
+ <button mat-button color="primary" (click)="editAlert(alert, i)"> Edit
1960
+ </button>
1961
+ <div class="divider"></div>
1962
+ <button mat-button color="warn" (click)="deleteAlert(i)"> Delete</button>
1963
+ </div>
1964
+ </td>
1965
+ </tr>
1966
+ </tbody>
1967
+ </table>
1968
+ <div class="p-4"
1969
+ *ngIf="dashboardDatasetInstance && (!dashboardDatasetInstance.alerts || !dashboardDatasetInstance.alerts.length)">
1970
+ <button type="button" (click)="editAlert(null)"
1971
+ class="relative block w-full border-2 border-gray-300 border-dashed rounded-lg p-12 text-center hover:border-gray-400 focus:outline-none">
1972
+
1973
+ <div class="relative inline-block">
1974
+ <mat-icon
1975
+ class="mx-auto text-6xl h-14 w-20 text-gray-300">notifications_active
1976
+ </mat-icon>
1977
+ <svg xmlns="http://www.w3.org/2000/svg"
1978
+ class="right-0 bottom-0 absolute h-8 w-8 text-gray-400" fill="none"
1979
+ viewBox="0 0 24 24"
1980
+ stroke="currentColor" stroke-width="4">
1981
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4"/>
1982
+ </svg>
1983
+ </div>
1984
+
1985
+ <span class="mt-2 block text-sm font-medium text-gray-900">Create New Alert</span>
1986
+ </button>
1987
+ </div>
1988
+ </div>
1989
+ </ng-template>
1990
+
1991
+ </div>
1992
+ </mat-tab>
1993
+ </mat-tab-group>
1994
+ </rsz-layout>
1995
+
1996
+ </div>
1997
+
1998
+ <div class="configure-footer">
1999
+ <div></div>
2000
+ <button mat-flat-button color="primary" (click)="saveDashboard()">
2001
+ <div class="flex items-center">
2002
+ <mat-icon class="mr-1">chevron_left</mat-icon>
2003
+ Back to Dashboard
2004
+ </div>
2005
+ </button>
2006
+ </div>