@eeacms/volto-clms-theme 1.1.5 → 1.1.7

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,11 +4,28 @@ 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
- ### [1.1.5](https://github.com/eea/volto-clms-theme/compare/1.1.4...1.1.5) - 1 June 2023
7
+ ### [1.1.7](https://github.com/eea/volto-clms-theme/compare/1.1.6...1.1.7) - 1 June 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - feat CLMS-2257: links shown on meeting view [Unai - [`5e69e6d`](https://github.com/eea/volto-clms-theme/commit/5e69e6ddaa225906fae9c8e5073b5e8f747848ac)]
12
+ ### [1.1.6](https://github.com/eea/volto-clms-theme/compare/1.1.5...1.1.6) - 1 June 2023
13
+
14
+ #### :bug: Bug Fixes
15
+
16
+ - fix: clms-2266 long band names are cut [Mikel Larreategi - [`778e3e7`](https://github.com/eea/volto-clms-theme/commit/778e3e77e77b41f3312f9709ab22c1c314ec4725)]
17
+
18
+ #### :house: Internal changes
19
+
20
+ - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`b4cbf65`](https://github.com/eea/volto-clms-theme/commit/b4cbf6557fbc67f7fc4cea5aa2cb19804f3d7e3c)]
8
21
 
9
22
  #### :hammer_and_wrench: Others
10
23
 
11
- - set default value for layer when loading into the cart [Mikel Larreategi - [`d443272`](https://github.com/eea/volto-clms-theme/commit/d443272c0d87a7a56e1b3ff2131ada9625ec05ce)]
24
+ - add icon to clearing button [ionlizarazu - [`5f54b5f`](https://github.com/eea/volto-clms-theme/commit/5f54b5ff91a8e765303fa9d37798d521a6cea2eb)]
25
+ - search block text [ionlizarazu - [`2dafff4`](https://github.com/eea/volto-clms-theme/commit/2dafff44c77eb7d42dd73489fee079cf3034ac3e)]
26
+ - deactivate input types for DownloadableFilesTableWidget [ionlizarazu - [`dea6824`](https://github.com/eea/volto-clms-theme/commit/dea6824c4bdf52e665ed53ed859d8c37e3222070)]
27
+ ### [1.1.5](https://github.com/eea/volto-clms-theme/compare/1.1.4...1.1.5) - 1 June 2023
28
+
12
29
  ### [1.1.4](https://github.com/eea/volto-clms-theme/compare/1.1.3...1.1.4) - 31 May 2023
13
30
 
14
31
  #### :hammer_and_wrench: Others
package/Jenkinsfile CHANGED
@@ -41,19 +41,19 @@ pipeline {
41
41
 
42
42
  "ES lint": {
43
43
  node(label: 'docker') {
44
- sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha eslint'''
44
+ sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci eslint'''
45
45
  }
46
46
  },
47
47
 
48
48
  "Style lint": {
49
49
  node(label: 'docker') {
50
- sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha stylelint'''
50
+ sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci stylelint'''
51
51
  }
52
52
  },
53
53
 
54
54
  "Prettier": {
55
55
  node(label: 'docker') {
56
- sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha prettier'''
56
+ sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci prettier'''
57
57
  }
58
58
  }
59
59
  )
@@ -77,8 +77,8 @@ pipeline {
77
77
  node(label: 'docker') {
78
78
  script {
79
79
  try {
80
- sh '''docker pull plone/volto-addon-ci:alpha'''
81
- sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha'''
80
+ sh '''docker pull plone/volto-addon-ci'''
81
+ sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci'''
82
82
  sh '''rm -rf xunit-reports'''
83
83
  sh '''mkdir -p xunit-reports'''
84
84
  sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/coverage xunit-reports/'''
@@ -126,7 +126,7 @@ pipeline {
126
126
  // script {
127
127
  // try {
128
128
  // sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
129
- // sh '''docker pull plone/volto-addon-ci:alpha; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha cypress'''
129
+ // sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e VOLTO=$VOLTO plone/volto-addon-ci cypress'''
130
130
  // } finally {
131
131
  // try {
132
132
  // sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
- import { Input } from 'semantic-ui-react';
2
+ import { Button, Input } from 'semantic-ui-react';
3
3
  import { defineMessages, useIntl } from 'react-intl';
4
+ import { Icon } from '@plone/volto/components';
5
+ import clearSVG from '@plone/volto/icons/clear.svg';
4
6
 
5
7
  const messages = defineMessages({
6
8
  search: {
@@ -10,24 +12,9 @@ const messages = defineMessages({
10
12
  });
11
13
 
12
14
  const SearchInput = (props) => {
13
- const {
14
- data,
15
- searchText,
16
- setSearchText,
17
- isLive,
18
- onTriggerSearch,
19
- ...rest
20
- } = props;
15
+ const { data, searchText, setSearchText, isLive, onTriggerSearch } = props;
21
16
  const intl = useIntl();
22
17
 
23
- React.useEffect(() => {
24
- if (rest.searchedText !== '') {
25
- onTriggerSearch(rest.searchedText);
26
- setSearchText(rest.searchedText);
27
- }
28
- return () => {};
29
- }, [rest.searchedText, onTriggerSearch, setSearchText]);
30
-
31
18
  return (
32
19
  <div className="search-input">
33
20
  <Input
@@ -44,10 +31,25 @@ const SearchInput = (props) => {
44
31
  onChange={(event, { value }) => {
45
32
  setSearchText(value);
46
33
  if (isLive) {
47
- onTriggerSearch(searchText);
34
+ onTriggerSearch(value);
48
35
  }
49
36
  }}
50
37
  />
38
+ <div className="search-input-actions">
39
+ {searchText && (
40
+ <Button
41
+ basic
42
+ icon
43
+ className="search-input-clear-icon-button"
44
+ onClick={() => {
45
+ setSearchText('');
46
+ onTriggerSearch('');
47
+ }}
48
+ >
49
+ <Icon name={clearSVG}></Icon>
50
+ </Button>
51
+ )}
52
+ </div>
51
53
  </div>
52
54
  );
53
55
  };
@@ -1,3 +1,7 @@
1
1
  td {
2
2
  vertical-align: middle !important;
3
3
  }
4
+
5
+ .cart-table .ui.selection.dropdown .menu > .item {
6
+ word-wrap: break-word;
7
+ }
@@ -28,6 +28,7 @@ import './meetingstyles.less';
28
28
  import { RegisterButtonReasons } from './utils';
29
29
 
30
30
  import jwtDecode from 'jwt-decode';
31
+ import CclCard from '../CclCard/CclCard';
31
32
 
32
33
  export const CLMSMeetingView = (props) => {
33
34
  const { content, intl } = props;
@@ -128,6 +129,9 @@ export const CLMSMeetingView = (props) => {
128
129
  const files = content.items
129
130
  ? content.items.filter((item) => item['@type'] === 'File')
130
131
  : [];
132
+ const urls = content.items
133
+ ? content.items.filter((item) => item['@type'] === 'Link')
134
+ : [];
131
135
  const RegistrationButton = ({
132
136
  rContent,
133
137
  rMeeting_register,
@@ -496,6 +500,19 @@ export const CLMSMeetingView = (props) => {
496
500
  />
497
501
  )}
498
502
 
503
+ {urls.length > 0 &&
504
+ urls.map((url, i) => {
505
+ return (
506
+ <CclCard
507
+ key={i}
508
+ type="file"
509
+ url={url.getRemoteUrl}
510
+ card={url}
511
+ showDates={false}
512
+ />
513
+ );
514
+ })}
515
+
499
516
  {is_manager && (
500
517
  <div className="dataset-info-documents dropdown card-container">
501
518
  <div className="accordion-block"></div>
@@ -10,6 +10,7 @@ import { portal_types_labels } from '../Blocks/CustomTemplates/VoltoSearchBlock'
10
10
  import penSVG from '@plone/volto/icons/pen.svg';
11
11
  import { Icon } from 'semantic-ui-react';
12
12
  import { Icon as VoltoIcon } from '@plone/volto/components';
13
+ import { UniversalLink } from '@plone/volto/components';
13
14
 
14
15
  import PlaceHolder from '@eeacms/volto-clms-theme/../theme/clms/img/ccl-thumbnail-placeholder.jpg';
15
16
  import { cclDateFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
@@ -36,7 +37,7 @@ const CardLink = ({ url, children, className, condition = true }) => {
36
37
  protocolUrl.startsWith('https://') || protocolUrl.startsWith('http://')
37
38
  );
38
39
  }
39
- const RenderElement = hasProtocol(url) ? 'a' : Link;
40
+ const RenderElement = hasProtocol(url) ? UniversalLink : Link;
40
41
  return !condition ? (
41
42
  children
42
43
  ) : hasProtocol(url) ? (
@@ -166,13 +167,13 @@ function CclCard(props) {
166
167
  } = props;
167
168
  let url = '/';
168
169
  let content_type = '';
169
- if (card && !isCustomCard) {
170
+ if (card?.getRemoteUrl) {
171
+ url = card.getRemoteUrl || '/';
172
+ } else if (card && !isCustomCard) {
170
173
  url = card['@id'] || '/';
171
174
  content_type = portal_types_labels[card['@type']] || card['@type'];
172
- } else {
173
- if (card?.url?.length > 0) {
174
- url = card.url[0]['@id'] || '/';
175
- }
175
+ } else if (card?.url?.length > 0 && !card?.getRemoteUrl) {
176
+ url = card.url[0]['@id'] || '/';
176
177
  }
177
178
  const conditional_types = [
178
179
  'doc',
@@ -81,7 +81,17 @@ const DownloadableFilesTableWidget = (props) => {
81
81
  setUISchema(JSON.parse(newUiSchema));
82
82
  }}
83
83
  mods={{
84
- deactivatedFormInputs: ['array', 'radio', 'password', 'longAnswer'],
84
+ deactivatedFormInputs: [
85
+ 'array',
86
+ 'radio',
87
+ 'password',
88
+ 'longAnswer',
89
+ 'date',
90
+ 'dateTime',
91
+ 'time',
92
+ 'checkbox',
93
+ 'integer',
94
+ ],
85
95
  }}
86
96
  />
87
97
  {edited && (