superdesk-ui-framework 3.0.1-beta.24 → 3.0.1-beta.26

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 (89) hide show
  1. package/app/styles/_sd-tag-input.scss +36 -1
  2. package/app/styles/_table-list.scss +1 -0
  3. package/app/styles/primereact/_pr-dialog.scss +4 -0
  4. package/app-typescript/components/Label.tsx +17 -1
  5. package/app-typescript/components/Layouts/AuthoringFrame.tsx +2 -1
  6. package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +21 -2
  7. package/app-typescript/components/Lists/ContentList.tsx +31 -26
  8. package/app-typescript/components/Lists/TableList.tsx +62 -2
  9. package/app-typescript/components/Menu.tsx +2 -2
  10. package/app-typescript/components/Spacer.tsx +1 -1
  11. package/app-typescript/components/TreeSelect.tsx +85 -33
  12. package/dist/examples.bundle.js +1554 -1175
  13. package/dist/playgrounds/react-playgrounds/Index.tsx +1 -0
  14. package/dist/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
  15. package/dist/react/TableList.tsx +2 -0
  16. package/dist/react/TreeSelect.tsx +100 -78
  17. package/dist/superdesk-ui.bundle.css +34 -2
  18. package/dist/superdesk-ui.bundle.js +1137 -1050
  19. package/dist/vendor.bundle.js +4 -4
  20. package/examples/index.js +4 -0
  21. package/examples/pages/playgrounds/react-playgrounds/Index.tsx +1 -0
  22. package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
  23. package/examples/pages/react/TableList.tsx +2 -0
  24. package/examples/pages/react/TreeSelect.tsx +100 -78
  25. package/package.json +1 -1
  26. package/react/components/Label.d.ts +1 -0
  27. package/react/components/Label.js +17 -2
  28. package/react/components/Layouts/AuthoringFrame.d.ts +1 -0
  29. package/react/components/Layouts/AuthoringFrame.js +1 -1
  30. package/react/components/Layouts/AuthoringFrameRightBar.d.ts +9 -2
  31. package/react/components/Layouts/AuthoringFrameRightBar.js +14 -3
  32. package/react/components/Lists/ContentList.d.ts +1 -0
  33. package/react/components/Lists/ContentList.js +5 -1
  34. package/react/components/Lists/TableList.d.ts +1 -0
  35. package/react/components/Lists/TableList.js +34 -6
  36. package/react/components/Menu.js +1 -1
  37. package/react/components/TreeSelect.d.ts +3 -1
  38. package/react/components/TreeSelect.js +50 -23
  39. package/.vscode/settings.json +0 -5
  40. package/app-typescript/dist/components/Alert.d.ts +0 -16
  41. package/app-typescript/dist/components/Autocomplete.d.ts +0 -48
  42. package/app-typescript/dist/components/Avatar.d.ts +0 -33
  43. package/app-typescript/dist/components/Badge.d.ts +0 -13
  44. package/app-typescript/dist/components/Button.d.ts +0 -23
  45. package/app-typescript/dist/components/ButtonGroup.d.ts +0 -12
  46. package/app-typescript/dist/components/CheckButtonGroup.d.ts +0 -11
  47. package/app-typescript/dist/components/CheckGroup.d.ts +0 -9
  48. package/app-typescript/dist/components/Checkbox.d.ts +0 -19
  49. package/app-typescript/dist/components/CheckboxButton.d.ts +0 -19
  50. package/app-typescript/dist/components/DatePicker.d.ts +0 -37
  51. package/app-typescript/dist/components/Divider.d.ts +0 -9
  52. package/app-typescript/dist/components/DonutChart.d.ts +0 -12
  53. package/app-typescript/dist/components/Dropdown.d.ts +0 -28
  54. package/app-typescript/dist/components/DropdownFirst.d.ts +0 -42
  55. package/app-typescript/dist/components/EmptyState.d.ts +0 -11
  56. package/app-typescript/dist/components/FormLabel.d.ts +0 -9
  57. package/app-typescript/dist/components/Genie.d.ts +0 -13
  58. package/app-typescript/dist/components/GridItem.d.ts +0 -69
  59. package/app-typescript/dist/components/GridList.d.ts +0 -14
  60. package/app-typescript/dist/components/HeadingText.d.ts +0 -10
  61. package/app-typescript/dist/components/HelloWorld.d.ts +0 -8
  62. package/app-typescript/dist/components/Icon.d.ts +0 -12
  63. package/app-typescript/dist/components/IconButton.d.ts +0 -12
  64. package/app-typescript/dist/components/IconLabel.d.ts +0 -11
  65. package/app-typescript/dist/components/Input.d.ts +0 -24
  66. package/app-typescript/dist/components/Label.d.ts +0 -15
  67. package/app-typescript/dist/components/LeftMenu.d.ts +0 -26
  68. package/app-typescript/dist/components/Loader.d.ts +0 -8
  69. package/app-typescript/dist/components/NavButton.d.ts +0 -15
  70. package/app-typescript/dist/components/Popover.d.ts +0 -13
  71. package/app-typescript/dist/components/PropsList.d.ts +0 -15
  72. package/app-typescript/dist/components/Radio.d.ts +0 -19
  73. package/app-typescript/dist/components/RadioButton.d.ts +0 -20
  74. package/app-typescript/dist/components/Select.d.ts +0 -29
  75. package/app-typescript/dist/components/SelectWithTemplate.d.ts +0 -32
  76. package/app-typescript/dist/components/SlidingToolbar.d.ts +0 -8
  77. package/app-typescript/dist/components/StrechBar.d.ts +0 -4
  78. package/app-typescript/dist/components/SubNav.d.ts +0 -10
  79. package/app-typescript/dist/components/Switch.d.ts +0 -12
  80. package/app-typescript/dist/components/TabCustom.d.ts +0 -25
  81. package/app-typescript/dist/components/TabList.d.ts +0 -22
  82. package/app-typescript/dist/components/Tag.d.ts +0 -9
  83. package/app-typescript/dist/components/TagInput.d.ts +0 -7
  84. package/app-typescript/dist/components/TagInputTest.d.ts +0 -18
  85. package/app-typescript/dist/components/TimePicker.d.ts +0 -11
  86. package/app-typescript/dist/components/Tooltip.d.ts +0 -11
  87. package/app-typescript/dist/components/_Positioner.d.ts +0 -27
  88. package/app-typescript/dist/index.d.ts +0 -56
  89. package/yarn-error.log +0 -111
@@ -7,7 +7,7 @@
7
7
  var a = typeof exports === 'object' ? factory(require("react"), require("react-dom")) : factory(root["react"], root["react-dom"]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_9__) {
10
+ })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_7__) {
11
11
  return /******/ (function(modules) { // webpackBootstrap
12
12
  /******/ // The module cache
13
13
  /******/ var installedModules = {};
@@ -28264,7 +28264,7 @@ __webpack_require__(541);
28264
28264
 
28265
28265
  __webpack_require__(0);
28266
28266
 
28267
- __webpack_require__(9);
28267
+ __webpack_require__(7);
28268
28268
 
28269
28269
  /***/ }),
28270
28270
 
@@ -69964,10 +69964,10 @@ angular.module('ngAnimate', [], function initAngularHelpers() {
69964
69964
 
69965
69965
  /***/ }),
69966
69966
 
69967
- /***/ 9:
69967
+ /***/ 7:
69968
69968
  /***/ (function(module, exports) {
69969
69969
 
69970
- module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
69970
+ module.exports = __WEBPACK_EXTERNAL_MODULE_7__;
69971
69971
 
69972
69972
  /***/ })
69973
69973
 
package/examples/index.js CHANGED
@@ -418,6 +418,10 @@ export default angular.module('ui-docs', [
418
418
  'core-layout': {
419
419
  name: 'Core Layout',
420
420
  component: 'CoreLayout'
421
+ },
422
+ 'multiedit': {
423
+ name: 'Multiedit',
424
+ component: 'Multiedit'
421
425
  }
422
426
  }
423
427
  }))
@@ -4,6 +4,7 @@ export { TestGround } from './TestGround';
4
4
  export { UiPlayground } from './UiPlayground';
5
5
  export { PageLayoutTest } from './PageLayoutTest';
6
6
  export { EditorTest } from './EditorTest';
7
+ export { Multiedit } from './Multiedit';
7
8
  export { RundownEditor } from './RundownEditor';
8
9
  export { PersonalProfile } from './PersonalProfile';
9
10
  export { Rundowns } from './Rundowns';
@@ -0,0 +1,321 @@
1
+ import * as React from 'react';
2
+ import * as Components from './components/Index';
3
+ import { ButtonGroup, Button, NavButton, SubNav, Dropdown, Input, IconButton, Divider, Tooltip, Select, Option, Switch, Icon, AvatarWrapper, AvatarContentImage, AvatarContentText, Text, EmptyState, Alert, SlidingToolbar, TabLabel, Tabs, Heading, Modal } from '../../../../app-typescript/index';
4
+ import * as Layout from '../../../../app-typescript/components/Layouts';
5
+ import * as Form from '../../../../app-typescript/components/Form';
6
+ import * as Nav from '../../../../app-typescript/components/Navigation';
7
+ import { BoxedList, BoxedListItem, BoxedListContentRow } from '../../../../app-typescript/components/Lists';
8
+ import { Spacer } from '../../../../app-typescript/components/Spacer';
9
+
10
+ interface IProps {
11
+ children?: React.ReactNode;
12
+ }
13
+
14
+ interface IState {
15
+ theme: 'dark' | 'light' | string;
16
+ itemType: string;
17
+ dropDownState: string;
18
+ itemSelected1: boolean;
19
+ itemSelected2: boolean;
20
+ itemSelected3: boolean;
21
+ value1: boolean;
22
+ value2: boolean;
23
+ value3: boolean;
24
+ leftPanelOpen: boolean;
25
+ rightPanelOpen: boolean;
26
+ rightPanelPinned: boolean;
27
+ sideOverlayOpen: boolean;
28
+ sideBarOpen: boolean;
29
+ arr: any;
30
+ }
31
+
32
+ export class Multiedit extends React.Component<IProps, IState> {
33
+ constructor(props: IProps) {
34
+ super(props);
35
+ this.state = {
36
+ theme: 'light',
37
+ itemType: 'itemtype01',
38
+ dropDownState: '',
39
+ itemSelected1: false,
40
+ itemSelected2: false,
41
+ itemSelected3: false,
42
+ value1: false,
43
+ value2: false,
44
+ value3: false,
45
+ leftPanelOpen: false,
46
+ rightPanelOpen: false,
47
+ rightPanelPinned: false,
48
+ sideOverlayOpen: false,
49
+ sideBarOpen: false,
50
+ arr: [<Editor />, <Editor />]
51
+
52
+ }
53
+ this.handleTheme = this.handleTheme.bind(this);
54
+ }
55
+
56
+ handleTheme(newTheme: string) {
57
+ this.setState({
58
+ theme: newTheme
59
+ })
60
+ }
61
+
62
+ changeStatus(item: any, status: string) {
63
+ if (item.status.includes(status)) {
64
+ item.status.splice(item.status.indexOf(status), 1);
65
+ } else {
66
+ item.status.push(status);
67
+ }
68
+ }
69
+
70
+ render() {
71
+ return (
72
+ <Modal
73
+ className='p-dialog-flex'
74
+ onHide={() => false}
75
+ maximized={true} contentPadding={"none"}
76
+ headerTemplate="Multiedit"
77
+ visible={true} >
78
+ <Spacer children={this.state.arr} gap={'0'}></Spacer>
79
+ <div style={{
80
+ padding: '0 20px',
81
+ display: 'flex',
82
+ alignItems: 'center'
83
+ }}>
84
+ <Dropdown
85
+ append
86
+ items={[
87
+ { label: 'Action 1', onSelect: () => this.setState({arr: [...this.state.arr, <Editor />]}) },
88
+ ]}>
89
+ <Button type="primary" icon="plus-large" text="Add article" style="filled" size="large" shape="round" iconOnly={true} onClick={()=> false} />
90
+ </Dropdown>
91
+ </div>
92
+ </Modal>
93
+ );
94
+ }
95
+ }
96
+
97
+ interface IEditor {
98
+ sideBarOpen?: boolean;
99
+ }
100
+
101
+ export class Editor extends React.Component<IEditor, IEditor> {
102
+ constructor(props: IEditor) {
103
+ super(props);
104
+ this.state = {
105
+ sideBarOpen: false,
106
+
107
+ }
108
+ }
109
+
110
+ render() {
111
+ return <div style={{borderRight: '4px solid grey'}}>
112
+ <Layout.AuthoringFrame
113
+ header={(
114
+ <SubNav zIndex={2}>
115
+ <ButtonGroup align='end'>
116
+ <ButtonGroup subgroup={true} spaces="no-space">
117
+ <Tooltip text='More actions' flow='left'>
118
+ <NavButton type='default' icon='dots-vertical' text='More actions' onClick={()=> false} />
119
+ </Tooltip>
120
+ <Tooltip text='Send to / Publish' flow='left'>
121
+ <NavButton type='highlight' icon='send-to' iconSize='big' text='Send to / Publish' onClick={()=> false} />
122
+ </Tooltip>
123
+ <Tooltip text='Send to / Publish' flow='left'>
124
+ <NavButton type='darker' icon={this.state.sideBarOpen ? 'forward-thin' : 'backward-thin'} text='More actions' onClick={()=> this.setState({sideBarOpen: !this.state.sideBarOpen})} />
125
+ </Tooltip>
126
+ </ButtonGroup>
127
+ </ButtonGroup>
128
+ </SubNav>
129
+ )}
130
+ main={(
131
+ <Layout.AuthoringMain
132
+ headerPadding='medium'
133
+ toolBar={(
134
+ <React.Fragment>
135
+ <div className="sd-editor-toolbar__content">
136
+ <dl>
137
+ <dt>Created</dt>
138
+ <dd><time title="July 29, 2021 3:58 PM">07/29</time></dd>
139
+ <dt>by</dt>
140
+ <dt>Nareg Asmarian</dt>
141
+ </dl>
142
+ <dl>
143
+ <dt>Modified</dt>
144
+ <dd><time title="July 29, 2021 3:58 PM">07/29</time></dd>
145
+ </dl>
146
+ </div>
147
+ <ButtonGroup align='end'>
148
+ <IconButton icon="preview-mode" toolTipAppend={true} ariaValue="Print preview" onClick={()=> false} />
149
+ <IconButton icon="adjust" ariaValue="Toogle theme" onClick={()=> false} />
150
+ <IconButton icon="switches" ariaValue="Theme settings" onClick={()=> false} />
151
+ </ButtonGroup>
152
+ </React.Fragment>
153
+ )}
154
+ authoringHeader ={(
155
+ <React.Fragment>
156
+ <Form.FormGroup inlineLabel={true}>
157
+ <Form.FormItem>
158
+ <Input
159
+ type='text'
160
+ label='Slugline'
161
+ value='This is some value'
162
+ maxLength={30}
163
+ error='This is error message'
164
+ info='This is some hint message'
165
+ required={false}
166
+ disabled={false}
167
+ invalid={false}
168
+ onChange={(value) => {}} />
169
+ </Form.FormItem>
170
+ <Form.FormItem>
171
+ <Input
172
+ type='text'
173
+ label='Slugline'
174
+ value='This is some value'
175
+ maxLength={30}
176
+ error='This is error message'
177
+ info='This is some hint message'
178
+ required={false}
179
+ disabled={false}
180
+ invalid={false}
181
+ onChange={(value) => {}} />
182
+ </Form.FormItem>
183
+ </Form.FormGroup>
184
+ <Form.FormGroup inlineLabel={true}>
185
+ <Form.FormItem>
186
+ <Input
187
+ type='text'
188
+ label='Genre'
189
+ value='This is some value'
190
+ maxLength={30}
191
+ error='This is error message'
192
+ info='This is some hint message'
193
+ required={false}
194
+ disabled={false}
195
+ invalid={false}
196
+ onChange={(value) => {}} />
197
+ </Form.FormItem>
198
+ </Form.FormGroup>
199
+ <Form.FormGroup marginBottom='0' inlineLabel={true}>
200
+ <Form.FormItem>
201
+ <Input
202
+ type='text'
203
+ label='Subject'
204
+ value='This is some value'
205
+ maxLength={30}
206
+ error='This is error message'
207
+ info='This is some hint message'
208
+ required={true}
209
+ disabled={false}
210
+ invalid={false}
211
+ onChange={(value) => {}} />
212
+ </Form.FormItem>
213
+ <Form.FormItem autoWidth={true}>
214
+ <Form.FormText>Just testing:</Form.FormText>
215
+ </Form.FormItem>
216
+ <Form.FormItem>
217
+ <Select
218
+ label='Categories'
219
+ labelHidden={true}
220
+ value='This is some value'
221
+ error='This is error message'
222
+ info='This is some hint message'
223
+ required={true}
224
+ disabled={false}
225
+ invalid={false}
226
+ onChange={(value) => {}}>
227
+ <Option>Option 1</Option>
228
+ <Option>Option 2</Option>
229
+ </Select>
230
+ </Form.FormItem>
231
+ <Form.FormItem autoWidth={true}>
232
+ <ButtonGroup>
233
+ <IconButton ariaValue="Submit" icon="picture" onClick={()=> false} />
234
+ <Button text="Cancel" onClick={()=> false} type="default" style="hollow" />
235
+ <Button text="Submit" onClick={()=> false} type="primary" />
236
+ </ButtonGroup>
237
+ </Form.FormItem>
238
+ </Form.FormGroup>
239
+ </React.Fragment>
240
+ )}>
241
+ </Layout.AuthoringMain>
242
+ )}
243
+ sidePanel={(
244
+ <Layout.Panel side='right' background='grey' open={false} size='x-small'>
245
+ <Layout.PanelHeader title='Pinned content' onClose={() => false}>
246
+ </Layout.PanelHeader>
247
+ <Layout.PanelContent>
248
+ <Layout.PanelContentBlock>
249
+ <BoxedList density='comfortable'>
250
+ <BoxedListItem
251
+ type="success"
252
+ clickable={true}
253
+ media={(
254
+ <Icon name='slideshow' />
255
+ )}
256
+ actions={(
257
+ <IconButton icon="dots-vertical" ariaValue="More actions" onClick={()=> false} />
258
+ )}
259
+ >
260
+ <BoxedListContentRow>
261
+ Maecenas sed diam eget risus varius blandit sit amet non magna. Vestibulum id ligula porta felis euismod semper.
262
+ </BoxedListContentRow>
263
+ <BoxedListContentRow>
264
+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
265
+ </BoxedListContentRow>
266
+ </BoxedListItem>
267
+ <BoxedListItem
268
+ type="warning"
269
+ media={(
270
+ <AvatarWrapper
271
+ size="medium"
272
+ >
273
+ <AvatarContentText text="JL" tooltipText="Jeffrey Lebowski" />
274
+ </AvatarWrapper>
275
+ )}
276
+ footer={(
277
+ <ButtonGroup align="end">
278
+ <Button text="cancel" size="small" style="hollow" onClick={()=> false} />
279
+ <Button text="yes" size="small" style="hollow" type="primary" onClick={()=> false} />
280
+ </ButtonGroup>
281
+ )}
282
+ actions={(
283
+ <IconButton icon="dots-vertical" ariaValue="More actions" onClick={()=> false} />
284
+ )}
285
+ >
286
+ <BoxedListContentRow>
287
+ Maecenas sed diam eget risus varius blandit sit amet magna.
288
+ </BoxedListContentRow>
289
+ </BoxedListItem>
290
+ <BoxedListItem
291
+ selected={true}
292
+ actions={(
293
+ <IconButton icon="dots-vertical" ariaValue="More actions" onClick={()=> false} />
294
+ )}
295
+ >
296
+ <BoxedListContentRow>
297
+ Maecenas sed diam eget risus varius blandit sit amet magna. Vestibulum id ligula porta felis euismod semper.
298
+ </BoxedListContentRow>
299
+ </BoxedListItem>
300
+ </BoxedList>
301
+ </Layout.PanelContentBlock>
302
+ </Layout.PanelContent>
303
+ </Layout.Panel>
304
+ )}
305
+
306
+ sideBarClosed={this.state.sideBarOpen}
307
+ sideBar={(
308
+ <Nav.SideBarTabs
309
+ items={[
310
+ { icon: 'info', size: 'big', tooltip: 'Info', onClick: () => false },
311
+ { icon: 'chat', size: 'big', tooltip: 'Comments', onClick: () => false },
312
+ { icon: 'history', size: 'big', tooltip: 'History', onClick: () => false },
313
+ { icon: 'package', size: 'big', tooltip: 'Packages', onClick: () => false },
314
+ { icon: 'attachment', size: 'big', tooltip: 'Attachments', onClick: () => false },
315
+ { icon: 'comments', size: 'big', tooltip: 'Inline Comments', onClick: () => false },
316
+ { icon: 'suggestion', size: 'big', tooltip: 'Suggestions', onClick: () => false }]} />
317
+ )}
318
+ />
319
+ </div>
320
+ }
321
+ }
@@ -98,6 +98,7 @@ export default class TableListDoc extends React.Component<IProps, IState> {
98
98
  <Markup.ReactMarkupPreview>
99
99
  <TableList
100
100
  dragAndDrop
101
+ append
101
102
  addItem
102
103
  array={this.state.array}
103
104
  itemsDropdown={(index) => [
@@ -135,6 +136,7 @@ export default class TableListDoc extends React.Component<IProps, IState> {
135
136
  <Prop name='className' isRequired={false} type='string' default='false' description='Add class on TableList container.' />
136
137
  <Prop name='showDragHandle' isRequired={false} type='string' default='always' description='"always" | "onHover" | "none".' />
137
138
  <Prop name='readOnly' isRequired={false} type='boolean' default='false' description='When specified, component changes are not enabled.' />
139
+ <Prop name='append' isRequired={false} type='boolean' default='false' description='Set append to body on individual item while draging.' />
138
140
  <Prop name='onDrag' isRequired={false} type='function' default='false' description='Returns start and end position of draggable item' />
139
141
  <Prop name='onAddItem' isRequired={false} type='function' default='false' description='Returns index of draggable item.' />
140
142
  <Prop name='itemsDropdown' isRequired={false} type='function' default='false' description='Dropdown for adding items in the list. Returns index of draggable item.' />