@pythia-software/query-table-ui 0.9.2 → 0.9.4
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/index.d.ts +53 -54
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, SetStateAction, ButtonHTMLAttributes, CSSProperties, PointerEvent, Ref, MutableRefObject } from 'react';
|
|
3
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';
|
|
4
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
4
|
import { ItemDetailsApi, SelectionApi, ColumnDragApi, QueryTableApi, QueryFilterApi, AggregationsApi, SavedQueriesApi, RequestActivityApi, PropertyViewApi, GroupingApi } from '@pythia-software/query-table-react';
|
|
6
5
|
import { Placement } from '@floating-ui/react';
|
|
7
6
|
|
|
@@ -41,41 +40,41 @@ declare function createGroupLinkRenderer(options?: GroupLinkOptions): CellRender
|
|
|
41
40
|
declare function resolveRenderer<Row>(field: FieldDef<Row>, registry: RenderRegistry<Row>, columnDisplay?: CellDisplay): CellRenderer<Row>;
|
|
42
41
|
|
|
43
42
|
declare const artwork: {
|
|
44
|
-
externalLink:
|
|
45
|
-
itemHover:
|
|
46
|
-
itemModal:
|
|
47
|
-
itemExpand:
|
|
48
|
-
panelList:
|
|
49
|
-
panelDefinition:
|
|
50
|
-
panelReference:
|
|
51
|
-
panelPreview:
|
|
52
|
-
dashboard:
|
|
53
|
-
resize:
|
|
54
|
-
alert:
|
|
55
|
-
add:
|
|
56
|
-
close:
|
|
57
|
-
check:
|
|
58
|
-
chevronDown:
|
|
59
|
-
chevronRight:
|
|
60
|
-
arrowUp:
|
|
61
|
-
arrowDown:
|
|
62
|
-
arrowLeft:
|
|
63
|
-
arrowRight:
|
|
64
|
-
skipForward:
|
|
65
|
-
pointer:
|
|
66
|
-
eye:
|
|
67
|
-
grip:
|
|
68
|
-
pencil:
|
|
69
|
-
star:
|
|
70
|
-
undo:
|
|
71
|
-
redo:
|
|
72
|
-
copy:
|
|
73
|
-
share:
|
|
74
|
-
refresh:
|
|
75
|
-
stopwatch:
|
|
76
|
-
clock:
|
|
77
|
-
reset:
|
|
78
|
-
bookmark:
|
|
43
|
+
externalLink: react.JSX.Element;
|
|
44
|
+
itemHover: react.JSX.Element;
|
|
45
|
+
itemModal: react.JSX.Element;
|
|
46
|
+
itemExpand: react.JSX.Element;
|
|
47
|
+
panelList: react.JSX.Element;
|
|
48
|
+
panelDefinition: react.JSX.Element;
|
|
49
|
+
panelReference: react.JSX.Element;
|
|
50
|
+
panelPreview: react.JSX.Element;
|
|
51
|
+
dashboard: react.JSX.Element;
|
|
52
|
+
resize: react.JSX.Element;
|
|
53
|
+
alert: react.JSX.Element;
|
|
54
|
+
add: react.JSX.Element;
|
|
55
|
+
close: react.JSX.Element;
|
|
56
|
+
check: react.JSX.Element;
|
|
57
|
+
chevronDown: react.JSX.Element;
|
|
58
|
+
chevronRight: react.JSX.Element;
|
|
59
|
+
arrowUp: react.JSX.Element;
|
|
60
|
+
arrowDown: react.JSX.Element;
|
|
61
|
+
arrowLeft: react.JSX.Element;
|
|
62
|
+
arrowRight: react.JSX.Element;
|
|
63
|
+
skipForward: react.JSX.Element;
|
|
64
|
+
pointer: react.JSX.Element;
|
|
65
|
+
eye: react.JSX.Element;
|
|
66
|
+
grip: react.JSX.Element;
|
|
67
|
+
pencil: react.JSX.Element;
|
|
68
|
+
star: react.JSX.Element;
|
|
69
|
+
undo: react.JSX.Element;
|
|
70
|
+
redo: react.JSX.Element;
|
|
71
|
+
copy: react.JSX.Element;
|
|
72
|
+
share: react.JSX.Element;
|
|
73
|
+
refresh: react.JSX.Element;
|
|
74
|
+
stopwatch: react.JSX.Element;
|
|
75
|
+
clock: react.JSX.Element;
|
|
76
|
+
reset: react.JSX.Element;
|
|
77
|
+
bookmark: react.JSX.Element;
|
|
79
78
|
};
|
|
80
79
|
type IconName = keyof typeof artwork;
|
|
81
80
|
interface IconProps {
|
|
@@ -84,7 +83,7 @@ interface IconProps {
|
|
|
84
83
|
className?: string;
|
|
85
84
|
filled?: boolean;
|
|
86
85
|
}
|
|
87
|
-
declare function Icon({ name, size, className, filled }: IconProps):
|
|
86
|
+
declare function Icon({ name, size, className, filled }: IconProps): react.JSX.Element;
|
|
88
87
|
|
|
89
88
|
interface JsonCellProps {
|
|
90
89
|
value: unknown;
|
|
@@ -300,7 +299,7 @@ declare function QueryFilterRow<Row>({ api, fields, label, }: {
|
|
|
300
299
|
api: QueryFilterApi<Row>;
|
|
301
300
|
fields: FieldDef<Row>[];
|
|
302
301
|
label?: "where" | "having";
|
|
303
|
-
}):
|
|
302
|
+
}): react.JSX.Element;
|
|
304
303
|
|
|
305
304
|
interface MetricsPanelProps<Row> {
|
|
306
305
|
/** Enables quick editing using the transactional metrics editor. */
|
|
@@ -466,7 +465,7 @@ interface SelectColumnEditorProps<Row> {
|
|
|
466
465
|
/** Context for the result fields being selected, e.g. a grouped-row schema. */
|
|
467
466
|
notice?: ReactNode;
|
|
468
467
|
}
|
|
469
|
-
declare function SelectColumnEditor<Row>({ api, onClose, initialField, notice: contextNotice, }: SelectColumnEditorProps<Row>):
|
|
468
|
+
declare function SelectColumnEditor<Row>({ api, onClose, initialField, notice: contextNotice, }: SelectColumnEditorProps<Row>): react.JSX.Element;
|
|
470
469
|
|
|
471
470
|
/** Consumer-owned presentation; canonical values remain in queries and URLs. */
|
|
472
471
|
interface FilterValuePresentation {
|
|
@@ -478,7 +477,7 @@ declare function PresentedFilterValue({ field, value, label }: {
|
|
|
478
477
|
field: string;
|
|
479
478
|
value: string;
|
|
480
479
|
label?: string;
|
|
481
|
-
}):
|
|
480
|
+
}): react.JSX.Element;
|
|
482
481
|
|
|
483
482
|
interface MetricsEditorProps<Row> {
|
|
484
483
|
api: QueryTableApi<Row>;
|
|
@@ -511,7 +510,7 @@ interface RequestActivityProps {
|
|
|
511
510
|
children?: ReactNode;
|
|
512
511
|
id?: string;
|
|
513
512
|
}
|
|
514
|
-
declare function RequestActivity({ activity, children, id, }: RequestActivityProps):
|
|
513
|
+
declare function RequestActivity({ activity, children, id, }: RequestActivityProps): react.JSX.Element;
|
|
515
514
|
|
|
516
515
|
interface ObjectPropertiesProps<Row> {
|
|
517
516
|
schema: FieldSchema<Row>;
|
|
@@ -596,19 +595,19 @@ interface PopoverProps extends Omit<FloatingOverlayOptions, "nodeId"> {
|
|
|
596
595
|
initialFocus?: string;
|
|
597
596
|
}
|
|
598
597
|
/** A form or searchable picker sharing menus' floating and mobile surface. */
|
|
599
|
-
declare function Popover({ label, children, className, initialFocus, ...options }: PopoverProps):
|
|
598
|
+
declare function Popover({ label, children, className, initialFocus, ...options }: PopoverProps): react.JSX.Element;
|
|
600
599
|
|
|
601
600
|
/** Keeps a button and its chooser together without inserting an input into the query. */
|
|
602
601
|
declare function PickerAnchor({ children }: {
|
|
603
602
|
children: ReactNode;
|
|
604
|
-
}):
|
|
603
|
+
}): react.JSX.Element;
|
|
605
604
|
declare function PickerSurface({ title, children, onClose, mobileChrome, }: {
|
|
606
605
|
title: string;
|
|
607
606
|
children: ReactNode;
|
|
608
607
|
onClose: () => void;
|
|
609
608
|
/** Editors with their own Apply/Cancel header can keep that chrome on mobile. */
|
|
610
609
|
mobileChrome?: boolean;
|
|
611
|
-
}):
|
|
610
|
+
}): react.JSX.Element;
|
|
612
611
|
|
|
613
612
|
/** Shared chrome for query-local metric and column workbenches. */
|
|
614
613
|
declare function EditorContext({ shown, total, filters, noun, locale, children, }: {
|
|
@@ -618,18 +617,18 @@ declare function EditorContext({ shown, total, filters, noun, locale, children,
|
|
|
618
617
|
noun?: string;
|
|
619
618
|
locale?: string | undefined;
|
|
620
619
|
children?: ReactNode;
|
|
621
|
-
}):
|
|
620
|
+
}): react.JSX.Element;
|
|
622
621
|
declare function EditorPaneTitle({ children, actions, }: {
|
|
623
622
|
children: ReactNode;
|
|
624
623
|
actions?: ReactNode;
|
|
625
|
-
}):
|
|
624
|
+
}): react.JSX.Element;
|
|
626
625
|
declare function EditorChoice({ selected, title, detail, code, onClick, }: {
|
|
627
626
|
selected: boolean;
|
|
628
627
|
title: string;
|
|
629
628
|
detail?: string;
|
|
630
629
|
code?: string;
|
|
631
630
|
onClick: () => void;
|
|
632
|
-
}):
|
|
631
|
+
}): react.JSX.Element;
|
|
633
632
|
|
|
634
633
|
declare function useMobileLayout(): boolean;
|
|
635
634
|
declare function ModalSurface({ title, onClose, children, className, chrome, returnFocus, backdropClassName, initialFocus, }: {
|
|
@@ -694,7 +693,7 @@ declare function EditorModal({ title, titleId, closeLabel, onClose, workbench, h
|
|
|
694
693
|
panelControls?: ReactNode;
|
|
695
694
|
children: ReactNode;
|
|
696
695
|
className?: string;
|
|
697
|
-
}):
|
|
696
|
+
}): react.JSX.Element;
|
|
698
697
|
declare function EditorPanelToggle({ workbench, index, label, icon, paneId, collapse, }: {
|
|
699
698
|
workbench: EditorWorkbench;
|
|
700
699
|
index: number;
|
|
@@ -702,13 +701,13 @@ declare function EditorPanelToggle({ workbench, index, label, icon, paneId, coll
|
|
|
702
701
|
icon: IconName;
|
|
703
702
|
paneId: string;
|
|
704
703
|
collapse?: boolean;
|
|
705
|
-
}):
|
|
704
|
+
}): react.JSX.Element;
|
|
706
705
|
declare function EditorPanelSeparator({ workbench, index, label, controls, }: {
|
|
707
706
|
workbench: EditorWorkbench;
|
|
708
707
|
index: number;
|
|
709
708
|
label: string;
|
|
710
709
|
controls: string;
|
|
711
|
-
}):
|
|
710
|
+
}): react.JSX.Element | null;
|
|
712
711
|
|
|
713
712
|
interface FormulaEditorActions {
|
|
714
713
|
insertFunction: (name: string) => void;
|
|
@@ -729,13 +728,13 @@ interface FormulaEditorProps {
|
|
|
729
728
|
onFocus?: () => void;
|
|
730
729
|
onReady?: (input: HTMLTextAreaElement) => void;
|
|
731
730
|
}
|
|
732
|
-
declare function FormulaEditor({ value, actionsRef, functions, onChange, fields, compile, suggestions, showLibrary, ariaLabel, inputRef, onFocus, onReady, rows, }: FormulaEditorProps):
|
|
731
|
+
declare function FormulaEditor({ value, actionsRef, functions, onChange, fields, compile, suggestions, showLibrary, ariaLabel, inputRef, onFocus, onReady, rows, }: FormulaEditorProps): react.JSX.Element;
|
|
733
732
|
|
|
734
733
|
declare function FormulaFunctionBrowser({ onInsert, functions, variant, }: {
|
|
735
734
|
onInsert?: (name: string) => void;
|
|
736
735
|
functions?: readonly FormulaFunction[];
|
|
737
736
|
variant?: "card" | "panel";
|
|
738
|
-
}):
|
|
737
|
+
}): react.JSX.Element;
|
|
739
738
|
|
|
740
739
|
/** Presentation metadata supplied by the host, independent of field type. */
|
|
741
740
|
interface ColumnRole {
|
|
@@ -747,7 +746,7 @@ interface ColumnRole {
|
|
|
747
746
|
declare function ColumnRoleBadge({ role, className, }: {
|
|
748
747
|
role: ColumnRole | undefined;
|
|
749
748
|
className?: string;
|
|
750
|
-
}):
|
|
749
|
+
}): react.JSX.Element | null;
|
|
751
750
|
|
|
752
751
|
type Controller = GroupingApi<GroupedRow>;
|
|
753
752
|
declare function GroupedColumnsEditor({ controller, onClose, renderers, initialFormulaField, }: {
|
|
@@ -755,6 +754,6 @@ declare function GroupedColumnsEditor({ controller, onClose, renderers, initialF
|
|
|
755
754
|
controller: Controller;
|
|
756
755
|
onClose: () => void;
|
|
757
756
|
renderers?: RenderRegistry<GroupedRow>;
|
|
758
|
-
}):
|
|
757
|
+
}): react.JSX.Element;
|
|
759
758
|
|
|
760
759
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythia-software/query-table-ui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Schema-driven data table — opinionated, themeable React components.",
|
|
5
5
|
"keywords": ["data-table", "query-builder", "react", "components", "typescript"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@floating-ui/react": "^0.27.20",
|
|
38
|
-
"@pythia-software/query-table-core": "0.9.
|
|
39
|
-
"@pythia-software/query-table-react": "0.9.
|
|
40
|
-
"@tanstack/react-virtual": "3.14.
|
|
38
|
+
"@pythia-software/query-table-core": "0.9.4",
|
|
39
|
+
"@pythia-software/query-table-react": "0.9.4",
|
|
40
|
+
"@tanstack/react-virtual": "3.14.21"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=18 <20",
|