@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.1
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/bigconsole/asof/AsOfControl.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
- package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
- package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
- package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
- package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
- package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
- package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
- package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
- package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
- package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
- package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
- package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
- package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
- package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
- package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
- package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
- package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
- package/dist/bigconsole/pages/AdminPage.js +147 -146
- package/dist/bigconsole/pages/DashboardViewPage.js +2 -0
- package/dist/bigconsole/pages/DashboardsPage.js +638 -855
- package/dist/bigconsole/pages/DataParsersPage.js +5 -0
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
- package/dist/bigconsole/pages/DataSinksPage.js +210 -186
- package/dist/bigconsole/pages/InsightsPage.js +386 -383
- package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
- package/dist/bigconsole/pages/ParserViewPage.js +2 -0
- package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
- package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
- package/dist/bigconsole/pages/PipelinesPage.js +198 -165
- package/dist/bigconsole/pages/SettingsPage.js +160 -160
- package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
- package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
- package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
- package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
- package/dist/bigconsole/utils/dashboardGallery.js +93 -0
- package/dist/bigconsole/utils/statusTone.d.ts +17 -0
- package/dist/bigconsole/utils/statusTone.js +44 -0
- package/package.json +4 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { memo as e, useCallback as t, useMemo as n, useState as r } from "react";
|
|
2
2
|
import { AlertCircle as i, CheckCircle as a, Loader2 as o, RotateCcw as s, Send as c, Settings as l } from "lucide-react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ThemedSelect as u } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
6
|
// src/bigconsole/components/widgets/form/FormWidget.tsx
|
|
6
|
-
function
|
|
7
|
+
function m(e, t, n) {
|
|
7
8
|
let r = String(e ?? ""), i = e == null || r.trim() === "";
|
|
8
9
|
if (t.required && i) return n("bigconsole.widget.form.validation.required", "{{label}} is required", { label: t.label ?? "" });
|
|
9
10
|
if (i) return null;
|
|
@@ -41,15 +42,15 @@ function p(e, t, n) {
|
|
|
41
42
|
}
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function h(e, t, n) {
|
|
45
46
|
let r = {};
|
|
46
47
|
for (let i of t) {
|
|
47
|
-
let t =
|
|
48
|
+
let t = m(e[i.name], i, n);
|
|
48
49
|
t && (r[i.name] = t);
|
|
49
50
|
}
|
|
50
51
|
return r;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function g(e, t) {
|
|
53
54
|
let n = {}, r = {};
|
|
54
55
|
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
55
56
|
for (let e of t) n[e.name] = e.defaultValue ?? (e.type !== "checkbox" && "");
|
|
@@ -83,7 +84,7 @@ function h(e, t) {
|
|
|
83
84
|
fieldOptions: r
|
|
84
85
|
};
|
|
85
86
|
}
|
|
86
|
-
var
|
|
87
|
+
var _ = {
|
|
87
88
|
container: {
|
|
88
89
|
display: "flex",
|
|
89
90
|
flexDirection: "column",
|
|
@@ -208,140 +209,140 @@ var g = {
|
|
|
208
209
|
color: "var(--color-text-muted)",
|
|
209
210
|
textAlign: "center"
|
|
210
211
|
}
|
|
211
|
-
},
|
|
212
|
-
let { t:
|
|
212
|
+
}, v = e(function({ widget: e, data: v = {}, onDrilldown: y, onSubmit: b }) {
|
|
213
|
+
let { t: x } = d(), S = {
|
|
213
214
|
fields: [],
|
|
214
215
|
layout: "vertical",
|
|
215
216
|
submitLabel: "Submit",
|
|
216
217
|
showReset: !0,
|
|
217
218
|
validateOnBlur: !0,
|
|
218
219
|
validateOnChange: !1
|
|
219
|
-
},
|
|
220
|
-
...
|
|
220
|
+
}, C = e.config ? {
|
|
221
|
+
...S,
|
|
221
222
|
...e.config
|
|
222
|
-
} :
|
|
223
|
-
if (
|
|
223
|
+
} : S, w = n(() => g(v, C.fields), [v, C.fields]), T = n(() => w.values, [w.values]), [E, D] = r(T), [O, k] = r({}), [A, j] = r(/* @__PURE__ */ new Set()), [M, N] = r(!1), [P, F] = r(!1), I = t((e, t) => {
|
|
224
|
+
if (D((n) => ({
|
|
224
225
|
...n,
|
|
225
226
|
[e]: t
|
|
226
|
-
})),
|
|
227
|
-
let n =
|
|
227
|
+
})), F(!1), C.validateOnChange) {
|
|
228
|
+
let n = C.fields.find((t) => t.name === e);
|
|
228
229
|
if (n) {
|
|
229
|
-
let r =
|
|
230
|
-
|
|
230
|
+
let r = m(t, n, x);
|
|
231
|
+
k((t) => ({
|
|
231
232
|
...t,
|
|
232
233
|
[e]: r
|
|
233
234
|
}));
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
}, [
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
]),
|
|
241
|
-
if (
|
|
242
|
-
let t =
|
|
238
|
+
C.fields,
|
|
239
|
+
C.validateOnChange,
|
|
240
|
+
x
|
|
241
|
+
]), L = t((e) => {
|
|
242
|
+
if (j((t) => new Set(t).add(e)), C.validateOnBlur) {
|
|
243
|
+
let t = C.fields.find((t) => t.name === e);
|
|
243
244
|
if (t) {
|
|
244
|
-
let n =
|
|
245
|
-
|
|
245
|
+
let n = m(E[e], t, x);
|
|
246
|
+
k((t) => ({
|
|
246
247
|
...t,
|
|
247
248
|
[e]: n
|
|
248
249
|
}));
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
252
|
}, [
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
]),
|
|
253
|
+
C.fields,
|
|
254
|
+
C.validateOnBlur,
|
|
255
|
+
E,
|
|
256
|
+
x
|
|
257
|
+
]), R = t(async (t) => {
|
|
257
258
|
t.preventDefault();
|
|
258
|
-
let n =
|
|
259
|
-
if (
|
|
260
|
-
|
|
259
|
+
let n = h(E, C.fields, x);
|
|
260
|
+
if (k(n), j(new Set(C.fields.map((e) => e.name))), !Object.values(n).some((e) => e !== null)) {
|
|
261
|
+
N(!0);
|
|
261
262
|
try {
|
|
262
263
|
let t = {
|
|
263
|
-
...
|
|
264
|
-
_action:
|
|
264
|
+
...E,
|
|
265
|
+
_action: C.submitAction || "form_submit",
|
|
265
266
|
_widgetId: e.id,
|
|
266
267
|
_timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
267
268
|
};
|
|
268
|
-
|
|
269
|
+
b && await b(t), y && y({
|
|
269
270
|
type: "form_submit",
|
|
270
|
-
action:
|
|
271
|
+
action: C.submitAction || "form_submit",
|
|
271
272
|
data: t
|
|
272
|
-
}),
|
|
273
|
+
}), F(!0);
|
|
273
274
|
} catch {} finally {
|
|
274
|
-
|
|
275
|
+
N(!1);
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
278
|
}, [
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
E,
|
|
280
|
+
C.fields,
|
|
281
|
+
C.submitAction,
|
|
281
282
|
e.id,
|
|
283
|
+
b,
|
|
282
284
|
y,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
...
|
|
290
|
-
...n ? g.inputError : {}
|
|
285
|
+
x
|
|
286
|
+
]), z = t(() => {
|
|
287
|
+
D(T), k({}), j(/* @__PURE__ */ new Set()), F(!1);
|
|
288
|
+
}, [T]), B = t((e) => {
|
|
289
|
+
let t = E[e.name], n = !!(A.has(e.name) && O[e.name]), r = {
|
|
290
|
+
..._.input,
|
|
291
|
+
...n ? _.inputError : {}
|
|
291
292
|
};
|
|
292
293
|
switch (e.type) {
|
|
293
|
-
case "textarea": return /* @__PURE__ */
|
|
294
|
+
case "textarea": return /* @__PURE__ */ f("textarea", {
|
|
294
295
|
id: e.name,
|
|
295
296
|
name: e.name,
|
|
296
297
|
value: String(t ?? ""),
|
|
297
298
|
placeholder: e.placeholder,
|
|
298
299
|
required: e.required,
|
|
299
|
-
disabled: e.disabled ||
|
|
300
|
+
disabled: e.disabled || M,
|
|
300
301
|
readOnly: e.readonly,
|
|
301
302
|
rows: e.rows || 4,
|
|
302
303
|
style: {
|
|
303
304
|
...r,
|
|
304
|
-
...
|
|
305
|
+
..._.textarea
|
|
305
306
|
},
|
|
306
|
-
onChange: (t) =>
|
|
307
|
-
onBlur: () =>
|
|
307
|
+
onChange: (t) => I(e.name, t.target.value),
|
|
308
|
+
onBlur: () => L(e.name)
|
|
308
309
|
});
|
|
309
310
|
case "select": {
|
|
310
|
-
let n =
|
|
311
|
-
return /* @__PURE__ */
|
|
311
|
+
let n = w.fieldOptions[e.name] ?? e.options ?? [];
|
|
312
|
+
return /* @__PURE__ */ p(u, {
|
|
312
313
|
id: e.name,
|
|
313
314
|
name: e.name,
|
|
314
315
|
value: String(t ?? ""),
|
|
315
316
|
required: e.required,
|
|
316
|
-
disabled: e.disabled ||
|
|
317
|
+
disabled: e.disabled || M,
|
|
317
318
|
style: {
|
|
318
319
|
...r,
|
|
319
|
-
...
|
|
320
|
+
..._.select
|
|
320
321
|
},
|
|
321
|
-
onChange: (t) =>
|
|
322
|
-
onBlur: () =>
|
|
323
|
-
children: [/* @__PURE__ */
|
|
322
|
+
onChange: (t) => I(e.name, t.target.value),
|
|
323
|
+
onBlur: () => L(e.name),
|
|
324
|
+
children: [/* @__PURE__ */ f("option", {
|
|
324
325
|
value: "",
|
|
325
|
-
children: e.placeholder ||
|
|
326
|
-
}), n.map((e) => /* @__PURE__ */
|
|
326
|
+
children: e.placeholder || x("bigconsole.widget.form.selectPlaceholder", "Select {{label}}...", { label: e.label ?? "" })
|
|
327
|
+
}), n.map((e) => /* @__PURE__ */ f("option", {
|
|
327
328
|
value: e.value,
|
|
328
329
|
disabled: e.disabled,
|
|
329
330
|
children: e.label
|
|
330
331
|
}, e.value))]
|
|
331
332
|
});
|
|
332
333
|
}
|
|
333
|
-
case "checkbox": return /* @__PURE__ */
|
|
334
|
-
style:
|
|
335
|
-
children: [/* @__PURE__ */
|
|
334
|
+
case "checkbox": return /* @__PURE__ */ p("div", {
|
|
335
|
+
style: _.checkbox,
|
|
336
|
+
children: [/* @__PURE__ */ f("input", {
|
|
336
337
|
type: "checkbox",
|
|
337
338
|
id: e.name,
|
|
338
339
|
name: e.name,
|
|
339
340
|
checked: !!t,
|
|
340
|
-
disabled: e.disabled ||
|
|
341
|
-
style:
|
|
342
|
-
onChange: (t) =>
|
|
343
|
-
onBlur: () =>
|
|
344
|
-
}), /* @__PURE__ */
|
|
341
|
+
disabled: e.disabled || M,
|
|
342
|
+
style: _.checkboxInput,
|
|
343
|
+
onChange: (t) => I(e.name, t.target.checked),
|
|
344
|
+
onBlur: () => L(e.name)
|
|
345
|
+
}), /* @__PURE__ */ f("label", {
|
|
345
346
|
htmlFor: e.name,
|
|
346
347
|
style: {
|
|
347
348
|
fontSize: "14px",
|
|
@@ -351,26 +352,26 @@ var g = {
|
|
|
351
352
|
})]
|
|
352
353
|
});
|
|
353
354
|
case "radio": {
|
|
354
|
-
let n =
|
|
355
|
-
return /* @__PURE__ */
|
|
355
|
+
let n = w.fieldOptions[e.name] ?? e.options ?? [];
|
|
356
|
+
return /* @__PURE__ */ f("div", {
|
|
356
357
|
style: {
|
|
357
358
|
display: "flex",
|
|
358
359
|
flexDirection: "column",
|
|
359
360
|
gap: "8px"
|
|
360
361
|
},
|
|
361
|
-
children: n.map((n) => /* @__PURE__ */
|
|
362
|
-
style:
|
|
363
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: n.map((n) => /* @__PURE__ */ p("div", {
|
|
363
|
+
style: _.checkbox,
|
|
364
|
+
children: [/* @__PURE__ */ f("input", {
|
|
364
365
|
type: "radio",
|
|
365
366
|
id: `${e.name}-${n.value}`,
|
|
366
367
|
name: e.name,
|
|
367
368
|
value: n.value,
|
|
368
369
|
checked: t === n.value,
|
|
369
|
-
disabled: e.disabled || n.disabled ||
|
|
370
|
-
style:
|
|
371
|
-
onChange: (t) =>
|
|
372
|
-
onBlur: () =>
|
|
373
|
-
}), /* @__PURE__ */
|
|
370
|
+
disabled: e.disabled || n.disabled || M,
|
|
371
|
+
style: _.checkboxInput,
|
|
372
|
+
onChange: (t) => I(e.name, t.target.value),
|
|
373
|
+
onBlur: () => L(e.name)
|
|
374
|
+
}), /* @__PURE__ */ f("label", {
|
|
374
375
|
htmlFor: `${e.name}-${n.value}`,
|
|
375
376
|
style: {
|
|
376
377
|
fontSize: "14px",
|
|
@@ -381,105 +382,105 @@ var g = {
|
|
|
381
382
|
}, n.value))
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
|
-
case "hidden": return /* @__PURE__ */
|
|
385
|
+
case "hidden": return /* @__PURE__ */ f("input", {
|
|
385
386
|
type: "hidden",
|
|
386
387
|
name: e.name,
|
|
387
388
|
value: String(t ?? "")
|
|
388
389
|
});
|
|
389
|
-
default: return /* @__PURE__ */
|
|
390
|
+
default: return /* @__PURE__ */ f("input", {
|
|
390
391
|
type: e.type,
|
|
391
392
|
id: e.name,
|
|
392
393
|
name: e.name,
|
|
393
394
|
value: String(t ?? ""),
|
|
394
395
|
placeholder: e.placeholder,
|
|
395
396
|
required: e.required,
|
|
396
|
-
disabled: e.disabled ||
|
|
397
|
+
disabled: e.disabled || M,
|
|
397
398
|
readOnly: e.readonly,
|
|
398
399
|
min: e.min,
|
|
399
400
|
max: e.max,
|
|
400
401
|
step: e.step,
|
|
401
402
|
pattern: e.pattern,
|
|
402
403
|
style: r,
|
|
403
|
-
onChange: (t) =>
|
|
404
|
-
onBlur: () =>
|
|
404
|
+
onChange: (t) => I(e.name, e.type === "number" ? t.target.valueAsNumber : t.target.value),
|
|
405
|
+
onBlur: () => L(e.name)
|
|
405
406
|
});
|
|
406
407
|
}
|
|
407
408
|
}, [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
F,
|
|
409
|
+
E,
|
|
410
|
+
O,
|
|
411
|
+
A,
|
|
412
|
+
M,
|
|
413
413
|
I,
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
L,
|
|
415
|
+
w,
|
|
416
|
+
x
|
|
416
417
|
]);
|
|
417
|
-
if (
|
|
418
|
-
style:
|
|
418
|
+
if (C.fields.length === 0) return /* @__PURE__ */ p("div", {
|
|
419
|
+
style: _.emptyState,
|
|
419
420
|
children: [
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ f(l, { style: {
|
|
421
422
|
width: "48px",
|
|
422
423
|
height: "48px",
|
|
423
424
|
marginBottom: "16px",
|
|
424
425
|
opacity: .5
|
|
425
426
|
} }),
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ f("p", {
|
|
427
428
|
style: { fontSize: "14px" },
|
|
428
|
-
children:
|
|
429
|
+
children: x("bigconsole.widget.form.configureTitle", "Configure Form Fields")
|
|
429
430
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ f("p", {
|
|
431
432
|
style: {
|
|
432
433
|
fontSize: "12px",
|
|
433
434
|
marginTop: "4px"
|
|
434
435
|
},
|
|
435
|
-
children:
|
|
436
|
+
children: x("bigconsole.widget.form.configureHint", "Add fields in widget settings to create your form")
|
|
436
437
|
})
|
|
437
438
|
]
|
|
438
439
|
});
|
|
439
|
-
let
|
|
440
|
+
let V = C.layout === "grid" ? {
|
|
440
441
|
display: "grid",
|
|
441
|
-
gridTemplateColumns: `repeat(${
|
|
442
|
+
gridTemplateColumns: `repeat(${C.columns || 2}, 1fr)`,
|
|
442
443
|
gap: "16px"
|
|
443
444
|
} : {};
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
style:
|
|
446
|
-
children: [/* @__PURE__ */
|
|
447
|
-
onSubmit:
|
|
445
|
+
return /* @__PURE__ */ p("div", {
|
|
446
|
+
style: _.container,
|
|
447
|
+
children: [/* @__PURE__ */ p("form", {
|
|
448
|
+
onSubmit: R,
|
|
448
449
|
style: {
|
|
449
|
-
...
|
|
450
|
-
...
|
|
450
|
+
..._.form,
|
|
451
|
+
...V
|
|
451
452
|
},
|
|
452
|
-
children: [
|
|
453
|
+
children: [P && C.successMessage && /* @__PURE__ */ p("div", {
|
|
453
454
|
style: {
|
|
454
|
-
...
|
|
455
|
+
..._.successMessage,
|
|
455
456
|
gridColumn: "1 / -1"
|
|
456
457
|
},
|
|
457
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ f(a, { style: {
|
|
458
459
|
width: "18px",
|
|
459
460
|
height: "18px"
|
|
460
|
-
} }),
|
|
461
|
-
}),
|
|
462
|
-
if (e.type === "hidden") return
|
|
463
|
-
let t =
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
style:
|
|
461
|
+
} }), C.successMessage]
|
|
462
|
+
}), C.fields.map((e) => {
|
|
463
|
+
if (e.type === "hidden") return B(e);
|
|
464
|
+
let t = A.has(e.name) ? O[e.name] : null;
|
|
465
|
+
return /* @__PURE__ */ p("div", {
|
|
466
|
+
style: _.fieldWrapper,
|
|
466
467
|
children: [
|
|
467
|
-
e.type !== "checkbox" && /* @__PURE__ */
|
|
468
|
+
e.type !== "checkbox" && /* @__PURE__ */ p("label", {
|
|
468
469
|
htmlFor: e.name,
|
|
469
|
-
style:
|
|
470
|
-
children: [e.label, e.required && /* @__PURE__ */
|
|
471
|
-
style:
|
|
470
|
+
style: _.label,
|
|
471
|
+
children: [e.label, e.required && /* @__PURE__ */ f("span", {
|
|
472
|
+
style: _.required,
|
|
472
473
|
children: "*"
|
|
473
474
|
})]
|
|
474
475
|
}),
|
|
475
|
-
|
|
476
|
-
e.helpText && !t && /* @__PURE__ */
|
|
477
|
-
style:
|
|
476
|
+
B(e),
|
|
477
|
+
e.helpText && !t && /* @__PURE__ */ f("p", {
|
|
478
|
+
style: _.helpText,
|
|
478
479
|
children: e.helpText
|
|
479
480
|
}),
|
|
480
|
-
t && /* @__PURE__ */
|
|
481
|
-
style:
|
|
482
|
-
children: [/* @__PURE__ */
|
|
481
|
+
t && /* @__PURE__ */ p("p", {
|
|
482
|
+
style: _.errorText,
|
|
483
|
+
children: [/* @__PURE__ */ f(i, { style: {
|
|
483
484
|
width: "14px",
|
|
484
485
|
height: "14px"
|
|
485
486
|
} }), t]
|
|
@@ -487,40 +488,40 @@ var g = {
|
|
|
487
488
|
]
|
|
488
489
|
}, e.name);
|
|
489
490
|
})]
|
|
490
|
-
}), /* @__PURE__ */
|
|
491
|
-
style:
|
|
492
|
-
children: [
|
|
491
|
+
}), /* @__PURE__ */ p("div", {
|
|
492
|
+
style: _.footer,
|
|
493
|
+
children: [C.showReset !== !1 && /* @__PURE__ */ p("button", {
|
|
493
494
|
type: "button",
|
|
494
|
-
onClick:
|
|
495
|
-
disabled:
|
|
495
|
+
onClick: z,
|
|
496
|
+
disabled: M,
|
|
496
497
|
style: {
|
|
497
|
-
...
|
|
498
|
-
...
|
|
499
|
-
opacity:
|
|
498
|
+
..._.button,
|
|
499
|
+
..._.resetButton,
|
|
500
|
+
opacity: M ? .6 : 1
|
|
500
501
|
},
|
|
501
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ f(s, { style: {
|
|
502
503
|
width: "16px",
|
|
503
504
|
height: "16px"
|
|
504
|
-
} }),
|
|
505
|
-
}), /* @__PURE__ */
|
|
505
|
+
} }), C.resetLabel || x("bigconsole.widget.form.reset", "Reset")]
|
|
506
|
+
}), /* @__PURE__ */ p("button", {
|
|
506
507
|
type: "submit",
|
|
507
|
-
onClick:
|
|
508
|
-
disabled:
|
|
508
|
+
onClick: R,
|
|
509
|
+
disabled: M,
|
|
509
510
|
style: {
|
|
510
|
-
...
|
|
511
|
-
...
|
|
512
|
-
opacity:
|
|
511
|
+
..._.button,
|
|
512
|
+
..._.submitButton,
|
|
513
|
+
opacity: M ? .6 : 1
|
|
513
514
|
},
|
|
514
|
-
children: [
|
|
515
|
+
children: [M ? /* @__PURE__ */ f(o, { style: {
|
|
515
516
|
width: "16px",
|
|
516
517
|
height: "16px",
|
|
517
518
|
animation: "spin 1s linear infinite"
|
|
518
|
-
} }) : /* @__PURE__ */
|
|
519
|
+
} }) : /* @__PURE__ */ f(c, { style: {
|
|
519
520
|
width: "16px",
|
|
520
521
|
height: "16px"
|
|
521
|
-
} }),
|
|
522
|
+
} }), C.submitLabel || x("bigconsole.widget.form.submit", "Submit")]
|
|
522
523
|
})]
|
|
523
524
|
})]
|
|
524
525
|
});
|
|
525
526
|
});
|
|
526
|
-
export {
|
|
527
|
+
export { v as FormWidget, v as default, g as normalizeFormData };
|