react-semaphor 0.1.509 → 0.1.510
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/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BoXFrqq0.cjs → dashboard-briefing-launcher-CAHFThZ6.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-B5AQu-Vb.js → dashboard-briefing-launcher-CLZFm7_M.js} +3 -3
- package/dist/chunks/{dashboard-controls-CKKkSXEX.js → dashboard-controls-Cq0yJp7k.js} +4 -4
- package/dist/chunks/{dashboard-controls-gUVkQm8o.cjs → dashboard-controls-Yxsu_3w-.cjs} +1 -1
- package/dist/chunks/{dashboard-json-CAJJquVx.js → dashboard-json-B2v70qeb.js} +2 -2
- package/dist/chunks/{dashboard-json-B7fSi6_b.cjs → dashboard-json-Czr84uhZ.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DCnbqRRn.js → edit-dashboard-visual-BLWXCutZ.js} +725 -725
- package/dist/chunks/{edit-dashboard-visual-AZetLUv1.cjs → edit-dashboard-visual-C8ni6cKY.cjs} +2 -2
- package/dist/chunks/{editor-action-buttons-DDA5JGwO.js → editor-action-buttons-BiUk_CQn.js} +2 -2
- package/dist/chunks/{editor-action-buttons-CBQsVYdt.cjs → editor-action-buttons-DwMSyAJY.cjs} +1 -1
- package/dist/chunks/index-BriWG9wG.cjs +1420 -0
- package/dist/chunks/{index-CL2lvhwk.js → index-CTFwTeBb.js} +29361 -29250
- package/dist/chunks/{report-preferences-dialog-Wg9g9fIj.cjs → report-preferences-dialog-C1LOgCAH.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-Bv2VIOKc.js → report-preferences-dialog-CEja_Mat.js} +2 -2
- package/dist/chunks/{switch-iC1x2dcE.cjs → switch-BUW-Ky0G.cjs} +1 -1
- package/dist/chunks/{switch-CD4uGTZI.js → switch-MB0NuLq-.js} +25 -17
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +17 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +4 -0
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +3 -1
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +4 -1
- package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +14 -2
- package/dist/types/lib/stores/dashboard-store.d.ts +4 -0
- package/dist/types/lib/utils/card-loading-state.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/index-DkEAikW8.cjs +0 -1420
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-BriWG9wG.cjs"),r=require("../chunks/common-types-nBuCd3u2.cjs"),o=require("../chunks/report-preferences-dialog-C1LOgCAH.cjs");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as a, a as o } from "../chunks/index-
|
|
1
|
+
import { b as a, a as o } from "../chunks/index-CTFwTeBb.js";
|
|
2
2
|
import { C as f, E } from "../chunks/common-types-C6cAQgyh.js";
|
|
3
|
-
import { R as t } from "../chunks/report-preferences-dialog-
|
|
3
|
+
import { R as t } from "../chunks/report-preferences-dialog-CEja_Mat.js";
|
|
4
4
|
export {
|
|
5
5
|
f as CONTROL_CARD_DEFAULT_VALUE,
|
|
6
6
|
a as DisplayFormatPreferencesFields,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PaginationConfig } from '../types/explorer-types.js';
|
|
2
|
+
export type DashboardCardPaginationState = PaginationConfig & {
|
|
3
|
+
queryInputIdentity: string;
|
|
4
|
+
};
|
|
5
|
+
type ResolveDashboardCardPaginationParams = {
|
|
6
|
+
current?: DashboardCardPaginationState;
|
|
7
|
+
defaultPageSize: number;
|
|
8
|
+
queryInputIdentity: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Attaches a runtime page to the data-shaping query it belongs to. A changed
|
|
12
|
+
* query always starts on page one, while the viewer's chosen page size carries
|
|
13
|
+
* forward across filters, controls, selections, and sorts.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveDashboardCardPagination({ current, defaultPageSize, queryInputIdentity, }: ResolveDashboardCardPaginationParams): PaginationConfig;
|
|
16
|
+
export declare function dashboardCardPaginationMatches(current: DashboardCardPaginationState | undefined, pagination: PaginationConfig, queryInputIdentity: string): boolean;
|
|
17
|
+
export {};
|
|
@@ -12,6 +12,8 @@ export declare function useCard(cardId: string): {
|
|
|
12
12
|
handleDatapointClick: (chart: Chart, datasetIndex: number, clickIndex: number, value: number) => void;
|
|
13
13
|
cfg: any;
|
|
14
14
|
queryKey: string[];
|
|
15
|
+
queryInputIdentity: string | undefined;
|
|
16
|
+
effectivePaginationConfig: import('../types/index.js').PaginationConfig | undefined;
|
|
15
17
|
queryRequestPayload: Record<string, unknown> | undefined;
|
|
16
18
|
pagination: import('../types/index.js').PaginationMetadata | undefined;
|
|
17
19
|
comparisonMetadata: import('../../shared/analytics-protocol/index.js').MetricComparisonMetadataMap | undefined;
|
|
@@ -30,6 +32,8 @@ export declare function useDashboardCard(card: TCard): {
|
|
|
30
32
|
handleDatapointClick: (chart: Chart, datasetIndex: number, clickIndex: number, value: number) => void;
|
|
31
33
|
cfg: any;
|
|
32
34
|
queryKey: string[];
|
|
35
|
+
queryInputIdentity: string | undefined;
|
|
36
|
+
effectivePaginationConfig: import('../types/index.js').PaginationConfig | undefined;
|
|
33
37
|
queryRequestPayload: Record<string, unknown> | undefined;
|
|
34
38
|
pagination: import('../types/index.js').PaginationMetadata | undefined;
|
|
35
39
|
comparisonMetadata: import('../../shared/analytics-protocol/index.js').MetricComparisonMetadataMap | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { ControlDefinition, DashboardInputValues, TCard } from '../types/common-types.js';
|
|
3
|
-
import { CardConfig, PaginationMetadata, TableTotalsRequest } from '../types/explorer-types.js';
|
|
3
|
+
import { CardConfig, PaginationConfig, PaginationMetadata, TableTotalsRequest } from '../types/explorer-types.js';
|
|
4
4
|
import { AutoJoinMetadata, ComparisonMetadataMap } from '../types/query-types.js';
|
|
5
5
|
import { SemanticExecutionPayloadAuthority } from '../query-context/use-semantic-execution-payload-for-cards.js';
|
|
6
6
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
@@ -15,6 +15,8 @@ type AdditionalState = {
|
|
|
15
15
|
isFilteringCard: boolean;
|
|
16
16
|
isSingleCardFrame: boolean;
|
|
17
17
|
queryKey: string[];
|
|
18
|
+
queryInputIdentity?: string;
|
|
19
|
+
effectivePaginationConfig?: PaginationConfig;
|
|
18
20
|
errorMessage: string;
|
|
19
21
|
errorSql: string;
|
|
20
22
|
pagination?: PaginationMetadata;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
2
2
|
import { getCacheConfig } from '../stores/utils.js';
|
|
3
3
|
import { ControlBinding, ControlDefinition, TCard } from '../types/common-types.js';
|
|
4
|
-
import { CardConfig } from '../types/explorer-types.js';
|
|
4
|
+
import { CardConfig, PaginationConfig } from '../types/explorer-types.js';
|
|
5
5
|
import { ResolvedPrimaryDateField } from '../types/semantic-runtime-types.js';
|
|
6
6
|
import { TableConfig } from '../types/query-types.js';
|
|
7
7
|
import { CardQueryContext, CompiledCardQueryContext } from './build-card-query-context.js';
|
|
@@ -33,6 +33,8 @@ export type DashboardCardQueryRequestPayloadBase = {
|
|
|
33
33
|
export type DashboardCardQueryContract = {
|
|
34
34
|
status: 'ready';
|
|
35
35
|
queryKey: string[];
|
|
36
|
+
queryInputIdentity: string;
|
|
37
|
+
paginationConfig?: PaginationConfig;
|
|
36
38
|
requestPayloadBase: DashboardCardQueryRequestPayloadBase;
|
|
37
39
|
tableConfig: TableConfig;
|
|
38
40
|
compiledFilters: CompiledDashboardCardFilters;
|
|
@@ -51,6 +53,7 @@ export type DashboardCardQueryExecutionOptions = {
|
|
|
51
53
|
calendarContext: CalendarContext;
|
|
52
54
|
allowGlobalDateMinutePrecision?: boolean;
|
|
53
55
|
globalDateComparisonReferenceTime?: string;
|
|
56
|
+
resolvePaginationConfig?: (queryInputIdentity: string) => PaginationConfig | undefined;
|
|
54
57
|
};
|
|
55
58
|
/** One final compilation for interactive requests and immutable input captures. */
|
|
56
59
|
export declare function compileDashboardCardQueryContext(card: TCard, context: CardQueryContext, execution: Omit<CompileDashboardCardFiltersParams, 'card' | 'cardConfig' | 'input'>): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ControlBinding, ControlDefinition, TCard } from '../types/common-types.js';
|
|
2
2
|
import { ResolvedPrimaryDateField } from '../types/semantic-runtime-types.js';
|
|
3
|
-
import { CardConfig } from '../types/explorer-types.js';
|
|
3
|
+
import { CardConfig, PaginationConfig } from '../types/explorer-types.js';
|
|
4
4
|
import { GlobalDateComparisonContext } from '../../shared/analytics-protocol/index.js';
|
|
5
5
|
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
6
6
|
export declare const isPaginatedCardType: (card: TCard) => boolean;
|
|
@@ -25,4 +25,16 @@ export declare function dashboardCardQueryKeysMatch(currentQueryKey: readonly un
|
|
|
25
25
|
* lifecycle effects must depend on this value rather than array identity.
|
|
26
26
|
*/
|
|
27
27
|
export declare function serializeDashboardCardQueryKey(queryKey: readonly unknown[]): string;
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Builds the cache identity and the data-shaping identity from one projection.
|
|
30
|
+
* Pagination belongs in the cache key, but is deliberately excluded from the
|
|
31
|
+
* input identity so consumers can distinguish paging from a changed result set.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createDashboardCardQueryIdentities(card: TCard, options: CreateDashboardCardQueryKeyOptions, identityOptions?: {
|
|
34
|
+
resolvePaginationConfig?: (queryInputIdentity: string) => PaginationConfig | undefined;
|
|
35
|
+
}): {
|
|
36
|
+
queryKey: string[];
|
|
37
|
+
queryInputIdentity: string;
|
|
38
|
+
paginationConfig: PaginationConfig | undefined;
|
|
39
|
+
};
|
|
40
|
+
export declare function createDashboardCardQueryKey(card: TCard, options: CreateDashboardCardQueryKeyOptions): string[];
|
|
@@ -16,6 +16,7 @@ import { CalendarPreferencesResponse, ReportRuntimeContext, ResolvedCalendarPref
|
|
|
16
16
|
import { ResolvedValueFormatPreferenceSources, ResolvedValueFormatPreferences } from '../../shared/value-format-preferences/index.js';
|
|
17
17
|
import { DashboardNavigationEntry, DashboardNavigationState, DashboardTransientContextScope, InsightRenderRequest, NavigationRejection } from '../dashboard-navigation/index.js';
|
|
18
18
|
import { CardViewStateMap, DrillStep } from '../dashboard-view-state/index.js';
|
|
19
|
+
import { DashboardCardPaginationState } from '../dashboard-pagination/dashboard-card-pagination.js';
|
|
19
20
|
type AddFrameOptions = {
|
|
20
21
|
position?: 'start' | 'end';
|
|
21
22
|
insertAfterFrameId?: string;
|
|
@@ -97,6 +98,8 @@ export type DashboardStore = {
|
|
|
97
98
|
dashboardInputValues: DashboardInputValues;
|
|
98
99
|
/** Session-only per-card view state (the drill path), keyed by cardId. Never persisted. */
|
|
99
100
|
cardViewState: CardViewStateMap;
|
|
101
|
+
/** Session-only server pagination, attached to the query identity that owns each page. */
|
|
102
|
+
dashboardCardPagination: Record<string, DashboardCardPaginationState>;
|
|
100
103
|
/** Fixed execution clock from a strict dashboard input replay snapshot. */
|
|
101
104
|
dashboardInputReferenceTime?: string;
|
|
102
105
|
semanticExecutionPayload: SemanticExecutionPayload;
|
|
@@ -177,6 +180,7 @@ type Actions = {
|
|
|
177
180
|
popDrillStep: (cardId: string) => void;
|
|
178
181
|
resetCardViewState: (cardId: string) => void;
|
|
179
182
|
resetAllCardViewState: () => void;
|
|
183
|
+
setDashboardCardPagination: (cardId: string, pagination: DashboardCardPaginationState) => void;
|
|
180
184
|
setDashboardControlsModel: (controls: ControlDefinition[], defaultValues?: Record<string, unknown>, options?: DashboardControlsModelOptions) => void;
|
|
181
185
|
updateDashboardControl: (controlId: string, updates: Partial<ControlDefinition>) => void;
|
|
182
186
|
reorderDashboardControls: (orderedControlIds: string[]) => void;
|
|
@@ -8,6 +8,7 @@ type CardLoadingPresentationInput = {
|
|
|
8
8
|
hasRecords?: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare function shouldUseCardSkeletonDuringRefetch(card: Pick<TCard, 'type'> | undefined): boolean;
|
|
11
|
+
export declare function showsOwnRefetchCue(card: Pick<TCard, 'type'> | undefined): boolean;
|
|
11
12
|
export declare function getCardLoadingPresentation({ card, fetchStatus, isLoading, isFetching, isPending, hasRecords, }: CardLoadingPresentationInput): {
|
|
12
13
|
isBusy: boolean;
|
|
13
14
|
showCardSkeleton: boolean;
|