@eeacms/volto-clms-theme 1.0.143 → 1.0.145

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,26 @@ 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.0.143](https://github.com/eea/volto-clms-theme/compare/1.0.142...1.0.143) - 8 November 2022
7
+ ### [1.0.145](https://github.com/eea/volto-clms-theme/compare/1.0.144...1.0.145) - 11 November 2022
8
8
 
9
- #### :rocket: New Features
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - universal link removed [Unai - [`0f41a23`](https://github.com/eea/volto-clms-theme/commit/0f41a23f929a31978674a5d7e1852c95d27fc728)]
12
+ - refactor https://github.com/eea/volto-clms-theme/commit/8a490db836f72e1330aa2e22db5e8222fd7dbc53 [Unai - [`19a4364`](https://github.com/eea/volto-clms-theme/commit/19a436498151d883d7bfc840153a12fc50cd9c76)]
13
+ - listing file variation (download) [Unai - [`6624994`](https://github.com/eea/volto-clms-theme/commit/6624994d07a73b6e164b2e8feee59380784dbdec)]
14
+ ### [1.0.144](https://github.com/eea/volto-clms-theme/compare/1.0.143...1.0.144) - 9 November 2022
15
+
16
+ #### :bug: Bug Fixes
17
+
18
+ - fix: prevent range label overlapping CLMS-1459 [joewdavies - [`b092799`](https://github.com/eea/volto-clms-theme/commit/b092799e46dc800f432e63240ed243ae036ba82c)]
19
+ - fix: prevents overlapping when both labels are long and close [ionlizarazu - [`49b3210`](https://github.com/eea/volto-clms-theme/commit/49b32109efeb4400b86cf1e54444038f83abbf6e)]
20
+ - fix: prevent range label overlapping CLMS-1459 [joewdavies - [`650d6f1`](https://github.com/eea/volto-clms-theme/commit/650d6f1881c38f0003650a44dbc8ed8f4c12dc43)]
10
21
 
11
- - feat: sort technical library items according to 2 indexes [Mikel Larreategi - [`3224a3c`](https://github.com/eea/volto-clms-theme/commit/3224a3c98cec0793759bf7dac6787dce4774449b)]
22
+ #### :hammer_and_wrench: Others
23
+
24
+ - ESLint fix [joewdavies - [`ee07818`](https://github.com/eea/volto-clms-theme/commit/ee0781868beb81838af1bdecf7305929f5f65208)]
25
+ - prettier [joewdavies - [`c38792d`](https://github.com/eea/volto-clms-theme/commit/c38792d542654a4783f04204cc4f6c7e179740c1)]
26
+ ### [1.0.143](https://github.com/eea/volto-clms-theme/compare/1.0.142...1.0.143) - 8 November 2022
12
27
 
13
28
  ### [1.0.142](https://github.com/eea/volto-clms-theme/compare/1.0.141...1.0.142) - 8 November 2022
14
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.143",
3
+ "version": "1.0.145",
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",
@@ -78,7 +78,7 @@ const DoubleRangeFacet = (props) => {
78
78
  >
79
79
  <legend className="ccl-form-legend">{facet.title}</legend>
80
80
  </div>
81
- <div>
81
+ <div class="range-container">
82
82
  <Segment basic padded>
83
83
  <InputRange
84
84
  minValue={startingValues.min}
@@ -3,3 +3,24 @@
3
3
  border: #a0b128;
4
4
  background: #a0b128;
5
5
  }
6
+
7
+ /* first label, prevents overlapping CLMS-1459 */
8
+ .input-range__track.input-range__track--background
9
+ span.input-range__slider-container:nth-child(2)
10
+ span.input-range__label.input-range__label--value {
11
+ width: 0;
12
+ direction: rtl;
13
+ white-space: nowrap;
14
+ }
15
+
16
+ /* second label, prevents overlapping when both labels are long CLMS-1459 */
17
+ .input-range__track.input-range__track--background
18
+ span.input-range__slider-container:nth-child(3)
19
+ span.input-range__label.input-range__label--value {
20
+ width: 0;
21
+ }
22
+
23
+ .range-container {
24
+ padding-right: 15px;
25
+ padding-left: 15px;
26
+ }
@@ -106,6 +106,12 @@ function listingVariation(id, isDefault, title, template, isWO = false) {
106
106
  const availableVariations = [
107
107
  listingVariation('CclCardsdoc', true, 'Line list', 'doc'),
108
108
  listingVariation('CclFiles', false, 'Files list', 'file'),
109
+ listingVariation(
110
+ 'CclFilesDownload',
111
+ false,
112
+ 'Files list (link to download)',
113
+ 'downloadFile',
114
+ ),
109
115
  listingVariation('CclCardsline', false, 'Line list with Image', 'line'),
110
116
  listingVariation(
111
117
  'CclCardsline-color',
@@ -479,7 +479,7 @@ export const CLMSMeetingView = (props) => {
479
479
 
480
480
  {files.length > 0 && (
481
481
  <CclListingCards
482
- variation="file"
482
+ variation="downloadFile"
483
483
  items={files}
484
484
  showDates={false}
485
485
  linkHref={`${files['@id']}/@@download/file`}
@@ -87,7 +87,7 @@ const CLMSNewsItemView = (props) => {
87
87
  )}
88
88
  {files.length > 0 && (
89
89
  <CclListingCards
90
- variation="file"
90
+ variation="downloadFile"
91
91
  items={files}
92
92
  showDates={false}
93
93
  linkHref={`${files['@id']}/@@download/file`}
@@ -13,7 +13,6 @@ import { Icon as VoltoIcon } from '@plone/volto/components';
13
13
 
14
14
  import PlaceHolder from '@eeacms/volto-clms-theme/../theme/clms/img/ccl-thumbnail-placeholder.jpg';
15
15
  import { cclDateFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
16
- import { UniversalLink } from '@plone/volto/components';
17
16
 
18
17
  const CardImage = ({ card, size = 'preview', isCustomCard }) => {
19
18
  return card?.image_field ? (
@@ -109,9 +108,15 @@ function CclCard(props) {
109
108
  'threeColumns',
110
109
  'globalSearch',
111
110
  'file',
111
+ 'downloadFile',
112
112
  ];
113
113
  const wrapperClass =
114
- 'card-' + (type === 'globalSearch' ? 'doc' : type || 'line');
114
+ 'card-' +
115
+ (type === 'globalSearch'
116
+ ? 'doc'
117
+ : type === 'downloadFile'
118
+ ? 'file'
119
+ : type || 'line');
115
120
  return (
116
121
  <CardLink
117
122
  url={url}
@@ -143,12 +148,29 @@ function CclCard(props) {
143
148
  </div>
144
149
  <div className="card-text">
145
150
  <div className="card-file-title">
146
- <UniversalLink
147
- openLinkInNewTab={true}
148
- href={url + '/@@download/file'}
149
- >
151
+ <CardLink url={url}>{card?.title}</CardLink>
152
+ </div>
153
+ {showDates && (
154
+ <div className="card-file-date">
155
+ {card?.effective
156
+ ? cclDateFormat(card?.effective)
157
+ : cclDateFormat(card?.created)}
158
+ </div>
159
+ )}
160
+ {children}
161
+ </div>
162
+ </>
163
+ )}
164
+ {type === 'downloadFile' && (
165
+ <>
166
+ <div className="card-icon">
167
+ <Icon name="file alternate outline" />
168
+ </div>
169
+ <div className="card-text">
170
+ <div className="card-file-title">
171
+ <CardLink url={url + '/@@download/file'}>
150
172
  {card?.title}
151
- </UniversalLink>
173
+ </CardLink>
152
174
  </div>
153
175
  {showDates && (
154
176
  <div className="card-file-date">