react-semaphor 0.1.543 → 0.1.545
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/activity/index.js +73 -0
- package/dist/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +56 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/dashboard-B1tMju0u.js +14 -0
- package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
- package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +553 -541
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +241 -227
- package/dist/index.js +354 -331
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +6 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
- package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
- package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { r as d } from "./metric-comparison-DEwi9uc2.js";
|
|
2
|
-
function s(n, i) {
|
|
3
|
-
return d({ ...n, role: i });
|
|
4
|
-
}
|
|
5
|
-
function m(n, i) {
|
|
6
|
-
if (i.id) {
|
|
7
|
-
const e = [];
|
|
8
|
-
n.forEach(
|
|
9
|
-
({ fields: a }, f) => a.forEach((l, r) => {
|
|
10
|
-
l.id === i.id && e.push({ group: f, index: r });
|
|
11
|
-
})
|
|
12
|
-
);
|
|
13
|
-
const t = i.alias ? e.find(
|
|
14
|
-
({ group: a, index: f }) => s(n[a].fields[f], n[a].role) === i.alias
|
|
15
|
-
) : void 0;
|
|
16
|
-
if (t) return t;
|
|
17
|
-
if (e.length === 1) return e[0];
|
|
18
|
-
}
|
|
19
|
-
for (let e = 0; e < n.length; e += 1) {
|
|
20
|
-
const t = n[e].fields.findIndex(
|
|
21
|
-
(a) => a.name === i.name && a.entityName === i.entityName && (a.alias === i.alias || !i.alias)
|
|
22
|
-
);
|
|
23
|
-
if (t !== -1) return { group: e, index: t };
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
m as f,
|
|
28
|
-
s
|
|
29
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { BriefingPreviewPlan, BriefingPreviewRun, BriefingRun } from '../../../lib/types/briefing-types.js';
|
|
2
|
-
import { EmailPreviewArtifact, SlackPreviewArtifact } from './run-model.js';
|
|
3
|
-
type PendingAction = 'save' | 'run' | 'plan' | 'preview' | 'pause' | 'resume' | 'delete' | 'cancelRun' | 'deleteRun' | null;
|
|
4
|
-
export declare function BriefingPlanReview({ previewPlan, previewRun, scopeLabel, }: {
|
|
5
|
-
previewPlan: BriefingPreviewPlan;
|
|
6
|
-
previewRun: BriefingPreviewRun | null;
|
|
7
|
-
scopeLabel?: string | null;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
9
|
-
export declare function LatestRunSummary({ run, onViewOutput, onDeleteRun, onRetryRun, retryDisabled, retryDisabledReason, deletePending, }: {
|
|
10
|
-
run: BriefingRun;
|
|
11
|
-
onViewOutput: () => void;
|
|
12
|
-
onDeleteRun?: () => void;
|
|
13
|
-
onRetryRun?: () => void;
|
|
14
|
-
retryDisabled?: boolean;
|
|
15
|
-
retryDisabledReason?: string;
|
|
16
|
-
deletePending?: boolean;
|
|
17
|
-
}): import("react").JSX.Element;
|
|
18
|
-
export declare function RunProgressDetails({ run }: {
|
|
19
|
-
run: BriefingPreviewRun | BriefingRun;
|
|
20
|
-
}): import("react").JSX.Element;
|
|
21
|
-
export declare function RunExpectationBanner(): import("react").JSX.Element;
|
|
22
|
-
export declare function BackgroundRunPill({ run, onExpand, }: {
|
|
23
|
-
run: BriefingPreviewRun | BriefingRun;
|
|
24
|
-
onExpand: () => void;
|
|
25
|
-
}): import("react").JSX.Element;
|
|
26
|
-
export declare function RunCompletionBanner({ title, durationSeconds, status, onView, onDismiss, }: {
|
|
27
|
-
title: string;
|
|
28
|
-
durationSeconds: number | null;
|
|
29
|
-
status: 'success' | 'failed';
|
|
30
|
-
onView: () => void;
|
|
31
|
-
onDismiss: () => void;
|
|
32
|
-
}): import("react").JSX.Element;
|
|
33
|
-
export declare function StickyActivityBar({ pendingAction, previewRun, savedActiveRun, onShowDetails, onCancelPreviewRun, onCancelSavedRun, onMinimizeRun, detailsVisible, }: {
|
|
34
|
-
pendingAction: PendingAction;
|
|
35
|
-
previewRun: BriefingPreviewRun | null;
|
|
36
|
-
savedActiveRun: BriefingRun | null;
|
|
37
|
-
onShowDetails: () => void;
|
|
38
|
-
onCancelPreviewRun?: () => void;
|
|
39
|
-
onCancelSavedRun?: () => void;
|
|
40
|
-
onMinimizeRun?: () => void;
|
|
41
|
-
detailsVisible: boolean;
|
|
42
|
-
}): import("react").JSX.Element | null;
|
|
43
|
-
export declare function EmailPackagePreview({ preview, onExpand, reportMode, }: {
|
|
44
|
-
preview: EmailPreviewArtifact;
|
|
45
|
-
onExpand?: () => void;
|
|
46
|
-
reportMode?: boolean;
|
|
47
|
-
}): import("react").JSX.Element;
|
|
48
|
-
export declare function SlackMessagePreview({ preview, onExpand, trustLine, reactions, }: {
|
|
49
|
-
preview: SlackPreviewArtifact;
|
|
50
|
-
onExpand?: () => void;
|
|
51
|
-
/** Optional italic footer line ("Runs with X's permissions · …"). */
|
|
52
|
-
trustLine?: string;
|
|
53
|
-
/** Mock reaction counts for the preview surface. Real reactions come back
|
|
54
|
-
after send and are surfaced separately on the briefing detail. */
|
|
55
|
-
reactions?: Array<{
|
|
56
|
-
emoji: string;
|
|
57
|
-
count: number;
|
|
58
|
-
}>;
|
|
59
|
-
}): import("react").JSX.Element;
|
|
60
|
-
export declare function BriefingPreviewResult({ previewRun, onExpand, fullWidth, reportMode, }: {
|
|
61
|
-
previewRun: BriefingPreviewRun;
|
|
62
|
-
onExpand?: () => void;
|
|
63
|
-
fullWidth?: boolean;
|
|
64
|
-
reportMode?: boolean;
|
|
65
|
-
}): import("react").JSX.Element;
|
|
66
|
-
export declare function SavedRunResult({ run, onExpand, reportMode, onDeleteRun, onRetryRun, retryDisabled, retryDisabledReason, deletePending, }: {
|
|
67
|
-
run: BriefingRun;
|
|
68
|
-
onExpand?: () => void;
|
|
69
|
-
reportMode?: boolean;
|
|
70
|
-
onDeleteRun?: () => void;
|
|
71
|
-
onRetryRun?: () => void;
|
|
72
|
-
retryDisabled?: boolean;
|
|
73
|
-
retryDisabledReason?: string;
|
|
74
|
-
deletePending?: boolean;
|
|
75
|
-
}): import("react").JSX.Element;
|
|
76
|
-
export declare function LocalPreviewOutputCallout({ previewRun, isStale, onViewOutput, }: {
|
|
77
|
-
previewRun: BriefingPreviewRun;
|
|
78
|
-
isStale: boolean;
|
|
79
|
-
onViewOutput: () => void;
|
|
80
|
-
}): import("react").JSX.Element;
|
|
81
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
type PollableBriefingRun = {
|
|
2
|
-
id: string;
|
|
3
|
-
status: string;
|
|
4
|
-
error?: string | null;
|
|
5
|
-
};
|
|
6
|
-
type PollingStatus = 'idle' | 'polling' | 'terminal' | 'timed_out' | 'error';
|
|
7
|
-
type PollingInput = {
|
|
8
|
-
apiServiceUrl: string;
|
|
9
|
-
token: string;
|
|
10
|
-
runId: string;
|
|
11
|
-
};
|
|
12
|
-
type UseBriefingRunPollingOptions<Run extends PollableBriefingRun> = {
|
|
13
|
-
apiServiceUrl?: string;
|
|
14
|
-
token?: string;
|
|
15
|
-
intervalMs: number;
|
|
16
|
-
timeoutMs: number;
|
|
17
|
-
fetchRun: (input: PollingInput) => Promise<Run>;
|
|
18
|
-
onRun: (run: Run) => void;
|
|
19
|
-
onTerminalRun?: (run: Run) => void;
|
|
20
|
-
onError?: (error: unknown) => void;
|
|
21
|
-
onTimeout?: (runId: string) => void;
|
|
22
|
-
};
|
|
23
|
-
export declare function isTerminalBriefingRunStatus(status: string | undefined): boolean;
|
|
24
|
-
export declare function isActiveBriefingRunStatus(status: string | undefined): boolean;
|
|
25
|
-
export declare function useBriefingRunPolling<Run extends PollableBriefingRun>({ apiServiceUrl, token, intervalMs, timeoutMs, fetchRun, onRun, onTerminalRun, onError, onTimeout, }: UseBriefingRunPollingOptions<Run>): {
|
|
26
|
-
activeRunId: string | null;
|
|
27
|
-
isPolling: boolean;
|
|
28
|
-
resetTerminalRun: () => void;
|
|
29
|
-
startRun: (run: Run) => void;
|
|
30
|
-
startRunId: (runId: string) => void;
|
|
31
|
-
status: PollingStatus;
|
|
32
|
-
stop: () => void;
|
|
33
|
-
};
|
|
34
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ActiveExport } from '../../lib/stores/export-store.js';
|
|
3
|
-
export type ExportDownloadOutcome = 'opened' | 'denied';
|
|
4
|
-
interface ExportNotificationItemProps {
|
|
5
|
-
/** The export data to display */
|
|
6
|
-
export: ActiveExport;
|
|
7
|
-
/** Called when user clicks dismiss/remove */
|
|
8
|
-
onRemove?: (id: string) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Opens the file, resolving a fresh signed link first when the row holds
|
|
11
|
-
* none. Resolves 'denied' when the link could not be signed.
|
|
12
|
-
*/
|
|
13
|
-
onDownload?: (exp: ActiveExport) => Promise<ExportDownloadOutcome>;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* One background export. Visual reference: semaphor-app /design/export-tray.
|
|
17
|
-
*
|
|
18
|
-
* A row is a status dot, the title, one metadata line and one text action.
|
|
19
|
-
* At rest the metadata line shows only the time; rows and size disclose on
|
|
20
|
-
* hover or focus, in the same gesture that reveals Remove. A ready export
|
|
21
|
-
* always offers Download; the link is resolved on click when it is missing.
|
|
22
|
-
*/
|
|
23
|
-
export declare function ExportNotificationItem({ export: exp, onRemove, onDownload, }: ExportNotificationItemProps): React.JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Notification bell icon with badge.
|
|
4
|
-
*
|
|
5
|
-
* Shows a badge when there are:
|
|
6
|
-
* - In-progress exports (shows count)
|
|
7
|
-
* - Completed exports that haven't been dismissed (shows dot)
|
|
8
|
-
*
|
|
9
|
-
* Clicking opens a popover with the full export notification list.
|
|
10
|
-
*/
|
|
11
|
-
export declare function NotificationBell({ variant, }: {
|
|
12
|
-
variant?: 'outline' | 'ghost';
|
|
13
|
-
}): React.JSX.Element;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { TFilter, TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
2
|
-
import { DashboardInput, DashboardInputValues } from '../types/common-types.js';
|
|
3
|
-
import { DashboardInputRuntimeTarget } from './dashboard-input-values.js';
|
|
4
|
-
import { DefaultsCalendar } from '../utils/filter-default-value-utils.js';
|
|
5
|
-
import { GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
|
|
6
|
-
import { DashboardFilterOptionDependencies, DashboardFilterOptionPopulation, DashboardFilterOptionSource } from '../../shared/dashboard-authoring/index.js';
|
|
7
|
-
export type DashboardFilterStorageState = {
|
|
8
|
-
filterValues?: TFilterValue[];
|
|
9
|
-
defaultFilterValues?: TFilterValue[];
|
|
10
|
-
dashboardInputValues: DashboardInputValues;
|
|
11
|
-
defaultInputValues?: DashboardInputValues;
|
|
12
|
-
};
|
|
13
|
-
export type DashboardFilterAuthoringSettingsUpdate = {
|
|
14
|
-
forceSelection?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* The caller changed the default its target loads. Filter settings start
|
|
17
|
-
* from the target's saved default (`resolveAuthoredFilterDefaultFields`),
|
|
18
|
-
* which can differ from the definition for a scoped Input or an overlay
|
|
19
|
-
* entry, so they say so; callers that start from the definition leave it
|
|
20
|
-
* unset and the owner compares definitions. Also resets a saved slot that
|
|
21
|
-
* has no backing default.
|
|
22
|
-
*/
|
|
23
|
-
defaultValueChanged?: boolean;
|
|
24
|
-
defaultComparisonChanged?: boolean;
|
|
25
|
-
defaultComparisonSelection?: GlobalDateComparisonSelection;
|
|
26
|
-
target?: DashboardInputRuntimeTarget;
|
|
27
|
-
optionSourceChanged?: boolean;
|
|
28
|
-
optionSource?: DashboardFilterOptionSource;
|
|
29
|
-
/** Authored option dependency policy edit; undefined value restores the
|
|
30
|
-
* dashboard default (omitted, meaning All applicable). */
|
|
31
|
-
optionDependenciesChanged?: boolean;
|
|
32
|
-
optionDependencies?: DashboardFilterOptionDependencies;
|
|
33
|
-
optionPopulationChanged?: boolean;
|
|
34
|
-
optionPopulation?: DashboardFilterOptionPopulation;
|
|
35
|
-
/** Raw selection identity changed; the previous runtime value is invalid. */
|
|
36
|
-
selectionIdentityChanged?: boolean;
|
|
37
|
-
};
|
|
38
|
-
/** Persisted option policy carried by a filter Input. */
|
|
39
|
-
export type DashboardFilterOptionPolicy = {
|
|
40
|
-
optionDependencies?: DashboardFilterOptionDependencies;
|
|
41
|
-
optionPopulation?: DashboardFilterOptionPopulation;
|
|
42
|
-
};
|
|
43
|
-
/** Resolves the policy an authoring transaction should persist. */
|
|
44
|
-
export declare function resolveFilterOptionPolicy(current: DashboardFilterOptionPolicy | undefined, settings: DashboardFilterAuthoringSettingsUpdate | undefined): DashboardFilterOptionPolicy;
|
|
45
|
-
export declare function hasFilterOptionPolicy(policy: DashboardFilterOptionPolicy | undefined): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Callers submit edits; the owner decides whether defaults must be reseeded.
|
|
48
|
-
* A default change (values, date window or mode) writes the target's saved
|
|
49
|
-
* default and live value; the definition, which the caller submits whole,
|
|
50
|
-
* holds the last authored default.
|
|
51
|
-
*/
|
|
52
|
-
export declare function resolveFilterAuthoringSettings(previous: TFilter | undefined, filter: TFilter, settings: DashboardFilterAuthoringSettingsUpdate | undefined, target: DashboardInputRuntimeTarget, calendar?: DefaultsCalendar): {
|
|
53
|
-
target: DashboardInputRuntimeTarget;
|
|
54
|
-
defaultValueChanged: boolean;
|
|
55
|
-
defaultFilterValue: TFilterValue | undefined;
|
|
56
|
-
forceSelection?: boolean;
|
|
57
|
-
defaultComparisonChanged?: boolean;
|
|
58
|
-
defaultComparisonSelection?: GlobalDateComparisonSelection;
|
|
59
|
-
optionSourceChanged?: boolean;
|
|
60
|
-
optionSource?: DashboardFilterOptionSource;
|
|
61
|
-
optionDependenciesChanged?: boolean;
|
|
62
|
-
optionDependencies?: DashboardFilterOptionDependencies;
|
|
63
|
-
optionPopulationChanged?: boolean;
|
|
64
|
-
optionPopulation?: DashboardFilterOptionPopulation;
|
|
65
|
-
selectionIdentityChanged?: boolean;
|
|
66
|
-
};
|
|
67
|
-
export declare function moveOrdinaryFilterStorageToMappedInput(params: {
|
|
68
|
-
state: DashboardFilterStorageState;
|
|
69
|
-
input: Pick<DashboardInput, 'id' | 'runtimeScope'>;
|
|
70
|
-
filter: TFilter;
|
|
71
|
-
}): DashboardFilterStorageState;
|
|
72
|
-
export declare function moveMappedInputStorageToOrdinaryFilter(params: {
|
|
73
|
-
state: DashboardFilterStorageState;
|
|
74
|
-
input: Pick<DashboardInput, 'id' | 'runtimeScope'>;
|
|
75
|
-
filter: TFilter;
|
|
76
|
-
}): DashboardFilterStorageState;
|
|
77
|
-
/**
|
|
78
|
-
* Applies Basic-tab default edits to the same storage transaction that changes
|
|
79
|
-
* mapped participation. This keeps the authoritative filter, mapped input, and
|
|
80
|
-
* its runtime/default slots from becoming observable in mixed states.
|
|
81
|
-
*/
|
|
82
|
-
export declare function applyFilterAuthoringSettingsToStorage(params: {
|
|
83
|
-
state: DashboardFilterStorageState;
|
|
84
|
-
input: Pick<DashboardInput, 'id' | 'runtimeScope'>;
|
|
85
|
-
filterId: string;
|
|
86
|
-
storage: 'mapped' | 'ordinary';
|
|
87
|
-
settings?: ReturnType<typeof resolveFilterAuthoringSettings>;
|
|
88
|
-
}): DashboardFilterStorageState;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DashboardInputBase } from '../types/common-types.js';
|
|
2
|
-
import { DashboardInputRuntimeTarget } from './dashboard-input-values.js';
|
|
3
|
-
export type ScopedDashboardInputTarget = DashboardInputRuntimeTarget & {
|
|
4
|
-
sheetKind?: 'dashboard' | 'document';
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* The one interpreter of `DashboardInputScope`. Filters, controls, and
|
|
8
|
-
* click-to-filter targets all decide "does this reach that card" here.
|
|
9
|
-
*/
|
|
10
|
-
export declare function doesDashboardInputApplyToTarget(input: Pick<DashboardInputBase, 'scope' | 'compatibility'>, target: ScopedDashboardInputTarget): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One export status, list or download-link request never waits longer than
|
|
3
|
-
* this (hotspot H-06: every wait that decides something is bounded). A
|
|
4
|
-
* timed-out request counts as failed, and its fetch is aborted.
|
|
5
|
-
*/
|
|
6
|
-
export declare const EXPORT_STATUS_TIMEOUT_MS = 15000;
|
|
7
|
-
/**
|
|
8
|
-
* Rejects when `work` outlasts `EXPORT_STATUS_TIMEOUT_MS`, and aborts its
|
|
9
|
-
* request. `work` must pass `signal` to its fetch, or the timeout releases the
|
|
10
|
-
* caller while the request stays open (a static test checks every caller).
|
|
11
|
-
*/
|
|
12
|
-
export declare function boundedRequest<T>(work: (signal: AbortSignal) => Promise<T>): Promise<T>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { EXPORT_STATUS_TIMEOUT_MS } from '../exports/bounded-request.js';
|
|
2
|
-
/**
|
|
3
|
-
* The browser follows the server (MX-D9): it gives up on an export this long
|
|
4
|
-
* after the server's `deadlineAt`, by which the server has settled the export.
|
|
5
|
-
*/
|
|
6
|
-
export declare const EXPORT_POLL_GRACE_MS: number;
|
|
7
|
-
export { EXPORT_STATUS_TIMEOUT_MS };
|
|
8
|
-
/**
|
|
9
|
-
* Hook that manages smart polling for export status updates.
|
|
10
|
-
*
|
|
11
|
-
* Features:
|
|
12
|
-
* - Dynamic polling intervals (10s → 15s → 30s) based on export duration
|
|
13
|
-
* - Page Visibility API integration (pauses when tab is hidden)
|
|
14
|
-
* - Automatic download URL fetching when export completes
|
|
15
|
-
* - Only polls when there are in-progress exports
|
|
16
|
-
*
|
|
17
|
-
* @returns Object with polling state
|
|
18
|
-
*/
|
|
19
|
-
export declare function useExportPolling(): {
|
|
20
|
-
isPolling: boolean;
|
|
21
|
-
isTabVisible: boolean;
|
|
22
|
-
inProgressCount: number;
|
|
23
|
-
};
|
|
24
|
-
export declare const POLLING_INTERVALS: {
|
|
25
|
-
INITIAL: number;
|
|
26
|
-
MEDIUM: number;
|
|
27
|
-
LONG: number;
|
|
28
|
-
MEDIUM_THRESHOLD: number;
|
|
29
|
-
LONG_THRESHOLD: number;
|
|
30
|
-
EXPORT_POLL_GRACE_MS: number;
|
|
31
|
-
FALLBACK_POLLING_DURATION: number;
|
|
32
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook that recovers active exports when the app mounts or page refreshes.
|
|
3
|
-
*
|
|
4
|
-
* This ensures that:
|
|
5
|
-
* - Users don't lose track of their exports after a page refresh
|
|
6
|
-
* - The notification tray shows all in-progress exports
|
|
7
|
-
* - Polling resumes for any ongoing exports
|
|
8
|
-
*
|
|
9
|
-
* Should be called once at the app root level (e.g., in dashboard-plus.tsx).
|
|
10
|
-
*/
|
|
11
|
-
export declare function useExportRecovery(): void;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents an active or recently completed export job.
|
|
3
|
-
*/
|
|
4
|
-
export interface ActiveExport {
|
|
5
|
-
id: string;
|
|
6
|
-
status: 'pending' | 'processing' | 'chunking' | 'compacting' | 'completed' | 'failed' | 'cancelled';
|
|
7
|
-
progress: number | null;
|
|
8
|
-
title: string;
|
|
9
|
-
totalRows: number | null;
|
|
10
|
-
totalChunks: number | null;
|
|
11
|
-
rowsProcessed?: number;
|
|
12
|
-
completedChunks: number;
|
|
13
|
-
startedAt: Date;
|
|
14
|
-
lastUpdatedAt: Date;
|
|
15
|
-
completedAt?: Date;
|
|
16
|
-
downloadUrl?: string;
|
|
17
|
-
fileSize?: number;
|
|
18
|
-
error?: string;
|
|
19
|
-
expiresAt: Date;
|
|
20
|
-
/** Matrix exports: the server's phase, for the bell's stage text (M9, M10, M12). */
|
|
21
|
-
phase?: 'preparing' | 'acquiring' | 'finalizing' | 'completed';
|
|
22
|
-
/** When the server stops the export; polling gives up a grace period later (MX-D9). */
|
|
23
|
-
deadlineAt?: Date;
|
|
24
|
-
}
|
|
25
|
-
type ExportStoreState = {
|
|
26
|
-
/** Map of export ID to export data */
|
|
27
|
-
activeExports: Map<string, ActiveExport>;
|
|
28
|
-
};
|
|
29
|
-
type ExportStoreActions = {
|
|
30
|
-
/** Add a new export to the store */
|
|
31
|
-
addExport: (exportData: ActiveExport) => void;
|
|
32
|
-
/** Update an existing export */
|
|
33
|
-
updateExport: (id: string, updates: Partial<ActiveExport>) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Applies a server answer (poll, refresh). An answer never moves an export
|
|
36
|
-
* that is final here back to in progress: a newer answer already settled it.
|
|
37
|
-
*/
|
|
38
|
-
applyServerStatus: (id: string, updates: Partial<ActiveExport>) => void;
|
|
39
|
-
/** Adds a recovered export only if it is not tracked already (checked when adding). */
|
|
40
|
-
recoverExport: (exportData: ActiveExport) => void;
|
|
41
|
-
/** Remove an export from the store */
|
|
42
|
-
removeExport: (id: string) => void;
|
|
43
|
-
/** Get all in-progress exports */
|
|
44
|
-
getInProgressExports: () => ActiveExport[];
|
|
45
|
-
/** Get all exports as an array */
|
|
46
|
-
getAllExports: () => ActiveExport[];
|
|
47
|
-
/** Clear all completed/failed exports */
|
|
48
|
-
clearCompleted: () => void;
|
|
49
|
-
/** Check if there are any in-progress exports */
|
|
50
|
-
hasInProgressExports: () => boolean;
|
|
51
|
-
};
|
|
52
|
-
export type ExportStore = ExportStoreState & {
|
|
53
|
-
actions: ExportStoreActions;
|
|
54
|
-
};
|
|
55
|
-
export declare const useExportStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<ExportStore>, "setState"> & {
|
|
56
|
-
setState(nextStateOrUpdater: ExportStore | Partial<ExportStore> | ((state: import('immer').WritableDraft<ExportStore>) => void), shouldReplace?: false): void;
|
|
57
|
-
setState(nextStateOrUpdater: ExportStore | ((state: import('immer').WritableDraft<ExportStore>) => void), shouldReplace: true): void;
|
|
58
|
-
}>;
|
|
59
|
-
export declare const useExportActions: () => ExportStoreActions;
|
|
60
|
-
export declare const useActiveExports: () => Map<string, ActiveExport>;
|
|
61
|
-
export declare const useInProgressExportsCount: () => number;
|
|
62
|
-
export {};
|