@zealicsolutions/web-ui 1.0.140-beta.87 → 1.0.140-beta.89

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.
@@ -15,6 +15,6 @@ export type UseContainerDataScopeParams = {
15
15
  * This is used to check if array fields are empty at the current nesting level.
16
16
  *
17
17
  * @param params - Parameters containing path segments
18
- * @returns Current data scope as a record, or undefined if no data
18
+ * @returns Current data scope (can be object or array), or undefined if no data
19
19
  */
20
- export declare const useContainerDataScope: ({ nestedPathSegments, }: UseContainerDataScopeParams) => Record<string, unknown> | undefined;
20
+ export declare const useContainerDataScope: ({ nestedPathSegments, }: UseContainerDataScopeParams) => Record<string, unknown> | unknown[] | undefined;
@@ -5,13 +5,31 @@ import { ContainerComponentProps, Molecule } from '../types/types';
5
5
  */
6
6
  export declare const isEmptyStateContainer: (item: ContainerComponentProps | Molecule) => boolean;
7
7
  /**
8
- * Gets the replicatorFieldId from an empty_state container.
8
+ * Checks if an item is a replicator container.
9
+ */
10
+ export declare const isReplicatorContainer: (item: ContainerComponentProps | Molecule) => boolean;
11
+ /**
12
+ * Gets the replicatorFieldId from a container.
13
+ */
14
+ export declare const getReplicatorFieldId: (item: ContainerComponentProps | Molecule) => DmfId | undefined;
15
+ /**
16
+ * Finds the replicatorFieldId from sibling containers.
17
+ * If the empty_state has a sibling replicator, that's its context.
18
+ */
19
+ export declare const findSiblingReplicatorFieldId: (siblings: (ContainerComponentProps | Molecule)[]) => DmfId | undefined;
20
+ /**
21
+ * Gets the replicatorFieldId context for an empty_state container.
22
+ * First checks the container itself, then looks at siblings.
23
+ * @deprecated Use findSiblingReplicatorFieldId instead for sibling lookup
9
24
  */
10
25
  export declare const getEmptyStateReplicatorFieldId: (item: ContainerComponentProps | Molecule) => DmfId | undefined;
11
26
  /**
12
27
  * Checks if a specific array field is empty at the given scope.
28
+ * Handles cases where:
29
+ * 1. scope[replicatorFieldId] is the array
30
+ * 2. scope itself IS the array (when pmiObjectId === replicatorFieldId)
13
31
  */
14
- export declare const isArrayFieldEmptyAtScope: (scope: Record<string, unknown> | undefined, replicatorFieldId: DmfId) => boolean;
32
+ export declare const isArrayFieldEmptyAtScope: (scope: Record<string, unknown> | unknown[] | undefined, replicatorFieldId: DmfId) => boolean;
15
33
  export type UseEmptyStateFilteringParams = {
16
34
  /**
17
35
  * All container items (before visibility filtering)
@@ -64,4 +64,4 @@ export type OrganismContextProviderProps = React.PropsWithChildren<{} & Partial<
64
64
  /** Callback to toggle empty state preview */
65
65
  toggleEmptyStatePreview: (replicatorFieldId: string) => void;
66
66
  }>>;
67
- export declare const OrganismContextProvider: ({ initItems, children, submitHandler, formId, validations, editable, isPreview, organismBodyId, isFormInEditMode, organismMetadata, organismInfo, localStateObject, isConfigurationMode, onConfigurationItemHandler, selectedConfigurationItemId, currentStyleProperties, currentContentProperties, onInternalNavigation, routing, prefillData, loadRecordData, isEmptyDataState, forceEmptyStatePreview, previewingEmptyStates, toggleEmptyStatePreview, }: OrganismContextProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
67
+ export declare const OrganismContextProvider: ({ initItems, children, submitHandler, formId, validations, editable, isPreview, organismBodyId, isFormInEditMode, organismMetadata, organismInfo, localStateObject, isConfigurationMode, onConfigurationItemHandler, selectedConfigurationItemId, currentStyleProperties, currentContentProperties, onInternalNavigation, routing, prefillData, loadRecordData, isEmptyDataState: isEmptyDataStateProp, forceEmptyStatePreview, previewingEmptyStates, toggleEmptyStatePreview, }: OrganismContextProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;