@brightspace-ui/core 3.116.6 → 3.118.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.
@@ -4759,10 +4759,6 @@
4759
4759
  "name": "d2l-form-dialog-demo",
4760
4760
  "path": "./components/form/demo/form-dialog-demo.js"
4761
4761
  },
4762
- {
4763
- "name": "d2l-form-native-demo",
4764
- "path": "./components/form/demo/form-native-demo.js"
4765
- },
4766
4762
  {
4767
4763
  "name": "d2l-form-panel-demo",
4768
4764
  "path": "./components/form/demo/form-panel-demo.js"
@@ -4778,100 +4774,6 @@
4778
4774
  }
4779
4775
  ]
4780
4776
  },
4781
- {
4782
- "name": "d2l-form-native",
4783
- "path": "./components/form/form-native.js",
4784
- "description": "A component that can be used to build sections containing interactive controls that are validated and submitted as a group.\nThese interactive controls are submitted using a native HTML form submission.",
4785
- "attributes": [
4786
- {
4787
- "name": "action",
4788
- "description": "The URL that processes the form submission.",
4789
- "type": "string",
4790
- "default": "\"\""
4791
- },
4792
- {
4793
- "name": "enctype",
4794
- "description": "If the value of the method attribute is post, enctype is the MIME type of the form submission.",
4795
- "type": "'application/x-www-form-urlencoded'|'multipart/form-data'|'text/plain'",
4796
- "default": "\"application/x-www-form-urlencoded\""
4797
- },
4798
- {
4799
- "name": "method",
4800
- "description": "The HTTP method to submit the form with.",
4801
- "type": "'get'|'post'",
4802
- "default": "\"get\""
4803
- },
4804
- {
4805
- "name": "target",
4806
- "description": "Indicates where to display the response after submitting the form.",
4807
- "type": "'_self '|'_blank'|'_parent'|'_top'",
4808
- "default": "\"_self\""
4809
- },
4810
- {
4811
- "name": "track-changes",
4812
- "description": "Indicates that the form should interrupt and warn on navigation if the user has unsaved changes on native elements.",
4813
- "type": "boolean",
4814
- "default": "false"
4815
- }
4816
- ],
4817
- "properties": [
4818
- {
4819
- "name": "action",
4820
- "attribute": "action",
4821
- "description": "The URL that processes the form submission.",
4822
- "type": "string",
4823
- "default": "\"\""
4824
- },
4825
- {
4826
- "name": "enctype",
4827
- "attribute": "enctype",
4828
- "description": "If the value of the method attribute is post, enctype is the MIME type of the form submission.",
4829
- "type": "'application/x-www-form-urlencoded'|'multipart/form-data'|'text/plain'",
4830
- "default": "\"application/x-www-form-urlencoded\""
4831
- },
4832
- {
4833
- "name": "method",
4834
- "attribute": "method",
4835
- "description": "The HTTP method to submit the form with.",
4836
- "type": "'get'|'post'",
4837
- "default": "\"get\""
4838
- },
4839
- {
4840
- "name": "target",
4841
- "attribute": "target",
4842
- "description": "Indicates where to display the response after submitting the form.",
4843
- "type": "'_self '|'_blank'|'_parent'|'_top'",
4844
- "default": "\"_self\""
4845
- },
4846
- {
4847
- "name": "trackChanges",
4848
- "attribute": "track-changes",
4849
- "description": "Indicates that the form should interrupt and warn on navigation if the user has unsaved changes on native elements.",
4850
- "type": "boolean",
4851
- "default": "false"
4852
- }
4853
- ],
4854
- "events": [
4855
- {
4856
- "name": "submit",
4857
- "description": "Dispatched when the form is submitted. Cancelling this event will prevent form submission."
4858
- },
4859
- {
4860
- "name": "formdata",
4861
- "description": "Dispatched after the entry list representing the form's data is constructed. This happens when the form is submitted just prior to submission. The form data can be obtained from the `detail`'s `formData` property."
4862
- },
4863
- {
4864
- "name": "d2l-form-dirty",
4865
- "description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
4866
- }
4867
- ],
4868
- "slots": [
4869
- {
4870
- "name": "",
4871
- "description": "The native and custom form elements that participate in validation and submission"
4872
- }
4873
- ]
4874
- },
4875
4777
  {
4876
4778
  "name": "d2l-form",
4877
4779
  "path": "./components/form/form.js",
@@ -4913,13 +4815,13 @@
4913
4815
  "name": "d2l-form-invalid",
4914
4816
  "description": "Dispatched when the form fails validation. The error map can be obtained from the `detail`'s `errors` property."
4915
4817
  },
4916
- {
4917
- "name": "d2l-form-submit",
4918
- "description": "Dispatched when the form is submitted. The form data can be obtained from the `detail`'s `formData` property."
4919
- },
4920
4818
  {
4921
4819
  "name": "d2l-form-dirty",
4922
4820
  "description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
4821
+ },
4822
+ {
4823
+ "name": "d2l-form-submit",
4824
+ "description": "Dispatched when the form is submitted. The form data can be obtained from the `detail`'s `formData` property."
4923
4825
  }
4924
4826
  ],
4925
4827
  "slots": [
@@ -5171,10 +5073,6 @@
5171
5073
  }
5172
5074
  ]
5173
5075
  },
5174
- {
5175
- "name": "d2l-test-input-radio-label-simple",
5176
- "path": "./components/inputs/demo/input-radio-label-simple-test.js"
5177
- },
5178
5076
  {
5179
5077
  "name": "d2l-test-input-radio-label",
5180
5078
  "path": "./components/inputs/demo/input-radio-label-test.js"
@@ -5220,10 +5118,6 @@
5220
5118
  }
5221
5119
  ]
5222
5120
  },
5223
- {
5224
- "name": "d2l-test-input-radio-spacer",
5225
- "path": "./components/inputs/demo/input-radio-spacer-test.js"
5226
- },
5227
5121
  {
5228
5122
  "name": "d2l-test-input-select",
5229
5123
  "path": "./components/inputs/demo/input-select-test.js",
@@ -7017,6 +6911,86 @@
7017
6911
  }
7018
6912
  ]
7019
6913
  },
6914
+ {
6915
+ "name": "d2l-input-radio-group",
6916
+ "path": "./components/inputs/input-radio-group.js",
6917
+ "description": "A group of <d2l-input-radio> components.",
6918
+ "attributes": [
6919
+ {
6920
+ "name": "label",
6921
+ "description": "REQUIRED: Label for the input",
6922
+ "type": "string"
6923
+ },
6924
+ {
6925
+ "name": "label-hidden",
6926
+ "description": "Hides the label visually",
6927
+ "type": "boolean",
6928
+ "default": "false"
6929
+ },
6930
+ {
6931
+ "name": "required",
6932
+ "description": "Indicates that a value is required",
6933
+ "type": "boolean",
6934
+ "default": "false"
6935
+ },
6936
+ {
6937
+ "name": "skeleton",
6938
+ "description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
6939
+ "type": "boolean"
6940
+ },
6941
+ {
6942
+ "name": "name",
6943
+ "description": "Name of the form control. Submitted with the form as part of a name/value pair.",
6944
+ "type": "string"
6945
+ }
6946
+ ],
6947
+ "properties": [
6948
+ {
6949
+ "name": "label",
6950
+ "attribute": "label",
6951
+ "description": "REQUIRED: Label for the input",
6952
+ "type": "string"
6953
+ },
6954
+ {
6955
+ "name": "labelHidden",
6956
+ "attribute": "label-hidden",
6957
+ "description": "Hides the label visually",
6958
+ "type": "boolean",
6959
+ "default": "false"
6960
+ },
6961
+ {
6962
+ "name": "required",
6963
+ "attribute": "required",
6964
+ "description": "Indicates that a value is required",
6965
+ "type": "boolean",
6966
+ "default": "false"
6967
+ },
6968
+ {
6969
+ "name": "skeleton",
6970
+ "attribute": "skeleton",
6971
+ "description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
6972
+ "type": "boolean"
6973
+ },
6974
+ {
6975
+ "name": "name",
6976
+ "attribute": "name",
6977
+ "description": "Name of the form control. Submitted with the form as part of a name/value pair.",
6978
+ "type": "string"
6979
+ }
6980
+ ],
6981
+ "events": [
6982
+ {
6983
+ "name": "change",
6984
+ "description": "Dispatched when the radio group's state changes"
6985
+ }
6986
+ ],
6987
+ "slots": [
6988
+ {
6989
+ "name": "",
6990
+ "description": "Radio components"
6991
+ }
6992
+ ]
6993
+ },
7020
6994
  {
7021
6995
  "name": "d2l-input-radio-spacer",
7022
6996
  "path": "./components/inputs/input-radio-spacer.js",
@@ -7028,6 +7002,108 @@
7028
7002
  }
7029
7003
  ]
7030
7004
  },
7005
+ {
7006
+ "name": "d2l-input-radio",
7007
+ "path": "./components/inputs/input-radio.js",
7008
+ "description": "A radio input within a <d2l-input-radio-group>.",
7009
+ "attributes": [
7010
+ {
7011
+ "name": "description",
7012
+ "description": "ACCESSIBILITY: Additional information communicated to screenreader users when focusing on the input",
7013
+ "type": "string"
7014
+ },
7015
+ {
7016
+ "name": "label",
7017
+ "description": "REQUIRED: Label for the input",
7018
+ "type": "string"
7019
+ },
7020
+ {
7021
+ "name": "checked",
7022
+ "description": "Checked state",
7023
+ "type": "boolean"
7024
+ },
7025
+ {
7026
+ "name": "disabled",
7027
+ "description": "Disables the input",
7028
+ "type": "boolean",
7029
+ "default": "false"
7030
+ },
7031
+ {
7032
+ "name": "supporting-hidden-when-unchecked",
7033
+ "description": "Hides the supporting slot when unchecked",
7034
+ "type": "boolean",
7035
+ "default": "false"
7036
+ },
7037
+ {
7038
+ "name": "value",
7039
+ "description": "Value of the input",
7040
+ "type": "string",
7041
+ "default": "\"on\""
7042
+ },
7043
+ {
7044
+ "name": "skeleton",
7045
+ "description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
7046
+ "type": "boolean"
7047
+ }
7048
+ ],
7049
+ "properties": [
7050
+ {
7051
+ "name": "description",
7052
+ "attribute": "description",
7053
+ "description": "ACCESSIBILITY: Additional information communicated to screenreader users when focusing on the input",
7054
+ "type": "string"
7055
+ },
7056
+ {
7057
+ "name": "label",
7058
+ "attribute": "label",
7059
+ "description": "REQUIRED: Label for the input",
7060
+ "type": "string"
7061
+ },
7062
+ {
7063
+ "name": "checked",
7064
+ "attribute": "checked",
7065
+ "description": "Checked state",
7066
+ "type": "boolean"
7067
+ },
7068
+ {
7069
+ "name": "disabled",
7070
+ "attribute": "disabled",
7071
+ "description": "Disables the input",
7072
+ "type": "boolean",
7073
+ "default": "false"
7074
+ },
7075
+ {
7076
+ "name": "supportingHiddenWhenUnchecked",
7077
+ "attribute": "supporting-hidden-when-unchecked",
7078
+ "description": "Hides the supporting slot when unchecked",
7079
+ "type": "boolean",
7080
+ "default": "false"
7081
+ },
7082
+ {
7083
+ "name": "value",
7084
+ "attribute": "value",
7085
+ "description": "Value of the input",
7086
+ "type": "string",
7087
+ "default": "\"on\""
7088
+ },
7089
+ {
7090
+ "name": "skeleton",
7091
+ "attribute": "skeleton",
7092
+ "description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
7093
+ "type": "boolean"
7094
+ }
7095
+ ],
7096
+ "slots": [
7097
+ {
7098
+ "name": "inline-help",
7099
+ "description": "Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label."
7100
+ },
7101
+ {
7102
+ "name": "supporting",
7103
+ "description": "Supporting information which will appear below and be aligned with the input."
7104
+ }
7105
+ ]
7106
+ },
7031
7107
  {
7032
7108
  "name": "d2l-input-search",
7033
7109
  "path": "./components/inputs/input-search.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.116.6",
3
+ "version": "3.118.0",
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,80 +0,0 @@
1
-
2
- import '../../button/button.js';
3
- import '../../inputs/input-date.js';
4
- import '../../inputs/input-date-time-range.js';
5
- import '../../inputs/input-text.js';
6
- import '../../validation/validation-custom.js';
7
- import '../form-native.js';
8
- import { css, html, LitElement } from 'lit';
9
- import { inputStyles } from '../../inputs/input-styles.js';
10
- import { selectStyles } from '../../inputs/input-select-styles.js';
11
-
12
- class FormNativeDemo extends LitElement {
13
-
14
- static get styles() {
15
- return [inputStyles, selectStyles, css`
16
- :first-child.d2l-form-demo-container {
17
- margin-top: 18px;
18
- }
19
- .d2l-form-demo-container {
20
- margin-bottom: 10px;
21
- }
22
- `];
23
- }
24
-
25
- render() {
26
- return html`
27
- <d2l-form-native>
28
- <div class="d2l-form-demo-container">
29
- <d2l-input-text label="Name" type="text" name="name" required minlength="4" maxlength="8"></d2l-input-text>
30
- </div>
31
- <div class="d2l-form-demo-container">
32
- <d2l-input-text label="Email" name="email" type="email"></d2l-input-text>
33
- </div>
34
- <div class="d2l-form-demo-container">
35
- <d2l-validation-custom for="password" @d2l-validation-custom-validate=${this._validatePassword} failure-text="Expected hunter2 or 12345" ></d2l-validation-custom>
36
- <d2l-input-text label="Password" id="password" name="password" required type="password"></d2l-input-text>
37
- </div>
38
- <fieldset class="d2l-form-demo-container">
39
- <legend>Choose your favorite monster</legend>
40
- <input type="radio" id="kraken" name="monster" value="kraken">
41
- <label for="kraken">Kraken</label><br />
42
- <input type="radio" id="sasquatch" name="monster" value="sasquatch">
43
- <label for="sasquatch">Sasquatch</label><br />
44
- </fieldset>
45
- <div class="d2l-form-demo-container">
46
- <label for="pet-select">Favorite Pet</label><br />
47
- <select class="d2l-input-select" name="pets" id="pet-select" required>
48
- <option value="">--Please choose an option--</option>
49
- <option value="porpoise">Porpoise</option>
50
- <option value="house hippo">House Hippo</option>
51
- <option value="spiker monkey">Spider Monkey</option>
52
- <option value="capybara">Capybara</option>
53
- </select>
54
- </div>
55
- <d2l-input-date label="Date" name="my-date" required></d2l-input-date>
56
- <div class="d2l-form-demo-container">
57
- <label for="story">Tell us your story</label>
58
- <textarea class="d2l-input" minlength="20" id="story" name="story" rows="5" cols="33">It was...</textarea>
59
- </label>
60
- </div>
61
- <d2l-input-date-time-range label="Assignment Dates" required min-value="2018-08-27T12:30:00Z" max-value="2018-09-30T12:30:00Z"></d2l-input-date-time-range>
62
- <div class="d2l-form-demo-container">
63
- <label for="file">Super Secret File</label><br />
64
- <input type="file" id="file" name="super-secret-file">
65
- </div>
66
- <button name="action" value="save" type="submit" @click=${this._onClick}>Save</button>
67
- </d2l-form-native>
68
- `;
69
- }
70
-
71
- _onClick(e) {
72
- if (this.shadowRoot) this.shadowRoot.querySelector('d2l-form-native').requestSubmit(e.target);
73
- }
74
-
75
- _validatePassword(e) {
76
- e.detail.resolve(e.detail.forElement.value === 'hunter2' || e.detail.forElement.value === '12345');
77
- }
78
-
79
- }
80
- customElements.define('d2l-form-native-demo', FormNativeDemo);
@@ -1,29 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta charset="UTF-8">
7
- <link rel="stylesheet" href="../../demo/styles.css" type="text/css">
8
- <script type="module">
9
- import '../../demo/demo-page.js';
10
- import './form-native-demo.js';
11
- </script>
12
- </head>
13
-
14
- <body unresolved>
15
-
16
- <d2l-demo-page page-title="d2l-form-native">
17
-
18
- <h2>Basic</h2>
19
- <d2l-demo-snippet>
20
- <template>
21
- <d2l-form-native-demo></d2l-form-native-demo>
22
- </template>
23
- </d2l-demo-snippet>
24
-
25
- </d2l-demo-page>
26
-
27
- </body>
28
-
29
- </html>
@@ -1,202 +0,0 @@
1
- import './form-errory-summary.js';
2
- import '../tooltip/tooltip.js';
3
- import '../link/link.js';
4
- import { isCustomFormElement, isNativeFormElement } from './form-helper.js';
5
- import { getComposedActiveElement } from '../../helpers/focus.js';
6
- import { getUniqueId } from '../../helpers/uniqueId.js';
7
- import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
8
- import { localizeFormElement } from './form-element-localize-helper.js';
9
-
10
- export const FormMixin = superclass => class extends LocalizeCoreElement(superclass) {
11
-
12
- static get properties() {
13
- return {
14
- /**
15
- * Indicates that the form should interrupt and warn on navigation if the user has unsaved changes on native elements.
16
- * @type {boolean}
17
- */
18
- trackChanges: { type: Boolean, attribute: 'track-changes', reflect: true },
19
- _errors: { type: Object },
20
- _hasErrors: { type: Boolean, attribute: '_has-errors', reflect: true },
21
- };
22
- }
23
-
24
- constructor() {
25
- super();
26
- this._onUnload = this._onUnload.bind(this);
27
- this._onNativeSubmit = this._onNativeSubmit.bind(this);
28
-
29
- this.trackChanges = false;
30
- this._errors = new Map();
31
- this._firstUpdateResolve = null;
32
- this._firstUpdatePromise = new Promise((resolve) => {
33
- this._firstUpdateResolve = resolve;
34
- });
35
- this._tooltips = new Map();
36
- this._validationCustoms = new Set();
37
-
38
- this.addEventListener('d2l-form-errors-change', this._onErrorsChange);
39
- this.addEventListener('d2l-form-element-errors-change', this._onErrorsChange);
40
- this.addEventListener('d2l-validation-custom-connected', this._validationCustomConnected);
41
- }
42
-
43
- connectedCallback() {
44
- super.connectedCallback();
45
- window.addEventListener('beforeunload', this._onUnload);
46
- }
47
-
48
- disconnectedCallback() {
49
- super.disconnectedCallback();
50
- window.removeEventListener('beforeunload', this._onUnload);
51
- }
52
-
53
- firstUpdated(changedProperties) {
54
- super.firstUpdated(changedProperties);
55
- this.addEventListener('change', this._onFormElementChange);
56
- this.addEventListener('input', this._onFormElementChange);
57
- this.addEventListener('focusout', this._onFormElementChange);
58
- this._firstUpdateResolve();
59
- }
60
-
61
- willUpdate(changedProperties) {
62
- super.willUpdate(changedProperties);
63
- if (changedProperties.has('_errors')) {
64
- this._hasErrors = this._errors.size > 0;
65
- }
66
- }
67
-
68
- // eslint-disable-next-line no-unused-vars
69
- async requestSubmit(submitter) {
70
- throw new Error('FormMixin.requestSubmit must be overridden');
71
- }
72
-
73
- async submit() {
74
- throw new Error('FormMixin.submit must be overridden');
75
- }
76
-
77
- async validate() {
78
- throw new Error('FormMixin.validate must be overridden');
79
- }
80
-
81
- _displayInvalid(ele, message) {
82
- let tooltip = this._tooltips.get(ele);
83
- if (!tooltip) {
84
- tooltip = document.createElement('d2l-tooltip');
85
- tooltip.for = ele.id;
86
- tooltip.align = 'start';
87
- tooltip.state = 'error';
88
- ele.parentNode.append(tooltip);
89
- this._tooltips.set(ele, tooltip);
90
-
91
- tooltip.appendChild(document.createTextNode(message));
92
- } else if (tooltip.innerText.trim() !== message.trim()) {
93
- tooltip.textContent = '';
94
- tooltip.appendChild(document.createTextNode(message));
95
- tooltip.updatePosition();
96
- }
97
- ele.setAttribute('aria-invalid', 'true');
98
- }
99
-
100
- _displayValid(ele) {
101
- const tooltip = this._tooltips.get(ele);
102
- if (tooltip) {
103
- this._tooltips.delete(ele);
104
- tooltip.remove();
105
- }
106
- ele.setAttribute('aria-invalid', 'false');
107
- }
108
-
109
- _onErrorsChange(e) {
110
- if (e.target === this) {
111
- return;
112
- }
113
- e.stopPropagation();
114
- this._updateErrors(e.target, e.detail.errors);
115
- }
116
-
117
- async _onFormElementChange(e) {
118
- const ele = e.target;
119
-
120
- if ((isNativeFormElement(ele) || isCustomFormElement(ele)) && e.type !== 'focusout') {
121
- this._dirty = true;
122
- /** Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not. */
123
- this.dispatchEvent(new CustomEvent('d2l-form-dirty'));
124
- }
125
-
126
- if (!isNativeFormElement(ele)) {
127
- return;
128
- }
129
- e.stopPropagation();
130
- const errors = await this._validateFormElement(ele, e.type === 'focusout');
131
- this._updateErrors(ele, errors);
132
- }
133
-
134
- _onNativeSubmit(e) {
135
- e.preventDefault();
136
- e.stopPropagation();
137
- const submitter = e.submitter || getComposedActiveElement();
138
- this.requestSubmit(submitter);
139
- }
140
-
141
- _onUnload(e) {
142
- if (this.trackChanges && this._dirty) {
143
- e.preventDefault();
144
- e.returnValue = false;
145
- }
146
- }
147
-
148
- _updateErrors(ele, errors) {
149
-
150
- if (!this._errors.has(ele)) {
151
- return false;
152
- }
153
- if (Array.from(errors).length === 0) {
154
- this._errors.delete(ele);
155
- } else {
156
- this._errors.set(ele, errors);
157
- }
158
- const detail = { bubbles: true, composed: true, detail: { errors: this._errors } };
159
- /** @ignore */
160
- this.dispatchEvent(new CustomEvent('d2l-form-errors-change', detail));
161
- this.requestUpdate('_errors');
162
- return true;
163
- }
164
-
165
- async _validateFormElement(ele, showNewErrors) {
166
- // if validation occurs before we've rendered,
167
- // localization may not have loaded yet
168
- await this._firstUpdatePromise;
169
- ele.id = ele.id || getUniqueId();
170
- if (isCustomFormElement(ele)) {
171
- return ele.validate(showNewErrors);
172
- } else if (isNativeFormElement(ele)) {
173
- const customs = [...this._validationCustoms].filter(custom => custom.forElement === ele);
174
- const results = await Promise.all(customs.map(custom => custom.validate()));
175
- const errors = customs.map(custom => custom.failureText).filter((_, i) => !results[i]);
176
- if (!ele.checkValidity()) {
177
- const validationMessage = localizeFormElement(this.localize.bind(this), ele);
178
- errors.unshift(validationMessage);
179
- }
180
- if (errors.length > 0 && (showNewErrors || ele.getAttribute('aria-invalid') === 'true')) {
181
- this._displayInvalid(ele, errors[0]);
182
- } else {
183
- this._displayValid(ele);
184
- }
185
- return errors;
186
- }
187
- return [];
188
- }
189
-
190
- _validationCustomConnected(e) {
191
- e.stopPropagation();
192
- const custom = e.composedPath()[0];
193
- this._validationCustoms.add(custom);
194
-
195
- const onDisconnect = () => {
196
- custom.removeEventListener('d2l-validation-custom-disconnected', onDisconnect);
197
- this._validationCustoms.delete(custom);
198
- };
199
- custom.addEventListener('d2l-validation-custom-disconnected', onDisconnect);
200
- }
201
-
202
- };