@pythia-software/query-table-ui 0.9.7 → 0.9.9
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 +4 -1
- package/dist/index.d.ts +35 -15
- package/dist/index.js +272 -70
- package/dist/index.js.map +1 -1
- package/dist/theme.css +4 -0
- package/dist/theme.css.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -574,7 +574,7 @@ and original/decoded copying; objects, JSON strings and escaped strings share
|
|
|
574
574
|
the same inspector. Custom `render` functions and registered keys take precedence.
|
|
575
575
|
Detail properties inherit these displays and embed initially collapsed JSON
|
|
576
576
|
trees in popovers, modals, and expanded rows. A button beside the property label
|
|
577
|
-
opens the full viewer with
|
|
577
|
+
opens the full viewer with Filter/Find search, match navigation, and copy
|
|
578
578
|
controls. JSON property options can be edited, saved, and shared through the
|
|
579
579
|
existing property-view controls.
|
|
580
580
|
See the [cell display guide](../../docs/cell-displays.md) for typed configuration,
|
|
@@ -653,3 +653,6 @@ Hiding a pie remainder retains the full denominator and leaves its angular
|
|
|
653
653
|
share empty; it does not rescale the selected groups to 100%. A real group named
|
|
654
654
|
Other remains visible. Both settings survive query links and saved views.
|
|
655
655
|
Use `display.legendPosition: "none"` to hide the chart key.
|
|
656
|
+
|
|
657
|
+
JSON inspection choices now travel with item query links and snapshots. See
|
|
658
|
+
[portable inspection state and semantic attention](../../docs/json-inspection-state.md).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, SetStateAction, CSSProperties, ButtonHTMLAttributes, PointerEvent, Ref, MutableRefObject } from 'react';
|
|
3
|
-
import { FieldDef, QueryState, LinkTargets, CellDisplay, JsonCellDisplay, RowId, AggregationClause, AggregationBucket, AggregationResultEntry, MetricValue, SavedQuery, FieldStats, WhereClause, MetricValueFormat, FieldSchema, PropertyViewState, RelationshipAdapter, ObjectReference, PropertyFormat, PropertyViewStorage, ItemPropertyMode, FormulaFunction, GroupedRow } from '@pythia-software/query-table-core';
|
|
3
|
+
import { FieldDef, QueryState, LinkTargets, CellDisplay, JsonCellDisplay, JsonInspectionState, JsonInspectionScope, AttentionRegistry, RowId, AggregationClause, AggregationBucket, AggregationResultEntry, MetricValue, SavedQuery, FieldStats, WhereClause, MetricValueFormat, FieldSchema, ScopedJsonInspectionState, PropertyViewState, RelationshipAdapter, ObjectReference, PropertyFormat, PropertyViewStorage, ItemPropertyMode, FormulaFunction, GroupedRow } from '@pythia-software/query-table-core';
|
|
4
4
|
import { ItemDetailsApi, SelectionApi, ColumnDragApi, QueryTableApi, QueryFilterApi, AggregationsApi, SavedQueriesApi, RequestActivityApi, PropertyViewApi, GroupingApi } from '@pythia-software/query-table-react';
|
|
5
5
|
import { Placement } from '@floating-ui/react';
|
|
6
6
|
|
|
@@ -85,18 +85,6 @@ interface IconProps {
|
|
|
85
85
|
}
|
|
86
86
|
declare function Icon({ name, size, className, filled }: IconProps): react.JSX.Element;
|
|
87
87
|
|
|
88
|
-
interface JsonCellProps {
|
|
89
|
-
value: unknown;
|
|
90
|
-
label?: string;
|
|
91
|
-
display?: JsonCellDisplay | undefined;
|
|
92
|
-
}
|
|
93
|
-
/** Compact cell plus a shared searchable inspector. Mountable outside DataTable. */
|
|
94
|
-
declare function JsonCell({ value, label, display }: JsonCellProps): ReactNode;
|
|
95
|
-
/** The same searchable JSON value embedded in item details, pages or host cards. */
|
|
96
|
-
declare function JsonValueView({ value, label, display, compact }: JsonCellProps & {
|
|
97
|
-
compact?: boolean;
|
|
98
|
-
}): ReactNode;
|
|
99
|
-
|
|
100
88
|
interface JsonEntry {
|
|
101
89
|
/** Unambiguous JSONPath; bracket notation preserves dots/quotes in keys. */
|
|
102
90
|
path: string;
|
|
@@ -121,6 +109,30 @@ declare function inspectJsonValue(input: unknown, display?: JsonCellDisplay, inc
|
|
|
121
109
|
/** Search keys, full paths and typed values; case insensitive, literal matching. */
|
|
122
110
|
declare function searchJsonEntries(entries: JsonEntry[], search: string): JsonEntry[];
|
|
123
111
|
|
|
112
|
+
interface JsonInspectionResolution {
|
|
113
|
+
status: "ready" | "unavailable";
|
|
114
|
+
missingPaths: string[];
|
|
115
|
+
selectedMatchUnavailable: boolean;
|
|
116
|
+
}
|
|
117
|
+
interface JsonCellProps {
|
|
118
|
+
value: unknown;
|
|
119
|
+
label?: string;
|
|
120
|
+
display?: JsonCellDisplay | undefined;
|
|
121
|
+
/** Controlled portable state. Omit to keep local state. */
|
|
122
|
+
inspectionState?: JsonInspectionState | undefined;
|
|
123
|
+
onInspectionStateChange?: ((state: JsonInspectionState) => void) | undefined;
|
|
124
|
+
inspectionScope?: JsonInspectionScope | undefined;
|
|
125
|
+
attention?: AttentionRegistry | undefined;
|
|
126
|
+
onInspectionResolution?: ((result: JsonInspectionResolution) => void) | undefined;
|
|
127
|
+
}
|
|
128
|
+
/** Compact cell plus a shared searchable inspector. Mountable outside DataTable. */
|
|
129
|
+
declare function JsonCell(props: JsonCellProps): ReactNode;
|
|
130
|
+
declare function createJsonInspectionState(inspection: JsonInspection, display?: JsonCellDisplay, compact?: boolean): JsonInspectionState;
|
|
131
|
+
/** The same searchable JSON value embedded in item details, pages or host cards. */
|
|
132
|
+
declare function JsonValueView(props: JsonCellProps & {
|
|
133
|
+
compact?: boolean;
|
|
134
|
+
}): ReactNode;
|
|
135
|
+
|
|
124
136
|
interface TableClassNames {
|
|
125
137
|
wrap?: string;
|
|
126
138
|
table?: string;
|
|
@@ -525,6 +537,12 @@ declare function RequestActivity({ activity, children, id, }: RequestActivityPro
|
|
|
525
537
|
|
|
526
538
|
interface ObjectPropertiesProps<Row> {
|
|
527
539
|
schema: FieldSchema<Row>;
|
|
540
|
+
recordId?: RowId;
|
|
541
|
+
jsonInspections?: readonly ScopedJsonInspectionState[];
|
|
542
|
+
onJsonInspectionChange?: (inspection: ScopedJsonInspectionState) => void;
|
|
543
|
+
attention?: AttentionRegistry | undefined;
|
|
544
|
+
/** Preserve focus for inspectors restored by semantic attention. */
|
|
545
|
+
preserveFocus?: boolean | undefined;
|
|
528
546
|
row: Row;
|
|
529
547
|
view: PropertyViewState;
|
|
530
548
|
onViewChange?: (view: PropertyViewState) => void;
|
|
@@ -645,7 +663,7 @@ declare function EditorChoice({ selected, title, detail, code, onClick, }: {
|
|
|
645
663
|
}): react.JSX.Element;
|
|
646
664
|
|
|
647
665
|
declare function useMobileLayout(): boolean;
|
|
648
|
-
declare function ModalSurface({ title, onClose, children, className, chrome, returnFocus, backdropClassName, initialFocus, }: {
|
|
666
|
+
declare function ModalSurface({ title, onClose, children, className, chrome, returnFocus, backdropClassName, initialFocus, preserveFocus, }: {
|
|
649
667
|
title: string;
|
|
650
668
|
onClose: () => void;
|
|
651
669
|
children?: ReactNode;
|
|
@@ -654,6 +672,8 @@ declare function ModalSurface({ title, onClose, children, className, chrome, ret
|
|
|
654
672
|
returnFocus?: HTMLElement | null | undefined;
|
|
655
673
|
backdropClassName?: string | undefined;
|
|
656
674
|
initialFocus?: string | undefined;
|
|
675
|
+
/** Semantic attention may reveal a dialog while preserving the caller's focus. */
|
|
676
|
+
preserveFocus?: boolean | undefined;
|
|
657
677
|
}): ReactNode;
|
|
658
678
|
|
|
659
679
|
interface ReorderItem {
|
|
@@ -770,4 +790,4 @@ declare function GroupedColumnsEditor({ controller, onClose, renderers, initialF
|
|
|
770
790
|
renderers?: RenderRegistry<GroupedRow>;
|
|
771
791
|
}): react.JSX.Element;
|
|
772
792
|
|
|
773
|
-
export { type CellContext, CellMenu, type CellMenuProps, type CellRenderer, type ColumnRole, ColumnRoleBadge, DataTable, type DataTableProps, EditorChoice, EditorContext, EditorModal, type EditorPaneSize, EditorPaneTitle, EditorPanelSeparator, EditorPanelToggle, type EditorWorkbench, FieldPicker, type FieldPickerProps, type FilterValuePresentation, FilterValueProvider, FormulaEditor, type FormulaEditorActions, type FormulaEditorProps, FormulaFunctionBrowser, type GroupLinkOptions, GroupedColumnsEditor, Icon, type IconName, type IconProps, ItemDetailShare, JsonCell, type JsonCellProps, type JsonEntry, type JsonInspection, JsonValueView, Menu, type MenuAnchor, MenuButton, type MenuButtonProps, type MenuClassNames, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemProps, type MenuProps, MenuSeparator, MenuSubmenu, type MenuSubmenuProps, MetricCard, type MetricCardProps, type MetricClassNames, type MetricTheme, MetricsEditor, type MetricsEditorProps, MetricsPanel, type MetricsPanelProps, ModalSurface, ObjectInspector, type ObjectInspectorProps, ObjectProperties, type ObjectPropertiesProps, PickerAnchor, PickerSurface, Popover, type PopoverProps, PresentedFilterValue, PropertyViewControls, PropertyViewEditor, QueryBuilder, type QueryBuilderClassNames, type QueryBuilderProps, QueryFilterRow, type RenderRegistry, ReorderList, RequestActivity, type RequestActivityProps, SavedQueriesModal, type SavedQueriesModalProps, SelectColumnEditor, type SelectColumnEditorProps, type SelectPresentation, SelectionToolbar, type SelectionToolbarProps, type TableClassNames, createGroupLinkRenderer, createMetricColorResolver, defaultRenderers, formatMetricOutput, formatPropertyValue, inspectJsonValue, itemDetailHref, metricTimestamp, resolveRenderer, safeLinkHref, searchJsonEntries, useEditorWorkbench, useMobileLayout, validateMetricFormat };
|
|
793
|
+
export { type CellContext, CellMenu, type CellMenuProps, type CellRenderer, type ColumnRole, ColumnRoleBadge, DataTable, type DataTableProps, EditorChoice, EditorContext, EditorModal, type EditorPaneSize, EditorPaneTitle, EditorPanelSeparator, EditorPanelToggle, type EditorWorkbench, FieldPicker, type FieldPickerProps, type FilterValuePresentation, FilterValueProvider, FormulaEditor, type FormulaEditorActions, type FormulaEditorProps, FormulaFunctionBrowser, type GroupLinkOptions, GroupedColumnsEditor, Icon, type IconName, type IconProps, ItemDetailShare, JsonCell, type JsonCellProps, type JsonEntry, type JsonInspection, type JsonInspectionResolution, JsonValueView, Menu, type MenuAnchor, MenuButton, type MenuButtonProps, type MenuClassNames, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemProps, type MenuProps, MenuSeparator, MenuSubmenu, type MenuSubmenuProps, MetricCard, type MetricCardProps, type MetricClassNames, type MetricTheme, MetricsEditor, type MetricsEditorProps, MetricsPanel, type MetricsPanelProps, ModalSurface, ObjectInspector, type ObjectInspectorProps, ObjectProperties, type ObjectPropertiesProps, PickerAnchor, PickerSurface, Popover, type PopoverProps, PresentedFilterValue, PropertyViewControls, PropertyViewEditor, QueryBuilder, type QueryBuilderClassNames, type QueryBuilderProps, QueryFilterRow, type RenderRegistry, ReorderList, RequestActivity, type RequestActivityProps, SavedQueriesModal, type SavedQueriesModalProps, SelectColumnEditor, type SelectColumnEditorProps, type SelectPresentation, SelectionToolbar, type SelectionToolbarProps, type TableClassNames, createGroupLinkRenderer, createJsonInspectionState, createMetricColorResolver, defaultRenderers, formatMetricOutput, formatPropertyValue, inspectJsonValue, itemDetailHref, metricTimestamp, resolveRenderer, safeLinkHref, searchJsonEntries, useEditorWorkbench, useMobileLayout, validateMetricFormat };
|