@fibery/views 26.0.4 → 26.0.6
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/lib/meta-validation.js +3 -4
- package/lib/private/board.d.ts +2 -1
- package/lib/private/board.js +4 -4
- package/lib/private/timeline.js +4 -4
- package/lib/unit-definitions/back-references-list.js +1 -1
- package/lib/unit-definitions/bool-checkbox.js +1 -1
- package/lib/unit-definitions/bool.js +1 -1
- package/lib/unit-definitions/color-input.js +1 -1
- package/lib/unit-definitions/comments-list.js +1 -1
- package/lib/unit-definitions/date-range-combobox.js +1 -1
- package/lib/unit-definitions/date-range.js +1 -1
- package/lib/unit-definitions/date-time-combobox.js +1 -1
- package/lib/unit-definitions/date.js +1 -1
- package/lib/unit-definitions/file-collection-count.js +1 -1
- package/lib/unit-definitions/file-compact-collection.js +1 -1
- package/lib/unit-definitions/file-reference.js +1 -1
- package/lib/unit-definitions/files-gallery.js +1 -1
- package/lib/unit-definitions/files-l-list-item.js +1 -1
- package/lib/unit-definitions/files-l-list.js +1 -1
- package/lib/unit-definitions/files-list-item.js +1 -1
- package/lib/unit-definitions/files-list.js +1 -1
- package/lib/unit-definitions/icon-button.js +1 -1
- package/lib/unit-definitions/json-input.js +1 -1
- package/lib/unit-definitions/number-input.js +1 -1
- package/lib/unit-definitions/reference-collection-combobox.js +1 -1
- package/lib/unit-definitions/reference-collection-list.js +1 -1
- package/lib/unit-definitions/reference-collection-view.js +1 -1
- package/lib/unit-definitions/reference-collection.js +1 -1
- package/lib/unit-definitions/reference-combobox.js +1 -1
- package/lib/unit-definitions/rich-text-document.js +1 -1
- package/lib/unit-definitions/text-input.js +1 -1
- package/lib/unit-definitions/text.js +1 -1
- package/lib/unit-definitions/user-role.js +1 -1
- package/lib/units/make-factory.js +2 -1
- package/package.json +7 -7
package/lib/meta-validation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InvalidMetaError } from "./errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { isEmptyObject, isObjectLike } from "@fibery/helpers/src/object";
|
|
3
3
|
import get from "lodash/get.js";
|
|
4
4
|
//#region src/meta-validation.ts
|
|
5
5
|
/**
|
|
@@ -22,7 +22,6 @@ const isMetaValid = (type, meta) => {
|
|
|
22
22
|
throw err;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const isEmptyObject = (m) => isRecord(m) && Object.keys(m).length === 0;
|
|
26
25
|
const genericValidator = (m) => {
|
|
27
26
|
if (m === null) return;
|
|
28
27
|
const items = get(m, "items");
|
|
@@ -30,7 +29,7 @@ const genericValidator = (m) => {
|
|
|
30
29
|
};
|
|
31
30
|
const validators = /* @__PURE__ */ new Map([
|
|
32
31
|
["document", (m) => {
|
|
33
|
-
if (m === null || m === void 0 || isEmptyObject(m)) return;
|
|
32
|
+
if (m === null || m === void 0 || isObjectLike(m) && isEmptyObject(m)) return;
|
|
34
33
|
if (typeof get(m, "documentSecret") !== "string") throw new InvalidMetaError("expected fibery/meta.documentSecret to be a string");
|
|
35
34
|
}],
|
|
36
35
|
["vizydrop/chart", () => {}],
|
|
@@ -39,7 +38,7 @@ const validators = /* @__PURE__ */ new Map([
|
|
|
39
38
|
["tlcanvas", () => {}],
|
|
40
39
|
["spreadsheet", () => {}],
|
|
41
40
|
["thread", (m) => {
|
|
42
|
-
if (isEmptyObject(m)) return;
|
|
41
|
+
if (isObjectLike(m) && isEmptyObject(m)) return;
|
|
43
42
|
const id = get(m, "id");
|
|
44
43
|
const typeId = get(m, "typeId");
|
|
45
44
|
if (typeof id !== "string" || typeof typeId !== "string") throw new InvalidMetaError("expected fibery/meta.id and fibery/meta.typeId to be strings");
|
package/lib/private/board.d.ts
CHANGED
|
@@ -51,7 +51,8 @@ type EnumsAxis<K extends string, E> = {
|
|
|
51
51
|
};
|
|
52
52
|
type Axis<From extends string, H, E> = H | EnumsAxis<From, E> | null | undefined;
|
|
53
53
|
export type EnumKeys<From extends string, To extends string> = {
|
|
54
|
-
|
|
54
|
+
/** null drops the holder; undefined keeps the key and holder as they are. */
|
|
55
|
+
mapKey: (key: From) => To | null | undefined;
|
|
55
56
|
dropEmpty: boolean;
|
|
56
57
|
visitUnits: boolean;
|
|
57
58
|
};
|
package/lib/private/board.js
CHANGED
|
@@ -28,8 +28,8 @@ function visitEnums(enums, visitor, { mapKey, dropEmpty, visitUnits: visitHolder
|
|
|
28
28
|
for (const key in enums) {
|
|
29
29
|
if (!Object.hasOwn(enums, key)) continue;
|
|
30
30
|
const nextKey = mapKey(key);
|
|
31
|
-
if (
|
|
32
|
-
entries.push([
|
|
31
|
+
if (nextKey === void 0) {
|
|
32
|
+
entries.push([key, enums[key]]);
|
|
33
33
|
continue;
|
|
34
34
|
}
|
|
35
35
|
const holder = nextKey === null ? null : visitQueryHolder(enums[key], visitor, visitHolderUnits);
|
|
@@ -124,12 +124,12 @@ const visitViewKeepingEnums = (view, visitor) => {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
const replaceIdsWithNamesInBoardView = (schema, view) => visitView(view, replaceIdsWithNamesViewVisitor(schema), {
|
|
127
|
-
mapKey: (typeId) => typeObjectById(schema, typeId)
|
|
127
|
+
mapKey: (typeId) => (typeObjectById(schema, typeId) ?? typeObjectByName(schema, typeId))?.name,
|
|
128
128
|
dropEmpty: false,
|
|
129
129
|
visitUnits: true
|
|
130
130
|
});
|
|
131
131
|
const replaceNamesWithIdsInBoardView = (schema, view) => visitView(view, replaceNamesWithIdsViewVisitor(schema), {
|
|
132
|
-
mapKey: (typeName) => typeObjectByName(schema, typeName)
|
|
132
|
+
mapKey: (typeName) => (typeObjectByName(schema, typeName) ?? typeObjectById(schema, typeName))?.id,
|
|
133
133
|
dropEmpty: false,
|
|
134
134
|
visitUnits: true
|
|
135
135
|
});
|
package/lib/private/timeline.js
CHANGED
|
@@ -24,8 +24,8 @@ function visitEnums(enums, visitor, { mapKey, prune }) {
|
|
|
24
24
|
if (!Object.hasOwn(enums, key)) continue;
|
|
25
25
|
const nextKey = mapKey(key);
|
|
26
26
|
const value = enums[key];
|
|
27
|
-
if (
|
|
28
|
-
entries.push([
|
|
27
|
+
if (nextKey === void 0) {
|
|
28
|
+
entries.push([key, value]);
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
31
|
const axis = nextKey !== null && value ? visitAxisSingle(value, visitor) : null;
|
|
@@ -146,14 +146,14 @@ const deleteNotFoundVisitor = (schema) => ({
|
|
|
146
146
|
const replaceNamesWithIdsInTimelineView = (schema, view) => {
|
|
147
147
|
const visitor = replaceNamesWithIdsVisitor(schema);
|
|
148
148
|
return visitView(view, visitor, (y) => visitAxis(y, visitor, {
|
|
149
|
-
mapKey: (typeName) => typeObjectByName(schema, typeName)
|
|
149
|
+
mapKey: (typeName) => (typeObjectByName(schema, typeName) ?? typeObjectById(schema, typeName))?.id,
|
|
150
150
|
prune: false
|
|
151
151
|
}));
|
|
152
152
|
};
|
|
153
153
|
const replaceIdsWithNamesInTimelineView = (schema, view) => {
|
|
154
154
|
const visitor = replaceIdsWithNamesVisitor(schema);
|
|
155
155
|
return visitView(view, visitor, (y) => visitAxis(y, visitor, {
|
|
156
|
-
mapKey: (typeId) => typeObjectById(schema, typeId)
|
|
156
|
+
mapKey: (typeId) => (typeObjectById(schema, typeId) ?? typeObjectByName(schema, typeId))?.name,
|
|
157
157
|
prune: false
|
|
158
158
|
}));
|
|
159
159
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getEntityLinksListSelect } from "../field-utils/back-references.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { getFieldObjectByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
7
|
import { calculateDefaultOrderBy } from "@fibery/query-utils/src/query";
|
|
8
8
|
//#region src/unit-definitions/back-references-list.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/bool-checkbox.ts
|
|
7
7
|
const type = "bool-checkbox";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/bool.ts
|
|
7
7
|
const type = "bool";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
3
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
4
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
5
5
|
//#region src/unit-definitions/color-input.ts
|
|
6
6
|
const type = "color-input";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getQuerySelect } from "../field-utils/comments.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { getFieldObjectByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
7
|
//#region src/unit-definitions/comments-list.ts
|
|
8
8
|
const type = "comments-list";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getDateRangeExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/date-range-combobox.ts
|
|
7
7
|
const type = "date-range-combobox";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getDateRangeExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/date-range.ts
|
|
7
7
|
const type = "date-range";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/date-time-combobox.ts
|
|
7
7
|
const type = "date-time-combobox";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/date.ts
|
|
7
7
|
const type = "date";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getFilesSelect } from "../field-utils/file.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
|
|
7
7
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
8
8
|
import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/icon-button.ts
|
|
7
7
|
const type = "icon-button";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
3
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
4
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
5
5
|
//#region src/unit-definitions/json-input.ts
|
|
6
6
|
const type = "json-input";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getNumberExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/number-input.tsx
|
|
7
7
|
const type = "number-input";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
//#region src/unit-definitions/reference-collection-combobox.ts
|
|
6
6
|
const type = "reference-collection-combobox";
|
|
7
7
|
const ReferenceCollectionCombobox = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
//#region src/unit-definitions/reference-collection-list.tsx
|
|
6
6
|
const type = "reference-collection-list";
|
|
7
7
|
const ReferenceCollectionList = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
//#region src/unit-definitions/reference-collection-view.tsx
|
|
6
6
|
const type = "reference-collection-view";
|
|
7
7
|
const ReferenceCollectionView = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { REFERENCE_COLLECTION_LIMIT, calculateReferenceCollectionQuery } from "../field-utils/reference-collection.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
7
|
//#region src/unit-definitions/reference-collection.ts
|
|
8
8
|
const type = "reference-collection";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getReferenceExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
//#region src/unit-definitions/reference-combobox.ts
|
|
6
6
|
const type = "reference-combobox";
|
|
7
7
|
const ReferenceCombobox = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getRichTextQuerySelect } from "../field-utils/rich-text.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getSnippetExportValue } from "../unit-utils/get-export-value.js";
|
|
5
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
//#region src/unit-definitions/rich-text-document.ts
|
|
7
7
|
const type = "rich-text-document";
|
|
8
8
|
const RichTextDocument = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/text-input.tsx
|
|
7
7
|
const type = "text-input";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
2
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/text.ts
|
|
7
7
|
const type = "text";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getUserRoleByKey } from "../field-utils/user-role.js";
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
6
|
//#region src/unit-definitions/user-role.ts
|
|
7
7
|
const type = "user-role";
|
|
@@ -7,8 +7,9 @@ import { TextUIMeta } from "../field-utils/text.js";
|
|
|
7
7
|
import { isUserRoleField } from "../field-utils/user-role.js";
|
|
8
8
|
import { calculateUnitExpressionErrors, isUnitEnabled } from "../unit-utils/common.js";
|
|
9
9
|
import { NotFound } from "../unit-definitions/not-found.js";
|
|
10
|
-
import {
|
|
10
|
+
import { truthy } from "@fibery/helpers/src/_";
|
|
11
11
|
import { mergeDenormalizedSelects } from "@fibery/query-utils/src/select";
|
|
12
|
+
import { mapValues } from "@fibery/helpers/src/object";
|
|
12
13
|
import { single } from "@fibery/helpers/utils/array";
|
|
13
14
|
import { assert, traceError } from "@fibery/helpers/utils/trace";
|
|
14
15
|
import constant from "lodash/constant.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/views",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.6",
|
|
4
4
|
"description": "Operations on view objects",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Fibery",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@fibery/expression-utils": "17.0.
|
|
34
|
-
"@fibery/helpers": "
|
|
35
|
-
"@fibery/query-utils": "7.2.
|
|
36
|
-
"@fibery/schema": "13.1.
|
|
33
|
+
"@fibery/expression-utils": "17.0.4",
|
|
34
|
+
"@fibery/helpers": "6.0.0",
|
|
35
|
+
"@fibery/query-utils": "7.2.8",
|
|
36
|
+
"@fibery/schema": "13.1.4",
|
|
37
37
|
"date-fns": "3.6.0",
|
|
38
38
|
"lodash": "4.18.1",
|
|
39
39
|
"moment": "2.31.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@fibery/expression-utils": "^17.0.
|
|
43
|
-
"@fibery/schema": "^13.1.
|
|
42
|
+
"@fibery/expression-utils": "^17.0.4",
|
|
43
|
+
"@fibery/schema": "^13.1.4",
|
|
44
44
|
"lodash": "4.18.1"
|
|
45
45
|
}
|
|
46
46
|
}
|