@kitconcept/core 2.0.0-alpha.11 → 2.0.0-alpha.12
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.draft
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
## 2.0.0-alpha.
|
|
1
|
+
## 2.0.0-alpha.12 (2026-02-27)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Bugfix
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- Add controlpanel to export and import content. @iFlameing
|
|
7
|
-
|
|
8
|
-
### Internal
|
|
9
|
-
|
|
10
|
-
- Added pt_BR Translations. @humanaice [#105](https://github.com/kitconcept/kitconcept-core/issue/105)
|
|
11
|
-
- Remove VLT as a direct dependency of `@kitconcept/core`.
|
|
12
|
-
The specific version should be managed in a distribution instead.
|
|
13
|
-
This avoids the need to release `@kitconcept/core` just to include a new release of VLT.
|
|
14
|
-
@davisagli
|
|
5
|
+
- Fix content export. @davisagli
|
|
15
6
|
|
|
16
7
|
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitconcept/core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"description": "Core setup for kitconcept GmbH distributions built on top of Plone",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,10 +19,17 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
|
|
24
|
+
"dry-release": "release-it --dry-run",
|
|
25
|
+
"release": "release-it",
|
|
26
|
+
"release-major-alpha": "release-it major --preRelease=alpha",
|
|
27
|
+
"release-alpha": "release-it --preRelease=alpha"
|
|
28
|
+
},
|
|
22
29
|
"dependencies": {
|
|
23
30
|
"@mbarde/volto-image-crop-widget": "^0.5.1",
|
|
24
31
|
"@plone-collective/volto-authomatic": "3.0.0-alpha.6",
|
|
25
|
-
"@plone/components": "
|
|
32
|
+
"@plone/components": "workspace:^"
|
|
26
33
|
},
|
|
27
34
|
"peerDependencies": {
|
|
28
35
|
"react": "^18.2.0",
|
|
@@ -32,20 +39,13 @@
|
|
|
32
39
|
},
|
|
33
40
|
"devDependencies": {
|
|
34
41
|
"@plone/scripts": "^3.6.1",
|
|
42
|
+
"@plone/types": "workspace:*",
|
|
35
43
|
"@types/lodash": "^4.14.201",
|
|
36
44
|
"@types/react": "^18.3.1",
|
|
37
45
|
"@types/react-dom": "^18.3.1",
|
|
38
46
|
"lodash": "4.17.21",
|
|
39
47
|
"release-it": "^19.0.5",
|
|
40
48
|
"typescript": "^5.7.3",
|
|
41
|
-
"vitest": "^3.1.2"
|
|
42
|
-
"@plone/types": "1.4.5"
|
|
43
|
-
},
|
|
44
|
-
"scripts": {
|
|
45
|
-
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
|
|
46
|
-
"dry-release": "release-it --dry-run",
|
|
47
|
-
"release": "release-it",
|
|
48
|
-
"release-major-alpha": "release-it major --preRelease=alpha",
|
|
49
|
-
"release-alpha": "release-it --preRelease=alpha"
|
|
49
|
+
"vitest": "^3.1.2"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import { POST_IMPORT
|
|
2
|
-
|
|
3
|
-
export const exportContent = () => {
|
|
4
|
-
return {
|
|
5
|
-
type: POST_EXPORT,
|
|
6
|
-
request: {
|
|
7
|
-
op: 'post',
|
|
8
|
-
path: '/@export',
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
};
|
|
1
|
+
import { POST_IMPORT } from '../../constants/ActionTypes';
|
|
12
2
|
|
|
13
3
|
export const importContent = (file) => {
|
|
14
4
|
const formData = new FormData();
|
|
@@ -14,11 +14,8 @@ import { Button, Container } from '@plone/components';
|
|
|
14
14
|
import { toast } from 'react-toastify';
|
|
15
15
|
import { createPortal } from 'react-dom';
|
|
16
16
|
|
|
17
|
-
import { useDispatch } from 'react-redux';
|
|
18
|
-
import {
|
|
19
|
-
exportContent,
|
|
20
|
-
importContent,
|
|
21
|
-
} from '../../actions/exportImport/exportImport';
|
|
17
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
18
|
+
import { importContent } from '../../actions/exportImport/exportImport';
|
|
22
19
|
|
|
23
20
|
import uploadSVG from '@plone/volto/icons/upload.svg';
|
|
24
21
|
import downloadSVG from '@plone/volto/icons/download.svg';
|
|
@@ -82,6 +79,7 @@ const ContentTransfer = ({ pathname }) => {
|
|
|
82
79
|
const intl = useIntl();
|
|
83
80
|
const isClient = useClient();
|
|
84
81
|
const dispatch = useDispatch();
|
|
82
|
+
const token = useSelector((state) => state.userSession.token);
|
|
85
83
|
|
|
86
84
|
const [exporting, setExporting] = useState(false);
|
|
87
85
|
const [importing, setImporting] = useState(false);
|
|
@@ -90,7 +88,12 @@ const ContentTransfer = ({ pathname }) => {
|
|
|
90
88
|
try {
|
|
91
89
|
setExporting(true);
|
|
92
90
|
|
|
93
|
-
const res = await
|
|
91
|
+
const res = await fetch('/++api++/@export', {
|
|
92
|
+
method: 'POST',
|
|
93
|
+
headers: {
|
|
94
|
+
Authorization: `Bearer ${token}`,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
94
97
|
|
|
95
98
|
if (!res.ok) throw new Error('Export failed');
|
|
96
99
|
|