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.
Files changed (84) hide show
  1. package/.vscode/settings.json +5 -0
  2. package/app/styles/_sd-tag-input.scss +1 -36
  3. package/app/styles/_table-list.scss +0 -1
  4. package/app/styles/primereact/_pr-dialog.scss +0 -4
  5. package/app-typescript/components/Label.tsx +6 -10
  6. package/app-typescript/components/Layouts/AuthoringFrame.tsx +1 -2
  7. package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +2 -21
  8. package/app-typescript/components/Lists/TableList.tsx +2 -62
  9. package/app-typescript/components/Spacer.tsx +1 -1
  10. package/app-typescript/components/TreeSelect.tsx +33 -85
  11. package/app-typescript/dist/components/Alert.d.ts +16 -0
  12. package/app-typescript/dist/components/Autocomplete.d.ts +48 -0
  13. package/app-typescript/dist/components/Avatar.d.ts +33 -0
  14. package/app-typescript/dist/components/Badge.d.ts +13 -0
  15. package/app-typescript/dist/components/Button.d.ts +23 -0
  16. package/app-typescript/dist/components/ButtonGroup.d.ts +12 -0
  17. package/app-typescript/dist/components/CheckButtonGroup.d.ts +11 -0
  18. package/app-typescript/dist/components/CheckGroup.d.ts +9 -0
  19. package/app-typescript/dist/components/Checkbox.d.ts +19 -0
  20. package/app-typescript/dist/components/CheckboxButton.d.ts +19 -0
  21. package/app-typescript/dist/components/DatePicker.d.ts +37 -0
  22. package/app-typescript/dist/components/Divider.d.ts +9 -0
  23. package/app-typescript/dist/components/DonutChart.d.ts +12 -0
  24. package/app-typescript/dist/components/Dropdown.d.ts +28 -0
  25. package/app-typescript/dist/components/DropdownFirst.d.ts +42 -0
  26. package/app-typescript/dist/components/EmptyState.d.ts +11 -0
  27. package/app-typescript/dist/components/FormLabel.d.ts +9 -0
  28. package/app-typescript/dist/components/Genie.d.ts +13 -0
  29. package/app-typescript/dist/components/GridItem.d.ts +69 -0
  30. package/app-typescript/dist/components/GridList.d.ts +14 -0
  31. package/app-typescript/dist/components/HeadingText.d.ts +10 -0
  32. package/app-typescript/dist/components/HelloWorld.d.ts +8 -0
  33. package/app-typescript/dist/components/Icon.d.ts +12 -0
  34. package/app-typescript/dist/components/IconButton.d.ts +12 -0
  35. package/app-typescript/dist/components/IconLabel.d.ts +11 -0
  36. package/app-typescript/dist/components/Input.d.ts +24 -0
  37. package/app-typescript/dist/components/Label.d.ts +15 -0
  38. package/app-typescript/dist/components/LeftMenu.d.ts +26 -0
  39. package/app-typescript/dist/components/Loader.d.ts +8 -0
  40. package/app-typescript/dist/components/NavButton.d.ts +15 -0
  41. package/app-typescript/dist/components/Popover.d.ts +13 -0
  42. package/app-typescript/dist/components/PropsList.d.ts +15 -0
  43. package/app-typescript/dist/components/Radio.d.ts +19 -0
  44. package/app-typescript/dist/components/RadioButton.d.ts +20 -0
  45. package/app-typescript/dist/components/Select.d.ts +29 -0
  46. package/app-typescript/dist/components/SelectWithTemplate.d.ts +32 -0
  47. package/app-typescript/dist/components/SlidingToolbar.d.ts +8 -0
  48. package/app-typescript/dist/components/StrechBar.d.ts +4 -0
  49. package/app-typescript/dist/components/SubNav.d.ts +10 -0
  50. package/app-typescript/dist/components/Switch.d.ts +12 -0
  51. package/app-typescript/dist/components/TabCustom.d.ts +25 -0
  52. package/app-typescript/dist/components/TabList.d.ts +22 -0
  53. package/app-typescript/dist/components/Tag.d.ts +9 -0
  54. package/app-typescript/dist/components/TagInput.d.ts +7 -0
  55. package/app-typescript/dist/components/TagInputTest.d.ts +18 -0
  56. package/app-typescript/dist/components/TimePicker.d.ts +11 -0
  57. package/app-typescript/dist/components/Tooltip.d.ts +11 -0
  58. package/app-typescript/dist/components/_Positioner.d.ts +27 -0
  59. package/app-typescript/dist/index.d.ts +56 -0
  60. package/dist/examples.bundle.js +1183 -1548
  61. package/dist/playgrounds/react-playgrounds/Index.tsx +0 -1
  62. package/dist/react/TableList.tsx +0 -2
  63. package/dist/react/TreeSelect.tsx +78 -100
  64. package/dist/superdesk-ui.bundle.css +2 -34
  65. package/dist/superdesk-ui.bundle.js +1058 -1131
  66. package/dist/vendor.bundle.js +4 -4
  67. package/examples/index.js +0 -4
  68. package/examples/pages/playgrounds/react-playgrounds/Index.tsx +0 -1
  69. package/examples/pages/react/TableList.tsx +0 -2
  70. package/examples/pages/react/TreeSelect.tsx +78 -100
  71. package/package.json +1 -1
  72. package/react/components/Label.d.ts +1 -1
  73. package/react/components/Label.js +5 -10
  74. package/react/components/Layouts/AuthoringFrame.d.ts +0 -1
  75. package/react/components/Layouts/AuthoringFrame.js +1 -1
  76. package/react/components/Layouts/AuthoringFrameRightBar.d.ts +2 -9
  77. package/react/components/Layouts/AuthoringFrameRightBar.js +3 -14
  78. package/react/components/Lists/TableList.d.ts +0 -1
  79. package/react/components/Lists/TableList.js +6 -34
  80. package/react/components/TreeSelect.d.ts +1 -3
  81. package/react/components/TreeSelect.js +23 -50
  82. package/yarn-error.log +111 -0
  83. package/dist/playgrounds/react-playgrounds/Multiedit.tsx +0 -321
  84. package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +0 -321
@@ -4,7 +4,6 @@ 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';
8
7
  export { RundownEditor } from './RundownEditor';
9
8
  export { PersonalProfile } from './PersonalProfile';
10
9
  export { Rundowns } from './Rundowns';
@@ -98,7 +98,6 @@ export default class TableListDoc extends React.Component<IProps, IState> {
98
98
  <Markup.ReactMarkupPreview>
99
99
  <TableList
100
100
  dragAndDrop
101
- append
102
101
  addItem
103
102
  array={this.state.array}
104
103
  itemsDropdown={(index) => [
@@ -136,7 +135,6 @@ export default class TableListDoc extends React.Component<IProps, IState> {
136
135
  <Prop name='className' isRequired={false} type='string' default='false' description='Add class on TableList container.' />
137
136
  <Prop name='showDragHandle' isRequired={false} type='string' default='always' description='"always" | "onHover" | "none".' />
138
137
  <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.' />
140
138
  <Prop name='onDrag' isRequired={false} type='function' default='false' description='Returns start and end position of draggable item' />
141
139
  <Prop name='onAddItem' isRequired={false} type='function' default='false' description='Returns index of draggable item.' />
142
140
  <Prop name='itemsDropdown' isRequired={false} type='function' default='false' description='Dropdown for adding items in the list. Returns index of draggable item.' />
@@ -13,79 +13,51 @@ interface IState {
13
13
  arr: any;
14
14
  }
15
15
 
16
- let options = [
16
+ let itemArr = [
17
17
  {
18
- value: {name: 'Category1'},
18
+ value: 'Category1',
19
19
  children: [
20
20
  {
21
- value: {name: 'Sub-category1'},
21
+ value: 'Sub-Category1',
22
22
  children: [
23
- {value: {name: 'Item20'}}
23
+ {value: 'Item10'}
24
24
  ]
25
25
  },
26
26
  {
27
- value: {name: 'Sub-category2'},
28
- children: [
29
- {value: {name: 'Item21'}}
30
- ]
31
- }
32
- ,
33
- {
34
- value: {name: 'Sub-category3'},
35
- children: [
36
- {value: {name: 'Item22'}}
37
- ]
38
- }
39
- ,
40
- {
41
- value: {name: 'Sub-category4'},
42
- children: [
43
- {value: {name: 'Item23'}}
44
- ]
45
- }
46
- ,
47
- {
48
- value: {name: 'Sub-category5'},
27
+ value: 'Sub-Category2',
49
28
  children: [
50
- {value: {name: 'Item24'}}
51
- ]
52
- }
53
- ,
54
- {
55
- value: {name: 'Sub-category6'},
56
- children: [
57
- {value: {name: 'Item25'}}
29
+ {value: 'Item11'}
58
30
  ]
59
31
  }
60
32
  ]
61
33
  },
62
34
  {
63
- value: {name: 'Category2'},
35
+ value: 'Category2',
64
36
  children: [
65
37
  {
66
- value: {name: 'Item8'}
38
+ value: 'Sub-Category3'
67
39
  },
68
40
  {
69
- value: {name: 'Item9'}
41
+ value: 'Sub-Category4'
70
42
  }
71
43
  ]
72
44
  },
73
45
  {
74
- value: {name: 'Category3', bgColor: 'red'},
46
+ value: 'Category3',
75
47
  children: [
76
48
  {
77
- value: {name: 'Item10'}
49
+ value: 'Sub-Category5'
78
50
  },
79
51
  {
80
- value: {name: 'Item11'}
52
+ value: 'Sub-Category6'
81
53
  }
82
54
  ]
83
55
  },
84
56
  ]
85
57
 
86
- let options2 = [
58
+ let itemArr2 = [
87
59
  {
88
- value: {name: 'Category1', border: 'red'},
60
+ value: {name: 'Category1'},
89
61
  children: [
90
62
  {
91
63
  value: {name: 'Sub-category1'},
@@ -130,7 +102,7 @@ let options2 = [
130
102
  ]
131
103
  },
132
104
  {
133
- value: {name: 'Category2', border: 'green'},
105
+ value: {name: 'Category2'},
134
106
  children: [
135
107
  {
136
108
  value: {name: 'Item8'}
@@ -141,7 +113,7 @@ let options2 = [
141
113
  ]
142
114
  },
143
115
  {
144
- value: {name: 'Category3', border: 'yellow'},
116
+ value: {name: 'Category3'},
145
117
  children: [
146
118
  {
147
119
  value: {name: 'Item10'}
@@ -153,6 +125,37 @@ let options2 = [
153
125
  },
154
126
  ]
155
127
 
128
+ const source = [
129
+ {
130
+ 'name': 'Article (news)',
131
+ 'qcode': 'Article (news)',
132
+ },
133
+ {
134
+ 'name': 'Article',
135
+ 'qcode': 'Article',
136
+ },
137
+ {
138
+ 'name': 'Sidebar',
139
+ 'qcode': 'Sidebar',
140
+ },
141
+ {
142
+ 'name': 'Factbox',
143
+ 'qcode': 'Factbox',
144
+ },
145
+ {
146
+ 'name': 'Item',
147
+ 'qcode': 'Item',
148
+ },
149
+ {
150
+ 'name': 'Array',
151
+ 'qcode': 'Array',
152
+ },
153
+ {
154
+ 'name': 'Object',
155
+ 'qcode': 'Object',
156
+ },
157
+ ];
158
+
156
159
  let fetchedArr = [];
157
160
  fetch('https://nominatim.openstreetmap.org/search/berlin?format=json&addressdetails=1&limit=20').then(response => response.json()).then(data => fetchedArr = data
158
161
  );
@@ -183,8 +186,8 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
183
186
  this.state = {
184
187
  value: [],
185
188
  value2: [],
186
- options: options,
187
- options2: options,
189
+ options: itemArr2,
190
+ options2: itemArr2,
188
191
  inputValue: '',
189
192
  arr: []
190
193
  }
@@ -225,29 +228,21 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
225
228
  <div className='docs-page__content-row docs-page__content-row--no-margin'>
226
229
  <div className='form__row'>
227
230
  <TreeSelect
228
- value={[{name: 'Item1'}, {name: 'Item2'}]}
229
- getOptions={() => options}
230
- kind={'synchronous'}
231
231
  getId={(item) => item.name}
232
232
  getLabel={(item) => item.name}
233
- getBackgroundColor={(item: any) => item.bgColor}
233
+ getOptions={() => itemArr2}
234
+ value={[{name: 'Item1'}, {name: 'Item2'}]}
234
235
  selectBranchWithChildren={true}
236
+ onChange={(e) => console.log(e)}
235
237
  allowMultiple
238
+ kind={'synchronous'}
236
239
  fullWidth
237
- singleLevelSearch
238
- required
239
240
  info={'Info Message'}
240
241
  error={'Error Message'}
242
+ required
241
243
  label={'TreeSelect Label'}
244
+ singleLevelSearch
242
245
  searchPlaceholder='Search...'
243
- onChange={(e) => false}
244
- valueTemplate={(item, Wrapper) => {
245
- return (
246
- <Wrapper backgroundColor={item.bgColor}>
247
- <span>{item.name}</span>
248
- </Wrapper>
249
- );
250
- }}
251
246
  />
252
247
  </div>
253
248
  </div>
@@ -255,29 +250,21 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
255
250
 
256
251
  <Markup.ReactMarkupCode>{`
257
252
  <TreeSelect
258
- value={[{name: 'Item1'}, {name: 'Item2'}]}
259
- getOptions={() => options}
260
- kind={'synchronous'}
261
253
  getId={(item) => item.name}
262
254
  getLabel={(item) => item.name}
263
- getBackgroundColor={(item: any) => item.bgColor}
255
+ getOptions={() => {
256
+ return itemArr2
257
+ }}
258
+ value={[{name: 'Item1'}, {name: 'Item2'}]}
264
259
  selectBranchWithChildren={true}
260
+ onChange={(e) => console.log(e)}
265
261
  allowMultiple
262
+ kind={'synchronous'}
266
263
  fullWidth
267
- singleLevelSearch
268
- required
269
264
  info={'Info Message'}
270
265
  error={'Error Message'}
266
+ required
271
267
  label={'TreeSelect Label'}
272
- searchPlaceholder='Search...'
273
- onChange={(e) => false}
274
- valueTemplate={(item, Wrapper) => {
275
- return (
276
- <Wrapper backgroundColor={item.bgColor}>
277
- <span>{item.name}</span>
278
- </Wrapper>
279
- );
280
- }}
281
268
  />
282
269
  `}</Markup.ReactMarkupCode>
283
270
 
@@ -299,6 +286,7 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
299
286
  }
300
287
  getId={({qcode}) => qcode.display_name}
301
288
  selectBranchWithChildren={false}
289
+ //optionTemplate={(item) => <span style={{color: 'blue'}}>{item.display_name}</span>}
302
290
  allowMultiple={true}
303
291
  />
304
292
  </div>
@@ -329,23 +317,20 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
329
317
  <div className='docs-page__content-row docs-page__content-row--no-margin'>
330
318
  <div className='form__row'>
331
319
  <TreeSelect
332
- getOptions={() => options2}
333
- kind={'synchronous'}
334
320
  getId={(item) => item.name}
335
321
  getLabel={(item) => item.name}
336
- getBackgroundColor={(item) => item.bgColor}
337
- getBorderColor={(item) => item.border}
338
322
  placeholder='Select one'
339
- selectBranchWithChildren={true}
340
- onChange={(e) => false}
323
+ getOptions={() => this.state.options}
324
+ kind={'synchronous'}
325
+ onChange={(e) => console.log(e)}
341
326
  optionTemplate={(item: any) => {
342
327
  return <div>Label: {item.name}</div>
343
328
  }}
344
- valueTemplate={(item: any, Wrapper) => {
345
- return <Wrapper borderColor={item.border}>
346
- <span>{item.name}</span>
347
- </Wrapper>
329
+ valueTemplate={(item: any) => {
330
+ return <span>Label: {item.name}</span>
348
331
  }}
332
+ //allowMultiple
333
+ //readOnly
349
334
  />
350
335
  </div>
351
336
  </div>
@@ -353,22 +338,17 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
353
338
 
354
339
  <Markup.ReactMarkupCode>{`
355
340
  <TreeSelect
356
- getOptions={() => options2}
357
- kind={'synchronous'}
358
341
  getId={(item) => item.name}
359
342
  getLabel={(item) => item.name}
360
- getBackgroundColor={(item) => item.bgColor}
361
- getBorderColor={(item) => item.border}
362
- placeholder='Select one'
363
- selectBranchWithChildren={true}
364
- onChange={(e) => false}
343
+ value={[{name: 'Item4'}, {name: 'Item10'}]}
344
+ getOptions={() => this.state.options}
345
+ kind={'synchronous'}
346
+ onChange={(e) => console.log(e)}
365
347
  optionTemplate={(item: any) => {
366
348
  return <div>Label: {item.name}</div>
367
349
  }}
368
- valueTemplate={(item: any, Wrapper) => {
369
- return <Wrapper borderColor={item.border}>
370
- <span>{item.name}</span>
371
- </Wrapper>
350
+ valueTemplate={(item: any) => {
351
+ return <span>Label: {item.name}</span>
372
352
  }}
373
353
  />
374
354
  `}</Markup.ReactMarkupCode>
@@ -390,10 +370,8 @@ export class TreeSelectDocs extends React.Component<{}, IState> {
390
370
  <Prop name='searchPlaceholder' isRequired={false} type='string' default='/' description='Filter input placeholder.'/>
391
371
  <Prop name='getLabel' isRequired={true} type='Function' default='/' description='Callback to invoke when value changes.'/>
392
372
  <Prop name='getId' isRequired={true} type='Function' default='/' description='Callback to invoke when value changes.'/>
393
- <Prop name='getBackgroundColor' isRequired={true} type='Function' default='/' description='Function to return background color of individual item in options.'/>
394
- <Prop name='getBorderColor' isRequired={true} type='Function' default='/' description='Function to return border color of individual item in options in single-select mode.'/>
395
- <Prop name='valueTemplate' isRequired={false} type='Function(item, Wrapper)' default='/' description='Function that gets an item in the value and returns the content for it.'/>
396
- <Prop name='optionTemplate' isRequired={false} type='Function(item)' default='/' description='Function that gets the option and returns the content for it.'/>
373
+ <Prop name='valueTemplate' isRequired={false} type='Function' default='/' description='Function that gets an item in the value and returns the content for it.'/>
374
+ <Prop name='optionTemplate' isRequired={false} type='Function' default='/' description='Function that gets the option and returns the content for it.'/>
397
375
  <Prop name='searchOptions' isRequired={false} type='Function' default='/' description='The function will be called when a search is initiated from UI in asynchronous mode.'/>
398
376
  <Prop name='onChange' isRequired={true} type='Function' default='/' description='Callback to invoke when value changes.'/>
399
377
  <Prop name='label' isRequired={false} type='string' default='/' description='Input label'/>
@@ -33764,7 +33764,6 @@ tags-input,
33764
33764
  position: relative; }
33765
33765
  tags-input .autocomplete .suggestion-item,
33766
33766
  .tags-input .autocomplete .suggestion-item {
33767
- position: relative;
33768
33767
  padding: 0.5rem 1rem;
33769
33768
  cursor: pointer;
33770
33769
  white-space: nowrap;
@@ -33802,19 +33801,6 @@ tags-input,
33802
33801
  display: flex;
33803
33802
  justify-content: space-between;
33804
33803
  align-items: center; }
33805
- tags-input .autocomplete .suggestion-item--bgcolor,
33806
- .tags-input .autocomplete .suggestion-item--bgcolor {
33807
- min-height: 1.5em;
33808
- min-width: 1.5em;
33809
- padding: 4px 0;
33810
- display: inline-flex;
33811
- justify-content: center;
33812
- align-items: center;
33813
- border-radius: 99px;
33814
- white-space: nowrap; }
33815
- tags-input .autocomplete .suggestion-item--bgcolor[style],
33816
- .tags-input .autocomplete .suggestion-item--bgcolor[style] {
33817
- padding-inline: 8px; }
33818
33804
  tags-input .autocomplete .suggestion-item--disabled,
33819
33805
  .tags-input .autocomplete .suggestion-item--disabled {
33820
33806
  opacity: 0.5; }
@@ -33958,10 +33944,6 @@ tags-input,
33958
33944
  .tags-input .autocomplete--fixed-width {
33959
33945
  width: 275px !important; }
33960
33946
 
33961
- .tags-input--single-select {
33962
- display: grid !important;
33963
- align-items: center !important; }
33964
-
33965
33947
  .tags-input--multi-select,
33966
33948
  .tags-input--single-select {
33967
33949
  position: relative; }
@@ -34007,7 +33989,7 @@ tags-input,
34007
33989
  .tags-input__single-item .tags-input__remove-button {
34008
33990
  display: flex;
34009
33991
  align-items: center;
34010
- align-self: center;
33992
+ align-self: flex-end;
34011
33993
  margin-inline-start: auto;
34012
33994
  z-index: 2;
34013
33995
  cursor: pointer;
@@ -34019,16 +34001,6 @@ tags-input,
34019
34001
  color: var(--color-text-lighter);
34020
34002
  font-weight: 300; }
34021
34003
 
34022
- .item-border {
34023
- width: 5px;
34024
- z-index: 2;
34025
- position: absolute;
34026
- inset-block: 7px;
34027
- inset-inline-start: 3px;
34028
- border-radius: 2px; }
34029
- .item-border-selected {
34030
- inset-block: 5px; }
34031
-
34032
34004
  .boxed-list {
34033
34005
  display: flex;
34034
34006
  flex-direction: column;
@@ -35363,8 +35335,7 @@ input.sd-inset-search__input {
35363
35335
  display: flex;
35364
35336
  flex-direction: column;
35365
35337
  align-self: stretch;
35366
- overflow: hidden !important;
35367
- padding: 1px; }
35338
+ overflow: hidden !important; }
35368
35339
  .table-list--comfortable {
35369
35340
  gap: 1.6rem; }
35370
35341
  .table-list--contained {
@@ -60370,9 +60341,6 @@ i.sd-sidetab-menu__helper-icon {
60370
60341
  .p-dialog-content {
60371
60342
  overflow-y: auto; }
60372
60343
 
60373
- .p-dialog-flex {
60374
- display: flex; }
60375
-
60376
60344
  .p-dialog-header {
60377
60345
  display: flex;
60378
60346
  align-items: center;