@fkui/vue-labs 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.
- package/dist/cjs/cypress.cjs.js +15 -2
- package/dist/cjs/cypress.cjs.js.map +2 -2
- package/dist/cjs/index.cjs.js +25 -6
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/cypress.esm.js +15 -2
- package/dist/esm/cypress.esm.js.map +2 -2
- package/dist/esm/index.esm.js +26 -7
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/cypress.d.ts +10 -2
- package/dist/types/index.d.ts +3 -1
- package/package.json +6 -6
package/dist/cjs/cypress.cjs.js
CHANGED
|
@@ -51,8 +51,6 @@ var FTablePageObject = class {
|
|
|
51
51
|
this.selectHeader = ".table-ng__column--select";
|
|
52
52
|
this.columnTitle = ".table-ng__column__title";
|
|
53
53
|
this.columnDescription = ".table-ng__column__description";
|
|
54
|
-
this.tableCell = ".table-ng__cell";
|
|
55
|
-
this.customExpandable = ".table-ng__custom-expandable";
|
|
56
54
|
this.expandCell = ".table-ng__cell--expand";
|
|
57
55
|
this.selectCell = ".table-ng__cell--select";
|
|
58
56
|
this.selector = selector;
|
|
@@ -168,6 +166,17 @@ var FTablePageObject = class {
|
|
|
168
166
|
selectInput(row) {
|
|
169
167
|
return cy.get([this.bodyRow(row), this.selectCell, `input`].join(" "));
|
|
170
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Get table footer.
|
|
171
|
+
*
|
|
172
|
+
* Only applicable if footer slot is used.
|
|
173
|
+
*
|
|
174
|
+
* @public
|
|
175
|
+
* @returns The table footer.
|
|
176
|
+
*/
|
|
177
|
+
footer() {
|
|
178
|
+
return cy.get(this.tfoot);
|
|
179
|
+
}
|
|
171
180
|
/**
|
|
172
181
|
* Get current tabbable element in the table.
|
|
173
182
|
*
|
|
@@ -204,5 +213,9 @@ var FTablePageObject = class {
|
|
|
204
213
|
get tbody() {
|
|
205
214
|
return `${this.selector} tbody`;
|
|
206
215
|
}
|
|
216
|
+
/** @internal */
|
|
217
|
+
get tfoot() {
|
|
218
|
+
return `${this.selector} tfoot`;
|
|
219
|
+
}
|
|
207
220
|
};
|
|
208
221
|
//# sourceMappingURL=cypress.cjs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/cypress/index.ts", "../../src/cypress/XDummy.pageobject.ts", "../../src/cypress/FTable.pageobject.ts"],
|
|
4
|
-
"sourcesContent": ["export { XDummyPageObject } from \"./XDummy.pageobject\";\nexport { FTablePageObject } from \"./FTable.pageobject\";\n", "import { type BasePageObject, type DefaultCypressChainable } from \"./common\";\n\n/**\n * @public\n */\nexport class XDummyPageObject implements BasePageObject {\n public selector: string;\n public el: () => DefaultCypressChainable;\n\n /**\n * @param selector - the root of the dummy, usually `<dummy class=\"dummy\">...</dummy>`.\n */\n public constructor(selector: string) {\n this.selector = selector;\n this.el = () => cy.get(this.selector);\n }\n\n /**\n * Heading\n */\n public heading(): DefaultCypressChainable {\n return cy.get(`${this.selector} h1`);\n }\n}\n", "import { type BasePageObject, type DefaultCypressChainable } from \"./common\";\n\n/**\n * @public\n * @since v6.24.0\n */\nexport class FTablePageObject implements BasePageObject {\n public selector: string;\n\n private readonly selectHeader = \".table-ng__column--select\";\n private readonly columnTitle = \".table-ng__column__title\";\n private readonly columnDescription = \".table-ng__column__description\";\n private readonly
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,mBAAN,MAAiD;AAAA;AAAA;AAAA;AAAA,EAO7C,YAAY,UAAkB;AACjC,SAAK,WAAW;AAChB,SAAK,KAAK,MAAM,GAAG,IAAI,KAAK,QAAQ;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA,EAKO,UAAmC;AACtC,WAAO,GAAG,IAAI,GAAG,KAAK,QAAQ,KAAK;AAAA,EACvC;AACJ;;;ACjBO,IAAM,mBAAN,MAAiD;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["export { XDummyPageObject } from \"./XDummy.pageobject\";\nexport { FTablePageObject } from \"./FTable.pageobject\";\n", "import { type BasePageObject, type DefaultCypressChainable } from \"./common\";\n\n/**\n * @public\n */\nexport class XDummyPageObject implements BasePageObject {\n public selector: string;\n public el: () => DefaultCypressChainable;\n\n /**\n * @param selector - the root of the dummy, usually `<dummy class=\"dummy\">...</dummy>`.\n */\n public constructor(selector: string) {\n this.selector = selector;\n this.el = () => cy.get(this.selector);\n }\n\n /**\n * Heading\n */\n public heading(): DefaultCypressChainable {\n return cy.get(`${this.selector} h1`);\n }\n}\n", "import { type BasePageObject, type DefaultCypressChainable } from \"./common\";\n\n/**\n * @public\n * @since v6.24.0\n */\nexport class FTablePageObject implements BasePageObject {\n public selector: string;\n\n private readonly selectHeader = \".table-ng__column--select\";\n private readonly columnTitle = \".table-ng__column__title\";\n private readonly columnDescription = \".table-ng__column__description\";\n private readonly expandCell = \".table-ng__cell--expand\";\n private readonly selectCell = \".table-ng__cell--select\";\n\n /**\n * @param selector - root element selector for `FTable`, usually `.table-ng`.\n */\n public constructor(selector: string = \".table-ng\") {\n this.selector = selector;\n }\n\n /**\n * Get root element.\n *\n * @public\n */\n public el(): DefaultCypressChainable {\n return cy.get(this.selector);\n }\n\n /**\n * Get table header cell (`<th>` in `<thead>`).\n *\n * The headers for expandable buttons and selectable checkboxes are included.\n *\n * @public\n * @param col - Column number of header (1-indexed).\n * @returns The header cell element (`<th>`).\n */\n public header(\n col: number,\n ): Cypress.Chainable<JQuery<HTMLTableCellElement>> {\n const colIndex = String(col - 1);\n return cy.get([this.thead, `th:nth(${colIndex})`].join(\" \"));\n }\n\n /**\n * Get column title from table header.\n *\n * The headers for expandable buttons and selectable checkboxes are included.\n *\n * @public\n * @param col - Column number of header (1-indexed).\n * @returns Column description in header.\n */\n public headerTitle(col: number): DefaultCypressChainable {\n const colIndex = String(col - 1);\n return cy.get(\n [this.thead, `th:nth(${colIndex})`, this.columnTitle].join(\" \"),\n );\n }\n\n /**\n * Get column description from table header.\n *\n * The headers for expandable buttons and selectable checkboxes are included.\n *\n * @public\n * @param col - Column number of header (1-indexed).\n * @returns Column description in header.\n */\n public headerDescription(col: number): DefaultCypressChainable {\n const colIndex = String(col - 1);\n return cy.get(\n [this.thead, `th:nth(${colIndex})`, this.columnDescription].join(\n \" \",\n ),\n );\n }\n\n /**\n * Get table cell (typically `<td>` but can be `<th>` if row headers are\n * present).\n *\n * Both row and column are 1-indexed, i.e. 1:1 selects the first cell in the\n * first row.\n *\n * The columns for expandable buttons and selectable checkboxes are included in column count.\n *\n * For expandable rows the row count depend on whenever a row is expanded or\n * not. If the first row is collapsed the second row refers to the next\n * parent row while if the first row is expanded the second row refers to\n * the first expanded row under the first row.\n *\n * @public\n * @param descriptor - Row and column number of cell (1-indexed).\n * @returns The cell element.\n */\n public cell(descriptor: {\n row: number;\n col: number;\n }): Cypress.Chainable<JQuery<HTMLTableCellElement>> {\n const row = this.bodyRow(descriptor.row);\n const nth = `nth-child(${descriptor.col})`;\n return cy.get([row, `> td:${nth},`, row, `> th:${nth}`].join(\" \"));\n }\n\n /**\n * Get expand button of given row.\n *\n * Only applicable if using an expandable table.\n *\n * @public\n * @param row - Row number for the expand button (1-indexed).\n * @returns Expand button of given row.\n */\n public expandButton(\n row: number,\n ): Cypress.Chainable<JQuery<HTMLButtonElement>> {\n return cy.get([this.bodyRow(row), this.expandCell, `button`].join(\" \"));\n }\n\n /**\n * Get checkbox in the table header for selectable column.\n *\n * Only applicable if using a multiselect table.\n *\n * @public\n * @returns Checkbox in selectable column header.\n */\n public selectHeaderInput(): Cypress.Chainable<JQuery<HTMLInputElement>> {\n return cy.get([this.thead, this.selectHeader, `input`].join(\" \"));\n }\n\n /**\n * Get select input of given row.\n *\n * Only applicable if using a selectable table.\n * Input is a checkbox if using a multiselect table and radio if single.\n *\n * @param row - Row number for the select input (1-indexed).\n * @returns Select input of given row.\n */\n public selectInput(\n row: number,\n ): Cypress.Chainable<JQuery<HTMLInputElement>> {\n return cy.get([this.bodyRow(row), this.selectCell, `input`].join(\" \"));\n }\n\n /**\n * Get table footer.\n *\n * Only applicable if footer slot is used.\n *\n * @public\n * @returns The table footer.\n */\n public footer(): Cypress.Chainable<JQuery<HTMLTableSectionElement>> {\n return cy.get(this.tfoot);\n }\n\n /**\n * Get current tabbable element in the table.\n *\n * If table is untouched, it is the first cell in the table body (including columns for expandable and selectable).\n * If the cell has an interactable element, it is instead the interactable that is returned and not the cell.\n *\n * @internal\n * @returns The current tabbable element.\n */\n public tabbableElement(): DefaultCypressChainable {\n return cy.get(`${this.selector} [tabindex=0]`);\n }\n\n /**\n * Get all visible rows (`<tr>` in `<tbody>`).\n *\n * Includes expanded rows if table is expandable.\n *\n * @public\n * @returns All visible rows in the table.\n */\n public rows(): Cypress.Chainable<JQuery<HTMLTableRowElement>> {\n return cy.get(`${this.tbody} tr`);\n }\n\n /** @internal */\n private bodyRow(row: number): string {\n const rowIndex = String(row - 1);\n return `${this.tbody} tr:nth(${rowIndex})`;\n }\n\n /** @internal */\n private get thead(): string {\n return `${this.selector} thead`;\n }\n\n /** @internal */\n private get tbody(): string {\n return `${this.selector} tbody`;\n }\n\n /** @internal */\n private get tfoot(): string {\n return `${this.selector} tfoot`;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,mBAAN,MAAiD;AAAA;AAAA;AAAA;AAAA,EAO7C,YAAY,UAAkB;AACjC,SAAK,WAAW;AAChB,SAAK,KAAK,MAAM,GAAG,IAAI,KAAK,QAAQ;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA,EAKO,UAAmC;AACtC,WAAO,GAAG,IAAI,GAAG,KAAK,QAAQ,KAAK;AAAA,EACvC;AACJ;;;ACjBO,IAAM,mBAAN,MAAiD;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EAGA,IAAY,QAAgB;AACxB,WAAO,GAAG,KAAK,QAAQ;AAAA,EAC3B;AAAA;AAAA,EAGA,IAAY,QAAgB;AACxB,WAAO,GAAG,KAAK,QAAQ;AAAA,EAC3B;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -419,10 +419,10 @@ function requireSharedStore() {
|
|
|
419
419
|
var SHARED = "__core-js_shared__";
|
|
420
420
|
var store = sharedStore.exports = globalThis2[SHARED] || defineGlobalProperty2(SHARED, {});
|
|
421
421
|
(store.versions || (store.versions = [])).push({
|
|
422
|
-
version: "3.
|
|
422
|
+
version: "3.47.0",
|
|
423
423
|
mode: IS_PURE ? "pure" : "global",
|
|
424
424
|
copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",
|
|
425
|
-
license: "https://github.com/zloirock/core-js/blob/v3.
|
|
425
|
+
license: "https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",
|
|
426
426
|
source: "https://github.com/zloirock/core-js"
|
|
427
427
|
});
|
|
428
428
|
return sharedStore.exports;
|
|
@@ -2833,7 +2833,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2833
2833
|
setup(__props) {
|
|
2834
2834
|
return (_ctx, _cache) => {
|
|
2835
2835
|
return vue.openBlock(), vue.createElementBlock("td", {
|
|
2836
|
-
class: "table-
|
|
2836
|
+
class: "table-ng__cell--custom",
|
|
2837
2837
|
colspan: __props.colspan,
|
|
2838
2838
|
tabindex: "-1"
|
|
2839
2839
|
}, [vue.renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$8);
|
|
@@ -3826,6 +3826,11 @@ const _hoisted_5 = {
|
|
|
3826
3826
|
};
|
|
3827
3827
|
const _hoisted_6 = ["colspan"];
|
|
3828
3828
|
const _hoisted_7 = ["aria-level", "aria-rowindex", "aria-setsize", "aria-posinset"];
|
|
3829
|
+
const _hoisted_8 = {
|
|
3830
|
+
key: 0
|
|
3831
|
+
};
|
|
3832
|
+
const _hoisted_9 = ["aria-rowindex"];
|
|
3833
|
+
const _hoisted_10 = ["colspan"];
|
|
3829
3834
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
3830
3835
|
__name: "FTable",
|
|
3831
3836
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
@@ -3855,6 +3860,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3855
3860
|
}) {
|
|
3856
3861
|
const selectedRows = vue.useModel(__props, "selectedRows");
|
|
3857
3862
|
const $t = vue$1.useTranslate();
|
|
3863
|
+
const {
|
|
3864
|
+
hasSlot
|
|
3865
|
+
} = vue$1.useSlotUtils();
|
|
3858
3866
|
const tableRef = vue.useTemplateRef("table");
|
|
3859
3867
|
const selectAllRef = vue.ref(null);
|
|
3860
3868
|
const expandedKeys = vue.ref([]);
|
|
@@ -3866,7 +3874,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3866
3874
|
return metaRows.value.length === 0;
|
|
3867
3875
|
});
|
|
3868
3876
|
const ariaRowcount = vue.computed(() => {
|
|
3869
|
-
|
|
3877
|
+
const headerRow = 1;
|
|
3878
|
+
const footerRow = hasFooter.value ? 1 : 0;
|
|
3879
|
+
return getBodyRowCount(keyedRows.value, __props.expandableAttribute) + headerRow + footerRow;
|
|
3870
3880
|
});
|
|
3871
3881
|
const columnCount = vue.computed(() => {
|
|
3872
3882
|
const expandCol = isTreegrid.value ? 1 : 0;
|
|
@@ -3874,6 +3884,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3874
3884
|
const count = columns.value.length + expandCol + selectCol;
|
|
3875
3885
|
return Math.max(1, count);
|
|
3876
3886
|
});
|
|
3887
|
+
const hasFooter = vue.computed(() => {
|
|
3888
|
+
return hasSlot("footer");
|
|
3889
|
+
});
|
|
3877
3890
|
const multiSelectColumn = {
|
|
3878
3891
|
type: "checkbox",
|
|
3879
3892
|
id: Symbol("multi-select"),
|
|
@@ -4092,7 +4105,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4092
4105
|
setDefaultCellTarget(tableRef.value);
|
|
4093
4106
|
});
|
|
4094
4107
|
return (_ctx, _cache) => {
|
|
4095
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
4108
|
+
return vue.openBlock(), vue.createElementBlock("table", {
|
|
4096
4109
|
ref: "table",
|
|
4097
4110
|
role: role.value,
|
|
4098
4111
|
class: vue.normalizeClass(tableClasses.value),
|
|
@@ -4185,7 +4198,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4185
4198
|
row
|
|
4186
4199
|
}, null, 8, ["row"])) : vue.createCommentVNode("", true)], 64);
|
|
4187
4200
|
}), 128))], 64))], 8, _hoisted_7);
|
|
4188
|
-
}), 128))])
|
|
4201
|
+
}), 128))]), _cache[8] || (_cache[8] = vue.createTextVNode()), hasFooter.value ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_8, [vue.createElementVNode("tr", {
|
|
4202
|
+
class: "table-ng__row",
|
|
4203
|
+
"aria-rowindex": ariaRowcount.value
|
|
4204
|
+
}, [vue.createElementVNode("td", {
|
|
4205
|
+
colspan: columnCount.value,
|
|
4206
|
+
class: "table-ng__cell--custom"
|
|
4207
|
+
}, [vue.renderSlot(_ctx.$slots, "footer")], 8, _hoisted_10)], 8, _hoisted_9)])) : vue.createCommentVNode("", true)], 42, _hoisted_1);
|
|
4189
4208
|
};
|
|
4190
4209
|
}
|
|
4191
4210
|
});
|