@declarion/react 0.1.69 → 0.1.71
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/api/data.d.ts +3 -1
- package/dist-lib/api/entities.d.ts +1 -1
- package/dist-lib/api/events.d.ts +16 -1
- package/dist-lib/components/fields/cells/factories/json.d.ts +2 -0
- package/dist-lib/components/fields/cells/registry.d.ts +1 -0
- package/dist-lib/components/fields/index.d.ts +1 -0
- package/dist-lib/components/file-widgets/host.d.ts +1 -0
- package/dist-lib/components/pages/SmartListPage.d.ts +4 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useSSE.d.ts +2 -0
- package/dist-lib/index.d.ts +4 -2
- package/dist-lib/index.js +3287 -3041
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/mass-edit.d.ts +2 -3
- package/dist-lib/types/api.d.ts +2 -0
- package/dist-lib/types/schema.d.ts +28 -0
- package/package.json +1 -1
|
@@ -25,8 +25,7 @@ export declare function parseTargetFilter(raw: string | undefined): string[];
|
|
|
25
25
|
* - Without a whitelist, emits every non-PK, non-auto field plus all
|
|
26
26
|
* status groups and properties (when not composite PK). Matches the
|
|
27
27
|
* engine-side BuildMassEditTargets contract.
|
|
28
|
-
* -
|
|
29
|
-
* gate; the dispatcher
|
|
30
|
-
* permission gate).
|
|
28
|
+
* - entities without generic update globally hide every target (UI mirrors
|
|
29
|
+
* the server gate; the dispatcher still enforces permissions).
|
|
31
30
|
*/
|
|
32
31
|
export declare function buildMassEditTargets(entity: Entity | undefined, whitelistRaw?: string | string[]): MassEditTarget[];
|
package/dist-lib/types/api.d.ts
CHANGED
|
@@ -190,6 +190,8 @@ export interface ListParams {
|
|
|
190
190
|
include_deleted?: boolean;
|
|
191
191
|
expand?: string[];
|
|
192
192
|
screen?: string;
|
|
193
|
+
/** Return bounded display previews for fields that declare display.list_preview. */
|
|
194
|
+
preview?: boolean;
|
|
193
195
|
/**
|
|
194
196
|
* Field whitelist. When set, the server returns only these columns plus
|
|
195
197
|
* primary-key field(s) (auto-injected server-side). Filters/search/sort
|
|
@@ -63,6 +63,9 @@ export interface EntityField {
|
|
|
63
63
|
widget?: string;
|
|
64
64
|
is_listable?: boolean;
|
|
65
65
|
is_filterable?: boolean;
|
|
66
|
+
list_preview?: {
|
|
67
|
+
max_chars: number;
|
|
68
|
+
};
|
|
66
69
|
ref_display_field?: string;
|
|
67
70
|
span?: number | "full";
|
|
68
71
|
bool_labels?: {
|
|
@@ -201,11 +204,19 @@ export interface AssociationDef {
|
|
|
201
204
|
source: string;
|
|
202
205
|
code: string;
|
|
203
206
|
}
|
|
207
|
+
export type EntityMutationOp = "create" | "update" | "delete" | "restore";
|
|
208
|
+
export interface EntityMutations {
|
|
209
|
+
create?: boolean;
|
|
210
|
+
update?: boolean;
|
|
211
|
+
delete?: boolean;
|
|
212
|
+
restore?: boolean;
|
|
213
|
+
}
|
|
204
214
|
export interface Entity {
|
|
205
215
|
table: string;
|
|
206
216
|
primary_key?: string[];
|
|
207
217
|
virtual?: boolean;
|
|
208
218
|
readonly?: boolean;
|
|
219
|
+
mutations?: EntityMutations;
|
|
209
220
|
default_timezone?: string;
|
|
210
221
|
display: {
|
|
211
222
|
name: LocalizedString;
|
|
@@ -255,10 +266,26 @@ export interface Entity {
|
|
|
255
266
|
export interface ExportConfig {
|
|
256
267
|
enabled?: boolean;
|
|
257
268
|
}
|
|
269
|
+
export declare function entityAllowsMutation(entity: Pick<Entity, "readonly" | "mutations"> | undefined, op: EntityMutationOp): boolean;
|
|
258
270
|
export declare function getPrimaryKeyFields(entity: Entity): string[];
|
|
259
271
|
export type PkValues = Record<string, string>;
|
|
260
272
|
export declare function extractPkValues(entity: Entity, record: Record<string, unknown>): PkValues;
|
|
273
|
+
export declare function pkValuePartsToId(values: string[]): string;
|
|
261
274
|
export declare function pkValuesToId(pkValues: PkValues): string;
|
|
275
|
+
export declare function pkValuesToDetailId(entity: Entity, pkValues: PkValues): string;
|
|
276
|
+
export declare function pkValuesFromId(id: string, expectedCount: number): string[] | null;
|
|
277
|
+
export declare function resolveDetailRoute(list: Pick<Screen, "detail_screen">, entity: Pick<Entity, "detail_screen"> | undefined, allScreens: Record<string, {
|
|
278
|
+
route?: string;
|
|
279
|
+
}> | undefined): string | null;
|
|
280
|
+
export declare function buildDetailHrefFromId(list: Pick<Screen, "detail_screen">, id: string, entity: Pick<Entity, "detail_screen"> | undefined, allScreens: Record<string, {
|
|
281
|
+
route?: string;
|
|
282
|
+
}> | undefined): string | null;
|
|
283
|
+
export declare function buildEntityDetailHref(list: Pick<Screen, "detail_screen">, entity: Entity | undefined, allScreens: Record<string, {
|
|
284
|
+
route?: string;
|
|
285
|
+
}> | undefined, pkValues: PkValues): string | null;
|
|
286
|
+
export declare function buildRowDetailHref(list: Pick<Screen, "detail_screen">, entity: Entity | undefined, allScreens: Record<string, {
|
|
287
|
+
route?: string;
|
|
288
|
+
}> | undefined, row: Record<string, unknown>): string | null;
|
|
262
289
|
export declare function isCompositePk(entity: Entity): boolean;
|
|
263
290
|
export type SizeValue = string;
|
|
264
291
|
export interface SectionBadgeConfig {
|
|
@@ -420,6 +447,7 @@ export interface AreaDef {
|
|
|
420
447
|
code: string;
|
|
421
448
|
name?: LocalizedString;
|
|
422
449
|
icon?: string;
|
|
450
|
+
position?: number;
|
|
423
451
|
home_screen?: string;
|
|
424
452
|
required_permission?: string;
|
|
425
453
|
}
|