@gravitee/gamma-lib-observability 4.0.2 → 4.0.3-feat-obs-125-numeric-range-chip.b44db49
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/dashboard-filters.d.ts +3 -2
- package/dist/dashboards/dashboard-filters.d.ts.map +1 -1
- package/dist/dashboards/editor/DashboardEditorPage.d.ts.map +1 -1
- package/dist/dashboards/editor/WidgetConfigForm.d.ts.map +1 -1
- package/dist/dashboards/editor/dashboard-json.d.ts.map +1 -1
- package/dist/dashboards/editor/locked-filter-conflicts.d.ts +10 -5
- package/dist/dashboards/editor/locked-filter-conflicts.d.ts.map +1 -1
- package/dist/dashboards/merge-filters.d.ts +8 -3
- package/dist/dashboards/merge-filters.d.ts.map +1 -1
- package/dist/filters/FilterBar.d.ts.map +1 -1
- package/dist/filters/FilterChip.d.ts +5 -0
- package/dist/filters/FilterChip.d.ts.map +1 -1
- package/dist/filters/FilterPopoverForm.d.ts +18 -1
- package/dist/filters/FilterPopoverForm.d.ts.map +1 -1
- package/dist/filters/scope-ceiling.d.ts.map +1 -1
- package/dist/filters/utils/filter-display.d.ts +3 -0
- package/dist/filters/utils/filter-display.d.ts.map +1 -1
- package/dist/filters/utils/merge-conditions.d.ts +22 -2
- package/dist/filters/utils/merge-conditions.d.ts.map +1 -1
- package/dist/filters/utils/range-bounds.d.ts +15 -0
- package/dist/filters/utils/range-bounds.d.ts.map +1 -0
- package/dist/filters/utils/range-chips.d.ts +24 -0
- package/dist/filters/utils/range-chips.d.ts.map +1 -0
- package/dist/index.js +3718 -3477
- package/package.json +1 -1
|
@@ -69,8 +69,9 @@ export interface ResolvedDashboardFilters {
|
|
|
69
69
|
* 2. a URL filter on a locked field is discarded here. It lands in neither
|
|
70
70
|
* `userRevalues` nor `userOwnFilters`, so a hand-written query string is
|
|
71
71
|
* read and dropped rather than trusted;
|
|
72
|
-
* 3. the merge
|
|
73
|
-
*
|
|
72
|
+
* 3. the merge takes the locked definitions last, and a later source replaces
|
|
73
|
+
* every condition on a field, so even a condition (or a range) that reached
|
|
74
|
+
* this point some other way loses.
|
|
74
75
|
*
|
|
75
76
|
* A reader can only ever change the *value* of a re-valuable field. The flag
|
|
76
77
|
* itself is never encoded into the URL, so it cannot be granted by tampering.
|
|
@@ -1 +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
|
|
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;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,SAAS,eAAe,EAAE,EAC5C,UAAU,EAAE,SAAS,eAAe,EAAE,GACrC,wBAAwB,CAiE1B"}
|
|
@@ -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":"AAyEA;;;;;;;;;;;;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetConfigForm.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetConfigForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WidgetConfigForm.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetConfigForm.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAKV,MAAM,EAEP,MAAM,oBAAoB,CAAC;AAiB5B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAYD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAsE3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-json.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/dashboard-json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard-json.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/dashboard-json.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAoB,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAY1F,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAA;CAAE,GAC/D;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAO/D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAoC1E"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { FilterCondition, Widget } from '../../types/domain';
|
|
1
|
+
import { FilterCondition, FilterOperator, Widget } from '../../types/domain';
|
|
2
|
+
/** One side of a conflict, enough to describe it: `≤ 1000`, or `MCP`. */
|
|
3
|
+
export interface ConflictingCondition {
|
|
4
|
+
readonly operator: FilterOperator;
|
|
5
|
+
readonly value: string[];
|
|
6
|
+
readonly valueLabels?: string[];
|
|
7
|
+
}
|
|
2
8
|
export interface LockedFilterConflict {
|
|
3
9
|
readonly widgetId: string;
|
|
4
10
|
/** Falls back to the id: a widget can be saved before it is named. */
|
|
5
11
|
readonly widgetTitle: string;
|
|
6
12
|
readonly field: string;
|
|
7
13
|
readonly label: string;
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
readonly widgetValueLabels?: string[];
|
|
14
|
+
readonly dashboard: ConflictingCondition;
|
|
15
|
+
/** Every condition the widget sets on the field: two for a range. */
|
|
16
|
+
readonly widget: readonly ConflictingCondition[];
|
|
12
17
|
}
|
|
13
18
|
/**
|
|
14
19
|
* Widgets whose own filters override a locked dashboard filter.
|
|
@@ -1 +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;
|
|
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,cAAc,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGlF,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED,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,SAAS,EAAE,oBAAoB,CAAC;IACzC,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAClD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,SAAS,eAAe,EAAE,EAC5C,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,oBAAoB,EAAE,CA2BxB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FilterCondition } from '../types/domain';
|
|
2
|
+
/** Whether the condition is one bound of a numeric range (`gte` or `lte`). */
|
|
3
|
+
export declare function isRangeBound(filter: FilterCondition): boolean;
|
|
2
4
|
/**
|
|
3
5
|
* Union-merges multiple filter sources. Later sources take precedence when the
|
|
4
6
|
* same field is targeted, and the result keeps the first insertion position of
|
|
@@ -9,9 +11,12 @@ import { FilterCondition } from '../types/domain';
|
|
|
9
11
|
* `clampToScope`, which is what actually decides precedence and is the only
|
|
10
12
|
* place that describes the full chain.
|
|
11
13
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* `latency lte 500`
|
|
14
|
+
* Within one source, a field keeps its last condition, with one exception: a
|
|
15
|
+
* field whose conditions are all `gte` / `lte` keeps one of each, so
|
|
16
|
+
* `latency gte 100` and `latency lte 500` stay a range the server ANDs. A
|
|
17
|
+
* repeated bound still replaces the earlier one. Between sources, a later one
|
|
18
|
+
* replaces the whole field, range included, so a widget's range overrides the
|
|
19
|
+
* dashboard's rather than mixing a bound from each.
|
|
15
20
|
*/
|
|
16
21
|
export declare function mergeFilters(...sources: (readonly FilterCondition[] | undefined)[]): FilterCondition[];
|
|
17
22
|
//# 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,
|
|
1
|
+
{"version":3,"file":"merge-filters.d.ts","sourceRoot":"","sources":["../../src/dashboards/merge-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AAKvE,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAE7D;AAED;;;;;;;;;;;;;;;;GAgBG;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":"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;
|
|
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;AAUvD,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;AAsBD,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,eAAe,EACf,QAAe,EACf,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,SAAS,GACV,EAAE,cAAc,2CA4MhB"}
|
|
@@ -2,6 +2,11 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { FilterCondition } from '../types/domain';
|
|
3
3
|
export interface FilterChipProps {
|
|
4
4
|
readonly condition: FilterCondition;
|
|
5
|
+
/**
|
|
6
|
+
* The upper bound when the chip shows a range: `condition` is then the lower
|
|
7
|
+
* bound (`gte`) and this one the `lte`, rendered together as `10 – 40`.
|
|
8
|
+
*/
|
|
9
|
+
readonly upperBound?: FilterCondition;
|
|
5
10
|
readonly onEdit?: () => void;
|
|
6
11
|
readonly onRemove?: () => void;
|
|
7
12
|
readonly editable?: boolean;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAUvD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe,CAAC;IACtC,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,wGA8ItB,CAAC"}
|
|
@@ -34,6 +34,23 @@ export interface FilterPopoverFormProps {
|
|
|
34
34
|
* dashboard filters editor to delete a filter from its own popover.
|
|
35
35
|
*/
|
|
36
36
|
readonly onRemove?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* The other conditions already applied beside this one. A `gte` or `lte`
|
|
39
|
+
* that would cross the opposite bound on the same field is refused, since
|
|
40
|
+
* the pair would match nothing.
|
|
41
|
+
*/
|
|
42
|
+
readonly otherConditions?: readonly FilterCondition[];
|
|
43
|
+
/**
|
|
44
|
+
* Offers a "Between" operator on fields that accept both `≥` and `≤`, and
|
|
45
|
+
* receives what it produces: the `gte` and `lte` bounds, or just one of them
|
|
46
|
+
* for an open range. Without it the form edits one condition, as before.
|
|
47
|
+
*/
|
|
48
|
+
readonly onApplyRange?: (bounds: FilterCondition[]) => void;
|
|
49
|
+
/** The range being edited, when the chip that opened the form shows one. */
|
|
50
|
+
readonly existingRange?: {
|
|
51
|
+
readonly lower: FilterCondition;
|
|
52
|
+
readonly upper: FilterCondition;
|
|
53
|
+
};
|
|
37
54
|
}
|
|
38
|
-
export declare function FilterPopoverForm({ existingCondition, onApply, onCancel, providers: providersProp, activeApiTypes, allowEmptyValue, footer, onRemove, }: FilterPopoverFormProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare function FilterPopoverForm({ existingCondition, onApply, onCancel, providers: providersProp, activeApiTypes, allowEmptyValue, footer, onRemove, otherConditions, onApplyRange, existingRange, }: FilterPopoverFormProps): import("react/jsx-runtime").JSX.Element;
|
|
39
56
|
//# 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":"AAWA,OAAO,EAAwD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AAGvE,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,mBAAmB,CAAC;AAY3E,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;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACtD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IAC5D,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAA;KAAE,CAAC;CAC/F;AAKD,wBAAgB,iBAAiB,CAAC,EAChC,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,SAAS,EAAE,aAAa,EACxB,cAAc,EACd,eAAuB,EACvB,MAAM,EACN,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,aAAa,GACd,EAAE,sBAAsB,2CAyRxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-ceiling.d.ts","sourceRoot":"","sources":["../../src/filters/scope-ceiling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AASvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,SAAS,eAAe,EAAE,EACpC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,SAAS,GAC9C,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"scope-ceiling.d.ts","sourceRoot":"","sources":["../../src/filters/scope-ceiling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AASvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,SAAS,eAAe,EAAE,EACpC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,SAAS,GAC9C,eAAe,EAAE,CAoBnB"}
|
|
@@ -9,4 +9,7 @@ export interface ChipLabelParts {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function buildChipLabelParts(condition: FilterCondition): ChipLabelParts;
|
|
11
11
|
export declare function buildChipTooltip(condition: FilterCondition): string;
|
|
12
|
+
/** A range chip shows its two bounds as one span: `Response time 10 – 40`. */
|
|
13
|
+
export declare function buildRangeChipLabelParts(lower: FilterCondition, upper: FilterCondition): ChipLabelParts;
|
|
14
|
+
export declare function buildRangeChipTooltip(lower: FilterCondition, upper: FilterCondition): string;
|
|
12
15
|
//# sourceMappingURL=filter-display.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-display.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/filter-display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,oBAAoB,CAAC;AAG1E,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM7F;AAyBD,wBAAgB,cAAc,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAKjE;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,cAAc,CAc9E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAQnE"}
|
|
1
|
+
{"version":3,"file":"filter-display.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/filter-display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,oBAAoB,CAAC;AAG1E,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM7F;AAyBD,wBAAgB,cAAc,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAKjE;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,cAAc,CAc9E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAQnE;AAED,8EAA8E;AAC9E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,GAAG,cAAc,CAOvG;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,CAE5F"}
|
|
@@ -16,9 +16,29 @@ export declare function tryMergeConditions(existing: FilterCondition, incoming:
|
|
|
16
16
|
* Resolves the full filter list after adding a new condition.
|
|
17
17
|
*
|
|
18
18
|
* 1. Try membership merge (eq+eq → in, neq+neq → not_in).
|
|
19
|
-
* 2. If merge is not possible,
|
|
20
|
-
*
|
|
19
|
+
* 2. If merge is not possible, the incoming condition replaces the ones it
|
|
20
|
+
* cannot stand beside (see `displaces`): the first takes its place, the
|
|
21
|
+
* others are removed.
|
|
21
22
|
* 3. Otherwise append.
|
|
22
23
|
*/
|
|
23
24
|
export declare function resolveFilterAddition(filters: readonly FilterCondition[], incoming: FilterCondition, provider: FilterProvider | undefined): FilterCondition[];
|
|
25
|
+
/**
|
|
26
|
+
* Resolves the full filter list after the condition at `index` is edited in
|
|
27
|
+
* place. Editing can turn a chip into one its neighbours cannot stand beside,
|
|
28
|
+
* such as an `lte` changed to `gte` next to an existing `gte`, so those
|
|
29
|
+
* neighbours are removed the same way an addition removes them.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveFilterEdit(filters: readonly FilterCondition[], index: number, edited: FilterCondition): FilterCondition[];
|
|
32
|
+
/**
|
|
33
|
+
* Resolves the full filter list after a range is applied from the filter form.
|
|
34
|
+
* A range states the whole constraint on its field, so it replaces every
|
|
35
|
+
* condition on that field, open sides included: a range with no maximum drops
|
|
36
|
+
* an earlier `lte`.
|
|
37
|
+
*
|
|
38
|
+
* `edited` are the indexes of the chip being edited (one condition, or both
|
|
39
|
+
* bounds of a range chip). They are removed even when the field changed, and
|
|
40
|
+
* the range takes their place; without them it takes the place of the field's
|
|
41
|
+
* first condition, or is appended.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveRangeApplication(filters: readonly FilterCondition[], bounds: readonly FilterCondition[], edited?: readonly number[]): FilterCondition[];
|
|
24
44
|
//# sourceMappingURL=merge-conditions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-conditions.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/merge-conditions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"merge-conditions.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/merge-conditions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAczD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,OAAO,CAKtF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,cAAc,GACvB,eAAe,GAAG,IAAI,CAiCxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,cAAc,GAAG,SAAS,GACnC,eAAe,EAAE,CAcnB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,eAAe,GACtB,eAAe,EAAE,CAEnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,MAAM,GAAE,SAAS,MAAM,EAAO,GAC7B,eAAe,EAAE,CAUnB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FilterCondition } from '../../types/domain';
|
|
2
|
+
/**
|
|
3
|
+
* The bound already applied on the same field that `candidate` would cross, if
|
|
4
|
+
* any: a `gte` above an existing `lte`, or an `lte` below an existing `gte`.
|
|
5
|
+
*
|
|
6
|
+
* The two bounds are ANDed, so a crossed range matches nothing. That is correct,
|
|
7
|
+
* but the surfaces disagree about it (the logs table answers an error, a chart
|
|
8
|
+
* an empty result), so the filter form refuses it instead of letting either
|
|
9
|
+
* look like real data.
|
|
10
|
+
*
|
|
11
|
+
* The last opposite bound is the one checked, since it is the one the merge
|
|
12
|
+
* keeps. Values that are not numbers are left alone; the server reports those.
|
|
13
|
+
*/
|
|
14
|
+
export declare function crossedRangeBound(candidate: FilterCondition, others: readonly FilterCondition[]): FilterCondition | undefined;
|
|
15
|
+
//# sourceMappingURL=range-bounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-bounds.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/range-bounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,oBAAoB,CAAC;AAI1E;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,eAAe,EAC1B,MAAM,EAAE,SAAS,eAAe,EAAE,GACjC,eAAe,GAAG,SAAS,CAa7B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FilterCondition } from '../../types/domain';
|
|
2
|
+
/** One chip of the filter bar: a single condition, or the two bounds of a range shown together. */
|
|
3
|
+
export type FilterBarItem = {
|
|
4
|
+
readonly kind: 'single';
|
|
5
|
+
readonly indexes: readonly [number];
|
|
6
|
+
readonly condition: FilterCondition;
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'range';
|
|
9
|
+
readonly indexes: readonly [number, number];
|
|
10
|
+
readonly lower: FilterCondition;
|
|
11
|
+
readonly upper: FilterCondition;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Groups a field holding exactly one `gte` and one `lte`, and nothing else,
|
|
15
|
+
* into one range chip placed where its first bound stands. The conditions are
|
|
16
|
+
* not changed: the range is a way of showing them, and the URL, the saved
|
|
17
|
+
* dashboard and the request still carry the two bounds.
|
|
18
|
+
*
|
|
19
|
+
* A field with any other mix (a single bound, or a bound beside an exact
|
|
20
|
+
* value) keeps one chip per condition, so nothing is hidden inside a chip that
|
|
21
|
+
* does not describe it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function groupRangeChips(filters: readonly FilterCondition[]): FilterBarItem[];
|
|
24
|
+
//# sourceMappingURL=range-chips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-chips.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/range-chips.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,mGAAmG;AACnG,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAA;CAAE,GACrG;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;CACjC,CAAC;AAEN;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,aAAa,EAAE,CAuBpF"}
|