@donotdev/ui 0.2.3 → 0.3.1

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.
Files changed (89) hide show
  1. package/dist/ChildRowsPicker-63M4EQUQ.js +1 -0
  2. package/dist/ChildRowsPicker-ISP365ON.js +1 -0
  3. package/dist/ChildRowsPicker-PQFE6NCR.js +1 -0
  4. package/dist/ChildRowsPicker-XXFFSMWY.js +1 -0
  5. package/dist/GoToDialog-XBK5EZF4.js +1 -0
  6. package/dist/chunk-3CIZFGST.js +1 -0
  7. package/dist/chunk-LHMKU342.js +1 -0
  8. package/dist/chunk-P2DHZWPY.js +1 -0
  9. package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
  10. package/dist/components/layout/components/Breadcrumbs.js +4 -3
  11. package/dist/components/layout/components/header/HeaderMenu.d.ts +17 -16
  12. package/dist/components/layout/components/header/HeaderMenu.d.ts.map +1 -1
  13. package/dist/components/layout/components/header/HeaderMenu.js +51 -23
  14. package/dist/components/layout/components/header/SettingsMenu.js +2 -2
  15. package/dist/crud/components/ChildRowsPicker.d.ts +21 -0
  16. package/dist/crud/components/ChildRowsPicker.d.ts.map +1 -0
  17. package/dist/crud/components/ChildRowsPicker.js +68 -0
  18. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  19. package/dist/crud/components/EntityCardList.js +9 -17
  20. package/dist/crud/components/EntityDisplayRenderer.js +2 -2
  21. package/dist/crud/components/EntityFormRenderer.d.ts +4 -2
  22. package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
  23. package/dist/crud/components/EntityFormRenderer.js +137 -55
  24. package/dist/crud/components/EntityList.d.ts +3 -1
  25. package/dist/crud/components/EntityList.d.ts.map +1 -1
  26. package/dist/crud/components/EntityList.js +324 -56
  27. package/dist/crud/components/EntityRecommendations.js +1 -1
  28. package/dist/crud/components/EntityWorkflow.d.ts.map +1 -1
  29. package/dist/crud/components/EntityWorkflow.js +6 -4
  30. package/dist/crud/components/cellEditFor.d.ts +23 -8
  31. package/dist/crud/components/cellEditFor.d.ts.map +1 -1
  32. package/dist/crud/components/cellEditFor.js +40 -20
  33. package/dist/crud/components/entityParent.d.ts +8 -15
  34. package/dist/crud/components/entityParent.d.ts.map +1 -1
  35. package/dist/crud/components/entityParent.js +30 -8
  36. package/dist/crud/components/useRecordBreadcrumb.d.ts +1 -1
  37. package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -1
  38. package/dist/crud/components/useRecordBreadcrumb.js +12 -3
  39. package/dist/crud/crudImports.d.ts +11 -2
  40. package/dist/crud/crudImports.d.ts.map +1 -1
  41. package/dist/crud/crudImports.js +10 -1
  42. package/dist/dndev-next.css +374 -57
  43. package/dist/dndev.css +376 -57
  44. package/dist/index.js +4 -4
  45. package/dist/internal/initializers/NextJsStoresInitializer.d.ts +3 -0
  46. package/dist/internal/initializers/NextJsStoresInitializer.d.ts.map +1 -1
  47. package/dist/internal/initializers/NextJsStoresInitializer.js +8 -1
  48. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  49. package/dist/internal/layout/components/AutoMetaTags.js +3 -2
  50. package/dist/internal/layout/components/FontPreloadLinks.d.ts +7 -4
  51. package/dist/internal/layout/components/FontPreloadLinks.d.ts.map +1 -1
  52. package/dist/internal/layout/components/FontPreloadLinks.js +12 -25
  53. package/dist/internal/layout/components/footer/FooterCopyright.d.ts +2 -0
  54. package/dist/internal/layout/components/footer/FooterCopyright.d.ts.map +1 -1
  55. package/dist/internal/layout/components/footer/FooterCopyright.js +4 -0
  56. package/dist/internal/layout/components/footer/useLegalLinks.d.ts +2 -1
  57. package/dist/internal/layout/components/footer/useLegalLinks.d.ts.map +1 -1
  58. package/dist/internal/layout/components/footer/useLegalLinks.js +4 -3
  59. package/dist/internal/providers/UIProviders.d.ts +0 -8
  60. package/dist/internal/providers/UIProviders.d.ts.map +1 -1
  61. package/dist/internal/providers/UIProviders.js +39 -1
  62. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  63. package/dist/providers/NextJsAppProviders.js +1 -2
  64. package/dist/providers/ViteAppProviders.d.ts.map +1 -1
  65. package/dist/providers/ViteAppProviders.js +1 -4
  66. package/dist/routing/404.d.ts +8 -1
  67. package/dist/routing/404.d.ts.map +1 -1
  68. package/dist/routing/404.js +6 -2
  69. package/dist/routing/hooks/hooks.next.js +1 -1
  70. package/dist/routing/hooks/useRedirectGuard.next.d.ts +3 -1
  71. package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
  72. package/dist/routing/hooks/useRedirectGuard.next.js +11 -9
  73. package/dist/routing/parentRoute.d.ts +27 -0
  74. package/dist/routing/parentRoute.d.ts.map +1 -0
  75. package/dist/routing/parentRoute.js +43 -0
  76. package/dist/routing/useNavigation.d.ts.map +1 -1
  77. package/dist/routing/useNavigation.js +5 -24
  78. package/dist/routing/useRouteDiscovery.d.ts +2 -2
  79. package/dist/routing/useRouteDiscovery.d.ts.map +1 -1
  80. package/dist/routing/useRouteDiscovery.js +6 -5
  81. package/dist/styles/index.css +373 -56
  82. package/dist/symbol-index.json +1 -1
  83. package/guidelines/COMPONENTS.md +1 -1
  84. package/guidelines/GOTCHAS.md +2 -0
  85. package/guidelines/LAYOUTS.md +4 -0
  86. package/guidelines/PAGES.md +23 -3
  87. package/guidelines/ROUTING.md +26 -1
  88. package/guidelines/SEO.md +1 -1
  89. package/package.json +8 -8
@@ -1,18 +1,11 @@
1
- /**
2
- * @fileoverview Parent / child records (nested lists)
3
- * @description An `EntityList` with `parent` lists one parent's children and its
4
- * add button opens `basePath/new?<field>=<id>`. `EntityFormRenderer` (create)
5
- * prefills that reference field from the URL. URL input is untrusted: only
6
- * reference fields of the entity the viewer may set on create, with an id-shaped
7
- * value, are taken.
8
- *
9
- * @version 0.1.0
10
- * @since 0.2.3
11
- * @author AMBROISE PARK Consulting
12
- */
13
1
  import type { AnyEntity, EntityListParent } from '@donotdev/core';
2
+ /** A nested list's parent once created (its id known). */
3
+ export interface SavedEntityParent extends EntityListParent {
4
+ value: string;
5
+ }
14
6
  /**
15
- * Throws when `parent.field` is not a reference field of the listed entity.
7
+ * Throws when `parent.field` is not a reference field of the listed entity, or
8
+ * `parent.value` is neither a record id nor `null` (parent not created yet).
16
9
  * A wrong parent would silently list nothing.
17
10
  *
18
11
  * @param entity - The listed (child) entity
@@ -23,10 +16,10 @@ export declare function assertEntityParent(entity: AnyEntity, parent: EntityList
23
16
  * Create path of a child record with its parent prefilled.
24
17
  *
25
18
  * @param basePath - The list's base path
26
- * @param parent - The nested list's parent
19
+ * @param parent - The nested list's parent (created)
27
20
  * @returns `${basePath}/new?<field>=<id>`
28
21
  */
29
- export declare function childCreatePath(basePath: string, parent: EntityListParent): string;
22
+ export declare function childCreatePath(basePath: string, parent: SavedEntityParent): string;
30
23
  /**
31
24
  * Create-form values taken from the URL: reference fields of the entity the
32
25
  * viewer may set on create, whose value is a record id. Anything else is ignored.
@@ -1 +1 @@
1
- {"version":3,"file":"entityParent.d.ts","sourceRoot":"","sources":["../../../src/crud/components/entityParent.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAYlE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,gBAAgB,GACvB,IAAI,CAWN;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,gBAAgB,GACvB,MAAM,CAGR;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,eAAe,EACvB,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAaxB"}
1
+ {"version":3,"file":"entityParent.d.ts","sourceRoot":"","sources":["../../../src/crud/components/entityParent.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAgBlE,0DAA0D;AAC1D,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,gBAAgB,GACvB,IAAI,CAWN;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,iBAAiB,GACxB,MAAM,CAGR;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,eAAe,EACvB,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAaxB"}
@@ -1,12 +1,34 @@
1
1
  // packages/ui/src/crud/components/entityParent.ts
2
- import { isFieldEditable } from '../crudImports';
2
+ /**
3
+ * @fileoverview Parent / child records (nested lists)
4
+ * @description An `EntityList` with `parent` lists one parent's children and its
5
+ * add button opens `basePath/new?<field>=<id>`. `EntityFormRenderer` (create)
6
+ * prefills that reference field from the URL. `parent.value: null` (parent not
7
+ * created yet) shows the create-first message instead. URL input is untrusted: only
8
+ * reference fields of the entity the viewer may set on create, with an id-shaped
9
+ * value, are taken. Reference fields and editability come from the entity
10
+ * descriptor (`describeEntity`).
11
+ *
12
+ * @version 0.1.0
13
+ * @since 0.2.3
14
+ * @author AMBROISE PARK Consulting
15
+ */
16
+ import { describeEntity } from '@donotdev/core';
3
17
  /** Record id shape accepted from a URL (Firestore ids, UUIDs, slugs). */
4
18
  const RECORD_ID = /^[A-Za-z0-9_-]{1,128}$/;
5
- /** True when `field` is a reference field of `entity`. */
6
- const isReferenceField = (entity, field) => entity.fields[field]?.type === 'reference' &&
7
- typeof entity.fields[field]?.validation?.reference === 'string';
8
19
  /**
9
- * Throws when `parent.field` is not a reference field of the listed entity.
20
+ * True when `field` is a reference field of `entity`: descriptor
21
+ * `value.kind === 'ref'` (any field type with `validation.reference`, custom ones included).
22
+ */
23
+ const isReferenceField = (entity, field) => {
24
+ const value = Object.hasOwn(entity.fields, field)
25
+ ? describeEntity(entity).fields[field]?.value
26
+ : undefined;
27
+ return value?.kind === 'ref' && value.ref !== undefined;
28
+ };
29
+ /**
30
+ * Throws when `parent.field` is not a reference field of the listed entity, or
31
+ * `parent.value` is neither a record id nor `null` (parent not created yet).
10
32
  * A wrong parent would silently list nothing.
11
33
  *
12
34
  * @param entity - The listed (child) entity
@@ -16,7 +38,7 @@ export function assertEntityParent(entity, parent) {
16
38
  if (!isReferenceField(entity, parent.field)) {
17
39
  throw new Error(`EntityList: parent.field "${parent.field}" is not a reference field of entity "${entity.name}".`);
18
40
  }
19
- if (!RECORD_ID.test(parent.value)) {
41
+ if (parent.value !== null && !RECORD_ID.test(parent.value)) {
20
42
  throw new Error(`EntityList: parent.value "${parent.value}" is not a record id.`);
21
43
  }
22
44
  }
@@ -24,7 +46,7 @@ export function assertEntityParent(entity, parent) {
24
46
  * Create path of a child record with its parent prefilled.
25
47
  *
26
48
  * @param basePath - The list's base path
27
- * @param parent - The nested list's parent
49
+ * @param parent - The nested list's parent (created)
28
50
  * @returns `${basePath}/new?<field>=<id>`
29
51
  */
30
52
  export function childCreatePath(basePath, parent) {
@@ -46,7 +68,7 @@ export function referencePrefillFromQuery(entity, params, viewerRole) {
46
68
  if (Object.hasOwn(entity.fields, key) &&
47
69
  isReferenceField(entity, key) &&
48
70
  RECORD_ID.test(value) &&
49
- isFieldEditable(entity.fields[key].editable, viewerRole, 'create')) {
71
+ describeEntity(entity).fields[key]?.editableFor(viewerRole, 'create') === true) {
50
72
  prefill[key] = value;
51
73
  }
52
74
  }
@@ -2,7 +2,7 @@ import type { AnyEntity } from '@donotdev/core';
2
2
  /**
3
3
  * Names the shown record in the breadcrumbs: the entity's card title, formatted like
4
4
  * the card (the same title `<Seo entity>` uses). Cleared when the page unmounts or the record
5
- * has no title. Client effect: the server render keeps the URL segment.
5
+ * has no title, unless another component replaced it meanwhile (its label stays). Client effect: the server render keeps the URL segment.
6
6
  *
7
7
  * @param entity - Entity of the record
8
8
  * @param record - Loaded record (`undefined` / `null` while loading)
@@ -1 +1 @@
1
- {"version":3,"file":"useRecordBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/crud/components/useRecordBreadcrumb.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GACjD,IAAI,CAaN"}
1
+ {"version":3,"file":"useRecordBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/crud/components/useRecordBreadcrumb.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GACjD,IAAI,CAqBN"}
@@ -8,18 +8,23 @@
8
8
  * @since 0.2.3
9
9
  * @author AMBROISE PARK Consulting
10
10
  */
11
- import { useEffect } from 'react';
11
+ import { useEffect, useRef } from 'react';
12
12
  import { deriveEntitySeo, useLayout, useTranslation } from '@donotdev/core';
13
13
  /**
14
14
  * Names the shown record in the breadcrumbs: the entity's card title, formatted like
15
15
  * the card (the same title `<Seo entity>` uses). Cleared when the page unmounts or the record
16
- * has no title. Client effect: the server render keeps the URL segment.
16
+ * has no title, unless another component replaced it meanwhile (its label stays). Client effect: the server render keeps the URL segment.
17
17
  *
18
18
  * @param entity - Entity of the record
19
19
  * @param record - Loaded record (`undefined` / `null` while loading)
20
20
  */
21
21
  export function useRecordBreadcrumb(entity, record) {
22
22
  const setRecordLabel = useLayout('setRouteRecordLabel');
23
+ // The label currently shown: cleanup clears only its own label, never one another
24
+ // component (e.g. the page) set after it.
25
+ const shown = useLayout('routeRecordLabel');
26
+ const shownRef = useRef(shown);
27
+ shownRef.current = shown;
23
28
  const id = typeof record?.id === 'string' ? record.id : undefined;
24
29
  const { t, language } = useTranslation([entity.namespace, 'crud']);
25
30
  const label = record
@@ -29,6 +34,10 @@ export function useRecordBreadcrumb(entity, record) {
29
34
  if (!id || !label)
30
35
  return;
31
36
  setRecordLabel({ id, label });
32
- return () => setRecordLabel(null);
37
+ return () => {
38
+ const current = shownRef.current;
39
+ if (current?.id === id && current.label === label)
40
+ setRecordLabel(null);
41
+ };
33
42
  }, [id, label, setRecordLabel]);
34
43
  }
@@ -16,7 +16,11 @@ import * as crudModule from '@donotdev/crud';
16
16
  /** true when @donotdev/crud resolved with real exports */
17
17
  export declare const isCrudModuleAvailable: boolean;
18
18
  export declare const useEntityForm: typeof crudModule.useEntityForm;
19
- export declare const useFormStore: import("zustand").UseBoundStore<import("zustand").StoreApi<crudModule.FormStoreState & crudModule.FormStoreActions & import("@donotdev/stores").DoNotDevStore>>;
19
+ export declare const useFormStore: import("zustand").UseBoundStore<import("zustand").StoreApi<crudModule.FormStoreState & crudModule.FormStoreActions>>;
20
+ /** Router placeholder for useEntityForm's leave-on-save (filled by UIProviders). */
21
+ export declare const FormNavigationProvider: import("react").Provider<crudModule.FormNavigation | null>;
22
+ /** Subscribe to the existing submission error without duplicating form state. */
23
+ export declare const useFormError: (formId: string) => string | null;
20
24
  export declare const useFieldConditions: typeof crudModule.useFieldConditions;
21
25
  export declare const useCrud: typeof crudModule.useCrud;
22
26
  export declare const useCrudList: typeof crudModule.useCrudList;
@@ -27,6 +31,10 @@ export declare const useCrudFilters: typeof crudModule.useCrudFilters;
27
31
  export declare const useCrudPageSize: typeof crudModule.useCrudPageSize;
28
32
  export declare const useEntityWorkflow: typeof crudModule.useEntityWorkflow;
29
33
  export declare const useReferenceResolver: typeof crudModule.useReferenceResolver;
34
+ /** Child rows of a record, joined to the form open on it (EntityList with `parent`). */
35
+ export declare const useChildRows: typeof crudModule.useChildRows;
36
+ /** The edit form open on a parent record that its child rows join, or null. */
37
+ export declare const useJoinedForm: typeof crudModule.useJoinedForm;
30
38
  export declare const DisplayFieldRenderer: typeof crudModule.DisplayFieldRenderer;
31
39
  export declare const FormFieldRenderer: typeof crudModule.FormFieldRenderer;
32
40
  export declare const UploadProvider: typeof crudModule.UploadProvider;
@@ -35,5 +43,6 @@ export declare const CrudCard: typeof crudModule.CrudCard;
35
43
  export declare const translateFieldLabel: typeof crudModule.translateFieldLabel;
36
44
  export declare const formatValue: typeof crudModule.formatValue;
37
45
  export declare const translateLabel: typeof crudModule.translateLabel;
38
- export declare const isFieldEditable: typeof crudModule.isFieldEditable;
46
+ export declare const applyFilters: typeof crudModule.applyFilters;
47
+ export declare const applySearch: typeof crudModule.applySearch;
39
48
  //# sourceMappingURL=crudImports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"crudImports.d.ts","sourceRoot":"","sources":["../../src/crud/crudImports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,SAA4C,CAAC;AAG/E,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,YAAY,iKAA2B,CAAC;AACrD,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,OAAO,2BAAsB,CAAC;AAC3C,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,UAAU,8BAAyB,CAAC;AACjD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AAGrE,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AACrE,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,QAAQ,4BAAuB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,uCAAkC,CAAC;AACnE,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,eAAe,mCAA8B,CAAC"}
1
+ {"version":3,"file":"crudImports.d.ts","sourceRoot":"","sources":["../../src/crud/crudImports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,SAA4C,CAAC;AAG/E,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,YAAY,sHAA2B,CAAC;AACrD,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,4DAAqC,CAAC;AACzE,iFAAiF;AACjF,eAAO,MAAM,YAAY,mCAA2B,CAAC;AACrD,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,OAAO,2BAAsB,CAAC;AAC3C,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,UAAU,8BAAyB,CAAC;AACjD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AACrE,wFAAwF;AACxF,eAAO,MAAM,YAAY,gCAA2B,CAAC;AACrD,+EAA+E;AAC/E,eAAO,MAAM,aAAa,iCAA4B,CAAC;AAGvD,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AACrE,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,QAAQ,4BAAuB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,uCAAkC,CAAC;AACnE,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,YAAY,gCAA2B,CAAC;AACrD,eAAO,MAAM,WAAW,+BAA0B,CAAC"}
@@ -19,6 +19,10 @@ export const isCrudModuleAvailable = typeof crudModule?.useCrud === 'function';
19
19
  // --- Hooks ---
20
20
  export const useEntityForm = crudModule?.useEntityForm;
21
21
  export const useFormStore = crudModule?.useFormStore;
22
+ /** Router placeholder for useEntityForm's leave-on-save (filled by UIProviders). */
23
+ export const FormNavigationProvider = crudModule?.FormNavigationProvider;
24
+ /** Subscribe to the existing submission error without duplicating form state. */
25
+ export const useFormError = crudModule?.useFormError;
22
26
  export const useFieldConditions = crudModule?.useFieldConditions;
23
27
  export const useCrud = crudModule?.useCrud;
24
28
  export const useCrudList = crudModule?.useCrudList;
@@ -29,6 +33,10 @@ export const useCrudFilters = crudModule?.useCrudFilters;
29
33
  export const useCrudPageSize = crudModule?.useCrudPageSize;
30
34
  export const useEntityWorkflow = crudModule?.useEntityWorkflow;
31
35
  export const useReferenceResolver = crudModule?.useReferenceResolver;
36
+ /** Child rows of a record, joined to the form open on it (EntityList with `parent`). */
37
+ export const useChildRows = crudModule?.useChildRows;
38
+ /** The edit form open on a parent record that its child rows join, or null. */
39
+ export const useJoinedForm = crudModule?.useJoinedForm;
32
40
  // --- Components ---
33
41
  export const DisplayFieldRenderer = crudModule?.DisplayFieldRenderer;
34
42
  export const FormFieldRenderer = crudModule?.FormFieldRenderer;
@@ -39,4 +47,5 @@ export const CrudCard = crudModule?.CrudCard;
39
47
  export const translateFieldLabel = crudModule?.translateFieldLabel;
40
48
  export const formatValue = crudModule?.formatValue;
41
49
  export const translateLabel = crudModule?.translateLabel;
42
- export const isFieldEditable = crudModule?.isFieldEditable;
50
+ export const applyFilters = crudModule?.applyFilters;
51
+ export const applySearch = crudModule?.applySearch;