@luigi-project/core-modular 0.0.10-dev.202606250110 → 0.0.10-dev.202606270109

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/types/ux.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Public UX-related types: alert and confirmation modal settings, plus the handlers
3
+ * a connector receives when rendering them.
4
+ */
5
+ export interface AlertSettings {
6
+ closeAfter?: number;
7
+ id?: string;
8
+ links?: Record<string, Link>;
9
+ text?: string;
10
+ ttl?: number;
11
+ type?: string;
12
+ }
13
+ export interface Link {
14
+ elemId: string;
15
+ url?: string;
16
+ dismissKey?: string;
17
+ }
18
+ /**
19
+ * Imperative alert surface a connector receives when rendering an alert. The connector
20
+ * invokes `close()` when the user dismisses the alert and `link(linkKey)` when a link
21
+ * inside the alert is activated.
22
+ */
23
+ export interface AlertHandler {
24
+ openFromClient: boolean;
25
+ close(): void;
26
+ link(linkKey: string): boolean;
27
+ }
28
+ export interface ConfirmationModalSettings {
29
+ icon?: string;
30
+ type?: string;
31
+ header?: string;
32
+ body?: string;
33
+ buttonConfirm?: string;
34
+ buttonDismiss?: string;
35
+ }
36
+ /**
37
+ * Imperative confirmation-modal surface a connector receives when rendering the modal.
38
+ * The connector invokes `confirm()` or `dismiss()` based on the user's choice.
39
+ */
40
+ export interface ConfirmationModalHandler {
41
+ confirm(): void;
42
+ dismiss(): void;
43
+ }
@@ -1,4 +1,4 @@
1
- import { GlobalSearchProvider, SearchResultItem } from '../../core-api/global-search';
1
+ import { GlobalSearchProvider, SearchResultItem } from '../../types/global-search';
2
2
  import { Luigi } from '../../core-api/luigi';
3
3
  export declare const GlobalSearchHelpers: {
4
4
  handleSearchResultRenderer(searchProvider: GlobalSearchProvider, searchResultItems: SearchResultItem[], rendererSlot: any): void;