@zealicsolutions/web-ui 1.1.99 → 1.1.100
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/cjs/contexts/ContainerRuntimeContext/types.d.ts +4 -0
- package/dist/cjs/contexts/WebpageContext/WebpageContext.d.ts +15 -1
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js.map +1 -1
- package/dist/esm/containers/hooks/useEmptyStateFiltering.js +1 -1
- package/dist/esm/containers/hooks/useEmptyStateFiltering.js.map +1 -1
- package/dist/esm/contexts/ContainerRuntimeContext/ContainerRuntimeContext.js +1 -1
- package/dist/esm/contexts/ContainerRuntimeContext/ContainerRuntimeContext.js.map +1 -1
- package/dist/esm/contexts/ContainerRuntimeContext/types.d.ts +4 -0
- package/dist/esm/contexts/WebpageContext/WebpageContext.d.ts +15 -1
- package/dist/esm/contexts/WebpageContext/WebpageContext.js.map +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContextProvider.js +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContextProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,10 @@ export type ContainerRuntimeContextValue = {
|
|
|
15
15
|
activeVariant?: string | null;
|
|
16
16
|
/** Loading state for this container scope */
|
|
17
17
|
isLoading?: boolean;
|
|
18
|
+
/** Background refetch state for this container scope */
|
|
19
|
+
isRefetching?: boolean;
|
|
20
|
+
/** True when rendering a stale snapshot while fresh data is loading */
|
|
21
|
+
isTransitioning?: boolean;
|
|
18
22
|
/** Points to specific query result from webpage context (data layer source) */
|
|
19
23
|
sourceDataPointerId?: string;
|
|
20
24
|
};
|
|
@@ -6,12 +6,24 @@
|
|
|
6
6
|
export interface QueryResult {
|
|
7
7
|
/** Query chain result data (single record or array) */
|
|
8
8
|
data: unknown[] | unknown;
|
|
9
|
+
/** Optional UI-safe data used while new params are loading */
|
|
10
|
+
displayData?: unknown[] | unknown;
|
|
9
11
|
/** Query chain type - single_record or multi_record */
|
|
10
|
-
type: 'single_record' | 'multi_record';
|
|
12
|
+
type: 'single_record' | 'multi_record' | 'capability_method';
|
|
11
13
|
/** Loading state per query chain */
|
|
12
14
|
isLoading: boolean;
|
|
15
|
+
/** Background refetch state for the exact current params */
|
|
16
|
+
isRefetching?: boolean;
|
|
17
|
+
/** Showing previous display data while the new params are still loading */
|
|
18
|
+
isTransitioning?: boolean;
|
|
19
|
+
/** Exact data for the current params exists */
|
|
20
|
+
hasData?: boolean;
|
|
21
|
+
/** Any renderable data exists */
|
|
22
|
+
hasDisplayData?: boolean;
|
|
13
23
|
/** Error state per query chain */
|
|
14
24
|
error: Error | null;
|
|
25
|
+
/** Timestamp of the last successful fetch */
|
|
26
|
+
lastFetched?: number;
|
|
15
27
|
}
|
|
16
28
|
export type RwoContextType = {
|
|
17
29
|
/** The current RWO record ID (from URL) */
|
|
@@ -129,5 +141,7 @@ export type WebpageContextType = {
|
|
|
129
141
|
* True if any single_record query chain is loading
|
|
130
142
|
*/
|
|
131
143
|
isSingleRecordLoading?: boolean;
|
|
144
|
+
/** Aggregated refetch/transition state for webpage query chains */
|
|
145
|
+
isRefetching?: boolean;
|
|
132
146
|
} & Record<string, unknown>;
|
|
133
147
|
export declare const WebpageContext: React.Context<WebpageContextType | undefined>;
|