@zealicsolutions/web-ui 1.0.140-beta.92 → 1.0.140-beta.93
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/containers/hooks/useEmptyStateFiltering.d.ts +16 -32
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/_virtual/index3.js +1 -1
- package/dist/esm/_virtual/index4.js +1 -1
- package/dist/esm/containers/hooks/useEmptyStateFiltering.d.ts +16 -32
- package/dist/esm/containers/hooks/useEmptyStateFiltering.js +1 -1
- package/dist/esm/containers/hooks/useEmptyStateFiltering.js.map +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/package.json +1 -1
|
@@ -5,31 +5,16 @@ import { ContainerComponentProps, Molecule } from '../types/types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const isEmptyStateContainer: (item: ContainerComponentProps | Molecule) => boolean;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare const isReplicatorContainer: (item: ContainerComponentProps | Molecule) => boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Gets the replicatorFieldId from a container.
|
|
8
|
+
* Gets the replicatorFieldId from a container (works for any container type).
|
|
13
9
|
*/
|
|
14
10
|
export declare const getReplicatorFieldId: (item: ContainerComponentProps | Molecule) => DmfId | undefined;
|
|
15
11
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
24
|
-
*/
|
|
25
|
-
export declare const getEmptyStateReplicatorFieldId: (item: ContainerComponentProps | Molecule) => DmfId | undefined;
|
|
26
|
-
/**
|
|
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)
|
|
12
|
+
* Checks if a specific field is empty at the given data scope.
|
|
13
|
+
* Handles:
|
|
14
|
+
* 1. scope[fieldId] - nested field lookup
|
|
15
|
+
* 2. scope itself IS the array (when at root and pmiObjectId === replicatorFieldId)
|
|
31
16
|
*/
|
|
32
|
-
export declare const
|
|
17
|
+
export declare const isFieldEmptyAtScope: (scope: Record<string, unknown> | unknown[] | undefined, fieldId: DmfId) => boolean;
|
|
33
18
|
export type UseEmptyStateFilteringParams = {
|
|
34
19
|
/**
|
|
35
20
|
* All container items (before visibility filtering)
|
|
@@ -54,25 +39,24 @@ export type EmptyStateFilterResult = {
|
|
|
54
39
|
*/
|
|
55
40
|
showingEmptyStateForFields: Set<string>;
|
|
56
41
|
/**
|
|
57
|
-
* Whether organism-level empty state is showing
|
|
42
|
+
* Whether organism-level empty state is showing (no replicatorFieldId)
|
|
58
43
|
*/
|
|
59
44
|
showOrganismLevelEmptyState: boolean;
|
|
60
45
|
};
|
|
61
46
|
/**
|
|
62
47
|
* Hook that filters container items based on empty state logic.
|
|
63
48
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
49
|
+
* ## Core Rule
|
|
50
|
+
* Empty state container ONLY affects its siblings (same level in children array).
|
|
51
|
+
* When an empty_state is visible, ALL its siblings are hidden.
|
|
67
52
|
*
|
|
68
|
-
*
|
|
69
|
-
* -
|
|
70
|
-
* -
|
|
71
|
-
* - Without replicatorFieldId: shows when organism data is empty
|
|
53
|
+
* ## Visibility Logic
|
|
54
|
+
* - **With replicatorFieldId**: Shows when that field is empty at current data scope
|
|
55
|
+
* - **Without replicatorFieldId**: Shows when organism-level data is empty (isEmptyDataState)
|
|
72
56
|
*
|
|
73
|
-
*
|
|
74
|
-
* -
|
|
75
|
-
* -
|
|
57
|
+
* ## Design Mode
|
|
58
|
+
* - All containers visible for editing (no filtering)
|
|
59
|
+
* - Preview mode can simulate empty state via forceEmptyStatePreview
|
|
76
60
|
*
|
|
77
61
|
* @param params - Parameters for filtering
|
|
78
62
|
* @returns Filtered items and empty state visibility info
|