superdesk-ui-framework 3.0.1-beta.26 → 3.0.1-beta.27
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/.vscode/settings.json +5 -0
- package/app/styles/_sd-tag-input.scss +1 -36
- package/app/styles/_table-list.scss +0 -1
- package/app/styles/primereact/_pr-dialog.scss +0 -4
- package/app-typescript/components/Label.tsx +6 -10
- package/app-typescript/components/Layouts/AuthoringFrame.tsx +1 -2
- package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +2 -21
- package/app-typescript/components/Lists/TableList.tsx +2 -62
- package/app-typescript/components/Spacer.tsx +1 -1
- package/app-typescript/components/TreeSelect.tsx +33 -85
- package/app-typescript/dist/components/Alert.d.ts +16 -0
- package/app-typescript/dist/components/Autocomplete.d.ts +48 -0
- package/app-typescript/dist/components/Avatar.d.ts +33 -0
- package/app-typescript/dist/components/Badge.d.ts +13 -0
- package/app-typescript/dist/components/Button.d.ts +23 -0
- package/app-typescript/dist/components/ButtonGroup.d.ts +12 -0
- package/app-typescript/dist/components/CheckButtonGroup.d.ts +11 -0
- package/app-typescript/dist/components/CheckGroup.d.ts +9 -0
- package/app-typescript/dist/components/Checkbox.d.ts +19 -0
- package/app-typescript/dist/components/CheckboxButton.d.ts +19 -0
- package/app-typescript/dist/components/DatePicker.d.ts +37 -0
- package/app-typescript/dist/components/Divider.d.ts +9 -0
- package/app-typescript/dist/components/DonutChart.d.ts +12 -0
- package/app-typescript/dist/components/Dropdown.d.ts +28 -0
- package/app-typescript/dist/components/DropdownFirst.d.ts +42 -0
- package/app-typescript/dist/components/EmptyState.d.ts +11 -0
- package/app-typescript/dist/components/FormLabel.d.ts +9 -0
- package/app-typescript/dist/components/Genie.d.ts +13 -0
- package/app-typescript/dist/components/GridItem.d.ts +69 -0
- package/app-typescript/dist/components/GridList.d.ts +14 -0
- package/app-typescript/dist/components/HeadingText.d.ts +10 -0
- package/app-typescript/dist/components/HelloWorld.d.ts +8 -0
- package/app-typescript/dist/components/Icon.d.ts +12 -0
- package/app-typescript/dist/components/IconButton.d.ts +12 -0
- package/app-typescript/dist/components/IconLabel.d.ts +11 -0
- package/app-typescript/dist/components/Input.d.ts +24 -0
- package/app-typescript/dist/components/Label.d.ts +15 -0
- package/app-typescript/dist/components/LeftMenu.d.ts +26 -0
- package/app-typescript/dist/components/Loader.d.ts +8 -0
- package/app-typescript/dist/components/NavButton.d.ts +15 -0
- package/app-typescript/dist/components/Popover.d.ts +13 -0
- package/app-typescript/dist/components/PropsList.d.ts +15 -0
- package/app-typescript/dist/components/Radio.d.ts +19 -0
- package/app-typescript/dist/components/RadioButton.d.ts +20 -0
- package/app-typescript/dist/components/Select.d.ts +29 -0
- package/app-typescript/dist/components/SelectWithTemplate.d.ts +32 -0
- package/app-typescript/dist/components/SlidingToolbar.d.ts +8 -0
- package/app-typescript/dist/components/StrechBar.d.ts +4 -0
- package/app-typescript/dist/components/SubNav.d.ts +10 -0
- package/app-typescript/dist/components/Switch.d.ts +12 -0
- package/app-typescript/dist/components/TabCustom.d.ts +25 -0
- package/app-typescript/dist/components/TabList.d.ts +22 -0
- package/app-typescript/dist/components/Tag.d.ts +9 -0
- package/app-typescript/dist/components/TagInput.d.ts +7 -0
- package/app-typescript/dist/components/TagInputTest.d.ts +18 -0
- package/app-typescript/dist/components/TimePicker.d.ts +11 -0
- package/app-typescript/dist/components/Tooltip.d.ts +11 -0
- package/app-typescript/dist/components/_Positioner.d.ts +27 -0
- package/app-typescript/dist/index.d.ts +56 -0
- package/dist/examples.bundle.js +1183 -1548
- package/dist/playgrounds/react-playgrounds/Index.tsx +0 -1
- package/dist/react/TableList.tsx +0 -2
- package/dist/react/TreeSelect.tsx +78 -100
- package/dist/superdesk-ui.bundle.css +2 -34
- package/dist/superdesk-ui.bundle.js +1058 -1131
- package/dist/vendor.bundle.js +4 -4
- package/examples/index.js +0 -4
- package/examples/pages/playgrounds/react-playgrounds/Index.tsx +0 -1
- package/examples/pages/react/TableList.tsx +0 -2
- package/examples/pages/react/TreeSelect.tsx +78 -100
- package/package.json +1 -1
- package/react/components/Label.d.ts +1 -1
- package/react/components/Label.js +5 -10
- package/react/components/Layouts/AuthoringFrame.d.ts +0 -1
- package/react/components/Layouts/AuthoringFrame.js +1 -1
- package/react/components/Layouts/AuthoringFrameRightBar.d.ts +2 -9
- package/react/components/Layouts/AuthoringFrameRightBar.js +3 -14
- package/react/components/Lists/TableList.d.ts +0 -1
- package/react/components/Lists/TableList.js +6 -34
- package/react/components/TreeSelect.d.ts +1 -3
- package/react/components/TreeSelect.js +23 -50
- package/yarn-error.log +111 -0
- package/dist/playgrounds/react-playgrounds/Multiedit.tsx +0 -321
- package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +0 -321
@@ -1,321 +0,0 @@
|
|
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
|
-
}
|