react-semaphor 0.1.590 → 0.1.592

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 (87) hide show
  1. package/dist/analytics-protocol/index.js +254 -236
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +7 -7
  4. package/dist/briefings/index.js +4 -4
  5. package/dist/chunks/{aggregate-measure-field-BrkXsSJp.js → aggregate-measure-field-DHlDj0Pc.js} +2 -2
  6. package/dist/chunks/{assistant-chat-C_6dBLUk.js → assistant-chat-BusR-5uT.js} +13 -13
  7. package/dist/chunks/bookmark-impact-DozXJZDS.js +76 -0
  8. package/dist/chunks/{bookmark-state-Bn7k3ttp.js → bookmark-state-Be2W3s6t.js} +632 -592
  9. package/dist/chunks/{card-filter-builder-6vflbF9O.js → card-filter-builder-DBTJ74yy.js} +916 -897
  10. package/dist/chunks/{comparison-window-caption-fqijZdVd.js → comparison-window-caption-h8w3ySL6.js} +90 -91
  11. package/dist/chunks/{dashboard-DpgRl65K.js → dashboard-CmzJzmph.js} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-BLbhONJz.js → dashboard-briefing-launcher-BOQGpYr2.js} +160 -160
  13. package/dist/chunks/{dashboard-controls-kCTYEEsq.js → dashboard-controls-BxI3e2_o.js} +64 -64
  14. package/dist/chunks/{dashboard-json-CNIFresY.js → dashboard-json-BMqXV2Rx.js} +4 -4
  15. package/dist/chunks/{dates-BoeweqEo.js → dates-DBsscxL_.js} +8 -8
  16. package/dist/chunks/{edit-dashboard-visual-D0eWTlPL.js → edit-dashboard-visual-Dvc_Pkfg.js} +5443 -5417
  17. package/dist/chunks/filter-line-CYT7KIXb.js +133 -0
  18. package/dist/chunks/{filter-reach-copy-eMhDPTYH.js → filter-reach-copy-hEzlpBu7.js} +224 -224
  19. package/dist/chunks/filter-value-text-CHBm4IU7.js +153 -0
  20. package/dist/chunks/{index-D8LFjI8j.js → index-BoYJqc3F.js} +24 -24
  21. package/dist/chunks/{layout-grid-BG__sPkb.js → layout-grid-DoFIfQGd.js} +1 -1
  22. package/dist/chunks/{list-filter-Cb8i7N8f.js → list-filter-BeTQxjNy.js} +1 -1
  23. package/dist/chunks/{matrix-analytical-definition-D9Ll_9R-.js → matrix-analytical-definition-CyWOwLmE.js} +17 -17
  24. package/dist/chunks/{matrix-member-presentation-DVBJR0MA.js → matrix-member-presentation-Bj2YcHAP.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-JSmproo9.js → matrix-operation-contract-CAanJeCj.js} +60 -60
  26. package/dist/chunks/{metric-comparison-xE_J6hkg.js → metric-comparison-BeKnUD08.js} +27 -31
  27. package/dist/chunks/{paintbrush-C310xSuR.js → paintbrush-KeaU1L1a.js} +1 -1
  28. package/dist/chunks/{palette-Ci5P91Zb.js → palette-BcFJLeXB.js} +1 -1
  29. package/dist/chunks/{pivot-result-contract-expectations-DbBahmgc.js → pivot-result-contract-expectations-CaS0y823.js} +522 -486
  30. package/dist/chunks/{pivot-result-identity-CUsMt_4r.js → pivot-result-identity-BKUjYO1u.js} +1 -1
  31. package/dist/chunks/raw-temporal-value-BzdgeDa7.js +454 -0
  32. package/dist/chunks/{report-preferences-dialog-dUlVLgEk.js → report-preferences-dialog-Cu_f-8Kw.js} +13 -13
  33. package/dist/chunks/{report-runtime-context-CrOgmuxO.js → report-runtime-context-g4Zp_TU9.js} +1 -1
  34. package/dist/chunks/{resolve-dashboard-input-context-NurwNg4I.js → resolve-dashboard-input-context-CkMk1RW6.js} +7600 -6398
  35. package/dist/chunks/{save-BhhXfp4s.js → save-C9CZAk6V.js} +1 -1
  36. package/dist/chunks/{saved-dashboard-context-CPp--vXU.js → saved-dashboard-context-RgBS_PIj.js} +19 -19
  37. package/dist/chunks/{selection-filter-compiler-CHG-8xnW.js → selection-filter-compiler-BclSpK3P.js} +1 -1
  38. package/dist/chunks/{semaphor-ready-indicator-CXojR95M.js → semaphor-ready-indicator-DXpTZJ7R.js} +31502 -31453
  39. package/dist/chunks/{shelf-drop-preview-context-BDScAUdq.js → shelf-drop-preview-context-qdlJKaH7.js} +5 -5
  40. package/dist/chunks/stored-dashboard-Baw6Bp2A.js +4029 -0
  41. package/dist/chunks/{style-sheet-parts-CmXmKqGw.js → style-sheet-parts-DM_Mw_sm.js} +45 -42
  42. package/dist/chunks/{table-export-sheet-ClSgERQC.js → table-export-sheet-Cd6z7SsG.js} +1 -1
  43. package/dist/chunks/{token-types-DTocOcwt.js → token-types-BB2ImFx6.js} +1 -1
  44. package/dist/chunks/{upload-DDYc1Qjj.js → upload-CMTCg47S.js} +1 -1
  45. package/dist/chunks/{validators-CrYXNnNE.js → validators-BlEWWX9O.js} +576 -562
  46. package/dist/chunks/{variable-draft-Bi3RlULA.js → variable-draft-BxtN6YcG.js} +4 -4
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +1672 -1633
  49. package/dist/format-utils/index.js +217 -218
  50. package/dist/index.js +62 -62
  51. package/dist/report-runtime-context/index.js +1 -1
  52. package/dist/style.css +1 -1
  53. package/dist/surfboard/index.js +2 -2
  54. package/dist/types/components/surfboard/filter/types.d.ts +7 -5
  55. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +3 -3
  56. package/dist/types/components/visual/data-table/types/data-table.d.ts +24 -2
  57. package/dist/types/index.js +30 -29
  58. package/dist/types/lib/dashboard-inputs/dashboard-date-comparison-plan.d.ts +0 -1
  59. package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +27 -0
  60. package/dist/types/lib/dashboard-viewer/table-view.d.ts +37 -1
  61. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
  62. package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +1 -1
  63. package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +2 -1
  64. package/dist/types/shared/analytics-protocol/relative-date/sentence.d.ts +81 -0
  65. package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +0 -9
  66. package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +23 -2
  67. package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +20 -0
  68. package/dist/types/shared/dashboard-authoring/card-formats/detail-date-display.d.ts +84 -0
  69. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  70. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +2 -0
  71. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +6 -0
  72. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +11 -0
  73. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +36 -36
  74. package/dist/types/shared/dashboard-authoring/filter-model/date-filter-default.d.ts +37 -0
  75. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +1 -0
  76. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  77. package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +56 -0
  78. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +7 -0
  79. package/dist/types/shared/format-utils/filter-line.d.ts +2 -0
  80. package/package.json +1 -1
  81. package/dist/chunks/bookmark-impact-DkZABEd3.js +0 -75
  82. package/dist/chunks/filter-line-Dza3ee4w.js +0 -131
  83. package/dist/chunks/filter-value-text-DQw4v3nC.js +0 -146
  84. package/dist/chunks/pivot-header-presentation-D-DfPAjb.js +0 -42
  85. package/dist/chunks/raw-temporal-value-BnGCWJAL.js +0 -322
  86. package/dist/chunks/stored-dashboard-KkH4zOhq.js +0 -4998
  87. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -53
@@ -0,0 +1,133 @@
1
+ import { j as E, r as v, k as b, l as F } from "./validators-BlEWWX9O.js";
2
+ import "./matrix-operation-contract-CAanJeCj.js";
3
+ import "./analytics-base-schemas-8wz9vqn_.js";
4
+ import { r as w } from "./metric-comparison-BeKnUD08.js";
5
+ import { d as R, c as _ } from "./raw-temporal-value-BzdgeDa7.js";
6
+ import "../value-format-preferences/index.js";
7
+ const A = /^\d{4}-\d{2}-\d{2}$/;
8
+ function L(n) {
9
+ const a = n.split(".");
10
+ return a[a.length - 1].replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(" ").map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ");
11
+ }
12
+ const y = 10;
13
+ function g(n, a) {
14
+ const i = n.slice(0, y).map(a).join(", "), r = n.length - y;
15
+ return r > 0 ? `${i}, and ${r} more` : i;
16
+ }
17
+ function I(n) {
18
+ if (n.valueType !== "date") return;
19
+ const a = v(n.relativeMeta);
20
+ return a && b(n.operation, a) && w(a).printsByName ? a : void 0;
21
+ }
22
+ function U(n, a) {
23
+ if (a !== "label") return I(n);
24
+ if (n.valueType !== "date") return;
25
+ const i = v(n.relativeMeta);
26
+ return i && b(n.operation, i) ? i : void 0;
27
+ }
28
+ function D(n, a = {}) {
29
+ const { name: i, operation: r, values: e, valueType: m } = n, t = a.label ?? L(i), d = U(n, a.relativeDates);
30
+ if (d) {
31
+ const o = R(r, d);
32
+ if (o) return `${t}: ${o}`;
33
+ const c = E(d).label;
34
+ if (c)
35
+ return r === "between" ? `${t}: ${c}` : `${t} not in ${c}`;
36
+ }
37
+ if (!e || e.length === 0)
38
+ return r === "is null" ? `${t} is empty` : r === "is not null" ? `${t} is not empty` : "";
39
+ const u = v(n.relativeMeta ?? n.materializedRelativeDate), $ = u ? F(r) : void 0, T = n.temporalPrecision === "minute" || !!(u && ($ ? w(u).bounds[$] === "instant" : w(u).subDay)), s = (o) => {
40
+ if (m === "date" && o) {
41
+ const c = {
42
+ year: "numeric",
43
+ month: "short",
44
+ day: "numeric",
45
+ ...T ? {
46
+ hour: "numeric",
47
+ minute: "2-digit"
48
+ } : {}
49
+ };
50
+ if (typeof o == "string" && A.test(o)) {
51
+ const [p, f, h] = o.split("-").map(Number);
52
+ return new Intl.DateTimeFormat(void 0, {
53
+ year: "numeric",
54
+ month: "short",
55
+ day: "numeric",
56
+ timeZone: "UTC"
57
+ }).format(new Date(Date.UTC(p, f - 1, h)));
58
+ }
59
+ if (typeof o == "string" && _(o) === "wall_datetime") {
60
+ const [p, f, h, N, C] = o.split(/[-T :.]/).map(Number);
61
+ return new Intl.DateTimeFormat(void 0, {
62
+ ...c,
63
+ timeZone: "UTC"
64
+ }).format(new Date(Date.UTC(p, f - 1, h, N, C)));
65
+ }
66
+ const l = new Date(o);
67
+ if (!isNaN(l.getTime()))
68
+ try {
69
+ return new Intl.DateTimeFormat(void 0, {
70
+ ...c,
71
+ ...a.timezone ? { timeZone: a.timezone } : {}
72
+ }).format(l);
73
+ } catch {
74
+ return T ? l.toLocaleString(void 0, c) : l.toLocaleDateString(void 0, c);
75
+ }
76
+ }
77
+ return String(o);
78
+ };
79
+ switch (r) {
80
+ case "=":
81
+ return `${t}: ${s(e[0])}`;
82
+ case "!=":
83
+ return `${t} ≠ ${s(e[0])}`;
84
+ case ">":
85
+ return `${t} > ${s(e[0])}`;
86
+ case "<":
87
+ return `${t} < ${s(e[0])}`;
88
+ case ">=":
89
+ return `${t} ≥ ${s(e[0])}`;
90
+ case "<=":
91
+ return `${t} ≤ ${s(e[0])}`;
92
+ case "between":
93
+ case "not between": {
94
+ const o = `${s(e[0])} - ${s(e[1])}`;
95
+ return r === "between" ? `${t}: ${o}` : `${t} not in ${o}`;
96
+ }
97
+ case "in":
98
+ return e.length === 1 ? `${t}: ${s(e[0])}` : `${t}: ${g(e, s)}`;
99
+ case "not in":
100
+ return `${t} not in (${g(e, s)})`;
101
+ case "like":
102
+ return `${t} contains "${e[0]}"`;
103
+ case "not like":
104
+ return `${t} doesn't contain "${e[0]}"`;
105
+ default:
106
+ return `${t}: ${g(e, s)}`;
107
+ }
108
+ }
109
+ function Z(n, a = {}) {
110
+ if (!n || n.length === 0)
111
+ return "";
112
+ const i = /* @__PURE__ */ new Map();
113
+ n.forEach((e) => {
114
+ const m = i.get(e.name) || [];
115
+ m.push(e), i.set(e.name, m);
116
+ });
117
+ const r = [];
118
+ return i.forEach((e, m) => {
119
+ if (e.length === 1) {
120
+ const t = D(e[0], a);
121
+ t && r.push(t);
122
+ } else {
123
+ const t = L(m), d = e.map((u) => D(u, a).replace(`${t}: `, "").replace(`${t} `, "")).filter(Boolean);
124
+ d.length > 0 && r.push(`${t}: ${d.join(" and ")}`);
125
+ }
126
+ }), r.join(" | ");
127
+ }
128
+ export {
129
+ y as F,
130
+ Z as a,
131
+ D as f,
132
+ I as r
133
+ };