react-semaphor 0.0.652 → 0.0.654

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DtPlzxbT.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-ClRvasId.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as a } from "../chunks/index-CCSxFYi0.js";
1
+ import { D as a } from "../chunks/index-CfHeyJ7m.js";
2
2
  import { EMPTY_SELECTION as e } from "../types/index.js";
3
3
  export {
4
4
  a as Dashboard,
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DtPlzxbT.js"),h=require("./types/index.cjs"),n=require("./chunks/dashboard-plus-Bg0LYX7P.js"),t=require("react/jsx-runtime"),C=require("react");require("react-dom");function T(a){const{displayPreferences:i,...d}=a,u={...d,id:a.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsx(e.SemaphorContextProvider,{dashboardProps:u,children:t.jsx(e.UXProvider,{children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:i,children:t.jsx(e.Container,{type:"visual",...u,children:t.jsx(S,{cardId:a.cardId})})})})})})}function S({cardId:a}){const i=e.useDashboardStore(o=>{var s;return(s=o.dashboard)==null?void 0:s.sheets}),{card:d,frame:u}=C.useMemo(()=>{const o=i==null?void 0:i.flatMap(r=>r.frames),s=o==null?void 0:o.flatMap(r=>r==null?void 0:r.cards),c=s==null?void 0:s.find(r=>(r==null?void 0:r.id)===a),M=o==null?void 0:o.find(r=>{var l;return(l=r==null?void 0:r.cards)==null?void 0:l.find(Y=>(Y==null?void 0:Y.id)===a)});return{card:c,frame:M}},[i,a]);return!d||!u?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:o,resetErrorBoundary:s})=>t.jsx(e.FallbackVisual,{error:o,resetErrorBoundary:s,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:d,frame:u})})})}const b=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];var D=(a=>(a.SUBTOTAL="__SUBTOTAL__",a.TOTAL="__TOTAL__",a.ALL="__ALL__",a))(D||{});exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=h.EMPTY_SELECTION;exports.ResourceManagementPanel=n.ResourceManagementPanel;exports.ScheduleDashboard=n.ScheduleDashboard;exports.SelectComponent=n.SelectComponent;exports.ShareDialog=n.ShareDialog;exports.Surfboard=n.DashboardPlus;exports.cleanCard=n.cleanCard;exports.getDashbaordStateWithoutData=n.getDashbaordStateWithoutData;exports.DATE_FORMAT_VALUES=b;exports.PivotMarkerEnum=D;exports.Visual=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-ClRvasId.js"),C=require("./types/index.cjs"),s=require("./chunks/dashboard-plus-pGIT-28z.js"),o=require("react/jsx-runtime"),T=require("react");require("react-dom");function h(a){const{displayPreferences:i,...u}=a,d={...u,id:a.dashboardId};return o.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:o.jsx(e.SemaphorContextProvider,{dashboardProps:d,children:o.jsx(e.UXProvider,{children:o.jsx(e.DisplayPreferencesProvider,{displayPreferences:i,children:o.jsx(e.Container,{type:"visual",...d,children:o.jsx(g,{cardId:a.cardId})})})})})})}function g({cardId:a}){const i=e.useDashboardStore(t=>{var n;return(n=t.dashboard)==null?void 0:n.sheets}),{card:u,frame:d}=T.useMemo(()=>{const t=i==null?void 0:i.flatMap(r=>r.frames),n=t==null?void 0:t.flatMap(r=>r==null?void 0:r.cards),c=n==null?void 0:n.find(r=>(r==null?void 0:r.id)===a),M=t==null?void 0:t.find(r=>{var Y;return(Y=r==null?void 0:r.cards)==null?void 0:Y.find(l=>(l==null?void 0:l.id)===a)});return{card:c,frame:M}},[i,a]);return!u||!d?o.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):o.jsx("main",{className:"flex h-full grow flex-col",children:o.jsx(e.ErrorBoundary,{FallbackComponent:({error:t,resetErrorBoundary:n})=>o.jsx(e.FallbackVisual,{error:t,resetErrorBoundary:n,customerFacingMessage:"Error creating visual. Please try again."}),children:o.jsx(e.DashboardCard,{card:u,frame:d})})})}const S=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];var D=(a=>(a.SUBTOTAL="__SUBTOTAL__",a.TOTAL="__TOTAL__",a.ALL="__ALL__",a))(D||{});exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=C.EMPTY_SELECTION;exports.AdvancedModeToggle=s.AdvancedModeToggle;exports.ResourceManagementPanel=s.ResourceManagementPanel;exports.ScheduleDashboard=s.ScheduleDashboard;exports.SelectComponent=s.SelectComponent;exports.ShareDialog=s.ShareDialog;exports.Surfboard=s.DashboardPlus;exports.VisualBadge=s.VisualBadge;exports.VisualEditingControls=s.VisualEditingControls;exports.cleanCard=s.cleanCard;exports.getDashbaordStateWithoutData=s.getDashbaordStateWithoutData;exports.DATE_FORMAT_VALUES=S;exports.PivotMarkerEnum=D;exports.Visual=h;
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import { E as l, F as c, S as h, U as f, a as p, C as m, u as T, b as u, c as C } from "./chunks/index-CCSxFYi0.js";
2
- import { D as L, h as k, R as Q, f as w, f as B, r as N, j as O, l as W, t as R, s as U, x as V, y as q, q as I, i as G, p as H, v as j, o as z, n as J, m as K, z as X, w as $, g as Z, B as aa, H as ea, G as sa, I as ra, k as oa, d as ta, K as Ya, A as na, J as ia, e as da } from "./chunks/index-CCSxFYi0.js";
3
- import { EMPTY_SELECTION as la } from "./types/index.js";
4
- import { R as Da, a as ca, b as ha, S as fa, D as pa, c as ma, g as Ta } from "./chunks/dashboard-plus-1MhnSpH0.js";
1
+ import { E as u, F as c, S as h, U as f, a as p, C as T, u as m, b as l, c as C } from "./chunks/index-CfHeyJ7m.js";
2
+ import { D as L, h as k, R as Q, f as V, f as B, r as w, j as N, l as O, t as W, s as R, x as U, y as q, q as I, i as G, p as H, v as j, o as z, n as J, m as K, z as X, w as $, g as Z, B as aa, H as ea, G as sa, I as ra, k as oa, d as ta, K as Ya, A as na, J as ia, e as da } from "./chunks/index-CfHeyJ7m.js";
3
+ import { EMPTY_SELECTION as ua } from "./types/index.js";
4
+ import { A as Da, R as ca, b as ha, c as fa, S as pa, D as Ta, a as ma, V as Ca, d as ga, g as ba } from "./chunks/dashboard-plus-D3dnsw9E.js";
5
5
  import { jsx as s } from "react/jsx-runtime";
6
- import { useMemo as b } from "react";
6
+ import { useMemo as g } from "react";
7
7
  import "react-dom";
8
- function x(a) {
8
+ function E(a) {
9
9
  const { displayPreferences: t, ...n } = a, Y = {
10
10
  ...n,
11
11
  id: a.dashboardId
12
12
  // override the id to the dashboard id so that the dashboard is not loaded
13
13
  };
14
- return /* @__PURE__ */ s(l, { FallbackComponent: c, children: /* @__PURE__ */ s(h, { dashboardProps: Y, children: /* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { displayPreferences: t, children: /* @__PURE__ */ s(m, { type: "visual", ...Y, children: /* @__PURE__ */ s(S, { cardId: a.cardId }) }) }) }) }) });
14
+ return /* @__PURE__ */ s(u, { FallbackComponent: c, children: /* @__PURE__ */ s(h, { dashboardProps: Y, children: /* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { displayPreferences: t, children: /* @__PURE__ */ s(T, { type: "visual", ...Y, children: /* @__PURE__ */ s(b, { cardId: a.cardId }) }) }) }) }) });
15
15
  }
16
- function S({ cardId: a }) {
17
- const t = T((r) => {
16
+ function b({ cardId: a }) {
17
+ const t = m((r) => {
18
18
  var o;
19
19
  return (o = r.dashboard) == null ? void 0 : o.sheets;
20
- }), { card: n, frame: Y } = b(() => {
20
+ }), { card: n, frame: Y } = g(() => {
21
21
  const r = t == null ? void 0 : t.flatMap((e) => e.frames), o = r == null ? void 0 : r.flatMap((e) => e == null ? void 0 : e.cards), M = o == null ? void 0 : o.find((e) => (e == null ? void 0 : e.id) === a), D = r == null ? void 0 : r.find(
22
22
  (e) => {
23
23
  var d;
@@ -27,7 +27,7 @@ function S({ cardId: a }) {
27
27
  return { card: M, frame: D };
28
28
  }, [t, a]);
29
29
  return !n || !Y ? /* @__PURE__ */ s(
30
- u,
30
+ l,
31
31
  {
32
32
  error: new Error("Card not found"),
33
33
  resetErrorBoundary: () => {
@@ -35,13 +35,13 @@ function S({ cardId: a }) {
35
35
  customerFacingMessage: `Card not found with ID: ${a}`
36
36
  }
37
37
  ) : /* @__PURE__ */ s("main", { className: "flex h-full grow flex-col", children: /* @__PURE__ */ s(
38
- l,
38
+ u,
39
39
  {
40
40
  FallbackComponent: ({
41
41
  error: r,
42
42
  resetErrorBoundary: o
43
43
  }) => /* @__PURE__ */ s(
44
- u,
44
+ l,
45
45
  {
46
46
  error: r,
47
47
  resetErrorBoundary: o,
@@ -52,7 +52,7 @@ function S({ cardId: a }) {
52
52
  }
53
53
  ) });
54
54
  }
55
- const E = [
55
+ const x = [
56
56
  // Day granularity formats
57
57
  "MM-DD-YYYY",
58
58
  "YYYY-MM-DD",
@@ -83,31 +83,34 @@ const E = [
83
83
  // Custom format
84
84
  "custom"
85
85
  ];
86
- var g = /* @__PURE__ */ ((a) => (a.SUBTOTAL = "__SUBTOTAL__", a.TOTAL = "__TOTAL__", a.ALL = "__ALL__", a))(g || {});
86
+ var S = /* @__PURE__ */ ((a) => (a.SUBTOTAL = "__SUBTOTAL__", a.TOTAL = "__TOTAL__", a.ALL = "__ALL__", a))(S || {});
87
87
  export {
88
- E as DATE_FORMAT_VALUES,
88
+ Da as AdvancedModeToggle,
89
+ x as DATE_FORMAT_VALUES,
89
90
  L as Dashboard,
90
91
  k as DashboardWC,
91
- la as EMPTY_SELECTION,
92
- g as PivotMarkerEnum,
93
- Da as ResourceManagementPanel,
92
+ ua as EMPTY_SELECTION,
93
+ S as PivotMarkerEnum,
94
+ ca as ResourceManagementPanel,
94
95
  Q as ResourceType,
95
- ca as ScheduleDashboard,
96
- ha as SelectComponent,
96
+ ha as ScheduleDashboard,
97
+ fa as SelectComponent,
97
98
  h as SemaphorContextProvider,
98
- w as SemaphorDataProvider,
99
+ V as SemaphorDataProvider,
99
100
  B as SemaphorQueryClient,
100
- fa as ShareDialog,
101
- pa as Surfboard,
102
- x as Visual,
103
- ma as cleanCard,
104
- N as createSqlGenConfig,
105
- O as downloadPdf,
106
- W as fmt,
107
- R as getColumnDataType,
108
- Ta as getDashbaordStateWithoutData,
109
- U as getFilterValueType,
110
- V as getFormattedTableNameForQuery,
101
+ pa as ShareDialog,
102
+ Ta as Surfboard,
103
+ E as Visual,
104
+ ma as VisualBadge,
105
+ Ca as VisualEditingControls,
106
+ ga as cleanCard,
107
+ w as createSqlGenConfig,
108
+ N as downloadPdf,
109
+ O as fmt,
110
+ W as getColumnDataType,
111
+ ba as getDashbaordStateWithoutData,
112
+ R as getFilterValueType,
113
+ U as getFormattedTableNameForQuery,
111
114
  q as getQualifiedTableName,
112
115
  I as getSql,
113
116
  G as invalidateToken,
@@ -123,7 +126,7 @@ export {
123
126
  ea as useCurrentCardConfig,
124
127
  sa as useCurrentSheetActiveCards,
125
128
  ra as useDashboardActions,
126
- T as useDashboardStore,
129
+ m as useDashboardStore,
127
130
  oa as useDataColumns,
128
131
  ta as useDateFilterHook,
129
132
  Ya as useEditorActions,