@gravitee/gamma-lib-observability 3.1.1-feat-obs-86-datatable-widget.f0cae7e → 3.1.1-feat-obs-86-datatable-widget.ef3fc9c
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/dashboards/analytics-table/AnalyticsTable.d.ts.map +1 -1
- package/dist/dashboards/analytics-table/plan-columns.d.ts +0 -2
- package/dist/dashboards/analytics-table/plan-columns.d.ts.map +1 -1
- package/dist/dashboards/editor/TableQueryFields.d.ts.map +1 -1
- package/dist/index.js +14 -15
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsTable.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/AnalyticsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAe5D,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAIjC,qEAAqE;AACrE,eAAO,MAAM,cAAc,eAAe,CAAC;AAI3C,wBAAgB,WAAW,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAE3D;
|
|
1
|
+
{"version":3,"file":"AnalyticsTable.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/AnalyticsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAe5D,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAIjC,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c,EACd,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,UAAkB,EAClB,WAAe,EACf,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,YAAyC,GAC1C,EAAE,mBAAmB,2CAsMrB"}
|
|
@@ -9,8 +9,6 @@ export declare const VALUE_COLUMN_MIN_WIDTH = 88;
|
|
|
9
9
|
/** A value column drawing a share bar next to its number. */
|
|
10
10
|
export declare const SHARE_COLUMN_MIN_WIDTH = 120;
|
|
11
11
|
export declare const ROW_MENU_WIDTH = 28;
|
|
12
|
-
/** Below this the cells switch to compact numbers and lose their share bars. */
|
|
13
|
-
export declare const COMPACT_DENSITY_WIDTH = 480;
|
|
14
12
|
/**
|
|
15
13
|
* Below either of these nothing legible fits at all, so the widget says so
|
|
16
14
|
* instead of drawing a table nobody can read — the same call `MetricGroup`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-columns.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/plan-columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC
|
|
1
|
+
{"version":3,"file":"plan-columns.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/plan-columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,cAA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AU,CAgDjC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1E,YAAY,CASd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableQueryFields.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAA0B,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAUtF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"TableQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableQueryFields.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAA0B,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAUtF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAmF3E"}
|
package/dist/index.js
CHANGED
|
@@ -3654,15 +3654,14 @@ function xc(e, t) {
|
|
|
3654
3654
|
return Math.max(n, bc(e.label));
|
|
3655
3655
|
}
|
|
3656
3656
|
function Sc({ width: e, height: t, columns: n, sortColumnId: r, hasRowMenu: i = !1, labelHeader: a = "" }) {
|
|
3657
|
-
let o = e < 480 ? "compact" : "comfortable";
|
|
3658
3657
|
if (e < 180 || t < 90) return {
|
|
3659
3658
|
mode: "emergency",
|
|
3660
|
-
density:
|
|
3659
|
+
density: "compact",
|
|
3661
3660
|
visible: [],
|
|
3662
3661
|
hidden: n.map((e) => e.id)
|
|
3663
3662
|
};
|
|
3664
|
-
let
|
|
3665
|
-
l.delete(e.id), u -= xc(e,
|
|
3663
|
+
let o = Math.max(140, bc(a)) + (i ? 28 : 0), s = o + n.reduce((e, t) => e + xc(t, "comfortable"), 0) <= e ? "comfortable" : "compact", c = new Set(n.filter((e) => e.id === r || e.pinned).map((e) => e.id)), l = new Set(n.map((e) => e.id)), u = o + n.reduce((e, t) => e + xc(t, s), 0), d = (e) => {
|
|
3664
|
+
l.delete(e.id), u -= xc(e, s);
|
|
3666
3665
|
};
|
|
3667
3666
|
for (let t = n.length - 1; t >= 0 && u > e; t--) {
|
|
3668
3667
|
let e = n[t];
|
|
@@ -3674,12 +3673,12 @@ function Sc({ width: e, height: t, columns: n, sortColumnId: r, hasRowMenu: i =
|
|
|
3674
3673
|
}
|
|
3675
3674
|
return u > e || l.size === 0 ? {
|
|
3676
3675
|
mode: "top-list",
|
|
3677
|
-
density:
|
|
3676
|
+
density: s,
|
|
3678
3677
|
visible: [],
|
|
3679
3678
|
hidden: n.map((e) => e.id)
|
|
3680
3679
|
} : {
|
|
3681
3680
|
mode: "table",
|
|
3682
|
-
density:
|
|
3681
|
+
density: s,
|
|
3683
3682
|
visible: n.filter((e) => l.has(e.id)).map((e) => e.id),
|
|
3684
3683
|
hidden: n.filter((e) => !l.has(e.id)).map((e) => e.id)
|
|
3685
3684
|
};
|
|
@@ -3713,7 +3712,7 @@ function Dc({ ratio: e }) {
|
|
|
3713
3712
|
function Oc({ value: e, column: t, density: n, shareBase: r, muted: i }) {
|
|
3714
3713
|
if (e === void 0) return /* @__PURE__ */ I("span", {
|
|
3715
3714
|
className: "block text-right text-muted-foreground",
|
|
3716
|
-
title: `No ${t.label}
|
|
3715
|
+
title: `No ${t.label} for this row.`,
|
|
3717
3716
|
children: "—"
|
|
3718
3717
|
});
|
|
3719
3718
|
let a = r && r.base > 0 ? e / r.base : void 0, o = i ? void 0 : gc(e, a, t.thresholds);
|
|
@@ -3853,7 +3852,7 @@ function Ac({ columns: e, rows: t, dimensionLabel: n, state: r, sort: i, onSortC
|
|
|
3853
3852
|
S.mode === "table" && /* @__PURE__ */ L(F, { children: [w && /* @__PURE__ */ L("div", {
|
|
3854
3853
|
className: "flex h-6 shrink-0 items-center gap-2 text-xs text-muted-foreground",
|
|
3855
3854
|
children: [ne.length > 0 && /* @__PURE__ */ I(Mc, { columns: ne }), c > 0 && /* @__PURE__ */ L("span", {
|
|
3856
|
-
title: "
|
|
3855
|
+
title: "Some columns have no value for these rows.",
|
|
3857
3856
|
children: [
|
|
3858
3857
|
c,
|
|
3859
3858
|
" ",
|
|
@@ -9879,7 +9878,7 @@ function dm({ widget: e, onChange: t }) {
|
|
|
9879
9878
|
max: 100,
|
|
9880
9879
|
value: e.pageSize ?? "",
|
|
9881
9880
|
placeholder: "As many as fit",
|
|
9882
|
-
title: "
|
|
9881
|
+
title: "At most this many rows per page. Fewer if the widget is short.",
|
|
9883
9882
|
onChange: (n) => {
|
|
9884
9883
|
let r = Number.parseInt(n.target.value, 10);
|
|
9885
9884
|
t({
|
|
@@ -10151,7 +10150,7 @@ function wm({ columns: e, onChange: t }) {
|
|
|
10151
10150
|
children: [/* @__PURE__ */ I(K, {
|
|
10152
10151
|
className: "h-7 w-32",
|
|
10153
10152
|
"aria-label": "Format",
|
|
10154
|
-
title: "
|
|
10153
|
+
title: "Auto follows the unit of the metric.",
|
|
10155
10154
|
children: /* @__PURE__ */ I(q, { placeholder: "Auto" })
|
|
10156
10155
|
}), /* @__PURE__ */ I(W, { children: fm.map((e) => /* @__PURE__ */ I(G, {
|
|
10157
10156
|
value: e.value,
|
|
@@ -10169,7 +10168,7 @@ function wm({ columns: e, onChange: t }) {
|
|
|
10169
10168
|
}),
|
|
10170
10169
|
/* @__PURE__ */ L("div", {
|
|
10171
10170
|
className: "flex items-center gap-2 text-sm",
|
|
10172
|
-
title: "
|
|
10171
|
+
title: "Stays visible when the widget is narrow. Other columns hide first.",
|
|
10173
10172
|
children: [/* @__PURE__ */ I(rn, {
|
|
10174
10173
|
"aria-label": "Keep when narrow",
|
|
10175
10174
|
checked: t.pinned === !0,
|
|
@@ -10217,7 +10216,7 @@ function wm({ columns: e, onChange: t }) {
|
|
|
10217
10216
|
}),
|
|
10218
10217
|
h.length > 1 && /* @__PURE__ */ I("span", {
|
|
10219
10218
|
className: "ml-1 text-[11px] text-muted-foreground",
|
|
10220
|
-
children: "First match wins, left to right"
|
|
10219
|
+
children: "First match wins, left to right."
|
|
10221
10220
|
})
|
|
10222
10221
|
]
|
|
10223
10222
|
}),
|
|
@@ -10343,7 +10342,7 @@ function Tm({ column: e, color: t, op: n, basis: r, value: i, onColor: a, onOp:
|
|
|
10343
10342
|
className: "flex items-center gap-0.5",
|
|
10344
10343
|
children: [m && /* @__PURE__ */ L(F, { children: [
|
|
10345
10344
|
/* @__PURE__ */ I(bm, {
|
|
10346
|
-
label: "Move earlier. Earlier
|
|
10345
|
+
label: "Move earlier. Earlier thresholds win.",
|
|
10347
10346
|
children: /* @__PURE__ */ I(z, {
|
|
10348
10347
|
variant: "ghost",
|
|
10349
10348
|
size: "icon-xs",
|
|
@@ -10417,7 +10416,7 @@ function Dm({ widget: e, onChange: t }) {
|
|
|
10417
10416
|
max: 100,
|
|
10418
10417
|
value: e.limit ?? "",
|
|
10419
10418
|
placeholder: "20",
|
|
10420
|
-
title: "Up to 100 rows
|
|
10419
|
+
title: "Up to 100 rows. The table pages through them.",
|
|
10421
10420
|
onChange: (n) => {
|
|
10422
10421
|
let r = Number.parseInt(n.target.value, 10);
|
|
10423
10422
|
t({
|
|
@@ -10466,7 +10465,7 @@ function Dm({ widget: e, onChange: t }) {
|
|
|
10466
10465
|
})] })]
|
|
10467
10466
|
})
|
|
10468
10467
|
]
|
|
10469
|
-
}), /* @__PURE__ */ I(zt, { children: "
|
|
10468
|
+
}), /* @__PURE__ */ I(zt, { children: "Sorting also picks the rows. The table keeps the top N by this column." })] }), /* @__PURE__ */ L(V, { children: [/* @__PURE__ */ I(Ht, { children: "Columns" }), /* @__PURE__ */ I(wm, {
|
|
10470
10469
|
columns: e.columns,
|
|
10471
10470
|
onChange: (n) => {
|
|
10472
10471
|
let a = n.map((e) => Hs(e)), o = r && a.includes(r) ? r : a[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravitee/gamma-lib-observability",
|
|
3
|
-
"version": "3.1.1-feat-obs-86-datatable-widget.
|
|
3
|
+
"version": "3.1.1-feat-obs-86-datatable-widget.ef3fc9c",
|
|
4
4
|
"description": "Shared observability library for Gamma modules — dashboards, logs, tracing UI components and integration with business rules.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "yarn@4.14.1",
|