@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.2
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/README.md +19 -0
- package/dist/bigconsole/BigConsoleRoot.js +88 -82
- package/dist/bigconsole/BigConsoleRoutes.js +163 -136
- package/dist/bigconsole/assistant/assistantProduct.js +1 -4
- package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
- package/dist/bigconsole/assistant/pageContext.js +1 -6
- package/dist/bigconsole/assistant/recordAdapters.js +26 -27
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/index.d.ts +0 -1
- package/dist/bigconsole/components/common/index.js +0 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +357 -337
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +17 -17
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/chart/ChartWidget.js +125 -129
- package/dist/bigconsole/components/widgets/chart/charts/AreaChart.js +50 -45
- package/dist/bigconsole/components/widgets/chart/charts/BarChart.js +40 -35
- package/dist/bigconsole/components/widgets/chart/charts/ComboChart.js +41 -48
- package/dist/bigconsole/components/widgets/chart/charts/LineChart.js +41 -36
- package/dist/bigconsole/components/widgets/chart/charts/numericSeries.d.ts +6 -0
- package/dist/bigconsole/components/widgets/chart/charts/numericSeries.js +26 -0
- package/dist/bigconsole/components/widgets/chart/charts/types.d.ts +2 -0
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
- package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
- package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
- package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
- package/dist/bigconsole/context/BigConsoleContext.js +47 -30
- package/dist/bigconsole/context/index.d.ts +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
- package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
- package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
- package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
- package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
- package/dist/bigconsole/hooks/useDrilldown.js +68 -67
- package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
- package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
- package/dist/bigconsole/pages/DashboardsPage.js +221 -269
- package/dist/bigconsole/pages/DataParsersPage.js +157 -180
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
- package/dist/bigconsole/pages/DataSinksPage.js +216 -251
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +265 -279
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +88 -107
- package/dist/bigconsole/pages/SettingsPage.js +173 -179
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
- package/dist/bigconsole/store/widgetStore.d.ts +0 -12
- package/dist/bigconsole/store/widgetStore.js +1 -3
- package/dist/bigconsole/types/index.d.ts +17 -2
- package/dist/bigconsole/utils/backendError.d.ts +0 -18
- package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
- package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
- package/dist/bigconsole/utils/index.d.ts +2 -0
- package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
- package/dist/bigconsole/utils/safeUrl.js +93 -0
- package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
- package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
- package/dist/bigconsole/workflowOpen.js +14 -15
- package/dist/generated/wspace-operations.d.ts +138 -8
- package/dist/generated/wspace-operations.js +281 -240
- package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
- package/package.json +9 -5
- package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
- package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
- package/dist/bigconsole/assistant/pageControls.js +0 -169
- package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
- package/dist/bigconsole/assistant/previewControl.js +0 -10
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
- package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
- package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
- package/dist/bigconsole/components/common/SortBySelect.js +0 -29
- package/dist/bigconsole/constants/backendErrors.js +0 -94
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
- package/dist/bigconsole/utils/backendError.js +0 -42
- package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
- package/dist/bigconsole/utils/dashboardList.js +0 -15
- package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
- package/dist/bigconsole/utils/dataSinkList.js +0 -15
- package/dist/bigconsole/utils/formDirty.d.ts +0 -82
- package/dist/bigconsole/utils/formDirty.js +0 -21
- package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
- package/dist/bigconsole/utils/insightsDraft.js +0 -8
- package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
- package/dist/bigconsole/utils/layoutBaseline.js +0 -96
- package/dist/bigconsole/utils/listSort.d.ts +0 -80
- package/dist/bigconsole/utils/listSort.js +0 -85
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
- package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memo as e, useCallback as t } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { useI18n as i } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
4
4
|
//#region src/bigconsole/components/widgets/gauge/GaugeConfig.tsx
|
|
5
5
|
var a = [
|
|
6
6
|
{
|
|
@@ -16,7 +16,7 @@ var a = [
|
|
|
16
16
|
color: "success"
|
|
17
17
|
}
|
|
18
18
|
], o = e(function({ config: e, onChange: o }) {
|
|
19
|
-
let { t: s } =
|
|
19
|
+
let { t: s } = i(), c = t((t, n) => {
|
|
20
20
|
o({
|
|
21
21
|
...e,
|
|
22
22
|
[t]: n
|
|
@@ -37,97 +37,97 @@ var a = [
|
|
|
37
37
|
};
|
|
38
38
|
c("thresholds", r);
|
|
39
39
|
}, [e.thresholds, c]);
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ r("div", {
|
|
41
41
|
className: "min-w-0 space-y-form-gap",
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("label", {
|
|
44
44
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
45
45
|
children: s("bigconsole.widget.config.gauge.gaugeType", "Gauge Type")
|
|
46
|
-
}), /* @__PURE__ */
|
|
46
|
+
}), /* @__PURE__ */ r("select", {
|
|
47
47
|
value: e.variant || "circular",
|
|
48
48
|
onChange: (e) => c("variant", e.target.value),
|
|
49
49
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ n("option", {
|
|
51
51
|
value: "circular",
|
|
52
52
|
children: s("bigconsole.widget.config.gauge.variant.circular", "Circular")
|
|
53
|
-
}), /* @__PURE__ */
|
|
53
|
+
}), /* @__PURE__ */ n("option", {
|
|
54
54
|
value: "linear",
|
|
55
55
|
children: s("bigconsole.widget.config.gauge.variant.linear", "Linear")
|
|
56
56
|
})]
|
|
57
57
|
})] }),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ r("div", {
|
|
59
59
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("label", {
|
|
61
61
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
62
62
|
children: s("bigconsole.widget.config.gauge.minimum", "Minimum")
|
|
63
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ n("input", {
|
|
64
64
|
type: "number",
|
|
65
65
|
value: e.min ?? 0,
|
|
66
66
|
onChange: (e) => c("min", Number(e.target.value)),
|
|
67
67
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
68
|
-
})] }), /* @__PURE__ */
|
|
68
|
+
})] }), /* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("label", {
|
|
69
69
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
70
70
|
children: s("bigconsole.widget.config.gauge.maximum", "Maximum")
|
|
71
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ n("input", {
|
|
72
72
|
type: "number",
|
|
73
73
|
value: e.max ?? 100,
|
|
74
74
|
onChange: (e) => c("max", Number(e.target.value)),
|
|
75
75
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
76
76
|
})] })]
|
|
77
77
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("label", {
|
|
79
79
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
80
80
|
children: s("bigconsole.widget.config.gauge.unitLabel", "Unit Label")
|
|
81
|
-
}), /* @__PURE__ */
|
|
81
|
+
}), /* @__PURE__ */ n("input", {
|
|
82
82
|
type: "text",
|
|
83
83
|
value: e.unit || "",
|
|
84
84
|
onChange: (e) => c("unit", e.target.value),
|
|
85
85
|
placeholder: s("bigconsole.widget.config.gauge.unitPlaceholder", "e.g., %, ms, users"),
|
|
86
86
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
87
87
|
})] }),
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("label", {
|
|
89
89
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
90
90
|
children: s("bigconsole.widget.config.gauge.valueFormat", "Value Format")
|
|
91
|
-
}), /* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ r("select", {
|
|
92
92
|
value: e.format || "number",
|
|
93
93
|
onChange: (e) => c("format", e.target.value),
|
|
94
94
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
95
95
|
children: [
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ n("option", {
|
|
97
97
|
value: "number",
|
|
98
98
|
children: s("bigconsole.widget.config.gauge.format.number", "Number")
|
|
99
99
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ n("option", {
|
|
101
101
|
value: "percentage",
|
|
102
102
|
children: s("bigconsole.widget.config.gauge.format.percentage", "Percentage")
|
|
103
103
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ n("option", {
|
|
105
105
|
value: "currency",
|
|
106
106
|
children: s("bigconsole.widget.config.gauge.format.currency", "Currency")
|
|
107
107
|
})
|
|
108
108
|
]
|
|
109
109
|
})] }),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ r("div", { children: [
|
|
111
|
+
/* @__PURE__ */ n("label", {
|
|
112
112
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
113
113
|
children: s("bigconsole.widget.config.gauge.colorThresholds", "Color Thresholds")
|
|
114
114
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ n("p", {
|
|
116
116
|
className: "text-xs text-text-secondary mb-3",
|
|
117
117
|
children: s("bigconsole.widget.config.gauge.colorThresholdsHelp", "Define color zones based on value ranges. Values up to each threshold will use that color.")
|
|
118
118
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ r("div", {
|
|
120
120
|
className: "space-y-2",
|
|
121
121
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ r("div", {
|
|
123
123
|
className: "flex items-center gap-2",
|
|
124
124
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ n("div", { className: "w-4 h-4 rounded bg-status-error-bg" }),
|
|
126
|
+
/* @__PURE__ */ n("span", {
|
|
127
127
|
className: "text-sm text-text-primary flex-1",
|
|
128
128
|
children: s("bigconsole.widget.config.gauge.threshold.danger", "Danger (Red)")
|
|
129
129
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ n("input", {
|
|
131
131
|
type: "number",
|
|
132
132
|
value: e.thresholds?.[0]?.value ?? 33,
|
|
133
133
|
onChange: (e) => l(0, e.target.value),
|
|
@@ -135,15 +135,15 @@ var a = [
|
|
|
135
135
|
})
|
|
136
136
|
]
|
|
137
137
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ r("div", {
|
|
139
139
|
className: "flex items-center gap-2",
|
|
140
140
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ n("div", { className: "w-4 h-4 rounded bg-status-warning-bg" }),
|
|
142
|
+
/* @__PURE__ */ n("span", {
|
|
143
143
|
className: "text-sm text-text-primary flex-1",
|
|
144
144
|
children: s("bigconsole.widget.config.gauge.threshold.warning", "Warning (Yellow)")
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ n("input", {
|
|
147
147
|
type: "number",
|
|
148
148
|
value: e.thresholds?.[1]?.value ?? 66,
|
|
149
149
|
onChange: (e) => l(1, e.target.value),
|
|
@@ -151,15 +151,15 @@ var a = [
|
|
|
151
151
|
})
|
|
152
152
|
]
|
|
153
153
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ r("div", {
|
|
155
155
|
className: "flex items-center gap-2",
|
|
156
156
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ n("div", { className: "w-4 h-4 rounded bg-status-success-bg" }),
|
|
158
|
+
/* @__PURE__ */ n("span", {
|
|
159
159
|
className: "text-sm text-text-primary flex-1",
|
|
160
160
|
children: s("bigconsole.widget.config.gauge.threshold.good", "Good (Green)")
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ n("input", {
|
|
163
163
|
type: "number",
|
|
164
164
|
value: e.thresholds?.[2]?.value ?? 100,
|
|
165
165
|
onChange: (e) => l(2, e.target.value),
|
|
@@ -170,28 +170,28 @@ var a = [
|
|
|
170
170
|
]
|
|
171
171
|
})
|
|
172
172
|
] }),
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ r("div", {
|
|
174
174
|
role: "group",
|
|
175
175
|
"aria-label": "Display options",
|
|
176
176
|
className: "space-y-3 border-t border-[var(--color-border-subtle)] pt-form-gap",
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ n("p", {
|
|
179
179
|
className: "text-xs font-bold uppercase tracking-wider text-text-secondary",
|
|
180
180
|
children: "Display options"
|
|
181
181
|
}),
|
|
182
|
-
e.variant === "linear" && /* @__PURE__ */
|
|
182
|
+
e.variant === "linear" && /* @__PURE__ */ r("label", {
|
|
183
183
|
className: "flex items-center gap-3",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ n("input", {
|
|
185
185
|
type: "checkbox",
|
|
186
186
|
checked: e.showZones === !0,
|
|
187
187
|
onChange: (e) => c("showZones", e.target.checked),
|
|
188
188
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
189
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ n("span", {
|
|
190
190
|
className: "text-sm text-text-primary",
|
|
191
191
|
children: s("bigconsole.widget.config.gauge.showZones", "Show color zones in background")
|
|
192
192
|
})]
|
|
193
193
|
}),
|
|
194
|
-
e.variant !== "linear" && /* @__PURE__ */
|
|
194
|
+
e.variant !== "linear" && /* @__PURE__ */ n("p", {
|
|
195
195
|
className: "text-xs text-text-secondary",
|
|
196
196
|
children: s("bigconsole.widget.config.gauge.noCircularOptions", "No display options for the circular gauge.")
|
|
197
197
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { memo as e, useCallback as t, useMemo as n } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
4
4
|
//#region src/bigconsole/components/widgets/heatmap/HeatmapConfig.tsx
|
|
5
5
|
var o = "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n", s = e(function({ config: e, onChange: s }) {
|
|
6
|
-
let { t: c } =
|
|
6
|
+
let { t: c } = a(), l = n(() => [
|
|
7
7
|
{
|
|
8
8
|
value: "blue",
|
|
9
9
|
label: c("bigconsole.widget.config.heatmap.colorScheme.blue", "Blue")
|
|
@@ -22,62 +22,62 @@ var o = "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n b
|
|
|
22
22
|
[t]: n
|
|
23
23
|
});
|
|
24
24
|
}, [e, s]);
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ i("div", {
|
|
26
26
|
className: "min-w-0 space-y-form-gap",
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
29
29
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
30
30
|
children: c("bigconsole.widget.config.heatmap.xAxisFieldLabel", "X-Axis Field")
|
|
31
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ r("input", {
|
|
32
32
|
type: "text",
|
|
33
33
|
value: e.xAxisField || "",
|
|
34
34
|
onChange: (e) => u("xAxisField", e.target.value),
|
|
35
35
|
placeholder: c("bigconsole.widget.config.heatmap.xAxisFieldPlaceholder", "e.g., hour, column"),
|
|
36
36
|
className: o
|
|
37
37
|
})] }),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
39
39
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
40
40
|
children: c("bigconsole.widget.config.heatmap.yAxisFieldLabel", "Y-Axis Field")
|
|
41
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ r("input", {
|
|
42
42
|
type: "text",
|
|
43
43
|
value: e.yAxisField || "",
|
|
44
44
|
onChange: (e) => u("yAxisField", e.target.value),
|
|
45
45
|
placeholder: c("bigconsole.widget.config.heatmap.yAxisFieldPlaceholder", "e.g., day, row"),
|
|
46
46
|
className: o
|
|
47
47
|
})] }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ i("div", { children: [
|
|
49
|
+
/* @__PURE__ */ r("label", {
|
|
50
50
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
51
51
|
children: c("bigconsole.widget.config.heatmap.valueFieldLabel", "Value Field")
|
|
52
52
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ r("input", {
|
|
54
54
|
type: "text",
|
|
55
55
|
value: e.valueField || "",
|
|
56
56
|
onChange: (e) => u("valueField", e.target.value),
|
|
57
57
|
placeholder: c("bigconsole.widget.config.heatmap.valueFieldPlaceholder", "e.g., tickets, count"),
|
|
58
58
|
className: o
|
|
59
59
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ r("p", {
|
|
61
61
|
className: "mt-1 text-xs text-text-secondary",
|
|
62
62
|
children: c("bigconsole.widget.config.heatmap.valueFieldHelp", "Left empty, the widget reads the parser's rows / columns / cells output directly.")
|
|
63
63
|
})
|
|
64
64
|
] }),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
66
66
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
67
67
|
children: c("bigconsole.widget.config.heatmap.colorSchemeLabel", "Color Scheme")
|
|
68
|
-
}), /* @__PURE__ */
|
|
68
|
+
}), /* @__PURE__ */ r("select", {
|
|
69
69
|
value: e.colorScheme || "blue",
|
|
70
70
|
onChange: (e) => u("colorScheme", e.target.value),
|
|
71
71
|
className: o,
|
|
72
|
-
children: l.map((e) => /* @__PURE__ */
|
|
72
|
+
children: l.map((e) => /* @__PURE__ */ r("option", {
|
|
73
73
|
value: e.value,
|
|
74
74
|
children: e.label
|
|
75
75
|
}, e.value))
|
|
76
76
|
})] }),
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
78
78
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
79
79
|
children: c("bigconsole.widget.config.heatmap.decimalPlacesLabel", "Decimal Places")
|
|
80
|
-
}), /* @__PURE__ */
|
|
80
|
+
}), /* @__PURE__ */ r("input", {
|
|
81
81
|
type: "number",
|
|
82
82
|
min: 0,
|
|
83
83
|
max: 6,
|
|
@@ -85,35 +85,35 @@ var o = "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n b
|
|
|
85
85
|
onChange: (e) => u("decimals", Number(e.target.value)),
|
|
86
86
|
className: o
|
|
87
87
|
})] }),
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ i("div", {
|
|
89
89
|
role: "group",
|
|
90
90
|
"aria-label": "Display options",
|
|
91
91
|
className: "space-y-3 border-t border-[var(--color-border-subtle)] pt-form-gap",
|
|
92
92
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ r("p", {
|
|
94
94
|
className: "text-xs font-bold uppercase tracking-wider text-text-secondary",
|
|
95
95
|
children: "Display options"
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ i("label", {
|
|
98
98
|
className: "flex items-center gap-3",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ r("input", {
|
|
100
100
|
type: "checkbox",
|
|
101
101
|
checked: e.showValues !== !1,
|
|
102
102
|
onChange: (e) => u("showValues", e.target.checked),
|
|
103
103
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
104
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ r("span", {
|
|
105
105
|
className: "text-sm text-text-primary",
|
|
106
106
|
children: c("bigconsole.widget.config.heatmap.showValues", "Show cell values")
|
|
107
107
|
})]
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ i("label", {
|
|
110
110
|
className: "flex items-center gap-3",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ r("input", {
|
|
112
112
|
type: "checkbox",
|
|
113
113
|
checked: e.showLegend !== !1,
|
|
114
114
|
onChange: (e) => u("showLegend", e.target.checked),
|
|
115
115
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
116
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ r("span", {
|
|
117
117
|
className: "text-sm text-text-primary",
|
|
118
118
|
children: c("bigconsole.widget.config.heatmap.showLegend", "Show color legend")
|
|
119
119
|
})]
|
|
@@ -1,30 +1,49 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Widget } from '../../../types';
|
|
3
|
+
import { FrameSrcContext, FrameSrcRejection } from '../../../utils/safeUrl';
|
|
4
|
+
import { FRAME_REFERRER_POLICY } from './framePolicy';
|
|
3
5
|
|
|
4
6
|
export interface IframeWidgetProps {
|
|
5
7
|
widget: Widget;
|
|
6
8
|
data?: IframeData;
|
|
7
9
|
}
|
|
10
|
+
/** Fields parser output may provide. Only `url` and `title` are used. */
|
|
8
11
|
export interface IframeData {
|
|
9
12
|
url?: string;
|
|
10
13
|
title?: string;
|
|
14
|
+
/** Ignored: fullscreen is a widget configuration setting. */
|
|
11
15
|
allowFullscreen?: boolean;
|
|
16
|
+
/** Ignored: the sandbox is fixed by the frame policy. */
|
|
12
17
|
sandbox?: string;
|
|
18
|
+
/** Ignored: loading is a widget configuration setting. */
|
|
13
19
|
loading?: 'lazy' | 'eager';
|
|
14
20
|
}
|
|
21
|
+
export interface ResolvedIframeConfig {
|
|
22
|
+
/** Validated frame source, or `null` when none was given or it was rejected. */
|
|
23
|
+
src: string | null;
|
|
24
|
+
title: string;
|
|
25
|
+
sandbox: string;
|
|
26
|
+
referrerPolicy: typeof FRAME_REFERRER_POLICY;
|
|
27
|
+
allowFullscreen: boolean;
|
|
28
|
+
/** Permissions Policy for the frame (`allow` attribute). */
|
|
29
|
+
allow: string | undefined;
|
|
30
|
+
loading: 'lazy' | 'eager';
|
|
31
|
+
/** Whether a URL was supplied at all. */
|
|
32
|
+
hasUrl: boolean;
|
|
33
|
+
/** Why the supplied URL cannot be embedded; `null` when it can (or none was given). */
|
|
34
|
+
rejection: FrameSrcRejection | null;
|
|
35
|
+
}
|
|
15
36
|
/**
|
|
16
37
|
* Resolve the effective iframe configuration.
|
|
17
38
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
39
|
+
* - `url` and `title`: parser `data` first, then `widget.config`.
|
|
40
|
+
* - `allowFullscreen` and `loading`: `widget.config` only.
|
|
41
|
+
* - `sandbox`, referrer policy and permissions: fixed by the frame policy;
|
|
42
|
+
* any `sandbox` value in data or config is ignored.
|
|
22
43
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
44
|
+
* The URL is validated by {@link resolveFrameSrc}; `context` supplies the app
|
|
45
|
+
* origin and the optional origin allowlist.
|
|
25
46
|
*/
|
|
26
|
-
export declare function resolveIframeConfig(widgetConfig: Record<string, unknown> | undefined, data: IframeData | undefined):
|
|
27
|
-
hasUrl: boolean;
|
|
28
|
-
};
|
|
47
|
+
export declare function resolveIframeConfig(widgetConfig: Record<string, unknown> | undefined, data: IframeData | undefined, context?: FrameSrcContext): ResolvedIframeConfig;
|
|
29
48
|
export declare const IframeWidget: FC<IframeWidgetProps>;
|
|
30
49
|
export default IframeWidget;
|
|
@@ -1,57 +1,130 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { useOptionalBigConsole as e } from "../../../context/BigConsoleContext.js";
|
|
2
|
+
import "../../../context/index.js";
|
|
3
|
+
import { currentAppOrigin as t, resolveFrameSrc as n } from "../../../utils/safeUrl.js";
|
|
4
|
+
import { FRAME_REFERRER_POLICY as r, FRAME_SANDBOX as i, frameKey as a, framePermissions as o } from "./framePolicy.js";
|
|
5
|
+
import { useTr as s } from "../../../../shared/hooks/useTr.js";
|
|
6
|
+
import { memo as c, useMemo as l } from "react";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
3
8
|
//#region src/bigconsole/components/widgets/iframe-widget/IframeWidget.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
var f = "Embedded Content";
|
|
10
|
+
function p(e) {
|
|
11
|
+
if (typeof e == "boolean") return e;
|
|
12
|
+
if (typeof e == "string") return e.toLowerCase() === "true";
|
|
13
|
+
}
|
|
14
|
+
function m(e) {
|
|
15
|
+
return e === "eager" ? "eager" : "lazy";
|
|
16
|
+
}
|
|
17
|
+
function h(...e) {
|
|
18
|
+
for (let t of e) if (typeof t == "string" && t.trim().length > 0) return t;
|
|
19
|
+
}
|
|
20
|
+
function g(e, t, a = {}) {
|
|
21
|
+
let s = e ?? {}, c = h(t?.url, s.url), l = h(t?.title, s.title) ?? f, u = p(s.allowFullscreen) ?? !1, d = m(s.loading), g = c === void 0 ? null : n(c, a);
|
|
9
22
|
return {
|
|
10
|
-
|
|
11
|
-
title:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
src: g?.ok ? g.src : null,
|
|
24
|
+
title: l,
|
|
25
|
+
sandbox: i,
|
|
26
|
+
referrerPolicy: r,
|
|
27
|
+
allowFullscreen: u,
|
|
28
|
+
allow: o(u),
|
|
29
|
+
loading: d,
|
|
30
|
+
hasUrl: c !== void 0,
|
|
31
|
+
rejection: g && !g.ok ? g.reason : null
|
|
16
32
|
};
|
|
17
33
|
}
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
var _ = {
|
|
35
|
+
missing: {
|
|
36
|
+
key: "bigconsole.widget.iframe.rejected.invalid",
|
|
37
|
+
fallback: "Enter a complete https:// address."
|
|
38
|
+
},
|
|
39
|
+
invalid: {
|
|
40
|
+
key: "bigconsole.widget.iframe.rejected.invalid",
|
|
41
|
+
fallback: "Enter a complete https:// address."
|
|
42
|
+
},
|
|
43
|
+
scheme: {
|
|
44
|
+
key: "bigconsole.widget.iframe.rejected.scheme",
|
|
45
|
+
fallback: "Only https:// addresses can be embedded."
|
|
46
|
+
},
|
|
47
|
+
credentials: {
|
|
48
|
+
key: "bigconsole.widget.iframe.rejected.credentials",
|
|
49
|
+
fallback: "Remove the user name or password from the address."
|
|
50
|
+
},
|
|
51
|
+
"same-origin": {
|
|
52
|
+
key: "bigconsole.widget.iframe.rejected.sameOrigin",
|
|
53
|
+
fallback: "Pages from this app cannot be embedded in a widget."
|
|
54
|
+
},
|
|
55
|
+
"origin-not-allowed": {
|
|
56
|
+
key: "bigconsole.widget.iframe.rejected.originNotAllowed",
|
|
57
|
+
fallback: "This site is not on the list of sites allowed for embedding."
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
function v() {
|
|
61
|
+
return /* @__PURE__ */ u("svg", {
|
|
62
|
+
className: "w-12 h-12 mx-auto mb-2 text-text-muted",
|
|
63
|
+
fill: "none",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
viewBox: "0 0 24 24",
|
|
66
|
+
children: /* @__PURE__ */ u("path", {
|
|
67
|
+
strokeLinecap: "round",
|
|
68
|
+
strokeLinejoin: "round",
|
|
69
|
+
strokeWidth: 1.5,
|
|
70
|
+
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
29
71
|
})
|
|
30
|
-
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
var y = c(function({ widget: n, data: r }) {
|
|
75
|
+
let i = s(), o = e()?.iframeAllowedOrigins, c = l(() => g(n.config, r, {
|
|
76
|
+
appOrigin: t(),
|
|
77
|
+
allowedOrigins: o
|
|
78
|
+
}), [
|
|
79
|
+
n.config,
|
|
80
|
+
r,
|
|
81
|
+
o
|
|
82
|
+
]);
|
|
83
|
+
if (!c.hasUrl) return /* @__PURE__ */ u("div", {
|
|
31
84
|
className: "flex items-center justify-center h-full text-text-secondary text-sm",
|
|
32
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ d("div", {
|
|
33
86
|
className: "text-center",
|
|
34
87
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
stroke: "currentColor",
|
|
39
|
-
viewBox: "0 0 24 24",
|
|
40
|
-
children: /* @__PURE__ */ n("path", {
|
|
41
|
-
strokeLinecap: "round",
|
|
42
|
-
strokeLinejoin: "round",
|
|
43
|
-
strokeWidth: 1.5,
|
|
44
|
-
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
45
|
-
})
|
|
46
|
-
}),
|
|
47
|
-
/* @__PURE__ */ n("p", { children: "No URL configured" }),
|
|
48
|
-
/* @__PURE__ */ n("p", {
|
|
88
|
+
/* @__PURE__ */ u(v, {}),
|
|
89
|
+
/* @__PURE__ */ u("p", { children: i("bigconsole.widget.iframe.empty.title", "No URL configured") }),
|
|
90
|
+
/* @__PURE__ */ u("p", {
|
|
49
91
|
className: "text-xs text-text-muted mt-1",
|
|
50
|
-
children: "Configure a URL to embed content"
|
|
92
|
+
children: i("bigconsole.widget.iframe.empty.hint", "Configure a URL to embed content")
|
|
51
93
|
})
|
|
52
94
|
]
|
|
53
95
|
})
|
|
54
96
|
});
|
|
97
|
+
if (!c.src) {
|
|
98
|
+
let e = _[c.rejection ?? "invalid"];
|
|
99
|
+
return /* @__PURE__ */ u("div", {
|
|
100
|
+
className: "flex items-center justify-center h-full text-text-secondary text-sm",
|
|
101
|
+
role: "status",
|
|
102
|
+
children: /* @__PURE__ */ d("div", {
|
|
103
|
+
className: "text-center",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ u(v, {}),
|
|
106
|
+
/* @__PURE__ */ u("p", { children: i("bigconsole.widget.iframe.rejected.title", "This address cannot be embedded") }),
|
|
107
|
+
/* @__PURE__ */ u("p", {
|
|
108
|
+
className: "text-xs text-text-muted mt-1",
|
|
109
|
+
children: i(e.key, e.fallback)
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return /* @__PURE__ */ u("div", {
|
|
116
|
+
className: "h-full w-full",
|
|
117
|
+
children: /* @__PURE__ */ u("iframe", {
|
|
118
|
+
sandbox: c.sandbox,
|
|
119
|
+
referrerPolicy: c.referrerPolicy,
|
|
120
|
+
allow: c.allow,
|
|
121
|
+
allowFullScreen: c.allowFullscreen,
|
|
122
|
+
loading: c.loading,
|
|
123
|
+
title: c.title,
|
|
124
|
+
className: "w-full h-full border-0 rounded",
|
|
125
|
+
src: c.src
|
|
126
|
+
}, a(c.src, c.sandbox))
|
|
127
|
+
});
|
|
55
128
|
});
|
|
56
129
|
//#endregion
|
|
57
|
-
export {
|
|
130
|
+
export { y as default, g as resolveIframeConfig };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame policy for widgets that embed external pages.
|
|
3
|
+
*
|
|
4
|
+
* The sandbox, referrer policy and permissions are defined here in code and
|
|
5
|
+
* are never read from widget configuration or parser output. Embedded pages
|
|
6
|
+
* always run with an opaque origin (no `allow-same-origin`), cannot navigate
|
|
7
|
+
* the top-level page, and open popups that keep the same sandbox.
|
|
8
|
+
*/
|
|
9
|
+
/** Sandbox flags applied to every embedded page. */
|
|
10
|
+
export declare const FRAME_SANDBOX = "allow-scripts allow-popups allow-forms";
|
|
11
|
+
/** Referrer policy for embedded pages: the dashboard URL is never sent. */
|
|
12
|
+
export declare const FRAME_REFERRER_POLICY = "no-referrer";
|
|
13
|
+
/** Permissions Policy (`allow` attribute) for an embedded page. */
|
|
14
|
+
export declare function framePermissions(allowFullscreen: boolean): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* React key for an embedded frame. Keying on the source and sandbox means a
|
|
17
|
+
* new element (with its attributes already set) is created whenever either
|
|
18
|
+
* changes, instead of navigating an existing frame.
|
|
19
|
+
*/
|
|
20
|
+
export declare function frameKey(src: string, sandbox?: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/bigconsole/components/widgets/iframe-widget/framePolicy.ts
|
|
2
|
+
var e = "allow-scripts allow-popups allow-forms", t = "no-referrer";
|
|
3
|
+
function n(e) {
|
|
4
|
+
return e ? "fullscreen" : void 0;
|
|
5
|
+
}
|
|
6
|
+
function r(t, n = e) {
|
|
7
|
+
return `${t}|${n}`;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { t as FRAME_REFERRER_POLICY, e as FRAME_SANDBOX, r as frameKey, n as framePermissions };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { IframeWidget, resolveIframeConfig, type IframeWidgetProps, type IframeData } from './IframeWidget';
|
|
1
|
+
export { IframeWidget, resolveIframeConfig, type IframeWidgetProps, type IframeData, type ResolvedIframeConfig, } from './IframeWidget';
|
|
2
|
+
export { FRAME_SANDBOX, FRAME_REFERRER_POLICY, frameKey, framePermissions } from './framePolicy';
|
|
2
3
|
export { default } from './IframeWidget';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import e,
|
|
2
|
-
|
|
1
|
+
import { FRAME_REFERRER_POLICY as e, FRAME_SANDBOX as t, frameKey as n, framePermissions as r } from "./framePolicy.js";
|
|
2
|
+
import i, { resolveIframeConfig as a } from "./IframeWidget.js";
|
|
3
|
+
export { e as FRAME_REFERRER_POLICY, t as FRAME_SANDBOX, i as IframeWidget, i as default, n as frameKey, r as framePermissions, a as resolveIframeConfig };
|