semaphor 0.0.129 → 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-CE57mw6l.js → index-QdSI9E0a.js} +82751 -68873
- 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 +2 -2
- package/dist/index.js +138 -161
- 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 +500 -16
- package/dist/types/main.d.ts +882 -82
- package/dist/types/surfboard.d.ts +500 -16
- package/dist/types/types.d.ts +500 -16
- package/package.json +11 -7
- package/dist/chunks/dashboard-plus-BZ8k_sGe.js +0 -280
- package/dist/chunks/dashboard-plus-qMRXHdYf.js +0 -20761
- package/dist/chunks/index-Bo0bvCRT.js +0 -975
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as
|
|
3
|
-
import { EMPTY_SELECTION as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
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";
|
|
8
9
|
import "react-dom";
|
|
9
10
|
/**
|
|
10
11
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -12,176 +13,144 @@ import "react-dom";
|
|
|
12
13
|
* This source code is licensed under the ISC license.
|
|
13
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
15
|
*/
|
|
15
|
-
const
|
|
16
|
+
const K = S("RefreshCw", [
|
|
16
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" }],
|
|
17
18
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
18
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" }],
|
|
19
20
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
20
21
|
]);
|
|
21
|
-
function
|
|
22
|
-
const { displayPreferences: o, ...i } =
|
|
22
|
+
function aa(s) {
|
|
23
|
+
const { displayPreferences: o, ...i } = s, d = {
|
|
23
24
|
...i,
|
|
24
|
-
id:
|
|
25
|
+
id: s.dashboardId
|
|
25
26
|
// override the id to the dashboard id so that the dashboard is not loaded
|
|
26
27
|
};
|
|
27
|
-
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 }) }) }) }) }) });
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
const o =
|
|
31
|
-
var
|
|
32
|
-
return (
|
|
33
|
-
}), { card: i, frame:
|
|
34
|
-
const r = o == null ? void 0 : o.flatMap((
|
|
35
|
-
(
|
|
36
|
-
var
|
|
37
|
-
return (
|
|
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(
|
|
36
|
+
(e) => {
|
|
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);
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
|
-
return { card:
|
|
41
|
-
}, [o,
|
|
42
|
-
return !i || !
|
|
43
|
-
|
|
41
|
+
return { card: f, frame: m };
|
|
42
|
+
}, [o, s]);
|
|
43
|
+
return !i || !d ? /* @__PURE__ */ a(
|
|
44
|
+
y,
|
|
44
45
|
{
|
|
45
46
|
error: new Error("Card not found"),
|
|
46
47
|
resetErrorBoundary: () => {
|
|
47
48
|
},
|
|
48
|
-
customerFacingMessage: `Card not found with ID: ${
|
|
49
|
+
customerFacingMessage: `Card not found with ID: ${s}`
|
|
49
50
|
}
|
|
50
|
-
) : /* @__PURE__ */
|
|
51
|
-
|
|
51
|
+
) : /* @__PURE__ */ a("main", { className: "flex h-full grow flex-col", children: /* @__PURE__ */ a(
|
|
52
|
+
g,
|
|
52
53
|
{
|
|
53
54
|
FallbackComponent: ({
|
|
54
55
|
error: r,
|
|
55
|
-
resetErrorBoundary:
|
|
56
|
-
}) => /* @__PURE__ */
|
|
57
|
-
|
|
56
|
+
resetErrorBoundary: n
|
|
57
|
+
}) => /* @__PURE__ */ a(
|
|
58
|
+
y,
|
|
58
59
|
{
|
|
59
60
|
error: r,
|
|
60
|
-
resetErrorBoundary:
|
|
61
|
+
resetErrorBoundary: n,
|
|
61
62
|
customerFacingMessage: "Error creating visual. Please try again."
|
|
62
63
|
}
|
|
63
64
|
),
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ a(L, { card: i, frame: d })
|
|
65
66
|
}
|
|
66
67
|
) });
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"MM-DD-YYYY",
|
|
71
|
-
"YYYY-MM-DD",
|
|
72
|
-
"MM/DD/YYYY",
|
|
73
|
-
"DD/MM/YYYY",
|
|
74
|
-
"MMMM DD, YYYY",
|
|
75
|
-
"MMM DD, YYYY",
|
|
76
|
-
"DD MMM YYYY",
|
|
77
|
-
// Week granularity formats
|
|
78
|
-
"Week of MMM DD, YYYY",
|
|
79
|
-
"Week of MMMM DD, YYYY",
|
|
80
|
-
"YYYY-WW",
|
|
81
|
-
// Month granularity formats
|
|
82
|
-
"MMM YYYY",
|
|
83
|
-
"MMMM YYYY",
|
|
84
|
-
"YYYY-MM",
|
|
85
|
-
"MM/YYYY",
|
|
86
|
-
"YYYY MMM",
|
|
87
|
-
// Quarter granularity formats
|
|
88
|
-
"Q1 YYYY",
|
|
89
|
-
"YYYY Q1",
|
|
90
|
-
"1st Quarter YYYY",
|
|
91
|
-
"YYYY-Q1",
|
|
92
|
-
"Quarter 1, YYYY",
|
|
93
|
-
// Year granularity formats
|
|
94
|
-
"YYYY",
|
|
95
|
-
"YY",
|
|
96
|
-
// Custom format
|
|
97
|
-
"custom"
|
|
98
|
-
];
|
|
99
|
-
var K = /* @__PURE__ */ ((a) => (a.SUBTOTAL = "__SUBTOTAL__", a.TOTAL = "__TOTAL__", a.ALL = "__ALL__", a))(K || {});
|
|
100
|
-
function re({
|
|
101
|
-
name: a,
|
|
69
|
+
function ea({
|
|
70
|
+
name: s,
|
|
102
71
|
items: o,
|
|
103
72
|
value: i,
|
|
104
|
-
onChange:
|
|
73
|
+
onChange: d,
|
|
105
74
|
isLoading: r,
|
|
106
|
-
isError:
|
|
107
|
-
refetch:
|
|
108
|
-
className:
|
|
109
|
-
icon:
|
|
110
|
-
showNone:
|
|
75
|
+
isError: n,
|
|
76
|
+
refetch: f,
|
|
77
|
+
className: m,
|
|
78
|
+
icon: e,
|
|
79
|
+
showNone: h = !1
|
|
111
80
|
}) {
|
|
112
|
-
const c =
|
|
113
|
-
|
|
114
|
-
c.current &&
|
|
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);
|
|
115
84
|
}, []);
|
|
116
|
-
function
|
|
117
|
-
var
|
|
118
|
-
return r ? "Loading..." :
|
|
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}`;
|
|
119
88
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
89
|
+
function T(t, u) {
|
|
90
|
+
d(u), D(!1);
|
|
122
91
|
}
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
92
|
+
return /* @__PURE__ */ l(R, { open: b, onOpenChange: D, children: [
|
|
93
|
+
/* @__PURE__ */ a(I, { asChild: !0, children: /* @__PURE__ */ l(
|
|
94
|
+
V,
|
|
126
95
|
{
|
|
127
96
|
ref: c,
|
|
128
97
|
variant: "outline",
|
|
129
98
|
role: "combobox",
|
|
130
|
-
"aria-expanded":
|
|
131
|
-
className:
|
|
99
|
+
"aria-expanded": b,
|
|
100
|
+
className: v("flex h-9 w-full justify-between", m),
|
|
132
101
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
|
|
135
|
-
/* @__PURE__ */
|
|
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() })
|
|
136
105
|
] }),
|
|
137
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ a(_, { className: "size-4 opacity-50" })
|
|
138
107
|
]
|
|
139
108
|
}
|
|
140
109
|
) }),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
110
|
+
/* @__PURE__ */ a(
|
|
111
|
+
U,
|
|
143
112
|
{
|
|
144
113
|
className: "w-full p-0",
|
|
145
|
-
style: { minWidth:
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
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,
|
|
151
120
|
{
|
|
152
|
-
className:
|
|
121
|
+
className: v(
|
|
153
122
|
"size-3.5 opacity-50",
|
|
154
123
|
r && "animate-spin"
|
|
155
124
|
)
|
|
156
125
|
}
|
|
157
126
|
) })
|
|
158
127
|
] }),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ l(q, { children: [
|
|
129
|
+
/* @__PURE__ */ l(z, { children: [
|
|
161
130
|
"No ",
|
|
162
|
-
|
|
131
|
+
s == null ? void 0 : s.toLowerCase(),
|
|
163
132
|
" found."
|
|
164
133
|
] }),
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
|
|
134
|
+
/* @__PURE__ */ a(O, { children: C == null ? void 0 : C.map((t) => /* @__PURE__ */ a(
|
|
135
|
+
Q,
|
|
167
136
|
{
|
|
168
137
|
className: "overflow-x-auto",
|
|
169
|
-
value:
|
|
170
|
-
onSelect: (
|
|
171
|
-
children: /* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
|
|
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,
|
|
174
143
|
{
|
|
175
|
-
className:
|
|
144
|
+
className: v(
|
|
176
145
|
"size-4",
|
|
177
|
-
i ===
|
|
146
|
+
i === t.id ? "opacity-100" : "opacity-0"
|
|
178
147
|
)
|
|
179
148
|
}
|
|
180
149
|
),
|
|
181
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ a("div", { title: t.name, children: t.name })
|
|
182
151
|
] })
|
|
183
152
|
},
|
|
184
|
-
|
|
153
|
+
t.id
|
|
185
154
|
)) })
|
|
186
155
|
] })
|
|
187
156
|
] })
|
|
@@ -190,53 +159,61 @@ function re({
|
|
|
190
159
|
] });
|
|
191
160
|
}
|
|
192
161
|
export {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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,
|
|
203
174
|
w as SemaphorContextProvider,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
|
242
219
|
};
|