@onecx/angular-accelerator 7.6.0 → 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 CHANGED
@@ -1,7 +1,18 @@
1
- # angular-accelerator
1
+ # @onecx/angular-accelerator
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
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
- ## Running unit tests
6
+ ## Installation
6
7
 
7
- Run `nx test angular-accelerator` to execute the unit tests.
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.
@@ -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": "{{direction}} sortieren"
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,11 +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
93
  "FILTER_NO": "Nein",
82
- "COLLAPSED_ROW": "Eingeklappte Zeile",
83
- "EXPANDED_ROW": "Ausgeklappte Zeile"
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"
84
98
  },
85
99
  "OCX_DATA_LIST_GRID": {
86
100
  "SEARCH_RESULTS_FOUND": "{{results}} Ergebnisse gefunden",
@@ -95,6 +109,9 @@
95
109
  "MORE_ACTIONS_TOOLTIP": "Weitere Aktionen anzeigen"
96
110
  },
97
111
  "OCX_DATA_LAYOUT_SELECTION": {
112
+ "SELECT_BUTTON": {
113
+ "ARIA_LABEL": "Layout auswählen"
114
+ },
98
115
  "LAYOUT": {
99
116
  "LIST": "Liste",
100
117
  "GRID": "Raster",
@@ -117,7 +134,9 @@
117
134
  "MANAGE_FILTERS_BUTTON": {
118
135
  "LABEL": "Filter",
119
136
  "ARIA_LABEL": "Aktive Filter verwalten",
120
- "DETAIL": "Aktive Filter verwalten"
137
+ "DETAIL": "Aktive Filter verwalten",
138
+ "DISABLED_DETAIL": "Keine aktiven Filter zum Verwalten"
139
+
121
140
  },
122
141
  "TABLE": {
123
142
  "COLUMN_NAME": "Spaltenname",
@@ -153,20 +172,37 @@
153
172
  "ARIA_LABEL": "Suche starten",
154
173
  "DETAIL": "Suche starten"
155
174
  },
156
- "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
+ }
157
184
  },
158
185
  "OCX_PAGE_HEADER": {
159
186
  "IMAGE": "Seitentitelbild",
160
187
  "SUBHEADER": "Seiteninhalt",
161
188
  "MORE_ACTIONS": "Weitere Aktionen",
162
189
  "HOME_DEFAULT_ARIA_LABEL": "Zur Startseite navigieren",
163
- "HOME_ARIA_LABEL": "Zu {{page}} navigieren"
190
+ "HOME_ARIA_LABEL": "Zu {{page}} navigieren",
191
+ "BREADCRUMB_ARIA_LABEL": "Zu {{breadcrumb}} navigieren"
164
192
  },
165
193
  "OCX_DIAGRAM": {
166
- "ARIA_LABEL": "Diagramm: Gesamtanzahl: {{total}}. {{valueString}}.",
194
+ "ARIA_LABEL": "Diagramm Zusammenfassung: Gesamtanzahl: {{total}}. {{valueString}}.",
167
195
  "EMPTY_ARIA_LABEL": "Diagramm ohne Daten",
168
196
  "SUM": "Gesamtanzahl",
169
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
+ },
170
206
  "SWITCH_DIAGRAM_TYPE": {
171
207
  "PIE": "Zu Tortendiagramm wechseln",
172
208
  "HORIZONTAL_BAR": "Zu horizontalem Balkendiagramm wechseln",
@@ -189,5 +225,9 @@
189
225
  "OCX_DATA_LOADING_ERROR": {
190
226
  "TITLE": "Die Daten konnten nicht geladen werden.",
191
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"
192
232
  }
193
233
  }
@@ -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 {{direction}}"
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,11 +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
93
  "FILTER_NO": "No",
82
- "COLLAPSED_ROW": "Collapsed row",
83
- "EXPANDED_ROW": "Expanded row"
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"
84
98
  },
85
99
  "OCX_DATA_LIST_GRID": {
86
100
  "SEARCH_RESULTS_FOUND": "{{results}} Results Found",
@@ -95,6 +109,9 @@
95
109
  "MORE_ACTIONS_TOOLTIP": "Display more actions"
96
110
  },
97
111
  "OCX_DATA_LAYOUT_SELECTION": {
112
+ "SELECT_BUTTON": {
113
+ "ARIA_LABEL": "Select layout"
114
+ },
98
115
  "LAYOUT": {
99
116
  "LIST": "List",
100
117
  "GRID": "Grid",
@@ -117,7 +134,8 @@
117
134
  "MANAGE_FILTERS_BUTTON": {
118
135
  "LABEL": "Filters",
119
136
  "ARIA_LABEL": "Manage active filters",
120
- "DETAIL": "Manage active filters"
137
+ "DETAIL": "Manage active filters",
138
+ "DISABLED_DETAIL": "No active filters to manage"
121
139
  },
122
140
  "TABLE": {
123
141
  "COLUMN_NAME": "Column name",
@@ -153,20 +171,37 @@
153
171
  "ARIA_LABEL": "Start search",
154
172
  "DETAIL": "Start search"
155
173
  },
156
- "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
+ }
157
183
  },
158
184
  "OCX_PAGE_HEADER": {
159
185
  "IMAGE": "Page title logo",
160
186
  "SUBHEADER": "Page Content",
161
187
  "MORE_ACTIONS": "More actions",
162
188
  "HOME_DEFAULT_ARIA_LABEL": "Go to home page",
163
- "HOME_ARIA_LABEL": "Go to {{page}} home page"
189
+ "HOME_ARIA_LABEL": "Go to home page",
190
+ "BREADCRUMB_ARIA_LABEL": "Go to {{breadcrumb}} page"
164
191
  },
165
192
  "OCX_DIAGRAM": {
166
- "ARIA_LABEL": "Chart: Total amount: {{total}}. {{valueString}}.",
193
+ "ARIA_LABEL": "Chart Summary: Total amount: {{total}}. {{valueString}}.",
167
194
  "EMPTY_ARIA_LABEL": "Chart with no data",
168
195
  "SUM": "Total",
169
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
+ },
170
205
  "SWITCH_DIAGRAM_TYPE": {
171
206
  "PIE": "Switch to pie chart",
172
207
  "HORIZONTAL_BAR": "Switch to horizontal bar chart",
@@ -189,5 +224,9 @@
189
224
  "OCX_DATA_LOADING_ERROR": {
190
225
  "TITLE": "The data could not be loaded.",
191
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"
192
231
  }
193
232
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "OCX_DATA_TABLE_CAPTION": {
3
+ "TITLE": "Produkte",
4
+ "DESCRIPTION": "Beschreibung der Tabelle"
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "OCX_DATA_TABLE_CAPTION": {
3
+ "TITLE": "Products",
4
+ "DESCRIPTION": "Description of the table"
5
+ }
6
+ }
@@ -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
  }
@@ -1,4 +1,4 @@
1
- import { PSelectHarness, DivHarness, PHarness, PButtonHarness, PDialogHarness, PPicklistHarness, PToggleButtonHarness, MenuItemHarness, ButtonHarness, waitForDeferredViewsToBeRendered, PPaginatorHarness, PMenuHarness, TableHeaderColumnHarness, TableRowHarness, PTableCheckboxHarness, PChartHarness, PSelectButtonHarness, PChipHarness, SpanHarness, PBreadcrumbHarness, ContentContainerComponentHarness as ContentContainerComponentHarness$1, PButtonDirectiveHarness, ensureIntersectionObserverMockExists, ensureOriginMockExists } from '@onecx/angular-testing';
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() {
@@ -553,6 +580,8 @@ class SearchHeaderHarness extends ComponentHarness {
553
580
  id: 'simpleAdvancedButton',
554
581
  }));
555
582
  this.getMoreActionsMenuButton = this.locatorForOptional(MoreActionsMenuButtonHarness);
583
+ this.getBasicContent = this.locatorForOptional('#basic-content');
584
+ this.getAdvancedContent = this.locatorForOptional('#advanced-content');
556
585
  }
557
586
  static { this.hostSelector = 'ocx-search-header'; }
558
587
  async clickResetButton() {
@@ -566,11 +595,104 @@ class SearchHeaderHarness extends ComponentHarness {
566
595
  await (await this.getSimpleAdvancedButton())?.click();
567
596
  }
568
597
  else {
569
- console.warn('No SimpleAdvancedButton is being displayed to toggle, because no advanced form field is defined.');
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;
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();
570
620
  }
571
621
  }
572
622
  }
573
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;
693
+ }
694
+ }
695
+
574
696
  class DialogMessageContentHarness extends ComponentHarness {
575
697
  constructor() {
576
698
  super(...arguments);
@@ -636,48 +758,6 @@ class DialogInlineHarness extends ContentContainerComponentHarness$1 {
636
758
  static { this.hostSelector = 'ocx-dialog-inline'; }
637
759
  }
638
760
 
639
- class OcxTooltipHarness extends ComponentHarness {
640
- static { this.defaultHostSelector = '.ocx-tooltip-host'; }
641
- static { this.configuredHostSelector = OcxTooltipHarness.defaultHostSelector; }
642
- static get hostSelector() {
643
- return OcxTooltipHarness.configuredHostSelector;
644
- }
645
- static with(options = {}) {
646
- const { hostSelector, selector, ...rest } = options;
647
- return new HarnessPredicate(OcxTooltipHarness, {
648
- ...rest,
649
- selector: hostSelector ?? selector ?? OcxTooltipHarness.hostSelector
650
- })
651
- .addOption('text', options.text, async (harness, text) => (await harness.getTooltipText()) === text);
652
- }
653
- static withHostSelector(hostSelector) {
654
- return OcxTooltipHarness.with({ hostSelector });
655
- }
656
- async hover() {
657
- const host = await this.host();
658
- await host.dispatchEvent('mouseenter');
659
- }
660
- async unhover() {
661
- const host = await this.host();
662
- await host.dispatchEvent('mouseleave');
663
- }
664
- async getTooltipText() {
665
- const tooltip = await this.documentRootLocatorFactory()
666
- .locatorForOptional('.p-tooltip-text')();
667
- return tooltip ? await tooltip.text() : null;
668
- }
669
- async getTooltipId() {
670
- const tooltip = await this.documentRootLocatorFactory()
671
- .locatorForOptional('.p-tooltip')();
672
- return tooltip ? await tooltip.getAttribute('id') : null;
673
- }
674
- async isVisible() {
675
- const tooltip = await this.documentRootLocatorFactory()
676
- .locatorForOptional('.p-tooltip')();
677
- return !!tooltip;
678
- }
679
- }
680
-
681
761
  ensureIntersectionObserverMockExists();
682
762
  ensureOriginMockExists();
683
763
 
@@ -685,5 +765,5 @@ ensureOriginMockExists();
685
765
  * Generated bundle index. Do not edit.
686
766
  */
687
767
 
688
- export { ColumnGroupSelectionHarness, CustomGroupColumnSelectorHarness, DataLayoutSelectionHarness, DataListGridHarness, DataTableHarness, DataViewHarness, DefaultGridItemHarness, DefaultListItemHarness, DiagramHarness, DialogContentHarness, DialogFooterHarness, DialogInlineHarness, DialogMessageContentHarness, FilterViewHarness, GroupByCountDiagramHarness, InteractiveDataViewHarness, LifecycleHarness, MoreActionsMenuButtonHarness, OcxContentContainerHarness, OcxContentHarness, OcxTooltipHarness, 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 };
689
769
  //# sourceMappingURL=onecx-angular-accelerator-testing.mjs.map