@fusion.dev/helix-core 0.182.0 → 0.182.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/custom-elements.json +1109 -163
- package/dist/controllers/aria-forward-controller/aria-forward-controller.d.ts +4 -0
- package/dist/helix-element/helix-element.d.ts +11 -1
- package/dist/helix-element/helix-element.js +7 -6
- package/dist/helix-element/mark-rules.d.ts +119 -0
- package/dist/helix-element/mark-rules.js +4 -0
- package/dist/helix-form-element/helix-form-element-base.d.ts +264 -0
- package/dist/helix-form-element/helix-form-element-base.js +173 -0
- package/dist/helix-form-element/helix-form-element.d.ts +8 -226
- package/dist/helix-form-element/helix-form-element.js +2 -157
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/mixins/mixin-chart-source/mixin-chart-source.js +1 -6
- package/dist/mixins/mixin-chart-status/mixin-chart-status.js +1 -6
- package/dist/mixins/mixin-collection/mixin-collection.js +1 -6
- package/dist/mixins/mixin-controller-active/mixin-controller-active.js +1 -6
- package/dist/mixins/mixin-controller-checked/mixin-controller-checked.js +1 -6
- package/dist/mixins/mixin-controller-open/mixin-controller-open.js +1 -6
- package/dist/mixins/mixin-controller-value/mixin-controller-value.js +1 -6
- package/dist/mixins/mixin-dismissible/mixin-dismissible.js +1 -6
- package/dist/mixins/mixin-field/mixin-field.js +1 -6
- package/dist/mixins/mixin-picker-editing/mixin-picker-editing.js +1 -6
- package/dist/mixins/mixin-picker-feedback/mixin-picker-feedback.js +1 -6
- package/dist/mixins/mixin-picker-field/mixin-picker-field.js +1 -6
- package/dist/mixins/mixin-segmented-field/mixin-segmented-field.js +1 -6
- package/dist/mixins/mixin-selectable-item/mixin-selectable-item.js +1 -6
- package/dist/mixins/mixin-tokens/mixin-tokens.js +1 -6
- package/dist/mixins/mixin-viewport/mixin-viewport.js +1 -6
- package/dist/utils/audit-name/audit-name.d.ts +3 -3
- package/dist/utils/audit-name/audit-name.js +7 -2
- package/dist/utils/implicit-submit/implicit-submit.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropertyValues } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { HelixFormElementBase } from './helix-form-element-base.js';
|
|
3
3
|
/**
|
|
4
|
-
* @summary Base for every element that participates in a form.
|
|
4
|
+
* @summary Base for every element that participates in a form and judges what it holds.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
7
|
* `HelixFormElement` is a class because the browser reads `formAssociated` from
|
|
@@ -23,121 +23,15 @@ import { HelixElement } from '../helix-element/helix-element.js';
|
|
|
23
23
|
* press on a `<label>` that names the host. A host is not focusable itself, so
|
|
24
24
|
* without this a label press focused nothing on half the controls.
|
|
25
25
|
*
|
|
26
|
+
* Ownership, `disabled`, `name`, focus and the validity API are
|
|
27
|
+
* `HelixFormElementBase`'s, which a control that reports no verdict of its
|
|
28
|
+
* own, as Button does, extends directly.
|
|
29
|
+
*
|
|
26
30
|
* @since 0.1.0
|
|
27
31
|
* @status experimental
|
|
28
32
|
* @documentation https://fusion.dev/helix/docs/tiers
|
|
29
33
|
*/
|
|
30
|
-
export declare class HelixFormElement extends
|
|
31
|
-
/** Opts the element into form ownership, labels, and submission. */
|
|
32
|
-
static readonly formAssociated = true;
|
|
33
|
-
/**
|
|
34
|
-
* Whether the control is disabled and cannot be used.
|
|
35
|
-
*
|
|
36
|
-
* Reflected, because the styled tier selects on it, and mirrored to
|
|
37
|
-
* `aria-disabled` rather than removing the element from the accessibility
|
|
38
|
-
* tree, so a screen reader can still announce that the control exists.
|
|
39
|
-
*
|
|
40
|
-
* The mirror itself is in `willUpdate` below, here rather than in each
|
|
41
|
-
* control, because here is where `disabled` is.
|
|
42
|
-
*/
|
|
43
|
-
disabled: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Whether an ancestor `<fieldset disabled>` has switched this control off.
|
|
46
|
-
*
|
|
47
|
-
* The platform tells a form-associated element through `formDisabledCallback`
|
|
48
|
-
* and nothing else does, so without this a control inside a disabled fieldset
|
|
49
|
-
* stays fully typeable and announces itself as enabled.
|
|
50
|
-
*
|
|
51
|
-
* The submission half is already the platform's: measured, the fieldset's
|
|
52
|
-
* controls are absent from the form's entry list and the host matches
|
|
53
|
-
* `:disabled`, so the value never goes anywhere. What is missing without this
|
|
54
|
-
* is everything a reader can see or touch.
|
|
55
|
-
*
|
|
56
|
-
* State rather than the `disabled` property. Writing that would reflect an
|
|
57
|
-
* attribute the consumer's server markup does not have, which React reports
|
|
58
|
-
* on hydration and does not patch up, and it would also silently overwrite
|
|
59
|
-
* what the consumer set.
|
|
60
|
-
*/
|
|
61
|
-
protected formDisabled: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Whether the control is off, by its own attribute or by an ancestor.
|
|
64
|
-
*
|
|
65
|
-
* What a component should bind to rather than `disabled`, which is only the
|
|
66
|
-
* half of it the consumer wrote.
|
|
67
|
-
*
|
|
68
|
-
* @internal Read by the component itself and by nothing outside it: every
|
|
69
|
-
* call in the library is `this.isDisabled`. Public, it prints a row on
|
|
70
|
-
* twenty-four families in both tiers, forty-eight in all, on every form
|
|
71
|
-
* control's reference page.
|
|
72
|
-
*
|
|
73
|
-
* **A consumer loses nothing, which was measured rather than assumed.**
|
|
74
|
-
* `element.matches(':disabled')` answers the same question, is the platform's
|
|
75
|
-
* own, and works on a native control too. Checked in a browser across the
|
|
76
|
-
* three cases: a control disabled by its own attribute, one inside a
|
|
77
|
-
* `<fieldset>` before and after that fieldset is disabled, and one that is
|
|
78
|
-
* neither. `:disabled` agreed with `isDisabled` in every one, including the
|
|
79
|
-
* inheritance case that is the only reason this getter exists.
|
|
80
|
-
*
|
|
81
|
-
* Documented away rather than made `protected`, because a subclass in
|
|
82
|
-
* `helix/styled` binds to it and that is exactly what it is for.
|
|
83
|
-
*/
|
|
84
|
-
get isDisabled(): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Called by the browser when an ancestor fieldset is disabled or enabled.
|
|
87
|
-
*
|
|
88
|
-
* **The argument is the effective state, and taking it whole is what latched
|
|
89
|
-
* every control in the library.** The platform calls this for the element's
|
|
90
|
-
* own `disabled` as well as for a fieldset, and our own arrives here at the
|
|
91
|
-
* worst possible moment: reflecting `disabled` to the attribute happens
|
|
92
|
-
* inside Lit's `update()`, the UA fires this synchronously from that write,
|
|
93
|
-
* and a reactive write during an update is a change-in-update Lit does not
|
|
94
|
-
* re-render for. So `formDisabled` ran exactly one update behind forever.
|
|
95
|
-
*
|
|
96
|
-
* Measured on Slider, logging what `render` saw:
|
|
97
|
-
*
|
|
98
|
-
* ```
|
|
99
|
-
* set true disabled true formDisabled false isDisabled true
|
|
100
|
-
* set false disabled false formDisabled true isDisabled true <- stale
|
|
101
|
-
* (no third render)
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* The host came out right every time, `disabled` false, `:disabled` not
|
|
105
|
-
* matching, and the inner control kept the attribute, so a control disabled
|
|
106
|
-
* once could never be re-enabled. It only shows when something re-enables,
|
|
107
|
-
* which is the same shape of bug `inheritDisabled` was written for.
|
|
108
|
-
*
|
|
109
|
-
* Our own half is already in `this.disabled` and `isDisabled` is an or, so
|
|
110
|
-
* this records only what the fieldset adds. That also removes the write
|
|
111
|
-
* entirely on the own-disabled path rather than moving it.
|
|
112
|
-
*
|
|
113
|
-
* The one case this cannot see is a control that is disabled itself *and*
|
|
114
|
-
* inside a disabled fieldset, whose own `disabled` is then removed: the
|
|
115
|
-
* effective state does not change, so the platform does not call again, and
|
|
116
|
-
* the fieldset's hold is not recorded. There is no callback to learn it from
|
|
117
|
-
* and reading `:disabled` here would answer about the attribute we are in the
|
|
118
|
-
* middle of removing.
|
|
119
|
-
*/
|
|
120
|
-
formDisabledCallback(disabled: boolean): void;
|
|
121
|
-
/**
|
|
122
|
-
* Whether an ancestor `<fieldset disabled>` holds the control, outside its
|
|
123
|
-
* first `<legend>`, read from the tree.
|
|
124
|
-
*
|
|
125
|
-
* For the one case the callback cannot report: a control disabled itself and
|
|
126
|
-
* by a fieldset, whose own `disabled` is then removed. The effective state does
|
|
127
|
-
* not change, so the platform does not call, and the fieldset's hold has to
|
|
128
|
-
* be read.
|
|
129
|
-
*/
|
|
130
|
-
private get heldByFieldset();
|
|
131
|
-
/**
|
|
132
|
-
* Called by the browser when the form is reset. It does nothing here, and
|
|
133
|
-
* every override calls it.
|
|
134
|
-
*
|
|
135
|
-
* **A chain rather than a leaf**, because more than one layer owes a reset
|
|
136
|
-
* something: the value mixin its default, and the field mixin beneath it the
|
|
137
|
-
* forgetting of a reader's past attempt, whose message otherwise showed over
|
|
138
|
-
* the emptied control the moment the form was reset.
|
|
139
|
-
*/
|
|
140
|
-
formResetCallback(): void;
|
|
34
|
+
export declare class HelixFormElement extends HelixFormElementBase {
|
|
141
35
|
protected willUpdate(changed: PropertyValues): void;
|
|
142
36
|
/**
|
|
143
37
|
* Announces `input` from the host, the way the control it stands for would.
|
|
@@ -158,32 +52,11 @@ export declare class HelixFormElement extends HelixElement {
|
|
|
158
52
|
* event is one shape in one place.
|
|
159
53
|
*/
|
|
160
54
|
protected announceChange(): void;
|
|
161
|
-
/**
|
|
162
|
-
* The name the control's value is submitted under.
|
|
163
|
-
*
|
|
164
|
-
* **Reflected, and it is the exception to "reflect only what CSS selects
|
|
165
|
-
* on".** The platform builds a form's entry list from the `name` *content
|
|
166
|
-
* attribute*, not from the property, so a control named through the property
|
|
167
|
-
* submitted under no name at all and was silently dropped. Measured: two
|
|
168
|
-
* inputs in one form, one named by attribute and one by property, and the
|
|
169
|
-
* form carried a single entry.
|
|
170
|
-
*
|
|
171
|
-
* Safe for a React consumer, which is what the rule is protecting: React
|
|
172
|
-
* renders a custom element's props as attributes on the server, so the name
|
|
173
|
-
* is already in the markup being hydrated and reflecting it writes what is
|
|
174
|
-
* there. It is only a change to the markup when a consumer assigns it
|
|
175
|
-
* imperatively later, and nothing is hydrating by then.
|
|
176
|
-
*
|
|
177
|
-
* Here rather than on each control.
|
|
178
|
-
*/
|
|
179
|
-
name: string;
|
|
180
55
|
constructor();
|
|
181
56
|
/** The platform's own `setValidity`, which the wrapper above calls. */
|
|
182
57
|
private readonly reportValidityTo;
|
|
183
58
|
/** What the control last reported, before any custom error is laid over it. */
|
|
184
59
|
private reported;
|
|
185
|
-
/** The message `setCustomValidity` was given. */
|
|
186
|
-
private customValidity;
|
|
187
60
|
/** The `validityFeedback` the platform was last told about. */
|
|
188
61
|
private appliedFeedback;
|
|
189
62
|
/**
|
|
@@ -196,7 +69,7 @@ export declare class HelixFormElement extends HelixElement {
|
|
|
196
69
|
* Hands the platform the control's own verdict with any custom error on top,
|
|
197
70
|
* anchored where focus can go.
|
|
198
71
|
*/
|
|
199
|
-
|
|
72
|
+
protected applyValidity(): void;
|
|
200
73
|
/**
|
|
201
74
|
* Where the browser points its bubble: the anchor a control gave if focus
|
|
202
75
|
* can go there, and its first tab stop otherwise.
|
|
@@ -206,35 +79,6 @@ export declare class HelixFormElement extends HelixElement {
|
|
|
206
79
|
* not focusable, and leaves the reader on the submit button.
|
|
207
80
|
*/
|
|
208
81
|
protected validationAnchor(anchor?: HTMLElement): HTMLElement | undefined;
|
|
209
|
-
/**
|
|
210
|
-
* Whether the control meets its constraints, and why not.
|
|
211
|
-
*
|
|
212
|
-
* @reference https://developer.mozilla.org/docs/Web/API/ElementInternals/validity ElementInternals.validity
|
|
213
|
-
*/
|
|
214
|
-
get validity(): ValidityState;
|
|
215
|
-
/** The message the browser would show for the control, or an empty string. */
|
|
216
|
-
get validationMessage(): string;
|
|
217
|
-
/** Whether an update is running, so `runPendingUpdate` never starts one inside another. */
|
|
218
|
-
private updateRunning;
|
|
219
|
-
protected performUpdate(): void;
|
|
220
|
-
/**
|
|
221
|
-
* Runs an update that is on its way, so the verdict read next is the one
|
|
222
|
-
* for what the control holds now.
|
|
223
|
-
*
|
|
224
|
-
* **A control reports its verdict as it updates, and an update waits for a
|
|
225
|
-
* microtask**, so a script that wrote `value` and asked at once was answered
|
|
226
|
-
* about the value before: measured on Time Input, `value = '18:00'` past a
|
|
227
|
-
* `max` of 17:00 and `checkValidity()` returned true until `updateComplete`.
|
|
228
|
-
* A native control answers about the value it was just given, so the
|
|
229
|
-
* questions a script can ask run the pending update first. Lit's
|
|
230
|
-
* `performUpdate` is the documented way to run one synchronously.
|
|
231
|
-
*
|
|
232
|
-
* Protected for a control that submits on its own, which has to hand the
|
|
233
|
-
* form the verdict for what it holds now: Pin Input's `autosubmit`.
|
|
234
|
-
*/
|
|
235
|
-
protected runPendingUpdate(): void;
|
|
236
|
-
/** Whether the control is checked when its form is submitted. */
|
|
237
|
-
get willValidate(): boolean;
|
|
238
82
|
/**
|
|
239
83
|
* Returns whether the control is valid, and fires `invalid` on it when it is
|
|
240
84
|
* not. The control shows no message for it: `reportValidity()` does that.
|
|
@@ -255,72 +99,10 @@ export declare class HelixFormElement extends HelixElement {
|
|
|
255
99
|
* mark it.
|
|
256
100
|
*/
|
|
257
101
|
protected get checkingValidity(): boolean;
|
|
258
|
-
/**
|
|
259
|
-
* Returns whether the control is valid, and when it is not, fires `invalid`
|
|
260
|
-
* and shows the browser's message at the control.
|
|
261
|
-
*/
|
|
262
|
-
reportValidity(): boolean;
|
|
263
|
-
/**
|
|
264
|
-
* Marks the control invalid with `message`, or clears that with an empty
|
|
265
|
-
* string, as on a native control. The form does not submit while it is set.
|
|
266
|
-
*/
|
|
267
|
-
setCustomValidity(message: string): void;
|
|
268
|
-
/**
|
|
269
|
-
* The element focus goes to: the control's first tab stop, or `null` where
|
|
270
|
-
* there is none.
|
|
271
|
-
*
|
|
272
|
-
* Read through shadow roots and slots, so a group lands on the member that
|
|
273
|
-
* holds its tab stop, which is the chosen radio in a radio group.
|
|
274
|
-
*/
|
|
275
|
-
protected get focusTarget(): HTMLElement | null;
|
|
276
|
-
/** Moves focus to the control, as focusing a native control does. */
|
|
277
|
-
focus(options?: FocusOptions): void;
|
|
278
|
-
/**
|
|
279
|
-
* Focuses the control when its `<label>` is pressed.
|
|
280
|
-
*
|
|
281
|
-
* The label sends the host a click of the browser's own after trying to
|
|
282
|
-
* focus it, and a host that is not focusable takes nothing from that try.
|
|
283
|
-
* Only a click that starts at the host and that the browser sent: one from
|
|
284
|
-
* inside has landed where it meant to, and `click()` from a script does not
|
|
285
|
-
* focus a native control either.
|
|
286
|
-
*/
|
|
287
|
-
private readonly focusFromLabel;
|
|
288
|
-
/**
|
|
289
|
-
* Re-anchors the verdict as the form checks it, because the control's
|
|
290
|
-
* members may have rendered since it last reported, and the anchor read then
|
|
291
|
-
* was the best there was.
|
|
292
|
-
*/
|
|
293
|
-
private readonly refreshAnchor;
|
|
294
|
-
/** Stops listening for the labels in this control's tree. */
|
|
295
|
-
private unwatchLabels;
|
|
296
102
|
connectedCallback(): void;
|
|
297
|
-
disconnectedCallback(): void;
|
|
298
103
|
/**
|
|
299
104
|
* Called by the browser when the control's form changes: watches the new
|
|
300
105
|
* form's `checkValidity()`, as connecting does for the form it starts in.
|
|
301
106
|
*/
|
|
302
107
|
formAssociatedCallback(form: HTMLFormElement | null): void;
|
|
303
|
-
/**
|
|
304
|
-
* @internal Whether this control is a field that counts against implicit
|
|
305
|
-
* submission: a single line of text, as `<input type="text">` is. Read by
|
|
306
|
-
* `submitImplicitly` in `utils/implicit-submit`, which only the controls
|
|
307
|
-
* that submit on Enter import.
|
|
308
|
-
*/
|
|
309
|
-
protected get blocksImplicitSubmission(): boolean;
|
|
310
|
-
/** @internal Whether this control submits its form, for finding the form's default button. */
|
|
311
|
-
protected get submitsForm(): boolean;
|
|
312
|
-
/** @internal Activates the control as its form's default button. */
|
|
313
|
-
protected activate(): void;
|
|
314
|
-
/**
|
|
315
|
-
* The form the control belongs to, or `null`.
|
|
316
|
-
*
|
|
317
|
-
* @reference https://html.spec.whatwg.org/multipage/custom-elements.html#form-associated-custom-elements form-associated custom elements
|
|
318
|
-
*/
|
|
319
|
-
get form(): HTMLFormElement | null;
|
|
320
|
-
/**
|
|
321
|
-
* The labels associated with the control.
|
|
322
|
-
*
|
|
323
|
-
* @reference https://html.spec.whatwg.org/multipage/custom-elements.html#form-associated-custom-elements form-associated custom elements
|
|
324
|
-
*/
|
|
325
|
-
get labels(): NodeList;
|
|
326
108
|
}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { property, state } from 'lit/decorators.js';
|
|
8
|
-
import { HelixElement } from '../helix-element/helix-element.js';
|
|
9
|
-
import { watchLabels } from '../utils/watch-labels/watch-labels.js';
|
|
1
|
+
import { HelixFormElementBase } from './helix-form-element-base.js';
|
|
10
2
|
const VALIDITY_FLAGS = [
|
|
11
3
|
'badInput',
|
|
12
4
|
'customError',
|
|
@@ -22,25 +14,6 @@ const VALIDITY_FLAGS = [
|
|
|
22
14
|
const takesFocus = (element) => (element.tabIndex >= 0 || element.hasAttribute('tabindex')) &&
|
|
23
15
|
!element.disabled &&
|
|
24
16
|
(typeof element.checkVisibility !== 'function' || element.checkVisibility());
|
|
25
|
-
const isTabStop = (element) => element instanceof HTMLElement &&
|
|
26
|
-
element.tabIndex >= 0 &&
|
|
27
|
-
!element.disabled &&
|
|
28
|
-
!element.hidden &&
|
|
29
|
-
!element.inert &&
|
|
30
|
-
(typeof element.checkVisibility !== 'function' || element.checkVisibility());
|
|
31
|
-
const firstTabStop = (node) => {
|
|
32
|
-
const children = node instanceof HTMLSlotElement ? node.assignedElements({ flatten: true }) : [...node.children];
|
|
33
|
-
for (const child of children) {
|
|
34
|
-
if (isTabStop(child)) {
|
|
35
|
-
return child;
|
|
36
|
-
}
|
|
37
|
-
const found = (child.shadowRoot ? firstTabStop(child.shadowRoot) : null) ?? firstTabStop(child);
|
|
38
|
-
if (found) {
|
|
39
|
-
return found;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
};
|
|
44
17
|
let formChecks = 0;
|
|
45
18
|
const watchedForms = new WeakSet();
|
|
46
19
|
const watchFormChecks = (form) => {
|
|
@@ -59,32 +32,9 @@ const watchFormChecks = (form) => {
|
|
|
59
32
|
}
|
|
60
33
|
};
|
|
61
34
|
};
|
|
62
|
-
export class HelixFormElement extends
|
|
63
|
-
static { this.formAssociated = true; }
|
|
64
|
-
get isDisabled() {
|
|
65
|
-
return this.disabled || this.formDisabled;
|
|
66
|
-
}
|
|
67
|
-
formDisabledCallback(disabled) {
|
|
68
|
-
this.formDisabled = disabled && !this.disabled;
|
|
69
|
-
}
|
|
70
|
-
get heldByFieldset() {
|
|
71
|
-
let fieldset = this.parentElement?.closest('fieldset[disabled]') ?? null;
|
|
72
|
-
while (fieldset) {
|
|
73
|
-
const legend = fieldset.querySelector(':scope > legend');
|
|
74
|
-
if (!legend?.contains(this)) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
fieldset = fieldset.parentElement?.closest('fieldset[disabled]') ?? null;
|
|
78
|
-
}
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
formResetCallback() { }
|
|
35
|
+
export class HelixFormElement extends HelixFormElementBase {
|
|
82
36
|
willUpdate(changed) {
|
|
83
37
|
super.willUpdate(changed);
|
|
84
|
-
if (changed.get('disabled') === true && !this.disabled && this.isConnected) {
|
|
85
|
-
this.formDisabled = this.heldByFieldset;
|
|
86
|
-
}
|
|
87
|
-
this.internals.ariaDisabled = this.isDisabled ? 'true' : null;
|
|
88
38
|
if (this.validityFeedback !== this.appliedFeedback) {
|
|
89
39
|
this.applyValidity();
|
|
90
40
|
}
|
|
@@ -97,27 +47,9 @@ export class HelixFormElement extends HelixElement {
|
|
|
97
47
|
}
|
|
98
48
|
constructor() {
|
|
99
49
|
super();
|
|
100
|
-
this.disabled = false;
|
|
101
|
-
this.formDisabled = false;
|
|
102
|
-
this.name = '';
|
|
103
50
|
this.reported = { anchor: undefined, flags: {}, message: '' };
|
|
104
|
-
this.customValidity = '';
|
|
105
51
|
this.appliedFeedback = '';
|
|
106
|
-
this.updateRunning = false;
|
|
107
52
|
this.checkInProgress = false;
|
|
108
|
-
this.focusFromLabel = (event) => {
|
|
109
|
-
if (!event.isTrusted || event.composedPath()[0] !== this || this.isDisabled) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (!this.matches(':focus-within')) {
|
|
113
|
-
this.focus();
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
this.refreshAnchor = () => {
|
|
117
|
-
if (!this.internals.validity.valid) {
|
|
118
|
-
this.applyValidity();
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
53
|
const internals = this.internals;
|
|
122
54
|
const report = internals.setValidity.bind(internals);
|
|
123
55
|
this.reportValidityTo = report;
|
|
@@ -154,31 +86,6 @@ export class HelixFormElement extends HelixElement {
|
|
|
154
86
|
}
|
|
155
87
|
return this.focusTarget ?? anchor;
|
|
156
88
|
}
|
|
157
|
-
get validity() {
|
|
158
|
-
this.runPendingUpdate();
|
|
159
|
-
return this.internals.validity;
|
|
160
|
-
}
|
|
161
|
-
get validationMessage() {
|
|
162
|
-
this.runPendingUpdate();
|
|
163
|
-
return this.internals.validationMessage;
|
|
164
|
-
}
|
|
165
|
-
performUpdate() {
|
|
166
|
-
this.updateRunning = true;
|
|
167
|
-
try {
|
|
168
|
-
super.performUpdate();
|
|
169
|
-
}
|
|
170
|
-
finally {
|
|
171
|
-
this.updateRunning = false;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
runPendingUpdate() {
|
|
175
|
-
if (this.hasUpdated && this.isUpdatePending && !this.updateRunning) {
|
|
176
|
-
this.performUpdate();
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
get willValidate() {
|
|
180
|
-
return this.internals.willValidate;
|
|
181
|
-
}
|
|
182
89
|
checkValidity() {
|
|
183
90
|
this.runPendingUpdate();
|
|
184
91
|
this.checkInProgress = true;
|
|
@@ -192,73 +99,11 @@ export class HelixFormElement extends HelixElement {
|
|
|
192
99
|
get checkingValidity() {
|
|
193
100
|
return this.checkInProgress || formChecks > 0;
|
|
194
101
|
}
|
|
195
|
-
reportValidity() {
|
|
196
|
-
this.runPendingUpdate();
|
|
197
|
-
this.applyValidity();
|
|
198
|
-
return this.internals.reportValidity();
|
|
199
|
-
}
|
|
200
|
-
setCustomValidity(message) {
|
|
201
|
-
this.customValidity = message;
|
|
202
|
-
this.applyValidity();
|
|
203
|
-
this.requestUpdate();
|
|
204
|
-
}
|
|
205
|
-
get focusTarget() {
|
|
206
|
-
const root = this.shadowRoot;
|
|
207
|
-
return root ? firstTabStop(root) : null;
|
|
208
|
-
}
|
|
209
|
-
focus(options) {
|
|
210
|
-
const target = this.focusTarget;
|
|
211
|
-
if (target) {
|
|
212
|
-
target.focus(options);
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
super.focus(options);
|
|
216
|
-
}
|
|
217
102
|
connectedCallback() {
|
|
218
103
|
super.connectedCallback();
|
|
219
104
|
watchFormChecks(this.internals.form);
|
|
220
|
-
this.addEventListener('click', this.focusFromLabel);
|
|
221
|
-
this.addEventListener('invalid', this.refreshAnchor);
|
|
222
|
-
this.unwatchLabels = watchLabels(this, () => this.requestUpdate());
|
|
223
|
-
}
|
|
224
|
-
disconnectedCallback() {
|
|
225
|
-
super.disconnectedCallback();
|
|
226
|
-
this.removeEventListener('click', this.focusFromLabel);
|
|
227
|
-
this.removeEventListener('invalid', this.refreshAnchor);
|
|
228
|
-
this.unwatchLabels?.();
|
|
229
|
-
this.unwatchLabels = undefined;
|
|
230
105
|
}
|
|
231
106
|
formAssociatedCallback(form) {
|
|
232
107
|
watchFormChecks(form);
|
|
233
108
|
}
|
|
234
|
-
get blocksImplicitSubmission() {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
get submitsForm() {
|
|
238
|
-
return false;
|
|
239
|
-
}
|
|
240
|
-
activate() {
|
|
241
|
-
this.click();
|
|
242
|
-
}
|
|
243
|
-
get form() {
|
|
244
|
-
return this.internals.form;
|
|
245
|
-
}
|
|
246
|
-
get labels() {
|
|
247
|
-
return this.internals.labels;
|
|
248
|
-
}
|
|
249
109
|
}
|
|
250
|
-
__decorate([
|
|
251
|
-
property({ reflect: true, type: Boolean })
|
|
252
|
-
], HelixFormElement.prototype, "disabled", void 0);
|
|
253
|
-
__decorate([
|
|
254
|
-
state()
|
|
255
|
-
], HelixFormElement.prototype, "formDisabled", void 0);
|
|
256
|
-
__decorate([
|
|
257
|
-
property({
|
|
258
|
-
converter: {
|
|
259
|
-
fromAttribute: (value) => value ?? '',
|
|
260
|
-
toAttribute: (value) => (value === '' ? null : value),
|
|
261
|
-
},
|
|
262
|
-
reflect: true,
|
|
263
|
-
})
|
|
264
|
-
], HelixFormElement.prototype, "name", void 0);
|
package/dist/index.d.ts
CHANGED
|
@@ -39,7 +39,9 @@ export { type Rendered, VirtualizeController, type VirtualizeOptions, type Windo
|
|
|
39
39
|
export { eventsForTag, registerElementEvents } from './events/element-events.js';
|
|
40
40
|
export { type ActivateDetail, type AuraFallbackDetail, type BandDetail, type CanvasView, type CaretDetail, type ChangeDetail, type CompleteDetail, type ConnectDetail, type ConsoleDetail, type CopyDetail, type CreateDetail, type DismissDetail, type FacetDetail, type FilterDetail, type GraphFilterDetail, type GraphLayoutDetail, type GraphPartChangeDetail, type GraphSignalDetail, HelixActionEvent, HelixActivateEvent, HelixAuraFallbackEvent, HelixBandEvent, HelixBeforeActivateEvent, HelixBeforeChangeEvent, HelixBeforeCloseEvent, HelixBeforeCollapseEvent, HelixBeforeEditEvent, HelixBeforeMoveEvent, HelixBeforeOpenEvent, HelixBeforePanelResizeEvent, HelixBeforePasteEvent, HelixBeforePinEvent, HelixBeforeReconnectEvent, HelixBeforeRelabelEvent, HelixBeforeReorderEvent, HelixBeforeResizeEvent, HelixBeforeSplitEvent, HelixBeforeToggleEvent, HelixCanvasEditEvent, HelixCanvasPanEvent, HelixCanvasViewEvent, HelixCanvasZoomEvent, HelixCaretEvent, HelixClearEvent, HelixCollapseEvent, HelixCompleteEvent, HelixConnectEvent, HelixConsoleEvent, HelixCopyErrorEvent, HelixCopyEvent, HelixCreateEvent, HelixDismissEvent, HelixEditEvent, HelixEndEvent, HelixExpandEvent, HelixFacetEvent, HelixFilterEvent, HelixFilteredEvent, HelixGraphFilterEvent, HelixGraphLayoutEvent, HelixGraphPanEvent, HelixGraphPartChangeEvent, HelixGraphReadyEvent, HelixGraphSignalEvent, HelixGraphZoomEvent, HelixHistoryEvent, HelixLoadEvent, HelixLoadMoreEvent, HelixMapClusterEvent, HelixMapPanEvent, HelixMapPartChangeEvent, HelixMapReadyEvent, HelixMapRotateEvent, HelixMapTiltEvent, HelixMapZoomEvent, HelixMoveEvent, HelixNavigateEvent, HelixNextEvent, HelixPanelResizeEvent, HelixPastedEvent, HelixPinEvent, HelixPressEvent, HelixPreviewEvent, HelixPreviousEvent, HelixRangeChangeEvent, HelixReadEvent, HelixReadingChangeEvent, HelixReadingPressEvent, HelixReconnectEvent, HelixRejectEvent, HelixRelabelEvent, HelixRemoveEvent, HelixReorderEvent, HelixReorderedEvent, HelixResizedEvent, HelixResizeEvent, HelixSampleEndEvent, HelixSampleStartEvent, HelixScrolledEvent, HelixSelectEvent, HelixSelectedEvent, HelixSendEvent, HelixShortcutEvent, HelixSortEvent, HelixSortedEvent, HelixSplitEvent, HelixStrandsFallbackEvent, HelixToggleEvent, HelixTourAskEvent, HelixTourStatusEvent, HelixTypingEvent, type MapClusterDetail, type MapPanDetail, type MapPartChangeDetail, type MapRotateDetail, type MapTiltDetail, type MapZoomDetail, type MoveDetail, type NavigateDetail, type OpenDetail, type PasteDetail, type PressDetail, type PressPointerType, type RangeDetail, type ReadDetail, type ReadingDetail, type ReconnectDetail, type Refusal, type RefusedFile, type RejectDetail, type RelabelDetail, type RemoveDetail, type ReorderDetail, type ResizeDetail, type ScrolledDetail, type SelectDetail, type SendDetail, type ShortcutDetail, type SkipDetail, type SortDetail, type StrandsFallbackDetail, type ToggleDetail, type TourStatusDetail, type TypingDetail, type ViewportPanDetail, type ViewportZoomDetail, } from './events/events.js';
|
|
41
41
|
export { HelixElement, whenHydrated } from './helix-element/helix-element.js';
|
|
42
|
+
export { MIRROR_RULE, SCROLLER_RULE, SPOKEN_RULE, VIRTUAL_RULE, } from './helix-element/mark-rules.js';
|
|
42
43
|
export { HelixFormElement } from './helix-form-element/helix-form-element.js';
|
|
44
|
+
export { HelixFormElementBase } from './helix-form-element/helix-form-element-base.js';
|
|
43
45
|
export { MixinChartSource, type MixinChartSourceInterface, PALETTE, PLOT_HEIGHT, PLOT_WIDTH, POSITION_LABEL, seriesIndex, seriesNames, } from './mixins/mixin-chart-source/mixin-chart-source.js';
|
|
44
46
|
export { MixinChartStatus, type MixinChartStatusInterface, } from './mixins/mixin-chart-status/mixin-chart-status.js';
|
|
45
47
|
export { type CollectionElement, MixinCollection, } from './mixins/mixin-collection/mixin-collection.js';
|
package/dist/index.js
CHANGED
|
@@ -39,7 +39,9 @@ export { VirtualizeController, } from './controllers/virtualize-controller/virtu
|
|
|
39
39
|
export { eventsForTag, registerElementEvents } from './events/element-events.js';
|
|
40
40
|
export { HelixActionEvent, HelixActivateEvent, HelixAuraFallbackEvent, HelixBandEvent, HelixBeforeActivateEvent, HelixBeforeChangeEvent, HelixBeforeCloseEvent, HelixBeforeCollapseEvent, HelixBeforeEditEvent, HelixBeforeMoveEvent, HelixBeforeOpenEvent, HelixBeforePanelResizeEvent, HelixBeforePasteEvent, HelixBeforePinEvent, HelixBeforeReconnectEvent, HelixBeforeRelabelEvent, HelixBeforeReorderEvent, HelixBeforeResizeEvent, HelixBeforeSplitEvent, HelixBeforeToggleEvent, HelixCanvasEditEvent, HelixCanvasPanEvent, HelixCanvasViewEvent, HelixCanvasZoomEvent, HelixCaretEvent, HelixClearEvent, HelixCollapseEvent, HelixCompleteEvent, HelixConnectEvent, HelixConsoleEvent, HelixCopyErrorEvent, HelixCopyEvent, HelixCreateEvent, HelixDismissEvent, HelixEditEvent, HelixEndEvent, HelixExpandEvent, HelixFacetEvent, HelixFilterEvent, HelixFilteredEvent, HelixGraphFilterEvent, HelixGraphLayoutEvent, HelixGraphPanEvent, HelixGraphPartChangeEvent, HelixGraphReadyEvent, HelixGraphSignalEvent, HelixGraphZoomEvent, HelixHistoryEvent, HelixLoadEvent, HelixLoadMoreEvent, HelixMapClusterEvent, HelixMapPanEvent, HelixMapPartChangeEvent, HelixMapReadyEvent, HelixMapRotateEvent, HelixMapTiltEvent, HelixMapZoomEvent, HelixMoveEvent, HelixNavigateEvent, HelixNextEvent, HelixPanelResizeEvent, HelixPastedEvent, HelixPinEvent, HelixPressEvent, HelixPreviewEvent, HelixPreviousEvent, HelixRangeChangeEvent, HelixReadEvent, HelixReadingChangeEvent, HelixReadingPressEvent, HelixReconnectEvent, HelixRejectEvent, HelixRelabelEvent, HelixRemoveEvent, HelixReorderEvent, HelixReorderedEvent, HelixResizedEvent, HelixResizeEvent, HelixSampleEndEvent, HelixSampleStartEvent, HelixScrolledEvent, HelixSelectEvent, HelixSelectedEvent, HelixSendEvent, HelixShortcutEvent, HelixSortEvent, HelixSortedEvent, HelixSplitEvent, HelixStrandsFallbackEvent, HelixToggleEvent, HelixTourAskEvent, HelixTourStatusEvent, HelixTypingEvent, } from './events/events.js';
|
|
41
41
|
export { HelixElement, whenHydrated } from './helix-element/helix-element.js';
|
|
42
|
+
export { MIRROR_RULE, SCROLLER_RULE, SPOKEN_RULE, VIRTUAL_RULE, } from './helix-element/mark-rules.js';
|
|
42
43
|
export { HelixFormElement } from './helix-form-element/helix-form-element.js';
|
|
44
|
+
export { HelixFormElementBase } from './helix-form-element/helix-form-element-base.js';
|
|
43
45
|
export { MixinChartSource, PALETTE, PLOT_HEIGHT, PLOT_WIDTH, POSITION_LABEL, seriesIndex, seriesNames, } from './mixins/mixin-chart-source/mixin-chart-source.js';
|
|
44
46
|
export { MixinChartStatus, } from './mixins/mixin-chart-status/mixin-chart-status.js';
|
|
45
47
|
export { MixinCollection, } from './mixins/mixin-collection/mixin-collection.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { html, nothing } from 'lit';
|
|
8
3
|
import { property } from 'lit/decorators.js';
|
|
9
4
|
import { ChartPointerController } from '../../controllers/chart-pointer-controller/chart-pointer-controller.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { html, nothing } from 'lit';
|
|
8
3
|
import { property } from 'lit/decorators.js';
|
|
9
4
|
import { CHART_PLOT } from '../../controllers/chart-pointer-controller/chart-pointer-controller.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { html, nothing } from 'lit';
|
|
8
3
|
import { property, state } from 'lit/decorators.js';
|
|
9
4
|
import { words } from '../../words/words.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { property } from 'lit/decorators.js';
|
|
8
3
|
import { HelixActivateEvent, HelixBeforeActivateEvent } from '../../events/events.js';
|
|
9
4
|
import { requestChange } from '../../utils/request-change/request-change.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { property } from 'lit/decorators.js';
|
|
8
3
|
import { HelixBeforeToggleEvent } from '../../events/events.js';
|
|
9
4
|
import { requestChange } from '../../utils/request-change/request-change.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { property } from 'lit/decorators.js';
|
|
8
3
|
import { HelixBeforeCloseEvent, HelixBeforeOpenEvent } from '../../events/events.js';
|
|
9
4
|
import { requestChange } from '../../utils/request-change/request-change.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { property } from 'lit/decorators.js';
|
|
8
3
|
import { HelixBeforeChangeEvent } from '../../events/events.js';
|
|
9
4
|
import { requestChange } from '../../utils/request-change/request-change.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { property } from 'lit/decorators.js';
|
|
8
3
|
import { HelixDismissEvent } from '../../events/events.js';
|
|
9
4
|
import { deepActiveElement, deepContains, } from '../../utils/focusable-elements/focusable-elements.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { html, nothing } from 'lit';
|
|
8
3
|
import { property, state } from 'lit/decorators.js';
|
|
9
4
|
import { auditName } from '@fusion.dev/helix-core/audits/name';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "tslib";
|
|
7
2
|
import { property, state } from 'lit/decorators.js';
|
|
8
3
|
const caretKeys = new Set(['ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'End', 'Home']);
|
|
9
4
|
export const MixinPickerEditing = (Base) => {
|