@zealicsolutions/web-ui 1.0.140-beta.231 → 1.0.140-beta.232
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/cjs/components/Buttons/TextButton.d.ts +1 -1
- package/dist/cjs/components/Input/helpers.d.ts +2 -2
- package/dist/cjs/containers/Container.d.ts +1 -1
- package/dist/cjs/containers/ReplicatorContainer/ReplicatorContainer.d.ts +1 -1
- package/dist/cjs/containers/ReplicatorContainer/ReplicatorFormSetup.d.ts +3 -3
- package/dist/cjs/containers/hooks/useEmptyStateFiltering.d.ts +6 -6
- package/dist/cjs/containers/hooks/useEmptyStateVisibility.d.ts +6 -6
- package/dist/cjs/containers/styles.d.ts +1 -1
- package/dist/cjs/containers/types/types.d.ts +2 -2
- package/dist/cjs/contexts/ReplicatorRegistryContext/types.d.ts +1 -1
- package/dist/cjs/contexts/WebpageContext/WebpageContext.d.ts +0 -5
- package/dist/cjs/contexts/WebpageContext/WebpageContextProvider.d.ts +0 -9
- package/dist/cjs/helpers/useWebpageQueryChains.d.ts +0 -4
- package/dist/cjs/index.js +87 -87
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Button/Button.d.ts +1 -1
- package/dist/cjs/molecules/Drawer/styles.d.ts +1 -1
- package/dist/cjs/organisms/Calendar/queries/useCalendarData.d.ts +3 -1
- package/dist/cjs/organisms/Calendar/types.d.ts +19 -3
- package/dist/cjs/organisms/CalendarDataGrid/queries/useCalendarDataGridData.d.ts +3 -4
- package/dist/cjs/organisms/CalendarDataGrid/types.d.ts +11 -0
- package/dist/cjs/organisms/CalendarDataGrid/useCalendarDataGrid.d.ts +2 -2
- package/dist/cjs/organisms/DataGrid/hooks/useDataGridOrganism.d.ts +3 -3
- package/dist/cjs/organisms/DataGrid/queries/useDataGridRows.d.ts +6 -5
- package/dist/cjs/organisms/DataGrid/types/types.d.ts +10 -0
- package/dist/esm/_virtual/index3.js +1 -1
- package/dist/esm/_virtual/index4.js +1 -1
- package/dist/esm/components/Buttons/TextButton.d.ts +1 -1
- package/dist/esm/components/Input/helpers.d.ts +2 -2
- package/dist/esm/containers/Container.d.ts +1 -1
- package/dist/esm/containers/Container.js +5 -5
- package/dist/esm/containers/Container.js.map +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.d.ts +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js.map +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorFormSetup.d.ts +3 -3
- package/dist/esm/containers/ReplicatorContainer/ReplicatorFormSetup.js +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorFormSetup.js.map +1 -1
- package/dist/esm/containers/hooks/useEmptyStateFiltering.d.ts +6 -6
- package/dist/esm/containers/hooks/useEmptyStateFiltering.js +1 -1
- package/dist/esm/containers/hooks/useEmptyStateFiltering.js.map +1 -1
- package/dist/esm/containers/hooks/useEmptyStateVisibility.d.ts +6 -6
- package/dist/esm/containers/styles.d.ts +1 -1
- package/dist/esm/containers/types/types.d.ts +2 -2
- package/dist/esm/contexts/ReplicatorRegistryContext/ReplicatorRegistryContextProvider.js +1 -1
- package/dist/esm/contexts/ReplicatorRegistryContext/ReplicatorRegistryContextProvider.js.map +1 -1
- package/dist/esm/contexts/ReplicatorRegistryContext/types.d.ts +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContext.d.ts +0 -5
- package/dist/esm/contexts/WebpageContext/WebpageContext.js.map +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContextProvider.d.ts +0 -9
- package/dist/esm/contexts/WebpageContext/WebpageContextProvider.js +1 -1
- package/dist/esm/contexts/WebpageContext/WebpageContextProvider.js.map +1 -1
- package/dist/esm/helpers/useDataResolution.js +1 -1
- package/dist/esm/helpers/useDataResolution.js.map +1 -1
- package/dist/esm/helpers/useWebpageQueryChains.d.ts +0 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/molecules/Button/Button.d.ts +1 -1
- package/dist/esm/molecules/Drawer/styles.d.ts +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Accordion/Accordion.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Menu/Menu.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/MenuList/MenuList.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Select/SelectInput.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/SpeedDial/SpeedDial.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Tabs/Tabs.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/dist/esm/node_modules/@mui/material/node_modules/react-is/index.js +1 -1
- package/dist/esm/node_modules/classnames/index.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/arrows.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/dots.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/inner-slider.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/track.js +1 -1
- package/dist/esm/organisms/Calendar/queries/useCalendarData.d.ts +3 -1
- package/dist/esm/organisms/Calendar/queries/useCalendarData.js +1 -1
- package/dist/esm/organisms/Calendar/queries/useCalendarData.js.map +1 -1
- package/dist/esm/organisms/Calendar/types.d.ts +19 -3
- package/dist/esm/organisms/Calendar/useCalendarOrganism.js +1 -1
- package/dist/esm/organisms/Calendar/useCalendarOrganism.js.map +1 -1
- package/dist/esm/organisms/CalendarDataGrid/queries/useCalendarDataGridData.d.ts +3 -4
- package/dist/esm/organisms/CalendarDataGrid/queries/useCalendarDataGridData.js +1 -1
- package/dist/esm/organisms/CalendarDataGrid/queries/useCalendarDataGridData.js.map +1 -1
- package/dist/esm/organisms/CalendarDataGrid/types.d.ts +11 -0
- package/dist/esm/organisms/CalendarDataGrid/useCalendarDataGrid.d.ts +2 -2
- package/dist/esm/organisms/CalendarDataGrid/useCalendarDataGrid.js +1 -1
- package/dist/esm/organisms/CalendarDataGrid/useCalendarDataGrid.js.map +1 -1
- package/dist/esm/organisms/DataGrid/hooks/useDataGridOrganism.d.ts +3 -3
- package/dist/esm/organisms/DataGrid/hooks/useDataGridOrganism.js +1 -1
- package/dist/esm/organisms/DataGrid/hooks/useDataGridOrganism.js.map +1 -1
- package/dist/esm/organisms/DataGrid/queries/useDataGridRows.d.ts +6 -5
- package/dist/esm/organisms/DataGrid/queries/useDataGridRows.js +1 -1
- package/dist/esm/organisms/DataGrid/queries/useDataGridRows.js.map +1 -1
- package/dist/esm/organisms/DataGrid/types/types.d.ts +10 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export type TextButtonProps = Pick<BaseButtonProps, 'disabled' | 'onClick' | 'ch
|
|
|
10
10
|
textColor: string;
|
|
11
11
|
}>;
|
|
12
12
|
export declare const BaseTextButton: React.FC<TextButtonProps & React.AnchorHTMLAttributes<HTMLAnchorElement>>;
|
|
13
|
-
export declare const TextButton: import("@emotion/styled").StyledComponent<Pick<BaseButtonProps, "children" | "
|
|
13
|
+
export declare const TextButton: import("@emotion/styled").StyledComponent<Pick<BaseButtonProps, "children" | "onClick" | "disabled" | "size" | "colorTheme"> & Partial<{
|
|
14
14
|
buttonLink: string;
|
|
15
15
|
elementId: string;
|
|
16
16
|
$styles: StylesType;
|
|
@@ -10,7 +10,7 @@ export type MaskConfig = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const getSpecificInputProps: (type: string) => {
|
|
12
12
|
type?: HTMLInputTypeAttribute | undefined;
|
|
13
|
-
inputMode?: "
|
|
13
|
+
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
14
14
|
};
|
|
15
15
|
export declare const getMaskInputProps: (type?: string, config?: MaskConfig) => Pick<MaskedInputProps, 'pipe' | 'mask' | 'placeholder' | 'keepCharPositions'>;
|
|
16
16
|
export declare const getInputIconColor: ({ isEditMode, isFocused, isError, disabled, }: Pick<Partial<{
|
|
@@ -38,6 +38,6 @@ export declare const getInputIconColor: ({ isEditMode, isFocused, isError, disab
|
|
|
38
38
|
}>;
|
|
39
39
|
config?: MaskConfig | undefined;
|
|
40
40
|
state: import("containers").FormStateType;
|
|
41
|
-
}>, "disabled" | "
|
|
41
|
+
}>, "disabled" | "isError" | "isEditMode"> & {
|
|
42
42
|
isFocused: boolean;
|
|
43
43
|
}) => ThemeColors;
|
|
@@ -5,7 +5,7 @@ import { StyleVariantConfig } from './ReplicatorContainer/types';
|
|
|
5
5
|
export declare const Container: FC<PropsWithChildren<ContainerProps & {
|
|
6
6
|
id: string;
|
|
7
7
|
nestedPathSegments?: PathSegment[];
|
|
8
|
-
|
|
8
|
+
targetRwoId?: DmfId;
|
|
9
9
|
sourceDataPointerId?: string;
|
|
10
10
|
parentStyleVariantConfig?: StyleVariantConfig;
|
|
11
11
|
parentContainerWithVariantsId?: string;
|
|
@@ -21,7 +21,7 @@ export declare const getVariantContainerStyles: (config: VariantContainerConfig
|
|
|
21
21
|
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
25
|
/** Points to specific query result from webpage context */
|
|
26
26
|
sourceDataPointerId?: string;
|
|
27
27
|
nestedPathSegments?: PathSegment[];
|
|
@@ -3,8 +3,8 @@ import { PathSegment } from '../../contexts/ContainerRuntimeContext/types';
|
|
|
3
3
|
/** Default maximum number of replicator instances to prevent performance issues */
|
|
4
4
|
export declare const DEFAULT_MAX_REPLICATOR_INSTANCES = 50;
|
|
5
5
|
export interface ReplicatorFormSetupProps {
|
|
6
|
-
/** The
|
|
7
|
-
|
|
6
|
+
/** The targetRwoId (pmiObjectId) - used as the field array name */
|
|
7
|
+
targetRwoId: string;
|
|
8
8
|
/** Current nested path segments from parent containers */
|
|
9
9
|
nestedPathSegments?: PathSegment[];
|
|
10
10
|
/** Minimum instances allowed (defaults to 1 to ensure at least one instance is shown) */
|
|
@@ -36,7 +36,7 @@ export interface ReplicatorFormSetupProps {
|
|
|
36
36
|
* @usage
|
|
37
37
|
* Wrap a replicator Container in form organisms:
|
|
38
38
|
* ```tsx
|
|
39
|
-
* <ReplicatorFormSetup
|
|
39
|
+
* <ReplicatorFormSetup targetRwoId="visits">
|
|
40
40
|
* <Container type="replicator" ... />
|
|
41
41
|
* </ReplicatorFormSetup>
|
|
42
42
|
* ```
|
|
@@ -5,14 +5,14 @@ import { ContainerComponentProps, Molecule } from '../types/types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const isEmptyStateContainer: (item: ContainerComponentProps | Molecule) => boolean;
|
|
7
7
|
/**
|
|
8
|
-
* Gets the
|
|
8
|
+
* Gets the targetRwoId from a container (works for any container type).
|
|
9
9
|
*/
|
|
10
10
|
export declare const getReplicatorFieldId: (item: ContainerComponentProps | Molecule) => DmfId | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Checks if a specific field is empty at the given data scope.
|
|
13
13
|
* Handles:
|
|
14
14
|
* 1. scope[fieldId] - nested field lookup
|
|
15
|
-
* 2. scope itself IS the array (when at root and pmiObjectId ===
|
|
15
|
+
* 2. scope itself IS the array (when at root and pmiObjectId === targetRwoId)
|
|
16
16
|
*/
|
|
17
17
|
export declare const isFieldEmptyAtScope: (scope: Record<string, unknown> | unknown[] | undefined, fieldId: DmfId) => boolean;
|
|
18
18
|
export type UseEmptyStateFilteringParams = {
|
|
@@ -35,11 +35,11 @@ export type EmptyStateFilterResult = {
|
|
|
35
35
|
*/
|
|
36
36
|
filteredItems: (ContainerComponentProps | Molecule)[];
|
|
37
37
|
/**
|
|
38
|
-
* Set of
|
|
38
|
+
* Set of targetRwoIds that have their empty state currently showing
|
|
39
39
|
*/
|
|
40
40
|
showingEmptyStateForFields: Set<string>;
|
|
41
41
|
/**
|
|
42
|
-
* Whether organism-level empty state is showing (no
|
|
42
|
+
* Whether organism-level empty state is showing (no targetRwoId)
|
|
43
43
|
*/
|
|
44
44
|
showOrganismLevelEmptyState: boolean;
|
|
45
45
|
};
|
|
@@ -51,8 +51,8 @@ export type EmptyStateFilterResult = {
|
|
|
51
51
|
* When an empty_state is visible, ALL its siblings are hidden.
|
|
52
52
|
*
|
|
53
53
|
* ## Visibility Logic
|
|
54
|
-
* - **With
|
|
55
|
-
* - **Without
|
|
54
|
+
* - **With targetRwoId**: Shows when that field is empty at current data scope
|
|
55
|
+
* - **Without targetRwoId**: Shows when organism-level data is empty (isEmptyDataState)
|
|
56
56
|
*
|
|
57
57
|
* ## Design Mode
|
|
58
58
|
* - All containers visible for editing (no filtering)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DmfId, PathSegment } from '../../contexts/ContainerRuntimeContext/types';
|
|
2
2
|
export type EmptyStateConfig = {
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
4
|
+
* The targetRwoId this empty state is associated with.
|
|
5
5
|
* If undefined, applies to entire organism data.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
targetRwoId?: DmfId;
|
|
8
8
|
/**
|
|
9
9
|
* Current nested path segments from the container context.
|
|
10
10
|
*/
|
|
@@ -14,10 +14,10 @@ export type EmptyStateConfig = {
|
|
|
14
14
|
* Hook to determine if an empty_state container should be visible.
|
|
15
15
|
*
|
|
16
16
|
* Logic:
|
|
17
|
-
* - If
|
|
18
|
-
* - If
|
|
17
|
+
* - If targetRwoId is NOT set → check if entire organism data is empty
|
|
18
|
+
* - If targetRwoId IS set → check if that specific array field is empty at current path
|
|
19
19
|
*
|
|
20
|
-
* @param config - Configuration with
|
|
20
|
+
* @param config - Configuration with targetRwoId and nestedPathSegments
|
|
21
21
|
* @returns Object with visibility info and preview state management
|
|
22
22
|
*/
|
|
23
23
|
export declare const useEmptyStateVisibility: (config: EmptyStateConfig) => {
|
|
@@ -34,4 +34,4 @@ export declare const useEmptyStateVisibility: (config: EmptyStateConfig) => {
|
|
|
34
34
|
* Check if a specific array field is empty at the given path.
|
|
35
35
|
* Non-hook version for use outside React components.
|
|
36
36
|
*/
|
|
37
|
-
export declare const isArrayFieldEmpty: (dataRoot: Record<string, unknown>, nestedPathSegments: PathSegment[],
|
|
37
|
+
export declare const isArrayFieldEmpty: (dataRoot: Record<string, unknown>, nestedPathSegments: PathSegment[], targetRwoId: DmfId) => boolean;
|
|
@@ -33,7 +33,7 @@ export declare const ContainerWrapper: import("@emotion/styled").StyledComponent
|
|
|
33
33
|
activeOrganismIds: string[];
|
|
34
34
|
padding: import("containers/types/types").Padding;
|
|
35
35
|
enableBackgroundImage: boolean;
|
|
36
|
-
|
|
36
|
+
targetRwoId?: string | undefined;
|
|
37
37
|
sourceDataPointerId?: string | undefined;
|
|
38
38
|
minInstances?: number | undefined;
|
|
39
39
|
maxInstances?: number | undefined;
|
|
@@ -81,7 +81,7 @@ export type ContainerPropsType = Partial<{
|
|
|
81
81
|
activeOrganismIds: string[];
|
|
82
82
|
padding: Padding;
|
|
83
83
|
enableBackgroundImage: boolean;
|
|
84
|
-
|
|
84
|
+
targetRwoId?: DmfId;
|
|
85
85
|
sourceDataPointerId?: string;
|
|
86
86
|
minInstances?: number;
|
|
87
87
|
maxInstances?: number;
|
|
@@ -109,7 +109,7 @@ export type ContainerComponentProps = {
|
|
|
109
109
|
id: string;
|
|
110
110
|
instance: 'container';
|
|
111
111
|
type: ContainerType;
|
|
112
|
-
|
|
112
|
+
targetRwoId?: DmfId;
|
|
113
113
|
items: (ContainerComponentProps | Molecule)[];
|
|
114
114
|
config: Partial<{
|
|
115
115
|
wide: AdditionalContainerProps;
|
|
@@ -124,10 +124,5 @@ export type WebpageContextType = {
|
|
|
124
124
|
* Pre-fetched by Brand App Boilerplate and shared across the page
|
|
125
125
|
*/
|
|
126
126
|
queryResults?: Record<string, QueryResult>;
|
|
127
|
-
/**
|
|
128
|
-
* Volatile filter params (HLD-aligned webpage-scoped filter state)
|
|
129
|
-
* FE-only state that triggers query chain refetch when changed
|
|
130
|
-
*/
|
|
131
|
-
filterParams?: Record<string, unknown>;
|
|
132
127
|
};
|
|
133
128
|
export declare const WebpageContext: React.Context<WebpageContextType | undefined>;
|
|
@@ -14,21 +14,12 @@ export interface WebpageContextProviderProps extends Omit<WebpageContextType, 'd
|
|
|
14
14
|
* - multi_record data: placed under query chain ID keys
|
|
15
15
|
*/
|
|
16
16
|
webpageData?: Record<string, unknown>;
|
|
17
|
-
/**
|
|
18
|
-
* Volatile filter params (FE-only, not persisted)
|
|
19
|
-
* HLD-aligned: webpage-scoped filter state
|
|
20
|
-
*/
|
|
21
|
-
filterParams?: Record<string, unknown>;
|
|
22
17
|
/**
|
|
23
18
|
* Callback invoked when molecules publish context values.
|
|
24
19
|
* Used to notify parent components (e.g., CortexProvider) of dynamic context changes.
|
|
25
20
|
* @param context - The full dynamicContext object with all published values
|
|
26
21
|
*/
|
|
27
22
|
onDynamicContextChange?: (context: Record<string, unknown>) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Callback invoked when filter params change (for Brand App coordination)
|
|
30
|
-
*/
|
|
31
|
-
onFilterParamsChange?: (filterParams: Record<string, unknown>) => void;
|
|
32
23
|
/**
|
|
33
24
|
* Callback invoked when query chains need to be executed
|
|
34
25
|
*/
|
|
@@ -8,10 +8,6 @@ import { QueryResult } from '../contexts/WebpageContext/WebpageContext';
|
|
|
8
8
|
export interface UseWebpageQueryChainsReturn {
|
|
9
9
|
/** Query chain results by queryChainId */
|
|
10
10
|
queryResults: Record<string, QueryResult>;
|
|
11
|
-
/** Volatile filter state (FE-only, not persisted) */
|
|
12
|
-
filterParams: Record<string, unknown>;
|
|
13
|
-
/** Update filter params (volatile, triggers query chain refetch) */
|
|
14
|
-
setFilterParams: (updates: Record<string, unknown>) => Promise<void>;
|
|
15
11
|
/** Execute specific query chains with options */
|
|
16
12
|
executeQueryChains: (queryChainIds: string[], options?: ExecuteQueryChainsOptions) => Promise<void>;
|
|
17
13
|
}
|