@spteck/react-controls-v2 2.6.1 → 2.6.2
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/LocalizationProvider-BUBYkX-c.cjs +2 -0
- package/dist/{LocalizationProvider-D13keh6K.js → LocalizationProvider-DZ7gAJ1G.js} +205 -23
- package/dist/abstractions/index.d.ts +1 -0
- package/dist/components/BackgroundVideo/BackgroundVideo.d.ts +25 -0
- package/dist/components/BackgroundVideo/IBackgroundVideoProps.d.ts +9 -0
- package/dist/components/BackgroundVideo/index.d.ts +3 -0
- package/dist/components/Dropzone/mime-types.d.ts +1 -1
- package/dist/components/Hero/Hero.d.ts +7 -0
- package/dist/components/Hero/HeroItem.d.ts +13 -0
- package/dist/components/Hero/HeroOverlay.d.ts +10 -0
- package/dist/components/Hero/IHeroProps.d.ts +106 -0
- package/dist/components/Hero/index.d.ts +3 -0
- package/dist/components/Hero/layouts/HeroCarousel.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroFeatured.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroFilmstrip.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroFullscreen.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroGrid.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroMosaic.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroSplit.d.ts +4 -0
- package/dist/components/Hero/useHeroLayout.d.ts +12 -0
- package/dist/components/Hero/useHeroStyles.d.ts +26 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/stackv2/IStackV2Props.d.ts +9 -1
- package/dist/components/videoPlayer/VideoPlayer.d.ts +2 -2
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useAIAssistant.d.ts +3 -24
- package/dist/hooks/useAIAssistantParser.d.ts +3 -29
- package/dist/hooks/useAppToast.d.ts +4 -24
- package/dist/hooks/useBrandCenterFonts.d.ts +2 -30
- package/dist/hooks/useExportData.d.ts +25 -0
- package/dist/hooks/useFluentEmoji.d.ts +3 -7
- package/dist/hooks/useGraphAPI.d.ts +3 -19
- package/dist/hooks/useHeroRotation.d.ts +18 -0
- package/dist/hooks/useIndexedDB.d.ts +4 -11
- package/dist/hooks/useLocalizationStrings.d.ts +2 -12
- package/dist/hooks/useLogging.d.ts +3 -10
- package/dist/hooks/usePolling.d.ts +3 -5
- package/dist/hooks/useTimeZoneHelper.d.ts +3 -12
- package/dist/index.cjs +63 -56
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4773 -3994
- package/dist/models/IExportData.d.ts +75 -0
- package/dist/models/IUseAIAssistant.d.ts +48 -0
- package/dist/models/IUseAIAssistantParser.d.ts +28 -0
- package/dist/models/IUseAppToast.d.ts +81 -0
- package/dist/models/IUseBrandCenterFonts.d.ts +30 -0
- package/dist/models/IUseFluentEmoji.d.ts +25 -0
- package/dist/models/IUseGraphAPI.d.ts +39 -0
- package/dist/models/IUseHeroRotation.d.ts +11 -0
- package/dist/models/IUseIndexedDB.d.ts +31 -0
- package/dist/models/IUseLocalizationStrings.d.ts +17 -0
- package/dist/models/IUseLogging.d.ts +40 -0
- package/dist/models/IUsePolling.d.ts +9 -0
- package/dist/models/IUseTimeZoneHelper.d.ts +50 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/providers.cjs +1 -2
- package/dist/providers.js +2 -189
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/useExportDataUtils.d.ts +23 -0
- package/package.json +5 -2
- package/dist/LocalizationProvider-DEmAXWvz.cjs +0 -2
- package/dist/components/Stack/IStackProps.d.ts +0 -12
- package/dist/components/Stack/Stack.d.ts +0 -4
- package/dist/components/Stack/StackItem.d.ts +0 -12
- package/dist/components/Stack/index.d.ts +0 -5
- package/dist/components/Stack/useStackStyles.d.ts +0 -6
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './AspectRatio';
|
|
2
|
+
export * from './BackgroundImage';
|
|
3
|
+
export * from './BackgroundVideo';
|
|
2
4
|
export * from './Card';
|
|
3
5
|
export * from './Carousel';
|
|
4
6
|
export * from './Center';
|
|
@@ -14,7 +16,6 @@ export * from './Provider';
|
|
|
14
16
|
export * from './RenderLabel';
|
|
15
17
|
export * from './RenderSpninner';
|
|
16
18
|
export * from './Space';
|
|
17
|
-
export * from './Stack';
|
|
18
19
|
export * from './adaptiveCardHost';
|
|
19
20
|
export * from './aiAssistant';
|
|
20
21
|
export * from './breadcrumb';
|
|
@@ -54,4 +55,5 @@ export * from './KPIControl';
|
|
|
54
55
|
export * from './SplitPane';
|
|
55
56
|
export * from './MermaidDiagram';
|
|
56
57
|
export * from './fluentUIProvider';
|
|
58
|
+
export * from './Hero';
|
|
57
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -61,7 +61,7 @@ export interface IStackV2Props {
|
|
|
61
61
|
/**
|
|
62
62
|
* Child components to be rendered inside the stack.
|
|
63
63
|
*/
|
|
64
|
-
children
|
|
64
|
+
children?: React.ReactNode;
|
|
65
65
|
/**
|
|
66
66
|
* Additional inline styles.
|
|
67
67
|
*/
|
|
@@ -73,5 +73,13 @@ export interface IStackV2Props {
|
|
|
73
73
|
overflow?: React.CSSProperties["overflow"];
|
|
74
74
|
/** background Color */
|
|
75
75
|
background?: React.CSSProperties["backgroundColor"];
|
|
76
|
+
/** HTML id attribute */
|
|
77
|
+
id?: string;
|
|
78
|
+
/** ARIA role */
|
|
79
|
+
role?: React.AriaRole;
|
|
80
|
+
/** ARIA label */
|
|
81
|
+
'aria-label'?: string;
|
|
82
|
+
/** ARIA hidden */
|
|
83
|
+
'aria-hidden'?: boolean | 'true' | 'false';
|
|
76
84
|
}
|
|
77
85
|
//# sourceMappingURL=IStackV2Props.d.ts.map
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './useLogging';
|
|
|
2
2
|
export * from './useGraphAPI';
|
|
3
3
|
export * from './useIndexedDB';
|
|
4
4
|
export * from './usePolling';
|
|
5
|
+
export * from './useHeroRotation';
|
|
5
6
|
export * from './useTimeZoneHelper';
|
|
6
7
|
export * from './useAIAssistantParser';
|
|
7
8
|
export * from './useAIAssistant';
|
|
@@ -9,4 +10,5 @@ export * from './useLocalizationStrings';
|
|
|
9
10
|
export * from './useBrandCenterFonts';
|
|
10
11
|
export * from './useFluentEmoji';
|
|
11
12
|
export * from './useAppToast';
|
|
13
|
+
export * from './useExportData';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
mcpServers?: Record<string, any>;
|
|
4
|
-
conversationId?: string;
|
|
5
|
-
requestHeaders?: Record<string, string>;
|
|
6
|
-
}
|
|
7
|
-
export interface AIAssistantMessage {
|
|
8
|
-
instructions?: string;
|
|
9
|
-
input: string;
|
|
10
|
-
timezone?: string;
|
|
11
|
-
locale?: string;
|
|
12
|
-
history?: string[];
|
|
13
|
-
mcpServers?: Record<string, any>;
|
|
14
|
-
}
|
|
15
|
-
export interface UseAIAssistantResult {
|
|
16
|
-
response: string;
|
|
17
|
-
isLoading: boolean;
|
|
18
|
-
error: string | null;
|
|
19
|
-
sendMessage: (message: AIAssistantMessage, onProgress?: (text: string) => void) => Promise<string>;
|
|
20
|
-
cancelRequest: () => void;
|
|
21
|
-
resetConversation: () => void;
|
|
22
|
-
conversationId: string;
|
|
23
|
-
}
|
|
1
|
+
import { AIAssistantConfig, IUseAIAssistantReturn } from '../models/IUseAIAssistant';
|
|
2
|
+
export type { AIAssistantConfig, AIAssistantMessage, IUseAIAssistantReturn, UseAIAssistantResult } from '../models/IUseAIAssistant';
|
|
24
3
|
/**
|
|
25
4
|
* Custom hook for interacting with AI Assistant API with SSE streaming support
|
|
26
5
|
*
|
|
@@ -47,5 +26,5 @@ export interface UseAIAssistantResult {
|
|
|
47
26
|
* };
|
|
48
27
|
* ```
|
|
49
28
|
*/
|
|
50
|
-
export declare const useAIAssistant: (config: AIAssistantConfig) =>
|
|
29
|
+
export declare const useAIAssistant: (config: AIAssistantConfig) => IUseAIAssistantReturn;
|
|
51
30
|
//# sourceMappingURL=useAIAssistant.d.ts.map
|
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
export interface ParsedAIResponse<T = unknown> {
|
|
5
|
-
/** Parsed JSON data (typed as unknown for flexibility) */
|
|
6
|
-
data: T | undefined;
|
|
7
|
-
/** Raw text content extracted from SSE */
|
|
8
|
-
rawText: string;
|
|
9
|
-
/** Indicates if the response is valid JSON */
|
|
10
|
-
isJson: boolean;
|
|
11
|
-
/** Error message if parsing failed */
|
|
12
|
-
error?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Configuration options for the parser
|
|
16
|
-
*/
|
|
17
|
-
export interface ParserOptions {
|
|
18
|
-
/** Whether to remove markdown code blocks (default: true) */
|
|
19
|
-
stripMarkdown?: boolean;
|
|
20
|
-
/** Whether to log debug information (default: false) */
|
|
21
|
-
debug?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Return type for the useAIAssistantParser hook
|
|
25
|
-
*/
|
|
26
|
-
export interface UseAIAssistantParserReturn {
|
|
27
|
-
parseSSEResponse: <T = unknown>(rawResponse: string, options?: ParserOptions) => ParsedAIResponse<T>;
|
|
28
|
-
}
|
|
1
|
+
import { IUseAIAssistantParserReturn } from '../models/IUseAIAssistantParser';
|
|
2
|
+
export type { ParsedAIResponse, ParserOptions, IUseAIAssistantParserReturn, UseAIAssistantParserReturn } from '../models/IUseAIAssistantParser';
|
|
29
3
|
/**
|
|
30
4
|
* Custom hook for parsing Server-Sent Events (SSE) responses from AI Assistant API
|
|
31
5
|
*
|
|
@@ -41,5 +15,5 @@ export interface UseAIAssistantParserReturn {
|
|
|
41
15
|
*
|
|
42
16
|
* @returns Object containing parseSSEResponse function
|
|
43
17
|
*/
|
|
44
|
-
export declare const useAIAssistantParser: () =>
|
|
18
|
+
export declare const useAIAssistantParser: () => IUseAIAssistantParserReturn;
|
|
45
19
|
//# sourceMappingURL=useAIAssistantParser.d.ts.map
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
export declare const toasterId = "app-toaster";
|
|
5
|
-
export interface IAppToasterConfig {
|
|
6
|
-
toasterId?: string;
|
|
7
|
-
position?: "top-start" | "top" | "top-end" | "bottom-start" | "bottom" | "bottom-end";
|
|
8
|
-
dir?: "ltr" | "rtl";
|
|
9
|
-
pauseOnHover?: boolean;
|
|
10
|
-
pauseOnWindowBlur?: boolean;
|
|
11
|
-
}
|
|
1
|
+
import { IAppToasterConfig, IUseAppToastReturn } from '../models/IUseAppToast';
|
|
2
|
+
export type { IAppToasterConfig, IUseAppToastReturn } from '../models/IUseAppToast';
|
|
12
3
|
/**
|
|
13
4
|
* Consolidated toast hook that provides both toast functionality and the ToasterProvider component.
|
|
14
5
|
* This follows React best practices by consolidating all toast-related logic in one place.
|
|
@@ -31,17 +22,6 @@ export interface IAppToasterConfig {
|
|
|
31
22
|
* );
|
|
32
23
|
* ```
|
|
33
24
|
*/
|
|
34
|
-
export declare const
|
|
35
|
-
|
|
36
|
-
showSuccessToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
|
|
37
|
-
showErrorToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
|
|
38
|
-
showWarningToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
|
|
39
|
-
showInfoToast: (title: string | React.ReactNode, body?: string | React.ReactNode, options?: Omit<IToastOptions, "intent">) => string;
|
|
40
|
-
dismissToast: (toastId: string) => void;
|
|
41
|
-
dismissAllToasts: () => void;
|
|
42
|
-
updateToast: (toastId: string, content: Partial<IToastContent>, options?: Partial<IToastOptions>) => void;
|
|
43
|
-
playToast: (toastId: string) => void;
|
|
44
|
-
pauseToast: (toastId: string) => void;
|
|
45
|
-
ToasterProvider: React.ComponentType;
|
|
46
|
-
};
|
|
25
|
+
export declare const toasterId = "app-toaster";
|
|
26
|
+
export declare const useAppToast: (config?: IAppToasterConfig) => IUseAppToastReturn;
|
|
47
27
|
//# sourceMappingURL=useAppToast.d.ts.map
|
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface IUseBrandCenterFontsOptions {
|
|
4
|
-
/** SharePoint site URL (e.g. "https://contoso.sharepoint.com/sites/brand").
|
|
5
|
-
* When omitted the hook reads it from `pageContext.web.absoluteUrl`. */
|
|
6
|
-
siteUrl?: string;
|
|
7
|
-
/** If true the hook will NOT fetch from Brand Center;
|
|
8
|
-
* use `fonts` to supply a static list instead. */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
/** Provide brand fonts directly instead of fetching from the API.
|
|
11
|
-
* Useful for testing or when fonts are already available. */
|
|
12
|
-
fonts?: IBrandCenterFont[];
|
|
13
|
-
}
|
|
14
|
-
/** Return value of useBrandCenterFonts */
|
|
15
|
-
export interface IUseBrandCenterFontsReturn {
|
|
16
|
-
/** Available Brand Center fonts (or Fluent UI defaults if Brand Center is not configured) */
|
|
17
|
-
fonts: IBrandCenterFont[];
|
|
18
|
-
/** Font family names ready for CSS / TypographyControl.fontFamily */
|
|
19
|
-
fontFamilyNames: string[];
|
|
20
|
-
/** The organization's default font (if any) */
|
|
21
|
-
defaultFont: IBrandCenterFont | undefined;
|
|
22
|
-
/** Whether data is currently being fetched */
|
|
23
|
-
loading: boolean;
|
|
24
|
-
/** Error message, if the fetch failed */
|
|
25
|
-
error: string | undefined;
|
|
26
|
-
/** Whether Brand Center fonts are configured for this tenant */
|
|
27
|
-
isBrandCenterAvailable: boolean;
|
|
28
|
-
/** Re-fetch fonts from the API */
|
|
29
|
-
refresh: () => Promise<void>;
|
|
30
|
-
}
|
|
1
|
+
import { IUseBrandCenterFontsOptions, IUseBrandCenterFontsReturn } from '../models/IUseBrandCenterFonts';
|
|
2
|
+
export type { IUseBrandCenterFontsOptions, IUseBrandCenterFontsReturn } from '../models/IUseBrandCenterFonts';
|
|
31
3
|
/**
|
|
32
4
|
* React hook that loads fonts from the SharePoint Brand Center and
|
|
33
5
|
* injects `@font-face` rules so they can be used anywhere in the app
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IUseExportData } from '../models/IExportData';
|
|
2
|
+
export type { IExcelHeaderStyle, ExportDataFetcher, IExportExcelOptions, IExportJSONOptions, IExportCSVOptions, IUseExportData, } from '../models/IExportData';
|
|
3
|
+
/**
|
|
4
|
+
* Provides file download helpers for Excel (`.xlsx`), JSON, and CSV,
|
|
5
|
+
* with a built-in progress dialog that shows during async exports.
|
|
6
|
+
*
|
|
7
|
+
* Pass a static array for instant exports, or an {@link ExportDataFetcher}
|
|
8
|
+
* for paginated async sources — the dialog will track progress automatically.
|
|
9
|
+
*
|
|
10
|
+
* Mount `ProgressDialog` once in your component tree:
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const { exportToExcel, exportToJSON, exportToCSV, ProgressDialog } = useExportData();
|
|
13
|
+
*
|
|
14
|
+
* return (
|
|
15
|
+
* <>
|
|
16
|
+
* <Button onClick={() => exportToExcel(fetcher, { fileName: 'report', includeMetaSheet: true })}>
|
|
17
|
+
* Export to Excel
|
|
18
|
+
* </Button>
|
|
19
|
+
* {ProgressDialog}
|
|
20
|
+
* </>
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const useExportData: () => IUseExportData;
|
|
25
|
+
//# sourceMappingURL=useExportData.d.ts.map
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
getEmoji: (reactionType: string, style?: TeamsReactionImageStyle) => string | undefined;
|
|
4
|
-
getAvailableEmojis: () => string[];
|
|
5
|
-
hasEmoji: (reactionType: string, style?: TeamsReactionImageStyle) => boolean;
|
|
6
|
-
}
|
|
1
|
+
import { IUseFluentEmojiReturn } from '../models/IUseFluentEmoji';
|
|
2
|
+
export type { TeamsReactionImageStyle, IUseFluentEmojiReturn, IUseFluentEmojiResult } from '../models/IUseFluentEmoji';
|
|
7
3
|
/**
|
|
8
4
|
* Resolves a Teams/Graph reactionType such as `yes`, `yes-tone2`, `heart`, or
|
|
9
5
|
* a raw Unicode emoji glyph to a Fluent emoji image URL.
|
|
10
6
|
*/
|
|
11
|
-
export declare const useFluentEmoji: () =>
|
|
7
|
+
export declare const useFluentEmoji: () => IUseFluentEmojiReturn;
|
|
12
8
|
//# sourceMappingURL=useFluentEmoji.d.ts.map
|
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUseGraphAPIReturn } from '../models/IUseGraphAPI';
|
|
2
|
+
export type { IUseGraphAPIReturn, IUserInfo } from '../models/IUseGraphAPI';
|
|
2
3
|
/**
|
|
3
4
|
* Hook for Microsoft Graph API operations
|
|
4
5
|
* Uses the graph client from the application context
|
|
5
6
|
*/
|
|
6
|
-
export declare const useGraphAPI: () =>
|
|
7
|
-
getUser: (userId: string) => Promise<User | null>;
|
|
8
|
-
getCurrentUser: () => Promise<User | null>;
|
|
9
|
-
searchUsers: (query: string, top?: number) => Promise<User[]>;
|
|
10
|
-
getUserPhoto: (userId: string) => Promise<string | null>;
|
|
11
|
-
graphClient: import('..').IGraphProvider | undefined;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* User information interface for convenience
|
|
15
|
-
*/
|
|
16
|
-
export interface IUserInfo {
|
|
17
|
-
displayName?: string;
|
|
18
|
-
email?: string;
|
|
19
|
-
jobTitle?: string;
|
|
20
|
-
officeLocation?: string;
|
|
21
|
-
mobilePhone?: string;
|
|
22
|
-
businessPhones?: string[];
|
|
23
|
-
}
|
|
7
|
+
export declare const useGraphAPI: () => IUseGraphAPIReturn;
|
|
24
8
|
//# sourceMappingURL=useGraphAPI.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IHeroItem, IHeroRotation } from '../components/Hero/IHeroProps';
|
|
2
|
+
export type { IUseHeroRotationOptions } from '../models/IUseHeroRotation';
|
|
3
|
+
/**
|
|
4
|
+
* Manages the visible item slice for rotating Hero layouts.
|
|
5
|
+
*
|
|
6
|
+
* @param items Full item pool provided by the consumer
|
|
7
|
+
* @param slots Number of items the layout shows at once
|
|
8
|
+
* (1 for fullscreen, 2 for split / featured)
|
|
9
|
+
* @param rotation Optional rotation config from `IHeroProps.rotation`
|
|
10
|
+
* @returns The slice of items to render right now
|
|
11
|
+
*
|
|
12
|
+
* Rotation only activates when `items.length > slots`.
|
|
13
|
+
* - `'interval'` mode: uses `usePolling` to advance the window by one position
|
|
14
|
+
* every `intervalMs` ms (default 5 000 ms).
|
|
15
|
+
* - `'refresh'` mode: picks a random starting index on mount and never changes it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useHeroRotation(items: IHeroItem[], slots: number, rotation?: IHeroRotation): IHeroItem[];
|
|
18
|
+
//# sourceMappingURL=useHeroRotation.d.ts.map
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import { IUseIndexedDBCacheReturn, IUseCachedDataReturn } from '../models/IUseIndexedDB';
|
|
2
|
+
export type { IUseIndexedDBCacheReturn, IUseCachedDataReturn } from '../models/IUseIndexedDB';
|
|
1
3
|
/**
|
|
2
4
|
* Hook for IndexedDB or generic storage operations
|
|
3
5
|
* Uses the storage provider from the application context
|
|
4
6
|
*/
|
|
5
|
-
export declare const useIndexedDBCache: <T = any>() =>
|
|
6
|
-
getCachedData: (key: string) => Promise<T | undefined>;
|
|
7
|
-
setCachedData: (key: string, value: T, expirationInMinutes?: number) => Promise<void>;
|
|
8
|
-
removeCachedData: (key: string) => Promise<void>;
|
|
9
|
-
clearCache: () => Promise<void>;
|
|
10
|
-
};
|
|
7
|
+
export declare const useIndexedDBCache: <T = any>() => IUseIndexedDBCacheReturn<T>;
|
|
11
8
|
/**
|
|
12
9
|
* Hook for caching data with automatic retrieval and storage
|
|
13
10
|
*/
|
|
14
|
-
export declare const useCachedData: <T = any>(key: string, fetcher: () => Promise<T>, expirationInMinutes?: number) =>
|
|
15
|
-
data: T | undefined;
|
|
16
|
-
loading: boolean;
|
|
17
|
-
error: Error | undefined;
|
|
18
|
-
};
|
|
11
|
+
export declare const useCachedData: <T = any>(key: string, fetcher: () => Promise<T>, expirationInMinutes?: number) => IUseCachedDataReturn<T>;
|
|
19
12
|
//# sourceMappingURL=useIndexedDB.d.ts.map
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { ILibraryStrings } from '../localization/ILibraryStrings';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
provider: unknown;
|
|
5
|
-
/** All resolved strings for the current locale */
|
|
6
|
-
strings: ILibraryStrings;
|
|
7
|
-
/** Current locale code */
|
|
8
|
-
locale: string;
|
|
9
|
-
/** Whether the current locale is RTL */
|
|
10
|
-
isRtl: boolean;
|
|
11
|
-
/** Change the active locale (triggers async bundle loading) */
|
|
12
|
-
setLocale: (locale: string) => Promise<void>;
|
|
13
|
-
}
|
|
2
|
+
import { ILocalizationContext } from '../models/IUseLocalizationStrings';
|
|
3
|
+
export type { ILocalizationContext } from '../models/IUseLocalizationStrings';
|
|
14
4
|
export declare const LocalizationContext: import('react').Context<ILocalizationContext | undefined>;
|
|
15
5
|
/**
|
|
16
6
|
* Hook to access the full localization context
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUseLoggingReturn } from '../models/IUseLogging';
|
|
2
|
+
export type { IUseLoggingReturn } from '../models/IUseLogging';
|
|
2
3
|
/**
|
|
3
4
|
* Hook for logging operations
|
|
4
5
|
* Uses the logging provider from the application context
|
|
5
6
|
*
|
|
6
7
|
* @returns Logging functions
|
|
7
8
|
*/
|
|
8
|
-
export declare const useLogging: () =>
|
|
9
|
-
log: (message: string, level?: LogLevel, data?: any) => void;
|
|
10
|
-
error: (message: string, err?: Error, errorType?: ErrorType) => void;
|
|
11
|
-
warn: (message: string, data?: any) => void;
|
|
12
|
-
info: (message: string, data?: any) => void;
|
|
13
|
-
verbose: (message: string, data?: any) => void;
|
|
14
|
-
LogLevel: typeof LogLevel;
|
|
15
|
-
ErrorType: typeof ErrorType;
|
|
16
|
-
};
|
|
9
|
+
export declare const useLogging: () => IUseLoggingReturn;
|
|
17
10
|
//# sourceMappingURL=useLogging.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IUsePollingReturn } from '../models/IUsePolling';
|
|
2
|
+
export type { IUsePollingReturn } from '../models/IUsePolling';
|
|
1
3
|
/**
|
|
2
4
|
* Hook for polling data at regular intervals
|
|
3
5
|
*
|
|
@@ -5,9 +7,5 @@
|
|
|
5
7
|
* @param interval - Polling interval in milliseconds
|
|
6
8
|
* @param immediate - Whether to call immediately on mount
|
|
7
9
|
*/
|
|
8
|
-
export declare const usePolling: (callback: () => void | Promise<void>, interval: number, immediate?: boolean) =>
|
|
9
|
-
startPolling: () => void;
|
|
10
|
-
stopPolling: () => void;
|
|
11
|
-
isPolling: boolean;
|
|
12
|
-
};
|
|
10
|
+
export declare const usePolling: (callback: () => void | Promise<void>, interval: number, immediate?: boolean) => IUsePollingReturn;
|
|
13
11
|
//# sourceMappingURL=usePolling.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IUseTimeZoneHelperReturn } from '../models/IUseTimeZoneHelper';
|
|
2
|
+
export type { IUseTimeZoneHelperReturn } from '../models/IUseTimeZoneHelper';
|
|
1
3
|
/**
|
|
2
4
|
* Unified hook for timezone conversions and locale-aware date/time formatting.
|
|
3
5
|
*
|
|
@@ -9,16 +11,5 @@
|
|
|
9
11
|
* Falls back to the browser timezone when omitted.
|
|
10
12
|
* @param locale - Optional locale code (e.g. 'en-US'). Defaults to 'en-US'.
|
|
11
13
|
*/
|
|
12
|
-
export declare const useTimeZoneHelper: (timezone?: string, locale?: string) =>
|
|
13
|
-
timeZone: string;
|
|
14
|
-
convertToUserTimeZone: (date: Date, targetTimeZone?: string) => Date;
|
|
15
|
-
convertFromUserTimeZone: (date: Date, sourceTimeZone?: string) => Date;
|
|
16
|
-
formatInTimeZone: (date: Date, formatStr: string, targetTimeZone?: string) => string;
|
|
17
|
-
getUserTimeZone: () => string;
|
|
18
|
-
getFormatRelative: (date: Date | string) => string;
|
|
19
|
-
convertDateToUTC: (date: Date | string) => Date;
|
|
20
|
-
formatDate: (date: Date | string, formatString?: string) => string;
|
|
21
|
-
getTimezoneOffset: () => number;
|
|
22
|
-
convertToTimezone: (date: Date | string, tz?: string) => string;
|
|
23
|
-
};
|
|
14
|
+
export declare const useTimeZoneHelper: (timezone?: string, locale?: string) => IUseTimeZoneHelperReturn;
|
|
24
15
|
//# sourceMappingURL=useTimeZoneHelper.d.ts.map
|