codecharta-visualization 1.86.0 → 1.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/Dockerfile +1 -1
  2. package/app/app.module.ts +30 -6
  3. package/app/codeCharta/codeCharta.component.html +0 -2
  4. package/app/codeCharta/codeCharta.component.ts +2 -0
  5. package/app/codeCharta/codeCharta.model.ts +8 -5
  6. package/app/codeCharta/codeCharta.service.spec.ts +41 -50
  7. package/app/codeCharta/codeCharta.service.ts +33 -32
  8. package/app/codeCharta/e2e/url.e2e.ts +1 -1
  9. package/app/codeCharta/services/ajs-upgraded-providers.ts +13 -0
  10. package/app/codeCharta/state/angular-redux/effects/createEffect.spec.ts +37 -0
  11. package/app/codeCharta/state/angular-redux/effects/createEffect.ts +25 -0
  12. package/app/codeCharta/state/angular-redux/effects/effects.module.ts +36 -0
  13. package/app/codeCharta/state/angular-redux/ofType.ts +11 -0
  14. package/app/codeCharta/state/angular-redux/state.ts +12 -0
  15. package/app/codeCharta/state/angular-redux/store.ts +1 -1
  16. package/app/codeCharta/state/effects/addBlacklistItemsIfNotResultsInEmptyMap/addBlacklistItemsIfNotResultsInEmptyMap.effect.spec.ts +60 -0
  17. package/app/codeCharta/state/effects/addBlacklistItemsIfNotResultsInEmptyMap/addBlacklistItemsIfNotResultsInEmptyMap.effect.ts +56 -0
  18. package/app/codeCharta/state/effects/addBlacklistItemsIfNotResultsInEmptyMap/resultsInEmptyMap.ts +22 -0
  19. package/app/codeCharta/state/effects/nodeContextMenu/excludeButton/excludeButton.component.html +3 -0
  20. package/app/codeCharta/state/effects/nodeContextMenu/excludeButton/excludeButton.component.ts +26 -0
  21. package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.html +13 -0
  22. package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.spec.ts +55 -0
  23. package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.ts +34 -0
  24. package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.module.ts +11 -0
  25. package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.component.html +24 -0
  26. package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.component.spec.ts +55 -0
  27. package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.component.ts +38 -0
  28. package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.module.ts +13 -0
  29. package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/isNodeFocused.pipe.spec.ts +31 -0
  30. package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/isNodeFocused.pipe.ts +25 -0
  31. package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.html +6 -0
  32. package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.spec.ts +64 -0
  33. package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.ts +39 -0
  34. package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.module.ts +11 -0
  35. package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.html +22 -0
  36. package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.scss +31 -0
  37. package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.spec.ts +35 -0
  38. package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.ts +30 -0
  39. package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.module.ts +11 -0
  40. package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/selectors/markFolderItems.selector.spec.ts +17 -0
  41. package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/selectors/markFolderItems.selector.ts +29 -0
  42. package/app/codeCharta/{ui → state/effects}/nodeContextMenu/nodeContextMenu.e2e.ts +4 -16
  43. package/app/codeCharta/{ui → state/effects}/nodeContextMenu/nodeContextMenu.po.ts +1 -1
  44. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenu.service.spec.ts +78 -0
  45. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenu.service.ts +72 -0
  46. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/lastPartOfNodePath.pipe.spec.ts +11 -0
  47. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/lastPartOfNodePath.pipe.ts +8 -0
  48. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.html +17 -0
  49. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.scss +34 -0
  50. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.spec.ts +49 -0
  51. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.ts +19 -0
  52. package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.module.ts +18 -0
  53. package/app/codeCharta/state/effects/nodeContextMenu/openNodeContextMenu.effect.spec.ts +32 -0
  54. package/app/codeCharta/state/effects/nodeContextMenu/openNodeContextMenu.effect.ts +33 -0
  55. package/app/codeCharta/state/effects/nodeContextMenu/rightClickedCodeMapNode.selector.ts +8 -0
  56. package/app/codeCharta/state/effects/unfocusNodesOnLoadingMap.effect.spec.ts +47 -0
  57. package/app/codeCharta/state/effects/unfocusNodesOnLoadingMap.effect.ts +18 -0
  58. package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/areAllNecessaryRenderDataAvailable.selector.ts +30 -0
  59. package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areDynamicSettingsAvailable.spec.ts +36 -0
  60. package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areDynamicSettingsAvailable.ts +10 -0
  61. package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areMetricsAvailable.spec.ts +13 -0
  62. package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areMetricsAvailable.ts +8 -0
  63. package/app/codeCharta/state/store/appSettings/appSettings.actions.ts +2 -0
  64. package/app/codeCharta/state/store/appSettings/appSettings.reducer.ts +2 -0
  65. package/app/codeCharta/state/store/appSettings/invertArea/invertArea.actions.ts +32 -0
  66. package/app/codeCharta/state/store/appSettings/invertArea/invertArea.reducer.spec.ts +26 -0
  67. package/app/codeCharta/state/store/appSettings/invertArea/invertArea.reducer.ts +12 -0
  68. package/app/codeCharta/state/store/appSettings/invertArea/invertArea.selector.ts +3 -0
  69. package/app/codeCharta/state/store/appSettings/isLoadingMap/isLoadingMap.reducer.spec.ts +14 -3
  70. package/app/codeCharta/state/store/appSettings/isLoadingMap/isLoadingMap.reducer.ts +41 -6
  71. package/app/codeCharta/state/store/appStatus/appStatus.reducer.ts +3 -1
  72. package/app/codeCharta/state/store/appStatus/appStatus.selector.ts +3 -0
  73. package/app/codeCharta/state/store/appStatus/rightClickedNodeData/rightClickedNodeData.actions.ts +23 -0
  74. package/app/codeCharta/state/store/appStatus/rightClickedNodeData/rightClickedNodeData.reducer.ts +15 -0
  75. package/app/codeCharta/state/store/appStatus/rightClickedNodeData/rightClickedNodeData.selector.ts +4 -0
  76. package/app/codeCharta/state/store/dynamicSettings/dynamicSettings.splitter.ts +2 -2
  77. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/currentFocused.selector.ts +8 -0
  78. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.actions.ts +27 -7
  79. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.reducer.spec.ts +27 -11
  80. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.reducer.ts +11 -5
  81. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.selector.ts +4 -0
  82. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.service.spec.ts +2 -2
  83. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.service.ts +1 -1
  84. package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.actions.ts +33 -2
  85. package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.reducer.spec.ts +17 -1
  86. package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.reducer.ts +3 -1
  87. package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.service.spec.ts +1 -19
  88. package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.service.ts +5 -28
  89. package/app/codeCharta/state/store/fileSettings/markedPackages/markedPackages.actions.ts +9 -10
  90. package/app/codeCharta/state/store/fileSettings/markedPackages/markedPackages.reducer.spec.ts +37 -7
  91. package/app/codeCharta/state/store/fileSettings/markedPackages/markedPackages.reducer.ts +7 -3
  92. package/app/codeCharta/state/store/fileSettings/markedPackages/util/findIndexOfMarkedPackageOrParent.spec.ts +39 -0
  93. package/app/codeCharta/state/store/fileSettings/markedPackages/util/findIndexOfMarkedPackageOrParent.ts +19 -0
  94. package/app/codeCharta/state/store/lookUp/idToNode/idToNode.selector.ts +4 -0
  95. package/app/codeCharta/state/store/lookUp/lookUp.selector.ts +3 -0
  96. package/app/codeCharta/state/store/metricData/nodeMetricData/nodeMetricData.service.ts +0 -4
  97. package/app/codeCharta/state/store/state.actions.ts +3 -1
  98. package/app/codeCharta/state/store/state.splitter.spec.ts +4 -4
  99. package/app/codeCharta/state/store/store.ts +5 -1
  100. package/app/codeCharta/state/store.service.spec.ts +21 -8
  101. package/app/codeCharta/state/store.service.ts +3 -31
  102. package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.component.html +3 -1
  103. package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.component.scss +6 -2
  104. package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.component.ts +1 -1
  105. package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.module.ts +3 -0
  106. package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.po.ts +4 -4
  107. package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.html +1 -0
  108. package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.scss +26 -0
  109. package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.spec.ts +29 -0
  110. package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.ts +24 -0
  111. package/app/codeCharta/ui/artificialIntelligence/__snapshots__/artificialIntelligence.component.spec.ts.snap +13 -16
  112. package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.html +4 -4
  113. package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.scss +0 -4
  114. package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.spec.ts +82 -52
  115. package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.ts +41 -101
  116. package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/aggregationType.pipe.spec.ts +19 -0
  117. package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/{aggregationSymbol.pipe.ts → aggregationType.pipe.ts} +4 -4
  118. package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.html +4 -12
  119. package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.scss +11 -20
  120. package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.spec.ts +8 -15
  121. package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.module.ts +2 -2
  122. package/app/codeCharta/ui/codeMap/__snapshots__/codeMap.arrow.service.spec.ts.snap +2 -2
  123. package/app/codeCharta/ui/codeMap/codeMap.actions.service.ts +1 -40
  124. package/app/codeCharta/ui/codeMap/codeMap.mouseEvent.service.ts +8 -16
  125. package/app/codeCharta/ui/codeMap/codeMap.preRender.service.spec.ts +1 -9
  126. package/app/codeCharta/ui/codeMap/codeMap.preRender.service.ts +9 -32
  127. package/app/codeCharta/ui/codeMap/rendering/codeMapMesh.ts +1 -0
  128. package/app/codeCharta/ui/colorPicker/colorPicker.component.html +16 -7
  129. package/app/codeCharta/ui/colorPicker/colorPicker.component.spec.ts +55 -16
  130. package/app/codeCharta/ui/colorPicker/colorPicker.component.ts +32 -1
  131. package/app/codeCharta/ui/colorPicker/colorPicker.module.ts +3 -1
  132. package/app/codeCharta/ui/customConfigs/customConfigs.component.html +29 -11
  133. package/app/codeCharta/ui/customConfigs/customConfigs.component.scss +1 -0
  134. package/app/codeCharta/ui/customConfigs/customConfigs.component.spec.ts +123 -2
  135. package/app/codeCharta/ui/customConfigs/customConfigs.component.ts +56 -2
  136. package/app/codeCharta/ui/dialog/dialog.addCustomConfigSettings.component.html +2 -2
  137. package/app/codeCharta/ui/dialog/dialog.changelog.component.html +1 -1
  138. package/app/codeCharta/ui/dialog/dialog.changelog.component.scss +15 -0
  139. package/app/codeCharta/ui/dialog/dialog.changelog.component.spec.ts +15 -15
  140. package/app/codeCharta/ui/dialog/dialog.changelog.component.ts +2 -1
  141. package/app/codeCharta/ui/dialog/dialog.globalSettings.e2e.ts +1 -1
  142. package/app/codeCharta/ui/dialog/dialog.globalSettings.po.ts +1 -1
  143. package/app/codeCharta/ui/dialog/dialog.service.spec.ts +68 -0
  144. package/app/codeCharta/ui/dialog/dialog.service.ts +38 -17
  145. package/app/codeCharta/ui/dialogs/dialogs.ts +3 -0
  146. package/app/codeCharta/ui/dialogs/errorDialog/errorDialog.component.html +7 -0
  147. package/app/codeCharta/ui/dialogs/errorDialog/errorDialog.component.ts +9 -0
  148. package/app/codeCharta/ui/edgeChooser/edgeChooser.e2e.ts +3 -2
  149. package/app/codeCharta/ui/fileChooser/fileChooser.e2e.ts +5 -6
  150. package/app/codeCharta/ui/filePanel/filePanel.component.html +24 -106
  151. package/app/codeCharta/ui/filePanel/filePanel.component.scss +12 -57
  152. package/app/codeCharta/ui/filePanel/filePanel.component.spec.ts +40 -72
  153. package/app/codeCharta/ui/filePanel/filePanel.component.ts +29 -81
  154. package/app/codeCharta/ui/filePanel/filePanel.module.ts +13 -1
  155. package/app/codeCharta/ui/filePanel/filePanel.po.ts +6 -24
  156. package/app/codeCharta/ui/filePanel/filePanelDeltaSelector/filePanelDeltaSelector.component.html +23 -0
  157. package/app/codeCharta/ui/filePanel/filePanelDeltaSelector/filePanelDeltaSelector.component.ts +18 -0
  158. package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.html +18 -0
  159. package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.ts +16 -0
  160. package/app/codeCharta/ui/filePanel/filePanelStateButtons/filePanelStateButtons.component.html +18 -0
  161. package/app/codeCharta/ui/filePanel/filePanelStateButtons/filePanelStateButtons.component.ts +11 -0
  162. package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.html +21 -13
  163. package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.spec.ts +11 -24
  164. package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.ts +1 -40
  165. package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.module.ts +1 -2
  166. package/app/codeCharta/ui/legendPanel/legendMarkedPackages/legendMarkedPackages.component.ts +2 -2
  167. package/app/codeCharta/ui/mapTreeView/mapTreeView.level.e2e.ts +8 -6
  168. package/app/codeCharta/ui/mapTreeView/mapTreeView.level.po.ts +1 -1
  169. package/app/codeCharta/ui/mapTreeView/mapTreeViewLevel/mapTreeViewLevel.component.html +1 -1
  170. package/app/codeCharta/ui/mapTreeView/mapTreeViewLevel/mapTreeViewLevel.component.spec.ts +6 -16
  171. package/app/codeCharta/ui/mapTreeView/mapTreeViewLevel/mapTreeViewLevel.component.ts +15 -11
  172. package/app/codeCharta/ui/ribbonBar/ribbonBar.component.html +3 -3
  173. package/app/codeCharta/ui/ribbonBar/ribbonBar.e2e.ts +3 -3
  174. package/app/codeCharta/ui/searchBar/searchBar.component.html +5 -0
  175. package/app/codeCharta/ui/searchBar/searchBar.component.scss +11 -0
  176. package/app/codeCharta/ui/searchBar/searchBar.component.spec.ts +10 -0
  177. package/app/codeCharta/ui/searchBar/searchBar.component.ts +1 -1
  178. package/app/codeCharta/ui/sortingOption/sortingOption.component.spec.ts +1 -1
  179. package/app/codeCharta/ui/toolBar/toolBar.component.html +1 -1
  180. package/app/codeCharta/ui/toolBar/toolBar.component.scss +1 -1
  181. package/app/codeCharta/ui/ui.ts +2 -6
  182. package/app/codeCharta/util/algorithm/streetLayout/strip/strip.ts +2 -2
  183. package/app/codeCharta/util/algorithm/streetLayout/treeMap.ts +1 -1
  184. package/app/codeCharta/util/algorithm/treeMapLayout/treeMapGenerator.spec.ts +2 -2
  185. package/app/codeCharta/util/algorithm/treeMapLayout/treeMapGenerator.ts +14 -7
  186. package/app/codeCharta/util/algorithm/treeMapLayout/treeMapHelper.spec.ts +2 -2
  187. package/app/codeCharta/util/algorithm/treeMapLayout/treeMapHelper.ts +1 -1
  188. package/app/codeCharta/util/customConfigBuilder.ts +2 -1
  189. package/app/codeCharta/util/customConfigHelper.spec.ts +155 -60
  190. package/app/codeCharta/util/customConfigHelper.ts +33 -3
  191. package/app/codeCharta/util/dataMocks.ts +8 -4
  192. package/app/codeCharta/util/fileExtensionCalculator.ts +1 -1
  193. package/app/codeCharta/util/fileValidator.spec.ts +69 -182
  194. package/app/codeCharta/util/fileValidator.ts +61 -37
  195. package/app/codeCharta/util/reduxHelper.ts +11 -0
  196. package/app/material/material.module.ts +17 -1
  197. package/conf/webpack.loaders.js +4 -1
  198. package/dist/webpack/bundle.js +5925 -1896
  199. package/dist/webpack/bundle.js.map +1 -1
  200. package/package.json +7 -6
  201. package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.splitter.ts +0 -8
  202. package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/aggregationSymbol.pipe.spec.ts +0 -19
  203. package/app/codeCharta/ui/codeMap/codeMap.actions.service.spec.ts +0 -147
  204. package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.component.html +0 -5
  205. package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.component.scss +0 -13
  206. package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.component.ts +0 -30
  207. package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.module.ts +0 -13
  208. package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.html +0 -68
  209. package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.scss +0 -52
  210. package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.spec.ts +0 -571
  211. package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.ts +0 -318
  212. package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.module.ts +0 -13
  213. package/app/codeCharta/ui/unfocusButton/unfocusButton.component.html +0 -15
  214. package/app/codeCharta/ui/unfocusButton/unfocusButton.component.scss +0 -5
  215. package/app/codeCharta/ui/unfocusButton/unfocusButton.component.spec.ts +0 -106
  216. package/app/codeCharta/ui/unfocusButton/unfocusButton.component.ts +0 -62
  217. package/app/codeCharta/ui/unfocusButton/unfocusButton.module.ts +0 -7
@@ -1,108 +1,26 @@
1
- <section layout="row" layout-align="center center" class="mode-chooser">
2
- <md-button
3
- class="state-selector-button mode-selector left"
4
- ng-class="{ current: $ctrl._viewModel.isSingleState }"
5
- ng-click="$ctrl.onSingleStateSelected()"
6
- ><span class="text">Single</span></md-button
7
- >
8
- <md-button
9
- class="state-selector-button mode-selector middle"
10
- ng-class="{ current: $ctrl._viewModel.isPartialState }"
11
- ng-click="$ctrl.onPartialStateSelected()"
12
- ><span class="text">Multiple</span></md-button
13
- >
14
- <md-button
15
- class="state-selector-button mode-selector right"
16
- ng-class="{ current: $ctrl._viewModel.isDeltaState }"
17
- ng-click="$ctrl.onDeltaStateSelected()"
18
- ><span class="text">Delta</span></md-button
19
- >
20
- </section>
1
+ <cc-file-panel-state-buttons
2
+ [is-delta-state]="$ctrl._viewModel.isDeltaState"
3
+ [handle-standard-button-clicked]="$ctrl.selectRecentPartialFiles"
4
+ [handle-delta-button-clicked]="$ctrl.onDeltaStateSelected"
5
+ ></cc-file-panel-state-buttons>
21
6
 
22
- <md-input-container class="input-container" ng-show="$ctrl._viewModel.isSingleState" title="Select a file">
23
- <md-select
24
- class="md-select-menu"
25
- ng-model="$ctrl._viewModel.selectedFileNames.single"
26
- ng-change="$ctrl.onSingleFileChange($ctrl._viewModel.selectedFileNames.single)"
27
- >
28
- <md-option
29
- ng-repeat="fileState in $ctrl._viewModel.files track by fileState.file.fileMeta.fileName"
30
- value="{{::fileState.file.fileMeta.fileName}}"
31
- >
32
- <md-truncate>{{::fileState.file.fileMeta.fileName}}</md-truncate>
33
- <remove-file-button-component
34
- on-remove-file="$ctrl.onRemoveFile(filename, state, event)"
35
- ng-if="$ctrl._viewModel.files.length > 1"
36
- filename="{{::fileState.file.fileMeta.fileName}}"
37
- state="Single"
38
- >
39
- </remove-file-button-component>
40
- </md-option>
41
- </md-select>
42
- </md-input-container>
7
+ <cc-file-panel-file-selector
8
+ style="display: inline-block; width: 200px"
9
+ ng-show="!$ctrl._viewModel.isDeltaState"
10
+ [selected-file-names]="$ctrl._viewModel.selectedFileNames.partial"
11
+ [handle-selected-files-changed]="$ctrl.onPartialFilesChange"
12
+ [handle-select-all-partial-files]="$ctrl.selectAllPartialFiles"
13
+ [handle-select-zero-partial-files]="$ctrl.selectZeroPartialFiles"
14
+ [handle-invert-selected-partial-files]="$ctrl.invertPartialFileSelection"
15
+ [handle-on-selection-closed]="$ctrl.onPartialSelectionClosed"
16
+ [files]="$ctrl._viewModel.files"
17
+ ></cc-file-panel-file-selector>
43
18
 
44
- <md-input-container class="input-container" ng-show="$ctrl._viewModel.isPartialState" title="Select files">
45
- <md-select
46
- class="md-select-menu"
47
- ng-model="$ctrl._viewModel.selectedFileNames.partial"
48
- multiple="{{ true }}"
49
- ng-change="$ctrl.onPartialFilesChange($ctrl._viewModel.selectedFileNames.partial)"
50
- md-on-close="$ctrl.onPartialSelectionClosed()"
51
- >
52
- <md-button ng-click="$ctrl.selectAllPartialFiles()">All</md-button>
53
- <md-button ng-click="$ctrl.selectZeroPartialFiles()">None</md-button>
54
- <md-button ng-click="$ctrl.invertPartialFileSelection()">Invert</md-button>
55
-
56
- <md-option
57
- ng-repeat="fileState in $ctrl._viewModel.files track by fileState.file.fileMeta.fileName"
58
- value="{{::fileState.file.fileMeta.fileName}}"
59
- >
60
- <md-truncate>{{::fileState.file.fileMeta.fileName}}</md-truncate>
61
- <remove-file-button-component
62
- on-remove-file="$ctrl.onRemoveFile(filename, state, event)"
63
- ng-if="$ctrl._viewModel.files.length > 1"
64
- filename="{{::fileState.file.fileMeta.fileName}}"
65
- state="Partial"
66
- >
67
- </remove-file-button-component>
68
- </md-option>
69
- </md-select>
70
- </md-input-container>
71
-
72
- <div class="input-container delta-chooser" ng-show="$ctrl._viewModel.isDeltaState">
73
- <div class="pictogram" ng-style="{ background: $ctrl._viewModel.pictogramFirstFileColor }"></div>
74
- <md-input-container class="delta-select input-container" title="Select reference file">
75
- <md-select
76
- ng-model="$ctrl._viewModel.selectedFileNames.delta.reference"
77
- ng-change="$ctrl.onDeltaReferenceFileChange($ctrl._viewModel.selectedFileNames.delta.reference)"
78
- >
79
- <md-option
80
- ng-repeat="fileState in $ctrl._viewModel.files track by fileState.file.fileMeta.fileName"
81
- value="{{::fileState.file.fileMeta.fileName}}"
82
- >
83
- <md-truncate>{{::fileState.file.fileMeta.fileName}}</md-truncate>
84
- </md-option>
85
- </md-select>
86
- </md-input-container>
87
-
88
- <div
89
- class="pictogram"
90
- ng-style="{
91
- background:
92
- 'linear-gradient(' + $ctrl._viewModel.pictogramUpperColor + ' 50%, ' + $ctrl._viewModel.pictogramLowerColor + ' 50%)'
93
- }"
94
- ></div>
95
- <md-input-container class="input-container delta-select" title="Select comparison file">
96
- <md-select
97
- ng-model="$ctrl._viewModel.selectedFileNames.delta.comparison"
98
- ng-change="$ctrl.onDeltaComparisonFileChange($ctrl._viewModel.selectedFileNames.delta.comparison)"
99
- >
100
- <md-option
101
- ng-repeat="fileState in $ctrl._viewModel.files track by fileState.file.fileMeta.fileName"
102
- value="{{::fileState.file.fileMeta.fileName}}"
103
- >
104
- <md-truncate>{{::fileState.file.fileMeta.fileName}}</md-truncate>
105
- </md-option>
106
- </md-select>
107
- </md-input-container>
108
- </div>
19
+ <cc-file-panel-delta-selector
20
+ ng-show="$ctrl._viewModel.isDeltaState"
21
+ [pictogram-upper-color]="$ctrl._viewModel.pictogramUpperColor"
22
+ [pictogram-lower-color]="$ctrl._viewModel.pictogramLowerColor"
23
+ [handle-delta-reference-file-change]="$ctrl.onDeltaReferenceFileChange"
24
+ [handle-delta-comparison-file-change]="$ctrl.onDeltaComparisonFileChange"
25
+ [files]="$ctrl._viewModel.files"
26
+ ></cc-file-panel-delta-selector>
@@ -1,12 +1,10 @@
1
- file-panel-component {
1
+ cc-file-panel {
2
2
  width: calc(100% - 150px);
3
3
  min-width: 400px;
4
4
  display: inline-block;
5
5
 
6
- .delta-chooser {
7
- position: absolute;
8
- display: inline-flex;
9
- min-width: 70%;
6
+ &.hidden {
7
+ display: none;
10
8
  }
11
9
 
12
10
  .mode-chooser {
@@ -15,18 +13,10 @@ file-panel-component {
15
13
  margin-left: 10px;
16
14
  }
17
15
 
18
- .small-action-button.transparent {
19
- .md-fab.md-button.md-ink-ripple {
20
- &:hover {
21
- background-color: transparent !important;
22
- }
23
- }
24
- }
25
-
26
16
  .state-selector-button {
27
17
  &.mode-selector {
28
18
  height: 24px;
29
- width: 55px;
19
+ width: 66px;
30
20
  background-color: #ffffff;
31
21
 
32
22
  &.middle {
@@ -62,51 +52,16 @@ file-panel-component {
62
52
  height: 22px;
63
53
  border-radius: 2px;
64
54
  align-self: center;
55
+ vertical-align: bottom;
65
56
  }
66
57
 
67
- md-input-container {
68
- display: inline-block;
69
- text-align: left;
70
- font-size: 11pt;
71
- width: calc(100% - 250px);
72
- max-width: 300px;
73
- min-width: 150px;
74
-
75
- &.delta-select {
76
- width: calc((100% - 300px) / 2);
77
- }
78
-
79
- md-select {
80
- display: block;
81
-
82
- .md-select-value {
83
- background: white;
84
- margin-right: 5px;
85
- border-radius: 5px;
86
- padding-left: 5px;
87
- min-height: 22px;
88
-
89
- span {
90
- margin-top: -3px;
91
- }
92
- }
93
- }
94
-
95
- > * {
96
- display: inline-block;
97
- }
98
-
99
- i.fa {
100
- color: rgb(0, 150, 136);
101
- margin-top: 4px;
102
- margin-left: 5px;
103
- margin-right: 3px;
104
- min-width: 16px;
58
+ .delta-select {
59
+ width: 200px;
60
+ margin: 0 10px 0 10px;
61
+ vertical-align: bottom;
62
+ }
105
63
 
106
- &:hover {
107
- color: black;
108
- cursor: pointer;
109
- }
110
- }
64
+ .standard-select {
65
+ margin: 0 10px 0 10px;
111
66
  }
112
67
  }
@@ -6,9 +6,10 @@ import { TEST_DELTA_MAP_A, TEST_DELTA_MAP_B, TEST_DELTA_MAP_C, TEST_DELTA_MAP_D
6
6
  import { StoreService } from "../../state/store.service"
7
7
  import { addFile, resetFiles, resetSelection, setDelta, setMultiple, setSingle } from "../../state/store/files/files.actions"
8
8
  import { FilesService } from "../../state/store/files/files.service"
9
- import { getVisibleFileStates, isDeltaState, isPartialState, isSingleState } from "../../model/files/files.helper"
9
+ import { getVisibleFileStates, isDeltaState, isPartialState } from "../../model/files/files.helper"
10
10
  import { FileSelectionState } from "../../model/files/files"
11
11
  import { CodeChartaService } from "../../codeCharta.service"
12
+ import { MapColorsService } from "../../state/store/appSettings/mapColors/mapColors.service"
12
13
 
13
14
  describe("filePanelController", () => {
14
15
  let filePanelController: FilePanelController
@@ -38,7 +39,6 @@ describe("filePanelController", () => {
38
39
  storeService.dispatch(addFile(TEST_DELTA_MAP_B))
39
40
  storeService.dispatch(addFile(TEST_DELTA_MAP_C))
40
41
  storeService.dispatch(addFile(TEST_DELTA_MAP_D))
41
- storeService.dispatch(setSingle(TEST_DELTA_MAP_A))
42
42
  }
43
43
 
44
44
  describe("constructor", () => {
@@ -49,6 +49,14 @@ describe("filePanelController", () => {
49
49
 
50
50
  expect(FilesService.subscribe).toHaveBeenCalledWith($rootScope, filePanelController)
51
51
  })
52
+
53
+ it("should subscribe to MapColorService", () => {
54
+ MapColorsService.subscribe = jest.fn()
55
+
56
+ buildController()
57
+
58
+ expect(MapColorsService.subscribe).toHaveBeenCalledWith($rootScope, filePanelController)
59
+ })
52
60
  })
53
61
 
54
62
  describe("onFilesSelectionChanged", () => {
@@ -63,19 +71,18 @@ describe("filePanelController", () => {
63
71
 
64
72
  filePanelController.onFilesSelectionChanged(storeService.getState().files)
65
73
 
66
- expect(filePanelController["_viewModel"].isSingleState).toBeFalsy()
67
74
  expect(filePanelController["_viewModel"].isPartialState).toBeFalsy()
68
75
  expect(filePanelController["_viewModel"].isDeltaState).toBeTruthy()
69
76
  expect(filePanelController["lastRenderState"]).toEqual(filePanelController["_viewModel"].renderState)
70
77
  })
71
78
 
72
- it("should update selected filenames in viewModel correctly if single mode is active", () => {
73
- storeService.dispatch(setSingle(TEST_DELTA_MAP_A))
79
+ it("should update selected filenames in viewModel correctly if multiple mode is active", () => {
80
+ storeService.dispatch(setMultiple([TEST_DELTA_MAP_A]))
74
81
 
75
82
  filePanelController.onFilesSelectionChanged(storeService.getState().files)
76
83
 
77
- expect(filePanelController["_viewModel"].renderState).toEqual(FileSelectionState.Single)
78
- expect(filePanelController["_viewModel"].selectedFileNames.single).toEqual(TEST_DELTA_MAP_A.fileMeta.fileName)
84
+ expect(filePanelController["_viewModel"].renderState).toEqual(FileSelectionState.Partial)
85
+ expect(filePanelController["_viewModel"].selectedFileNames.partial).toEqual([TEST_DELTA_MAP_A.fileMeta.fileName])
79
86
  })
80
87
 
81
88
  it("should update selected filenames in viewModel correctly if partial mode is active", () => {
@@ -121,16 +128,27 @@ describe("filePanelController", () => {
121
128
  expect(filePanelController["_viewModel"].selectedFileNames.delta.reference).toBeNull()
122
129
  expect(filePanelController["_viewModel"].selectedFileNames.delta.comparison).toBeNull()
123
130
  expect(filePanelController["_viewModel"].selectedFileNames.partial).toEqual([])
124
- expect(filePanelController["_viewModel"].selectedFileNames.single).toBeNull()
125
131
  })
132
+ })
126
133
 
127
- it("should set the pictogram colors in view model", () => {
128
- filePanelController.onFilesSelectionChanged(storeService.getState().files)
134
+ describe("onMapColorsChanged", () => {
135
+ it("should set default colors of delta mode in view model for pictogram", () => {
136
+ filePanelController.onMapColorsChanged(storeService.getState().appSettings.mapColors)
129
137
 
130
- expect(filePanelController["_viewModel"].pictogramFirstFileColor).toBe("#808080")
131
138
  expect(filePanelController["_viewModel"].pictogramLowerColor).toBe(storeService.getState().appSettings.mapColors.negativeDelta)
132
139
  expect(filePanelController["_viewModel"].pictogramUpperColor).toBe(storeService.getState().appSettings.mapColors.positiveDelta)
133
140
  })
141
+
142
+ it("should update colors of delta mode in view model for pictogram when colors had changed", () => {
143
+ filePanelController["_viewModel"].pictogramLowerColor = storeService.getState().appSettings.mapColors.negativeDelta
144
+ filePanelController["_viewModel"].pictogramUpperColor = storeService.getState().appSettings.mapColors.positiveDelta
145
+ const testMapColors = { ...storeService.getState().appSettings.mapColors, negativeDelta: "#FFFFFF", positiveDelta: "#000000" }
146
+
147
+ filePanelController.onMapColorsChanged(testMapColors)
148
+
149
+ expect(filePanelController["_viewModel"].pictogramLowerColor).toBe(testMapColors.negativeDelta)
150
+ expect(filePanelController["_viewModel"].pictogramUpperColor).toBe(testMapColors.positiveDelta)
151
+ })
134
152
  })
135
153
 
136
154
  describe("onPartialSelectionClosed", () => {
@@ -148,28 +166,6 @@ describe("filePanelController", () => {
148
166
  })
149
167
  })
150
168
 
151
- describe("onSingleFileChange", () => {
152
- it("should set a single file in state und update root data", () => {
153
- filePanelController["_viewModel"].files = [
154
- {
155
- file: TEST_DELTA_MAP_A,
156
- selectedAs: FileSelectionState.None
157
- },
158
- {
159
- file: TEST_DELTA_MAP_B,
160
- selectedAs: FileSelectionState.Single
161
- }
162
- ]
163
- filePanelController.onSingleFileChange(TEST_DELTA_MAP_B.fileMeta.fileName)
164
-
165
- expect(isSingleState(storeService.getState().files)).toBeTruthy()
166
- expect(getVisibleFileStates(storeService.getState().files)[0].selectedAs).toEqual(FileSelectionState.Single)
167
-
168
- expect(CodeChartaService.ROOT_NAME).toEqual(TEST_DELTA_MAP_B.map.name)
169
- expect(CodeChartaService.ROOT_PATH).toEqual(`/${TEST_DELTA_MAP_B.map.name}`)
170
- })
171
- })
172
-
173
169
  describe("onDeltaReferenceFileChange", () => {
174
170
  it("should set referenceFile in delta mode and update root data", () => {
175
171
  filePanelController["_viewModel"].files = [
@@ -229,26 +225,6 @@ describe("filePanelController", () => {
229
225
  })
230
226
 
231
227
  describe("onRenderStateChange", () => {
232
- it("should update the viewModel with the last visible filename and call onSingleFileChange if single mode is active", () => {
233
- filePanelController.onSingleFileChange = jest.fn()
234
-
235
- filePanelController["lastRenderState"] = FileSelectionState.Single
236
- filePanelController["_viewModel"].selectedFileNames.single = "fileA"
237
-
238
- filePanelController.onSingleStateSelected()
239
-
240
- expect(filePanelController["_viewModel"].selectedFileNames.single).toEqual("fileA")
241
- expect(filePanelController.onSingleFileChange).toHaveBeenCalledWith("fileA")
242
- })
243
-
244
- it("should update the viewModel with the first recently loaded filename and call Files if partial mode is active", () => {
245
- filePanelController.selectRecentPartialFiles = jest.fn()
246
-
247
- filePanelController.onPartialStateSelected()
248
-
249
- expect(filePanelController.selectRecentPartialFiles).toHaveBeenCalled()
250
- })
251
-
252
228
  it("should update the viewModel with the last visible filename and call onDeltaComparisonFileChange with null if comparison mode is active", () => {
253
229
  filePanelController.onDeltaComparisonFileChange = jest.fn()
254
230
 
@@ -284,40 +260,32 @@ describe("filePanelController", () => {
284
260
  ]
285
261
  })
286
262
 
287
- it("should call onSingleFileChange when single state", () => {
288
- filePanelController.singleStateFileRemove = jest.fn()
289
-
290
- filePanelController.onRemoveFile("fileA", FileSelectionState.Single, new Event("mouseEvent"))
291
-
292
- expect(filePanelController.singleStateFileRemove).toHaveBeenCalled()
293
- })
294
-
295
- it("should call onPartialFilesChange when not in single state", () => {
263
+ it("should call onPartialFilesChange when partial state", () => {
296
264
  filePanelController.onPartialFilesChange = jest.fn()
297
265
 
298
- filePanelController.onRemoveFile("fileA", FileSelectionState.None, new Event("mouseEvent"))
266
+ filePanelController.onRemoveFile("fileA", new Event("mouseEvent"))
299
267
 
300
268
  expect(filePanelController.onPartialFilesChange).toHaveBeenCalled()
301
269
  })
302
270
 
303
271
  it("should keep selection when a non-selected file is removed", () => {
304
- storeService.dispatch(setSingle(TEST_DELTA_MAP_B))
305
- filePanelController.onRemoveFile("fileA", FileSelectionState.Single, new Event("mouseEvent"))
272
+ storeService.dispatch(setMultiple([TEST_DELTA_MAP_B]))
273
+ filePanelController.onRemoveFile("fileA", new Event("mouseEvent"))
306
274
 
307
275
  const remainingFiles = storeService.getState().files
308
- expect(remainingFiles[0].selectedAs).toEqual(FileSelectionState.Single)
276
+ expect(remainingFiles[0].selectedAs).toEqual(FileSelectionState.Partial)
309
277
  expect(remainingFiles[1].selectedAs).toEqual(FileSelectionState.None)
310
278
  })
311
279
 
312
280
  it("should select most recent file when a selected file is removed", () => {
313
281
  storeService.dispatch(setSingle(TEST_DELTA_MAP_B))
314
- filePanelController.onRemoveFile("fileB", FileSelectionState.Single, new Event("mouseEvent"))
282
+ filePanelController.onRemoveFile("fileB", new Event("mouseEvent"))
315
283
 
316
284
  const remainingFiles = storeService.getState().files
317
285
  const fileA = remainingFiles[0]
318
286
  const fileD = remainingFiles[2]
319
287
  expect(fileA.selectedAs).toEqual(FileSelectionState.None)
320
- expect(fileD.selectedAs).toEqual(FileSelectionState.Single)
288
+ expect(fileD.selectedAs).toEqual(FileSelectionState.Partial)
321
289
  })
322
290
  })
323
291
 
@@ -346,7 +314,7 @@ describe("filePanelController", () => {
346
314
  it("should not change selection when partially selected files still exist", () => {
347
315
  storeService.dispatch(setMultiple([TEST_DELTA_MAP_B, TEST_DELTA_MAP_C]))
348
316
 
349
- filePanelController.onRemoveFile("fileB", FileSelectionState.Partial, new Event("mouseEvent"))
317
+ filePanelController.onRemoveFile("fileB", new Event("mouseEvent"))
350
318
 
351
319
  const remainingFiles = storeService.getState().files
352
320
  const fileA = remainingFiles[0]
@@ -360,8 +328,8 @@ describe("filePanelController", () => {
360
328
  it("should select most recent file when no partially selected file exists", () => {
361
329
  storeService.dispatch(setMultiple([TEST_DELTA_MAP_B, TEST_DELTA_MAP_C]))
362
330
 
363
- filePanelController.onRemoveFile("fileB", FileSelectionState.Partial, new Event("mouseEvent"))
364
- filePanelController.onRemoveFile("fileC", FileSelectionState.Partial, new Event("mouseEvent"))
331
+ filePanelController.onRemoveFile("fileB", new Event("mouseEvent"))
332
+ filePanelController.onRemoveFile("fileC", new Event("mouseEvent"))
365
333
 
366
334
  const remainingFiles = storeService.getState().files
367
335
  const fileA = remainingFiles[0]
@@ -373,7 +341,7 @@ describe("filePanelController", () => {
373
341
  it("should not change selection when non-selected file is removed", () => {
374
342
  storeService.dispatch(setMultiple([TEST_DELTA_MAP_B, TEST_DELTA_MAP_C]))
375
343
 
376
- filePanelController.onRemoveFile("fileA", FileSelectionState.Partial, new Event("mouseEvent"))
344
+ filePanelController.onRemoveFile("fileA", new Event("mouseEvent"))
377
345
 
378
346
  const remainingFiles = storeService.getState().files
379
347
  const fileB = remainingFiles[0]