@brightspace-ui/core 1.186.0 → 1.189.0
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/components/filter/filter.js +23 -2
- package/components/html-block/demo/html-block.html +1 -10
- package/components/inputs/input-date-time.js +5 -11
- package/components/inputs/input-date.js +4 -11
- package/components/inputs/input-number.js +4 -10
- package/components/inputs/input-percent.js +4 -14
- package/components/inputs/input-text.js +11 -8
- package/components/inputs/input-textarea.js +4 -8
- package/components/inputs/input-time.js +3 -10
- package/components/list/demo/list-item-custom.js +83 -0
- package/components/list/demo/list-nested.html +193 -0
- package/components/list/list-item-checkbox-mixin.js +29 -16
- package/components/list/list-item-mixin.js +3 -3
- package/components/selection/selection-mixin.js +4 -0
- package/components/tooltip/tooltip.js +1 -0
- package/custom-elements.json +419 -83
- package/helpers/framed.js +1 -1
- package/helpers/mathjax.js +10 -2
- package/mixins/labelled-mixin.js +3 -3
- package/package.json +1 -1
package/helpers/framed.js
CHANGED
|
@@ -21,7 +21,7 @@ export async function isFramed() {
|
|
|
21
21
|
framed = await Promise.race([
|
|
22
22
|
new Promise(resolve => {
|
|
23
23
|
const handleIsFramedResponse = evt => {
|
|
24
|
-
if (!evt || !evt.data ||
|
|
24
|
+
if (!evt || !evt.data || evt.data.isFramed === undefined) return;
|
|
25
25
|
window.removeEventListener('message', handleIsFramedResponse, false);
|
|
26
26
|
framed = evt.data.isFramed;
|
|
27
27
|
resolve(framed);
|
package/helpers/mathjax.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
let mathJaxLoaded;
|
|
2
2
|
|
|
3
3
|
export async function htmlBlockMathRenderer(elem) {
|
|
4
|
-
const
|
|
4
|
+
const context = JSON.parse(document.documentElement.getAttribute('data-mathjax-context')) || {};
|
|
5
|
+
const isLatexSupported = context.renderLatex;
|
|
5
6
|
|
|
6
7
|
if (!elem.querySelector('math') && !(isLatexSupported && /\$\$|\\\(|\\\[|\\begin{|\\ref{|\\eqref{/.test(elem.innerHTML))) return elem;
|
|
7
8
|
|
|
8
|
-
const mathJaxConfig = {
|
|
9
|
+
const mathJaxConfig = {
|
|
10
|
+
renderLatex: isLatexSupported,
|
|
11
|
+
outputScale: context.outputScale || 1
|
|
12
|
+
};
|
|
13
|
+
|
|
9
14
|
await loadMathJax(mathJaxConfig);
|
|
10
15
|
|
|
11
16
|
const temp = document.createElement('div');
|
|
@@ -21,6 +26,9 @@ export function loadMathJax(mathJaxConfig) {
|
|
|
21
26
|
if (mathJaxLoaded) return mathJaxLoaded;
|
|
22
27
|
|
|
23
28
|
window.MathJax = {
|
|
29
|
+
chtml: {
|
|
30
|
+
scale: (mathJaxConfig && mathJaxConfig.outputScale) || 1
|
|
31
|
+
},
|
|
24
32
|
options: {
|
|
25
33
|
menuOptions: {
|
|
26
34
|
settings: { zoom: 'None' }
|
package/mixins/labelled-mixin.js
CHANGED
|
@@ -84,7 +84,7 @@ export const LabelledMixin = superclass => class extends superclass {
|
|
|
84
84
|
*/
|
|
85
85
|
labelledBy: { type: String, reflect: true, attribute: 'labelled-by' },
|
|
86
86
|
/**
|
|
87
|
-
* Explicitly defined label
|
|
87
|
+
* REQUIRED: Explicitly defined label for the element
|
|
88
88
|
* @type {string}
|
|
89
89
|
*/
|
|
90
90
|
label: { type: String }
|
|
@@ -93,8 +93,8 @@ export const LabelledMixin = superclass => class extends superclass {
|
|
|
93
93
|
|
|
94
94
|
constructor() {
|
|
95
95
|
super();
|
|
96
|
+
this.labelRequired = true;
|
|
96
97
|
this._labelElem = null;
|
|
97
|
-
this._labelRequired = true;
|
|
98
98
|
this._missingLabelErrorHasBeenThrown = false;
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -135,7 +135,7 @@ export const LabelledMixin = superclass => class extends superclass {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
_throwError(err) {
|
|
138
|
-
if (!this.
|
|
138
|
+
if (!this.labelRequired || this._missingLabelErrorHasBeenThrown) return;
|
|
139
139
|
this._missingLabelErrorHasBeenThrown = true;
|
|
140
140
|
setTimeout(() => { throw err; }); // we don't want to prevent rendering
|
|
141
141
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.189.0",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"repository": "https://github.com/BrightspaceUI/core.git",
|
|
6
6
|
"publishConfig": {
|