react-semaphor 0.1.566 → 0.1.567

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 (31) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +1 -1
  3. package/dist/chunks/{assistant-chat-DNKAYSQL.js → assistant-chat-D-IuHHwh.js} +6 -6
  4. package/dist/chunks/{bookmark-impact-BeUbq0jc.js → bookmark-impact-B0estCHn.js} +9 -9
  5. package/dist/chunks/{bookmark-state-ByODVqee.js → bookmark-state-Du3s13_V.js} +333 -321
  6. package/dist/chunks/{card-filter-builder-SXaRWbKr.js → card-filter-builder-DbSmzvem.js} +3 -3
  7. package/dist/chunks/{dashboard-briefing-launcher-CXeXRTem.js → dashboard-briefing-launcher-DunvZYsU.js} +152 -152
  8. package/dist/chunks/{dashboard-controls-CsqKybrf.js → dashboard-controls-B09cN2Dz.js} +8 -8
  9. package/dist/chunks/{dashboard-Cni7nGhg.js → dashboard-f8J9DHh5.js} +1 -1
  10. package/dist/chunks/{dashboard-json-WWmw3Piu.js → dashboard-json-BNNCaKEc.js} +1 -1
  11. package/dist/chunks/{dates-DJRUS-he.js → dates-BsJcyoC_.js} +5 -5
  12. package/dist/chunks/{edit-dashboard-visual-BrIEaBhc.js → edit-dashboard-visual-Cwzbpty8.js} +8 -8
  13. package/dist/chunks/{filter-reach-copy-D5LqgrUf.js → filter-reach-copy-P-kDwUpY.js} +3 -3
  14. package/dist/chunks/{index-Bq9UbCGk.js → index-BcXw0CpM.js} +2 -2
  15. package/dist/chunks/{report-preferences-dialog-CeHioJwL.js → report-preferences-dialog-CbgmdWeZ.js} +8 -8
  16. package/dist/chunks/{resolve-dashboard-input-context-CwS-2r-b.js → resolve-dashboard-input-context-DPKSF3qj.js} +264 -264
  17. package/dist/chunks/{saved-dashboard-context-c-MZZTx2.js → saved-dashboard-context-CNudmm9U.js} +13 -13
  18. package/dist/chunks/{semaphor-ready-indicator-B2NpYRE-.js → semaphor-ready-indicator-CQd-PCCZ.js} +24824 -24790
  19. package/dist/chunks/{shelf-drop-preview-context-DM7yypwC.js → shelf-drop-preview-context-CWS3e20y.js} +2 -2
  20. package/dist/chunks/{stored-dashboard-DTWc2pzt.js → stored-dashboard-CrQFT27O.js} +1050 -1031
  21. package/dist/chunks/{variable-draft-DFizFCJu.js → variable-draft-BDxlD0dM.js} +2 -2
  22. package/dist/dashboard/index.js +2 -2
  23. package/dist/dashboard-authoring/index.js +11 -11
  24. package/dist/index.js +12 -12
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/index.js +33 -32
  28. package/dist/types/lib/dashboard-viewer/table-view.d.ts +24 -2
  29. package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +15 -0
  30. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +9 -0
  31. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-CeHioJwL.js";
2
- import { C as f, E as D } from "../chunks/bookmark-state-ByODVqee.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-CbgmdWeZ.js";
2
+ import { C as f, E as D } from "../chunks/bookmark-state-Du3s13_V.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
5
5
  a as DisplayFormatPreferencesFields,
@@ -1,8 +1,8 @@
1
- import { B as s, x as r, C as l, E as o, V as i, j as n, c as d, g as m, f as u, b as c, e as E, d as C, a as T, w as p, v as D, h as A, l as I, u as _, s as F, m as S, n as b, p as L, k as f, o as N, q as R, i as y, r as g, t as h } from "../chunks/bookmark-state-ByODVqee.js";
2
- import { C as M, D as O, L as V, e as w, g as k, j as U, h as B, k as K, d as z, b as v, i as Y, c as q, n as G, f as P } from "../chunks/validators-wtjw0aw6.js";
3
- import { D as j } from "../chunks/token-types-C8JymO8s.js";
4
- import { r as J, a as X } from "../chunks/pivot-result-identity-BlbLrqaC.js";
5
- import { D as Z } from "../chunks/report-runtime-context-DnA_PiKo.js";
1
+ import { B as s, y as r, C as l, E as o, V as i, j as n, c as d, g as m, f as u, b as c, e as E, d as C, a as T, x as p, w as D, l as A, h as I, o as _, v as F, u as S, m as b, n as L, p as f, k as N, q as y, s as R, i as h, r as g, t as x } from "../chunks/bookmark-state-Du3s13_V.js";
2
+ import { C as O, D as V, L as w, e as k, g as U, j as z, h as B, k as K, d as v, b as Y, i as q, c as G, n as P, f as Q } from "../chunks/validators-wtjw0aw6.js";
3
+ import { D as W } from "../chunks/token-types-C8JymO8s.js";
4
+ import { r as X, a as H } from "../chunks/pivot-result-identity-BlbLrqaC.js";
5
+ import { D as $ } from "../chunks/report-runtime-context-DnA_PiKo.js";
6
6
  const e = [
7
7
  "concatenate",
8
8
  "conditional-category",
@@ -38,14 +38,14 @@ const e = [
38
38
  export {
39
39
  s as BOOKMARK_STATE_VERSION,
40
40
  r as BOOKMARK_VISIBILITIES,
41
- M as CALCULATED_FIELD_ENTITY_MARKER,
41
+ O as CALCULATED_FIELD_ENTITY_MARKER,
42
42
  e as CALCULATED_FIELD_TEMPLATE_IDS,
43
43
  l as CONTROL_CARD_DEFAULT_VALUE,
44
- O as DATE_FORMAT_VALUES,
45
- Z as DEFAULT_CALENDAR_CONTEXT,
46
- j as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
44
+ V as DATE_FORMAT_VALUES,
45
+ $ as DEFAULT_CALENDAR_CONTEXT,
46
+ W as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
47
47
  o as EMPTY_SELECTION,
48
- V as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
48
+ w as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
49
49
  i as VIEWER_LIMITS,
50
50
  n as VIEWER_TABLE_SETTINGS_VERSION,
51
51
  d as collectDatasetNamesFromExplorerField,
@@ -55,32 +55,33 @@ export {
55
55
  E as collectQualifiedDatasetNamesFromExplorerField,
56
56
  C as datasetRefFromSource,
57
57
  T as dependencyDisplayIdentity,
58
- w as getCalculatedFieldComputeStage,
58
+ k as getCalculatedFieldComputeStage,
59
59
  p as getCustomizableTableCardIds,
60
- k as getFieldRuntimeColumnName,
60
+ U as getFieldRuntimeColumnName,
61
61
  D as getSortableTableCardIds,
62
- U as hasCalculatedFieldMarker,
62
+ z as hasCalculatedFieldMarker,
63
63
  B as hasCalculatedFormulaInputs,
64
+ A as hasColumnCustomization,
64
65
  K as hasSyntheticCalculatedFieldOwner,
65
- A as humanizeDatasetName,
66
- z as inspectCalculatedField,
67
- v as isCalculatedDimension,
68
- Y as isCalculatedMetric,
69
- q as isDerivedField,
70
- I as isEmptyViewerTableSettings,
71
- _ as isTableCardCustomizable,
72
- F as isTableCardSortable,
73
- S as measureJsonBytes,
74
- G as normalizeCalculatedFieldRepresentation,
75
- b as normalizeViewerTableSettings,
76
- L as parseBookmarkState,
77
- f as parseTableColumnId,
78
- N as parseViewerTableSettings,
66
+ I as humanizeDatasetName,
67
+ v as inspectCalculatedField,
68
+ Y as isCalculatedDimension,
69
+ q as isCalculatedMetric,
70
+ G as isDerivedField,
71
+ _ as isEmptyViewerTableSettings,
72
+ F as isTableCardCustomizable,
73
+ S as isTableCardSortable,
74
+ b as measureJsonBytes,
75
+ P as normalizeCalculatedFieldRepresentation,
76
+ L as normalizeViewerTableSettings,
77
+ f as parseBookmarkState,
78
+ N as parseTableColumnId,
79
+ y as parseViewerTableSettings,
79
80
  R as parseViewerTableSettingsMap,
80
- y as readBookmarkState,
81
+ h as readBookmarkState,
81
82
  g as resolveFieldDatasetDependencies,
82
- J as resolveQueryColumnKeyMapEntry,
83
- X as resolveUniqueQueryColumnKeyMapEntry,
84
- P as shouldDropInheritedCalculationAggregate,
85
- h as toTableColumnId
83
+ X as resolveQueryColumnKeyMapEntry,
84
+ H as resolveUniqueQueryColumnKeyMapEntry,
85
+ Q as shouldDropInheritedCalculationAggregate,
86
+ x as toTableColumnId
86
87
  };
@@ -40,6 +40,16 @@ export type TableViewColumn = {
40
40
  readonly visible: boolean;
41
41
  /** Final header: viewer name, else today's pivot, comparison or field label, else the output key. */
42
42
  readonly label: string;
43
+ /**
44
+ * A viewer can drag this column's width: an addressable base column with
45
+ * customization on. Comparison and pivot member columns keep the author's
46
+ * width (PLAN CW-D2 to CW-D4).
47
+ */
48
+ readonly resizable: boolean;
49
+ };
50
+ /** A base column with an id: the columns a viewer's sort and widths address. */
51
+ export declare function isAddressableBaseColumn(column: Pick<TableViewColumn, 'part' | 'columnId'>): column is Pick<TableViewColumn, 'part'> & {
52
+ columnId: TableColumnId;
43
53
  };
44
54
  export type ColumnPanelItem = {
45
55
  readonly columnId: TableColumnId;
@@ -69,6 +79,12 @@ export type TableView = {
69
79
  readonly visibleKeys: readonly string[];
70
80
  /** outputKey -> header, for every key. */
71
81
  readonly labels: Readonly<Record<string, string>>;
82
+ /**
83
+ * outputKey -> width in pixels: the author's `tablePrefs.columnSizing` with
84
+ * the viewer's widths over resizable columns. The only sizing the table and
85
+ * the fast PDF use (PLAN CW-INV-2).
86
+ */
87
+ readonly columnSizing: Readonly<Record<string, number>>;
72
88
  readonly sortMode: TableSortMode;
73
89
  /** The table's controlled sort, by output key. */
74
90
  readonly clientSort: readonly {
@@ -81,8 +97,9 @@ export type TableView = {
81
97
  /** Setting entries that match no column (ignored; cleaned on the next save). */
82
98
  readonly dropped: readonly TableColumnId[];
83
99
  /**
84
- * Hide, order or rename settings apply (never with customization off): the
85
- * "Your columns" marks and Reset columns. A sort alone shows by its arrow.
100
+ * Hide, order, rename or width settings apply (never with customization
101
+ * off): the "Your columns" marks and Reset columns. A sort alone shows by
102
+ * its arrow.
86
103
  */
87
104
  readonly isCustomized: boolean;
88
105
  /**
@@ -119,6 +136,11 @@ export type TableColumnEdit = {
119
136
  readonly outputKey: string;
120
137
  readonly desc: boolean;
121
138
  }[];
139
+ }
140
+ /** The renderer's sizing at the end of a drag, by output key (PLAN CW-D10). */
141
+ | {
142
+ readonly type: 'resize';
143
+ readonly sizing: Readonly<Record<string, number>>;
122
144
  } | {
123
145
  readonly type: 'reset';
124
146
  };
@@ -29,6 +29,18 @@ export declare function useTableView(card: TCard, result: TableResultShape | und
29
29
  export type ViewerDataTable = ExportViewerTable & {
30
30
  readonly view?: TableView;
31
31
  };
32
+ /**
33
+ * The sizing props a viewer's table takes (`TableVisual`'s controlled
34
+ * sizing): the view's widths, and a finished drag goes to the viewer's
35
+ * settings, never the dashboard (PLAN CW-INV-1, CW-INV-2).
36
+ */
37
+ type ColumnSizing = Record<string, number>;
38
+ export type ViewerTableSizing = {
39
+ readonly columnSizing: Readonly<ColumnSizing>;
40
+ /** Takes the table's sizing, or TanStack's updater of it. */
41
+ readonly onColumnSizingChange: (sizing: ColumnSizing | ((old: ColumnSizing) => ColumnSizing)) => void;
42
+ readonly showColumnResizeHandles: boolean;
43
+ };
32
44
  /**
33
45
  * A dashboard table rendered for a viewer: the view handle, the
34
46
  * `viewerTable` the renderer takes, and a sort handler that keeps the viewer's
@@ -48,4 +60,7 @@ export declare function useViewerDataTable(card: TCard, result: {
48
60
  readonly id: string;
49
61
  readonly desc?: boolean;
50
62
  }[]) => boolean;
63
+ /** Absent outside a viewer context or before the view resolves: the author's widths, no handles. */
64
+ readonly viewerSizing: ViewerTableSizing | undefined;
51
65
  };
66
+ export {};
@@ -3,6 +3,7 @@ export declare const VIEWER_LIMITS: {
3
3
  readonly bookmarksPerViewerPerDashboard: 20;
4
4
  readonly bookmarkNameMaxChars: 100;
5
5
  readonly columnLabelMaxChars: 120;
6
+ readonly columnWidthMaxPx: 4000;
6
7
  readonly tableSettingsMaxBytes: 65536;
7
8
  readonly rememberedTableSettingsMaxBytes: 262144;
8
9
  readonly bookmarkStateMaxBytes: 65536;
@@ -57,12 +58,20 @@ export type ViewerTableSettings = {
57
58
  readonly labels?: Readonly<Record<TableColumnId, string>>;
58
59
  /** Absent: the author's sort. `[]`: explicitly unsorted. Never saved in `page-only` mode. */
59
60
  readonly sort?: readonly TableSortEntry[];
61
+ /** Column widths in whole pixels, only for columns the viewer resized. Unlisted columns keep the author's width. */
62
+ readonly widths?: Readonly<Record<TableColumnId, number>>;
60
63
  };
61
64
  /**
62
65
  * Drops empty fields and duplicate or malformed column ids. `sort: []` is kept:
63
66
  * it means "explicitly unsorted". Returns `undefined` when nothing is left.
64
67
  */
65
68
  export declare function normalizeViewerTableSettings(settings: ViewerTableSettings | undefined): ViewerTableSettings | undefined;
69
+ /**
70
+ * The viewer changed the columns themselves: hidden, reordered, renamed or
71
+ * resized. A sort alone is not a customization (PLAN B35, CW-D7): it shows by
72
+ * its arrow. The one predicate for "Your columns" and Reset columns.
73
+ */
74
+ export declare function hasColumnCustomization(settings: ViewerTableSettings | undefined): boolean;
66
75
  export declare function isEmptyViewerTableSettings(settings: ViewerTableSettings | undefined): boolean;
67
76
  /**
68
77
  * Strict shape check, then normalization: malformed column ids are dropped,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.566",
8
+ "version": "0.1.567",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",