@skyux/forms 13.0.0-alpha.1 → 13.0.0-alpha.10
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-forms-testing.mjs +34 -23
- package/fesm2022/skyux-forms-testing.mjs.map +1 -1
- package/fesm2022/skyux-forms.mjs +27 -31
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/index.d.ts +3 -16
- package/package.json +14 -9
- package/testing/index.d.ts +23 -6
|
@@ -327,15 +327,11 @@ class SkyCheckboxFixture {
|
|
|
327
327
|
* The checkbox's icon type
|
|
328
328
|
*/
|
|
329
329
|
get iconType() {
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
const cls = classList.item(i);
|
|
334
|
-
if (cls.indexOf('fa-') === 0) {
|
|
335
|
-
return cls.substr(3);
|
|
336
|
-
}
|
|
330
|
+
const svgElement = this.#debugEl.query(By.css('sky-icon svg'));
|
|
331
|
+
if (svgElement) {
|
|
332
|
+
return svgElement.nativeElement.getAttribute('data-sky-icon');
|
|
337
333
|
}
|
|
338
|
-
return;
|
|
334
|
+
return undefined;
|
|
339
335
|
}
|
|
340
336
|
/**
|
|
341
337
|
* The checkbox's type.
|
|
@@ -625,7 +621,6 @@ class SkyCheckboxGroupHarness extends SkyComponentHarness {
|
|
|
625
621
|
* @internal
|
|
626
622
|
*/
|
|
627
623
|
static { this.hostSelector = 'sky-checkbox-group'; }
|
|
628
|
-
#getCheckboxes = this.locatorForAll(SkyCheckboxHarness);
|
|
629
624
|
#getHeading = this.locatorFor('.sky-checkbox-group-heading');
|
|
630
625
|
#getHeadingWrapper = this.locatorFor('.sky-checkbox-group-legend');
|
|
631
626
|
#getHintText = this.locatorForOptional('.sky-checkbox-group-hint-text');
|
|
@@ -648,10 +643,19 @@ class SkyCheckboxGroupHarness extends SkyComponentHarness {
|
|
|
648
643
|
await (await this.#getHelpInline()).click();
|
|
649
644
|
}
|
|
650
645
|
/**
|
|
651
|
-
* Gets
|
|
646
|
+
* Gets a specific checkbox based on the filter criteria.
|
|
647
|
+
* @param filter The filter criteria.
|
|
648
|
+
*/
|
|
649
|
+
async getCheckbox(filter) {
|
|
650
|
+
return await this.locatorFor(SkyCheckboxHarness.with(filter))();
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Gets an array of checkboxes based on the filter criteria.
|
|
654
|
+
* If no filter is provided, returns all checkboxes.
|
|
655
|
+
* @param filter The optional filter criteria.
|
|
652
656
|
*/
|
|
653
|
-
async getCheckboxes() {
|
|
654
|
-
return await this
|
|
657
|
+
async getCheckboxes(filters) {
|
|
658
|
+
return await this.locatorForAll(SkyCheckboxHarness.with(filters || {}))();
|
|
655
659
|
}
|
|
656
660
|
/**
|
|
657
661
|
* Gets the help popover content.
|
|
@@ -1618,7 +1622,6 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1618
1622
|
#getLegendH4 = this.locatorForOptional('legend h4');
|
|
1619
1623
|
#getLegendH5 = this.locatorForOptional('legend h5');
|
|
1620
1624
|
#getLegendHeading = this.locatorForOptional('legend h3,h4,h5,.sky-radio-group-heading-text');
|
|
1621
|
-
#getRadioButtons = this.locatorForAll(SkyRadioHarness);
|
|
1622
1625
|
/**
|
|
1623
1626
|
* Gets a `HarnessPredicate` that can be used to search for a
|
|
1624
1627
|
* `SkyRadioGroupHarness` that meets certain criteria.
|
|
@@ -1705,10 +1708,19 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1705
1708
|
return (await hintText?.text())?.trim() ?? '';
|
|
1706
1709
|
}
|
|
1707
1710
|
/**
|
|
1708
|
-
* Gets
|
|
1711
|
+
* Gets a specific radio button based on the filter criteria.
|
|
1712
|
+
* @param filter The filter criteria.
|
|
1709
1713
|
*/
|
|
1710
|
-
async
|
|
1711
|
-
return await this
|
|
1714
|
+
async getRadioButton(filter) {
|
|
1715
|
+
return await this.locatorFor(SkyRadioHarness.with(filter))();
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Gets an array of radio buttons based on the filter criteria.
|
|
1719
|
+
* If no filter is provided, returns all radio buttons.
|
|
1720
|
+
* @param filters The optional filter criteria.
|
|
1721
|
+
*/
|
|
1722
|
+
async getRadioButtons(filters) {
|
|
1723
|
+
return await this.locatorForAll(SkyRadioHarness.with(filters || {}))();
|
|
1712
1724
|
}
|
|
1713
1725
|
/**
|
|
1714
1726
|
* Whether the radio group is required.
|
|
@@ -1842,20 +1854,19 @@ class SkySelectionBoxGridHarness extends SkyComponentHarness {
|
|
|
1842
1854
|
return SkySelectionBoxGridHarness.getDataSkyIdPredicate(filters);
|
|
1843
1855
|
}
|
|
1844
1856
|
/**
|
|
1845
|
-
* Gets a
|
|
1857
|
+
* Gets a specific selection box based on the filter criteria.
|
|
1858
|
+
* @param filter The filter criteria.
|
|
1846
1859
|
*/
|
|
1847
1860
|
async getSelectionBox(filter) {
|
|
1848
1861
|
return await this.locatorFor(SkySelectionBoxHarness.with(filter))();
|
|
1849
1862
|
}
|
|
1850
1863
|
/**
|
|
1851
|
-
* Gets an array of selection boxes.
|
|
1864
|
+
* Gets an array of selection boxes based on the filter criteria.
|
|
1865
|
+
* If no filter is provided, returns all selection boxes.
|
|
1866
|
+
* @param filters The optional filter criteria.
|
|
1852
1867
|
*/
|
|
1853
1868
|
async getSelectionBoxes(filters) {
|
|
1854
|
-
|
|
1855
|
-
if (filters && items.length === 0) {
|
|
1856
|
-
throw new Error(`Unable to find any selection boxes with filter(s): ${JSON.stringify(filters)}`);
|
|
1857
|
-
}
|
|
1858
|
-
return items;
|
|
1869
|
+
return await this.locatorForAll(SkySelectionBoxHarness.with(filters || {}))();
|
|
1859
1870
|
}
|
|
1860
1871
|
}
|
|
1861
1872
|
|