codecharta-visualization 1.114.0 → 1.115.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.
- package/README.md +4 -1
- package/app/app.module.ts +1 -12
- package/app/app.scss +0 -2
- package/app/codeCharta/assets/codecharta_logo.svg +1 -0
- package/app/codeCharta/codeCharta.component.html +10 -7
- package/app/codeCharta/codeCharta.component.scss +22 -51
- package/app/codeCharta/codeCharta.component.ts +5 -7
- package/app/codeCharta/codeCharta.model.ts +0 -1
- package/app/codeCharta/e2e/__snapshots__/logo.e2e.ts.snap +2 -2
- package/app/codeCharta/e2e/logo.po.ts +7 -7
- package/app/codeCharta/e2e/url.e2e.ts +2 -2
- package/app/codeCharta/index.d.ts +1 -1
- package/app/codeCharta/model/customConfig/customConfig.api.model.ts +1 -0
- package/app/codeCharta/services/isAttributeSideBarVisible.service.ts +2 -2
- package/app/codeCharta/services/loadFile/loadFile.service.spec.ts +6 -6
- package/app/codeCharta/services/loadFile/loadFile.service.ts +7 -3
- package/app/codeCharta/services/loadInitialFile/loadInitialFile.service.spec.ts +1 -1
- package/app/codeCharta/services/loadInitialFile/loadInitialFile.service.ts +7 -7
- package/app/codeCharta/services/version/version.service.ts +2 -2
- package/app/codeCharta/state/effects/autoFitCodeMapChange/autoFitCodeMap.effect.ts +5 -5
- package/app/codeCharta/state/effects/linkColorMetricToHeightMetric/linkColorMetricToHeightMetric.effect.ts +2 -2
- package/app/codeCharta/state/effects/nodeContextMenu/excludeButton/excludeButton.component.ts +4 -3
- package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.html +2 -2
- package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.ts +4 -3
- package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.component.ts +4 -3
- package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.spec.ts +5 -5
- package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.ts +4 -6
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.ts +5 -4
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenu.service.ts +2 -2
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.html +1 -1
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.scss +6 -7
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.ts +5 -4
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.module.ts +1 -2
- package/app/codeCharta/state/effects/nodeContextMenu/openNodeContextMenu.effect.ts +1 -4
- package/app/codeCharta/state/effects/renderCodeMapEffect/renderCodeMap.effect.ts +4 -4
- package/app/codeCharta/state/effects/resetChosenMetrics/resetChosenMetrics.effect.spec.ts +25 -19
- package/app/codeCharta/state/effects/resetChosenMetrics/resetChosenMetrics.effect.ts +6 -5
- package/app/codeCharta/state/effects/resetSelectedEdgeMetricWhenItDoesntExistAnymore/resetSelectedEdgeMetricWhenItDoesntExistAnymore.effect.spec.ts +13 -13
- package/app/codeCharta/state/effects/resetSelectedEdgeMetricWhenItDoesntExistAnymore/resetSelectedEdgeMetricWhenItDoesntExistAnymore.effect.ts +6 -6
- package/app/codeCharta/state/effects/unfocusNodes/unfocusNodes.effect.ts +2 -2
- package/app/codeCharta/state/effects/updateEdgePreviews/updateEdgePreviews.effect.ts +2 -2
- package/app/codeCharta/state/effects/updateEdgePreviews/utils/edgePreviewNodes.selector.ts +5 -3
- package/app/codeCharta/state/effects/updateFileSettings/updateFileSettings.effect.ts +2 -2
- package/app/codeCharta/state/effects/updateFileSettings/utils/__snapshots__/blacklist.merger.spec.ts.snap +9 -9
- package/app/codeCharta/state/effects/updateFileSettings/utils/__snapshots__/edges.merger.spec.ts.snap +16 -16
- package/app/codeCharta/state/effects/updateFileSettings/utils/__snapshots__/markedPackages.merger.spec.ts.snap +10 -10
- package/app/codeCharta/state/effects/updateVisibleTopLabels/updateVisibleTopLabels.effect.ts +2 -2
- package/app/codeCharta/state/selectors/accumulatedData/accumulatedData.selector.spec.ts +76 -0
- package/app/codeCharta/state/selectors/accumulatedData/accumulatedData.selector.ts +7 -12
- package/app/codeCharta/state/selectors/accumulatedData/metricData/edgeMetricData.calculator.spec.ts +46 -0
- package/app/codeCharta/state/selectors/accumulatedData/metricData/{edgeMetricData.selector.ts → edgeMetricData.calculator.ts} +10 -23
- package/app/codeCharta/state/selectors/accumulatedData/metricData/metricData.selector.ts +10 -6
- package/app/codeCharta/state/selectors/accumulatedData/metricData/metricNames.selector.spec.ts +5 -5
- package/app/codeCharta/state/selectors/accumulatedData/metricData/metricNames.selector.ts +2 -2
- package/app/codeCharta/state/selectors/accumulatedData/metricData/{nodeMetricData.selector.spec.ts → nodeMetricData.calculator.spec.ts} +2 -2
- package/app/codeCharta/state/selectors/accumulatedData/metricData/{nodeMetricData.selector.ts → nodeMetricData.calculator.ts} +0 -5
- package/app/codeCharta/state/selectors/accumulatedData/metricData/selectedColorMetricData.selector.ts +4 -4
- package/app/codeCharta/state/selectors/accumulatedData/utils/addEdgeMetricsForLeaves.ts +3 -2
- package/app/codeCharta/state/selectors/accumulatedData/utils/getMetricValuesForNode.spec.ts +4 -11
- package/app/codeCharta/state/selectors/accumulatedData/utils/getMetricValuesForNode.ts +2 -2
- package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/areAllNecessaryRenderDataAvailable.selector.ts +7 -6
- package/app/codeCharta/state/selectors/primaryMetrics/primaryMetrics.selector.ts +27 -11
- package/app/codeCharta/state/store/appSettings/appSettings.actions.ts +0 -2
- package/app/codeCharta/state/store/appSettings/appSettings.reducer.ts +0 -2
- package/app/codeCharta/state/store/appSettings/invertArea/invertArea.actions.ts +1 -12
- package/app/codeCharta/state/store/appSettings/invertArea/invertArea.reducer.ts +2 -4
- package/app/codeCharta/state/store/dynamicSettings/colorRange/resetColorRange.effect.ts +1 -1
- package/app/codeCharta/ui/actionIcon/actionIcon.component.ts +4 -3
- package/app/codeCharta/ui/actionIcon/actionIcon.module.ts +1 -2
- package/app/codeCharta/ui/attributeSideBar/attributeSideBar.component.scss +1 -1
- package/app/codeCharta/ui/attributeSideBar/attributeSideBar.component.spec.ts +59 -7
- package/app/codeCharta/ui/attributeSideBar/attributeSideBar.component.ts +5 -7
- package/app/codeCharta/ui/attributeSideBar/attributeSideBar.module.ts +2 -2
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarHeaderSection/attributeSideBarHeaderSection.component.ts +5 -4
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarHeaderSection/nodePath/nodePath.component.ts +4 -3
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarPrimaryMetrics/attributeSideBarPrimaryMetric/attributeSideBarPrimaryMetric.component.ts +4 -3
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarPrimaryMetrics/attributeSideBarPrimaryMetrics.component.html +10 -5
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarPrimaryMetrics/attributeSideBarPrimaryMetrics.component.ts +4 -3
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/attributeSideBarSecondaryMetrics.component.html +5 -1
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/attributeSideBarSecondaryMetrics.component.ts +4 -3
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/secondaryMetrics.selector.spec.ts +29 -4
- package/app/codeCharta/ui/attributeSideBar/attributeSideBarSecondaryMetrics/secondaryMetrics.selector.ts +11 -4
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.scss +4 -6
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.ts +5 -4
- package/app/codeCharta/ui/attributeSideBar/metricDeltaSelected/metricDeltaSelected.component.spec.ts +2 -2
- package/app/codeCharta/ui/attributeSideBar/metricDeltaSelected/metricDeltaSelected.component.ts +4 -3
- package/app/codeCharta/ui/attributeSideBar/util/edge.ts +7 -0
- package/app/codeCharta/ui/attributeSideBar/util/metric.ts +2 -0
- package/app/codeCharta/ui/{legendPanel/selectors/legendMetric.ts → attributeSideBar/util/metricDescriptors.ts} +10 -4
- package/app/codeCharta/ui/codeMap/__snapshots__/codeMap.arrow.service.spec.ts.snap +16 -16
- package/app/codeCharta/ui/codeMap/__snapshots__/codeMap.render.service.spec.ts.snap +19 -19
- package/app/codeCharta/ui/codeMap/codeMap.arrow.service.spec.ts +5 -4
- package/app/codeCharta/ui/codeMap/codeMap.arrow.service.ts +34 -29
- package/app/codeCharta/ui/codeMap/codeMap.component.ts +9 -8
- package/app/codeCharta/ui/codeMap/codeMap.label.service.ts +5 -5
- package/app/codeCharta/ui/codeMap/codeMap.mouseEvent.service.spec.ts +14 -1
- package/app/codeCharta/ui/codeMap/codeMap.mouseEvent.service.ts +30 -25
- package/app/codeCharta/ui/codeMap/codeMap.render.service.spec.ts +8 -6
- package/app/codeCharta/ui/codeMap/codeMap.render.service.ts +18 -13
- package/app/codeCharta/ui/codeMap/threeViewer/threeOrbitControls.service.spec.ts +3 -3
- package/app/codeCharta/ui/codeMap/threeViewer/threeOrbitControls.service.ts +9 -9
- package/app/codeCharta/ui/codeMap/threeViewer/threeRenderer.service.ts +3 -3
- package/app/codeCharta/ui/codeMap/threeViewer/threeSceneService.ts +16 -19
- package/app/codeCharta/ui/codeMap/threeViewer/threeStats.service.spec.ts +27 -32
- package/app/codeCharta/ui/codeMap/threeViewer/threeStats.service.ts +3 -4
- package/app/codeCharta/ui/codeMap/threeViewer/threeViewer.service.spec.ts +2 -2
- package/app/codeCharta/ui/codeMap/threeViewer/threeViewer.service.ts +6 -6
- package/app/codeCharta/ui/colorPicker/colorPicker.component.spec.ts +5 -2
- package/app/codeCharta/ui/colorPicker/colorPicker.component.ts +3 -2
- package/app/codeCharta/ui/colorPickerForMapColor/colorPickerForMapColor.component.ts +5 -4
- package/app/codeCharta/ui/copyToClipboardButton/copyToClipboard.service.ts +2 -2
- package/app/codeCharta/ui/copyToClipboardButton/copyToClipboardButton.component.ts +4 -3
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigButton.component.spec.ts +17 -10
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigButton.component.ts +4 -3
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigButton.module.ts +3 -3
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigDialog/addCustomConfigDialog.component.html +14 -2
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigDialog/addCustomConfigDialog.component.ts +23 -13
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigDialog/addCustomConfigDialog.spec.ts +23 -9
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigDialog/addCustomDialog.component.scss +7 -6
- package/app/codeCharta/ui/customConfigs/addCustomConfigButton/addCustomConfigDialog/downloadAndPurgeConfigs/downloadAndPurgeConfigs.component.ts +5 -4
- package/app/codeCharta/ui/customConfigs/customConfigHelper.service.ts +2 -2
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfig2ApplicableColor.pipe.ts +2 -2
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfig2ApplicableMessage.pipe.ts +2 -2
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigDescription/applyCustomConfigButton.component.html +15 -12
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigDescription/applyCustomConfigButton.component.scss +12 -8
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigDescription/applyCustomConfigButton.component.ts +7 -6
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigDescription/applyCustomConfigButton.spec.ts +0 -6
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigItemGroup.component.html +21 -4
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigItemGroup.component.scss +38 -0
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigItemGroup.component.spec.ts +32 -7
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigItemGroup.component.ts +17 -2
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigList.component.html +8 -8
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigList.component.scss +27 -31
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigList.component.spec.ts +6 -3
- package/app/codeCharta/ui/customConfigs/customConfigList/customConfigList.component.ts +5 -4
- package/app/codeCharta/ui/customConfigs/customConfigList/getCustomConfigItemGroups.spec.ts +5 -1
- package/app/codeCharta/ui/customConfigs/customConfigList/getCustomConfigItemGroups.ts +2 -1
- package/app/codeCharta/ui/customConfigs/customConfigNoteDialogButton/customConfigNoteDialog/customConfigNoteDialog.component.html +12 -0
- package/app/codeCharta/ui/customConfigs/customConfigNoteDialogButton/customConfigNoteDialog/customConfigNoteDialog.component.scss +31 -0
- package/app/codeCharta/ui/customConfigs/customConfigNoteDialogButton/customConfigNoteDialog/customConfigNoteDialog.component.ts +12 -0
- package/app/codeCharta/ui/customConfigs/customConfigNoteDialogButton/customConfigNoteDialogButton.component.html +3 -0
- package/app/codeCharta/ui/customConfigs/customConfigNoteDialogButton/customConfigNoteDialogButton.component.spec.ts +90 -0
- package/app/codeCharta/ui/customConfigs/customConfigNoteDialogButton/customConfigNoteDialogButton.component.ts +33 -0
- package/app/codeCharta/ui/customConfigs/customConfigNoteDialogButton/customConfigNoteDialogButton.module.ts +14 -0
- package/app/codeCharta/ui/customConfigs/customConfigs.component.spec.ts +5 -4
- package/app/codeCharta/ui/customConfigs/customConfigs.component.ts +6 -4
- package/app/codeCharta/ui/customConfigs/customConfigs.module.ts +14 -3
- package/app/codeCharta/ui/customConfigs/downloadCustomConfigsButton/downloadCustomConfigsButton.component.ts +4 -3
- package/app/codeCharta/ui/customConfigs/uploadCustomConfigButton/uploadCustomConfigButton.component.ts +3 -2
- package/app/codeCharta/ui/customConfigs/uploadCustomConfigButton/uploadCustomConfigButton.module.ts +1 -2
- package/app/codeCharta/ui/dialogs/changelogDialog/changelogDialog.component.html +6 -6
- package/app/codeCharta/ui/dialogs/changelogDialog/changelogDialog.component.scss +6 -14
- package/app/codeCharta/ui/dialogs/changelogDialog/changelogDialog.component.ts +4 -3
- package/app/codeCharta/ui/dialogs/changelogDialog/changelogDialog.module.ts +1 -2
- package/app/codeCharta/ui/dialogs/confirmationDialog/confirmationDialog.component.scss +3 -3
- package/app/codeCharta/ui/dialogs/confirmationDialog/confirmationDialog.component.ts +4 -3
- package/app/codeCharta/ui/dialogs/errorDialog/errorDialog.component.po.ts +4 -9
- package/app/codeCharta/ui/dialogs/errorDialog/errorDialog.component.ts +3 -2
- package/app/codeCharta/ui/export3DMapButton/export3DMapButton.component.ts +4 -3
- package/app/codeCharta/ui/fileExtensionBar/distributionMetricChooser/distributionMetricChooser.component.ts +4 -3
- package/app/codeCharta/ui/fileExtensionBar/fileExtensionBar.component.scss +5 -6
- package/app/codeCharta/ui/fileExtensionBar/fileExtensionBar.component.ts +5 -4
- package/app/codeCharta/ui/fileExtensionBar/fileExtensionBar.module.ts +1 -2
- package/app/codeCharta/ui/fileExtensionBar/selectors/fileExtensionCalculator.spec.ts +18 -18
- package/app/codeCharta/ui/fileExtensionBar/selectors/fileExtensionCalculator.ts +1 -1
- package/app/codeCharta/ui/filePanel/filePanel.component.html +1 -1
- package/app/codeCharta/ui/filePanel/filePanel.component.scss +7 -27
- package/app/codeCharta/ui/filePanel/filePanel.component.ts +5 -4
- package/app/codeCharta/ui/filePanel/filePanel.module.ts +2 -2
- package/app/codeCharta/ui/filePanel/filePanel.po.ts +6 -4
- package/app/codeCharta/ui/filePanel/filePanelDeltaSelector/filePanelDeltaSelector.component.html +26 -24
- package/app/codeCharta/ui/filePanel/filePanelDeltaSelector/filePanelDeltaSelector.component.scss +6 -0
- package/app/codeCharta/ui/filePanel/filePanelDeltaSelector/filePanelDeltaSelector.component.ts +5 -3
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.html +1 -0
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.scss +2 -9
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.spec.ts +1 -1
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.ts +5 -4
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/removeFileButton/removeFileButton.component.scss +1 -1
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/removeFileButton/removeFileButton.component.ts +5 -4
- package/app/codeCharta/ui/filePanel/filePanelStateButtons/filePanelStateButtons.component.html +1 -1
- package/app/codeCharta/ui/filePanel/filePanelStateButtons/filePanelStateButtons.component.ts +4 -6
- package/app/codeCharta/ui/filePanel/fileSelectionMode.service.ts +2 -2
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.html +1 -1
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.scss +12 -8
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.spec.ts +2 -2
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.ts +4 -3
- package/app/codeCharta/ui/legendPanel/legendBlock/legendBlock.component.html +8 -8
- package/app/codeCharta/ui/legendPanel/legendBlock/legendBlock.component.ts +5 -4
- package/app/codeCharta/ui/legendPanel/legendMarkedPackages/legendMarkedPackages.component.ts +5 -4
- package/app/codeCharta/ui/legendPanel/legendPanel.component.html +11 -5
- package/app/codeCharta/ui/legendPanel/legendPanel.component.ts +5 -7
- package/app/codeCharta/ui/legendPanel/selectors/legendAreaMetric.selector.ts +4 -4
- package/app/codeCharta/ui/legendPanel/selectors/legendColorMetric.selector.ts +4 -4
- package/app/codeCharta/ui/legendPanel/selectors/legendEdgeMetric.selector.spec.ts +10 -4
- package/app/codeCharta/ui/legendPanel/selectors/legendEdgeMetric.selector.ts +7 -7
- package/app/codeCharta/ui/legendPanel/selectors/legendHeightMetric.selector.ts +4 -4
- package/app/codeCharta/ui/loadingFileProgressSpinner/loadingFileProgressSpinner.component.scss +1 -1
- package/app/codeCharta/ui/loadingFileProgressSpinner/loadingFileProgressSpinner.component.ts +5 -4
- package/app/codeCharta/ui/metricChooser/metricChooser.component.html +1 -2
- package/app/codeCharta/ui/metricChooser/metricChooser.component.scss +22 -13
- package/app/codeCharta/ui/metricChooser/metricChooser.component.spec.ts +9 -7
- package/app/codeCharta/ui/metricChooser/metricChooser.component.ts +11 -10
- package/app/codeCharta/ui/metricChooser/metricChooser.module.ts +1 -2
- package/app/codeCharta/ui/metricChooser/metricChooserTypeHovered/metricChooserTypeHovered.component.ts +4 -3
- package/app/codeCharta/ui/metricChooser/metricChooserValueHovered/metricChooserValueHovered.component.ts +4 -3
- package/app/codeCharta/ui/resetSettingsButton/resetSettingsButton.component.scss +21 -3
- package/app/codeCharta/ui/resetSettingsButton/resetSettingsButton.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/areaMetricChooser/areaMetricChooser.component.spec.ts +9 -6
- package/app/codeCharta/ui/ribbonBar/areaMetricChooser/areaMetricChooser.component.ts +4 -3
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/areaSettingsPanel.component.html +13 -23
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/areaSettingsPanel.component.scss +12 -3
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/areaSettingsPanel.component.spec.ts +31 -17
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/areaSettingsPanel.component.ts +14 -14
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/areaSettingsPanel.module.ts +1 -2
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/artificialIntelligence.component.scss +2 -3
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/artificialIntelligence.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/highRiskProfile/highRiskProfile.component.html +12 -3
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/highRiskProfile/highRiskProfile.component.spec.ts +10 -2
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/highRiskProfile/highRiskProfile.component.ts +3 -2
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/highRiskProfile/riskProfileBar.directive.ts +2 -2
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/selectors/artificialIntelligence.selector.spec.ts +6 -16
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/selectors/artificialIntelligence.selector.ts +7 -11
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/suspiciousMetrics/suspiciousMetrics.component.html +11 -1
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/suspiciousMetrics/suspiciousMetrics.component.spec.ts +4 -4
- package/app/codeCharta/ui/ribbonBar/artificialIntelligence/suspiciousMetrics/suspiciousMetrics.component.ts +6 -5
- package/app/codeCharta/ui/ribbonBar/colorMetricChooser/colorMetricChooser.component.spec.ts +9 -6
- package/app/codeCharta/ui/ribbonBar/colorMetricChooser/colorMetricChooser.component.ts +4 -3
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/colorSettingsPanel.component.html +11 -10
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/colorSettingsPanel.component.scss +17 -12
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/colorSettingsPanel.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/metricColorRangeSlider/metricColorRangeSlider.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/metricColorRangeSlider/rangeSlider/rangeSlider.component.html +2 -2
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/metricColorRangeSlider/rangeSlider/rangeSlider.component.scss +21 -6
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/metricColorRangeSlider/rangeSlider/rangeSlider.component.ts +6 -5
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/metricColorRangeSlider/rangeSlider/rangeSliderLabels/rangeSliderLabels.component.spec.ts +2 -2
- package/app/codeCharta/ui/ribbonBar/colorSettingsPanel/metricColorRangeSlider/rangeSlider/rangeSliderLabels/rangeSliderLabels.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/edgeMetricChooser/edgeMetricChooser.component.scss +1 -1
- package/app/codeCharta/ui/ribbonBar/edgeMetricChooser/edgeMetricChooser.component.spec.ts +8 -6
- package/app/codeCharta/ui/ribbonBar/edgeMetricChooser/edgeMetricChooser.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/edgeSettingsPanel/edgeMetricToggle/edgeMetricToggle.component.ts +4 -4
- package/app/codeCharta/ui/ribbonBar/edgeSettingsPanel/edgeSettingsPanel.component.html +14 -15
- package/app/codeCharta/ui/ribbonBar/edgeSettingsPanel/edgeSettingsPanel.component.spec.ts +1 -1
- package/app/codeCharta/ui/ribbonBar/edgeSettingsPanel/edgeSettingsPanel.component.ts +4 -3
- package/app/codeCharta/ui/ribbonBar/edgeSettingsPanel/selectors/amountOfBuildingsWithSelectedEdgeMetric.selector.ts +3 -3
- package/app/codeCharta/ui/ribbonBar/heightMetricChooser/areaMetricChooser.component.ts +4 -3
- package/app/codeCharta/ui/ribbonBar/heightMetricChooser/heightMetricChooser.component.spec.ts +9 -6
- package/app/codeCharta/ui/ribbonBar/heightSettingsPanel/heightSettingsPanel.component.html +15 -19
- package/app/codeCharta/ui/ribbonBar/heightSettingsPanel/heightSettingsPanel.component.spec.ts +3 -2
- package/app/codeCharta/ui/ribbonBar/heightSettingsPanel/heightSettingsPanel.component.ts +5 -6
- package/app/codeCharta/ui/ribbonBar/linkColorMetricToHeightMetricButton/linkColorMetricToHeightMetricButton.component.html +1 -1
- package/app/codeCharta/ui/ribbonBar/linkColorMetricToHeightMetricButton/linkColorMetricToHeightMetricButton.component.scss +2 -0
- package/app/codeCharta/ui/ribbonBar/linkColorMetricToHeightMetricButton/linkColorMetricToHeightMetricButton.component.spec.ts +4 -4
- package/app/codeCharta/ui/ribbonBar/linkColorMetricToHeightMetricButton/linkColorMetricToHeightMetricButton.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/ribbonBar.component.html +21 -8
- package/app/codeCharta/ui/ribbonBar/ribbonBar.component.scss +18 -8
- package/app/codeCharta/ui/ribbonBar/ribbonBar.component.spec.ts +22 -23
- package/app/codeCharta/ui/ribbonBar/ribbonBar.component.ts +7 -6
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/addCustomScenario/addCustomScenario.component.html +1 -1
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/addCustomScenario/addCustomScenario.component.scss +9 -7
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/addCustomScenario/addCustomScenario.component.spec.ts +10 -3
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/addCustomScenario/addCustomScenario.component.ts +7 -10
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/addCustomScenario/addCustomScenario.module.ts +1 -2
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/scenario.service.ts +6 -6
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/scenarios/scenarios.component.scss +2 -2
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/scenarios/scenarios.component.ts +5 -4
- package/app/codeCharta/ui/ribbonBar/showScenariosButton/showScenariosButton.component.ts +5 -4
- package/app/codeCharta/ui/screenshotButton/screenshotButton.component.ts +8 -7
- package/app/codeCharta/ui/searchPanel/blacklistPanel/blacklistPanel.component.scss +2 -2
- package/app/codeCharta/ui/searchPanel/blacklistPanel/blacklistPanel.component.ts +5 -4
- package/app/codeCharta/ui/searchPanel/mapTreeView/mapTreeView.component.scss +14 -11
- package/app/codeCharta/ui/searchPanel/mapTreeView/mapTreeView.component.ts +5 -5
- package/app/codeCharta/ui/searchPanel/mapTreeView/mapTreeViewItemIcon/mapTreeViewItemIcon.component.ts +3 -2
- package/app/codeCharta/ui/searchPanel/mapTreeView/mapTreeViewItemName/mapTreeViewItemName.component.ts +4 -3
- package/app/codeCharta/ui/searchPanel/mapTreeView/mapTreeViewItemOptionButtons/mapTreeViewItemOptionButtons.component.html +2 -2
- package/app/codeCharta/ui/searchPanel/mapTreeView/mapTreeViewItemOptionButtons/mapTreeViewItemOptionButtons.component.ts +3 -2
- package/app/codeCharta/ui/searchPanel/mapTreeView/mapTreeViewLevel/mapTreeViewLevel.component.ts +4 -3
- package/app/codeCharta/ui/searchPanel/matchingFilesCounter/matchingFilesCounter.component.html +1 -1
- package/app/codeCharta/ui/searchPanel/matchingFilesCounter/matchingFilesCounter.component.scss +2 -2
- package/app/codeCharta/ui/searchPanel/matchingFilesCounter/matchingFilesCounter.component.ts +5 -4
- package/app/codeCharta/ui/searchPanel/searchBar/blacklistSearchPattern.effect.ts +1 -2
- package/app/codeCharta/ui/searchPanel/searchBar/searchBar.component.scss +0 -3
- package/app/codeCharta/ui/searchPanel/searchBar/searchBar.component.spec.ts +1 -1
- package/app/codeCharta/ui/searchPanel/searchBar/searchBar.component.ts +7 -6
- package/app/codeCharta/ui/searchPanel/searchPanel.component.html +1 -1
- package/app/codeCharta/ui/searchPanel/searchPanel.component.scss +0 -4
- package/app/codeCharta/ui/searchPanel/searchPanel.component.ts +4 -3
- package/app/codeCharta/ui/searchPanel/searchPanelModeSelector/searchPanelModeSelector.component.html +6 -20
- package/app/codeCharta/ui/searchPanel/searchPanelModeSelector/searchPanelModeSelector.component.scss +4 -6
- package/app/codeCharta/ui/searchPanel/searchPanelModeSelector/searchPanelModeSelector.component.ts +5 -4
- package/app/codeCharta/ui/searchPanel/sortingButton/sortingButton.component.ts +4 -3
- package/app/codeCharta/ui/searchPanel/sortingOption/sortingOption.component.spec.ts +1 -1
- package/app/codeCharta/ui/searchPanel/sortingOption/sortingOption.component.ts +4 -3
- package/app/codeCharta/ui/slider/slider.component.html +17 -21
- package/app/codeCharta/ui/slider/slider.component.scss +36 -19
- package/app/codeCharta/ui/slider/slider.component.spec.ts +38 -38
- package/app/codeCharta/ui/slider/slider.component.ts +8 -9
- package/app/codeCharta/ui/slider/slider.module.ts +1 -2
- package/app/codeCharta/ui/toolBar/downloadButton/downloadButton.component.spec.ts +2 -1
- package/app/codeCharta/ui/toolBar/downloadButton/downloadButton.component.ts +4 -3
- package/app/codeCharta/ui/toolBar/downloadButton/downloadButton.module.ts +1 -2
- package/app/codeCharta/ui/toolBar/downloadButton/downloadDialog/downloadDialog.component.html +1 -1
- package/app/codeCharta/ui/toolBar/downloadButton/downloadDialog/downloadDialog.component.scss +4 -5
- package/app/codeCharta/ui/toolBar/downloadButton/downloadDialog/downloadDialog.component.ts +5 -4
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationButton.component.html +1 -1
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationButton.component.scss +28 -34
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationButton.component.ts +5 -4
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationButton.module.ts +1 -2
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationDialog/displayQualitySelection/displayQualitySelection.component.html +1 -1
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationDialog/displayQualitySelection/displayQualitySelection.component.ts +4 -3
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationDialog/globalConfigurationDialog.component.html +26 -23
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationDialog/globalConfigurationDialog.component.ts +4 -3
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationDialog/mapLayoutSelection/mapLayoutSelection.component.html +1 -1
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationDialog/mapLayoutSelection/mapLayoutSelection.component.spec.ts +27 -24
- package/app/codeCharta/ui/toolBar/globalConfigurationButton/globalConfigurationDialog/mapLayoutSelection/mapLayoutSelection.component.ts +5 -4
- package/app/codeCharta/ui/toolBar/hoveredNodePathPanel/hoveredNodePathPanel.component.ts +5 -4
- package/app/codeCharta/ui/toolBar/loadingMapProgressSpinner/loadingMapProgressSpinner.component.ts +5 -4
- package/app/codeCharta/ui/toolBar/presentationModeButton/presentationModeButton.component.html +8 -11
- package/app/codeCharta/ui/toolBar/presentationModeButton/presentationModeButton.component.scss +4 -3
- package/app/codeCharta/ui/toolBar/presentationModeButton/presentationModeButton.component.spec.ts +2 -2
- package/app/codeCharta/ui/toolBar/presentationModeButton/presentationModeButton.component.ts +5 -4
- package/app/codeCharta/ui/toolBar/toolBar.component.scss +2 -4
- package/app/codeCharta/ui/toolBar/toolBar.component.ts +5 -5
- package/app/codeCharta/ui/toolBar/toolBar.module.ts +1 -2
- package/app/codeCharta/ui/toolBar/uploadFilesButton/uploadFiles.service.ts +2 -2
- package/app/codeCharta/ui/toolBar/uploadFilesButton/uploadFilesButton.component.ts +5 -4
- package/app/codeCharta/ui/viewCube/centerMapButton/centerMapButton.component.ts +5 -4
- package/app/codeCharta/ui/viewCube/viewCube.component.spec.ts +2 -2
- package/app/codeCharta/ui/viewCube/viewCube.component.ts +6 -5
- package/app/codeCharta/ui/viewCube/viewCube.mouseEvents.service.spec.ts +3 -2
- package/app/codeCharta/ui/viewCube/viewCube.mouseEvents.service.ts +6 -6
- package/app/codeCharta/util/EventEmitter.ts +22 -0
- package/app/codeCharta/util/__snapshots__/aggregationGenerator.spec.ts.snap +116 -116
- package/app/codeCharta/util/__snapshots__/deltaGenerator.spec.ts.snap +82 -82
- package/app/codeCharta/util/__snapshots__/fileHelper.spec.ts.snap +23 -23
- package/app/codeCharta/util/aggregationGenerator.spec.ts +33 -27
- package/app/codeCharta/util/aggregationGenerator.ts +4 -1
- package/app/codeCharta/util/algorithm/treeMapLayout/__snapshots__/treeMapGenerator.spec.ts.snap +137 -137
- package/app/codeCharta/util/algorithm/treeMapLayout/__snapshots__/treeMapHelper.spec.ts.snap +9 -9
- package/app/codeCharta/util/customConfigBuilder.spec.ts +11 -4
- package/app/codeCharta/util/customConfigBuilder.ts +9 -3
- package/app/codeCharta/util/customConfigHelper.ts +8 -8
- package/app/codeCharta/util/dataMocks.ts +29 -5
- package/app/codeCharta/util/debounce.spec.ts +16 -0
- package/app/codeCharta/util/debounce.ts +10 -0
- package/app/codeCharta/util/fileDownloader.ts +1 -1
- package/app/codeCharta/util/gameObjectsParser/__snapshots__/gameObjectsImporter.spec.ts.snap +37 -37
- package/app/codeCharta/util/nodeDecorator.spec.ts +14 -1
- package/app/codeCharta/util/nodeDecorator.ts +12 -12
- package/app/codeCharta/util/parseNumberInput.ts +1 -1
- package/app/codeCharta/util/reduxHelper.ts +3 -3
- package/app/codeCharta/util/simplePipes/SimplePipesModule.ts +9 -0
- package/app/codeCharta/util/simplePipes/metricDescriptorTitle.pipe.spec.ts +62 -0
- package/app/codeCharta/util/simplePipes/metricDescriptorTitle.pipe.ts +18 -0
- package/app/codeCharta/util/{removeExtension.pipe.ts → simplePipes/removeExtension.pipe.ts} +1 -1
- package/app/codeCharta/util/truncateText.pipe.ts +8 -0
- package/app/codeCharta/util/truncateText.spec.ts +19 -0
- package/app/index.html +1 -0
- package/app/material/_theme.scss +28 -17
- package/app/material/matDialog.scss +1 -1
- package/app/material/matMenu.scss +2 -2
- package/app/material/material.module.ts +5 -3
- package/app/material/material.scss +1 -6
- package/app/polyfills.ts +28 -0
- package/conf/jestE2E.config.json +1 -3
- package/conf/jestUnit.config.json +5 -17
- package/conf/webpack.config.js +19 -56
- package/dist/webpack/3rdpartylicenses.txt +1063 -0
- package/dist/webpack/codeCharta/assets/codecharta_logo.svg +1 -0
- package/dist/webpack/codeCharta/assets/empty.png +0 -0
- package/dist/webpack/codeCharta/assets/favicon.ico +0 -0
- package/dist/webpack/codeCharta/assets/gameObjectsFile.json +75 -0
- package/dist/webpack/codeCharta/assets/icon.icns +0 -0
- package/dist/webpack/codeCharta/assets/icon.ico +0 -0
- package/dist/webpack/codeCharta/assets/icon.png +0 -0
- package/dist/webpack/codeCharta/assets/output.cc.json.gz +0 -0
- package/dist/webpack/codeCharta/assets/sample1.cc.json +97 -0
- package/dist/webpack/codeCharta/assets/sample2.cc.json +46 -0
- package/dist/webpack/codeCharta/assets/sample3.cc.json +40 -0
- package/dist/webpack/codeCharta/assets/sample4.cc.json +45 -0
- package/dist/webpack/codeCharta/assets/scenarios.json +50 -0
- package/dist/webpack/index.html +7 -7
- package/dist/webpack/main.bc36f7880e897bab.js +1 -0
- package/dist/webpack/material-icons-outlined.78a93b2079680a08.woff +0 -0
- package/dist/webpack/material-icons-outlined.f86cb7b0aa53f0fe.woff2 +0 -0
- package/dist/webpack/material-icons-round.92dc7ca2f4c591e7.woff +0 -0
- package/dist/webpack/material-icons-round.b10ec9db5b7fbc74.woff2 +0 -0
- package/dist/webpack/material-icons-sharp.3885863ee4746422.woff2 +0 -0
- package/dist/webpack/material-icons-sharp.a71cb2bf66c604de.woff +0 -0
- package/dist/webpack/material-icons-two-tone.588d63134de807a7.woff +0 -0
- package/dist/webpack/material-icons-two-tone.675bd578bd14533e.woff2 +0 -0
- package/dist/webpack/material-icons.4ad034d2c499d9b6.woff +0 -0
- package/dist/webpack/material-icons.59322316b3fd6063.woff2 +0 -0
- package/dist/webpack/polyfills.d69fe4da6218c8a9.js +1 -0
- package/dist/webpack/runtime.e384ce5b1b4e5942.js +1 -0
- package/dist/webpack/styles.796849f6e33c93f5.css +4 -0
- package/package.json +33 -51
- package/tsconfig.json +25 -22
- package/app/codeCharta/state/effects/resetDynamicMargin/resetDynamicMargin.effect.spec.ts +0 -48
- package/app/codeCharta/state/effects/resetDynamicMargin/resetDynamicMargin.effect.ts +0 -19
- package/app/codeCharta/state/selectors/accumulatedData/metricData/edgeMetricData.selector.spec.ts +0 -56
- package/app/codeCharta/state/store/appSettings/dynamicMargin/dynamicMargin.actions.ts +0 -21
- package/app/codeCharta/state/store/appSettings/dynamicMargin/dynamicMargin.reducer.spec.ts +0 -17
- package/app/codeCharta/state/store/appSettings/dynamicMargin/dynamicMargin.reducer.ts +0 -16
- package/app/codeCharta/state/store/appSettings/dynamicMargin/dynamicMargin.selector.ts +0 -4
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/areaSettingsPanel.po.ts +0 -22
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/invertAreaOption/invertAreaOption.component.html +0 -1
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/invertAreaOption/invertAreaOption.component.spec.ts +0 -29
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel/invertAreaOption/invertAreaOption.component.ts +0 -23
- package/app/codeCharta/ui/ribbonBar/areaSettingsPanel.po.ts +0 -19
- package/app/codeCharta/ui/ribbonBar/edgeSettingsPanel/edgeMetricToggle/edgeMetricToggle.component.scss +0 -4
- package/app/codeCharta/ui/ribbonBar/heightSettingsPanel/heightSettingsPanel.component.scss +0 -18
- package/app/codeCharta/util/envDetector.ts +0 -3
- package/app/codeCharta/util/removeExtensionModule.ts +0 -8
- package/app/codeCharta/util/testUtils/drag.ts +0 -47
- package/app/material/matSelect.scss +0 -17
- package/conf/webpack.loaders.js +0 -54
- package/dist/webpack/04411cba9583fb0df01f.woff +0 -0
- package/dist/webpack/6289913a298e816100f5.woff +0 -0
- package/dist/webpack/6b3adb7ef9c9ac8d598a.woff +0 -0
- package/dist/webpack/6c307c85ae675678f41e.woff2 +0 -0
- package/dist/webpack/a70ec3e73fd410cdb178.woff2 +0 -0
- package/dist/webpack/aa2aae2fbd0e0b30967d.woff +0 -0
- package/dist/webpack/aa80805e686668b4358c.woff2 +0 -0
- package/dist/webpack/b906db2201d314b2ee12.woff2 +0 -0
- package/dist/webpack/bundle.js +0 -3
- package/dist/webpack/bundle.js.LICENSE.txt +0 -7619
- package/dist/webpack/bundle.js.map +0 -1
- package/dist/webpack/c6c0935815f6ba8fd80a.woff2 +0 -0
- package/dist/webpack/cb25b0543db8b7f06135.woff +0 -0
- /package/app/{assets/icon.ico → codeCharta/assets/favicon.ico} +0 -0
- /package/app/{assets → codeCharta/assets}/flatten.png +0 -0
- /package/app/{assets → codeCharta/assets}/icon.icns +0 -0
- /package/{dist/webpack → app/codeCharta/assets}/icon.ico +0 -0
- /package/app/{assets → codeCharta/assets}/icon.png +0 -0
- /package/app/codeCharta/state/store/fileSettings/attributeDescriptors/{attributesDescriptors.selector.ts → attributeDescriptors.selector.ts} +0 -0
- /package/app/codeCharta/util/{removeExtension.pipe.spec.ts → simplePipes/removeExtension.pipe.spec.ts} +0 -0
- /package/dist/webpack/{af36b2ef7e54a0b53f02.png → codeCharta/assets/flatten.png} +0 -0
- /package/dist/webpack/{6bfc95354e1616904298.png → codeCharta/assets/logo.png} +0 -0
- /package/dist/webpack/{8b43027f47b20503057d.eot → fontawesome-webfont.2b13baa7dd4f54c9.eot} +0 -0
- /package/dist/webpack/{1e59d2330b4c6deb84b3.ttf → fontawesome-webfont.8a7cb27d142e3e19.ttf} +0 -0
- /package/dist/webpack/{f691f37e57f04c152e23.woff → fontawesome-webfont.cf011583fb81df9f.woff} +0 -0
- /package/dist/webpack/{c1e38fd9e0e74ba58f7a.svg → fontawesome-webfont.da909aa098b0ee2d.svg} +0 -0
- /package/dist/webpack/{20fd1704ea223900efa9.woff2 → fontawesome-webfont.e9955780856cf8aa.woff2} +0 -0
package/app/codeCharta/util/algorithm/treeMapLayout/__snapshots__/treeMapHelper.spec.ts.snap
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`TreeMapHelper build node deltas 1`] = `
|
|
4
|
-
|
|
5
|
-
"attributes":
|
|
4
|
+
{
|
|
5
|
+
"attributes": {
|
|
6
6
|
"theHeight": 100,
|
|
7
7
|
},
|
|
8
8
|
"color": "#666666",
|
|
9
|
-
"deltas":
|
|
9
|
+
"deltas": {
|
|
10
10
|
"theHeight": 33,
|
|
11
11
|
},
|
|
12
12
|
"depth": 1,
|
|
@@ -41,8 +41,8 @@ Object {
|
|
|
41
41
|
`;
|
|
42
42
|
|
|
43
43
|
exports[`TreeMapHelper build node invertHeight 1`] = `
|
|
44
|
-
|
|
45
|
-
"attributes":
|
|
44
|
+
{
|
|
45
|
+
"attributes": {
|
|
46
46
|
"theHeight": 100,
|
|
47
47
|
},
|
|
48
48
|
"color": "#666666",
|
|
@@ -79,8 +79,8 @@ Object {
|
|
|
79
79
|
`;
|
|
80
80
|
|
|
81
81
|
exports[`TreeMapHelper build node minimal 1`] = `
|
|
82
|
-
|
|
83
|
-
"attributes":
|
|
82
|
+
{
|
|
83
|
+
"attributes": {
|
|
84
84
|
"theHeight": 100,
|
|
85
85
|
},
|
|
86
86
|
"color": "#666666",
|
|
@@ -117,8 +117,8 @@ Object {
|
|
|
117
117
|
`;
|
|
118
118
|
|
|
119
119
|
exports[`TreeMapHelper build node should set lowest possible height caused by other visible edge pairs 1`] = `
|
|
120
|
-
|
|
121
|
-
"attributes":
|
|
120
|
+
{
|
|
121
|
+
"attributes": {
|
|
122
122
|
"theHeight": 100,
|
|
123
123
|
},
|
|
124
124
|
"color": "#666666",
|
|
@@ -20,10 +20,15 @@ describe("CustomConfigBuilder", () => {
|
|
|
20
20
|
it("should return a new CustomConfig instance", () => {
|
|
21
21
|
const state: State = { ...DEFAULT_STATE, appSettings: { experimentalFeaturesEnabled: true } as AppSettings }
|
|
22
22
|
|
|
23
|
-
const customConfig = buildCustomConfigFromState(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
const customConfig = buildCustomConfigFromState(
|
|
24
|
+
"testCustomConfig",
|
|
25
|
+
state,
|
|
26
|
+
{
|
|
27
|
+
camera: new Vector3(1, 2, 3),
|
|
28
|
+
cameraTarget: new Vector3(4, 5, 6)
|
|
29
|
+
},
|
|
30
|
+
"My Custom Note"
|
|
31
|
+
)
|
|
27
32
|
|
|
28
33
|
expect(customConfig.name).toBe("testCustomConfig")
|
|
29
34
|
expect(customConfig.mapSelectionMode).toBe(CustomConfigMapSelectionMode.MULTIPLE)
|
|
@@ -49,6 +54,8 @@ describe("CustomConfigBuilder", () => {
|
|
|
49
54
|
expect(customConfig.camera.cameraTarget.x).toBe(4)
|
|
50
55
|
expect(customConfig.camera.cameraTarget.y).toBe(5)
|
|
51
56
|
expect(customConfig.camera.cameraTarget.z).toBe(6)
|
|
57
|
+
|
|
58
|
+
expect(customConfig.note).toBe("My Custom Note")
|
|
52
59
|
})
|
|
53
60
|
})
|
|
54
61
|
})
|
|
@@ -5,12 +5,18 @@ import { visibleFilesBySelectionModeSelector } from "../ui/customConfigs/visible
|
|
|
5
5
|
|
|
6
6
|
const CUSTOM_CONFIG_API_VERSION = "1.0.0"
|
|
7
7
|
|
|
8
|
-
export function buildCustomConfigFromState(
|
|
8
|
+
export function buildCustomConfigFromState(
|
|
9
|
+
configName: string,
|
|
10
|
+
state: State,
|
|
11
|
+
camera: CustomConfig["camera"],
|
|
12
|
+
note: string | undefined
|
|
13
|
+
): CustomConfig {
|
|
9
14
|
const { mapSelectionMode, assignedMaps } = visibleFilesBySelectionModeSelector(state)
|
|
10
15
|
|
|
11
16
|
const customConfig: CustomConfig = {
|
|
12
17
|
id: "",
|
|
13
18
|
name: configName,
|
|
19
|
+
|
|
14
20
|
creationTime: Date.now(),
|
|
15
21
|
mapSelectionMode,
|
|
16
22
|
assignedMaps,
|
|
@@ -20,7 +26,8 @@ export function buildCustomConfigFromState(configName: string, state: State, cam
|
|
|
20
26
|
dynamicSettings: undefined,
|
|
21
27
|
fileSettings: undefined
|
|
22
28
|
},
|
|
23
|
-
camera
|
|
29
|
+
camera,
|
|
30
|
+
...(note && { note })
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
// Initialize all necessary state settings with default values right here
|
|
@@ -48,7 +55,6 @@ function initializeAppSettings(target: CustomConfig) {
|
|
|
48
55
|
},
|
|
49
56
|
amountOfEdgePreviews: 0,
|
|
50
57
|
amountOfTopLabels: 0,
|
|
51
|
-
dynamicMargin: false,
|
|
52
58
|
edgeHeight: 0,
|
|
53
59
|
hideFlatBuildings: false,
|
|
54
60
|
invertHeight: false,
|
|
@@ -65,16 +65,15 @@ export class CustomConfigHelper {
|
|
|
65
65
|
|
|
66
66
|
return ccLocalStorage
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for (const newCustomConfig of newCustomConfigs) {
|
|
71
|
-
CustomConfigHelper.customConfigs.set(newCustomConfig.id, newCustomConfig)
|
|
72
|
-
}
|
|
68
|
+
static addCustomConfig(newCustomConfig: CustomConfig) {
|
|
69
|
+
CustomConfigHelper.customConfigs.set(newCustomConfig.id, newCustomConfig)
|
|
73
70
|
CustomConfigHelper.setCustomConfigsToLocalStorage()
|
|
74
71
|
}
|
|
75
72
|
|
|
76
|
-
static
|
|
77
|
-
CustomConfigHelper.customConfigs.
|
|
73
|
+
static editCustomConfigNote(configId: string, configNote: string) {
|
|
74
|
+
const config = CustomConfigHelper.customConfigs.get(configId)
|
|
75
|
+
config.note = configNote
|
|
76
|
+
CustomConfigHelper.customConfigs.set(configId, config)
|
|
78
77
|
CustomConfigHelper.setCustomConfigsToLocalStorage()
|
|
79
78
|
}
|
|
80
79
|
|
|
@@ -139,7 +138,8 @@ export class CustomConfigHelper {
|
|
|
139
138
|
customConfigVersion: exportedConfig.customConfigVersion,
|
|
140
139
|
mapSelectionMode: exportedConfig.mapSelectionMode,
|
|
141
140
|
stateSettings: exportedConfig.stateSettings,
|
|
142
|
-
camera: exportedConfig.camera
|
|
141
|
+
camera: exportedConfig.camera,
|
|
142
|
+
...(exportedConfig.note && { note: exportedConfig.note })
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
CustomConfigHelper.addCustomConfig(importedCustomConfig)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttributeTypeValue,
|
|
3
|
+
AttributeDescriptors,
|
|
3
4
|
BlacklistItem,
|
|
4
5
|
BlacklistType,
|
|
5
6
|
CCFile,
|
|
@@ -32,7 +33,7 @@ import { isLeaf } from "./codeMapHelper"
|
|
|
32
33
|
import { CustomConfigItemGroup } from "../ui/customConfigs/customConfigs.component"
|
|
33
34
|
import { CustomConfigMapSelectionMode } from "../model/customConfig/customConfig.api.model"
|
|
34
35
|
import { ScenarioItem, ScenarioMetricProperty } from "../ui/ribbonBar/showScenariosButton/scenarioHelper"
|
|
35
|
-
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.
|
|
36
|
+
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.calculator"
|
|
36
37
|
|
|
37
38
|
const DEFAULT_FILE_META = {
|
|
38
39
|
projectName: "Sample Project",
|
|
@@ -100,7 +101,7 @@ export const TEST_ATTRIBUTE_TYPES = {
|
|
|
100
101
|
edges: { test: AttributeTypeValue.absolute }
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
export const TEST_ATTRIBUTE_DESCRIPTORS_HALF_FILLED = {
|
|
104
|
+
export const TEST_ATTRIBUTE_DESCRIPTORS_HALF_FILLED: AttributeDescriptors = {
|
|
104
105
|
mcc: {
|
|
105
106
|
title: "Maximum Cyclic Complexity",
|
|
106
107
|
description: "Maximum cyclic complexity",
|
|
@@ -117,6 +118,30 @@ export const TEST_ATTRIBUTE_DESCRIPTORS_HALF_FILLED = {
|
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
|
|
121
|
+
export const TEST_ATTRIBUTE_DESCRIPTORS: AttributeDescriptors = {
|
|
122
|
+
a: {
|
|
123
|
+
title: "a_testTitle",
|
|
124
|
+
description: "a_testDescription",
|
|
125
|
+
hintHighValue: "",
|
|
126
|
+
hintLowValue: "",
|
|
127
|
+
link: ""
|
|
128
|
+
},
|
|
129
|
+
b: {
|
|
130
|
+
title: "b_testTitle",
|
|
131
|
+
description: "",
|
|
132
|
+
hintHighValue: "",
|
|
133
|
+
hintLowValue: "",
|
|
134
|
+
link: ""
|
|
135
|
+
},
|
|
136
|
+
c: {
|
|
137
|
+
title: undefined,
|
|
138
|
+
description: "c_testDescription",
|
|
139
|
+
hintHighValue: undefined,
|
|
140
|
+
hintLowValue: undefined,
|
|
141
|
+
link: undefined
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
120
145
|
export const VALID_NODE: CodeMapNode = {
|
|
121
146
|
...DEFAULT_ROOT,
|
|
122
147
|
children: [
|
|
@@ -1607,7 +1632,6 @@ export const STATE: State = {
|
|
|
1607
1632
|
invertHeight: true,
|
|
1608
1633
|
invertArea: false,
|
|
1609
1634
|
isEdgeMetricVisible: true,
|
|
1610
|
-
dynamicMargin: true,
|
|
1611
1635
|
isWhiteBackground: false,
|
|
1612
1636
|
isColorMetricLinkedToHeightMetric: false,
|
|
1613
1637
|
enableFloorLabels: true,
|
|
@@ -1657,7 +1681,6 @@ export const DEFAULT_STATE: State = {
|
|
|
1657
1681
|
neutral: false
|
|
1658
1682
|
},
|
|
1659
1683
|
edgeHeight: 4,
|
|
1660
|
-
dynamicMargin: true,
|
|
1661
1684
|
hideFlatBuildings: false,
|
|
1662
1685
|
invertHeight: false,
|
|
1663
1686
|
invertArea: false,
|
|
@@ -1989,7 +2012,8 @@ export const CUSTOM_CONFIG_ITEM_GROUPS: Map<string, CustomConfigItemGroup> = new
|
|
|
1989
2012
|
negativeDelta: "#ff0E0E"
|
|
1990
2013
|
},
|
|
1991
2014
|
metrics: { areaMetric: "rloc", heightMetric: "mcc", colorMetric: "functions", edgeMetric: "avgCommits" },
|
|
1992
|
-
isApplicable: true
|
|
2015
|
+
isApplicable: true,
|
|
2016
|
+
note: "a note"
|
|
1993
2017
|
},
|
|
1994
2018
|
{
|
|
1995
2019
|
id: "File_B_File_C_STANDARD_Sample_Map View #2",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { debounce } from "./debounce"
|
|
2
|
+
import { wait } from "./testUtils/wait"
|
|
3
|
+
|
|
4
|
+
describe("debounce", () => {
|
|
5
|
+
it("should debounce given function", async () => {
|
|
6
|
+
const f = jest.fn()
|
|
7
|
+
const debouncedF = debounce(f, 1)
|
|
8
|
+
|
|
9
|
+
debouncedF()
|
|
10
|
+
debouncedF()
|
|
11
|
+
expect(f).not.toHaveBeenCalled()
|
|
12
|
+
|
|
13
|
+
await wait(1)
|
|
14
|
+
expect(f).toHaveBeenCalledTimes(1)
|
|
15
|
+
})
|
|
16
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function debounce<F extends (...arguments_: Parameters<F>) => ReturnType<F>>(this: unknown, function_: F, waitInMS = 0) {
|
|
2
|
+
let timer
|
|
3
|
+
return (...arguments_: Parameters<F>) => {
|
|
4
|
+
clearTimeout(timer)
|
|
5
|
+
timer = setTimeout(() => {
|
|
6
|
+
function_.apply(this, arguments_)
|
|
7
|
+
timer = null
|
|
8
|
+
}, waitInMS)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -13,7 +13,7 @@ import { LoadFileService } from "../services/loadFile/loadFile.service"
|
|
|
13
13
|
import { ExportCCFile } from "../codeCharta.api.model"
|
|
14
14
|
import { hierarchy } from "d3-hierarchy"
|
|
15
15
|
import { clone } from "./clone"
|
|
16
|
-
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.
|
|
16
|
+
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.calculator"
|
|
17
17
|
|
|
18
18
|
export type DownloadableSetting = "Nodes" | "AttributeTypes" | "AttributeDescriptors" | "Edges" | "Excludes" | "Flattens" | "MarkedPackages"
|
|
19
19
|
|
package/app/codeCharta/util/gameObjectsParser/__snapshots__/gameObjectsImporter.spec.ts.snap
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`GameObjectsImporter should parse gameObjects json to cc.json 1`] = `
|
|
4
|
-
|
|
4
|
+
{
|
|
5
5
|
"checksum": "64ba632559688f092d2adf0dee446d7e",
|
|
6
|
-
"data":
|
|
6
|
+
"data": {
|
|
7
7
|
"apiVersion": "1.3",
|
|
8
|
-
"attributeTypes":
|
|
9
|
-
"edges":
|
|
8
|
+
"attributeTypes": {
|
|
9
|
+
"edges": {
|
|
10
10
|
"coupling": "relative",
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
|
-
"edges":
|
|
14
|
-
|
|
15
|
-
"attributes":
|
|
13
|
+
"edges": [
|
|
14
|
+
{
|
|
15
|
+
"attributes": {
|
|
16
16
|
"coupling": 100,
|
|
17
17
|
},
|
|
18
18
|
"fromNodeName": "/base/root/CHANGELOG/CHANGELOG",
|
|
@@ -20,28 +20,28 @@ Object {
|
|
|
20
20
|
},
|
|
21
21
|
],
|
|
22
22
|
"fileChecksum": "",
|
|
23
|
-
"nodes":
|
|
24
|
-
|
|
25
|
-
"attributes":
|
|
26
|
-
"children":
|
|
27
|
-
|
|
28
|
-
"attributes":
|
|
29
|
-
"children":
|
|
30
|
-
|
|
31
|
-
"attributes":
|
|
32
|
-
"children":
|
|
33
|
-
|
|
34
|
-
"attributes":
|
|
35
|
-
"children":
|
|
36
|
-
|
|
37
|
-
"attributes":
|
|
23
|
+
"nodes": [
|
|
24
|
+
{
|
|
25
|
+
"attributes": {},
|
|
26
|
+
"children": [
|
|
27
|
+
{
|
|
28
|
+
"attributes": {},
|
|
29
|
+
"children": [
|
|
30
|
+
{
|
|
31
|
+
"attributes": {},
|
|
32
|
+
"children": [
|
|
33
|
+
{
|
|
34
|
+
"attributes": {},
|
|
35
|
+
"children": [
|
|
36
|
+
{
|
|
37
|
+
"attributes": {
|
|
38
38
|
"height": 1,
|
|
39
39
|
},
|
|
40
40
|
"name": "ui",
|
|
41
41
|
"type": "File",
|
|
42
42
|
},
|
|
43
43
|
],
|
|
44
|
-
"fixedPosition":
|
|
44
|
+
"fixedPosition": {
|
|
45
45
|
"height": 3.13,
|
|
46
46
|
"left": 2.27,
|
|
47
47
|
"top": 95.63,
|
|
@@ -50,18 +50,18 @@ Object {
|
|
|
50
50
|
"name": "ui",
|
|
51
51
|
"type": "Folder",
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
"attributes":
|
|
55
|
-
"children":
|
|
56
|
-
|
|
57
|
-
"attributes":
|
|
53
|
+
{
|
|
54
|
+
"attributes": {},
|
|
55
|
+
"children": [
|
|
56
|
+
{
|
|
57
|
+
"attributes": {
|
|
58
58
|
"height": 4,
|
|
59
59
|
},
|
|
60
60
|
"name": "packageLock",
|
|
61
61
|
"type": "File",
|
|
62
62
|
},
|
|
63
63
|
],
|
|
64
|
-
"fixedPosition":
|
|
64
|
+
"fixedPosition": {
|
|
65
65
|
"height": 1.25,
|
|
66
66
|
"left": 95.45,
|
|
67
67
|
"top": 48.13,
|
|
@@ -71,7 +71,7 @@ Object {
|
|
|
71
71
|
"type": "Folder",
|
|
72
72
|
},
|
|
73
73
|
],
|
|
74
|
-
"fixedPosition":
|
|
74
|
+
"fixedPosition": {
|
|
75
75
|
"height": 95.24,
|
|
76
76
|
"left": 0.72,
|
|
77
77
|
"top": 2.38,
|
|
@@ -80,18 +80,18 @@ Object {
|
|
|
80
80
|
"name": "visualization",
|
|
81
81
|
"type": "Folder",
|
|
82
82
|
},
|
|
83
|
-
|
|
84
|
-
"attributes":
|
|
85
|
-
"children":
|
|
86
|
-
|
|
87
|
-
"attributes":
|
|
83
|
+
{
|
|
84
|
+
"attributes": {},
|
|
85
|
+
"children": [
|
|
86
|
+
{
|
|
87
|
+
"attributes": {
|
|
88
88
|
"height": 1,
|
|
89
89
|
},
|
|
90
90
|
"name": "CHANGELOG",
|
|
91
91
|
"type": "File",
|
|
92
92
|
},
|
|
93
93
|
],
|
|
94
|
-
"fixedPosition":
|
|
94
|
+
"fixedPosition": {
|
|
95
95
|
"height": 2.98,
|
|
96
96
|
"left": 98.39,
|
|
97
97
|
"top": 48.51,
|
|
@@ -101,7 +101,7 @@ Object {
|
|
|
101
101
|
"type": "Folder",
|
|
102
102
|
},
|
|
103
103
|
],
|
|
104
|
-
"fixedPosition":
|
|
104
|
+
"fixedPosition": {
|
|
105
105
|
"height": 30.05,
|
|
106
106
|
"left": 0,
|
|
107
107
|
"top": 34,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { NodeDecorator } from "./nodeDecorator"
|
|
13
13
|
import { HierarchyNode, hierarchy } from "d3-hierarchy"
|
|
14
14
|
import { clone } from "./clone"
|
|
15
|
-
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.
|
|
15
|
+
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.calculator"
|
|
16
16
|
|
|
17
17
|
describe("nodeDecorator", () => {
|
|
18
18
|
let file: CCFile
|
|
@@ -450,4 +450,17 @@ describe("nodeDecorator", () => {
|
|
|
450
450
|
expect(map.attributes["some other attribute"]).not.toBeDefined()
|
|
451
451
|
})
|
|
452
452
|
})
|
|
453
|
+
|
|
454
|
+
describe("blacklist", () => {
|
|
455
|
+
it("should calculate flatten and exclude state for every node", () => {
|
|
456
|
+
NodeDecorator.decorateMap(file.map, { nodeMetricData: [], edgeMetricData: [] }, [
|
|
457
|
+
{ type: "flatten", path: "small leaf" },
|
|
458
|
+
{ type: "exclude", path: "other small leaf" }
|
|
459
|
+
])
|
|
460
|
+
expect(file.map.children[0].isExcluded).toBe(false)
|
|
461
|
+
expect(file.map.children[0].isFlattened).toBe(false)
|
|
462
|
+
expect(file.map.children[1].children[0].isFlattened).toBe(true)
|
|
463
|
+
expect(file.map.children[1].children[1].isExcluded).toBe(true)
|
|
464
|
+
})
|
|
465
|
+
})
|
|
453
466
|
})
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
"use strict"
|
|
2
1
|
import { hierarchy } from "d3-hierarchy"
|
|
3
2
|
import { AttributeTypes, AttributeTypeValue, BlacklistItem, CCFile, CodeMapNode, MetricData } from "../codeCharta.model"
|
|
4
3
|
import { isLeaf, isNodeExcludedOrFlattened } from "./codeMapHelper"
|
|
5
|
-
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.
|
|
4
|
+
import { UNARY_METRIC } from "../state/selectors/accumulatedData/metricData/nodeMetricData.calculator"
|
|
6
5
|
|
|
7
6
|
const enum MedianSelectors {
|
|
8
7
|
MEDIAN = "MEDIAN",
|
|
@@ -17,15 +16,16 @@ const enum EdgeAttributeType {
|
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
export const NodeDecorator = {
|
|
20
|
-
decorateMap(map: CodeMapNode, metricData: MetricData, blacklist: BlacklistItem[]) {
|
|
21
|
-
for (const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
decorateMap(map: CodeMapNode, metricData: Pick<MetricData, "nodeMetricData" | "edgeMetricData">, blacklist: BlacklistItem[]) {
|
|
20
|
+
for (const { data } of hierarchy(map)) {
|
|
21
|
+
data.isFlattened = false
|
|
22
|
+
data.isExcluded = false
|
|
23
|
+
|
|
24
|
+
for (const item of blacklist) {
|
|
25
|
+
if (item.type === "flatten") {
|
|
26
|
+
data.isFlattened = data.isFlattened || isNodeExcludedOrFlattened(data, item.path)
|
|
27
|
+
} else {
|
|
28
|
+
data.isExcluded = data.isExcluded || (isNodeExcludedOrFlattened(data, item.path) && isLeaf(data))
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -33,7 +33,7 @@ export const NodeDecorator = {
|
|
|
33
33
|
this.decorateMapWithMetricData(map, metricData)
|
|
34
34
|
},
|
|
35
35
|
|
|
36
|
-
decorateMapWithMetricData(map: CodeMapNode, metricData: MetricData) {
|
|
36
|
+
decorateMapWithMetricData(map: CodeMapNode, metricData: Pick<MetricData, "nodeMetricData" | "edgeMetricData">) {
|
|
37
37
|
const { nodeMetricData, edgeMetricData } = metricData
|
|
38
38
|
let id = 0
|
|
39
39
|
for (const { data } of hierarchy(map)) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { clone } from "./clone"
|
|
2
|
-
import
|
|
2
|
+
import { dequal } from "dequal"
|
|
3
3
|
import { Action } from "redux"
|
|
4
4
|
|
|
5
5
|
export function removeItemFromArray<T>(array: T[], searchItem: T) {
|
|
6
|
-
return array.filter(entry => !
|
|
6
|
+
return array.filter(entry => !dequal(entry, searchItem))
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function removeEntryAtIndexFromArray<T>(array: T[], index: number) {
|
|
@@ -36,5 +36,5 @@ export function isAction<T extends Action>(action: Action, type: string): action
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function arrayContainsItem<T>(array: T[], item: T) {
|
|
39
|
-
return array.some(x =>
|
|
39
|
+
return array.some(x => dequal(x, item))
|
|
40
40
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core"
|
|
2
|
+
import { RemoveExtensionPipe } from "./removeExtension.pipe"
|
|
3
|
+
import { MetricDescriptorTitlePipe } from "./metricDescriptorTitle.pipe"
|
|
4
|
+
|
|
5
|
+
@NgModule({
|
|
6
|
+
declarations: [RemoveExtensionPipe, MetricDescriptorTitlePipe],
|
|
7
|
+
exports: [RemoveExtensionPipe, MetricDescriptorTitlePipe]
|
|
8
|
+
})
|
|
9
|
+
export class SimplePipesModule {}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { MetricDescriptors } from "app/codeCharta/ui/attributeSideBar/util/metricDescriptors"
|
|
2
|
+
import { MetricDescriptorTitlePipe } from "./metricDescriptorTitle.pipe"
|
|
3
|
+
|
|
4
|
+
const testKey = "testKey"
|
|
5
|
+
const testTitle = "testTitle"
|
|
6
|
+
const testHighValue = "testHighValue"
|
|
7
|
+
const testLowValue = "testLowValue"
|
|
8
|
+
const testDescription = "testDescription"
|
|
9
|
+
const testLink = "testLink"
|
|
10
|
+
let pipe: MetricDescriptorTitlePipe
|
|
11
|
+
let md: MetricDescriptors
|
|
12
|
+
|
|
13
|
+
describe("metricDescriptorTitlePipe", () => {
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
md = {
|
|
16
|
+
key: testKey,
|
|
17
|
+
title: null,
|
|
18
|
+
description: null,
|
|
19
|
+
hintLowValue: null,
|
|
20
|
+
hintHighValue: null,
|
|
21
|
+
link: null
|
|
22
|
+
}
|
|
23
|
+
pipe = new MetricDescriptorTitlePipe()
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it("should return empty string for null", () => {
|
|
27
|
+
expect(pipe.transform(null)).toBe("")
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it("should return empty string for undefined", () => {
|
|
31
|
+
expect(pipe.transform(undefined)).toBe("")
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it("should be key if only key is present", () => {
|
|
35
|
+
expect(pipe.transform(md)).toBe(testKey)
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it('should be "title (key)" if present', () => {
|
|
39
|
+
md.title = testTitle
|
|
40
|
+
expect(pipe.transform(md)).toBe(`${testTitle} (${testKey})`)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it("should contain : if more information available", () => {
|
|
44
|
+
md.hintLowValue = testLowValue
|
|
45
|
+
expect(pipe.transform(md)).toContain(":")
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it("should include full information", () => {
|
|
49
|
+
md.title = testTitle
|
|
50
|
+
md.description = testDescription
|
|
51
|
+
md.hintHighValue = testHighValue
|
|
52
|
+
md.hintLowValue = testLowValue
|
|
53
|
+
const result = `${testTitle} (${testKey}):\n${testDescription}\nHigh Values: ${testHighValue}\nLow Values: ${testLowValue}`
|
|
54
|
+
expect(pipe.transform(md)).toBe(result)
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
it("should not include link", () => {
|
|
58
|
+
md.description = testDescription
|
|
59
|
+
md.link = testLink
|
|
60
|
+
expect(pipe.transform(md)).toBe(`${testKey}:\n${testDescription}`)
|
|
61
|
+
})
|
|
62
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from "@angular/core"
|
|
2
|
+
import { MetricDescriptors } from "../../ui/attributeSideBar/util/metricDescriptors"
|
|
3
|
+
|
|
4
|
+
@Pipe({ name: "metricDescriptorTitle" })
|
|
5
|
+
export class MetricDescriptorTitlePipe implements PipeTransform {
|
|
6
|
+
transform(metricDescriptor: MetricDescriptors): string {
|
|
7
|
+
if (metricDescriptor == null) {
|
|
8
|
+
return ""
|
|
9
|
+
}
|
|
10
|
+
const title: string = metricDescriptor.title ? `${metricDescriptor.title} (${metricDescriptor.key})` : metricDescriptor.key
|
|
11
|
+
|
|
12
|
+
let subtitle: string = metricDescriptor.description ? `\n${metricDescriptor.description}` : ""
|
|
13
|
+
subtitle += metricDescriptor.hintHighValue ? `\nHigh Values: ${metricDescriptor.hintHighValue}` : ""
|
|
14
|
+
subtitle += metricDescriptor.hintLowValue ? `\nLow Values: ${metricDescriptor.hintLowValue}` : ""
|
|
15
|
+
|
|
16
|
+
return subtitle.length > 0 ? `${title}:${subtitle}` : title
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from "@angular/core"
|
|
2
|
+
|
|
3
|
+
@Pipe({ name: "truncateText" })
|
|
4
|
+
export class TruncateTextPipe implements PipeTransform {
|
|
5
|
+
transform(textToTruncate: string, limit, replacerString = "...") {
|
|
6
|
+
return textToTruncate.length > limit ? textToTruncate.slice(0, limit) + replacerString : textToTruncate
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TruncateTextPipe } from "./truncateText.pipe"
|
|
2
|
+
|
|
3
|
+
describe("TruncateTextPipe", () => {
|
|
4
|
+
it("should return empty placeholder string if no string given", () => {
|
|
5
|
+
expect(new TruncateTextPipe().transform("", 0)).toBe("")
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
it("should return a shortened string when given string above limit", () => {
|
|
9
|
+
expect(new TruncateTextPipe().transform("123456", 5)).toBe("12345...")
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it("should not modify string if below limit", () => {
|
|
13
|
+
expect(new TruncateTextPipe().transform("12345", 6)).toBe("12345")
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
it("should allow shortening with a custom string", () => {
|
|
17
|
+
expect(new TruncateTextPipe().transform("12345", 4, "ab")).toBe("1234ab")
|
|
18
|
+
})
|
|
19
|
+
})
|