@declarion/react 0.43.0 → 0.45.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/dist-lib/{DraggableChildrenTable-G4Sw1XAD.js → DraggableChildrenTable-BDnJK0AU.js} +38 -38
- package/dist-lib/{Grid-CXn-IK3H.js → Grid-CcCveEE7.js} +2 -2
- package/dist-lib/{LayoutRenderer-DX8pFS5A.js → LayoutRenderer-BReuhVdX.js} +377 -377
- package/dist-lib/{MarkdownRenderer-CreI9x2m.js → MarkdownRenderer-DPKDFR60.js} +1 -1
- package/dist-lib/{RefreshControl-DFh0-gCb.js → RefreshControl-KddgOhUG.js} +166 -166
- package/dist-lib/{SmartDetailPage.impl-K6Jj1-9z.js → SmartDetailPage.impl-D_hMxiHy.js} +589 -562
- package/dist-lib/{SmartRecordListPage.impl-DQW_uVfL.js → SmartRecordListPage.impl-GIo_mPIJ.js} +182 -182
- package/dist-lib/api/agents.d.ts +3 -2
- package/dist-lib/components/pages/exportRequest.d.ts +3 -3
- package/dist-lib/components/pages/list/filter-meta.d.ts +22 -8
- package/dist-lib/hooks/useCursorEntityData.d.ts +3 -2
- package/dist-lib/index.js +1436 -1528
- package/dist-lib/lib/anchor.d.ts +37 -0
- package/dist-lib/{registry-r4hiflwC.js → registry-DJKp0yaV.js} +564 -564
- package/dist-lib/testing.js +10 -10
- package/dist-lib/types/api.d.ts +3 -10
- package/dist-lib/types/schema.d.ts +25 -13
- package/dist-lib/{useCurrentScreen-CpQjVmrT.js → useCurrentScreen-A3xZDs7U.js} +1255 -1207
- package/dist-lib/{useProperties-CULxrNT4.js → useProperties-TlltWwLv.js} +33 -33
- package/dist-lib/{value-fUHxMV4r.js → value-CHY7LgZ-.js} +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FilterNode } from "../../lib/filters";
|
|
2
2
|
/** ExportQuery mirrors the Go ExportQuery struct (server/handlers/data_export.go).
|
|
3
3
|
* Field order matches; semantics match parseListParams 1:1. */
|
|
4
4
|
export interface ExportQuery {
|
|
5
5
|
screen?: string;
|
|
6
|
-
filters?:
|
|
6
|
+
filters?: FilterNode[];
|
|
7
7
|
search?: string;
|
|
8
8
|
sort?: string;
|
|
9
9
|
include_deleted?: boolean;
|
|
@@ -34,7 +34,7 @@ export interface ListViewState {
|
|
|
34
34
|
/** Active screen code, when the list is rendered through a screen. */
|
|
35
35
|
screenCode?: string;
|
|
36
36
|
/** JSON filter tree (the same shape sent in the `filters` URL param). */
|
|
37
|
-
jsonFilters?:
|
|
37
|
+
jsonFilters?: FilterNode[];
|
|
38
38
|
/** Debounced search value from the toolbar. */
|
|
39
39
|
search?: string;
|
|
40
40
|
/** "field:asc" / "field:desc" sort spec. */
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import type { Entity, ScreenFilterSpecialValues } from "../../../types/schema";
|
|
1
|
+
import type { Entity, Screen, ScreenFilterSpecialValues } from "../../../types/schema";
|
|
2
2
|
import type { FilterFieldMeta } from "../../../components/filters/FilterDrawer";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Build FilterFieldMeta array from screen + entity for the FilterDrawer.
|
|
5
|
+
*
|
|
6
|
+
* The per-type operator lists come from the server (`screen.filter_operators`),
|
|
7
|
+
* never from a table here. The client used to keep its own map and it had
|
|
8
|
+
* already diverged: array, multilang, json and bytes fields fell through to
|
|
9
|
+
* `["eq","not_eq","is_empty","is_not_empty"]`, offering two operators the query
|
|
10
|
+
* builder rejects and hiding `contains`, the one that works. The server owns
|
|
11
|
+
* the field-type -> operator mapping because the server is what enforces it.
|
|
12
|
+
*
|
|
13
|
+
* A field the server published no operators for is OMITTED rather than given a
|
|
14
|
+
* guessed list: an operator the builder rejects is worse than an absent field,
|
|
15
|
+
* because the user only finds out after building the filter.
|
|
16
|
+
*
|
|
17
|
+
* Which fields appear at all is SCREEN-SCOPED - `screen.filters` when declared,
|
|
18
|
+
* every entity field otherwise. That is a UI affordance, not an access control:
|
|
19
|
+
* the server applies no screen scoping to caller filters.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildFilterFieldMeta(screen: (Pick<Screen, "filters"> & {
|
|
7
22
|
filter_special_values?: Record<string, ScreenFilterSpecialValues>;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare function fieldTypeToOperators(type: string): FilterOp[];
|
|
23
|
+
filter_operators?: Record<string, string[]>;
|
|
24
|
+
}) | undefined, entity: Pick<Entity, "fields" | "status_groups" | "properties"> | undefined, entities?: Record<string, Entity>): FilterFieldMeta[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type QueryKey } from "@tanstack/react-query";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Refs, V2Meta } from "../types/api";
|
|
3
|
+
import type { FilterNode } from "../lib/filters";
|
|
3
4
|
/**
|
|
4
5
|
* Query-key root for the cursor (infinite) entity list. Distinct from the
|
|
5
6
|
* offset list's `"entity-data"` so the SSE handler can RESET it (drop pages,
|
|
@@ -22,7 +23,7 @@ export declare function cursorEntityStableKey(params: CursorEntityDataParams): s
|
|
|
22
23
|
export declare function cursorEntityDataQueryKey(entity: string | undefined, params: CursorEntityDataParams): QueryKey;
|
|
23
24
|
export interface CursorEntityDataParams {
|
|
24
25
|
sort?: string;
|
|
25
|
-
filters?:
|
|
26
|
+
filters?: FilterNode[];
|
|
26
27
|
search?: string;
|
|
27
28
|
select?: string[];
|
|
28
29
|
expand?: string[];
|