@centreon/ui 25.7.1 → 25.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "25.7.1",
3
+ "version": "25.7.2",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -12,10 +12,10 @@
12
12
  "test": "jest",
13
13
  "test:storybook:local": "test-storybook --url http://127.0.0.1:9001",
14
14
  "test:ci": "jest --silent --reporter=jest-junit",
15
- "cypress:ui": "cypress open --component --browser=chrome",
16
- "cypress:run:updateSnapshots": "cypress run --component --browser=chrome --env updateSnapshots=true",
17
- "cypress:run:coverage": "cypress run --component --browser=chrome --env codeCoverageTasksRegistered=true",
18
- "cypress:run": "cypress run --component --browser=chrome",
15
+ "cypress:ui": "cypress open --component --browser=chromium",
16
+ "cypress:run:updateSnapshots": "cypress run --component --browser=chromium --env updateSnapshots=true",
17
+ "cypress:run:coverage": "cypress run --component --browser=chromium --env codeCoverageTasksRegistered=true",
18
+ "cypress:run": "cypress run --component --browser=chromium",
19
19
  "cypress:install": "cypress install",
20
20
  "cypress:cli": "./cypress/scripts/cypress-cli.sh",
21
21
  "tokens:transform": "TS_NODE_PROJECT=tsconfig.node.json ts-node style-dictionary.transform.ts",
@@ -138,8 +138,6 @@ describe('Bar chart', () => {
138
138
  cy.contains(':40 AM').should('be.visible');
139
139
 
140
140
  cy.findByTestId('stacked-bar-3-0-0.16196').should('be.visible');
141
-
142
- cy.makeSnapshot();
143
141
  });
144
142
 
145
143
  it(`displays bar chart ${orientation}ly with a mix of stacked and non-stacked data centered in zero`, () => {
@@ -0,0 +1,20 @@
1
+ import { SvgIconProps } from '@mui/material';
2
+ import { ReactElement } from 'react';
3
+ import BaseIcon from './BaseIcon';
4
+
5
+ const icon = (
6
+ <g transform="translate(2 2)">
7
+ <path
8
+ d="M19.468,8.107,17.2,6.8l2.264-1.307a.8.8,0,0,0-.8-1.386L16.4,5.414V2.8a.8.8,0,1,0-1.6,0V5.414L12.54,4.107a.8.8,0,1,0-.8,1.386L14,6.8,11.74,8.107a.8.8,0,1,0,.8,1.386L14.8,8.186V10.8a.8.8,0,1,0,1.6,0V8.186l2.264,1.307a.789.789,0,0,0,.4.107.8.8,0,0,0,.4-1.493"
9
+ transform="translate(-1.868)"
10
+ />
11
+ <path
12
+ d="M5.2,20.4a3.2,3.2,0,1,1,3.2-3.2,3.2,3.2,0,0,1-3.2,3.2m0-4.8a1.6,1.6,0,1,0,1.6,1.6,1.6,1.6,0,0,0-1.6-1.6"
13
+ transform="translate(0 -2.4)"
14
+ />
15
+ </g>
16
+ );
17
+
18
+ export const RegexIcon = (props: SvgIconProps): ReactElement => (
19
+ <BaseIcon {...props} Icon={icon} dataTestId="RegexIcon" />
20
+ );
package/src/Icon/index.ts CHANGED
@@ -8,3 +8,4 @@ export { HostGroupIcon } from './HostGroupIcon';
8
8
  export { ServiceGroupIcon } from './ServiceGroupIcon';
9
9
  export { MetaServiceIcon } from './MetaServiceIcon';
10
10
  export { ContainerIcon } from './ContainerIcon';
11
+ export { RegexIcon } from './RegexIcon';
@@ -19,6 +19,7 @@ export interface ConfirmationModalProps<TAtom> {
19
19
  onCancel?: (atomData: Awaited<TAtom> | null) => void;
20
20
  onClose?: (atomData: Awaited<TAtom> | null) => void;
21
21
  onConfirm?: (atomData: Awaited<TAtom> | null) => void;
22
+ size?: 'small' | 'medium' | 'large' | 'xlarge' | 'fullscreen';
22
23
  }
23
24
 
24
25
  interface GetLabelProps<TAtom> {
@@ -39,7 +40,8 @@ export const ConfirmationModal = <TAtom,>({
39
40
  onClose,
40
41
  hasCloseButton = true,
41
42
  isDanger,
42
- disabled
43
+ disabled,
44
+ size
43
45
  }: ConfirmationModalProps<TAtom>): JSX.Element => {
44
46
  const [atomData, setAtomData] = useAtom<TAtom | null>(atom);
45
47
 
@@ -72,6 +74,7 @@ export const ConfirmationModal = <TAtom,>({
72
74
  hasCloseButton={hasCloseButton}
73
75
  open={Boolean(atomData)}
74
76
  onClose={closeModal}
77
+ size={size}
75
78
  >
76
79
  <Modal.Header>{formattedLabels.title}</Modal.Header>
77
80
  <Modal.Body>{formattedLabels.description}</Modal.Body>