@plone/volto 18.0.0-alpha.32 → 18.0.0-alpha.34
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/CHANGELOG.md +47 -0
- package/locales/ca/LC_MESSAGES/volto.po +17 -0
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +17 -0
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +17 -0
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +17 -0
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +17 -0
- package/locales/eu.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +17 -0
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +17 -0
- package/locales/fr.json +1 -1
- package/locales/hi/LC_MESSAGES/volto.po +17 -0
- package/locales/hi.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +17 -0
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +17 -0
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +17 -0
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +17 -0
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +17 -0
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +17 -0
- package/locales/ro.json +1 -1
- package/locales/volto.pot +18 -1
- package/locales/zh_CN/LC_MESSAGES/volto.po +17 -0
- package/locales/zh_CN.json +1 -1
- package/package.json +10 -5
- package/razzle.config.js +58 -0
- package/src/actions/form/form.js +18 -2
- package/src/actions/index.js +1 -1
- package/src/components/manage/BlockChooser/BlockChooserSearch.jsx +1 -0
- package/src/components/manage/Blocks/Block/BlocksForm.jsx +157 -81
- package/src/components/manage/Blocks/Block/BlocksForm.test.jsx +8 -0
- package/src/components/manage/Blocks/Block/Edit.jsx +37 -4
- package/src/components/manage/Blocks/Block/Order/Item.jsx +122 -0
- package/src/components/manage/Blocks/Block/Order/Order.jsx +367 -0
- package/src/components/manage/Blocks/Block/Order/SortableItem.jsx +58 -0
- package/src/components/manage/Blocks/Block/Order/utilities.js +113 -0
- package/src/components/manage/Blocks/Container/Edit.jsx +1 -0
- package/src/components/manage/Blocks/Grid/Edit.jsx +6 -4
- package/src/components/manage/Blocks/Image/schema.js +2 -0
- package/src/components/manage/Controlpanels/Relations/RelationsListing.jsx +1 -1
- package/src/components/manage/Controlpanels/Relations/RelationsMatrix.jsx +1 -1
- package/src/components/manage/Form/Form.jsx +159 -151
- package/src/components/manage/Sidebar/ObjectBrowserBody.jsx +158 -65
- package/src/components/manage/Sidebar/ObjectBrowserNav.jsx +125 -71
- package/src/components/manage/Sidebar/Sidebar.jsx +28 -1
- package/src/components/manage/Widgets/IdWidget.jsx +138 -203
- package/src/components/manage/Widgets/InternalUrlWidget.jsx +10 -14
- package/src/components/manage/Widgets/TextWidget.jsx +92 -124
- package/src/components/manage/Widgets/TextWidget.stories.jsx +14 -3
- package/src/components/theme/App/App.jsx +5 -0
- package/src/components/theme/Footer/Footer.jsx +1 -0
- package/src/components/theme/FormattedDate/FormattedDate.jsx +13 -1
- package/src/components/theme/Icon/Icon.jsx +4 -4
- package/src/components/theme/Navigation/Navigation.jsx +1 -1
- package/src/components/theme/SlotRenderer/SlotRenderer.tsx +3 -4
- package/src/components/theme/View/View.jsx +1 -1
- package/src/config/Loadables.jsx +18 -0
- package/src/config/server.js +0 -1
- package/src/constants/ActionTypes.js +1 -0
- package/src/express-middleware/static.js +37 -19
- package/src/helpers/Blocks/Blocks.js +182 -1
- package/src/helpers/Blocks/Blocks.test.js +136 -0
- package/src/helpers/Html/Html.jsx +6 -8
- package/src/helpers/Slots/index.tsx +12 -5
- package/src/helpers/index.js +4 -0
- package/src/reducers/form/form.js +18 -1
- package/src/reducers/form/form.test.js +15 -1
- package/src/server.jsx +34 -36
- package/theme/themes/pastanaga/extras/blocks.less +7 -6
- package/theme/themes/pastanaga/extras/objectbrowser-widget.less +83 -0
- package/theme/themes/pastanaga/extras/sidebar.less +145 -0
- package/theme/themes/pastanaga/extras/widgets.less +19 -0
- package/types/actions/form/form.d.ts +8 -1
- package/types/actions/index.d.ts +1 -1
- package/types/components/manage/Blocks/Block/Order/Item.d.ts +2 -0
- package/types/components/manage/Blocks/Block/Order/Order.d.ts +13 -0
- package/types/components/manage/Blocks/Block/Order/SortableItem.d.ts +9 -0
- package/types/components/manage/Blocks/Block/Order/utilities.d.ts +9 -0
- package/types/components/manage/Blocks/Image/schema.d.ts +2 -0
- package/types/components/manage/Sidebar/ObjectBrowserNav.d.ts +2 -1
- package/types/components/manage/Widgets/IdWidget.d.ts +54 -2
- package/types/components/manage/Widgets/TextWidget.d.ts +54 -5
- package/types/components/manage/Widgets/TextWidget.stories.d.ts +13 -1
- package/types/components/manage/Widgets/index.d.ts +2 -2
- package/types/components/theme/Icon/Icon.d.ts +8 -8
- package/types/config/Loadables.d.ts +15 -162
- package/types/config/Widgets.d.ts +1 -1
- package/types/config/server.d.ts +0 -3
- package/types/constants/ActionTypes.d.ts +1 -0
- package/types/helpers/Blocks/Blocks.d.ts +13 -0
- package/types/helpers/Slots/index.d.ts +5 -3
- package/types/helpers/index.d.ts +2 -2
- package/types/start-client.d.ts +1 -1
|
@@ -4,10 +4,19 @@
|
|
|
4
4
|
* @module reducers/form/form
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
SET_FORM_DATA,
|
|
9
|
+
SET_UI_STATE,
|
|
10
|
+
} from '@plone/volto/constants/ActionTypes';
|
|
8
11
|
|
|
9
12
|
const initialState = {
|
|
10
13
|
global: {},
|
|
14
|
+
ui: {
|
|
15
|
+
selected: null,
|
|
16
|
+
multiSelected: [],
|
|
17
|
+
gridSelected: null,
|
|
18
|
+
hovered: null,
|
|
19
|
+
},
|
|
11
20
|
};
|
|
12
21
|
|
|
13
22
|
/**
|
|
@@ -23,6 +32,14 @@ export default function form(state = initialState, action = {}) {
|
|
|
23
32
|
...state,
|
|
24
33
|
global: action.data,
|
|
25
34
|
};
|
|
35
|
+
case SET_UI_STATE:
|
|
36
|
+
return {
|
|
37
|
+
...state,
|
|
38
|
+
ui: {
|
|
39
|
+
...state.ui,
|
|
40
|
+
...action.ui,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
26
43
|
default:
|
|
27
44
|
return state;
|
|
28
45
|
}
|
|
@@ -3,7 +3,15 @@ import { SET_FORM_DATA } from '@plone/volto/constants/ActionTypes';
|
|
|
3
3
|
|
|
4
4
|
describe('Form reducer', () => {
|
|
5
5
|
it('should return the initial state', () => {
|
|
6
|
-
expect(form()).toEqual({
|
|
6
|
+
expect(form()).toEqual({
|
|
7
|
+
global: {},
|
|
8
|
+
ui: {
|
|
9
|
+
gridSelected: null,
|
|
10
|
+
hovered: null,
|
|
11
|
+
multiSelected: [],
|
|
12
|
+
selected: null,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
7
15
|
});
|
|
8
16
|
|
|
9
17
|
it('should handle SET_FORM_DATA', () => {
|
|
@@ -14,6 +22,12 @@ describe('Form reducer', () => {
|
|
|
14
22
|
}),
|
|
15
23
|
).toEqual({
|
|
16
24
|
global: { foo: 'bar' },
|
|
25
|
+
ui: {
|
|
26
|
+
gridSelected: null,
|
|
27
|
+
hovered: null,
|
|
28
|
+
multiSelected: [],
|
|
29
|
+
selected: null,
|
|
30
|
+
},
|
|
17
31
|
});
|
|
18
32
|
});
|
|
19
33
|
});
|
package/src/server.jsx
CHANGED
|
@@ -272,50 +272,48 @@ server.get('/*', (req, res) => {
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
const sendHtmlResponse = (
|
|
276
|
+
res,
|
|
277
|
+
statusCode,
|
|
278
|
+
extractor,
|
|
279
|
+
markup,
|
|
280
|
+
store,
|
|
281
|
+
req,
|
|
282
|
+
config,
|
|
283
|
+
) => {
|
|
284
|
+
res.status(statusCode).send(
|
|
285
|
+
`<!doctype html>
|
|
286
|
+
${renderToString(
|
|
287
|
+
<Html
|
|
288
|
+
extractor={extractor}
|
|
289
|
+
markup={markup}
|
|
290
|
+
store={store}
|
|
291
|
+
criticalCss={readCriticalCss(req)}
|
|
292
|
+
apiPath={res.locals.detectedHost || config.settings.apiPath}
|
|
293
|
+
publicURL={res.locals.detectedHost || config.settings.publicURL}
|
|
294
|
+
/>,
|
|
295
|
+
)}
|
|
296
|
+
`,
|
|
297
|
+
);
|
|
298
|
+
};
|
|
299
|
+
|
|
275
300
|
if (context.url) {
|
|
276
301
|
res.redirect(flattenToAppURL(context.url));
|
|
277
302
|
} else if (context.error_code) {
|
|
278
303
|
res.set({
|
|
279
304
|
'Cache-Control': 'no-cache',
|
|
280
305
|
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
extractScripts={
|
|
290
|
-
config.settings.serverConfig.extractScripts?.errorPages ||
|
|
291
|
-
process.env.NODE_ENV !== 'production'
|
|
292
|
-
}
|
|
293
|
-
criticalCss={readCriticalCss(req)}
|
|
294
|
-
apiPath={res.locals.detectedHost || config.settings.apiPath}
|
|
295
|
-
publicURL={
|
|
296
|
-
res.locals.detectedHost || config.settings.publicURL
|
|
297
|
-
}
|
|
298
|
-
/>,
|
|
299
|
-
)}
|
|
300
|
-
`,
|
|
306
|
+
sendHtmlResponse(
|
|
307
|
+
res,
|
|
308
|
+
context.error_code,
|
|
309
|
+
extractor,
|
|
310
|
+
markup,
|
|
311
|
+
store,
|
|
312
|
+
req,
|
|
313
|
+
config,
|
|
301
314
|
);
|
|
302
315
|
} else {
|
|
303
|
-
res
|
|
304
|
-
`<!doctype html>
|
|
305
|
-
${renderToString(
|
|
306
|
-
<Html
|
|
307
|
-
extractor={extractor}
|
|
308
|
-
markup={markup}
|
|
309
|
-
store={store}
|
|
310
|
-
criticalCss={readCriticalCss(req)}
|
|
311
|
-
apiPath={res.locals.detectedHost || config.settings.apiPath}
|
|
312
|
-
publicURL={
|
|
313
|
-
res.locals.detectedHost || config.settings.publicURL
|
|
314
|
-
}
|
|
315
|
-
/>,
|
|
316
|
-
)}
|
|
317
|
-
`,
|
|
318
|
-
);
|
|
316
|
+
sendHtmlResponse(res, 200, extractor, markup, store, req, config);
|
|
319
317
|
}
|
|
320
318
|
}, errorHandler)
|
|
321
319
|
.catch(errorHandler);
|
|
@@ -36,20 +36,21 @@
|
|
|
36
36
|
display: inline-block;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.block .block.selected::before,
|
|
40
|
-
.block .block.selected:hover::before {
|
|
41
|
-
border-width: 1px;
|
|
42
|
-
border-color: rgba(120, 192, 215, 0.75);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
39
|
[data-slate-editor='true'] {
|
|
46
40
|
outline: none;
|
|
47
41
|
}
|
|
48
42
|
|
|
43
|
+
.block .block.hovered::before,
|
|
49
44
|
.block .block:hover::before {
|
|
50
45
|
border-color: rgba(120, 192, 215, 0.375);
|
|
51
46
|
}
|
|
52
47
|
|
|
48
|
+
.block .block.selected::before,
|
|
49
|
+
.block .block.selected:hover::before {
|
|
50
|
+
border-width: 1px;
|
|
51
|
+
border-color: rgba(120, 192, 215, 0.75);
|
|
52
|
+
}
|
|
53
|
+
|
|
53
54
|
.block .block.multiSelected::before {
|
|
54
55
|
z-index: 1;
|
|
55
56
|
background-color: rgba(120, 192, 215, 0.375);
|
|
@@ -41,3 +41,86 @@
|
|
|
41
41
|
border: none !important;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
.object-browser {
|
|
46
|
+
.mode-switch {
|
|
47
|
+
margin-right: 8px;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
float: right;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
header h2 {
|
|
53
|
+
margin: 2px 0 !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.searchResults {
|
|
57
|
+
margin-left: 20px;
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
-webkit-font-smoothing: antialiased;
|
|
60
|
+
-moz-osx-font-smoothing: grayscale;
|
|
61
|
+
line-height: 1.5;
|
|
62
|
+
text-rendering: optimizeLegibility;
|
|
63
|
+
text-size-adjust: 100%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
ul.object-listing {
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.image-wrapper {
|
|
71
|
+
display: block;
|
|
72
|
+
margin: 16px;
|
|
73
|
+
float: left;
|
|
74
|
+
|
|
75
|
+
img,
|
|
76
|
+
.icon-wrapper {
|
|
77
|
+
background-color: #edf1f2;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
outline: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.selected {
|
|
83
|
+
outline: solid 3px #517776 !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
img:hover,
|
|
87
|
+
.icon-wrapper:hover {
|
|
88
|
+
outline: solid 3px rgb(187, 198, 200);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.image-preview,
|
|
92
|
+
.image-preview:hover {
|
|
93
|
+
display: flex;
|
|
94
|
+
border: 0;
|
|
95
|
+
border-radius: 0;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
|
|
98
|
+
img {
|
|
99
|
+
width: 200px;
|
|
100
|
+
height: 200px;
|
|
101
|
+
object-fit: contain;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.image-preview,
|
|
106
|
+
.image-title {
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
text-align: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.image-title {
|
|
112
|
+
margin-top: 5px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.image-title-content {
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
text-overflow: ellipsis;
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.icon-wrapper {
|
|
122
|
+
display: flex;
|
|
123
|
+
padding: 46px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -504,3 +504,148 @@
|
|
|
504
504
|
.formtabs {
|
|
505
505
|
flex-wrap: wrap;
|
|
506
506
|
}
|
|
507
|
+
|
|
508
|
+
// Order
|
|
509
|
+
.tree-item-wrapper {
|
|
510
|
+
box-sizing: border-box;
|
|
511
|
+
padding-left: var(--spacing);
|
|
512
|
+
margin-bottom: -1px;
|
|
513
|
+
list-style: none;
|
|
514
|
+
|
|
515
|
+
.text {
|
|
516
|
+
overflow: hidden;
|
|
517
|
+
flex-grow: 1;
|
|
518
|
+
padding-left: 0.5rem;
|
|
519
|
+
text-overflow: ellipsis;
|
|
520
|
+
white-space: nowrap;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
&.disable-interaction {
|
|
524
|
+
pointer-events: none;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
&.disable-selection,
|
|
528
|
+
&.clone {
|
|
529
|
+
.text {
|
|
530
|
+
-webkit-user-select: none;
|
|
531
|
+
user-select: none;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
&.clone {
|
|
536
|
+
display: inline-block;
|
|
537
|
+
width: 375px;
|
|
538
|
+
height: 43px;
|
|
539
|
+
padding: 0;
|
|
540
|
+
pointer-events: none;
|
|
541
|
+
|
|
542
|
+
.tree-item {
|
|
543
|
+
box-shadow: 0px 15px 15px 0 rgba(34, 33, 81, 0.1);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
&.ghost {
|
|
548
|
+
&.indicator {
|
|
549
|
+
position: relative;
|
|
550
|
+
z-index: 1;
|
|
551
|
+
margin-bottom: -1px;
|
|
552
|
+
opacity: 1;
|
|
553
|
+
|
|
554
|
+
.tree-item {
|
|
555
|
+
position: relative;
|
|
556
|
+
height: 8px;
|
|
557
|
+
padding: 0;
|
|
558
|
+
border-color: #2389ff;
|
|
559
|
+
background-color: #56a1f8;
|
|
560
|
+
|
|
561
|
+
&:before {
|
|
562
|
+
position: absolute;
|
|
563
|
+
top: -4px;
|
|
564
|
+
left: -8px;
|
|
565
|
+
display: block;
|
|
566
|
+
width: 12px;
|
|
567
|
+
height: 12px;
|
|
568
|
+
border: 1px solid #2389ff;
|
|
569
|
+
border-radius: 50%;
|
|
570
|
+
background-color: #ffffff;
|
|
571
|
+
content: '';
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
> * {
|
|
575
|
+
height: 0;
|
|
576
|
+
/* Items are hidden using height and opacity to retain focus */
|
|
577
|
+
opacity: 0;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
&:not(.indicator) {
|
|
583
|
+
opacity: 0.5;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.tree-item > * {
|
|
587
|
+
background-color: transparent;
|
|
588
|
+
box-shadow: none;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.tree-item {
|
|
593
|
+
position: relative;
|
|
594
|
+
display: flex;
|
|
595
|
+
box-sizing: border-box;
|
|
596
|
+
align-items: center;
|
|
597
|
+
padding: var(--vertical-padding) 10px;
|
|
598
|
+
border: 1px solid #edf1f2;
|
|
599
|
+
background-color: #fff;
|
|
600
|
+
color: #222;
|
|
601
|
+
cursor: pointer;
|
|
602
|
+
--vertical-padding: 10px;
|
|
603
|
+
|
|
604
|
+
.delete {
|
|
605
|
+
visibility: hidden;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
&.depth-0 {
|
|
609
|
+
border-left: solid 1px white;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
&.hovered {
|
|
613
|
+
z-index: 99;
|
|
614
|
+
border: solid 1px #69b6fa;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
&.selected {
|
|
618
|
+
z-index: 99;
|
|
619
|
+
border: solid 1px #2996da;
|
|
620
|
+
|
|
621
|
+
.delete {
|
|
622
|
+
visibility: visible;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
&.multiSelected {
|
|
627
|
+
z-index: 99;
|
|
628
|
+
border: solid 1px #2996da;
|
|
629
|
+
background-color: rgba(120, 192, 215, 0.375);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.action {
|
|
633
|
+
border: 0;
|
|
634
|
+
margin-left: 8px;
|
|
635
|
+
background-color: transparent;
|
|
636
|
+
color: rgba(0, 0, 0, 0.6);
|
|
637
|
+
|
|
638
|
+
.icon {
|
|
639
|
+
vertical-align: middle;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
&.delete {
|
|
643
|
+
cursor: pointer;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
&.drag {
|
|
647
|
+
cursor: grab;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
@@ -153,3 +153,22 @@ body.babel-view .field.language-independent-field {
|
|
|
153
153
|
.react-select__option {
|
|
154
154
|
.word-break();
|
|
155
155
|
}
|
|
156
|
+
|
|
157
|
+
// makes sure event recurrence form buttons don't overflow when font is big
|
|
158
|
+
.recurrence-form {
|
|
159
|
+
.byday-field {
|
|
160
|
+
.button {
|
|
161
|
+
flex-grow: 1;
|
|
162
|
+
padding-right: 0px;
|
|
163
|
+
padding-left: 0px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.byyear-field {
|
|
168
|
+
.byyear-byday {
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-wrap: wrap;
|
|
171
|
+
align-items: center;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
* Set form data function.
|
|
3
3
|
* @function setFormData
|
|
4
4
|
* @param {Object} data New form data.
|
|
5
|
-
* @returns {Object} Set
|
|
5
|
+
* @returns {Object} Set form data action.
|
|
6
6
|
*/
|
|
7
7
|
export function setFormData(data: any): any;
|
|
8
|
+
/**
|
|
9
|
+
* Set ui state function.
|
|
10
|
+
* @function setUIState
|
|
11
|
+
* @param {Object} ui New ui state.
|
|
12
|
+
* @returns {Object} Set ui state action.
|
|
13
|
+
*/
|
|
14
|
+
export function setUIState(ui: any): any;
|
package/types/actions/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export { listRoles } from "@plone/volto/actions/roles/roles";
|
|
|
10
10
|
export { getTypes } from "@plone/volto/actions/types/types";
|
|
11
11
|
export { getQuerystring } from "@plone/volto/actions/querystring/querystring";
|
|
12
12
|
export { getQueryStringResults } from "@plone/volto/actions/querystringsearch/querystringsearch";
|
|
13
|
-
export { setFormData } from "@plone/volto/actions/form/form";
|
|
14
13
|
export { loadLazyLibrary } from "@plone/volto/actions/lazyLibraries/lazyLibraries";
|
|
15
14
|
export { getContextNavigation } from "@plone/volto/actions/contextNavigation/contextNavigation";
|
|
16
15
|
export { authenticatedRole } from "@plone/volto/actions/authRole/authRole";
|
|
@@ -38,6 +37,7 @@ export { login, loginRenew, logout, resetLoginRequest } from "@plone/volto/actio
|
|
|
38
37
|
export { getVocabulary, getVocabularyTokenTitle } from "@plone/volto/actions/vocabularies/vocabularies";
|
|
39
38
|
export { getWorkflow, transitionWorkflow } from "@plone/volto/actions/workflow/workflow";
|
|
40
39
|
export { setMetadataFieldsets, setMetadataFocus, resetMetadataFocus, setSidebarTab } from "@plone/volto/actions/sidebar/sidebar";
|
|
40
|
+
export { setFormData, setUIState } from "@plone/volto/actions/form/form";
|
|
41
41
|
export { deleteLinkTranslation, getTranslationLocator, linkTranslation } from "@plone/volto/actions/translations/translations";
|
|
42
42
|
export { setBlocksClipboard, resetBlocksClipboard } from "@plone/volto/actions/blocksClipboard/blocksClipboard";
|
|
43
43
|
export { changeLanguage, changeLanguageCookies } from "./language/language";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function Order({ items, onMoveBlock, onDeleteBlock, onSelectBlock, indentationWidth, removable, dndKitCore, dndKitSortable, dndKitUtilities, }: {
|
|
2
|
+
items?: any[];
|
|
3
|
+
onMoveBlock: any;
|
|
4
|
+
onDeleteBlock: any;
|
|
5
|
+
onSelectBlock: any;
|
|
6
|
+
indentationWidth?: number;
|
|
7
|
+
removable: any;
|
|
8
|
+
dndKitCore: any;
|
|
9
|
+
dndKitSortable: any;
|
|
10
|
+
dndKitUtilities: any;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const _default: any;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function SortableItem({ id, depth, dndKitSortable, dndKitUtilities, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
id: any;
|
|
4
|
+
depth: any;
|
|
5
|
+
dndKitSortable: any;
|
|
6
|
+
dndKitUtilities: any;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: any;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function getProjection(items: any, activeId: any, overId: any, dragOffset: any, indentationWidth: any, arrayMove: any): {
|
|
2
|
+
depth: any;
|
|
3
|
+
maxDepth: any;
|
|
4
|
+
minDepth: any;
|
|
5
|
+
parentId: any;
|
|
6
|
+
};
|
|
7
|
+
export function flattenTree(items: any): any;
|
|
8
|
+
export function findItem(items: any, itemId: any): any;
|
|
9
|
+
export function removeChildrenOf(items: any, ids: any): any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export default ObjectBrowserNav;
|
|
2
|
-
declare function ObjectBrowserNav({ currentSearchResults, selected, handleClickOnItem, handleDoubleClickOnItem, mode, navigateTo, isSelectable, }: {
|
|
2
|
+
declare function ObjectBrowserNav({ currentSearchResults, selected, handleClickOnItem, handleDoubleClickOnItem, mode, view, navigateTo, isSelectable, }: {
|
|
3
3
|
currentSearchResults: any;
|
|
4
4
|
selected: any;
|
|
5
5
|
handleClickOnItem: any;
|
|
6
6
|
handleDoubleClickOnItem: any;
|
|
7
7
|
mode: any;
|
|
8
|
+
view: any;
|
|
8
9
|
navigateTo: any;
|
|
9
10
|
isSelectable: any;
|
|
10
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export default IdWidget;
|
|
2
|
+
declare function IdWidget(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace IdWidget {
|
|
4
|
+
namespace propTypes {
|
|
5
|
+
let id: any;
|
|
6
|
+
let title: any;
|
|
7
|
+
let description: any;
|
|
8
|
+
let required: any;
|
|
9
|
+
let error: any;
|
|
10
|
+
let value: any;
|
|
11
|
+
let focus: any;
|
|
12
|
+
let onChange: any;
|
|
13
|
+
let onBlur: any;
|
|
14
|
+
let onClick: any;
|
|
15
|
+
let onEdit: any;
|
|
16
|
+
let onDelete: any;
|
|
17
|
+
let icon: any;
|
|
18
|
+
let iconAction: any;
|
|
19
|
+
let minLength: any;
|
|
20
|
+
let maxLength: any;
|
|
21
|
+
let wrapped: any;
|
|
22
|
+
let placeholder: any;
|
|
23
|
+
}
|
|
24
|
+
namespace defaultProps {
|
|
25
|
+
let description_1: any;
|
|
26
|
+
export { description_1 as description };
|
|
27
|
+
let required_1: boolean;
|
|
28
|
+
export { required_1 as required };
|
|
29
|
+
let error_1: any[];
|
|
30
|
+
export { error_1 as error };
|
|
31
|
+
let value_1: any;
|
|
32
|
+
export { value_1 as value };
|
|
33
|
+
export function onChange_1(): void;
|
|
34
|
+
export { onChange_1 as onChange };
|
|
35
|
+
export function onBlur_1(): void;
|
|
36
|
+
export { onBlur_1 as onBlur };
|
|
37
|
+
export function onClick_1(): void;
|
|
38
|
+
export { onClick_1 as onClick };
|
|
39
|
+
let onEdit_1: any;
|
|
40
|
+
export { onEdit_1 as onEdit };
|
|
41
|
+
let onDelete_1: any;
|
|
42
|
+
export { onDelete_1 as onDelete };
|
|
43
|
+
let focus_1: boolean;
|
|
44
|
+
export { focus_1 as focus };
|
|
45
|
+
let icon_1: any;
|
|
46
|
+
export { icon_1 as icon };
|
|
47
|
+
let iconAction_1: any;
|
|
48
|
+
export { iconAction_1 as iconAction };
|
|
49
|
+
let minLength_1: any;
|
|
50
|
+
export { minLength_1 as minLength };
|
|
51
|
+
let maxLength_1: any;
|
|
52
|
+
export { maxLength_1 as maxLength };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,5 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export default TextWidget;
|
|
2
|
+
declare function TextWidget(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace TextWidget {
|
|
4
|
+
namespace propTypes {
|
|
5
|
+
let id: any;
|
|
6
|
+
let title: any;
|
|
7
|
+
let description: any;
|
|
8
|
+
let required: any;
|
|
9
|
+
let error: any;
|
|
10
|
+
let value: any;
|
|
11
|
+
let focus: any;
|
|
12
|
+
let onChange: any;
|
|
13
|
+
let onBlur: any;
|
|
14
|
+
let onClick: any;
|
|
15
|
+
let onEdit: any;
|
|
16
|
+
let onDelete: any;
|
|
17
|
+
let icon: any;
|
|
18
|
+
let iconAction: any;
|
|
19
|
+
let minLength: any;
|
|
20
|
+
let maxLength: any;
|
|
21
|
+
let wrapped: any;
|
|
22
|
+
let placeholder: any;
|
|
23
|
+
}
|
|
24
|
+
namespace defaultProps {
|
|
25
|
+
let description_1: any;
|
|
26
|
+
export { description_1 as description };
|
|
27
|
+
let required_1: boolean;
|
|
28
|
+
export { required_1 as required };
|
|
29
|
+
let error_1: any[];
|
|
30
|
+
export { error_1 as error };
|
|
31
|
+
let value_1: any;
|
|
32
|
+
export { value_1 as value };
|
|
33
|
+
export function onChange_1(): void;
|
|
34
|
+
export { onChange_1 as onChange };
|
|
35
|
+
export function onBlur_1(): void;
|
|
36
|
+
export { onBlur_1 as onBlur };
|
|
37
|
+
export function onClick_1(): void;
|
|
38
|
+
export { onClick_1 as onClick };
|
|
39
|
+
let onEdit_1: any;
|
|
40
|
+
export { onEdit_1 as onEdit };
|
|
41
|
+
let onDelete_1: any;
|
|
42
|
+
export { onDelete_1 as onDelete };
|
|
43
|
+
let focus_1: boolean;
|
|
44
|
+
export { focus_1 as focus };
|
|
45
|
+
let icon_1: any;
|
|
46
|
+
export { icon_1 as icon };
|
|
47
|
+
let iconAction_1: any;
|
|
48
|
+
export { iconAction_1 as iconAction };
|
|
49
|
+
let minLength_1: any;
|
|
50
|
+
export { minLength_1 as minLength };
|
|
51
|
+
let maxLength_1: any;
|
|
52
|
+
export { maxLength_1 as maxLength };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -3,7 +3,19 @@ declare namespace _default {
|
|
|
3
3
|
export let title: string;
|
|
4
4
|
export { TextWidget as component };
|
|
5
5
|
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
-
export
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
namespace description {
|
|
8
|
+
export let control: string;
|
|
9
|
+
let description_1: string;
|
|
10
|
+
export { description_1 as description };
|
|
11
|
+
}
|
|
12
|
+
namespace placeholder {
|
|
13
|
+
let control_1: string;
|
|
14
|
+
export { control_1 as control };
|
|
15
|
+
let description_2: string;
|
|
16
|
+
export { description_2 as description };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
7
19
|
}
|
|
8
20
|
export default _default;
|
|
9
21
|
import TextWidget from './TextWidget';
|