Переглянути джерело

SONAR-14617 Target local sonar-ui-common project

tags/9.1.0.47736
Philippe Perrin 2 роки тому
джерело
коміт
22e0696a09
100 змінених файлів з 1478 додано та 215 видалено
  1. 4
    0
      build.gradle
  2. 4
    0
      server/sonar-docs/build.gradle
  3. 1
    1
      server/sonar-docs/package.json
  4. 1
    3
      server/sonar-docs/yarn.lock
  5. 0
    19
      server/sonar-ui-common/HEADER
  6. 66
    0
      server/sonar-ui-common/build.gradle
  7. 2
    2
      server/sonar-ui-common/components/__tests__/getHistory-test.ts
  8. 2
    2
      server/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx
  9. 2
    2
      server/sonar-ui-common/components/charts/AdvancedTimeline.css
  10. 3
    2
      server/sonar-ui-common/components/charts/AdvancedTimeline.tsx
  11. 2
    2
      server/sonar-ui-common/components/charts/BarChart.css
  12. 2
    2
      server/sonar-ui-common/components/charts/BarChart.tsx
  13. 2
    2
      server/sonar-ui-common/components/charts/BubbleChart.css
  14. 2
    2
      server/sonar-ui-common/components/charts/BubbleChart.tsx
  15. 2
    2
      server/sonar-ui-common/components/charts/ColorGradientLegend.css
  16. 2
    2
      server/sonar-ui-common/components/charts/ColorGradientLegend.tsx
  17. 2
    2
      server/sonar-ui-common/components/charts/DonutChart.tsx
  18. 2
    2
      server/sonar-ui-common/components/charts/Histogram.css
  19. 2
    2
      server/sonar-ui-common/components/charts/Histogram.tsx
  20. 2
    2
      server/sonar-ui-common/components/charts/LineChart.css
  21. 2
    2
      server/sonar-ui-common/components/charts/LineChart.tsx
  22. 2
    2
      server/sonar-ui-common/components/charts/TreeMap.css
  23. 2
    2
      server/sonar-ui-common/components/charts/TreeMap.tsx
  24. 2
    2
      server/sonar-ui-common/components/charts/TreeMapRect.tsx
  25. 2
    2
      server/sonar-ui-common/components/charts/ZoomTimeLine.css
  26. 3
    5
      server/sonar-ui-common/components/charts/ZoomTimeLine.tsx
  27. 106
    4
      server/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx
  28. 2
    2
      server/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx
  29. 2
    2
      server/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx
  30. 2
    2
      server/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx
  31. 2
    2
      server/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx
  32. 2
    2
      server/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx
  33. 2
    2
      server/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx
  34. 2
    2
      server/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx
  35. 31
    3
      server/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx
  36. 1079
    0
      server/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap
  37. 5
    0
      server/sonar-ui-common/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap
  38. 2
    2
      server/sonar-ui-common/components/controls/ActionsDropdown.tsx
  39. 2
    2
      server/sonar-ui-common/components/controls/BackButton.tsx
  40. 2
    2
      server/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx
  41. 2
    2
      server/sonar-ui-common/components/controls/BoxedTabs.tsx
  42. 2
    3
      server/sonar-ui-common/components/controls/Checkbox.css
  43. 2
    2
      server/sonar-ui-common/components/controls/Checkbox.tsx
  44. 2
    2
      server/sonar-ui-common/components/controls/ClickEventBoundary.tsx
  45. 2
    2
      server/sonar-ui-common/components/controls/ConfirmButton.tsx
  46. 2
    2
      server/sonar-ui-common/components/controls/ConfirmModal.tsx
  47. 2
    2
      server/sonar-ui-common/components/controls/DocumentClickHandler.tsx
  48. 2
    2
      server/sonar-ui-common/components/controls/Dropdown.css
  49. 2
    2
      server/sonar-ui-common/components/controls/Dropdown.tsx
  50. 2
    2
      server/sonar-ui-common/components/controls/EscKeydownHandler.tsx
  51. 2
    2
      server/sonar-ui-common/components/controls/FavoriteButton.tsx
  52. 2
    2
      server/sonar-ui-common/components/controls/GlobalMessages.tsx
  53. 2
    2
      server/sonar-ui-common/components/controls/HelpTooltip.css
  54. 2
    2
      server/sonar-ui-common/components/controls/HelpTooltip.tsx
  55. 2
    2
      server/sonar-ui-common/components/controls/IdentityProviderLink.css
  56. 2
    2
      server/sonar-ui-common/components/controls/IdentityProviderLink.tsx
  57. 2
    2
      server/sonar-ui-common/components/controls/InputValidationField.tsx
  58. 2
    2
      server/sonar-ui-common/components/controls/ListFooter.tsx
  59. 2
    2
      server/sonar-ui-common/components/controls/Modal.css
  60. 2
    2
      server/sonar-ui-common/components/controls/Modal.tsx
  61. 2
    2
      server/sonar-ui-common/components/controls/ModalButton.tsx
  62. 2
    2
      server/sonar-ui-common/components/controls/ModalValidationField.tsx
  63. 2
    2
      server/sonar-ui-common/components/controls/OutsideClickHandler.tsx
  64. 2
    3
      server/sonar-ui-common/components/controls/Radio.css
  65. 2
    2
      server/sonar-ui-common/components/controls/Radio.tsx
  66. 2
    2
      server/sonar-ui-common/components/controls/RadioCard.css
  67. 2
    2
      server/sonar-ui-common/components/controls/RadioCard.tsx
  68. 2
    2
      server/sonar-ui-common/components/controls/RadioToggle.css
  69. 2
    2
      server/sonar-ui-common/components/controls/RadioToggle.tsx
  70. 2
    2
      server/sonar-ui-common/components/controls/ReloadButton.tsx
  71. 2
    2
      server/sonar-ui-common/components/controls/ScreenPositionFixer.tsx
  72. 2
    2
      server/sonar-ui-common/components/controls/SearchBox.css
  73. 2
    2
      server/sonar-ui-common/components/controls/SearchBox.tsx
  74. 2
    2
      server/sonar-ui-common/components/controls/SearchSelect.tsx
  75. 2
    2
      server/sonar-ui-common/components/controls/Select.css
  76. 2
    2
      server/sonar-ui-common/components/controls/Select.tsx
  77. 2
    3
      server/sonar-ui-common/components/controls/SelectList.css
  78. 2
    2
      server/sonar-ui-common/components/controls/SelectList.tsx
  79. 2
    2
      server/sonar-ui-common/components/controls/SelectListListContainer.tsx
  80. 2
    2
      server/sonar-ui-common/components/controls/SelectListListElement.tsx
  81. 2
    2
      server/sonar-ui-common/components/controls/SimpleModal.tsx
  82. 2
    2
      server/sonar-ui-common/components/controls/Tabs.css
  83. 2
    2
      server/sonar-ui-common/components/controls/Tabs.tsx
  84. 2
    2
      server/sonar-ui-common/components/controls/Toggle.css
  85. 2
    2
      server/sonar-ui-common/components/controls/Toggle.tsx
  86. 2
    2
      server/sonar-ui-common/components/controls/Toggler.tsx
  87. 2
    2
      server/sonar-ui-common/components/controls/Tooltip.css
  88. 2
    2
      server/sonar-ui-common/components/controls/Tooltip.tsx
  89. 2
    2
      server/sonar-ui-common/components/controls/ValidationForm.tsx
  90. 2
    2
      server/sonar-ui-common/components/controls/ValidationInput.tsx
  91. 2
    2
      server/sonar-ui-common/components/controls/ValidationModal.tsx
  92. 2
    2
      server/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx
  93. 2
    2
      server/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx
  94. 2
    2
      server/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx
  95. 3
    3
      server/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx
  96. 2
    2
      server/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx
  97. 2
    2
      server/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx
  98. 2
    2
      server/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx
  99. 2
    2
      server/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx
  100. 0
    0
      server/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx

+ 4
- 0
build.gradle Переглянути файл

@@ -651,6 +651,10 @@ subprojects {
// their concurrent execution even in case when one or more of these tasks not
// scheduled.
def yarnInstallTasks = allprojects.findResults { it -> it.tasks.findByName('yarn') }

// Drop :server:sonar-ui-common:yarn from the list because it will be creating a circular dependency
yarnInstallTasks.eachWithIndex { t, i -> if (t.path == ':server:sonar-ui-common:yarn') yarnInstallTasks.remove(i) }

yarnInstallTasks.drop(1).eachWithIndex { it, i -> it.mustRunAfter(yarnInstallTasks[0..i]) }

// by default, Yarn will update lock file if it is not up to date with "package.json"

+ 4
- 0
server/sonar-docs/build.gradle Переглянути файл

@@ -55,6 +55,10 @@ task extractAnalyzerDocFiles {
}
}

yarn.configure {
dependsOn tasks.getByPath(':server:sonar-ui-common:yarn_run')
}

yarn_run {
def docsVersion = version.split("[.-]").take(2).join('.')
environment = [ GATSBY_DOCS_VERSION: docsVersion ]

+ 1
- 1
server/sonar-docs/package.json Переглянути файл

@@ -23,7 +23,7 @@
"react-helmet": "5.2.1",
"react-typography": "0.16.19",
"rehype-react": "6.1.0",
"sonar-ui-common": "1.0.33",
"sonar-ui-common": "../sonar-ui-common/build/dist",
"typography": "0.16.19"
},
"devDependencies": {

+ 1
- 3
server/sonar-docs/yarn.lock Переглянути файл

@@ -13691,10 +13691,8 @@ sockjs@0.3.19:
faye-websocket "^0.10.0"
uuid "^3.0.1"

sonar-ui-common@1.0.33:
sonar-ui-common@../sonar-ui-common/build/dist:
version "1.0.33"
resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-1.0.33.tgz#8eb6f40b1ab81b802a8eb92fd549598432e9dc26"
integrity sha1-jrb0Cxq4G4Aqjrkv1UlZhDLp3CY=
dependencies:
"@types/react-select" "1.2.6"
classnames "2.2.6"

+ 0
- 19
server/sonar-ui-common/HEADER Переглянути файл

@@ -1,19 +0,0 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

+ 66
- 0
server/sonar-ui-common/build.gradle Переглянути файл

@@ -0,0 +1,66 @@
description = 'SonarSource :: Sonar UI Common'

sonarqube {
properties {
property "sonar.sources", "components,helpers"
property "sonar.exclusions", "**/__tests__/**"
property "sonar.test", "components,helpers"
property "sonar.test.inclusions", "**/__tests__/**"
property "sonar.eslint.reportPaths", "eslint-report.json"
property "sonar.javascript.lcov.reportPaths", "coverage/lcov.info"
property "sonar.coverage.exclusions", "components/icons/*,helpers/testUtils.ts,helpers/keycodes.ts"
property "sonar.typescript.lcov.reportPaths", "build/coverage/lcov.info"
property "sonar.eslint.reportPaths", "build/eslint-report.json"
}
}

yarn_run {
['config', 'scripts', 'components', 'helpers'].each {
inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE)
}
['package.json', 'tsconfig.json', 'yarn.lock'].each {
inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
}
outputs.cacheIf { true }
args = ['build']
ignoreExitValue = false
}

"yarn_check-ci" {
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'scripts', 'components', 'helpers'].each {
inputs.dir(it)
}
['package.json', 'yarn.lock', 'tsconfig.json'].each {
inputs.file(it)
}

dependsOn(yarn)
}

"yarn_validate-ci" {
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'scripts', 'components', 'helpers'].each {
inputs.dir(it)
}
['.eslintrc', 'package.json', 'yarn.lock', 'tsconfig.json'].each {
inputs.file(it)
}
outputs.file("eslint-report.json")
outputs.dir("coverage")
outputs.cacheIf { true }

dependsOn(yarn)
}

def sources = fileTree(dir: "components") + fileTree(dir: "config") + fileTree(dir: "helpers")

task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
source = sources
}
licenseMain.dependsOn licenseCheckWeb

task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
source = sources
}
licenseFormat.dependsOn licenseFormatWeb

+ 2
- 2
server/sonar-ui-common/components/__tests__/getHistory-test.ts Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/AdvancedTimeline.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 3
- 2
server/sonar-ui-common/components/charts/AdvancedTimeline.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -205,6 +205,7 @@ export default class AdvancedTimeline extends React.PureComponent<Props, State>
const parentBbox = event.currentTarget.getBoundingClientRect();
const mouseXPos = (event.pageX - parentBbox.left) / parentBbox.width;
const xRange = xScale.range();

const speed = event.deltaMode
? (25 / event.deltaMode) * this.props.zoomSpeed
: this.props.zoomSpeed;

+ 2
- 2
server/sonar-ui-common/components/charts/BarChart.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/BarChart.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/BubbleChart.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/BubbleChart.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/ColorGradientLegend.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/ColorGradientLegend.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/DonutChart.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/Histogram.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/Histogram.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/LineChart.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/LineChart.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/TreeMap.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/TreeMap.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/TreeMapRect.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/ZoomTimeLine.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 3
- 5
server/sonar-ui-common/components/charts/ZoomTimeLine.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -174,9 +174,7 @@ export default class ZoomTimeLine extends React.PureComponent<Props, State> {
xArray[1] > xRange[0] && xArray[1] < xRange[xRange.length - 1]
? xScale.invert(xArray[1])
: undefined;
if (this.props.startDate !== startDate || this.props.endDate !== endDate) {
this.props.updateZoom(startDate, endDate);
}
this.props.updateZoom(startDate, endDate);
};

renderBaseLine = (xScale: XScale, yScale: YScale) => {

+ 106
- 4
server/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -36,11 +36,18 @@ jest.mock('d3-scale', () => {

jest.mock('lodash', () => {
const lodash = jest.requireActual('lodash');
return { ...lodash, throttle: (f) => f };
return { ...lodash, throttle: (f: any) => f };
});

it('should render correctly', () => {
expect(shallowRender()).toMatchSnapshot();
expect(shallowRender({ disableZoom: false, updateZoom: () => {} })).toMatchSnapshot(
'Zoom enabled'
);
expect(shallowRender({ formatYTick: (t) => `Nicer tick ${t}` })).toMatchSnapshot('format y tick');
expect(shallowRender({ width: undefined })).toMatchSnapshot('no width');
expect(shallowRender({ height: undefined })).toMatchSnapshot('no height');
expect(shallowRender({ showAreas: undefined })).toMatchSnapshot('no areas');
});

it('should render leak correctly', () => {
@@ -144,6 +151,98 @@ it('should update tootlips when selected date changes', () => {
expect(updateTooltip).toBeCalled();
});

it('should handle scroll correcly', () => {
let updateZoom = jest.fn();
let preventDefault = jest.fn();
let wrapper = shallowRender({ updateZoom });
wrapper.instance().handleWheel(({
preventDefault,
deltaX: 1,
deltaY: -2,
deltaZ: 0,
pageX: 100,
pageY: 1,
currentTarget: ({
getBoundingClientRect: () => ({
bottom: 0,
height: 100,
width: 50,
left: 0,
right: 0,
top: 10,
x: 12,
y: 23,
toJSON: () => '',
}),
} as any) as SVGElement,
} as any) as React.WheelEvent<SVGElement>);
expect(preventDefault).toBeCalled();
expect(updateZoom).toBeCalledWith(new Date('2019-10-01T06:24:00.000Z'), undefined);

updateZoom = jest.fn();
preventDefault = jest.fn();
wrapper = shallowRender({ updateZoom });
wrapper.instance().handleWheel(({
preventDefault,
deltaX: 1,
deltaY: 2,
deltaZ: 0,
pageX: 100,
pageY: 1,
deltaMode: 25,
currentTarget: ({
getBoundingClientRect: () => ({
bottom: 0,
height: 100,
width: 50,
left: 0,
right: 0,
top: 10,
x: 12,
y: 23,
toJSON: () => '',
}),
} as any) as SVGElement,
} as any) as React.WheelEvent<SVGElement>);
expect(preventDefault).toBeCalled();
expect(updateZoom).toBeCalledWith(undefined, new Date('2019-10-02T20:48:00.000Z'));
});

it('should handle mouse out correcly', () => {
const updateTooltip = jest.fn();
const wrapper = shallowRender({ updateTooltip: undefined });
wrapper.setState({
mouseOver: true,
selectedDate: new Date(),
selectedDateXPos: 1,
selectedDateIdx: 1,
});
wrapper.instance().handleMouseOut();
expect(wrapper.state().mouseOver).toBe(true);

wrapper.setProps({ updateTooltip });
wrapper.instance().handleMouseOut();
expect(wrapper.state().mouseOver).toBe(false);
expect(wrapper.state().selectedDate).toBeUndefined();
expect(wrapper.state().selectedDateXPos).toBeUndefined();
expect(wrapper.state().selectedDateIdx).toBeUndefined();
wrapper.instance().handleMouseOut();
});

it('should handle click correcly', () => {
const updateSelectedDate = jest.fn();
const wrapper = shallowRender({ updateSelectedDate });
wrapper.setState({ selectedDate: new Date() });

wrapper.instance().handleClick();
expect(updateSelectedDate).toBeCalledWith(wrapper.state().selectedDate);

wrapper.setProps({ updateSelectedDate: undefined });
updateSelectedDate.mockClear();
wrapper.instance().handleClick();
expect(updateSelectedDate).not.toBeCalled();
});

function shallowRender(props?: Partial<AdvancedTimeline['props']>) {
return shallow<AdvancedTimeline>(
<AdvancedTimeline
@@ -154,6 +253,7 @@ function shallowRender(props?: Partial<AdvancedTimeline['props']>) {
{
name: 'test-1',
type: 'test-type-1',
translatedName: '',
data: [
{
x: new Date('2019-10-01'),
@@ -168,6 +268,7 @@ function shallowRender(props?: Partial<AdvancedTimeline['props']>) {
{
name: 'test-2',
type: 'test-type-2',
translatedName: '',
data: [
{
x: new Date('2019-10-03'),
@@ -183,10 +284,11 @@ function shallowRender(props?: Partial<AdvancedTimeline['props']>) {
);
}

function mockData(i: number, date: string) {
function mockData(i: number, date: string): T.Chart.Serie {
return {
name: `t${i}`,
type: 'type',
translatedName: '',
data: [{ x: new Date(date), y: i }],
};
}

+ 2
- 2
server/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 31
- 3
server/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { scaleTime } from 'd3-scale';
import { shallow } from 'enzyme';
import * as React from 'react';
import testTheme from '../../../config/jest/testTheme';
@@ -41,6 +41,11 @@ const series = [
},
];

it('should render correctly', () => {
expect(shallowRender({ width: undefined })).toMatchSnapshot('no width');
expect(shallowRender({ height: undefined })).toMatchSnapshot('no height');
});

it('should draw a graph with lines', () => {
const wrapper = shallowRender();
expect(wrapper.find('.line-chart-grid').exists()).toBe(true);
@@ -67,6 +72,29 @@ it('should render areas under the graph lines', () => {
expect(shallowRender({ showAreas: true }).find('.line-chart-area').exists()).toBe(true);
});

it('should handle zoom update correctly', () => {
const updateZoom = jest.fn();
const startDate = new Date('1970-01-01T00:00:00.001Z');
const endDate = new Date('2000-01-01T00:00:00.001Z');
let wrapper = shallowRender({ updateZoom, startDate, endDate });
wrapper
.instance()
.handleZoomUpdate(scaleTime().domain([startDate, endDate]).range([0, 150]), [3, 50]);
expect(updateZoom).toBeCalledWith(
new Date('1970-08-08T03:21:36.001Z'),
new Date('1980-01-01T08:00:00.001Z')
);

updateZoom.mockClear();

// We throttle the handleZoomUpdate so re-render to avoid issue
wrapper = shallowRender({ updateZoom, startDate, endDate });
wrapper
.instance()
.handleZoomUpdate(scaleTime().domain([startDate, endDate]).range([0, 150]), [-1, 151]);
expect(updateZoom).toBeCalledWith(undefined, undefined);
});

function shallowRender(props: Partial<ZoomTimeLine['props']> = {}) {
return shallow<ZoomTimeLine>(
<ZoomTimeLine

+ 1079
- 0
server/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 5
- 0
server/sonar-ui-common/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap Переглянути файл

@@ -0,0 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`should render correctly: no height 1`] = `<div />`;

exports[`should render correctly: no width 1`] = `<div />`;

+ 2
- 2
server/sonar-ui-common/components/controls/ActionsDropdown.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/BackButton.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/BoxedTabs.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 3
server/sonar-ui-common/components/controls/Checkbox.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

.icon-checkbox {
display: inline-block;
line-height: 1;

+ 2
- 2
server/sonar-ui-common/components/controls/Checkbox.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ClickEventBoundary.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ConfirmButton.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ConfirmModal.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/DocumentClickHandler.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Dropdown.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Dropdown.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/EscKeydownHandler.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/FavoriteButton.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/GlobalMessages.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/HelpTooltip.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/HelpTooltip.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/IdentityProviderLink.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/IdentityProviderLink.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/InputValidationField.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ListFooter.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Modal.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Modal.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ModalButton.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ModalValidationField.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/OutsideClickHandler.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 3
server/sonar-ui-common/components/controls/Radio.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

.icon-radio {
position: relative;
display: inline-block;

+ 2
- 2
server/sonar-ui-common/components/controls/Radio.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/RadioCard.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/RadioCard.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/RadioToggle.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/RadioToggle.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ReloadButton.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ScreenPositionFixer.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/SearchBox.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/SearchBox.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/SearchSelect.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Select.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Select.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 3
server/sonar-ui-common/components/controls/SelectList.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

.select-list-container {
min-width: 500px;
box-sizing: border-box;

+ 2
- 2
server/sonar-ui-common/components/controls/SelectList.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/SelectListListContainer.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/SelectListListElement.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/SimpleModal.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Tabs.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Tabs.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Toggle.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Toggle.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Toggler.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Tooltip.css Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/Tooltip.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ValidationForm.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ValidationInput.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/ValidationModal.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 3
- 3
server/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
@@ -42,7 +42,7 @@ function mountRender(overrides: Partial<BoxedTabsProps<string>> = {}) {
return mount(dom(overrides));
}

function dom(overrides) {
function dom<K>(overrides: Partial<BoxedTabsProps<K>>) {
return (
<BoxedTabs
className="boxed-tabs"

+ 2
- 2
server/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 2
- 2
server/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx Переглянути файл

@@ -1,6 +1,6 @@
/*
* Sonar UI Common
* Copyright (C) 2019-2020 SonarSource SA
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or

+ 0
- 0
server/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx Переглянути файл


Деякі файли не було показано, через те що забагато файлів було змінено

Завантаження…
Відмінити
Зберегти