@declarion/react 0.1.78 → 0.1.79
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/index.js +520 -502
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/actions.d.ts +35 -0
- package/dist-lib/types/fieldType.d.ts +1 -1
- package/package.json +1 -1
|
@@ -140,4 +140,39 @@ export declare function filterLayoutForSlot(layout: ResolvedActionLayoutNode[],
|
|
|
140
140
|
bulkRequiredPredicate?: (action: Action) => boolean;
|
|
141
141
|
excludeIf?: (action: Action) => boolean;
|
|
142
142
|
}): ResolvedActionLayoutNode[];
|
|
143
|
+
/**
|
|
144
|
+
* True when an action should be treated as requiring a row selection.
|
|
145
|
+
*
|
|
146
|
+
* THIS IS A PROXY, not the canonical rule. The canonical "requires
|
|
147
|
+
* selection" answer is derived per dispatch mode (see docs/dsl.md §16.6.2:
|
|
148
|
+
* `handler.invoke`, association semantics, `href ${id}`). The SDK cannot
|
|
149
|
+
* evaluate that rule - the resolved-action wire format carries no `invoke`
|
|
150
|
+
* value, and two of the five modes (`ui_steps`, `widget`) have no
|
|
151
|
+
* derivation at all. So the SDK stands in slot membership: an action is
|
|
152
|
+
* selection-mode iff its `visibility` includes `list_floatbar`.
|
|
153
|
+
*
|
|
154
|
+
* This matches the platform's authoring guidance - the loader's
|
|
155
|
+
* `bulk_selection_required`-removal error tells authors to "use
|
|
156
|
+
* visibility: [list_floatbar] for selection-mode actions" - so the proxy
|
|
157
|
+
* agrees with the canonical rule for every guideline-following schema
|
|
158
|
+
* (a mis-declared schema can diverge). Full rationale, the divergence
|
|
159
|
+
* case, and the planned hybrid replacement: docs/architecture.md
|
|
160
|
+
* "List Toolbar Selection Model".
|
|
161
|
+
*
|
|
162
|
+
* Drives list-toolbar state: a selection-mode action renders disabled
|
|
163
|
+
* while no rows are selected, and moves to the floatbar (not the static
|
|
164
|
+
* toolbar) once a selection exists.
|
|
165
|
+
*/
|
|
166
|
+
export declare function actionRequiresSelection(action: Action): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Walks a ResolvedActionLayoutNode[] and sets `enabled: false` plus the
|
|
169
|
+
* given `reason` on every leaf whose action satisfies `predicate`. Groups
|
|
170
|
+
* are recursed into; tree structure is preserved (no nodes dropped) so the
|
|
171
|
+
* user still sees what is available. Leaves whose code cannot be resolved
|
|
172
|
+
* are left untouched (defensive; the server should have pruned them).
|
|
173
|
+
*
|
|
174
|
+
* Use: grey out selection-mode actions on the list toolbar while no rows
|
|
175
|
+
* are selected.
|
|
176
|
+
*/
|
|
177
|
+
export declare function disableLeavesWhere(layout: ResolvedActionLayoutNode[], entityActions: Record<string, Action> | undefined, globalActions: Record<string, Action> | undefined, predicate: (action: Action) => boolean, reason: string): ResolvedActionLayoutNode[];
|
|
143
178
|
export declare function defaultFlatForSlot(actions: Record<string, Action> | undefined, slot: string): ResolvedActionLayoutNode[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type FieldType = "uuid" | "string" | "text" | "rich_text" | "int" | "float" | "bool" | "date" | "time" | "timestamp" | "email" | "url" | "phone" | "enum" | "json" | "ref" | "tags" | "multilang" | "multilang_text" | "structure" | "secret" | "password" | "decimal" | "string_array" | "int_array" | "bytes";
|
|
1
|
+
export type FieldType = "uuid" | "string" | "text" | "rich_text" | "int" | "float" | "bool" | "date" | "time" | "timestamp" | "email" | "url" | "phone" | "enum" | "json" | "ref" | "tags" | "multilang" | "multilang_text" | "structure" | "secret" | "password" | "decimal" | "string_array" | "int_array" | "uuid_array" | "bytes";
|
|
2
2
|
export declare const FIELD_TYPES: readonly FieldType[];
|