Skip to content

Commit dde457b

Browse files
author
ws2-release-bot
committed
Merge branch release-2.18.6 into main
1 parent 45af3a6 commit dde457b

123 files changed

Lines changed: 12008 additions & 5012 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "drupal-profile",
55
"license": "MIT",
66
"require": {
7-
"asuwebplatforms/asu_governance": "1.1.0",
7+
"asuwebplatforms/asu_governance": "1.2.1",
88
"cweagans/composer-patches": "1.7.3",
99
"drupal/acquia_purge": "1.5.0",
1010
"drupal/admin_toolbar": "3.6.1",

modules/asu_brand/asu_brand.libraries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
components-library:
2-
version: 2.18.5
2+
version: 2.18.6
33
dependencies:
44
- core/drupal
55
- core/drupalSettings
@@ -10,7 +10,7 @@ components-library:
1010
component:
1111
css/asu_brand.header.css: {}
1212
block__system_main_block:
13-
version: 2.18.5
13+
version: 2.18.6
1414
css:
1515
theme:
1616
css/asu-brand-edit-form.css: {}

modules/asu_degree_rfi/asu_degree_rfi.libraries.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
asu-degree-rfi-core:
2-
version: 2.18.5
2+
version: 2.18.6
33
dependencies:
44
- asu_react_integration/reactjs
55
- core/jquery
66
- core/drupal
77
- core/drupalSettings
88
app-rfi:
9-
version: 2.18.5
9+
version: 2.18.6
1010
dependencies:
1111
- asu_degree_rfi/asu-degree-rfi-core
1212
js:
1313
node_modules/@asu/app-rfi/dist/appRfi.umd.js: {}
1414
js/asu_degree_rfi.rfi.js: {}
1515
degree-page-core:
16-
version: 2.18.5
16+
version: 2.18.6
1717
dependencies:
1818
- asu_degree_rfi/asu-degree-rfi-core
1919
js:
2020
node_modules/@asu/app-degree-pages/dist/degreePages.umd.js: { }
2121
degree-listing-page:
22-
version: 2.18.5
22+
version: 2.18.6
2323
dependencies:
2424
- asu_degree_rfi/degree-page-core
2525
js:
2626
js/asu_degree_listing_page.js: {}
2727
program-detail-page:
28-
version: 2.18.5
28+
version: 2.18.6
2929
dependencies:
3030
- asu_degree_rfi/degree-page-core
3131
js:

modules/asu_events/asu_events.libraries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
events-component:
2-
version: 2.18.5
2+
version: 2.18.6
33
dependencies:
44
- asu_react_integration/reactjs
55
- core/jquery

modules/asu_footer/asu_footer.libraries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
footer-block:
2-
version: 2.18.5
2+
version: 2.18.6
33
dependencies:
44
- core/jquery
55
- core/drupal

modules/asu_news/asu_news.libraries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
news-component:
2-
version: 2.18.5
2+
version: 2.18.6
33
dependencies:
44
- asu_react_integration/reactjs
55
- core/jquery

modules/asu_react_core/asu_react_core.libraries.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
react-core:
2-
version: 2.18.5
2+
version: 2.18.6
33
dependencies:
44
- core/jquery
55
- core/drupal
@@ -8,49 +8,49 @@ react-core:
88
js:
99
node_modules/@asu/unity-react-core/dist/unityReactCore.umd.js: {}
1010
testimonial-carousel:
11-
version: 2.18.5
11+
version: 2.18.6
1212
dependencies:
1313
- asu_react_core/react-core
1414
js:
1515
js/component-carousel-testimonial.js: {}
1616
image-carousel:
17-
version: 2.18.5
17+
version: 2.18.6
1818
dependencies:
1919
- asu_react_core/react-core
2020
js:
2121
js/component-carousel-image.js: {}
2222
image_gallery_carousel:
23-
version: 2.18.5
23+
version: 2.18.6
2424
dependencies:
2525
- asu_react_core/react-core
2626
js:
2727
js/component-carousel-image-gallery.js: { }
2828
card_carousel:
29-
version: 2.18.5
29+
version: 2.18.6
3030
dependencies:
3131
- asu_react_core/react-core
3232
js:
3333
js/component-carousel-card.js: { }
3434
card-arrangement:
35-
version: 2.18.5
35+
version: 2.18.6
3636
dependencies:
3737
- asu_react_core/react-core
3838
js:
3939
js/component-card-arrangement.js: { }
4040
testimonial:
41-
version: 2.18.5
41+
version: 2.18.6
4242
dependencies:
4343
- asu_react_core/react-core
4444
js:
4545
js/component-testimonial.js: {}
4646
card:
47-
version: 2.18.5
47+
version: 2.18.6
4848
dependencies:
4949
- asu_react_core/react-core
5050
js:
5151
js/component-card.js: { }
5252
testimonial-on-image-background:
53-
version: 2.18.5
53+
version: 2.18.6
5454
dependencies:
5555
- asu_react_core/react-core
5656
js:

modules/asu_react_core/src/Utils/ReactComponentHelperFunctions.php

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*/
1212
class ReactComponentHelperFunctions {
1313

14+
/**
15+
*
16+
*/
1417
public function getImagesItems($block, $rand_id) {
1518
$image_carousel = new \stdClass();
1619
$image_carousel->items = [];
@@ -29,6 +32,9 @@ public function getImagesItems($block, $rand_id) {
2932
return $settings;
3033
}
3134

35+
/**
36+
*
37+
*/
3238
public function getCardContent($paragraph) {
3339
if (empty($paragraph)) {
3440
return;
@@ -42,18 +48,23 @@ public function getCardContent($paragraph) {
4248
case 'card_with_icon':
4349
$card->cardType = 'default';
4450
break;
51+
4552
case 'card_degree':
4653
$card->cardType = 'degree';
4754
break;
55+
4856
case 'card_event':
4957
$card->cardType = 'event';
5058
break;
59+
5160
case 'card_story':
5261
$card->cardType = 'story';
5362
break;
63+
5464
case 'card_ranking':
5565
$card->cardType = 'ranking';
5666
break;
67+
5768
case 'image_based_card':
5869
$card->cardType = 'image';
5970
break;
@@ -89,7 +100,7 @@ public function getCardContent($paragraph) {
89100
$cta->label = $paragraph->field_cta->entity->field_cta_link->title;
90101
$cta->href = $this->processLink($paragraph->field_cta->entity->field_cta_link->uri);
91102
$options = $paragraph->field_cta->entity->field_cta_link->options;
92-
$color = $this->getButtonColor($options,'maroon' );
103+
$color = $this->getButtonColor($options, 'maroon');
93104
if (isset($options['attributes']['target'])) {
94105
$cta->target = $options['attributes']['target'];
95106
}
@@ -102,15 +113,15 @@ public function getCardContent($paragraph) {
102113
$cta->label = $paragraph->field_cta_secondary->entity->field_cta_link->title;
103114
$cta->href = $this->processLink($paragraph->field_cta_secondary->entity->field_cta_link->uri);
104115
$options = $paragraph->field_cta_secondary->entity->field_cta_link->options;
105-
$color = $this->getButtonColor($options,'gold' );
116+
$color = $this->getButtonColor($options, 'gold');
106117
if (isset($options['attributes']['target'])) {
107118
$cta->target = $options['attributes']['target'];
108119
}
109120
$cta->color = $color;
110121
$cta->size = 'small';
111122
$card->buttons[] = $cta;
112123
}
113-
// Field link URL with title and URL
124+
// Field link URL with title and URL.
114125
if ($paragraph->field_link && $paragraph->field_link->title && $paragraph->field_link->uri) {
115126
$card->linkLabel = $paragraph->field_link->title;
116127
$card->linkUrl = $this->processLink($paragraph->field_link->uri);
@@ -121,27 +132,28 @@ public function getCardContent($paragraph) {
121132
if ($paragraph->field_card_ranking_image_size->value === 'small') {
122133
$card->imageSize = 'small';
123134
$card->citation = $paragraph->field_citation_title->value;
124-
} elseif ($paragraph->field_card_ranking_image_size->value === 'large') {
135+
}
136+
elseif ($paragraph->field_card_ranking_image_size->value === 'large') {
125137
$card->imageSize = 'large';
126138
}
127139
}
128140

129-
// WS2-1674 - Card ranking link URL, no link title
141+
// WS2-1674 - Card ranking link URL, no link title.
130142
if (isset($paragraph->field_card_ranking_image_size->value) && isset($paragraph->field_link->uri)) {
131143
$link = Url::fromUri($paragraph->field_link->uri);
132144
$card->linkUrl = $this->processLink($paragraph->field_link->uri);
133145
}
134146

135-
//@TODO We are not going to send this information to the react component,
147+
// @TODO We are not going to send this information to the react component,
136148
// since the functionality in webspark for the tags has not yet been defined
137149
/*if (!empty($paragraph->field_tags)) {
138-
foreach ($paragraph->field_tags as $term) {
139-
$tag = new \stdClass();
140-
$tag->label = $term->entity->name->value;
141-
$link = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term' => $term->entity->tid->value]);
142-
$tag->href = $link->toString();
143-
$card->tags[] = $tag;
144-
}
150+
foreach ($paragraph->field_tags as $term) {
151+
$tag = new \stdClass();
152+
$tag->label = $term->entity->name->value;
153+
$link = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term' => $term->entity->tid->value]);
154+
$tag->href = $link->toString();
155+
$card->tags[] = $tag;
156+
}
145157
}*/
146158

147159
// WS2-1643 - Adding validating to set icon setting only when it exists.
@@ -150,27 +162,28 @@ public function getCardContent($paragraph) {
150162
$icon_style = $paragraph->field_icon->style;
151163
if (isset($paragraph->field_icon->settings)) {
152164
// PHP 8.1 warning - when null is passed to build in function,
153-
// it is no longer silently converted to empty string
165+
// it is no longer silently converted to empty string.
154166
$icon_settings = unserialize($paragraph->field_icon->settings);
155-
} else {
167+
}
168+
else {
156169
$icon_settings = '';
157170
}
158171
$card->icon = [$icon_style, $icon_name, $icon_settings];
159172
}
160173

161-
$card->clickable = false;
162-
if (isset($paragraph->field_clickable->value) && isset($paragraph->field_card_link->uri)){
163-
$card->clickable = true;
174+
$card->clickable = FALSE;
175+
if (isset($paragraph->field_clickable->value) && isset($paragraph->field_card_link->uri)) {
176+
$card->clickable = TRUE;
164177
$link = Url::fromUri($paragraph->field_card_link->uri);
165178
$card->clickHref = $this->processLink($paragraph->field_card_link->uri);
166179
}
167180

168-
$card->showBorders = false;
181+
$card->showBorders = FALSE;
169182
if ($paragraph->field_show_borders && $paragraph->field_show_borders->value) {
170-
$card->showBorders = true;
183+
$card->showBorders = TRUE;
171184
}
172185

173-
// WS2-1711 - Image based card
186+
// WS2-1711 - Image based card.
174187
if (isset($paragraph->field_loading->value)) {
175188
$card->loading = $paragraph->field_loading->value;
176189
}
@@ -181,7 +194,7 @@ public function getCardContent($paragraph) {
181194
$card->captionTitle = $paragraph->field_caption_title->value;
182195
}
183196
if (isset($paragraph->field_drop_shadow->value) && $paragraph->field_drop_shadow->value) {
184-
$card->dropShadow = true;
197+
$card->dropShadow = TRUE;
185198
}
186199

187200
$settings = [];
@@ -190,32 +203,39 @@ public function getCardContent($paragraph) {
190203
return $settings;
191204
}
192205

193-
function getButtonColor($options, $default) {
206+
/**
207+
*
208+
*/
209+
public function getButtonColor($options, $default) {
194210
$color = $default;
195211
if (isset($options['attributes']['class'])) {
196-
//class structure from custom widget 'btn-size btn-color btn'
197-
$class = explode( ' ', $options['attributes']['class']);
212+
// Class structure from custom widget 'btn-size btn-color btn'.
213+
$class = explode(' ', $options['attributes']['class']);
198214
$color = substr($class[1], 4);
199215
}
200216
return $color;
201217
}
202218

203-
function processLink($raw_link) {
219+
/**
220+
*
221+
*/
222+
public function processLink($raw_link) {
204223
if (isset($raw_link)) {
205-
if (preg_match('/^https?:\/\//', $raw_link)) {
224+
if (preg_match('/^(https?|mailto|tel):/', $raw_link)) {
206225
return $raw_link;
207226
}
208227
// Drupal prepends internal links with 'internal:' so we need to strip it.
209-
else if (str_starts_with($raw_link, 'internal:')) {
228+
elseif (str_starts_with($raw_link, 'internal:')) {
210229
$raw_link = preg_replace('/internal:/', '', $raw_link);
211230
$link = Url::fromUserInput($raw_link);
212231
return $link->toString() ?: $raw_link;
213232
}
214-
else if (str_starts_with($raw_link, 'route:') || str_starts_with($raw_link, 'entity:') || str_starts_with($raw_link, 'base:')) {
233+
elseif (str_starts_with($raw_link, 'route:') || str_starts_with($raw_link, 'entity:') || str_starts_with($raw_link, 'base:')) {
215234
$link = Url::fromUri($raw_link);
216235
return $link->toString() ?: '';
217236
}
218237
}
219238
return NULL;
220239
}
240+
221241
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
reactjs:
2-
version: 2.18.5
2+
version: 2.18.6
33
js:
44
node_modules/react/umd/react.production.min.js: {minified: true, weight: -10}
55
node_modules/react-dom/umd/react-dom.production.min.js: {minified: true, weight: -10}

modules/webspark_blocks/webspark_blocks.libraries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Custom module library for general purposes.
22
webspark_blocks:
3-
version: 2.18.5
3+
version: 2.18.6
44
css:
55
component:
66
css/webspark-blocks.css: {}
77
js:
88
js/card-arrangement.js: {}
99

1010
anchor_menu:
11-
version: 2.18.5
11+
version: 2.18.6
1212
dependencies:
1313
- asu_brand/components-library
1414
- core/drupal

0 commit comments

Comments
 (0)