wj-elements 0.1.183 → 0.1.185
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/dist/form-associated-element-CaIxmEod.js +242 -0
- package/dist/form-associated-element-CaIxmEod.js.map +1 -0
- package/dist/light.css +11 -3
- package/dist/packages/internals/form-associated-element.d.ts +138 -0
- package/dist/packages/wje-checkbox/checkbox.element.d.ts +17 -90
- package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +1 -1
- package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +1 -1
- package/dist/packages/wje-input/input.element.d.ts +3 -106
- package/dist/packages/wje-options/options.element.d.ts +23 -19
- package/dist/packages/wje-popup/popup.element.d.ts +10 -0
- package/dist/packages/wje-radio/radio.element.d.ts +12 -1
- package/dist/packages/wje-radio-group/radio-group.element.d.ts +8 -90
- package/dist/packages/wje-select/select.d.ts +1 -1
- package/dist/packages/wje-select/select.element.d.ts +56 -194
- package/dist/packages/wje-textarea/textarea.element.d.ts +3 -110
- package/dist/packages/wje-tree/tree.element.d.ts +1 -0
- package/dist/{popup.element-Di4nHYij.js → popup.element-CVbbnTWI.js} +53 -24
- package/dist/{popup.element-Di4nHYij.js.map → popup.element-CVbbnTWI.js.map} +1 -1
- package/dist/wje-checkbox.js +59 -403
- package/dist/wje-checkbox.js.map +1 -1
- package/dist/wje-dropdown.js +1 -1
- package/dist/wje-icon-picker.js +2 -2
- package/dist/wje-icon-picker.js.map +1 -1
- package/dist/wje-infinite-scroll.js +7 -2
- package/dist/wje-infinite-scroll.js.map +1 -1
- package/dist/wje-input.js +10 -213
- package/dist/wje-input.js.map +1 -1
- package/dist/wje-master.js +1 -1
- package/dist/wje-option.js.map +1 -1
- package/dist/wje-options.js +56 -45
- package/dist/wje-options.js.map +1 -1
- package/dist/wje-popup.js +1 -1
- package/dist/wje-radio-group.js +82 -148
- package/dist/wje-radio-group.js.map +1 -1
- package/dist/wje-radio.js +36 -8
- package/dist/wje-radio.js.map +1 -1
- package/dist/wje-select.js +186 -303
- package/dist/wje-select.js.map +1 -1
- package/dist/wje-textarea.js +16 -210
- package/dist/wje-textarea.js.map +1 -1
- package/dist/wje-tooltip.js +1 -1
- package/dist/wje-tree-item.js +11 -97
- package/dist/wje-tree-item.js.map +1 -1
- package/dist/wje-tree.js +13 -1
- package/dist/wje-tree.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormAssociatedElement } from '../internals/form-associated-element.js';
|
|
2
2
|
/**
|
|
3
3
|
* @summary This class represents a custom input element. It extends the WJElement class and provides additional functionality for handling input.
|
|
4
4
|
* @documentation https://elements.webjet.sk/components/input
|
|
5
5
|
* @status stable
|
|
6
|
-
* @augments
|
|
6
|
+
* @augments {FormAssociatedElement}
|
|
7
7
|
* @csspart native - The native part.
|
|
8
8
|
* @csspart wrapper - The wrapper part.
|
|
9
9
|
* @csspart input - The input part.
|
|
@@ -25,7 +25,7 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
25
25
|
* // @fires wje-input:input - Dispatched when the input value changes.
|
|
26
26
|
* // @fires wje-input:clear - Dispatched when the input is cleared.
|
|
27
27
|
*/
|
|
28
|
-
export default class Input extends
|
|
28
|
+
export default class Input extends FormAssociatedElement {
|
|
29
29
|
/**
|
|
30
30
|
* Getter for the cssStyleSheet attribute.
|
|
31
31
|
* @returns {CSSStyleSheet} The CSS style sheet of the input element.
|
|
@@ -36,26 +36,7 @@ export default class Input extends WJElement {
|
|
|
36
36
|
* @returns {Array} The attributes to observe for changes.
|
|
37
37
|
*/
|
|
38
38
|
static get observedAttributes(): any[];
|
|
39
|
-
/**
|
|
40
|
-
* Whether the input is associated with a form.
|
|
41
|
-
* @type {boolean}
|
|
42
|
-
*/
|
|
43
|
-
static formAssociated: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Sets or removes the 'invalid' attribute on an element based on the provided value.
|
|
46
|
-
* @param {boolean} value If true, the 'invalid' attribute is set. If false, the 'invalid' attribute is removed.
|
|
47
|
-
*/
|
|
48
|
-
set invalid(value: boolean);
|
|
49
|
-
/**
|
|
50
|
-
* Gets the value of the 'invalid' attribute.
|
|
51
|
-
* Determines whether the 'invalid' attribute is present on the element.
|
|
52
|
-
* @returns {boolean} True if the 'invalid' attribute is present, otherwise false.
|
|
53
|
-
*/
|
|
54
|
-
get invalid(): boolean;
|
|
55
39
|
pristine: boolean;
|
|
56
|
-
internals: ElementInternals;
|
|
57
|
-
observer: MutationObserver;
|
|
58
|
-
observeFunction: (mutations: any) => void;
|
|
59
40
|
/**
|
|
60
41
|
* Setter for the value attribute.
|
|
61
42
|
* @param {string} value The value to set.
|
|
@@ -103,31 +84,6 @@ export default class Input extends WJElement {
|
|
|
103
84
|
* @returns {boolean} Whether the attribute is present.
|
|
104
85
|
*/
|
|
105
86
|
get validateOnChange(): boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Getter for the form attribute.
|
|
108
|
-
* @returns {HTMLFormElement} The form the input is associated with.
|
|
109
|
-
*/
|
|
110
|
-
get form(): HTMLFormElement;
|
|
111
|
-
/**
|
|
112
|
-
* Getter for the name attribute.
|
|
113
|
-
* @returns {string} The name of the input element.
|
|
114
|
-
*/
|
|
115
|
-
get name(): string;
|
|
116
|
-
/**
|
|
117
|
-
* Getter for the validity attribute.
|
|
118
|
-
* @returns {ValidityState} The validity state of the input.
|
|
119
|
-
*/
|
|
120
|
-
get validity(): ValidityState;
|
|
121
|
-
/**
|
|
122
|
-
* Getter for the validationMessage attribute.
|
|
123
|
-
* @returns {string} The validation message of the input element.
|
|
124
|
-
*/
|
|
125
|
-
get validationMessage(): string;
|
|
126
|
-
/**
|
|
127
|
-
* Getter for the willValidate attribute.
|
|
128
|
-
* @returns {boolean} Whether the input will be validated.
|
|
129
|
-
*/
|
|
130
|
-
get willValidate(): boolean;
|
|
131
87
|
/**
|
|
132
88
|
* @summary Setter for the defaultValue attribute.
|
|
133
89
|
* This method sets the 'value' attribute of the custom input element to the provided value.
|
|
@@ -179,7 +135,6 @@ export default class Input extends WJElement {
|
|
|
179
135
|
* @returns {string} The value of the 'variant' attribute or 'default' if not set.
|
|
180
136
|
*/
|
|
181
137
|
get variant(): string;
|
|
182
|
-
beforeDraw(): void;
|
|
183
138
|
/**
|
|
184
139
|
* Draws the input element.
|
|
185
140
|
* @returns {DocumentFragment} The drawn input.
|
|
@@ -194,29 +149,6 @@ export default class Input extends WJElement {
|
|
|
194
149
|
* Runs after the input is drawn to the DOM.
|
|
195
150
|
*/
|
|
196
151
|
afterDraw(): void;
|
|
197
|
-
/**
|
|
198
|
-
* @summary Displays the validation message for the input.
|
|
199
|
-
* If the input has a slot named 'error', it sets the text content of the element with attribute 'error-message' inside the slot to the validation message.
|
|
200
|
-
* If the input does not have an 'error' slot, it sets the text content of the errorMessage property to the validation message.
|
|
201
|
-
*/
|
|
202
|
-
showInvalidMessage(): void;
|
|
203
|
-
/**
|
|
204
|
-
* @summary Validates the input.
|
|
205
|
-
* This method checks the validity state of the input. If the input is not valid, it iterates over the validity state object.
|
|
206
|
-
* For each invalid state, it constructs an attribute name and checks if the input has this attribute.
|
|
207
|
-
* If the input has the attribute, it sets the validation error to the state and the error message to the attribute value.
|
|
208
|
-
* If the input does not have the attribute, it sets the error message to the default validation message of the input.
|
|
209
|
-
* It then sets the validity in the form internals to an object with the validation error as key and true as value, and the error message.
|
|
210
|
-
* If the input is valid, it sets the validity in the form internals to an empty object.
|
|
211
|
-
*/
|
|
212
|
-
validateInput(): void;
|
|
213
|
-
validationError: string;
|
|
214
|
-
/**
|
|
215
|
-
* Checks and updates the validation state of the component based on its current properties.
|
|
216
|
-
* If the component is invalid and a custom error display is enabled, it dispatches an 'invalid' event.
|
|
217
|
-
* @returns {void} This method does not return a value.
|
|
218
|
-
*/
|
|
219
|
-
propagateValidation(): void;
|
|
220
152
|
/**
|
|
221
153
|
* Checks whether the input has a slot.
|
|
222
154
|
* @param {HTMLElement} el The element to check.
|
|
@@ -224,39 +156,4 @@ export default class Input extends WJElement {
|
|
|
224
156
|
* @returns {boolean} Whether the input has the slot.
|
|
225
157
|
*/
|
|
226
158
|
hasSlot(el: HTMLElement, slotName?: string): boolean;
|
|
227
|
-
/**
|
|
228
|
-
* @summary Callback function that is called when the custom element is associated with a form.
|
|
229
|
-
* This function adds an event listener to the form's submit event, which validates the input and propagates the validation.
|
|
230
|
-
* @param {HTMLFormElement} form The form the custom element is associated with.
|
|
231
|
-
*/
|
|
232
|
-
formAssociatedCallback(form: HTMLFormElement): void;
|
|
233
|
-
/**
|
|
234
|
-
* The formResetCallback method is a built-in lifecycle callback that gets called when a form gets reset.
|
|
235
|
-
* This method is responsible for resetting the value of the custom input element to its default value.
|
|
236
|
-
* It also resets the form value and validity state in the form internals.
|
|
237
|
-
* @function
|
|
238
|
-
*/
|
|
239
|
-
formResetCallback(): void;
|
|
240
|
-
/**
|
|
241
|
-
* The formStateRestoreCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is restored.
|
|
242
|
-
* This method is responsible for restoring the value of the custom input element to its saved state.
|
|
243
|
-
* It also restores the form value and validity state in the form internals to their saved states.
|
|
244
|
-
* @param {object} state The saved state of the custom input element.
|
|
245
|
-
* @function
|
|
246
|
-
*/
|
|
247
|
-
formStateRestoreCallback(state: object): void;
|
|
248
|
-
/**
|
|
249
|
-
* The formStateSaveCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is saved.
|
|
250
|
-
* This method is responsible for saving the value of the custom input element.
|
|
251
|
-
* @returns {object} The saved state of the custom input element.
|
|
252
|
-
* @function
|
|
253
|
-
*/
|
|
254
|
-
formStateSaveCallback(): object;
|
|
255
|
-
/**
|
|
256
|
-
* The formDisabledCallback method is a built-in lifecycle callback that gets called when the disabled state of a form-associated custom element changes.
|
|
257
|
-
* This method is not implemented yet.
|
|
258
|
-
* @param {boolean} disabled The new disabled state of the custom input element.
|
|
259
|
-
* @function
|
|
260
|
-
*/
|
|
261
|
-
formDisabledCallback(disabled: boolean): void;
|
|
262
159
|
}
|
|
@@ -3,20 +3,23 @@ import { default as Option } from '../wje-option/option.js';
|
|
|
3
3
|
import { default as InfiniteScroll } from '../wje-infinite-scroll/infinite-scroll.js';
|
|
4
4
|
import { default as List } from '../wje-list/list.js';
|
|
5
5
|
/**
|
|
6
|
-
* `Options` is a custom web component that represents a set of options.
|
|
7
|
-
* It extends from `WJElement`.
|
|
6
|
+
* `Options` is a custom web component that represents a set of options. It extends from `WJElement`.
|
|
8
7
|
* @summary This element represents a set of options.
|
|
9
8
|
* @documentation https://elements.webjet.sk/components/options
|
|
10
9
|
* @status stable
|
|
11
|
-
* @augments {WJElement}
|
|
12
|
-
* // @fires wje-options:load - Event fired when the options are loaded.
|
|
13
10
|
* @tag wje-options
|
|
14
11
|
*/
|
|
15
12
|
export default class Options extends WJElement {
|
|
16
13
|
/**
|
|
17
|
-
* Returns the
|
|
14
|
+
* Returns the CSS styles for the component.
|
|
18
15
|
* @static
|
|
19
|
-
* @returns {
|
|
16
|
+
* @returns {CSSStyleSheet} The CSS styles for the component.
|
|
17
|
+
*/
|
|
18
|
+
static get cssStyleSheet(): CSSStyleSheet;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves an array of attributes that should be observed for changes.
|
|
21
|
+
* The method returns a list of attribute names that the browser will monitor for changes.
|
|
22
|
+
* @returns {Array<string>} An array of attribute names to observe.
|
|
20
23
|
*/
|
|
21
24
|
static get observedAttributes(): Array<string>;
|
|
22
25
|
dependencies: {
|
|
@@ -156,6 +159,10 @@ export default class Options extends WJElement {
|
|
|
156
159
|
* @type {Array}
|
|
157
160
|
*/
|
|
158
161
|
get loadedOptions(): any[];
|
|
162
|
+
/**
|
|
163
|
+
* Sets the elements that are preloaded and ready to be drawn.
|
|
164
|
+
* @param {Array|object} elements The elements to be set for preloading. This can be an array or a specific object containing drawable elements.
|
|
165
|
+
*/
|
|
159
166
|
private set drawPreloadedElements(elements);
|
|
160
167
|
/**
|
|
161
168
|
* Array of preloaded elements.
|
|
@@ -163,11 +170,6 @@ export default class Options extends WJElement {
|
|
|
163
170
|
* @private
|
|
164
171
|
*/
|
|
165
172
|
private get drawPreloadedElements();
|
|
166
|
-
/**
|
|
167
|
-
* Prepares the component before drawing.
|
|
168
|
-
* Fetches the pages and creates the options elements.
|
|
169
|
-
*/
|
|
170
|
-
afterDraw(): void;
|
|
171
173
|
/**
|
|
172
174
|
* Draws the component.
|
|
173
175
|
* @returns {DocumentFragment}
|
|
@@ -175,18 +177,20 @@ export default class Options extends WJElement {
|
|
|
175
177
|
draw(): DocumentFragment;
|
|
176
178
|
infiniteScroll: HTMLElement;
|
|
177
179
|
response: any;
|
|
180
|
+
afterDraw(): void;
|
|
181
|
+
dispatchOptionsLoadEvent: (e: any) => void;
|
|
178
182
|
/**
|
|
179
|
-
* Processes the
|
|
180
|
-
* @param {
|
|
181
|
-
* @returns {
|
|
183
|
+
* Processes the provided data based on the optional array path set in the instance.
|
|
184
|
+
* @param {object} data The input data to be processed.
|
|
185
|
+
* @returns {Array} The resolved options array from the data or an empty array if no match is found.
|
|
182
186
|
*/
|
|
183
|
-
processData(data:
|
|
187
|
+
processData(data: object): any[];
|
|
184
188
|
/**
|
|
185
|
-
* Filters out
|
|
186
|
-
* @param {object
|
|
187
|
-
* @returns {object} The filtered response.
|
|
189
|
+
* Filters out options from the response object that have already been drawn, based on the specified option array path.
|
|
190
|
+
* @param {object} response The response object containing data to process.
|
|
191
|
+
* @returns {object} The filtered response object with drawn options removed.
|
|
188
192
|
*/
|
|
189
|
-
filterOutDrawnOptions(response: object
|
|
193
|
+
filterOutDrawnOptions(response: object): object;
|
|
190
194
|
/**
|
|
191
195
|
* Recursively updates the object based on the provided path to the property.
|
|
192
196
|
* @param {object | Array | null} object
|
|
@@ -21,7 +21,15 @@ export default class Popup extends WJElement {
|
|
|
21
21
|
* @returns {CSSStyleSheet} The CSS styles for the component.
|
|
22
22
|
*/
|
|
23
23
|
static get cssStyleSheet(): CSSStyleSheet;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the list of attributes to observe for changes.
|
|
26
|
+
* @static
|
|
27
|
+
* @returns {Array<string>}
|
|
28
|
+
*/
|
|
29
|
+
static get observedAttributes(): Array<string>;
|
|
24
30
|
_manual: boolean;
|
|
31
|
+
set loader(value: boolean);
|
|
32
|
+
get loader(): boolean;
|
|
25
33
|
/**
|
|
26
34
|
* Sets the manual property of the popup.
|
|
27
35
|
* @param {boolean} value The value to set.
|
|
@@ -41,6 +49,7 @@ export default class Popup extends WJElement {
|
|
|
41
49
|
slotAnchor: HTMLSlotElement;
|
|
42
50
|
slotArrow: HTMLSlotElement;
|
|
43
51
|
native: HTMLDivElement;
|
|
52
|
+
loaderEl: HTMLDivElement;
|
|
44
53
|
/**
|
|
45
54
|
* After Draws the component.
|
|
46
55
|
*/
|
|
@@ -81,4 +90,5 @@ export default class Popup extends WJElement {
|
|
|
81
90
|
* Removes the active attribute when the popup is hidden.
|
|
82
91
|
*/
|
|
83
92
|
handleHide: () => void;
|
|
93
|
+
markContentReady(): void;
|
|
84
94
|
}
|
|
@@ -24,7 +24,8 @@ export default class Radio extends WJElement {
|
|
|
24
24
|
* @returns {Array<string>}
|
|
25
25
|
*/
|
|
26
26
|
static get observedAttributes(): Array<string>;
|
|
27
|
-
|
|
27
|
+
set value(value: string);
|
|
28
|
+
get value(): string;
|
|
28
29
|
/**
|
|
29
30
|
* Sets the name of the radio button.
|
|
30
31
|
* @param value
|
|
@@ -35,6 +36,16 @@ export default class Radio extends WJElement {
|
|
|
35
36
|
* @returns {boolean}
|
|
36
37
|
*/
|
|
37
38
|
get checked(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Set checked attribute.
|
|
41
|
+
* @param {boolean} value true if the toggle is checked, false otherwise
|
|
42
|
+
*/
|
|
43
|
+
set disabled(value: boolean);
|
|
44
|
+
/**
|
|
45
|
+
* Get disabled attribute value.
|
|
46
|
+
* @returns {boolean} true if the toggle is disabled, false otherwise
|
|
47
|
+
*/
|
|
48
|
+
get disabled(): boolean;
|
|
38
49
|
/**
|
|
39
50
|
* Draws the radio button.
|
|
40
51
|
* @returns {DocumentFragment}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormAssociatedElement } from '../internals/form-associated-element.js';
|
|
2
2
|
import { default as Radio } from '../wje-radio/radio.js';
|
|
3
3
|
/**
|
|
4
4
|
* `RadioGroup` is a custom web component that represents a group of radio buttons.
|
|
5
5
|
* @summary This element represents a group of radio buttons.
|
|
6
6
|
* @documentation https://elements.webjet.sk/components/radio-group
|
|
7
7
|
* @status stable
|
|
8
|
-
* @augments {
|
|
8
|
+
* @augments {FormAssociatedElement}
|
|
9
9
|
* @slot - The default slot for the radio group.
|
|
10
10
|
* @tag wje-radio-group
|
|
11
11
|
*/
|
|
12
|
-
export default class RadioGroup extends
|
|
12
|
+
export default class RadioGroup extends FormAssociatedElement {
|
|
13
13
|
/**
|
|
14
14
|
* Returns the CSS styles for the component.
|
|
15
15
|
* @static
|
|
16
16
|
* @returns {CSSStyleSheet}
|
|
17
17
|
*/
|
|
18
18
|
static get cssStyleSheet(): CSSStyleSheet;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* @type {boolean}
|
|
22
|
-
*/
|
|
23
|
-
static formAssociated: boolean;
|
|
24
|
-
internals: ElementInternals;
|
|
19
|
+
static get observedAttributes(): any[];
|
|
20
|
+
pristine: boolean;
|
|
25
21
|
/**
|
|
26
22
|
* Setter for the value attribute.
|
|
27
23
|
* @param {string} value The value to set.
|
|
@@ -32,56 +28,12 @@ export default class RadioGroup extends WJElement {
|
|
|
32
28
|
* @returns {string} The value of the attribute.
|
|
33
29
|
*/
|
|
34
30
|
get value(): string;
|
|
35
|
-
/**
|
|
36
|
-
* Getter for the form attribute.
|
|
37
|
-
* @returns {HTMLFormElement} The form the input is associated with.
|
|
38
|
-
*/
|
|
39
|
-
get form(): HTMLFormElement;
|
|
40
|
-
/**
|
|
41
|
-
* Getter for the name attribute.
|
|
42
|
-
* @returns {string} The name of the input.
|
|
43
|
-
*/
|
|
44
|
-
get name(): string;
|
|
45
|
-
/**
|
|
46
|
-
* Getter for the type attribute.
|
|
47
|
-
* @returns {string} The type of the input.
|
|
48
|
-
*/
|
|
49
|
-
get type(): string;
|
|
50
|
-
/**
|
|
51
|
-
* Getter for the validity attribute.
|
|
52
|
-
* @returns {ValidityState} The validity state of the input.
|
|
53
|
-
*/
|
|
54
|
-
get validity(): ValidityState;
|
|
55
|
-
/**
|
|
56
|
-
* Getter for the validationMessage attribute.
|
|
57
|
-
* @returns {string} The validation message of the input.
|
|
58
|
-
*/
|
|
59
|
-
get validationMessage(): string;
|
|
60
|
-
/**
|
|
61
|
-
* Getter for the willValidate attribute.
|
|
62
|
-
* @returns {boolean} Whether the input will be validated.
|
|
63
|
-
*/
|
|
64
|
-
get willValidate(): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* @summary Setter for the defaultValue attribute.
|
|
67
|
-
* This method sets the 'value' attribute of the custom input element to the provided value.
|
|
68
|
-
* The 'value' attribute represents the default value of the input element.
|
|
69
|
-
* @param {string} value The value to set as the default value.
|
|
70
|
-
*/
|
|
71
|
-
set defaultValue(value: string);
|
|
72
|
-
/**
|
|
73
|
-
* @summary Getter for the defaultValue attribute.
|
|
74
|
-
* This method retrieves the 'value' attribute of the custom input element.
|
|
75
|
-
* The 'value' attribute represents the default value of the input element.
|
|
76
|
-
* If the 'value' attribute is not set, it returns an empty string.
|
|
77
|
-
* @returns {string} The default value of the input element.
|
|
78
|
-
*/
|
|
79
|
-
get defaultValue(): string;
|
|
80
31
|
/**
|
|
81
32
|
* Draws the component for the radio group.
|
|
82
33
|
* @returns {DocumentFragment}
|
|
83
34
|
*/
|
|
84
35
|
draw(): DocumentFragment;
|
|
36
|
+
input: HTMLInputElement;
|
|
85
37
|
/**
|
|
86
38
|
* Adds event listeners after the component is drawn. Handles the selection of radio buttons.
|
|
87
39
|
*/
|
|
@@ -99,45 +51,11 @@ export default class RadioGroup extends WJElement {
|
|
|
99
51
|
/**
|
|
100
52
|
* Sets the given radio button to checked.
|
|
101
53
|
*/
|
|
102
|
-
checkRadio(
|
|
54
|
+
checkRadio(radio: any): boolean;
|
|
103
55
|
/**
|
|
104
56
|
* Retrieves all direct child elements of the current element.
|
|
105
57
|
* @returns {HTMLElement[]} An array of child elements.
|
|
106
58
|
*/
|
|
107
59
|
getAllElements(): HTMLElement[];
|
|
108
|
-
|
|
109
|
-
* @summary Callback function that is called when the custom element is associated with a form.
|
|
110
|
-
* This function adds an event listener to the form's submit event, which validates the input and propagates the validation.
|
|
111
|
-
* @param {HTMLFormElement} form The form the custom element is associated with.
|
|
112
|
-
*/
|
|
113
|
-
formAssociatedCallback(form: HTMLFormElement): void;
|
|
114
|
-
/**
|
|
115
|
-
* The formResetCallback method is a built-in lifecycle callback that gets called when a form gets reset.
|
|
116
|
-
* This method is responsible for resetting the value of the custom input element to its default value.
|
|
117
|
-
* It also resets the form value and validity state in the form internals.
|
|
118
|
-
* @function
|
|
119
|
-
*/
|
|
120
|
-
formResetCallback(): void;
|
|
121
|
-
/**
|
|
122
|
-
* The formStateRestoreCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is restored.
|
|
123
|
-
* This method is responsible for restoring the value of the custom input element to its saved state.
|
|
124
|
-
* It also restores the form value and validity state in the form internals to their saved states.
|
|
125
|
-
* @param {object} state The saved state of the custom input element.
|
|
126
|
-
* @function
|
|
127
|
-
*/
|
|
128
|
-
formStateRestoreCallback(state: object): void;
|
|
129
|
-
/**
|
|
130
|
-
* The formStateSaveCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is saved.
|
|
131
|
-
* This method is responsible for saving the value of the custom input element.
|
|
132
|
-
* @returns {object} The saved state of the custom input element.
|
|
133
|
-
* @function
|
|
134
|
-
*/
|
|
135
|
-
formStateSaveCallback(): object;
|
|
136
|
-
/**
|
|
137
|
-
* The formDisabledCallback method is a built-in lifecycle callback that gets called when the disabled state of a form-associated custom element changes.
|
|
138
|
-
* This method is not implemented yet.
|
|
139
|
-
* @param {boolean} disabled The new disabled state of the custom input element.
|
|
140
|
-
* @function
|
|
141
|
-
*/
|
|
142
|
-
formDisabledCallback(disabled: boolean): void;
|
|
60
|
+
#private;
|
|
143
61
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Select } from './select.element.js';
|
|
2
2
|
export default Select;
|