@fibery/views 19.1.0 → 19.1.1

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.
@@ -4,5 +4,5 @@ export declare const getIsUserActiveSelect: ({ typeObject, contextPath, }: {
4
4
  typeObject: TypeObject;
5
5
  contextPath?: FieldExpression;
6
6
  }) => {
7
- [x: string]: (string | any[])[];
7
+ [x: string]: (string | (string | import("@fibery/expression-utils").MultiFieldAccess)[])[];
8
8
  } | null;
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getIsUserActiveSelect = void 0;
7
- const memoize_1 = __importDefault(require("lodash/memoize"));
4
+ const _1 = require("@fibery/helpers/src/_");
8
5
  const dynamic_keys_1 = require("../unit-utils/dynamic-keys");
9
- const getIsUserActiveQueryPredicate = (0, memoize_1.default)(({ typeObject, contextPath }) => {
6
+ const getIsUserActiveQueryPredicate = (0, _1.memoize)(({ typeObject, contextPath }) => {
10
7
  if (typeObject.name !== "fibery/user") {
11
8
  return null;
12
9
  }
@@ -18,9 +15,7 @@ const getIsUserActiveQueryPredicate = (0, memoize_1.default)(({ typeObject, cont
18
15
  key: (0, dynamic_keys_1.makeDynamicKey)(dynamic_keys_1.isUserActiveDynamicKeyPrefix),
19
16
  expression,
20
17
  };
21
- }, ({ typeObject, contextPath }) => {
22
- return `${typeObject.name}_${typeObject.version}_${contextPath.join(",")}`;
23
- });
18
+ }, ({ typeObject, contextPath }) => `${typeObject.name}_${typeObject.version}_${contextPath.join(",")}`);
24
19
  const getIsUserActiveSelect = ({ typeObject, contextPath = [], }) => {
25
20
  const isUserActiveQueryPredicate = getIsUserActiveQueryPredicate({ typeObject, contextPath });
26
21
  return isUserActiveQueryPredicate ? { [isUserActiveQueryPredicate.key]: isUserActiveQueryPredicate.expression } : null;
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getIsFinalStateSelect = exports.getWorkflowFieldObject = void 0;
7
4
  exports.isWorkflowType = isWorkflowType;
8
5
  exports.getWorkflowTypeSelect = getWorkflowTypeSelect;
9
- const memoize_1 = __importDefault(require("lodash/memoize"));
6
+ const _1 = require("@fibery/helpers/src/_");
10
7
  const dynamic_keys_1 = require("../unit-utils/dynamic-keys");
11
8
  function isWorkflowType(typeObject) {
12
9
  return typeObject.isEnum && typeObject.nameParts.namespace === "workflow";
@@ -25,7 +22,7 @@ const getWorkflowFieldObject = (typeObject) => {
25
22
  return workflowFieldObject;
26
23
  };
27
24
  exports.getWorkflowFieldObject = getWorkflowFieldObject;
28
- const getIsFinalStateQueryPredicate = (0, memoize_1.default)(({ typeObject, contextPath }) => {
25
+ const getIsFinalStateQueryPredicate = (0, _1.memoize)(({ typeObject, contextPath }) => {
29
26
  const workflowFieldObject = (0, exports.getWorkflowFieldObject)(typeObject);
30
27
  if (workflowFieldObject) {
31
28
  const pathToFinal = [...contextPath, workflowFieldObject.name, "workflow/Final"];
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.makeUnitDefinitionsFactory = void 0;
7
+ const _1 = require("@fibery/helpers/src/_");
7
8
  const array_1 = require("@fibery/helpers/utils/array");
8
9
  const trace_1 = require("@fibery/helpers/utils/trace");
9
10
  const select_1 = require("@fibery/query-utils/src/select");
@@ -12,7 +13,6 @@ const constant_1 = __importDefault(require("lodash/constant"));
12
13
  const flatMap_1 = __importDefault(require("lodash/flatMap"));
13
14
  const groupBy_1 = __importDefault(require("lodash/groupBy"));
14
15
  const isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));
15
- const mapValues_1 = __importDefault(require("lodash/mapValues"));
16
16
  const sortBy_1 = __importDefault(require("lodash/sortBy"));
17
17
  const avatar_1 = require("../field-utils/avatar");
18
18
  const back_references_1 = require("../field-utils/back-references");
@@ -203,7 +203,7 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
203
203
  ...getUnitsForField(typeObject.fieldObjectsByName["fibery/container-entity-type"]),
204
204
  ].filter(Boolean);
205
205
  };
206
- const unitDefinitionsByTypeLookup = (0, mapValues_1.default)((0, groupBy_1.default)(allUnitDefinitions, (x) => x.type), (value) => (0, array_1.single)(value));
206
+ const unitDefinitionsByTypeLookup = (0, _1.mapValues)((0, groupBy_1.default)(allUnitDefinitions, (x) => x.type), (value) => (0, array_1.single)(value));
207
207
  const getUnitLabel = (typeObject, unit) => {
208
208
  const unitDefinition = unitDefinitionsByTypeLookup[unit.type];
209
209
  if (!unitDefinition) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/views",
3
- "version": "19.1.0",
3
+ "version": "19.1.1",
4
4
  "private": false,
5
5
  "description": "Operations on view objects",
6
6
  "license": "UNLICENSED",
@@ -39,10 +39,10 @@
39
39
  "lodash": "4.17.21",
40
40
  "moment": "2.29.4",
41
41
  "@fibery/context-filters": "1.1.4",
42
- "@fibery/expression-utils": "9.7.1",
43
- "@fibery/query-utils": "1.1.6",
44
- "@fibery/schema": "10.2.16",
45
- "@fibery/helpers": "2.0.1"
42
+ "@fibery/expression-utils": "9.7.2",
43
+ "@fibery/query-utils": "1.1.7",
44
+ "@fibery/schema": "10.2.17",
45
+ "@fibery/helpers": "3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/core": "7.28.5",
@@ -52,8 +52,8 @@
52
52
  "@fibery/babel-preset": "7.4.2"
53
53
  },
54
54
  "peerDependencies": {
55
- "@fibery/expression-utils": "^9.7.1",
56
- "@fibery/schema": "^10.2.16",
55
+ "@fibery/expression-utils": "^9.7.2",
56
+ "@fibery/schema": "^10.2.17",
57
57
  "immutability-helper": "^2.4.0",
58
58
  "lodash": "4.17.21"
59
59
  },