@zealicsolutions/web-ui 1.1.22 → 1.1.24

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 (29) hide show
  1. package/dist/cjs/containers/ReplicatorContainer/ReplicatorContainer.d.ts +0 -2
  2. package/dist/cjs/contexts/ContainerRuntimeContext/types.d.ts +2 -0
  3. package/dist/cjs/helpers/useDataResolution.d.ts +15 -1
  4. package/dist/cjs/helpers/usePrefillDataCaptureValue.d.ts +3 -1
  5. package/dist/cjs/index.js +91 -91
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/esm/containers/FormContainer.js +1 -1
  8. package/dist/esm/containers/FormContainer.js.map +1 -1
  9. package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.d.ts +0 -2
  10. package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js +1 -1
  11. package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js.map +1 -1
  12. package/dist/esm/containers/ReplicatorContainer/ReplicatorFormSetup.js +1 -1
  13. package/dist/esm/containers/ReplicatorContainer/ReplicatorFormSetup.js.map +1 -1
  14. package/dist/esm/contexts/ContainerRuntimeContext/types.d.ts +2 -0
  15. package/dist/esm/contexts/OrganismContext/OrganismContextProvider.js +1 -1
  16. package/dist/esm/contexts/OrganismContext/OrganismContextProvider.js.map +1 -1
  17. package/dist/esm/helpers/formDataCapture.js +1 -1
  18. package/dist/esm/helpers/formDataCapture.js.map +1 -1
  19. package/dist/esm/helpers/useDataResolution.d.ts +15 -1
  20. package/dist/esm/helpers/useDataResolution.js +1 -1
  21. package/dist/esm/helpers/useDataResolution.js.map +1 -1
  22. package/dist/esm/helpers/usePrefillDataCaptureValue.d.ts +3 -1
  23. package/dist/esm/helpers/usePrefillDataCaptureValue.js +1 -1
  24. package/dist/esm/helpers/usePrefillDataCaptureValue.js.map +1 -1
  25. package/dist/esm/molecules/BaseMolecule.js +1 -1
  26. package/dist/esm/molecules/BaseMolecule.js.map +1 -1
  27. package/dist/esm/molecules/Button/hooks/useButtonAction.js +1 -1
  28. package/dist/esm/molecules/Button/hooks/useButtonAction.js.map +1 -1
  29. package/package.json +1 -1
@@ -22,8 +22,6 @@ export type ReplicatorContainerProps = {
22
22
  /** The actual container UUID (passed from parent Container) for variant lookup */
23
23
  containerId?: string;
24
24
  targetRwoId?: DmfId;
25
- /** Legacy/backend field name for replicator id */
26
- replicatorFieldId?: DmfId;
27
25
  /** Points to specific query result from webpage context */
28
26
  sourceDataPointerId?: string;
29
27
  nestedPathSegments?: PathSegment[];
@@ -2,6 +2,8 @@ export type DmfId = string;
2
2
  export type PathSegment = {
3
3
  dmfId: DmfId;
4
4
  index?: number;
5
+ /** Source data pointer ID for this segment level (used for webpage context data resolution) */
6
+ sourceDataPointerId?: string;
5
7
  };
6
8
  export type ContainerRuntimeContextValue = {
7
9
  containerId: string;
@@ -1,17 +1,31 @@
1
+ import type { WebpageContextType } from '../contexts/WebpageContext/WebpageContext';
1
2
  export declare function useResolveValue(reference: string, containerContext?: {
2
3
  rowData?: Record<string, unknown>;
3
4
  rowIndex?: number;
4
5
  }): unknown;
6
+ /**
7
+ * Resolve value from webpage context using nested path with sourceDataPointerId.
8
+ * Navigates through query results using the nested path structure.
9
+ *
10
+ * @param webpageContext - Webpage context with query results
11
+ * @param nestedPath - Nested path string (e.g., "query1.0.query2.1")
12
+ * @param fieldId - Field ID to resolve at the end of the path
13
+ * @returns Resolved value or undefined
14
+ */
15
+ export declare function resolveValueFromNestedPath(webpageContext: WebpageContextType | undefined, nestedPath: string, fieldId: string): unknown;
5
16
  /**
6
17
  * Hook for resolving data values using prioritized sources with automatic container context
7
18
  *
8
19
  * Automatically includes container runtime context for replicator row data.
9
20
  * Use this hook in molecules instead of useResolveValue for proper data resolution.
10
21
  *
22
+ * Supports nested path resolution using sourceDataPointerId from container runtime.
23
+ *
11
24
  * @param fieldId - The field ID to resolve
25
+ * @param nestedPath - Optional nested path string for webpage context navigation (e.g., "query1.0.query2.1")
12
26
  * @returns The resolved value
13
27
  */
14
- export declare function useResolveData(fieldId: string): unknown;
28
+ export declare function useResolveData(fieldId: string, nestedPath?: string): unknown;
15
29
  /**
16
30
  * Hook for resolving data values specifically for presentation/display purposes.
17
31
  *
@@ -3,6 +3,8 @@ import { DataCaptureValueKey } from './formDataCapture';
3
3
  export type PrefillDataCaptureOptions = {
4
4
  name: string;
5
5
  sourceDataModelField?: string;
6
+ /** Nested path string for data resolution (e.g., "query1.0.query2.1") */
7
+ nestedPath?: string;
6
8
  form?: Pick<UseFormReturn<Record<string, unknown>>, 'getValues' | 'setValue' | 'formState'> | null;
7
9
  fallbackKey?: DataCaptureValueKey;
8
10
  enabled?: boolean;
@@ -12,4 +14,4 @@ export type PrefillDataCaptureOptions = {
12
14
  shouldTouch?: boolean;
13
15
  shouldValidate?: boolean;
14
16
  };
15
- export declare const usePrefillDataCaptureValue: ({ name, sourceDataModelField, form, fallbackKey, enabled, mapValue, skipIfNull, shouldDirty, shouldTouch, shouldValidate, }: PrefillDataCaptureOptions) => unknown;
17
+ export declare const usePrefillDataCaptureValue: ({ name, sourceDataModelField, nestedPath: explicitNestedPath, form, fallbackKey, enabled, mapValue, skipIfNull, shouldDirty, shouldTouch, shouldValidate, }: PrefillDataCaptureOptions) => unknown;