react-semaphor 0.1.524 → 0.1.526

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 (82) hide show
  1. package/dist/brand-studio/index.js +37 -37
  2. package/dist/briefings/index.js +38 -33
  3. package/dist/chunks/{calculated-field-identity-Dy_WpDdo.js → calculated-field-identity-D1ofR4KJ.js} +28 -28
  4. package/dist/chunks/{card-config-utils-CAyjC5Tp.js → card-config-utils-9sv4e-Vb.js} +15 -15
  5. package/dist/chunks/{switch-CWPcwAZ4.js → code-highlight-994tgM9v.js} +6309 -8642
  6. package/dist/chunks/dashboard-CsHvEtjN.js +15 -0
  7. package/dist/chunks/{dashboard-briefing-launcher-CTEyh3FQ.js → dashboard-briefing-launcher-DXz1GhFZ.js} +364 -370
  8. package/dist/chunks/{dashboard-controls-C3KbYzz-.js → dashboard-controls-Df8qOSrs.js} +163 -168
  9. package/dist/chunks/dashboard-json-Xldp0qww.js +65 -0
  10. package/dist/chunks/{edit-dashboard-visual-DqRmfRqN.js → edit-dashboard-visual-COHBqyic.js} +2836 -2829
  11. package/dist/chunks/editor-action-buttons-DahlP57T.js +2071 -0
  12. package/dist/chunks/{index-D9HDUSye.js → index-CbjuruKe.js} +1187 -1018
  13. package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-2VAzGlt8.js} +29 -29
  14. package/dist/chunks/pre-block-Cq1RqhZX.js +3987 -0
  15. package/dist/chunks/report-preferences-dialog-BcH-0lR-.js +1232 -0
  16. package/dist/chunks/search-CJz-QQ0Q.js +24 -0
  17. package/dist/chunks/{selection-reducer-CvCBQbl2.js → selection-reducer-NF5C07yM.js} +25 -46
  18. package/dist/chunks/{index-D7GVxl4a.js → semaphor-ready-indicator-BLRDuLr4.js} +55200 -59783
  19. package/dist/chunks/slider-BYIH4icg.js +877 -0
  20. package/dist/chunks/switch-XaAACBrJ.js +2234 -0
  21. package/dist/dashboard/index.js +1 -1
  22. package/dist/dashboard-authoring/index.js +4 -4
  23. package/dist/data-app-builder/index.js +67 -67
  24. package/dist/data-app-sdk/index.js +33 -32
  25. package/dist/index.js +435 -243
  26. package/dist/style.css +1 -1
  27. package/dist/surfboard/index.js +4 -5
  28. package/dist/types/briefings/index.d.ts +1 -1
  29. package/dist/types/briefings/schedule.d.ts +49 -2
  30. package/dist/types/components/briefings/briefing-author/form-primitives.d.ts +1 -1
  31. package/dist/types/components/briefings/briefing-author/schedule-model.d.ts +12 -2
  32. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  33. package/dist/types/components/dashboard/sheet/layout-change-guard.d.ts +1 -1
  34. package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +1 -1
  35. package/dist/types/components/editor/editor-main/text-card.d.ts +1 -1
  36. package/dist/types/components/editor/editor.d.ts +1 -1
  37. package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
  38. package/dist/types/components/providers/theme-provider-context.d.ts +1 -1
  39. package/dist/types/components/providers/theme-provider.d.ts +1 -1
  40. package/dist/types/components/shared/unsaved-changes/use-pristine-snapshot-initializer.d.ts +1 -1
  41. package/dist/types/components/sharing-and-management/hooks/use-groups.d.ts +5 -1
  42. package/dist/types/components/sharing-and-management/hooks/use-unified-users.d.ts +9 -1
  43. package/dist/types/components/sharing-and-management/resource-share-dialog/index.d.ts +1 -1
  44. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/adapter.d.ts +21 -1
  45. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/configs.d.ts +12 -0
  46. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/invite-combobox.d.ts +5 -0
  47. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/share-shape.d.ts +7 -0
  48. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/types.d.ts +2 -0
  49. package/dist/types/components/sharing-and-management/utils/shares-types.d.ts +8 -0
  50. package/dist/types/components/sharing-and-management/utils/types.d.ts +2 -0
  51. package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
  52. package/dist/types/components/ui/resizable.d.ts +1 -1
  53. package/dist/types/components/visual/column-display-utils.d.ts +1 -1
  54. package/dist/types/components/visual/kpi-visual/kpi-utils.d.ts +1 -1
  55. package/dist/types/components/visual/settings/color-format.d.ts +1 -1
  56. package/dist/types/components/visual/visual-utils.d.ts +1 -1
  57. package/dist/types/lib/actions/data-point-click-action.d.ts +2 -1
  58. package/dist/types/lib/charts/area-chart.d.ts +1 -1
  59. package/dist/types/lib/charts/bar-chart.d.ts +1 -1
  60. package/dist/types/lib/charts/cartesian-data.d.ts +72 -0
  61. package/dist/types/lib/charts/cartesian-fields.d.ts +60 -0
  62. package/dist/types/lib/charts/chart-utils.d.ts +3 -0
  63. package/dist/types/lib/charts/combo-chart.d.ts +1 -1
  64. package/dist/types/lib/charts/create-chart.d.ts +1 -1
  65. package/dist/types/lib/charts/line-chart.d.ts +1 -1
  66. package/dist/types/lib/charts/shared/category-group-axis-plugin.d.ts +23 -0
  67. package/dist/types/lib/charts/stacked-line-chart.d.ts +2 -0
  68. package/dist/types/lib/charts/types.d.ts +1 -7
  69. package/dist/types/lib/dashboard/normalize-dashboard-for-dirty-check.d.ts +1 -1
  70. package/dist/types/lib/formatters/cartesian-temporal-presentation.d.ts +6 -1
  71. package/dist/types/lib/hooks/explorer/use-schemas.d.ts +1 -1
  72. package/dist/types/lib/hooks/use-dashboard.d.ts +2 -2
  73. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +1 -2
  74. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  75. package/dist/types/lib/stores/table-actions.d.ts +2 -1
  76. package/dist/types/lib/types/token-types.d.ts +0 -12
  77. package/dist/types/lib/utils.d.ts +0 -2
  78. package/package.json +2 -1
  79. package/dist/chunks/dashboard-json-Kc_M7nLP.js +0 -75
  80. package/dist/chunks/editor-action-buttons-s-ByVR9x.js +0 -2019
  81. package/dist/chunks/report-preferences-dialog-RAp0DAuw.js +0 -723
  82. package/dist/types/lib/encrypt-utils.d.ts +0 -9
@@ -5,7 +5,7 @@ import { ChartNumericPresentationContext } from '../formatters/chart-numeric-pre
5
5
  import { QueryColumnKeyMap } from '../types/explorer-types.js';
6
6
  import { SemaphorResultColumn } from '../../shared/analytics-protocol/index.js';
7
7
  import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
8
- import { CartesianTemporalPresentation, CartesianTemporalSeriesValue } from '../formatters/cartesian-temporal-presentation.js';
8
+ import { CartesianTemporalPresentation } from '../formatters/cartesian-temporal-presentation.js';
9
9
  export type ChartConfigParams = {
10
10
  card: TCard;
11
11
  data: any[];
@@ -13,12 +13,6 @@ export type ChartConfigParams = {
13
13
  resultColumns?: readonly SemaphorResultColumn[];
14
14
  columnKeyMap?: QueryColumnKeyMap;
15
15
  temporalPresentation?: CartesianTemporalPresentation;
16
- /** Exact category key retained by a local tall-to-wide pivot. */
17
- datasetAxisColumnKey?: string;
18
- /** Exact grouped field whose canonical values became dataset labels. */
19
- datasetSeriesColumnKey?: string;
20
- /** Original scalar values keyed by their pivoted dataset label. */
21
- datasetSeriesValues?: ReadonlyMap<string, CartesianTemporalSeriesValue>;
22
16
  presentationExecutionSnapshot?: PresentationExecutionSnapshot | null;
23
17
  dashboardId?: string;
24
18
  presentationAttachmentIndex?: number;
@@ -1,4 +1,4 @@
1
- import { TDashboard } from '../../components/index.js';
1
+ import { TDashboard } from '../types/common-types.js';
2
2
  type DashboardSheet = NonNullable<TDashboard['sheets']>[number];
3
3
  type SheetLayouts = NonNullable<DashboardSheet['layouts']>;
4
4
  /**
@@ -6,7 +6,7 @@ import { GroupedTemporalPresentation, GroupedTemporalViewerPreferences } from '.
6
6
  export type CartesianTemporalPresentation = GroupedTemporalPresentation & {
7
7
  /** Exact output key for the first grouped field. */
8
8
  axisColumnKey?: string;
9
- /** Exact output key for the second grouped field when it becomes a series. */
9
+ /** Exact output key for the grouped field rendered as the series (legacy two-Rows shape). */
10
10
  seriesColumnKey?: string;
11
11
  /** Physical wide-pivot columns keyed by their exact result accessor. */
12
12
  pivotSeriesByColumnKey: ReadonlyMap<string, SemaphorPivotResultColumnIdentity>;
@@ -15,6 +15,11 @@ export type CartesianTemporalSeriesValue = string | number | null;
15
15
  export type CartesianTemporalDatasetIdentity = {
16
16
  /** Canonical category values aligned with the rendered dataset's points. */
17
17
  semaphorCanonicalAxisValues?: readonly unknown[];
18
+ /**
19
+ * Canonical category path per point, outer to inner, aligned with the Rows
20
+ * fields that form the axis. Present only for paths of two or more levels.
21
+ */
22
+ semaphorAxisPath?: readonly (readonly unknown[])[];
18
23
  /** Canonical grouped-series value behind a presentation-only legend label. */
19
24
  semaphorCanonicalSeriesKey?: unknown;
20
25
  /** Exact physical result accessor used to build this dataset. */
@@ -2,7 +2,7 @@ import { AuthToken } from '../../types/common-types.js';
2
2
  export declare function useSchemas(token?: AuthToken): {
3
3
  isPending: boolean;
4
4
  error: Error | null;
5
- schemas: import('../../../components/index.js').DropdownItem[];
5
+ schemas: import('../../types/dropdown-types.js').DropdownItem[];
6
6
  refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<any, Error>>;
7
7
  label: string;
8
8
  };
@@ -1,6 +1,6 @@
1
1
  import { AuthToken, ControlBinding, ControlDefinition, CustomCard, DashboardLifecycleEvent, DashboardInputExecutionSnapshot, TDashboard, TEvent, TStyle } from '../types/common-types.js';
2
2
  import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
3
- import { TFilterValue } from '../../components/index.js';
3
+ import { TFilterValue } from '../../components/surfboard/filter/types.js';
4
4
  type UseDashboardProps = {
5
5
  id?: string;
6
6
  version?: string;
@@ -39,7 +39,7 @@ export declare function useDashboard({ customStyle, currentTheme, onSave, onEven
39
39
  dashboard: TDashboard;
40
40
  assistantProfileId?: string;
41
41
  semanticExecutionPayload: import('../types/semantic-runtime-types.js').SemanticExecutionPayload;
42
- organizationAppearance?: import('../../components/index.js').AppearanceSpec | null;
42
+ organizationAppearance?: import('../appearance/types.js').AppearanceSpec | null;
43
43
  } | null, Error>>;
44
44
  };
45
45
  export {};
@@ -1,6 +1,5 @@
1
1
  import { TCard } from '../types/index.js';
2
- import { CardConfig, Field } from '../../components/index.js';
3
- import { QueryColumnKeyMap } from '../types/explorer-types.js';
2
+ import { QueryColumnKeyMap, CardConfig, Field } from '../types/explorer-types.js';
4
3
  import { ClickedMetricValue, ClickFilterCondition } from '../types/interaction-types.js';
5
4
  import { Chart } from 'chart.js';
6
5
  import { SemaphorResultColumn } from '../../shared/analytics-protocol/index.js';
@@ -1,7 +1,6 @@
1
- import { ColorRange, TCard, TCardPreferences, TCustomCardPreferences, TFrame, TLegendOptions, AggregateCalc, SqlGen, ControlDefinition } from '../types/common-types.js';
1
+ import { ColorRange, TCard, TCardPreferences, TCustomCardPreferences, TFrame, TLegendOptions, AIScopeTable, AggregateCalc, SqlGen, ControlDefinition } from '../types/common-types.js';
2
2
  import { TFilterValue } from '../../components/surfboard/filter/types.js';
3
3
  import { TChartType } from '../charts/types.js';
4
- import { AIScopeTable } from '../../components/index.js';
5
4
  import { FilterByColumn, OldFilterValue, GroupByColumn, MetricColumn, OrderBy, QueryConfig } from '../types/query-types.js';
6
5
  import { TableActions } from './table-actions.js';
7
6
  import { CardConfig, QueryColumnKeyMap } from '../types/explorer-types.js';
@@ -1,6 +1,7 @@
1
1
  import { PersistedColumnSettingsMap } from '../../components/visual/data-table/types/data-table.js';
2
2
  import { ColumnSizingState } from '@tanstack/react-table';
3
- import { EditorStore, TCard } from '../../components/index.js';
3
+ import { EditorStore } from './editor-store.js';
4
+ import { TCard } from '../types/common-types.js';
4
5
  import { TableBaseFormatting, TableConditionalFormatting } from '../table-formatting/index.js';
5
6
  export declare const EMPTY_COLUMN_SETTINGS: PersistedColumnSettingsMap;
6
7
  export declare const EMPTY_COLUMN_VISIBILITY: Record<string, boolean>;
@@ -67,10 +67,6 @@ export type TokenSecurityPolicy = {
67
67
  * UI and behavior configuration for the embedded dashboard.
68
68
  */
69
69
  export type UIConfig = {
70
- /**
71
- * Enables self-service editing by the end user. Legacy field. Use config.allowEdit instead.
72
- */
73
- allowEdit?: boolean;
74
70
  /**
75
71
  * Enables advanced mode features in the dashboard.
76
72
  * Defaults to true unless explicitly disabled.
@@ -202,10 +198,6 @@ export type TokenRequest = {
202
198
  * Display name of the end user.
203
199
  */
204
200
  displayName?: string;
205
- /**
206
- * Enables self-service editing by the end user.
207
- */
208
- allowEdit?: boolean;
209
201
  /**
210
202
  * Schema level security policy. The schema name for the tenant.
211
203
  */
@@ -274,10 +266,6 @@ export type TokenProps = {
274
266
  * Display name of the end user.
275
267
  */
276
268
  displayName?: string;
277
- /**
278
- * Enables self-service editing by the end user.
279
- */
280
- allowEdit?: boolean;
281
269
  /**
282
270
  * Schema level security policy. The schema name for the tenant.
283
271
  */
@@ -24,9 +24,7 @@ export declare function getRequestErrorSql(error: unknown): string | undefined;
24
24
  export declare function getRequestErrorFromResponse(response: Response): Promise<RequestError>;
25
25
  export declare function requestJsonRegular(url: string, authToken: string, method?: string, data?: unknown, signal?: AbortSignal): Promise<any>;
26
26
  export declare function getRequest(url: string, authToken: string, params?: {}, signal?: AbortSignal): Promise<any>;
27
- export declare function postRequestEncrypted(url: string, authToken: string, data?: {}, method?: string): Promise<any>;
28
27
  export declare function postRequestRegular(url: string, authToken: string, data?: {}, method?: string): Promise<any>;
29
- export declare const postRequest: typeof postRequestRegular;
30
28
  export declare function getTenantAndEndUserId(accessToken: string | undefined): {
31
29
  tenantId: string;
32
30
  endUserId: string;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.524",
8
+ "version": "0.1.526",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -134,6 +134,7 @@
134
134
  "check:card-config-consumers": "node scripts/card-config-consumers.mjs",
135
135
  "preview": "vite preview",
136
136
  "test": "vitest run",
137
+ "test:changed": "vitest run --changed",
137
138
  "test:watch": "vitest",
138
139
  "test:ui": "vitest --ui",
139
140
  "test:run": "vitest run",
@@ -1,75 +0,0 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { useMemo as p, useState as u, useRef as f, useEffect as b } from "react";
3
- import { X as S } from "./x-CXDkqdur.js";
4
- import { u as r, c as N, B as D, C as J } from "./switch-CWPcwAZ4.js";
5
- import "./card-config-utils-CAyjC5Tp.js";
6
- import "./validators-CsdOtZI6.js";
7
- import "./matrix-operation-contract-D32U2CSw.js";
8
- import "../value-format-preferences/index.js";
9
- import "./index-D7GVxl4a.js";
10
- import "./appearance-runtime-provider-B-M8gwlZ.js";
11
- import "./appearance-context-DEYtWinQ.js";
12
- import "./index-CLIro-EG.js";
13
- import "./field-aggregations-BQjogiI1.js";
14
- import "zod";
15
- import "./matrix-continuation-C4sRcjZU.js";
16
- import "./color-CJvdlFM_.js";
17
- import "react-dom";
18
- import "./index-D9HDUSye.js";
19
- function F() {
20
- const a = r((o) => o.dashboard), c = r((o) => o.actions.setDashboard), m = r(
21
- (o) => o.showDashboardJSON
22
- ), h = r(
23
- (o) => o.actions.setShowDashboardJSON
24
- ), s = p(
25
- () => a ? JSON.stringify(a, null, 2) : "",
26
- [a]
27
- ), [l, i] = u(s), t = f(s);
28
- return b(() => {
29
- s !== t.current && (i(s), t.current = s);
30
- }, [s]), /* @__PURE__ */ d(
31
- "div",
32
- {
33
- className: N("relative p-2", {
34
- hidden: !m
35
- }),
36
- children: [
37
- /* @__PURE__ */ d(
38
- D,
39
- {
40
- variant: "secondary",
41
- size: "sm",
42
- className: "absolute right-2 top-2 z-10 h-8",
43
- onClick: () => h(!1),
44
- children: [
45
- /* @__PURE__ */ e(S, { className: "mr-2 h-4 w-4" }),
46
- "Close"
47
- ]
48
- }
49
- ),
50
- /* @__PURE__ */ e("div", { className: "h-[550px] overflow-hidden", children: /* @__PURE__ */ e(
51
- J,
52
- {
53
- value: l,
54
- onValueChange: (o) => {
55
- i(o);
56
- try {
57
- const n = JSON.parse(o);
58
- t.current = JSON.stringify(
59
- n,
60
- null,
61
- 2
62
- ), c(n);
63
- } catch {
64
- }
65
- },
66
- language: "json"
67
- }
68
- ) })
69
- ]
70
- }
71
- );
72
- }
73
- export {
74
- F as default
75
- };