@brightspace-ui/core 3.177.0 → 3.177.1

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.
@@ -1,6 +1,7 @@
1
1
  import '../colors/colors.js';
2
2
  import { css, html, nothing } from 'lit';
3
3
  import { isInteractiveInListItemComposedPath, ListItemMixin } from './list-item-mixin.js';
4
+ import { getFlag } from '../../helpers/flags.js';
4
5
  import { getUniqueId } from '../../helpers/uniqueId.js';
5
6
  import { ifDefined } from 'lit/directives/if-defined.js';
6
7
 
@@ -45,6 +46,7 @@ export const ListItemLinkMixin = superclass => class extends ListItemMixin(super
45
46
  super();
46
47
  this.actionHref = null;
47
48
  this._primaryActionId = getUniqueId();
49
+ this._propagateLinkClickEvent = getFlag('GAUD-8733-list-item-propagate-link-click-event', true);
48
50
  }
49
51
 
50
52
  willUpdate(changedProperties) {
@@ -64,15 +66,17 @@ export const ListItemLinkMixin = superclass => class extends ListItemMixin(super
64
66
  /** Dispatched when the item's primary link action is clicked */
65
67
  this.dispatchEvent(new CustomEvent('d2l-list-item-link-click', { bubbles: true }));
66
68
 
67
- e.stopPropagation();
69
+ if (!this._propagateLinkClickEvent) {
70
+ e.stopPropagation();
68
71
 
69
- // Dispatches click event from the list item to maintain existing functionality in consumers that listen for the click event
70
- const listItemClickEvent = new e.constructor(e.type, e);
71
- listItemClickEvent.preventDefault = () => {
72
- e.preventDefault();
73
- };
74
- /** @ignore */
75
- this.dispatchEvent(listItemClickEvent);
72
+ // Dispatches click event from the list item to maintain existing functionality in consumers that listen for the click event
73
+ const listItemClickEvent = new e.constructor(e.type, e);
74
+ listItemClickEvent.preventDefault = () => {
75
+ e.preventDefault();
76
+ };
77
+ /** @ignore */
78
+ this.dispatchEvent(listItemClickEvent);
79
+ }
76
80
  }
77
81
  }
78
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.177.0",
3
+ "version": "3.177.1",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",