@brightspace-ui/core 2.185.0 → 2.186.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.
@@ -139,23 +139,25 @@ class Form extends FormMixin(LitElement) {
139
139
  }
140
140
  e.stopPropagation();
141
141
  e.preventDefault();
142
+
142
143
  const form = e.composedPath()[0];
144
+ const target = e.target;
143
145
 
144
- if (!this._nestedForms.has(e.target)) {
145
- this._nestedForms.set(e.target, []);
146
+ if (!this._nestedForms.has(target)) {
147
+ this._nestedForms.set(target, []);
146
148
  }
147
- this._nestedForms.get(e.target).push(form);
149
+ this._nestedForms.get(target).push(form);
148
150
 
149
151
  const onFormDisconnect = () => {
150
152
  form.removeEventListener('d2l-form-disconnect', onFormDisconnect);
151
- if (this._nestedForms.has(e.target)) {
152
- const forms = this._nestedForms.get(e.target);
153
+ if (this._nestedForms.has(target)) {
154
+ const forms = this._nestedForms.get(target);
153
155
  const index = forms.indexOf(form);
154
156
  if (index > -1) {
155
157
  forms.splice(index, 1);
156
158
  }
157
159
  if (forms.length === 0) {
158
- this._nestedForms.delete(e.target);
160
+ this._nestedForms.delete(target);
159
161
  }
160
162
  }
161
163
  };
@@ -4539,6 +4539,10 @@
4539
4539
  }
4540
4540
  ]
4541
4541
  },
4542
+ {
4543
+ "name": "d2l-test-two-forms",
4544
+ "path": "./components/form/test/form.test.js"
4545
+ },
4542
4546
  {
4543
4547
  "name": "d2l-test-nested-form",
4544
4548
  "path": "./components/form/test/nested-form.js",
@@ -47,6 +47,7 @@ class HtmlBlockMathRenderer {
47
47
 
48
48
  const mathJaxConfig = {
49
49
  deferTypeset: true,
50
+ enableMML3Support: context.enableMML3Support,
50
51
  renderLatex: context.renderLatex,
51
52
  outputScale: context.outputScale || 1,
52
53
  window: window
@@ -102,7 +103,15 @@ export function loadMathJax(mathJaxConfig) {
102
103
  settings: { zoom: 'None' }
103
104
  }
104
105
  },
105
- loader: { load: ['ui/menu'] },
106
+ loader: {
107
+ load: mathJaxConfig && mathJaxConfig.enableMML3Support
108
+ ? [
109
+ '[mml]/mml3',
110
+ 'ui/menu'
111
+ ] : [
112
+ 'ui/menu'
113
+ ]
114
+ },
106
115
  startup: {
107
116
  ready: () => {
108
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.185.0",
3
+ "version": "2.186.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",
@@ -2,5 +2,6 @@ console.warn('Using mathjax test context, this is intended for demo pages and te
2
2
 
3
3
  document.getElementsByTagName('html')[0].dataset.mathjaxContext = JSON.stringify({
4
4
  outputScale: 1.1,
5
- renderLatex: !(window.location.search.indexOf('latex=false') !== -1)
5
+ renderLatex: !(window.location.search.indexOf('latex=false') !== -1),
6
+ enableMML3Support: true
6
7
  });