@eeacms/volto-cca-policy 0.3.31 → 0.3.32
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 +20 -0
- package/package.json +1 -1
- package/src/components/index.js +1 -0
- package/src/components/manage/Blocks/index.js +0 -2
- package/src/components/{manage/Blocks/MissionSignatoriesProfile/MissionSignatoriesProfileView.js → theme/MissionSignatoryProfile/MissionSignatoryProfileView.jsx} +25 -16
- package/src/components/{manage/Blocks/MissionSignatoriesProfile/MissionSignatoriesProfileView.test.jsx → theme/MissionSignatoryProfile/MissionSignatoryProfileView.test.jsx} +11 -10
- package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/ActionPagesTab.jsx +1 -1
- package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/AssessmentTab.jsx +1 -1
- package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/GovernanceTab.jsx +2 -2
- package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/PlanningTab.jsx +1 -1
- package/src/index.js +2 -0
- package/src/utils.js +7 -1
- package/src/components/manage/Blocks/MissionSignatoriesProfile/MissionSignatoriesProfileEdit.js +0 -28
- package/src/components/manage/Blocks/MissionSignatoriesProfile/index.js +0 -25
- package/src/components/manage/Blocks/MissionSignatoriesProfile/schema.js +0 -18
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/AccordionList.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/AccordionList.test.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/StatisticsSection.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/ActionPagesTab.test.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/AssessmentTab.test.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/GovernanceTab.test.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/IntroductionTab.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/TabSections/PlanningTab.test.jsx +0 -0
- /package/src/components/{manage/Blocks/MissionSignatoriesProfile → theme/MissionSignatoryProfile}/style.less +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [0.3.32](https://github.com/eea/volto-cca-policy/compare/0.3.31...0.3.32) - 30 April 2025
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: remove fallback [kreafox - [`738324e`](https://github.com/eea/volto-cca-policy/commit/738324edeb747b4d3f030b7e92a45614923a659b)]
|
|
12
|
+
- fix: update tests [kreafox - [`ed276ea`](https://github.com/eea/volto-cca-policy/commit/ed276eaceab752cd54a1d96db4cee9b1605f34ed)]
|
|
13
|
+
|
|
14
|
+
#### :nail_care: Enhancements
|
|
15
|
+
|
|
16
|
+
- change: enhance formatTextToHTML to auto-link URLs as clickable anchor tags - refs #285296 [kreafox - [`c660faf`](https://github.com/eea/volto-cca-policy/commit/c660faf359963084537c28c4c558473227c35b59)]
|
|
17
|
+
- change: refactor mission signatory profile; add view, remove block - refs #285361 [kreafox - [`3424316`](https://github.com/eea/volto-cca-policy/commit/34243168e2cae1b617f6ea05d479157109be5dcf)]
|
|
18
|
+
|
|
7
19
|
### [0.3.31](https://github.com/eea/volto-cca-policy/compare/0.3.30...0.3.31) - 29 April 2025
|
|
8
20
|
|
|
9
21
|
#### :bug: Bug Fixes
|
|
@@ -2228,10 +2240,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2228
2240
|
- Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
|
|
2229
2241
|
- Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
|
|
2230
2242
|
- Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
|
|
2243
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
|
|
2244
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
|
|
2231
2245
|
### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
|
|
2232
2246
|
|
|
2233
2247
|
#### :house: Internal changes
|
|
2234
2248
|
|
|
2249
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
|
|
2235
2250
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
|
|
2236
2251
|
|
|
2237
2252
|
#### :hammer_and_wrench: Others
|
|
@@ -2248,6 +2263,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2248
2263
|
- Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
|
|
2249
2264
|
- Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
|
|
2250
2265
|
- Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
|
|
2266
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
|
|
2267
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
|
|
2268
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
|
|
2251
2269
|
- Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
|
|
2252
2270
|
- Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
|
|
2253
2271
|
- Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
|
|
@@ -2464,6 +2482,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2464
2482
|
|
|
2465
2483
|
#### :house: Internal changes
|
|
2466
2484
|
|
|
2485
|
+
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
|
|
2467
2486
|
|
|
2468
2487
|
#### :hammer_and_wrench: Others
|
|
2469
2488
|
|
|
@@ -2944,6 +2963,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2944
2963
|
#### :hammer_and_wrench: Others
|
|
2945
2964
|
|
|
2946
2965
|
- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
|
|
2966
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
|
|
2947
2967
|
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
|
|
2948
2968
|
|
|
2949
2969
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
package/src/components/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as TranslationDisclaimer } from './theme/TranslationDisclaimer/
|
|
|
5
5
|
export { default as ShareInfoButton } from './theme/ShareInfoButton/ShareInfoButton';
|
|
6
6
|
export { default as ASTNavigation } from './theme/ASTNavigation/ASTNavigation';
|
|
7
7
|
export { default as RedirectToLogin } from './theme/RedirectToLogin/RedirectToLogin';
|
|
8
|
+
export { default as MissionSignatoryProfileView } from './theme/MissionSignatoryProfile/MissionSignatoryProfileView';
|
|
8
9
|
|
|
9
10
|
// Widgets
|
|
10
11
|
export { default as RASTWidgetView } from './theme/Widgets/RASTWidgetView';
|
|
@@ -22,7 +22,6 @@ import installTabsBlock from './TabsBlock';
|
|
|
22
22
|
import installRedirectBlock from './RedirectBlock';
|
|
23
23
|
import installContentLinks from './ContentLinks';
|
|
24
24
|
import installASTNavigation from './ASTNavigation';
|
|
25
|
-
import installMissionSignatoriesProfileBlock from './MissionSignatoriesProfile';
|
|
26
25
|
|
|
27
26
|
export default function installBlocks(config) {
|
|
28
27
|
config.blocks.blocksConfig.title.restricted = false;
|
|
@@ -54,6 +53,5 @@ export default function installBlocks(config) {
|
|
|
54
53
|
installRedirectBlock,
|
|
55
54
|
installContentLinks,
|
|
56
55
|
installASTNavigation,
|
|
57
|
-
installMissionSignatoriesProfileBlock,
|
|
58
56
|
)(config);
|
|
59
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Tab } from 'semantic-ui-react';
|
|
3
|
-
|
|
2
|
+
import { Tab, Container } from 'semantic-ui-react';
|
|
3
|
+
import { BannerTitle } from '@eeacms/volto-cca-policy/helpers';
|
|
4
4
|
import IntroductionTab from './TabSections/IntroductionTab';
|
|
5
5
|
import GovernanceTab from './TabSections/GovernanceTab';
|
|
6
6
|
import AssessmentTab from './TabSections/AssessmentTab';
|
|
@@ -9,26 +9,35 @@ import ActionPagesTab from './TabSections/ActionPagesTab';
|
|
|
9
9
|
|
|
10
10
|
import './style.less';
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const {
|
|
14
|
-
const
|
|
12
|
+
const MissionSignatoryProfileView = (props) => {
|
|
13
|
+
const { content } = props || {};
|
|
14
|
+
const dataJson =
|
|
15
|
+
props?.content?.['@components']?.missionsignatoryprofile || {};
|
|
16
|
+
|
|
17
|
+
const result = dataJson?.result || {};
|
|
15
18
|
const governance = result?.governance?.[0] || [];
|
|
16
19
|
const planning = result?.planning || {};
|
|
17
20
|
const assessment = result?.assessment || {};
|
|
18
21
|
const action = result?.action || {};
|
|
19
22
|
|
|
20
|
-
// const dataJson = JSON.parse(result?.Cooperation_Experience);
|
|
21
23
|
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
22
24
|
|
|
23
25
|
return (
|
|
24
|
-
|
|
26
|
+
<Container>
|
|
27
|
+
<BannerTitle
|
|
28
|
+
content={content}
|
|
29
|
+
data={{
|
|
30
|
+
info: [{ description: '' }],
|
|
31
|
+
hideContentType: true,
|
|
32
|
+
hideCreationDate: true,
|
|
33
|
+
hideModificationDate: true,
|
|
34
|
+
hidePublishingDate: true,
|
|
35
|
+
hideDownloadButton: false,
|
|
36
|
+
hideShareButton: false,
|
|
37
|
+
}}
|
|
38
|
+
/>
|
|
25
39
|
<div className="signatories-profile">
|
|
26
|
-
{/* {
|
|
27
|
-
dataJson['Cooperation_Experience'][0][
|
|
28
|
-
'DescribeDetailCooperationEnhance'
|
|
29
|
-
]
|
|
30
|
-
} */}
|
|
31
|
-
<h2>{planning?.planning_titles?.[0].Signatory}</h2>
|
|
40
|
+
{/* <h2>{planning?.planning_titles?.[0].Signatory}</h2> */}
|
|
32
41
|
{/* <h2>{planning?.planning_titles?.[0].Id}</h2> */}
|
|
33
42
|
|
|
34
43
|
<br />
|
|
@@ -61,14 +70,14 @@ const MissionSignatoriesProfileView = (props) => {
|
|
|
61
70
|
render: () => <PlanningTab result={planning} />,
|
|
62
71
|
},
|
|
63
72
|
{
|
|
64
|
-
menuItem: 'Action
|
|
73
|
+
menuItem: 'Action',
|
|
65
74
|
render: () => <ActionPagesTab result={action} />,
|
|
66
75
|
},
|
|
67
76
|
]}
|
|
68
77
|
/>
|
|
69
78
|
</div>
|
|
70
|
-
|
|
79
|
+
</Container>
|
|
71
80
|
);
|
|
72
81
|
};
|
|
73
82
|
|
|
74
|
-
export default
|
|
83
|
+
export default MissionSignatoryProfileView;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, fireEvent, screen } from '@testing-library/react';
|
|
3
3
|
import '@testing-library/jest-dom';
|
|
4
|
-
import
|
|
4
|
+
import MissionSignatoryProfileView from './MissionSignatoryProfileView';
|
|
5
5
|
|
|
6
6
|
// Mock the tab components with minimal placeholders
|
|
7
7
|
jest.mock('./TabSections/IntroductionTab', () => () => (
|
|
@@ -14,11 +14,12 @@ jest.mock('./TabSections/AssessmentTab', () => () => (
|
|
|
14
14
|
<div>Mocked Assessment</div>
|
|
15
15
|
));
|
|
16
16
|
jest.mock('./TabSections/PlanningTab', () => () => <div>Mocked Planning</div>);
|
|
17
|
-
jest.mock('./TabSections/ActionPagesTab', () => () =>
|
|
18
|
-
|
|
19
|
-
)
|
|
17
|
+
jest.mock('./TabSections/ActionPagesTab', () => () => <div>Mocked Action</div>);
|
|
18
|
+
jest.mock('@eeacms/volto-cca-policy/helpers', () => ({
|
|
19
|
+
BannerTitle: ({ children }) => <div>{children}</div>,
|
|
20
|
+
}));
|
|
20
21
|
|
|
21
|
-
describe('
|
|
22
|
+
describe('MissionSignatoryProfileView', () => {
|
|
22
23
|
const data = {
|
|
23
24
|
_v_results: {
|
|
24
25
|
planning: {
|
|
@@ -29,21 +30,21 @@ describe('MissionSignatoriesProfileView', () => {
|
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
it('renders tab labels and default content', () => {
|
|
32
|
-
render(<
|
|
33
|
+
render(<MissionSignatoryProfileView data={data} />);
|
|
33
34
|
|
|
34
35
|
// Tab labels
|
|
35
36
|
expect(screen.getByText('Introduction')).toBeInTheDocument();
|
|
36
37
|
expect(screen.getByText('Governance')).toBeInTheDocument();
|
|
37
38
|
expect(screen.getByText('Assessment')).toBeInTheDocument();
|
|
38
39
|
expect(screen.getByText('Planning')).toBeInTheDocument();
|
|
39
|
-
expect(screen.getByText('Action
|
|
40
|
+
expect(screen.getByText('Action')).toBeInTheDocument();
|
|
40
41
|
|
|
41
42
|
// Default selected tab content (Introduction)
|
|
42
43
|
expect(screen.getByText('Mocked Introduction')).toBeInTheDocument();
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
it('switches tabs and renders corresponding content', () => {
|
|
46
|
-
render(<
|
|
47
|
+
render(<MissionSignatoryProfileView data={data} />);
|
|
47
48
|
|
|
48
49
|
fireEvent.click(screen.getByText('Governance'));
|
|
49
50
|
expect(screen.getByText('Mocked Governance')).toBeInTheDocument();
|
|
@@ -54,7 +55,7 @@ describe('MissionSignatoriesProfileView', () => {
|
|
|
54
55
|
fireEvent.click(screen.getByText('Planning'));
|
|
55
56
|
expect(screen.getByText('Mocked Planning')).toBeInTheDocument();
|
|
56
57
|
|
|
57
|
-
fireEvent.click(screen.getByText('Action
|
|
58
|
-
expect(screen.getByText('Mocked Action
|
|
58
|
+
fireEvent.click(screen.getByText('Action'));
|
|
59
|
+
expect(screen.getByText('Mocked Action')).toBeInTheDocument();
|
|
59
60
|
});
|
|
60
61
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Tab, Grid } from 'semantic-ui-react';
|
|
3
3
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
4
|
-
import AccordionList from '
|
|
4
|
+
import AccordionList from '../AccordionList';
|
|
5
5
|
|
|
6
6
|
const ActionsTabContent = ({ action }) => {
|
|
7
7
|
const hasHazards = action?.Climate_Hazards?.length > 0;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ItemContent,
|
|
9
9
|
} from 'semantic-ui-react';
|
|
10
10
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
11
|
-
import AccordionList from '
|
|
11
|
+
import AccordionList from '../AccordionList';
|
|
12
12
|
|
|
13
13
|
import image from '@eeacms/volto-cca-policy/../theme//assets/images/image-narrow.svg';
|
|
14
14
|
|
|
@@ -3,7 +3,7 @@ import { Tab } from 'semantic-ui-react';
|
|
|
3
3
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
4
4
|
import { HTMLField } from '@eeacms/volto-cca-policy/helpers';
|
|
5
5
|
import { formatTextToHTML } from '@eeacms/volto-cca-policy/utils';
|
|
6
|
-
import AccordionList from '
|
|
6
|
+
import AccordionList from '../AccordionList';
|
|
7
7
|
|
|
8
8
|
const GovernanceTab = ({ result }) => {
|
|
9
9
|
const {
|
|
@@ -27,7 +27,7 @@ const GovernanceTab = ({ result }) => {
|
|
|
27
27
|
|
|
28
28
|
<br />
|
|
29
29
|
|
|
30
|
-
{
|
|
30
|
+
{Provide && (
|
|
31
31
|
<AccordionList
|
|
32
32
|
accordions={[
|
|
33
33
|
{
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
formatTextToHTML,
|
|
16
16
|
extractPlanNameAndURL,
|
|
17
17
|
} from '@eeacms/volto-cca-policy/utils';
|
|
18
|
-
import AccordionList from '
|
|
18
|
+
import AccordionList from '../AccordionList';
|
|
19
19
|
import image from '@eeacms/volto-cca-policy/../theme/assets/images/image-narrow.svg';
|
|
20
20
|
|
|
21
21
|
const ItemsSection = ({ items }) => {
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
RASTWidgetView,
|
|
9
9
|
TranslationDisclaimer,
|
|
10
10
|
RedirectToLogin,
|
|
11
|
+
MissionSignatoryProfileView,
|
|
11
12
|
} from '@eeacms/volto-cca-policy/components';
|
|
12
13
|
import { blockAvailableInMission } from '@eeacms/volto-cca-policy/utils';
|
|
13
14
|
|
|
@@ -375,6 +376,7 @@ const applyConfig = (config) => {
|
|
|
375
376
|
'eea.climateadapt.c3sindicator': C3SIndicatorView,
|
|
376
377
|
'eea.climateadapt.adaptationoption': AdaptationOptionView,
|
|
377
378
|
'News Item': NewsItemView,
|
|
379
|
+
mission_signatory_profile: MissionSignatoryProfileView,
|
|
378
380
|
};
|
|
379
381
|
|
|
380
382
|
config.views.layoutViewsNamesMapping.view_cca_event = 'CCA Event View';
|
package/src/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
2
2
|
|
|
3
3
|
export const blockAvailableInMission = (properties, block) => {
|
|
4
|
-
const missionBlocks = ['mkh_map', 'rastBlock'
|
|
4
|
+
const missionBlocks = ['mkh_map', 'rastBlock'];
|
|
5
5
|
const id = properties?.['@id'];
|
|
6
6
|
|
|
7
7
|
if (!id) {
|
|
@@ -90,6 +90,12 @@ export const formatTextToHTML = (text) => {
|
|
|
90
90
|
.replace(/\\no\s*/g, '<br />• ') // list-like "o " to bullet point
|
|
91
91
|
.replace(/\\n/g, '<br />'); // single line break
|
|
92
92
|
|
|
93
|
+
// Convert URLs to clickable links
|
|
94
|
+
formattedText = formattedText.replace(
|
|
95
|
+
/((https?:\/\/[^\s<>"]+))/g,
|
|
96
|
+
'<a href="$1" target="_blank" rel="noreferrer">$1</a>',
|
|
97
|
+
);
|
|
98
|
+
|
|
93
99
|
return `<p>${formattedText}</p>`;
|
|
94
100
|
};
|
|
95
101
|
|
package/src/components/manage/Blocks/MissionSignatoriesProfile/MissionSignatoriesProfileEdit.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { SidebarPortal } from '@plone/volto/components';
|
|
2
|
-
import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
|
|
3
|
-
import MissionSignatoriesProfile from './MissionSignatoriesProfileView';
|
|
4
|
-
import schema from './schema';
|
|
5
|
-
|
|
6
|
-
export default function Edit(props) {
|
|
7
|
-
const { block, data, onChangeBlock, selected } = props;
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<MissionSignatoriesProfile {...props} mode="edit" />
|
|
11
|
-
<SidebarPortal selected={selected}>
|
|
12
|
-
<BlockDataForm
|
|
13
|
-
block={block}
|
|
14
|
-
title={schema.title}
|
|
15
|
-
schema={schema}
|
|
16
|
-
onChangeField={(id, value) => {
|
|
17
|
-
onChangeBlock(block, {
|
|
18
|
-
...data,
|
|
19
|
-
[id]: value,
|
|
20
|
-
});
|
|
21
|
-
}}
|
|
22
|
-
onChangeBlock={onChangeBlock}
|
|
23
|
-
formData={data}
|
|
24
|
-
/>
|
|
25
|
-
</SidebarPortal>
|
|
26
|
-
</>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import MissionSignatoriesProfileEdit from './MissionSignatoriesProfileEdit';
|
|
2
|
-
import MissionSignatoriesProfileView from './MissionSignatoriesProfileView';
|
|
3
|
-
import { blockAvailableInMission } from '@eeacms/volto-cca-policy/utils';
|
|
4
|
-
import worldSVG from '@plone/volto/icons/world.svg';
|
|
5
|
-
|
|
6
|
-
export default function installMissionSignatoriesProfileBlock(config) {
|
|
7
|
-
config.blocks.blocksConfig.missionSignatoriesProfile = {
|
|
8
|
-
id: 'missionSignatoriesProfile',
|
|
9
|
-
title: 'Mission Signatories Profile',
|
|
10
|
-
icon: worldSVG,
|
|
11
|
-
group: 'site',
|
|
12
|
-
edit: MissionSignatoriesProfileEdit,
|
|
13
|
-
view: MissionSignatoriesProfileView,
|
|
14
|
-
sidebarTab: 1,
|
|
15
|
-
security: {
|
|
16
|
-
addPermission: [],
|
|
17
|
-
view: [],
|
|
18
|
-
},
|
|
19
|
-
restricted: ({ properties, block }) => {
|
|
20
|
-
return blockAvailableInMission(properties, block);
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return config;
|
|
25
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Mission Signatories Profile',
|
|
3
|
-
fieldsets: [
|
|
4
|
-
{
|
|
5
|
-
id: 'default',
|
|
6
|
-
title: 'Default',
|
|
7
|
-
fields: ['profile_id'],
|
|
8
|
-
},
|
|
9
|
-
],
|
|
10
|
-
properties: {
|
|
11
|
-
profile_id: {
|
|
12
|
-
title: 'Profile ID',
|
|
13
|
-
type: 'number',
|
|
14
|
-
default: '54403',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
required: [],
|
|
18
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|