semaphor 0.0.128 → 0.0.130
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-controls-BMLlOkS9.js +1539 -0
- package/dist/chunks/dashboard-controls-BdQcYRkf.js +26 -0
- package/dist/chunks/dashboard-export-dialog-BpNaUA5x.js +6 -0
- package/dist/chunks/dashboard-export-dialog-CbMcLZvW.js +602 -0
- package/dist/chunks/dashboard-json-DD-d9gYu.js +66 -0
- package/dist/chunks/dashboard-json-DgQozDAv.js +1 -0
- package/dist/chunks/edit-dashboard-visual-CR3NqJ7m.js +200 -0
- package/dist/chunks/edit-dashboard-visual-CRMhXxdG.js +15517 -0
- package/dist/chunks/editor-action-buttons-CNQtSzD5.js +270 -0
- package/dist/chunks/editor-action-buttons-DYrSZQhJ.js +6 -0
- package/dist/chunks/index-CReqnEJI.js +1081 -0
- package/dist/chunks/{index-nm88dVBB.js → index-QdSI9E0a.js} +89207 -74907
- package/dist/chunks/resource-management-panel-CBXn6QHi.js +895 -0
- package/dist/chunks/resource-management-panel-CXSx9QhW.js +6 -0
- package/dist/chunks/use-click-outside-B9T3lmcw.js +1 -0
- package/dist/chunks/use-click-outside-CMeO_QFI.js +16 -0
- package/dist/chunks/use-visual-utils-BDuNB0Iz.js +1 -0
- package/dist/chunks/use-visual-utils-BnCl386t.js +331 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.js +194 -111
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +4 -4
- package/dist/types/dashboard.d.ts +524 -18
- package/dist/types/main.d.ts +948 -105
- package/dist/types/surfboard.d.ts +524 -18
- package/dist/types/types.d.ts +524 -18
- package/package.json +11 -7
- package/dist/chunks/dashboard-plus-DuenxiNV.js +0 -335
- package/dist/chunks/dashboard-plus-vO1PNFhv.js +0 -22561
- package/dist/chunks/index-BRkgsUH0.js +0 -985
package/dist/index.js
CHANGED
|
@@ -1,136 +1,219 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import { D as
|
|
3
|
-
import { EMPTY_SELECTION as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { useMemo as
|
|
1
|
+
import { b as S, E as g, F as P, S as w, U as M, m as k, n as A, u as F, o as y, p as L, P as R, q as I, B as V, c as v, r as _, s as U, t as B, v as W, I as j, w as q, x as z, y as O, z as Q, C as G } from "./chunks/index-QdSI9E0a.js";
|
|
2
|
+
import { Z as oa, _ as na, D as ta, N as ia, a2 as la, R as da, J as ca, J as ua, K as ha, a as pa, T as fa, al as ma, a9 as Ca, W as va, O as ba, Q as Da, a3 as ya, ab as ga, aa as xa, ae as Ea, af as Na, a8 as Ta, V as Sa, a7 as Pa, a0 as wa, a1 as Ma, $ as ka, ac as Aa, a6 as Fa, a5 as La, a4 as Ra, ag as Ia, ad as Va, M as _a, ai as Ua, ak as Ba, aj as Wa, g as ja, A as qa, Y as za, G as Oa, e as Qa, ah as Ga, f as Ha, H as Ka } from "./chunks/index-QdSI9E0a.js";
|
|
3
|
+
import { EMPTY_SELECTION as $a } from "./types/index.js";
|
|
4
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import * as p from "react";
|
|
6
|
+
import { useMemo as H } from "react";
|
|
7
|
+
import { ResourceManagementPanel as Xa } from "./chunks/resource-management-panel-CBXn6QHi.js";
|
|
8
|
+
import { A as ae, D as ee, S as se, U as re, V as oe, u as ne } from "./chunks/dashboard-export-dialog-CbMcLZvW.js";
|
|
7
9
|
import "react-dom";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @license lucide-react v0.453.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
const K = S("RefreshCw", [
|
|
17
|
+
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
18
|
+
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
19
|
+
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
20
|
+
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
21
|
+
]);
|
|
22
|
+
function aa(s) {
|
|
23
|
+
const { displayPreferences: o, ...i } = s, d = {
|
|
24
|
+
...i,
|
|
25
|
+
id: s.dashboardId
|
|
12
26
|
// override the id to the dashboard id so that the dashboard is not loaded
|
|
13
27
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ a(g, { FallbackComponent: P, children: /* @__PURE__ */ a(w, { dashboardProps: d, children: /* @__PURE__ */ a(M, { children: /* @__PURE__ */ a(k, { displayPreferences: o, children: /* @__PURE__ */ a(A, { type: "visual", ...d, children: /* @__PURE__ */ a(Y, { cardId: s.cardId }) }) }) }) }) });
|
|
15
29
|
}
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
return (
|
|
20
|
-
}), { card:
|
|
21
|
-
const r =
|
|
30
|
+
function Y({ cardId: s }) {
|
|
31
|
+
const o = F((r) => {
|
|
32
|
+
var n;
|
|
33
|
+
return (n = r.dashboard) == null ? void 0 : n.sheets;
|
|
34
|
+
}), { card: i, frame: d } = H(() => {
|
|
35
|
+
const r = o == null ? void 0 : o.flatMap((e) => e.frames), n = r == null ? void 0 : r.flatMap((e) => e == null ? void 0 : e.cards), f = n == null ? void 0 : n.find((e) => (e == null ? void 0 : e.id) === s), m = r == null ? void 0 : r.find(
|
|
22
36
|
(e) => {
|
|
23
|
-
var
|
|
24
|
-
return (
|
|
37
|
+
var h;
|
|
38
|
+
return (h = e == null ? void 0 : e.cards) == null ? void 0 : h.find((c) => (c == null ? void 0 : c.id) === s);
|
|
25
39
|
}
|
|
26
40
|
);
|
|
27
|
-
return { card:
|
|
28
|
-
}, [
|
|
29
|
-
return !
|
|
30
|
-
|
|
41
|
+
return { card: f, frame: m };
|
|
42
|
+
}, [o, s]);
|
|
43
|
+
return !i || !d ? /* @__PURE__ */ a(
|
|
44
|
+
y,
|
|
31
45
|
{
|
|
32
46
|
error: new Error("Card not found"),
|
|
33
47
|
resetErrorBoundary: () => {
|
|
34
48
|
},
|
|
35
|
-
customerFacingMessage: `Card not found with ID: ${
|
|
49
|
+
customerFacingMessage: `Card not found with ID: ${s}`
|
|
36
50
|
}
|
|
37
|
-
) : /* @__PURE__ */
|
|
38
|
-
|
|
51
|
+
) : /* @__PURE__ */ a("main", { className: "flex h-full grow flex-col", children: /* @__PURE__ */ a(
|
|
52
|
+
g,
|
|
39
53
|
{
|
|
40
54
|
FallbackComponent: ({
|
|
41
55
|
error: r,
|
|
42
|
-
resetErrorBoundary:
|
|
43
|
-
}) => /* @__PURE__ */
|
|
44
|
-
|
|
56
|
+
resetErrorBoundary: n
|
|
57
|
+
}) => /* @__PURE__ */ a(
|
|
58
|
+
y,
|
|
45
59
|
{
|
|
46
60
|
error: r,
|
|
47
|
-
resetErrorBoundary:
|
|
61
|
+
resetErrorBoundary: n,
|
|
48
62
|
customerFacingMessage: "Error creating visual. Please try again."
|
|
49
63
|
}
|
|
50
64
|
),
|
|
51
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ a(L, { card: i, frame: d })
|
|
52
66
|
}
|
|
53
67
|
) });
|
|
54
68
|
}
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
69
|
+
function ea({
|
|
70
|
+
name: s,
|
|
71
|
+
items: o,
|
|
72
|
+
value: i,
|
|
73
|
+
onChange: d,
|
|
74
|
+
isLoading: r,
|
|
75
|
+
isError: n,
|
|
76
|
+
refetch: f,
|
|
77
|
+
className: m,
|
|
78
|
+
icon: e,
|
|
79
|
+
showNone: h = !1
|
|
80
|
+
}) {
|
|
81
|
+
const c = p.useRef(null), [b, D] = p.useState(!1), [x, E] = p.useState("100%"), C = h ? [...o || [], { id: "none", name: "None" }] : o;
|
|
82
|
+
p.useLayoutEffect(() => {
|
|
83
|
+
c.current && E(c.current.offsetWidth);
|
|
84
|
+
}, []);
|
|
85
|
+
function N() {
|
|
86
|
+
var t;
|
|
87
|
+
return r ? "Loading..." : n ? "Error" : i ? (t = o == null ? void 0 : o.find((u) => u.id === i)) == null ? void 0 : t.name : `Select ${s}`;
|
|
88
|
+
}
|
|
89
|
+
function T(t, u) {
|
|
90
|
+
d(u), D(!1);
|
|
91
|
+
}
|
|
92
|
+
return /* @__PURE__ */ l(R, { open: b, onOpenChange: D, children: [
|
|
93
|
+
/* @__PURE__ */ a(I, { asChild: !0, children: /* @__PURE__ */ l(
|
|
94
|
+
V,
|
|
95
|
+
{
|
|
96
|
+
ref: c,
|
|
97
|
+
variant: "outline",
|
|
98
|
+
role: "combobox",
|
|
99
|
+
"aria-expanded": b,
|
|
100
|
+
className: v("flex h-9 w-full justify-between", m),
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
103
|
+
e && /* @__PURE__ */ a("div", { className: "mr-2", children: e }),
|
|
104
|
+
/* @__PURE__ */ a("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: N() })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ a(_, { className: "size-4 opacity-50" })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) }),
|
|
110
|
+
/* @__PURE__ */ a(
|
|
111
|
+
U,
|
|
112
|
+
{
|
|
113
|
+
className: "w-full p-0",
|
|
114
|
+
style: { minWidth: x },
|
|
115
|
+
children: /* @__PURE__ */ l(B, { children: [
|
|
116
|
+
/* @__PURE__ */ l("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
|
|
117
|
+
/* @__PURE__ */ a(W, { className: "h-9", placeholder: "Search..." }),
|
|
118
|
+
/* @__PURE__ */ a(j, { className: "h-7", onClick: f, children: /* @__PURE__ */ a(
|
|
119
|
+
K,
|
|
120
|
+
{
|
|
121
|
+
className: v(
|
|
122
|
+
"size-3.5 opacity-50",
|
|
123
|
+
r && "animate-spin"
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
) })
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ l(q, { children: [
|
|
129
|
+
/* @__PURE__ */ l(z, { children: [
|
|
130
|
+
"No ",
|
|
131
|
+
s == null ? void 0 : s.toLowerCase(),
|
|
132
|
+
" found."
|
|
133
|
+
] }),
|
|
134
|
+
/* @__PURE__ */ a(O, { children: C == null ? void 0 : C.map((t) => /* @__PURE__ */ a(
|
|
135
|
+
Q,
|
|
136
|
+
{
|
|
137
|
+
className: "overflow-x-auto",
|
|
138
|
+
value: t.name,
|
|
139
|
+
onSelect: (u) => T(u, t.id),
|
|
140
|
+
children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
141
|
+
/* @__PURE__ */ a(
|
|
142
|
+
G,
|
|
143
|
+
{
|
|
144
|
+
className: v(
|
|
145
|
+
"size-4",
|
|
146
|
+
i === t.id ? "opacity-100" : "opacity-0"
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
/* @__PURE__ */ a("div", { title: t.name, children: t.name })
|
|
151
|
+
] })
|
|
152
|
+
},
|
|
153
|
+
t.id
|
|
154
|
+
)) })
|
|
155
|
+
] })
|
|
156
|
+
] })
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
87
161
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
162
|
+
ae as AdvancedModeToggle,
|
|
163
|
+
oa as CALCULATED_FIELD_ENTITY_MARKER,
|
|
164
|
+
ea as Combobox,
|
|
165
|
+
na as DATE_FORMAT_VALUES,
|
|
166
|
+
ta as Dashboard,
|
|
167
|
+
ee as DashboardExportDialog,
|
|
168
|
+
ia as DashboardWC,
|
|
169
|
+
$a as EMPTY_SELECTION,
|
|
170
|
+
la as PivotMarkerEnum,
|
|
171
|
+
Xa as ResourceManagementPanel,
|
|
172
|
+
da as ResourceType,
|
|
173
|
+
se as ScheduleDashboard,
|
|
174
|
+
w as SemaphorContextProvider,
|
|
175
|
+
ca as SemaphorDataProvider,
|
|
176
|
+
ua as SemaphorQueryClient,
|
|
177
|
+
ha as ShareDialog,
|
|
178
|
+
pa as Surfboard,
|
|
179
|
+
re as UnsavedChangesAlert,
|
|
180
|
+
aa as Visual,
|
|
181
|
+
oe as VisualEditingControls,
|
|
182
|
+
fa as cloneDeep,
|
|
183
|
+
ma as createEmptyKpiConfig,
|
|
184
|
+
Ca as createSqlGenConfig,
|
|
185
|
+
va as downloadPdf,
|
|
186
|
+
ba as emitDashboardLoad,
|
|
187
|
+
Da as emitDashboardUnload,
|
|
188
|
+
ya as fmt,
|
|
189
|
+
ga as getColumnDataType,
|
|
190
|
+
xa as getFilterValueType,
|
|
191
|
+
Ea as getFormattedTableNameForQuery,
|
|
192
|
+
Na as getQualifiedTableName,
|
|
193
|
+
Ta as getSql,
|
|
194
|
+
Sa as invalidateToken,
|
|
195
|
+
Pa as isBooleanDataType,
|
|
196
|
+
wa as isCalculatedDimension,
|
|
197
|
+
Ma as isCalculatedField,
|
|
198
|
+
ka as isCalculatedMetric,
|
|
199
|
+
Aa as isColumnInSqlGen,
|
|
200
|
+
Fa as isDateDataType,
|
|
201
|
+
La as isNumberDataType,
|
|
202
|
+
Ra as isTextDataType,
|
|
203
|
+
Ia as resolveDataType,
|
|
204
|
+
Va as resolveDatamodelName,
|
|
205
|
+
_a as useCard,
|
|
206
|
+
Ua as useCurrentActiveCard,
|
|
207
|
+
Ba as useCurrentCardConfig,
|
|
208
|
+
Wa as useCurrentSheetActiveCards,
|
|
209
|
+
ja as useDashboardActions,
|
|
210
|
+
qa as useDashboardQuery,
|
|
211
|
+
F as useDashboardStore,
|
|
212
|
+
za as useDataColumns,
|
|
213
|
+
Oa as useDateFilterHook,
|
|
214
|
+
Qa as useEditorActions,
|
|
215
|
+
Ga as useEditorAside,
|
|
216
|
+
Ha as useEditorStore,
|
|
217
|
+
ne as usePristineSnapshotInitializer,
|
|
218
|
+
Ka as useTextFilterHook
|
|
136
219
|
};
|