react-semaphor 0.0.598 → 0.0.600
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.
- package/dist/chunks/{dashboard-plus-CRYpdcX_.js → dashboard-plus-BmCs016Q.js} +56 -61
- package/dist/chunks/{dashboard-plus-CvIP7sHn.js → dashboard-plus-Bzs4D9wv.js} +52 -64
- package/dist/chunks/{index-CBkCp_zm.js → index-Cps7ZMha.js} +182 -166
- package/dist/chunks/{index-B2BHK75N.js → index-DT9VO-bl.js} +17628 -17376
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +98 -49
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/main.d.ts +8 -0
- package/package.json +1 -1
package/dist/dashboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-Cps7ZMha.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
|
package/dist/dashboard/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-Cps7ZMha.js"),C=require("./types/index.cjs"),n=require("./chunks/dashboard-plus-BmCs016Q.js"),t=require("react/jsx-runtime"),h=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}=h.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.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;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.ResourceManagementPanel=n.ResourceManagementPanel;exports.ScheduleDashboard=n.ScheduleDashboard;exports.SelectComponent=n.SelectComponent;exports.Surfboard=n.DashboardPlus;exports.cleanCard=n.cleanCard;exports.downloadPdf=n.downloadPdf;exports.getDashbaordStateWithoutData=n.getDashbaordStateWithoutData;exports.DATE_FORMAT_VALUES=b;exports.PivotMarkerEnum=D;exports.Visual=T;
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import "react";
|
|
1
|
+
import { E as l, F as c, S as f, U as h, a as p, C as m, u as C, b as u, c as T } from "./chunks/index-DT9VO-bl.js";
|
|
2
|
+
import { D as L, h as k, f as Q, f as w, q as B, k as N, s as O, r as W, w as U, x as V, p as q, i as I, o as G, t as H, n as R, m as j, l as z, y as J, v as X, g as $, A as K, G as Z, B as aa, H as ea, j as sa, d as ra, J as oa, z as ta, I as Ya, e as na } from "./chunks/index-DT9VO-bl.js";
|
|
3
|
+
import { EMPTY_SELECTION as da } from "./types/index.js";
|
|
4
|
+
import { R as la, S as Ma, a as Da, D as ca, c as fa, d as ha, g as pa } from "./chunks/dashboard-plus-Bzs4D9wv.js";
|
|
5
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
6
|
+
import { useMemo as b } from "react";
|
|
6
7
|
import "react-dom";
|
|
7
|
-
|
|
8
|
+
function x(a) {
|
|
9
|
+
const { displayPreferences: t, ...n } = a, Y = {
|
|
10
|
+
...n,
|
|
11
|
+
id: a.dashboardId
|
|
12
|
+
// override the id to the dashboard id so that the dashboard is not loaded
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ s(l, { FallbackComponent: c, children: /* @__PURE__ */ s(f, { dashboardProps: Y, children: /* @__PURE__ */ s(h, { children: /* @__PURE__ */ s(p, { displayPreferences: t, children: /* @__PURE__ */ s(m, { type: "visual", ...Y, children: /* @__PURE__ */ s(S, { cardId: a.cardId }) }) }) }) }) });
|
|
15
|
+
}
|
|
16
|
+
function S({ cardId: a }) {
|
|
17
|
+
const t = C((r) => {
|
|
18
|
+
var o;
|
|
19
|
+
return (o = r.dashboard) == null ? void 0 : o.sheets;
|
|
20
|
+
}), { card: n, frame: Y } = b(() => {
|
|
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
|
+
(e) => {
|
|
23
|
+
var d;
|
|
24
|
+
return (d = e == null ? void 0 : e.cards) == null ? void 0 : d.find((i) => (i == null ? void 0 : i.id) === a);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
return { card: M, frame: D };
|
|
28
|
+
}, [t, a]);
|
|
29
|
+
return !n || !Y ? /* @__PURE__ */ s(
|
|
30
|
+
u,
|
|
31
|
+
{
|
|
32
|
+
error: new Error("Card not found"),
|
|
33
|
+
resetErrorBoundary: () => {
|
|
34
|
+
},
|
|
35
|
+
customerFacingMessage: `Card not found with ID: ${a}`
|
|
36
|
+
}
|
|
37
|
+
) : /* @__PURE__ */ s("main", { className: "flex h-full grow flex-col", children: /* @__PURE__ */ s(
|
|
38
|
+
l,
|
|
39
|
+
{
|
|
40
|
+
FallbackComponent: ({
|
|
41
|
+
error: r,
|
|
42
|
+
resetErrorBoundary: o
|
|
43
|
+
}) => /* @__PURE__ */ s(
|
|
44
|
+
u,
|
|
45
|
+
{
|
|
46
|
+
error: r,
|
|
47
|
+
resetErrorBoundary: o,
|
|
48
|
+
customerFacingMessage: "Error creating visual. Please try again."
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
children: /* @__PURE__ */ s(T, { card: n, frame: Y })
|
|
52
|
+
}
|
|
53
|
+
) });
|
|
54
|
+
}
|
|
55
|
+
const E = [
|
|
8
56
|
// Day granularity formats
|
|
9
57
|
"MM-DD-YYYY",
|
|
10
58
|
"YYYY-MM-DD",
|
|
@@ -35,48 +83,49 @@ const r = [
|
|
|
35
83
|
// Custom format
|
|
36
84
|
"custom"
|
|
37
85
|
];
|
|
38
|
-
var
|
|
86
|
+
var g = /* @__PURE__ */ ((a) => (a.SUBTOTAL = "__SUBTOTAL__", a.TOTAL = "__TOTAL__", a.ALL = "__ALL__", a))(g || {});
|
|
39
87
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
E as DATE_FORMAT_VALUES,
|
|
89
|
+
L as Dashboard,
|
|
90
|
+
k as DashboardWC,
|
|
91
|
+
da as EMPTY_SELECTION,
|
|
92
|
+
g as PivotMarkerEnum,
|
|
93
|
+
la as ResourceManagementPanel,
|
|
94
|
+
Ma as ScheduleDashboard,
|
|
95
|
+
Da as SelectComponent,
|
|
96
|
+
f as SemaphorContextProvider,
|
|
97
|
+
Q as SemaphorDataProvider,
|
|
98
|
+
w as SemaphorQueryClient,
|
|
99
|
+
ca as Surfboard,
|
|
100
|
+
x as Visual,
|
|
101
|
+
fa as cleanCard,
|
|
102
|
+
B as createSqlGenConfig,
|
|
103
|
+
ha as downloadPdf,
|
|
104
|
+
N as fmt,
|
|
105
|
+
O as getColumnDataType,
|
|
106
|
+
pa as getDashbaordStateWithoutData,
|
|
107
|
+
W as getFilterValueType,
|
|
108
|
+
U as getFormattedTableNameForQuery,
|
|
109
|
+
V as getQualifiedTableName,
|
|
110
|
+
q as getSql,
|
|
111
|
+
I as invalidateToken,
|
|
112
|
+
G as isBooleanDataType,
|
|
113
|
+
H as isColumnInSqlGen,
|
|
114
|
+
R as isDateDataType,
|
|
115
|
+
j as isNumberDataType,
|
|
116
|
+
z as isTextDataType,
|
|
117
|
+
J as resolveDataType,
|
|
118
|
+
X as resolveDatamodelName,
|
|
119
|
+
$ as useCard,
|
|
120
|
+
K as useCurrentActiveCard,
|
|
121
|
+
Z as useCurrentCardConfig,
|
|
122
|
+
aa as useCurrentSheetActiveCards,
|
|
123
|
+
ea as useDashboardActions,
|
|
124
|
+
C as useDashboardStore,
|
|
125
|
+
sa as useDataColumns,
|
|
126
|
+
ra as useDateFilterHook,
|
|
127
|
+
oa as useEditorActions,
|
|
128
|
+
ta as useEditorAside,
|
|
129
|
+
Ya as useEditorStore,
|
|
130
|
+
na as useTextFilterHook
|
|
82
131
|
};
|