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
@@ -14,40 +14,40 @@ interface IProps {
14
14
  export default class TableListDoc extends React.Component<IProps, IState> {
15
15
  constructor(props: IState) {
16
16
  super(props);
17
- this.state={
17
+ this.state = {
18
18
  array: [
19
19
  {
20
20
  start: <>
21
- <Label style='translucent' text='aacc' />
22
- <Label style='translucent' type='primary' text='prlg' />
23
- </>,
21
+ <Label style='translucent' text='aacc' />
22
+ <Label style='translucent' type='primary' text='prlg' />
23
+ </>,
24
24
  center: <span>Item 1</span>,
25
25
  end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
26
- action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
26
+ action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />,
27
27
  onClick: () => {
28
28
  return false;
29
29
  }
30
30
  },
31
31
  {
32
32
  start: <>
33
- <Label style='translucent' text='aacc' />
34
- <Label style='translucent' type='primary' text='prlg' />
35
- </>,
33
+ <Label style='translucent' text='aacc' />
34
+ <Label style='translucent' type='primary' text='prlg' />
35
+ </>,
36
36
  center: <span>Item 2</span>,
37
37
  end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
38
- action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
38
+ action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />,
39
39
  onClick: () => {
40
40
  return false;
41
41
  }
42
42
  },
43
43
  {
44
44
  start: <>
45
- <Label style='translucent' text='aacc' />
46
- <Label style='translucent' type='primary' text='prlg' />
47
- </>,
45
+ <Label style='translucent' text='aacc' />
46
+ <Label style='translucent' type='primary' text='prlg' />
47
+ </>,
48
48
  center: <span>Item 3</span>,
49
49
  end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
50
- action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
50
+ action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />,
51
51
  onClick: () => {
52
52
  return false;
53
53
  }
@@ -61,7 +61,7 @@ export default class TableListDoc extends React.Component<IProps, IState> {
61
61
  return (
62
62
  <section className='docs-page__container'>
63
63
  <h2 className='docs-page__h2'>TableList</h2>
64
-
64
+
65
65
  <Markup.ReactMarkupCodePreview>{`
66
66
  <TableList
67
67
  dragAndDrop
@@ -82,50 +82,50 @@ export default class TableListDoc extends React.Component<IProps, IState> {
82
82
 
83
83
  <TableList>
84
84
  <TableListItem
85
- start={
86
- <>
87
- <Label style='translucent' text='aacc' />
88
- <Label style='translucent' type='primary' text='prlg' />
89
- </>
90
- }
91
- center={
92
- <span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
93
- }
94
- end={
95
- <IconLabel style='translucent' text='Label success' type='success' icon='time' />
96
- }
97
- action={
98
- <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
99
- } />
85
+ start={
86
+ <>
87
+ <Label style='translucent' text='aacc' />
88
+ <Label style='translucent' type='primary' text='prlg' />
89
+ </>
90
+ }
91
+ center={
92
+ <span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
93
+ }
94
+ end={
95
+ <IconLabel style='translucent' text='Label success' type='success' icon='time' />
96
+ }
97
+ action={
98
+ <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />
99
+ } />
100
100
  <TableListItem
101
- start={
102
- <>
103
- <Label style='hollow' text='aacc' />
104
- <Label style='filled' type='primary' text='prlg' />
105
- </>
106
- }
107
- center={
108
- <span>Nullam id dolor id nibh ultricies vehicula ut id elit.</span>
109
- }
110
- end={
111
- <IconLabel style='translucent' text='Label success' type='success' icon='time' />
112
- } />
101
+ start={
102
+ <>
103
+ <Label style='hollow' text='aacc' />
104
+ <Label style='filled' type='primary' text='prlg' />
105
+ </>
106
+ }
107
+ center={
108
+ <span>Nullam id dolor id nibh ultricies vehicula ut id elit.</span>
109
+ }
110
+ end={
111
+ <IconLabel style='translucent' text='Label success' type='success' icon='time' />
112
+ } />
113
113
  <TableListItem
114
- start={
115
- <>
116
- <Label style='translucent' text='aacc' />
117
- <Label style='translucent' type='primary' text='prlg' />
118
- </>
119
- }
120
- center={
121
- <span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
122
- }
123
- end={
124
- <IconLabel style='translucent' text='Label success' type='success' icon='time' />
125
- }
126
- action={
127
- <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
128
- } />
114
+ start={
115
+ <>
116
+ <Label style='translucent' text='aacc' />
117
+ <Label style='translucent' type='primary' text='prlg' />
118
+ </>
119
+ }
120
+ center={
121
+ <span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
122
+ }
123
+ end={
124
+ <IconLabel style='translucent' text='Label success' type='success' icon='time' />
125
+ }
126
+ action={
127
+ <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />
128
+ } />
129
129
  </TableList>
130
130
 
131
131
  </Markup.ReactMarkupPreview>
@@ -183,17 +183,18 @@ export default class TableListDoc extends React.Component<IProps, IState> {
183
183
  <p className="docs-page__paragraph">With drag and drop functionality:</p>
184
184
  <Markup.ReactMarkup>
185
185
  <Markup.ReactMarkupPreview>
186
-
186
+
187
187
  <TableList
188
- dragAndDrop
189
- addItem
190
- array={this.state.array}
191
- itemsDropdown={[
192
- { label: <Label style='translucent' type='primary' text='aacc' />, onSelect: () => 1 },
193
- { label: <Label style='translucent' text='prlg' />, onSelect: () => 1 },
194
- { label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
195
- ]}
196
- onClick={() => false}
188
+ dragAndDrop
189
+ addItem
190
+ array={this.state.array}
191
+ itemsDropdown={[
192
+ { label: <Label style='translucent' type='primary' text='aacc' />, onSelect: () => 1 },
193
+ { label: <Label style='translucent' text='prlg' />, onSelect: () => 1 },
194
+ { label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
195
+ ]}
196
+ onClick={() => false}
197
+ onDrag={(start, end) => console.log(start, end)}
197
198
  />
198
199
 
199
200
  </Markup.ReactMarkupPreview>
@@ -216,28 +217,29 @@ export default class TableListDoc extends React.Component<IProps, IState> {
216
217
  <h3 className="docs-page__h3">Props</h3>
217
218
  <p className="docs-page__paragraph">TableList</p>
218
219
  <PropsList>
219
- <Prop name='array' isRequired={false} type='Array' default='false' description='Array of object.'/>
220
- <Prop name='children' isRequired={false} type='React.ReactNode' default='false' description='Children of component.'/>
221
- <Prop name='addItem' isRequired={false} type='boolean' default='false' description='Functionality to add items to the list.'/>
222
- <Prop name='dragAndDrop' isRequired={false} type='boolean' default='false' description='Drag&Drop functionality.'/>
223
- <Prop name='itemsDropdown' isRequired={false} type='React.ReactNode | any' default='false' description='Dropdown for functionality to add items to the list.'/>
224
- <Prop name='className' isRequired={false} type='string' default='false' description='Add class on TableList container.'/>
225
- <Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.'/>
220
+ <Prop name='array' isRequired={false} type='Array' default='false' description='Array of object.' />
221
+ <Prop name='children' isRequired={false} type='React.ReactNode' default='false' description='Children of component.' />
222
+ <Prop name='addItem' isRequired={false} type='boolean' default='false' description='Functionality to add items to the list.' />
223
+ <Prop name='dragAndDrop' isRequired={false} type='boolean' default='false' description='Drag&Drop functionality.' />
224
+ <Prop name='itemsDropdown' isRequired={false} type='React.ReactNode | any' default='false' description='Dropdown for functionality to add items to the list.' />
225
+ <Prop name='className' isRequired={false} type='string' default='false' description='Add class on TableList container.' />
226
+ <Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.' />
227
+ <Prop name='onDrag' isRequired={false} type='function' default='false' description='Returns start and end position of draggable item' />
226
228
  </PropsList>
227
229
  <p className="docs-page__paragraph">array:</p>
228
230
  <PropsList>
229
- <Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
230
- <Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
231
- <Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
232
- <Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.'/>
231
+ <Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
232
+ <Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
233
+ <Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
234
+ <Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.' />
233
235
  </PropsList>
234
236
  <p className="docs-page__paragraph">TableListItem</p>
235
237
  <PropsList>
236
- <Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
237
- <Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
238
- <Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
239
- <Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.'/>
240
- <Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.'/>
238
+ <Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
239
+ <Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
240
+ <Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
241
+ <Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.' />
242
+ <Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.' />
241
243
  </PropsList>
242
244
 
243
245
  </section>
@@ -24,6 +24,7 @@ class TimePickerExample extends React.PureComponent<{}, {time: string}> {
24
24
  label={'This is Label'}
25
25
  info={'This is info'}
26
26
  error={'This is error'}
27
+ allowSeconds
27
28
  />
28
29
  );
29
30
  }
@@ -75,14 +76,15 @@ export default class TimePickerDoc extends React.Component {
75
76
 
76
77
  <h3 className='docs-page__h3'>Props</h3>
77
78
  <PropsList>
78
- <Prop name='value' isRequired={true} type='string' default='/' description='Item value' />
79
- <Prop name='required' isRequired={false} type='boolean' default='false' description='Mark field as required' />
80
- <Prop name='disabled' isRequired={false} type='boolean' default='false' description='Mark field as disabled' />
79
+ <Prop name='value' isRequired={true} type='string' default='/' description='Item value.' />
80
+ <Prop name='allowSeconds' isRequired={true} type='string' default='/' description='Allow seconds.' />
81
+ <Prop name='required' isRequired={false} type='boolean' default='false' description='Mark field as required.' />
82
+ <Prop name='disabled' isRequired={false} type='boolean' default='false' description='Mark field as disabled.' />
81
83
  </PropsList>
82
84
 
83
85
  <h3 className='docs-page__h3'>Events</h3>
84
86
  <PropsList>
85
- <Prop name='onChange' isRequired={true} type='function' default='/' description='Returns value of time input' />
87
+ <Prop name='onChange' isRequired={true} type='function' default='/' description='Returns value of time input.' />
86
88
  </PropsList>
87
89
  </section>
88
90
  );
@@ -183,7 +183,7 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
183
183
  error={'Error Message'}
184
184
  required
185
185
  label={'TreeSelect Label'}
186
- singleLevelSearch
186
+
187
187
  />
188
188
  </div>
189
189
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "3.0.1-beta.6",
3
+ "version": "3.0.1-beta.8",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,6 +31,7 @@
31
31
  "@types/classnames": "^2.2.9",
32
32
  "@types/lodash": "^4.14.161",
33
33
  "@types/react": "16.8.23",
34
+ "@types/react-beautiful-dnd": "^13.1.2",
34
35
  "@types/react-dom": "16.8.0",
35
36
  "@types/react-router-dom": "^5.1.2",
36
37
  "@types/react-scrollspy": "^3.3.5",
@@ -19,6 +19,7 @@ interface IState {
19
19
  hours?: any;
20
20
  minutes?: any;
21
21
  seconds?: any;
22
+ blink?: string;
22
23
  }
23
24
  export declare class DurationInput extends React.PureComponent<IProps, IState> {
24
25
  hourRef: React.RefObject<HTMLInputElement>;
@@ -27,7 +28,7 @@ export declare class DurationInput extends React.PureComponent<IProps, IState> {
27
28
  private htmlId;
28
29
  constructor(props: IProps);
29
30
  stateUpdate(state: string, parametar1?: number, parametar2?: number, parametar3?: number): string | number;
30
- componentDidUpdate(_: any, prevState: IState): void;
31
+ componentDidUpdate(prevProps: any, prevState: IState): void;
31
32
  valueUpdate(): void;
32
33
  handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>): void;
33
34
  handleKeyValue(event: React.KeyboardEvent<HTMLInputElement>, state: 'hours' | 'minutes' | 'seconds'): void;
@@ -52,6 +52,7 @@ var DurationInput = /** @class */ (function (_super) {
52
52
  hours: _this.stateUpdate('hours', _this.props.hours, _this.props.minutes, _this.props.seconds),
53
53
  minutes: _this.stateUpdate('minutes', _this.props.minutes, _this.props.seconds),
54
54
  seconds: _this.stateUpdate('seconds', _this.props.seconds),
55
+ blink: '',
55
56
  };
56
57
  _this.hourRef = React.createRef();
57
58
  _this.minuteRef = React.createRef();
@@ -82,7 +83,8 @@ var DurationInput = /** @class */ (function (_super) {
82
83
  }
83
84
  return this.zeroPad(value);
84
85
  };
85
- DurationInput.prototype.componentDidUpdate = function (_, prevState) {
86
+ DurationInput.prototype.componentDidUpdate = function (prevProps, prevState) {
87
+ var _this = this;
86
88
  if (!this.hourRef.current || !this.minuteRef.current || !this.secondRef.current) {
87
89
  return;
88
90
  }
@@ -99,6 +101,10 @@ var DurationInput = /** @class */ (function (_super) {
99
101
  hours: this.zeroPad(Number(this.state.hours) + 1),
100
102
  minutes: this.zeroPad(this.state.minutes % 60),
101
103
  });
104
+ this.setState({ blink: 'hour' });
105
+ setTimeout(function () {
106
+ _this.setState({ blink: '' });
107
+ }, 500);
102
108
  }
103
109
  if (Number(this.minuteRef.current.value) < 0) {
104
110
  this.setState({
@@ -107,6 +113,10 @@ var DurationInput = /** @class */ (function (_super) {
107
113
  : this.zeroPad(Number(this.state.hours)),
108
114
  minutes: 59,
109
115
  });
116
+ this.setState({ blink: 'hour' });
117
+ setTimeout(function () {
118
+ _this.setState({ blink: '' });
119
+ }, 500);
110
120
  }
111
121
  }
112
122
  if (this.state.seconds !== prevState.seconds) {
@@ -115,14 +125,31 @@ var DurationInput = /** @class */ (function (_super) {
115
125
  minutes: this.zeroPad(Number(this.state.minutes) + 1),
116
126
  seconds: this.zeroPad(this.state.seconds % 60),
117
127
  });
128
+ this.setState({ blink: 'minute' });
129
+ setTimeout(function () {
130
+ _this.setState({ blink: '' });
131
+ }, 500);
118
132
  }
119
133
  if (Number(this.secondRef.current.value) < 0) {
120
134
  this.setState({
121
135
  minutes: this.zeroPad(Number(this.state.minutes) - 1),
122
136
  seconds: 59,
123
137
  });
138
+ this.setState({ blink: 'minute' });
139
+ setTimeout(function () {
140
+ _this.setState({ blink: '' });
141
+ }, 500);
124
142
  }
125
143
  }
144
+ if ((this.props.hours !== prevProps.hours)
145
+ || (this.props.minutes !== prevProps.minutes)
146
+ || (this.props.seconds !== prevProps.seconds)) {
147
+ this.setState({
148
+ hours: this.stateUpdate('hours', this.props.hours, this.props.minutes, this.props.seconds),
149
+ minutes: this.stateUpdate('minutes', this.props.minutes, this.props.seconds),
150
+ seconds: this.stateUpdate('seconds', this.props.seconds),
151
+ });
152
+ }
126
153
  };
127
154
  DurationInput.prototype.valueUpdate = function () {
128
155
  if (this.props.onChange) {
@@ -226,7 +253,12 @@ var DurationInput = /** @class */ (function (_super) {
226
253
  DurationInput.prototype.handleChange = function (event, state) {
227
254
  var stateClone = {};
228
255
  if (event.target.value.length >= 2) {
229
- stateClone[state] = event.target.value.slice(0, 2);
256
+ if (event.target.selectionStart === 1 && event.target.selectionEnd === 1) {
257
+ stateClone[state] = event.target.value.slice(0, 1) + event.target.value.slice(2, 3);
258
+ }
259
+ else {
260
+ stateClone[state] = event.target.value.slice(0, 2);
261
+ }
230
262
  }
231
263
  else {
232
264
  stateClone[state] = event.target.value;
@@ -261,13 +293,13 @@ var DurationInput = /** @class */ (function (_super) {
261
293
  var InputClasses = (0, classnames_1.default)('sd-input__duration-input');
262
294
  return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.props.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
263
295
  React.createElement("div", { className: InputClasses },
264
- React.createElement("input", { className: 'duration-input', type: 'text', id: 'hours', max: 99, min: 0, ref: this.hourRef, value: this.state.hours, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.minuteRef.current); }, onChange: function (event) { _this.handleChange(event, 'hours'); }, onBlur: function (event) { return _this.setState({ hours: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
296
+ React.createElement("input", { className: "duration-input ".concat(this.state.blink === 'hour' ? 'blink_me' : ''), type: 'text', id: 'hours', max: 99, min: 0, ref: this.hourRef, value: this.state.hours, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.minuteRef.current); }, onChange: function (event) { _this.handleChange(event, 'hours'); }, onBlur: function (event) { return _this.setState({ hours: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
265
297
  if (!/[0-9]/.test(event.key)) {
266
298
  event.preventDefault();
267
299
  }
268
300
  } }),
269
301
  React.createElement("span", { className: 'sd-input__suffix' }, "h"),
270
- React.createElement("input", { className: 'duration-input', type: 'text', id: 'minutes', ref: this.minuteRef, value: this.state.minutes, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.secondRef.current); }, onChange: function (event) { _this.handleChange(event, 'minutes'); }, onBlur: function (event) { return _this.setState({ minutes: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
302
+ React.createElement("input", { className: "duration-input ".concat(this.state.blink === 'minute' ? 'blink_me' : ''), type: 'text', id: 'minutes', ref: this.minuteRef, value: this.state.minutes, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.secondRef.current); }, onChange: function (event) { _this.handleChange(event, 'minutes'); }, onBlur: function (event) { return _this.setState({ minutes: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
271
303
  if (!/[0-9]/.test(event.key)) {
272
304
  event.preventDefault();
273
305
  }
@@ -4,6 +4,7 @@ interface IProps {
4
4
  size?: 'small' | 'large';
5
5
  title: string;
6
6
  description?: string;
7
+ absolutePositioned?: boolean;
7
8
  }
8
9
  export declare class EmptyState extends React.PureComponent<IProps> {
9
10
  render(): JSX.Element;
@@ -53,7 +53,7 @@ var EmptyState = /** @class */ (function (_super) {
53
53
  _a["content-state__image--".concat(this.props.size)] = this.props.size || this.props.size !== undefined,
54
54
  _a));
55
55
  var image = require("../../app/img/empty_states/empty-state--".concat(this.props.size ? this.props.size : 'small', "-").concat(this.props.illustration ? this.props.illustration : '1', ".svg"));
56
- return (React.createElement("div", { className: 'content-state--empty-container' },
56
+ return (React.createElement("div", { className: 'content-state--empty-container' + (this.props.absolutePositioned ? ' content-state__empty-container--absolute' : '') },
57
57
  React.createElement("div", { className: 'content-state__empty-info' },
58
58
  React.createElement("figure", { className: classes },
59
59
  React.createElement("img", { src: image, alt: this.props.illustration })),
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ children: React.ReactNode;
4
+ spaces?: 'default' | 'condensed' | 'relaxed';
5
+ marginBottom?: '0' | '1' | '2' | '3' | '4';
6
+ inlineLabels?: boolean;
7
+ rowLabel?: string;
8
+ }
9
+ export declare class FormRowNew extends React.PureComponent<IProps> {
10
+ render(): JSX.Element;
11
+ }
12
+ export {};
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.FormRowNew = void 0;
41
+ var React = __importStar(require("react"));
42
+ var classnames_1 = __importDefault(require("classnames"));
43
+ var FormRowNew = /** @class */ (function (_super) {
44
+ __extends(FormRowNew, _super);
45
+ function FormRowNew() {
46
+ return _super !== null && _super.apply(this, arguments) || this;
47
+ }
48
+ FormRowNew.prototype.render = function () {
49
+ var _a;
50
+ var classes = (0, classnames_1.default)('form__group-new', (_a = {},
51
+ _a["form__group-new--".concat(this.props.spaces)] = this.props.spaces,
52
+ _a["form__group-new--mb-".concat(this.props.marginBottom)] = this.props.marginBottom,
53
+ _a['form__group-new--inline-labels'] = this.props.inlineLabels,
54
+ _a['form__group-new--has_row-label'] = this.props.rowLabel,
55
+ _a));
56
+ if (this.props.rowLabel) {
57
+ return (React.createElement("div", { className: 'form__group-new__wrapper' },
58
+ React.createElement("label", { className: 'form__group-new__label', htmlFor: "form__group-new__label" }, this.props.rowLabel),
59
+ React.createElement("div", { className: classes }, this.props.children)));
60
+ }
61
+ else {
62
+ return (React.createElement("div", { className: classes }, this.props.children));
63
+ }
64
+ };
65
+ return FormRowNew;
66
+ }(React.PureComponent));
67
+ exports.FormRowNew = FormRowNew;
@@ -6,3 +6,4 @@ export { FormLabel } from './FormLabel';
6
6
  export { InputWrapper } from './InputWrapper';
7
7
  export { InputBase } from './InputBase';
8
8
  export { InputNew } from './InputNew';
9
+ export { FormRowNew } from './FormRowNew';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InputNew = exports.InputBase = exports.InputWrapper = exports.FormLabel = exports.FormText = exports.FormItem = exports.FormGroup = exports.FormRow = void 0;
3
+ exports.FormRowNew = exports.InputNew = exports.InputBase = exports.InputWrapper = exports.FormLabel = exports.FormText = exports.FormItem = exports.FormGroup = exports.FormRow = void 0;
4
4
  var FormRow_1 = require("./FormRow");
5
5
  Object.defineProperty(exports, "FormRow", { enumerable: true, get: function () { return FormRow_1.FormRow; } });
6
6
  var FormGroup_1 = require("./FormGroup");
@@ -17,3 +17,5 @@ var InputBase_1 = require("./InputBase");
17
17
  Object.defineProperty(exports, "InputBase", { enumerable: true, get: function () { return InputBase_1.InputBase; } });
18
18
  var InputNew_1 = require("./InputNew");
19
19
  Object.defineProperty(exports, "InputNew", { enumerable: true, get: function () { return InputNew_1.InputNew; } });
20
+ var FormRowNew_1 = require("./FormRowNew");
21
+ Object.defineProperty(exports, "FormRowNew", { enumerable: true, get: function () { return FormRowNew_1.FormRowNew; } });
@@ -4,6 +4,7 @@ interface IProps {
4
4
  side?: 'left' | 'right';
5
5
  background?: 'transparent' | 'light' | 'grey' | 'dark';
6
6
  open?: boolean;
7
+ large?: boolean;
7
8
  }
8
9
  export declare class AuthoringContainer extends React.PureComponent<IProps> {
9
10
  render(): JSX.Element;
@@ -53,7 +53,7 @@ var AuthoringContainer = /** @class */ (function (_super) {
53
53
  _a['open-editor'] = this.props.open,
54
54
  _a));
55
55
  return (React.createElement("div", { className: classes },
56
- React.createElement("div", { className: 'sd-editor__container' }, this.props.children)));
56
+ React.createElement("div", { className: "sd-editor__container ".concat(this.props.large ? 'sd-editor__container--large' : '') }, this.props.children)));
57
57
  };
58
58
  return AuthoringContainer;
59
59
  }(React.PureComponent));
@@ -13,7 +13,8 @@ interface IMenuGroup {
13
13
  interface IMenu {
14
14
  className?: string;
15
15
  groups: Array<IMenuGroup>;
16
- activeItemId: string;
16
+ activeItemId?: string;
17
+ scrollTo?: string;
17
18
  ariaLabel?: string;
18
19
  scrollSpy?: string;
19
20
  offset?: number;
@@ -28,6 +29,7 @@ interface IState {
28
29
  export declare class LeftMenu extends React.PureComponent<IMenu, IState> {
29
30
  constructor(props: IMenu);
30
31
  handleClick(item: IMenuItem, event?: React.MouseEvent): void;
32
+ componentDidMount(): void;
31
33
  render(): JSX.Element;
32
34
  }
33
35
  export {};
@@ -55,7 +55,7 @@ var LeftMenu = /** @class */ (function (_super) {
55
55
  function LeftMenu(props) {
56
56
  var _this = _super.call(this, props) || this;
57
57
  _this.state = {
58
- active: "",
58
+ active: _this.props.activeItemId ? _this.props.activeItemId : '',
59
59
  };
60
60
  return _this;
61
61
  }
@@ -74,6 +74,13 @@ var LeftMenu = /** @class */ (function (_super) {
74
74
  }
75
75
  this.props.onSelect(item.id, item.route ? item.route : "");
76
76
  };
77
+ LeftMenu.prototype.componentDidMount = function () {
78
+ var _a;
79
+ if (this.props.scrollTo) {
80
+ return (_a = document
81
+ .getElementById(this.props.scrollTo)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: "nearest", behavior: "smooth" });
82
+ }
83
+ };
77
84
  LeftMenu.prototype.render = function () {
78
85
  var _a;
79
86
  var _this = this;