@brightspace-ui/core 3.148.8 → 3.148.9
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.
@@ -123,14 +123,14 @@ class ListDemoNav extends LitElement {
|
|
123
123
|
|
124
124
|
this.requestUpdate();
|
125
125
|
await this.updateComplete;
|
126
|
-
await this.updateComplete;
|
127
126
|
|
128
127
|
if (e.detail.keyboardActive) {
|
129
|
-
setTimeout(() => {
|
128
|
+
setTimeout(async() => {
|
130
129
|
if (!this.shadowRoot) return;
|
131
130
|
const newItem = this.shadowRoot.querySelector('d2l-list').getListItemByKey(sourceListItems[0].key);
|
131
|
+
await newItem.waitForUpdateComplete();
|
132
132
|
newItem.activateDragHandle();
|
133
|
-
}
|
133
|
+
});
|
134
134
|
}
|
135
135
|
}
|
136
136
|
|
@@ -134,14 +134,14 @@ class ListDemoNested extends LitElement {
|
|
134
134
|
|
135
135
|
this.requestUpdate();
|
136
136
|
await this.updateComplete;
|
137
|
-
await this.updateComplete;
|
138
137
|
|
139
138
|
if (e.detail.keyboardActive) {
|
140
|
-
setTimeout(() => {
|
139
|
+
setTimeout(async() => {
|
141
140
|
if (!this.shadowRoot) return;
|
142
141
|
const newItem = this.shadowRoot.querySelector('d2l-list').getListItemByKey(sourceListItems[0].key);
|
142
|
+
await newItem.waitForUpdateComplete();
|
143
143
|
newItem.activateDragHandle();
|
144
|
-
}
|
144
|
+
});
|
145
145
|
}
|
146
146
|
|
147
147
|
}
|
@@ -6,7 +6,7 @@ import './list-item-placement-marker.js';
|
|
6
6
|
import '../tooltip/tooltip.js';
|
7
7
|
import '../expand-collapse/expand-collapse-content.js';
|
8
8
|
import { css, html, nothing, unsafeCSS } from 'lit';
|
9
|
-
import { findComposedAncestor, getComposedParent } from '../../helpers/dom.js';
|
9
|
+
import { findComposedAncestor, getComposedChildren, getComposedParent } from '../../helpers/dom.js';
|
10
10
|
import { interactiveElements, isInteractiveInComposedPath } from '../../helpers/interactive.js';
|
11
11
|
import { classMap } from 'lit/directives/class-map.js';
|
12
12
|
import { composeMixins } from '../../helpers/composeMixins.js';
|
@@ -24,6 +24,7 @@ import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
24
24
|
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
25
25
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
26
26
|
import { styleMap } from 'lit/directives/style-map.js';
|
27
|
+
import { waitForElem } from '../../helpers/internal/waitForElem.js';
|
27
28
|
|
28
29
|
let tabPressed = false;
|
29
30
|
let tabListenerAdded = false;
|
@@ -594,6 +595,12 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
594
595
|
this._siblingHasColor = siblingHasColor;
|
595
596
|
}
|
596
597
|
|
598
|
+
async waitForUpdateComplete() {
|
599
|
+
const predicate = () => true;
|
600
|
+
const composedChildren = getComposedChildren(this, predicate);
|
601
|
+
await Promise.all(composedChildren.map(child => waitForElem(child, predicate)));
|
602
|
+
}
|
603
|
+
|
597
604
|
_getFlattenedListItems(listItem) {
|
598
605
|
const listItems = new Map();
|
599
606
|
const lazyLoadListItems = new Map();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.148.
|
3
|
+
"version": "3.148.9",
|
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",
|
@@ -68,7 +68,7 @@
|
|
68
68
|
"dependencies": {
|
69
69
|
"@brightspace-ui/intl": "^3",
|
70
70
|
"@brightspace-ui/lms-context-provider": "^1",
|
71
|
-
"@open-wc/dedupe-mixin": "^
|
71
|
+
"@open-wc/dedupe-mixin": "^2",
|
72
72
|
"ifrau": "^0.41",
|
73
73
|
"lit": "^3",
|
74
74
|
"prismjs": "^1",
|