@burdenoff/microfe-bigconsole 2026.1119.2 → 2026.1119.3
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/components/widgets/FilterNotAppliedNotice.d.ts +15 -0
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +62 -0
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +353 -351
- package/dist/bigconsole/components/widgets/chart/ChartWidget.js +131 -126
- package/dist/bigconsole/components/widgets/chart/chartRows.d.ts +16 -0
- package/dist/bigconsole/components/widgets/chart/chartRows.js +33 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.d.ts +2 -20
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +4 -3
- package/dist/bigconsole/components/widgets/metric-card/metricCardData.d.ts +48 -0
- package/dist/bigconsole/components/widgets/metric-card/metricCardData.js +96 -0
- package/dist/bigconsole/components/widgets/metric-card/metricData.d.ts +9 -2
- package/dist/bigconsole/components/widgets/metric-card/metricData.js +10 -69
- package/dist/bigconsole/utils/applyGlobalFilters.d.ts +3 -1
- package/dist/bigconsole/utils/applyGlobalFilters.js +53 -4
- package/dist/bigconsole/utils/globalFilterMatching.d.ts +21 -3
- package/dist/bigconsole/utils/globalFilterMatching.js +14 -9
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { InapplicableFilter } from '../../utils/globalFilterMatching';
|
|
3
|
+
type Translate = (key: string, defaultValue?: string, vars?: Record<string, string | number>) => string;
|
|
4
|
+
interface FilterNotAppliedNoticeProps {
|
|
5
|
+
filters: readonly InapplicableFilter[];
|
|
6
|
+
t: Translate;
|
|
7
|
+
/** Start expanded (tests and server rendering); viewers start collapsed. */
|
|
8
|
+
defaultExpanded?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** The full sentence explaining why one filter does not narrow the widget. */
|
|
11
|
+
export declare function filterNotAppliedReason(filter: InapplicableFilter, t: Translate): string;
|
|
12
|
+
/** The one-line summary shown while the notice is collapsed. */
|
|
13
|
+
export declare function filterNotAppliedSummary(filters: readonly InapplicableFilter[], t: Translate): string;
|
|
14
|
+
export declare const FilterNotAppliedNotice: FC<FilterNotAppliedNoticeProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useId as e, useState as t } from "react";
|
|
2
|
+
import { ChevronDown as n, FilterX as r } from "lucide-react";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
// src/bigconsole/components/widgets/FilterNotAppliedNotice.tsx
|
|
5
|
+
function o(e, t) {
|
|
6
|
+
let n = {
|
|
7
|
+
name: e.name,
|
|
8
|
+
field: e.field
|
|
9
|
+
};
|
|
10
|
+
return e.reason === "precomputedValue" ? t("bigconsole.widget.filterNotApplicablePrecomputed", "Filter '{{name}}' does not change this value: it is a precomputed figure, not calculated from rows.", n) : t("bigconsole.widget.filterNotApplicable", "Filter '{{name}}' does not apply to this widget (no field '{{field}}').", n);
|
|
11
|
+
}
|
|
12
|
+
function s(e, t) {
|
|
13
|
+
return e.length === 1 ? t("bigconsole.widget.filterNotAppliedSummary", "Filter '{{name}}' not applied", { name: e[0].name }) : t("bigconsole.widget.filterNotAppliedSummaryMany", "{{count}} filters not applied", { count: e.length });
|
|
14
|
+
}
|
|
15
|
+
var c = ({ filters: c, t: l, defaultExpanded: u = !1 }) => {
|
|
16
|
+
let [d, f] = t(u), p = e();
|
|
17
|
+
if (c.length === 0) return null;
|
|
18
|
+
let m = c.map((e) => ({
|
|
19
|
+
id: e.filterId,
|
|
20
|
+
text: o(e, l)
|
|
21
|
+
})), h = m.map((e) => e.text).join("\n");
|
|
22
|
+
return /* @__PURE__ */ a("div", {
|
|
23
|
+
role: "status",
|
|
24
|
+
"data-testid": "widget-filter-not-applicable",
|
|
25
|
+
className: "mx-3 mt-2 min-w-0 shrink-0 rounded bg-status-warning-bg-subtle text-xs text-status-warning-text",
|
|
26
|
+
children: [/* @__PURE__ */ a("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
"data-testid": "widget-filter-not-applicable-toggle",
|
|
29
|
+
"aria-expanded": d,
|
|
30
|
+
"aria-controls": p,
|
|
31
|
+
title: h,
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
e.stopPropagation(), f((e) => !e);
|
|
34
|
+
},
|
|
35
|
+
className: "flex w-full min-w-0 items-center gap-1.5 px-2 py-1 text-left",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ i(r, {
|
|
38
|
+
className: "h-icon-xs w-icon-xs shrink-0",
|
|
39
|
+
"aria-hidden": "true"
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ i("span", {
|
|
42
|
+
className: "min-w-0 flex-1 truncate",
|
|
43
|
+
children: s(c, l)
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ i(n, {
|
|
46
|
+
className: `h-icon-xs w-icon-xs shrink-0 transition-transform ${d ? "rotate-180" : ""}`,
|
|
47
|
+
"aria-hidden": "true"
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}), d ? /* @__PURE__ */ i("ul", {
|
|
51
|
+
id: p,
|
|
52
|
+
"data-testid": "widget-filter-not-applicable-details",
|
|
53
|
+
className: "space-y-0.5 px-2 pb-1",
|
|
54
|
+
children: m.map((e) => /* @__PURE__ */ i("li", { children: e.text }, e.id))
|
|
55
|
+
}) : /* @__PURE__ */ i("span", {
|
|
56
|
+
id: p,
|
|
57
|
+
className: "sr-only",
|
|
58
|
+
children: h
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export { c as FilterNotAppliedNotice, o as filterNotAppliedReason, s as filterNotAppliedSummary };
|