@fibery/views 25.0.1 → 25.1.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/back-references.d.ts +11 -10
- package/lib/field-utils/reference.d.ts +3 -3
- package/lib/field-utils/workflow.d.ts +3 -3
- package/lib/index.d.ts +7 -7
- package/lib/index.js +5 -3
- package/lib/private/board.d.ts +9 -9
- package/lib/private/board.js +56 -34
- package/lib/private/calendar.d.ts +8 -8
- package/lib/private/calendar.js +30 -21
- package/lib/private/feed.d.ts +8 -8
- package/lib/private/feed.js +29 -20
- package/lib/private/form.d.ts +3 -22
- package/lib/private/map.d.ts +8 -8
- package/lib/private/map.js +29 -20
- package/lib/private/smart-folder.d.ts +8 -8
- package/lib/private/smart-folder.js +64 -42
- package/lib/private/timeline.d.ts +8 -8
- package/lib/private/timeline.js +67 -51
- 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/enums.d.ts +2 -2
- package/lib/units/canvas/all-units-data-definitions.js +1 -1
- package/lib/units/grid.js +3 -3
- package/package.json +8 -9
|
@@ -1,69 +1,91 @@
|
|
|
1
1
|
import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteExpressionWithNotFoundFieldsOrTypesInFilter, deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression, getFieldObjectsById, isUnitExpressionValid, replaceIdsWithNamesInExpression, replaceIdsWithNamesInFilter, replaceIdsWithNamesInQueryExpression, replaceIdsWithNamesInUnitGroupKey, replaceNamesWithIdsInExpression, replaceNamesWithIdsInFilter, replaceNamesWithIdsInQueryExpression, replaceNamesWithIdsInUnitGroupKey, resetContextExpressionIfBroken, visitContextExpression, visitViewUnit } from "./utils.js";
|
|
2
2
|
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
3
3
|
import { truthy } from "@fibery/helpers/src/_";
|
|
4
|
-
import immutableUpdate from "immutability-helper";
|
|
5
4
|
import get from "lodash/get.js";
|
|
6
5
|
import { replaceIdsWithNamesVisitor, replaceNamesWithIdsVisitor } from "@fibery/expression-utils/src/visitors";
|
|
7
6
|
import isEqual from "lodash/isEqual.js";
|
|
8
7
|
//#region src/private/smart-folder.ts
|
|
9
|
-
const visitSmartFolder = (smartFolder, visitor) =>
|
|
10
|
-
|
|
8
|
+
const visitSmartFolder = (smartFolder, visitor) => {
|
|
9
|
+
const updateColumnAggFunc = (columnAggFunc) => {
|
|
10
|
+
if (!visitor.visitUnitGroupKey || !columnAggFunc) return columnAggFunc;
|
|
11
|
+
return Object.fromEntries(Object.entries(columnAggFunc).map(([key, value]) => {
|
|
12
|
+
return [visitor.visitUnitGroupKey(key), value];
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
const updatePinnedColumnsWithIds = (pinnedColumnsWithIds) => {
|
|
16
|
+
if (!visitor.visitUnitGroupKey || !pinnedColumnsWithIds) return pinnedColumnsWithIds;
|
|
17
|
+
return pinnedColumnsWithIds.map((key) => visitor.visitUnitGroupKey(key));
|
|
18
|
+
};
|
|
19
|
+
const updateColumnOrderWithIds = (columnOrderWithIds) => {
|
|
20
|
+
if (!visitor.visitUnitGroupKey || !columnOrderWithIds) return columnOrderWithIds;
|
|
21
|
+
return columnOrderWithIds.map((key) => visitor.visitUnitGroupKey(key));
|
|
22
|
+
};
|
|
23
|
+
const updateItems = (items = []) => {
|
|
11
24
|
const removedItemsIndexes = items.map((item, index) => visitor.visitQueryExpression(item.query) ? null : index).filter((value) => value !== null);
|
|
12
25
|
return items.map((item) => {
|
|
13
|
-
if (!Object.hasOwn(item, "groupBy")) return item;
|
|
14
26
|
const fromType = get(item, ["query", "q/from"]);
|
|
15
|
-
|
|
27
|
+
if (!fromType) return item;
|
|
28
|
+
const updateGroupBy = (groupBy) => {
|
|
16
29
|
if (!groupBy) return null;
|
|
17
30
|
const removedItemsBeforeTargetLengths = Object.keys(groupBy).map((key) => parseInt(key)).map((groupByIndex) => removedItemsIndexes.filter((n) => n < groupByIndex).length);
|
|
18
31
|
return visitor.visitGroupByExpression(groupBy, fromType, removedItemsBeforeTargetLengths);
|
|
19
|
-
}
|
|
32
|
+
};
|
|
33
|
+
if (!Object.hasOwn(item, "groupBy")) return item;
|
|
34
|
+
const nextItem = {
|
|
35
|
+
...item,
|
|
36
|
+
groupBy: updateGroupBy(item.groupBy)
|
|
37
|
+
};
|
|
38
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
20
39
|
}).map((item) => {
|
|
21
|
-
if (Array.isArray(item.groupingExpression) || !Object.hasOwn(item, "groupBy") && !item.groupingExpression) return item;
|
|
22
40
|
const fromType = get(item, ["query", "q/from"]);
|
|
23
|
-
|
|
41
|
+
if (!fromType) return item;
|
|
42
|
+
const updateGroupingExpression = (groupingExpression) => {
|
|
24
43
|
if (!groupingExpression) return null;
|
|
25
44
|
const removedItemsBeforeTargetLengths = Object.keys(groupingExpression).map((key) => parseInt(key)).map((groupByIndex) => removedItemsIndexes.filter((n) => n < groupByIndex).length);
|
|
26
45
|
return visitor.visitGroupByExpression(groupingExpression, fromType, removedItemsBeforeTargetLengths);
|
|
27
|
-
}
|
|
46
|
+
};
|
|
47
|
+
if (Array.isArray(item.groupingExpression) || !Object.hasOwn(item, "groupBy") && !item.groupingExpression) return item;
|
|
48
|
+
const nextItem = {
|
|
49
|
+
...item,
|
|
50
|
+
groupingExpression: updateGroupingExpression(item.groupingExpression)
|
|
51
|
+
};
|
|
52
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
28
53
|
}).map((item) => {
|
|
29
54
|
const fromType = get(item, ["query", "q/from"]);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
if (!fromType) return item;
|
|
56
|
+
const updateQuery = (query) => {
|
|
57
|
+
const visitedQuery = visitor.visitQueryExpression(query);
|
|
58
|
+
return query ? visitedQuery : null;
|
|
59
|
+
};
|
|
60
|
+
const nextItem = {
|
|
61
|
+
...item,
|
|
62
|
+
filter: item.filter ? visitor.visitFilter(fromType, item.filter) : null,
|
|
63
|
+
query: updateQuery(item.query),
|
|
64
|
+
units: item.units ? item.units.filter(truthy).map((unit) => visitViewUnit(fromType, unit, visitor)).filter(isUnitExpressionValid).map((unit, index, units) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, units) : unit).filter((unit) => unit !== REMOVE) : void 0,
|
|
65
|
+
contextExpression: visitContextExpression(fromType, item.contextExpression, visitor),
|
|
66
|
+
colorCoding: item.colorCoding ? item.colorCoding.map((colorCoding) => ({
|
|
67
|
+
...colorCoding,
|
|
68
|
+
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
69
|
+
})).filter((colorCoding) => colorCoding.expression !== null) : void 0
|
|
70
|
+
};
|
|
71
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
47
72
|
}).filter((item) => {
|
|
48
73
|
const { query } = item;
|
|
49
74
|
return query ? item : null;
|
|
50
75
|
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}));
|
|
65
|
-
} }
|
|
66
|
-
} });
|
|
76
|
+
};
|
|
77
|
+
const meta = smartFolder["fibery/meta"];
|
|
78
|
+
return {
|
|
79
|
+
...smartFolder,
|
|
80
|
+
"fibery/meta": {
|
|
81
|
+
...meta,
|
|
82
|
+
items: updateItems(meta.items),
|
|
83
|
+
columnOrderWithIds: updateColumnOrderWithIds(meta.columnOrderWithIds),
|
|
84
|
+
pinnedColumnsWithIds: updatePinnedColumnsWithIds(meta.pinnedColumnsWithIds),
|
|
85
|
+
columnAggFunc: updateColumnAggFunc(meta.columnAggFunc)
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
};
|
|
67
89
|
const deleteExpressionWithNotFoundFieldsOrTypesInGroupByExpression = (schema, groupByExpression, fromType, removedItems) => {
|
|
68
90
|
if (!groupByExpression) return null;
|
|
69
91
|
const entries = Object.entries(groupByExpression).map(([index, { expression }], groupByIndex) => {
|
|
@@ -28,15 +28,15 @@ type TimelineMetaItem = {
|
|
|
28
28
|
groupingExpression?: GroupByExpression | null;
|
|
29
29
|
[k: string]: unknown;
|
|
30
30
|
};
|
|
31
|
-
declare const replaceNamesWithIdsInTimelineView: (schema: Schema, view:
|
|
32
|
-
declare const replaceIdsWithNamesInTimelineView: (schema: Schema, view:
|
|
33
|
-
declare const deleteExpressionWithNotFoundFieldsOrTypesInTimelineView: (schema: Schema, view:
|
|
34
|
-
declare const fixUserSelectedUnitsInTimelineView: (schema: Schema, view:
|
|
31
|
+
declare const replaceNamesWithIdsInTimelineView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
32
|
+
declare const replaceIdsWithNamesInTimelineView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
33
|
+
declare const deleteExpressionWithNotFoundFieldsOrTypesInTimelineView: <V extends ViewRecord>(schema: Schema, view: V, ensureAxisInvariant: boolean, canGroupMetaItem?: (_metaItem: TimelineMetaItem) => boolean) => V;
|
|
34
|
+
declare const fixUserSelectedUnitsInTimelineView: <V extends ViewRecord>(schema: Schema, view: V, { unitDefinitions, getDefaultUnitTypeForField }: {
|
|
35
35
|
unitDefinitions: UnitDefinitions;
|
|
36
36
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
37
|
-
}) =>
|
|
38
|
-
declare const fixContextExpressionWithBrokenPath: (schema: Schema, view:
|
|
39
|
-
declare const collectGarbage: (view:
|
|
40
|
-
declare const enableHideWhenEmptyForCheckedEditableUnits: (view:
|
|
37
|
+
}) => V;
|
|
38
|
+
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
39
|
+
declare const collectGarbage: <V extends ViewRecord>(view: V) => V;
|
|
40
|
+
declare const enableHideWhenEmptyForCheckedEditableUnits: <V extends ViewRecord>(view: V) => V;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInTimelineView, enableHideWhenEmptyForCheckedEditableUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInTimelineView, replaceIdsWithNamesInTimelineView, replaceNamesWithIdsInTimelineView };
|
package/lib/private/timeline.js
CHANGED
|
@@ -2,7 +2,6 @@ import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteEx
|
|
|
2
2
|
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
3
3
|
import { deleteExpressionWithNotFoundFieldsOrTypesInGroupByExpression, replaceIdsWithNamesInGroupByExpression, replaceNamesWithIdsInGroupByExpression } from "./smart-folder.js";
|
|
4
4
|
import { truthy } from "@fibery/helpers/src/_";
|
|
5
|
-
import immutableUpdate from "immutability-helper";
|
|
6
5
|
import get from "lodash/get.js";
|
|
7
6
|
import entries from "lodash/entries.js";
|
|
8
7
|
import isEmpty from "lodash/isEmpty.js";
|
|
@@ -29,71 +28,88 @@ const visitAxisSingle = (axis, visitor) => {
|
|
|
29
28
|
const visitAxis = (axis, visitor) => {
|
|
30
29
|
if (axis && Object.hasOwn(axis, "query")) return visitAxisSingle(axis, visitor);
|
|
31
30
|
if (axis && Object.hasOwn(axis, "enums")) {
|
|
32
|
-
const
|
|
31
|
+
const enumsNew = visitor.visitEnums(axis.enums);
|
|
32
|
+
const axisNew = enumsNew === axis.enums ? axis : {
|
|
33
|
+
...axis,
|
|
34
|
+
enums: enumsNew
|
|
35
|
+
};
|
|
33
36
|
const { enums } = axisNew;
|
|
34
37
|
return enums ? axisNew : null;
|
|
35
38
|
}
|
|
36
39
|
return axis;
|
|
37
40
|
};
|
|
38
|
-
const visitView = (view, visitor) =>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return items.map((item) => {
|
|
41
|
+
const visitView = (view, visitor) => {
|
|
42
|
+
const updateMilestones = (milestones) => {
|
|
43
|
+
if (!milestones) return milestones;
|
|
44
|
+
return milestones.map((item) => {
|
|
43
45
|
const fromType = get(item, ["query", "q/from"]);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
query: { $apply: (query) => query ? visitor.visitQueryExpression(query) : null },
|
|
54
|
-
units: { $apply: (units) => visitMetaItemUnits(fromType, units, visitor) },
|
|
55
|
-
laneUnits: { $apply: (laneUnits) => visitMetaItemUnits(fromType, laneUnits, visitor) },
|
|
56
|
-
colorCoding: { $apply: (colorCodings) => {
|
|
57
|
-
return colorCodings && colorCodings.map((colorCoding) => ({
|
|
58
|
-
...colorCoding,
|
|
59
|
-
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
60
|
-
})).filter((colorCoding) => colorCoding.expression !== null);
|
|
61
|
-
} },
|
|
62
|
-
dependencyExpression: { $apply: (expression) => {
|
|
63
|
-
return expression && visitor.visitExpression(fromType, expression);
|
|
64
|
-
} },
|
|
65
|
-
groupBy: { $apply: (groupBy) => {
|
|
66
|
-
if (!groupBy) return groupBy;
|
|
67
|
-
const removedItemsBeforeTargetLengths = Object.keys(groupBy).map((key) => parseInt(key)).map((groupByIndex) => removedItemsIndexes.filter((n) => n < groupByIndex).length);
|
|
68
|
-
return visitor.visitGroupByExpression(groupBy, fromType, removedItemsBeforeTargetLengths);
|
|
69
|
-
} },
|
|
70
|
-
...hasGroupingExpression ? { groupingExpression: { $apply: (groupingExpression) => {
|
|
71
|
-
if (!groupingExpression) return null;
|
|
72
|
-
const removedItemsBeforeTargetLengths = Object.keys(groupingExpression).map((key) => parseInt(key)).map((groupByIndex) => removedItemsIndexes.filter((n) => n < groupByIndex).length);
|
|
73
|
-
return visitor.visitGroupByExpression(groupingExpression, fromType, removedItemsBeforeTargetLengths);
|
|
74
|
-
} } } : void 0
|
|
75
|
-
}) : item;
|
|
46
|
+
if (!fromType) return item;
|
|
47
|
+
const nextItem = {
|
|
48
|
+
...item,
|
|
49
|
+
dateExpression: item.dateExpression ? visitor.visitExpression(fromType, item.dateExpression) : item.dateExpression,
|
|
50
|
+
filter: item.filter ? visitor.visitFilter(fromType, item.filter) : null,
|
|
51
|
+
query: item.query ? visitor.visitQueryExpression(item.query) : null,
|
|
52
|
+
contextExpression: visitContextExpression(fromType, item.contextExpression, visitor)
|
|
53
|
+
};
|
|
54
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
76
55
|
}).filter((item) => {
|
|
77
56
|
const { query } = item;
|
|
78
57
|
return query ? item : null;
|
|
79
58
|
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return
|
|
59
|
+
};
|
|
60
|
+
const updateItems = (items) => {
|
|
61
|
+
const removedItemsIndexes = items.map((item, index) => visitor.visitQueryExpression(item.query) ? null : index).filter((value) => value !== null);
|
|
62
|
+
return items.map((item) => {
|
|
84
63
|
const fromType = get(item, ["query", "q/from"]);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
64
|
+
if (!fromType) return item;
|
|
65
|
+
const updateGroupingExpression = (groupingExpression) => {
|
|
66
|
+
if (!groupingExpression) return null;
|
|
67
|
+
const removedItemsBeforeTargetLengths = Object.keys(groupingExpression).map((key) => parseInt(key)).map((groupByIndex) => removedItemsIndexes.filter((n) => n < groupByIndex).length);
|
|
68
|
+
return visitor.visitGroupByExpression(groupingExpression, fromType, removedItemsBeforeTargetLengths);
|
|
69
|
+
};
|
|
70
|
+
const updateGroupBy = (groupBy) => {
|
|
71
|
+
if (!groupBy) return groupBy;
|
|
72
|
+
const removedItemsBeforeTargetLengths = Object.keys(groupBy).map((key) => parseInt(key)).map((groupByIndex) => removedItemsIndexes.filter((n) => n < groupByIndex).length);
|
|
73
|
+
return visitor.visitGroupByExpression(groupBy, fromType, removedItemsBeforeTargetLengths);
|
|
74
|
+
};
|
|
75
|
+
const hasGroupingExpression = has(item, ["groupingExpression"]);
|
|
76
|
+
const nextItem = {
|
|
77
|
+
...item,
|
|
78
|
+
yExpression: item.yExpression ? visitor.visitExpression(fromType, item.yExpression) : item.yExpression,
|
|
79
|
+
startExpression: item.startExpression ? visitor.visitExpression(fromType, item.startExpression) : item.startExpression,
|
|
80
|
+
endExpression: item.endExpression ? visitor.visitExpression(fromType, item.endExpression) : item.endExpression,
|
|
81
|
+
secondaryStartExpression: item.secondaryStartExpression ? visitor.visitExpression(fromType, item.secondaryStartExpression) : item.secondaryStartExpression,
|
|
82
|
+
secondaryEndExpression: item.secondaryEndExpression ? visitor.visitExpression(fromType, item.secondaryEndExpression) : item.secondaryEndExpression,
|
|
83
|
+
contextExpression: visitContextExpression(fromType, item.contextExpression, visitor),
|
|
84
|
+
filter: item.filter ? visitor.visitFilter(fromType, item.filter) : null,
|
|
85
|
+
query: item.query ? visitor.visitQueryExpression(item.query) : null,
|
|
86
|
+
units: visitMetaItemUnits(fromType, item.units, visitor),
|
|
87
|
+
laneUnits: visitMetaItemUnits(fromType, item.laneUnits, visitor),
|
|
88
|
+
colorCoding: item.colorCoding && item.colorCoding.map((colorCoding) => ({
|
|
89
|
+
...colorCoding,
|
|
90
|
+
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
91
|
+
})).filter((colorCoding) => colorCoding.expression !== null),
|
|
92
|
+
dependencyExpression: item.dependencyExpression && visitor.visitExpression(fromType, item.dependencyExpression),
|
|
93
|
+
groupBy: updateGroupBy(item.groupBy),
|
|
94
|
+
...hasGroupingExpression ? { groupingExpression: updateGroupingExpression(item.groupingExpression) } : {}
|
|
95
|
+
};
|
|
96
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
91
97
|
}).filter((item) => {
|
|
92
98
|
const { query } = item;
|
|
93
99
|
return query ? item : null;
|
|
94
100
|
});
|
|
95
|
-
}
|
|
96
|
-
|
|
101
|
+
};
|
|
102
|
+
const meta = view["fibery/meta"];
|
|
103
|
+
return {
|
|
104
|
+
...view,
|
|
105
|
+
"fibery/meta": {
|
|
106
|
+
...meta,
|
|
107
|
+
y: visitAxis(meta.y, visitor),
|
|
108
|
+
items: updateItems(meta.items),
|
|
109
|
+
milestones: updateMilestones(meta.milestones)
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
};
|
|
97
113
|
const replaceNamesWithIdsInTimelineView = (schema, view) => {
|
|
98
114
|
const visitor = {
|
|
99
115
|
visitQueryExpression: (query) => replaceNamesWithIdsInQueryExpression(schema, query),
|
|
@@ -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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
2
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
2
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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 { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
3
2
|
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
2
3
|
import { getDateRangeExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
2
3
|
import { getDateRangeExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
2
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
2
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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 { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
3
2
|
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.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,12 +3,11 @@ 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 { DateRange } from "./date-range.js";
|
|
7
6
|
import { Date } from "./date.js";
|
|
7
|
+
import { DateRange } from "./date-range.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";
|
|
12
11
|
import { IconButton } from "./icon-button.js";
|
|
13
12
|
import { Id } from "./id.js";
|
|
14
13
|
import { Location } from "./location.js";
|
|
@@ -26,6 +25,7 @@ import { TypeIcon } from "./type-icon.js";
|
|
|
26
25
|
import { Url } from "./url.js";
|
|
27
26
|
import { UserButton } from "./user-button.js";
|
|
28
27
|
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 { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
3
2
|
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.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";
|
|
2
3
|
import { getNumberExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
2
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
2
3
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
2
3
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
3
4
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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";
|
|
2
3
|
import { getReferenceExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
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";
|
|
3
4
|
import { getSnippetExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
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 = {
|