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
@@ -4,7 +4,7 @@ var x = (e, t, o) => re(e, typeof t != "symbol" ? t + "" : t, o);
4
4
  import { h as oe, f as ne, U as ie, F as ae, a$ as G, G as se, an as P, al as ce, u as j, a0 as le } from "./validators-CsdOtZI6.js";
5
5
  import { C as A } from "./common-types-C6cAQgyh.js";
6
6
  import "./matrix-operation-contract-D32U2CSw.js";
7
- import { v as de, y as ue } from "./calculated-field-identity-Dy_WpDdo.js";
7
+ import { u as de, x as ue } from "./calculated-field-identity-D1ofR4KJ.js";
8
8
  import { B as ge } from "./field-aggregations-BQjogiI1.js";
9
9
  import { ZodError as fe } from "zod";
10
10
  import { a as H } from "./matrix-card-CIlz0Dnp.js";
@@ -76,7 +76,7 @@ function Te(e, t) {
76
76
  if (!o) return /* @__PURE__ */ new Date(NaN);
77
77
  const r = !!o[4], i = R(o[1]), a = R(o[2]) - 1, d = R(o[3]), u = R(o[4]), g = R(o[5]) - 1;
78
78
  if (r)
79
- return Re(t, u, g) ? ye(t, u, g) : /* @__PURE__ */ new Date(NaN);
79
+ return Re(t, u, g) ? Ce(t, u, g) : /* @__PURE__ */ new Date(NaN);
80
80
  {
81
81
  const O = /* @__PURE__ */ new Date(0);
82
82
  return !we(t, a, d) || !Ee(t, i) ? /* @__PURE__ */ new Date(NaN) : (O.setUTCFullYear(t, a, Math.max(i, d)), O);
@@ -101,18 +101,18 @@ function he(e) {
101
101
  const o = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), i = t[3] && parseInt(t[3]) || 0;
102
102
  return Ae(r, i) ? o * (r * Y + i * Z) : NaN;
103
103
  }
104
- function ye(e, t, o) {
104
+ function Ce(e, t, o) {
105
105
  const r = /* @__PURE__ */ new Date(0);
106
106
  r.setUTCFullYear(e, 0, 4);
107
107
  const i = r.getUTCDay() || 7, a = (t - 1) * 7 + o + 1 - i;
108
108
  return r.setUTCDate(r.getUTCDate() + a), r;
109
109
  }
110
- const Ce = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
110
+ const ye = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
111
111
  function W(e) {
112
112
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
113
113
  }
114
114
  function we(e, t, o) {
115
- return t >= 0 && t <= 11 && o >= 1 && o <= (Ce[t] || (W(e) ? 29 : 28));
115
+ return t >= 0 && t <= 11 && o >= 1 && o <= (ye[t] || (W(e) ? 29 : 28));
116
116
  }
117
117
  function Ee(e, t) {
118
118
  return t >= 1 && t <= (W(e) ? 366 : 365);
@@ -166,7 +166,7 @@ function ot(e, t, o) {
166
166
  function nt(e, t) {
167
167
  return `${e}-${t}`;
168
168
  }
169
- const it = "CONTROL_PLACEHOLDER_QUOTED", xe = "CONTROL_REFERENCE_MISSING", Le = "CONTROL_VALUE_MISSING", at = "CONTROL_VALUE_INVALID", st = "CONTROL_CONTEXT_UNSUPPORTED", ve = "CONTROL_DEFINITION_DUPLICATE", Ve = "CONTROL_DEFINITION_INVALID", v = "CONTROL_BINDING_MAPPING_MISSING", Me = "CONTROL_BINDING_TARGET_INVALID", q = "CONTROL_BINDING_VALUE_INVALID";
169
+ const it = "CONTROL_PLACEHOLDER_QUOTED", xe = "CONTROL_REFERENCE_MISSING", Le = "CONTROL_VALUE_MISSING", at = "CONTROL_VALUE_INVALID", st = "CONTROL_CONTEXT_UNSUPPORTED", Ve = "CONTROL_DEFINITION_DUPLICATE", ve = "CONTROL_DEFINITION_INVALID", V = "CONTROL_BINDING_MAPPING_MISSING", Me = "CONTROL_BINDING_TARGET_INVALID", q = "CONTROL_BINDING_VALUE_INVALID";
170
170
  class I extends Error {
171
171
  constructor(o, r) {
172
172
  super(o);
@@ -182,14 +182,14 @@ function X(e, t) {
182
182
  throw new I(
183
183
  "Malformed control definition was provided for query execution.",
184
184
  {
185
- code: Ve
185
+ code: ve
186
186
  }
187
187
  );
188
188
  if (o.get(r.id))
189
189
  throw new I(
190
190
  `Duplicate control definition '${r.id}' was provided for query execution.`,
191
191
  {
192
- code: ve,
192
+ code: Ve,
193
193
  controlId: r.id
194
194
  }
195
195
  );
@@ -357,7 +357,7 @@ function z(e) {
357
357
  throw new I(
358
358
  `Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}'.`,
359
359
  {
360
- code: v,
360
+ code: V,
361
361
  controlId: e.binding.controlId
362
362
  }
363
363
  );
@@ -369,7 +369,7 @@ function Ge(e) {
369
369
  throw new I(
370
370
  `Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid group-by field.`,
371
371
  {
372
- code: v,
372
+ code: V,
373
373
  controlId: e.binding.controlId
374
374
  }
375
375
  );
@@ -381,7 +381,7 @@ function Pe(e) {
381
381
  throw new I(
382
382
  `Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid metric field.`,
383
383
  {
384
- code: v,
384
+ code: V,
385
385
  controlId: e.binding.controlId
386
386
  }
387
387
  );
@@ -495,7 +495,7 @@ function lt(e) {
495
495
  c.set(l.id, [...f, l]);
496
496
  }
497
497
  return g = { refs: n, byId: c }, g;
498
- }, C = (n, c) => {
498
+ }, y = (n, c) => {
499
499
  throw new I(n, {
500
500
  code: Me,
501
501
  ...c ? { controlId: c } : {}
@@ -504,12 +504,12 @@ function lt(e) {
504
504
  var f;
505
505
  if (n.derivedField) return n.derivedField.dataType;
506
506
  const l = O().refs.filter((h) => h.field.name === n.name && G(h.field.source ?? e.spec.source, n.source ?? e.spec.source));
507
- return l.length > 1 ? C("The selected field is ambiguous in the authorized Matrix field catalog.", c) : ce(((f = l[0]) == null ? void 0 : f.field.dataType) ?? n.dataType);
508
- }, V = (n, c) => de(n, c.target, (l) => S(l, c.controlId)), D = ie.safeParse(t);
509
- if (!D.success) return C(D.error.message);
507
+ return l.length > 1 ? y("The selected field is ambiguous in the authorized Matrix field catalog.", c) : ce(((f = l[0]) == null ? void 0 : f.field.dataType) ?? n.dataType);
508
+ }, v = (n, c) => de(n, c.target, (l) => S(l, c.controlId)), D = ie.safeParse(t);
509
+ if (!D.success) return y(D.error.message);
510
510
  t = D.data;
511
511
  const K = [...i, ...a].map((n) => {
512
- const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ? V(D.data, n) : [];
512
+ const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ? v(D.data, n) : [];
513
513
  return {
514
514
  binding: n,
515
515
  selectedValue: c,
@@ -519,7 +519,7 @@ function lt(e) {
519
519
  for (const { binding: n, targetId: c, selectedValue: l } of K) {
520
520
  if (l === void 0 || l === A)
521
521
  continue;
522
- const f = (s) => C(s, n.controlId), h = n.target === "config_metric_selector" || n.target === "config_aggregation", ee = V(t, n);
522
+ const f = (s) => y(s, n.controlId), h = n.target === "config_metric_selector" || n.target === "config_aggregation", ee = v(t, n);
523
523
  (!c || !ee.some((s) => s.id === c)) && f("Choose a valid Matrix level or measure target for this control.");
524
524
  const M = `${n.target}:${c}`;
525
525
  d.has(M) && f("Multiple controls cannot replace the same Matrix target."), d.add(M);
@@ -528,13 +528,13 @@ function lt(e) {
528
528
  if (m.length !== 1) return f(m.length ? "The selected field is ambiguous in the authorized Matrix field catalog." : "The selected field is not in the authorized Matrix field catalog.");
529
529
  const N = se.safeParse(m[0].field);
530
530
  return N.success ? N.data : f(N.error.message);
531
- }, w = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0, y = w && typeof w == "object" && "kind" in w && w.kind === "matrix_instance" ? w.id : void 0;
531
+ }, w = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0, C = w && typeof w == "object" && "kind" in w && w.kind === "matrix_instance" ? w.id : void 0;
532
532
  if (h) {
533
533
  u.set(c, n.controlId);
534
- const s = y === void 0 ? void 0 : D.data.measures.find(
535
- (p) => p.id === y && p.kind === "aggregate"
534
+ const s = C === void 0 ? void 0 : D.data.measures.find(
535
+ (p) => p.id === C && p.kind === "aggregate"
536
536
  );
537
- y !== void 0 && !s && f("The selected Matrix aggregate measure is no longer available.");
537
+ C !== void 0 && !s && f("The selected Matrix aggregate measure is no longer available.");
538
538
  const m = n.target === "config_metric_selector" && !s ? Pe({ binding: n, selectedValue: l }) : void 0, N = ((s == null ? void 0 : s.kind) === "aggregate" ? s.aggregate : m == null ? void 0 : m.aggregate) ?? (n.target === "config_aggregation" ? z({ binding: n, selectedValue: l }) : void 0), _ = N === void 0 ? void 0 : ae.safeParse(N);
539
539
  _ && !_.success && f("This aggregation is not supported by Matrix."), t = {
540
540
  ...t,
@@ -548,10 +548,10 @@ function lt(e) {
548
548
  )
549
549
  };
550
550
  } else {
551
- const s = y === void 0 ? void 0 : [...D.data.rows, ...D.data.columns].find(
552
- (p) => p.id === y
551
+ const s = C === void 0 ? void 0 : [...D.data.rows, ...D.data.columns].find(
552
+ (p) => p.id === C
553
553
  );
554
- y !== void 0 && !s && f("The selected Matrix level is no longer available.");
554
+ C !== void 0 && !s && f("The selected Matrix level is no longer available.");
555
555
  const m = n.target === "config_field_selector" && !s ? Ge({ binding: n, selectedValue: l }) : void 0, N = n.target === "config_grain" ? z({ binding: n, selectedValue: l }) : s ? s.grain : m == null ? void 0 : m.granularity;
556
556
  N !== void 0 && !je.has(N) && f("This time grain is not supported by Matrix.");
557
557
  const _ = (p) => p.map((E) => {
@@ -570,12 +570,12 @@ function lt(e) {
570
570
  const l = t.measures.find((h) => h.id === n);
571
571
  if (!l || l.kind !== "aggregate") continue;
572
572
  const f = S(l.field, c);
573
- ge(f).some((h) => h.value === l.aggregate) || C(`Aggregation '${l.aggregate}' is not eligible for this Matrix field datatype.`, c);
573
+ ge(f).some((h) => h.value === l.aggregate) || y(`Aggregation '${l.aggregate}' is not eligible for this Matrix field datatype.`, c);
574
574
  }
575
575
  try {
576
576
  return ue(D.data, t);
577
577
  } catch (n) {
578
- if (n instanceof fe) return C(n.message);
578
+ if (n instanceof fe) return y(n.message);
579
579
  throw n;
580
580
  }
581
581
  }
@@ -615,9 +615,9 @@ export {
615
615
  at as f,
616
616
  nt as g,
617
617
  st as h,
618
- ve as i,
619
- Ve as j,
620
- v as k,
618
+ Ve as i,
619
+ ve as j,
620
+ V as k,
621
621
  Me as l,
622
622
  dt as m,
623
623
  q as n,