@fkui/vue 6.27.0 → 6.29.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.
@@ -52,6 +52,7 @@ __export(index_exports, {
52
52
  FOfflinePageObject: () => FOfflinePageObject,
53
53
  FOutputFieldPageobject: () => FOutputFieldPageobject,
54
54
  FPageHeaderPageobject: () => FPageHeaderPageobject,
55
+ FPaginatorPageObject: () => FPaginatorPageObject,
55
56
  FProgressbarPageObject: () => FProgressbarPageObject,
56
57
  FRadioFieldPageObject: () => FRadioFieldPageObject,
57
58
  FRadioGroupFieldPageObject: () => FRadioFieldPageObject,
@@ -1433,7 +1434,7 @@ var FInteractiveTablePageObject = class {
1433
1434
  * Both row and column are 1-indexed, i.e. 1:1 selects the first cell in the
1434
1435
  * first row.
1435
1436
  *
1436
- * Neither the marker for expandable rows or the checkbox for selectable
1437
+ * Neither the marker for expandable rows or the radio/checkbox for selectable
1437
1438
  * rows are included in the column count, i.e. `1` always refers to the
1438
1439
  * first column with content.
1439
1440
  *
@@ -1467,7 +1468,7 @@ var FInteractiveTablePageObject = class {
1467
1468
  /**
1468
1469
  * Get table header cell (`<th>` in `<thead>`).
1469
1470
  *
1470
- * Neither the marker for expandable rows or the checkbox for selectable
1471
+ * Neither the marker for expandable rows or the radio/checkbox for selectable
1471
1472
  * rows are included in the column count, i.e. `1` always refers to the
1472
1473
  * first column with content.
1473
1474
  *
@@ -1484,7 +1485,7 @@ var FInteractiveTablePageObject = class {
1484
1485
  /**
1485
1486
  * Get all table headers (`<th>` in `<thead>`).
1486
1487
  *
1487
- * Includes the headers for checkboxes in selectable rows and markers in expandable rows.
1488
+ * Includes the headers for radios/checkboxes in selectable rows and markers in expandable rows.
1488
1489
  */
1489
1490
  headersRow() {
1490
1491
  return cy.get(`${this.selector} thead th`);
@@ -1515,9 +1516,10 @@ var FInteractiveTablePageObject = class {
1515
1516
  * parent row while if the first row is expanded the second row refers to
1516
1517
  * the first expanded row under the first row.
1517
1518
  *
1518
- * Requires a `selectable` table.
1519
+ * Requires a `selectable` table of type `multi`.
1519
1520
  *
1520
1521
  * @public
1522
+ * @deprecated Use ´.selectable()´ instead. Deprecated since v6.28.0.
1521
1523
  * @param row - Row number (1-indexed).
1522
1524
  * @returns Page object for `FCheckboxField`.
1523
1525
  */
@@ -1532,10 +1534,36 @@ var FInteractiveTablePageObject = class {
1532
1534
  ].join(" ")
1533
1535
  );
1534
1536
  }
1537
+ /**
1538
+ * Get selectable input element (checkbox or radio) in given row.
1539
+ *
1540
+ * For expandable rows the row count depend on whenever a row is expanded or
1541
+ * not. If the first row is collapsed the second row refers to the next
1542
+ * parent row while if the first row is expanded the second row refers to
1543
+ * the first expanded row under the first row.
1544
+ *
1545
+ * Requires a `selectable` table.
1546
+ *
1547
+ * @public
1548
+ * @since v6.28.0
1549
+ * @param row - Row number (1-indexed).
1550
+ * @returns Input element.
1551
+ */
1552
+ selectable(row) {
1553
+ const index = row - 1;
1554
+ return cy.get(
1555
+ [
1556
+ this.selector,
1557
+ `tbody`,
1558
+ `tr:not(.table__expandable-row--collapsed):nth(${String(index)})`,
1559
+ `input`
1560
+ ].join(" ")
1561
+ ).first();
1562
+ }
1535
1563
  /**
1536
1564
  * Get sort order icon in given column.
1537
1565
  *
1538
- * Index includes the columns for checkboxes in selectable rows and markers in expandable rows.
1566
+ * Index includes the columns for radios/checkboxes in selectable rows and markers in expandable rows.
1539
1567
  *
1540
1568
  * @param index - Column index (0-indexed).
1541
1569
  * @param order - Column sort order.
@@ -1610,7 +1638,7 @@ var FTableColumnPageObject = class {
1610
1638
  return cy.get(`${this.selector} th`);
1611
1639
  }
1612
1640
  /**
1613
- * @deprecated Use ´FInteractiveTablePageObject.checkbox()´ instead. Deprecated since v6.11.0.
1641
+ * @deprecated Use ´FInteractiveTablePageObject.selectable()´ instead. Deprecated since v6.11.0.
1614
1642
  */
1615
1643
  checkbox() {
1616
1644
  return new FCheckboxFieldPageObject(this.selector);
@@ -2036,4 +2064,73 @@ var FDialogueTreePageObject = class {
2036
2064
  );
2037
2065
  }
2038
2066
  };
2067
+
2068
+ // src/cypress/FPaginator.pageobject.ts
2069
+ var FPaginatorPageObject = class {
2070
+ selector;
2071
+ /**
2072
+ * @param selector - The root of the FPaginator component
2073
+ */
2074
+ constructor(selector) {
2075
+ this.selector = selector;
2076
+ }
2077
+ /**
2078
+ * Get the root element.
2079
+ *
2080
+ * @returns The element itself.
2081
+ */
2082
+ el() {
2083
+ return cy.get(this.selector);
2084
+ }
2085
+ /**
2086
+ * Get the button for the current page.
2087
+ *
2088
+ * @returns The button for the current page.
2089
+ */
2090
+ currentPageButton() {
2091
+ return cy.get(`${this.selector} .paginator__page--active`);
2092
+ }
2093
+ /**
2094
+ * Get the button for navigating to the next page.
2095
+ *
2096
+ * @returns The button for navigating to the next page.
2097
+ */
2098
+ nextButton() {
2099
+ return cy.get(`${this.selector} .paginator__next`);
2100
+ }
2101
+ /**
2102
+ * Gets the button/buttons for the specified page/pages.
2103
+ *
2104
+ * @param page - The index of the page button (if number); the number of the page (if string)
2105
+ * @returns The button for the specified page (if param `page` is defined); the buttons for all pages shown (if param `page` is undefined).
2106
+ */
2107
+ pageButton(page) {
2108
+ const pageButtons = cy.get(`${this.selector} .paginator__page`);
2109
+ switch (typeof page) {
2110
+ case "number":
2111
+ return pageButtons.eq(page);
2112
+ case "string":
2113
+ return pageButtons.contains(page);
2114
+ default:
2115
+ return pageButtons;
2116
+ }
2117
+ }
2118
+ /**
2119
+ * Get the page counter.
2120
+ * The element replaces the page buttons in compact mode.
2121
+ *
2122
+ * @returns The page counter.
2123
+ */
2124
+ pageCounter() {
2125
+ return cy.get(`${this.selector} .paginator__page-counter`);
2126
+ }
2127
+ /**
2128
+ * Get the button for navigating to the previous page.
2129
+ *
2130
+ * @returns The button for navigating to the previous page.
2131
+ */
2132
+ previousButton() {
2133
+ return cy.get(`${this.selector} .paginator__previous`);
2134
+ }
2135
+ };
2039
2136
  //# sourceMappingURL=cypress.cjs.js.map