react-semaphor 0.1.530 → 0.1.532

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.
Files changed (21) hide show
  1. package/dist/analytics-protocol/index.js +40 -39
  2. package/dist/brand-studio/index.js +1 -1
  3. package/dist/chunks/{relative-date-P4o6ME04.js → calendar-day-equality-Ddkpfhot.js} +75 -65
  4. package/dist/chunks/{dashboard-BC-EC5M_.js → dashboard-BoSKlMPx.js} +1 -1
  5. package/dist/chunks/{dashboard-briefing-launcher-CwyFda8i.js → dashboard-briefing-launcher-BR5llbxb.js} +3 -3
  6. package/dist/chunks/{dashboard-controls-Bqg8vlyr.js → dashboard-controls-4Thl0eL1.js} +4 -4
  7. package/dist/chunks/{dashboard-json-DVicOlh9.js → dashboard-json-Ez0I7b2H.js} +1 -1
  8. package/dist/chunks/{edit-dashboard-visual-D4k246cQ.js → edit-dashboard-visual-DpGb6dpY.js} +713 -711
  9. package/dist/chunks/{editor-action-buttons-DKIZkBTZ.js → editor-action-buttons--SQ3CcBI.js} +2 -2
  10. package/dist/chunks/{report-preferences-dialog-DFpOrZ02.js → report-preferences-dialog-Cv_2GMlz.js} +5 -5
  11. package/dist/chunks/{semaphor-ready-indicator-DBb9d0Xp.js → semaphor-ready-indicator-lALyc-pQ.js} +32706 -32762
  12. package/dist/chunks/{slider-BibKRCxX.js → slider-DlRYiI2m.js} +3 -3
  13. package/dist/chunks/{switch-Bql-RCoZ.js → switch-CCOKraBb.js} +1703 -1696
  14. package/dist/dashboard/index.js +1 -1
  15. package/dist/index.js +8 -8
  16. package/dist/surfboard/index.js +1 -1
  17. package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -6
  18. package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +12 -1
  19. package/dist/types/shared/temporal/calendar-day-equality.d.ts +18 -0
  20. package/dist/types/shared/temporal/index.d.ts +1 -0
  21. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { D as o } from "../chunks/dashboard-BC-EC5M_.js";
1
+ import { D as o } from "../chunks/dashboard-BoSKlMPx.js";
2
2
  import { C as s, E as C } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  s as CONTROL_CARD_DEFAULT_VALUE,
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { D as j } from "./chunks/dashboard-BC-EC5M_.js";
1
+ import { D as j } from "./chunks/dashboard-BoSKlMPx.js";
2
2
  import { C as Ze, E as ea } from "./chunks/common-types-C6cAQgyh.js";
3
- import { a as ta, R as ra, D as sa } from "./chunks/report-preferences-dialog-DFpOrZ02.js";
3
+ import { a as ta, R as ra, D as sa } from "./chunks/report-preferences-dialog-Cv_2GMlz.js";
4
4
  import { jsx as n, jsxs as C } from "react/jsx-runtime";
5
- import { E as _, F as k, S as I, a as M, U as O, c as U, C as V, V as z, d as $, e as H, f as W, g as q, I as K, R as Q, h as G, i as Y, j as J, k as X } from "./chunks/semaphor-ready-indicator-DBb9d0Xp.js";
6
- import { ak as na, al as ia, am as la, B as ca, T as ua, A as da, y as pa, x as fa, at as ha, M as ma, m as ga, p as Ca, p as ya, q as ba, z as Ea, af as Da, ah as va, ai as Aa, ag as xa, a6 as wa, a9 as Sa, as as Ta, Z as Ba, ae as Na, ao as _a, a1 as Fa, aa as Pa, w as Ra, v as La, aw as ja, Y as ka, ab as Ia, ac as Ma, a5 as Oa, a8 as Ua, ar as Va, aq as za, ap as $a, av as Ha, au as Wa, a7 as qa, X as Ka, W as Qa, $ as Ga, ad as Ya, a3 as Ja, a0 as Xa, a2 as Za, a4 as et, _ as at, O as tt, K as rt, an as st, t as ot, H as nt, s as it, l as lt, G as ct, J as ut, n as dt, Q as pt, N as ft, L as ht, P as mt, u as gt, r as Ct, o as yt, aj as bt } from "./chunks/semaphor-ready-indicator-DBb9d0Xp.js";
7
- import { u as Z, P as ee, a as ae, B as te, c as B, b as re, d as se } from "./chunks/switch-Bql-RCoZ.js";
8
- import { a1 as Dt, M as vt, z as At, A as xt, E as wt, O as St, N as Tt, W as Bt, X as Nt, K as _t, D as Ft, J as Pt, Q as Rt, H as Lt, G as jt, F as kt, Y as It, V as Mt, Z as Ot, $ as Ut, _ as Vt, a0 as zt, a3 as $t, a2 as Ht } from "./chunks/switch-Bql-RCoZ.js";
5
+ import { E as _, F as k, S as I, a as M, U as O, c as U, C as V, V as z, d as $, e as H, f as W, g as q, I as K, R as Q, h as G, i as Y, j as J, k as X } from "./chunks/semaphor-ready-indicator-lALyc-pQ.js";
6
+ import { ak as na, al as ia, am as la, B as ca, T as ua, A as da, y as pa, x as fa, at as ha, M as ma, m as ga, p as Ca, p as ya, q as ba, z as Ea, af as Da, ah as va, ai as Aa, ag as xa, a6 as wa, a9 as Sa, as as Ta, Z as Ba, ae as Na, ao as _a, a1 as Fa, aa as Pa, w as Ra, v as La, aw as ja, Y as ka, ab as Ia, ac as Ma, a5 as Oa, a8 as Ua, ar as Va, aq as za, ap as $a, av as Ha, au as Wa, a7 as qa, X as Ka, W as Qa, $ as Ga, ad as Ya, a3 as Ja, a0 as Xa, a2 as Za, a4 as et, _ as at, O as tt, K as rt, an as st, t as ot, H as nt, s as it, l as lt, G as ct, J as ut, n as dt, Q as pt, N as ft, L as ht, P as mt, u as gt, r as Ct, o as yt, aj as bt } from "./chunks/semaphor-ready-indicator-lALyc-pQ.js";
7
+ import { u as Z, P as ee, a as ae, B as te, c as B, b as re, d as se } from "./chunks/switch-CCOKraBb.js";
8
+ import { a1 as Dt, M as vt, z as At, A as xt, E as wt, O as St, N as Tt, W as Bt, X as Nt, K as _t, D as Ft, J as Pt, Q as Rt, H as Lt, G as jt, F as kt, Y as It, V as Mt, Z as Ot, $ as Ut, _ as Vt, a0 as zt, a3 as $t, a2 as Ht } from "./chunks/switch-CCOKraBb.js";
9
9
  import * as w from "react";
10
10
  import F, { useMemo as oe, useEffect as P } from "react";
11
11
  import { D as qt } from "./chunks/token-types-Brc30mNN.js";
12
12
  import { C as Qt, D as Gt, L as Yt, P as Jt, f as Xt, g as Zt, k as er, j as ar, l as tr, e as rr, c as sr, b as or, d as nr, n as ir, h as lr } from "./chunks/validators-BS521dum.js";
13
- import { A as ur, h as dr, D as pr, f as fr, g as hr, e as mr, b as gr, E as Cr, N as yr, U as br, a as Er, V as Dr, W as vr, u as Ar, c as xr, d as wr } from "./chunks/dashboard-briefing-launcher-CwyFda8i.js";
13
+ import { A as ur, h as dr, D as pr, f as fr, g as hr, e as mr, b as gr, E as Cr, N as yr, U as br, a as Er, V as Dr, W as vr, u as Ar, c as xr, d as wr } from "./chunks/dashboard-briefing-launcher-BR5llbxb.js";
14
14
  import { u as Tr } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
15
15
  import { createRoot as ne } from "react-dom/client";
16
- import "./chunks/slider-BibKRCxX.js";
16
+ import "./chunks/slider-DlRYiI2m.js";
17
17
  import "./chunks/matrix-operation-contract-BotZ-6zT.js";
18
18
  import "zod";
19
19
  import "./chunks/matrix-continuation-C4sRcjZU.js";
@@ -1,4 +1,4 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-DFpOrZ02.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-Cv_2GMlz.js";
2
2
  import { C as f, E as D } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
@@ -7,24 +7,32 @@ export type PresetOption = {
7
7
  value: (timezone: string, weekStart: WeekStart, now: Date) => DateRange;
8
8
  category: 'time' | 'year' | 'quarter' | 'month' | 'week' | 'day';
9
9
  };
10
- export type TemporalPrecisionChangeOptions = {
10
+ export type DateSelectionChangeOptions = {
11
11
  temporalPrecision?: TemporalPrecision;
12
+ /**
13
+ * The condition chosen in the popover, sent with the dates on Apply (and on
14
+ * a preset click) when the picker shows conditions (`comparisonOptions`).
15
+ */
16
+ operation?: DateComparisonOperation;
12
17
  };
13
18
  export interface DateRangePickerProps {
14
19
  value?: DateRange;
15
- onChange?: (range: DateRange | undefined, options?: TemporalPrecisionChangeOptions) => void;
20
+ onChange?: (range: DateRange | undefined, options?: DateSelectionChangeOptions) => void;
16
21
  selectionMode?: 'range' | 'single';
17
22
  singleValue?: Date;
18
- onSingleChange?: (date: Date | undefined, options?: TemporalPrecisionChangeOptions) => void;
23
+ onSingleChange?: (date: Date | undefined, options?: DateSelectionChangeOptions) => void;
19
24
  comparisonOptions?: Array<{
20
25
  value: DateComparisonOperation;
21
26
  label: string;
22
27
  }>;
28
+ /**
29
+ * The applied condition. The picker keeps its own draft condition, seeded
30
+ * from this, and sends it with the dates on Apply (`options.operation`).
31
+ */
23
32
  comparisonValue?: DateComparisonOperation;
24
- onComparisonChange?: (value: DateComparisonOperation) => void;
25
33
  comparisonLabel?: string;
26
34
  hideDateInputs?: boolean;
27
- onRelativeSelect?: (range: DateRange, meta: RelativeDateFilter, options?: TemporalPrecisionChangeOptions) => void;
35
+ onRelativeSelect?: (range: DateRange, meta: RelativeDateFilter, options?: DateSelectionChangeOptions) => void;
28
36
  /** Applied relative selection, used to restore the matching preset interval. */
29
37
  relativeValue?: RelativeDateFilter;
30
38
  placeholder?: string;
@@ -33,6 +41,10 @@ export interface DateRangePickerProps {
33
41
  showRelativeTab?: boolean;
34
42
  hideCalendar?: boolean;
35
43
  disabled?: boolean;
44
+ /**
45
+ * Time inputs are available. With conditions shown, the picker also applies
46
+ * the per-condition rule to its draft condition.
47
+ */
36
48
  enableTimePrecision?: boolean;
37
49
  temporalPrecision?: TemporalPrecision;
38
50
  buttonClassName?: string;
@@ -70,4 +82,4 @@ export interface DateRangePickerProps {
70
82
  /** Notifies nested-popover owners when this picker opens or closes. */
71
83
  onOpenChange?: (open: boolean) => void;
72
84
  }
73
- export declare function DateRangePicker({ value, onChange, selectionMode, singleValue, onSingleChange, comparisonOptions, comparisonValue, onComparisonChange, comparisonLabel, hideDateInputs, onRelativeSelect, relativeValue, placeholder, className, timezone, showRelativeTab, hideCalendar, disabled, enableTimePrecision, temporalPrecision, buttonClassName, buttonLabelSuffix, relativeSummary, singleValueLabel, contentClassName, overlayContentClassName, targetColumns, selectedColumn, onColumnChange, inline, onApplied, supplementalFooter, onOpenChange, }: DateRangePickerProps): import("react").JSX.Element;
85
+ export declare function DateRangePicker({ value, onChange, selectionMode, singleValue, onSingleChange, comparisonOptions, comparisonValue, comparisonLabel, hideDateInputs, onRelativeSelect, relativeValue, placeholder, className, timezone, showRelativeTab, hideCalendar, disabled, enableTimePrecision: timePrecisionAvailable, temporalPrecision, buttonClassName, buttonLabelSuffix, relativeSummary, singleValueLabel, contentClassName, overlayContentClassName, targetColumns, selectedColumn, onColumnChange, inline, onApplied, supplementalFooter, onOpenChange, }: DateRangePickerProps): import("react").JSX.Element;
@@ -4,7 +4,8 @@ export type TemporalFilterCapability = 'date-only' | 'datetime' | 'unknown';
4
4
  /**
5
5
  * Mirrors the governed comparison extractor's finite-window contract for
6
6
  * dashboard date controls: one date-valued `between` filter with two valid,
7
- * increasing bounds. Other date operators remain ordinary row constraints.
7
+ * increasing bounds, or "Is exactly" a calendar date (a whole day). Other
8
+ * date operators remain ordinary row constraints.
8
9
  */
9
10
  export declare function hasFiniteDateComparisonRange(filterValue: TFilterValue | undefined): boolean;
10
11
  export declare function getTemporalFilterCapability(dataType: unknown): TemporalFilterCapability;
@@ -31,6 +32,16 @@ export declare function formatTimeInTimezone(date: Date, timezone: string): stri
31
32
  export declare function composeDateTimeInTimezone(date: Date, time: string, timezone: string, options?: {
32
33
  boundary?: 'start' | 'end';
33
34
  }): Date | null;
35
+ /**
36
+ * The value a single-date filter stores. At day precision, "is exactly" and
37
+ * "is not exactly" store the picked calendar day (`YYYY-MM-DD` in the report
38
+ * timezone), which the server runs as that whole day; every other single-date
39
+ * operator, and minute precision, stores the instant as given.
40
+ */
41
+ export declare function normalizeDateFilterSingleValue(date: Date, operation: string, options: {
42
+ temporalPrecision?: TemporalPrecision;
43
+ timezone: string;
44
+ }): Date | string;
34
45
  /**
35
46
  * The range a date filter stores. At day precision, a single day (a start
36
47
  * with no end, or an end equal to the start) becomes that whole calendar day
@@ -0,0 +1,18 @@
1
+ /** An `=` or `!=` predicate whose one value names a calendar day. */
2
+ export type CalendarDayEquality = {
3
+ operation: '=' | '!=';
4
+ /** A `YYYY-MM-DD` date that names a real day. */
5
+ day: string;
6
+ };
7
+ /**
8
+ * The calendar-day equality a predicate states, or null: operator `=` or
9
+ * `!=`, exactly one value (an array of one, or a card condition's single
10
+ * value), that value a `YYYY-MM-DD` date naming a real day, and no minute
11
+ * precision. Instants, other operators and other value shapes are null. The
12
+ * data type is the caller's concern.
13
+ */
14
+ export declare function readCalendarDayEquality(predicate: {
15
+ operation: unknown;
16
+ values: unknown;
17
+ temporalPrecision?: unknown;
18
+ }): CalendarDayEquality | null;
@@ -2,4 +2,5 @@ export * from './zoned-wall-clock.js';
2
2
  export * from './calendar-periods.js';
3
3
  export * from './relative-date.js';
4
4
  export * from './time-window-periods.js';
5
+ export * from './calendar-day-equality.js';
5
6
  export * from './temporal-parity-fixtures.js';
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.530",
8
+ "version": "0.1.532",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",