@skyux/lists 12.41.1 → 12.44.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/fesm2022/skyux-lists-testing.mjs +104 -60
- package/fesm2022/skyux-lists-testing.mjs.map +1 -1
- package/fesm2022/skyux-lists.mjs +88 -88
- package/fesm2022/skyux-lists.mjs.map +1 -1
- package/lib/modules/repeater/repeater-item.component.d.ts +1 -1
- package/package.json +14 -14
- package/testing/modules/repeater/repeater-harness.d.ts +5 -0
- package/testing/modules/repeater/repeater-item-context-menu-harness.d.ts +11 -0
- package/testing/modules/repeater/repeater-item-harness.d.ts +32 -14
- package/testing/public-api.d.ts +1 -0
|
@@ -7,8 +7,9 @@ import { SkyTokenHarness, SkyChevronHarness } from '@skyux/indicators/testing';
|
|
|
7
7
|
import { By } from '@angular/platform-browser';
|
|
8
8
|
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
9
9
|
import { SkyCheckboxHarness } from '@skyux/forms/testing';
|
|
10
|
+
import { SkyInlineFormHarness } from '@skyux/inline-form/testing';
|
|
11
|
+
import { SkyDropdownHarness, SkyDropdownItemHarness } from '@skyux/popovers/testing';
|
|
10
12
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
|
11
|
-
import { SkyDropdownItemHarness, SkyDropdownHarness } from '@skyux/popovers/testing';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Provides information for and interaction with a SKY UX filter button component.
|
|
@@ -97,11 +98,11 @@ class SkyFilterFixtureSummary {
|
|
|
97
98
|
* @internal
|
|
98
99
|
*/
|
|
99
100
|
class SkyFilterTestingModule {
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
101
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
102
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyFilterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
102
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: SkyFilterTestingModule, exports: [SkyFilterModule] }); }
|
|
103
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyFilterTestingModule, imports: [SkyFilterModule] }); }
|
|
103
104
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyFilterTestingModule, decorators: [{
|
|
105
106
|
type: NgModule,
|
|
106
107
|
args: [{
|
|
107
108
|
exports: [SkyFilterModule],
|
|
@@ -400,11 +401,11 @@ class SkyPagingFixture {
|
|
|
400
401
|
* @internal
|
|
401
402
|
*/
|
|
402
403
|
class SkyPagingTestingModule {
|
|
403
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
404
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
405
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
404
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyPagingTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
405
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: SkyPagingTestingModule, exports: [SkyPagingModule] }); }
|
|
406
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyPagingTestingModule, imports: [SkyPagingModule] }); }
|
|
406
407
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyPagingTestingModule, decorators: [{
|
|
408
409
|
type: NgModule,
|
|
409
410
|
args: [{
|
|
410
411
|
exports: [SkyPagingModule],
|
|
@@ -533,6 +534,17 @@ class SkyPagingHarness extends SkyComponentHarness {
|
|
|
533
534
|
}
|
|
534
535
|
}
|
|
535
536
|
|
|
537
|
+
/**
|
|
538
|
+
* Harness to query inside a repeater item context menu component in tests.
|
|
539
|
+
* @internal
|
|
540
|
+
*/
|
|
541
|
+
class SkyRepeaterItemContextMenuHarness extends SkyQueryableComponentHarness {
|
|
542
|
+
/**
|
|
543
|
+
* @internal
|
|
544
|
+
*/
|
|
545
|
+
static { this.hostSelector = 'sky-repeater-item-context-menu'; }
|
|
546
|
+
}
|
|
547
|
+
|
|
536
548
|
/**
|
|
537
549
|
* Harness for interacting with a repeater item component in tests.
|
|
538
550
|
*/
|
|
@@ -545,6 +557,7 @@ class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
|
|
|
545
557
|
#getCheckbox = this.locatorForOptional(SkyCheckboxHarness);
|
|
546
558
|
#getChevron = this.locatorForOptional(SkyChevronHarness);
|
|
547
559
|
#getContent = this.locatorFor('.sky-repeater-item-content');
|
|
560
|
+
#getContext = this.locatorFor(SkyRepeaterItemContextMenuHarness);
|
|
548
561
|
#getItem = this.locatorFor('.sky-repeater-item');
|
|
549
562
|
#getReorderHandle = this.locatorForOptional('button.sky-repeater-item-grab-handle');
|
|
550
563
|
#getTitle = this.locatorFor('.sky-repeater-item-title');
|
|
@@ -570,40 +583,46 @@ class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
|
|
|
570
583
|
await (await this.#getItem()).click();
|
|
571
584
|
}
|
|
572
585
|
/**
|
|
573
|
-
*
|
|
586
|
+
* Collapses the repeater item, or does nothing if already collapsed.
|
|
574
587
|
*/
|
|
575
|
-
async
|
|
576
|
-
|
|
588
|
+
async collapse() {
|
|
589
|
+
const chevron = await this.#getChevron();
|
|
590
|
+
if (chevron) {
|
|
591
|
+
if ((await chevron.getDirection()) === 'up') {
|
|
592
|
+
await chevron.toggle();
|
|
593
|
+
}
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
throw new Error('Could not collapse the repeater item because it is not collapsible.');
|
|
577
597
|
}
|
|
578
598
|
/**
|
|
579
|
-
*
|
|
599
|
+
* Deselects the repeater item.
|
|
580
600
|
*/
|
|
581
|
-
async
|
|
601
|
+
async deselect() {
|
|
582
602
|
const checkbox = await this.#getCheckbox();
|
|
583
603
|
if (!checkbox) {
|
|
584
|
-
throw new Error('Could not
|
|
604
|
+
throw new Error('Could not deselect the repeater item because it is not selectable.');
|
|
585
605
|
}
|
|
586
|
-
|
|
606
|
+
await checkbox.uncheck();
|
|
587
607
|
}
|
|
588
608
|
/**
|
|
589
|
-
*
|
|
609
|
+
* Expands the repeater item, or does nothing if already expanded.
|
|
590
610
|
*/
|
|
591
|
-
async
|
|
592
|
-
const
|
|
593
|
-
if (
|
|
594
|
-
|
|
611
|
+
async expand() {
|
|
612
|
+
const chevron = await this.#getChevron();
|
|
613
|
+
if (chevron) {
|
|
614
|
+
if ((await chevron.getDirection()) === 'down') {
|
|
615
|
+
await chevron.toggle();
|
|
616
|
+
}
|
|
617
|
+
return;
|
|
595
618
|
}
|
|
596
|
-
|
|
619
|
+
throw new Error('Could not expand the repeater item because it is not collapsible.');
|
|
597
620
|
}
|
|
598
621
|
/**
|
|
599
|
-
*
|
|
622
|
+
* Gets a harness for the dropdown inside the context menu.
|
|
600
623
|
*/
|
|
601
|
-
async
|
|
602
|
-
|
|
603
|
-
if (!checkbox) {
|
|
604
|
-
throw new Error('Could not deselect the repeater item because it is not selectable.');
|
|
605
|
-
}
|
|
606
|
-
await checkbox.uncheck();
|
|
624
|
+
async getContextMenuDropdown(filters) {
|
|
625
|
+
return await (await this.#getContext()).queryHarness(SkyDropdownHarness.with(filters || {}));
|
|
607
626
|
}
|
|
608
627
|
/**
|
|
609
628
|
* Gets the text of the repeater item content.
|
|
@@ -611,6 +630,18 @@ class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
|
|
|
611
630
|
async getContentText() {
|
|
612
631
|
return await (await this.#getContent()).text();
|
|
613
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* Gets the inline form harness.
|
|
635
|
+
*/
|
|
636
|
+
async getInlineForm() {
|
|
637
|
+
return await this.locatorFor(SkyInlineFormHarness)();
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Gets the item name.
|
|
641
|
+
*/
|
|
642
|
+
async getItemName() {
|
|
643
|
+
return await (await this.#getItem()).getAttribute('aria-label');
|
|
644
|
+
}
|
|
614
645
|
/**
|
|
615
646
|
* Gets the text of the repeater item title.
|
|
616
647
|
*/
|
|
@@ -623,6 +654,12 @@ class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
|
|
|
623
654
|
async isCollapsible() {
|
|
624
655
|
return !!(await this.#getChevron());
|
|
625
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* Whether a selectable repeater item is disabled.
|
|
659
|
+
*/
|
|
660
|
+
async isDisabled() {
|
|
661
|
+
return (await (await this.#getCheckbox())?.isDisabled()) || false;
|
|
662
|
+
}
|
|
626
663
|
/**
|
|
627
664
|
* Whether the repeater item is expanded, or throws an error informing of the lack of collapsibility.
|
|
628
665
|
*/
|
|
@@ -634,36 +671,36 @@ class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
|
|
|
634
671
|
throw new Error('Could not determine if repeater item is expanded because it is not collapsible.');
|
|
635
672
|
}
|
|
636
673
|
/**
|
|
637
|
-
*
|
|
674
|
+
* Whether the repeater item is reorderable.
|
|
638
675
|
*/
|
|
639
|
-
async
|
|
640
|
-
|
|
641
|
-
if (chevron) {
|
|
642
|
-
if ((await chevron.getDirection()) === 'down') {
|
|
643
|
-
await chevron.toggle();
|
|
644
|
-
}
|
|
645
|
-
return;
|
|
646
|
-
}
|
|
647
|
-
throw new Error('Could not expand the repeater item because it is not collapsible.');
|
|
676
|
+
async isReorderable() {
|
|
677
|
+
return !!(await this.#getReorderHandle());
|
|
648
678
|
}
|
|
649
679
|
/**
|
|
650
|
-
*
|
|
680
|
+
* Whether a repeater item has selection enabled.
|
|
651
681
|
*/
|
|
652
|
-
async
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
682
|
+
async isSelectable() {
|
|
683
|
+
return !!(await this.#getCheckbox());
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Whether a selectable repeater item is selected. Throws an error if the item is not selectable.
|
|
687
|
+
*/
|
|
688
|
+
async isSelected() {
|
|
689
|
+
const checkbox = await this.#getCheckbox();
|
|
690
|
+
if (!checkbox) {
|
|
691
|
+
throw new Error('Could not determine if repeater item is selected because it is not selectable.');
|
|
659
692
|
}
|
|
660
|
-
|
|
693
|
+
return await checkbox.isChecked();
|
|
661
694
|
}
|
|
662
695
|
/**
|
|
663
|
-
*
|
|
696
|
+
* Selects the repeater item.
|
|
664
697
|
*/
|
|
665
|
-
async
|
|
666
|
-
|
|
698
|
+
async select() {
|
|
699
|
+
const checkbox = await this.#getCheckbox();
|
|
700
|
+
if (!checkbox) {
|
|
701
|
+
throw new Error('Could not select the repeater item because it is not selectable.');
|
|
702
|
+
}
|
|
703
|
+
await checkbox.check();
|
|
667
704
|
}
|
|
668
705
|
/**
|
|
669
706
|
* Moves the repeater item to the top of the list
|
|
@@ -686,6 +723,7 @@ class SkyRepeaterHarness extends SkyComponentHarness {
|
|
|
686
723
|
* @internal
|
|
687
724
|
*/
|
|
688
725
|
static { this.hostSelector = 'sky-repeater'; }
|
|
726
|
+
#getRepeater = this.locatorFor('.sky-repeater');
|
|
689
727
|
/**
|
|
690
728
|
* Gets a `HarnessPredicate` that can be used to search for a
|
|
691
729
|
* `SkyRepeaterHarness` that meets certain criteria.
|
|
@@ -699,6 +737,12 @@ class SkyRepeaterHarness extends SkyComponentHarness {
|
|
|
699
737
|
async getRepeaterItems(filters) {
|
|
700
738
|
return await this.locatorForAll(SkyRepeaterItemHarness.with(filters || {}))();
|
|
701
739
|
}
|
|
740
|
+
/**
|
|
741
|
+
* Gets the aria-label for the repeater list
|
|
742
|
+
*/
|
|
743
|
+
async getAriaLabel() {
|
|
744
|
+
return await (await this.#getRepeater()).getAttribute('aria-label');
|
|
745
|
+
}
|
|
702
746
|
}
|
|
703
747
|
|
|
704
748
|
/**
|
|
@@ -852,11 +896,11 @@ class SkySortFixture {
|
|
|
852
896
|
* @internal
|
|
853
897
|
*/
|
|
854
898
|
class SkySortTestingModule {
|
|
855
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
856
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
857
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
899
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkySortTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
900
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: SkySortTestingModule, imports: [NoopAnimationsModule], exports: [SkySortModule] }); }
|
|
901
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkySortTestingModule, imports: [NoopAnimationsModule, SkySortModule] }); }
|
|
858
902
|
}
|
|
859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkySortTestingModule, decorators: [{
|
|
860
904
|
type: NgModule,
|
|
861
905
|
args: [{
|
|
862
906
|
imports: [NoopAnimationsModule],
|
|
@@ -1007,11 +1051,11 @@ class SkyInfiniteScrollFixture {
|
|
|
1007
1051
|
* @internal
|
|
1008
1052
|
*/
|
|
1009
1053
|
class SkyInfiniteScrollTestingModule {
|
|
1010
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1011
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
1012
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
1054
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyInfiniteScrollTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1055
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: SkyInfiniteScrollTestingModule, exports: [SkyInfiniteScrollModule] }); }
|
|
1056
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyInfiniteScrollTestingModule, imports: [SkyInfiniteScrollModule] }); }
|
|
1013
1057
|
}
|
|
1014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyInfiniteScrollTestingModule, decorators: [{
|
|
1015
1059
|
type: NgModule,
|
|
1016
1060
|
args: [{
|
|
1017
1061
|
exports: [SkyInfiniteScrollModule],
|
|
@@ -1069,5 +1113,5 @@ class SkyInfiniteScrollHarness extends SkyComponentHarness {
|
|
|
1069
1113
|
* Generated bundle index. Do not edit.
|
|
1070
1114
|
*/
|
|
1071
1115
|
|
|
1072
|
-
export { SkyFilterButtonHarness, SkyFilterFixtureButton, SkyFilterFixtureSummary, SkyFilterInlineHarness, SkyFilterInlineItemHarness, SkyFilterSummaryHarness, SkyFilterSummaryItemHarness, SkyFilterTestingModule, SkyInfiniteScrollFixture, SkyInfiniteScrollHarness, SkyInfiniteScrollTestingModule, SkyPagingContentHarness, SkyPagingFixture, SkyPagingHarness, SkyPagingTestingModule, SkyRepeaterHarness, SkyRepeaterItemHarness, SkySortFixture, SkySortHarness, SkySortItemHarness, SkySortTestingModule };
|
|
1116
|
+
export { SkyFilterButtonHarness, SkyFilterFixtureButton, SkyFilterFixtureSummary, SkyFilterInlineHarness, SkyFilterInlineItemHarness, SkyFilterSummaryHarness, SkyFilterSummaryItemHarness, SkyFilterTestingModule, SkyInfiniteScrollFixture, SkyInfiniteScrollHarness, SkyInfiniteScrollTestingModule, SkyPagingContentHarness, SkyPagingFixture, SkyPagingHarness, SkyPagingTestingModule, SkyRepeaterHarness, SkyRepeaterItemContextMenuHarness, SkyRepeaterItemHarness, SkySortFixture, SkySortHarness, SkySortItemHarness, SkySortTestingModule };
|
|
1073
1117
|
//# sourceMappingURL=skyux-lists-testing.mjs.map
|