@centreon/ui 23.10.1-release-23-10-next.21 → 23.10.1-release-23-10-next.23

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": "23.10.1-release-23-10-next.21",
3
+ "version": "23.10.1-release-23-10-next.23",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -38,6 +38,7 @@ export interface RichTextEditorProps {
38
38
  openLinkInNewTab?: boolean;
39
39
  placeholder?: string;
40
40
  resetEditorToInitialStateCondition?: () => boolean;
41
+ toolbarClassName?: string;
41
42
  toolbarPositions?: 'start' | 'end';
42
43
  }
43
44
 
@@ -136,7 +137,8 @@ const RichTextEditor = ({
136
137
  disabled = false,
137
138
  openLinkInNewTab = true,
138
139
  initialize,
139
- displayBlockButtons = true
140
+ displayBlockButtons = true,
141
+ toolbarClassName
140
142
  }: RichTextEditorProps): JSX.Element => {
141
143
  const { classes } = useStyles({ toolbarPositions });
142
144
 
@@ -175,6 +177,7 @@ const RichTextEditor = ({
175
177
  <div className={classes.container}>
176
178
  <div className={classes.toolbar}>
177
179
  <ToolbarPlugin
180
+ className={toolbarClassName}
178
181
  disabled={disabled}
179
182
  displayBlockButtons={displayBlockButtons}
180
183
  displayMacrosButton={displayMacrosButton}
@@ -9,6 +9,7 @@ import BlockButtons from './BlockButtons';
9
9
  import AlignPicker from './AlignPicker';
10
10
 
11
11
  interface Props {
12
+ className?: string;
12
13
  disabled: boolean;
13
14
  displayBlockButtons: boolean;
14
15
  displayMacrosButton?: boolean;
@@ -36,12 +37,13 @@ const ToolbarPlugin = ({
36
37
  editable,
37
38
  displayMacrosButton,
38
39
  disabled,
39
- displayBlockButtons
40
+ displayBlockButtons,
41
+ className
40
42
  }: Props): JSX.Element | null => {
41
- const { classes } = useStyles();
43
+ const { cx, classes } = useStyles();
42
44
 
43
45
  return editable ? (
44
- <div className={classes.container}>
46
+ <div className={cx(classes.container, className)}>
45
47
  <UndoRedoButtons disabled={disabled} />
46
48
  {displayBlockButtons && (
47
49
  <>
@@ -51,13 +53,13 @@ const ToolbarPlugin = ({
51
53
  )}
52
54
  <Divider flexItem orientation="vertical" />
53
55
  <FormatButtons disabled={disabled} />
56
+ <AlignPicker disabled={disabled} />
54
57
  {displayMacrosButton && (
55
58
  <>
56
59
  <Divider flexItem orientation="vertical" />
57
60
  <MacrosButton disabled={disabled} />
58
61
  </>
59
62
  )}
60
- <AlignPicker disabled={disabled} />
61
63
  </div>
62
64
  ) : null;
63
65
  };
@@ -29,6 +29,7 @@ const actionsBarLabelsDefaultValues = {
29
29
  };
30
30
 
31
31
  const Wizard = ({
32
+ classNameDialogContent,
32
33
  steps,
33
34
  onSubmit = undefined,
34
35
  initialValues = {},
@@ -41,7 +42,7 @@ const Wizard = ({
41
42
  displayConfirmDialog,
42
43
  ...rest
43
44
  }: WizardProps): JSX.Element => {
44
- const { classes } = useStyles();
45
+ const { classes, cx } = useStyles();
45
46
  const [currentStep, setCurrentStep] = useState(0);
46
47
  const [sendingRequest, setSendingRequest] = useState(false);
47
48
  const [openConfirm, setOpenConfirm] = useState(false);
@@ -131,7 +132,9 @@ const Wizard = ({
131
132
  validationSchema={validationSchema}
132
133
  onSubmit={submit}
133
134
  >
134
- <DialogContent className={classes.dialogContent}>
135
+ <DialogContent
136
+ className={cx(classes.dialogContent, classNameDialogContent)}
137
+ >
135
138
  <WizardContent
136
139
  actionsBarLabels={actionsBarLabels}
137
140
  currentStep={currentStep}
@@ -45,6 +45,7 @@ type ValueOf<T> = T[keyof T];
45
45
  export interface WizardProps {
46
46
  [key: string]: ValueOf<DialogProps>;
47
47
  actionsBarLabels?: ActionsBarLabels;
48
+ classNameDialogContent?: string;
48
49
  confirmDialogLabels?: ConfirmDialogLabels;
49
50
  displayConfirmDialog?: boolean;
50
51
  fullHeight?: boolean;