@fkui/vue 6.10.0 → 6.11.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.
@@ -1274,24 +1274,6 @@ var FStaticFieldPageObject = class {
1274
1274
  }
1275
1275
  };
1276
1276
 
1277
- // src/cypress/FTableColumn.pageobject.ts
1278
- var FTableColumnPageObject = class {
1279
- constructor(selector, index) {
1280
- this.selector = `${selector}:nth(${index})`;
1281
- this.index = index;
1282
- this.el = () => cy.get(this.selector);
1283
- }
1284
- tableRowBodyContent(position) {
1285
- return cy.get(`${this.selector} td:nth(${position})`);
1286
- }
1287
- tableRowHeaderContent() {
1288
- return cy.get(`${this.selector} th`);
1289
- }
1290
- checkbox() {
1291
- return new FCheckboxFieldPageObject(this.selector);
1292
- }
1293
- };
1294
-
1295
1277
  // src/cypress/FInteractiveTable.pageobject.ts
1296
1278
  var FInteractiveTablePageObject = class {
1297
1279
  /**
@@ -1345,20 +1327,27 @@ var FInteractiveTablePageObject = class {
1345
1327
  return cy.get(`${this.selector} caption`);
1346
1328
  }
1347
1329
  /**
1348
- * Get all table headers (`<th>` in `<thead>`).
1330
+ * Get table header cell (`<th>` in `<thead>`).
1349
1331
  *
1350
- * Includes the headers for checkboxes in selectable rows and markers in expandable rows.
1332
+ * Neither the marker for expandable rows or the checkbox for selectable
1333
+ * rows are included in the column count, i.e. `1` always refers to the
1334
+ * first column with content.
1335
+ *
1336
+ * @public
1337
+ * @param col - column number of header (1-indexed).
1338
+ * @returns The header cell element.
1351
1339
  */
1352
- headersRow() {
1353
- return cy.get(`${this.selector} thead th`);
1340
+ header(col) {
1341
+ const index = col - 1;
1342
+ return cy.get(`${this.selector} thead .table__column:nth(${index})`);
1354
1343
  }
1355
1344
  /**
1356
- * Get all table body rows (`<tr>` in `<tbody>`).
1345
+ * Get all table headers (`<th>` in `<thead>`).
1357
1346
  *
1358
- * Includes expandable rows even if not expanded.
1347
+ * Includes the headers for checkboxes in selectable rows and markers in expandable rows.
1359
1348
  */
1360
- bodyRow() {
1361
- return cy.get(`${this.selector} tbody tr`);
1349
+ headersRow() {
1350
+ return cy.get(`${this.selector} thead th`);
1362
1351
  }
1363
1352
  /**
1364
1353
  * Get row (`<tr>` in `<tbody>`) of given index.
@@ -1371,27 +1360,37 @@ var FInteractiveTablePageObject = class {
1371
1360
  return cy.get(`${this.selector} tbody tr:nth(${index})`);
1372
1361
  }
1373
1362
  /**
1374
- * Get page object for `FTableColumn` with selector targeting the given row number.
1375
- *
1376
- * Index includes the header row (index 0 selects the header row while 1 selects first row in table body).
1377
- * Index ignores expandable rows.
1363
+ * Get all table body rows (`<tr>` in `<tbody>`).
1378
1364
  *
1379
- * @param index - Row number (0-indexed).
1380
- * @returns Page object for `FTableColumn`.
1365
+ * Includes expandable rows even if not expanded.
1381
1366
  */
1382
- columnItem(index) {
1383
- return new FTableColumnPageObject(
1384
- `${this.selector} .table__row`,
1385
- index
1386
- );
1367
+ bodyRow() {
1368
+ return cy.get(`${this.selector} tbody tr`);
1387
1369
  }
1388
1370
  /**
1389
- * Get page object for `FTableColumn` with selector targeting the header row.
1371
+ * Get page object with selector for the checkbox in given row.
1390
1372
  *
1391
- * @returns Page object for `FTableColumn`.
1373
+ * For expandable rows the row count depend on whenever a row is expanded or
1374
+ * not. If the first row is collapsed the second row refers to the next
1375
+ * parent row while if the first row is expanded the second row refers to
1376
+ * the first expanded row under the first row.
1377
+ *
1378
+ * Requires a `selectable` table.
1379
+ *
1380
+ * @public
1381
+ * @param row - Row number (1-indexed).
1382
+ * @returns Page object for `FCheckboxField`.
1392
1383
  */
1393
- headerRowItem() {
1394
- return new FTableColumnPageObject(`${this.selector} .table__row`, 0);
1384
+ checkbox(row) {
1385
+ const index = row - 1;
1386
+ return new FCheckboxFieldPageObject(
1387
+ [
1388
+ this.selector,
1389
+ `tbody`,
1390
+ `tr:not(.table__expandable-row--collapsed):nth(${index})`,
1391
+ `.checkbox`
1392
+ ].join(" ")
1393
+ );
1395
1394
  }
1396
1395
  /**
1397
1396
  * Get sort order icon in given column.
@@ -1417,8 +1416,61 @@ var FInteractiveTablePageObject = class {
1417
1416
  default:
1418
1417
  throw Error("Invalid order");
1419
1418
  }
1420
- const column = this.headerRowItem().tableRowHeaderContent().eq(index);
1421
- return column.find(`svg.${iconName}`);
1419
+ return cy.get(
1420
+ `${this.selector} thead th:nth(${index}) svg.${iconName}`
1421
+ );
1422
+ }
1423
+ /**
1424
+ * Get page object for `FTableColumn` with selector targeting the header row.
1425
+ *
1426
+ * @deprecated Use `header()` instead. Deprecated since v6.11.0.
1427
+ * @returns Page object for `FTableColumn`.
1428
+ */
1429
+ headerRowItem() {
1430
+ return new FTableColumnPageObject(`${this.selector} .table__row`, 0);
1431
+ }
1432
+ /**
1433
+ * Get page object for `FTableColumn` with selector targeting the given row number.
1434
+ *
1435
+ * Index includes the header row (index 0 selects the header row while 1 selects first row in table body).
1436
+ * Index ignores expandable rows.
1437
+ *
1438
+ * @deprecated Use `cell()` for body content and `header()` for header content instead. Deprecated since v6.11.0.
1439
+ * @param index - Row number (0-indexed).
1440
+ * @returns Page object for `FTableColumn`.
1441
+ */
1442
+ columnItem(index) {
1443
+ return new FTableColumnPageObject(
1444
+ `${this.selector} .table__row`,
1445
+ index
1446
+ );
1447
+ }
1448
+ };
1449
+
1450
+ // src/cypress/FTableColumn.pageobject.ts
1451
+ var FTableColumnPageObject = class {
1452
+ constructor(selector, index) {
1453
+ this.selector = `${selector}:nth(${index})`;
1454
+ this.index = index;
1455
+ this.el = () => cy.get(this.selector);
1456
+ }
1457
+ /**
1458
+ * @deprecated Use ´FInteractiveTablePageObject.cell()´ instead. Deprecated since v6.11.0.
1459
+ */
1460
+ tableRowBodyContent(position) {
1461
+ return cy.get(`${this.selector} td:nth(${position})`);
1462
+ }
1463
+ /**
1464
+ * @deprecated Use ´FInteractiveTablePageObject.header()´ instead. Deprecated since v6.11.0.
1465
+ */
1466
+ tableRowHeaderContent() {
1467
+ return cy.get(`${this.selector} th`);
1468
+ }
1469
+ /**
1470
+ * @deprecated Use ´FInteractiveTablePageObject.checkbox()´ instead. Deprecated since v6.11.0.
1471
+ */
1472
+ checkbox() {
1473
+ return new FCheckboxFieldPageObject(this.selector);
1422
1474
  }
1423
1475
  };
1424
1476