react-semaphor 0.1.601 → 0.1.603

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 (123) hide show
  1. package/dist/analytics-protocol/index.js +415 -375
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
  8. package/dist/chunks/{assistant-chat-BE0XXzZP.js → assistant-chat-B6hNQI1t.js} +146 -146
  9. package/dist/chunks/{bookmark-impact-DXDAN5AY.js → bookmark-impact-Ba2PLcGp.js} +3 -3
  10. package/dist/chunks/{bookmark-state-BMyB3Tb6.js → bookmark-state-n7AaNzR_.js} +517 -516
  11. package/dist/chunks/{card-filter-builder-CE0-YVN5.js → card-filter-builder-Y22HizVx.js} +474 -474
  12. package/dist/chunks/{comparison-window-caption-Dxj2CHOa.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
  13. package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
  14. package/dist/chunks/{dashboard-mJKPFRbb.js → dashboard-BghI99oY.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CntwKyiZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +725 -716
  16. package/dist/chunks/{dashboard-controls-XO089DMg.js → dashboard-controls-CtFXlyjV.js} +53 -53
  17. package/dist/chunks/{dashboard-json-CQRiydUv.js → dashboard-json-DfGBUtCd.js} +5 -5
  18. package/dist/chunks/dates-BnrXF4bb.js +185 -0
  19. package/dist/chunks/{edit-dashboard-visual-f-Dm-BLR.js → edit-dashboard-visual-oxt3x1wb.js} +8081 -8268
  20. package/dist/chunks/{filter-line-CKNMyNTQ.js → filter-line-Cy5YYqRL.js} +27 -27
  21. package/dist/chunks/{filter-reach-copy-B8GGyVuR.js → filter-reach-copy-CE_ZX147.js} +1786 -2214
  22. package/dist/chunks/{filter-value-text-CRtKecI5.js → filter-value-text-fWvSDwkl.js} +11 -11
  23. package/dist/chunks/{index-DoPApnxg.js → index-D5rxbtS4.js} +24 -24
  24. package/dist/chunks/{layout-grid-CiSCZdIr.js → layout-grid-9LndRoLa.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-myf3D3Qx.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
  26. package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
  27. package/dist/chunks/{matrix-operation-contract-C1SuOHLZ.js → matrix-operation-contract-DPBj69D8.js} +518 -514
  28. package/dist/chunks/{metric-comparison-Cm0G893W.js → metric-comparison-B0FR-Q8I.js} +184 -125
  29. package/dist/chunks/{paintbrush-DQIwqlck.js → paintbrush-58FQYY-y.js} +1 -1
  30. package/dist/chunks/{palette-Cun747Rg.js → palette-Be62Tkoa.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-C1Dyx8du.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
  32. package/dist/chunks/{pivot-result-identity-CBS-ssEp.js → pivot-result-identity-CAP4--iq.js} +1 -1
  33. package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
  34. package/dist/chunks/{report-preferences-dialog-SDZEcG2x.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
  35. package/dist/chunks/{report-runtime-context-BbedQdtc.js → report-runtime-context-c77_KF9v.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-DRBS0eRa.js → resolve-dashboard-input-context-Rtl1ffmE.js} +8808 -7291
  37. package/dist/chunks/{save-Dj5bjm7P.js → save-C5A0JnEV.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-DWVlJcsa.js → saved-dashboard-context-tcyTU8jm.js} +199 -213
  39. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
  40. package/dist/chunks/{semaphor-ready-indicator-OFOoAY-A.js → semaphor-ready-indicator-FBvunj6S.js} +37894 -35726
  41. package/dist/chunks/{shelf-drop-preview-context-2swWypXu.js → shelf-drop-preview-context-QKStrcK9.js} +54 -54
  42. package/dist/chunks/{stored-dashboard-NtOuEX6a.js → stored-dashboard-CHozcAY9.js} +770 -743
  43. package/dist/chunks/{style-sheet-parts-Qv4UcLAo.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
  44. package/dist/chunks/{table-export-sheet-Do7ZB0_F.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
  45. package/dist/chunks/{token-types-Dy_aXO-U.js → token-types-XbM6QByy.js} +1 -1
  46. package/dist/chunks/{upload-Bq-puSVy.js → upload-H15d7uHK.js} +1 -1
  47. package/dist/chunks/{validators-C7DFk3QK.js → validators-Baf3VIf5.js} +5 -5
  48. package/dist/chunks/{variable-draft-Cy03qnEi.js → variable-draft-C2y8Jp6Z.js} +27 -28
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +3392 -2761
  51. package/dist/format-utils/index.js +205 -204
  52. package/dist/index.js +73 -75
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/dashboard/dashboard-web-component.d.ts +7 -0
  57. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  58. package/dist/types/index.js +5 -5
  59. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +1 -1
  60. package/dist/types/lib/document/document-edits.d.ts +0 -4
  61. package/dist/types/lib/query-context/assemble-card-query.d.ts +6 -1
  62. package/dist/types/lib/stores/dashboard-store.d.ts +30 -1
  63. package/dist/types/lib/types/common-types.d.ts +0 -2
  64. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  65. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +15 -0
  66. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  67. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  68. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  69. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  70. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  71. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  72. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  73. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  74. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  75. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  76. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  77. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +52 -0
  78. package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +129 -0
  79. package/dist/types/shared/dashboard-authoring/calculations/resolve-dashboard-field-copies.d.ts +46 -0
  80. package/dist/types/shared/dashboard-authoring/calculations/tokens.d.ts +36 -0
  81. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  82. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  83. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  84. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  85. package/dist/types/shared/dashboard-authoring/changes/calculation-change.d.ts +399 -0
  86. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +165 -360
  87. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +23 -2
  88. package/dist/types/shared/dashboard-authoring/changes/domain-change.d.ts +143 -266
  89. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +2 -0
  90. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +46 -0
  91. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  92. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  93. package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
  94. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  95. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  96. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  97. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  98. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  99. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  100. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  101. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  102. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  103. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +158 -0
  104. package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +71 -0
  105. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +17 -6
  106. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -0
  107. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
  108. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  109. package/dist/types/shared/format-utils/index.d.ts +1 -0
  110. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  111. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  112. package/dist/types/shared/temporal/index.d.ts +2 -0
  113. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  114. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  115. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  116. package/dist/types/shared/usage-events/details.d.ts +2 -2
  117. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  118. package/dist/usage-events/index.js +1 -1
  119. package/package.json +3 -2
  120. package/dist/chunks/dates-B-Urp5OD.js +0 -164
  121. package/dist/chunks/matrix-member-presentation-g0c_NpDW.js +0 -258
  122. package/dist/chunks/raw-temporal-value-DN_l-Tss.js +0 -454
  123. package/dist/chunks/selection-filter-compiler-DmAr7yqC.js +0 -131
@@ -0,0 +1,150 @@
1
+ import { i as m } from "./matrix-analytical-definition-CCp48UCw.js";
2
+ function d(e, t) {
3
+ var o, l;
4
+ const r = e.name.split(".").pop(), n = (o = e.fieldMeta) == null ? void 0 : o.qualifiedFieldName, i = !!(t.qualifiedFieldName && (n || e.name) === t.qualifiedFieldName), a = !((l = t.qualifiedFieldName) != null && l.includes(".")) && r === t.name;
5
+ return i || a;
6
+ }
7
+ const g = /* @__PURE__ */ new Set(["between", ">=", ">", "<=", "<", "="]);
8
+ function N(e) {
9
+ return e.dateOwner === "global_date";
10
+ }
11
+ function y(e, t, r = {}) {
12
+ const n = e.filters;
13
+ if (!n || !Array.isArray(n.conditions) || !f(n)) return e;
14
+ const i = t.filter(N);
15
+ if (!i.length) return e;
16
+ const a = (l) => {
17
+ var s;
18
+ return g.has(l.operator) && l.latestValue !== !0 && l.viewerZoom !== !0 && !((s = r.resolvedAtRun) != null && s.call(r, l)) && i.some(
19
+ (u) => d(u, { name: l.field.name, qualifiedFieldName: l.field.qualifiedFieldName })
20
+ );
21
+ }, o = n.conditions.filter((l) => !a(l));
22
+ return o.length === n.conditions.length ? e : { ...e, filters: { ...n, conditions: o } };
23
+ }
24
+ function f(e) {
25
+ var t;
26
+ return !e.negate && (e.logicalOperator === "AND" || e.conditions.length + (((t = e.groups) == null ? void 0 : t.length) ?? 0) <= 1);
27
+ }
28
+ function F(e, t, r) {
29
+ const n = t.filter((i) => !!i);
30
+ return e ? n.length ? Array.isArray(e.conditions) && f(e) ? { ...e, logicalOperator: "AND", groups: [...e.groups ?? [], ...n] } : { id: r, logicalOperator: "AND", negate: !1, conditions: [], groups: [e, ...n] } : e : n.length ? { id: r, logicalOperator: "AND", negate: !1, conditions: [], groups: n } : void 0;
31
+ }
32
+ function w(e) {
33
+ return !e || !Array.isArray(e.conditions) ? [] : f(e) ? [
34
+ ...e.conditions,
35
+ ...(e.groups ?? []).flatMap((t) => w(t))
36
+ ] : [];
37
+ }
38
+ function O(e, t) {
39
+ const r = e.filters;
40
+ if (!r || !Array.isArray(r.conditions) || !f(r) || !t.length)
41
+ return e;
42
+ const n = (a, o) => {
43
+ var u;
44
+ if (m(a.filterId)) return !1;
45
+ const l = { name: o.field.name, qualifiedFieldName: o.field.qualifiedFieldName }, s = !((u = a.fieldMeta) != null && u.qualifiedFieldName);
46
+ return d(a, l) || s && a.name === l.name;
47
+ }, i = r.conditions.filter(
48
+ (a) => !t.some((o) => n(o, a))
49
+ );
50
+ return i.length === r.conditions.length ? e : { ...e, filters: { ...r, conditions: i } };
51
+ }
52
+ function q(e, t) {
53
+ return {
54
+ id: t,
55
+ field: e.field,
56
+ operator: e.operator,
57
+ value: e.value,
58
+ label: e.label,
59
+ temporalBucket: e.temporalBucket,
60
+ ...e.rawTemporal ? { rawTemporal: e.rawTemporal } : {}
61
+ };
62
+ }
63
+ function c(e) {
64
+ var t;
65
+ return JSON.stringify([
66
+ ((t = e.field) == null ? void 0 : t.id) ?? "",
67
+ e.operator,
68
+ e.value ?? null,
69
+ e.temporalBucket ?? null,
70
+ e.rawTemporal ?? null
71
+ ]);
72
+ }
73
+ function A(e) {
74
+ return JSON.stringify(e.map(c).sort());
75
+ }
76
+ function p(e) {
77
+ const t = /* @__PURE__ */ new Map();
78
+ for (const r of e)
79
+ for (const n of r.tuples) {
80
+ const i = n.conditions.filter(
81
+ (l) => {
82
+ var s;
83
+ return (s = l.field) == null ? void 0 : s.id;
84
+ }
85
+ );
86
+ if (i.length === 0) continue;
87
+ let a = t.get(r.sourceCardId);
88
+ a || (a = /* @__PURE__ */ new Map(), t.set(r.sourceCardId, a));
89
+ const o = [...i].sort(
90
+ (l, s) => c(l).localeCompare(c(s))
91
+ );
92
+ a.set(A(o), o);
93
+ }
94
+ return [...t.entries()].sort(([r], [n]) => r.localeCompare(n)).map(([r, n]) => ({
95
+ sourceCardId: r,
96
+ tuples: [...n.entries()].sort(([i], [a]) => i.localeCompare(a)).map(([, i]) => ({ conditions: i }))
97
+ }));
98
+ }
99
+ function b(e) {
100
+ const t = p(e);
101
+ if (t.length !== 0)
102
+ return {
103
+ id: "selection",
104
+ logicalOperator: "AND",
105
+ negate: !1,
106
+ conditions: [],
107
+ groups: t.map((r) => {
108
+ const n = `selection:${r.sourceCardId}`;
109
+ return {
110
+ id: n,
111
+ logicalOperator: "OR",
112
+ negate: !1,
113
+ conditions: [],
114
+ groups: r.tuples.map((i, a) => {
115
+ const o = `${n}:${a}`;
116
+ return {
117
+ id: o,
118
+ logicalOperator: "AND",
119
+ negate: !1,
120
+ conditions: i.conditions.map((l, s) => ({
121
+ ...l,
122
+ id: `${o}:${s}`
123
+ })),
124
+ groups: []
125
+ };
126
+ })
127
+ };
128
+ })
129
+ };
130
+ }
131
+ function D(e) {
132
+ return JSON.stringify(
133
+ p(e).map((t) => [
134
+ t.sourceCardId,
135
+ t.tuples.map((r) => r.conditions.map(c))
136
+ ])
137
+ );
138
+ }
139
+ export {
140
+ f as a,
141
+ O as b,
142
+ b as c,
143
+ d as f,
144
+ N as i,
145
+ F as n,
146
+ D as s,
147
+ q as t,
148
+ w as u,
149
+ y as w
150
+ };