@declarion/react 0.59.2 → 0.60.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/{AgentChatPanel.impl-DBH1Ff4G.js → AgentChatPanel.impl-BY-Ir7Sh.js} +39 -39
- package/dist-lib/{DetailAuditStrip-9eJM2Fml.js → DetailAuditStrip-B9p1XhjC.js} +11 -11
- package/dist-lib/{DraggableChildrenTable-4RZC351U.js → DraggableChildrenTable-CtL7rdT6.js} +34 -34
- package/dist-lib/{Grid-CQabaBLx.js → Grid-CYERLdXO.js} +1 -1
- package/dist-lib/{LayoutRenderer-DGKWZKpW.js → LayoutRenderer-B08IJKsZ.js} +465 -465
- package/dist-lib/{ListCardsBody-DfGmyNIu.js → ListCardsBody-Dje_rays.js} +26 -26
- package/dist-lib/{MarkdownRenderer-BDbzDv_y.js → MarkdownRenderer-N0IWjTH5.js} +1 -1
- package/dist-lib/{RefreshControl-Bhoib0ZA.js → RefreshControl-BEWSHtAC.js} +26 -26
- package/dist-lib/{SmartDetailPage.impl-DFjz29Ff.js → SmartDetailPage.impl-CYiM-ITJ.js} +470 -470
- package/dist-lib/SmartListPage.impl-Db_Pv9Xc.js +3051 -0
- package/dist-lib/SmartRecordListPage.impl-hbbLglC1.js +780 -0
- package/dist-lib/{SortHeaderMenu-Cijxk4cX.js → SortHeaderMenu-DKKeCGTH.js} +1 -1
- package/dist-lib/{action-dispatch-DY0c8U81.js → action-dispatch-DbiOpvd6.js} +187 -187
- package/dist-lib/api/data.d.ts +5 -1
- package/dist-lib/{cardProjection-Bkl2SSYz.js → cardProjection-nveYLvHR.js} +1 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
- package/dist-lib/components/pages/list/useActiveView.d.ts +9 -2
- package/dist-lib/components/pages/list/useListViews.d.ts +3 -2
- package/dist-lib/{failure-v-uGSpbX.js → failure-BT54OLHy.js} +5 -5
- package/dist-lib/{format-count-DA4wmmWR.js → format-count-DLFCdtME.js} +246 -246
- package/dist-lib/hooks/useObject.d.ts +3 -2
- package/dist-lib/index.js +613 -613
- package/dist-lib/lib/field-classification.d.ts +10 -1
- package/dist-lib/{peekDraftStore-D-cTbiIr.js → peekDraftStore-DSExeoAh.js} +6 -6
- package/dist-lib/{registry-Cb3W-czW.js → registry-CRPxNbkk.js} +444 -438
- package/dist-lib/testing.js +2 -2
- package/dist-lib/{useAgentConversation-D97IqE-J.js → useAgentConversation-BavrHfrU.js} +14 -14
- package/dist-lib/{useCurrentScreen-BL5NZFCw.js → useCurrentScreen-BPq7HMF1.js} +1083 -1017
- package/dist-lib/{useListQuery-BG1GyKtJ.js → useListQuery-CG1WM4cv.js} +5 -5
- package/dist-lib/{field-classification-C28XE-_P.js → useOwnRefresh-C18iWRgr.js} +132 -158
- package/dist-lib/{useProperties-4Lg3odrt.js → useProperties-C35JrjwQ.js} +2 -2
- package/dist-lib/{useTabSearchMirror-ZVLlINBX.js → useTabSearchMirror-DKktWWLB.js} +1 -1
- package/package.json +1 -1
- package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +0 -3046
- package/dist-lib/SmartRecordListPage.impl-C1FJLr80.js +0 -780
package/dist-lib/api/data.d.ts
CHANGED
|
@@ -4,7 +4,11 @@ import type { ExportRequest } from "../components/pages/exportRequest.d.ts";
|
|
|
4
4
|
export declare function listEntities(entity: string, params?: ListParams, options?: {
|
|
5
5
|
signal?: AbortSignal;
|
|
6
6
|
}): Promise<ListResponse>;
|
|
7
|
-
|
|
7
|
+
/** What a single-record read asks the server to compute beside the row. */
|
|
8
|
+
export interface GetEntityOptions {
|
|
9
|
+
expand?: readonly "evidence"[];
|
|
10
|
+
}
|
|
11
|
+
export declare function getEntity(entity: string, pkValues: PkValues | string, options?: GetEntityOptions): Promise<DataResponse>;
|
|
8
12
|
export declare function createEntity(entity: string, data: Record<string, unknown>): Promise<DataResponse>;
|
|
9
13
|
export declare function updateEntity(entity: string, pkValues: PkValues | string, data: Record<string, unknown>): Promise<DataResponse>;
|
|
10
14
|
export declare function deleteObject(entity: string, pkValues: PkValues | string): Promise<void>;
|
|
@@ -22,4 +22,4 @@ import type { TextFn } from "../../../lib/language.d.ts";
|
|
|
22
22
|
export declare function buildFilterFieldMeta(t: TextFn, screen: (Pick<Screen, "filters"> & {
|
|
23
23
|
filter_special_values?: Record<string, ScreenFilterSpecialValues>;
|
|
24
24
|
filter_operators?: Record<string, string[]>;
|
|
25
|
-
}) | undefined, entity: Pick<Entity, "fields" | "status_groups" | "properties"> | undefined, entities?: Record<string, Entity>): FilterFieldMeta[];
|
|
25
|
+
}) | undefined, entity: Pick<Entity, "fields" | "status_groups" | "properties" | "field_access"> | undefined, entities?: Record<string, Entity>): FilterFieldMeta[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FilterNode } from "../../../lib/filters.d.ts";
|
|
2
|
-
import type { Screen } from "../../../types/schema.d.ts";
|
|
2
|
+
import type { Entity, Screen } from "../../../types/schema.d.ts";
|
|
3
3
|
import type { ViewItem } from "../../list/ViewSwitcher.d.ts";
|
|
4
4
|
export declare function baseViewSearchParams(current: URLSearchParams): URLSearchParams;
|
|
5
5
|
/** Scoped to who is asking as well as to the screen: a tenant switch or a
|
|
@@ -8,6 +8,7 @@ export declare function defaultViewClearedKey(screenCode: string, tenantId?: str
|
|
|
8
8
|
interface ActiveViewInput {
|
|
9
9
|
screenCode: string;
|
|
10
10
|
screen: Screen | undefined;
|
|
11
|
+
entity: Entity | undefined;
|
|
11
12
|
searchParams: URLSearchParams;
|
|
12
13
|
setSearchParams: (next: URLSearchParams, options?: {
|
|
13
14
|
replace?: boolean;
|
|
@@ -21,6 +22,12 @@ export interface ViewDefaults {
|
|
|
21
22
|
columns: string[];
|
|
22
23
|
sort: string | undefined;
|
|
23
24
|
}
|
|
25
|
+
/** The query a view (or none) states, less any field the caller may not read,
|
|
26
|
+
* which the server would refuse; an emptied sort falls back to `sort_default`. */
|
|
27
|
+
export declare function viewQuery(entity: Entity | undefined, view: ViewItem | undefined, screen: Screen | undefined): {
|
|
28
|
+
filters: FilterNode[];
|
|
29
|
+
sort: string | undefined;
|
|
30
|
+
};
|
|
24
31
|
export interface ActiveView {
|
|
25
32
|
all: ViewItem[];
|
|
26
33
|
activeId: string | null;
|
|
@@ -34,5 +41,5 @@ export interface ActiveView {
|
|
|
34
41
|
}
|
|
35
42
|
/** Resolves the list's active view from the `view` URL parameter. It runs above
|
|
36
43
|
* the filter, column and sort hooks because each of them falls back to it. */
|
|
37
|
-
export declare function useActiveView({ screenCode, screen, searchParams, setSearchParams, userId, tenantId, filterError, }: ActiveViewInput): ActiveView;
|
|
44
|
+
export declare function useActiveView({ screenCode, screen, entity, searchParams, setSearchParams, userId, tenantId, filterError, }: ActiveViewInput): ActiveView;
|
|
38
45
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type FilterNode } from "../../../lib/filters.d.ts";
|
|
2
|
-
import { type Screen } from "../../../types/schema.d.ts";
|
|
2
|
+
import { type Entity, type Screen } from "../../../types/schema.d.ts";
|
|
3
3
|
import type { ViewItem } from "../../list/ViewSwitcher.d.ts";
|
|
4
4
|
import type { TextFn } from "../../../lib/language.d.ts";
|
|
5
5
|
interface ListViewsInput {
|
|
6
6
|
screenCode: string;
|
|
7
7
|
screen: Screen | undefined;
|
|
8
|
+
entity: Entity | undefined;
|
|
8
9
|
searchParams: URLSearchParams;
|
|
9
10
|
setSearchParams: (next: URLSearchParams, options?: {
|
|
10
11
|
replace?: boolean;
|
|
@@ -49,7 +50,7 @@ export interface ListViews {
|
|
|
49
50
|
* A view owns the LOGICAL layout - filters, columns, sort - and nothing else.
|
|
50
51
|
* Column widths are per device and never travel in one.
|
|
51
52
|
*/
|
|
52
|
-
export declare function useListViews({ screenCode, screen, searchParams, setSearchParams, userId, tenantId, all, activeId, active, clearedKey, filters, visibleColumns, sort, }: ListViewsInput): ListViews;
|
|
53
|
+
export declare function useListViews({ screenCode, screen, entity, searchParams, setSearchParams, userId, tenantId, all, activeId, active, clearedKey, filters, visibleColumns, sort, }: ListViewsInput): ListViews;
|
|
53
54
|
/** The name a save dialog offers to overwrite, or null when the active view is
|
|
54
55
|
* not the caller's to overwrite. */
|
|
55
56
|
export declare function overwritableViewName(t: TextFn, active: ViewItem | undefined): string | null;
|
|
@@ -13,15 +13,15 @@ async function c(e, n = {}, r = {}) {
|
|
|
13
13
|
}
|
|
14
14
|
return t(s(e, n), { signal: r.signal });
|
|
15
15
|
}
|
|
16
|
-
async function l(e, n) {
|
|
16
|
+
async function l(e, n, r = {}) {
|
|
17
17
|
if (C) {
|
|
18
18
|
let t = C(e, n);
|
|
19
19
|
if (t !== void 0) return t;
|
|
20
20
|
}
|
|
21
|
-
let
|
|
22
|
-
if (typeof n == "string")
|
|
23
|
-
else for (let [e, t] of Object.entries(n))
|
|
24
|
-
return t(`/api/data/${e}?${
|
|
21
|
+
let i = new URLSearchParams();
|
|
22
|
+
if (typeof n == "string") i.set("id", n);
|
|
23
|
+
else for (let [e, t] of Object.entries(n)) i.set(e, t);
|
|
24
|
+
return r.expand?.length && i.set("expand", r.expand.join(",")), t(`/api/data/${e}?${i.toString()}`);
|
|
25
25
|
}
|
|
26
26
|
async function u(e, t) {
|
|
27
27
|
return { data: ((await E(`${e}.__create`, {
|