@fibery/views 24.0.0 → 25.0.0

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.
@@ -88,32 +88,23 @@ const replaceNamesWithIdsInGroupByExpression = (schema, groupByExpression, fromT
88
88
  const visitor = replaceNamesWithIdsVisitor(typeObject);
89
89
  return Object.fromEntries(Object.entries(groupByExpression).map(([index, { expression }]) => [index, { expression: visitor.visitExpression(expression) }]));
90
90
  };
91
- const replaceHideHierarchiesWithoutType = (smartFolder, replaceType) => {
92
- const targetType = get(smartFolder, ["fibery/meta", "hideHierarchiesWithoutType"]);
93
- if (typeof targetType !== "string") return smartFolder;
94
- const replacedType = replaceType(targetType);
95
- if (!replacedType) return smartFolder;
96
- return immutableUpdate(smartFolder, { "fibery/meta": { hideHierarchiesWithoutType: { $set: replacedType } } });
97
- };
98
91
  const replaceNamesWithIdsInSmartFolder = (schema, smartFolder) => {
99
- const replacedSmartFolder = visitSmartFolder(smartFolder, {
92
+ return visitSmartFolder(smartFolder, {
100
93
  visitQueryExpression: (query) => replaceNamesWithIdsInQueryExpression(schema, query),
101
94
  visitFilter: (fromType, expression) => replaceNamesWithIdsInFilter(schema, fromType, expression),
102
95
  visitGroupByExpression: (groupBy, fromType) => replaceNamesWithIdsInGroupByExpression(schema, groupBy, fromType),
103
96
  visitExpression: (fromType, expression) => replaceNamesWithIdsInExpression(schema, fromType, expression),
104
97
  visitUnitGroupKey: (unitGroupKey) => replaceNamesWithIdsInUnitGroupKey(unitGroupKey, schema)
105
98
  });
106
- return replaceHideHierarchiesWithoutType(replacedSmartFolder, (type) => schema.getTypeObjectByName(type)?.id);
107
99
  };
108
100
  const replaceIdsWithNamesInSmartFolder = (schema, smartFolder) => {
109
- const replacedSmartFolder = visitSmartFolder(smartFolder, {
101
+ return visitSmartFolder(smartFolder, {
110
102
  visitQueryExpression: (query) => replaceIdsWithNamesInQueryExpression(schema, query),
111
103
  visitFilter: (fromType, expression) => replaceIdsWithNamesInFilter(schema, fromType, expression),
112
104
  visitGroupByExpression: (groupBy, fromType) => replaceIdsWithNamesInGroupByExpression(schema, groupBy, fromType),
113
105
  visitExpression: (fromType, expression) => replaceIdsWithNamesInExpression(schema, fromType, expression),
114
106
  visitUnitGroupKey: (unitGroupKey) => replaceIdsWithNamesInUnitGroupKey(unitGroupKey, getFieldObjectsById(smartFolder, schema))
115
107
  });
116
- return replaceHideHierarchiesWithoutType(replacedSmartFolder, (type) => schema.getTypeObjectById(type)?.name);
117
108
  };
118
109
  const deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder = (schema, smartFolder) => visitSmartFolder(smartFolder, {
119
110
  visitQueryExpression: (query) => deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression(schema, query),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/views",
3
- "version": "24.0.0",
3
+ "version": "25.0.0",
4
4
  "description": "Operations on view objects",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Fibery",
@@ -33,14 +33,14 @@
33
33
  "date-fns": "2.29.2",
34
34
  "lodash": "4.17.21",
35
35
  "moment": "2.29.4",
36
- "@fibery/expression-utils": "14.0.0",
37
- "@fibery/helpers": "3.4.0",
38
- "@fibery/schema": "11.3.0",
39
- "@fibery/query-utils": "6.0.0"
36
+ "@fibery/expression-utils": "15.0.0",
37
+ "@fibery/helpers": "4.0.0",
38
+ "@fibery/query-utils": "7.0.0",
39
+ "@fibery/schema": "12.0.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@fibery/expression-utils": "^14.0.0",
43
- "@fibery/schema": "^11.3.0",
42
+ "@fibery/expression-utils": "^15.0.0",
43
+ "@fibery/schema": "^12.0.0",
44
44
  "immutability-helper": "^2.4.0",
45
45
  "lodash": "4.17.21"
46
46
  }