superdesk-ui-framework 3.0.1-beta.6 → 3.0.1-beta.8

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.
Files changed (71) hide show
  1. package/app/fonts/sd_icons.eot +0 -0
  2. package/app/fonts/sd_icons.svg +14 -7
  3. package/app/fonts/sd_icons.ttf +0 -0
  4. package/app/fonts/sd_icons.woff +0 -0
  5. package/app/styles/_icon-font.scss +7 -0
  6. package/app/styles/_sd-tag-input.scss +1 -0
  7. package/app/styles/components/_sd-grid-item.scss +30 -16
  8. package/app/styles/components/_sd-searchbar.scss +7 -0
  9. package/app/styles/design-tokens/_design-tokens-general.scss +1 -1
  10. package/app/styles/form-elements/_forms-general.scss +64 -5
  11. package/app/styles/form-elements/_inputs.scss +10 -0
  12. package/app/styles/grids/_grid-layout.scss +25 -1
  13. package/app/styles/layout/_basic-layout.scss +2 -2
  14. package/app/styles/layout/_editor.scss +4 -4
  15. package/app/styles/primereact/_pr-dropdown.scss +17 -1
  16. package/app-typescript/components/DurationInput.tsx +37 -4
  17. package/app-typescript/components/EmptyState.tsx +2 -1
  18. package/app-typescript/components/Form/FormRowNew.tsx +41 -0
  19. package/app-typescript/components/Form/index.tsx +1 -0
  20. package/app-typescript/components/Layouts/AuthoringContainer.tsx +2 -1
  21. package/app-typescript/components/LeftMenu.tsx +127 -122
  22. package/app-typescript/components/Lists/TableList.tsx +146 -142
  23. package/app-typescript/components/SearchBar.tsx +28 -9
  24. package/app-typescript/components/TimePicker.tsx +2 -0
  25. package/app-typescript/index.ts +1 -0
  26. package/dist/examples.bundle.css +273 -0
  27. package/dist/examples.bundle.js +28927 -28750
  28. package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +1 -1
  29. package/dist/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
  30. package/dist/playgrounds/react-playgrounds/TestGround.tsx +120 -14
  31. package/dist/react/LeftNavigations.tsx +71 -44
  32. package/dist/react/MultiSelect.tsx +1 -1
  33. package/dist/react/TableList.tsx +84 -82
  34. package/dist/react/TimePicker.tsx +6 -4
  35. package/dist/react/TreeSelect.tsx +1 -1
  36. package/dist/sd_icons.eot +0 -0
  37. package/dist/sd_icons.svg +14 -7
  38. package/dist/sd_icons.ttf +0 -0
  39. package/dist/sd_icons.woff +0 -0
  40. package/dist/superdesk-ui.bundle.css +976 -29
  41. package/dist/superdesk-ui.bundle.js +13975 -2089
  42. package/dist/vendor.bundle.js +23 -23
  43. package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +1 -1
  44. package/examples/pages/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
  45. package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +120 -14
  46. package/examples/pages/react/LeftNavigations.tsx +71 -44
  47. package/examples/pages/react/MultiSelect.tsx +1 -1
  48. package/examples/pages/react/TableList.tsx +84 -82
  49. package/examples/pages/react/TimePicker.tsx +6 -4
  50. package/examples/pages/react/TreeSelect.tsx +1 -1
  51. package/package.json +2 -1
  52. package/react/components/DurationInput.d.ts +2 -1
  53. package/react/components/DurationInput.js +36 -4
  54. package/react/components/EmptyState.d.ts +1 -0
  55. package/react/components/EmptyState.js +1 -1
  56. package/react/components/Form/FormRowNew.d.ts +12 -0
  57. package/react/components/Form/FormRowNew.js +67 -0
  58. package/react/components/Form/index.d.ts +1 -0
  59. package/react/components/Form/index.js +3 -1
  60. package/react/components/Layouts/AuthoringContainer.d.ts +1 -0
  61. package/react/components/Layouts/AuthoringContainer.js +1 -1
  62. package/react/components/LeftMenu.d.ts +3 -1
  63. package/react/components/LeftMenu.js +8 -1
  64. package/react/components/Lists/TableList.d.ts +42 -0
  65. package/react/components/Lists/TableList.js +145 -0
  66. package/react/components/SearchBar.d.ts +2 -1
  67. package/react/components/SearchBar.js +18 -2
  68. package/react/components/TimePicker.d.ts +1 -0
  69. package/react/components/TimePicker.js +1 -1
  70. package/react/index.d.ts +1 -0
  71. package/react/index.js +4 -1
@@ -3,150 +3,155 @@ import classNames from "classnames";
3
3
  import Scrollspy from "react-scrollspy";
4
4
 
5
5
  interface IMenuItem {
6
- id: string;
7
- label: string;
8
- route?: string;
9
- ref?: string;
10
- onClick?(): void;
6
+ id: string;
7
+ label: string;
8
+ route?: string;
9
+ ref?: string;
10
+ onClick?(): void;
11
11
  }
12
12
 
13
13
  interface IMenuGroup {
14
- label: string;
15
- items: Array<IMenuItem>;
14
+ label: string;
15
+ items: Array<IMenuItem>;
16
16
  }
17
17
 
18
18
  interface IMenu {
19
- className?: string;
20
- groups: Array<IMenuGroup>;
21
- activeItemId: string;
22
- ariaLabel?: string;
23
- scrollSpy?: string;
24
- offset?: number;
25
- reverseItemBorder?: boolean;
26
- style?: "default" | "inverse" | "blanc";
27
- size?: "medium" | "large";
28
- onSelect(id: string, route: string): void;
19
+ className?: string;
20
+ groups: Array<IMenuGroup>;
21
+ activeItemId?: string;
22
+ scrollTo?: string;
23
+ ariaLabel?: string;
24
+ scrollSpy?: string;
25
+ offset?: number;
26
+ reverseItemBorder?: boolean;
27
+ style?: "default" | "inverse" | "blanc";
28
+ size?: "medium" | "large";
29
+ onSelect(id: string, route: string): void;
29
30
  }
30
31
 
31
32
  interface IState {
32
- active: string;
33
+ active: string;
33
34
  }
34
35
 
35
36
  export class LeftMenu extends React.PureComponent<IMenu, IState> {
36
- constructor(props: IMenu) {
37
- super(props);
37
+ constructor(props: IMenu) {
38
+ super(props);
38
39
 
39
- this.state = {
40
- active: "",
41
- };
42
- }
40
+ this.state = {
41
+ active: this.props.activeItemId ? this.props.activeItemId : '',
42
+ };
43
+ }
44
+
45
+ handleClick(item: IMenuItem, event?: React.MouseEvent) {
46
+ event?.preventDefault();
47
+
48
+ this.setState({
49
+ active: item.id,
50
+ });
43
51
 
44
- handleClick(item: IMenuItem, event?: React.MouseEvent) {
45
- event?.preventDefault();
52
+ if (item.ref) {
53
+ return document
54
+ .getElementById(item.ref)
55
+ ?.scrollIntoView({ block: "nearest", behavior: "smooth" });
56
+ }
46
57
 
47
- this.setState({
48
- active: item.id,
49
- });
58
+ if (item.onClick) {
59
+ return item.onClick();
60
+ }
50
61
 
51
- if (item.ref) {
52
- return document
53
- .getElementById(item.ref)
54
- ?.scrollIntoView({ block: "nearest", behavior: "smooth" });
62
+ this.props.onSelect(item.id, item.route ? item.route : "");
55
63
  }
56
64
 
57
- if (item.onClick) {
58
- return item.onClick();
65
+ componentDidMount() {
66
+ if (this.props.scrollTo) {
67
+ return document
68
+ .getElementById(this.props.scrollTo)
69
+ ?.scrollIntoView({ block: "nearest", behavior: "smooth" });
70
+ }
59
71
  }
60
72
 
61
- this.props.onSelect(item.id, item.route ? item.route : "");
62
- }
63
-
64
- render() {
65
- let classes = classNames(
66
- "sd-left-nav",
67
- {
68
- "sd-left-nav--default": this.props.style === undefined,
69
- [`sd-left-nav--${this.props.style}`]:
70
- this.props.style || this.props.style !== undefined,
71
- "sd-left-nav--medium": this.props.size === undefined,
72
- [`sd-left-nav--${this.props.size}`]:
73
- this.props.size || this.props.size !== undefined,
74
- "sd-left-nav--reverse-border": this.props.reverseItemBorder,
75
- },
76
- this.props.className,
77
- );
78
-
79
- const scrollspyList = () => {
80
- let scrollSpyList: Array<string> = [];
81
- let scrollSpyItems: Array<JSX.Element> = [];
82
- this.props.groups.map((element, index) => {
83
- scrollSpyList = [...scrollSpyList, element.label];
84
- scrollSpyItems.push(
85
- <span className="sd-left-nav__group-header" key={"group-" + index}>
86
- {element.label}
87
- </span>,
73
+ render() {
74
+ let classes = classNames(
75
+ "sd-left-nav",
76
+ {
77
+ "sd-left-nav--default": this.props.style === undefined,
78
+ [`sd-left-nav--${this.props.style}`]:
79
+ this.props.style || this.props.style !== undefined,
80
+ "sd-left-nav--medium": this.props.size === undefined,
81
+ [`sd-left-nav--${this.props.size}`]:
82
+ this.props.size || this.props.size !== undefined,
83
+ "sd-left-nav--reverse-border": this.props.reverseItemBorder,
84
+ },
85
+ this.props.className,
88
86
  );
89
87
 
90
- element.items.map((elementOfItem, indexOfItem) => {
91
- scrollSpyList = [...scrollSpyList, `${elementOfItem.ref}`];
92
-
93
- scrollSpyItems.push(
94
- <a
95
- key={"item-" + indexOfItem}
96
- onClick={(event) => {
97
- this.handleClick(elementOfItem, event);
98
- }}
99
- className="sd-left-nav__btn"
100
- >
101
- {elementOfItem.label}
102
- </a>,
103
- );
104
- });
105
- });
106
-
107
- return (
108
- <Scrollspy
109
- offset={this.props.offset ? this.props.offset : -300}
110
- items={scrollSpyList}
111
- rootEl={this.props.scrollSpy}
112
- currentClassName="sd-left-nav__btn--active"
113
- >
114
- {scrollSpyItems.map((element) => element)}
115
- </Scrollspy>
116
- );
117
- };
118
-
119
- const defaultList = () => {
120
- return this.props.groups.map((group, i) => {
88
+ const scrollspyList = () => {
89
+ let scrollSpyList: Array<string> = [];
90
+ let scrollSpyItems: Array<JSX.Element> = [];
91
+ this.props.groups.map((element, index) => {
92
+ scrollSpyList = [...scrollSpyList, element.label];
93
+ scrollSpyItems.push(
94
+ <span className="sd-left-nav__group-header" key={"group-" + index}>
95
+ {element.label}
96
+ </span>,
97
+ );
98
+
99
+ element.items.map((elementOfItem, indexOfItem) => {
100
+ scrollSpyList = [...scrollSpyList, `${elementOfItem.ref}`];
101
+
102
+ scrollSpyItems.push(
103
+ <a key={"item-" + indexOfItem}
104
+ onClick={(event) => {
105
+ this.handleClick(elementOfItem, event);
106
+ }}
107
+ className="sd-left-nav__btn" >
108
+ {elementOfItem.label}
109
+ </a>,
110
+ );
111
+ });
112
+ });
113
+
114
+ return (
115
+ <Scrollspy
116
+ offset={this.props.offset ? this.props.offset : -300}
117
+ items={scrollSpyList}
118
+ rootEl={this.props.scrollSpy}
119
+ currentClassName="sd-left-nav__btn--active" >
120
+ {scrollSpyItems.map((element) => element)}
121
+ </Scrollspy>
122
+ );
123
+ };
124
+
125
+ const defaultList = () => {
126
+ return this.props.groups.map((group, i) => {
127
+ return (
128
+ <React.Fragment key={i}>
129
+ <span className="sd-left-nav__group-header">{group.label}</span>
130
+ {group.items.map((item, j) => {
131
+ return (
132
+ <button
133
+ key={j}
134
+ onClick={(event) => {
135
+ this.handleClick(item, event);
136
+ }}
137
+ className={
138
+ item.id === this.state.active
139
+ ? "sd-left-nav__btn sd-left-nav__btn--active"
140
+ : "sd-left-nav__btn"
141
+ }>
142
+ {item.label}
143
+ </button>
144
+ );
145
+ })}
146
+ </React.Fragment>
147
+ );
148
+ });
149
+ };
150
+
121
151
  return (
122
- <React.Fragment key={i}>
123
- <span className="sd-left-nav__group-header">{group.label}</span>
124
- {group.items.map((item, j) => {
125
- return (
126
- <button
127
- key={j}
128
- onClick={(event) => {
129
- this.handleClick(item, event);
130
- }}
131
- className={
132
- item.id === this.state.active
133
- ? "sd-left-nav__btn sd-left-nav__btn--active"
134
- : "sd-left-nav__btn"
135
- }
136
- >
137
- {item.label}
138
- </button>
139
- );
140
- })}
141
- </React.Fragment>
152
+ <nav className={classes} aria-label={this.props.ariaLabel}>
153
+ {this.props.scrollSpy ? scrollspyList() : defaultList()}
154
+ </nav>
142
155
  );
143
- });
144
- };
145
-
146
- return (
147
- <nav className={classes} aria-label={this.props.ariaLabel}>
148
- {this.props.scrollSpy ? scrollspyList() : defaultList()}
149
- </nav>
150
- );
151
- }
156
+ }
152
157
  }
@@ -1,125 +1,51 @@
1
1
  import * as React from 'react';
2
2
  import classNames from 'classnames';
3
- import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
3
+ import { DragDropContext, Droppable, Draggable, DropResult } from "react-beautiful-dnd";
4
4
  import { Tooltip } from '../Tooltip';
5
5
  import { Button } from '../Button';
6
- import { Dropdown } from '../Dropdown';
6
+ import { Dropdown, IMenuItem, ISubmenu, IMenuGroup } from '../Dropdown';
7
7
 
8
- interface IPropsItem {
9
- start?: React.ReactNode;
10
- center?: React.ReactNode;
11
- end?: React.ReactNode;
12
- action?: React.ReactNode;
13
- addItem?: boolean;
14
- itemsDropdown?: any;
15
- dragAndDrop?: boolean;
16
- onClick?(): void;
17
- }
18
-
19
- class TableListItem extends React.PureComponent<IPropsItem> {
20
- render() {
21
- return (
22
- this.props.addItem ?
23
- <li className='table-list__item-container'>
24
- <div
25
- onClick={this.props.onClick}
26
- className={`table-list__item ${this.props.onClick && 'table-list__item--clickable'} ${this.props.dragAndDrop && 'table-list__item--draggable'}`}>
27
- <div className='table-list__item-content'>
28
- <div className='table-list__item-content-block'>
29
- {this.props.start && this.props.start}
30
- </div>
31
- <div className='table-list__item-content-block table-list__item-content-block--center'>
32
- {this.props.center && this.props.center}
33
- </div>
34
- <div className='table-list__item-content-block'>
35
- {this.props.end && this.props.end}
36
- </div>
37
- </div>
38
- {this.props.action && <div className='table-list__slide-in-actions'>
39
- {this.props.action}
40
- </div>}
41
- </div>
42
- <div className='table-list__add-bar-container'>
43
- <Tooltip text='Add item' flow='top' appendToBody={true}>
44
- <div className='table-list__add-bar'>
45
- <Dropdown
46
- items={this.props.itemsDropdown}>
47
- <Button
48
- type="primary"
49
- icon="plus-large"
50
- text="Add item"
51
- size="small"
52
- shape="round"
53
- iconOnly={true}
54
- onClick={() => false}
55
- />
56
- </Dropdown>
57
- </div>
58
- </Tooltip>
59
- </div>
60
- </li>
61
- : <li
62
- className={`table-list__item ${this.props.onClick && 'table-list__item--clickable'} ${this.props.dragAndDrop && 'table-list__item--draggable'} table-list__item--margin`}
63
- onClick={this.props.onClick}>
64
- <div className='table-list__item-content'>
65
- <div className='table-list__item-content-block'>
66
- {this.props.start && this.props.start}
67
- </div>
68
- <div className='table-list__item-content-block table-list__item-content-block--center'>
69
- {this.props.center && this.props.center}
70
- </div>
71
- <div className='table-list__item-content-block'>
72
- {this.props.end && this.props.end}
73
- </div>
74
- </div>
75
- {this.props.action && <div className='table-list__slide-in-actions'>
76
- {this.props.action}
77
- </div>}
78
- </li>
79
- );
80
- }
81
- }
82
-
83
- interface IProps {
8
+ export interface IProps {
84
9
  children?: React.ReactNode;
85
- array?: Array<IPropsArray>;
10
+ array: Array<IPropsArrayItem>;
86
11
  addItem?: boolean;
87
12
  dragAndDrop?: boolean;
88
- itemsDropdown?: any;
13
+ itemsDropdown?: Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
89
14
  className?: string;
90
- onClick?(): void;
15
+ onDrag?(start: number, end: number): void;
91
16
  }
92
17
 
93
- interface IPropsArray {
18
+ export interface IPropsArrayItem {
94
19
  start?: React.ReactNode;
95
20
  center?: React.ReactNode;
96
21
  end?: React.ReactNode;
97
22
  action?: React.ReactNode;
23
+ onClick?(): void;
98
24
  }
99
25
 
100
- const reorder = (list, startIndex, endIndex) => {
101
- const result = Array.from(list);
102
- const [removed] = result.splice(startIndex, 1);
103
- result.splice(endIndex, 0, removed);
26
+ const reorder = (list: Array<IPropsArrayItem>, startIndex: number, endIndex: number) => {
27
+ const result = Array.from(list);
28
+ const [removed] = result.splice(startIndex, 1);
29
+ result.splice(endIndex, 0, removed);
104
30
 
105
- return result;
31
+ return result;
106
32
  };
107
33
 
108
- class TableList extends React.PureComponent<IProps, {items: any}> {
109
- constructor(props) {
34
+ class TableList extends React.PureComponent<IProps, { items: Array<IPropsArrayItem>}> {
35
+ constructor(props: Readonly<IProps>) {
110
36
  super(props);
111
37
  this.state = {
112
- items: [],
38
+ items: [],
113
39
  };
114
40
 
115
41
  this.onDragEnd = this.onDragEnd.bind(this);
116
42
  }
117
43
 
118
44
  componentDidMount(): void {
119
- this.setState({items: this.props.array});
45
+ this.setState({ items: this.props.array });
120
46
  }
121
47
 
122
- componentDidUpdate(prevProps: Readonly<IProps>, prevState: Readonly<{ items: any; }>, snapshot?: any): void {
48
+ componentDidUpdate(prevProps: Readonly<IProps>): void {
123
49
  if (prevProps.array !== this.props.array) {
124
50
  this.setState({
125
51
  items: this.props.array,
@@ -127,7 +53,7 @@ class TableList extends React.PureComponent<IProps, {items: any}> {
127
53
  }
128
54
  }
129
55
 
130
- onDragEnd(result) {
56
+ onDragEnd(result: DropResult) {
131
57
  if (!result.destination) {
132
58
  return;
133
59
  }
@@ -139,66 +65,144 @@ class TableList extends React.PureComponent<IProps, {items: any}> {
139
65
  this.setState({
140
66
  items,
141
67
  });
68
+
69
+ return this.props.onDrag ?
70
+ this.props.onDrag(result.source.index, result.destination.index) : null;
142
71
  }
143
72
 
144
73
  render() {
145
74
  let classes = classNames({
146
- 'table-list' : !this.props.addItem,
75
+ 'table-list': !this.props.addItem,
147
76
  [`${this.props.className}`]: this.props.className,
148
77
  });
149
78
 
150
79
  return (
151
80
  this.props.array ?
152
81
  this.props.dragAndDrop ?
153
- <DragDropContext onDragEnd={this.onDragEnd}>
154
- <Droppable droppableId="droppable">
155
- {(provided, snapshot) => (
156
- <ul
157
- className={classes}
158
- ref={provided.innerRef}
159
- {...provided.droppableProps} >
160
- {this.state.items.map((item, index) => (
161
- <Draggable key={index} draggableId={`${index}`} index={index}>
162
- {(provided2, snapshot2) => (
163
- <div
164
- ref={provided2.innerRef}
165
- {...provided2.draggableProps}
166
- {...provided2.dragHandleProps} >
167
- <TableListItem
168
- dragAndDrop={this.props.dragAndDrop}
169
- start={item.start}
170
- center={item.center}
171
- end={item.end}
172
- action={item.action}
173
- onClick={item.onClick ? item.onClick : false}
174
- addItem={this.props.addItem}
175
- itemsDropdown={this.props.itemsDropdown} />
176
- </div>
177
- )}
178
- </Draggable>
179
- ))}
180
- {provided.placeholder}
181
- </ul>
182
- )}
183
- </Droppable>
184
- </DragDropContext>
185
- : <ul className={classes}>
186
- {this.state.items.map((item, index) => (
187
- <TableListItem
188
- key={index}
189
- start={item.start}
190
- center={item.center}
191
- end={item.end}
192
- action={item.action}
193
- onClick={item.onClick ? item.onClick : false}
194
- addItem={this.props.addItem}
195
- itemsDropdown={this.props.itemsDropdown} />
196
- ))}
82
+ <DragDropContext onDragEnd={this.onDragEnd}>
83
+ <Droppable droppableId="droppable">
84
+ {(provided, _snapshot) => (
85
+ <ul
86
+ className={classes}
87
+ ref={provided.innerRef}
88
+ {...provided.droppableProps} >
89
+ {this.state.items.map((item: IPropsArrayItem, index: number) => (
90
+ <Draggable key={index} draggableId={`${index}`} index={index}>
91
+ {(provided2, _snapshot2) => (
92
+ <div
93
+ ref={provided2.innerRef}
94
+ {...provided2.draggableProps}
95
+ {...provided2.dragHandleProps} >
96
+ <TableListItem
97
+ dragAndDrop={this.props.dragAndDrop}
98
+ start={item.start}
99
+ center={item.center}
100
+ end={item.end}
101
+ action={item.action}
102
+ onClick={item.onClick ? item.onClick : undefined}
103
+ addItem={this.props.addItem}
104
+ itemsDropdown={this.props.itemsDropdown} />
105
+ </div>
106
+ )}
107
+ </Draggable>
108
+ ))}
109
+ {provided.placeholder}
110
+ </ul>
111
+ )}
112
+ </Droppable>
113
+ </DragDropContext>
114
+ : <ul className={classes}>
115
+ {this.state.items.map((item: IPropsArrayItem, index: number) => (
116
+ <TableListItem
117
+ key={index}
118
+ start={item.start}
119
+ center={item.center}
120
+ end={item.end}
121
+ action={item.action}
122
+ onClick={item.onClick ? item.onClick : undefined}
123
+ addItem={this.props.addItem}
124
+ itemsDropdown={this.props.itemsDropdown} />
125
+ ))}
126
+ </ul>
127
+ : this.props.children &&
128
+ <ul className={classes}>
129
+ {this.props.children}
197
130
  </ul>
198
- : this.props.children &&
199
- <ul className={classes}>
200
- {this.props.children}
201
- </ul>
131
+ );
132
+ }
133
+ }
134
+
135
+ export interface IPropsItem {
136
+ start?: React.ReactNode;
137
+ center?: React.ReactNode;
138
+ end?: React.ReactNode;
139
+ action?: React.ReactNode;
140
+ addItem?: boolean;
141
+ itemsDropdown?: any;
142
+ dragAndDrop?: boolean;
143
+ onClick?(): void;
144
+ }
145
+
146
+ class TableListItem extends React.PureComponent<IPropsItem> {
147
+ render() {
148
+ return (
149
+ this.props.addItem ?
150
+ <li className='table-list__item-container'>
151
+ <div
152
+ onClick={this.props.onClick}
153
+ className={`table-list__item ${this.props.onClick && 'table-list__item--clickable'} ${this.props.dragAndDrop && 'table-list__item--draggable'}`}>
154
+ <div className='table-list__item-content'>
155
+ <div className='table-list__item-content-block'>
156
+ {this.props.start && this.props.start}
157
+ </div>
158
+ <div className='table-list__item-content-block table-list__item-content-block--center'>
159
+ {this.props.center && this.props.center}
160
+ </div>
161
+ <div className='table-list__item-content-block'>
162
+ {this.props.end && this.props.end}
163
+ </div>
164
+ </div>
165
+ {this.props.action && <div className='table-list__slide-in-actions'>
166
+ {this.props.action}
167
+ </div>}
168
+ </div>
169
+ <div className='table-list__add-bar-container'>
170
+ <Tooltip text='Add item' flow='top' appendToBody={true}>
171
+ <div className='table-list__add-bar'>
172
+ <Dropdown
173
+ items={this.props.itemsDropdown}>
174
+ <Button
175
+ type="primary"
176
+ icon="plus-large"
177
+ text="Add item"
178
+ size="small"
179
+ shape="round"
180
+ iconOnly={true}
181
+ onClick={() => false}
182
+ />
183
+ </Dropdown>
184
+ </div>
185
+ </Tooltip>
186
+ </div>
187
+ </li>
188
+ : <li
189
+ className={`table-list__item ${this.props.onClick && 'table-list__item--clickable'} ${this.props.dragAndDrop && 'table-list__item--draggable'} table-list__item--margin`}
190
+ onClick={this.props.onClick}>
191
+ <div className='table-list__item-content'>
192
+ <div className='table-list__item-content-block'>
193
+ {this.props.start && this.props.start}
194
+ </div>
195
+ <div className='table-list__item-content-block table-list__item-content-block--center'>
196
+ {this.props.center && this.props.center}
197
+ </div>
198
+ <div className='table-list__item-content-block'>
199
+ {this.props.end && this.props.end}
200
+ </div>
201
+ </div>
202
+ {this.props.action && <div className='table-list__slide-in-actions'>
203
+ {this.props.action}
204
+ </div>}
205
+ </li>
202
206
  );
203
207
  }
204
208
  }