react-semaphor 0.1.609 → 0.1.611
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/.gate-build-input +1 -0
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/appearance-provider-nxBjHmOo.js +708 -0
- package/dist/chunks/{assistant-chat-DAmFZEnD.js → assistant-chat-DGaSGyx_.js} +13 -13
- package/dist/chunks/{attachment-filter-line-ClTS4GvQ.js → attachment-filter-line-CVkfzZF9.js} +1 -1
- package/dist/chunks/{bookmark-impact-BEVaXjug.js → bookmark-impact-DnhE262D.js} +1 -1
- package/dist/chunks/{bookmark-state-DnkzIsyw.js → bookmark-state-CrJDZi3y.js} +1 -1
- package/dist/chunks/{brand-BjC1mPjw.js → brand-BjIkbHgw.js} +1 -1
- package/dist/chunks/card-filter-builder-9xCSYFNv.js +11 -0
- package/dist/chunks/{check-input-qgwboKei.js → check-input-DmKJoLY-.js} +1 -1
- package/dist/chunks/{comparison-window-caption-WzGsqv4n.js → comparison-window-caption-DImvKgCt.js} +1 -1
- package/dist/chunks/currency-presentation-binding-DCHJ2sRD.js +1 -0
- package/dist/chunks/{custom-visual-inputs-CoAs_73N.js → custom-visual-inputs-C2BRX8l_.js} +1 -1
- package/dist/chunks/{custom-visual-write-BWApKrHe.js → custom-visual-write-CYA-Y9YF.js} +1 -1
- package/dist/chunks/{dashboard-DbBgEesz.js → dashboard-DEsWObFS.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-PzvxJm1T.js +42 -0
- package/dist/chunks/{dashboard-controls-CyQg_GC1.js → dashboard-controls-DPVMjbpG.js} +5 -5
- package/dist/chunks/{dashboard-json-ZSAQQkcR.js → dashboard-json-CWJ6drfv.js} +1 -1
- package/dist/chunks/{dashboard-temporal-snapshot-BSTfqT29.js → dashboard-temporal-snapshot-C2y8qWoK.js} +1 -1
- package/dist/chunks/dates-ByeRG2Tz.js +1 -0
- package/dist/chunks/edit-dashboard-visual-BxwhXWe2.js +103 -0
- package/dist/chunks/{filter-line-W-qQAjke.js → filter-line-BpaHAj8x.js} +1 -1
- package/dist/chunks/filter-reach-preview-C9WDhZaV.js +1 -0
- package/dist/chunks/{filter-value-text-DQwYZHz0.js → filter-value-text-vD4CXg9H.js} +1 -1
- package/dist/chunks/{kpi-trend-rule-B4ebKzNj.js → kpi-trend-rule-H3cLKxwe.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-B6Auo_Up.js +1 -0
- package/dist/chunks/{matrix-member-presentation-Chz6uGYz.js → matrix-member-presentation-B6wzUGA9.js} +1 -1
- package/dist/chunks/matrix-operation-contract-1dtkh4UB.js +1 -0
- package/dist/chunks/{metric-formatting-toJrRqu4.js → metric-formatting-BF1b9EEC.js} +1 -1
- package/dist/chunks/numeric-range-options-B_EcRH8C.js +1 -0
- package/dist/chunks/{palette-DpLPXjUd.js → palette-DLYro9VS.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-Bl55bAD9.js +1 -0
- package/dist/chunks/{pivot-result-identity-DRhVJMsF.js → pivot-result-identity-CAP9xTVF.js} +1 -1
- package/dist/chunks/{raw-temporal-value-B4Md6Xfb.js → raw-temporal-value-DqmEQqi9.js} +1 -1
- package/dist/chunks/report-preferences-dialog-CV0NMmo0.js +1 -0
- package/dist/chunks/report-runtime-context-DUyoI64N.js +1 -0
- package/dist/chunks/resolve-dashboard-input-context-D3lfJtPf.js +8 -0
- package/dist/chunks/{sandbox-host-BqcLSoTV.js → sandbox-host-DTsb-07w.js} +1 -1
- package/dist/chunks/saved-dashboard-context-pT-jLe_M.js +1 -0
- package/dist/chunks/{selection-filter-compiler-BxtEEB6Z.js → selection-filter-compiler-D2O1G8aM.js} +1 -1
- package/dist/chunks/semaphor-ready-indicator-X4VBj9J1.js +542 -0
- package/dist/chunks/{slider-C2nbml5r.js → slider-BuDy7URL.js} +5 -5
- package/dist/chunks/stored-dashboard-CtbTHA6d.js +1 -0
- package/dist/chunks/table-cell-text-CcdZI7W5.js +1 -0
- package/dist/chunks/{table-export-sheet-CthBUHu4.js → table-export-sheet-CR05ORx7.js} +1 -1
- package/dist/chunks/{token-types-BM0mpZce.js → token-types-DapH4m_I.js} +1 -1
- package/dist/chunks/validators-D6oX9c_4.js +1 -0
- package/dist/chunks/{variable-draft-DAVLIY3l.js → variable-draft-BugdJvFc.js} +1 -1
- package/dist/chunks/work-days-BbCJDTJK.js +1 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/extensions/index.js +1 -1
- package/dist/format-utils/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/briefings/index.d.ts +1 -1
- package/dist/types/briefings/run-failures.d.ts +67 -0
- package/dist/types/components/surfboard/index.d.ts +1 -0
- package/dist/types/components/surfboard/preferences/work-day-toggles.d.ts +16 -0
- package/dist/types/components/ui-custom/date-range-presets.d.ts +4 -1
- package/dist/types/components/visual/data-table/column-display/link-fields.d.ts +29 -0
- package/dist/types/components/visual/data-table/types/data-table.d.ts +6 -1
- package/dist/types/index.js +1 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +2 -0
- package/dist/types/lib/types/briefing-types.d.ts +4 -0
- package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +4 -2
- package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +2 -1
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +9 -1
- package/dist/types/shared/dashboard-authoring/card-data-source/data-source-selection.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-display.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/frame-cards.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +13 -10
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +16 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/sheet-kinds.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/table-sheet-shape.d.ts +53 -3
- package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +7 -0
- package/dist/types/shared/extensions/saved-refs.d.ts +1 -15
- package/dist/types/shared/report-runtime-context/index.d.ts +1 -0
- package/dist/types/shared/report-runtime-context/report-runtime-context.d.ts +22 -1
- package/dist/types/shared/report-runtime-context/work-days.d.ts +31 -0
- package/dist/types/shared/temporal/calendar-periods.d.ts +1 -1
- package/dist/types/shared/usage-events/details.d.ts +2 -2
- package/package.json +7 -5
- package/dist/chunks/appearance-provider-BW022_Qu.js +0 -613
- package/dist/chunks/card-filter-builder-BGIVEHmJ.js +0 -11
- package/dist/chunks/currency-presentation-binding-ClrH_6Tq.js +0 -1
- package/dist/chunks/dashboard-briefing-launcher-DadG4ES9.js +0 -42
- package/dist/chunks/edit-dashboard-visual-DIF1fllI.js +0 -103
- package/dist/chunks/filter-reach-preview-CfbwaLf4.js +0 -1
- package/dist/chunks/layout-grid-Cs350bW-.js +0 -6
- package/dist/chunks/matrix-analytical-definition-jn075ooo.js +0 -1
- package/dist/chunks/matrix-operation-contract-DceN49RX.js +0 -1
- package/dist/chunks/numeric-range-options-Drc1EZ6H.js +0 -1
- package/dist/chunks/pivot-result-contract-expectations-D_ane7I2.js +0 -1
- package/dist/chunks/report-preferences-dialog-DEfUYExu.js +0 -1
- package/dist/chunks/report-runtime-context-CkxgMKr6.js +0 -1
- package/dist/chunks/resolve-dashboard-input-context-Dm4PD8Gx.js +0 -8
- package/dist/chunks/saved-dashboard-context-GjEJuDjj.js +0 -1
- package/dist/chunks/semaphor-ready-indicator-BViyPq5k.js +0 -622
- package/dist/chunks/set-q-2M4nis.js +0 -1
- package/dist/chunks/stored-dashboard-CTwrNvBy.js +0 -1
- package/dist/chunks/table-cell-text-DJe6I1G3.js +0 -1
- package/dist/chunks/validators-U8IL8djK.js +0 -1
- package/dist/types/briefings/run-outcomes.d.ts +0 -6
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { TCard } from '../../lib/types/common-types.js';
|
|
2
2
|
import { Field, GroupByField, PivotByField, AggregateFunction } from '../../lib/types/explorer-types.js';
|
|
3
|
+
import { FieldPlacementOutcome } from '../../lib/utils/field-placement.js';
|
|
3
4
|
import { FieldAvailabilityContext } from '../../lib/utils/field-availability-context.js';
|
|
5
|
+
import { TableColumnId } from '../dashboard-viewer/table-settings.js';
|
|
6
|
+
import { CardColumnRef } from './conditional-formatting/types.js';
|
|
4
7
|
/**
|
|
5
8
|
* A Table sheet's table as a shape (table sheets TS-D30): every row, one row
|
|
6
9
|
* per group (Flat) or levels that open and close (Collapsible). The author
|
|
@@ -71,8 +74,9 @@ export declare function unspreadAcross(card: TCard, across: ColumnRef, ctx: Shap
|
|
|
71
74
|
* Columns pane's grip. A Collapsible table moves the Matrix level as its Axis
|
|
72
75
|
* menu does (`moveMatrixLevel`); a Flat one reorders its Group by or pivot
|
|
73
76
|
* fields. Nothing else changes, so a level keeps its grain, sort and label.
|
|
77
|
+
* Values move among the values (`reorderValues`), whatever the table's shape.
|
|
74
78
|
*/
|
|
75
|
-
export declare function reorderShape(card: TCard, lane: 'levels' | 'across', ref: ColumnRef, before: ColumnRef | undefined, ctx: ShapeContext): ShapeChange;
|
|
79
|
+
export declare function reorderShape(card: TCard, lane: 'levels' | 'across' | 'values', ref: ColumnRef, before: ColumnRef | undefined, ctx: ShapeContext): ShapeChange;
|
|
76
80
|
/**
|
|
77
81
|
* Show a summary Flat (one row per group, paged by row) or Collapsible
|
|
78
82
|
* (levels, paged by level); Collapsible needs a level.
|
|
@@ -92,15 +96,43 @@ export type ShapeMeasure = {
|
|
|
92
96
|
label: string;
|
|
93
97
|
aggregate?: string;
|
|
94
98
|
dataType?: string;
|
|
99
|
+
/** What a highlight rule on it points at: a Flat table's field, a Collapsible table's Matrix measure. */
|
|
100
|
+
columnRef: CardColumnRef;
|
|
101
|
+
/** A Flat table's column (its visibility and pin live there); none on a Collapsible table. */
|
|
102
|
+
columnId?: TableColumnId;
|
|
103
|
+
pinned?: boolean;
|
|
95
104
|
};
|
|
96
|
-
/**
|
|
97
|
-
|
|
105
|
+
/**
|
|
106
|
+
* The table's values as the sheet lists them, whatever card type holds them,
|
|
107
|
+
* in the order the table draws them: a Collapsible table's Matrix order, a
|
|
108
|
+
* Flat table's drawn column order (`drawnTableColumnOrder`: the stored order
|
|
109
|
+
* over its fields, pinned first). A Collapsible value is named as the Matrix
|
|
110
|
+
* names it (an author's rename included) and, with the catalog, names its
|
|
111
|
+
* dataset (the Matrix resolver), so two datasets' fields of one name stay two
|
|
112
|
+
* values. A calculated value has no aggregate of its own.
|
|
113
|
+
*/
|
|
114
|
+
export declare function readMeasures(card: TCard, catalog?: readonly Field[]): ShapeMeasure[];
|
|
115
|
+
/**
|
|
116
|
+
* Where a value moved to the gap before `to` (`values.length` for last) lands
|
|
117
|
+
* among its own pin group: after the group neighbour just before the gap, or
|
|
118
|
+
* before the one just after it. Undefined when the gap is outside the group, so
|
|
119
|
+
* the move draws nothing different. The Values lane's mark asks the same.
|
|
120
|
+
*/
|
|
121
|
+
export declare function valueAnchor(values: readonly Pick<ShapeMeasure, 'ref' | 'pinned'>[], from: number, to: number): {
|
|
122
|
+
side: "after";
|
|
123
|
+
value: Pick<ShapeMeasure, "pinned" | "ref">;
|
|
124
|
+
} | {
|
|
125
|
+
side: "before";
|
|
126
|
+
value: Pick<ShapeMeasure, "pinned" | "ref">;
|
|
127
|
+
} | undefined;
|
|
98
128
|
/** A level or a spread field as the sheet lists it: how to name it, and how to remove it. */
|
|
99
129
|
export type ShapeItem = {
|
|
100
130
|
readonly ref: ColumnRef;
|
|
101
131
|
readonly label: string;
|
|
102
132
|
readonly grain?: string;
|
|
103
133
|
readonly dataType?: string;
|
|
134
|
+
/** A Flat level's column (its visibility lives there). */
|
|
135
|
+
readonly columnId?: TableColumnId;
|
|
104
136
|
};
|
|
105
137
|
/** The table's levels (rows) and spread fields (across), whatever card type holds them. */
|
|
106
138
|
export declare function readShape(card: TCard,
|
|
@@ -110,6 +142,8 @@ catalog?: readonly Field[]): {
|
|
|
110
142
|
levels: ShapeItem[];
|
|
111
143
|
across: ShapeItem[];
|
|
112
144
|
};
|
|
145
|
+
/** The columns of a table that shows every row, as the sheet lists them (its bar counts them, its pane marks them). */
|
|
146
|
+
export declare function readColumns(card: TCard): ShapeItem[];
|
|
113
147
|
/** A column's field by its id: a column showing every row, a level, a spread field or a measure. */
|
|
114
148
|
export declare function shapeField(card: TCard, id: string | undefined): Field | undefined;
|
|
115
149
|
/** The grains a date groups or spreads at on a Table sheet: never by day (TS-D33). */
|
|
@@ -146,3 +180,19 @@ export declare function matrixColumnField(card: TCard, id: string): {
|
|
|
146
180
|
} | undefined;
|
|
147
181
|
/** A new Table sheet's table: every row, nothing placed yet (TS-D36). */
|
|
148
182
|
export declare function everyRowCard(card: TCard): TCard;
|
|
183
|
+
/**
|
|
184
|
+
* Clear fields on a Table sheet (TS-D44): the table back to how a new sheet's
|
|
185
|
+
* starts (`everyRowCard`), whatever its shape was. A Collapsible table leaves
|
|
186
|
+
* its Matrix through the type change first (`asFlat`), so the filters and
|
|
187
|
+
* joins it keeps inside the Matrix stay the table's; then the editor's shelf
|
|
188
|
+
* reset (`clearedCardShelves`) empties every placement and the total row goes
|
|
189
|
+
* off (`writeTableTotals`), as a new sheet's is. Its data, joins and filters stay.
|
|
190
|
+
*/
|
|
191
|
+
export declare function clearTableSheet(card: TCard, ctx: ShapeContext): ShapeChange;
|
|
192
|
+
/**
|
|
193
|
+
* The new value a placement would add, by name: the editor's own dry run of
|
|
194
|
+
* the drop (`previewFieldPlacement`, every naming step included: its
|
|
195
|
+
* aggregate, a repeat, a related dataset's folder) read through `readMeasures`
|
|
196
|
+
* on the card it would make. The bar's drop preview shows exactly this.
|
|
197
|
+
*/
|
|
198
|
+
export declare function addedValueLabel(card: TCard, outcome: FieldPlacementOutcome | undefined): string | undefined;
|
|
@@ -20,6 +20,13 @@ import { TableColumnId } from './table-settings.js';
|
|
|
20
20
|
* with it and the writer normalizes a stored order with it.
|
|
21
21
|
*/
|
|
22
22
|
export declare function arrangeByOrder<T>(items: readonly T[], idOf: (item: T) => TableColumnId | undefined, order: readonly TableColumnId[]): T[];
|
|
23
|
+
/**
|
|
24
|
+
* Whether a column can be held at the table's left edge (PIN-2): any column,
|
|
25
|
+
* but in a pivoted table only a row dimension (a measure repeats per pivot
|
|
26
|
+
* value, so it can't be pinned). The table view and a Table sheet's Values
|
|
27
|
+
* lane read pins through this one rule.
|
|
28
|
+
*/
|
|
29
|
+
export declare function canPinTableColumn(columnId: TableColumnId, pivoted: boolean): boolean;
|
|
23
30
|
/** True when no dimension follows a measure in a pivoted table; always true without pivots. */
|
|
24
31
|
export declare function orderKeepsPivotRule(order: readonly TableColumnId[], pivoted: boolean): boolean;
|
|
25
32
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TDashboard } from '../../lib/types/common-types.js';
|
|
2
2
|
/** What a save made of one card's draft (EXT-D3): the version it now names. */
|
|
3
3
|
export type SavedCustomVisual = {
|
|
4
4
|
cardId: string;
|
|
@@ -17,17 +17,3 @@ export declare function withSavedCustomVisuals<T extends Pick<TDashboard, 'sheet
|
|
|
17
17
|
saved: readonly SavedCustomVisual[];
|
|
18
18
|
sent?: Pick<TDashboard, 'sheets'>;
|
|
19
19
|
}): T;
|
|
20
|
-
/**
|
|
21
|
-
* A frame as Copy puts it on the clipboard (review P5A-03): each saved
|
|
22
|
-
* visual becomes a draft of its HTML, and an unsaved edit keeps its draft
|
|
23
|
-
* without the visual it edits, each keeping its slots and settings, so the
|
|
24
|
-
* paste works on any dashboard. There it is that dashboard's own new visual,
|
|
25
|
-
* saved and checked like any new code (CV2-D10: a visual belongs to one
|
|
26
|
-
* dashboard). `load` reads a version's HTML; a failure is the caller's.
|
|
27
|
-
*/
|
|
28
|
-
export declare function withCustomVisualDrafts<F extends {
|
|
29
|
-
cards: TCard[];
|
|
30
|
-
}>(frame: F, load: (ref: {
|
|
31
|
-
extensionId: string;
|
|
32
|
-
version: number;
|
|
33
|
-
}) => Promise<string>): Promise<F>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReportPreferenceSource, ResolvedValueFormatPreferenceSources, ResolvedValueFormatPreferences } from '../value-format-preferences/index.js';
|
|
2
|
+
import { WorkDays } from './work-days.js';
|
|
2
3
|
export type WeekStart = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
4
|
export type MonthAlignedFiscalCalendar = {
|
|
4
5
|
kind: 'month_aligned';
|
|
@@ -11,19 +12,33 @@ export type CalendarContext = {
|
|
|
11
12
|
iso: string;
|
|
12
13
|
};
|
|
13
14
|
fiscalCalendar?: MonthAlignedFiscalCalendar;
|
|
15
|
+
/** Absent reads as `DEFAULT_WORK_DAYS`; read it with `calendarWorkDays`. */
|
|
16
|
+
workDays?: WorkDays;
|
|
14
17
|
};
|
|
15
18
|
export declare const DEFAULT_CALENDAR_CONTEXT: CalendarContext;
|
|
19
|
+
/**
|
|
20
|
+
* The instant a report calendar's relative dates are measured from: its
|
|
21
|
+
* pinned anchor, else the clock. The one reading of `anchor` in the browser,
|
|
22
|
+
* so a preview, a quick choice and a drill resolve the day the server does.
|
|
23
|
+
*/
|
|
24
|
+
export declare function calendarNow(calendar: {
|
|
25
|
+
anchor?: CalendarContext['anchor'];
|
|
26
|
+
} | null | undefined): Date;
|
|
16
27
|
export type CalendarPreferences = {
|
|
17
28
|
tz?: string;
|
|
18
29
|
weekStart?: WeekStart;
|
|
30
|
+
/** The days the business works (previous business day plan, BD-D5, BD-D8). */
|
|
31
|
+
workDays?: WorkDays;
|
|
19
32
|
};
|
|
20
33
|
export type ResolvedCalendarPreferences = {
|
|
21
34
|
tz: string;
|
|
22
35
|
weekStart: WeekStart;
|
|
36
|
+
workDays: WorkDays;
|
|
23
37
|
};
|
|
24
38
|
export type ResolvedCalendarPreferenceSources = {
|
|
25
39
|
tz: ReportPreferenceSource;
|
|
26
40
|
weekStart: ReportPreferenceSource;
|
|
41
|
+
workDays: ReportPreferenceSource;
|
|
27
42
|
};
|
|
28
43
|
export type CalendarPreferencesResponse = {
|
|
29
44
|
stored: CalendarPreferences | null;
|
|
@@ -43,7 +58,7 @@ export type ReportRuntimeContext = {
|
|
|
43
58
|
};
|
|
44
59
|
export type ReportRuntimeContextValidationIssue = {
|
|
45
60
|
path: string;
|
|
46
|
-
code: 'invalid_type' | 'unknown_property' | 'invalid_timezone' | 'invalid_week_start' | 'invalid_anchor' | 'invalid_fiscal_calendar' | 'invalid_value_format' | 'invalid_preference_source';
|
|
61
|
+
code: 'invalid_type' | 'unknown_property' | 'invalid_timezone' | 'invalid_week_start' | 'invalid_work_days' | 'invalid_anchor' | 'invalid_fiscal_calendar' | 'invalid_value_format' | 'invalid_preference_source';
|
|
47
62
|
message: string;
|
|
48
63
|
};
|
|
49
64
|
export type ReportRuntimeContextParseResult<T> = {
|
|
@@ -53,6 +68,12 @@ export type ReportRuntimeContextParseResult<T> = {
|
|
|
53
68
|
ok: false;
|
|
54
69
|
issues: ReportRuntimeContextValidationIssue[];
|
|
55
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Working days as stored or sent (BD-D5): one to seven different weekdays,
|
|
73
|
+
* 0 to 6, returned sorted. An empty list, a duplicate or any other value is
|
|
74
|
+
* refused, never repaired.
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseWorkDays(input: unknown, path?: string): ReportRuntimeContextParseResult<WorkDays>;
|
|
56
77
|
export declare function parseCalendarContext(input: unknown): ReportRuntimeContextParseResult<CalendarContext>;
|
|
57
78
|
export declare function parseCalendarPreferencesResponse(input: unknown): ReportRuntimeContextParseResult<CalendarPreferencesResponse>;
|
|
58
79
|
export declare function parseReportRuntimeContext(input: unknown): ReportRuntimeContextParseResult<ReportRuntimeContext>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { WeekStart } from './report-runtime-context.js';
|
|
2
|
+
/**
|
|
3
|
+
* The weekdays a business works, numbered as `weekStart` is (0 Sunday to 6
|
|
4
|
+
* Saturday): sorted, no duplicates, at least one day. Week start never moves
|
|
5
|
+
* them.
|
|
6
|
+
*/
|
|
7
|
+
export type WorkDays = WeekStart[];
|
|
8
|
+
/** Monday to Friday: what a calendar without `workDays` works (BD-D5, BD-INV-3). */
|
|
9
|
+
export declare const DEFAULT_WORK_DAYS: readonly WeekStart[];
|
|
10
|
+
/** The weekdays a calendar works: its own, or Monday to Friday (BD-D5). */
|
|
11
|
+
export declare function calendarWorkDays(calendar: {
|
|
12
|
+
workDays?: readonly WeekStart[];
|
|
13
|
+
}): readonly WeekStart[];
|
|
14
|
+
/** A weekday's name, 0 Sunday to 6 Saturday. */
|
|
15
|
+
export declare function weekdayName(day: WeekStart): string;
|
|
16
|
+
/** A weekday's three-letter name, as a Working days toggle shows it. */
|
|
17
|
+
export declare function weekdayShortName(day: WeekStart): string;
|
|
18
|
+
/** The seven weekdays in week-start order, as the Working days toggles show them (BD-D9). */
|
|
19
|
+
export declare function weekdaysInWeekOrder(weekStart: WeekStart): WeekStart[];
|
|
20
|
+
/**
|
|
21
|
+
* Working days with one day turned on or off, sorted (BD-D9). The last
|
|
22
|
+
* working day stays on: a calendar works at least one day (BD-D5).
|
|
23
|
+
*/
|
|
24
|
+
export declare function toggleWorkDay(workDays: readonly WeekStart[], day: WeekStart): WorkDays;
|
|
25
|
+
/**
|
|
26
|
+
* Working days in words (BD-D9): "Monday to Friday", "Sunday to Thursday",
|
|
27
|
+
* "every day", "Wednesday", or a list in week-start order, "Monday, Wednesday
|
|
28
|
+
* and Friday". A run of three or more days in a row reads as its first to its
|
|
29
|
+
* last, around the end of the week when it crosses it.
|
|
30
|
+
*/
|
|
31
|
+
export declare function describeWorkDays(workDays: readonly WeekStart[], weekStart: WeekStart): string;
|
|
@@ -6,7 +6,7 @@ export type TemporalUnit = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'mont
|
|
|
6
6
|
* What period math reads from a calendar. The anchor ("now") is never read
|
|
7
7
|
* here: callers pass the instant they resolve against.
|
|
8
8
|
*/
|
|
9
|
-
export type TemporalCalendar = Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar'>;
|
|
9
|
+
export type TemporalCalendar = Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar' | 'workDays'>;
|
|
10
10
|
/** Every instant from `start` up to, not including, `endExclusive`. */
|
|
11
11
|
export type TemporalPeriod = {
|
|
12
12
|
start: Date;
|
|
@@ -273,7 +273,7 @@ export declare const exportCompletedDetailsSchema: z.ZodObject<{
|
|
|
273
273
|
mechanism: "rendered" | "job" | "matrix_direct";
|
|
274
274
|
scope?: "card" | "dashboard" | "visual" | undefined;
|
|
275
275
|
rows?: number | undefined;
|
|
276
|
-
stage?: "create" | "
|
|
276
|
+
stage?: "create" | "deadline" | "acquire" | "render" | undefined;
|
|
277
277
|
chunks?: number | undefined;
|
|
278
278
|
bytes?: number | undefined;
|
|
279
279
|
export_id?: string | undefined;
|
|
@@ -282,7 +282,7 @@ export declare const exportCompletedDetailsSchema: z.ZodObject<{
|
|
|
282
282
|
mechanism: "rendered" | "job" | "matrix_direct";
|
|
283
283
|
scope?: "card" | "dashboard" | "visual" | undefined;
|
|
284
284
|
rows?: number | undefined;
|
|
285
|
-
stage?: "create" | "
|
|
285
|
+
stage?: "create" | "deadline" | "acquire" | "render" | undefined;
|
|
286
286
|
chunks?: number | undefined;
|
|
287
287
|
bytes?: number | undefined;
|
|
288
288
|
export_id?: string | undefined;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "support@semaphor.cloud"
|
|
6
6
|
},
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.611",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -120,9 +120,9 @@
|
|
|
120
120
|
"dev": "vite",
|
|
121
121
|
"build": "node scripts/build.mjs",
|
|
122
122
|
"build:frame-formatter": "node scripts/build-frame-formatter.mjs",
|
|
123
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
124
|
-
"lint:regressions": "node scripts/lint-
|
|
125
|
-
"check:guards": "node scripts/
|
|
123
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --cache --cache-location node_modules/.cache/eslint/",
|
|
124
|
+
"lint:regressions": "node ../semaphor-app/scripts/gate/lint-new.mjs --ext=.ts,.tsx,.mjs --all",
|
|
125
|
+
"check:guards": "node scripts/check-guards.mjs",
|
|
126
126
|
"preview": "vite preview",
|
|
127
127
|
"test": "vitest run",
|
|
128
128
|
"test:changed": "vitest run --changed",
|
|
@@ -148,7 +148,9 @@
|
|
|
148
148
|
"link:check": "./scripts/link-helper.sh check",
|
|
149
149
|
"link:create": "./scripts/link-helper.sh link",
|
|
150
150
|
"link:remove": "./scripts/link-helper.sh unlink",
|
|
151
|
-
"link:restore": "./scripts/link-helper.sh restore"
|
|
151
|
+
"link:restore": "./scripts/link-helper.sh restore",
|
|
152
|
+
"typecheck": "tsc --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsc/tsbuildinfo",
|
|
153
|
+
"gate": "node ../semaphor-app/scripts/gate/run.mjs"
|
|
152
154
|
},
|
|
153
155
|
"dependencies": {
|
|
154
156
|
"@ai-sdk/react": "^4.0.140",
|