@standardbeagle/edit-db 0.4.685 → 0.4.688

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.
@@ -0,0 +1 @@
1
+ export {};
package/dist/editor.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { GraphQLFetcher } from './common/fetcher';
2
+ import { DefaultSort } from './hooks/useEditorConfig';
2
3
  import { TableAction } from './lib/table-action';
3
4
  /**
4
5
  * Props for the Editor component.
@@ -32,6 +33,20 @@ interface EditorProps {
32
33
  defaultColumns?: Record<string, string[]>;
33
34
  /** Columns to move to the right end of every grid, in this order (e.g. audit stamps). */
34
35
  trailingColumns?: string[];
36
+ /**
37
+ * Sort a grid opens with, keyed by table name; `"*"` applies to every table
38
+ * without its own entry (`{ "*": { column: 'id', desc: true } }` opens every
39
+ * list newest-first). A column the table lacks, or one that cannot be
40
+ * ordered (blob/JSON), falls back to the editor's own default. Only the
41
+ * starting point — the viewer's column-header clicks take over from there.
42
+ */
43
+ defaultSort?: Record<string, DefaultSort>;
44
+ /**
45
+ * Column the header quick-search starts on per table (`{ workshops:
46
+ * 'number' }`) for tables people navigate by a business key rather than
47
+ * the id. Ignored when that column is not searchable (string/numeric).
48
+ */
49
+ defaultSearchColumns?: Record<string, string>;
35
50
  /**
36
51
  * Actions the host adds to every table's kebab menu in the navigation list
37
52
  * (after the built-in Download actions). Each is invoked with the schema
@@ -73,5 +88,5 @@ interface EditorProps {
73
88
  * @param props - Editor configuration props
74
89
  * @returns React element containing the full editor interface
75
90
  */
76
- export declare function Editor({ uri, fetcher, uiPath, onLocate, showStats, tables, defaultColumns, trailingColumns, tableActions, saveFile, }: EditorProps): import("react").JSX.Element;
91
+ export declare function Editor({ uri, fetcher, uiPath, onLocate, showStats, tables, defaultColumns, trailingColumns, defaultSort, defaultSearchColumns, tableActions, saveFile, }: EditorProps): import("react").JSX.Element;
77
92
  export {};