react-semaphor 0.1.569 → 0.1.570
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/appearance/index.js +6 -3
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +570 -432
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
- package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
- package/dist/chunks/{bookmark-impact-Czg6FGt5.js → bookmark-impact-DCYD-6Fr.js} +1 -1
- package/dist/chunks/brand-B4BdpAB_.js +54 -0
- package/dist/chunks/{card-filter-builder-BS982X7x.js → card-filter-builder-0VvKmRst.js} +72 -72
- package/dist/chunks/{comparison-window-caption-lLTgzOkM.js → comparison-window-caption-PtcDWvkN.js} +2 -2
- package/dist/chunks/{dashboard-BiYSbxZv.js → dashboard-DxGIr1vZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Bdj7luOr.js → dashboard-briefing-launcher-B-quOOOQ.js} +183 -182
- package/dist/chunks/{dashboard-controls-TViDsnb8.js → dashboard-controls-Caodx80b.js} +285 -280
- package/dist/chunks/{dashboard-json-Dg9dQd9U.js → dashboard-json-Ct-AGDHF.js} +3 -3
- package/dist/chunks/{dates-BsPrWZIP.js → dates-B9mL8BHE.js} +13 -12
- package/dist/chunks/edit-Bpdh_P_a.js +226 -0
- package/dist/chunks/{edit-dashboard-visual-C6hoIeEJ.js → edit-dashboard-visual-DeDTuYB5.js} +2256 -2268
- package/dist/chunks/{filter-reach-copy-hcQ4os0u.js → filter-reach-copy-BSY33ro5.js} +1425 -1282
- package/dist/chunks/{filter-value-text-CVxEEDVl.js → filter-value-text-DvvSNlho.js} +1 -1
- package/dist/chunks/index-BVKzKl5d.js +90 -0
- package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
- package/dist/chunks/{index-G4q89J6O.js → index-y3HUzRNk.js} +61 -60
- package/dist/chunks/{layout-grid-BIcoFfdS.js → layout-grid-8rR-LPTk.js} +1 -1
- package/dist/chunks/{list-filter-C6tYkHyv.js → list-filter-C1-uTgjR.js} +1 -1
- package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
- package/dist/chunks/{palette-NjHOE_6B.js → palette-a5FCZKFI.js} +1 -1
- package/dist/chunks/{_commonjsHelpers-Bid1ZNYj.js → pickers-DkqmtnTL.js} +179 -166
- package/dist/chunks/{pivot-result-contract-expectations-DkmueDTW.js → pivot-result-contract-expectations-C-HnUKYe.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-Xc8_GFju.js → report-preferences-dialog-Yvhv3WX2.js} +79 -79
- package/dist/chunks/{resolve-dashboard-input-context-KqvcLcTM.js → resolve-dashboard-input-context-Lkbwycwe.js} +5179 -5391
- package/dist/chunks/resolver-DG_tfEpt.js +156 -0
- package/dist/chunks/{save-C6VmEJTA.js → save-D985VvYp.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-BeXXyoD4.js → saved-dashboard-context-DC_TEd6y.js} +3 -3
- package/dist/chunks/schema-C9NPiIru.js +2568 -0
- package/dist/chunks/{semaphor-ready-indicator-BNkaANsG.js → semaphor-ready-indicator-ByFvqHEO.js} +33935 -34031
- package/dist/chunks/{shelf-drop-preview-context-C_issPBA.js → shelf-drop-preview-context-CjoVaK6J.js} +50 -50
- package/dist/chunks/{stored-dashboard-B6_StAty.js → stored-dashboard-C0hekXiI.js} +189 -188
- package/dist/chunks/{code-editor-BsxHzm9u.js → style-sheet-parts-C7qGZuH1.js} +2400 -2036
- package/dist/chunks/{table-export-sheet-BWP2joD1.js → table-export-sheet-CP8zSOhj.js} +1 -1
- package/dist/chunks/{temporal-input-presentation-scSWQXAB.js → temporal-input-presentation-CqbJjIuu.js} +14 -14
- package/dist/chunks/{upload-BRW4Mwrd.js → upload-CiGNKJ_0.js} +1 -1
- package/dist/chunks/{variable-draft-BQ3OMjvy.js → variable-draft-9-huI1h4.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1911 -1859
- package/dist/format-utils/index.js +8 -8
- package/dist/index.js +332 -335
- package/dist/layouts/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/appearance/index.d.ts +1 -0
- package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
- package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
- package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
- package/dist/types/lib/appearance/aliases.d.ts +42 -0
- package/dist/types/lib/appearance/compiler.d.ts +6 -0
- package/dist/types/lib/appearance/defaults.d.ts +6 -0
- package/dist/types/lib/appearance/index.d.ts +2 -0
- package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
- package/dist/types/lib/appearance/resolver.d.ts +2 -2
- package/dist/types/lib/appearance/types.d.ts +38 -1
- package/dist/types/lib/charts/types.d.ts +6 -2
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
- package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
- package/dist/types/lib/download-pdf.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
- package/dist/types/lib/stores/dashboard-store.d.ts +15 -6
- package/dist/types/lib/stores/editor-store.d.ts +0 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
- package/dist/types/lib/types/common-types.d.ts +3 -2
- package/dist/types/lib/types/summary-types.d.ts +0 -5
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +68 -68
- package/dist/types/shared/assistant-protocol/context.d.ts +18 -18
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +212 -42
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +30 -30
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +4 -4
- package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +20 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +7 -7
- package/package.json +6 -3
- package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
- package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
- package/dist/chunks/assistant-chat-Dzf2Mbph.js +0 -8847
- package/dist/chunks/color-CJvdlFM_.js +0 -2162
- package/dist/chunks/index-CLIro-EG.js +0 -425
- package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
import { b as y, d as A, S as F, p as N } from "./color-CJvdlFM_.js";
|
|
2
|
-
const S = [
|
|
3
|
-
"#3b82f6",
|
|
4
|
-
"#10b981",
|
|
5
|
-
"#f59e0b",
|
|
6
|
-
"#ef4444",
|
|
7
|
-
"#8b5cf6",
|
|
8
|
-
"#06b6d4",
|
|
9
|
-
"#84cc16",
|
|
10
|
-
"#f97316"
|
|
11
|
-
], R = {
|
|
12
|
-
version: 1,
|
|
13
|
-
mode: "system",
|
|
14
|
-
schemes: {
|
|
15
|
-
light: {
|
|
16
|
-
tokens: {
|
|
17
|
-
color: {
|
|
18
|
-
background: "hsl(0 0% 100%)",
|
|
19
|
-
foreground: "hsl(240 5.9% 10%)",
|
|
20
|
-
muted: "hsl(0 0% 98%)",
|
|
21
|
-
mutedForeground: "hsl(240 3.8% 46.1%)",
|
|
22
|
-
border: "hsl(240 5.9% 90%)",
|
|
23
|
-
input: "hsl(240 5.9% 90%)",
|
|
24
|
-
primary: "hsl(240 5.9% 10%)",
|
|
25
|
-
primaryForeground: "hsl(0 0% 98%)",
|
|
26
|
-
accent: "hsl(240 4.8% 95.9%)",
|
|
27
|
-
accentForeground: "hsl(240 5.9% 10%)",
|
|
28
|
-
selection: "hsl(217 91% 53%)",
|
|
29
|
-
card: "hsl(0 0% 100%)",
|
|
30
|
-
cardForeground: "hsl(240 5.9% 10%)",
|
|
31
|
-
positive: "#16a34a",
|
|
32
|
-
negative: "#dc2626",
|
|
33
|
-
warning: "#d97706",
|
|
34
|
-
info: "#0284c7",
|
|
35
|
-
destructive: "hsl(0 72.2% 50.6%)",
|
|
36
|
-
destructiveForeground: "hsl(0 0% 98%)"
|
|
37
|
-
},
|
|
38
|
-
typography: {
|
|
39
|
-
fontFamily: F,
|
|
40
|
-
headingFontFamily: A,
|
|
41
|
-
monoFontFamily: y,
|
|
42
|
-
baseFontSize: 14,
|
|
43
|
-
density: "comfortable"
|
|
44
|
-
},
|
|
45
|
-
radius: {
|
|
46
|
-
control: 5,
|
|
47
|
-
card: 5,
|
|
48
|
-
table: 5,
|
|
49
|
-
badge: 999
|
|
50
|
-
},
|
|
51
|
-
spacing: {
|
|
52
|
-
dashboardPadding: 16,
|
|
53
|
-
gridGap: 12,
|
|
54
|
-
cardPadding: 16,
|
|
55
|
-
controlGap: 8,
|
|
56
|
-
tableCellX: 12,
|
|
57
|
-
tableCellY: 8
|
|
58
|
-
},
|
|
59
|
-
shadow: {
|
|
60
|
-
card: "0 1px 2px rgba(15, 23, 42, 0.08)",
|
|
61
|
-
popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
|
|
62
|
-
focusRing: "0 0 0 2px rgba(37, 99, 235, 0.35)"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
components: {
|
|
66
|
-
chart: {
|
|
67
|
-
palette: S
|
|
68
|
-
},
|
|
69
|
-
table: {
|
|
70
|
-
density: "compact"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
dark: {
|
|
75
|
-
tokens: {
|
|
76
|
-
color: {
|
|
77
|
-
background: "hsl(240 10% 3.9%)",
|
|
78
|
-
foreground: "hsl(0 0% 93%)",
|
|
79
|
-
muted: "hsl(240 5.9% 10%)",
|
|
80
|
-
mutedForeground: "hsl(240 5% 64.9%)",
|
|
81
|
-
border: "hsl(240 3.7% 15.9%)",
|
|
82
|
-
input: "hsl(240 3.7% 15.9%)",
|
|
83
|
-
primary: "hsl(0 0% 98%)",
|
|
84
|
-
primaryForeground: "hsl(240 5.9% 10%)",
|
|
85
|
-
accent: "hsl(240 3.7% 15.9%)",
|
|
86
|
-
accentForeground: "hsl(0 0% 93%)",
|
|
87
|
-
selection: "hsl(217 91% 64%)",
|
|
88
|
-
card: "hsl(240 10% 3.9%)",
|
|
89
|
-
cardForeground: "hsl(0 0% 93%)",
|
|
90
|
-
positive: "#22c55e",
|
|
91
|
-
negative: "#f87171",
|
|
92
|
-
warning: "#fbbf24",
|
|
93
|
-
info: "#38bdf8",
|
|
94
|
-
destructive: "hsl(0 62.8% 30.6%)",
|
|
95
|
-
destructiveForeground: "hsl(0 0% 93%)"
|
|
96
|
-
},
|
|
97
|
-
typography: {
|
|
98
|
-
fontFamily: F,
|
|
99
|
-
headingFontFamily: A,
|
|
100
|
-
monoFontFamily: y,
|
|
101
|
-
baseFontSize: 14,
|
|
102
|
-
density: "comfortable"
|
|
103
|
-
},
|
|
104
|
-
radius: {
|
|
105
|
-
control: 5,
|
|
106
|
-
card: 5,
|
|
107
|
-
table: 5,
|
|
108
|
-
badge: 999
|
|
109
|
-
},
|
|
110
|
-
spacing: {
|
|
111
|
-
dashboardPadding: 16,
|
|
112
|
-
gridGap: 12,
|
|
113
|
-
cardPadding: 16,
|
|
114
|
-
controlGap: 8,
|
|
115
|
-
tableCellX: 12,
|
|
116
|
-
tableCellY: 8
|
|
117
|
-
},
|
|
118
|
-
shadow: {
|
|
119
|
-
card: "0 1px 2px rgba(0, 0, 0, 0.3)",
|
|
120
|
-
popover: "0 12px 32px rgba(0, 0, 0, 0.45)",
|
|
121
|
-
focusRing: "0 0 0 2px rgba(96, 165, 250, 0.35)"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
components: {
|
|
125
|
-
chart: {
|
|
126
|
-
palette: S
|
|
127
|
-
},
|
|
128
|
-
table: {
|
|
129
|
-
density: "compact"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}, _ = E(
|
|
135
|
-
R
|
|
136
|
-
);
|
|
137
|
-
function E(e) {
|
|
138
|
-
if (typeof e != "object" || e === null || Object.isFrozen(e))
|
|
139
|
-
return e;
|
|
140
|
-
Object.freeze(e);
|
|
141
|
-
for (const o of Object.values(e))
|
|
142
|
-
E(o);
|
|
143
|
-
return e;
|
|
144
|
-
}
|
|
145
|
-
const k = 1, T = /* @__PURE__ */ new Set(["light", "dark", "system"]), j = /* @__PURE__ */ new Set([
|
|
146
|
-
"compact",
|
|
147
|
-
"comfortable",
|
|
148
|
-
"spacious"
|
|
149
|
-
]), M = Object.fromEntries(
|
|
150
|
-
[
|
|
151
|
-
"background",
|
|
152
|
-
"foreground",
|
|
153
|
-
"muted",
|
|
154
|
-
"mutedForeground",
|
|
155
|
-
"border",
|
|
156
|
-
"input",
|
|
157
|
-
"primary",
|
|
158
|
-
"primaryForeground",
|
|
159
|
-
"accent",
|
|
160
|
-
"accentForeground",
|
|
161
|
-
"selection",
|
|
162
|
-
"card",
|
|
163
|
-
"cardForeground",
|
|
164
|
-
"positive",
|
|
165
|
-
"negative",
|
|
166
|
-
"warning",
|
|
167
|
-
"info",
|
|
168
|
-
"destructive",
|
|
169
|
-
"destructiveForeground"
|
|
170
|
-
].map((e) => [e, n])
|
|
171
|
-
), z = {
|
|
172
|
-
fontFamily: d,
|
|
173
|
-
headingFontFamily: d,
|
|
174
|
-
monoFontFamily: d,
|
|
175
|
-
baseFontSize: p,
|
|
176
|
-
density: P
|
|
177
|
-
}, L = {
|
|
178
|
-
control: c,
|
|
179
|
-
card: c,
|
|
180
|
-
table: c,
|
|
181
|
-
badge: c
|
|
182
|
-
}, I = {
|
|
183
|
-
dashboardPadding: c,
|
|
184
|
-
gridGap: c,
|
|
185
|
-
cardPadding: c,
|
|
186
|
-
controlGap: c,
|
|
187
|
-
tableCellX: c,
|
|
188
|
-
tableCellY: c
|
|
189
|
-
}, V = {
|
|
190
|
-
card: d,
|
|
191
|
-
popover: d,
|
|
192
|
-
focusRing: d
|
|
193
|
-
}, f = {
|
|
194
|
-
background: n,
|
|
195
|
-
foreground: n,
|
|
196
|
-
borderColor: n,
|
|
197
|
-
borderRadius: c,
|
|
198
|
-
shadow: d,
|
|
199
|
-
padding: c
|
|
200
|
-
}, $ = {
|
|
201
|
-
...f,
|
|
202
|
-
toolbarBackground: n
|
|
203
|
-
}, D = {
|
|
204
|
-
palette: Q,
|
|
205
|
-
background: n,
|
|
206
|
-
foreground: n,
|
|
207
|
-
gridColor: n,
|
|
208
|
-
axisColor: n
|
|
209
|
-
}, Y = {
|
|
210
|
-
background: n,
|
|
211
|
-
borderColor: n,
|
|
212
|
-
borderRadius: c,
|
|
213
|
-
shadow: d
|
|
214
|
-
}, u = {
|
|
215
|
-
density: P,
|
|
216
|
-
container: t(Y),
|
|
217
|
-
header: t({
|
|
218
|
-
background: n,
|
|
219
|
-
foreground: n,
|
|
220
|
-
dividerColor: n,
|
|
221
|
-
fontWeight: p,
|
|
222
|
-
uppercase: g,
|
|
223
|
-
sticky: g
|
|
224
|
-
}),
|
|
225
|
-
row: t({
|
|
226
|
-
height: p,
|
|
227
|
-
dividerColor: n,
|
|
228
|
-
zebra: g,
|
|
229
|
-
zebraBackground: n,
|
|
230
|
-
hoverBackground: n,
|
|
231
|
-
selectedBackground: n
|
|
232
|
-
}),
|
|
233
|
-
cell: t({
|
|
234
|
-
paddingX: c,
|
|
235
|
-
paddingY: c,
|
|
236
|
-
verticalAlign: J,
|
|
237
|
-
wrap: K
|
|
238
|
-
}),
|
|
239
|
-
subtotal: t({
|
|
240
|
-
background: n,
|
|
241
|
-
foreground: n,
|
|
242
|
-
fontWeight: p
|
|
243
|
-
}),
|
|
244
|
-
grandTotal: t({
|
|
245
|
-
background: n,
|
|
246
|
-
foreground: n,
|
|
247
|
-
fontWeight: p,
|
|
248
|
-
borderColor: n
|
|
249
|
-
}),
|
|
250
|
-
pagination: t({
|
|
251
|
-
background: n,
|
|
252
|
-
foreground: n,
|
|
253
|
-
borderColor: n
|
|
254
|
-
})
|
|
255
|
-
}, G = {
|
|
256
|
-
color: t(M),
|
|
257
|
-
typography: t(z),
|
|
258
|
-
radius: t(L),
|
|
259
|
-
spacing: t(I),
|
|
260
|
-
shadow: t(V)
|
|
261
|
-
}, H = {
|
|
262
|
-
dashboard: t(f),
|
|
263
|
-
card: t(f),
|
|
264
|
-
interactive: t($),
|
|
265
|
-
chart: t(D),
|
|
266
|
-
table: t(u),
|
|
267
|
-
pivotTable: t(u),
|
|
268
|
-
matrixTable: t(u),
|
|
269
|
-
aggregateTable: t(u),
|
|
270
|
-
pagination: t(f)
|
|
271
|
-
}, v = {
|
|
272
|
-
tokens: t(G),
|
|
273
|
-
components: t(H)
|
|
274
|
-
}, U = {
|
|
275
|
-
light: t(v),
|
|
276
|
-
dark: t(v)
|
|
277
|
-
}, B = {
|
|
278
|
-
version: X,
|
|
279
|
-
mode: q,
|
|
280
|
-
schemes: t(U)
|
|
281
|
-
};
|
|
282
|
-
function W(e) {
|
|
283
|
-
const o = [];
|
|
284
|
-
return t(B)(e, "$", o), O(e) && !("version" in e) && i(o, "$.version", "invalid_version", "version must be 1"), o.length > 0 ? { success: !1, issues: o } : {
|
|
285
|
-
success: !0,
|
|
286
|
-
value: e,
|
|
287
|
-
issues: []
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
function C(e) {
|
|
291
|
-
const o = W(e);
|
|
292
|
-
if (o.success) return;
|
|
293
|
-
const r = o.issues[0];
|
|
294
|
-
throw new Error(
|
|
295
|
-
`Invalid AppearanceSpec at ${r.path}: ${r.message}`
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
function t(e) {
|
|
299
|
-
return (o, r, a) => {
|
|
300
|
-
if (!O(o)) {
|
|
301
|
-
i(a, r, "invalid_type", "expected an object");
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
for (const s of Object.keys(o)) {
|
|
305
|
-
const m = e[s], h = `${r}.${s}`;
|
|
306
|
-
if (!m) {
|
|
307
|
-
i(a, h, "unsupported_field", "field is not supported in AppearanceSpec V1");
|
|
308
|
-
continue;
|
|
309
|
-
}
|
|
310
|
-
m(o[s], h, a);
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
function X(e, o, r) {
|
|
315
|
-
e !== k && i(r, o, "invalid_version", "version must be 1");
|
|
316
|
-
}
|
|
317
|
-
function q(e, o, r) {
|
|
318
|
-
(typeof e != "string" || !T.has(e)) && i(r, o, "invalid_value", "mode must be light, dark, or system");
|
|
319
|
-
}
|
|
320
|
-
function P(e, o, r) {
|
|
321
|
-
(typeof e != "string" || !j.has(e)) && i(r, o, "invalid_value", "density must be compact, comfortable, or spacious");
|
|
322
|
-
}
|
|
323
|
-
function J(e, o, r) {
|
|
324
|
-
e !== "top" && e !== "middle" && e !== "bottom" && i(r, o, "invalid_value", "verticalAlign must be top, middle, or bottom");
|
|
325
|
-
}
|
|
326
|
-
function K(e, o, r) {
|
|
327
|
-
e !== "wrap" && e !== "nowrap" && i(r, o, "invalid_value", "wrap must be wrap or nowrap");
|
|
328
|
-
}
|
|
329
|
-
function g(e, o, r) {
|
|
330
|
-
typeof e != "boolean" && i(r, o, "invalid_type", "expected a boolean");
|
|
331
|
-
}
|
|
332
|
-
function n(e, o, r) {
|
|
333
|
-
if (typeof e != "string" || e.trim() === "") {
|
|
334
|
-
i(r, o, "invalid_type", "color must be a non-empty string");
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
N(e) || i(r, o, "invalid_color", "color must be a valid opaque CSS color");
|
|
338
|
-
}
|
|
339
|
-
function Q(e, o, r) {
|
|
340
|
-
if (!Array.isArray(e)) {
|
|
341
|
-
i(r, o, "invalid_type", "expected an array of colors");
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
if (e.length === 0) {
|
|
345
|
-
i(r, o, "invalid_value", "palette must contain at least one color");
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
e.forEach((a, s) => n(a, `${o}[${s}]`, r));
|
|
349
|
-
}
|
|
350
|
-
function d(e, o, r) {
|
|
351
|
-
(typeof e != "string" || e.trim() === "") && i(r, o, "invalid_type", "expected a non-empty string");
|
|
352
|
-
}
|
|
353
|
-
function p(e, o, r) {
|
|
354
|
-
(typeof e != "number" || !Number.isFinite(e) || e <= 0) && i(r, o, "invalid_value", "expected a positive number");
|
|
355
|
-
}
|
|
356
|
-
function c(e, o, r) {
|
|
357
|
-
(typeof e != "number" || !Number.isFinite(e) || e < 0) && i(r, o, "invalid_value", "expected a non-negative number");
|
|
358
|
-
}
|
|
359
|
-
function i(e, o, r, a) {
|
|
360
|
-
e.push({ path: o, code: r, message: a });
|
|
361
|
-
}
|
|
362
|
-
function O(e) {
|
|
363
|
-
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
364
|
-
return !1;
|
|
365
|
-
const o = Object.getPrototypeOf(e);
|
|
366
|
-
return o === Object.prototype || o === null;
|
|
367
|
-
}
|
|
368
|
-
function Z(e, o = _) {
|
|
369
|
-
return C(e), w(o, e);
|
|
370
|
-
}
|
|
371
|
-
function ee(e, o) {
|
|
372
|
-
return C(o), w(e, o);
|
|
373
|
-
}
|
|
374
|
-
function w(e, o) {
|
|
375
|
-
return x(e, o);
|
|
376
|
-
}
|
|
377
|
-
function x(e, o) {
|
|
378
|
-
if (o === void 0) return l(e);
|
|
379
|
-
if (Array.isArray(e) || Array.isArray(o))
|
|
380
|
-
return l(o);
|
|
381
|
-
if (b(e) && b(o)) {
|
|
382
|
-
const r = l(e);
|
|
383
|
-
for (const [a, s] of Object.entries(o)) {
|
|
384
|
-
if (a === "version") {
|
|
385
|
-
r[a] = s;
|
|
386
|
-
continue;
|
|
387
|
-
}
|
|
388
|
-
r[a] = a in r ? x(r[a], s) : l(s);
|
|
389
|
-
}
|
|
390
|
-
return r;
|
|
391
|
-
}
|
|
392
|
-
return l(o);
|
|
393
|
-
}
|
|
394
|
-
function l(e) {
|
|
395
|
-
return Array.isArray(e) ? e.map((o) => l(o)) : b(e) ? Object.fromEntries(
|
|
396
|
-
Object.entries(e).map(([o, r]) => [o, l(r)])
|
|
397
|
-
) : e;
|
|
398
|
-
}
|
|
399
|
-
function b(e) {
|
|
400
|
-
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
401
|
-
}
|
|
402
|
-
function re(e = {}) {
|
|
403
|
-
const o = e.defaults ?? _;
|
|
404
|
-
let r = Z(
|
|
405
|
-
{ version: k },
|
|
406
|
-
o
|
|
407
|
-
);
|
|
408
|
-
for (const a of [
|
|
409
|
-
e.organizationAppearance,
|
|
410
|
-
e.tokenAppearance,
|
|
411
|
-
e.reactAppearance
|
|
412
|
-
])
|
|
413
|
-
a && (r = ee(r, a));
|
|
414
|
-
return r;
|
|
415
|
-
}
|
|
416
|
-
export {
|
|
417
|
-
k as A,
|
|
418
|
-
_ as S,
|
|
419
|
-
S as a,
|
|
420
|
-
C as b,
|
|
421
|
-
ee as m,
|
|
422
|
-
Z as n,
|
|
423
|
-
re as r,
|
|
424
|
-
W as v
|
|
425
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { ShareRole } from './types.js';
|
|
2
|
-
export type GroupType = 'ORG_GROUP' | 'TENANT_GROUP';
|
|
3
|
-
export interface Group {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string | null;
|
|
7
|
-
type: GroupType;
|
|
8
|
-
organizationId?: string | null;
|
|
9
|
-
tenantId?: string | null;
|
|
10
|
-
tenantName?: string | null;
|
|
11
|
-
memberCount: number;
|
|
12
|
-
createdBy: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
permissions?: {
|
|
16
|
-
canEdit: boolean;
|
|
17
|
-
canDelete: boolean;
|
|
18
|
-
canManageMembers: boolean;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface GroupMember {
|
|
22
|
-
id: string;
|
|
23
|
-
groupId: string;
|
|
24
|
-
userId: string;
|
|
25
|
-
userType: 'org' | 'tenant';
|
|
26
|
-
user?: {
|
|
27
|
-
id: string;
|
|
28
|
-
name: string | null;
|
|
29
|
-
email: string | null;
|
|
30
|
-
};
|
|
31
|
-
addedBy: string;
|
|
32
|
-
createdAt: string;
|
|
33
|
-
}
|
|
34
|
-
export interface GroupWithMembers extends Group {
|
|
35
|
-
members: GroupMember[];
|
|
36
|
-
}
|
|
37
|
-
export interface GroupCreateDto {
|
|
38
|
-
name: string;
|
|
39
|
-
description?: string;
|
|
40
|
-
type: GroupType;
|
|
41
|
-
tenantId?: string;
|
|
42
|
-
organizationId?: string;
|
|
43
|
-
}
|
|
44
|
-
export interface GroupUpdateDto {
|
|
45
|
-
name?: string;
|
|
46
|
-
description?: string;
|
|
47
|
-
}
|
|
48
|
-
export interface GroupMemberAddDto {
|
|
49
|
-
userIds: string[];
|
|
50
|
-
userType: 'org' | 'tenant';
|
|
51
|
-
}
|
|
52
|
-
export interface GroupMemberRemoveDto {
|
|
53
|
-
userIds: string[];
|
|
54
|
-
}
|
|
55
|
-
export interface GroupShare {
|
|
56
|
-
id: string;
|
|
57
|
-
groupId: string;
|
|
58
|
-
group: Group;
|
|
59
|
-
role: ShareRole;
|
|
60
|
-
grantedBy: string;
|
|
61
|
-
grantedByUser?: {
|
|
62
|
-
name: string;
|
|
63
|
-
email: string;
|
|
64
|
-
};
|
|
65
|
-
grantedAt: string;
|
|
66
|
-
}
|
|
67
|
-
export interface SelectedGroup {
|
|
68
|
-
id: string;
|
|
69
|
-
role: ShareRole;
|
|
70
|
-
}
|
|
71
|
-
export interface GroupsToUpdate {
|
|
72
|
-
id: string;
|
|
73
|
-
currentRole: ShareRole;
|
|
74
|
-
newRole: ShareRole;
|
|
75
|
-
}
|
|
76
|
-
export interface GroupShareData {
|
|
77
|
-
context: 'group-share';
|
|
78
|
-
mode: 'specificGroups' | 'allOrgGroups' | 'allTenantGroups';
|
|
79
|
-
selectedGroups?: SelectedGroup[];
|
|
80
|
-
groupsToRemove?: string[];
|
|
81
|
-
groupsToUpdate?: GroupsToUpdate[];
|
|
82
|
-
groupWideRole?: ShareRole;
|
|
83
|
-
removeAccess?: boolean;
|
|
84
|
-
updateAccess?: boolean;
|
|
85
|
-
}
|
|
86
|
-
export interface GroupSearchParams {
|
|
87
|
-
search?: string;
|
|
88
|
-
type?: GroupType | 'all';
|
|
89
|
-
tenantId?: string;
|
|
90
|
-
organizationId?: string;
|
|
91
|
-
includeMembers?: boolean;
|
|
92
|
-
page?: number;
|
|
93
|
-
limit?: number;
|
|
94
|
-
}
|
|
95
|
-
export interface GroupListResponse {
|
|
96
|
-
groups: Group[];
|
|
97
|
-
total: number;
|
|
98
|
-
page: number;
|
|
99
|
-
limit: number;
|
|
100
|
-
hasMore: boolean;
|
|
101
|
-
}
|
|
102
|
-
export declare function getGroupTypeLabel(type: GroupType): string;
|
|
103
|
-
export declare function getGroupTypeColor(type: GroupType): string;
|
|
104
|
-
export declare function canUserShareWithGroup(userRole: string | undefined, groupType: GroupType): boolean;
|
|
105
|
-
export declare function canUserShareWithAllGroups(userRole: string | undefined): boolean;
|