@eeacms/volto-marine-policy 2.0.15 → 2.0.17

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 CHANGED
@@ -4,6 +4,52 @@ 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
+ ### [2.0.17](https://github.com/eea/volto-marine-policy/compare/2.0.16...2.0.17) - 8 August 2025
8
+
9
+ #### :rocket: Dependency updates
10
+
11
+ - Release @eeacms/volto-searchlib@2.1.8 [EEA Jenkins - [`1b2e062`](https://github.com/eea/volto-marine-policy/commit/1b2e0626e3611781312ca277b5957ea8972f08f1)]
12
+ - Release @eeacms/volto-searchlib@2.1.7 [EEA Jenkins - [`3eede38`](https://github.com/eea/volto-marine-policy/commit/3eede38464192fee6b4345abed30f88f71833d14)]
13
+ - Release @eeacms/volto-searchlib@2.1.6 [EEA Jenkins - [`01fcc56`](https://github.com/eea/volto-marine-policy/commit/01fcc56fb139709fe8acb93b578457d2081501a9)]
14
+ - Release @eeacms/volto-searchlib@2.1.5 [EEA Jenkins - [`49c7e7f`](https://github.com/eea/volto-marine-policy/commit/49c7e7fa2fdd94ad1f7d79a0a85ccf61cb1524ab)]
15
+ - Release @eeacms/volto-searchlib@2.1.4 [EEA Jenkins - [`3ae9f4a`](https://github.com/eea/volto-marine-policy/commit/3ae9f4aefe347140dc5131c9067e4dc7a9fc5767)]
16
+ - Release @eeacms/volto-searchlib@2.1.3 [EEA Jenkins - [`eb97433`](https://github.com/eea/volto-marine-policy/commit/eb97433cb35e4f581280b39cc2b75653433f49cc)]
17
+ - Release @eeacms/volto-searchlib@2.1.2 [EEA Jenkins - [`b5ded14`](https://github.com/eea/volto-marine-policy/commit/b5ded1460e823f94c4fea46efdb91d36e81d9ee9)]
18
+ - Release @eeacms/volto-searchlib@2.1.1 [EEA Jenkins - [`f7ab409`](https://github.com/eea/volto-marine-policy/commit/f7ab409191128f41205b1ef276320b49cef92d6b)]
19
+ - Release @eeacms/volto-searchlib@2.1.0 [EEA Jenkins - [`a048b09`](https://github.com/eea/volto-marine-policy/commit/a048b090cff0ceb103cafdaa6fbd3db842e032b2)]
20
+
21
+ #### :house: Internal changes
22
+
23
+ - style: Automated code fix [eea-jenkins - [`55e51fa`](https://github.com/eea/volto-marine-policy/commit/55e51fa06d4991cb3ac9949b431371a57e67e59e)]
24
+ - style: Automated code fix [eea-jenkins - [`fe2a258`](https://github.com/eea/volto-marine-policy/commit/fe2a258459e72935b0df977ba2002d09db598bc6)]
25
+ - style: Automated code fix [eea-jenkins - [`287b77c`](https://github.com/eea/volto-marine-policy/commit/287b77cd87ebbb1c21f710ca0837a6d743961f24)]
26
+ - style: Automated code fix [eea-jenkins - [`b4bdb34`](https://github.com/eea/volto-marine-policy/commit/b4bdb3434ae0413dbe5e7fbbe8c9547050a33113)]
27
+
28
+ #### :hammer_and_wrench: Others
29
+
30
+ - fix NIS workflow progress endpoint [laszlocseh - [`947cc35`](https://github.com/eea/volto-marine-policy/commit/947cc35cb6b5f678f655d18e53a42932b85e1b79)]
31
+ - fix eslint [laszlocseh - [`7123c4b`](https://github.com/eea/volto-marine-policy/commit/7123c4bb126f60ee5b45acb62ca5a3d4b8480ae9)]
32
+ - fix eslint [laszlocseh - [`bc216d1`](https://github.com/eea/volto-marine-policy/commit/bc216d14a1b2d0057b8db0185dbee58df114f22e)]
33
+ - WiP NIS workflow progress [laszlocseh - [`56669f0`](https://github.com/eea/volto-marine-policy/commit/56669f0736952381c5b52db88bde42dc8e309a3d)]
34
+ - NIS workflow progress [laszlocseh - [`57d82c5`](https://github.com/eea/volto-marine-policy/commit/57d82c5a3fd7b3fe278e1fca8b5de85796587e5c)]
35
+ - NIS edit page [laszlocseh - [`eabce65`](https://github.com/eea/volto-marine-policy/commit/eabce6569fe8d08b1761d0305a8eb49e971df8bb)]
36
+ - WiP NIS table listing [laszlocseh - [`d489f00`](https://github.com/eea/volto-marine-policy/commit/d489f0097cd3e644de04f2c8a978761fce5b0e58)]
37
+ ### [2.0.16](https://github.com/eea/volto-marine-policy/compare/2.0.15...2.0.16) - 15 July 2025
38
+
39
+ #### :rocket: Dependency updates
40
+
41
+ - Release @eeacms/volto-openlayers-map@1.0.1 [EEA Jenkins - [`9d21a45`](https://github.com/eea/volto-marine-policy/commit/9d21a45dc040ffafa93a1dcdb10b521c429b7fe3)]
42
+ - Release @eeacms/volto-openlayers-map@1.0.0 [EEA Jenkins - [`6f7be1b`](https://github.com/eea/volto-marine-policy/commit/6f7be1b5c4830c639c71a94ba404bf0df6dd14f4)]
43
+
44
+ #### :house: Internal changes
45
+
46
+ - style: Automated code fix [eea-jenkins - [`efe44fc`](https://github.com/eea/volto-marine-policy/commit/efe44fcb0bde4e0339f4a9fea70fb49fb878a095)]
47
+
48
+ #### :hammer_and_wrench: Others
49
+
50
+ - fix eslint [laszlocseh - [`5ab04fb`](https://github.com/eea/volto-marine-policy/commit/5ab04fb5734c00c2fc2f8b2a3fa381b5a5f40a71)]
51
+ - added NIS listing view [laszlocseh - [`64258c1`](https://github.com/eea/volto-marine-policy/commit/64258c1094b5ae57547f965b066c52e2e29f9fd8)]
52
+ - added middleware for NIS download [laszlocseh - [`796f3ab`](https://github.com/eea/volto-marine-policy/commit/796f3abc08d632079486eb7c5e7517dfb1d83657)]
7
53
  ### [2.0.15](https://github.com/eea/volto-marine-policy/compare/2.0.14...2.0.15) - 16 June 2025
8
54
 
9
55
  #### :house: Internal changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-marine-policy",
3
- "version": "2.0.15",
3
+ "version": "2.0.17",
4
4
  "description": "@eeacms/volto-marine-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -22,7 +22,9 @@
22
22
  "@eeacms/volto-embed",
23
23
  "@eeacms/volto-eea-design-system",
24
24
  "@eeacms/volto-eea-website-theme",
25
- "@eeacms/volto-globalsearch"
25
+ "@eeacms/volto-globalsearch",
26
+ "@eeacms/volto-metadata-block",
27
+ "@eeacms/volto-workflow-progress"
26
28
  ],
27
29
  "resolutions": {
28
30
  "react-countup/countup.js": "2.5.0",
@@ -35,9 +37,11 @@
35
37
  "@eeacms/volto-eea-website-theme": "*",
36
38
  "@eeacms/volto-embed": "*",
37
39
  "@eeacms/volto-globalsearch": "2.1.2",
38
- "@eeacms/volto-openlayers-map": "0.3.2",
39
- "@eeacms/volto-searchlib": "2.0.16",
40
+ "@eeacms/volto-openlayers-map": "1.0.1",
41
+ "@eeacms/volto-searchlib": "2.1.8",
40
42
  "@eeacms/volto-tabs-block": "*",
43
+ "@eeacms/volto-metadata-block": "*",
44
+ "@eeacms/volto-workflow-progress": "*",
41
45
  "axios": "0.30.0",
42
46
  "d3-array": "^2.12.1",
43
47
  "jquery": "3.6.0",
@@ -14,3 +14,5 @@ export TableauFullscreen from './theme/Tableau/TableauFullscreen';
14
14
  export ItemMetadataSnippet from './theme/ItemMetadata/ItemMetadataSnippet';
15
15
  export MapPreview from './theme/MetadataListingView/MapPreview';
16
16
  export DemoSitesExplorer from './Blocks/DemoSitesExplorer/DemoSitesExplorerView';
17
+ export NISListingView from './theme/NISListingView/NISListingView';
18
+ export NISMetadataSectionTableView from './theme/NISMetadataSectionTableView/NISMetadataSectionTableView';
@@ -0,0 +1,108 @@
1
+ // import ProgressWorkflow from '@eeacms/volto-workflow-progress/ProgressWorkflow';
2
+ import ProgressWorkflow from '@eeacms/volto-marine-policy/components/theme/ProgressWorkflow/ProgressWorkflow';
3
+
4
+ // import { Link } from 'react-router-dom';
5
+ import PropTypes from 'prop-types';
6
+ import './style.less';
7
+
8
+ // const NISListingView = ({ items, isEditMode }) => {
9
+ // console.log(items);
10
+ // return (
11
+ // <div className="items">
12
+ // {items.map((item, index) => (
13
+ // <div className="listing-item" key={item['@id']}>
14
+ // <div className="listing-body">
15
+ // <h3>
16
+ // <Link to={item['@id']}>{item.title}</Link>
17
+ // </h3>
18
+ // <div className="listing-metadata">
19
+ // {item.nis_species_name_accepted && (
20
+ // <div className="metadata-item">
21
+ // <b>Species name accepted:</b> {item.nis_species_name_accepted}
22
+ // </div>
23
+ // )}
24
+ // {item.nis_region && (
25
+ // <div className="metadata-item">
26
+ // <b>Region:</b> {item.nis_region}
27
+ // </div>
28
+ // )}
29
+ // {item.nis_subregion && (
30
+ // <div className="metadata-item">
31
+ // <b>Subregion:</b> {item.nis_subregion}
32
+ // </div>
33
+ // )}
34
+ // </div>
35
+ // </div>
36
+ // </div>
37
+ // ))}
38
+ // </div>
39
+ // );
40
+ // };
41
+
42
+ const NISListingView = ({ items, isEditMode }) => {
43
+ // console.log(items);
44
+
45
+ return (
46
+ <table className="ui table">
47
+ <thead>
48
+ <tr>
49
+ <th>Species name original</th>
50
+ <th>Species name accepted</th>
51
+ <th>Scientific name accepted</th>
52
+ <th>Region</th>
53
+ <th>Subregion</th>
54
+ <th>Status</th>
55
+ <th>Group</th>
56
+ <th></th>
57
+ </tr>
58
+ </thead>
59
+ <tbody>
60
+ {items.map((item, index) => (
61
+ <tr key={item['@id']}>
62
+ <td>{item.nis_species_name_original}</td>
63
+ <td>{item.nis_species_name_accepted}</td>
64
+ <td>{item.nis_scientificname_accepted}</td>
65
+ <td>{item.nis_region}</td>
66
+ <td>{item.nis_subregion}</td>
67
+ <td>{item.nis_status}</td>
68
+ <td>{item.nis_group}</td>
69
+ <td className="workflow-actions">
70
+ <div className="action-buttons">
71
+ <a
72
+ className="ui button secondary mini"
73
+ href={`${item['@id']}`}
74
+ target="_blank"
75
+ rel="noopener"
76
+ >
77
+ View
78
+ </a>
79
+ <a
80
+ className="ui button primary mini"
81
+ href={`${item['@id']}/edit`}
82
+ target="_blank"
83
+ rel="noopener"
84
+ >
85
+ Edit
86
+ </a>
87
+ </div>
88
+ <div className="workflow-progress">
89
+ <ProgressWorkflow
90
+ content={item}
91
+ pathname={item['@id']}
92
+ token={123}
93
+ />
94
+ </div>
95
+ </td>
96
+ </tr>
97
+ ))}
98
+ </tbody>
99
+ </table>
100
+ );
101
+ };
102
+
103
+ NISListingView.propTypes = {
104
+ items: PropTypes.arrayOf(PropTypes.any).isRequired,
105
+ isEditMode: PropTypes.bool,
106
+ };
107
+
108
+ export default NISListingView;
@@ -0,0 +1,121 @@
1
+ .listing-metadata {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ gap: 1em;
5
+ }
6
+
7
+ .metadata-item {
8
+ align-items: baseline;
9
+ padding: 5px 10px;
10
+ background-color: #ebebeb;
11
+ font-size: 0.9em;
12
+ }
13
+
14
+ .ui.table tr {
15
+ td,
16
+ th {
17
+ border-left: 1px solid #bcbec0 !important;
18
+
19
+ &:first-of-type {
20
+ border-left: none !important;
21
+ }
22
+ }
23
+ }
24
+
25
+ .ui.button.mini {
26
+ padding: 0.5em 0.8em;
27
+ vertical-align: middle;
28
+ }
29
+
30
+ .action-buttons {
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+
35
+ .workflow-select {
36
+ // min-width: 10em;
37
+ width: 80%;
38
+ margin: auto;
39
+
40
+ .react-select__control {
41
+ min-height: unset;
42
+
43
+ .react-select__value-container {
44
+ // padding: 0 !important;
45
+ }
46
+
47
+ .react-select__indicator {
48
+ padding: 0;
49
+ }
50
+ }
51
+
52
+ .react-select__option {
53
+ text-align: left;
54
+ }
55
+
56
+ .react-select__menu {
57
+ border: 1px solid #b8c6c8;
58
+ border-top: none;
59
+ border-top-left-radius: 0.25em !important;
60
+ border-top-right-radius: 0.25em !important;
61
+ }
62
+ }
63
+
64
+ .workflow-actions {
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: space-around;
68
+
69
+ .workflow-progress {
70
+ display: flex;
71
+ flex-direction: row;
72
+ align-items: center;
73
+ gap: 0.25rem;
74
+
75
+ .sidenav-ol {
76
+ position: fixed;
77
+ top: 40%;
78
+ right: 0;
79
+ left: unset;
80
+ overflow: visible;
81
+ border: 1px solid #eef2f3;
82
+ }
83
+ }
84
+
85
+ .toolbar-workflow-progress {
86
+ display: flex;
87
+ flex-direction: column;
88
+ align-items: center;
89
+ margin: 0 !important;
90
+ gap: 0.25em;
91
+ }
92
+
93
+ .circle-right-btn {
94
+ height: auto !important;
95
+ padding: 0.5em 0.8em;
96
+ border-width: 1px !important;
97
+ border-radius: 0 !important;
98
+ border-radius: 0.25em !important;
99
+ margin: 0 !important;
100
+ }
101
+
102
+ .review-state-text {
103
+ line-height: normal;
104
+ // text-align: left;
105
+ }
106
+ }
107
+
108
+ .review-state-draft {
109
+ border-color: #ed4033 !important;
110
+ color: #ed4033 !important;
111
+ }
112
+
113
+ .review-state-submitted {
114
+ border-color: #f6a808 !important;
115
+ color: #f6a808 !important;
116
+ }
117
+
118
+ .review-state-approved {
119
+ border-color: #3ca34a !important;
120
+ color: #3ca34a !important;
121
+ }
@@ -0,0 +1,122 @@
1
+ // import config from '@plone/volto/registry';
2
+ // import { useSelector } from 'react-redux';
3
+ // import { Table } from 'semantic-ui-react';
4
+ // import { ErrorBoundary } from '@eeacms/volto-metadata-block/widgets';
5
+ // import { isEmpty } from 'lodash';
6
+ // import { useIntl } from 'react-intl';
7
+ // import './style.less';
8
+
9
+ // function isEmptyWithNumberCheck(value) {
10
+ // // Check if the value is a number and is not NaN
11
+ // if (typeof value === 'number' && !isNaN(value)) {
12
+ // return false; // Numbers, including 0, are considered non-empty
13
+ // }
14
+
15
+ // // Fallback to Lodash's isEmpty for other types
16
+ // return isEmpty(value);
17
+ // }
18
+
19
+ // const Field = (props) => {
20
+ // const { data, properties = {}, metadata = {}, showLabel } = props;
21
+ // const { views } = config.widgets;
22
+ // const intl = useIntl();
23
+
24
+ // const initialFormData = useSelector((state) => state?.content?.data || {});
25
+ // const dataTitle = data?.title;
26
+ // const label = intl.formatMessage({ id: dataTitle, message: dataTitle });
27
+
28
+ // let metadata_element = {
29
+ // ...initialFormData,
30
+ // ...(properties || {}),
31
+ // ...(metadata || {}),
32
+ // };
33
+
34
+ // if (!data?.id) {
35
+ // return '';
36
+ // }
37
+
38
+ // let output = metadata_element[data.id];
39
+
40
+ // let Widget = views?.getWidget(data);
41
+ // if (!output && props.data.placeholder) {
42
+ // Widget = views?.default;
43
+ // output = props.data.placeholder;
44
+ // }
45
+
46
+ // const hasValue = !isEmptyWithNumberCheck(output);
47
+
48
+ // if (!Widget || !hasValue) {
49
+ // return '';
50
+ // }
51
+
52
+ // let className = 'block metadata ' + data.id;
53
+ // return (
54
+ // <ErrorBoundary name={data.id}>
55
+ // {showLabel ? (
56
+ // <label htmlFor={`metadata-${data.id}`} className={className}>
57
+ // {label}
58
+ // </label>
59
+ // ) : (
60
+ // ''
61
+ // )}
62
+ // <Widget
63
+ // value={output}
64
+ // content={metadata_element}
65
+ // className={className}
66
+ // id={`metadata-${data.id}`}
67
+ // />
68
+ // </ErrorBoundary>
69
+ // );
70
+ // };
71
+
72
+ // const NISMetadataSectionTableView = (props) => {
73
+ // const { data = {}, properties = {}, metadata = {} } = props;
74
+ // const { table = {}, fields = [] } = data;
75
+
76
+ // const initialFormData = useSelector((state) => state?.content?.data || {});
77
+ // let metadata_element = { ...initialFormData, ...properties, ...metadata };
78
+ // const showFields = fields.filter(({ hideInView }) => !hideInView);
79
+
80
+ // return showFields.length ? (
81
+ // <Table
82
+ // fixed={table.fixed}
83
+ // compact={table.compact}
84
+ // basic={table.basic ? 'very' : false}
85
+ // celled={table.celled}
86
+ // inverted={table.inverted}
87
+ // striped={table.striped}
88
+ // >
89
+ // <Table.Body>
90
+ // {showFields.map(({ field }, i) => {
91
+ // const hasValue = !isEmptyWithNumberCheck(metadata_element[field?.id]);
92
+
93
+ // return hasValue ? (
94
+ // <Table.Row key={i}>
95
+ // <Table.HeaderCell width={1}>{field.title}</Table.HeaderCell>
96
+ // <Table.Cell>
97
+ // <Field key={i} {...props} showLabel={false} data={field} />
98
+ // </Table.Cell>
99
+ // </Table.Row>
100
+ // ) : (
101
+ // ''
102
+ // );
103
+ // })}
104
+ // </Table.Body>
105
+ // </Table>
106
+ // ) : (
107
+ // ''
108
+ // );
109
+ // };
110
+
111
+ import { MetadataSectionTableView } from '@eeacms/volto-metadata-block/components';
112
+ import './style.less';
113
+
114
+ const NISMetadataSectionTableView = (props) => {
115
+ return (
116
+ <div className="nis-metadata-section-table-view">
117
+ <MetadataSectionTableView {...props} />
118
+ </div>
119
+ );
120
+ };
121
+
122
+ export default NISMetadataSectionTableView;
@@ -0,0 +1,18 @@
1
+ .nis-metadata-section-table-view {
2
+ .ui.table th.one.wide {
3
+ width: 25%;
4
+ }
5
+
6
+ .ui.table tr th {
7
+ border-right: 1px solid #0079cf;
8
+ border-bottom: 1px solid #bcbec0;
9
+ }
10
+
11
+ .ui.table tr:last-child th {
12
+ border-bottom: none;
13
+ }
14
+
15
+ td .block.metadata {
16
+ margin: 0;
17
+ }
18
+ }
@@ -0,0 +1,474 @@
1
+ import config from '@plone/volto/registry';
2
+ import { getBaseUrl, flattenToAppURL } from '@plone/volto/helpers';
3
+ import PropTypes from 'prop-types';
4
+ import { useEffect, useRef, useState } from 'react';
5
+ import { useDispatch, useSelector } from 'react-redux';
6
+ import { defineMessages, useIntl } from 'react-intl';
7
+ import Select from 'react-select';
8
+ import { toast } from 'react-toastify';
9
+ import last from 'lodash/last';
10
+ import split from 'lodash/split';
11
+ import uniqBy from 'lodash/uniqBy';
12
+ import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib';
13
+ import Toast from '@plone/volto/components/manage/Toast/Toast';
14
+ // import {
15
+ // getWorkflowOptions,
16
+ // getCurrentStateMapping,
17
+ // } from '@plone/volto/helpers/Workflows/Workflows';
18
+ import { transitionWorkflow } from '@plone/volto/actions/workflow/workflow';
19
+ import '@eeacms/volto-workflow-progress/less/editor.less';
20
+
21
+ const currentStateClass = {
22
+ draft: 'draft',
23
+ submitted: 'submitted',
24
+ approved: 'approved',
25
+ published: 'published',
26
+ private: 'private',
27
+ };
28
+
29
+ const selectTheme = (theme) => ({
30
+ ...theme,
31
+ borderRadius: 0,
32
+ colors: {
33
+ ...theme.colors,
34
+ primary25: 'hotpink',
35
+ primary: '#b8c6c8',
36
+ },
37
+ });
38
+
39
+ const messages = defineMessages({
40
+ messageUpdated: {
41
+ id: 'Workflow updated.',
42
+ defaultMessage: 'Workflow updated.',
43
+ },
44
+ messageNoWorkflow: {
45
+ id: 'No workflow',
46
+ defaultMessage: 'No workflow',
47
+ },
48
+ state: {
49
+ id: 'State',
50
+ defaultMessage: 'State',
51
+ },
52
+ });
53
+
54
+ const getWorkflowOptions = (transition) => {
55
+ const mapping = config.settings.workflowMapping;
56
+ const key = last(split(transition['@id'], '/'));
57
+
58
+ if (key in mapping) {
59
+ return {
60
+ new_state_id: transition.new_state_id,
61
+ label: transition.title,
62
+ ...mapping[key],
63
+ url: transition['@id'],
64
+ };
65
+ }
66
+
67
+ // Return an option with a neutral color
68
+ return {
69
+ new_state_id: transition.new_state_id,
70
+ value: key,
71
+ label: transition.title,
72
+ color: '#000',
73
+ url: transition['@id'],
74
+ };
75
+ };
76
+
77
+ const customSelectStyles = {
78
+ control: (styles, state) => ({
79
+ ...styles,
80
+ // border: 'none',
81
+ border: '1px solid #b8c6c8',
82
+ borderRadius: '0.25rem',
83
+ borderBottom: '1px solid #b8c6c8',
84
+ boxShadow: 'none',
85
+ borderBottomStyle: state.menuIsOpen ? 'dotted' : 'solid',
86
+ }),
87
+ menu: (styles, state) => ({
88
+ ...styles,
89
+ top: null,
90
+ marginTop: 0,
91
+ boxShadow: 'none',
92
+ borderBottom: '2px solid #b8c6c8',
93
+ }),
94
+ indicatorSeparator: (styles) => ({
95
+ ...styles,
96
+ width: null,
97
+ }),
98
+ valueContainer: (styles) => ({
99
+ ...styles,
100
+ padding: 0,
101
+ }),
102
+ option: (styles, state) => ({
103
+ ...styles,
104
+ backgroundColor: null,
105
+ minHeight: '50px',
106
+ display: 'flex',
107
+ justifyContent: 'space-between',
108
+ alignItems: 'center',
109
+ padding: '0.5em 0.8em',
110
+ color: state.isSelected
111
+ ? '#007bc1'
112
+ : state.isFocused
113
+ ? '#4a4a4a'
114
+ : 'inherit',
115
+ ':active': {
116
+ backgroundColor: null,
117
+ },
118
+ span: {
119
+ flex: '0 0 auto',
120
+ },
121
+ svg: {
122
+ flex: '0 0 auto',
123
+ },
124
+ }),
125
+ };
126
+
127
+ /**
128
+ * getGeonames function.
129
+ * @function getGeonames
130
+ * @param {url} url URL.
131
+ * @returns {Object} Object.
132
+ */
133
+ export function getWorkflowProgress(item) {
134
+ return {
135
+ type: 'WORKFLOW_PROGRESS_PATH',
136
+ item,
137
+ request: {
138
+ op: 'get',
139
+ path: `${item}/@workflow.progress.nis`,
140
+ headers: {
141
+ Accept: 'application/json',
142
+ },
143
+ },
144
+ };
145
+ }
146
+
147
+ const itemTracker = (tracker, currentStateKey, currentState) => {
148
+ const tracker_key_array = tracker[0];
149
+ const is_active = tracker_key_array.indexOf(currentStateKey) > -1;
150
+
151
+ return (
152
+ <li
153
+ key={`progress__item ${tracker_key_array}`}
154
+ className={`progress__item ${
155
+ is_active
156
+ ? 'progress__item--active'
157
+ : tracker[1] < currentState.done
158
+ ? 'progress__item--completed'
159
+ : 'progress__item--next'
160
+ }`}
161
+ >
162
+ {tracker[2].map((title, index) => (
163
+ <div
164
+ key={`progress__title ${tracker_key_array}${index}`}
165
+ className={`progress__title ${
166
+ currentState.title !== title ? 'title-incomplete' : ''
167
+ }`}
168
+ >
169
+ {title}
170
+ {is_active && <div name="active-workflow-progress" />}
171
+ </div>
172
+ ))}
173
+ </li>
174
+ );
175
+ };
176
+
177
+ /**
178
+ * @summary The React component that shows progress tracking of selected content.
179
+ */
180
+ const ProgressWorkflow = (props) => {
181
+ const { content, pathname, token } = props;
182
+ // const Select = props.reactSelect.default;
183
+ const intl = useIntl();
184
+ const isAuth = !!token;
185
+ // const currentStateKey = content?.review_state;
186
+ const dispatch = useDispatch();
187
+ const contentId = content?.['@id'];
188
+ const basePathname = getBaseUrl(pathname);
189
+ const contentContainsPathname =
190
+ contentId &&
191
+ basePathname &&
192
+ flattenToAppURL(contentId).endsWith(basePathname);
193
+ const fetchCondition =
194
+ pathname.endsWith('/contents') ||
195
+ pathname.endsWith('/edit') ||
196
+ pathname === basePathname;
197
+ // console.log(basePathname);
198
+ const [workflowProgressSteps, setWorkflowProgressSteps] = useState([]);
199
+ const [currentState, setCurrentState] = useState(null);
200
+ const [currentStateKey, setCurrentStateKey] = useState(content?.review_state);
201
+
202
+ const transition = (selectedOption) => {
203
+ // console.log('selectedOption: ', selectedOption);
204
+ dispatch(transitionWorkflow(flattenToAppURL(selectedOption.url))).then(
205
+ () => {
206
+ toast.success(
207
+ <Toast
208
+ success
209
+ title={intl.formatMessage(messages.messageUpdated)}
210
+ content=""
211
+ />,
212
+ );
213
+ setCurrentStateKey(selectedOption.new_state_id);
214
+ },
215
+ );
216
+ };
217
+
218
+ const workflowProgressPath = useSelector((state) => {
219
+ if (state?.workflowProgressPath?.[basePathname]?.get?.loaded === true) {
220
+ const progress = state?.workflowProgressPath?.[basePathname]?.result;
221
+ if (
222
+ progress &&
223
+ flattenToAppURL(progress['@id']).endsWith(
224
+ basePathname + '/@workflow.progress.nis',
225
+ )
226
+ ) {
227
+ return state?.workflowProgressPath?.[basePathname];
228
+ }
229
+ }
230
+ return null;
231
+ });
232
+ const pusherRef = useRef(null);
233
+ const transitions = workflowProgressPath?.result?.transitions || [];
234
+
235
+ // set visible by clicking oustisde
236
+ const hideVisibleSide = () => {
237
+ pusherRef.current &&
238
+ pusherRef.current.lastElementChild.classList.add('is-hidden');
239
+ };
240
+ // toggle visible by clicking on the button
241
+ const toggleVisibleSide = (event) => {
242
+ // pusherRef.current &&
243
+ // pusherRef.current.lastElementChild.classList.toggle('is-hidden');
244
+ const button = event.currentTarget;
245
+ const dropdown = pusherRef.current?.lastElementChild;
246
+
247
+ if (!dropdown) return;
248
+
249
+ const rect = button.getBoundingClientRect();
250
+
251
+ dropdown.style.position = 'fixed';
252
+ dropdown.style.top = `${rect.bottom}px`; // or rect.top
253
+ dropdown.style.left = `${rect.left}px`;
254
+ dropdown.classList.toggle('is-hidden');
255
+ // console.log(rect.bottom, rect.left);
256
+ };
257
+
258
+ // apply all computing when the workflowProgress results come from the api
259
+ useEffect(() => {
260
+ const findCurrentState = (steps, done) => {
261
+ const arrayContainingCurrentState = steps.find(
262
+ (itemElements) => itemElements[1] === done,
263
+ );
264
+ const indexOfCurrentStateKey =
265
+ arrayContainingCurrentState[0].indexOf(currentStateKey);
266
+ const title = arrayContainingCurrentState[2][indexOfCurrentStateKey];
267
+ const description =
268
+ arrayContainingCurrentState[3][indexOfCurrentStateKey];
269
+
270
+ setCurrentState({
271
+ done,
272
+ title,
273
+ description,
274
+ });
275
+ };
276
+
277
+ /**
278
+ * remove states that are 0% unless if it is current state
279
+ * @param {Object[]} states - array of arrays
280
+ * @param {Object[]} states[0][0] - array of state keys (ex: [private, published])
281
+ * @param {number} states[0][1] - percent
282
+ * @param {Object[]} states[0][2] - array of state titles (ex: [Private, Published])
283
+ * @param {Object[]} states[0][3] - array of state descriptions
284
+ * @returns {Object[]} result - array of arrays, same structure but filtered
285
+ */
286
+ const filterOutZeroStatesNotCurrent = (states) => {
287
+ return states; // do not filter
288
+ // const [firstState, ...rest] = states;
289
+ // const result =
290
+ // firstState[1] > 0 // there aren't any 0% states
291
+ // ? states // return all states
292
+ // : (() => {
293
+ // // there are 0% states
294
+ // const indexOfCurrentStateKey =
295
+ // firstState[0].indexOf(currentStateKey);
296
+ // if (indexOfCurrentStateKey > -1) {
297
+ // const keys = [firstState[0][indexOfCurrentStateKey]];
298
+ // const titles = [firstState[2][indexOfCurrentStateKey]];
299
+ // const description = [firstState[3][indexOfCurrentStateKey]];
300
+
301
+ // return [[keys, 0, titles, description], ...rest]; // return only the current 0% state and test
302
+ // }
303
+ // return rest; // if current state in not a 0% return all rest
304
+ // })();
305
+
306
+ // return result;
307
+ };
308
+
309
+ // filter out paths that don't have workflow (home, login, dexterity even if the content obj stays the same etc)
310
+ if (
311
+ contentId &&
312
+ contentContainsPathname &&
313
+ basePathname &&
314
+ basePathname !== '/' && // wihout this there will be a flicker for going back to home ('/' is included in all api paths)
315
+ workflowProgressPath?.result?.steps &&
316
+ workflowProgressPath.result.steps.length > 0 &&
317
+ !workflowProgressPath.get?.error &&
318
+ Array.isArray(workflowProgressPath?.result?.steps)
319
+ ) {
320
+ findCurrentState(
321
+ workflowProgressPath.result.steps,
322
+ workflowProgressPath.result.done,
323
+ );
324
+ setWorkflowProgressSteps(
325
+ filterOutZeroStatesNotCurrent(
326
+ workflowProgressPath.result.steps,
327
+ ).reverse(),
328
+ );
329
+ } else {
330
+ if (currentState) {
331
+ setCurrentState(null); // reset current state only if a path without workflow is
332
+ // chosen to avoid flicker for those that have workflow
333
+ }
334
+ }
335
+ }, [workflowProgressPath?.result, currentStateKey, pathname]); // eslint-disable-line
336
+
337
+ // get progress again if path or content changes
338
+ useEffect(() => {
339
+ if (token && fetchCondition && contentContainsPathname) {
340
+ dispatch(getWorkflowProgress(basePathname));
341
+ } // the are paths that don't have workflow (home, login etc) only if logged in
342
+ }, [
343
+ dispatch,
344
+ pathname,
345
+ basePathname,
346
+ token,
347
+ currentStateKey,
348
+ contentContainsPathname,
349
+ fetchCondition,
350
+ ]);
351
+
352
+ // on mount subscribe to mousedown to be able to close on click outside
353
+ useEffect(() => {
354
+ const handleClickOutside = (e) => {
355
+ const parentDiv = pusherRef.current;
356
+ if (parentDiv) {
357
+ if (
358
+ !doesNodeContainClick(parentDiv, e) &&
359
+ !parentDiv.lastElementChild.classList.contains('is-hidden')
360
+ ) {
361
+ hideVisibleSide();
362
+ }
363
+ }
364
+ };
365
+
366
+ document.addEventListener('mousedown', handleClickOutside, false);
367
+
368
+ return () => {
369
+ document.removeEventListener('mousedown', handleClickOutside);
370
+ };
371
+ }, []);
372
+
373
+ // console.log('currentState: ', currentState);
374
+ // console.log('currentStateKey:', currentStateKey);
375
+ // console.log(workflowProgressPath?.result?.transitions);
376
+ return isAuth && currentState && contentContainsPathname ? (
377
+ <>
378
+ <div className="toolbar-workflow-progress">
379
+ <div ref={pusherRef}>
380
+ <button
381
+ className={`circle-right-btn ${
382
+ currentStateClass[currentStateKey]
383
+ ? `review-state-${currentStateKey}`
384
+ : currentState.done === 100
385
+ ? 'review-state-published'
386
+ : ''
387
+ }`}
388
+ id="toolbar-cut-blocks"
389
+ onClick={toggleVisibleSide}
390
+ title="Editing progress"
391
+ >
392
+ {`${currentState.done}%`}
393
+ </button>
394
+ <div className={`sidenav-ol sidenav-ol--wp is-hidden`}>
395
+ <div className="workflow-select">
396
+ <Select
397
+ // menuIsOpen={true}
398
+ name="state-select"
399
+ className="react-select-container"
400
+ classNamePrefix="react-select"
401
+ isDisabled={!content.review_state || transitions.length === 0}
402
+ options={uniqBy(
403
+ transitions.map((transition) =>
404
+ getWorkflowOptions(transition),
405
+ ),
406
+ 'label',
407
+ ).concat({ value: currentStateKey, label: currentState.title })}
408
+ styles={customSelectStyles}
409
+ theme={selectTheme}
410
+ // components={{
411
+ // DropdownIndicator,
412
+ // Placeholder,
413
+ // Option,
414
+ // SingleValue,
415
+ // }}
416
+ onChange={transition}
417
+ value={{ value: currentStateKey, label: currentState.title }}
418
+ isSearchable={false}
419
+ />
420
+ </div>
421
+ <ol
422
+ className="progress-reversed"
423
+ style={{
424
+ counterReset: `item ${workflowProgressSteps.length + 1}`,
425
+ }}
426
+ >
427
+ {workflowProgressSteps.map((progressItem) =>
428
+ itemTracker(progressItem, currentStateKey, currentState),
429
+ )}
430
+ </ol>
431
+ </div>
432
+ </div>
433
+ <div
434
+ className={`review-state-text ${
435
+ currentStateClass[currentStateKey]
436
+ ? `review-state-${currentStateKey}`
437
+ : currentState.done === 100
438
+ ? 'review-state-published'
439
+ : ''
440
+ }`}
441
+ id="toolbar-cut-blocks"
442
+ onClick={toggleVisibleSide}
443
+ onKeyDown={() => {}}
444
+ title="Editing progress"
445
+ role="presentation"
446
+ >
447
+ {`${currentState.title}`}
448
+ </div>
449
+ <div className={`sidenav-ol sidenav-ol--wp is-hidden`}>
450
+ <ol
451
+ className="progress-reversed"
452
+ style={{
453
+ counterReset: `item ${workflowProgressSteps.length + 1}`,
454
+ }}
455
+ >
456
+ {workflowProgressSteps.map((progressItem) =>
457
+ itemTracker(progressItem, currentStateKey, currentState),
458
+ )}
459
+ </ol>
460
+ </div>
461
+ </div>
462
+ </>
463
+ ) : (
464
+ // </Plug>
465
+ ''
466
+ );
467
+ };
468
+
469
+ ProgressWorkflow.propTypes = {
470
+ pathname: PropTypes.string.isRequired,
471
+ content: PropTypes.object,
472
+ };
473
+
474
+ export default ProgressWorkflow;
@@ -30,7 +30,10 @@ export default function middleware(config) {
30
30
  // TODO: do we want catch all?
31
31
  // middleware.all(['**/@@*'], viewMiddleware);
32
32
 
33
- middleware.all(['**/@@demo-sites-map.arcgis.json'], viewMiddleware);
33
+ middleware.all(
34
+ ['**/@@demo-sites-map.arcgis.json', '**/@@nis-export'],
35
+ viewMiddleware,
36
+ );
34
37
  middleware.id = 'viewsMiddleware';
35
38
  config.settings.expressMiddleware.push(middleware);
36
39
  return config;
package/src/index.js CHANGED
@@ -1,17 +1,18 @@
1
- import React from 'react';
2
1
  import {
3
2
  // HeroSectionView,
4
3
  // FullwidthView,
5
4
  DatabaseItemView,
6
5
  MetadataListingView,
7
6
  SimpleListingView,
7
+ NISListingView,
8
+ NISMetadataSectionTableView,
8
9
  } from './components';
10
+ import { addTableField } from '@eeacms/volto-metadata-block/components/manage/Blocks/MetadataSection/variations';
9
11
  // import installAppExtras from './components/theme/AppExtras';
10
12
  // import HomePageView from '@eeacms/volto-eea-website-theme/components/theme/Homepage/HomePageView';
11
13
  // import HomePageInverseView from '@eeacms/volto-eea-website-theme/components/theme/Homepage/HomePageInverseView';
12
-
13
14
  import installMsfdDataExplorerBlock from './components/Blocks/MsfdDataExplorerBlock';
14
- import { breadcrumb, localnavigation } from './reducers';
15
+ import { breadcrumb, localnavigation, workflowProgressPath } from './reducers';
15
16
  import customBlockTemplates from '@eeacms/volto-marine-policy/components/Blocks/CustomBlockTemplates/customBlockTemplates';
16
17
  import TextAlignWidget from './components/Widgets/TextAlign';
17
18
  import './slate-styles.less';
@@ -107,6 +108,7 @@ const applyConfig = (config) => {
107
108
  ...(config.addonReducers || {}),
108
109
  breadcrumb,
109
110
  localnavigation,
111
+ workflowProgressPath,
110
112
  };
111
113
 
112
114
  if (__SERVER__) {
@@ -153,6 +155,25 @@ const applyConfig = (config) => {
153
155
  template: SimpleListingView,
154
156
  isDefault: false,
155
157
  },
158
+ {
159
+ id: 'nis',
160
+ title: 'NIS Table',
161
+ template: NISListingView,
162
+ isDefault: false,
163
+ },
164
+ ],
165
+ };
166
+
167
+ config.blocks.blocksConfig.metadataSection = {
168
+ ...config.blocks.blocksConfig.metadataSection,
169
+ variations: [
170
+ ...config.blocks.blocksConfig.metadataSection.variations,
171
+ {
172
+ id: 'nis_table',
173
+ title: 'NIS Table',
174
+ view: NISMetadataSectionTableView,
175
+ schemaEnhancer: addTableField,
176
+ },
156
177
  ],
157
178
  };
158
179
 
@@ -1,2 +1,3 @@
1
1
  export breadcrumb from './breadcrumb/breadcrumb';
2
2
  export localnavigation from './localnavigation/localnavigation';
3
+ export workflowProgressPath from './workflowprogress/workflow';
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Data Figure reducer.
3
+ * @module reducers/workflowProgress
4
+ */
5
+
6
+ const initialState = {
7
+ get: {
8
+ loaded: false,
9
+ loading: false,
10
+ error: null,
11
+ },
12
+ };
13
+
14
+ /**
15
+ * Data figure reducer.
16
+ * @function workflowProgress
17
+ * @param {Object} state Current state.
18
+ * @param {Object} action Action to be handled.
19
+ * @returns {Object} New state.
20
+ */
21
+ export default function workflowProgressPath(
22
+ state = initialState,
23
+ action = {},
24
+ ) {
25
+ let { result } = action;
26
+ switch (action.type) {
27
+ case 'WORKFLOW_PROGRESS_PATH_PENDING':
28
+ return {
29
+ // ...state,
30
+ // get: {
31
+ // loading: true,
32
+ // loaded: false,
33
+ // error: null,
34
+ // },
35
+
36
+ ...state,
37
+ [action.item]: {
38
+ get: {
39
+ loading: true,
40
+ loaded: false,
41
+ error: null,
42
+ },
43
+ },
44
+ };
45
+ case 'WORKFLOW_PROGRESS_PATH_SUCCESS':
46
+ return {
47
+ // ...state,
48
+ // get: {
49
+ // loading: false,
50
+ // loaded: true,
51
+ // error: null,
52
+ // },
53
+ // result,
54
+
55
+ ...state,
56
+ [action.item]: {
57
+ get: {
58
+ loading: false,
59
+ loaded: true,
60
+ error: null,
61
+ },
62
+ result,
63
+ },
64
+ };
65
+ case 'WORKFLOW_PROGRESS_PATH_FAIL':
66
+ return {
67
+ // ...state,
68
+ // get: {
69
+ // loading: false,
70
+ // loaded: false,
71
+ // error: action.error,
72
+ // },
73
+
74
+ ...state,
75
+ [action.item]: {
76
+ get: {
77
+ loading: false,
78
+ loaded: false,
79
+ error: action.error,
80
+ },
81
+ },
82
+ };
83
+ default:
84
+ return state;
85
+ }
86
+ }
@@ -12,7 +12,7 @@
12
12
  }
13
13
  }
14
14
 
15
- #page-document > blockquote {
15
+ #page-document>blockquote {
16
16
  margin-right: revert !important;
17
17
  margin-left: revert !important;
18
18
  }
@@ -69,17 +69,18 @@ body {
69
69
 
70
70
  @media only screen and (min-width: 992px) {
71
71
  .eea.header {
72
- .ui.grid > .row > [class*='four wide computer'].column,
73
- .ui.grid > .column.row > [class*='four wide computer'].column,
74
- .ui.grid > [class*='four wide computer'].column,
75
- .ui.column.grid > [class*='four wide computer'].column {
72
+
73
+ .ui.grid>.row>[class*='four wide computer'].column,
74
+ .ui.grid>.column.row>[class*='four wide computer'].column,
75
+ .ui.grid>[class*='four wide computer'].column,
76
+ .ui.column.grid>[class*='four wide computer'].column {
76
77
  width: 33.33333333% !important;
77
78
  }
78
79
 
79
- .ui.grid > .row > [class*='eight wide computer'].column,
80
- .ui.grid > .column.row > [class*='eight wide computer'].column,
81
- .ui.grid > [class*='eight wide computer'].column,
82
- .ui.column.grid > [class*='eight wide computer'].column {
80
+ .ui.grid>.row>[class*='eight wide computer'].column,
81
+ .ui.grid>.column.row>[class*='eight wide computer'].column,
82
+ .ui.grid>[class*='eight wide computer'].column,
83
+ .ui.column.grid>[class*='eight wide computer'].column {
83
84
  width: 66.66666667% !important;
84
85
  }
85
86
  }
@@ -129,20 +130,16 @@ body {
129
130
  }
130
131
 
131
132
  #search-box {
132
- background: linear-gradient(
133
- 13.69deg,
134
- @darkPrimaryColor 1.17%,
135
- @primaryColor 80%
136
- );
133
+ background: linear-gradient(13.69deg,
134
+ @darkPrimaryColor 1.17%,
135
+ @primaryColor 80%);
137
136
  }
138
137
 
139
138
  footer {
140
- background: linear-gradient(
141
- 212.33deg,
142
- @primaryColor 6.78%,
143
- @darkPrimaryColor 69.54%,
144
- @darkPrimaryColor 98.23%
145
- );
139
+ background: linear-gradient(212.33deg,
140
+ @primaryColor 6.78%,
141
+ @darkPrimaryColor 69.54%,
142
+ @darkPrimaryColor 98.23%);
146
143
  }
147
144
  }
148
145
 
@@ -171,7 +168,7 @@ body.view-viewview .full {
171
168
  margin-right: -50vw !important;
172
169
  margin-left: -50vw !important;
173
170
 
174
- > div {
171
+ >div {
175
172
  display: block;
176
173
  width: 100% !important;
177
174
  margin-right: auto !important;
@@ -188,29 +185,28 @@ body.view-viewview .full {
188
185
  width: @largeMonitorWidth !important;
189
186
  }
190
187
  }
188
+
191
189
  @media screen and (min-width: @largestMobileScreen) {
192
190
  body.view-viewview.has-toolbar.has-sidebar {
193
- .full > div {
191
+ .full>div {
194
192
  width: calc(100% - (@toolbarWidth + @sidebarWidth)) !important;
195
193
  }
196
194
  }
197
195
 
198
196
  body.view-viewview.has-toolbar.has-sidebar-collapsed {
199
- .full > div {
197
+ .full>div {
200
198
  width: calc(100% - (@toolbarWidth + @collapsedToolbarWidth)) !important;
201
199
  }
202
200
  }
203
201
 
204
- body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(
205
- .has-sidebar-collapsed
206
- ) {
207
- .full > div {
202
+ body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
203
+ .full>div {
208
204
  width: calc(100% - @collapsedToolbarWidth) !important;
209
205
  }
210
206
  }
211
207
 
212
208
  body.view-viewview.has-toolbar-collapsed.has-sidebar {
213
- .full > div {
209
+ .full>div {
214
210
  .full-width-block {
215
211
  width: calc(100% - (@collapsedToolbarWidth + @sidebarWidth)) !important;
216
212
  }
@@ -218,28 +214,25 @@ body.view-viewview .full {
218
214
  }
219
215
 
220
216
  body.view-viewview.has-toolbar-collapsed.has-sidebar-collapsed {
221
- .full > div {
222
- width: calc(
223
- 100% - (@collapsedToolbarWidth + @collapsedToolbarWidth)
224
- ) !important;
217
+ .full>div {
218
+ width: calc(100% - (@collapsedToolbarWidth + @collapsedToolbarWidth)) !important;
225
219
  }
226
220
  }
227
221
  }
228
222
 
229
223
  @media only screen and (max-width: 767px) {
230
- body.view-viewview.has-toolbar-collapsed.has-sidebar-collapsed
231
- .full.full-width-block,
224
+
225
+ body.view-viewview.has-toolbar-collapsed.has-sidebar-collapsed .full.full-width-block,
232
226
  body.view-viewview.has-toolbar.has-sidebar-collapsed .full.full-width-block {
233
227
  width: 100% !important;
234
228
  }
235
229
  }
236
230
 
237
231
  @media screen and (max-width: @largestMobileScreen) {
232
+
238
233
  body.view-viewview.has-toolbar:not(.has-sidebar):not(.has-sidebar-collapsed),
239
- body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(
240
- .has-sidebar-collapsed
241
- ) {
242
- .full > div {
234
+ body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
235
+ .full>div {
243
236
  width: 100% !important;
244
237
  }
245
238
  }
@@ -267,32 +260,15 @@ body.searchlib-page .searchlib-block .back-link {
267
260
  .search-body-footer .ui.button.pagination-item.active,
268
261
  .searchlib-block .dropdown-facets-list .dropdown-facet .facet-title i.icon,
269
262
  .searchlib-block .dropdown-facets-list .ui.button.sui-button,
270
- .searchlib-block
271
- .dropdown-facets-list
272
- .dropdown-facet
273
- .ui.button.basic.facet-btn.active
274
- > .facet-title,
275
- body.searchlib-page
276
- .searchlib-block
277
- .above-results
278
- .sorting
279
- .inline.dropdown
280
- > span {
263
+ .searchlib-block .dropdown-facets-list .dropdown-facet .ui.button.basic.facet-btn.active>.facet-title,
264
+ body.searchlib-page .searchlib-block .above-results .sorting .inline.dropdown>span {
281
265
  color: @secondaryColor !important;
282
266
  }
283
267
 
284
268
  .sui-search-box .search-input .input-controls i.close.icon:before,
285
269
  .sui-search-box .search-input .input-controls i.close.icon:after,
286
- body.searchlib-page
287
- .searchlib-block
288
- .ui.segment.active-filter-list
289
- .ui.label.filter-value
290
- i.close.icon:before,
291
- body.searchlib-page
292
- .searchlib-block
293
- .ui.segment.active-filter-list
294
- .ui.label.filter-value
295
- i.close.icon:after {
270
+ body.searchlib-page .searchlib-block .ui.segment.active-filter-list .ui.label.filter-value i.close.icon:before,
271
+ body.searchlib-page .searchlib-block .ui.segment.active-filter-list .ui.label.filter-value i.close.icon:after {
296
272
  background-color: @secondaryColor !important;
297
273
  }
298
274
 
@@ -311,6 +287,7 @@ section .searchlib-block .ui.button.sui-button.basic {
311
287
  // Custom page header
312
288
  body.custom-page-header {
313
289
  #page-header {
290
+
314
291
  .column-blocks-wrapper,
315
292
  .content-box {
316
293
  margin-bottom: 0;
@@ -364,7 +341,7 @@ body.custom-page-header .breadcrumbs {
364
341
  margin: 0;
365
342
  }
366
343
 
367
- .ui.grid > .row > .column-blocks-wrapper,
344
+ .ui.grid>.row>.column-blocks-wrapper,
368
345
  .column-blocks-wrapper {
369
346
  margin-bottom: 0;
370
347
  }
@@ -383,3 +360,28 @@ body.custom-page-header .breadcrumbs {
383
360
  z-index: 5;
384
361
  }
385
362
  }
363
+
364
+ // Change the edit of metadataSection for NIS
365
+ .view-editview.contenttype-non_indigenous_species {
366
+ .metadata-section.block fieldset .inline.field {
367
+ padding-top: 1.5rem;
368
+ border-bottom: 1px solid #8dcadd;
369
+ padding-bottom: 1.5rem;
370
+ margin: 0;
371
+ }
372
+
373
+ .metadata-section.block .row {
374
+ flex-direction: row !important;
375
+ flex-wrap: nowrap;
376
+
377
+ .wrapper {
378
+ display: flex;
379
+ }
380
+
381
+ textarea {
382
+ width: 100% !important;
383
+ max-width: 100% !important;
384
+ padding: 5px;
385
+ }
386
+ }
387
+ }