@ni/fast-foundation 10.0.1 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fast-foundation.js
CHANGED
|
@@ -33,7 +33,7 @@ const $global = (function () {
|
|
|
33
33
|
}
|
|
34
34
|
})();
|
|
35
35
|
// API-only Polyfill for trustedTypes
|
|
36
|
-
if ($global.trustedTypes ===
|
|
36
|
+
if ($global.trustedTypes === void 0) {
|
|
37
37
|
$global.trustedTypes = { createPolicy: (n, r) => r };
|
|
38
38
|
}
|
|
39
39
|
const propConfig = {
|
|
@@ -41,7 +41,7 @@ const propConfig = {
|
|
|
41
41
|
enumerable: false,
|
|
42
42
|
writable: false,
|
|
43
43
|
};
|
|
44
|
-
if ($global.FAST ===
|
|
44
|
+
if ($global.FAST === void 0) {
|
|
45
45
|
Reflect.defineProperty($global, "FAST", Object.assign({ value: Object.create(null) }, propConfig));
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
@@ -49,11 +49,11 @@ if ($global.FAST === undefined) {
|
|
|
49
49
|
* @internal
|
|
50
50
|
*/
|
|
51
51
|
const FAST = $global.FAST;
|
|
52
|
-
if (FAST.getById ===
|
|
52
|
+
if (FAST.getById === void 0) {
|
|
53
53
|
const storage = Object.create(null);
|
|
54
54
|
Reflect.defineProperty(FAST, "getById", Object.assign({ value(id, initialize) {
|
|
55
55
|
let found = storage[id];
|
|
56
|
-
if (found ===
|
|
56
|
+
if (found === void 0) {
|
|
57
57
|
found = initialize ? (storage[id] = initialize()) : null;
|
|
58
58
|
}
|
|
59
59
|
return found;
|
|
@@ -76,13 +76,13 @@ function createMetadataLocator() {
|
|
|
76
76
|
const metadataLookup = new WeakMap();
|
|
77
77
|
return function (target) {
|
|
78
78
|
let metadata = metadataLookup.get(target);
|
|
79
|
-
if (metadata ===
|
|
79
|
+
if (metadata === void 0) {
|
|
80
80
|
let currentTarget = Reflect.getPrototypeOf(target);
|
|
81
|
-
while (metadata ===
|
|
81
|
+
while (metadata === void 0 && currentTarget !== null) {
|
|
82
82
|
metadata = metadataLookup.get(currentTarget);
|
|
83
83
|
currentTarget = Reflect.getPrototypeOf(currentTarget);
|
|
84
84
|
}
|
|
85
|
-
metadata = metadata ===
|
|
85
|
+
metadata = metadata === void 0 ? [] : metadata.slice(0);
|
|
86
86
|
metadataLookup.set(target, metadata);
|
|
87
87
|
}
|
|
88
88
|
return metadata;
|
|
@@ -314,9 +314,9 @@ class SubscriberSet {
|
|
|
314
314
|
* @param initialSubscriber - An initial subscriber to changes.
|
|
315
315
|
*/
|
|
316
316
|
constructor(source, initialSubscriber) {
|
|
317
|
-
this.sub1 =
|
|
318
|
-
this.sub2 =
|
|
319
|
-
this.spillover =
|
|
317
|
+
this.sub1 = void 0;
|
|
318
|
+
this.sub2 = void 0;
|
|
319
|
+
this.spillover = void 0;
|
|
320
320
|
this.source = source;
|
|
321
321
|
this.sub1 = initialSubscriber;
|
|
322
322
|
}
|
|
@@ -325,7 +325,7 @@ class SubscriberSet {
|
|
|
325
325
|
* @param subscriber - The subscriber to test for inclusion in this set.
|
|
326
326
|
*/
|
|
327
327
|
has(subscriber) {
|
|
328
|
-
return this.spillover ===
|
|
328
|
+
return this.spillover === void 0
|
|
329
329
|
? this.sub1 === subscriber || this.sub2 === subscriber
|
|
330
330
|
: this.spillover.indexOf(subscriber) !== -1;
|
|
331
331
|
}
|
|
@@ -335,21 +335,21 @@ class SubscriberSet {
|
|
|
335
335
|
*/
|
|
336
336
|
subscribe(subscriber) {
|
|
337
337
|
const spillover = this.spillover;
|
|
338
|
-
if (spillover ===
|
|
338
|
+
if (spillover === void 0) {
|
|
339
339
|
if (this.has(subscriber)) {
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
if (this.sub1 ===
|
|
342
|
+
if (this.sub1 === void 0) {
|
|
343
343
|
this.sub1 = subscriber;
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
|
-
if (this.sub2 ===
|
|
346
|
+
if (this.sub2 === void 0) {
|
|
347
347
|
this.sub2 = subscriber;
|
|
348
348
|
return;
|
|
349
349
|
}
|
|
350
350
|
this.spillover = [this.sub1, this.sub2, subscriber];
|
|
351
|
-
this.sub1 =
|
|
352
|
-
this.sub2 =
|
|
351
|
+
this.sub1 = void 0;
|
|
352
|
+
this.sub2 = void 0;
|
|
353
353
|
}
|
|
354
354
|
else {
|
|
355
355
|
const index = spillover.indexOf(subscriber);
|
|
@@ -364,12 +364,12 @@ class SubscriberSet {
|
|
|
364
364
|
*/
|
|
365
365
|
unsubscribe(subscriber) {
|
|
366
366
|
const spillover = this.spillover;
|
|
367
|
-
if (spillover ===
|
|
367
|
+
if (spillover === void 0) {
|
|
368
368
|
if (this.sub1 === subscriber) {
|
|
369
|
-
this.sub1 =
|
|
369
|
+
this.sub1 = void 0;
|
|
370
370
|
}
|
|
371
371
|
else if (this.sub2 === subscriber) {
|
|
372
|
-
this.sub2 =
|
|
372
|
+
this.sub2 = void 0;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
else {
|
|
@@ -386,13 +386,13 @@ class SubscriberSet {
|
|
|
386
386
|
notify(args) {
|
|
387
387
|
const spillover = this.spillover;
|
|
388
388
|
const source = this.source;
|
|
389
|
-
if (spillover ===
|
|
389
|
+
if (spillover === void 0) {
|
|
390
390
|
const sub1 = this.sub1;
|
|
391
391
|
const sub2 = this.sub2;
|
|
392
|
-
if (sub1 !==
|
|
392
|
+
if (sub1 !== void 0) {
|
|
393
393
|
sub1.handleChange(source, args);
|
|
394
394
|
}
|
|
395
|
-
if (sub2 !==
|
|
395
|
+
if (sub2 !== void 0) {
|
|
396
396
|
sub2.handleChange(source, args);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
@@ -425,10 +425,10 @@ class PropertyChangeNotifier {
|
|
|
425
425
|
notify(propertyName) {
|
|
426
426
|
var _a;
|
|
427
427
|
const subscribers = this.subscribers[propertyName];
|
|
428
|
-
if (subscribers !==
|
|
428
|
+
if (subscribers !== void 0) {
|
|
429
429
|
subscribers.notify(propertyName);
|
|
430
430
|
}
|
|
431
|
-
(_a = this.sourceSubscribers) === null || _a ===
|
|
431
|
+
(_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.notify(propertyName);
|
|
432
432
|
}
|
|
433
433
|
/**
|
|
434
434
|
* Subscribes to notification of changes in an object's state.
|
|
@@ -439,14 +439,14 @@ class PropertyChangeNotifier {
|
|
|
439
439
|
var _a;
|
|
440
440
|
if (propertyToWatch) {
|
|
441
441
|
let subscribers = this.subscribers[propertyToWatch];
|
|
442
|
-
if (subscribers ===
|
|
442
|
+
if (subscribers === void 0) {
|
|
443
443
|
this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);
|
|
444
444
|
}
|
|
445
445
|
subscribers.subscribe(subscriber);
|
|
446
446
|
}
|
|
447
447
|
else {
|
|
448
448
|
this.sourceSubscribers =
|
|
449
|
-
(_a = this.sourceSubscribers) !== null && _a !==
|
|
449
|
+
(_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);
|
|
450
450
|
this.sourceSubscribers.subscribe(subscriber);
|
|
451
451
|
}
|
|
452
452
|
}
|
|
@@ -459,12 +459,12 @@ class PropertyChangeNotifier {
|
|
|
459
459
|
var _a;
|
|
460
460
|
if (propertyToUnwatch) {
|
|
461
461
|
const subscribers = this.subscribers[propertyToUnwatch];
|
|
462
|
-
if (subscribers !==
|
|
462
|
+
if (subscribers !== void 0) {
|
|
463
463
|
subscribers.unsubscribe(subscriber);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
else {
|
|
467
|
-
(_a = this.sourceSubscribers) === null || _a ===
|
|
467
|
+
(_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.unsubscribe(subscriber);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
}
|
|
@@ -477,13 +477,13 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
477
477
|
const volatileRegex = /(:|&&|\|\||if)/;
|
|
478
478
|
const notifierLookup = new WeakMap();
|
|
479
479
|
const queueUpdate = DOM.queueUpdate;
|
|
480
|
-
let watcher =
|
|
480
|
+
let watcher = void 0;
|
|
481
481
|
let createArrayObserver = (array) => {
|
|
482
482
|
throw new Error("Must call enableArrayObservation before observing arrays.");
|
|
483
483
|
};
|
|
484
484
|
function getNotifier(source) {
|
|
485
485
|
let found = source.$fastController || notifierLookup.get(source);
|
|
486
|
-
if (found ===
|
|
486
|
+
if (found === void 0) {
|
|
487
487
|
if (Array.isArray(source)) {
|
|
488
488
|
found = createArrayObserver(source);
|
|
489
489
|
}
|
|
@@ -501,7 +501,7 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
501
501
|
this.callback = `${name}Changed`;
|
|
502
502
|
}
|
|
503
503
|
getValue(source) {
|
|
504
|
-
if (watcher !==
|
|
504
|
+
if (watcher !== void 0) {
|
|
505
505
|
watcher.watch(source, this.name);
|
|
506
506
|
}
|
|
507
507
|
return source[this.field];
|
|
@@ -528,17 +528,17 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
528
528
|
this.needsQueue = true;
|
|
529
529
|
this.first = this;
|
|
530
530
|
this.last = null;
|
|
531
|
-
this.propertySource =
|
|
532
|
-
this.propertyName =
|
|
533
|
-
this.notifier =
|
|
534
|
-
this.next =
|
|
531
|
+
this.propertySource = void 0;
|
|
532
|
+
this.propertyName = void 0;
|
|
533
|
+
this.notifier = void 0;
|
|
534
|
+
this.next = void 0;
|
|
535
535
|
}
|
|
536
536
|
observe(source, context) {
|
|
537
537
|
if (this.needsRefresh && this.last !== null) {
|
|
538
538
|
this.disconnect();
|
|
539
539
|
}
|
|
540
540
|
const previousWatcher = watcher;
|
|
541
|
-
watcher = this.needsRefresh ? this :
|
|
541
|
+
watcher = this.needsRefresh ? this : void 0;
|
|
542
542
|
this.needsRefresh = this.isVolatileBinding;
|
|
543
543
|
const result = this.binding(source, context);
|
|
544
544
|
watcher = previousWatcher;
|
|
@@ -547,7 +547,7 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
547
547
|
disconnect() {
|
|
548
548
|
if (this.last !== null) {
|
|
549
549
|
let current = this.first;
|
|
550
|
-
while (current !==
|
|
550
|
+
while (current !== void 0) {
|
|
551
551
|
current.notifier.unsubscribe(this, current.propertyName);
|
|
552
552
|
current = current.next;
|
|
553
553
|
}
|
|
@@ -569,7 +569,7 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
569
569
|
// a bug in Angular's optimization process causing infinite recursion
|
|
570
570
|
// of this watch() method. Details https://github.com/microsoft/fast/issues/4969
|
|
571
571
|
let prevValue;
|
|
572
|
-
watcher =
|
|
572
|
+
watcher = void 0;
|
|
573
573
|
/* eslint-disable-next-line */
|
|
574
574
|
prevValue = prev.propertySource[prev.propertyName];
|
|
575
575
|
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
@@ -600,7 +600,7 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
600
600
|
next: () => {
|
|
601
601
|
const current = next;
|
|
602
602
|
if (current === undefined) {
|
|
603
|
-
return { value:
|
|
603
|
+
return { value: void 0, done: true };
|
|
604
604
|
}
|
|
605
605
|
else {
|
|
606
606
|
next = next.next;
|
|
@@ -635,7 +635,7 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
635
635
|
* @param propertyName - The property to track as changed.
|
|
636
636
|
*/
|
|
637
637
|
track(source, propertyName) {
|
|
638
|
-
if (watcher !==
|
|
638
|
+
if (watcher !== void 0) {
|
|
639
639
|
watcher.watch(source, propertyName);
|
|
640
640
|
}
|
|
641
641
|
},
|
|
@@ -644,7 +644,7 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
644
644
|
* with respect to its observable dependencies.
|
|
645
645
|
*/
|
|
646
646
|
trackVolatile() {
|
|
647
|
-
if (watcher !==
|
|
647
|
+
if (watcher !== void 0) {
|
|
648
648
|
watcher.needsRefresh = true;
|
|
649
649
|
}
|
|
650
650
|
},
|
|
@@ -906,7 +906,7 @@ function contentUnbind() {
|
|
|
906
906
|
this.source = null;
|
|
907
907
|
this.context = null;
|
|
908
908
|
const view = this.target.$fastView;
|
|
909
|
-
if (view !==
|
|
909
|
+
if (view !== void 0 && view.isComposed) {
|
|
910
910
|
view.unbind();
|
|
911
911
|
view.needsBindOnly = true;
|
|
912
912
|
}
|
|
@@ -934,7 +934,7 @@ function updateContentTarget(value) {
|
|
|
934
934
|
let view = this.target.$fastView;
|
|
935
935
|
// If there's no previous view that we might be able to
|
|
936
936
|
// reuse then create a new view from the template.
|
|
937
|
-
if (view ===
|
|
937
|
+
if (view === void 0) {
|
|
938
938
|
view = value.create();
|
|
939
939
|
}
|
|
940
940
|
else {
|
|
@@ -968,7 +968,7 @@ function updateContentTarget(value) {
|
|
|
968
968
|
const view = this.target.$fastView;
|
|
969
969
|
// If there is a view and it's currently composed into
|
|
970
970
|
// the DOM, then we need to remove it.
|
|
971
|
-
if (view !==
|
|
971
|
+
if (view !== void 0 && view.isComposed) {
|
|
972
972
|
view.isComposed = false;
|
|
973
973
|
view.remove();
|
|
974
974
|
if (view.needsBindOnly) {
|
|
@@ -1040,7 +1040,7 @@ class HTMLBindingDirective extends TargetedHTMLDirective {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
set targetName(value) {
|
|
1042
1042
|
this.originalTargetName = value;
|
|
1043
|
-
if (value ===
|
|
1043
|
+
if (value === void 0) {
|
|
1044
1044
|
return;
|
|
1045
1045
|
}
|
|
1046
1046
|
switch (value[0]) {
|
|
@@ -1565,7 +1565,7 @@ class ViewTemplate {
|
|
|
1565
1565
|
if (typeof host === "string") {
|
|
1566
1566
|
host = document.getElementById(host);
|
|
1567
1567
|
}
|
|
1568
|
-
if (hostBindingTarget ===
|
|
1568
|
+
if (hostBindingTarget === void 0) {
|
|
1569
1569
|
hostBindingTarget = host;
|
|
1570
1570
|
}
|
|
1571
1571
|
const view = this.create(hostBindingTarget);
|
|
@@ -1737,7 +1737,7 @@ if (DOM.supportsAdoptedStyleSheets) {
|
|
|
1737
1737
|
*/
|
|
1738
1738
|
class AdoptedStyleSheetsStyles extends ElementStyles {
|
|
1739
1739
|
get styleSheets() {
|
|
1740
|
-
if (this._styleSheets ===
|
|
1740
|
+
if (this._styleSheets === void 0) {
|
|
1741
1741
|
const styles = this.styles;
|
|
1742
1742
|
const styleSheetCache = this.styleSheetCache;
|
|
1743
1743
|
this._styleSheets = reduceStyles(styles).map((x) => {
|
|
@@ -1745,7 +1745,7 @@ class AdoptedStyleSheetsStyles extends ElementStyles {
|
|
|
1745
1745
|
return x;
|
|
1746
1746
|
}
|
|
1747
1747
|
let sheet = styleSheetCache.get(x);
|
|
1748
|
-
if (sheet ===
|
|
1748
|
+
if (sheet === void 0) {
|
|
1749
1749
|
sheet = new CSSStyleSheet();
|
|
1750
1750
|
sheet.replaceSync(x);
|
|
1751
1751
|
styleSheetCache.set(x, sheet);
|
|
@@ -1759,7 +1759,7 @@ class AdoptedStyleSheetsStyles extends ElementStyles {
|
|
|
1759
1759
|
super();
|
|
1760
1760
|
this.styles = styles;
|
|
1761
1761
|
this.styleSheetCache = styleSheetCache;
|
|
1762
|
-
this._styleSheets =
|
|
1762
|
+
this._styleSheets = void 0;
|
|
1763
1763
|
this.behaviors = reduceBehaviors(styles);
|
|
1764
1764
|
}
|
|
1765
1765
|
addStylesTo(target) {
|
|
@@ -1837,7 +1837,7 @@ const booleanConverter = {
|
|
|
1837
1837
|
},
|
|
1838
1838
|
fromView(value) {
|
|
1839
1839
|
if (value === null ||
|
|
1840
|
-
value ===
|
|
1840
|
+
value === void 0 ||
|
|
1841
1841
|
value === "false" ||
|
|
1842
1842
|
value === false ||
|
|
1843
1843
|
value === 0) {
|
|
@@ -1895,7 +1895,7 @@ class AttributeDefinition {
|
|
|
1895
1895
|
this.fieldName = `_${name}`;
|
|
1896
1896
|
this.callbackName = `${name}Changed`;
|
|
1897
1897
|
this.hasCallback = this.callbackName in Owner.prototype;
|
|
1898
|
-
if (mode === "boolean" && converter ===
|
|
1898
|
+
if (mode === "boolean" && converter === void 0) {
|
|
1899
1899
|
this.converter = booleanConverter;
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
@@ -1907,7 +1907,7 @@ class AttributeDefinition {
|
|
|
1907
1907
|
setValue(source, newValue) {
|
|
1908
1908
|
const oldValue = source[this.fieldName];
|
|
1909
1909
|
const converter = this.converter;
|
|
1910
|
-
if (converter !==
|
|
1910
|
+
if (converter !== void 0) {
|
|
1911
1911
|
newValue = converter.fromView(newValue);
|
|
1912
1912
|
}
|
|
1913
1913
|
if (oldValue !== newValue) {
|
|
@@ -1948,7 +1948,7 @@ class AttributeDefinition {
|
|
|
1948
1948
|
switch (mode) {
|
|
1949
1949
|
case "reflect":
|
|
1950
1950
|
const converter = this.converter;
|
|
1951
|
-
DOM.setAttribute(element, this.attribute, converter !==
|
|
1951
|
+
DOM.setAttribute(element, this.attribute, converter !== void 0 ? converter.toView(latestValue) : latestValue);
|
|
1952
1952
|
break;
|
|
1953
1953
|
case "boolean":
|
|
1954
1954
|
DOM.setBooleanAttribute(element, this.attribute, latestValue);
|
|
@@ -1968,7 +1968,7 @@ class AttributeDefinition {
|
|
|
1968
1968
|
attributeLists.push(AttributeConfiguration.locate(Owner));
|
|
1969
1969
|
for (let i = 0, ii = attributeLists.length; i < ii; ++i) {
|
|
1970
1970
|
const list = attributeLists[i];
|
|
1971
|
-
if (list ===
|
|
1971
|
+
if (list === void 0) {
|
|
1972
1972
|
continue;
|
|
1973
1973
|
}
|
|
1974
1974
|
for (let j = 0, jj = list.length; j < jj; ++j) {
|
|
@@ -2007,7 +2007,7 @@ function attr(configOrTarget, prop) {
|
|
|
2007
2007
|
// Invocation with or w/o opts:
|
|
2008
2008
|
// - @attr()
|
|
2009
2009
|
// - @attr({...opts})
|
|
2010
|
-
config = configOrTarget ===
|
|
2010
|
+
config = configOrTarget === void 0 ? {} : configOrTarget;
|
|
2011
2011
|
return decorator;
|
|
2012
2012
|
}
|
|
2013
2013
|
|
|
@@ -2067,18 +2067,18 @@ class FASTElementDefinition {
|
|
|
2067
2067
|
this.propertyLookup = propertyLookup;
|
|
2068
2068
|
this.attributeLookup = attributeLookup;
|
|
2069
2069
|
this.shadowOptions =
|
|
2070
|
-
nameOrConfig.shadowOptions ===
|
|
2070
|
+
nameOrConfig.shadowOptions === void 0
|
|
2071
2071
|
? defaultShadowOptions
|
|
2072
2072
|
: nameOrConfig.shadowOptions === null
|
|
2073
|
-
?
|
|
2073
|
+
? void 0
|
|
2074
2074
|
: Object.assign(Object.assign({}, defaultShadowOptions), nameOrConfig.shadowOptions);
|
|
2075
2075
|
this.elementOptions =
|
|
2076
|
-
nameOrConfig.elementOptions ===
|
|
2076
|
+
nameOrConfig.elementOptions === void 0
|
|
2077
2077
|
? defaultElementOptions
|
|
2078
2078
|
: Object.assign(Object.assign({}, defaultElementOptions), nameOrConfig.elementOptions);
|
|
2079
2079
|
this.styles =
|
|
2080
|
-
nameOrConfig.styles ===
|
|
2081
|
-
?
|
|
2080
|
+
nameOrConfig.styles === void 0
|
|
2081
|
+
? void 0
|
|
2082
2082
|
: Array.isArray(nameOrConfig.styles)
|
|
2083
2083
|
? ElementStyles.create(nameOrConfig.styles)
|
|
2084
2084
|
: nameOrConfig.styles instanceof ElementStyles
|
|
@@ -2210,7 +2210,7 @@ class Controller extends PropertyChangeNotifier {
|
|
|
2210
2210
|
this.element = element;
|
|
2211
2211
|
this.definition = definition;
|
|
2212
2212
|
const shadowOptions = definition.shadowOptions;
|
|
2213
|
-
if (shadowOptions !==
|
|
2213
|
+
if (shadowOptions !== void 0) {
|
|
2214
2214
|
const shadowRoot = element.attachShadow(shadowOptions);
|
|
2215
2215
|
if (shadowOptions.mode === "closed") {
|
|
2216
2216
|
shadowRoots.set(element, shadowRoot);
|
|
@@ -2226,7 +2226,7 @@ class Controller extends PropertyChangeNotifier {
|
|
|
2226
2226
|
for (let i = 0, ii = accessors.length; i < ii; ++i) {
|
|
2227
2227
|
const propertyName = accessors[i].name;
|
|
2228
2228
|
const value = element[propertyName];
|
|
2229
|
-
if (value !==
|
|
2229
|
+
if (value !== void 0) {
|
|
2230
2230
|
delete element[propertyName];
|
|
2231
2231
|
boundObservables[propertyName] = value;
|
|
2232
2232
|
}
|
|
@@ -2372,7 +2372,7 @@ class Controller extends PropertyChangeNotifier {
|
|
|
2372
2372
|
*/
|
|
2373
2373
|
onAttributeChangedCallback(name, oldValue, newValue) {
|
|
2374
2374
|
const attrDef = this.definition.attributeLookup[name];
|
|
2375
|
-
if (attrDef !==
|
|
2375
|
+
if (attrDef !== void 0) {
|
|
2376
2376
|
attrDef.onAttributeChangedCallback(this.element, newValue);
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
@@ -2467,11 +2467,11 @@ class Controller extends PropertyChangeNotifier {
|
|
|
2467
2467
|
*/
|
|
2468
2468
|
static forCustomElement(element) {
|
|
2469
2469
|
const controller = element.$fastController;
|
|
2470
|
-
if (controller !==
|
|
2470
|
+
if (controller !== void 0) {
|
|
2471
2471
|
return controller;
|
|
2472
2472
|
}
|
|
2473
2473
|
const definition = FASTElementDefinition.forType(element.constructor);
|
|
2474
|
-
if (definition ===
|
|
2474
|
+
if (definition === void 0) {
|
|
2475
2475
|
throw new Error("Missing FASTElement definition.");
|
|
2476
2476
|
}
|
|
2477
2477
|
return (element.$fastController = new Controller(element, definition));
|
|
@@ -2861,21 +2861,21 @@ function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {
|
|
|
2861
2861
|
}
|
|
2862
2862
|
const ops = spliceOperationsFromEditDistances(calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
|
|
2863
2863
|
const splices = [];
|
|
2864
|
-
let splice =
|
|
2864
|
+
let splice = void 0;
|
|
2865
2865
|
let index = currentStart;
|
|
2866
2866
|
let oldIndex = oldStart;
|
|
2867
2867
|
for (let i = 0; i < ops.length; ++i) {
|
|
2868
2868
|
switch (ops[i]) {
|
|
2869
2869
|
case EDIT_LEAVE:
|
|
2870
|
-
if (splice !==
|
|
2870
|
+
if (splice !== void 0) {
|
|
2871
2871
|
splices.push(splice);
|
|
2872
|
-
splice =
|
|
2872
|
+
splice = void 0;
|
|
2873
2873
|
}
|
|
2874
2874
|
index++;
|
|
2875
2875
|
oldIndex++;
|
|
2876
2876
|
break;
|
|
2877
2877
|
case EDIT_UPDATE:
|
|
2878
|
-
if (splice ===
|
|
2878
|
+
if (splice === void 0) {
|
|
2879
2879
|
splice = newSplice(index, [], 0);
|
|
2880
2880
|
}
|
|
2881
2881
|
splice.addedCount++;
|
|
@@ -2884,14 +2884,14 @@ function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {
|
|
|
2884
2884
|
oldIndex++;
|
|
2885
2885
|
break;
|
|
2886
2886
|
case EDIT_ADD:
|
|
2887
|
-
if (splice ===
|
|
2887
|
+
if (splice === void 0) {
|
|
2888
2888
|
splice = newSplice(index, [], 0);
|
|
2889
2889
|
}
|
|
2890
2890
|
splice.addedCount++;
|
|
2891
2891
|
index++;
|
|
2892
2892
|
break;
|
|
2893
2893
|
case EDIT_DELETE:
|
|
2894
|
-
if (splice ===
|
|
2894
|
+
if (splice === void 0) {
|
|
2895
2895
|
splice = newSplice(index, [], 0);
|
|
2896
2896
|
}
|
|
2897
2897
|
splice.removed.push(old[oldIndex]);
|
|
@@ -2900,7 +2900,7 @@ function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {
|
|
|
2900
2900
|
// no default
|
|
2901
2901
|
}
|
|
2902
2902
|
}
|
|
2903
|
-
if (splice !==
|
|
2903
|
+
if (splice !== void 0) {
|
|
2904
2904
|
splices.push(splice);
|
|
2905
2905
|
}
|
|
2906
2906
|
return splices;
|
|
@@ -3007,8 +3007,8 @@ function adjustIndex(changeRecord, array) {
|
|
|
3007
3007
|
class ArrayObserver extends SubscriberSet {
|
|
3008
3008
|
constructor(source) {
|
|
3009
3009
|
super(source);
|
|
3010
|
-
this.oldCollection =
|
|
3011
|
-
this.splices =
|
|
3010
|
+
this.oldCollection = void 0;
|
|
3011
|
+
this.splices = void 0;
|
|
3012
3012
|
this.needsQueue = true;
|
|
3013
3013
|
this.call = this.flush;
|
|
3014
3014
|
Reflect.defineProperty(source, "$fastController", {
|
|
@@ -3021,7 +3021,7 @@ class ArrayObserver extends SubscriberSet {
|
|
|
3021
3021
|
super.subscribe(subscriber);
|
|
3022
3022
|
}
|
|
3023
3023
|
addSplice(splice) {
|
|
3024
|
-
if (this.splices ===
|
|
3024
|
+
if (this.splices === void 0) {
|
|
3025
3025
|
this.splices = [splice];
|
|
3026
3026
|
}
|
|
3027
3027
|
else {
|
|
@@ -3042,13 +3042,13 @@ class ArrayObserver extends SubscriberSet {
|
|
|
3042
3042
|
flush() {
|
|
3043
3043
|
const splices = this.splices;
|
|
3044
3044
|
const oldCollection = this.oldCollection;
|
|
3045
|
-
if (splices ===
|
|
3045
|
+
if (splices === void 0 && oldCollection === void 0) {
|
|
3046
3046
|
return;
|
|
3047
3047
|
}
|
|
3048
3048
|
this.needsQueue = true;
|
|
3049
|
-
this.splices =
|
|
3050
|
-
this.oldCollection =
|
|
3051
|
-
const finalSplices = oldCollection ===
|
|
3049
|
+
this.splices = void 0;
|
|
3050
|
+
this.oldCollection = void 0;
|
|
3051
|
+
const finalSplices = oldCollection === void 0
|
|
3052
3052
|
? projectArraySplices(this.source, splices)
|
|
3053
3053
|
: calcSplices(this.source, 0, this.source.length, oldCollection, 0, oldCollection.length);
|
|
3054
3054
|
this.notify(finalSplices);
|
|
@@ -3093,7 +3093,7 @@ function enableArrayObservation() {
|
|
|
3093
3093
|
const notEmpty = this.length > 0;
|
|
3094
3094
|
const methodCallResult = pop.apply(this, arguments);
|
|
3095
3095
|
const o = this.$fastController;
|
|
3096
|
-
if (o !==
|
|
3096
|
+
if (o !== void 0 && notEmpty) {
|
|
3097
3097
|
o.addSplice(newSplice(this.length, [methodCallResult], 0));
|
|
3098
3098
|
}
|
|
3099
3099
|
return methodCallResult;
|
|
@@ -3101,7 +3101,7 @@ function enableArrayObservation() {
|
|
|
3101
3101
|
proto.push = function () {
|
|
3102
3102
|
const methodCallResult = push.apply(this, arguments);
|
|
3103
3103
|
const o = this.$fastController;
|
|
3104
|
-
if (o !==
|
|
3104
|
+
if (o !== void 0) {
|
|
3105
3105
|
o.addSplice(adjustIndex(newSplice(this.length - arguments.length, [], arguments.length), this));
|
|
3106
3106
|
}
|
|
3107
3107
|
return methodCallResult;
|
|
@@ -3109,12 +3109,12 @@ function enableArrayObservation() {
|
|
|
3109
3109
|
proto.reverse = function () {
|
|
3110
3110
|
let oldArray;
|
|
3111
3111
|
const o = this.$fastController;
|
|
3112
|
-
if (o !==
|
|
3112
|
+
if (o !== void 0) {
|
|
3113
3113
|
o.flush();
|
|
3114
3114
|
oldArray = this.slice();
|
|
3115
3115
|
}
|
|
3116
3116
|
const methodCallResult = reverse.apply(this, arguments);
|
|
3117
|
-
if (o !==
|
|
3117
|
+
if (o !== void 0) {
|
|
3118
3118
|
o.reset(oldArray);
|
|
3119
3119
|
}
|
|
3120
3120
|
return methodCallResult;
|
|
@@ -3123,7 +3123,7 @@ function enableArrayObservation() {
|
|
|
3123
3123
|
const notEmpty = this.length > 0;
|
|
3124
3124
|
const methodCallResult = shift.apply(this, arguments);
|
|
3125
3125
|
const o = this.$fastController;
|
|
3126
|
-
if (o !==
|
|
3126
|
+
if (o !== void 0 && notEmpty) {
|
|
3127
3127
|
o.addSplice(newSplice(0, [methodCallResult], 0));
|
|
3128
3128
|
}
|
|
3129
3129
|
return methodCallResult;
|
|
@@ -3131,12 +3131,12 @@ function enableArrayObservation() {
|
|
|
3131
3131
|
proto.sort = function () {
|
|
3132
3132
|
let oldArray;
|
|
3133
3133
|
const o = this.$fastController;
|
|
3134
|
-
if (o !==
|
|
3134
|
+
if (o !== void 0) {
|
|
3135
3135
|
o.flush();
|
|
3136
3136
|
oldArray = this.slice();
|
|
3137
3137
|
}
|
|
3138
3138
|
const methodCallResult = sort.apply(this, arguments);
|
|
3139
|
-
if (o !==
|
|
3139
|
+
if (o !== void 0) {
|
|
3140
3140
|
o.reset(oldArray);
|
|
3141
3141
|
}
|
|
3142
3142
|
return methodCallResult;
|
|
@@ -3144,7 +3144,7 @@ function enableArrayObservation() {
|
|
|
3144
3144
|
proto.splice = function () {
|
|
3145
3145
|
const methodCallResult = splice.apply(this, arguments);
|
|
3146
3146
|
const o = this.$fastController;
|
|
3147
|
-
if (o !==
|
|
3147
|
+
if (o !== void 0) {
|
|
3148
3148
|
o.addSplice(adjustIndex(newSplice(+arguments[0], methodCallResult, arguments.length > 2 ? arguments.length - 2 : 0), this));
|
|
3149
3149
|
}
|
|
3150
3150
|
return methodCallResult;
|
|
@@ -3152,7 +3152,7 @@ function enableArrayObservation() {
|
|
|
3152
3152
|
proto.unshift = function () {
|
|
3153
3153
|
const methodCallResult = unshift.apply(this, arguments);
|
|
3154
3154
|
const o = this.$fastController;
|
|
3155
|
-
if (o !==
|
|
3155
|
+
if (o !== void 0) {
|
|
3156
3156
|
o.addSplice(adjustIndex(newSplice(0, [], arguments.length), this));
|
|
3157
3157
|
}
|
|
3158
3158
|
return methodCallResult;
|
|
@@ -3263,8 +3263,8 @@ class RepeatBehavior {
|
|
|
3263
3263
|
this.views = [];
|
|
3264
3264
|
this.items = null;
|
|
3265
3265
|
this.itemsObserver = null;
|
|
3266
|
-
this.originalContext =
|
|
3267
|
-
this.childContext =
|
|
3266
|
+
this.originalContext = void 0;
|
|
3267
|
+
this.childContext = void 0;
|
|
3268
3268
|
this.bindView = bindWithoutPositioning;
|
|
3269
3269
|
this.itemsBindingObserver = Observable.binding(itemsBinding, this, isItemsBindingVolatile);
|
|
3270
3270
|
this.templateBindingObserver = Observable.binding(templateBinding, this, isTemplateBindingVolatile);
|
|
@@ -3549,7 +3549,7 @@ class NodeObservationBehavior {
|
|
|
3549
3549
|
}
|
|
3550
3550
|
computeNodes() {
|
|
3551
3551
|
let nodes = this.getNodes();
|
|
3552
|
-
if (this.options.filter !==
|
|
3552
|
+
if (this.options.filter !== void 0) {
|
|
3553
3553
|
nodes = nodes.filter(this.options.filter);
|
|
3554
3554
|
}
|
|
3555
3555
|
return nodes;
|
|
@@ -3682,7 +3682,7 @@ const endSlotTemplate = (context, definition) => html `
|
|
|
3682
3682
|
<span
|
|
3683
3683
|
part="end"
|
|
3684
3684
|
${ref("endContainer")}
|
|
3685
|
-
class=${x => (definition.end ? "end" :
|
|
3685
|
+
class=${x => (definition.end ? "end" : void 0)}
|
|
3686
3686
|
>
|
|
3687
3687
|
<slot name="end" ${ref("end")} @slotchange="${x => x.handleEndContentChange()}">
|
|
3688
3688
|
${definition.end || ""}
|
|
@@ -3699,7 +3699,7 @@ const startSlotTemplate = (context, definition) => html `
|
|
|
3699
3699
|
<span
|
|
3700
3700
|
part="start"
|
|
3701
3701
|
${ref("startContainer")}
|
|
3702
|
-
class="${x => (definition.start ? "start" :
|
|
3702
|
+
class="${x => (definition.start ? "start" : void 0)}"
|
|
3703
3703
|
>
|
|
3704
3704
|
<slot
|
|
3705
3705
|
name="start"
|
|
@@ -3834,17 +3834,17 @@ if (!("metadata" in Reflect)) {
|
|
|
3834
3834
|
};
|
|
3835
3835
|
Reflect.defineMetadata = function (key, value, target) {
|
|
3836
3836
|
let metadata = metadataByTarget.get(target);
|
|
3837
|
-
if (metadata ===
|
|
3837
|
+
if (metadata === void 0) {
|
|
3838
3838
|
metadataByTarget.set(target, (metadata = new Map()));
|
|
3839
3839
|
}
|
|
3840
3840
|
metadata.set(key, value);
|
|
3841
3841
|
};
|
|
3842
3842
|
Reflect.getOwnMetadata = function (key, target) {
|
|
3843
3843
|
const metadata = metadataByTarget.get(target);
|
|
3844
|
-
if (metadata !==
|
|
3844
|
+
if (metadata !== void 0) {
|
|
3845
3845
|
return metadata.get(key);
|
|
3846
3846
|
}
|
|
3847
|
-
return
|
|
3847
|
+
return void 0;
|
|
3848
3848
|
};
|
|
3849
3849
|
}
|
|
3850
3850
|
/**
|
|
@@ -3916,7 +3916,7 @@ class ResolverBuilder {
|
|
|
3916
3916
|
registerResolver(strategy, state) {
|
|
3917
3917
|
const { container, key } = this;
|
|
3918
3918
|
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
3919
|
-
this.container = this.key = (
|
|
3919
|
+
this.container = this.key = (void 0);
|
|
3920
3920
|
return container.registerResolver(key, new ResolverImpl(key, strategy, state));
|
|
3921
3921
|
}
|
|
3922
3922
|
}
|
|
@@ -4028,7 +4028,7 @@ const DI = Object.freeze({
|
|
|
4028
4028
|
bubbles: true,
|
|
4029
4029
|
composed: true,
|
|
4030
4030
|
cancelable: true,
|
|
4031
|
-
detail: { container:
|
|
4031
|
+
detail: { container: void 0 },
|
|
4032
4032
|
});
|
|
4033
4033
|
node.dispatchEvent(event);
|
|
4034
4034
|
return event.detail.container || DI.getOrCreateDOMContainer();
|
|
@@ -4076,7 +4076,7 @@ const DI = Object.freeze({
|
|
|
4076
4076
|
*/
|
|
4077
4077
|
getOrCreateAnnotationParamTypes(Type) {
|
|
4078
4078
|
let annotationParamtypes = this.getAnnotationParamtypes(Type);
|
|
4079
|
-
if (annotationParamtypes ===
|
|
4079
|
+
if (annotationParamtypes === void 0) {
|
|
4080
4080
|
Reflect.defineMetadata("di:paramtypes", (annotationParamtypes = []), Type);
|
|
4081
4081
|
}
|
|
4082
4082
|
return annotationParamtypes;
|
|
@@ -4091,19 +4091,19 @@ const DI = Object.freeze({
|
|
|
4091
4091
|
// so be careful with making changes here as it can have a huge impact on complex end user apps.
|
|
4092
4092
|
// Preferably, only make changes to the dependency resolution process via a RFC.
|
|
4093
4093
|
let dependencies = dependencyLookup.get(Type);
|
|
4094
|
-
if (dependencies ===
|
|
4094
|
+
if (dependencies === void 0) {
|
|
4095
4095
|
// Type.length is the number of constructor parameters. If this is 0, it could mean the class has an empty constructor
|
|
4096
4096
|
// but it could also mean the class has no constructor at all (in which case it inherits the constructor from the prototype).
|
|
4097
4097
|
// Non-zero constructor length + no paramtypes means emitDecoratorMetadata is off, or the class has no decorator.
|
|
4098
4098
|
// We're not doing anything with the above right now, but it's good to keep in mind for any future issues.
|
|
4099
4099
|
const inject = Type.inject;
|
|
4100
|
-
if (inject ===
|
|
4100
|
+
if (inject === void 0) {
|
|
4101
4101
|
// design:paramtypes is set by tsc when emitDecoratorMetadata is enabled.
|
|
4102
4102
|
const designParamtypes = DI.getDesignParamtypes(Type);
|
|
4103
4103
|
// di:paramtypes is set by the parameter decorator from DI.createInterface or by @inject
|
|
4104
4104
|
const annotationParamtypes = DI.getAnnotationParamtypes(Type);
|
|
4105
|
-
if (designParamtypes ===
|
|
4106
|
-
if (annotationParamtypes ===
|
|
4105
|
+
if (designParamtypes === void 0) {
|
|
4106
|
+
if (annotationParamtypes === void 0) {
|
|
4107
4107
|
// Only go up the prototype if neither static inject nor any of the paramtypes is defined, as
|
|
4108
4108
|
// there is no sound way to merge a type's deps with its prototype's deps
|
|
4109
4109
|
const Proto = Object.getPrototypeOf(Type);
|
|
@@ -4119,7 +4119,7 @@ const DI = Object.freeze({
|
|
|
4119
4119
|
dependencies = cloneArrayWithPossibleProps(annotationParamtypes);
|
|
4120
4120
|
}
|
|
4121
4121
|
}
|
|
4122
|
-
else if (annotationParamtypes ===
|
|
4122
|
+
else if (annotationParamtypes === void 0) {
|
|
4123
4123
|
// No di:paramtypes so just use the design:paramtypes
|
|
4124
4124
|
dependencies = cloneArrayWithPossibleProps(designParamtypes);
|
|
4125
4125
|
}
|
|
@@ -4130,7 +4130,7 @@ const DI = Object.freeze({
|
|
|
4130
4130
|
let auAnnotationParamtype;
|
|
4131
4131
|
for (let i = 0; i < len; ++i) {
|
|
4132
4132
|
auAnnotationParamtype = annotationParamtypes[i];
|
|
4133
|
-
if (auAnnotationParamtype !==
|
|
4133
|
+
if (auAnnotationParamtype !== void 0) {
|
|
4134
4134
|
dependencies[i] = auAnnotationParamtype;
|
|
4135
4135
|
}
|
|
4136
4136
|
}
|
|
@@ -4170,7 +4170,7 @@ const DI = Object.freeze({
|
|
|
4170
4170
|
Reflect.defineProperty(target, propertyName, {
|
|
4171
4171
|
get: function () {
|
|
4172
4172
|
let value = this[diPropertyKey];
|
|
4173
|
-
if (value ===
|
|
4173
|
+
if (value === void 0) {
|
|
4174
4174
|
const container = this instanceof HTMLElement
|
|
4175
4175
|
? DI.findResponsibleContainer(this)
|
|
4176
4176
|
: DI.getOrCreateDOMContainer();
|
|
@@ -4235,7 +4235,7 @@ const DI = Object.freeze({
|
|
|
4235
4235
|
Interface.friendlyName = friendlyName == null ? "(anonymous)" : friendlyName;
|
|
4236
4236
|
if (configure != null) {
|
|
4237
4237
|
Interface.register = function (container, key) {
|
|
4238
|
-
return configure(new ResolverBuilder(container, key !== null && key !==
|
|
4238
|
+
return configure(new ResolverBuilder(container, key !== null && key !== void 0 ? key : Interface));
|
|
4239
4239
|
};
|
|
4240
4240
|
}
|
|
4241
4241
|
Interface.toString = function toString() {
|
|
@@ -4259,7 +4259,7 @@ const DI = Object.freeze({
|
|
|
4259
4259
|
// It's a parameter decorator.
|
|
4260
4260
|
const annotationParamtypes = DI.getOrCreateAnnotationParamTypes(target);
|
|
4261
4261
|
const dep = dependencies[0];
|
|
4262
|
-
if (dep !==
|
|
4262
|
+
if (dep !== void 0) {
|
|
4263
4263
|
annotationParamtypes[descriptor] = dep;
|
|
4264
4264
|
}
|
|
4265
4265
|
}
|
|
@@ -4273,7 +4273,7 @@ const DI = Object.freeze({
|
|
|
4273
4273
|
let dep;
|
|
4274
4274
|
for (let i = 0; i < dependencies.length; ++i) {
|
|
4275
4275
|
dep = dependencies[i];
|
|
4276
|
-
if (dep !==
|
|
4276
|
+
if (dep !== void 0) {
|
|
4277
4277
|
annotationParamtypes[i] = dep;
|
|
4278
4278
|
}
|
|
4279
4279
|
}
|
|
@@ -4585,7 +4585,7 @@ class ResolverImpl {
|
|
|
4585
4585
|
case 2 /* ResolverStrategy.transient */:
|
|
4586
4586
|
return container.getFactory(this.state);
|
|
4587
4587
|
case 5 /* ResolverStrategy.alias */:
|
|
4588
|
-
return (_c = (_b = (_a = container.getResolver(this.state)) === null || _a ===
|
|
4588
|
+
return (_c = (_b = (_a = container.getResolver(this.state)) === null || _a === void 0 ? void 0 : _a.getFactory) === null || _b === void 0 ? void 0 : _b.call(_a, container)) !== null && _c !== void 0 ? _c : null;
|
|
4589
4589
|
default:
|
|
4590
4590
|
return null;
|
|
4591
4591
|
}
|
|
@@ -4606,7 +4606,7 @@ class FactoryImpl {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
construct(container, dynamicDependencies) {
|
|
4608
4608
|
let instance;
|
|
4609
|
-
if (dynamicDependencies ===
|
|
4609
|
+
if (dynamicDependencies === void 0) {
|
|
4610
4610
|
instance = new this.Type(...this.dependencies.map(containerGetKey, container));
|
|
4611
4611
|
}
|
|
4612
4612
|
else {
|
|
@@ -4637,7 +4637,7 @@ function isRegisterInRequester(obj) {
|
|
|
4637
4637
|
return isSelfRegistry(obj) && obj.registerInRequestor;
|
|
4638
4638
|
}
|
|
4639
4639
|
function isClass(obj) {
|
|
4640
|
-
return obj.prototype !==
|
|
4640
|
+
return obj.prototype !== void 0;
|
|
4641
4641
|
}
|
|
4642
4642
|
const InstrinsicTypeNames = new Set([
|
|
4643
4643
|
"Array",
|
|
@@ -4680,7 +4680,7 @@ const factories = new Map();
|
|
|
4680
4680
|
*/
|
|
4681
4681
|
class ContainerImpl {
|
|
4682
4682
|
get parent() {
|
|
4683
|
-
if (this._parent ===
|
|
4683
|
+
if (this._parent === void 0) {
|
|
4684
4684
|
this._parent = this.config.parentLocator(this.owner);
|
|
4685
4685
|
}
|
|
4686
4686
|
return this._parent;
|
|
@@ -4694,7 +4694,7 @@ class ContainerImpl {
|
|
|
4694
4694
|
constructor(owner, config) {
|
|
4695
4695
|
this.owner = owner;
|
|
4696
4696
|
this.config = config;
|
|
4697
|
-
this._parent =
|
|
4697
|
+
this._parent = void 0;
|
|
4698
4698
|
this.registerDepth = 0;
|
|
4699
4699
|
this.context = null;
|
|
4700
4700
|
if (owner !== null) {
|
|
@@ -4800,7 +4800,7 @@ class ContainerImpl {
|
|
|
4800
4800
|
}
|
|
4801
4801
|
getResolver(key, autoRegister = true) {
|
|
4802
4802
|
validateKey(key);
|
|
4803
|
-
if (key.resolve !==
|
|
4803
|
+
if (key.resolve !== void 0) {
|
|
4804
4804
|
return key;
|
|
4805
4805
|
}
|
|
4806
4806
|
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
@@ -4893,7 +4893,7 @@ class ContainerImpl {
|
|
|
4893
4893
|
}
|
|
4894
4894
|
getFactory(Type) {
|
|
4895
4895
|
let factory = factories.get(Type);
|
|
4896
|
-
if (factory ===
|
|
4896
|
+
if (factory === void 0) {
|
|
4897
4897
|
if (isNativeFunction(Type)) {
|
|
4898
4898
|
throw new Error(`${Type.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);
|
|
4899
4899
|
}
|
|
@@ -4919,7 +4919,7 @@ class ContainerImpl {
|
|
|
4919
4919
|
if (!(registrationResolver instanceof Object) ||
|
|
4920
4920
|
registrationResolver.resolve == null) {
|
|
4921
4921
|
const newResolver = handler.resolvers.get(keyAsValue);
|
|
4922
|
-
if (newResolver !=
|
|
4922
|
+
if (newResolver != void 0) {
|
|
4923
4923
|
return newResolver;
|
|
4924
4924
|
}
|
|
4925
4925
|
throw new Error("A valid resolver was not returned from the static register method");
|
|
@@ -5063,7 +5063,7 @@ const Registration = Object.freeze({
|
|
|
5063
5063
|
});
|
|
5064
5064
|
/** @internal */
|
|
5065
5065
|
function validateKey(key) {
|
|
5066
|
-
if (key === null || key ===
|
|
5066
|
+
if (key === null || key === void 0) {
|
|
5067
5067
|
throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?");
|
|
5068
5068
|
}
|
|
5069
5069
|
}
|
|
@@ -5097,7 +5097,7 @@ const isNativeFunction = (function () {
|
|
|
5097
5097
|
let i = 0;
|
|
5098
5098
|
return function (fn) {
|
|
5099
5099
|
isNative = lookup.get(fn);
|
|
5100
|
-
if (isNative ===
|
|
5100
|
+
if (isNative === void 0) {
|
|
5101
5101
|
sourceText = fn.toString();
|
|
5102
5102
|
i = sourceText.length;
|
|
5103
5103
|
// http://www.ecma-international.org/ecma-262/#prod-NativeFunction
|
|
@@ -5135,7 +5135,7 @@ function isArrayIndex(value) {
|
|
|
5135
5135
|
return value >= 0 && (value | 0) === value;
|
|
5136
5136
|
case "string": {
|
|
5137
5137
|
const result = isNumericLookup[value];
|
|
5138
|
-
if (result !==
|
|
5138
|
+
if (result !== void 0) {
|
|
5139
5139
|
return result;
|
|
5140
5140
|
}
|
|
5141
5141
|
const length = value.length;
|
|
@@ -5177,7 +5177,7 @@ const ComponentPresentation = Object.freeze({
|
|
|
5177
5177
|
define(tagName, presentation, container) {
|
|
5178
5178
|
const key = presentationKeyFromTag(tagName);
|
|
5179
5179
|
const existing = presentationRegistry.get(key);
|
|
5180
|
-
if (existing ===
|
|
5180
|
+
if (existing === void 0) {
|
|
5181
5181
|
presentationRegistry.set(key, presentation);
|
|
5182
5182
|
}
|
|
5183
5183
|
else {
|
|
@@ -5219,7 +5219,7 @@ class DefaultComponentPresentation {
|
|
|
5219
5219
|
constructor(template, styles) {
|
|
5220
5220
|
this.template = template || null;
|
|
5221
5221
|
this.styles =
|
|
5222
|
-
styles ===
|
|
5222
|
+
styles === void 0
|
|
5223
5223
|
? null
|
|
5224
5224
|
: Array.isArray(styles)
|
|
5225
5225
|
? ElementStyles.create(styles)
|
|
@@ -5254,7 +5254,7 @@ class DefaultComponentPresentation {
|
|
|
5254
5254
|
class FoundationElement extends FASTElement {
|
|
5255
5255
|
constructor() {
|
|
5256
5256
|
super(...arguments);
|
|
5257
|
-
this._presentation =
|
|
5257
|
+
this._presentation = void 0;
|
|
5258
5258
|
}
|
|
5259
5259
|
/**
|
|
5260
5260
|
* A property which resolves the ComponentPresentation instance
|
|
@@ -5262,7 +5262,7 @@ class FoundationElement extends FASTElement {
|
|
|
5262
5262
|
* @public
|
|
5263
5263
|
*/
|
|
5264
5264
|
get $presentation() {
|
|
5265
|
-
if (this._presentation ===
|
|
5265
|
+
if (this._presentation === void 0) {
|
|
5266
5266
|
this._presentation = ComponentPresentation.forTag(this.tagName, this);
|
|
5267
5267
|
}
|
|
5268
5268
|
return this._presentation;
|
|
@@ -5305,10 +5305,10 @@ class FoundationElement extends FASTElement {
|
|
|
5305
5305
|
}
|
|
5306
5306
|
__decorate([
|
|
5307
5307
|
observable
|
|
5308
|
-
], FoundationElement.prototype, "template",
|
|
5308
|
+
], FoundationElement.prototype, "template", void 0);
|
|
5309
5309
|
__decorate([
|
|
5310
5310
|
observable
|
|
5311
|
-
], FoundationElement.prototype, "styles",
|
|
5311
|
+
], FoundationElement.prototype, "styles", void 0);
|
|
5312
5312
|
function resolveOption(option, context, definition) {
|
|
5313
5313
|
if (typeof option === "function") {
|
|
5314
5314
|
return option(context, definition);
|
|
@@ -5452,13 +5452,13 @@ __decorate([
|
|
|
5452
5452
|
mode: "fromView",
|
|
5453
5453
|
converter: nullableNumberConverter,
|
|
5454
5454
|
})
|
|
5455
|
-
], AccordionItem.prototype, "headinglevel",
|
|
5455
|
+
], AccordionItem.prototype, "headinglevel", void 0);
|
|
5456
5456
|
__decorate([
|
|
5457
5457
|
attr({ mode: "boolean" })
|
|
5458
|
-
], AccordionItem.prototype, "expanded",
|
|
5458
|
+
], AccordionItem.prototype, "expanded", void 0);
|
|
5459
5459
|
__decorate([
|
|
5460
5460
|
attr
|
|
5461
|
-
], AccordionItem.prototype, "id",
|
|
5461
|
+
], AccordionItem.prototype, "id", void 0);
|
|
5462
5462
|
applyMixins(AccordionItem, StartEnd);
|
|
5463
5463
|
|
|
5464
5464
|
/**
|
|
@@ -5797,7 +5797,7 @@ class Accordion extends FoundationElement {
|
|
|
5797
5797
|
item.addEventListener("focus", this.handleItemFocus);
|
|
5798
5798
|
});
|
|
5799
5799
|
if (this.isSingleExpandMode()) {
|
|
5800
|
-
const expandedItem = (_a = this.findExpandedItem()) !== null && _a !==
|
|
5800
|
+
const expandedItem = (_a = this.findExpandedItem()) !== null && _a !== void 0 ? _a : this.accordionItems[0];
|
|
5801
5801
|
expandedItem.setAttribute("aria-disabled", "true");
|
|
5802
5802
|
}
|
|
5803
5803
|
};
|
|
@@ -5910,10 +5910,10 @@ class Accordion extends FoundationElement {
|
|
|
5910
5910
|
}
|
|
5911
5911
|
__decorate([
|
|
5912
5912
|
attr({ attribute: "expand-mode" })
|
|
5913
|
-
], Accordion.prototype, "expandmode",
|
|
5913
|
+
], Accordion.prototype, "expandmode", void 0);
|
|
5914
5914
|
__decorate([
|
|
5915
5915
|
observable
|
|
5916
|
-
], Accordion.prototype, "accordionItems",
|
|
5916
|
+
], Accordion.prototype, "accordionItems", void 0);
|
|
5917
5917
|
|
|
5918
5918
|
/**
|
|
5919
5919
|
* The template for the {@link @ni/fast-foundation#(Anchor:class)} component.
|
|
@@ -5974,61 +5974,61 @@ class ARIAGlobalStatesAndProperties {
|
|
|
5974
5974
|
}
|
|
5975
5975
|
__decorate([
|
|
5976
5976
|
attr({ attribute: "aria-atomic" })
|
|
5977
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic",
|
|
5977
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
5978
5978
|
__decorate([
|
|
5979
5979
|
attr({ attribute: "aria-busy" })
|
|
5980
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy",
|
|
5980
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
5981
5981
|
__decorate([
|
|
5982
5982
|
attr({ attribute: "aria-controls" })
|
|
5983
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaControls",
|
|
5983
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
5984
5984
|
__decorate([
|
|
5985
5985
|
attr({ attribute: "aria-current" })
|
|
5986
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent",
|
|
5986
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
5987
5987
|
__decorate([
|
|
5988
5988
|
attr({ attribute: "aria-describedby" })
|
|
5989
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby",
|
|
5989
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
5990
5990
|
__decorate([
|
|
5991
5991
|
attr({ attribute: "aria-details" })
|
|
5992
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails",
|
|
5992
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
5993
5993
|
__decorate([
|
|
5994
5994
|
attr({ attribute: "aria-disabled" })
|
|
5995
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled",
|
|
5995
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
5996
5996
|
__decorate([
|
|
5997
5997
|
attr({ attribute: "aria-errormessage" })
|
|
5998
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage",
|
|
5998
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
5999
5999
|
__decorate([
|
|
6000
6000
|
attr({ attribute: "aria-flowto" })
|
|
6001
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto",
|
|
6001
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
6002
6002
|
__decorate([
|
|
6003
6003
|
attr({ attribute: "aria-haspopup" })
|
|
6004
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup",
|
|
6004
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
6005
6005
|
__decorate([
|
|
6006
6006
|
attr({ attribute: "aria-hidden" })
|
|
6007
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden",
|
|
6007
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
6008
6008
|
__decorate([
|
|
6009
6009
|
attr({ attribute: "aria-invalid" })
|
|
6010
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid",
|
|
6010
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
6011
6011
|
__decorate([
|
|
6012
6012
|
attr({ attribute: "aria-keyshortcuts" })
|
|
6013
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts",
|
|
6013
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
6014
6014
|
__decorate([
|
|
6015
6015
|
attr({ attribute: "aria-label" })
|
|
6016
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel",
|
|
6016
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
6017
6017
|
__decorate([
|
|
6018
6018
|
attr({ attribute: "aria-labelledby" })
|
|
6019
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby",
|
|
6019
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
6020
6020
|
__decorate([
|
|
6021
6021
|
attr({ attribute: "aria-live" })
|
|
6022
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLive",
|
|
6022
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
6023
6023
|
__decorate([
|
|
6024
6024
|
attr({ attribute: "aria-owns" })
|
|
6025
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns",
|
|
6025
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
6026
6026
|
__decorate([
|
|
6027
6027
|
attr({ attribute: "aria-relevant" })
|
|
6028
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant",
|
|
6028
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
6029
6029
|
__decorate([
|
|
6030
6030
|
attr({ attribute: "aria-roledescription" })
|
|
6031
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription",
|
|
6031
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
6032
6032
|
|
|
6033
6033
|
/**
|
|
6034
6034
|
* An Anchor Custom HTML Element.
|
|
@@ -6055,10 +6055,10 @@ class Anchor extends FoundationElement {
|
|
|
6055
6055
|
// Check to see if delegatesFocus is supported
|
|
6056
6056
|
if (window.ShadowRoot &&
|
|
6057
6057
|
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") &&
|
|
6058
|
-
((_a = this.$fastController.definition.shadowOptions) === null || _a ===
|
|
6058
|
+
((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
6059
6059
|
this.focus = () => {
|
|
6060
6060
|
var _a;
|
|
6061
|
-
(_a = this.control) === null || _a ===
|
|
6061
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.focus();
|
|
6062
6062
|
};
|
|
6063
6063
|
}
|
|
6064
6064
|
};
|
|
@@ -6073,31 +6073,31 @@ class Anchor extends FoundationElement {
|
|
|
6073
6073
|
}
|
|
6074
6074
|
__decorate([
|
|
6075
6075
|
attr
|
|
6076
|
-
], Anchor.prototype, "download",
|
|
6076
|
+
], Anchor.prototype, "download", void 0);
|
|
6077
6077
|
__decorate([
|
|
6078
6078
|
attr
|
|
6079
|
-
], Anchor.prototype, "href",
|
|
6079
|
+
], Anchor.prototype, "href", void 0);
|
|
6080
6080
|
__decorate([
|
|
6081
6081
|
attr
|
|
6082
|
-
], Anchor.prototype, "hreflang",
|
|
6082
|
+
], Anchor.prototype, "hreflang", void 0);
|
|
6083
6083
|
__decorate([
|
|
6084
6084
|
attr
|
|
6085
|
-
], Anchor.prototype, "ping",
|
|
6085
|
+
], Anchor.prototype, "ping", void 0);
|
|
6086
6086
|
__decorate([
|
|
6087
6087
|
attr
|
|
6088
|
-
], Anchor.prototype, "referrerpolicy",
|
|
6088
|
+
], Anchor.prototype, "referrerpolicy", void 0);
|
|
6089
6089
|
__decorate([
|
|
6090
6090
|
attr
|
|
6091
|
-
], Anchor.prototype, "rel",
|
|
6091
|
+
], Anchor.prototype, "rel", void 0);
|
|
6092
6092
|
__decorate([
|
|
6093
6093
|
attr
|
|
6094
|
-
], Anchor.prototype, "target",
|
|
6094
|
+
], Anchor.prototype, "target", void 0);
|
|
6095
6095
|
__decorate([
|
|
6096
6096
|
attr
|
|
6097
|
-
], Anchor.prototype, "type",
|
|
6097
|
+
], Anchor.prototype, "type", void 0);
|
|
6098
6098
|
__decorate([
|
|
6099
6099
|
observable
|
|
6100
|
-
], Anchor.prototype, "defaultSlottedContent",
|
|
6100
|
+
], Anchor.prototype, "defaultSlottedContent", void 0);
|
|
6101
6101
|
/**
|
|
6102
6102
|
* Includes ARIA states and properties relating to the ARIA link role
|
|
6103
6103
|
*
|
|
@@ -6107,7 +6107,7 @@ class DelegatesARIALink {
|
|
|
6107
6107
|
}
|
|
6108
6108
|
__decorate([
|
|
6109
6109
|
attr({ attribute: "aria-expanded" })
|
|
6110
|
-
], DelegatesARIALink.prototype, "ariaExpanded",
|
|
6110
|
+
], DelegatesARIALink.prototype, "ariaExpanded", void 0);
|
|
6111
6111
|
applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
6112
6112
|
applyMixins(Anchor, StartEnd, DelegatesARIALink);
|
|
6113
6113
|
|
|
@@ -6153,7 +6153,7 @@ class IntersectionService {
|
|
|
6153
6153
|
return;
|
|
6154
6154
|
}
|
|
6155
6155
|
if (this.observedElements.has(target)) {
|
|
6156
|
-
(_a = this.observedElements.get(target)) === null || _a ===
|
|
6156
|
+
(_a = this.observedElements.get(target)) === null || _a === void 0 ? void 0 : _a.push(callback);
|
|
6157
6157
|
return;
|
|
6158
6158
|
}
|
|
6159
6159
|
this.observedElements.set(target, [callback]);
|
|
@@ -6200,7 +6200,7 @@ class IntersectionService {
|
|
|
6200
6200
|
entries.forEach((entry) => {
|
|
6201
6201
|
var _a;
|
|
6202
6202
|
// stop watching this element until we get new update requests for it
|
|
6203
|
-
(_a = this.intersectionDetector) === null || _a ===
|
|
6203
|
+
(_a = this.intersectionDetector) === null || _a === void 0 ? void 0 : _a.unobserve(entry.target);
|
|
6204
6204
|
const thisElementCallbacks = this.observedElements.get(entry.target);
|
|
6205
6205
|
if (thisElementCallbacks !== undefined) {
|
|
6206
6206
|
thisElementCallbacks.forEach((callback) => {
|
|
@@ -7127,61 +7127,61 @@ class AnchoredRegion extends FoundationElement {
|
|
|
7127
7127
|
AnchoredRegion.intersectionService = new IntersectionService();
|
|
7128
7128
|
__decorate([
|
|
7129
7129
|
attr
|
|
7130
|
-
], AnchoredRegion.prototype, "anchor",
|
|
7130
|
+
], AnchoredRegion.prototype, "anchor", void 0);
|
|
7131
7131
|
__decorate([
|
|
7132
7132
|
attr
|
|
7133
|
-
], AnchoredRegion.prototype, "viewport",
|
|
7133
|
+
], AnchoredRegion.prototype, "viewport", void 0);
|
|
7134
7134
|
__decorate([
|
|
7135
7135
|
attr({ attribute: "horizontal-positioning-mode" })
|
|
7136
|
-
], AnchoredRegion.prototype, "horizontalPositioningMode",
|
|
7136
|
+
], AnchoredRegion.prototype, "horizontalPositioningMode", void 0);
|
|
7137
7137
|
__decorate([
|
|
7138
7138
|
attr({ attribute: "horizontal-default-position" })
|
|
7139
|
-
], AnchoredRegion.prototype, "horizontalDefaultPosition",
|
|
7139
|
+
], AnchoredRegion.prototype, "horizontalDefaultPosition", void 0);
|
|
7140
7140
|
__decorate([
|
|
7141
7141
|
attr({ attribute: "horizontal-viewport-lock", mode: "boolean" })
|
|
7142
|
-
], AnchoredRegion.prototype, "horizontalViewportLock",
|
|
7142
|
+
], AnchoredRegion.prototype, "horizontalViewportLock", void 0);
|
|
7143
7143
|
__decorate([
|
|
7144
7144
|
attr({ attribute: "horizontal-inset", mode: "boolean" })
|
|
7145
|
-
], AnchoredRegion.prototype, "horizontalInset",
|
|
7145
|
+
], AnchoredRegion.prototype, "horizontalInset", void 0);
|
|
7146
7146
|
__decorate([
|
|
7147
7147
|
attr({ attribute: "horizontal-threshold" })
|
|
7148
|
-
], AnchoredRegion.prototype, "horizontalThreshold",
|
|
7148
|
+
], AnchoredRegion.prototype, "horizontalThreshold", void 0);
|
|
7149
7149
|
__decorate([
|
|
7150
7150
|
attr({ attribute: "horizontal-scaling" })
|
|
7151
|
-
], AnchoredRegion.prototype, "horizontalScaling",
|
|
7151
|
+
], AnchoredRegion.prototype, "horizontalScaling", void 0);
|
|
7152
7152
|
__decorate([
|
|
7153
7153
|
attr({ attribute: "vertical-positioning-mode" })
|
|
7154
|
-
], AnchoredRegion.prototype, "verticalPositioningMode",
|
|
7154
|
+
], AnchoredRegion.prototype, "verticalPositioningMode", void 0);
|
|
7155
7155
|
__decorate([
|
|
7156
7156
|
attr({ attribute: "vertical-default-position" })
|
|
7157
|
-
], AnchoredRegion.prototype, "verticalDefaultPosition",
|
|
7157
|
+
], AnchoredRegion.prototype, "verticalDefaultPosition", void 0);
|
|
7158
7158
|
__decorate([
|
|
7159
7159
|
attr({ attribute: "vertical-viewport-lock", mode: "boolean" })
|
|
7160
|
-
], AnchoredRegion.prototype, "verticalViewportLock",
|
|
7160
|
+
], AnchoredRegion.prototype, "verticalViewportLock", void 0);
|
|
7161
7161
|
__decorate([
|
|
7162
7162
|
attr({ attribute: "vertical-inset", mode: "boolean" })
|
|
7163
|
-
], AnchoredRegion.prototype, "verticalInset",
|
|
7163
|
+
], AnchoredRegion.prototype, "verticalInset", void 0);
|
|
7164
7164
|
__decorate([
|
|
7165
7165
|
attr({ attribute: "vertical-threshold" })
|
|
7166
|
-
], AnchoredRegion.prototype, "verticalThreshold",
|
|
7166
|
+
], AnchoredRegion.prototype, "verticalThreshold", void 0);
|
|
7167
7167
|
__decorate([
|
|
7168
7168
|
attr({ attribute: "vertical-scaling" })
|
|
7169
|
-
], AnchoredRegion.prototype, "verticalScaling",
|
|
7169
|
+
], AnchoredRegion.prototype, "verticalScaling", void 0);
|
|
7170
7170
|
__decorate([
|
|
7171
7171
|
attr({ attribute: "fixed-placement", mode: "boolean" })
|
|
7172
|
-
], AnchoredRegion.prototype, "fixedPlacement",
|
|
7172
|
+
], AnchoredRegion.prototype, "fixedPlacement", void 0);
|
|
7173
7173
|
__decorate([
|
|
7174
7174
|
attr({ attribute: "auto-update-mode" })
|
|
7175
|
-
], AnchoredRegion.prototype, "autoUpdateMode",
|
|
7175
|
+
], AnchoredRegion.prototype, "autoUpdateMode", void 0);
|
|
7176
7176
|
__decorate([
|
|
7177
7177
|
observable
|
|
7178
|
-
], AnchoredRegion.prototype, "anchorElement",
|
|
7178
|
+
], AnchoredRegion.prototype, "anchorElement", void 0);
|
|
7179
7179
|
__decorate([
|
|
7180
7180
|
observable
|
|
7181
|
-
], AnchoredRegion.prototype, "viewportElement",
|
|
7181
|
+
], AnchoredRegion.prototype, "viewportElement", void 0);
|
|
7182
7182
|
__decorate([
|
|
7183
7183
|
observable
|
|
7184
|
-
], AnchoredRegion.prototype, "initialLayoutComplete",
|
|
7184
|
+
], AnchoredRegion.prototype, "initialLayoutComplete", void 0);
|
|
7185
7185
|
|
|
7186
7186
|
/**
|
|
7187
7187
|
* Building blocks - partial configs
|
|
@@ -7251,13 +7251,13 @@ const avatarTemplate = (context, definition) => html `
|
|
|
7251
7251
|
<div
|
|
7252
7252
|
class="backplate ${x => x.shape}"
|
|
7253
7253
|
part="backplate"
|
|
7254
|
-
style="${x => x.fill ? `background-color: var(--avatar-fill-${x.fill});` :
|
|
7254
|
+
style="${x => x.fill ? `background-color: var(--avatar-fill-${x.fill});` : void 0}"
|
|
7255
7255
|
>
|
|
7256
7256
|
<a
|
|
7257
7257
|
class="link"
|
|
7258
7258
|
part="link"
|
|
7259
|
-
href="${x => (x.link ? x.link :
|
|
7260
|
-
style="${x => (x.color ? `color: var(--avatar-color-${x.color});` :
|
|
7259
|
+
href="${x => (x.link ? x.link : void 0)}"
|
|
7260
|
+
style="${x => (x.color ? `color: var(--avatar-color-${x.color});` : void 0)}"
|
|
7261
7261
|
>
|
|
7262
7262
|
<slot name="media" part="media">${definition.media || ""}</slot>
|
|
7263
7263
|
<slot class="content" part="content"><slot>
|
|
@@ -7292,16 +7292,16 @@ class Avatar extends FoundationElement {
|
|
|
7292
7292
|
}
|
|
7293
7293
|
__decorate([
|
|
7294
7294
|
attr
|
|
7295
|
-
], Avatar.prototype, "fill",
|
|
7295
|
+
], Avatar.prototype, "fill", void 0);
|
|
7296
7296
|
__decorate([
|
|
7297
7297
|
attr
|
|
7298
|
-
], Avatar.prototype, "color",
|
|
7298
|
+
], Avatar.prototype, "color", void 0);
|
|
7299
7299
|
__decorate([
|
|
7300
7300
|
attr
|
|
7301
|
-
], Avatar.prototype, "link",
|
|
7301
|
+
], Avatar.prototype, "link", void 0);
|
|
7302
7302
|
__decorate([
|
|
7303
7303
|
attr
|
|
7304
|
-
], Avatar.prototype, "shape",
|
|
7304
|
+
], Avatar.prototype, "shape", void 0);
|
|
7305
7305
|
|
|
7306
7306
|
/**
|
|
7307
7307
|
* The template for the {@link @ni/fast-foundation#Badge} component.
|
|
@@ -7345,13 +7345,13 @@ class Badge extends FoundationElement {
|
|
|
7345
7345
|
}
|
|
7346
7346
|
__decorate([
|
|
7347
7347
|
attr({ attribute: "fill" })
|
|
7348
|
-
], Badge.prototype, "fill",
|
|
7348
|
+
], Badge.prototype, "fill", void 0);
|
|
7349
7349
|
__decorate([
|
|
7350
7350
|
attr({ attribute: "color" })
|
|
7351
|
-
], Badge.prototype, "color",
|
|
7351
|
+
], Badge.prototype, "color", void 0);
|
|
7352
7352
|
__decorate([
|
|
7353
7353
|
attr({ mode: "boolean" })
|
|
7354
|
-
], Badge.prototype, "circular",
|
|
7354
|
+
], Badge.prototype, "circular", void 0);
|
|
7355
7355
|
|
|
7356
7356
|
/**
|
|
7357
7357
|
* The template for the {@link @ni/fast-foundation#(BreadcrumbItem:class)} component.
|
|
@@ -7391,7 +7391,7 @@ class BreadcrumbItem extends Anchor {
|
|
|
7391
7391
|
}
|
|
7392
7392
|
__decorate([
|
|
7393
7393
|
observable
|
|
7394
|
-
], BreadcrumbItem.prototype, "separator",
|
|
7394
|
+
], BreadcrumbItem.prototype, "separator", void 0);
|
|
7395
7395
|
applyMixins(BreadcrumbItem, StartEnd, DelegatesARIALink);
|
|
7396
7396
|
|
|
7397
7397
|
/**
|
|
@@ -7444,8 +7444,8 @@ class Breadcrumb extends FoundationElement {
|
|
|
7444
7444
|
if (node.childElementCount > 0) {
|
|
7445
7445
|
return node.querySelector("a[href]");
|
|
7446
7446
|
}
|
|
7447
|
-
else if ((_a = node.shadowRoot) === null || _a ===
|
|
7448
|
-
return (_b = node.shadowRoot) === null || _b ===
|
|
7447
|
+
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
7448
|
+
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
7449
7449
|
}
|
|
7450
7450
|
else
|
|
7451
7451
|
return null;
|
|
@@ -7473,7 +7473,7 @@ class Breadcrumb extends FoundationElement {
|
|
|
7473
7473
|
}
|
|
7474
7474
|
__decorate([
|
|
7475
7475
|
observable
|
|
7476
|
-
], Breadcrumb.prototype, "slottedBreadcrumbItems",
|
|
7476
|
+
], Breadcrumb.prototype, "slottedBreadcrumbItems", void 0);
|
|
7477
7477
|
|
|
7478
7478
|
/**
|
|
7479
7479
|
* The template for the {@link @ni/fast-foundation#(Button:class)} component.
|
|
@@ -7847,7 +7847,7 @@ function FormAssociated(BaseCtor) {
|
|
|
7847
7847
|
this.proxySlot = document.createElement("slot");
|
|
7848
7848
|
this.proxySlot.setAttribute("name", proxySlotName);
|
|
7849
7849
|
}
|
|
7850
|
-
(_a = this.shadowRoot) === null || _a ===
|
|
7850
|
+
(_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(this.proxySlot);
|
|
7851
7851
|
this.appendChild(this.proxy);
|
|
7852
7852
|
}
|
|
7853
7853
|
/**
|
|
@@ -7856,7 +7856,7 @@ function FormAssociated(BaseCtor) {
|
|
|
7856
7856
|
detachProxy() {
|
|
7857
7857
|
var _a;
|
|
7858
7858
|
this.removeChild(this.proxy);
|
|
7859
|
-
(_a = this.shadowRoot) === null || _a ===
|
|
7859
|
+
(_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeChild(this.proxySlot);
|
|
7860
7860
|
}
|
|
7861
7861
|
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
7862
7862
|
validate(anchor) {
|
|
@@ -7880,7 +7880,7 @@ function FormAssociated(BaseCtor) {
|
|
|
7880
7880
|
if (this.form instanceof HTMLFormElement) {
|
|
7881
7881
|
// Implicit submission
|
|
7882
7882
|
const defaultButton = this.form.querySelector("[type=submit]");
|
|
7883
|
-
defaultButton === null || defaultButton ===
|
|
7883
|
+
defaultButton === null || defaultButton === void 0 ? void 0 : defaultButton.click();
|
|
7884
7884
|
}
|
|
7885
7885
|
break;
|
|
7886
7886
|
}
|
|
@@ -8023,7 +8023,7 @@ class Button extends FormAssociatedButton {
|
|
|
8023
8023
|
*/
|
|
8024
8024
|
this.handleClick = (e) => {
|
|
8025
8025
|
var _a;
|
|
8026
|
-
if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a ===
|
|
8026
|
+
if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
|
|
8027
8027
|
e.stopPropagation();
|
|
8028
8028
|
}
|
|
8029
8029
|
};
|
|
@@ -8052,7 +8052,7 @@ class Button extends FormAssociatedButton {
|
|
|
8052
8052
|
*/
|
|
8053
8053
|
this.handleFormReset = () => {
|
|
8054
8054
|
var _a;
|
|
8055
|
-
(_a = this.form) === null || _a ===
|
|
8055
|
+
(_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
8056
8056
|
};
|
|
8057
8057
|
/**
|
|
8058
8058
|
* Overrides the focus call for where delegatesFocus is unsupported.
|
|
@@ -8064,7 +8064,7 @@ class Button extends FormAssociatedButton {
|
|
|
8064
8064
|
// Check to see if delegatesFocus is supported
|
|
8065
8065
|
if (window.ShadowRoot &&
|
|
8066
8066
|
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") &&
|
|
8067
|
-
((_a = this.$fastController.definition.shadowOptions) === null || _a ===
|
|
8067
|
+
((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
8068
8068
|
this.focus = () => {
|
|
8069
8069
|
this.control.focus();
|
|
8070
8070
|
};
|
|
@@ -8117,7 +8117,7 @@ class Button extends FormAssociatedButton {
|
|
|
8117
8117
|
super.connectedCallback();
|
|
8118
8118
|
this.proxy.setAttribute("type", this.type);
|
|
8119
8119
|
this.handleUnsupportedDelegatesFocus();
|
|
8120
|
-
const elements = Array.from((_a = this.control) === null || _a ===
|
|
8120
|
+
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
8121
8121
|
if (elements) {
|
|
8122
8122
|
elements.forEach((span) => {
|
|
8123
8123
|
span.addEventListener("click", this.handleClick);
|
|
@@ -8130,7 +8130,7 @@ class Button extends FormAssociatedButton {
|
|
|
8130
8130
|
disconnectedCallback() {
|
|
8131
8131
|
var _a;
|
|
8132
8132
|
super.disconnectedCallback();
|
|
8133
|
-
const elements = Array.from((_a = this.control) === null || _a ===
|
|
8133
|
+
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
8134
8134
|
if (elements) {
|
|
8135
8135
|
elements.forEach((span) => {
|
|
8136
8136
|
span.removeEventListener("click", this.handleClick);
|
|
@@ -8140,31 +8140,31 @@ class Button extends FormAssociatedButton {
|
|
|
8140
8140
|
}
|
|
8141
8141
|
__decorate([
|
|
8142
8142
|
attr({ mode: "boolean" })
|
|
8143
|
-
], Button.prototype, "autofocus",
|
|
8143
|
+
], Button.prototype, "autofocus", void 0);
|
|
8144
8144
|
__decorate([
|
|
8145
8145
|
attr({ attribute: "form" })
|
|
8146
|
-
], Button.prototype, "formId",
|
|
8146
|
+
], Button.prototype, "formId", void 0);
|
|
8147
8147
|
__decorate([
|
|
8148
8148
|
attr
|
|
8149
|
-
], Button.prototype, "formaction",
|
|
8149
|
+
], Button.prototype, "formaction", void 0);
|
|
8150
8150
|
__decorate([
|
|
8151
8151
|
attr
|
|
8152
|
-
], Button.prototype, "formenctype",
|
|
8152
|
+
], Button.prototype, "formenctype", void 0);
|
|
8153
8153
|
__decorate([
|
|
8154
8154
|
attr
|
|
8155
|
-
], Button.prototype, "formmethod",
|
|
8155
|
+
], Button.prototype, "formmethod", void 0);
|
|
8156
8156
|
__decorate([
|
|
8157
8157
|
attr({ mode: "boolean" })
|
|
8158
|
-
], Button.prototype, "formnovalidate",
|
|
8158
|
+
], Button.prototype, "formnovalidate", void 0);
|
|
8159
8159
|
__decorate([
|
|
8160
8160
|
attr
|
|
8161
|
-
], Button.prototype, "formtarget",
|
|
8161
|
+
], Button.prototype, "formtarget", void 0);
|
|
8162
8162
|
__decorate([
|
|
8163
8163
|
attr
|
|
8164
|
-
], Button.prototype, "type",
|
|
8164
|
+
], Button.prototype, "type", void 0);
|
|
8165
8165
|
__decorate([
|
|
8166
8166
|
observable
|
|
8167
|
-
], Button.prototype, "defaultSlottedContent",
|
|
8167
|
+
], Button.prototype, "defaultSlottedContent", void 0);
|
|
8168
8168
|
/**
|
|
8169
8169
|
* Includes ARIA states and properties relating to the ARIA button role
|
|
8170
8170
|
*
|
|
@@ -8174,10 +8174,10 @@ class DelegatesARIAButton {
|
|
|
8174
8174
|
}
|
|
8175
8175
|
__decorate([
|
|
8176
8176
|
attr({ attribute: "aria-expanded" })
|
|
8177
|
-
], DelegatesARIAButton.prototype, "ariaExpanded",
|
|
8177
|
+
], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
|
|
8178
8178
|
__decorate([
|
|
8179
8179
|
attr({ attribute: "aria-pressed" })
|
|
8180
|
-
], DelegatesARIAButton.prototype, "ariaPressed",
|
|
8180
|
+
], DelegatesARIAButton.prototype, "ariaPressed", void 0);
|
|
8181
8181
|
applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
|
|
8182
8182
|
applyMixins(Button, StartEnd, DelegatesARIAButton);
|
|
8183
8183
|
|
|
@@ -8570,37 +8570,37 @@ class Calendar extends FoundationElement {
|
|
|
8570
8570
|
}
|
|
8571
8571
|
__decorate([
|
|
8572
8572
|
attr({ mode: "boolean" })
|
|
8573
|
-
], Calendar.prototype, "readonly",
|
|
8573
|
+
], Calendar.prototype, "readonly", void 0);
|
|
8574
8574
|
__decorate([
|
|
8575
8575
|
attr
|
|
8576
|
-
], Calendar.prototype, "locale",
|
|
8576
|
+
], Calendar.prototype, "locale", void 0);
|
|
8577
8577
|
__decorate([
|
|
8578
8578
|
attr({ converter: nullableNumberConverter })
|
|
8579
|
-
], Calendar.prototype, "month",
|
|
8579
|
+
], Calendar.prototype, "month", void 0);
|
|
8580
8580
|
__decorate([
|
|
8581
8581
|
attr({ converter: nullableNumberConverter })
|
|
8582
|
-
], Calendar.prototype, "year",
|
|
8582
|
+
], Calendar.prototype, "year", void 0);
|
|
8583
8583
|
__decorate([
|
|
8584
8584
|
attr({ attribute: "day-format", mode: "fromView" })
|
|
8585
|
-
], Calendar.prototype, "dayFormat",
|
|
8585
|
+
], Calendar.prototype, "dayFormat", void 0);
|
|
8586
8586
|
__decorate([
|
|
8587
8587
|
attr({ attribute: "weekday-format", mode: "fromView" })
|
|
8588
|
-
], Calendar.prototype, "weekdayFormat",
|
|
8588
|
+
], Calendar.prototype, "weekdayFormat", void 0);
|
|
8589
8589
|
__decorate([
|
|
8590
8590
|
attr({ attribute: "month-format", mode: "fromView" })
|
|
8591
|
-
], Calendar.prototype, "monthFormat",
|
|
8591
|
+
], Calendar.prototype, "monthFormat", void 0);
|
|
8592
8592
|
__decorate([
|
|
8593
8593
|
attr({ attribute: "year-format", mode: "fromView" })
|
|
8594
|
-
], Calendar.prototype, "yearFormat",
|
|
8594
|
+
], Calendar.prototype, "yearFormat", void 0);
|
|
8595
8595
|
__decorate([
|
|
8596
8596
|
attr({ attribute: "min-weeks", converter: nullableNumberConverter })
|
|
8597
|
-
], Calendar.prototype, "minWeeks",
|
|
8597
|
+
], Calendar.prototype, "minWeeks", void 0);
|
|
8598
8598
|
__decorate([
|
|
8599
8599
|
attr({ attribute: "disabled-dates" })
|
|
8600
|
-
], Calendar.prototype, "disabledDates",
|
|
8600
|
+
], Calendar.prototype, "disabledDates", void 0);
|
|
8601
8601
|
__decorate([
|
|
8602
8602
|
attr({ attribute: "selected-dates" })
|
|
8603
|
-
], Calendar.prototype, "selectedDates",
|
|
8603
|
+
], Calendar.prototype, "selectedDates", void 0);
|
|
8604
8604
|
|
|
8605
8605
|
/**
|
|
8606
8606
|
* Enumerates the data grid auto generated header options
|
|
@@ -8798,40 +8798,40 @@ class DataGridRow extends FoundationElement {
|
|
|
8798
8798
|
}
|
|
8799
8799
|
__decorate([
|
|
8800
8800
|
attr({ attribute: "grid-template-columns" })
|
|
8801
|
-
], DataGridRow.prototype, "gridTemplateColumns",
|
|
8801
|
+
], DataGridRow.prototype, "gridTemplateColumns", void 0);
|
|
8802
8802
|
__decorate([
|
|
8803
8803
|
attr({ attribute: "row-type" })
|
|
8804
|
-
], DataGridRow.prototype, "rowType",
|
|
8804
|
+
], DataGridRow.prototype, "rowType", void 0);
|
|
8805
8805
|
__decorate([
|
|
8806
8806
|
observable
|
|
8807
|
-
], DataGridRow.prototype, "rowData",
|
|
8807
|
+
], DataGridRow.prototype, "rowData", void 0);
|
|
8808
8808
|
__decorate([
|
|
8809
8809
|
observable
|
|
8810
|
-
], DataGridRow.prototype, "columnDefinitions",
|
|
8810
|
+
], DataGridRow.prototype, "columnDefinitions", void 0);
|
|
8811
8811
|
__decorate([
|
|
8812
8812
|
observable
|
|
8813
|
-
], DataGridRow.prototype, "cellItemTemplate",
|
|
8813
|
+
], DataGridRow.prototype, "cellItemTemplate", void 0);
|
|
8814
8814
|
__decorate([
|
|
8815
8815
|
observable
|
|
8816
|
-
], DataGridRow.prototype, "headerCellItemTemplate",
|
|
8816
|
+
], DataGridRow.prototype, "headerCellItemTemplate", void 0);
|
|
8817
8817
|
__decorate([
|
|
8818
8818
|
observable
|
|
8819
|
-
], DataGridRow.prototype, "rowIndex",
|
|
8819
|
+
], DataGridRow.prototype, "rowIndex", void 0);
|
|
8820
8820
|
__decorate([
|
|
8821
8821
|
observable
|
|
8822
|
-
], DataGridRow.prototype, "isActiveRow",
|
|
8822
|
+
], DataGridRow.prototype, "isActiveRow", void 0);
|
|
8823
8823
|
__decorate([
|
|
8824
8824
|
observable
|
|
8825
|
-
], DataGridRow.prototype, "activeCellItemTemplate",
|
|
8825
|
+
], DataGridRow.prototype, "activeCellItemTemplate", void 0);
|
|
8826
8826
|
__decorate([
|
|
8827
8827
|
observable
|
|
8828
|
-
], DataGridRow.prototype, "defaultCellItemTemplate",
|
|
8828
|
+
], DataGridRow.prototype, "defaultCellItemTemplate", void 0);
|
|
8829
8829
|
__decorate([
|
|
8830
8830
|
observable
|
|
8831
|
-
], DataGridRow.prototype, "defaultHeaderCellItemTemplate",
|
|
8831
|
+
], DataGridRow.prototype, "defaultHeaderCellItemTemplate", void 0);
|
|
8832
8832
|
__decorate([
|
|
8833
8833
|
observable
|
|
8834
|
-
], DataGridRow.prototype, "cellElements",
|
|
8834
|
+
], DataGridRow.prototype, "cellElements", void 0);
|
|
8835
8835
|
|
|
8836
8836
|
function createRowItemTemplate(context) {
|
|
8837
8837
|
const rowTag = context.tagFor(DataGridRow);
|
|
@@ -9265,43 +9265,43 @@ DataGrid.generateColumns = (row) => {
|
|
|
9265
9265
|
};
|
|
9266
9266
|
__decorate([
|
|
9267
9267
|
attr({ attribute: "no-tabbing", mode: "boolean" })
|
|
9268
|
-
], DataGrid.prototype, "noTabbing",
|
|
9268
|
+
], DataGrid.prototype, "noTabbing", void 0);
|
|
9269
9269
|
__decorate([
|
|
9270
9270
|
attr({ attribute: "generate-header" })
|
|
9271
|
-
], DataGrid.prototype, "generateHeader",
|
|
9271
|
+
], DataGrid.prototype, "generateHeader", void 0);
|
|
9272
9272
|
__decorate([
|
|
9273
9273
|
attr({ attribute: "grid-template-columns" })
|
|
9274
|
-
], DataGrid.prototype, "gridTemplateColumns",
|
|
9274
|
+
], DataGrid.prototype, "gridTemplateColumns", void 0);
|
|
9275
9275
|
__decorate([
|
|
9276
9276
|
observable
|
|
9277
|
-
], DataGrid.prototype, "rowsData",
|
|
9277
|
+
], DataGrid.prototype, "rowsData", void 0);
|
|
9278
9278
|
__decorate([
|
|
9279
9279
|
observable
|
|
9280
|
-
], DataGrid.prototype, "columnDefinitions",
|
|
9280
|
+
], DataGrid.prototype, "columnDefinitions", void 0);
|
|
9281
9281
|
__decorate([
|
|
9282
9282
|
observable
|
|
9283
|
-
], DataGrid.prototype, "rowItemTemplate",
|
|
9283
|
+
], DataGrid.prototype, "rowItemTemplate", void 0);
|
|
9284
9284
|
__decorate([
|
|
9285
9285
|
observable
|
|
9286
|
-
], DataGrid.prototype, "cellItemTemplate",
|
|
9286
|
+
], DataGrid.prototype, "cellItemTemplate", void 0);
|
|
9287
9287
|
__decorate([
|
|
9288
9288
|
observable
|
|
9289
|
-
], DataGrid.prototype, "headerCellItemTemplate",
|
|
9289
|
+
], DataGrid.prototype, "headerCellItemTemplate", void 0);
|
|
9290
9290
|
__decorate([
|
|
9291
9291
|
observable
|
|
9292
|
-
], DataGrid.prototype, "focusRowIndex",
|
|
9292
|
+
], DataGrid.prototype, "focusRowIndex", void 0);
|
|
9293
9293
|
__decorate([
|
|
9294
9294
|
observable
|
|
9295
|
-
], DataGrid.prototype, "focusColumnIndex",
|
|
9295
|
+
], DataGrid.prototype, "focusColumnIndex", void 0);
|
|
9296
9296
|
__decorate([
|
|
9297
9297
|
observable
|
|
9298
|
-
], DataGrid.prototype, "defaultRowItemTemplate",
|
|
9298
|
+
], DataGrid.prototype, "defaultRowItemTemplate", void 0);
|
|
9299
9299
|
__decorate([
|
|
9300
9300
|
observable
|
|
9301
|
-
], DataGrid.prototype, "rowElementTag",
|
|
9301
|
+
], DataGrid.prototype, "rowElementTag", void 0);
|
|
9302
9302
|
__decorate([
|
|
9303
9303
|
observable
|
|
9304
|
-
], DataGrid.prototype, "rowElements",
|
|
9304
|
+
], DataGrid.prototype, "rowElements", void 0);
|
|
9305
9305
|
|
|
9306
9306
|
const defaultCellContentsTemplate = html `
|
|
9307
9307
|
<template>
|
|
@@ -9381,7 +9381,7 @@ class DataGridCell extends FoundationElement {
|
|
|
9381
9381
|
this.addEventListener(eventFocusIn, this.handleFocusin);
|
|
9382
9382
|
this.addEventListener(eventFocusOut, this.handleFocusout);
|
|
9383
9383
|
this.addEventListener(eventKeyDown, this.handleKeydown);
|
|
9384
|
-
this.style.gridColumn = `${((_a = this.columnDefinition) === null || _a ===
|
|
9384
|
+
this.style.gridColumn = `${((_a = this.columnDefinition) === null || _a === void 0 ? void 0 : _a.gridColumn) === undefined
|
|
9385
9385
|
? 0
|
|
9386
9386
|
: this.columnDefinition.gridColumn}`;
|
|
9387
9387
|
this.updateCellView();
|
|
@@ -9516,16 +9516,16 @@ class DataGridCell extends FoundationElement {
|
|
|
9516
9516
|
}
|
|
9517
9517
|
__decorate([
|
|
9518
9518
|
attr({ attribute: "cell-type" })
|
|
9519
|
-
], DataGridCell.prototype, "cellType",
|
|
9519
|
+
], DataGridCell.prototype, "cellType", void 0);
|
|
9520
9520
|
__decorate([
|
|
9521
9521
|
attr({ attribute: "grid-column" })
|
|
9522
|
-
], DataGridCell.prototype, "gridColumn",
|
|
9522
|
+
], DataGridCell.prototype, "gridColumn", void 0);
|
|
9523
9523
|
__decorate([
|
|
9524
9524
|
observable
|
|
9525
|
-
], DataGridCell.prototype, "rowData",
|
|
9525
|
+
], DataGridCell.prototype, "rowData", void 0);
|
|
9526
9526
|
__decorate([
|
|
9527
9527
|
observable
|
|
9528
|
-
], DataGridCell.prototype, "columnDefinition",
|
|
9528
|
+
], DataGridCell.prototype, "columnDefinition", void 0);
|
|
9529
9529
|
|
|
9530
9530
|
function createCellItemTemplate(context) {
|
|
9531
9531
|
const cellTag = context.tagFor(DataGridCell);
|
|
@@ -9777,7 +9777,7 @@ const calendarTemplate = (context, definition) => {
|
|
|
9777
9777
|
${startTemplate}
|
|
9778
9778
|
${definition.title instanceof Function
|
|
9779
9779
|
? definition.title(context, definition)
|
|
9780
|
-
: (_a = definition.title) !== null && _a !==
|
|
9780
|
+
: (_a = definition.title) !== null && _a !== void 0 ? _a : ""}
|
|
9781
9781
|
<slot></slot>
|
|
9782
9782
|
${when(x => x.readonly, noninteractiveCalendarTemplate(todayString), interactiveCalendarGridTemplate(context, todayString))}
|
|
9783
9783
|
${endTemplate}
|
|
@@ -9916,13 +9916,13 @@ class Checkbox extends FormAssociatedCheckbox {
|
|
|
9916
9916
|
}
|
|
9917
9917
|
__decorate([
|
|
9918
9918
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
9919
|
-
], Checkbox.prototype, "readOnly",
|
|
9919
|
+
], Checkbox.prototype, "readOnly", void 0);
|
|
9920
9920
|
__decorate([
|
|
9921
9921
|
observable
|
|
9922
|
-
], Checkbox.prototype, "defaultSlottedNodes",
|
|
9922
|
+
], Checkbox.prototype, "defaultSlottedNodes", void 0);
|
|
9923
9923
|
__decorate([
|
|
9924
9924
|
observable
|
|
9925
|
-
], Checkbox.prototype, "indeterminate",
|
|
9925
|
+
], Checkbox.prototype, "indeterminate", void 0);
|
|
9926
9926
|
|
|
9927
9927
|
/**
|
|
9928
9928
|
* Determines if the element is a {@link (ListboxOption:class)}
|
|
@@ -10014,14 +10014,14 @@ class ListboxOption extends FoundationElement {
|
|
|
10014
10014
|
}
|
|
10015
10015
|
get label() {
|
|
10016
10016
|
var _a;
|
|
10017
|
-
return (_a = this.value) !== null && _a !==
|
|
10017
|
+
return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
|
|
10018
10018
|
}
|
|
10019
10019
|
get text() {
|
|
10020
10020
|
var _a, _b;
|
|
10021
|
-
return (_b = (_a = this.textContent) === null || _a ===
|
|
10021
|
+
return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
|
|
10022
10022
|
}
|
|
10023
10023
|
set value(next) {
|
|
10024
|
-
const newValue = `${next !== null && next !==
|
|
10024
|
+
const newValue = `${next !== null && next !== void 0 ? next : ""}`;
|
|
10025
10025
|
this._value = newValue;
|
|
10026
10026
|
this.dirtyValue = true;
|
|
10027
10027
|
if (this.proxy instanceof HTMLOptionElement) {
|
|
@@ -10032,7 +10032,7 @@ class ListboxOption extends FoundationElement {
|
|
|
10032
10032
|
get value() {
|
|
10033
10033
|
var _a;
|
|
10034
10034
|
Observable.track(this, "value");
|
|
10035
|
-
return (_a = this._value) !== null && _a !==
|
|
10035
|
+
return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
|
|
10036
10036
|
}
|
|
10037
10037
|
get form() {
|
|
10038
10038
|
return this.proxy ? this.proxy.form : null;
|
|
@@ -10077,25 +10077,25 @@ class ListboxOption extends FoundationElement {
|
|
|
10077
10077
|
}
|
|
10078
10078
|
__decorate([
|
|
10079
10079
|
observable
|
|
10080
|
-
], ListboxOption.prototype, "checked",
|
|
10080
|
+
], ListboxOption.prototype, "checked", void 0);
|
|
10081
10081
|
__decorate([
|
|
10082
10082
|
observable
|
|
10083
|
-
], ListboxOption.prototype, "content",
|
|
10083
|
+
], ListboxOption.prototype, "content", void 0);
|
|
10084
10084
|
__decorate([
|
|
10085
10085
|
observable
|
|
10086
|
-
], ListboxOption.prototype, "defaultSelected",
|
|
10086
|
+
], ListboxOption.prototype, "defaultSelected", void 0);
|
|
10087
10087
|
__decorate([
|
|
10088
10088
|
attr({ mode: "boolean" })
|
|
10089
|
-
], ListboxOption.prototype, "disabled",
|
|
10089
|
+
], ListboxOption.prototype, "disabled", void 0);
|
|
10090
10090
|
__decorate([
|
|
10091
10091
|
attr({ attribute: "selected", mode: "boolean" })
|
|
10092
|
-
], ListboxOption.prototype, "selectedAttribute",
|
|
10092
|
+
], ListboxOption.prototype, "selectedAttribute", void 0);
|
|
10093
10093
|
__decorate([
|
|
10094
10094
|
observable
|
|
10095
|
-
], ListboxOption.prototype, "selected",
|
|
10095
|
+
], ListboxOption.prototype, "selected", void 0);
|
|
10096
10096
|
__decorate([
|
|
10097
10097
|
attr({ attribute: "value", mode: "fromView" })
|
|
10098
|
-
], ListboxOption.prototype, "initialValue",
|
|
10098
|
+
], ListboxOption.prototype, "initialValue", void 0);
|
|
10099
10099
|
/**
|
|
10100
10100
|
* States and properties relating to the ARIA `option` role.
|
|
10101
10101
|
*
|
|
@@ -10105,16 +10105,16 @@ class DelegatesARIAListboxOption {
|
|
|
10105
10105
|
}
|
|
10106
10106
|
__decorate([
|
|
10107
10107
|
observable
|
|
10108
|
-
], DelegatesARIAListboxOption.prototype, "ariaChecked",
|
|
10108
|
+
], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
|
|
10109
10109
|
__decorate([
|
|
10110
10110
|
observable
|
|
10111
|
-
], DelegatesARIAListboxOption.prototype, "ariaPosInSet",
|
|
10111
|
+
], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
|
|
10112
10112
|
__decorate([
|
|
10113
10113
|
observable
|
|
10114
|
-
], DelegatesARIAListboxOption.prototype, "ariaSelected",
|
|
10114
|
+
], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
|
|
10115
10115
|
__decorate([
|
|
10116
10116
|
observable
|
|
10117
|
-
], DelegatesARIAListboxOption.prototype, "ariaSetSize",
|
|
10117
|
+
], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
|
|
10118
10118
|
applyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);
|
|
10119
10119
|
applyMixins(ListboxOption, StartEnd, DelegatesARIAListboxOption);
|
|
10120
10120
|
|
|
@@ -10180,7 +10180,7 @@ class Listbox extends FoundationElement {
|
|
|
10180
10180
|
*/
|
|
10181
10181
|
get firstSelectedOption() {
|
|
10182
10182
|
var _a;
|
|
10183
|
-
return (_a = this.selectedOptions[0]) !== null && _a !==
|
|
10183
|
+
return (_a = this.selectedOptions[0]) !== null && _a !== void 0 ? _a : null;
|
|
10184
10184
|
}
|
|
10185
10185
|
/**
|
|
10186
10186
|
* Returns true if there is one or more selectable option.
|
|
@@ -10197,7 +10197,7 @@ class Listbox extends FoundationElement {
|
|
|
10197
10197
|
*/
|
|
10198
10198
|
get length() {
|
|
10199
10199
|
var _a, _b;
|
|
10200
|
-
return (_b = (_a = this.options) === null || _a ===
|
|
10200
|
+
return (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
10201
10201
|
}
|
|
10202
10202
|
/**
|
|
10203
10203
|
* The list of options.
|
|
@@ -10449,7 +10449,7 @@ class Listbox extends FoundationElement {
|
|
|
10449
10449
|
this.selectedIndex = -1;
|
|
10450
10450
|
return;
|
|
10451
10451
|
}
|
|
10452
|
-
if (((_a = this.options[this.selectedIndex]) === null || _a ===
|
|
10452
|
+
if (((_a = this.options[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.disabled) && typeof prev === "number") {
|
|
10453
10453
|
const selectableIndex = this.getSelectableIndex(prev, next);
|
|
10454
10454
|
const newNext = selectableIndex > -1 ? selectableIndex : prev;
|
|
10455
10455
|
this.selectedIndex = newNext;
|
|
@@ -10471,7 +10471,7 @@ class Listbox extends FoundationElement {
|
|
|
10471
10471
|
selectedOptionsChanged(prev, next) {
|
|
10472
10472
|
var _a;
|
|
10473
10473
|
const filteredNext = next.filter(Listbox.slottedOptionFilter);
|
|
10474
|
-
(_a = this.options) === null || _a ===
|
|
10474
|
+
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(o => {
|
|
10475
10475
|
const notifier = Observable.getNotifier(o);
|
|
10476
10476
|
notifier.unsubscribe(this, "selected");
|
|
10477
10477
|
o.selected = filteredNext.includes(o);
|
|
@@ -10486,7 +10486,7 @@ class Listbox extends FoundationElement {
|
|
|
10486
10486
|
selectFirstOption() {
|
|
10487
10487
|
var _a, _b;
|
|
10488
10488
|
if (!this.disabled) {
|
|
10489
|
-
this.selectedIndex = (_b = (_a = this.options) === null || _a ===
|
|
10489
|
+
this.selectedIndex = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.findIndex(o => !o.disabled)) !== null && _b !== void 0 ? _b : -1;
|
|
10490
10490
|
}
|
|
10491
10491
|
}
|
|
10492
10492
|
/**
|
|
@@ -10526,7 +10526,7 @@ class Listbox extends FoundationElement {
|
|
|
10526
10526
|
*/
|
|
10527
10527
|
setDefaultSelectedOption() {
|
|
10528
10528
|
var _a, _b;
|
|
10529
|
-
this.selectedIndex = (_b = (_a = this.options) === null || _a ===
|
|
10529
|
+
this.selectedIndex = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.findIndex(el => el.defaultSelected)) !== null && _b !== void 0 ? _b : -1;
|
|
10530
10530
|
}
|
|
10531
10531
|
/**
|
|
10532
10532
|
* Sets an option as selected and gives it focus.
|
|
@@ -10535,9 +10535,9 @@ class Listbox extends FoundationElement {
|
|
|
10535
10535
|
*/
|
|
10536
10536
|
setSelectedOptions() {
|
|
10537
10537
|
var _a, _b, _c;
|
|
10538
|
-
if ((_a = this.options) === null || _a ===
|
|
10538
|
+
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) {
|
|
10539
10539
|
this.selectedOptions = [this.options[this.selectedIndex]];
|
|
10540
|
-
this.ariaActiveDescendant = (_c = (_b = this.firstSelectedOption) === null || _b ===
|
|
10540
|
+
this.ariaActiveDescendant = (_c = (_b = this.firstSelectedOption) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : "";
|
|
10541
10541
|
this.focusAndScrollOptionIntoView();
|
|
10542
10542
|
}
|
|
10543
10543
|
}
|
|
@@ -10605,19 +10605,19 @@ Listbox.slottedOptionFilter = (n) => isListboxOption(n) && !n.hidden;
|
|
|
10605
10605
|
Listbox.TYPE_AHEAD_TIMEOUT_MS = 1000;
|
|
10606
10606
|
__decorate([
|
|
10607
10607
|
attr({ mode: "boolean" })
|
|
10608
|
-
], Listbox.prototype, "disabled",
|
|
10608
|
+
], Listbox.prototype, "disabled", void 0);
|
|
10609
10609
|
__decorate([
|
|
10610
10610
|
observable
|
|
10611
|
-
], Listbox.prototype, "selectedIndex",
|
|
10611
|
+
], Listbox.prototype, "selectedIndex", void 0);
|
|
10612
10612
|
__decorate([
|
|
10613
10613
|
observable
|
|
10614
|
-
], Listbox.prototype, "selectedOptions",
|
|
10614
|
+
], Listbox.prototype, "selectedOptions", void 0);
|
|
10615
10615
|
__decorate([
|
|
10616
10616
|
observable
|
|
10617
|
-
], Listbox.prototype, "slottedOptions",
|
|
10617
|
+
], Listbox.prototype, "slottedOptions", void 0);
|
|
10618
10618
|
__decorate([
|
|
10619
10619
|
observable
|
|
10620
|
-
], Listbox.prototype, "typeaheadBuffer",
|
|
10620
|
+
], Listbox.prototype, "typeaheadBuffer", void 0);
|
|
10621
10621
|
/**
|
|
10622
10622
|
* Includes ARIA states and properties relating to the ARIA listbox role
|
|
10623
10623
|
*
|
|
@@ -10627,16 +10627,16 @@ class DelegatesARIAListbox {
|
|
|
10627
10627
|
}
|
|
10628
10628
|
__decorate([
|
|
10629
10629
|
observable
|
|
10630
|
-
], DelegatesARIAListbox.prototype, "ariaActiveDescendant",
|
|
10630
|
+
], DelegatesARIAListbox.prototype, "ariaActiveDescendant", void 0);
|
|
10631
10631
|
__decorate([
|
|
10632
10632
|
observable
|
|
10633
|
-
], DelegatesARIAListbox.prototype, "ariaDisabled",
|
|
10633
|
+
], DelegatesARIAListbox.prototype, "ariaDisabled", void 0);
|
|
10634
10634
|
__decorate([
|
|
10635
10635
|
observable
|
|
10636
|
-
], DelegatesARIAListbox.prototype, "ariaExpanded",
|
|
10636
|
+
], DelegatesARIAListbox.prototype, "ariaExpanded", void 0);
|
|
10637
10637
|
__decorate([
|
|
10638
10638
|
observable
|
|
10639
|
-
], DelegatesARIAListbox.prototype, "ariaMultiSelectable",
|
|
10639
|
+
], DelegatesARIAListbox.prototype, "ariaMultiSelectable", void 0);
|
|
10640
10640
|
applyMixins(DelegatesARIAListbox, ARIAGlobalStatesAndProperties);
|
|
10641
10641
|
applyMixins(Listbox, DelegatesARIAListbox);
|
|
10642
10642
|
|
|
@@ -10825,13 +10825,13 @@ class Combobox extends FormAssociatedCombobox {
|
|
|
10825
10825
|
const prev = `${this._value}`;
|
|
10826
10826
|
if (this.$fastController.isConnected && this.options) {
|
|
10827
10827
|
const selectedIndex = this.options.findIndex(el => el.text.toLowerCase() === next.toLowerCase());
|
|
10828
|
-
const prevSelectedValue = (_a = this.options[this.selectedIndex]) === null || _a ===
|
|
10829
|
-
const nextSelectedValue = (_b = this.options[selectedIndex]) === null || _b ===
|
|
10828
|
+
const prevSelectedValue = (_a = this.options[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.text;
|
|
10829
|
+
const nextSelectedValue = (_b = this.options[selectedIndex]) === null || _b === void 0 ? void 0 : _b.text;
|
|
10830
10830
|
this.selectedIndex =
|
|
10831
10831
|
prevSelectedValue !== nextSelectedValue
|
|
10832
10832
|
? selectedIndex
|
|
10833
10833
|
: this.selectedIndex;
|
|
10834
|
-
next = ((_c = this.firstSelectedOption) === null || _c ===
|
|
10834
|
+
next = ((_c = this.firstSelectedOption) === null || _c === void 0 ? void 0 : _c.text) || next;
|
|
10835
10835
|
}
|
|
10836
10836
|
if (prev !== next) {
|
|
10837
10837
|
this._value = next;
|
|
@@ -10847,7 +10847,7 @@ class Combobox extends FormAssociatedCombobox {
|
|
|
10847
10847
|
*/
|
|
10848
10848
|
clickHandler(e) {
|
|
10849
10849
|
const captured = e.target.closest(`option,[role=option]`);
|
|
10850
|
-
if (this.disabled || (captured === null || captured ===
|
|
10850
|
+
if (this.disabled || (captured === null || captured === void 0 ? void 0 : captured.disabled)) {
|
|
10851
10851
|
return;
|
|
10852
10852
|
}
|
|
10853
10853
|
if (this.open) {
|
|
@@ -10921,7 +10921,7 @@ class Combobox extends FormAssociatedCombobox {
|
|
|
10921
10921
|
if (this.firstSelectedOption) {
|
|
10922
10922
|
requestAnimationFrame(() => {
|
|
10923
10923
|
var _a;
|
|
10924
|
-
(_a = this.firstSelectedOption) === null || _a ===
|
|
10924
|
+
(_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
10925
10925
|
});
|
|
10926
10926
|
}
|
|
10927
10927
|
}
|
|
@@ -11141,7 +11141,7 @@ class Combobox extends FormAssociatedCombobox {
|
|
|
11141
11141
|
*/
|
|
11142
11142
|
syncValue() {
|
|
11143
11143
|
var _a;
|
|
11144
|
-
const newValue = this.selectedIndex > -1 ? (_a = this.firstSelectedOption) === null || _a ===
|
|
11144
|
+
const newValue = this.selectedIndex > -1 ? (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text : this.control.value;
|
|
11145
11145
|
this.updateValue(this.value !== newValue);
|
|
11146
11146
|
}
|
|
11147
11147
|
/**
|
|
@@ -11204,7 +11204,7 @@ class Combobox extends FormAssociatedCombobox {
|
|
|
11204
11204
|
updateValue(shouldEmit) {
|
|
11205
11205
|
var _a;
|
|
11206
11206
|
if (this.$fastController.isConnected) {
|
|
11207
|
-
this.value = ((_a = this.firstSelectedOption) === null || _a ===
|
|
11207
|
+
this.value = ((_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) || this.control.value;
|
|
11208
11208
|
this.control.value = this.value;
|
|
11209
11209
|
}
|
|
11210
11210
|
if (shouldEmit) {
|
|
@@ -11221,22 +11221,22 @@ class Combobox extends FormAssociatedCombobox {
|
|
|
11221
11221
|
}
|
|
11222
11222
|
__decorate([
|
|
11223
11223
|
attr({ attribute: "autocomplete", mode: "fromView" })
|
|
11224
|
-
], Combobox.prototype, "autocomplete",
|
|
11224
|
+
], Combobox.prototype, "autocomplete", void 0);
|
|
11225
11225
|
__decorate([
|
|
11226
11226
|
observable
|
|
11227
|
-
], Combobox.prototype, "maxHeight",
|
|
11227
|
+
], Combobox.prototype, "maxHeight", void 0);
|
|
11228
11228
|
__decorate([
|
|
11229
11229
|
attr({ attribute: "open", mode: "boolean" })
|
|
11230
|
-
], Combobox.prototype, "open",
|
|
11230
|
+
], Combobox.prototype, "open", void 0);
|
|
11231
11231
|
__decorate([
|
|
11232
11232
|
attr
|
|
11233
|
-
], Combobox.prototype, "placeholder",
|
|
11233
|
+
], Combobox.prototype, "placeholder", void 0);
|
|
11234
11234
|
__decorate([
|
|
11235
11235
|
attr({ attribute: "position" })
|
|
11236
|
-
], Combobox.prototype, "positionAttribute",
|
|
11236
|
+
], Combobox.prototype, "positionAttribute", void 0);
|
|
11237
11237
|
__decorate([
|
|
11238
11238
|
observable
|
|
11239
|
-
], Combobox.prototype, "position",
|
|
11239
|
+
], Combobox.prototype, "position", void 0);
|
|
11240
11240
|
/**
|
|
11241
11241
|
* Includes ARIA states and properties relating to the ARIA combobox role.
|
|
11242
11242
|
*
|
|
@@ -11246,10 +11246,10 @@ class DelegatesARIACombobox {
|
|
|
11246
11246
|
}
|
|
11247
11247
|
__decorate([
|
|
11248
11248
|
observable
|
|
11249
|
-
], DelegatesARIACombobox.prototype, "ariaAutoComplete",
|
|
11249
|
+
], DelegatesARIACombobox.prototype, "ariaAutoComplete", void 0);
|
|
11250
11250
|
__decorate([
|
|
11251
11251
|
observable
|
|
11252
|
-
], DelegatesARIACombobox.prototype, "ariaControls",
|
|
11252
|
+
], DelegatesARIACombobox.prototype, "ariaControls", void 0);
|
|
11253
11253
|
applyMixins(DelegatesARIACombobox, DelegatesARIAListbox);
|
|
11254
11254
|
applyMixins(Combobox, StartEnd, DelegatesARIACombobox);
|
|
11255
11255
|
|
|
@@ -11474,7 +11474,7 @@ class StyleElementStyleSheetTarget {
|
|
|
11474
11474
|
}
|
|
11475
11475
|
__decorate([
|
|
11476
11476
|
observable
|
|
11477
|
-
], StyleElementStyleSheetTarget.prototype, "target",
|
|
11477
|
+
], StyleElementStyleSheetTarget.prototype, "target", void 0);
|
|
11478
11478
|
/**
|
|
11479
11479
|
* Handles setting properties for a normal HTMLElement
|
|
11480
11480
|
*/
|
|
@@ -11590,7 +11590,7 @@ class DesignTokenImpl extends CSSDirective {
|
|
|
11590
11590
|
name: typeof nameOrConfig === "string" ? nameOrConfig : nameOrConfig.name,
|
|
11591
11591
|
cssCustomPropertyName: typeof nameOrConfig === "string"
|
|
11592
11592
|
? nameOrConfig
|
|
11593
|
-
: nameOrConfig.cssCustomPropertyName ===
|
|
11593
|
+
: nameOrConfig.cssCustomPropertyName === void 0
|
|
11594
11594
|
? nameOrConfig.name
|
|
11595
11595
|
: nameOrConfig.cssCustomPropertyName,
|
|
11596
11596
|
});
|
|
@@ -11951,7 +11951,7 @@ class DesignTokenNode {
|
|
|
11951
11951
|
if (this.assignedValues.has(token)) {
|
|
11952
11952
|
return this.assignedValues.get(token);
|
|
11953
11953
|
}
|
|
11954
|
-
return (_a = DesignTokenNode.findClosestAssignedNode(token, this)) === null || _a ===
|
|
11954
|
+
return (_a = DesignTokenNode.findClosestAssignedNode(token, this)) === null || _a === void 0 ? void 0 : _a.getRaw(token);
|
|
11955
11955
|
}
|
|
11956
11956
|
/**
|
|
11957
11957
|
* Sets a token to a value for a node
|
|
@@ -12158,7 +12158,7 @@ class DesignTokenNode {
|
|
|
12158
12158
|
DesignTokenNode.cssCustomPropertyReflector = new CustomPropertyReflector();
|
|
12159
12159
|
__decorate([
|
|
12160
12160
|
observable
|
|
12161
|
-
], DesignTokenNode.prototype, "children",
|
|
12161
|
+
], DesignTokenNode.prototype, "children", void 0);
|
|
12162
12162
|
function create(nameOrConfig) {
|
|
12163
12163
|
return DesignTokenImpl.from(nameOrConfig);
|
|
12164
12164
|
}
|
|
@@ -12373,7 +12373,7 @@ class DefaultDesignSystem {
|
|
|
12373
12373
|
return;
|
|
12374
12374
|
case ElementDisambiguation.definitionCallbackOnly:
|
|
12375
12375
|
needsDefine = false;
|
|
12376
|
-
typeFoundByName =
|
|
12376
|
+
typeFoundByName = void 0;
|
|
12377
12377
|
break;
|
|
12378
12378
|
default:
|
|
12379
12379
|
elementName = result;
|
|
@@ -12478,9 +12478,9 @@ var NoElement = typeof Element === 'undefined';
|
|
|
12478
12478
|
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
12479
12479
|
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
12480
12480
|
var _element$getRootNode;
|
|
12481
|
-
return element === null || element ===
|
|
12481
|
+
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
12482
12482
|
} : function (element) {
|
|
12483
|
-
return element === null || element ===
|
|
12483
|
+
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
12484
12484
|
};
|
|
12485
12485
|
|
|
12486
12486
|
/**
|
|
@@ -12493,13 +12493,13 @@ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (elemen
|
|
|
12493
12493
|
*/
|
|
12494
12494
|
var isInert = function isInert(node, lookUp) {
|
|
12495
12495
|
var _node$getAttribute;
|
|
12496
|
-
if (lookUp ===
|
|
12496
|
+
if (lookUp === void 0) {
|
|
12497
12497
|
lookUp = true;
|
|
12498
12498
|
}
|
|
12499
12499
|
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
12500
12500
|
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
12501
12501
|
// if it's `null` (not specified) or 'false', it's an active element
|
|
12502
|
-
var inertAtt = node === null || node ===
|
|
12502
|
+
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
12503
12503
|
var inert = inertAtt === '' || inertAtt === 'true';
|
|
12504
12504
|
|
|
12505
12505
|
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
@@ -12522,7 +12522,7 @@ var isContentEditable = function isContentEditable(node) {
|
|
|
12522
12522
|
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
12523
12523
|
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
12524
12524
|
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
12525
|
-
var attValue = node === null || node ===
|
|
12525
|
+
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
12526
12526
|
return attValue === '' || attValue === 'true';
|
|
12527
12527
|
};
|
|
12528
12528
|
|
|
@@ -12636,22 +12636,22 @@ var isNodeAttached = function isNodeAttached(node) {
|
|
|
12636
12636
|
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
12637
12637
|
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
12638
12638
|
var nodeRoot = node && getRootNode(node);
|
|
12639
|
-
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot ===
|
|
12639
|
+
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
12640
12640
|
|
|
12641
12641
|
// in some cases, a detached node will return itself as the root instead of a document or
|
|
12642
12642
|
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
12643
12643
|
var attached = false;
|
|
12644
12644
|
if (nodeRoot && nodeRoot !== node) {
|
|
12645
12645
|
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
12646
|
-
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !==
|
|
12646
|
+
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
12647
12647
|
while (!attached && nodeRootHost) {
|
|
12648
12648
|
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
12649
12649
|
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
12650
12650
|
// which means we need to get the host's host and check if that parent host is contained
|
|
12651
12651
|
// in (i.e. attached to) the document
|
|
12652
12652
|
nodeRoot = getRootNode(nodeRootHost);
|
|
12653
|
-
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 ===
|
|
12654
|
-
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !==
|
|
12653
|
+
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
12654
|
+
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
12655
12655
|
}
|
|
12656
12656
|
}
|
|
12657
12657
|
return attached;
|
|
@@ -13065,7 +13065,7 @@ class Dialog extends FoundationElement {
|
|
|
13065
13065
|
*/
|
|
13066
13066
|
static isFocusableFastElement(element) {
|
|
13067
13067
|
var _a, _b;
|
|
13068
|
-
return !!((_b = (_a = element.$fastController) === null || _a ===
|
|
13068
|
+
return !!((_b = (_a = element.$fastController) === null || _a === void 0 ? void 0 : _a.definition.shadowOptions) === null || _b === void 0 ? void 0 : _b.delegatesFocus);
|
|
13069
13069
|
}
|
|
13070
13070
|
/**
|
|
13071
13071
|
* Test if the element has a focusable shadow
|
|
@@ -13076,29 +13076,29 @@ class Dialog extends FoundationElement {
|
|
|
13076
13076
|
*/
|
|
13077
13077
|
static hasTabbableShadow(element) {
|
|
13078
13078
|
var _a, _b;
|
|
13079
|
-
return Array.from((_b = (_a = element.shadowRoot) === null || _a ===
|
|
13079
|
+
return Array.from((_b = (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("*")) !== null && _b !== void 0 ? _b : []).some(x => {
|
|
13080
13080
|
return isTabbable(x);
|
|
13081
13081
|
});
|
|
13082
13082
|
}
|
|
13083
13083
|
}
|
|
13084
13084
|
__decorate([
|
|
13085
13085
|
attr({ mode: "boolean" })
|
|
13086
|
-
], Dialog.prototype, "modal",
|
|
13086
|
+
], Dialog.prototype, "modal", void 0);
|
|
13087
13087
|
__decorate([
|
|
13088
13088
|
attr({ mode: "boolean" })
|
|
13089
|
-
], Dialog.prototype, "hidden",
|
|
13089
|
+
], Dialog.prototype, "hidden", void 0);
|
|
13090
13090
|
__decorate([
|
|
13091
13091
|
attr({ attribute: "trap-focus", mode: "boolean" })
|
|
13092
|
-
], Dialog.prototype, "trapFocus",
|
|
13092
|
+
], Dialog.prototype, "trapFocus", void 0);
|
|
13093
13093
|
__decorate([
|
|
13094
13094
|
attr({ attribute: "aria-describedby" })
|
|
13095
|
-
], Dialog.prototype, "ariaDescribedby",
|
|
13095
|
+
], Dialog.prototype, "ariaDescribedby", void 0);
|
|
13096
13096
|
__decorate([
|
|
13097
13097
|
attr({ attribute: "aria-labelledby" })
|
|
13098
|
-
], Dialog.prototype, "ariaLabelledby",
|
|
13098
|
+
], Dialog.prototype, "ariaLabelledby", void 0);
|
|
13099
13099
|
__decorate([
|
|
13100
13100
|
attr({ attribute: "aria-label" })
|
|
13101
|
-
], Dialog.prototype, "ariaLabel",
|
|
13101
|
+
], Dialog.prototype, "ariaLabel", void 0);
|
|
13102
13102
|
|
|
13103
13103
|
const observer = new MutationObserver((mutations) => {
|
|
13104
13104
|
for (const mutation of mutations) {
|
|
@@ -13273,10 +13273,10 @@ class Disclosure extends FoundationElement {
|
|
|
13273
13273
|
}
|
|
13274
13274
|
__decorate([
|
|
13275
13275
|
attr({ mode: "boolean" })
|
|
13276
|
-
], Disclosure.prototype, "expanded",
|
|
13276
|
+
], Disclosure.prototype, "expanded", void 0);
|
|
13277
13277
|
__decorate([
|
|
13278
13278
|
attr
|
|
13279
|
-
], Disclosure.prototype, "title",
|
|
13279
|
+
], Disclosure.prototype, "title", void 0);
|
|
13280
13280
|
|
|
13281
13281
|
/**
|
|
13282
13282
|
* The template for the {@link @ni/fast-foundation#Divider} component.
|
|
@@ -13330,10 +13330,10 @@ class Divider extends FoundationElement {
|
|
|
13330
13330
|
}
|
|
13331
13331
|
__decorate([
|
|
13332
13332
|
attr
|
|
13333
|
-
], Divider.prototype, "role",
|
|
13333
|
+
], Divider.prototype, "role", void 0);
|
|
13334
13334
|
__decorate([
|
|
13335
13335
|
attr
|
|
13336
|
-
], Divider.prototype, "orientation",
|
|
13336
|
+
], Divider.prototype, "orientation", void 0);
|
|
13337
13337
|
|
|
13338
13338
|
/**
|
|
13339
13339
|
* The direction options for flipper.
|
|
@@ -13351,7 +13351,7 @@ const FlipperDirection = {
|
|
|
13351
13351
|
const flipperTemplate = (context, definition) => html `
|
|
13352
13352
|
<template
|
|
13353
13353
|
role="button"
|
|
13354
|
-
aria-disabled="${x => (x.disabled ? true :
|
|
13354
|
+
aria-disabled="${x => (x.disabled ? true : void 0)}"
|
|
13355
13355
|
tabindex="${x => (x.hiddenFromAT ? -1 : 0)}"
|
|
13356
13356
|
class="${x => x.direction} ${x => (x.disabled ? "disabled" : "")}"
|
|
13357
13357
|
@keyup="${(x, c) => x.keyupHandler(c.event)}"
|
|
@@ -13426,13 +13426,13 @@ class Flipper extends FoundationElement {
|
|
|
13426
13426
|
}
|
|
13427
13427
|
__decorate([
|
|
13428
13428
|
attr({ mode: "boolean" })
|
|
13429
|
-
], Flipper.prototype, "disabled",
|
|
13429
|
+
], Flipper.prototype, "disabled", void 0);
|
|
13430
13430
|
__decorate([
|
|
13431
13431
|
attr({ attribute: "aria-hidden", converter: booleanConverter })
|
|
13432
|
-
], Flipper.prototype, "hiddenFromAT",
|
|
13432
|
+
], Flipper.prototype, "hiddenFromAT", void 0);
|
|
13433
13433
|
__decorate([
|
|
13434
13434
|
attr
|
|
13435
|
-
], Flipper.prototype, "direction",
|
|
13435
|
+
], Flipper.prototype, "direction", void 0);
|
|
13436
13436
|
|
|
13437
13437
|
/**
|
|
13438
13438
|
* The template for the {@link @ni/fast-foundation#(ListboxOption:class)} component.
|
|
@@ -13497,7 +13497,7 @@ class ListboxElement extends Listbox {
|
|
|
13497
13497
|
*/
|
|
13498
13498
|
get checkedOptions() {
|
|
13499
13499
|
var _a;
|
|
13500
|
-
return (_a = this.options) === null || _a ===
|
|
13500
|
+
return (_a = this.options) === null || _a === void 0 ? void 0 : _a.filter(o => o.checked);
|
|
13501
13501
|
}
|
|
13502
13502
|
/**
|
|
13503
13503
|
* Returns the index of the first selected option.
|
|
@@ -13517,7 +13517,7 @@ class ListboxElement extends Listbox {
|
|
|
13517
13517
|
*/
|
|
13518
13518
|
activeIndexChanged(prev, next) {
|
|
13519
13519
|
var _a, _b;
|
|
13520
|
-
this.ariaActiveDescendant = (_b = (_a = this.options[next]) === null || _a ===
|
|
13520
|
+
this.ariaActiveDescendant = (_b = (_a = this.options[next]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : "";
|
|
13521
13521
|
this.focusAndScrollOptionIntoView();
|
|
13522
13522
|
}
|
|
13523
13523
|
/**
|
|
@@ -13669,7 +13669,7 @@ class ListboxElement extends Listbox {
|
|
|
13669
13669
|
if (!this.multiple) {
|
|
13670
13670
|
return super.clickHandler(e);
|
|
13671
13671
|
}
|
|
13672
|
-
const captured = (_a = e.target) === null || _a ===
|
|
13672
|
+
const captured = (_a = e.target) === null || _a === void 0 ? void 0 : _a.closest(`[role=option]`);
|
|
13673
13673
|
if (!captured || captured.disabled) {
|
|
13674
13674
|
return;
|
|
13675
13675
|
}
|
|
@@ -13804,7 +13804,7 @@ class ListboxElement extends Listbox {
|
|
|
13804
13804
|
multipleChanged(prev, next) {
|
|
13805
13805
|
var _a;
|
|
13806
13806
|
this.ariaMultiSelectable = next ? "true" : null;
|
|
13807
|
-
(_a = this.options) === null || _a ===
|
|
13807
|
+
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(o => {
|
|
13808
13808
|
o.checked = next ? false : undefined;
|
|
13809
13809
|
});
|
|
13810
13810
|
this.setSelectedOptions();
|
|
@@ -13835,7 +13835,7 @@ class ListboxElement extends Listbox {
|
|
|
13835
13835
|
*/
|
|
13836
13836
|
sizeChanged(prev, next) {
|
|
13837
13837
|
var _a;
|
|
13838
|
-
const size = Math.max(0, parseInt((_a = next === null || next ===
|
|
13838
|
+
const size = Math.max(0, parseInt((_a = next === null || next === void 0 ? void 0 : next.toFixed()) !== null && _a !== void 0 ? _a : "", 10));
|
|
13839
13839
|
if (size !== next) {
|
|
13840
13840
|
DOM.queueUpdate(() => {
|
|
13841
13841
|
this.size = size;
|
|
@@ -13895,13 +13895,13 @@ class ListboxElement extends Listbox {
|
|
|
13895
13895
|
}
|
|
13896
13896
|
__decorate([
|
|
13897
13897
|
observable
|
|
13898
|
-
], ListboxElement.prototype, "activeIndex",
|
|
13898
|
+
], ListboxElement.prototype, "activeIndex", void 0);
|
|
13899
13899
|
__decorate([
|
|
13900
13900
|
attr({ mode: "boolean" })
|
|
13901
|
-
], ListboxElement.prototype, "multiple",
|
|
13901
|
+
], ListboxElement.prototype, "multiple", void 0);
|
|
13902
13902
|
__decorate([
|
|
13903
13903
|
attr({ converter: nullableNumberConverter })
|
|
13904
|
-
], ListboxElement.prototype, "size",
|
|
13904
|
+
], ListboxElement.prototype, "size", void 0);
|
|
13905
13905
|
|
|
13906
13906
|
/**
|
|
13907
13907
|
* The template for the {@link @ni/fast-foundation#(Listbox:class)} component.
|
|
@@ -13974,16 +13974,16 @@ class PickerMenu extends FoundationElement {
|
|
|
13974
13974
|
}
|
|
13975
13975
|
__decorate([
|
|
13976
13976
|
observable
|
|
13977
|
-
], PickerMenu.prototype, "menuElements",
|
|
13977
|
+
], PickerMenu.prototype, "menuElements", void 0);
|
|
13978
13978
|
__decorate([
|
|
13979
13979
|
observable
|
|
13980
|
-
], PickerMenu.prototype, "headerElements",
|
|
13980
|
+
], PickerMenu.prototype, "headerElements", void 0);
|
|
13981
13981
|
__decorate([
|
|
13982
13982
|
observable
|
|
13983
|
-
], PickerMenu.prototype, "footerElements",
|
|
13983
|
+
], PickerMenu.prototype, "footerElements", void 0);
|
|
13984
13984
|
__decorate([
|
|
13985
13985
|
observable
|
|
13986
|
-
], PickerMenu.prototype, "suggestionsAvailableText",
|
|
13986
|
+
], PickerMenu.prototype, "suggestionsAvailableText", void 0);
|
|
13987
13987
|
|
|
13988
13988
|
const defaultContentsTemplate$1 = html `
|
|
13989
13989
|
<template>
|
|
@@ -14029,20 +14029,20 @@ class PickerMenuOption extends FoundationElement {
|
|
|
14029
14029
|
var _a, _b;
|
|
14030
14030
|
this.disconnectView();
|
|
14031
14031
|
this.customView =
|
|
14032
|
-
(_b = (_a = this.contentsTemplate) === null || _a ===
|
|
14032
|
+
(_b = (_a = this.contentsTemplate) === null || _a === void 0 ? void 0 : _a.render(this, this)) !== null && _b !== void 0 ? _b : defaultContentsTemplate$1.render(this, this);
|
|
14033
14033
|
}
|
|
14034
14034
|
disconnectView() {
|
|
14035
14035
|
var _a;
|
|
14036
|
-
(_a = this.customView) === null || _a ===
|
|
14036
|
+
(_a = this.customView) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
14037
14037
|
this.customView = undefined;
|
|
14038
14038
|
}
|
|
14039
14039
|
}
|
|
14040
14040
|
__decorate([
|
|
14041
14041
|
attr({ attribute: "value" })
|
|
14042
|
-
], PickerMenuOption.prototype, "value",
|
|
14042
|
+
], PickerMenuOption.prototype, "value", void 0);
|
|
14043
14043
|
__decorate([
|
|
14044
14044
|
observable
|
|
14045
|
-
], PickerMenuOption.prototype, "contentsTemplate",
|
|
14045
|
+
], PickerMenuOption.prototype, "contentsTemplate", void 0);
|
|
14046
14046
|
|
|
14047
14047
|
/**
|
|
14048
14048
|
* A List Picker Menu Custom HTML Element.
|
|
@@ -14105,20 +14105,20 @@ class PickerListItem extends FoundationElement {
|
|
|
14105
14105
|
var _a, _b;
|
|
14106
14106
|
this.disconnectView();
|
|
14107
14107
|
this.customView =
|
|
14108
|
-
(_b = (_a = this.contentsTemplate) === null || _a ===
|
|
14108
|
+
(_b = (_a = this.contentsTemplate) === null || _a === void 0 ? void 0 : _a.render(this, this)) !== null && _b !== void 0 ? _b : defaultContentsTemplate.render(this, this);
|
|
14109
14109
|
}
|
|
14110
14110
|
disconnectView() {
|
|
14111
14111
|
var _a;
|
|
14112
|
-
(_a = this.customView) === null || _a ===
|
|
14112
|
+
(_a = this.customView) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
14113
14113
|
this.customView = undefined;
|
|
14114
14114
|
}
|
|
14115
14115
|
}
|
|
14116
14116
|
__decorate([
|
|
14117
14117
|
attr({ attribute: "value" })
|
|
14118
|
-
], PickerListItem.prototype, "value",
|
|
14118
|
+
], PickerListItem.prototype, "value", void 0);
|
|
14119
14119
|
__decorate([
|
|
14120
14120
|
observable
|
|
14121
|
-
], PickerListItem.prototype, "contentsTemplate",
|
|
14121
|
+
], PickerListItem.prototype, "contentsTemplate", void 0);
|
|
14122
14122
|
|
|
14123
14123
|
function createDefaultListItemTemplate(context) {
|
|
14124
14124
|
const pickerListItemTag = context.tagFor(PickerListItem);
|
|
@@ -14807,9 +14807,9 @@ class Picker extends FormAssociatedPicker {
|
|
|
14807
14807
|
var _a, _b, _c;
|
|
14808
14808
|
this.menuFocusIndex = -1;
|
|
14809
14809
|
this.menuFocusOptionId = undefined;
|
|
14810
|
-
(_a = this.inputElement) === null || _a ===
|
|
14811
|
-
(_b = this.inputElement) === null || _b ===
|
|
14812
|
-
(_c = this.inputElement) === null || _c ===
|
|
14810
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.removeAttribute("aria-activedescendant");
|
|
14811
|
+
(_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.removeAttribute("aria-owns");
|
|
14812
|
+
(_c = this.inputElement) === null || _c === void 0 ? void 0 : _c.removeAttribute("aria-expanded");
|
|
14813
14813
|
}
|
|
14814
14814
|
/**
|
|
14815
14815
|
* Sets the currently focused menu option by index
|
|
@@ -14846,7 +14846,7 @@ class Picker extends FormAssociatedPicker {
|
|
|
14846
14846
|
updateListItemTemplate() {
|
|
14847
14847
|
var _a;
|
|
14848
14848
|
this.activeListItemTemplate =
|
|
14849
|
-
(_a = this.listItemTemplate) !== null && _a !==
|
|
14849
|
+
(_a = this.listItemTemplate) !== null && _a !== void 0 ? _a : this.defaultListItemTemplate;
|
|
14850
14850
|
}
|
|
14851
14851
|
/**
|
|
14852
14852
|
* Updates the template used for the menu option repeat behavior
|
|
@@ -14854,7 +14854,7 @@ class Picker extends FormAssociatedPicker {
|
|
|
14854
14854
|
updateOptionTemplate() {
|
|
14855
14855
|
var _a;
|
|
14856
14856
|
this.activeMenuOptionTemplate =
|
|
14857
|
-
(_a = this.menuOptionTemplate) !== null && _a !==
|
|
14857
|
+
(_a = this.menuOptionTemplate) !== null && _a !== void 0 ? _a : this.defaultMenuOptionTemplate;
|
|
14858
14858
|
}
|
|
14859
14859
|
/**
|
|
14860
14860
|
* Updates the filtered options array
|
|
@@ -14881,103 +14881,103 @@ class Picker extends FormAssociatedPicker {
|
|
|
14881
14881
|
}
|
|
14882
14882
|
__decorate([
|
|
14883
14883
|
attr({ attribute: "selection" })
|
|
14884
|
-
], Picker.prototype, "selection",
|
|
14884
|
+
], Picker.prototype, "selection", void 0);
|
|
14885
14885
|
__decorate([
|
|
14886
14886
|
attr({ attribute: "options" })
|
|
14887
|
-
], Picker.prototype, "options",
|
|
14887
|
+
], Picker.prototype, "options", void 0);
|
|
14888
14888
|
__decorate([
|
|
14889
14889
|
attr({ attribute: "filter-selected", mode: "boolean" })
|
|
14890
|
-
], Picker.prototype, "filterSelected",
|
|
14890
|
+
], Picker.prototype, "filterSelected", void 0);
|
|
14891
14891
|
__decorate([
|
|
14892
14892
|
attr({ attribute: "filter-query", mode: "boolean" })
|
|
14893
|
-
], Picker.prototype, "filterQuery",
|
|
14893
|
+
], Picker.prototype, "filterQuery", void 0);
|
|
14894
14894
|
__decorate([
|
|
14895
14895
|
attr({ attribute: "max-selected" })
|
|
14896
|
-
], Picker.prototype, "maxSelected",
|
|
14896
|
+
], Picker.prototype, "maxSelected", void 0);
|
|
14897
14897
|
__decorate([
|
|
14898
14898
|
attr({ attribute: "no-suggestions-text" })
|
|
14899
|
-
], Picker.prototype, "noSuggestionsText",
|
|
14899
|
+
], Picker.prototype, "noSuggestionsText", void 0);
|
|
14900
14900
|
__decorate([
|
|
14901
14901
|
attr({ attribute: "suggestions-available-text" })
|
|
14902
|
-
], Picker.prototype, "suggestionsAvailableText",
|
|
14902
|
+
], Picker.prototype, "suggestionsAvailableText", void 0);
|
|
14903
14903
|
__decorate([
|
|
14904
14904
|
attr({ attribute: "loading-text" })
|
|
14905
|
-
], Picker.prototype, "loadingText",
|
|
14905
|
+
], Picker.prototype, "loadingText", void 0);
|
|
14906
14906
|
__decorate([
|
|
14907
14907
|
attr({ attribute: "label" })
|
|
14908
|
-
], Picker.prototype, "label",
|
|
14908
|
+
], Picker.prototype, "label", void 0);
|
|
14909
14909
|
__decorate([
|
|
14910
14910
|
attr({ attribute: "labelledby" })
|
|
14911
|
-
], Picker.prototype, "labelledBy",
|
|
14911
|
+
], Picker.prototype, "labelledBy", void 0);
|
|
14912
14912
|
__decorate([
|
|
14913
14913
|
attr({ attribute: "placeholder" })
|
|
14914
|
-
], Picker.prototype, "placeholder",
|
|
14914
|
+
], Picker.prototype, "placeholder", void 0);
|
|
14915
14915
|
__decorate([
|
|
14916
14916
|
attr({ attribute: "menu-placement" })
|
|
14917
|
-
], Picker.prototype, "menuPlacement",
|
|
14917
|
+
], Picker.prototype, "menuPlacement", void 0);
|
|
14918
14918
|
__decorate([
|
|
14919
14919
|
observable
|
|
14920
|
-
], Picker.prototype, "showLoading",
|
|
14920
|
+
], Picker.prototype, "showLoading", void 0);
|
|
14921
14921
|
__decorate([
|
|
14922
14922
|
observable
|
|
14923
|
-
], Picker.prototype, "listItemTemplate",
|
|
14923
|
+
], Picker.prototype, "listItemTemplate", void 0);
|
|
14924
14924
|
__decorate([
|
|
14925
14925
|
observable
|
|
14926
|
-
], Picker.prototype, "defaultListItemTemplate",
|
|
14926
|
+
], Picker.prototype, "defaultListItemTemplate", void 0);
|
|
14927
14927
|
__decorate([
|
|
14928
14928
|
observable
|
|
14929
|
-
], Picker.prototype, "activeListItemTemplate",
|
|
14929
|
+
], Picker.prototype, "activeListItemTemplate", void 0);
|
|
14930
14930
|
__decorate([
|
|
14931
14931
|
observable
|
|
14932
|
-
], Picker.prototype, "menuOptionTemplate",
|
|
14932
|
+
], Picker.prototype, "menuOptionTemplate", void 0);
|
|
14933
14933
|
__decorate([
|
|
14934
14934
|
observable
|
|
14935
|
-
], Picker.prototype, "defaultMenuOptionTemplate",
|
|
14935
|
+
], Picker.prototype, "defaultMenuOptionTemplate", void 0);
|
|
14936
14936
|
__decorate([
|
|
14937
14937
|
observable
|
|
14938
|
-
], Picker.prototype, "activeMenuOptionTemplate",
|
|
14938
|
+
], Picker.prototype, "activeMenuOptionTemplate", void 0);
|
|
14939
14939
|
__decorate([
|
|
14940
14940
|
observable
|
|
14941
|
-
], Picker.prototype, "listItemContentsTemplate",
|
|
14941
|
+
], Picker.prototype, "listItemContentsTemplate", void 0);
|
|
14942
14942
|
__decorate([
|
|
14943
14943
|
observable
|
|
14944
|
-
], Picker.prototype, "menuOptionContentsTemplate",
|
|
14944
|
+
], Picker.prototype, "menuOptionContentsTemplate", void 0);
|
|
14945
14945
|
__decorate([
|
|
14946
14946
|
observable
|
|
14947
|
-
], Picker.prototype, "optionsList",
|
|
14947
|
+
], Picker.prototype, "optionsList", void 0);
|
|
14948
14948
|
__decorate([
|
|
14949
14949
|
observable
|
|
14950
|
-
], Picker.prototype, "query",
|
|
14950
|
+
], Picker.prototype, "query", void 0);
|
|
14951
14951
|
__decorate([
|
|
14952
14952
|
observable
|
|
14953
|
-
], Picker.prototype, "filteredOptionsList",
|
|
14953
|
+
], Picker.prototype, "filteredOptionsList", void 0);
|
|
14954
14954
|
__decorate([
|
|
14955
14955
|
observable
|
|
14956
|
-
], Picker.prototype, "flyoutOpen",
|
|
14956
|
+
], Picker.prototype, "flyoutOpen", void 0);
|
|
14957
14957
|
__decorate([
|
|
14958
14958
|
observable
|
|
14959
|
-
], Picker.prototype, "menuId",
|
|
14959
|
+
], Picker.prototype, "menuId", void 0);
|
|
14960
14960
|
__decorate([
|
|
14961
14961
|
observable
|
|
14962
|
-
], Picker.prototype, "selectedListTag",
|
|
14962
|
+
], Picker.prototype, "selectedListTag", void 0);
|
|
14963
14963
|
__decorate([
|
|
14964
14964
|
observable
|
|
14965
|
-
], Picker.prototype, "menuTag",
|
|
14965
|
+
], Picker.prototype, "menuTag", void 0);
|
|
14966
14966
|
__decorate([
|
|
14967
14967
|
observable
|
|
14968
|
-
], Picker.prototype, "menuFocusIndex",
|
|
14968
|
+
], Picker.prototype, "menuFocusIndex", void 0);
|
|
14969
14969
|
__decorate([
|
|
14970
14970
|
observable
|
|
14971
|
-
], Picker.prototype, "menuFocusOptionId",
|
|
14971
|
+
], Picker.prototype, "menuFocusOptionId", void 0);
|
|
14972
14972
|
__decorate([
|
|
14973
14973
|
observable
|
|
14974
|
-
], Picker.prototype, "showNoOptions",
|
|
14974
|
+
], Picker.prototype, "showNoOptions", void 0);
|
|
14975
14975
|
__decorate([
|
|
14976
14976
|
observable
|
|
14977
|
-
], Picker.prototype, "menuConfig",
|
|
14977
|
+
], Picker.prototype, "menuConfig", void 0);
|
|
14978
14978
|
__decorate([
|
|
14979
14979
|
observable
|
|
14980
|
-
], Picker.prototype, "selectedItems",
|
|
14980
|
+
], Picker.prototype, "selectedItems", void 0);
|
|
14981
14981
|
|
|
14982
14982
|
/**
|
|
14983
14983
|
* The template for the List Picker component.
|
|
@@ -15297,31 +15297,31 @@ class MenuItem extends FoundationElement {
|
|
|
15297
15297
|
}
|
|
15298
15298
|
__decorate([
|
|
15299
15299
|
attr({ mode: "boolean" })
|
|
15300
|
-
], MenuItem.prototype, "disabled",
|
|
15300
|
+
], MenuItem.prototype, "disabled", void 0);
|
|
15301
15301
|
__decorate([
|
|
15302
15302
|
attr({ mode: "boolean" })
|
|
15303
|
-
], MenuItem.prototype, "expanded",
|
|
15303
|
+
], MenuItem.prototype, "expanded", void 0);
|
|
15304
15304
|
__decorate([
|
|
15305
15305
|
observable
|
|
15306
|
-
], MenuItem.prototype, "startColumnCount",
|
|
15306
|
+
], MenuItem.prototype, "startColumnCount", void 0);
|
|
15307
15307
|
__decorate([
|
|
15308
15308
|
attr
|
|
15309
|
-
], MenuItem.prototype, "role",
|
|
15309
|
+
], MenuItem.prototype, "role", void 0);
|
|
15310
15310
|
__decorate([
|
|
15311
15311
|
attr({ mode: "boolean" })
|
|
15312
|
-
], MenuItem.prototype, "checked",
|
|
15312
|
+
], MenuItem.prototype, "checked", void 0);
|
|
15313
15313
|
__decorate([
|
|
15314
15314
|
observable
|
|
15315
|
-
], MenuItem.prototype, "submenuRegion",
|
|
15315
|
+
], MenuItem.prototype, "submenuRegion", void 0);
|
|
15316
15316
|
__decorate([
|
|
15317
15317
|
observable
|
|
15318
|
-
], MenuItem.prototype, "hasSubmenu",
|
|
15318
|
+
], MenuItem.prototype, "hasSubmenu", void 0);
|
|
15319
15319
|
__decorate([
|
|
15320
15320
|
observable
|
|
15321
|
-
], MenuItem.prototype, "currentDirection",
|
|
15321
|
+
], MenuItem.prototype, "currentDirection", void 0);
|
|
15322
15322
|
__decorate([
|
|
15323
15323
|
observable
|
|
15324
|
-
], MenuItem.prototype, "submenu",
|
|
15324
|
+
], MenuItem.prototype, "submenu", void 0);
|
|
15325
15325
|
applyMixins(MenuItem, StartEnd);
|
|
15326
15326
|
|
|
15327
15327
|
/**
|
|
@@ -15333,8 +15333,8 @@ applyMixins(MenuItem, StartEnd);
|
|
|
15333
15333
|
const menuItemTemplate = (context, definition) => html `
|
|
15334
15334
|
<template
|
|
15335
15335
|
role="${x => x.role}"
|
|
15336
|
-
aria-haspopup="${x => (x.hasSubmenu ? "menu" :
|
|
15337
|
-
aria-checked="${x => (x.role !== MenuItemRole.menuitem ? x.checked :
|
|
15336
|
+
aria-haspopup="${x => (x.hasSubmenu ? "menu" : void 0)}"
|
|
15337
|
+
aria-checked="${x => (x.role !== MenuItemRole.menuitem ? x.checked : void 0)}"
|
|
15338
15338
|
aria-disabled="${x => x.disabled}"
|
|
15339
15339
|
aria-expanded="${x => x.expanded}"
|
|
15340
15340
|
@keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}"
|
|
@@ -15405,7 +15405,7 @@ const menuItemTemplate = (context, definition) => html `
|
|
|
15405
15405
|
*/
|
|
15406
15406
|
const menuTemplate = (context, definition) => html `
|
|
15407
15407
|
<template
|
|
15408
|
-
slot="${x => (x.slot ? x.slot : x.isNestedMenu() ? "submenu" :
|
|
15408
|
+
slot="${x => (x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0)}"
|
|
15409
15409
|
role="menu"
|
|
15410
15410
|
@keydown="${(x, c) => x.handleMenuKeyDown(c.event)}"
|
|
15411
15411
|
@focusout="${(x, c) => x.handleFocusOut(c.event)}"
|
|
@@ -15698,7 +15698,7 @@ class Menu extends FoundationElement {
|
|
|
15698
15698
|
Menu.focusableElementRoles = roleForMenuItem;
|
|
15699
15699
|
__decorate([
|
|
15700
15700
|
observable
|
|
15701
|
-
], Menu.prototype, "items",
|
|
15701
|
+
], Menu.prototype, "items", void 0);
|
|
15702
15702
|
|
|
15703
15703
|
/**
|
|
15704
15704
|
* The template for the {@link @ni/fast-foundation#(NumberField:class)} component.
|
|
@@ -15960,37 +15960,37 @@ class TextField extends FormAssociatedTextField {
|
|
|
15960
15960
|
}
|
|
15961
15961
|
__decorate([
|
|
15962
15962
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
15963
|
-
], TextField.prototype, "readOnly",
|
|
15963
|
+
], TextField.prototype, "readOnly", void 0);
|
|
15964
15964
|
__decorate([
|
|
15965
15965
|
attr({ mode: "boolean" })
|
|
15966
|
-
], TextField.prototype, "autofocus",
|
|
15966
|
+
], TextField.prototype, "autofocus", void 0);
|
|
15967
15967
|
__decorate([
|
|
15968
15968
|
attr
|
|
15969
|
-
], TextField.prototype, "placeholder",
|
|
15969
|
+
], TextField.prototype, "placeholder", void 0);
|
|
15970
15970
|
__decorate([
|
|
15971
15971
|
attr
|
|
15972
|
-
], TextField.prototype, "type",
|
|
15972
|
+
], TextField.prototype, "type", void 0);
|
|
15973
15973
|
__decorate([
|
|
15974
15974
|
attr
|
|
15975
|
-
], TextField.prototype, "list",
|
|
15975
|
+
], TextField.prototype, "list", void 0);
|
|
15976
15976
|
__decorate([
|
|
15977
15977
|
attr({ converter: nullableNumberConverter })
|
|
15978
|
-
], TextField.prototype, "maxlength",
|
|
15978
|
+
], TextField.prototype, "maxlength", void 0);
|
|
15979
15979
|
__decorate([
|
|
15980
15980
|
attr({ converter: nullableNumberConverter })
|
|
15981
|
-
], TextField.prototype, "minlength",
|
|
15981
|
+
], TextField.prototype, "minlength", void 0);
|
|
15982
15982
|
__decorate([
|
|
15983
15983
|
attr
|
|
15984
|
-
], TextField.prototype, "pattern",
|
|
15984
|
+
], TextField.prototype, "pattern", void 0);
|
|
15985
15985
|
__decorate([
|
|
15986
15986
|
attr({ converter: nullableNumberConverter })
|
|
15987
|
-
], TextField.prototype, "size",
|
|
15987
|
+
], TextField.prototype, "size", void 0);
|
|
15988
15988
|
__decorate([
|
|
15989
15989
|
attr({ mode: "boolean" })
|
|
15990
|
-
], TextField.prototype, "spellcheck",
|
|
15990
|
+
], TextField.prototype, "spellcheck", void 0);
|
|
15991
15991
|
__decorate([
|
|
15992
15992
|
observable
|
|
15993
|
-
], TextField.prototype, "defaultSlottedNodes",
|
|
15993
|
+
], TextField.prototype, "defaultSlottedNodes", void 0);
|
|
15994
15994
|
/**
|
|
15995
15995
|
* Includes ARIA states and properties relating to the ARIA textbox role
|
|
15996
15996
|
*
|
|
@@ -16068,7 +16068,7 @@ class NumberField extends FormAssociatedNumberField {
|
|
|
16068
16068
|
*/
|
|
16069
16069
|
maxChanged(previous, next) {
|
|
16070
16070
|
var _a;
|
|
16071
|
-
this.max = Math.max(next, (_a = this.min) !== null && _a !==
|
|
16071
|
+
this.max = Math.max(next, (_a = this.min) !== null && _a !== void 0 ? _a : next);
|
|
16072
16072
|
const min = Math.min(this.min, this.max);
|
|
16073
16073
|
if (this.min !== undefined && this.min !== min) {
|
|
16074
16074
|
this.min = min;
|
|
@@ -16085,7 +16085,7 @@ class NumberField extends FormAssociatedNumberField {
|
|
|
16085
16085
|
*/
|
|
16086
16086
|
minChanged(previous, next) {
|
|
16087
16087
|
var _a;
|
|
16088
|
-
this.min = Math.min(next, (_a = this.max) !== null && _a !==
|
|
16088
|
+
this.min = Math.min(next, (_a = this.max) !== null && _a !== void 0 ? _a : next);
|
|
16089
16089
|
const max = Math.max(this.min, this.max);
|
|
16090
16090
|
if (this.max !== undefined && this.max !== max) {
|
|
16091
16091
|
this.max = max;
|
|
@@ -16116,7 +16116,7 @@ class NumberField extends FormAssociatedNumberField {
|
|
|
16116
16116
|
return;
|
|
16117
16117
|
}
|
|
16118
16118
|
if (this.control && !this.isUserInput) {
|
|
16119
|
-
this.
|
|
16119
|
+
this.syncValueToInnerControl();
|
|
16120
16120
|
}
|
|
16121
16121
|
super.valueChanged(previous, this.value);
|
|
16122
16122
|
if (previous !== undefined && !this.isUserInput) {
|
|
@@ -16142,8 +16142,8 @@ class NumberField extends FormAssociatedNumberField {
|
|
|
16142
16142
|
validValue = "";
|
|
16143
16143
|
}
|
|
16144
16144
|
else {
|
|
16145
|
-
validValue = Math.min(validValue, (_a = this.max) !== null && _a !==
|
|
16146
|
-
validValue = Math.max(validValue, (_b = this.min) !== null && _b !==
|
|
16145
|
+
validValue = Math.min(validValue, (_a = this.max) !== null && _a !== void 0 ? _a : validValue);
|
|
16146
|
+
validValue = Math.max(validValue, (_b = this.min) !== null && _b !== void 0 ? _b : validValue).toString();
|
|
16147
16147
|
}
|
|
16148
16148
|
return validValue;
|
|
16149
16149
|
}
|
|
@@ -16191,7 +16191,7 @@ class NumberField extends FormAssociatedNumberField {
|
|
|
16191
16191
|
super.connectedCallback();
|
|
16192
16192
|
this.proxy.setAttribute("type", "number");
|
|
16193
16193
|
this.validate();
|
|
16194
|
-
this.
|
|
16194
|
+
this.syncValueToInnerControl();
|
|
16195
16195
|
if (this.autofocus) {
|
|
16196
16196
|
DOM.queueUpdate(() => {
|
|
16197
16197
|
this.focus();
|
|
@@ -16218,9 +16218,9 @@ class NumberField extends FormAssociatedNumberField {
|
|
|
16218
16218
|
* @internal
|
|
16219
16219
|
*/
|
|
16220
16220
|
handleTextInput() {
|
|
16221
|
-
this.control.value = this.control.value
|
|
16221
|
+
this.control.value = this.sanitizeInput(this.control.value);
|
|
16222
16222
|
this.isUserInput = true;
|
|
16223
|
-
this.
|
|
16223
|
+
this.syncValueFromInnerControl();
|
|
16224
16224
|
}
|
|
16225
16225
|
/**
|
|
16226
16226
|
* Change event handler for inner control.
|
|
@@ -16256,45 +16256,65 @@ class NumberField extends FormAssociatedNumberField {
|
|
|
16256
16256
|
* @internal
|
|
16257
16257
|
*/
|
|
16258
16258
|
handleBlur() {
|
|
16259
|
+
this.syncValueToInnerControl();
|
|
16260
|
+
}
|
|
16261
|
+
/**
|
|
16262
|
+
* Sanitizes the text input by the user.
|
|
16263
|
+
* @param inputText The user-input text to sanitize
|
|
16264
|
+
* @returns The sanitized text, containing only valid characters for a number field
|
|
16265
|
+
*/
|
|
16266
|
+
sanitizeInput(inputText) {
|
|
16267
|
+
return inputText.replace(/[^0-9\-+e.]/g, "");
|
|
16268
|
+
}
|
|
16269
|
+
/**
|
|
16270
|
+
* Synchronizes the value from the input control in the shadow DOM to the host component.
|
|
16271
|
+
*/
|
|
16272
|
+
syncValueFromInnerControl() {
|
|
16273
|
+
this.value = this.control.value;
|
|
16274
|
+
}
|
|
16275
|
+
/**
|
|
16276
|
+
* Synchronizes the value from the host component to the input control in the shadow DOM.
|
|
16277
|
+
*/
|
|
16278
|
+
syncValueToInnerControl() {
|
|
16259
16279
|
this.control.value = this.value;
|
|
16260
16280
|
}
|
|
16261
16281
|
}
|
|
16262
16282
|
__decorate([
|
|
16263
16283
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
16264
|
-
], NumberField.prototype, "readOnly",
|
|
16284
|
+
], NumberField.prototype, "readOnly", void 0);
|
|
16265
16285
|
__decorate([
|
|
16266
16286
|
attr({ mode: "boolean" })
|
|
16267
|
-
], NumberField.prototype, "autofocus",
|
|
16287
|
+
], NumberField.prototype, "autofocus", void 0);
|
|
16268
16288
|
__decorate([
|
|
16269
16289
|
attr({ attribute: "hide-step", mode: "boolean" })
|
|
16270
|
-
], NumberField.prototype, "hideStep",
|
|
16290
|
+
], NumberField.prototype, "hideStep", void 0);
|
|
16271
16291
|
__decorate([
|
|
16272
16292
|
attr
|
|
16273
|
-
], NumberField.prototype, "placeholder",
|
|
16293
|
+
], NumberField.prototype, "placeholder", void 0);
|
|
16274
16294
|
__decorate([
|
|
16275
16295
|
attr
|
|
16276
|
-
], NumberField.prototype, "list",
|
|
16296
|
+
], NumberField.prototype, "list", void 0);
|
|
16277
16297
|
__decorate([
|
|
16278
16298
|
attr({ converter: nullableNumberConverter })
|
|
16279
|
-
], NumberField.prototype, "maxlength",
|
|
16299
|
+
], NumberField.prototype, "maxlength", void 0);
|
|
16280
16300
|
__decorate([
|
|
16281
16301
|
attr({ converter: nullableNumberConverter })
|
|
16282
|
-
], NumberField.prototype, "minlength",
|
|
16302
|
+
], NumberField.prototype, "minlength", void 0);
|
|
16283
16303
|
__decorate([
|
|
16284
16304
|
attr({ converter: nullableNumberConverter })
|
|
16285
|
-
], NumberField.prototype, "size",
|
|
16305
|
+
], NumberField.prototype, "size", void 0);
|
|
16286
16306
|
__decorate([
|
|
16287
16307
|
attr({ converter: nullableNumberConverter })
|
|
16288
|
-
], NumberField.prototype, "step",
|
|
16308
|
+
], NumberField.prototype, "step", void 0);
|
|
16289
16309
|
__decorate([
|
|
16290
16310
|
attr({ converter: nullableNumberConverter })
|
|
16291
|
-
], NumberField.prototype, "max",
|
|
16311
|
+
], NumberField.prototype, "max", void 0);
|
|
16292
16312
|
__decorate([
|
|
16293
16313
|
attr({ converter: nullableNumberConverter })
|
|
16294
|
-
], NumberField.prototype, "min",
|
|
16314
|
+
], NumberField.prototype, "min", void 0);
|
|
16295
16315
|
__decorate([
|
|
16296
16316
|
observable
|
|
16297
|
-
], NumberField.prototype, "defaultSlottedNodes",
|
|
16317
|
+
], NumberField.prototype, "defaultSlottedNodes", void 0);
|
|
16298
16318
|
applyMixins(NumberField, StartEnd, DelegatesARIATextbox);
|
|
16299
16319
|
|
|
16300
16320
|
const progressSegments = 44;
|
|
@@ -16395,19 +16415,19 @@ class BaseProgress extends FoundationElement {
|
|
|
16395
16415
|
}
|
|
16396
16416
|
__decorate([
|
|
16397
16417
|
attr({ converter: nullableNumberConverter })
|
|
16398
|
-
], BaseProgress.prototype, "value",
|
|
16418
|
+
], BaseProgress.prototype, "value", void 0);
|
|
16399
16419
|
__decorate([
|
|
16400
16420
|
attr({ converter: nullableNumberConverter })
|
|
16401
|
-
], BaseProgress.prototype, "min",
|
|
16421
|
+
], BaseProgress.prototype, "min", void 0);
|
|
16402
16422
|
__decorate([
|
|
16403
16423
|
attr({ converter: nullableNumberConverter })
|
|
16404
|
-
], BaseProgress.prototype, "max",
|
|
16424
|
+
], BaseProgress.prototype, "max", void 0);
|
|
16405
16425
|
__decorate([
|
|
16406
16426
|
attr({ mode: "boolean" })
|
|
16407
|
-
], BaseProgress.prototype, "paused",
|
|
16427
|
+
], BaseProgress.prototype, "paused", void 0);
|
|
16408
16428
|
__decorate([
|
|
16409
16429
|
observable
|
|
16410
|
-
], BaseProgress.prototype, "percentComplete",
|
|
16430
|
+
], BaseProgress.prototype, "percentComplete", void 0);
|
|
16411
16431
|
|
|
16412
16432
|
/**
|
|
16413
16433
|
* The template for the {@link @ni/fast-foundation#BaseProgress} component.
|
|
@@ -16529,11 +16549,11 @@ class RadioGroup extends FoundationElement {
|
|
|
16529
16549
|
};
|
|
16530
16550
|
this.moveRightOffGroup = () => {
|
|
16531
16551
|
var _a;
|
|
16532
|
-
(_a = this.nextElementSibling) === null || _a ===
|
|
16552
|
+
(_a = this.nextElementSibling) === null || _a === void 0 ? void 0 : _a.focus();
|
|
16533
16553
|
};
|
|
16534
16554
|
this.moveLeftOffGroup = () => {
|
|
16535
16555
|
var _a;
|
|
16536
|
-
(_a = this.previousElementSibling) === null || _a ===
|
|
16556
|
+
(_a = this.previousElementSibling) === null || _a === void 0 ? void 0 : _a.focus();
|
|
16537
16557
|
};
|
|
16538
16558
|
/**
|
|
16539
16559
|
* @internal
|
|
@@ -16760,11 +16780,11 @@ class RadioGroup extends FoundationElement {
|
|
|
16760
16780
|
}
|
|
16761
16781
|
get isInsideToolbar() {
|
|
16762
16782
|
var _a;
|
|
16763
|
-
return ((_a = this.parentToolbar) !== null && _a !==
|
|
16783
|
+
return ((_a = this.parentToolbar) !== null && _a !== void 0 ? _a : false);
|
|
16764
16784
|
}
|
|
16765
16785
|
get isInsideFoundationToolbar() {
|
|
16766
16786
|
var _a;
|
|
16767
|
-
return !!((_a = this.parentToolbar) === null || _a ===
|
|
16787
|
+
return !!((_a = this.parentToolbar) === null || _a === void 0 ? void 0 : _a["$fastController"]);
|
|
16768
16788
|
}
|
|
16769
16789
|
/**
|
|
16770
16790
|
* @internal
|
|
@@ -16834,25 +16854,25 @@ class RadioGroup extends FoundationElement {
|
|
|
16834
16854
|
}
|
|
16835
16855
|
__decorate([
|
|
16836
16856
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
16837
|
-
], RadioGroup.prototype, "readOnly",
|
|
16857
|
+
], RadioGroup.prototype, "readOnly", void 0);
|
|
16838
16858
|
__decorate([
|
|
16839
16859
|
attr({ attribute: "disabled", mode: "boolean" })
|
|
16840
|
-
], RadioGroup.prototype, "disabled",
|
|
16860
|
+
], RadioGroup.prototype, "disabled", void 0);
|
|
16841
16861
|
__decorate([
|
|
16842
16862
|
attr
|
|
16843
|
-
], RadioGroup.prototype, "name",
|
|
16863
|
+
], RadioGroup.prototype, "name", void 0);
|
|
16844
16864
|
__decorate([
|
|
16845
16865
|
attr
|
|
16846
|
-
], RadioGroup.prototype, "value",
|
|
16866
|
+
], RadioGroup.prototype, "value", void 0);
|
|
16847
16867
|
__decorate([
|
|
16848
16868
|
attr
|
|
16849
|
-
], RadioGroup.prototype, "orientation",
|
|
16869
|
+
], RadioGroup.prototype, "orientation", void 0);
|
|
16850
16870
|
__decorate([
|
|
16851
16871
|
observable
|
|
16852
|
-
], RadioGroup.prototype, "childItems",
|
|
16872
|
+
], RadioGroup.prototype, "childItems", void 0);
|
|
16853
16873
|
__decorate([
|
|
16854
16874
|
observable
|
|
16855
|
-
], RadioGroup.prototype, "slottedRadioButtons",
|
|
16875
|
+
], RadioGroup.prototype, "slottedRadioButtons", void 0);
|
|
16856
16876
|
|
|
16857
16877
|
/**
|
|
16858
16878
|
* The template for the {@link @ni/fast-foundation#(Radio:class)} component.
|
|
@@ -16927,7 +16947,7 @@ class Radio extends FormAssociatedRadio {
|
|
|
16927
16947
|
// but if we are clean when defaultChecked is changed, we want to stay
|
|
16928
16948
|
// in a clean state, so reset this.dirtyChecked
|
|
16929
16949
|
if (!this.isInsideRadioGroup()) {
|
|
16930
|
-
this.checked = (_a = this.defaultChecked) !== null && _a !==
|
|
16950
|
+
this.checked = (_a = this.defaultChecked) !== null && _a !== void 0 ? _a : false;
|
|
16931
16951
|
this.dirtyChecked = false;
|
|
16932
16952
|
}
|
|
16933
16953
|
}
|
|
@@ -16963,7 +16983,7 @@ class Radio extends FormAssociatedRadio {
|
|
|
16963
16983
|
var _a, _b;
|
|
16964
16984
|
super.connectedCallback();
|
|
16965
16985
|
this.validate();
|
|
16966
|
-
if (((_a = this.parentElement) === null || _a ===
|
|
16986
|
+
if (((_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute("role")) !== "radiogroup" &&
|
|
16967
16987
|
this.getAttribute("tabindex") === null) {
|
|
16968
16988
|
if (!this.disabled) {
|
|
16969
16989
|
this.setAttribute("tabindex", "0");
|
|
@@ -16975,7 +16995,7 @@ class Radio extends FormAssociatedRadio {
|
|
|
16975
16995
|
// but if we are clean when defaultChecked is changed, we want to stay
|
|
16976
16996
|
// in a clean state, so reset this.dirtyChecked
|
|
16977
16997
|
if (!this.isInsideRadioGroup()) {
|
|
16978
|
-
this.checked = (_b = this.defaultChecked) !== null && _b !==
|
|
16998
|
+
this.checked = (_b = this.defaultChecked) !== null && _b !== void 0 ? _b : false;
|
|
16979
16999
|
this.dirtyChecked = false;
|
|
16980
17000
|
}
|
|
16981
17001
|
}
|
|
@@ -16996,13 +17016,13 @@ class Radio extends FormAssociatedRadio {
|
|
|
16996
17016
|
}
|
|
16997
17017
|
__decorate([
|
|
16998
17018
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
16999
|
-
], Radio.prototype, "readOnly",
|
|
17019
|
+
], Radio.prototype, "readOnly", void 0);
|
|
17000
17020
|
__decorate([
|
|
17001
17021
|
observable
|
|
17002
|
-
], Radio.prototype, "name",
|
|
17022
|
+
], Radio.prototype, "name", void 0);
|
|
17003
17023
|
__decorate([
|
|
17004
17024
|
observable
|
|
17005
|
-
], Radio.prototype, "defaultSlottedNodes",
|
|
17025
|
+
], Radio.prototype, "defaultSlottedNodes", void 0);
|
|
17006
17026
|
|
|
17007
17027
|
/**
|
|
17008
17028
|
* A HorizontalScroll Custom HTML Element
|
|
@@ -17202,10 +17222,10 @@ class HorizontalScroll extends FoundationElement {
|
|
|
17202
17222
|
setFlippers() {
|
|
17203
17223
|
var _a, _b;
|
|
17204
17224
|
const position = this.scrollContainer.scrollLeft;
|
|
17205
|
-
(_a = this.previousFlipperContainer) === null || _a ===
|
|
17225
|
+
(_a = this.previousFlipperContainer) === null || _a === void 0 ? void 0 : _a.classList.toggle("disabled", position === 0);
|
|
17206
17226
|
if (this.scrollStops) {
|
|
17207
17227
|
const lastStop = Math.abs(this.scrollStops[this.scrollStops.length - 1]);
|
|
17208
|
-
(_b = this.nextFlipperContainer) === null || _b ===
|
|
17228
|
+
(_b = this.nextFlipperContainer) === null || _b === void 0 ? void 0 : _b.classList.toggle("disabled", this.validateStops(false) && Math.abs(position) + this.width >= lastStop);
|
|
17209
17229
|
}
|
|
17210
17230
|
}
|
|
17211
17231
|
/**
|
|
@@ -17222,7 +17242,7 @@ class HorizontalScroll extends FoundationElement {
|
|
|
17222
17242
|
item = this.scrollItems.findIndex(scrollItem => scrollItem === item || scrollItem.contains(item));
|
|
17223
17243
|
}
|
|
17224
17244
|
if (item !== undefined) {
|
|
17225
|
-
rightPadding = rightPadding !== null && rightPadding !==
|
|
17245
|
+
rightPadding = rightPadding !== null && rightPadding !== void 0 ? rightPadding : padding;
|
|
17226
17246
|
const { scrollContainer: container, scrollStops, scrollItems: items } = this;
|
|
17227
17247
|
const { scrollLeft } = this.scrollContainer;
|
|
17228
17248
|
const { width: containerWidth } = container.getBoundingClientRect();
|
|
@@ -17234,7 +17254,7 @@ class HorizontalScroll extends FoundationElement {
|
|
|
17234
17254
|
const stops = [...scrollStops].sort((a, b) => (isBefore ? b - a : a - b));
|
|
17235
17255
|
const scrollTo = (_a = stops.find(position => isBefore
|
|
17236
17256
|
? position + padding < itemStart
|
|
17237
|
-
: position + containerWidth - (rightPadding !== null && rightPadding !==
|
|
17257
|
+
: position + containerWidth - (rightPadding !== null && rightPadding !== void 0 ? rightPadding : 0) > itemEnd)) !== null && _a !== void 0 ? _a : 0;
|
|
17238
17258
|
this.scrollToPosition(scrollTo);
|
|
17239
17259
|
}
|
|
17240
17260
|
}
|
|
@@ -17303,7 +17323,7 @@ class HorizontalScroll extends FoundationElement {
|
|
|
17303
17323
|
return;
|
|
17304
17324
|
}
|
|
17305
17325
|
this.scrolling = true;
|
|
17306
|
-
const seconds = (_a = this.duration) !== null && _a !==
|
|
17326
|
+
const seconds = (_a = this.duration) !== null && _a !== void 0 ? _a : `${Math.abs(newPosition - position) / this.speed}s`;
|
|
17307
17327
|
this.content.style.setProperty("transition-duration", seconds);
|
|
17308
17328
|
const computedDuration = parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration"));
|
|
17309
17329
|
const transitionendHandler = (e) => {
|
|
@@ -17362,25 +17382,25 @@ class HorizontalScroll extends FoundationElement {
|
|
|
17362
17382
|
}
|
|
17363
17383
|
__decorate([
|
|
17364
17384
|
attr({ converter: nullableNumberConverter })
|
|
17365
|
-
], HorizontalScroll.prototype, "speed",
|
|
17385
|
+
], HorizontalScroll.prototype, "speed", void 0);
|
|
17366
17386
|
__decorate([
|
|
17367
17387
|
attr
|
|
17368
|
-
], HorizontalScroll.prototype, "duration",
|
|
17388
|
+
], HorizontalScroll.prototype, "duration", void 0);
|
|
17369
17389
|
__decorate([
|
|
17370
17390
|
attr
|
|
17371
|
-
], HorizontalScroll.prototype, "easing",
|
|
17391
|
+
], HorizontalScroll.prototype, "easing", void 0);
|
|
17372
17392
|
__decorate([
|
|
17373
17393
|
attr({ attribute: "flippers-hidden-from-at", converter: booleanConverter })
|
|
17374
|
-
], HorizontalScroll.prototype, "flippersHiddenFromAT",
|
|
17394
|
+
], HorizontalScroll.prototype, "flippersHiddenFromAT", void 0);
|
|
17375
17395
|
__decorate([
|
|
17376
17396
|
observable
|
|
17377
|
-
], HorizontalScroll.prototype, "scrolling",
|
|
17397
|
+
], HorizontalScroll.prototype, "scrolling", void 0);
|
|
17378
17398
|
__decorate([
|
|
17379
17399
|
observable
|
|
17380
|
-
], HorizontalScroll.prototype, "scrollItems",
|
|
17400
|
+
], HorizontalScroll.prototype, "scrollItems", void 0);
|
|
17381
17401
|
__decorate([
|
|
17382
17402
|
attr({ attribute: "view" })
|
|
17383
|
-
], HorizontalScroll.prototype, "view",
|
|
17403
|
+
], HorizontalScroll.prototype, "view", void 0);
|
|
17384
17404
|
|
|
17385
17405
|
/**
|
|
17386
17406
|
* @public
|
|
@@ -17419,7 +17439,7 @@ const horizontalScrollTemplate = (context, definition) => {
|
|
|
17419
17439
|
<slot name="previous-flipper">
|
|
17420
17440
|
${definition.previousFlipper instanceof Function
|
|
17421
17441
|
? definition.previousFlipper(context, definition)
|
|
17422
|
-
: (_a = definition.previousFlipper) !== null && _a !==
|
|
17442
|
+
: (_a = definition.previousFlipper) !== null && _a !== void 0 ? _a : ""}
|
|
17423
17443
|
</slot>
|
|
17424
17444
|
</div>
|
|
17425
17445
|
</div>
|
|
@@ -17432,7 +17452,7 @@ const horizontalScrollTemplate = (context, definition) => {
|
|
|
17432
17452
|
<slot name="next-flipper">
|
|
17433
17453
|
${definition.nextFlipper instanceof Function
|
|
17434
17454
|
? definition.nextFlipper(context, definition)
|
|
17435
|
-
: (_b = definition.nextFlipper) !== null && _b !==
|
|
17455
|
+
: (_b = definition.nextFlipper) !== null && _b !== void 0 ? _b : ""}
|
|
17436
17456
|
</slot>
|
|
17437
17457
|
</div>
|
|
17438
17458
|
</div>
|
|
@@ -17677,34 +17697,34 @@ class Search extends FormAssociatedSearch {
|
|
|
17677
17697
|
}
|
|
17678
17698
|
__decorate([
|
|
17679
17699
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
17680
|
-
], Search.prototype, "readOnly",
|
|
17700
|
+
], Search.prototype, "readOnly", void 0);
|
|
17681
17701
|
__decorate([
|
|
17682
17702
|
attr({ mode: "boolean" })
|
|
17683
|
-
], Search.prototype, "autofocus",
|
|
17703
|
+
], Search.prototype, "autofocus", void 0);
|
|
17684
17704
|
__decorate([
|
|
17685
17705
|
attr
|
|
17686
|
-
], Search.prototype, "placeholder",
|
|
17706
|
+
], Search.prototype, "placeholder", void 0);
|
|
17687
17707
|
__decorate([
|
|
17688
17708
|
attr
|
|
17689
|
-
], Search.prototype, "list",
|
|
17709
|
+
], Search.prototype, "list", void 0);
|
|
17690
17710
|
__decorate([
|
|
17691
17711
|
attr({ converter: nullableNumberConverter })
|
|
17692
|
-
], Search.prototype, "maxlength",
|
|
17712
|
+
], Search.prototype, "maxlength", void 0);
|
|
17693
17713
|
__decorate([
|
|
17694
17714
|
attr({ converter: nullableNumberConverter })
|
|
17695
|
-
], Search.prototype, "minlength",
|
|
17715
|
+
], Search.prototype, "minlength", void 0);
|
|
17696
17716
|
__decorate([
|
|
17697
17717
|
attr
|
|
17698
|
-
], Search.prototype, "pattern",
|
|
17718
|
+
], Search.prototype, "pattern", void 0);
|
|
17699
17719
|
__decorate([
|
|
17700
17720
|
attr({ converter: nullableNumberConverter })
|
|
17701
|
-
], Search.prototype, "size",
|
|
17721
|
+
], Search.prototype, "size", void 0);
|
|
17702
17722
|
__decorate([
|
|
17703
17723
|
attr({ mode: "boolean" })
|
|
17704
|
-
], Search.prototype, "spellcheck",
|
|
17724
|
+
], Search.prototype, "spellcheck", void 0);
|
|
17705
17725
|
__decorate([
|
|
17706
17726
|
observable
|
|
17707
|
-
], Search.prototype, "defaultSlottedNodes",
|
|
17727
|
+
], Search.prototype, "defaultSlottedNodes", void 0);
|
|
17708
17728
|
/**
|
|
17709
17729
|
* Includes ARIA states and properties relating to the ARIA textbox role
|
|
17710
17730
|
*
|
|
@@ -17823,15 +17843,15 @@ class Select extends FormAssociatedSelect {
|
|
|
17823
17843
|
set value(next) {
|
|
17824
17844
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
17825
17845
|
const prev = `${this._value}`;
|
|
17826
|
-
if ((_a = this._options) === null || _a ===
|
|
17846
|
+
if ((_a = this._options) === null || _a === void 0 ? void 0 : _a.length) {
|
|
17827
17847
|
const selectedIndex = this._options.findIndex(el => el.value === next);
|
|
17828
|
-
const prevSelectedValue = (_c = (_b = this._options[this.selectedIndex]) === null || _b ===
|
|
17829
|
-
const nextSelectedValue = (_e = (_d = this._options[selectedIndex]) === null || _d ===
|
|
17848
|
+
const prevSelectedValue = (_c = (_b = this._options[this.selectedIndex]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null;
|
|
17849
|
+
const nextSelectedValue = (_e = (_d = this._options[selectedIndex]) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : null;
|
|
17830
17850
|
if (selectedIndex === -1 || prevSelectedValue !== nextSelectedValue) {
|
|
17831
17851
|
next = "";
|
|
17832
17852
|
this.selectedIndex = selectedIndex;
|
|
17833
17853
|
}
|
|
17834
|
-
next = (_g = (_f = this.firstSelectedOption) === null || _f ===
|
|
17854
|
+
next = (_g = (_f = this.firstSelectedOption) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : next;
|
|
17835
17855
|
}
|
|
17836
17856
|
if (prev !== next) {
|
|
17837
17857
|
this._value = next;
|
|
@@ -17850,7 +17870,7 @@ class Select extends FormAssociatedSelect {
|
|
|
17850
17870
|
updateValue(shouldEmit) {
|
|
17851
17871
|
var _a, _b;
|
|
17852
17872
|
if (this.$fastController.isConnected) {
|
|
17853
|
-
this.value = (_b = (_a = this.firstSelectedOption) === null || _a ===
|
|
17873
|
+
this.value = (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
|
|
17854
17874
|
}
|
|
17855
17875
|
if (shouldEmit) {
|
|
17856
17876
|
this.$emit("input");
|
|
@@ -17904,7 +17924,7 @@ class Select extends FormAssociatedSelect {
|
|
|
17904
17924
|
get displayValue() {
|
|
17905
17925
|
var _a, _b;
|
|
17906
17926
|
Observable.track(this, "displayValue");
|
|
17907
|
-
return (_b = (_a = this.firstSelectedOption) === null || _a ===
|
|
17927
|
+
return (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
|
|
17908
17928
|
}
|
|
17909
17929
|
/**
|
|
17910
17930
|
* Synchronize the `aria-disabled` property when the `disabled` property changes.
|
|
@@ -17975,7 +17995,7 @@ class Select extends FormAssociatedSelect {
|
|
|
17975
17995
|
this.focus();
|
|
17976
17996
|
return;
|
|
17977
17997
|
}
|
|
17978
|
-
if (!((_a = this.options) === null || _a ===
|
|
17998
|
+
if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.includes(focusTarget))) {
|
|
17979
17999
|
this.open = false;
|
|
17980
18000
|
if (this.indexWhenOpened !== this.selectedIndex) {
|
|
17981
18001
|
this.updateValue(true);
|
|
@@ -18028,7 +18048,7 @@ class Select extends FormAssociatedSelect {
|
|
|
18028
18048
|
*/
|
|
18029
18049
|
mousedownHandler(e) {
|
|
18030
18050
|
var _a;
|
|
18031
|
-
if (e.offsetX >= 0 && e.offsetX <= ((_a = this.listbox) === null || _a ===
|
|
18051
|
+
if (e.offsetX >= 0 && e.offsetX <= ((_a = this.listbox) === null || _a === void 0 ? void 0 : _a.scrollWidth)) {
|
|
18032
18052
|
return super.mousedownHandler(e);
|
|
18033
18053
|
}
|
|
18034
18054
|
return this.collapsible;
|
|
@@ -18057,9 +18077,9 @@ class Select extends FormAssociatedSelect {
|
|
|
18057
18077
|
selectedOptionsChanged(prev, next) {
|
|
18058
18078
|
var _a;
|
|
18059
18079
|
super.selectedOptionsChanged(prev, next);
|
|
18060
|
-
(_a = this.options) === null || _a ===
|
|
18080
|
+
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach((o, i) => {
|
|
18061
18081
|
var _a;
|
|
18062
|
-
const proxyOption = (_a = this.proxy) === null || _a ===
|
|
18082
|
+
const proxyOption = (_a = this.proxy) === null || _a === void 0 ? void 0 : _a.options.item(i);
|
|
18063
18083
|
if (proxyOption) {
|
|
18064
18084
|
proxyOption.selected = o.selected;
|
|
18065
18085
|
}
|
|
@@ -18074,8 +18094,8 @@ class Select extends FormAssociatedSelect {
|
|
|
18074
18094
|
*/
|
|
18075
18095
|
setDefaultSelectedOption() {
|
|
18076
18096
|
var _a;
|
|
18077
|
-
const options = (_a = this.options) !== null && _a !==
|
|
18078
|
-
const selectedIndex = options === null || options ===
|
|
18097
|
+
const options = (_a = this.options) !== null && _a !== void 0 ? _a : Array.from(this.children).filter(Listbox.slottedOptionFilter);
|
|
18098
|
+
const selectedIndex = options === null || options === void 0 ? void 0 : options.findIndex(el => el.hasAttribute("selected") || el.selected || el.value === this.value);
|
|
18079
18099
|
if (selectedIndex !== -1) {
|
|
18080
18100
|
this.selectedIndex = selectedIndex;
|
|
18081
18101
|
return;
|
|
@@ -18183,22 +18203,22 @@ class Select extends FormAssociatedSelect {
|
|
|
18183
18203
|
}
|
|
18184
18204
|
__decorate([
|
|
18185
18205
|
attr({ attribute: "open", mode: "boolean" })
|
|
18186
|
-
], Select.prototype, "open",
|
|
18206
|
+
], Select.prototype, "open", void 0);
|
|
18187
18207
|
__decorate([
|
|
18188
18208
|
volatile
|
|
18189
18209
|
], Select.prototype, "collapsible", null);
|
|
18190
18210
|
__decorate([
|
|
18191
18211
|
observable
|
|
18192
|
-
], Select.prototype, "control",
|
|
18212
|
+
], Select.prototype, "control", void 0);
|
|
18193
18213
|
__decorate([
|
|
18194
18214
|
attr({ attribute: "position" })
|
|
18195
|
-
], Select.prototype, "positionAttribute",
|
|
18215
|
+
], Select.prototype, "positionAttribute", void 0);
|
|
18196
18216
|
__decorate([
|
|
18197
18217
|
observable
|
|
18198
|
-
], Select.prototype, "position",
|
|
18218
|
+
], Select.prototype, "position", void 0);
|
|
18199
18219
|
__decorate([
|
|
18200
18220
|
observable
|
|
18201
|
-
], Select.prototype, "maxHeight",
|
|
18221
|
+
], Select.prototype, "maxHeight", void 0);
|
|
18202
18222
|
/**
|
|
18203
18223
|
* Includes ARIA states and properties relating to the ARIA select role.
|
|
18204
18224
|
*
|
|
@@ -18208,7 +18228,7 @@ class DelegatesARIASelect {
|
|
|
18208
18228
|
}
|
|
18209
18229
|
__decorate([
|
|
18210
18230
|
observable
|
|
18211
|
-
], DelegatesARIASelect.prototype, "ariaControls",
|
|
18231
|
+
], DelegatesARIASelect.prototype, "ariaControls", void 0);
|
|
18212
18232
|
applyMixins(DelegatesARIASelect, DelegatesARIAListbox);
|
|
18213
18233
|
applyMixins(Select, StartEnd, DelegatesARIASelect);
|
|
18214
18234
|
|
|
@@ -18324,16 +18344,16 @@ class Skeleton extends FoundationElement {
|
|
|
18324
18344
|
}
|
|
18325
18345
|
__decorate([
|
|
18326
18346
|
attr
|
|
18327
|
-
], Skeleton.prototype, "fill",
|
|
18347
|
+
], Skeleton.prototype, "fill", void 0);
|
|
18328
18348
|
__decorate([
|
|
18329
18349
|
attr
|
|
18330
|
-
], Skeleton.prototype, "shape",
|
|
18350
|
+
], Skeleton.prototype, "shape", void 0);
|
|
18331
18351
|
__decorate([
|
|
18332
18352
|
attr
|
|
18333
|
-
], Skeleton.prototype, "pattern",
|
|
18353
|
+
], Skeleton.prototype, "pattern", void 0);
|
|
18334
18354
|
__decorate([
|
|
18335
18355
|
attr({ mode: "boolean" })
|
|
18336
|
-
], Skeleton.prototype, "shimmer",
|
|
18356
|
+
], Skeleton.prototype, "shimmer", void 0);
|
|
18337
18357
|
|
|
18338
18358
|
/**
|
|
18339
18359
|
* The template for the {@link @ni/fast-foundation#(SliderLabel:class)} component.
|
|
@@ -18373,9 +18393,7 @@ const defaultConfig = {
|
|
|
18373
18393
|
min: 0,
|
|
18374
18394
|
max: 0,
|
|
18375
18395
|
direction: Direction.ltr,
|
|
18376
|
-
orientation: Orientation.horizontal
|
|
18377
|
-
disabled: false,
|
|
18378
|
-
};
|
|
18396
|
+
orientation: Orientation.horizontal};
|
|
18379
18397
|
/**
|
|
18380
18398
|
* A label element intended to be used with the {@link @ni/fast-foundation#(Slider:class)} component.
|
|
18381
18399
|
*
|
|
@@ -18497,28 +18515,28 @@ class SliderLabel extends FoundationElement {
|
|
|
18497
18515
|
}
|
|
18498
18516
|
__decorate([
|
|
18499
18517
|
observable
|
|
18500
|
-
], SliderLabel.prototype, "positionStyle",
|
|
18518
|
+
], SliderLabel.prototype, "positionStyle", void 0);
|
|
18501
18519
|
__decorate([
|
|
18502
18520
|
attr
|
|
18503
|
-
], SliderLabel.prototype, "position",
|
|
18521
|
+
], SliderLabel.prototype, "position", void 0);
|
|
18504
18522
|
__decorate([
|
|
18505
18523
|
attr({ attribute: "hide-mark", mode: "boolean" })
|
|
18506
|
-
], SliderLabel.prototype, "hideMark",
|
|
18524
|
+
], SliderLabel.prototype, "hideMark", void 0);
|
|
18507
18525
|
__decorate([
|
|
18508
18526
|
attr({ attribute: "disabled", mode: "boolean" })
|
|
18509
|
-
], SliderLabel.prototype, "disabled",
|
|
18527
|
+
], SliderLabel.prototype, "disabled", void 0);
|
|
18510
18528
|
__decorate([
|
|
18511
18529
|
observable
|
|
18512
|
-
], SliderLabel.prototype, "sliderOrientation",
|
|
18530
|
+
], SliderLabel.prototype, "sliderOrientation", void 0);
|
|
18513
18531
|
__decorate([
|
|
18514
18532
|
observable
|
|
18515
|
-
], SliderLabel.prototype, "sliderMinPosition",
|
|
18533
|
+
], SliderLabel.prototype, "sliderMinPosition", void 0);
|
|
18516
18534
|
__decorate([
|
|
18517
18535
|
observable
|
|
18518
|
-
], SliderLabel.prototype, "sliderMaxPosition",
|
|
18536
|
+
], SliderLabel.prototype, "sliderMaxPosition", void 0);
|
|
18519
18537
|
__decorate([
|
|
18520
18538
|
observable
|
|
18521
|
-
], SliderLabel.prototype, "sliderDirection",
|
|
18539
|
+
], SliderLabel.prototype, "sliderDirection", void 0);
|
|
18522
18540
|
|
|
18523
18541
|
/**
|
|
18524
18542
|
* The template for the {@link @ni/fast-foundation#(Slider:class)} component.
|
|
@@ -18534,8 +18552,8 @@ const sliderTemplate = (context, definition) => html `
|
|
|
18534
18552
|
aria-valuenow="${x => x.value}"
|
|
18535
18553
|
aria-valuemin="${x => x.min}"
|
|
18536
18554
|
aria-valuemax="${x => x.max}"
|
|
18537
|
-
aria-disabled="${x => (x.disabled ? true :
|
|
18538
|
-
aria-readonly="${x => (x.readOnly ? true :
|
|
18555
|
+
aria-disabled="${x => (x.disabled ? true : void 0)}"
|
|
18556
|
+
aria-readonly="${x => (x.readOnly ? true : void 0)}"
|
|
18539
18557
|
aria-orientation="${x => x.orientation}"
|
|
18540
18558
|
class="${x => x.orientation}"
|
|
18541
18559
|
>
|
|
@@ -18976,49 +18994,49 @@ class Slider extends FormAssociatedSlider {
|
|
|
18976
18994
|
}
|
|
18977
18995
|
__decorate([
|
|
18978
18996
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
18979
|
-
], Slider.prototype, "readOnly",
|
|
18997
|
+
], Slider.prototype, "readOnly", void 0);
|
|
18980
18998
|
__decorate([
|
|
18981
18999
|
observable
|
|
18982
|
-
], Slider.prototype, "direction",
|
|
19000
|
+
], Slider.prototype, "direction", void 0);
|
|
18983
19001
|
__decorate([
|
|
18984
19002
|
observable
|
|
18985
|
-
], Slider.prototype, "isDragging",
|
|
19003
|
+
], Slider.prototype, "isDragging", void 0);
|
|
18986
19004
|
__decorate([
|
|
18987
19005
|
observable
|
|
18988
|
-
], Slider.prototype, "position",
|
|
19006
|
+
], Slider.prototype, "position", void 0);
|
|
18989
19007
|
__decorate([
|
|
18990
19008
|
observable
|
|
18991
|
-
], Slider.prototype, "trackWidth",
|
|
19009
|
+
], Slider.prototype, "trackWidth", void 0);
|
|
18992
19010
|
__decorate([
|
|
18993
19011
|
observable
|
|
18994
|
-
], Slider.prototype, "trackMinWidth",
|
|
19012
|
+
], Slider.prototype, "trackMinWidth", void 0);
|
|
18995
19013
|
__decorate([
|
|
18996
19014
|
observable
|
|
18997
|
-
], Slider.prototype, "trackHeight",
|
|
19015
|
+
], Slider.prototype, "trackHeight", void 0);
|
|
18998
19016
|
__decorate([
|
|
18999
19017
|
observable
|
|
19000
|
-
], Slider.prototype, "trackLeft",
|
|
19018
|
+
], Slider.prototype, "trackLeft", void 0);
|
|
19001
19019
|
__decorate([
|
|
19002
19020
|
observable
|
|
19003
|
-
], Slider.prototype, "trackMinHeight",
|
|
19021
|
+
], Slider.prototype, "trackMinHeight", void 0);
|
|
19004
19022
|
__decorate([
|
|
19005
19023
|
observable
|
|
19006
|
-
], Slider.prototype, "valueTextFormatter",
|
|
19024
|
+
], Slider.prototype, "valueTextFormatter", void 0);
|
|
19007
19025
|
__decorate([
|
|
19008
19026
|
attr({ converter: nullableNumberConverter })
|
|
19009
|
-
], Slider.prototype, "min",
|
|
19027
|
+
], Slider.prototype, "min", void 0);
|
|
19010
19028
|
__decorate([
|
|
19011
19029
|
attr({ converter: nullableNumberConverter })
|
|
19012
|
-
], Slider.prototype, "max",
|
|
19030
|
+
], Slider.prototype, "max", void 0);
|
|
19013
19031
|
__decorate([
|
|
19014
19032
|
attr({ converter: nullableNumberConverter })
|
|
19015
|
-
], Slider.prototype, "step",
|
|
19033
|
+
], Slider.prototype, "step", void 0);
|
|
19016
19034
|
__decorate([
|
|
19017
19035
|
attr
|
|
19018
|
-
], Slider.prototype, "orientation",
|
|
19036
|
+
], Slider.prototype, "orientation", void 0);
|
|
19019
19037
|
__decorate([
|
|
19020
19038
|
attr
|
|
19021
|
-
], Slider.prototype, "mode",
|
|
19039
|
+
], Slider.prototype, "mode", void 0);
|
|
19022
19040
|
|
|
19023
19041
|
/**
|
|
19024
19042
|
* The template for the {@link @ni/fast-foundation#(Switch:class)} component.
|
|
@@ -19142,10 +19160,10 @@ class Switch extends FormAssociatedSwitch {
|
|
|
19142
19160
|
}
|
|
19143
19161
|
__decorate([
|
|
19144
19162
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
19145
|
-
], Switch.prototype, "readOnly",
|
|
19163
|
+
], Switch.prototype, "readOnly", void 0);
|
|
19146
19164
|
__decorate([
|
|
19147
19165
|
observable
|
|
19148
|
-
], Switch.prototype, "defaultSlottedNodes",
|
|
19166
|
+
], Switch.prototype, "defaultSlottedNodes", void 0);
|
|
19149
19167
|
|
|
19150
19168
|
/**
|
|
19151
19169
|
* The template for the {@link @ni/fast-foundation#TabPanel} component.
|
|
@@ -19188,7 +19206,7 @@ class Tab extends FoundationElement {
|
|
|
19188
19206
|
}
|
|
19189
19207
|
__decorate([
|
|
19190
19208
|
attr({ mode: "boolean" })
|
|
19191
|
-
], Tab.prototype, "disabled",
|
|
19209
|
+
], Tab.prototype, "disabled", void 0);
|
|
19192
19210
|
|
|
19193
19211
|
/**
|
|
19194
19212
|
* The template for the {@link @ni/fast-foundation#(Tabs:class)} component.
|
|
@@ -19479,13 +19497,13 @@ class Tabs extends FoundationElement {
|
|
|
19479
19497
|
getTabIds() {
|
|
19480
19498
|
return this.tabs.map((tab) => {
|
|
19481
19499
|
var _a;
|
|
19482
|
-
return (_a = tab.getAttribute("id")) !== null && _a !==
|
|
19500
|
+
return (_a = tab.getAttribute("id")) !== null && _a !== void 0 ? _a : `tab-${uniqueId()}`;
|
|
19483
19501
|
});
|
|
19484
19502
|
}
|
|
19485
19503
|
getTabPanelIds() {
|
|
19486
19504
|
return this.tabpanels.map((tabPanel) => {
|
|
19487
19505
|
var _a;
|
|
19488
|
-
return (_a = tabPanel.getAttribute("id")) !== null && _a !==
|
|
19506
|
+
return (_a = tabPanel.getAttribute("id")) !== null && _a !== void 0 ? _a : `panel-${uniqueId()}`;
|
|
19489
19507
|
});
|
|
19490
19508
|
}
|
|
19491
19509
|
setComponent() {
|
|
@@ -19564,25 +19582,25 @@ class Tabs extends FoundationElement {
|
|
|
19564
19582
|
}
|
|
19565
19583
|
__decorate([
|
|
19566
19584
|
attr
|
|
19567
|
-
], Tabs.prototype, "orientation",
|
|
19585
|
+
], Tabs.prototype, "orientation", void 0);
|
|
19568
19586
|
__decorate([
|
|
19569
19587
|
attr
|
|
19570
|
-
], Tabs.prototype, "activeid",
|
|
19588
|
+
], Tabs.prototype, "activeid", void 0);
|
|
19571
19589
|
__decorate([
|
|
19572
19590
|
observable
|
|
19573
|
-
], Tabs.prototype, "tabs",
|
|
19591
|
+
], Tabs.prototype, "tabs", void 0);
|
|
19574
19592
|
__decorate([
|
|
19575
19593
|
observable
|
|
19576
|
-
], Tabs.prototype, "tabpanels",
|
|
19594
|
+
], Tabs.prototype, "tabpanels", void 0);
|
|
19577
19595
|
__decorate([
|
|
19578
19596
|
attr({ mode: "boolean" })
|
|
19579
|
-
], Tabs.prototype, "activeindicator",
|
|
19597
|
+
], Tabs.prototype, "activeindicator", void 0);
|
|
19580
19598
|
__decorate([
|
|
19581
19599
|
observable
|
|
19582
|
-
], Tabs.prototype, "activeIndicatorRef",
|
|
19600
|
+
], Tabs.prototype, "activeIndicatorRef", void 0);
|
|
19583
19601
|
__decorate([
|
|
19584
19602
|
observable
|
|
19585
|
-
], Tabs.prototype, "showActiveIndicator",
|
|
19603
|
+
], Tabs.prototype, "showActiveIndicator", void 0);
|
|
19586
19604
|
applyMixins(Tabs, StartEnd);
|
|
19587
19605
|
|
|
19588
19606
|
class _TextArea extends FoundationElement {
|
|
@@ -19723,43 +19741,43 @@ class TextArea extends FormAssociatedTextArea {
|
|
|
19723
19741
|
}
|
|
19724
19742
|
__decorate([
|
|
19725
19743
|
attr({ mode: "boolean" })
|
|
19726
|
-
], TextArea.prototype, "readOnly",
|
|
19744
|
+
], TextArea.prototype, "readOnly", void 0);
|
|
19727
19745
|
__decorate([
|
|
19728
19746
|
attr
|
|
19729
|
-
], TextArea.prototype, "resize",
|
|
19747
|
+
], TextArea.prototype, "resize", void 0);
|
|
19730
19748
|
__decorate([
|
|
19731
19749
|
attr({ mode: "boolean" })
|
|
19732
|
-
], TextArea.prototype, "autofocus",
|
|
19750
|
+
], TextArea.prototype, "autofocus", void 0);
|
|
19733
19751
|
__decorate([
|
|
19734
19752
|
attr({ attribute: "form" })
|
|
19735
|
-
], TextArea.prototype, "formId",
|
|
19753
|
+
], TextArea.prototype, "formId", void 0);
|
|
19736
19754
|
__decorate([
|
|
19737
19755
|
attr
|
|
19738
|
-
], TextArea.prototype, "list",
|
|
19756
|
+
], TextArea.prototype, "list", void 0);
|
|
19739
19757
|
__decorate([
|
|
19740
19758
|
attr({ converter: nullableNumberConverter })
|
|
19741
|
-
], TextArea.prototype, "maxlength",
|
|
19759
|
+
], TextArea.prototype, "maxlength", void 0);
|
|
19742
19760
|
__decorate([
|
|
19743
19761
|
attr({ converter: nullableNumberConverter })
|
|
19744
|
-
], TextArea.prototype, "minlength",
|
|
19762
|
+
], TextArea.prototype, "minlength", void 0);
|
|
19745
19763
|
__decorate([
|
|
19746
19764
|
attr
|
|
19747
|
-
], TextArea.prototype, "name",
|
|
19765
|
+
], TextArea.prototype, "name", void 0);
|
|
19748
19766
|
__decorate([
|
|
19749
19767
|
attr
|
|
19750
|
-
], TextArea.prototype, "placeholder",
|
|
19768
|
+
], TextArea.prototype, "placeholder", void 0);
|
|
19751
19769
|
__decorate([
|
|
19752
19770
|
attr({ converter: nullableNumberConverter, mode: "fromView" })
|
|
19753
|
-
], TextArea.prototype, "cols",
|
|
19771
|
+
], TextArea.prototype, "cols", void 0);
|
|
19754
19772
|
__decorate([
|
|
19755
19773
|
attr({ converter: nullableNumberConverter, mode: "fromView" })
|
|
19756
|
-
], TextArea.prototype, "rows",
|
|
19774
|
+
], TextArea.prototype, "rows", void 0);
|
|
19757
19775
|
__decorate([
|
|
19758
19776
|
attr({ mode: "boolean" })
|
|
19759
|
-
], TextArea.prototype, "spellcheck",
|
|
19777
|
+
], TextArea.prototype, "spellcheck", void 0);
|
|
19760
19778
|
__decorate([
|
|
19761
19779
|
observable
|
|
19762
|
-
], TextArea.prototype, "defaultSlottedNodes",
|
|
19780
|
+
], TextArea.prototype, "defaultSlottedNodes", void 0);
|
|
19763
19781
|
applyMixins(TextArea, DelegatesARIATextbox);
|
|
19764
19782
|
|
|
19765
19783
|
/**
|
|
@@ -20027,7 +20045,7 @@ class Toolbar extends FoundationElement {
|
|
|
20027
20045
|
*/
|
|
20028
20046
|
mouseDownHandler(e) {
|
|
20029
20047
|
var _a;
|
|
20030
|
-
const activeIndex = (_a = this.focusableElements) === null || _a ===
|
|
20048
|
+
const activeIndex = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a.findIndex(x => x.contains(e.target));
|
|
20031
20049
|
if (activeIndex > -1 && this.activeIndex !== activeIndex) {
|
|
20032
20050
|
this.setFocusedElement(activeIndex);
|
|
20033
20051
|
}
|
|
@@ -20066,7 +20084,7 @@ class Toolbar extends FoundationElement {
|
|
|
20066
20084
|
*/
|
|
20067
20085
|
getDirectionalIncrementer(key) {
|
|
20068
20086
|
var _a, _b, _c, _d, _e;
|
|
20069
|
-
return ((_e = (_c = (_b = (_a = ToolbarArrowKeyMap[key]) === null || _a ===
|
|
20087
|
+
return ((_e = (_c = (_b = (_a = ToolbarArrowKeyMap[key]) === null || _a === void 0 ? void 0 : _a[this.orientation]) === null || _b === void 0 ? void 0 : _b[this.direction]) !== null && _c !== void 0 ? _c : (_d = ToolbarArrowKeyMap[key]) === null || _d === void 0 ? void 0 : _d[this.orientation]) !== null && _e !== void 0 ? _e : 0);
|
|
20070
20088
|
}
|
|
20071
20089
|
/**
|
|
20072
20090
|
* Handle keyboard events for the toolbar.
|
|
@@ -20107,7 +20125,7 @@ class Toolbar extends FoundationElement {
|
|
|
20107
20125
|
*/
|
|
20108
20126
|
reduceFocusableElements() {
|
|
20109
20127
|
var _a;
|
|
20110
|
-
const previousFocusedElement = (_a = this.focusableElements) === null || _a ===
|
|
20128
|
+
const previousFocusedElement = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a[this.activeIndex];
|
|
20111
20129
|
this.focusableElements = this.allSlottedItems.reduce(Toolbar.reduceFocusableItems, []);
|
|
20112
20130
|
// If the previously active item is still focusable, adjust the active index to the
|
|
20113
20131
|
// index of that item.
|
|
@@ -20142,8 +20160,8 @@ class Toolbar extends FoundationElement {
|
|
|
20142
20160
|
static reduceFocusableItems(elements, element) {
|
|
20143
20161
|
var _a, _b, _c, _d;
|
|
20144
20162
|
const isRoleRadio = element.getAttribute("role") === "radio";
|
|
20145
|
-
const isFocusableFastElement = (_b = (_a = element.$fastController) === null || _a ===
|
|
20146
|
-
const hasFocusableShadow = Array.from((_d = (_c = element.shadowRoot) === null || _c ===
|
|
20163
|
+
const isFocusableFastElement = (_b = (_a = element.$fastController) === null || _a === void 0 ? void 0 : _a.definition.shadowOptions) === null || _b === void 0 ? void 0 : _b.delegatesFocus;
|
|
20164
|
+
const hasFocusableShadow = Array.from((_d = (_c = element.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll("*")) !== null && _d !== void 0 ? _d : []).some(x => isFocusable(x));
|
|
20147
20165
|
if (!element.hasAttribute("disabled") &&
|
|
20148
20166
|
!element.hasAttribute("hidden") &&
|
|
20149
20167
|
(isFocusable(element) ||
|
|
@@ -20171,19 +20189,19 @@ class Toolbar extends FoundationElement {
|
|
|
20171
20189
|
}
|
|
20172
20190
|
__decorate([
|
|
20173
20191
|
observable
|
|
20174
|
-
], Toolbar.prototype, "direction",
|
|
20192
|
+
], Toolbar.prototype, "direction", void 0);
|
|
20175
20193
|
__decorate([
|
|
20176
20194
|
attr
|
|
20177
|
-
], Toolbar.prototype, "orientation",
|
|
20195
|
+
], Toolbar.prototype, "orientation", void 0);
|
|
20178
20196
|
__decorate([
|
|
20179
20197
|
observable
|
|
20180
|
-
], Toolbar.prototype, "slottedItems",
|
|
20198
|
+
], Toolbar.prototype, "slottedItems", void 0);
|
|
20181
20199
|
__decorate([
|
|
20182
20200
|
observable
|
|
20183
|
-
], Toolbar.prototype, "slottedLabel",
|
|
20201
|
+
], Toolbar.prototype, "slottedLabel", void 0);
|
|
20184
20202
|
__decorate([
|
|
20185
20203
|
observable
|
|
20186
|
-
], Toolbar.prototype, "childItems",
|
|
20204
|
+
], Toolbar.prototype, "childItems", void 0);
|
|
20187
20205
|
/**
|
|
20188
20206
|
* Includes ARIA states and properties relating to the ARIA toolbar role
|
|
20189
20207
|
*
|
|
@@ -20193,10 +20211,10 @@ class DelegatesARIAToolbar {
|
|
|
20193
20211
|
}
|
|
20194
20212
|
__decorate([
|
|
20195
20213
|
attr({ attribute: "aria-labelledby" })
|
|
20196
|
-
], DelegatesARIAToolbar.prototype, "ariaLabelledby",
|
|
20214
|
+
], DelegatesARIAToolbar.prototype, "ariaLabelledby", void 0);
|
|
20197
20215
|
__decorate([
|
|
20198
20216
|
attr({ attribute: "aria-label" })
|
|
20199
|
-
], DelegatesARIAToolbar.prototype, "ariaLabel",
|
|
20217
|
+
], DelegatesARIAToolbar.prototype, "ariaLabel", void 0);
|
|
20200
20218
|
applyMixins(DelegatesARIAToolbar, ARIAGlobalStatesAndProperties);
|
|
20201
20219
|
applyMixins(Toolbar, StartEnd, DelegatesARIAToolbar);
|
|
20202
20220
|
|
|
@@ -20737,7 +20755,7 @@ class Tooltip extends FoundationElement {
|
|
|
20737
20755
|
default:
|
|
20738
20756
|
this.verticalPositioningMode = "dynamic";
|
|
20739
20757
|
this.horizontalPositioningMode = "dynamic";
|
|
20740
|
-
this.verticalDefaultPosition =
|
|
20758
|
+
this.verticalDefaultPosition = void 0;
|
|
20741
20759
|
this.horizontalDefaultPosition = "center";
|
|
20742
20760
|
break;
|
|
20743
20761
|
}
|
|
@@ -20745,61 +20763,61 @@ class Tooltip extends FoundationElement {
|
|
|
20745
20763
|
}
|
|
20746
20764
|
__decorate([
|
|
20747
20765
|
attr({ mode: "boolean" })
|
|
20748
|
-
], Tooltip.prototype, "visible",
|
|
20766
|
+
], Tooltip.prototype, "visible", void 0);
|
|
20749
20767
|
__decorate([
|
|
20750
20768
|
attr
|
|
20751
|
-
], Tooltip.prototype, "anchor",
|
|
20769
|
+
], Tooltip.prototype, "anchor", void 0);
|
|
20752
20770
|
__decorate([
|
|
20753
20771
|
attr
|
|
20754
|
-
], Tooltip.prototype, "delay",
|
|
20772
|
+
], Tooltip.prototype, "delay", void 0);
|
|
20755
20773
|
__decorate([
|
|
20756
20774
|
attr
|
|
20757
|
-
], Tooltip.prototype, "position",
|
|
20775
|
+
], Tooltip.prototype, "position", void 0);
|
|
20758
20776
|
__decorate([
|
|
20759
20777
|
attr({ attribute: "auto-update-mode" })
|
|
20760
|
-
], Tooltip.prototype, "autoUpdateMode",
|
|
20778
|
+
], Tooltip.prototype, "autoUpdateMode", void 0);
|
|
20761
20779
|
__decorate([
|
|
20762
20780
|
attr({ attribute: "horizontal-viewport-lock" })
|
|
20763
|
-
], Tooltip.prototype, "horizontalViewportLock",
|
|
20781
|
+
], Tooltip.prototype, "horizontalViewportLock", void 0);
|
|
20764
20782
|
__decorate([
|
|
20765
20783
|
attr({ attribute: "vertical-viewport-lock" })
|
|
20766
|
-
], Tooltip.prototype, "verticalViewportLock",
|
|
20784
|
+
], Tooltip.prototype, "verticalViewportLock", void 0);
|
|
20767
20785
|
__decorate([
|
|
20768
20786
|
observable
|
|
20769
|
-
], Tooltip.prototype, "anchorElement",
|
|
20787
|
+
], Tooltip.prototype, "anchorElement", void 0);
|
|
20770
20788
|
__decorate([
|
|
20771
20789
|
observable
|
|
20772
|
-
], Tooltip.prototype, "viewportElement",
|
|
20790
|
+
], Tooltip.prototype, "viewportElement", void 0);
|
|
20773
20791
|
__decorate([
|
|
20774
20792
|
observable
|
|
20775
|
-
], Tooltip.prototype, "verticalPositioningMode",
|
|
20793
|
+
], Tooltip.prototype, "verticalPositioningMode", void 0);
|
|
20776
20794
|
__decorate([
|
|
20777
20795
|
observable
|
|
20778
|
-
], Tooltip.prototype, "horizontalPositioningMode",
|
|
20796
|
+
], Tooltip.prototype, "horizontalPositioningMode", void 0);
|
|
20779
20797
|
__decorate([
|
|
20780
20798
|
observable
|
|
20781
|
-
], Tooltip.prototype, "horizontalInset",
|
|
20799
|
+
], Tooltip.prototype, "horizontalInset", void 0);
|
|
20782
20800
|
__decorate([
|
|
20783
20801
|
observable
|
|
20784
|
-
], Tooltip.prototype, "verticalInset",
|
|
20802
|
+
], Tooltip.prototype, "verticalInset", void 0);
|
|
20785
20803
|
__decorate([
|
|
20786
20804
|
observable
|
|
20787
|
-
], Tooltip.prototype, "horizontalScaling",
|
|
20805
|
+
], Tooltip.prototype, "horizontalScaling", void 0);
|
|
20788
20806
|
__decorate([
|
|
20789
20807
|
observable
|
|
20790
|
-
], Tooltip.prototype, "verticalScaling",
|
|
20808
|
+
], Tooltip.prototype, "verticalScaling", void 0);
|
|
20791
20809
|
__decorate([
|
|
20792
20810
|
observable
|
|
20793
|
-
], Tooltip.prototype, "verticalDefaultPosition",
|
|
20811
|
+
], Tooltip.prototype, "verticalDefaultPosition", void 0);
|
|
20794
20812
|
__decorate([
|
|
20795
20813
|
observable
|
|
20796
|
-
], Tooltip.prototype, "horizontalDefaultPosition",
|
|
20814
|
+
], Tooltip.prototype, "horizontalDefaultPosition", void 0);
|
|
20797
20815
|
__decorate([
|
|
20798
20816
|
observable
|
|
20799
|
-
], Tooltip.prototype, "tooltipVisible",
|
|
20817
|
+
], Tooltip.prototype, "tooltipVisible", void 0);
|
|
20800
20818
|
__decorate([
|
|
20801
20819
|
observable
|
|
20802
|
-
], Tooltip.prototype, "currentDirection",
|
|
20820
|
+
], Tooltip.prototype, "currentDirection", void 0);
|
|
20803
20821
|
|
|
20804
20822
|
/**
|
|
20805
20823
|
* The template for the {@link @ni/fast-foundation#(TreeItem:class)} component.
|
|
@@ -20808,11 +20826,11 @@ __decorate([
|
|
|
20808
20826
|
const treeItemTemplate = (context, definition) => html `
|
|
20809
20827
|
<template
|
|
20810
20828
|
role="treeitem"
|
|
20811
|
-
slot="${x => (x.isNestedItem() ? "item" :
|
|
20829
|
+
slot="${x => (x.isNestedItem() ? "item" : void 0)}"
|
|
20812
20830
|
tabindex="-1"
|
|
20813
20831
|
class="${x => (x.expanded ? "expanded" : "")} ${x => x.selected ? "selected" : ""} ${x => (x.nested ? "nested" : "")}
|
|
20814
20832
|
${x => (x.disabled ? "disabled" : "")}"
|
|
20815
|
-
aria-expanded="${x => x.childItems && x.childItemLength() > 0 ? x.expanded :
|
|
20833
|
+
aria-expanded="${x => x.childItems && x.childItemLength() > 0 ? x.expanded : void 0}"
|
|
20816
20834
|
aria-selected="${x => x.selected}"
|
|
20817
20835
|
aria-disabled="${x => x.disabled}"
|
|
20818
20836
|
@focusin="${(x, c) => x.handleFocus(c.event)}"
|
|
@@ -20973,28 +20991,28 @@ class TreeItem extends FoundationElement {
|
|
|
20973
20991
|
}
|
|
20974
20992
|
__decorate([
|
|
20975
20993
|
attr({ mode: "boolean" })
|
|
20976
|
-
], TreeItem.prototype, "expanded",
|
|
20994
|
+
], TreeItem.prototype, "expanded", void 0);
|
|
20977
20995
|
__decorate([
|
|
20978
20996
|
attr({ mode: "boolean" })
|
|
20979
|
-
], TreeItem.prototype, "selected",
|
|
20997
|
+
], TreeItem.prototype, "selected", void 0);
|
|
20980
20998
|
__decorate([
|
|
20981
20999
|
attr({ mode: "boolean" })
|
|
20982
|
-
], TreeItem.prototype, "disabled",
|
|
21000
|
+
], TreeItem.prototype, "disabled", void 0);
|
|
20983
21001
|
__decorate([
|
|
20984
21002
|
observable
|
|
20985
|
-
], TreeItem.prototype, "focusable",
|
|
21003
|
+
], TreeItem.prototype, "focusable", void 0);
|
|
20986
21004
|
__decorate([
|
|
20987
21005
|
observable
|
|
20988
|
-
], TreeItem.prototype, "childItems",
|
|
21006
|
+
], TreeItem.prototype, "childItems", void 0);
|
|
20989
21007
|
__decorate([
|
|
20990
21008
|
observable
|
|
20991
|
-
], TreeItem.prototype, "items",
|
|
21009
|
+
], TreeItem.prototype, "items", void 0);
|
|
20992
21010
|
__decorate([
|
|
20993
21011
|
observable
|
|
20994
|
-
], TreeItem.prototype, "nested",
|
|
21012
|
+
], TreeItem.prototype, "nested", void 0);
|
|
20995
21013
|
__decorate([
|
|
20996
21014
|
observable
|
|
20997
|
-
], TreeItem.prototype, "renderCollapsedChildren",
|
|
21015
|
+
], TreeItem.prototype, "renderCollapsedChildren", void 0);
|
|
20998
21016
|
applyMixins(TreeItem, StartEnd);
|
|
20999
21017
|
|
|
21000
21018
|
/**
|
|
@@ -21271,13 +21289,13 @@ class TreeView extends FoundationElement {
|
|
|
21271
21289
|
}
|
|
21272
21290
|
__decorate([
|
|
21273
21291
|
attr({ attribute: "render-collapsed-nodes" })
|
|
21274
|
-
], TreeView.prototype, "renderCollapsedNodes",
|
|
21292
|
+
], TreeView.prototype, "renderCollapsedNodes", void 0);
|
|
21275
21293
|
__decorate([
|
|
21276
21294
|
observable
|
|
21277
|
-
], TreeView.prototype, "currentSelected",
|
|
21295
|
+
], TreeView.prototype, "currentSelected", void 0);
|
|
21278
21296
|
__decorate([
|
|
21279
21297
|
observable
|
|
21280
|
-
], TreeView.prototype, "slottedTreeItems",
|
|
21298
|
+
], TreeView.prototype, "slottedTreeItems", void 0);
|
|
21281
21299
|
|
|
21282
21300
|
/**
|
|
21283
21301
|
* An abstract behavior to react to media queries. Implementations should implement
|