@fluentui/web-components 3.0.0-beta.90 → 3.0.0-beta.92
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/CHANGELOG.md +20 -2
- package/dist/dts/dropdown/dropdown.base.d.ts +39 -1
- package/dist/dts/tree-item/tree-item.base.d.ts +0 -18
- package/dist/esm/dropdown/dropdown.base.js +58 -4
- package/dist/esm/dropdown/dropdown.base.js.map +1 -1
- package/dist/esm/tree/tree.base.js +5 -9
- package/dist/esm/tree/tree.base.js.map +1 -1
- package/dist/esm/tree/tree.template.js +1 -1
- package/dist/esm/tree/tree.template.js.map +1 -1
- package/dist/esm/tree-item/tree-item.base.js +2 -31
- package/dist/esm/tree-item/tree-item.base.js.map +1 -1
- package/dist/esm/tree-item/tree-item.template.js +1 -3
- package/dist/esm/tree-item/tree-item.template.js.map +1 -1
- package/dist/web-components.d.ts +39 -19
- package/dist/web-components.js +65 -45
- package/dist/web-components.min.js +53 -53
- package/package.json +1 -1
- package/dist/dts/form-associated/form-associated.d.ts +0 -104
- package/dist/dts/slider/slider.form-associated.d.ts +0 -14
- package/dist/dts/switch/switch.form-associated.d.ts +0 -14
- package/dist/esm/form-associated/form-associated.js +0 -456
- package/dist/esm/form-associated/form-associated.js.map +0 -1
- package/dist/esm/slider/slider.form-associated.js +0 -14
- package/dist/esm/slider/slider.form-associated.js.map +0 -1
- package/dist/esm/switch/switch.form-associated.js +0 -14
- package/dist/esm/switch/switch.form-associated.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { Constructable, FASTElement } from '@microsoft/fast-element';
|
|
2
|
-
/**
|
|
3
|
-
* @alpha
|
|
4
|
-
*/
|
|
5
|
-
export declare const supportsElementInternals: boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Base class for providing Custom Element Form Association.
|
|
8
|
-
*
|
|
9
|
-
* @beta
|
|
10
|
-
*/
|
|
11
|
-
export interface FormAssociated extends Omit<ElementInternals, 'labels'> {
|
|
12
|
-
dirtyValue: boolean;
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
readonly elementInternals: ElementInternals | null;
|
|
15
|
-
readonly formAssociated: boolean;
|
|
16
|
-
initialValue: string;
|
|
17
|
-
readonly labels: ReadonlyArray<Node[]>;
|
|
18
|
-
name: string;
|
|
19
|
-
required: boolean;
|
|
20
|
-
value: string;
|
|
21
|
-
currentValue: string;
|
|
22
|
-
attachProxy(): void;
|
|
23
|
-
detachProxy(): void;
|
|
24
|
-
disabledChanged?(previous: boolean, next: boolean): void;
|
|
25
|
-
formDisabledCallback?(disabled: boolean): void;
|
|
26
|
-
formResetCallback(): void;
|
|
27
|
-
initialValueChanged?(previous: string, next: string): void;
|
|
28
|
-
nameChanged?(previous: string, next: string): void;
|
|
29
|
-
requiredChanged(prev: boolean, next: boolean): void;
|
|
30
|
-
stopPropagation(e: Event): void;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the validity of the custom element. By default this uses the proxy element to determine
|
|
33
|
-
* validity, but this can be extended or replaced in implementation.
|
|
34
|
-
*
|
|
35
|
-
* @param anchor - The anchor element to provide to ElementInternals.setValidity for surfacing the browser's constraint validation UI
|
|
36
|
-
*/
|
|
37
|
-
validate(anchor?: HTMLElement): void;
|
|
38
|
-
valueChanged(previous: string, next: string): void;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Base class for providing Custom Element Form Association with checkable features.
|
|
42
|
-
*
|
|
43
|
-
* @beta
|
|
44
|
-
*/
|
|
45
|
-
export interface CheckableFormAssociated extends FormAssociated {
|
|
46
|
-
currentChecked: boolean;
|
|
47
|
-
dirtyChecked: boolean;
|
|
48
|
-
checkedAttribute: boolean;
|
|
49
|
-
defaultChecked: boolean;
|
|
50
|
-
defaultCheckedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
51
|
-
checked: boolean;
|
|
52
|
-
checkedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Avaiable types for the `proxy` property.
|
|
56
|
-
* @beta
|
|
57
|
-
*/
|
|
58
|
-
export type ProxyElement = HTMLSelectElement | HTMLTextAreaElement | HTMLInputElement;
|
|
59
|
-
/**
|
|
60
|
-
* Identifies a class as having a proxy element and optional submethods related
|
|
61
|
-
* to the proxy element.
|
|
62
|
-
*
|
|
63
|
-
* @beta
|
|
64
|
-
*/
|
|
65
|
-
export interface FormAssociatedProxy {
|
|
66
|
-
proxy: ProxyElement;
|
|
67
|
-
disabledChanged?(previous: boolean, next: boolean): void;
|
|
68
|
-
formDisabledCallback?(disabled: boolean): void;
|
|
69
|
-
formResetCallback?(): void;
|
|
70
|
-
initialValueChanged?(previous: string, next: string): void;
|
|
71
|
-
valueChanged?(previous: string, next: string): void;
|
|
72
|
-
nameChanged?(previous: string, next: string): void;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Combined type to describe a Form-associated element.
|
|
76
|
-
*
|
|
77
|
-
* @beta
|
|
78
|
-
*/
|
|
79
|
-
export type FormAssociatedElement = FormAssociated & FASTElement & HTMLElement & FormAssociatedProxy;
|
|
80
|
-
/**
|
|
81
|
-
* Combined type to describe a checkable Form-associated element.
|
|
82
|
-
*
|
|
83
|
-
* @beta
|
|
84
|
-
*/
|
|
85
|
-
export type CheckableFormAssociatedElement = FormAssociatedElement & CheckableFormAssociated & {
|
|
86
|
-
proxy: HTMLInputElement;
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Combined type to describe a Constructable Form-Associated type.
|
|
90
|
-
*
|
|
91
|
-
* @beta
|
|
92
|
-
*/
|
|
93
|
-
export type ConstructableFormAssociated = Constructable<HTMLElement & FASTElement>;
|
|
94
|
-
/**
|
|
95
|
-
* Base function for providing Custom Element Form Association.
|
|
96
|
-
*
|
|
97
|
-
* @beta
|
|
98
|
-
*/
|
|
99
|
-
export declare function FormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T;
|
|
100
|
-
/**
|
|
101
|
-
* Creates a checkable form associated component.
|
|
102
|
-
* @beta
|
|
103
|
-
*/
|
|
104
|
-
export declare function CheckableFormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
-
import { FormAssociated } from '../form-associated/form-associated.js';
|
|
3
|
-
declare class _Slider extends FASTElement {
|
|
4
|
-
}
|
|
5
|
-
interface _Slider extends FormAssociated {
|
|
6
|
-
}
|
|
7
|
-
declare const FormAssociatedSlider_base: typeof _Slider;
|
|
8
|
-
/**
|
|
9
|
-
* @beta
|
|
10
|
-
*/
|
|
11
|
-
export declare class FormAssociatedSlider extends FormAssociatedSlider_base {
|
|
12
|
-
proxy: HTMLInputElement;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
-
import { CheckableFormAssociated } from '../form-associated/form-associated.js';
|
|
3
|
-
declare class _Switch extends FASTElement {
|
|
4
|
-
}
|
|
5
|
-
interface _Switch extends CheckableFormAssociated {
|
|
6
|
-
}
|
|
7
|
-
declare const FormAssociatedSwitch_base: typeof _Switch;
|
|
8
|
-
/**
|
|
9
|
-
* @beta
|
|
10
|
-
*/
|
|
11
|
-
export declare class FormAssociatedSwitch extends FormAssociatedSwitch_base {
|
|
12
|
-
proxy: HTMLInputElement;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,456 +0,0 @@
|
|
|
1
|
-
import { attr, booleanConverter, emptyArray, observable, Updates } from '@microsoft/fast-element';
|
|
2
|
-
import { keyEnter } from '@microsoft/fast-web-utilities';
|
|
3
|
-
const proxySlotName = 'form-associated-proxy';
|
|
4
|
-
const ElementInternalsKey = 'ElementInternals';
|
|
5
|
-
/**
|
|
6
|
-
* @alpha
|
|
7
|
-
*/
|
|
8
|
-
export const supportsElementInternals = ElementInternalsKey in window && 'setFormValue' in window[ElementInternalsKey].prototype;
|
|
9
|
-
const InternalsMap = new WeakMap();
|
|
10
|
-
/**
|
|
11
|
-
* Base function for providing Custom Element Form Association.
|
|
12
|
-
*
|
|
13
|
-
* @beta
|
|
14
|
-
*/
|
|
15
|
-
export function FormAssociated(BaseCtor) {
|
|
16
|
-
const C = class extends BaseCtor {
|
|
17
|
-
/**
|
|
18
|
-
* Must evaluate to true to enable elementInternals.
|
|
19
|
-
* Feature detects API support and resolve respectively
|
|
20
|
-
*
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
static get formAssociated() {
|
|
24
|
-
return supportsElementInternals;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Returns the validity state of the element
|
|
28
|
-
*
|
|
29
|
-
* @beta
|
|
30
|
-
*/
|
|
31
|
-
get validity() {
|
|
32
|
-
return this.elementInternals ? this.elementInternals.validity : this.proxy.validity;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Retrieve a reference to the associated form.
|
|
36
|
-
* Returns null if not associated to any form.
|
|
37
|
-
*
|
|
38
|
-
* @beta
|
|
39
|
-
*/
|
|
40
|
-
get form() {
|
|
41
|
-
return this.elementInternals ? this.elementInternals.form : this.proxy.form;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Retrieve the localized validation message,
|
|
45
|
-
* or custom validation message if set.
|
|
46
|
-
*
|
|
47
|
-
* @beta
|
|
48
|
-
*/
|
|
49
|
-
get validationMessage() {
|
|
50
|
-
return this.elementInternals ? this.elementInternals.validationMessage : this.proxy.validationMessage;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Whether the element will be validated when the
|
|
54
|
-
* form is submitted
|
|
55
|
-
*/
|
|
56
|
-
get willValidate() {
|
|
57
|
-
return this.elementInternals ? this.elementInternals.willValidate : this.proxy.willValidate;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* A reference to all associated label elements
|
|
61
|
-
*/
|
|
62
|
-
get labels() {
|
|
63
|
-
if (this.elementInternals) {
|
|
64
|
-
return Object.freeze(Array.from(this.elementInternals.labels));
|
|
65
|
-
}
|
|
66
|
-
else if (this.proxy instanceof HTMLElement && this.proxy.ownerDocument && this.id) {
|
|
67
|
-
// Labels associated by wrapping the element: <label><custom-element></custom-element></label>
|
|
68
|
-
const parentLabels = this.proxy.labels;
|
|
69
|
-
// Labels associated using the `for` attribute
|
|
70
|
-
const forLabels = Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`));
|
|
71
|
-
const labels = parentLabels ? forLabels.concat(Array.from(parentLabels)) : forLabels;
|
|
72
|
-
return Object.freeze(labels);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
return emptyArray;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Invoked when the `value` property changes
|
|
80
|
-
* @param previous - the previous value
|
|
81
|
-
* @param next - the new value
|
|
82
|
-
*
|
|
83
|
-
* @remarks
|
|
84
|
-
* If elements extending `FormAssociated` implement a `valueChanged` method
|
|
85
|
-
* They must be sure to invoke `super.valueChanged(previous, next)` to ensure
|
|
86
|
-
* proper functioning of `FormAssociated`
|
|
87
|
-
*/
|
|
88
|
-
valueChanged(previous, next) {
|
|
89
|
-
this.dirtyValue = true;
|
|
90
|
-
if (this.proxy instanceof HTMLElement) {
|
|
91
|
-
this.proxy.value = this.value;
|
|
92
|
-
}
|
|
93
|
-
this.currentValue = this.value;
|
|
94
|
-
this.setFormValue(this.value);
|
|
95
|
-
this.validate();
|
|
96
|
-
}
|
|
97
|
-
currentValueChanged() {
|
|
98
|
-
this.value = this.currentValue;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Invoked when the `initialValue` property changes
|
|
102
|
-
*
|
|
103
|
-
* @param previous - the previous value
|
|
104
|
-
* @param next - the new value
|
|
105
|
-
*
|
|
106
|
-
* @remarks
|
|
107
|
-
* If elements extending `FormAssociated` implement a `initialValueChanged` method
|
|
108
|
-
* They must be sure to invoke `super.initialValueChanged(previous, next)` to ensure
|
|
109
|
-
* proper functioning of `FormAssociated`
|
|
110
|
-
*/
|
|
111
|
-
initialValueChanged(previous, next) {
|
|
112
|
-
// If the value is clean and the component is connected to the DOM
|
|
113
|
-
// then set value equal to the attribute value.
|
|
114
|
-
if (!this.dirtyValue) {
|
|
115
|
-
this.value = this.initialValue;
|
|
116
|
-
this.dirtyValue = false;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Invoked when the `disabled` property changes
|
|
121
|
-
*
|
|
122
|
-
* @param previous - the previous value
|
|
123
|
-
* @param next - the new value
|
|
124
|
-
*
|
|
125
|
-
* @remarks
|
|
126
|
-
* If elements extending `FormAssociated` implement a `disabledChanged` method
|
|
127
|
-
* They must be sure to invoke `super.disabledChanged(previous, next)` to ensure
|
|
128
|
-
* proper functioning of `FormAssociated`
|
|
129
|
-
*/
|
|
130
|
-
disabledChanged(previous, next) {
|
|
131
|
-
if (this.proxy instanceof HTMLElement) {
|
|
132
|
-
this.proxy.disabled = this.disabled;
|
|
133
|
-
}
|
|
134
|
-
Updates.enqueue(() => this.classList.toggle('disabled', this.disabled));
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Invoked when the `name` property changes
|
|
138
|
-
*
|
|
139
|
-
* @param previous - the previous value
|
|
140
|
-
* @param next - the new value
|
|
141
|
-
*
|
|
142
|
-
* @remarks
|
|
143
|
-
* If elements extending `FormAssociated` implement a `nameChanged` method
|
|
144
|
-
* They must be sure to invoke `super.nameChanged(previous, next)` to ensure
|
|
145
|
-
* proper functioning of `FormAssociated`
|
|
146
|
-
*/
|
|
147
|
-
nameChanged(previous, next) {
|
|
148
|
-
if (this.proxy instanceof HTMLElement) {
|
|
149
|
-
this.proxy.name = this.name;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Invoked when the `required` property changes
|
|
154
|
-
*
|
|
155
|
-
* @param previous - the previous value
|
|
156
|
-
* @param next - the new value
|
|
157
|
-
*
|
|
158
|
-
* @remarks
|
|
159
|
-
* If elements extending `FormAssociated` implement a `requiredChanged` method
|
|
160
|
-
* They must be sure to invoke `super.requiredChanged(previous, next)` to ensure
|
|
161
|
-
* proper functioning of `FormAssociated`
|
|
162
|
-
*/
|
|
163
|
-
requiredChanged(prev, next) {
|
|
164
|
-
if (this.proxy instanceof HTMLElement) {
|
|
165
|
-
this.proxy.required = this.required;
|
|
166
|
-
}
|
|
167
|
-
Updates.enqueue(() => this.classList.toggle('required', this.required));
|
|
168
|
-
this.validate();
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* The element internals object. Will only exist
|
|
172
|
-
* in browsers supporting the attachInternals API
|
|
173
|
-
*/
|
|
174
|
-
get elementInternals() {
|
|
175
|
-
if (!supportsElementInternals) {
|
|
176
|
-
return null;
|
|
177
|
-
}
|
|
178
|
-
let internals = InternalsMap.get(this);
|
|
179
|
-
if (!internals) {
|
|
180
|
-
internals = this.attachInternals();
|
|
181
|
-
InternalsMap.set(this, internals);
|
|
182
|
-
}
|
|
183
|
-
return internals;
|
|
184
|
-
}
|
|
185
|
-
constructor(...args) {
|
|
186
|
-
super(...args);
|
|
187
|
-
/**
|
|
188
|
-
* Track whether the value has been changed from the initial value
|
|
189
|
-
*/
|
|
190
|
-
this.dirtyValue = false;
|
|
191
|
-
/**
|
|
192
|
-
* The initial value of the form. This value sets the `value` property
|
|
193
|
-
* only when the `value` property has not been explicitly set.
|
|
194
|
-
*
|
|
195
|
-
* @remarks
|
|
196
|
-
* HTML Attribute: value
|
|
197
|
-
*/
|
|
198
|
-
this.initialValue = '';
|
|
199
|
-
/**
|
|
200
|
-
* Sets the element's disabled state. A disabled element will not be included during form submission.
|
|
201
|
-
*
|
|
202
|
-
* @remarks
|
|
203
|
-
* HTML Attribute: disabled
|
|
204
|
-
*/
|
|
205
|
-
this.disabled = false;
|
|
206
|
-
/**
|
|
207
|
-
* These are events that are still fired by the proxy
|
|
208
|
-
* element based on user / programmatic interaction.
|
|
209
|
-
*
|
|
210
|
-
* The proxy implementation should be transparent to
|
|
211
|
-
* the app author, so block these events from emitting.
|
|
212
|
-
*/
|
|
213
|
-
this.proxyEventsToBlock = ['change', 'click'];
|
|
214
|
-
this.proxyInitialized = false;
|
|
215
|
-
this.required = false;
|
|
216
|
-
this.initialValue = this.initialValue || '';
|
|
217
|
-
if (!this.elementInternals) {
|
|
218
|
-
// When elementInternals is not supported, formResetCallback is
|
|
219
|
-
// bound to an event listener, so ensure the handler's `this`
|
|
220
|
-
// context is correct.
|
|
221
|
-
this.formResetCallback = this.formResetCallback.bind(this);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* @internal
|
|
226
|
-
*/
|
|
227
|
-
connectedCallback() {
|
|
228
|
-
super.connectedCallback();
|
|
229
|
-
this.addEventListener('keypress', this._keypressHandler);
|
|
230
|
-
if (!this.value) {
|
|
231
|
-
this.value = this.initialValue;
|
|
232
|
-
this.dirtyValue = false;
|
|
233
|
-
}
|
|
234
|
-
if (!this.elementInternals) {
|
|
235
|
-
this.attachProxy();
|
|
236
|
-
if (this.form) {
|
|
237
|
-
this.form.addEventListener('reset', this.formResetCallback);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* @internal
|
|
243
|
-
*/
|
|
244
|
-
disconnectedCallback() {
|
|
245
|
-
this.proxyEventsToBlock.forEach(name => this.proxy.removeEventListener(name, this.stopPropagation));
|
|
246
|
-
if (!this.elementInternals && this.form) {
|
|
247
|
-
this.form.removeEventListener('reset', this.formResetCallback);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Return the current validity of the element.
|
|
252
|
-
*/
|
|
253
|
-
checkValidity() {
|
|
254
|
-
return this.elementInternals ? this.elementInternals.checkValidity() : this.proxy.checkValidity();
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Return the current validity of the element.
|
|
258
|
-
* If false, fires an invalid event at the element.
|
|
259
|
-
*/
|
|
260
|
-
reportValidity() {
|
|
261
|
-
return this.elementInternals ? this.elementInternals.reportValidity() : this.proxy.reportValidity();
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Set the validity of the control. In cases when the elementInternals object is not
|
|
265
|
-
* available (and the proxy element is used to report validity), this function will
|
|
266
|
-
* do nothing unless a message is provided, at which point the setCustomValidity method
|
|
267
|
-
* of the proxy element will be invoked with the provided message.
|
|
268
|
-
* @param flags - Validity flags
|
|
269
|
-
* @param message - Optional message to supply
|
|
270
|
-
* @param anchor - Optional element used by UA to display an interactive validation UI
|
|
271
|
-
*/
|
|
272
|
-
setValidity(flags, message, anchor) {
|
|
273
|
-
if (this.elementInternals) {
|
|
274
|
-
this.elementInternals.setValidity(flags, message, anchor);
|
|
275
|
-
}
|
|
276
|
-
else if (typeof message === 'string') {
|
|
277
|
-
this.proxy.setCustomValidity(message);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Invoked when a connected component's form or fieldset has its disabled
|
|
282
|
-
* state changed.
|
|
283
|
-
* @param disabled - the disabled value of the form / fieldset
|
|
284
|
-
*/
|
|
285
|
-
formDisabledCallback(disabled) {
|
|
286
|
-
this.disabled = disabled;
|
|
287
|
-
}
|
|
288
|
-
formResetCallback() {
|
|
289
|
-
this.value = this.initialValue;
|
|
290
|
-
this.dirtyValue = false;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Attach the proxy element to the DOM
|
|
294
|
-
*/
|
|
295
|
-
attachProxy() {
|
|
296
|
-
if (!this.proxyInitialized) {
|
|
297
|
-
this.proxyInitialized = true;
|
|
298
|
-
this.proxy.style.display = 'none';
|
|
299
|
-
this.proxyEventsToBlock.forEach(name => this.proxy.addEventListener(name, this.stopPropagation));
|
|
300
|
-
// These are typically mapped to the proxy during
|
|
301
|
-
// property change callbacks, but during initialization
|
|
302
|
-
// on the initial call of the callback, the proxy is
|
|
303
|
-
// still undefined. We should find a better way to address this.
|
|
304
|
-
this.proxy.disabled = this.disabled;
|
|
305
|
-
this.proxy.required = this.required;
|
|
306
|
-
if (typeof this.name === 'string') {
|
|
307
|
-
this.proxy.name = this.name;
|
|
308
|
-
}
|
|
309
|
-
if (typeof this.value === 'string') {
|
|
310
|
-
this.proxy.value = this.value;
|
|
311
|
-
}
|
|
312
|
-
this.proxy.setAttribute('slot', proxySlotName);
|
|
313
|
-
this.proxySlot = document.createElement('slot');
|
|
314
|
-
this.proxySlot.setAttribute('name', proxySlotName);
|
|
315
|
-
}
|
|
316
|
-
this.shadowRoot?.appendChild(this.proxySlot);
|
|
317
|
-
this.appendChild(this.proxy);
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Detach the proxy element from the DOM
|
|
321
|
-
*/
|
|
322
|
-
detachProxy() {
|
|
323
|
-
this.removeChild(this.proxy);
|
|
324
|
-
this.shadowRoot?.removeChild(this.proxySlot);
|
|
325
|
-
}
|
|
326
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
327
|
-
validate(anchor) {
|
|
328
|
-
if (this.proxy instanceof HTMLElement) {
|
|
329
|
-
this.setValidity(this.proxy.validity, this.proxy.validationMessage, anchor);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Associates the provided value (and optional state) with the parent form.
|
|
334
|
-
* @param value - The value to set
|
|
335
|
-
* @param state - The state object provided to during session restores and when autofilling.
|
|
336
|
-
*/
|
|
337
|
-
setFormValue(value, state) {
|
|
338
|
-
if (this.elementInternals) {
|
|
339
|
-
this.elementInternals.setFormValue(value, state || value);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
_keypressHandler(e) {
|
|
343
|
-
switch (e.key) {
|
|
344
|
-
case keyEnter:
|
|
345
|
-
if (this.form instanceof HTMLFormElement) {
|
|
346
|
-
// Implicit submission
|
|
347
|
-
const defaultButton = this.form.querySelector('[type=submit]');
|
|
348
|
-
defaultButton?.click();
|
|
349
|
-
}
|
|
350
|
-
break;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Used to stop propagation of proxy element events
|
|
355
|
-
* @param e - Event object
|
|
356
|
-
*/
|
|
357
|
-
stopPropagation(e) {
|
|
358
|
-
e.stopPropagation();
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
attr({ mode: 'boolean' })(C.prototype, 'disabled');
|
|
362
|
-
attr({ mode: 'fromView', attribute: 'value' })(C.prototype, 'initialValue');
|
|
363
|
-
attr({ attribute: 'current-value' })(C.prototype, 'currentValue');
|
|
364
|
-
attr(C.prototype, 'name');
|
|
365
|
-
attr({ mode: 'boolean' })(C.prototype, 'required');
|
|
366
|
-
observable(C.prototype, 'value');
|
|
367
|
-
return C;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Creates a checkable form associated component.
|
|
371
|
-
* @beta
|
|
372
|
-
*/
|
|
373
|
-
export function CheckableFormAssociated(BaseCtor) {
|
|
374
|
-
class C extends FormAssociated(BaseCtor) {
|
|
375
|
-
}
|
|
376
|
-
class D extends C {
|
|
377
|
-
checkedAttributeChanged() {
|
|
378
|
-
this.defaultChecked = this.checkedAttribute;
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* @internal
|
|
382
|
-
*/
|
|
383
|
-
defaultCheckedChanged() {
|
|
384
|
-
if (!this.dirtyChecked) {
|
|
385
|
-
// Setting this.checked will cause us to enter a dirty state,
|
|
386
|
-
// but if we are clean when defaultChecked is changed, we want to stay
|
|
387
|
-
// in a clean state, so reset this.dirtyChecked
|
|
388
|
-
this.checked = this.defaultChecked;
|
|
389
|
-
this.dirtyChecked = false;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
checkedChanged(prev, next) {
|
|
393
|
-
if (!this.dirtyChecked) {
|
|
394
|
-
this.dirtyChecked = true;
|
|
395
|
-
}
|
|
396
|
-
this.currentChecked = this.checked;
|
|
397
|
-
this.updateForm();
|
|
398
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
399
|
-
this.proxy.checked = this.checked;
|
|
400
|
-
}
|
|
401
|
-
if (prev !== undefined) {
|
|
402
|
-
this.$emit('change');
|
|
403
|
-
}
|
|
404
|
-
this.validate();
|
|
405
|
-
}
|
|
406
|
-
currentCheckedChanged(prev, next) {
|
|
407
|
-
this.checked = this.currentChecked;
|
|
408
|
-
}
|
|
409
|
-
constructor(...args) {
|
|
410
|
-
super(args);
|
|
411
|
-
/**
|
|
412
|
-
* Tracks whether the "checked" property has been changed.
|
|
413
|
-
* This is necessary to provide consistent behavior with
|
|
414
|
-
* normal input checkboxes
|
|
415
|
-
*/
|
|
416
|
-
this.dirtyChecked = false;
|
|
417
|
-
/**
|
|
418
|
-
* Provides the default checkedness of the input element
|
|
419
|
-
* Passed down to proxy
|
|
420
|
-
*
|
|
421
|
-
* @public
|
|
422
|
-
* @remarks
|
|
423
|
-
* HTML Attribute: checked
|
|
424
|
-
*/
|
|
425
|
-
this.checkedAttribute = false;
|
|
426
|
-
/**
|
|
427
|
-
* The checked state of the control.
|
|
428
|
-
*
|
|
429
|
-
* @public
|
|
430
|
-
*/
|
|
431
|
-
this.checked = false;
|
|
432
|
-
// Re-initialize dirtyChecked because initialization of other values
|
|
433
|
-
// causes it to become true
|
|
434
|
-
this.dirtyChecked = false;
|
|
435
|
-
}
|
|
436
|
-
updateForm() {
|
|
437
|
-
const value = this.checked ? this.value : null;
|
|
438
|
-
this.setFormValue(value, value);
|
|
439
|
-
}
|
|
440
|
-
connectedCallback() {
|
|
441
|
-
super.connectedCallback();
|
|
442
|
-
this.updateForm();
|
|
443
|
-
}
|
|
444
|
-
formResetCallback() {
|
|
445
|
-
super.formResetCallback();
|
|
446
|
-
this.checked = !!this.checkedAttribute;
|
|
447
|
-
this.dirtyChecked = false;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
attr({ attribute: 'checked', mode: 'boolean' })(D.prototype, 'checkedAttribute');
|
|
451
|
-
attr({ attribute: 'current-checked', converter: booleanConverter })(D.prototype, 'currentChecked');
|
|
452
|
-
observable(D.prototype, 'defaultChecked');
|
|
453
|
-
observable(D.prototype, 'checked');
|
|
454
|
-
return D;
|
|
455
|
-
}
|
|
456
|
-
//# sourceMappingURL=form-associated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-associated.js","sourceRoot":"","sources":["../../../src/form-associated/form-associated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElG,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,MAAM,aAAa,GAAG,uBAAuB,CAAC;AAE9C,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAC/C;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,mBAAmB,IAAI,MAAM,IAAI,cAAc,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC;AAE3F,MAAM,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;AAiGnC;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAwC,QAAW;IAC/E,MAAM,CAAC,GAAG,KAAM,SAAQ,QAAQ;QAS9B;;;;;WAKG;QACI,MAAM,KAAK,cAAc;YAC9B,OAAO,wBAAwB,CAAC;QAClC,CAAC;QAED;;;;WAIG;QACH,IAAW,QAAQ;YACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QACtF,CAAC;QAED;;;;;WAKG;QACH,IAAW,IAAI;YACb,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC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FormAssociated } from '../form-associated/form-associated.js';
|
|
3
|
-
class _Slider extends FASTElement {
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* @beta
|
|
7
|
-
*/
|
|
8
|
-
export class FormAssociatedSlider extends FormAssociated(_Slider) {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.proxy = document.createElement('input');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=slider.form-associated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slider.form-associated.js","sourceRoot":"","sources":["../../../src/slider/slider.form-associated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAEvE,MAAM,OAAQ,SAAQ,WAAW;CAAG;AAIpC;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAc,CAAC,OAAO,CAAC;IAAjE;;QACE,UAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
-
import { CheckableFormAssociated } from '../form-associated/form-associated.js';
|
|
3
|
-
class _Switch extends FASTElement {
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* @beta
|
|
7
|
-
*/
|
|
8
|
-
export class FormAssociatedSwitch extends CheckableFormAssociated(_Switch) {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.proxy = document.createElement('input');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=switch.form-associated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"switch.form-associated.js","sourceRoot":"","sources":["../../../src/switch/switch.form-associated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,MAAM,OAAQ,SAAQ,WAAW;CAAG;AAIpC;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,uBAAuB,CAAC,OAAO,CAAC;IAA1E;;QACE,UAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CAAA"}
|