volto-searchblocks 0.3.0-alpha.7 → 0.3.1
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 +8 -0
- package/locales/de/LC_MESSAGES/volto.po +5 -6
- package/locales/en/LC_MESSAGES/volto.po +5 -6
- package/locales/es/LC_MESSAGES/volto.po +5 -6
- package/locales/it/LC_MESSAGES/volto.po +5 -6
- package/locales/pt_BR/LC_MESSAGES/volto.po +5 -6
- package/locales/volto.pot +6 -7
- package/package.json +9 -9
- package/src/components/SearchBlocks/SearchBlocks.jsx +5 -5
- package/src/components/manage/toolbar/ToolbarUserMenu.jsx +31 -0
- package/src/index.ts +9 -3
- package/.changelog.draft +0 -3
- package/README.md +0 -201
- package/src/config/settings.ts +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 0.3.1 (2026-10-07)
|
|
12
|
+
|
|
13
|
+
### Feature
|
|
14
|
+
|
|
15
|
+
- Reach the search blocks page from the user menu of the toolbar instead of the site control panel, where the "Search blocks" entry is gone. The link is shown only to the users the backend lists the `collective-searchblocks` user action for, and its label is that action's title, so it reads in the site's language. The back button of the page now leads to the site home rather than to the control panel.
|
|
16
|
+
|
|
17
|
+
## 0.3.0 (2026-06-19)
|
|
18
|
+
|
|
11
19
|
## 0.3.0-alpha.7 (2026-04-21)
|
|
12
20
|
|
|
13
21
|
## 0.3.0-alpha.6 (2026-04-17)
|
|
@@ -11,11 +11,6 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
-
#. Default: "Back to Control Panel"
|
|
15
|
-
#: components/SearchBlocks/SearchBlocks
|
|
16
|
-
msgid "Back to Control Panel"
|
|
17
|
-
msgstr ""
|
|
18
|
-
|
|
19
14
|
#. Default: "Block Type"
|
|
20
15
|
#: components/SearchBlocks/SearchBlocks
|
|
21
16
|
msgid "Block Type"
|
|
@@ -31,6 +26,11 @@ msgstr ""
|
|
|
31
26
|
msgid "Created"
|
|
32
27
|
msgstr ""
|
|
33
28
|
|
|
29
|
+
#. Default: "Home"
|
|
30
|
+
#: components/SearchBlocks/SearchBlocks
|
|
31
|
+
msgid "Home"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
34
|
#. Default: "Loading..."
|
|
35
35
|
#: components/SearchBlocks/SearchBlocks
|
|
36
36
|
msgid "Loading"
|
|
@@ -63,7 +63,6 @@ msgstr ""
|
|
|
63
63
|
|
|
64
64
|
#. Default: "Search blocks"
|
|
65
65
|
#: components/SearchBlocks/SearchBlocks
|
|
66
|
-
#: config/settings
|
|
67
66
|
msgid "Search blocks"
|
|
68
67
|
msgstr ""
|
|
69
68
|
|
|
@@ -11,11 +11,6 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
-
#. Default: "Back to Control Panel"
|
|
15
|
-
#: components/SearchBlocks/SearchBlocks
|
|
16
|
-
msgid "Back to Control Panel"
|
|
17
|
-
msgstr ""
|
|
18
|
-
|
|
19
14
|
#. Default: "Block Type"
|
|
20
15
|
#: components/SearchBlocks/SearchBlocks
|
|
21
16
|
msgid "Block Type"
|
|
@@ -31,6 +26,11 @@ msgstr ""
|
|
|
31
26
|
msgid "Created"
|
|
32
27
|
msgstr ""
|
|
33
28
|
|
|
29
|
+
#. Default: "Home"
|
|
30
|
+
#: components/SearchBlocks/SearchBlocks
|
|
31
|
+
msgid "Home"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
34
|
#. Default: "Loading..."
|
|
35
35
|
#: components/SearchBlocks/SearchBlocks
|
|
36
36
|
msgid "Loading"
|
|
@@ -63,7 +63,6 @@ msgstr ""
|
|
|
63
63
|
|
|
64
64
|
#. Default: "Search blocks"
|
|
65
65
|
#: components/SearchBlocks/SearchBlocks
|
|
66
|
-
#: config/settings
|
|
67
66
|
msgid "Search blocks"
|
|
68
67
|
msgstr ""
|
|
69
68
|
|
|
@@ -18,11 +18,6 @@ msgstr ""
|
|
|
18
18
|
"X-Is-Fallback-For: es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve\n"
|
|
19
19
|
"X-Generator: Poedit 2.2.1\n"
|
|
20
20
|
|
|
21
|
-
#. Default: "Back to Control Panel"
|
|
22
|
-
#: components/SearchBlocks/SearchBlocks
|
|
23
|
-
msgid "Back to Control Panel"
|
|
24
|
-
msgstr ""
|
|
25
|
-
|
|
26
21
|
#. Default: "Block Type"
|
|
27
22
|
#: components/SearchBlocks/SearchBlocks
|
|
28
23
|
msgid "Block Type"
|
|
@@ -38,6 +33,11 @@ msgstr ""
|
|
|
38
33
|
msgid "Created"
|
|
39
34
|
msgstr ""
|
|
40
35
|
|
|
36
|
+
#. Default: "Home"
|
|
37
|
+
#: components/SearchBlocks/SearchBlocks
|
|
38
|
+
msgid "Home"
|
|
39
|
+
msgstr ""
|
|
40
|
+
|
|
41
41
|
#. Default: "Loading..."
|
|
42
42
|
#: components/SearchBlocks/SearchBlocks
|
|
43
43
|
msgid "Loading"
|
|
@@ -70,7 +70,6 @@ msgstr ""
|
|
|
70
70
|
|
|
71
71
|
#. Default: "Search blocks"
|
|
72
72
|
#: components/SearchBlocks/SearchBlocks
|
|
73
|
-
#: config/settings
|
|
74
73
|
msgid "Search blocks"
|
|
75
74
|
msgstr ""
|
|
76
75
|
|
|
@@ -12,11 +12,6 @@ msgstr ""
|
|
|
12
12
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
13
13
|
"MIME-Version: 1.0\n"
|
|
14
14
|
|
|
15
|
-
#. Default: "Back to Control Panel"
|
|
16
|
-
#: components/SearchBlocks/SearchBlocks
|
|
17
|
-
msgid "Back to Control Panel"
|
|
18
|
-
msgstr "Torna al Pannello di Controllo"
|
|
19
|
-
|
|
20
15
|
#. Default: "Block Type"
|
|
21
16
|
#: components/SearchBlocks/SearchBlocks
|
|
22
17
|
msgid "Block Type"
|
|
@@ -32,6 +27,11 @@ msgstr "Scegli un tipo di blocco"
|
|
|
32
27
|
msgid "Created"
|
|
33
28
|
msgstr "Creato"
|
|
34
29
|
|
|
30
|
+
#. Default: "Home"
|
|
31
|
+
#: components/SearchBlocks/SearchBlocks
|
|
32
|
+
msgid "Home"
|
|
33
|
+
msgstr "Home"
|
|
34
|
+
|
|
35
35
|
#. Default: "Loading..."
|
|
36
36
|
#: components/SearchBlocks/SearchBlocks
|
|
37
37
|
msgid "Loading"
|
|
@@ -64,7 +64,6 @@ msgstr "Stato di Revisione"
|
|
|
64
64
|
|
|
65
65
|
#. Default: "Search blocks"
|
|
66
66
|
#: components/SearchBlocks/SearchBlocks
|
|
67
|
-
#: config/settings
|
|
68
67
|
msgid "Search blocks"
|
|
69
68
|
msgstr "Ricerca blocchi"
|
|
70
69
|
|
|
@@ -16,11 +16,6 @@ msgstr ""
|
|
|
16
16
|
"Preferred-Encodings: utf-8\n"
|
|
17
17
|
"Domain: volto\n"
|
|
18
18
|
|
|
19
|
-
#. Default: "Back to Control Panel"
|
|
20
|
-
#: components/SearchBlocks/SearchBlocks
|
|
21
|
-
msgid "Back to Control Panel"
|
|
22
|
-
msgstr ""
|
|
23
|
-
|
|
24
19
|
#. Default: "Block Type"
|
|
25
20
|
#: components/SearchBlocks/SearchBlocks
|
|
26
21
|
msgid "Block Type"
|
|
@@ -36,6 +31,11 @@ msgstr ""
|
|
|
36
31
|
msgid "Created"
|
|
37
32
|
msgstr ""
|
|
38
33
|
|
|
34
|
+
#. Default: "Home"
|
|
35
|
+
#: components/SearchBlocks/SearchBlocks
|
|
36
|
+
msgid "Home"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
39
|
#. Default: "Loading..."
|
|
40
40
|
#: components/SearchBlocks/SearchBlocks
|
|
41
41
|
msgid "Loading"
|
|
@@ -68,7 +68,6 @@ msgstr ""
|
|
|
68
68
|
|
|
69
69
|
#. Default: "Search blocks"
|
|
70
70
|
#: components/SearchBlocks/SearchBlocks
|
|
71
|
-
#: config/settings
|
|
72
71
|
msgid "Search blocks"
|
|
73
72
|
msgstr ""
|
|
74
73
|
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date: 2026-
|
|
4
|
+
"POT-Creation-Date: 2026-10-07T13:14:45.245Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
@@ -13,11 +13,6 @@ msgstr ""
|
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
-
#. Default: "Back to Control Panel"
|
|
17
|
-
#: components/SearchBlocks/SearchBlocks
|
|
18
|
-
msgid "Back to Control Panel"
|
|
19
|
-
msgstr ""
|
|
20
|
-
|
|
21
16
|
#. Default: "Block Type"
|
|
22
17
|
#: components/SearchBlocks/SearchBlocks
|
|
23
18
|
msgid "Block Type"
|
|
@@ -33,6 +28,11 @@ msgstr ""
|
|
|
33
28
|
msgid "Created"
|
|
34
29
|
msgstr ""
|
|
35
30
|
|
|
31
|
+
#. Default: "Home"
|
|
32
|
+
#: components/SearchBlocks/SearchBlocks
|
|
33
|
+
msgid "Home"
|
|
34
|
+
msgstr ""
|
|
35
|
+
|
|
36
36
|
#. Default: "Loading..."
|
|
37
37
|
#: components/SearchBlocks/SearchBlocks
|
|
38
38
|
msgid "Loading"
|
|
@@ -65,7 +65,6 @@ msgstr ""
|
|
|
65
65
|
|
|
66
66
|
#. Default: "Search blocks"
|
|
67
67
|
#: components/SearchBlocks/SearchBlocks
|
|
68
|
-
#: config/settings
|
|
69
68
|
msgid "Search blocks"
|
|
70
69
|
msgstr ""
|
|
71
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volto-searchblocks",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Additional control-panel that allow users to search which contents using a specific block",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
"access": "public",
|
|
21
21
|
"registry": "https://registry.npmjs.org/"
|
|
22
22
|
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
|
|
25
|
+
"dry-release": "release-it --dry-run",
|
|
26
|
+
"release": "release-it",
|
|
27
|
+
"release-major-alpha": "release-it major --preRelease=alpha",
|
|
28
|
+
"release-alpha": "release-it --preRelease=alpha"
|
|
29
|
+
},
|
|
23
30
|
"addons": [],
|
|
24
31
|
"theme": "",
|
|
25
32
|
"peerDependencies": {
|
|
@@ -32,12 +39,5 @@
|
|
|
32
39
|
"release-it": "^19.0.5",
|
|
33
40
|
"typescript": "^5.7.3",
|
|
34
41
|
"@plone/scripts": "^3.10.3"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
|
|
38
|
-
"dry-release": "release-it --dry-run",
|
|
39
|
-
"release": "release-it",
|
|
40
|
-
"release-major-alpha": "release-it major --preRelease=alpha",
|
|
41
|
-
"release-alpha": "release-it --preRelease=alpha"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|
|
@@ -70,9 +70,9 @@ const messages = defineMessages({
|
|
|
70
70
|
id: 'No results found for',
|
|
71
71
|
defaultMessage: 'No results found for',
|
|
72
72
|
},
|
|
73
|
-
|
|
74
|
-
id: '
|
|
75
|
-
defaultMessage: '
|
|
73
|
+
backToHome: {
|
|
74
|
+
id: 'Home',
|
|
75
|
+
defaultMessage: 'Home',
|
|
76
76
|
},
|
|
77
77
|
private: {
|
|
78
78
|
id: 'private',
|
|
@@ -302,12 +302,12 @@ const SearchBlocks = (props) => {
|
|
|
302
302
|
hideDefaultViewButtons
|
|
303
303
|
inner={
|
|
304
304
|
<>
|
|
305
|
-
<Link to="/
|
|
305
|
+
<Link to="/" className="item">
|
|
306
306
|
<Icon
|
|
307
307
|
name={backSVG}
|
|
308
308
|
className="contents circled"
|
|
309
309
|
size="30px"
|
|
310
|
-
title={intl.formatMessage(messages.
|
|
310
|
+
title={intl.formatMessage(messages.backToHome)}
|
|
311
311
|
/>
|
|
312
312
|
</Link>
|
|
313
313
|
</>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSelector } from 'react-redux';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
|
|
5
|
+
import { Icon } from '@plone/volto/components';
|
|
6
|
+
import rightArrowSVG from '@plone/volto/icons/right-key.svg';
|
|
7
|
+
import { Plug } from '@plone/volto/components/manage/Pluggable';
|
|
8
|
+
|
|
9
|
+
export const ToolbarUserMenu = () => {
|
|
10
|
+
const searchBlocksAction = useSelector((state) =>
|
|
11
|
+
(state.actions?.actions?.user ?? []).find(
|
|
12
|
+
(action) => action.id === 'collective-searchblocks',
|
|
13
|
+
),
|
|
14
|
+
);
|
|
15
|
+
return searchBlocksAction ? (
|
|
16
|
+
<Plug pluggable="toolbar-user-menu" id="collective-searchblocks-toolbar">
|
|
17
|
+
<li>
|
|
18
|
+
<Link
|
|
19
|
+
to="/controlpanel/search-blocks"
|
|
20
|
+
tabIndex={0}
|
|
21
|
+
className="deleteBlocks"
|
|
22
|
+
id="toolbar-search-blocks"
|
|
23
|
+
>
|
|
24
|
+
{searchBlocksAction.title} <Icon name={rightArrowSVG} size="24px" />
|
|
25
|
+
</Link>
|
|
26
|
+
</li>
|
|
27
|
+
</Plug>
|
|
28
|
+
) : null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default ToolbarUserMenu;
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { ConfigType } from '@plone/registry';
|
|
2
|
-
import installSettings from './config/settings';
|
|
3
2
|
|
|
4
3
|
import { searchBlocks } from './actions/searchBlocks';
|
|
5
4
|
import searchBlocksReducer from './reducers/searchBlocks';
|
|
6
5
|
import SearchBlocks from './components/SearchBlocks/SearchBlocks';
|
|
6
|
+
import ToolbarUserMenu from './components/manage/toolbar/ToolbarUserMenu';
|
|
7
7
|
|
|
8
8
|
function applyConfig(config: ConfigType) {
|
|
9
|
-
installSettings(config);
|
|
10
|
-
|
|
11
9
|
config.addonReducers = {
|
|
12
10
|
...config.addonReducers,
|
|
13
11
|
searchBlocks: searchBlocksReducer,
|
|
@@ -20,6 +18,14 @@ function applyConfig(config: ConfigType) {
|
|
|
20
18
|
component: SearchBlocks,
|
|
21
19
|
},
|
|
22
20
|
];
|
|
21
|
+
config.settings.appExtras = [
|
|
22
|
+
...config.settings.appExtras,
|
|
23
|
+
{
|
|
24
|
+
match: '',
|
|
25
|
+
component: ToolbarUserMenu,
|
|
26
|
+
props: {},
|
|
27
|
+
},
|
|
28
|
+
];
|
|
23
29
|
|
|
24
30
|
return config;
|
|
25
31
|
}
|
package/.changelog.draft
DELETED
package/README.md
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
# Search blocks (volto-searchblocks)
|
|
2
|
-
|
|
3
|
-
A Volto add-on that provides a control panel for searching and managing content that uses specific blocks.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/volto-searchblocks)
|
|
6
|
-
[](https://collective.github.io/volto-searchblocks/)
|
|
7
|
-
[](https://github.com/collective/collective-searchblocks/actions/workflows/main.yml)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Features ✨
|
|
11
|
-
|
|
12
|
-
- **Search Blocks Control Panel**: Dedicated control panel view for searching content by block types
|
|
13
|
-
- **Table Display**: Results displayed in a sortable table with key metadata
|
|
14
|
-
- **Pagination**: Navigate through results with configurable page sizes (default, 50, or all)
|
|
15
|
-
- **Block Type Selection**: Dropdown selector for choosing which block type to search for
|
|
16
|
-
- **Multilingual Support**: Full i18n support with Italian translation included
|
|
17
|
-
- **Error Handling**: Comprehensive error displays for API failures
|
|
18
|
-
- **Semantic UI Integration**: Uses Volto's standard Semantic UI components for consistent styling
|
|
19
|
-
|
|
20
|
-
## Installation
|
|
21
|
-
|
|
22
|
-
To install your project, you must choose the method appropriate to your version of Volto.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Volto 18 and later
|
|
26
|
-
|
|
27
|
-
Add `volto-searchblocks` to your `package.json`.
|
|
28
|
-
|
|
29
|
-
```json
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"volto-searchblocks": "*"
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Add `volto-searchblocks` to your `volto.config.js`.
|
|
36
|
-
|
|
37
|
-
```javascript
|
|
38
|
-
const addons = ['volto-searchblocks'];
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
If this package provides a Volto theme, and you want to activate it, then add the following to your `volto.config.js`.
|
|
42
|
-
|
|
43
|
-
```javascript
|
|
44
|
-
const theme = 'volto-searchblocks';
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Volto 17 and earlier
|
|
48
|
-
|
|
49
|
-
Create a new Volto project.
|
|
50
|
-
You can skip this step if you already have one.
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
npm install -g yo @plone/generator-volto
|
|
54
|
-
yo @plone/volto my-volto-project --addon volto-searchblocks
|
|
55
|
-
cd my-volto-project
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Add `volto-searchblocks` to your `package.json`.
|
|
59
|
-
|
|
60
|
-
```JSON
|
|
61
|
-
"addons": [
|
|
62
|
-
"volto-searchblocks"
|
|
63
|
-
],
|
|
64
|
-
|
|
65
|
-
"dependencies": {
|
|
66
|
-
"volto-searchblocks": "*"
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Download and install the new add-on.
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
yarn install
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Start Volto.
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
yarn start
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Test installation
|
|
83
|
-
|
|
84
|
-
Visit http://localhost:3000/ in a browser, login, and check the awesome new features.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## Development
|
|
88
|
-
|
|
89
|
-
The development of this add-on is done in isolation using pnpm workspaces, the latest `mrs-developer`, and other Volto core improvements.
|
|
90
|
-
For these reasons, it only works with pnpm and Volto 18.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### Prerequisites ✅
|
|
94
|
-
|
|
95
|
-
- An [operating system](https://6.docs.plone.org/install/create-project-cookieplone.html#prerequisites-for-installation) that runs all the requirements mentioned.
|
|
96
|
-
- [nvm](https://6.docs.plone.org/install/create-project-cookieplone.html#nvm)
|
|
97
|
-
- [Node.js and pnpm](https://6.docs.plone.org/install/create-project.html#node-js) 22
|
|
98
|
-
- [Make](https://6.docs.plone.org/install/create-project-cookieplone.html#make)
|
|
99
|
-
- [Git](https://6.docs.plone.org/install/create-project-cookieplone.html#git)
|
|
100
|
-
- [Docker](https://docs.docker.com/get-started/get-docker/) (optional)
|
|
101
|
-
|
|
102
|
-
### Installation 🔧
|
|
103
|
-
|
|
104
|
-
1. Clone this repository, then change your working directory.
|
|
105
|
-
|
|
106
|
-
```shell
|
|
107
|
-
git clone git@github.com:collective/collective-searchblocks.git
|
|
108
|
-
cd collective-searchblocks/frontend
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
2. Install this code base.
|
|
112
|
-
|
|
113
|
-
```shell
|
|
114
|
-
make install
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### Make convenience commands
|
|
119
|
-
|
|
120
|
-
Run `make help` to list the available Make commands.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
### Set up development environment
|
|
124
|
-
|
|
125
|
-
Install package requirements.
|
|
126
|
-
|
|
127
|
-
```shell
|
|
128
|
-
make install
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Start developing
|
|
132
|
-
|
|
133
|
-
Start the backend.
|
|
134
|
-
|
|
135
|
-
```shell
|
|
136
|
-
make backend-docker-start
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
In a separate terminal session, start the frontend.
|
|
140
|
-
|
|
141
|
-
```shell
|
|
142
|
-
make start
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Lint code
|
|
146
|
-
|
|
147
|
-
Run ESlint, Prettier, and Stylelint in analyze mode.
|
|
148
|
-
|
|
149
|
-
```shell
|
|
150
|
-
make lint
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Format code
|
|
154
|
-
|
|
155
|
-
Run ESlint, Prettier, and Stylelint in fix mode.
|
|
156
|
-
|
|
157
|
-
```shell
|
|
158
|
-
make format
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### i18n
|
|
162
|
-
|
|
163
|
-
Extract the i18n messages to locales.
|
|
164
|
-
|
|
165
|
-
```shell
|
|
166
|
-
make i18n
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Unit tests
|
|
170
|
-
|
|
171
|
-
Run unit tests.
|
|
172
|
-
|
|
173
|
-
```shell
|
|
174
|
-
make test
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Run Cypress tests
|
|
178
|
-
|
|
179
|
-
Run each of these steps in separate terminal sessions.
|
|
180
|
-
|
|
181
|
-
In the first session, start the frontend in development mode.
|
|
182
|
-
|
|
183
|
-
```shell
|
|
184
|
-
make acceptance-frontend-dev-start
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
In the second session, start the backend acceptance server.
|
|
188
|
-
|
|
189
|
-
```shell
|
|
190
|
-
make acceptance-backend-start
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
In the third session, start the Cypress interactive test runner.
|
|
194
|
-
|
|
195
|
-
```shell
|
|
196
|
-
make acceptance-test
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
## License
|
|
200
|
-
|
|
201
|
-
The project is licensed under the MIT license.
|
package/src/config/settings.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ConfigType } from '@plone/registry';
|
|
2
|
-
import { defineMessages } from 'react-intl';
|
|
3
|
-
import cardsSVG from '@plone/volto/icons/cards.svg';
|
|
4
|
-
|
|
5
|
-
const messages = defineMessages({
|
|
6
|
-
controlPanelTitle: {
|
|
7
|
-
id: 'Search blocks',
|
|
8
|
-
defaultMessage: 'Search blocks',
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export default function install(config: ConfigType) {
|
|
13
|
-
config.settings.controlpanels = [
|
|
14
|
-
...config.settings.controlpanels,
|
|
15
|
-
{
|
|
16
|
-
'@id': '/search-blocks',
|
|
17
|
-
group: 'General',
|
|
18
|
-
title: messages.controlPanelTitle.defaultMessage,
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
config.settings.controlPanelsIcons = {
|
|
22
|
-
...config.settings.controlPanelsIcons,
|
|
23
|
-
'blocks-search': cardsSVG,
|
|
24
|
-
};
|
|
25
|
-
return config;
|
|
26
|
-
}
|