@gravitee/gamma-lib-observability 1.40.0 → 2.0.0
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/QUERYING.md +15 -3
- package/dist/dashboards/DashboardFilterChip.d.ts +32 -0
- package/dist/dashboards/DashboardFilterChip.d.ts.map +1 -0
- package/dist/dashboards/DashboardFilterChipPopover.d.ts +19 -0
- package/dist/dashboards/DashboardFilterChipPopover.d.ts.map +1 -0
- package/dist/dashboards/DashboardFilterChips.d.ts +29 -0
- package/dist/dashboards/DashboardFilterChips.d.ts.map +1 -0
- package/dist/dashboards/DashboardFilterValueForm.d.ts +32 -0
- package/dist/dashboards/DashboardFilterValueForm.d.ts.map +1 -0
- package/dist/dashboards/dashboard-filters.d.ts +79 -0
- package/dist/dashboards/dashboard-filters.d.ts.map +1 -0
- package/dist/dashboards/editor/DashboardEditorPage.d.ts +9 -1
- package/dist/dashboards/editor/DashboardEditorPage.d.ts.map +1 -1
- package/dist/dashboards/editor/DashboardFiltersEditor.d.ts +26 -0
- package/dist/dashboards/editor/DashboardFiltersEditor.d.ts.map +1 -0
- package/dist/dashboards/editor/dashboard-editor-state.d.ts +3 -0
- package/dist/dashboards/editor/dashboard-editor-state.d.ts.map +1 -1
- package/dist/dashboards/editor/locked-filter-conflicts.d.ts +29 -0
- package/dist/dashboards/editor/locked-filter-conflicts.d.ts.map +1 -0
- package/dist/dashboards/merge-filters.d.ts +12 -3
- package/dist/dashboards/merge-filters.d.ts.map +1 -1
- package/dist/dashboards/renderers/CartesianWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/use-merged-widget-filters.d.ts +9 -4
- package/dist/dashboards/use-merged-widget-filters.d.ts.map +1 -1
- package/dist/filters/FilterBar.d.ts +8 -1
- package/dist/filters/FilterBar.d.ts.map +1 -1
- package/dist/filters/FilterChip.d.ts +16 -0
- package/dist/filters/FilterChip.d.ts.map +1 -1
- package/dist/filters/FilterPopoverForm.d.ts +21 -1
- package/dist/filters/FilterPopoverForm.d.ts.map +1 -1
- package/dist/filters/FilterValueField.d.ts +26 -0
- package/dist/filters/FilterValueField.d.ts.map +1 -0
- package/dist/filters/index.d.ts +1 -0
- package/dist/filters/index.d.ts.map +1 -1
- package/dist/filters/resolve-filter-label.d.ts +25 -0
- package/dist/filters/resolve-filter-label.d.ts.map +1 -0
- package/dist/filters/scope-ceiling.d.ts +33 -0
- package/dist/filters/scope-ceiling.d.ts.map +1 -0
- package/dist/filters/use-active-api-types.d.ts +18 -0
- package/dist/filters/use-active-api-types.d.ts.map +1 -0
- package/dist/filters/utils/build-filter-condition.d.ts.map +1 -1
- package/dist/filters/utils/filter-display.d.ts.map +1 -1
- package/dist/hooks/use-logs-query.d.ts.map +1 -1
- package/dist/index.js +3329 -2807
- package/dist/logs/detail/components/LogDetailContextChart.d.ts.map +1 -1
- package/dist/routing/ObservabilityDashboardPage.d.ts.map +1 -1
- package/dist/routing/ObservabilityRoutes.d.ts.map +1 -1
- package/dist/styles/observability.css +1 -1
- package/dist/testing/graphene-core-icons-mock.d.ts +2 -0
- package/dist/testing/graphene-core-icons-mock.d.ts.map +1 -1
- package/dist/testing/graphene-core-mock.d.ts +6 -0
- package/dist/testing/graphene-core-mock.d.ts.map +1 -1
- package/dist/types/domain.d.ts +30 -1
- package/dist/types/domain.d.ts.map +1 -1
- package/dist/url-state/codec.d.ts.map +1 -1
- package/package.json +1 -1
package/QUERYING.md
CHANGED
|
@@ -229,11 +229,23 @@ series to keep a single left axis (backward compatible).
|
|
|
229
229
|
Filters merge in this order, later layers win on a field conflict:
|
|
230
230
|
|
|
231
231
|
```
|
|
232
|
-
|
|
232
|
+
dashboard definition (re-valuable default) → reader URL filters → dashboard definition (locked) → widget (widget.filters) → series/item (series[].filters / items[].filters)
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
**The host's context scope sits above all of it as a ceiling, not as a layer.** A module mounted with
|
|
236
|
+
`scopeApiTypes` (or explicit `contextFilters`) always carries that scope, and any condition on a
|
|
237
|
+
scoped field is intersected with it: a later layer can narrow inside the scope, never step outside
|
|
238
|
+
it. An intersection that comes out empty falls back to the host's own values rather than to no
|
|
239
|
+
condition at all, because a value-less condition is dropped before the request and would leave the
|
|
240
|
+
query unscoped. Only ceilings whose operator is `eq` or `in` are enforced this way. See
|
|
241
|
+
`clampToScope` in `src/filters/scope-ceiling.ts`.
|
|
242
|
+
|
|
243
|
+
Within a dashboard, a definition filter is locked or re-valuable (`editable`); see
|
|
244
|
+
`resolveDashboardFilters` for how a reader's URL filters are reconciled with it.
|
|
245
|
+
|
|
246
|
+
- The merged top-level filters are sent as the request `filters[]`. Item filters (`items[].filters`)
|
|
247
|
+
are sent as per-metric `filters[]`; series filters are merged into the top-level `filters[]` of
|
|
248
|
+
that series' own request, since each series is one request.
|
|
237
249
|
- Operators are mapped to the v2 wire format: `eq → EQ`, `in → IN`, `gte → GTE`, `lte → LTE`.
|
|
238
250
|
`eq`/`gte`/`lte` take a single value; `in` takes an array. Unsupported operators throw with a clear
|
|
239
251
|
error rather than silently dropping the filter.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FilterCondition } from '../types/domain';
|
|
2
|
+
export interface DashboardFilterChipProps {
|
|
3
|
+
readonly condition: FilterCondition;
|
|
4
|
+
/** Re-valuable slots show a chevron affordance; locked ones show a padlock. */
|
|
5
|
+
readonly revaluable: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* The reader has moved this slot off the author's value. Marked, because a
|
|
8
|
+
* shared link otherwise looks identical whether it carries the author's
|
|
9
|
+
* intent or somebody else's session.
|
|
10
|
+
*/
|
|
11
|
+
readonly changedByReader?: boolean;
|
|
12
|
+
/** Forwarded to {@link FilterChip}: whether the chip reacts to clicks at all. */
|
|
13
|
+
readonly editable?: boolean;
|
|
14
|
+
readonly active?: boolean;
|
|
15
|
+
readonly onEdit?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Offers the X on hover and the Delete/Backspace shortcut, the gesture this
|
|
18
|
+
* app already uses for every other filter chip. The author's editor passes
|
|
19
|
+
* it; the reader's dashboard must not, since removing a dashboard filter is
|
|
20
|
+
* not theirs to do.
|
|
21
|
+
*/
|
|
22
|
+
readonly onRemove?: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Adapter that maps a dashboard-definition filter onto the generic
|
|
26
|
+
* {@link FilterChip}: an outline pill with a leading padlock (locked) or a
|
|
27
|
+
* trailing chevron (re-valuable), and `: Any` for an empty slot. This is the
|
|
28
|
+
* single place that owns the "dashboard chip" look. It composes FilterChip,
|
|
29
|
+
* it does not reimplement it.
|
|
30
|
+
*/
|
|
31
|
+
export declare const DashboardFilterChip: import('react').ForwardRefExoticComponent<DashboardFilterChipProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
32
|
+
//# sourceMappingURL=DashboardFilterChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardFilterChip.d.ts","sourceRoot":"","sources":["../../src/dashboards/DashboardFilterChip.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,sHA4B9B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FilterCondition } from '../types/domain';
|
|
3
|
+
export interface DashboardFilterChipPopoverProps {
|
|
4
|
+
readonly condition: FilterCondition;
|
|
5
|
+
readonly revaluable: boolean;
|
|
6
|
+
readonly changedByReader?: boolean;
|
|
7
|
+
/** When set, the chip also offers the X and the Delete shortcut. */
|
|
8
|
+
readonly onRemove?: () => void;
|
|
9
|
+
/** Renders the popover body; `close` dismisses it after apply/cancel. */
|
|
10
|
+
readonly renderForm: (close: () => void) => ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A dashboard filter chip that opens a popover on click. It renders the shared
|
|
14
|
+
* {@link DashboardFilterChip} and anchors the popover to it via a virtual ref,
|
|
15
|
+
* the same pattern as `FilterBar`, so the edit / re-value form renders exactly
|
|
16
|
+
* like every other filter popover.
|
|
17
|
+
*/
|
|
18
|
+
export declare function DashboardFilterChipPopover({ condition, revaluable, changedByReader, onRemove, renderForm, }: DashboardFilterChipPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=DashboardFilterChipPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardFilterChipPopover.d.ts","sourceRoot":"","sources":["../../src/dashboards/DashboardFilterChipPopover.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;CACvD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,SAAS,EACT,UAAU,EACV,eAAe,EACf,QAAQ,EACR,UAAU,GACX,EAAE,+BAA+B,2CAwBjC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FilterProvider } from '../filters/filter-provider';
|
|
2
|
+
import { FilterCondition } from '../types/domain';
|
|
3
|
+
export interface DashboardFilterChipsProps {
|
|
4
|
+
/** Locked dashboard filters: read-only, always applied. */
|
|
5
|
+
readonly lockedFilters: readonly FilterCondition[];
|
|
6
|
+
/** Re-valuable dashboard filters: the reader may change the value only. */
|
|
7
|
+
readonly revaluableFilters: readonly FilterCondition[];
|
|
8
|
+
/**
|
|
9
|
+
* The author's value for each re-valuable filter, aligned index by index.
|
|
10
|
+
* What a chip is compared against to know the reader has moved it.
|
|
11
|
+
*/
|
|
12
|
+
readonly revaluableDefaults?: readonly FilterCondition[];
|
|
13
|
+
/** Providers used to load values in the re-value popover. */
|
|
14
|
+
readonly providers: readonly FilterProvider[];
|
|
15
|
+
/** Active API types passed to async value loaders. */
|
|
16
|
+
readonly activeApiTypes?: readonly string[];
|
|
17
|
+
/** Called when the reader re-values a slot (field fixed; empty value = "*"). */
|
|
18
|
+
readonly onRevalue: (field: string, next: FilterCondition) => void;
|
|
19
|
+
/** Drops the reader's value so the author's takes over again. */
|
|
20
|
+
readonly onResetRevalue?: (field: string) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Dashboard-definition filter chips shown in view mode, rendered with the shared
|
|
24
|
+
* {@link FilterChip}. Locked filters render read-only with a padlock; re-valuable
|
|
25
|
+
* filters are clickable slots whose value the reader can change (field and
|
|
26
|
+
* operator are stated rather than offered). An empty value renders `label: Any`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function DashboardFilterChips({ lockedFilters, revaluableFilters, revaluableDefaults, providers, activeApiTypes, onRevalue, onResetRevalue, }: DashboardFilterChipsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
//# sourceMappingURL=DashboardFilterChips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardFilterChips.d.ts","sourceRoot":"","sources":["../../src/dashboards/DashboardFilterChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKvD,MAAM,WAAW,yBAAyB;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,aAAa,EAAE,SAAS,eAAe,EAAE,CAAC;IACnD,2EAA2E;IAC3E,QAAQ,CAAC,iBAAiB,EAAE,SAAS,eAAe,EAAE,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACzD,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IAC9C,sDAAsD;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACnE,iEAAiE;IACjE,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AASD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,GACf,EAAE,yBAAyB,kDAmD3B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FilterProvider } from '../filters/filter-provider';
|
|
2
|
+
import { FilterCondition } from '../types/domain';
|
|
3
|
+
export interface DashboardFilterValueFormProps {
|
|
4
|
+
/** The definition slot: its field and operator are the author's and stay. */
|
|
5
|
+
readonly condition: FilterCondition;
|
|
6
|
+
readonly provider?: FilterProvider;
|
|
7
|
+
readonly activeApiTypes?: readonly string[];
|
|
8
|
+
/**
|
|
9
|
+
* Puts the author's value back. Set only when the reader has moved away from
|
|
10
|
+
* it, so the control appears exactly when it has something to undo.
|
|
11
|
+
*/
|
|
12
|
+
readonly onReset?: () => void;
|
|
13
|
+
readonly onApply: (next: FilterCondition) => void;
|
|
14
|
+
readonly onCancel: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* What a reader gets when they open a re-valuable dashboard filter: one
|
|
18
|
+
* question, "which value?".
|
|
19
|
+
*
|
|
20
|
+
* Deliberately not the author's form with two thirds of it switched off. That
|
|
21
|
+
* shape showed a reader a field picker and an operator select they could never
|
|
22
|
+
* use, which communicates only that something is being withheld, and it made
|
|
23
|
+
* the guarantee a matter of disabled attributes: a greyed combobox is still
|
|
24
|
+
* focusable, and a wrapper that swallows input is a lie rather than a lock.
|
|
25
|
+
* Here the field and the operator are not controls at all, so there is nothing
|
|
26
|
+
* to grey, nothing to skip in the tab order, and no way to reach them.
|
|
27
|
+
*
|
|
28
|
+
* The value editor itself is shared with the author's form, so the half the two
|
|
29
|
+
* roles do have in common cannot drift.
|
|
30
|
+
*/
|
|
31
|
+
export declare function DashboardFilterValueForm({ condition, provider, activeApiTypes, onReset, onApply, onCancel, }: DashboardFilterValueFormProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=DashboardFilterValueForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardFilterValueForm.d.ts","sourceRoot":"","sources":["../../src/dashboards/DashboardFilterValueForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,4BAA4B,CAAC;AAIpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,WAAW,6BAA6B;IAC5C,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,QAAQ,EACR,cAAc,EACd,OAAO,EACP,OAAO,EACP,QAAQ,GACT,EAAE,6BAA6B,2CAiF/B"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { FilterCondition } from '../types/domain';
|
|
2
|
+
/**
|
|
3
|
+
* How a filter with no value renders: every value passes, no query constraint.
|
|
4
|
+
* It is a slot the author leaves open so a reader finds the field ready to fill
|
|
5
|
+
* instead of having to build the chip themselves.
|
|
6
|
+
*
|
|
7
|
+
* A word rather than an asterisk. In a form, `*` is the established mark for a
|
|
8
|
+
* required field, so it read as the opposite of what this means.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ALL_VALUES_LABEL = "Any";
|
|
11
|
+
/**
|
|
12
|
+
* A dashboard-definition filter is **locked** unless it explicitly opts into
|
|
13
|
+
* "allow value change" (`editable: true`). Defaulting a missing flag to locked
|
|
14
|
+
* is the safe direction: a scoping filter that silently became reader-editable
|
|
15
|
+
* would widen a scope its author fixed, while the reverse only costs a reader
|
|
16
|
+
* one control.
|
|
17
|
+
*
|
|
18
|
+
* A filter with no value is never locked, whatever the flag says. There is no
|
|
19
|
+
* value to fix, so locking one would produce a chip that constrains nothing and
|
|
20
|
+
* can never be filled: a dead slot. The rule lives here rather than only in the
|
|
21
|
+
* editor because a definition can also arrive from the JSON tab, a template or
|
|
22
|
+
* the backend, and none of those pass through the editor's toggle. Letting the
|
|
23
|
+
* reader value it cannot widen anything either, since the empty filter was
|
|
24
|
+
* imposing no constraint to begin with.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isLocked(filter: FilterCondition): boolean;
|
|
27
|
+
export declare function isRevaluable(filter: FilterCondition): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The flag to store for what the author expressed in the editor, kept next to
|
|
30
|
+
* {@link isLocked} so the two cannot drift apart on the empty-value rule.
|
|
31
|
+
*/
|
|
32
|
+
export declare function deriveEditable(allowValueChange: boolean, hasValue: boolean): boolean;
|
|
33
|
+
export interface ResolvedDashboardFilters {
|
|
34
|
+
/**
|
|
35
|
+
* Every field the dashboard governs, locked or re-valuable. Barrier 1: the
|
|
36
|
+
* page removes these from the reader's filter picker. Returned here rather
|
|
37
|
+
* than recomputed by the caller so all three barriers derive from one split.
|
|
38
|
+
*/
|
|
39
|
+
readonly governedFields: ReadonlySet<string>;
|
|
40
|
+
/** Locked filters: rendered read-only, always applied. */
|
|
41
|
+
readonly lockedChips: FilterCondition[];
|
|
42
|
+
/** Re-valuable filters, showing the reader's value if set, else the author's. */
|
|
43
|
+
readonly revaluableChips: FilterCondition[];
|
|
44
|
+
/**
|
|
45
|
+
* The author's own value for each re-valuable filter, aligned index by index
|
|
46
|
+
* with `revaluableChips`.
|
|
47
|
+
*
|
|
48
|
+
* Both halves already existed here; only the resolved one was published. A
|
|
49
|
+
* reader who changes a slot had no way to see they had diverged, and no way
|
|
50
|
+
* back: on a shared link the two are indistinguishable.
|
|
51
|
+
*/
|
|
52
|
+
readonly revaluableDefaults: FilterCondition[];
|
|
53
|
+
/** The reader's raw re-values (their URL filters on re-valuable fields), for preservation. */
|
|
54
|
+
readonly userRevalues: FilterCondition[];
|
|
55
|
+
/** The reader's own free filters (fields the dashboard does not govern). */
|
|
56
|
+
readonly userOwnFilters: FilterCondition[];
|
|
57
|
+
/** Filters actually applied to widgets (empty-value placeholders dropped at wire time). */
|
|
58
|
+
readonly effectiveFilters: FilterCondition[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Splits a dashboard's definition filters and the reader's URL filters into the
|
|
62
|
+
* chips to render and the effective filters to query.
|
|
63
|
+
*
|
|
64
|
+
* Locked filters are **non-circumventable** from the client. Three barriers,
|
|
65
|
+
* kept independent on purpose so no single one carries the guarantee alone:
|
|
66
|
+
*
|
|
67
|
+
* 1. the page removes every dashboard-governed field from the filter picker, so
|
|
68
|
+
* a competing chip cannot be built through the UI at all;
|
|
69
|
+
* 2. a URL filter on a locked field is discarded here. It lands in neither
|
|
70
|
+
* `userRevalues` nor `userOwnFilters`, so a hand-written query string is
|
|
71
|
+
* read and dropped rather than trusted;
|
|
72
|
+
* 3. the merge dedupes by field and takes the locked definitions last, so even
|
|
73
|
+
* a condition that reached this point some other way loses.
|
|
74
|
+
*
|
|
75
|
+
* A reader can only ever change the *value* of a re-valuable field. The flag
|
|
76
|
+
* itself is never encoded into the URL, so it cannot be granted by tampering.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveDashboardFilters(dashboardFilters: readonly FilterCondition[], urlFilters: readonly FilterCondition[]): ResolvedDashboardFilters;
|
|
79
|
+
//# sourceMappingURL=dashboard-filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-filters.d.ts","sourceRoot":"","sources":["../../src/dashboards/dashboard-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AAGvE;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAEzD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAE7D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAEpF;AA4BD,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7C,0DAA0D;IAC1D,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAC;IACxC,iFAAiF;IACjF,QAAQ,CAAC,eAAe,EAAE,eAAe,EAAE,CAAC;IAC5C;;;;;;;OAOG;IACH,QAAQ,CAAC,kBAAkB,EAAE,eAAe,EAAE,CAAC;IAC/C,8FAA8F;IAC9F,QAAQ,CAAC,YAAY,EAAE,eAAe,EAAE,CAAC;IACzC,4EAA4E;IAC5E,QAAQ,CAAC,cAAc,EAAE,eAAe,EAAE,CAAC;IAC3C,2FAA2F;IAC3F,QAAQ,CAAC,gBAAgB,EAAE,eAAe,EAAE,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,SAAS,eAAe,EAAE,EAC5C,UAAU,EAAE,SAAS,eAAe,EAAE,GACrC,wBAAwB,CAiE1B"}
|
|
@@ -11,5 +11,13 @@
|
|
|
11
11
|
* belongs. The range still refreshes on demand, by re-picking it in the time
|
|
12
12
|
* range control.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export interface DashboardEditorPageProps {
|
|
15
|
+
/**
|
|
16
|
+
* Context field carrying the host's module scope (e.g. `API_TYPE`), forwarded
|
|
17
|
+
* to the dashboard-filters editor so an author is only offered the fields and
|
|
18
|
+
* values their own module covers.
|
|
19
|
+
*/
|
|
20
|
+
readonly scopeFilterField?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function DashboardEditorPage({ scopeFilterField }: DashboardEditorPageProps): import("react/jsx-runtime").JSX.Element;
|
|
15
23
|
//# sourceMappingURL=DashboardEditorPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardEditorPage.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/DashboardEditorPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardEditorPage.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/DashboardEditorPage.tsx"],"names":[],"mappings":"AAkEA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,gBAAgB,EAAE,EAAE,wBAAwB,2CAYjF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FilterCondition } from '../../types/domain';
|
|
2
|
+
export interface DashboardFiltersEditorProps {
|
|
3
|
+
readonly filters: readonly FilterCondition[];
|
|
4
|
+
/**
|
|
5
|
+
* Context field carrying the host's module scope (e.g. `API_TYPE`). It
|
|
6
|
+
* narrows what the author may *add*: which fields the picker offers and which
|
|
7
|
+
* values their loaders return. Without it an author scoped to LLM and MCP is
|
|
8
|
+
* shown every API the tenant owns and can build a filter pointing outside
|
|
9
|
+
* their own module.
|
|
10
|
+
*
|
|
11
|
+
* It deliberately does not narrow the filters already on the dashboard. Those
|
|
12
|
+
* stay editable and keep their catalog name whatever the scope says, so a
|
|
13
|
+
* definition written before the scope changed, or written by hand, never
|
|
14
|
+
* becomes a chip its author can only look at.
|
|
15
|
+
*/
|
|
16
|
+
readonly scopeFilterField?: string;
|
|
17
|
+
readonly onChange: (filters: FilterCondition[]) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Inline editor for a dashboard's definition filters. The author manipulates the
|
|
21
|
+
* exact chips the reader will see (WYSIWYG): each chip opens a popover to edit
|
|
22
|
+
* its value/operator and toggle "Allow value change" (locked vs re-valuable);
|
|
23
|
+
* "Add dashboard filter" appends one. An empty value renders `: Any`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function DashboardFiltersEditor({ filters, scopeFilterField, onChange }: DashboardFiltersEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=DashboardFiltersEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardFiltersEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/DashboardFiltersEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAa1D,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CACzD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,2BAA2B,2CAiD1G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-editor-state.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/dashboard-editor-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGlH;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IACpC,QAAQ,C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E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FilterCondition, Widget } from '../../types/domain';
|
|
2
|
+
export interface LockedFilterConflict {
|
|
3
|
+
readonly widgetId: string;
|
|
4
|
+
/** Falls back to the id: a widget can be saved before it is named. */
|
|
5
|
+
readonly widgetTitle: string;
|
|
6
|
+
readonly field: string;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly dashboardValue: string[];
|
|
9
|
+
readonly dashboardValueLabels?: string[];
|
|
10
|
+
readonly widgetValue: string[];
|
|
11
|
+
readonly widgetValueLabels?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Widgets whose own filters override a locked dashboard filter.
|
|
15
|
+
*
|
|
16
|
+
* Widget filters are merged last, so on a shared field the widget's value is
|
|
17
|
+
* the one queried, whatever the padlock on the dashboard chip says. Within the
|
|
18
|
+
* host's module scope, which still clamps it either way. That is
|
|
19
|
+
* deliberate (see `ObservabilityDashboardPage`), which is exactly why the
|
|
20
|
+
* author has to be told: nothing downstream will. Most of these are written
|
|
21
|
+
* without anyone typing them, by `withAutoScope` stamping the `API_TYPE` a
|
|
22
|
+
* metric requires, so the contradiction can appear from picking a metric.
|
|
23
|
+
*
|
|
24
|
+
* A widget carrying the *same* value is not a conflict. It is what the AIM
|
|
25
|
+
* templates do today, pinning every widget to the API type the dashboard is
|
|
26
|
+
* about, and flagging it would cry wolf on the common case.
|
|
27
|
+
*/
|
|
28
|
+
export declare function findLockedFilterConflicts(dashboardFilters: readonly FilterCondition[], widgets: readonly Widget[]): LockedFilterConflict[];
|
|
29
|
+
//# sourceMappingURL=locked-filter-conflicts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locked-filter-conflicts.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/locked-filter-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGlE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CACvC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,SAAS,eAAe,EAAE,EAC5C,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,oBAAoB,EAAE,CAsBxB"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { FilterCondition } from '../types/domain';
|
|
2
2
|
/**
|
|
3
|
-
* Union-merges multiple filter sources.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Union-merges multiple filter sources. Later sources take precedence when the
|
|
4
|
+
* same field is targeted, and the result keeps the first insertion position of
|
|
5
|
+
* each field.
|
|
6
|
+
*
|
|
7
|
+
* This is the mechanism, not the policy: it does not know which source is which
|
|
8
|
+
* and has no canonical order of its own. The host's scope is applied on top by
|
|
9
|
+
* `clampToScope`, which is what actually decides precedence and is the only
|
|
10
|
+
* place that describes the full chain.
|
|
11
|
+
*
|
|
12
|
+
* Note it keys on `field` alone, so two conditions on the same field with
|
|
13
|
+
* different operators can never coexist across sources: `latency gte 100` and
|
|
14
|
+
* `latency lte 500` collapse to one.
|
|
6
15
|
*/
|
|
7
16
|
export declare function mergeFilters(...sources: (readonly FilterCondition[] | undefined)[]): FilterCondition[];
|
|
8
17
|
//# sourceMappingURL=merge-filters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-filters.d.ts","sourceRoot":"","sources":["../../src/dashboards/merge-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"merge-filters.d.ts","sourceRoot":"","sources":["../../src/dashboards/merge-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,GAAG,OAAO,EAAE,CAAC,SAAS,eAAe,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,eAAe,EAAE,CAWtG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/CartesianWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/CartesianWidgetRenderer.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,oBAAoB,CAAC;AAO5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,wBAAgB,uBAAuB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,eAAe,CAAC,2CAkG3G"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { FilterCondition } from '../types/domain';
|
|
2
2
|
/**
|
|
3
3
|
* Resolves the effective filters for a widget renderer.
|
|
4
|
-
* Merge order: context → view → widget (widget wins on field conflict).
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* View filters then widget filters, the widget winning on a shared field, all
|
|
6
|
+
* of it then clamped by the host's context scope. The clamp is what changed:
|
|
7
|
+
* a widget filter used to replace a context filter outright, which let a widget
|
|
8
|
+
* render another module's data. It can now narrow inside the host's scope but
|
|
9
|
+
* not step outside it. See `clampToScope`.
|
|
10
|
+
*
|
|
11
|
+
* All widget renderers must use this hook so the contract is explicit and
|
|
12
|
+
* consistent, regardless of whether the downstream query hook also applies the
|
|
13
|
+
* scope itself.
|
|
9
14
|
*/
|
|
10
15
|
export declare function useMergedWidgetFilters(widgetFilters?: readonly FilterCondition[], viewFilters?: readonly FilterCondition[]): FilterCondition[];
|
|
11
16
|
//# sourceMappingURL=use-merged-widget-filters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-merged-widget-filters.d.ts","sourceRoot":"","sources":["../../src/dashboards/use-merged-widget-filters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-merged-widget-filters.d.ts","sourceRoot":"","sources":["../../src/dashboards/use-merged-widget-filters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,CAAC,EAAE,SAAS,eAAe,EAAE,EAC1C,WAAW,CAAC,EAAE,SAAS,eAAe,EAAE,GACvC,eAAe,EAAE,CAGnB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { FilterCondition } from '../types/domain';
|
|
2
3
|
export interface FilterBarProps {
|
|
3
4
|
readonly filters: FilterCondition[];
|
|
@@ -29,7 +30,13 @@ export interface FilterBarProps {
|
|
|
29
30
|
* @example visibleScopes={['LLM', 'MCP']}
|
|
30
31
|
*/
|
|
31
32
|
readonly visibleScopes?: readonly string[];
|
|
33
|
+
/**
|
|
34
|
+
* Chips rendered right after the "Filters:" label, before the Add button and
|
|
35
|
+
* the editable filters. Used to surface dashboard-definition filters inline
|
|
36
|
+
* with the viewer's own filters.
|
|
37
|
+
*/
|
|
38
|
+
readonly leadingChips?: ReactNode;
|
|
32
39
|
readonly className?: string;
|
|
33
40
|
}
|
|
34
|
-
export declare function FilterBar({ filters, onFiltersChange, editable, scopeFilterField, visibleSignals, visibleScopes, className, }: FilterBarProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function FilterBar({ filters, onFiltersChange, editable, scopeFilterField, visibleSignals, visibleScopes, leadingChips, className, }: FilterBarProps): import("react/jsx-runtime").JSX.Element;
|
|
35
42
|
//# sourceMappingURL=FilterBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../src/filters/FilterBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../src/filters/FilterBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AASvD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IACpC,QAAQ,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAcD,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,eAAe,EACf,QAAe,EACf,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,SAAS,GACV,EAAE,cAAc,2CA8KhB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { FilterCondition } from '../types/domain';
|
|
2
3
|
export interface FilterChipProps {
|
|
3
4
|
readonly condition: FilterCondition;
|
|
@@ -7,6 +8,21 @@ export interface FilterChipProps {
|
|
|
7
8
|
readonly disabled?: boolean;
|
|
8
9
|
/** When true, the chip is highlighted as the currently edited filter. */
|
|
9
10
|
readonly active?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Visual style. The default is a solid tinted pill; `outline` is a bordered
|
|
13
|
+
* pill (e.g. to mark a chip as belonging to a dashboard definition).
|
|
14
|
+
*/
|
|
15
|
+
readonly variant?: 'outline';
|
|
16
|
+
/** Icon rendered before the label. A generic slot, e.g. a padlock. */
|
|
17
|
+
readonly leadingIcon?: ReactNode;
|
|
18
|
+
/** Icon rendered after the value. A generic slot, e.g. a chevron affordance. */
|
|
19
|
+
readonly trailingIcon?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Label rendered when the condition has no value (the "all values" placeholder),
|
|
22
|
+
* e.g. `*` for a dashboard filter slot. Without it, an empty filter shows only
|
|
23
|
+
* its name.
|
|
24
|
+
*/
|
|
25
|
+
readonly emptyLabel?: string;
|
|
10
26
|
readonly className?: string;
|
|
11
27
|
/** Internal data attribute used by FilterBar for ref tracking. */
|
|
12
28
|
readonly 'data-chip-index'?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChip.d.ts","sourceRoot":"","sources":["../../src/filters/FilterChip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterChip.d.ts","sourceRoot":"","sources":["../../src/filters/FilterChip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKvD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,gFAAgF;IAChF,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAWD,eAAO,MAAM,UAAU,wGAyItB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { FilterCondition } from '../types/domain';
|
|
2
3
|
import { FilterProvider } from './filter-provider';
|
|
3
4
|
export interface FilterPopoverFormProps {
|
|
@@ -14,6 +15,25 @@ export interface FilterPopoverFormProps {
|
|
|
14
15
|
readonly providers?: readonly FilterProvider[];
|
|
15
16
|
/** Active API types passed to async value loaders to restrict results to the relevant scope. */
|
|
16
17
|
readonly activeApiTypes?: readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* Allow applying with no value, emitting a `value: []` condition: the "all
|
|
20
|
+
* values" placeholder. Used for optional dashboard-filter defaults.
|
|
21
|
+
*/
|
|
22
|
+
readonly allowEmptyValue?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Extra controls rendered between the value field and the action row (e.g. a
|
|
25
|
+
* dashboard filter's "Allow value change" toggle). Receives the live form state
|
|
26
|
+
* (currently whether the value is empty) so the footer can react to input.
|
|
27
|
+
* Kept generic so the form stays domain-agnostic.
|
|
28
|
+
*/
|
|
29
|
+
readonly footer?: (state: {
|
|
30
|
+
isEmptyValue: boolean;
|
|
31
|
+
}) => ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* When provided, a "Remove" button is shown in the action row. Used by the
|
|
34
|
+
* dashboard filters editor to delete a filter from its own popover.
|
|
35
|
+
*/
|
|
36
|
+
readonly onRemove?: () => void;
|
|
17
37
|
}
|
|
18
|
-
export declare function FilterPopoverForm({ existingCondition, onApply, onCancel, providers: providersProp, activeApiTypes, }: FilterPopoverFormProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function FilterPopoverForm({ existingCondition, onApply, onCancel, providers: providersProp, activeApiTypes, allowEmptyValue, footer, onRemove, }: FilterPopoverFormProps): import("react/jsx-runtime").JSX.Element;
|
|
19
39
|
//# sourceMappingURL=FilterPopoverForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterPopoverForm.d.ts","sourceRoot":"","sources":["../../src/filters/FilterPopoverForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterPopoverForm.d.ts","sourceRoot":"","sources":["../../src/filters/FilterPopoverForm.tsx"],"names":[],"mappings":"AAUA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AAGvE,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,mBAAmB,CAAC;AAW3E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,eAAe,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;IACvD,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAC/C,gGAAgG;IAChG,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAC;IAClE;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,SAAS,EAAE,aAAa,EACxB,cAAc,EACd,eAAuB,EACvB,MAAM,EACN,QAAQ,GACT,EAAE,sBAAsB,2CAyLxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FilterOperator } from '../types/domain';
|
|
2
|
+
import { FilterProvider, FilterValueOption } from './filter-provider';
|
|
3
|
+
export interface FilterValueFieldProps {
|
|
4
|
+
/** Null while no field is chosen yet, which renders a disabled placeholder. */
|
|
5
|
+
readonly provider: FilterProvider | null;
|
|
6
|
+
readonly operator: FilterOperator | null;
|
|
7
|
+
readonly selected: FilterValueOption[];
|
|
8
|
+
readonly onSelectedChange: (next: FilterValueOption[]) => void;
|
|
9
|
+
readonly multiple: boolean;
|
|
10
|
+
readonly freeText: string;
|
|
11
|
+
readonly onFreeTextChange: (next: string) => void;
|
|
12
|
+
readonly activeApiTypes?: readonly string[];
|
|
13
|
+
/** Enter submits when the caller says the form is submittable. */
|
|
14
|
+
readonly onSubmit?: () => void;
|
|
15
|
+
readonly canSubmit?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The value half of a filter form: an option list, a paginated loader or a
|
|
19
|
+
* free-text input, chosen from what the provider offers.
|
|
20
|
+
*
|
|
21
|
+
* Shared so the two filter forms cannot drift. The author's form asks three
|
|
22
|
+
* questions (field, operator, value) and the reader's asks one, but the one
|
|
23
|
+
* they have in common has to behave identically, down to the Enter shortcut.
|
|
24
|
+
*/
|
|
25
|
+
export declare function FilterValueField({ provider, operator, selected, onSelectedChange, multiple, freeText, onFreeTextChange, activeApiTypes, onSubmit, canSubmit, }: FilterValueFieldProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
//# sourceMappingURL=FilterValueField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterValueField.d.ts","sourceRoot":"","sources":["../../src/filters/FilterValueField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3E,MAAM,WAAW,qBAAqB;IACpC,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,SAAiB,GAClB,EAAE,qBAAqB,kDA2FvB"}
|
package/dist/filters/index.d.ts
CHANGED
|
@@ -27,4 +27,5 @@ export type { ObservabilitySignal, PartitionedFilters, SignalPartitionResult, }
|
|
|
27
27
|
export { buildChipLabel, buildChipLabelParts, buildChipTooltip } from './utils/filter-display';
|
|
28
28
|
export type { ChipLabelParts } from './utils/filter-display';
|
|
29
29
|
export { isMultiSelectForFilter, normalizeMembershipOperatorForValues, operatorLabel, operatorNeedsValue, } from './utils/filter-operators';
|
|
30
|
+
export { clampToScope } from './scope-ceiling';
|
|
30
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACxH,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC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|
+
import { FilterProvider } from './filter-provider';
|
|
3
|
+
/**
|
|
4
|
+
* The name to show for a condition's field.
|
|
5
|
+
*
|
|
6
|
+
* Three sources, in order: the condition's own `label` when someone chose one,
|
|
7
|
+
* then the catalog, then the raw field name. Only the last is a fallback in the
|
|
8
|
+
* apologetic sense; it means the catalog does not advertise the field, which
|
|
9
|
+
* already leaves the chip unusable for other reasons.
|
|
10
|
+
*
|
|
11
|
+
* An empty string counts as no label. It is reachable from a hand-written
|
|
12
|
+
* definition and renders as a chip with no name at all, which is worse than the
|
|
13
|
+
* field name.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveFilterLabel(condition: Pick<FilterCondition, 'field' | 'label'>, providers: readonly FilterProvider[]): string;
|
|
16
|
+
/**
|
|
17
|
+
* Fills in the display name on a list of conditions, so everything downstream
|
|
18
|
+
* can keep reading `condition.label` without knowing where it came from.
|
|
19
|
+
*
|
|
20
|
+
* Applied by the containers that render chips rather than by the chip itself:
|
|
21
|
+
* `FilterChip` is exported for host use and may be mounted outside a
|
|
22
|
+
* `FilterProvidersProvider`, where reading the catalog would throw.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useLabelledConditions(conditions: readonly FilterCondition[]): FilterCondition[];
|
|
25
|
+
//# sourceMappingURL=resolve-filter-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-filter-label.d.ts","sourceRoot":"","sources":["../../src/filters/resolve-filter-label.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,OAAO,CAAC,EACnD,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,MAAM,CAGR;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,GAAG,eAAe,EAAE,CAW/F"}
|