react-semaphor 0.1.506 → 0.1.508
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/DATA_APP_SDK.md +56 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +194 -172
- package/dist/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/appearance-runtime/index.cjs +1 -1
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +139 -119
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +3 -3
- package/dist/chunks/appearance-context-DzqCdhB4.cjs +1 -0
- package/dist/chunks/{appearance-context-XviHOhWJ.js → appearance-context-VJdrKi7r.js} +2 -1
- package/dist/chunks/{appearance-runtime-provider-D0xVQWnH.js → appearance-runtime-provider-CC4HT2Gi.js} +2 -2
- package/dist/chunks/{appearance-runtime-provider-Ca8rxO86.cjs → appearance-runtime-provider-D5pkvgE4.cjs} +1 -1
- package/dist/chunks/calculated-field-identity-BiTGmnST.cjs +1 -0
- package/dist/chunks/calculated-field-identity-CJL54uFx.js +1373 -0
- package/dist/chunks/{constants-NUleP4DY.js → card-config-utils-Bq1enstT.js} +260 -260
- package/dist/chunks/card-config-utils-CMO4_zVs.cjs +1 -0
- package/dist/chunks/{dashboard-briefing-launcher-DXTpU85p.js → dashboard-briefing-launcher-B9l0ZAbv.js} +12 -12
- package/dist/chunks/{dashboard-briefing-launcher-C8nDSDnV.cjs → dashboard-briefing-launcher-C4zsM3Hd.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-CyL0yimg.js → dashboard-controls-BCQv4xWM.js} +16 -14
- package/dist/chunks/dashboard-controls-CWwllVOe.cjs +52 -0
- package/dist/chunks/{dashboard-json-5Jr3RudV.js → dashboard-json-BtU_q_0A.js} +9 -9
- package/dist/chunks/dashboard-json-DVj2xLsH.cjs +1 -0
- package/dist/chunks/edit-dashboard-visual-CO2IVBOq.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-C7X-um9g.js → edit-dashboard-visual-RgFUx-py.js} +1986 -1990
- package/dist/chunks/{editor-action-buttons-CcDm8nA5.cjs → editor-action-buttons-BE8Fby6n.cjs} +2 -2
- package/dist/chunks/{editor-action-buttons-C5Wja_J4.js → editor-action-buttons-D-MaqTIs.js} +6 -6
- package/dist/chunks/field-aggregations-DUb0NU6c.js +1229 -0
- package/dist/chunks/field-aggregations-jSi77h9Z.cjs +1 -0
- package/dist/chunks/{field-dependencies-DVl2p1Nm.js → field-dependencies-Cl97kkHy.js} +30 -34
- package/dist/chunks/{field-dependencies-r_U0CGQ-.cjs → field-dependencies-DIab72rQ.cjs} +1 -1
- package/dist/chunks/{index-BVr4fcCB.js → index-0pdaQ9e1.js} +5 -5
- package/dist/chunks/index-BaIrLSBb.cjs +1422 -0
- package/dist/chunks/{index-De2QNsqV.js → index-ByiS9sB4.js} +45343 -43665
- package/dist/chunks/{index-C9KXfCkC.js → index-CLIro-EG.js} +3 -0
- package/dist/chunks/index-Cx3qmRUB.cjs +1 -0
- package/dist/chunks/{index-BlYf8gNa.cjs → index-DhlVxvyI.cjs} +1 -1
- package/dist/chunks/{matrix-card-DACDwdTq.js → matrix-card-CnKQpnsj.js} +1 -1
- package/dist/chunks/{matrix-card-CRXcmAjp.cjs → matrix-card-U4c72doZ.cjs} +1 -1
- package/dist/chunks/{matrix-control-sources-ClQzIk7E.js → matrix-control-sources-CRRdP03Q.js} +165 -134
- package/dist/chunks/matrix-control-sources-FjxGIbqk.cjs +1 -0
- package/dist/chunks/{matrix-formatter-7GLTcBuy.cjs → matrix-formatter-CveLJo6S.cjs} +1 -1
- package/dist/chunks/{matrix-formatter-xsq7n_e6.js → matrix-formatter-ZVS5QOuq.js} +2 -2
- package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +1 -0
- package/dist/chunks/matrix-member-presentation-CzGZJd3a.js +182 -0
- package/dist/chunks/matrix-operation-contract-DoiWTUbT.cjs +1 -0
- package/dist/chunks/matrix-operation-contract-xL8IhFzp.js +1802 -0
- package/dist/chunks/{pivot-header-presentation-3wqWChFd.cjs → pivot-header-presentation-Cxz8-06f.cjs} +1 -1
- package/dist/chunks/{pivot-header-presentation-D44ODZGn.js → pivot-header-presentation-DVylCBHB.js} +2 -2
- package/dist/chunks/{pivot-result-lifecycle-DZ0ZSMoM.cjs → pivot-result-lifecycle-BiERyXnS.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-BSmqVkVG.js → pivot-result-lifecycle-CmjpW7qG.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-xADifRXs.js → report-preferences-dialog-BbkXcnnn.js} +4 -4
- package/dist/chunks/report-preferences-dialog-C9rpWgQZ.cjs +1 -0
- package/dist/chunks/{search-BHsQIWBV.js → selection-reducer-B94WgZ9V.js} +55 -11
- package/dist/chunks/selection-reducer-CGKKsaPa.cjs +26 -0
- package/dist/chunks/{semantic-format-BhIL1PXP.cjs → semantic-format-BzH69TRq.cjs} +1 -1
- package/dist/chunks/{semantic-format-C3amkGmY.js → semantic-format-CBlRO8Aw.js} +1 -1
- package/dist/chunks/{switch-DHGiC0aU.js → switch-CD4uGTZI.js} +7450 -7694
- package/dist/chunks/switch-iC1x2dcE.cjs +134 -0
- package/dist/chunks/token-types-Ahh5u4iT.cjs +1 -0
- package/dist/chunks/token-types-CPde8_LG.js +8 -0
- package/dist/chunks/{update-policy-Cc9h57pA.cjs → update-policy-COjFudhl.cjs} +1 -1
- package/dist/chunks/{update-policy-eTcz52jO.js → update-policy-D9q1Tz8k.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +734 -622
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +3 -3
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +94 -92
- package/dist/data-app-codegen-node/index.js +337 -333
- package/dist/data-app-sdk/index.cjs +9 -9
- package/dist/data-app-sdk/index.js +1091 -969
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +104 -96
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/format-utils/index.cjs +1 -1
- package/dist/format-utils/index.js +8 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -15
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/brand-studio/brand-studio-draft.d.ts +3 -1
- package/dist/types/components/dashboard/card-selection-pill.d.ts +5 -0
- package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
- package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -0
- package/dist/types/components/dashboard/drill-navigation-controls.d.ts +3 -3
- package/dist/types/components/interactions/applied-filters-display.d.ts +6 -1
- package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +21 -0
- package/dist/types/components/interactions/dashboard-drill-host.d.ts +13 -0
- package/dist/types/components/interactions/filter-badge-tooltip.d.ts +4 -4
- package/dist/types/components/interactions/insight-modal.d.ts +4 -14
- package/dist/types/components/interactions/insight-viewer.d.ts +7 -19
- package/dist/types/components/interactions/interactions-sheet.d.ts +6 -0
- package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +20 -0
- package/dist/types/components/interactions/reusable/interaction-selection-popover.d.ts +2 -2
- package/dist/types/components/interactions/sheet/action-editor.d.ts +17 -0
- package/dist/types/components/interactions/sheet/action-meta.d.ts +45 -0
- package/dist/types/components/interactions/sheet/action-picker.d.ts +7 -0
- package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +10 -0
- package/dist/types/components/interactions/sheet/interactions-home.d.ts +28 -0
- package/dist/types/components/interactions/sheet/sheet-parts.d.ts +37 -0
- package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +28 -1
- package/dist/types/components/surfboard/filter/selection-chip.d.ts +11 -0
- package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +4 -0
- package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +3 -0
- package/dist/types/components/ui/resizable.d.ts +1 -1
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +13 -1
- package/dist/types/components/visual/matrix-table/matrix-selection-click.d.ts +6 -0
- package/dist/types/data-app-sdk/adapters.d.ts +3 -2
- package/dist/types/data-app-sdk/builders.d.ts +2 -1
- package/dist/types/data-app-sdk/contracts.d.ts +44 -2
- package/dist/types/data-app-sdk/index.d.ts +1 -0
- package/dist/types/data-app-sdk/query-request.d.ts +7 -2
- package/dist/types/data-app-sdk/selection.d.ts +2 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +24 -23
- package/dist/types/lib/appearance/types.d.ts +3 -1
- package/dist/types/lib/briefings/briefing-attachment-model.d.ts +0 -2
- package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -8
- package/dist/types/lib/dashboard/click-to-filter-card-references.d.ts +23 -0
- package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +16 -2
- package/dist/types/lib/dashboard-inputs/build-selection-dashboard-inputs.d.ts +31 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-emitted-fields.d.ts +17 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-mapping-draft.d.ts +99 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-sheet-reach.d.ts +12 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +18 -1
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-candidate-metadata.d.ts +4 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +10 -0
- package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +8 -1
- package/dist/types/lib/dashboard-inputs/index.d.ts +1 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +18 -7
- package/dist/types/lib/dashboard-inputs/resolve-field-date-comparison-coverage.d.ts +5 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +77 -0
- package/dist/types/lib/dashboard-inputs/selection-targets.d.ts +26 -0
- package/dist/types/lib/dashboard-inputs/transient-input-context.d.ts +102 -0
- package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +50 -0
- package/dist/types/lib/dashboard-navigation/describe-carried-context.d.ts +11 -0
- package/dist/types/lib/dashboard-navigation/index.d.ts +1 -0
- package/dist/types/lib/dashboard-navigation/navigation-state.d.ts +120 -0
- package/dist/types/lib/dashboard-navigation/run-one-off-drill.d.ts +11 -0
- package/dist/types/lib/dashboard-navigation/use-transient-contexts.d.ts +17 -0
- package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +48 -0
- package/dist/types/lib/dashboard-view-state/drill-path.d.ts +20 -0
- package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
- package/dist/types/lib/download-pdf.d.ts +0 -3
- package/dist/types/lib/formatters/metric-formatting.d.ts +1 -1
- package/dist/types/lib/hooks/ai/dashboard-context.d.ts +15 -8
- package/dist/types/lib/hooks/chartjs/use-chart-blur.d.ts +10 -2
- package/dist/types/lib/hooks/interactions/{use-event-engine.d.ts → use-drill-actions.d.ts} +28 -7
- package/dist/types/lib/hooks/selection/use-active-selections.d.ts +15 -0
- package/dist/types/lib/hooks/selection/use-click-to-filter-mapping-draft.d.ts +20 -0
- package/dist/types/lib/hooks/selection/use-selection-click.d.ts +34 -0
- package/dist/types/lib/hooks/selection/use-selection-gestures.d.ts +38 -0
- package/dist/types/lib/hooks/selection/use-table-row-selection.d.ts +46 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +0 -2
- package/dist/types/lib/hooks/use-dashboard-filter-mapping-candidates.d.ts +18 -0
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +1 -3
- package/dist/types/lib/hooks/use-interactions-popover.d.ts +1 -8
- package/dist/types/lib/hooks/use-resolved-card-config.d.ts +6 -0
- package/dist/types/lib/interactions/click-outcome.d.ts +25 -0
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +3 -1
- package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +7 -0
- package/dist/types/lib/interactions/interaction-utils.d.ts +17 -1
- package/dist/types/lib/matrix-table/build-matrix-drill-to-detail.d.ts +15 -0
- package/dist/types/lib/matrix-table/matrix-card-interactions.d.ts +14 -3
- package/dist/types/lib/query-context/build-card-query-context.d.ts +19 -8
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -3
- package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +12 -4
- package/dist/types/lib/query-context/compile-selection-filters.d.ts +5 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +46 -0
- package/dist/types/lib/query-context/filter-group-utils.d.ts +3 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +29 -0
- package/dist/types/lib/selection/click-to-filter-authoring-support.d.ts +9 -0
- package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
- package/dist/types/lib/selection/selection-labels.d.ts +3 -0
- package/dist/types/lib/selection/selection-notices.d.ts +9 -0
- package/dist/types/lib/selection/selection-reducer.d.ts +46 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +62 -17
- package/dist/types/lib/stores/editor-store.d.ts +1 -2
- package/dist/types/lib/stores/index.d.ts +0 -2
- package/dist/types/lib/types/common-types.d.ts +60 -6
- package/dist/types/lib/types/explorer-types.d.ts +1 -22
- package/dist/types/lib/types/interaction-types.d.ts +6 -198
- package/dist/types/lib/utils/calculate-context-aware-filters.d.ts +21 -12
- package/dist/types/lib/utils/card-utils.d.ts +11 -0
- package/dist/types/lib/utils/date-hierarchy-utils.d.ts +3 -1
- package/dist/types/lib/utils/drag-and-drop-utils.d.ts +1 -1
- package/dist/types/lib/utils/interaction-icons.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +32 -32
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +100 -0
- package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/apply-group-by-override.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +88 -0
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/linked-click-to-filter-overrides.d.ts +32 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
- package/package.json +1 -1
- package/src/data-app-sdk/README.md +58 -1
- package/dist/chunks/appearance-context-tNjvTJj3.cjs +0 -1
- package/dist/chunks/calculated-field-identity-BTpUqfEu.js +0 -1276
- package/dist/chunks/calculated-field-identity-rMuXuzEY.cjs +0 -1
- package/dist/chunks/constants-vtu7_IUo.cjs +0 -1
- package/dist/chunks/dashboard-controls-DlxeddZN.cjs +0 -52
- package/dist/chunks/dashboard-json-DhS4yJfc.cjs +0 -1
- package/dist/chunks/edit-dashboard-visual-X3OCnivL.cjs +0 -172
- package/dist/chunks/field-aggregations-BU_3gHKR.js +0 -957
- package/dist/chunks/field-aggregations-CDCamEsQ.cjs +0 -1
- package/dist/chunks/index-C8XCKzB6.cjs +0 -1
- package/dist/chunks/index-DSa6RSdg.cjs +0 -1417
- package/dist/chunks/matrix-control-sources-CeC5EMyq.cjs +0 -1
- package/dist/chunks/matrix-member-presentation-E2B4k3ws.cjs +0 -1
- package/dist/chunks/matrix-member-presentation-qiHxv67e.js +0 -105
- package/dist/chunks/matrix-operation-contract-Cqy4EW2H.js +0 -1638
- package/dist/chunks/matrix-operation-contract-D9dLX-Wr.cjs +0 -1
- package/dist/chunks/report-preferences-dialog-7Vsc_fsG.cjs +0 -1
- package/dist/chunks/search-BqqhaMx9.cjs +0 -26
- package/dist/chunks/switch-BytP6QY8.cjs +0 -139
- package/dist/types/components/interactions/configuration-popover.d.ts +0 -1
- package/dist/types/components/interactions/interaction-card.d.ts +0 -59
- package/dist/types/components/interactions/interaction-event-handler.d.ts +0 -11
- package/dist/types/components/interactions/interactions-list.d.ts +0 -50
- package/dist/types/components/interactions/panels/cross-filter-panel.d.ts +0 -24
- package/dist/types/components/interactions/panels/inline-drill-panel.d.ts +0 -24
- package/dist/types/components/interactions/selectors/action-selector.d.ts +0 -31
- package/dist/types/components/interactions/selectors/trigger-selector.d.ts +0 -38
- package/dist/types/components/surfboard/filter/click-filter-section.d.ts +0 -5
- package/dist/types/lib/interactions/build-interaction-event.d.ts +0 -25
- package/dist/types/lib/interactions/convert-click-filters-to-filter-group.d.ts +0 -10
- package/dist/types/lib/interactions/execute-interaction-event.d.ts +0 -80
- package/dist/types/lib/interactions/field-utils.d.ts +0 -11
- package/dist/types/lib/interactions/handle-chart-click.d.ts +0 -75
- package/dist/types/lib/interactions/linked-interaction-utils.d.ts +0 -14
- package/dist/types/lib/interactions/source-card-filter-utils.d.ts +0 -9
- package/dist/types/lib/stores/drill-actions.d.ts +0 -139
- package/dist/types/lib/stores/interaction-store.d.ts +0 -113
- package/dist/types/lib/stores/pointer-interaction-store.d.ts +0 -18
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { ShelfCard } from '../utils/card-definition.js';
|
|
2
|
-
import { InteractionEvent, InteractionState, ClickFilterEvent, ClickFilterCondition } from '../types/interaction-types.js';
|
|
3
|
-
import { CardConfig, FilterGroup } from '../types/explorer-types.js';
|
|
4
|
-
import { TCard } from '../types/common-types.js';
|
|
5
|
-
/**
|
|
6
|
-
* Special card ID for global drill-through context
|
|
7
|
-
* Stores drill filters that apply to all cards on the destination dashboard
|
|
8
|
-
*/
|
|
9
|
-
export declare const DRILL_CONTEXT_CARD_ID = "__DRILL_CONTEXT__";
|
|
10
|
-
/**
|
|
11
|
-
* Creates the initial state for interaction tracking
|
|
12
|
-
*/
|
|
13
|
-
export declare function createInitialInteractionState(): InteractionState;
|
|
14
|
-
interface InteractionStore {
|
|
15
|
-
/** Maps card IDs to their interaction states */
|
|
16
|
-
interactionStates: Record<string, InteractionState>;
|
|
17
|
-
/** Maps card IDs to insight replacements (for replace-card display mode) */
|
|
18
|
-
replacedCards: Record<string, {
|
|
19
|
-
insightId: string;
|
|
20
|
-
filters?: any[];
|
|
21
|
-
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
22
|
-
}>;
|
|
23
|
-
/** Pending drill-through navigation (waiting for metadata to load) */
|
|
24
|
-
pendingDrillThrough: {
|
|
25
|
-
targetDashboardId: string;
|
|
26
|
-
sourceDashboardId: string;
|
|
27
|
-
sourceDashboardTitle?: string;
|
|
28
|
-
filters: ClickFilterCondition[];
|
|
29
|
-
contextMode: 'interactionFilters' | 'full' | 'none';
|
|
30
|
-
} | null;
|
|
31
|
-
/** Sets the interaction state for a specific card */
|
|
32
|
-
setInteractionState: (cardId: string, state: InteractionState) => void;
|
|
33
|
-
/** Resets the interaction state for a specific card to initial state */
|
|
34
|
-
resetInteractionState: (cardId: string) => void;
|
|
35
|
-
/** Applies an interaction event to a card, optionally replacing existing events */
|
|
36
|
-
applyInteractionEvent: (cardId: string, event: InteractionEvent, replaceExisting?: boolean) => void;
|
|
37
|
-
/** Toggles a click filter on/off for a card */
|
|
38
|
-
toggleClickFilter: (cardId: string, event: ClickFilterEvent) => void;
|
|
39
|
-
/** Removes click filters that match a specific field-value combination */
|
|
40
|
-
removeClickFiltersByValue: (cardId: string, fieldName: string, value: string | number | null) => void;
|
|
41
|
-
/** Removes the last interaction step (breadcrumb) from a card */
|
|
42
|
-
popInteractionStep: (cardId: string) => void;
|
|
43
|
-
/** Clears the last interaction event for a card (after execution) */
|
|
44
|
-
clearLastInteractionEvent: (cardId: string) => void;
|
|
45
|
-
/** Replaces a card with an insight (for replace-card display mode) */
|
|
46
|
-
replaceCardWithInsight: (cardId: string, insightId: string, filters?: any[], contextMode?: 'interactionFilters' | 'full' | 'none') => void;
|
|
47
|
-
/** Restores a replaced card to its original state */
|
|
48
|
-
restoreCard: (cardId: string) => void;
|
|
49
|
-
/** Clears all click filters across all cards */
|
|
50
|
-
clearAllClickFilters: () => void;
|
|
51
|
-
/** Sets pending drill-through navigation */
|
|
52
|
-
setPendingDrillThrough: (params: {
|
|
53
|
-
targetDashboardId: string;
|
|
54
|
-
sourceDashboardId: string;
|
|
55
|
-
sourceDashboardTitle?: string;
|
|
56
|
-
filters: ClickFilterCondition[];
|
|
57
|
-
contextMode: 'interactionFilters' | 'full' | 'none';
|
|
58
|
-
}) => void;
|
|
59
|
-
/** Clears pending drill-through navigation */
|
|
60
|
-
clearPendingDrillThrough: () => void;
|
|
61
|
-
/** Resets all interaction states. Called when loading a new dashboard. */
|
|
62
|
-
resetAllInteractionStates: () => void;
|
|
63
|
-
}
|
|
64
|
-
export declare const useInteractionStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<InteractionStore>, "setState" | "devtools"> & {
|
|
65
|
-
setState(partial: InteractionStore | Partial<InteractionStore> | ((state: InteractionStore) => InteractionStore | Partial<InteractionStore>), replace?: false | undefined, action?: (string | {
|
|
66
|
-
[x: string]: unknown;
|
|
67
|
-
[x: number]: unknown;
|
|
68
|
-
[x: symbol]: unknown;
|
|
69
|
-
type: string;
|
|
70
|
-
}) | undefined): void;
|
|
71
|
-
setState(state: InteractionStore | ((state: InteractionStore) => InteractionStore), replace: true, action?: (string | {
|
|
72
|
-
[x: string]: unknown;
|
|
73
|
-
[x: number]: unknown;
|
|
74
|
-
[x: symbol]: unknown;
|
|
75
|
-
type: string;
|
|
76
|
-
}) | undefined): void;
|
|
77
|
-
devtools: {
|
|
78
|
-
cleanup: () => void;
|
|
79
|
-
};
|
|
80
|
-
}>;
|
|
81
|
-
/**
|
|
82
|
-
* Hook to get all click filters that apply to a specific card
|
|
83
|
-
* Filters out filters from the card itself and applies inclusion/exclusion rules
|
|
84
|
-
*/
|
|
85
|
-
export declare function getClickFiltersForCardFromStates(cardId: string, interactionStates: Record<string, InteractionState | undefined>): ClickFilterEvent[];
|
|
86
|
-
export declare const useClickFiltersForCard: (cardId: string) => ClickFilterEvent[];
|
|
87
|
-
/**
|
|
88
|
-
* Combines static filters, click filters, and drill breadcrumbs into a single merged FilterGroup.
|
|
89
|
-
*
|
|
90
|
-
* Filter combination logic:
|
|
91
|
-
* - Inside a filter group (group.filters): AND
|
|
92
|
-
* - Between filter groups in ClickFilterEvent or DrillBreadcrumb: OR
|
|
93
|
-
* - Between breadcrumbs (drill steps): AND
|
|
94
|
-
* - Between click filters, drill filters, and static filters: AND
|
|
95
|
-
*/
|
|
96
|
-
export declare function resolveFiltersFromInteractionStates(card: TCard, interactionStates: Record<string, InteractionState | undefined>, currentDashboardId?: string, options?: {
|
|
97
|
-
includeAuthoredFilters?: boolean;
|
|
98
|
-
}): FilterGroup | undefined;
|
|
99
|
-
export declare function useResolvedFilters(card: TCard): FilterGroup | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* Returns a modified copy of card.config where groupBy is overridden
|
|
102
|
-
* by the most recent drill target field from breadcrumbs (if any).
|
|
103
|
-
* Also updates sortByColumns to prevent SQL errors when drilling.
|
|
104
|
-
*/
|
|
105
|
-
export declare function resolveCardConfigFromInteractionStates(card: TCard, interactionStates: Record<string, InteractionState | undefined>, resolvedFilters?: FilterGroup): CardConfig;
|
|
106
|
-
export declare function resolveShelfCardConfigFromInteractionStates(card: ShelfCard, interactionStates: Record<string, InteractionState | undefined>, resolvedFilters?: FilterGroup): CardConfig;
|
|
107
|
-
export declare function useResolvedCardConfig(card: TCard): CardConfig;
|
|
108
|
-
/**
|
|
109
|
-
* Generates a stable key for React Query based on the final resolved filters
|
|
110
|
-
*/
|
|
111
|
-
export declare function getFinalFilterGroupKeyFromInteractionStates(card: TCard, interactionStates: Record<string, InteractionState | undefined>, resolvedFilters?: FilterGroup): string | undefined;
|
|
112
|
-
export declare function useFinalFilterGroupKey(card: TCard): string | undefined;
|
|
113
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ClickFilterCondition, ClickedMetricValue } from '../types/interaction-types.js';
|
|
2
|
-
export type PointerInteractionType = 'leftClick' | 'rightClick' | 'hover' | 'longPress' | 'multiClick';
|
|
3
|
-
export interface PointerInteractionContext {
|
|
4
|
-
type: PointerInteractionType;
|
|
5
|
-
cardId: string;
|
|
6
|
-
conditions: ClickFilterCondition[];
|
|
7
|
-
metric?: ClickedMetricValue;
|
|
8
|
-
anchorPosition?: {
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare const usePointerInteractionStore: import('zustand').UseBoundStore<import('zustand').StoreApi<{
|
|
14
|
-
context: PointerInteractionContext | null;
|
|
15
|
-
setContext: (ctx: PointerInteractionContext) => void;
|
|
16
|
-
appendCondition: (cond: ClickFilterCondition) => void;
|
|
17
|
-
clear: () => void;
|
|
18
|
-
}>>;
|