@fibery/views 22.0.0 → 24.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.
- package/lib/field-utils/avatar.d.ts +1 -1
- package/lib/field-utils/comments.d.ts +1 -1
- package/lib/field-utils/enum-value.d.ts +2 -2
- package/lib/field-utils/icon.d.ts +1 -1
- package/lib/private/smart-folder.js +27 -14
- package/lib/private/utils.d.ts +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/index.js +2 -2
- 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/unit-utils/common.d.ts +1 -1
- package/lib/unit-utils/enums.d.ts +1 -1
- package/lib/units/board.d.ts +1 -1
- package/lib/units/canvas/all-units-data-definitions.js +1 -1
- package/lib/units/canvas/index.d.ts +1 -1
- package/lib/units/default.d.ts +1 -1
- package/lib/units/gantt.d.ts +1 -1
- package/lib/units/grid.d.ts +1 -1
- package/lib/units/grid.js +3 -3
- package/lib/units/list.d.ts +1 -1
- package/lib/units/make-factory.d.ts +1 -1
- package/lib/units/types.d.ts +2 -2
- package/package.json +7 -7
|
@@ -9,7 +9,7 @@ declare const getAvatarSelectQuery: ({ typeObject }: {
|
|
|
9
9
|
typeObject: TypeObject;
|
|
10
10
|
}) => {
|
|
11
11
|
[x: string]: "__NOTHING_INTERESTING__TitleField__" | "fibery/id" | {
|
|
12
|
-
"q/from":
|
|
12
|
+
"q/from": import("@fibery/schema").FieldName[];
|
|
13
13
|
"q/limit": string;
|
|
14
14
|
"q/select": import("@fibery/expression-utils").Select;
|
|
15
15
|
};
|
|
@@ -29,7 +29,7 @@ declare const getCommentsListSelect: (typeObject: TypeObject) => {
|
|
|
29
29
|
};
|
|
30
30
|
declare const getQuerySelect: (fieldObject: FieldObject) => {
|
|
31
31
|
[x: string]: {
|
|
32
|
-
"q/from":
|
|
32
|
+
"q/from": import("@fibery/schema").FieldName[];
|
|
33
33
|
"q/select": {
|
|
34
34
|
"fibery/id": "fibery/id";
|
|
35
35
|
"fibery/public-id": "fibery/public-id";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NumberFormat } from "./number.js";
|
|
2
|
-
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
|
+
import { FieldObject, SpaceName, TypeObject } from "@fibery/schema";
|
|
3
3
|
//#region src/field-utils/enum-value.d.ts
|
|
4
4
|
declare const enumNumberFieldName = "Value";
|
|
5
|
-
declare const getEnumNumberFieldName: (namespace:
|
|
5
|
+
declare const getEnumNumberFieldName: (namespace: SpaceName) => string;
|
|
6
6
|
declare const defaultEnumNumberFieldMeta: {
|
|
7
7
|
numberFormat: NumberFormat;
|
|
8
8
|
numberPrecision: number;
|
|
@@ -7,7 +7,7 @@ declare const isIconExtensionField: (fieldObject: FieldObject) => boolean;
|
|
|
7
7
|
declare const getEntityIconSelect: ({ typeObject }: {
|
|
8
8
|
typeObject: TypeObject;
|
|
9
9
|
}) => {
|
|
10
|
-
[x: string]:
|
|
10
|
+
[x: string]: import("@fibery/schema").FieldName;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
export { ICON_EXTENSION_FIELD, ICON_MIXIN_NAME, getEntityIconSelect, isIconExtensionEnabledType, isIconExtensionField };
|
|
@@ -88,20 +88,33 @@ 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
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
+
const replaceNamesWithIdsInSmartFolder = (schema, smartFolder) => {
|
|
99
|
+
const replacedSmartFolder = visitSmartFolder(smartFolder, {
|
|
100
|
+
visitQueryExpression: (query) => replaceNamesWithIdsInQueryExpression(schema, query),
|
|
101
|
+
visitFilter: (fromType, expression) => replaceNamesWithIdsInFilter(schema, fromType, expression),
|
|
102
|
+
visitGroupByExpression: (groupBy, fromType) => replaceNamesWithIdsInGroupByExpression(schema, groupBy, fromType),
|
|
103
|
+
visitExpression: (fromType, expression) => replaceNamesWithIdsInExpression(schema, fromType, expression),
|
|
104
|
+
visitUnitGroupKey: (unitGroupKey) => replaceNamesWithIdsInUnitGroupKey(unitGroupKey, schema)
|
|
105
|
+
});
|
|
106
|
+
return replaceHideHierarchiesWithoutType(replacedSmartFolder, (type) => schema.getTypeObjectByName(type)?.id);
|
|
107
|
+
};
|
|
108
|
+
const replaceIdsWithNamesInSmartFolder = (schema, smartFolder) => {
|
|
109
|
+
const replacedSmartFolder = visitSmartFolder(smartFolder, {
|
|
110
|
+
visitQueryExpression: (query) => replaceIdsWithNamesInQueryExpression(schema, query),
|
|
111
|
+
visitFilter: (fromType, expression) => replaceIdsWithNamesInFilter(schema, fromType, expression),
|
|
112
|
+
visitGroupByExpression: (groupBy, fromType) => replaceIdsWithNamesInGroupByExpression(schema, groupBy, fromType),
|
|
113
|
+
visitExpression: (fromType, expression) => replaceIdsWithNamesInExpression(schema, fromType, expression),
|
|
114
|
+
visitUnitGroupKey: (unitGroupKey) => replaceIdsWithNamesInUnitGroupKey(unitGroupKey, getFieldObjectsById(smartFolder, schema))
|
|
115
|
+
});
|
|
116
|
+
return replaceHideHierarchiesWithoutType(replacedSmartFolder, (type) => schema.getTypeObjectById(type)?.name);
|
|
117
|
+
};
|
|
105
118
|
const deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder = (schema, smartFolder) => visitSmartFolder(smartFolder, {
|
|
106
119
|
visitQueryExpression: (query) => deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression(schema, query),
|
|
107
120
|
visitGroupByExpression: (groupBy, fromType, removedItems) => deleteExpressionWithNotFoundFieldsOrTypesInGroupByExpression(schema, groupBy, fromType, removedItems),
|
package/lib/private/utils.d.ts
CHANGED
|
@@ -38,23 +38,23 @@ declare const replaceNamesWithIdsInExpression: (schema: Schema, fromType: string
|
|
|
38
38
|
declare const replaceIdsWithNamesInExpression: (schema: Schema, fromTypeId: string, expression: Expression) => any;
|
|
39
39
|
declare const visitViewUnit: (fromType: string, unit: Unit, visitor: Pick<ViewVisitor, "visitExpression">) => Unit;
|
|
40
40
|
declare const visitContextExpression: (fromType: string, contextExpression: Expression | null | undefined, visitor: Pick<ViewVisitor, "visitExpression" | "visitContextExpression">) => string | Expression[] | null | undefined;
|
|
41
|
-
declare const replaceIdsWithNamesInQueryExpression: (schema: Schema, queryExpression: Query) => {
|
|
41
|
+
declare const replaceIdsWithNamesInQueryExpression: (schema: Schema, queryExpression: Query) => Query | {
|
|
42
42
|
"q/select"?: Expression | import("@fibery/expression-utils").Select;
|
|
43
43
|
"q/offset"?: number;
|
|
44
44
|
"q/order-by"?: any;
|
|
45
45
|
"q/limit"?: import("@fibery/expression-utils/src/types").QueryLimit;
|
|
46
46
|
"q/where"?: any;
|
|
47
|
-
"q/from":
|
|
47
|
+
"q/from": import("@fibery/schema").TypeName;
|
|
48
48
|
};
|
|
49
49
|
declare const replaceIdsWithNamesInFilter: (schema: Schema, fromType: string, filter: ViewFilter | null) => ViewFilter | null;
|
|
50
50
|
declare const replaceNamesWithIdsInFilter: (schema: Schema, fromType: string, filter: ViewFilter | null) => ViewFilter | null;
|
|
51
|
-
declare const replaceNamesWithIdsInQueryExpression: (schema: Schema, queryExpression: Query) => {
|
|
51
|
+
declare const replaceNamesWithIdsInQueryExpression: (schema: Schema, queryExpression: Query) => Query | {
|
|
52
52
|
"q/select"?: Expression | import("@fibery/expression-utils").Select;
|
|
53
53
|
"q/offset"?: number;
|
|
54
54
|
"q/order-by"?: any;
|
|
55
55
|
"q/limit"?: import("@fibery/expression-utils/src/types").QueryLimit;
|
|
56
56
|
"q/where"?: any;
|
|
57
|
-
"q/from":
|
|
57
|
+
"q/from": import("@fibery/schema").TypeId;
|
|
58
58
|
};
|
|
59
59
|
declare const deleteExpressionWithNotFoundFieldsOrTypesInExpression: (schema: Schema, fromType: string, expression: Expression) => any;
|
|
60
60
|
declare const resetContextExpressionIfBroken: (schema: Schema, fromType: string, expression: Expression, defaultExpression: Expression) => any;
|
|
@@ -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,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/icon-button.ts
|
|
6
6
|
const type = "icon-button";
|
|
@@ -3,11 +3,12 @@ import { AvatarCollection } from "./avatar-collection.js";
|
|
|
3
3
|
import { Avatar } from "./avatar.js";
|
|
4
4
|
import { Bool } from "./bool.js";
|
|
5
5
|
import { CollectionCount } from "./collection-count.js";
|
|
6
|
-
import { Date } from "./date.js";
|
|
7
6
|
import { DateRange } from "./date-range.js";
|
|
7
|
+
import { Date } from "./date.js";
|
|
8
8
|
import { Text } from "./text.js";
|
|
9
9
|
import { Email } from "./email.js";
|
|
10
10
|
import { Emoji } from "./emoji.js";
|
|
11
|
+
import { FileCollectionCount } from "./file-collection-count.js";
|
|
11
12
|
import { IconButton } from "./icon-button.js";
|
|
12
13
|
import { Id } from "./id.js";
|
|
13
14
|
import { Location } from "./location.js";
|
|
@@ -25,7 +26,6 @@ import { TypeIcon } from "./type-icon.js";
|
|
|
25
26
|
import { Url } from "./url.js";
|
|
26
27
|
import { UserButton } from "./user-button.js";
|
|
27
28
|
import { UserRole } from "./user-role.js";
|
|
28
|
-
import { FileCollectionCount } from "./file-collection-count.js";
|
|
29
29
|
//#region src/unit-definitions/index.ts
|
|
30
30
|
var unit_definitions_exports = /* @__PURE__ */ __exportAll({
|
|
31
31
|
Avatar: () => Avatar,
|
|
@@ -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";
|
|
@@ -13,7 +13,7 @@ declare function getEnumIconSelect(typeObject: TypeObject): {
|
|
|
13
13
|
};
|
|
14
14
|
declare const getEnumsRequest: (enumTypeObject: TypeObject) => {
|
|
15
15
|
query: {
|
|
16
|
-
"q/from":
|
|
16
|
+
"q/from": import("@fibery/schema").TypeName;
|
|
17
17
|
"q/select": {
|
|
18
18
|
"workflow/Final"?: string | undefined;
|
|
19
19
|
"workflow/Type"?: string | undefined;
|
package/lib/units/board.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => strin
|
|
|
24
24
|
type: "user-button" | "icon-button";
|
|
25
25
|
data: {
|
|
26
26
|
id: string;
|
|
27
|
-
typeId:
|
|
27
|
+
typeId: import("@fibery/schema").TypeId;
|
|
28
28
|
};
|
|
29
29
|
label: string;
|
|
30
30
|
hideWhenEmpty?: boolean;
|
|
@@ -2,8 +2,8 @@ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { Avatar } from "../../unit-definitions/avatar.js";
|
|
3
3
|
import { Bool } from "../../unit-definitions/bool.js";
|
|
4
4
|
import { CollectionCount } from "../../unit-definitions/collection-count.js";
|
|
5
|
-
import { Date } from "../../unit-definitions/date.js";
|
|
6
5
|
import { DateRange } from "../../unit-definitions/date-range.js";
|
|
6
|
+
import { Date } from "../../unit-definitions/date.js";
|
|
7
7
|
import { Text } from "../../unit-definitions/text.js";
|
|
8
8
|
import { Email } from "../../unit-definitions/email.js";
|
|
9
9
|
import { Emoji } from "../../unit-definitions/emoji.js";
|
|
@@ -27,7 +27,7 @@ declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => strin
|
|
|
27
27
|
type: "user-button" | "icon-button";
|
|
28
28
|
data: {
|
|
29
29
|
id: string;
|
|
30
|
-
typeId:
|
|
30
|
+
typeId: import("@fibery/schema").TypeId;
|
|
31
31
|
};
|
|
32
32
|
label: string;
|
|
33
33
|
hideWhenEmpty?: boolean;
|
package/lib/units/default.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => strin
|
|
|
28
28
|
type: "user-button" | "icon-button";
|
|
29
29
|
data: {
|
|
30
30
|
id: string;
|
|
31
|
-
typeId:
|
|
31
|
+
typeId: import("@fibery/schema").TypeId;
|
|
32
32
|
};
|
|
33
33
|
label: string;
|
|
34
34
|
hideWhenEmpty?: boolean;
|
package/lib/units/gantt.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => strin
|
|
|
28
28
|
type: "user-button" | "icon-button";
|
|
29
29
|
data: {
|
|
30
30
|
id: string;
|
|
31
|
-
typeId:
|
|
31
|
+
typeId: import("@fibery/schema").TypeId;
|
|
32
32
|
};
|
|
33
33
|
label: string;
|
|
34
34
|
hideWhenEmpty?: boolean;
|
package/lib/units/grid.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => strin
|
|
|
27
27
|
type: "user-button" | "icon-button";
|
|
28
28
|
data: {
|
|
29
29
|
id: string;
|
|
30
|
-
typeId:
|
|
30
|
+
typeId: import("@fibery/schema").TypeId;
|
|
31
31
|
};
|
|
32
32
|
label: string;
|
|
33
33
|
hideWhenEmpty?: boolean;
|
package/lib/units/grid.js
CHANGED
|
@@ -3,11 +3,13 @@ import { AvatarCollection } from "../unit-definitions/avatar-collection.js";
|
|
|
3
3
|
import { Avatar } from "../unit-definitions/avatar.js";
|
|
4
4
|
import { Bool } from "../unit-definitions/bool.js";
|
|
5
5
|
import { CollectionCount } from "../unit-definitions/collection-count.js";
|
|
6
|
-
import { Date } from "../unit-definitions/date.js";
|
|
7
6
|
import { DateRange } from "../unit-definitions/date-range.js";
|
|
7
|
+
import { Date } from "../unit-definitions/date.js";
|
|
8
8
|
import { Text } from "../unit-definitions/text.js";
|
|
9
9
|
import { Email } from "../unit-definitions/email.js";
|
|
10
10
|
import { Emoji } from "../unit-definitions/emoji.js";
|
|
11
|
+
import { FileCollectionCount } from "../unit-definitions/file-collection-count.js";
|
|
12
|
+
import { FilesGallery } from "../unit-definitions/files-gallery.js";
|
|
11
13
|
import { IconButton } from "../unit-definitions/icon-button.js";
|
|
12
14
|
import { Id } from "../unit-definitions/id.js";
|
|
13
15
|
import { Location } from "../unit-definitions/location.js";
|
|
@@ -25,9 +27,7 @@ import { TypeIcon } from "../unit-definitions/type-icon.js";
|
|
|
25
27
|
import { Url } from "../unit-definitions/url.js";
|
|
26
28
|
import { UserButton } from "../unit-definitions/user-button.js";
|
|
27
29
|
import { UserRole } from "../unit-definitions/user-role.js";
|
|
28
|
-
import { FileCollectionCount } from "../unit-definitions/file-collection-count.js";
|
|
29
30
|
import { makeUnitDefinitionsFactory } from "./make-factory.js";
|
|
30
|
-
import { FilesGallery } from "../unit-definitions/files-gallery.js";
|
|
31
31
|
import { FileReference } from "@fibery/views/src/unit-definitions/file-reference";
|
|
32
32
|
//#region src/units/grid.ts
|
|
33
33
|
var grid_exports = /* @__PURE__ */ __exportAll({
|
package/lib/units/list.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => strin
|
|
|
30
30
|
type: "user-button" | "icon-button";
|
|
31
31
|
data: {
|
|
32
32
|
id: string;
|
|
33
|
-
typeId:
|
|
33
|
+
typeId: import("@fibery/schema").TypeId;
|
|
34
34
|
};
|
|
35
35
|
label: string;
|
|
36
36
|
hideWhenEmpty?: boolean;
|
|
@@ -23,7 +23,7 @@ declare const makeUnitDefinitionsFactory: (allUnitDefinitions: Record<string, An
|
|
|
23
23
|
type: "user-button" | "icon-button";
|
|
24
24
|
data: {
|
|
25
25
|
id: string;
|
|
26
|
-
typeId:
|
|
26
|
+
typeId: import("@fibery/schema").TypeId;
|
|
27
27
|
};
|
|
28
28
|
label: string;
|
|
29
29
|
hideWhenEmpty?: boolean;
|
package/lib/units/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
|
-
import { Schema, TypeObject } from "@fibery/schema";
|
|
2
|
+
import { Schema, TypeId, TypeObject } from "@fibery/schema";
|
|
3
3
|
import { FiberyObject } from "@fibery/expression-utils/src/types";
|
|
4
4
|
//#region src/units/types.d.ts
|
|
5
5
|
type ButtonUnit = {
|
|
@@ -7,7 +7,7 @@ type ButtonUnit = {
|
|
|
7
7
|
type: "user-button" | "icon-button";
|
|
8
8
|
data: {
|
|
9
9
|
id: string;
|
|
10
|
-
typeId:
|
|
10
|
+
typeId: TypeId;
|
|
11
11
|
};
|
|
12
12
|
label: string;
|
|
13
13
|
checked?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/views",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.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": "
|
|
37
|
-
"@fibery/helpers": "3.
|
|
38
|
-
"@fibery/
|
|
39
|
-
"@fibery/
|
|
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"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@fibery/expression-utils": "^
|
|
43
|
-
"@fibery/schema": "^11.
|
|
42
|
+
"@fibery/expression-utils": "^14.0.0",
|
|
43
|
+
"@fibery/schema": "^11.3.0",
|
|
44
44
|
"immutability-helper": "^2.4.0",
|
|
45
45
|
"lodash": "4.17.21"
|
|
46
46
|
}
|