@onecx/angular-accelerator 8.0.0-rc.1 → 8.0.0-rc.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/README.md +15 -4
- package/assets/i18n/de.json +49 -7
- package/assets/i18n/en.json +48 -7
- package/assets/i18n/storybook-translations/data-table/de.json +6 -0
- package/assets/i18n/storybook-translations/data-table/en.json +6 -0
- package/assets/i18n/storybook-translations/diagram/de.json +11 -0
- package/assets/i18n/storybook-translations/diagram/en.json +11 -0
- package/assets/i18n/storybook-translations/page-header/de.json +5 -0
- package/assets/i18n/storybook-translations/page-header/en.json +5 -0
- package/assets/styles.scss +2 -0
- package/fesm2022/onecx-angular-accelerator-testing.mjs +144 -3
- package/fesm2022/onecx-angular-accelerator-testing.mjs.map +1 -1
- package/fesm2022/onecx-angular-accelerator.mjs +2966 -3216
- package/fesm2022/onecx-angular-accelerator.mjs.map +1 -1
- package/package.json +20 -22
- package/src/lib/directives/loading-indicator.directive.scss +48 -0
- package/{testing/index.d.ts → types/onecx-angular-accelerator-testing.d.ts} +58 -6
- package/types/onecx-angular-accelerator.d.ts +2516 -0
- package/index.d.ts +0 -2370
- package/migrations/index.d.ts +0 -1
- package/migrations/index.js +0 -5
- package/migrations/index.js.map +0 -1
- package/migrations/v6/migrate-onecx-to-v6.d.ts +0 -2
- package/migrations/v6/migrate-onecx-to-v6.js +0 -8
- package/migrations/v6/migrate-onecx-to-v6.js.map +0 -1
- package/migrations.json +0 -34
package/README.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
# angular-accelerator
|
|
1
|
+
# @onecx/angular-accelerator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@onecx/angular-accelerator` contains all Angular-specific accelerators.
|
|
4
|
+
More information about OneCX libraries can be found in the [OneCX documentation](https://onecx.github.io/docs/documentation/current/onecx-portal-ui-libs/index.html).
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Installation
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
```bash
|
|
9
|
+
npm install @onecx/angular-accelerator
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Additional Commands
|
|
13
|
+
- `npx nx run angular-accelerator:build` - Builds the library and outputs the result to the `dist` folder.
|
|
14
|
+
- `npx nx run angular-accelerator:test` - Runs the unit tests for the library.
|
|
15
|
+
- `npx nx run angular-accelerator:lint` - Lints the library's codebase.
|
|
16
|
+
- `npx nx run angular-accelerator:release` - Releases a new version of the library to npm, following semantic versioning guidelines.
|
|
17
|
+
- `npx nx run angular-accelerator:storybook` - Runs Storybook for the library, allowing you to view and test the provided UI components in isolation.
|
|
18
|
+
- `npx nx run angular-accelerator:build-storybook` - Builds the Storybook static site for the library.
|
package/assets/i18n/de.json
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"OCX_BUTTON_DIALOG": {
|
|
3
|
+
"CONFIRM": "Bestätigen",
|
|
4
|
+
"CANCEL": "Abbrechen"
|
|
5
|
+
},
|
|
6
|
+
"OCX_CONSENT": {
|
|
7
|
+
"TITLE": "Zustimmung erforderlich",
|
|
8
|
+
"MESSAGE": "Um diesen Inhalt anzuzeigen, können Anfragen an {{url}} gesendet werden. Dadurch können Ihre Daten (z. B. IP-Adresse) an diesen externen Dienst übermittelt werden. Stimmen Sie zu?",
|
|
9
|
+
"AGREE": "Ich stimme zu",
|
|
10
|
+
"WITHDRAW": "Zustimmung zur Anzeige dieses Inhalts widerrufen"
|
|
11
|
+
},
|
|
2
12
|
"OCX_CUSTOM_GROUP_COLUMN_SELECTOR": {
|
|
3
13
|
"ARIA_LABEL": "Spaltengruppe-Selektor",
|
|
4
14
|
"DROPDOWN_LABEL": "Spaltengruppe",
|
|
@@ -48,7 +58,7 @@
|
|
|
48
58
|
"DESCENDING_TOOLTIP": "Absteigend sortieren",
|
|
49
59
|
"DEFAULT_TOOLTIP": "Standardsortierung"
|
|
50
60
|
},
|
|
51
|
-
"SORTING_BUTTON_ARIA_LABEL": "{{
|
|
61
|
+
"SORTING_BUTTON_ARIA_LABEL": "Aktuelle Sortierrichtung: {{currentDirection}}. Sortierrichtung auf {{nextDirection}} ändern"
|
|
52
62
|
},
|
|
53
63
|
"OCX_DATA_TABLE": {
|
|
54
64
|
"SEARCH_RESULTS_FOUND": "{{results}} Ergebnisse gefunden",
|
|
@@ -56,7 +66,9 @@
|
|
|
56
66
|
"EMPTY_RESULT": "Keine Daten gefunden.",
|
|
57
67
|
"EMPTY_FILTER_MESSAGE": "Keine Filter gefunden.",
|
|
58
68
|
"ACTIONS_COLUMN_NAME": "Aktionen",
|
|
69
|
+
"EXPAND_COLLAPSE_COLUMN": "Spalte erweitern/zusammenklappen",
|
|
59
70
|
"COLUMN_FILTER_ARIA_LABEL": "Spaltenfilter",
|
|
71
|
+
"COLUMN_FILTER_PLACEHOLDER": "Zum Filtern eingeben",
|
|
60
72
|
"FILTER_TITLE": "Filter",
|
|
61
73
|
"FILTER_ARIA_LABEL": "Filter {{column}}",
|
|
62
74
|
"EDITED": "Bearbeitet",
|
|
@@ -76,9 +88,13 @@
|
|
|
76
88
|
},
|
|
77
89
|
"SELECT_ALL_ARIA_LABEL": "Selektiere alle Zeilen der Tabelle",
|
|
78
90
|
"SELECT_ALL_TOOLTIP": "Selektiere alle",
|
|
79
|
-
"SELECT_ARIA_LABEL": "Selektiere die Tabellenspalte mit der ID {{key}}",
|
|
91
|
+
"SELECT_ARIA_LABEL": "Selektiere die Tabellenspalte mit der ID {{key}}, Zeilenzusammenfassung: {{rowSummary}}",
|
|
80
92
|
"FILTER_YES": "Ja",
|
|
81
|
-
"FILTER_NO": "Nein"
|
|
93
|
+
"FILTER_NO": "Nein",
|
|
94
|
+
"COLLAPSED_ROW": "Zeilendetails umschalten. Aktueller Status: Eingeklappt",
|
|
95
|
+
"EXPANDED_ROW": "Zeilendetails umschalten. Aktueller Status: Ausgeklappt",
|
|
96
|
+
"SELECTION_COLUMN": "Auswahlspalte",
|
|
97
|
+
"TABLE_ARIA_LABEL": "Datentabelle"
|
|
82
98
|
},
|
|
83
99
|
"OCX_DATA_LIST_GRID": {
|
|
84
100
|
"SEARCH_RESULTS_FOUND": "{{results}} Ergebnisse gefunden",
|
|
@@ -93,6 +109,9 @@
|
|
|
93
109
|
"MORE_ACTIONS_TOOLTIP": "Weitere Aktionen anzeigen"
|
|
94
110
|
},
|
|
95
111
|
"OCX_DATA_LAYOUT_SELECTION": {
|
|
112
|
+
"SELECT_BUTTON": {
|
|
113
|
+
"ARIA_LABEL": "Layout auswählen"
|
|
114
|
+
},
|
|
96
115
|
"LAYOUT": {
|
|
97
116
|
"LIST": "Liste",
|
|
98
117
|
"GRID": "Raster",
|
|
@@ -115,7 +134,9 @@
|
|
|
115
134
|
"MANAGE_FILTERS_BUTTON": {
|
|
116
135
|
"LABEL": "Filter",
|
|
117
136
|
"ARIA_LABEL": "Aktive Filter verwalten",
|
|
118
|
-
"DETAIL": "Aktive Filter verwalten"
|
|
137
|
+
"DETAIL": "Aktive Filter verwalten",
|
|
138
|
+
"DISABLED_DETAIL": "Keine aktiven Filter zum Verwalten"
|
|
139
|
+
|
|
119
140
|
},
|
|
120
141
|
"TABLE": {
|
|
121
142
|
"COLUMN_NAME": "Spaltenname",
|
|
@@ -151,20 +172,37 @@
|
|
|
151
172
|
"ARIA_LABEL": "Suche starten",
|
|
152
173
|
"DETAIL": "Suche starten"
|
|
153
174
|
},
|
|
154
|
-
"EXPORT": "Alle Ereignisse exportieren"
|
|
175
|
+
"EXPORT": "Alle Ereignisse exportieren",
|
|
176
|
+
"CONTROLS": {
|
|
177
|
+
"ARIA_LABEL": "Suchsteuerungen"
|
|
178
|
+
},
|
|
179
|
+
"ANNOUNCEMENTS": {
|
|
180
|
+
"SEARCHING": "Suche läuft...",
|
|
181
|
+
"NO_RESULTS": "Keine Ergebnisse gefunden",
|
|
182
|
+
"RESULTS_FOUND": "{{count}} Ergebnisse gefunden"
|
|
183
|
+
}
|
|
155
184
|
},
|
|
156
185
|
"OCX_PAGE_HEADER": {
|
|
157
186
|
"IMAGE": "Seitentitelbild",
|
|
158
187
|
"SUBHEADER": "Seiteninhalt",
|
|
159
188
|
"MORE_ACTIONS": "Weitere Aktionen",
|
|
160
189
|
"HOME_DEFAULT_ARIA_LABEL": "Zur Startseite navigieren",
|
|
161
|
-
"HOME_ARIA_LABEL": "Zu {{page}} navigieren"
|
|
190
|
+
"HOME_ARIA_LABEL": "Zu {{page}} navigieren",
|
|
191
|
+
"BREADCRUMB_ARIA_LABEL": "Zu {{breadcrumb}} navigieren"
|
|
162
192
|
},
|
|
163
193
|
"OCX_DIAGRAM": {
|
|
164
|
-
"ARIA_LABEL": "Diagramm: Gesamtanzahl: {{total}}. {{valueString}}.",
|
|
194
|
+
"ARIA_LABEL": "Diagramm Zusammenfassung: Gesamtanzahl: {{total}}. {{valueString}}.",
|
|
165
195
|
"EMPTY_ARIA_LABEL": "Diagramm ohne Daten",
|
|
166
196
|
"SUM": "Gesamtanzahl",
|
|
167
197
|
"NO_DATA": "Es sind keine Daten vorhanden",
|
|
198
|
+
"SELECT_BUTTON": {
|
|
199
|
+
"ARIA_LABEL": "Diagrammtyp auswählen"
|
|
200
|
+
},
|
|
201
|
+
"TABLE": {
|
|
202
|
+
"COLOR": "Farbe",
|
|
203
|
+
"LABEL": "Bezeichnung",
|
|
204
|
+
"COUNT": "Anzahl"
|
|
205
|
+
},
|
|
168
206
|
"SWITCH_DIAGRAM_TYPE": {
|
|
169
207
|
"PIE": "Zu Tortendiagramm wechseln",
|
|
170
208
|
"HORIZONTAL_BAR": "Zu horizontalem Balkendiagramm wechseln",
|
|
@@ -187,5 +225,9 @@
|
|
|
187
225
|
"OCX_DATA_LOADING_ERROR": {
|
|
188
226
|
"TITLE": "Die Daten konnten nicht geladen werden.",
|
|
189
227
|
"MESSAGE": "Dies kann folgende Gründe haben: \n -Die Daten existieren nicht oder nicht mehr.\n - Die Daten konnten aufgrund eines Fehlers im System nicht geladen werden.\n - Ihnen fehlt die nötige Berechtigung um die Daten zu laden.\n Bitte kontaktieren Sie den Support, wenn Sie glauben, dass es sich hierbei um einen Fehler des Systems handelt."
|
|
228
|
+
},
|
|
229
|
+
"OCX_DATA_EXPORT": {
|
|
230
|
+
"EXCEL_TABLE_NAME": "{{fileName}}_table",
|
|
231
|
+
"EXCEL_SHEET_NAME": "{{fileName}}_sheet"
|
|
190
232
|
}
|
|
191
233
|
}
|
package/assets/i18n/en.json
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"OCX_BUTTON_DIALOG": {
|
|
3
|
+
"CONFIRM": "Confirm",
|
|
4
|
+
"CANCEL": "Cancel"
|
|
5
|
+
},
|
|
6
|
+
"OCX_CONSENT": {
|
|
7
|
+
"TITLE": "Consent required",
|
|
8
|
+
"MESSAGE": "To display this content, requests to {{url}} may be sent. This can expose your data (e.g. IP address) to this external service. Do you agree?",
|
|
9
|
+
"AGREE": "I agree",
|
|
10
|
+
"WITHDRAW": "Withdraw consent to display this content"
|
|
11
|
+
},
|
|
2
12
|
"OCX_CUSTOM_GROUP_COLUMN_SELECTOR": {
|
|
3
13
|
"ARIA_LABEL": "Column group selector",
|
|
4
14
|
"DROPDOWN_LABEL": "Column group",
|
|
@@ -48,7 +58,7 @@
|
|
|
48
58
|
"DESCENDING_TOOLTIP": "Sort Descending",
|
|
49
59
|
"DEFAULT_TOOLTIP": "Default Sort"
|
|
50
60
|
},
|
|
51
|
-
"SORTING_BUTTON_ARIA_LABEL": "Toggle sorting direction to {{
|
|
61
|
+
"SORTING_BUTTON_ARIA_LABEL": "Current Sorting direction: {{currentDirection}}. Toggle sorting direction to {{nextDirection}}"
|
|
52
62
|
},
|
|
53
63
|
"OCX_DATA_TABLE": {
|
|
54
64
|
"SEARCH_RESULTS_FOUND": "{{results}} Results Found",
|
|
@@ -56,7 +66,9 @@
|
|
|
56
66
|
"EMPTY_RESULT": "No data found.",
|
|
57
67
|
"EMPTY_FILTER_MESSAGE": "No filters found.",
|
|
58
68
|
"ACTIONS_COLUMN_NAME": "Actions",
|
|
69
|
+
"EXPAND_COLLAPSE_COLUMN": "Expand/Collapse column",
|
|
59
70
|
"COLUMN_FILTER_ARIA_LABEL": "Column filter",
|
|
71
|
+
"COLUMN_FILTER_PLACEHOLDER": "Type to filter",
|
|
60
72
|
"FILTER_TITLE": "Filter",
|
|
61
73
|
"FILTER_ARIA_LABEL": "Filter {{column}}",
|
|
62
74
|
"EDITED": "Edited",
|
|
@@ -76,9 +88,13 @@
|
|
|
76
88
|
},
|
|
77
89
|
"SELECT_ALL_ARIA_LABEL": "Select all table rows",
|
|
78
90
|
"SELECT_ALL_TOOLTIP": "Select all",
|
|
79
|
-
"SELECT_ARIA_LABEL": "Select table row with id {{key}}",
|
|
91
|
+
"SELECT_ARIA_LABEL": "Select table row with id {{key}}, row summary: {{rowSummary}}",
|
|
80
92
|
"FILTER_YES": "Yes",
|
|
81
|
-
"FILTER_NO": "No"
|
|
93
|
+
"FILTER_NO": "No",
|
|
94
|
+
"COLLAPSED_ROW": "Toggle row details. Current state: Collapsed",
|
|
95
|
+
"EXPANDED_ROW": "Toggle row details. Current state: Expanded",
|
|
96
|
+
"SELECTION_COLUMN": "Selection column",
|
|
97
|
+
"TABLE_ARIA_LABEL": "Data table"
|
|
82
98
|
},
|
|
83
99
|
"OCX_DATA_LIST_GRID": {
|
|
84
100
|
"SEARCH_RESULTS_FOUND": "{{results}} Results Found",
|
|
@@ -93,6 +109,9 @@
|
|
|
93
109
|
"MORE_ACTIONS_TOOLTIP": "Display more actions"
|
|
94
110
|
},
|
|
95
111
|
"OCX_DATA_LAYOUT_SELECTION": {
|
|
112
|
+
"SELECT_BUTTON": {
|
|
113
|
+
"ARIA_LABEL": "Select layout"
|
|
114
|
+
},
|
|
96
115
|
"LAYOUT": {
|
|
97
116
|
"LIST": "List",
|
|
98
117
|
"GRID": "Grid",
|
|
@@ -115,7 +134,8 @@
|
|
|
115
134
|
"MANAGE_FILTERS_BUTTON": {
|
|
116
135
|
"LABEL": "Filters",
|
|
117
136
|
"ARIA_LABEL": "Manage active filters",
|
|
118
|
-
"DETAIL": "Manage active filters"
|
|
137
|
+
"DETAIL": "Manage active filters",
|
|
138
|
+
"DISABLED_DETAIL": "No active filters to manage"
|
|
119
139
|
},
|
|
120
140
|
"TABLE": {
|
|
121
141
|
"COLUMN_NAME": "Column name",
|
|
@@ -151,20 +171,37 @@
|
|
|
151
171
|
"ARIA_LABEL": "Start search",
|
|
152
172
|
"DETAIL": "Start search"
|
|
153
173
|
},
|
|
154
|
-
"EXPORT": "Export all events"
|
|
174
|
+
"EXPORT": "Export all events",
|
|
175
|
+
"CONTROLS": {
|
|
176
|
+
"ARIA_LABEL": "Search controls"
|
|
177
|
+
},
|
|
178
|
+
"ANNOUNCEMENTS": {
|
|
179
|
+
"SEARCHING": "Searching...",
|
|
180
|
+
"NO_RESULTS": "No results found",
|
|
181
|
+
"RESULTS_FOUND": "{{count}} results found"
|
|
182
|
+
}
|
|
155
183
|
},
|
|
156
184
|
"OCX_PAGE_HEADER": {
|
|
157
185
|
"IMAGE": "Page title logo",
|
|
158
186
|
"SUBHEADER": "Page Content",
|
|
159
187
|
"MORE_ACTIONS": "More actions",
|
|
160
188
|
"HOME_DEFAULT_ARIA_LABEL": "Go to home page",
|
|
161
|
-
"HOME_ARIA_LABEL": "Go to
|
|
189
|
+
"HOME_ARIA_LABEL": "Go to home page",
|
|
190
|
+
"BREADCRUMB_ARIA_LABEL": "Go to {{breadcrumb}} page"
|
|
162
191
|
},
|
|
163
192
|
"OCX_DIAGRAM": {
|
|
164
|
-
"ARIA_LABEL": "Chart: Total amount: {{total}}. {{valueString}}.",
|
|
193
|
+
"ARIA_LABEL": "Chart Summary: Total amount: {{total}}. {{valueString}}.",
|
|
165
194
|
"EMPTY_ARIA_LABEL": "Chart with no data",
|
|
166
195
|
"SUM": "Total",
|
|
167
196
|
"NO_DATA": "There is no data available",
|
|
197
|
+
"SELECT_BUTTON": {
|
|
198
|
+
"ARIA_LABEL": "Select chart type"
|
|
199
|
+
},
|
|
200
|
+
"TABLE": {
|
|
201
|
+
"COLOR": "Color",
|
|
202
|
+
"LABEL": "Label",
|
|
203
|
+
"COUNT": "Count"
|
|
204
|
+
},
|
|
168
205
|
"SWITCH_DIAGRAM_TYPE": {
|
|
169
206
|
"PIE": "Switch to pie chart",
|
|
170
207
|
"HORIZONTAL_BAR": "Switch to horizontal bar chart",
|
|
@@ -187,5 +224,9 @@
|
|
|
187
224
|
"OCX_DATA_LOADING_ERROR": {
|
|
188
225
|
"TITLE": "The data could not be loaded.",
|
|
189
226
|
"MESSAGE": "This may have the following reasons:\n The data does not exist or no longer exists.\n The data could not be loaded due to an error in the system.\n You do not have the necessary permission to load the data.\n Please contact the support if you think this happened due to a system error."
|
|
227
|
+
},
|
|
228
|
+
"OCX_DATA_EXPORT": {
|
|
229
|
+
"EXCEL_TABLE_NAME": "{{fileName}}_table",
|
|
230
|
+
"EXCEL_SHEET_NAME": "{{fileName}}_sheet"
|
|
190
231
|
}
|
|
191
232
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chart": {
|
|
3
|
+
"fruit1": "Apfel",
|
|
4
|
+
"fruit2": "Banane",
|
|
5
|
+
"fruit3": "Orange"
|
|
6
|
+
},
|
|
7
|
+
"OCX_DIAGRAM": {
|
|
8
|
+
"ACCESSIBILITY_TITLE": "Verteilung des Obstverkaufs",
|
|
9
|
+
"ACCESSIBILITY_DESCRIPTION": "Interaktives Kreisdiagramm, das die Verteilung der Obstverk\u00e4ufe nach Typ zeigt. Verwenden Sie die Schaltfl\u00e4chen unten, um zwischen Kreis-, horizontalem Balken- und vertikalem Balkendiagramm zu wechseln. Eine Datentabelle f\u00fcr Bildschirmleser ist unter dem Diagramm verf\u00fcgbar."
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chart": {
|
|
3
|
+
"fruit1": "Apple",
|
|
4
|
+
"fruit2": "Banana",
|
|
5
|
+
"fruit3": "Orange"
|
|
6
|
+
},
|
|
7
|
+
"OCX_DIAGRAM": {
|
|
8
|
+
"ACCESSIBILITY_TITLE": "Fruit Sales Distribution",
|
|
9
|
+
"ACCESSIBILITY_DESCRIPTION": "Interactive pie chart showing the distribution of fruit sales by type. Use the buttons below to switch between pie, horizontal bar, and vertical bar chart views. A data table for screen readers is available below the chart."
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -9,5 +9,10 @@
|
|
|
9
9
|
"actionItemAriaLabel": "Funktions-Aktions-Aria-Label",
|
|
10
10
|
"statusLabelTooltip": "Funktions-Status-Label-Tooltip (status: {{status}})",
|
|
11
11
|
"statusValueTooltip": "Funktions-Status-Wert-Tooltip (value: {{value}})"
|
|
12
|
+
},
|
|
13
|
+
"chart": {
|
|
14
|
+
"fruit1": "Apfel",
|
|
15
|
+
"fruit2": "Banane",
|
|
16
|
+
"fruit3": "Orange"
|
|
12
17
|
}
|
|
13
18
|
}
|
|
@@ -9,5 +9,10 @@
|
|
|
9
9
|
"actionItemAriaLabel": "Feature Action Item Aria Label",
|
|
10
10
|
"statusLabelTooltip": "Feature Status Label Tooltip (status: {{status}})",
|
|
11
11
|
"statusValueTooltip": "Feature Status Value Tooltip (value: {{value}})"
|
|
12
|
+
},
|
|
13
|
+
"chart": {
|
|
14
|
+
"fruit1": "Apple",
|
|
15
|
+
"fruit2": "Banana",
|
|
16
|
+
"fruit3": "Orange"
|
|
12
17
|
}
|
|
13
18
|
}
|
package/assets/styles.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PSelectHarness, DivHarness, PHarness, PButtonHarness, PDialogHarness, PPicklistHarness, PToggleButtonHarness, MenuItemHarness,
|
|
1
|
+
import { PSelectHarness, ButtonHarness, DivHarness, PHarness, PButtonHarness, PDialogHarness, PPicklistHarness, PToggleButtonHarness, MenuItemHarness, waitForDeferredViewsToBeRendered, PPaginatorHarness, PMenuHarness, TableHeaderColumnHarness, TableRowHarness, PTableCheckboxHarness, PChartHarness, PSelectButtonHarness, PChipHarness, SpanHarness, PBreadcrumbHarness, ContentContainerComponentHarness as ContentContainerComponentHarness$1, PButtonDirectiveHarness, ensureIntersectionObserverMockExists, ensureOriginMockExists } from '@onecx/angular-testing';
|
|
2
2
|
export * from '@onecx/angular-testing';
|
|
3
3
|
import { ComponentHarness, ContentContainerComponentHarness, parallel, HarnessPredicate } from '@angular/cdk/testing';
|
|
4
4
|
export * from '@angular/cdk/testing';
|
|
@@ -12,6 +12,33 @@ class ColumnGroupSelectionHarness extends ComponentHarness {
|
|
|
12
12
|
static { this.hostSelector = 'ocx-column-group-selection'; }
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
class OcxConsentHarness extends ComponentHarness {
|
|
16
|
+
static { this.hostSelector = 'ocx-consent'; }
|
|
17
|
+
async isConsentMessageVisible() {
|
|
18
|
+
return !!(await this.locatorForOptional('.ocx-consent')());
|
|
19
|
+
}
|
|
20
|
+
async isContentVisible(selector) {
|
|
21
|
+
const projected = await this.locatorForOptional(selector)();
|
|
22
|
+
return !!projected;
|
|
23
|
+
}
|
|
24
|
+
async clickAgree() {
|
|
25
|
+
const button = await this.locatorFor(ButtonHarness.with({ ancestor: '.ocx-consent', selector: 'button' }))();
|
|
26
|
+
await button.click();
|
|
27
|
+
}
|
|
28
|
+
async clickWithdraw() {
|
|
29
|
+
const button = await this.locatorFor('a.cursor-pointer.text-primary.underline')();
|
|
30
|
+
await button.click();
|
|
31
|
+
}
|
|
32
|
+
async isWithdrawVisible() {
|
|
33
|
+
const withdraw = await this.locatorForOptional('a.cursor-pointer.text-primary.underline')();
|
|
34
|
+
return !!withdraw;
|
|
35
|
+
}
|
|
36
|
+
async isInfoVisible() {
|
|
37
|
+
const info = await this.locatorForOptional('[ocx-consent-info]')();
|
|
38
|
+
return !!info;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
15
42
|
class OcxContentContainerHarness extends ComponentHarness {
|
|
16
43
|
static { this.hostSelector = 'ocx-content-container'; }
|
|
17
44
|
async getLayoutClasses() {
|
|
@@ -255,6 +282,8 @@ class DataTableHarness extends ContentContainerComponentHarness {
|
|
|
255
282
|
this.getRows = this.locatorForAll(TableRowHarness);
|
|
256
283
|
this.getPaginator = this.locatorFor(PPaginatorHarness);
|
|
257
284
|
this.getOverflowMenu = this.locatorForOptional(PMenuHarness);
|
|
285
|
+
this.getExpansionColumnHeaderElement = this.locatorForOptional('[name="expansion-column-header"]');
|
|
286
|
+
this.getExpansionToggleButtonElements = this.locatorForAll('[name="expansion-column"] button');
|
|
258
287
|
}
|
|
259
288
|
static { this.hostSelector = 'ocx-data-table'; }
|
|
260
289
|
static with(options) {
|
|
@@ -326,6 +355,16 @@ class DataTableHarness extends ContentContainerComponentHarness {
|
|
|
326
355
|
}
|
|
327
356
|
return await column.hasClass('p-datatable-frozen-column');
|
|
328
357
|
}
|
|
358
|
+
async expansionColumnHeaderExists() {
|
|
359
|
+
return (await this.getExpansionColumnHeaderElement()) !== null;
|
|
360
|
+
}
|
|
361
|
+
async clickExpansionToggle(rowIndex) {
|
|
362
|
+
const buttons = await this.getExpansionToggleButtonElements();
|
|
363
|
+
if (rowIndex >= buttons.length) {
|
|
364
|
+
throw new Error(`No expansion toggle at index ${rowIndex}. Found ${buttons.length} toggle(s).`);
|
|
365
|
+
}
|
|
366
|
+
await buttons[rowIndex].click();
|
|
367
|
+
}
|
|
329
368
|
}
|
|
330
369
|
|
|
331
370
|
class DataViewHarness extends ContentContainerComponentHarness {
|
|
@@ -352,9 +391,16 @@ class DiagramHarness extends ComponentHarness {
|
|
|
352
391
|
async getDiagramTypeSelectButton() {
|
|
353
392
|
return await this.locatorForOptional('p-selectbutton[name="diagram-type-select-button"]')();
|
|
354
393
|
}
|
|
394
|
+
async getCanvasElement() {
|
|
395
|
+
return await this.locatorForOptional('p-chart canvas')();
|
|
396
|
+
}
|
|
355
397
|
async getAllSelectionButtons() {
|
|
356
398
|
return await (await this.locatorFor(PSelectButtonHarness)()).getAllButtons();
|
|
357
399
|
}
|
|
400
|
+
async getCanvasAriaLabel() {
|
|
401
|
+
const canvas = await this.getCanvasElement();
|
|
402
|
+
return canvas ? canvas.getAttribute('aria-label') : null;
|
|
403
|
+
}
|
|
358
404
|
}
|
|
359
405
|
|
|
360
406
|
class FilterViewHarness extends ContentContainerComponentHarness {
|
|
@@ -534,6 +580,8 @@ class SearchHeaderHarness extends ComponentHarness {
|
|
|
534
580
|
id: 'simpleAdvancedButton',
|
|
535
581
|
}));
|
|
536
582
|
this.getMoreActionsMenuButton = this.locatorForOptional(MoreActionsMenuButtonHarness);
|
|
583
|
+
this.getBasicContent = this.locatorForOptional('#basic-content');
|
|
584
|
+
this.getAdvancedContent = this.locatorForOptional('#advanced-content');
|
|
537
585
|
}
|
|
538
586
|
static { this.hostSelector = 'ocx-search-header'; }
|
|
539
587
|
async clickResetButton() {
|
|
@@ -547,8 +595,101 @@ class SearchHeaderHarness extends ComponentHarness {
|
|
|
547
595
|
await (await this.getSimpleAdvancedButton())?.click();
|
|
548
596
|
}
|
|
549
597
|
else {
|
|
550
|
-
|
|
598
|
+
// In some tests the toggle button is not rendered (no advanced field defined).
|
|
599
|
+
// Consumers can fall back to directly setting `viewMode` via `setViewMode`.
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
async isBasicContentVisible() {
|
|
603
|
+
return !!(await this.getBasicContent());
|
|
604
|
+
}
|
|
605
|
+
async isAdvancedContentVisible() {
|
|
606
|
+
return !!(await this.getAdvancedContent());
|
|
607
|
+
}
|
|
608
|
+
async setViewMode(mode) {
|
|
609
|
+
const toggleButton = await this.getSimpleAdvancedButton();
|
|
610
|
+
if (!toggleButton) {
|
|
611
|
+
return;
|
|
551
612
|
}
|
|
613
|
+
const desiredAdvancedVisible = mode === 'advanced';
|
|
614
|
+
for (let i = 0; i < 2; i++) {
|
|
615
|
+
const isAdvancedVisible = await this.isAdvancedContentVisible();
|
|
616
|
+
if (isAdvancedVisible === desiredAdvancedVisible) {
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
await this.toggleSimpleAdvanced();
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
class OcxSrcHarness extends ComponentHarness {
|
|
625
|
+
static { this.hostSelector = 'img'; }
|
|
626
|
+
static with(options = {}) {
|
|
627
|
+
return new HarnessPredicate(OcxSrcHarness, options).addOption('id', options.id, (harness, id) => HarnessPredicate.stringMatches(harness.getId(), id));
|
|
628
|
+
}
|
|
629
|
+
async getId() {
|
|
630
|
+
return await (await this.host()).getAttribute('id');
|
|
631
|
+
}
|
|
632
|
+
async getSrcAttribute() {
|
|
633
|
+
return await (await this.host()).getAttribute('src');
|
|
634
|
+
}
|
|
635
|
+
async getSrcProperty() {
|
|
636
|
+
return await (await this.host()).getProperty('src');
|
|
637
|
+
}
|
|
638
|
+
async getVisibility() {
|
|
639
|
+
const style = await (await this.host()).getAttribute('style');
|
|
640
|
+
if (!style)
|
|
641
|
+
return null;
|
|
642
|
+
const match = /visibility\s*:\s*([^;]+)/i.exec(style);
|
|
643
|
+
return match?.[1]?.trim() ?? null;
|
|
644
|
+
}
|
|
645
|
+
async dispatchLoad() {
|
|
646
|
+
const host = await this.host();
|
|
647
|
+
await host.dispatchEvent('load');
|
|
648
|
+
}
|
|
649
|
+
async getTestElement() {
|
|
650
|
+
return await this.host();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
class OcxTooltipHarness extends ComponentHarness {
|
|
655
|
+
static { this.defaultHostSelector = '.ocx-tooltip-host'; }
|
|
656
|
+
static { this.configuredHostSelector = OcxTooltipHarness.defaultHostSelector; }
|
|
657
|
+
static get hostSelector() {
|
|
658
|
+
return OcxTooltipHarness.configuredHostSelector;
|
|
659
|
+
}
|
|
660
|
+
static with(options = {}) {
|
|
661
|
+
const { hostSelector, selector, ...rest } = options;
|
|
662
|
+
return new HarnessPredicate(OcxTooltipHarness, {
|
|
663
|
+
...rest,
|
|
664
|
+
selector: hostSelector ?? selector ?? OcxTooltipHarness.hostSelector
|
|
665
|
+
})
|
|
666
|
+
.addOption('text', options.text, async (harness, text) => (await harness.getTooltipText()) === text);
|
|
667
|
+
}
|
|
668
|
+
static withHostSelector(hostSelector) {
|
|
669
|
+
return OcxTooltipHarness.with({ hostSelector });
|
|
670
|
+
}
|
|
671
|
+
async hover() {
|
|
672
|
+
const host = await this.host();
|
|
673
|
+
await host.dispatchEvent('mouseenter');
|
|
674
|
+
}
|
|
675
|
+
async unhover() {
|
|
676
|
+
const host = await this.host();
|
|
677
|
+
await host.dispatchEvent('mouseleave');
|
|
678
|
+
}
|
|
679
|
+
async getTooltipText() {
|
|
680
|
+
const tooltip = await this.documentRootLocatorFactory()
|
|
681
|
+
.locatorForOptional('.p-tooltip-text')();
|
|
682
|
+
return tooltip ? await tooltip.text() : null;
|
|
683
|
+
}
|
|
684
|
+
async getTooltipId() {
|
|
685
|
+
const tooltip = await this.documentRootLocatorFactory()
|
|
686
|
+
.locatorForOptional('.p-tooltip')();
|
|
687
|
+
return tooltip ? await tooltip.getAttribute('id') : null;
|
|
688
|
+
}
|
|
689
|
+
async isVisible() {
|
|
690
|
+
const tooltip = await this.documentRootLocatorFactory()
|
|
691
|
+
.locatorForOptional('.p-tooltip')();
|
|
692
|
+
return !!tooltip;
|
|
552
693
|
}
|
|
553
694
|
}
|
|
554
695
|
|
|
@@ -624,5 +765,5 @@ ensureOriginMockExists();
|
|
|
624
765
|
* Generated bundle index. Do not edit.
|
|
625
766
|
*/
|
|
626
767
|
|
|
627
|
-
export { ColumnGroupSelectionHarness, CustomGroupColumnSelectorHarness, DataLayoutSelectionHarness, DataListGridHarness, DataTableHarness, DataViewHarness, DefaultGridItemHarness, DefaultListItemHarness, DiagramHarness, DialogContentHarness, DialogFooterHarness, DialogInlineHarness, DialogMessageContentHarness, FilterViewHarness, GroupByCountDiagramHarness, InteractiveDataViewHarness, LifecycleHarness, MoreActionsMenuButtonHarness, OcxContentContainerHarness, OcxContentHarness, PageHeaderHarness, SearchHeaderHarness, SlotHarness };
|
|
768
|
+
export { ColumnGroupSelectionHarness, CustomGroupColumnSelectorHarness, DataLayoutSelectionHarness, DataListGridHarness, DataTableHarness, DataViewHarness, DefaultGridItemHarness, DefaultListItemHarness, DiagramHarness, DialogContentHarness, DialogFooterHarness, DialogInlineHarness, DialogMessageContentHarness, FilterViewHarness, GroupByCountDiagramHarness, InteractiveDataViewHarness, LifecycleHarness, MoreActionsMenuButtonHarness, OcxConsentHarness, OcxContentContainerHarness, OcxContentHarness, OcxSrcHarness, OcxTooltipHarness, PageHeaderHarness, SearchHeaderHarness, SlotHarness };
|
|
628
769
|
//# sourceMappingURL=onecx-angular-accelerator-testing.mjs.map
|