@centreon/ui 26.5.11 → 26.5.12
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
package/src/Form/Form.tsx
CHANGED
|
@@ -27,6 +27,7 @@ export type FormProps<T> = {
|
|
|
27
27
|
groups?: Array<Group>;
|
|
28
28
|
groupsClassName?: string;
|
|
29
29
|
initialValues: T;
|
|
30
|
+
inputsClassName?: string;
|
|
30
31
|
inputs: Array<InputProps>;
|
|
31
32
|
isCollapsible?: boolean;
|
|
32
33
|
isLoading?: boolean;
|
|
@@ -39,6 +40,7 @@ const Form = <T extends object>({
|
|
|
39
40
|
children,
|
|
40
41
|
className,
|
|
41
42
|
groupsClassName,
|
|
43
|
+
inputsClassName,
|
|
42
44
|
areGroupsOpen,
|
|
43
45
|
initialValues,
|
|
44
46
|
validate,
|
|
@@ -61,6 +63,7 @@ const Form = <T extends object>({
|
|
|
61
63
|
groups={groups}
|
|
62
64
|
groupsClassName={groupsClassName}
|
|
63
65
|
inputs={inputs}
|
|
66
|
+
inputsClassName={inputsClassName}
|
|
64
67
|
isCollapsible={isCollapsible}
|
|
65
68
|
isLoading
|
|
66
69
|
/>
|
|
@@ -86,6 +89,7 @@ const Form = <T extends object>({
|
|
|
86
89
|
groups={groups}
|
|
87
90
|
groupsClassName={groupsClassName}
|
|
88
91
|
inputs={inputs}
|
|
92
|
+
inputsClassName={inputsClassName}
|
|
89
93
|
isCollapsible={isCollapsible}
|
|
90
94
|
/>
|
|
91
95
|
<Buttons />
|
|
@@ -135,6 +135,7 @@ interface Props {
|
|
|
135
135
|
groupDirection?: GroupDirection;
|
|
136
136
|
groups?: Array<Group>;
|
|
137
137
|
groupsClassName?: string;
|
|
138
|
+
inputsClassName?: string;
|
|
138
139
|
inputs: Array<InputProps>;
|
|
139
140
|
isCollapsible: boolean;
|
|
140
141
|
isLoading?: boolean;
|
|
@@ -147,7 +148,8 @@ const Inputs = ({
|
|
|
147
148
|
isCollapsible,
|
|
148
149
|
groupDirection,
|
|
149
150
|
groupsClassName,
|
|
150
|
-
areGroupsOpen
|
|
151
|
+
areGroupsOpen,
|
|
152
|
+
inputsClassName
|
|
151
153
|
}: Props): JSX.Element => {
|
|
152
154
|
const { classes, cx } = useStyles({ groupDirection });
|
|
153
155
|
const formikContext = useFormikContext<FormikValues>();
|
|
@@ -226,7 +228,7 @@ const Inputs = ({
|
|
|
226
228
|
hasGroupTitle={hasGroupTitle}
|
|
227
229
|
isCollapsible={isCollapsible}
|
|
228
230
|
>
|
|
229
|
-
<div className={classes.inputs}>
|
|
231
|
+
<div className={cx(classes.inputs, inputsClassName)}>
|
|
230
232
|
{groupedInputs.map((inputProps) => {
|
|
231
233
|
const key =
|
|
232
234
|
isNotNil(inputProps.label) || isNotEmpty(inputProps.label)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SvgIconProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import type { ReactElement } from 'react';
|
|
4
|
+
|
|
5
|
+
import BaseIcon from './BaseIcon';
|
|
6
|
+
|
|
7
|
+
const icon = (
|
|
8
|
+
<g>
|
|
9
|
+
<path
|
|
10
|
+
d="M23.9999 38C22.3332 38 20.9166 37.4167 19.7499 36.25C18.5832 35.0833 17.9999 33.6667 17.9999 32C17.9999 30.3333 18.5832 28.9167 19.7499 27.75C20.9166 26.5833 22.3332 26 23.9999 26C25.6666 26 27.0832 26.5833 28.2499 27.75C29.4166 28.9167 29.9999 30.3333 29.9999 32C29.9999 33.6667 29.4166 35.0833 28.2499 36.25C27.0832 37.4167 25.6666 38 23.9999 38ZM8.1499 24C8.61657 20.0333 10.3499 16.7083 13.3499 14.025C16.3499 11.3417 19.8832 10 23.9499 10C26.3832 10 28.6332 10.4917 30.6999 11.475C32.7666 12.4583 34.5332 13.8 35.9999 15.5V10H39.9999V24H25.9999V20H34.3999C33.3332 18.2 31.8916 16.75 30.0749 15.65C28.2582 14.55 26.2332 14 23.9999 14C21.0666 14 18.4832 14.95 16.2499 16.85C14.0166 18.75 12.6666 21.1333 12.1999 24H8.1499Z"
|
|
11
|
+
fill="currentColor"
|
|
12
|
+
/>
|
|
13
|
+
</g>
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export const InstallCommandIcon = (props: SvgIconProps): ReactElement => (
|
|
17
|
+
<BaseIcon
|
|
18
|
+
{...props}
|
|
19
|
+
dataTestId="Install command"
|
|
20
|
+
Icon={icon}
|
|
21
|
+
viewBox="0 0 48 48"
|
|
22
|
+
/>
|
|
23
|
+
);
|
package/src/Icon/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { DowntimeIcon } from './DowntimeIcon';
|
|
|
5
5
|
export { FlappingIcon } from './FlappingIcon';
|
|
6
6
|
export { HostGroupIcon } from './HostGroupIcon';
|
|
7
7
|
export { HostIcon } from './HostIcon';
|
|
8
|
+
export { InstallCommandIcon } from './InstallCommandIcon';
|
|
8
9
|
export { MetaServiceIcon } from './MetaServiceIcon';
|
|
9
10
|
export { RegexIcon } from './RegexIcon';
|
|
10
11
|
export { ServiceGroupIcon } from './ServiceGroupIcon';
|