@brightspace-ui/core 3.160.0 → 3.160.2
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/helpers/mathjax.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import { getFlag } from './flags.js';
|
2
|
+
|
1
3
|
/* When updating MathJax, update mathjaxBaseUrl to use the new version
|
2
4
|
* and verify that the font mappings included in mathjaxFontMappings
|
3
5
|
* match what's present in the MathJax-src repo.
|
@@ -38,8 +40,17 @@ class HtmlBlockMathRenderer {
|
|
38
40
|
|
39
41
|
async render(elem, options) {
|
40
42
|
if (!options.contextValues) return elem;
|
41
|
-
|
42
|
-
|
43
|
+
let context = options.contextValues.get(mathjaxContextKey);
|
44
|
+
|
45
|
+
// For 20.25.11, update to default to true if flag helper can't be found
|
46
|
+
if (getFlag('shield-12649-mathjax-default-context', false)) {
|
47
|
+
context = context || {
|
48
|
+
renderLatex: false,
|
49
|
+
outputScale: 1
|
50
|
+
};
|
51
|
+
} else {
|
52
|
+
if (context === undefined) return elem;
|
53
|
+
}
|
43
54
|
|
44
55
|
if (!elem.querySelector('math') && !(context.renderLatex && /\$\$|\\\(|\\\[|\\begin{|\\ref{|\\eqref{/.test(elem.innerHTML))) return elem;
|
45
56
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.160.
|
3
|
+
"version": "3.160.2",
|
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",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Templates
|
2
2
|
Page templates are used to provide generic ways to arrange content on a page
|
3
3
|
|
4
|
-
## Primary-Secondary [d2l-primary-secondary]
|
4
|
+
## Primary-Secondary [d2l-template-primary-secondary]
|
5
5
|
Two Panel (primary and secondary) page template with header and optional footer
|
6
6
|
|
7
7
|
Use this template when:
|
@@ -47,7 +47,7 @@
|
|
47
47
|
document
|
48
48
|
.querySelector('d2l-button')
|
49
49
|
.addEventListener('click', () => form.submitForm());
|
50
|
-
form.addEventListener('d2l-form-submit', (e) => {
|
50
|
+
form.addEventListener('d2l-template-primary-secondary-form-submit', (e) => {
|
51
51
|
console.log('Form submitted!', e.detail.formData);
|
52
52
|
});
|
53
53
|
</script>
|