@fkui/vue 6.33.0 → 6.34.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.
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/selectors/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ FPaginatorSelectors: () => FPaginatorSelectors
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/selectors/FPaginator.selectors.ts
28
+ function FPaginatorSelectors(selector = ".paginator") {
29
+ return Object.freeze({
30
+ /**
31
+ * The base selector for the component.
32
+ *
33
+ * This is the same selector that the consumer provided.
34
+ *
35
+ * @public
36
+ * @since v6.34.0
37
+ * @returns The root selector for the component.
38
+ */
39
+ get selector() {
40
+ return selector;
41
+ },
42
+ /**
43
+ * Get the button for the current page.
44
+ *
45
+ * @public
46
+ * @since v6.34.0
47
+ * @returns A selector for the currently active page button.
48
+ */
49
+ currentPageButton() {
50
+ return `${selector} .paginator__page--active`;
51
+ },
52
+ /**
53
+ * Get the button for the first page.
54
+ *
55
+ * @public
56
+ * @since v6.34.0
57
+ * @returns A selector for the button that navigates to the first
58
+ * page.
59
+ */
60
+ firstPageButton() {
61
+ return `${selector} [data-page~="first"]`;
62
+ },
63
+ /**
64
+ * Get the button for the last page.
65
+ *
66
+ * @public
67
+ * @since v6.34.0
68
+ * @returns A selector for the button that navigates to the last
69
+ * page.
70
+ */
71
+ lastPageButton() {
72
+ return `${selector} [data-page~="last"]`;
73
+ },
74
+ /**
75
+ * Get the button for navigating to the next page.
76
+ *
77
+ * @public
78
+ * @since v6.34.0
79
+ * @returns A selector for the button that navigates to the next
80
+ * page.
81
+ */
82
+ nextPageButton() {
83
+ return `${selector} .paginator__next`;
84
+ },
85
+ /**
86
+ * Get the button for a specific page by displayed text.
87
+ *
88
+ * This returns the button that displays the given text.
89
+ *
90
+ * @public
91
+ * @since v6.34.0
92
+ * @param text - The text displayed on the requested button. If a
93
+ * numeric value is provided, it is converted to a string.
94
+ * @returns A selector for the specified page button.
95
+ */
96
+ pageButtonByText(text) {
97
+ return `${selector} > [data-page~="${text}"]`;
98
+ },
99
+ /**
100
+ * Get the button for a specific page by index.
101
+ *
102
+ * The index starts at zero for the first button. A negative index
103
+ * selects buttons from the end, e.g. `-1` selects the last button.
104
+ *
105
+ * @public
106
+ * @since v6.34.0
107
+ * @param index - The zero-based page index, or a negative index to
108
+ * select from the end (e.g. `-1` selects the last button).
109
+ * @returns A selector for the specified page button.
110
+ */
111
+ pageButtonByIndex(index) {
112
+ return `${selector} > [data-index~="${index}"]`;
113
+ },
114
+ /**
115
+ * Get the buttons for all pages shown.
116
+ *
117
+ * @public
118
+ * @since v6.34.0
119
+ * @returns A selector for all displayed page buttons.
120
+ */
121
+ pageButtons() {
122
+ return `${selector} .paginator__page`;
123
+ },
124
+ /**
125
+ * Get the page counter element.
126
+ *
127
+ * The counter replaces the page buttons in compact mode on mobile
128
+ * devices.
129
+ *
130
+ * @public
131
+ * @since v6.34.0
132
+ * @returns A selector for the page counter element.
133
+ */
134
+ pageCounter() {
135
+ return `${selector} .paginator__page-counter`;
136
+ },
137
+ /**
138
+ * Get the button for navigating to the previous page.
139
+ *
140
+ * @public
141
+ * @since v6.34.0
142
+ * @returns A selector for the button that navigates to the previous
143
+ * page.
144
+ */
145
+ previousPageButton() {
146
+ return `${selector} .paginator__previous`;
147
+ }
148
+ });
149
+ }
150
+ //# sourceMappingURL=selectors.cjs.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/selectors/index.ts", "../../src/selectors/FPaginator.selectors.ts"],
4
+ "sourcesContent": ["export { FPaginatorSelectors } from \"./FPaginator.selectors\";\n", "/**\n * Selectors for `FPaginator`.\n *\n * @public\n * @since v6.34.0\n * @param selector - The root selector of the FPaginator component.\n * @returns An object with selector methods for the FPaginator component.\n */\nexport function FPaginatorSelectors(selector: string = \".paginator\") {\n return Object.freeze({\n /**\n * The base selector for the component.\n *\n * This is the same selector that the consumer provided.\n *\n * @public\n * @since v6.34.0\n * @returns The root selector for the component.\n */\n get selector(): string {\n return selector;\n },\n\n /**\n * Get the button for the current page.\n *\n * @public\n * @since v6.34.0\n * @returns A selector for the currently active page button.\n */\n currentPageButton(this: void): string {\n return `${selector} .paginator__page--active`;\n },\n\n /**\n * Get the button for the first page.\n *\n * @public\n * @since v6.34.0\n * @returns A selector for the button that navigates to the first\n * page.\n */\n firstPageButton(this: void): string {\n return `${selector} [data-page~=\"first\"]`;\n },\n\n /**\n * Get the button for the last page.\n *\n * @public\n * @since v6.34.0\n * @returns A selector for the button that navigates to the last\n * page.\n */\n lastPageButton(this: void): string {\n return `${selector} [data-page~=\"last\"]`;\n },\n\n /**\n * Get the button for navigating to the next page.\n *\n * @public\n * @since v6.34.0\n * @returns A selector for the button that navigates to the next\n * page.\n */\n nextPageButton(this: void): string {\n return `${selector} .paginator__next`;\n },\n\n /**\n * Get the button for a specific page by displayed text.\n *\n * This returns the button that displays the given text.\n *\n * @public\n * @since v6.34.0\n * @param text - The text displayed on the requested button. If a\n * numeric value is provided, it is converted to a string.\n * @returns A selector for the specified page button.\n */\n pageButtonByText(this: void, text: number | string): string {\n return `${selector} > [data-page~=\"${text}\"]`;\n },\n\n /**\n * Get the button for a specific page by index.\n *\n * The index starts at zero for the first button. A negative index\n * selects buttons from the end, e.g. `-1` selects the last button.\n *\n * @public\n * @since v6.34.0\n * @param index - The zero-based page index, or a negative index to\n * select from the end (e.g. `-1` selects the last button).\n * @returns A selector for the specified page button.\n */\n pageButtonByIndex(this: void, index: number | string): string {\n return `${selector} > [data-index~=\"${index}\"]`;\n },\n\n /**\n * Get the buttons for all pages shown.\n *\n * @public\n * @since v6.34.0\n * @returns A selector for all displayed page buttons.\n */\n pageButtons(this: void): string {\n return `${selector} .paginator__page`;\n },\n\n /**\n * Get the page counter element.\n *\n * The counter replaces the page buttons in compact mode on mobile\n * devices.\n *\n * @public\n * @since v6.34.0\n * @returns A selector for the page counter element.\n */\n pageCounter(this: void): string {\n return `${selector} .paginator__page-counter`;\n },\n\n /**\n * Get the button for navigating to the previous page.\n *\n * @public\n * @since v6.34.0\n * @returns A selector for the button that navigates to the previous\n * page.\n */\n previousPageButton(this: void): string {\n return `${selector} .paginator__previous`;\n },\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACQO,SAAS,oBAAoB,WAAmB,cAAc;AACjE,SAAO,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUjB,IAAI,WAAmB;AACnB,aAAO;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,oBAAsC;AAClC,aAAO,GAAG,QAAQ;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,kBAAoC;AAChC,aAAO,GAAG,QAAQ;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,iBAAmC;AAC/B,aAAO,GAAG,QAAQ;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,iBAAmC;AAC/B,aAAO,GAAG,QAAQ;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,iBAA6B,MAA+B;AACxD,aAAO,GAAG,QAAQ,mBAAmB,IAAI;AAAA,IAC7C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAcA,kBAA8B,OAAgC;AAC1D,aAAO,GAAG,QAAQ,oBAAoB,KAAK;AAAA,IAC/C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,cAAgC;AAC5B,aAAO,GAAG,QAAQ;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYA,cAAgC;AAC5B,aAAO,GAAG,QAAQ;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,qBAAuC;AACnC,aAAO,GAAG,QAAQ;AAAA,IACtB;AAAA,EACJ,CAAC;AACL;",
6
+ "names": []
7
+ }
@@ -2007,14 +2007,141 @@ var FDialogueTreePageObject = class {
2007
2007
  }
2008
2008
  };
2009
2009
 
2010
+ // src/selectors/FPaginator.selectors.ts
2011
+ function FPaginatorSelectors(selector = ".paginator") {
2012
+ return Object.freeze({
2013
+ /**
2014
+ * The base selector for the component.
2015
+ *
2016
+ * This is the same selector that the consumer provided.
2017
+ *
2018
+ * @public
2019
+ * @since v6.34.0
2020
+ * @returns The root selector for the component.
2021
+ */
2022
+ get selector() {
2023
+ return selector;
2024
+ },
2025
+ /**
2026
+ * Get the button for the current page.
2027
+ *
2028
+ * @public
2029
+ * @since v6.34.0
2030
+ * @returns A selector for the currently active page button.
2031
+ */
2032
+ currentPageButton() {
2033
+ return `${selector} .paginator__page--active`;
2034
+ },
2035
+ /**
2036
+ * Get the button for the first page.
2037
+ *
2038
+ * @public
2039
+ * @since v6.34.0
2040
+ * @returns A selector for the button that navigates to the first
2041
+ * page.
2042
+ */
2043
+ firstPageButton() {
2044
+ return `${selector} [data-page~="first"]`;
2045
+ },
2046
+ /**
2047
+ * Get the button for the last page.
2048
+ *
2049
+ * @public
2050
+ * @since v6.34.0
2051
+ * @returns A selector for the button that navigates to the last
2052
+ * page.
2053
+ */
2054
+ lastPageButton() {
2055
+ return `${selector} [data-page~="last"]`;
2056
+ },
2057
+ /**
2058
+ * Get the button for navigating to the next page.
2059
+ *
2060
+ * @public
2061
+ * @since v6.34.0
2062
+ * @returns A selector for the button that navigates to the next
2063
+ * page.
2064
+ */
2065
+ nextPageButton() {
2066
+ return `${selector} .paginator__next`;
2067
+ },
2068
+ /**
2069
+ * Get the button for a specific page by displayed text.
2070
+ *
2071
+ * This returns the button that displays the given text.
2072
+ *
2073
+ * @public
2074
+ * @since v6.34.0
2075
+ * @param text - The text displayed on the requested button. If a
2076
+ * numeric value is provided, it is converted to a string.
2077
+ * @returns A selector for the specified page button.
2078
+ */
2079
+ pageButtonByText(text) {
2080
+ return `${selector} > [data-page~="${text}"]`;
2081
+ },
2082
+ /**
2083
+ * Get the button for a specific page by index.
2084
+ *
2085
+ * The index starts at zero for the first button. A negative index
2086
+ * selects buttons from the end, e.g. `-1` selects the last button.
2087
+ *
2088
+ * @public
2089
+ * @since v6.34.0
2090
+ * @param index - The zero-based page index, or a negative index to
2091
+ * select from the end (e.g. `-1` selects the last button).
2092
+ * @returns A selector for the specified page button.
2093
+ */
2094
+ pageButtonByIndex(index) {
2095
+ return `${selector} > [data-index~="${index}"]`;
2096
+ },
2097
+ /**
2098
+ * Get the buttons for all pages shown.
2099
+ *
2100
+ * @public
2101
+ * @since v6.34.0
2102
+ * @returns A selector for all displayed page buttons.
2103
+ */
2104
+ pageButtons() {
2105
+ return `${selector} .paginator__page`;
2106
+ },
2107
+ /**
2108
+ * Get the page counter element.
2109
+ *
2110
+ * The counter replaces the page buttons in compact mode on mobile
2111
+ * devices.
2112
+ *
2113
+ * @public
2114
+ * @since v6.34.0
2115
+ * @returns A selector for the page counter element.
2116
+ */
2117
+ pageCounter() {
2118
+ return `${selector} .paginator__page-counter`;
2119
+ },
2120
+ /**
2121
+ * Get the button for navigating to the previous page.
2122
+ *
2123
+ * @public
2124
+ * @since v6.34.0
2125
+ * @returns A selector for the button that navigates to the previous
2126
+ * page.
2127
+ */
2128
+ previousPageButton() {
2129
+ return `${selector} .paginator__previous`;
2130
+ }
2131
+ });
2132
+ }
2133
+
2010
2134
  // src/cypress/FPaginator.pageobject.ts
2011
2135
  var FPaginatorPageObject = class {
2012
- selector;
2136
+ _selectors;
2013
2137
  /**
2014
2138
  * @param selector - The root of the FPaginator component
2015
2139
  */
2016
- constructor(selector) {
2017
- this.selector = selector;
2140
+ constructor(selector = ".paginator") {
2141
+ this._selectors = FPaginatorSelectors(selector);
2142
+ }
2143
+ get selector() {
2144
+ return this._selectors.selector;
2018
2145
  }
2019
2146
  /**
2020
2147
  * Get the root element.
@@ -2022,7 +2149,7 @@ var FPaginatorPageObject = class {
2022
2149
  * @returns The element itself.
2023
2150
  */
2024
2151
  el() {
2025
- return cy.get(this.selector);
2152
+ return cy.get(this._selectors.selector);
2026
2153
  }
2027
2154
  /**
2028
2155
  * Get the button for the current page.
@@ -2030,7 +2157,7 @@ var FPaginatorPageObject = class {
2030
2157
  * @returns The button for the current page.
2031
2158
  */
2032
2159
  currentPageButton() {
2033
- return cy.get(`${this.selector} .paginator__page--active`);
2160
+ return cy.get(this._selectors.currentPageButton());
2034
2161
  }
2035
2162
  /**
2036
2163
  * Get the button for navigating to the next page.
@@ -2038,7 +2165,7 @@ var FPaginatorPageObject = class {
2038
2165
  * @returns The button for navigating to the next page.
2039
2166
  */
2040
2167
  nextButton() {
2041
- return cy.get(`${this.selector} .paginator__next`);
2168
+ return cy.get(this._selectors.nextPageButton());
2042
2169
  }
2043
2170
  /**
2044
2171
  * Gets the button/buttons for the specified page/pages.
@@ -2047,14 +2174,13 @@ var FPaginatorPageObject = class {
2047
2174
  * @returns The button for the specified page (if param `page` is defined); the buttons for all pages shown (if param `page` is undefined).
2048
2175
  */
2049
2176
  pageButton(page) {
2050
- const pageButtons = cy.get(`${this.selector} .paginator__page`);
2051
2177
  switch (typeof page) {
2052
2178
  case "number":
2053
- return pageButtons.eq(page);
2179
+ return cy.get(this._selectors.pageButtonByIndex(page));
2054
2180
  case "string":
2055
- return pageButtons.contains(page);
2181
+ return cy.get(this._selectors.pageButtonByText(page));
2056
2182
  default:
2057
- return pageButtons;
2183
+ return cy.get(this._selectors.pageButtons());
2058
2184
  }
2059
2185
  }
2060
2186
  /**
@@ -2064,9 +2190,7 @@ var FPaginatorPageObject = class {
2064
2190
  * @returns The page counter.
2065
2191
  */
2066
2192
  pageCounter() {
2067
- return cy.get(
2068
- `${this.selector} .paginator__page-counter [aria-hidden]`
2069
- );
2193
+ return cy.get(`${this._selectors.pageCounter()} [aria-hidden]`);
2070
2194
  }
2071
2195
  /**
2072
2196
  * Get the button for navigating to the previous page.
@@ -2074,7 +2198,7 @@ var FPaginatorPageObject = class {
2074
2198
  * @returns The button for navigating to the previous page.
2075
2199
  */
2076
2200
  previousButton() {
2077
- return cy.get(`${this.selector} .paginator__previous`);
2201
+ return cy.get(this._selectors.previousPageButton());
2078
2202
  }
2079
2203
  };
2080
2204
  export {