@databiosphere/findable-ui 35.0.1 → 35.0.3

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "35.0.1"
2
+ ".": "35.0.3"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [35.0.3](https://github.com/DataBiosphere/findable-ui/compare/v35.0.2...v35.0.3) (2025-06-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix catalog and feature flag state in url on page refresh ([#520](https://github.com/DataBiosphere/findable-ui/issues/520)) ([#521](https://github.com/DataBiosphere/findable-ui/issues/521)) ([4f08211](https://github.com/DataBiosphere/findable-ui/commit/4f082111837530d8f045329867b276aaeb66d389))
9
+
10
+ ## [35.0.2](https://github.com/DataBiosphere/findable-ui/compare/v35.0.1...v35.0.2) (2025-06-03)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * fix explore state entity list type error ([#517](https://github.com/DataBiosphere/findable-ui/issues/517)) ([#518](https://github.com/DataBiosphere/findable-ui/issues/518)) ([bffe1cf](https://github.com/DataBiosphere/findable-ui/commit/bffe1cf876304e848a59353c726da889c1d59f97))
16
+
3
17
  ## [35.0.1](https://github.com/DataBiosphere/findable-ui/compare/v35.0.0...v35.0.1) (2025-06-03)
4
18
 
5
19
 
@@ -14,22 +14,25 @@ export function buildNextEntities(state, entityListType, nextEntityState) {
14
14
  for (const [entityPath, entity] of Object.entries(state.entities)) {
15
15
  // Grab the entity key for the entity.
16
16
  const entityKey = entity.entityKey;
17
- if (entityKey !== key) {
18
- // For entities that do not share the same key, leave the context unchanged.
19
- entities[entityPath] = entity;
20
- continue;
21
- }
22
17
  // Clone the entity context.
23
18
  const entityContext = { ...entity };
24
- // Update entity context with "shared" context (e.g. filterState).
25
- entityContext.query = buildQuery(entityPath, {
26
- ...nextEntityState,
19
+ // Build the params object.
20
+ // All entities share the same catalog and feature flag state.
21
+ // Filter state is default to an empty array and updated below,
22
+ // if the entity key matches the current entity key.
23
+ const params = {
27
24
  catalogState: state.catalogState,
28
25
  featureFlagState: state.featureFlagState,
29
- });
26
+ filterState: [],
27
+ };
28
+ // Update entity context with "shared" context (e.g. filterState).
29
+ if (entityKey === key) {
30
+ Object.assign(params, nextEntityState);
31
+ }
30
32
  // At some point, we may need to update the entity context with additional properties that
31
33
  // are not "shared" (e.g. column grouping).
32
34
  // For now, this is not needed and so we update entities with the updated entity context and continue.
35
+ entityContext.query = buildQuery(entityPath, params);
33
36
  entities[entityPath] = entityContext;
34
37
  }
35
38
  return entities;
@@ -142,7 +142,7 @@ function initEntities(entityPageState) {
142
142
  ...acc,
143
143
  [entityPath]: {
144
144
  entityKey: entityPageState[entityPath].categoryGroupConfigKey,
145
- query: {},
145
+ query: { entityListType: entityPath },
146
146
  },
147
147
  };
148
148
  }, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databiosphere/findable-ui",
3
- "version": "35.0.1",
3
+ "version": "35.0.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -24,25 +24,28 @@ export function buildNextEntities(
24
24
  // Grab the entity key for the entity.
25
25
  const entityKey = entity.entityKey;
26
26
 
27
- if (entityKey !== key) {
28
- // For entities that do not share the same key, leave the context unchanged.
29
- entities[entityPath] = entity;
30
- continue;
31
- }
32
-
33
27
  // Clone the entity context.
34
28
  const entityContext = { ...entity };
35
29
 
36
- // Update entity context with "shared" context (e.g. filterState).
37
- entityContext.query = buildQuery(entityPath, {
38
- ...nextEntityState,
30
+ // Build the params object.
31
+ // All entities share the same catalog and feature flag state.
32
+ // Filter state is default to an empty array and updated below,
33
+ // if the entity key matches the current entity key.
34
+ const params: EntityState = {
39
35
  catalogState: state.catalogState,
40
36
  featureFlagState: state.featureFlagState,
41
- });
37
+ filterState: [],
38
+ };
39
+
40
+ // Update entity context with "shared" context (e.g. filterState).
41
+ if (entityKey === key) {
42
+ Object.assign(params, nextEntityState);
43
+ }
42
44
 
43
45
  // At some point, we may need to update the entity context with additional properties that
44
46
  // are not "shared" (e.g. column grouping).
45
47
  // For now, this is not needed and so we update entities with the updated entity context and continue.
48
+ entityContext.query = buildQuery(entityPath, params);
46
49
  entities[entityPath] = entityContext;
47
50
  }
48
51
 
@@ -199,7 +199,7 @@ function initEntities(entityPageState: EntityPageStateMapper): EntitiesContext {
199
199
  ...acc,
200
200
  [entityPath]: {
201
201
  entityKey: entityPageState[entityPath].categoryGroupConfigKey,
202
- query: {},
202
+ query: { entityListType: entityPath },
203
203
  },
204
204
  };
205
205
  }, {} as EntitiesContext);