@declarion/react 0.31.1 → 0.32.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/{ActionRunner-BzaZQtiI.js → ActionRunner-CaSrGpBi.js} +264 -260
- package/dist-lib/{DraggableChildrenTable-DILqStHQ.js → DraggableChildrenTable-CAHg7paQ.js} +1 -1
- package/dist-lib/{Grid-BIsiUwPh.js → Grid-DDbBhqcl.js} +2 -2
- package/dist-lib/{LayoutRenderer-3RvIsC9M.js → LayoutRenderer-CelsqsZ6.js} +433 -433
- package/dist-lib/{MarkdownRenderer-CaHhWrfm.js → MarkdownRenderer-DThy2ixe.js} +1 -1
- package/dist-lib/RefreshControl-CorluL6r.js +582 -0
- package/dist-lib/{SmartDetailPage.impl--EO-9fos.js → SmartDetailPage.impl-USIxbl-8.js} +449 -411
- package/dist-lib/{SmartRecordListPage.impl-B1iws8yf.js → SmartRecordListPage.impl-BKIpTNK7.js} +210 -210
- package/dist-lib/api/data.d.ts +4 -4
- package/dist-lib/api/params.d.ts +1 -1
- package/dist-lib/components/layout/Rail.d.ts +5 -5
- package/dist-lib/components/layout/TopBar.d.ts +3 -1
- package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
- package/dist-lib/components/primitives/BrandLogo.d.ts +1 -1
- package/dist-lib/components/shared/ActionRunner.d.ts +1 -0
- package/dist-lib/components/shared/ObjectActionBar.d.ts +29 -0
- package/dist-lib/components/shared/PageHeader.d.ts +1 -1
- package/dist-lib/components/shared/RecordHeader.d.ts +2 -1
- package/dist-lib/components/shared/RefreshControl.d.ts +6 -0
- package/dist-lib/hooks/useBranding.d.ts +8 -0
- package/dist-lib/hooks/useBrandingChrome.d.ts +6 -0
- package/dist-lib/hooks/useLiveObject.d.ts +9 -0
- package/dist-lib/hooks/useMutations.d.ts +3 -3
- package/dist-lib/hooks/useObject.d.ts +10 -0
- package/dist-lib/hooks/usePageStateRuntime.d.ts +1 -1
- package/dist-lib/hooks/useParams.d.ts +10 -1
- package/dist-lib/index.d.ts +11 -5
- package/dist-lib/index.js +1890 -1722
- package/dist-lib/lib/actions.d.ts +6 -2
- package/dist-lib/lib/branding.d.ts +10 -1
- package/dist-lib/{registry-2KliNTHB.js → registry-KQyyL5Gt.js} +1452 -1401
- package/dist-lib/testing.d.ts +5 -3
- package/dist-lib/testing.js +35 -31
- package/dist-lib/types/api.d.ts +70 -3
- package/dist-lib/types/schema.d.ts +1 -15
- package/dist-lib/{useProperties-Co3RdtuT.js → useProperties-D74hyWIa.js} +53 -53
- package/dist-lib/{value-BooGwUik.js → value-BfXXl5EE.js} +1 -1
- package/package.json +1 -1
- package/dist-lib/hooks/useEntityItem.d.ts +0 -10
- package/dist-lib/peekDraftStore-yyzMbaiI.js +0 -468
|
@@ -18,6 +18,8 @@ export declare function rowDetailId(row: Record<string, unknown> | undefined, en
|
|
|
18
18
|
* An action with no conditions is always available.
|
|
19
19
|
*/
|
|
20
20
|
export declare function evaluateConditions(conditions: ActionCondition[] | undefined, row: Record<string, unknown>): boolean;
|
|
21
|
+
export declare function actionConditionFieldValue(row: Record<string, unknown>, field: string): unknown;
|
|
22
|
+
export declare function withActionConditionFields<T extends Record<string, unknown>>(row: T): T;
|
|
21
23
|
/**
|
|
22
24
|
* Returns actions from an entity whose visibility array contains the given
|
|
23
25
|
* placement. Canonical values: detail | list_row | list_toolbar | app_menu |
|
|
@@ -116,8 +118,9 @@ export type ResolvedActionLayoutNode = ResolvedActionLeaf | ResolvedActionGroup;
|
|
|
116
118
|
*
|
|
117
119
|
* Disable conditions:
|
|
118
120
|
* - enabled_if conditions not satisfied by row -> leaf enabled=false + reason set
|
|
119
|
-
* - For bulk (rowSelection.length >
|
|
120
|
-
*
|
|
121
|
+
* - For bulk (rowSelection.length > 0): visible when ANY selected row satisfies
|
|
122
|
+
* visible_if; enabled only when ALL selected rows satisfy visible_if and
|
|
123
|
+
* enabled_if. Reason carries the failing count.
|
|
121
124
|
*
|
|
122
125
|
* @param layout RBAC-pruned tree from the server (or resolveActionLayout client-side).
|
|
123
126
|
* @param entityActions Entity-level actions map (entity wins on code collision).
|
|
@@ -170,6 +173,7 @@ export declare function filterLayoutForSlot(layout: ResolvedActionLayoutNode[],
|
|
|
170
173
|
bulkRequiredPredicate?: (action: Action) => boolean;
|
|
171
174
|
excludeIf?: (action: Action) => boolean;
|
|
172
175
|
}): ResolvedActionLayoutNode[];
|
|
176
|
+
export declare function resolveActionLayoutForSlot(screenActionLayout: ResolvedActionLayoutNode[] | null | undefined, entityActionLayout: ResolvedActionLayoutNode[] | null | undefined, entityActions: Record<string, Action> | undefined, globalActions: Record<string, Action> | undefined, slot: string, opts?: Parameters<typeof filterLayoutForSlot>[4]): ResolvedActionLayoutNode[];
|
|
173
177
|
/**
|
|
174
178
|
* True when an action needs at least one selected row to be meaningful, so a
|
|
175
179
|
* surface (the list toolbar) greys it while nothing is selected and enables it
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import type { BrandingChrome, BrandingIdentity, BrandingTheme, PublicBranding, PublicParam, PublicParamsResponse } from "../types/api";
|
|
2
|
+
export declare const BRANDING_PARAM_CODE = "branding";
|
|
3
|
+
export declare function paramsToRecord(list: PublicParam[] | undefined): Record<string, unknown>;
|
|
4
|
+
export declare function publicParamValue(publicParams: PublicParamsResponse | undefined, code: string): unknown;
|
|
5
|
+
export declare function getPublicBranding(publicParams: PublicParamsResponse | undefined): PublicBranding | undefined;
|
|
6
|
+
export declare function brandingFromValue(value: unknown): PublicBranding | undefined;
|
|
7
|
+
export declare function getBrandingIdentity(publicParams: PublicParamsResponse | undefined): BrandingIdentity | undefined;
|
|
8
|
+
export declare function getBrandingTheme(publicParams: PublicParamsResponse | undefined): BrandingTheme | undefined;
|
|
9
|
+
export declare function getBrandingChrome(publicParams: PublicParamsResponse | undefined): BrandingChrome | undefined;
|
|
1
10
|
/**
|
|
2
11
|
* Returns true when `value` is a renderable logo URL. Accepts:
|
|
3
|
-
* - root-relative paths ("/logo.png"
|
|
12
|
+
* - root-relative paths ("/logo.png" or "/modules/<module>/public/logo.png");
|
|
4
13
|
* - absolute http(s) URLs;
|
|
5
14
|
* - data:image/... URIs.
|
|
6
15
|
*
|