@fibery/views 25.0.1 → 25.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/index.js +2 -2
- 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,18 +1,19 @@
|
|
|
1
|
-
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
1
|
+
import { EntityId, FieldObject, TypeId, TypeObject } from "@fibery/schema";
|
|
2
|
+
import { FiberyObject, Projection } from "@fibery/expression-utils/src/types";
|
|
2
3
|
//#region src/field-utils/back-references.d.ts
|
|
3
4
|
declare const isReferenceExtensionField: (fieldObject: FieldObject) => boolean;
|
|
4
|
-
|
|
5
|
-
"fibery/id": "fibery/id";
|
|
5
|
+
type EntityLinkProjection = FiberyObject & {
|
|
6
6
|
"fibery/creation-date": string;
|
|
7
7
|
"Collaboration~Documents/ParagraphSecret": string;
|
|
8
|
-
"Collaboration~Documents/FromTypeId":
|
|
9
|
-
"Collaboration~Documents/FromEntityId":
|
|
8
|
+
"Collaboration~Documents/FromTypeId": TypeId;
|
|
9
|
+
"Collaboration~Documents/FromEntityId": EntityId;
|
|
10
10
|
"Collaboration~Documents/FromEntityField": {
|
|
11
|
-
"fibery/id": string
|
|
12
|
-
};
|
|
11
|
+
"fibery/id": string;
|
|
12
|
+
} | null;
|
|
13
13
|
"fibery/created-by": {
|
|
14
|
-
"fibery/id": string
|
|
15
|
-
};
|
|
14
|
+
"fibery/id": string;
|
|
15
|
+
} | null;
|
|
16
16
|
};
|
|
17
|
+
declare const getEntityLinksListSelect: (typeObject: TypeObject) => Projection<EntityLinkProjection>;
|
|
17
18
|
//#endregion
|
|
18
|
-
export { getEntityLinksListSelect, isReferenceExtensionField };
|
|
19
|
+
export { EntityLinkProjection, getEntityLinksListSelect, isReferenceExtensionField };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
|
-
import { FieldExpression } from "@fibery/expression-utils";
|
|
3
2
|
import { Select } from "@fibery/expression-utils/src/types";
|
|
3
|
+
import { FieldExpression as FieldExpression$1 } from "@fibery/expression-utils";
|
|
4
4
|
//#region src/field-utils/reference.d.ts
|
|
5
5
|
declare const getReferenceTypeSelectClause: ({ typeObject }: {
|
|
6
6
|
typeObject: TypeObject;
|
|
7
|
-
}, contextPath: FieldExpression) => Select;
|
|
8
|
-
declare const getReferenceFieldNormalizedSelectClause: (fieldObject: FieldObject, contextPath: FieldExpression) => any;
|
|
7
|
+
}, contextPath: FieldExpression$1) => Select;
|
|
8
|
+
declare const getReferenceFieldNormalizedSelectClause: (fieldObject: FieldObject, contextPath: FieldExpression$1) => any;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { getReferenceFieldNormalizedSelectClause, getReferenceTypeSelectClause };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
|
-
import { FieldExpression } from "@fibery/expression-utils";
|
|
3
2
|
import { FiberyObject } from "@fibery/expression-utils/src/types";
|
|
3
|
+
import { FieldExpression as FieldExpression$1 } from "@fibery/expression-utils";
|
|
4
4
|
//#region src/field-utils/workflow.d.ts
|
|
5
5
|
declare function isWorkflowType(typeObject: TypeObject): boolean;
|
|
6
6
|
declare const getWorkflowFieldObject: (typeObject: TypeObject) => import("@fibery/schema").FieldObject | undefined;
|
|
7
7
|
declare const getIsFinalStateSelect: ({ typeObject, contextPath }: {
|
|
8
8
|
typeObject: TypeObject;
|
|
9
|
-
contextPath?: FieldExpression;
|
|
9
|
+
contextPath?: FieldExpression$1;
|
|
10
10
|
}) => {
|
|
11
11
|
[x: string]: (string | (string | import("@fibery/expression-utils").MultiFieldAccess)[])[];
|
|
12
12
|
} | null;
|
|
@@ -14,7 +14,7 @@ declare const getIsFinalStateSelect: ({ typeObject, contextPath }: {
|
|
|
14
14
|
declare const getIsInFinalState: ({ typeObject, object, contextPath }: {
|
|
15
15
|
typeObject: TypeObject;
|
|
16
16
|
object: FiberyObject;
|
|
17
|
-
contextPath?: FieldExpression;
|
|
17
|
+
contextPath?: FieldExpression$1;
|
|
18
18
|
}) => boolean | null | undefined;
|
|
19
19
|
declare function getWorkflowTypeSelect(typeObject: TypeObject): {
|
|
20
20
|
"workflow/Type": string[];
|
package/lib/index.d.ts
CHANGED
|
@@ -6,19 +6,19 @@ import { assertMetaValid, isMetaValid } from "./meta-validation.js";
|
|
|
6
6
|
import { FieldObject, Schema } from "@fibery/schema";
|
|
7
7
|
import { Expression } from "@fibery/expression-utils/src/types";
|
|
8
8
|
//#region src/index.d.ts
|
|
9
|
-
declare const deleteExpressionWithNotFoundFieldsOrTypesInView: (schema: Schema, view:
|
|
10
|
-
declare const fixUserSelectedUnits: (schema: Schema, view:
|
|
9
|
+
declare const deleteExpressionWithNotFoundFieldsOrTypesInView: <V extends ViewRecord>(schema: Schema, view: V, ensureAxisInvariant?: boolean) => V;
|
|
10
|
+
declare const fixUserSelectedUnits: <V extends ViewRecord>(schema: Schema, view: V, { unitDefinitions, getDefaultUnitTypeForField }: {
|
|
11
11
|
unitDefinitions: UnitDefinitions;
|
|
12
12
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
13
|
-
}) =>
|
|
14
|
-
declare const fixContextExpressionWithBrokenPath: (schema: Schema, view:
|
|
13
|
+
}) => V;
|
|
14
|
+
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
15
15
|
/**
|
|
16
16
|
* Removes garbage from view's meta to reduce the size.
|
|
17
17
|
*/
|
|
18
18
|
type CollectGarbageSchema = unknown;
|
|
19
19
|
declare const collectGarbage: (_schema: CollectGarbageSchema, view: ViewRecord) => unknown;
|
|
20
|
-
declare const replaceNamesWithIdsInView: (schema: Schema, view:
|
|
21
|
-
declare const replaceIdsWithNamesInView: (schema: Schema, view:
|
|
20
|
+
declare const replaceNamesWithIdsInView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
21
|
+
declare const replaceIdsWithNamesInView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
22
22
|
type ViewMeta = {
|
|
23
23
|
items: {
|
|
24
24
|
query: {
|
|
@@ -29,6 +29,6 @@ type ViewMeta = {
|
|
|
29
29
|
declare const getViewCardTypes: ({ "fibery/meta": { items } }: {
|
|
30
30
|
"fibery/meta": ViewMeta;
|
|
31
31
|
}) => string[];
|
|
32
|
-
declare const migrateHideWhenEmptyToUnitsLevel: (view:
|
|
32
|
+
declare const migrateHideWhenEmptyToUnitsLevel: <V extends ViewRecord>(view: V) => V;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { CollectGarbageSchema, InvalidMetaError, assertMetaValid, collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder, deleteExpressionWithNotFoundFieldsOrTypesInView, fixContextExpressionWithBrokenPath, fixUserSelectedUnits, getViewCardTypes, isMetaValid, migrateHideWhenEmptyToUnitsLevel, replaceIdsWithNamesInSmartFolder, replaceIdsWithNamesInView, replaceNamesWithIdsInSmartFolder, replaceNamesWithIdsInView };
|
package/lib/index.js
CHANGED
|
@@ -9,9 +9,7 @@ import { collectGarbage as collectGarbage$5, deleteExpressionWithNotFoundFieldsO
|
|
|
9
9
|
import { collectGarbage as collectGarbage$6, deleteExpressionWithNotFoundFieldsOrTypesInTimelineView, enableHideWhenEmptyForCheckedEditableUnits as enableHideWhenEmptyForCheckedEditableUnits$1, fixContextExpressionWithBrokenPath as fixContextExpressionWithBrokenPath$6, fixUserSelectedUnitsInTimelineView, replaceIdsWithNamesInTimelineView, replaceNamesWithIdsInTimelineView } from "./private/timeline.js";
|
|
10
10
|
import { assertMetaValid, isMetaValid } from "./meta-validation.js";
|
|
11
11
|
import { isRecord } from "@fibery/helpers/src/_";
|
|
12
|
-
import immutableUpdate from "immutability-helper";
|
|
13
12
|
import get from "lodash/get.js";
|
|
14
|
-
import omit from "lodash/omit.js";
|
|
15
13
|
//#region src/index.ts
|
|
16
14
|
const deleteExpressionWithNotFoundFieldsOrTypesInView = (schema, view, ensureAxisInvariant = true) => {
|
|
17
15
|
switch (view["fibery/type"]) {
|
|
@@ -149,7 +147,11 @@ const migrateHideWhenEmptyToUnitsLevel = (view) => {
|
|
|
149
147
|
if (!viewTypesToTransform.includes(viewType)) return view;
|
|
150
148
|
const showEmptyUnitValues = get(view, ["fibery/meta", "showEmptyUnitValues"]);
|
|
151
149
|
if (showEmptyUnitValues === void 0) return view;
|
|
152
|
-
|
|
150
|
+
const { showEmptyUnitValues: previous, ...meta } = view["fibery/meta"];
|
|
151
|
+
let result = {
|
|
152
|
+
...view,
|
|
153
|
+
"fibery/meta": meta
|
|
154
|
+
};
|
|
153
155
|
if (showEmptyUnitValues === true) return result;
|
|
154
156
|
switch (result["fibery/type"]) {
|
|
155
157
|
case "board":
|
package/lib/private/board.d.ts
CHANGED
|
@@ -3,16 +3,16 @@ import { FieldObject, Schema } from "@fibery/schema";
|
|
|
3
3
|
import { Expression } from "@fibery/expression-utils/src/types";
|
|
4
4
|
import { Unit } from "@fibery/views/src/units/types";
|
|
5
5
|
//#region src/private/board.d.ts
|
|
6
|
-
declare const replaceIdsWithNamesInBoardView: (schema: Schema, view:
|
|
7
|
-
declare const replaceNamesWithIdsInBoardView: (schema: Schema, view:
|
|
8
|
-
declare const deleteExpressionWithNotFoundOrInvalidFieldsOrTypesInBoardView: (schema: Schema, view:
|
|
9
|
-
declare const fixUserSelectedUnitsInBoardView: (schema: Schema, view:
|
|
6
|
+
declare const replaceIdsWithNamesInBoardView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
7
|
+
declare const replaceNamesWithIdsInBoardView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
8
|
+
declare const deleteExpressionWithNotFoundOrInvalidFieldsOrTypesInBoardView: <V extends ViewRecord>(schema: Schema, view: V, ensureAxisInvariant?: boolean) => V;
|
|
9
|
+
declare const fixUserSelectedUnitsInBoardView: <V extends ViewRecord>(schema: Schema, view: V, { unitDefinitions, getDefaultUnitTypeForField }: {
|
|
10
10
|
unitDefinitions: UnitDefinitions;
|
|
11
11
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
12
|
-
}) =>
|
|
13
|
-
declare const fixContextExpressionWithBrokenPath: (schema: Schema, view:
|
|
14
|
-
declare const collectGarbage: (view:
|
|
15
|
-
declare const enableHideWhenEmptyForCovers: (view:
|
|
16
|
-
declare const enableHideWhenEmptyForCheckedEditableUnits: (view:
|
|
12
|
+
}) => V;
|
|
13
|
+
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
14
|
+
declare const collectGarbage: <V extends ViewRecord>(view: V) => V;
|
|
15
|
+
declare const enableHideWhenEmptyForCovers: <V extends ViewRecord>(view: V) => V;
|
|
16
|
+
declare const enableHideWhenEmptyForCheckedEditableUnits: <V extends ViewRecord>(view: V) => V;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { collectGarbage, deleteExpressionWithNotFoundOrInvalidFieldsOrTypesInBoardView, enableHideWhenEmptyForCheckedEditableUnits, enableHideWhenEmptyForCovers, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInBoardView, replaceIdsWithNamesInBoardView, replaceNamesWithIdsInBoardView };
|
package/lib/private/board.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteExpressionWithNotFoundFieldsOrTypesInFilter, deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression, isUnitExpressionValid, replaceIdsWithNamesInExpression, replaceIdsWithNamesInFilter, replaceIdsWithNamesInQueryExpression, replaceNamesWithIdsInExpression, replaceNamesWithIdsInFilter, replaceNamesWithIdsInQueryExpression, resetContextExpressionIfBroken, skipRemove, 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 { isFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
6
|
import entries from "lodash/entries.js";
|
|
@@ -29,10 +28,13 @@ const visitQueryExpressionHolder = (queryHolder, visitor) => {
|
|
|
29
28
|
return queryHolder;
|
|
30
29
|
};
|
|
31
30
|
const visitAxisUnits = (axis, fromType, visitor) => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
if (!fromType) return axis;
|
|
32
|
+
const nextAxis = {
|
|
33
|
+
...axis,
|
|
34
|
+
contextExpression: visitContextExpression(fromType, axis.contextExpression, visitor),
|
|
35
|
+
units: axis.units ? axis.units.filter(truthy).map((unit) => visitViewUnit(fromType, unit, visitor)).filter(isUnitExpressionValid).map((unit, idx, units) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, units) : unit).filter(skipRemove) : void 0
|
|
36
|
+
};
|
|
37
|
+
return Object.entries(nextAxis).every(([key, value]) => Object.hasOwn(axis, key) && axis[key] === value) ? axis : nextAxis;
|
|
36
38
|
};
|
|
37
39
|
const visitAxis = (axis, visitor) => {
|
|
38
40
|
if (axis && Object.hasOwn(axis, "query")) {
|
|
@@ -42,7 +44,11 @@ const visitAxis = (axis, visitor) => {
|
|
|
42
44
|
return axisWithVisitedQuery;
|
|
43
45
|
}
|
|
44
46
|
if (axis && Object.hasOwn(axis, "enums")) {
|
|
45
|
-
const
|
|
47
|
+
const enumsNew = visitor.visitEnums(axis.enums);
|
|
48
|
+
const axisNew = enumsNew === axis.enums ? axis : {
|
|
49
|
+
...axis,
|
|
50
|
+
enums: enumsNew
|
|
51
|
+
};
|
|
46
52
|
const { enums } = axisNew;
|
|
47
53
|
return enums ? axisNew : null;
|
|
48
54
|
}
|
|
@@ -87,34 +93,43 @@ const ensureAxisAndItemExpressionInvariant = (view) => {
|
|
|
87
93
|
actions.forEach((action) => action());
|
|
88
94
|
return view;
|
|
89
95
|
};
|
|
90
|
-
const visitView = (view, visitor) =>
|
|
91
|
-
|
|
92
|
-
y: { $apply: (y) => visitAxis(y, visitor) },
|
|
93
|
-
items: { $apply: (items) => {
|
|
96
|
+
const visitView = (view, visitor) => {
|
|
97
|
+
const updateItems = (items) => {
|
|
94
98
|
if (!items) return [];
|
|
95
99
|
return items.map((item) => {
|
|
96
100
|
const fromType = get(item, ["query", "q/from"]);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
}
|
|
101
|
+
if (!fromType) return item;
|
|
102
|
+
const nextItem = {
|
|
103
|
+
...item,
|
|
104
|
+
coverExpression: item.coverExpression ? visitor.visitExpression(fromType, item.coverExpression) : item.coverExpression,
|
|
105
|
+
xExpression: item.xExpression ? visitor.visitExpression(fromType, item.xExpression) : item.xExpression,
|
|
106
|
+
yExpression: item.yExpression ? visitor.visitExpression(fromType, item.yExpression) : item.yExpression,
|
|
107
|
+
contextExpression: visitContextExpression(fromType, item.contextExpression, visitor),
|
|
108
|
+
query: item.query ? visitor.visitQueryExpression(item.query) : null,
|
|
109
|
+
filter: item.filter ? visitor.visitFilter(fromType, item.filter) : null,
|
|
110
|
+
units: item.units ? item.units.filter(truthy).map((unit) => visitViewUnit(fromType, unit, visitor)).filter(isUnitExpressionValid).map((unit, idx, units) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, units) : unit).filter((unit) => unit !== REMOVE) : void 0,
|
|
111
|
+
colorCoding: item.colorCoding ? item.colorCoding.map((colorCoding) => ({
|
|
112
|
+
...colorCoding,
|
|
113
|
+
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
114
|
+
})).filter((colorCoding) => colorCoding.expression !== null) : void 0
|
|
115
|
+
};
|
|
116
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
112
117
|
}).filter((item) => {
|
|
113
118
|
const { query } = item;
|
|
114
119
|
return query ? item : null;
|
|
115
120
|
});
|
|
116
|
-
}
|
|
117
|
-
|
|
121
|
+
};
|
|
122
|
+
const meta = view["fibery/meta"];
|
|
123
|
+
return {
|
|
124
|
+
...view,
|
|
125
|
+
"fibery/meta": {
|
|
126
|
+
...meta,
|
|
127
|
+
x: visitAxis(meta.x, visitor),
|
|
128
|
+
y: visitAxis(meta.y, visitor),
|
|
129
|
+
items: updateItems(meta.items)
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
};
|
|
118
133
|
const replaceNamesWithIdsViewVisitor = (schema) => {
|
|
119
134
|
const visitor = {
|
|
120
135
|
visitQueryExpression: (queryExpression) => replaceNamesWithIdsInQueryExpression(schema, queryExpression),
|
|
@@ -214,13 +229,20 @@ const collectGarbage = (view) => {
|
|
|
214
229
|
});
|
|
215
230
|
};
|
|
216
231
|
const enableHideWhenEmptyForCovers = (view) => {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
232
|
+
const meta = view["fibery/meta"];
|
|
233
|
+
return {
|
|
234
|
+
...view,
|
|
235
|
+
"fibery/meta": {
|
|
236
|
+
...meta,
|
|
237
|
+
items: meta.items.map((item) => {
|
|
238
|
+
if (!item.coverExpression) return item;
|
|
239
|
+
return {
|
|
240
|
+
...item,
|
|
241
|
+
coverHideWhenEmpty: true
|
|
242
|
+
};
|
|
243
|
+
})
|
|
244
|
+
}
|
|
245
|
+
};
|
|
224
246
|
};
|
|
225
247
|
const enableHideWhenEmptyForCheckedEditableUnits = (view) => {
|
|
226
248
|
return visitView(view, {
|
|
@@ -3,15 +3,15 @@ import { FieldObject, Schema } from "@fibery/schema";
|
|
|
3
3
|
import { Expression } from "@fibery/expression-utils/src/types";
|
|
4
4
|
import { Unit } from "@fibery/views/src/units/types";
|
|
5
5
|
//#region src/private/calendar.d.ts
|
|
6
|
-
declare const replaceNamesWithIdsInCalendarView: (schema: Schema, view:
|
|
7
|
-
declare const replaceIdsWithNamesInCalendarView: (schema: Schema, view:
|
|
8
|
-
declare const deleteExpressionWithNotFoundFieldsOrTypesInCalendarView: (schema: Schema, view:
|
|
9
|
-
declare const fixUserSelectedUnitsInCalendarView: (schema: Schema, view:
|
|
6
|
+
declare const replaceNamesWithIdsInCalendarView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
7
|
+
declare const replaceIdsWithNamesInCalendarView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
8
|
+
declare const deleteExpressionWithNotFoundFieldsOrTypesInCalendarView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
9
|
+
declare const fixUserSelectedUnitsInCalendarView: <V extends ViewRecord>(schema: Schema, view: V, { unitDefinitions, getDefaultUnitTypeForField }: {
|
|
10
10
|
unitDefinitions: UnitDefinitions;
|
|
11
11
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
12
|
-
}) =>
|
|
13
|
-
declare const fixContextExpressionWithBrokenPath: (schema: Schema, view:
|
|
14
|
-
declare const collectGarbage: (view:
|
|
15
|
-
declare const enableHideWhenEmptyForCheckedUnits: (view:
|
|
12
|
+
}) => V;
|
|
13
|
+
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
14
|
+
declare const collectGarbage: <V extends ViewRecord>(view: V) => V;
|
|
15
|
+
declare const enableHideWhenEmptyForCheckedUnits: <V extends ViewRecord>(view: V) => V;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInCalendarView, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInCalendarView, replaceIdsWithNamesInCalendarView, replaceNamesWithIdsInCalendarView };
|
package/lib/private/calendar.js
CHANGED
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteExpressionWithNotFoundFieldsOrTypesInFilter, deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression, isUnitExpressionValid, replaceIdsWithNamesInExpression, replaceIdsWithNamesInFilter, replaceIdsWithNamesInQueryExpression, replaceNamesWithIdsInExpression, replaceNamesWithIdsInFilter, replaceNamesWithIdsInQueryExpression, 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
|
//#region src/private/calendar.ts
|
|
7
|
-
const visitView = (view, visitor) =>
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
const visitView = (view, visitor) => {
|
|
7
|
+
const meta = view["fibery/meta"];
|
|
8
|
+
return {
|
|
9
|
+
...view,
|
|
10
|
+
"fibery/meta": {
|
|
11
|
+
...meta,
|
|
12
|
+
items: meta.items.map((item) => {
|
|
13
|
+
const fromType = get(item, ["query", "q/from"]);
|
|
14
|
+
if (!fromType) return item;
|
|
15
|
+
const nextItem = {
|
|
16
|
+
...item,
|
|
17
|
+
startExpression: item.startExpression ? visitor.visitExpression(fromType, item.startExpression) : item.startExpression,
|
|
18
|
+
endExpression: item.endExpression ? visitor.visitExpression(fromType, item.endExpression) : item.endExpression,
|
|
19
|
+
contextExpression: visitContextExpression(fromType, item.contextExpression, visitor),
|
|
20
|
+
query: item.query ? visitor.visitQueryExpression(item.query) : null,
|
|
21
|
+
filter: item.filter ? visitor.visitFilter(fromType, item.filter) : null,
|
|
22
|
+
units: item.units ? item.units.filter(truthy).map((unit) => visitViewUnit(fromType, unit, visitor)).filter(isUnitExpressionValid).map((unit, idx, units) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, units) : unit).filter((unit) => unit !== REMOVE) : void 0,
|
|
23
|
+
colorCoding: item.colorCoding && item.colorCoding.map((colorCoding) => ({
|
|
24
|
+
...colorCoding,
|
|
25
|
+
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
26
|
+
})).filter((colorCoding) => colorCoding.expression !== null)
|
|
27
|
+
};
|
|
28
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
29
|
+
}).filter((item) => {
|
|
30
|
+
const { query } = item;
|
|
31
|
+
return query ? item : null;
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
};
|
|
27
36
|
const replaceNamesWithIdsInCalendarView = (schema, view) => {
|
|
28
37
|
return visitView(view, {
|
|
29
38
|
visitExpression: (fromType, expression) => replaceNamesWithIdsInExpression(schema, fromType, expression),
|
package/lib/private/feed.d.ts
CHANGED
|
@@ -3,15 +3,15 @@ import { FieldObject, Schema } from "@fibery/schema";
|
|
|
3
3
|
import { Expression } from "@fibery/expression-utils/src/types";
|
|
4
4
|
import { Unit } from "@fibery/views/src/units/types";
|
|
5
5
|
//#region src/private/feed.d.ts
|
|
6
|
-
declare const replaceNamesWithIdsInFeedView: (schema: Schema, view:
|
|
7
|
-
declare const replaceIdsWithNamesInFeedView: (schema: Schema, view:
|
|
8
|
-
declare const deleteExpressionWithNotFoundFieldsOrTypesInFeedView: (schema: Schema, view:
|
|
9
|
-
declare const fixUserSelectedUnitsInFeedView: (schema: Schema, view:
|
|
6
|
+
declare const replaceNamesWithIdsInFeedView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
7
|
+
declare const replaceIdsWithNamesInFeedView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
8
|
+
declare const deleteExpressionWithNotFoundFieldsOrTypesInFeedView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
9
|
+
declare const fixUserSelectedUnitsInFeedView: <V extends ViewRecord>(schema: Schema, view: V, { unitDefinitions, getDefaultUnitTypeForField }: {
|
|
10
10
|
unitDefinitions: UnitDefinitions;
|
|
11
11
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
12
|
-
}) =>
|
|
13
|
-
declare const fixContextExpressionWithBrokenPath: (schema: Schema, view:
|
|
14
|
-
declare const collectGarbage: (view:
|
|
15
|
-
declare const enableHideWhenEmptyForCheckedUnits: (view:
|
|
12
|
+
}) => V;
|
|
13
|
+
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
14
|
+
declare const collectGarbage: <V extends ViewRecord>(view: V) => V;
|
|
15
|
+
declare const enableHideWhenEmptyForCheckedUnits: <V extends ViewRecord>(view: V) => V;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInFeedView, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInFeedView, replaceIdsWithNamesInFeedView, replaceNamesWithIdsInFeedView };
|
package/lib/private/feed.js
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteExpressionWithNotFoundFieldsOrTypesInFilter, deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression, isUnitExpressionValid, replaceIdsWithNamesInExpression, replaceIdsWithNamesInFilter, replaceIdsWithNamesInQueryExpression, replaceNamesWithIdsInExpression, replaceNamesWithIdsInFilter, replaceNamesWithIdsInQueryExpression, 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
|
//#region src/private/feed.ts
|
|
7
|
-
const visitView = (view, visitor) =>
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
const visitView = (view, visitor) => {
|
|
7
|
+
const meta = view["fibery/meta"];
|
|
8
|
+
return {
|
|
9
|
+
...view,
|
|
10
|
+
"fibery/meta": {
|
|
11
|
+
...meta,
|
|
12
|
+
items: meta.items.map((item) => {
|
|
13
|
+
const fromType = get(item, ["query", "q/from"]);
|
|
14
|
+
if (!fromType) return item;
|
|
15
|
+
const nextItem = {
|
|
16
|
+
...item,
|
|
17
|
+
postExpression: item.postExpression ? visitor.visitExpression(fromType, item.postExpression) : item.postExpression,
|
|
18
|
+
contextExpression: visitContextExpression(fromType, item.contextExpression, visitor),
|
|
19
|
+
query: item.query ? visitor.visitQueryExpression(item.query) : null,
|
|
20
|
+
filter: item.filter ? visitor.visitFilter(fromType, item.filter) : null,
|
|
21
|
+
units: item.units ? item.units.filter(truthy).map((unit) => visitViewUnit(fromType, unit, visitor)).filter(isUnitExpressionValid).map((unit, idx, units) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, units) : unit).filter((unit) => unit !== REMOVE) : void 0,
|
|
22
|
+
colorCoding: item.colorCoding && item.colorCoding.map((colorCoding) => ({
|
|
23
|
+
...colorCoding,
|
|
24
|
+
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
25
|
+
})).filter((colorCoding) => colorCoding.expression !== null)
|
|
26
|
+
};
|
|
27
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
28
|
+
}).filter((item) => {
|
|
29
|
+
const { query } = item;
|
|
30
|
+
return query ? item : null;
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
26
35
|
const replaceNamesWithIdsInFeedView = (schema, view) => {
|
|
27
36
|
return visitView(view, {
|
|
28
37
|
visitExpression: (fromType, expression) => replaceNamesWithIdsInExpression(schema, fromType, expression),
|
package/lib/private/form.d.ts
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
1
|
import { ViewRecord } from "./utils.js";
|
|
2
2
|
import { Schema } from "@fibery/schema";
|
|
3
3
|
//#region src/private/form.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
declare const replaceNamesWithIdsInFormView: (schema: Schema, view: ViewRecord) => {
|
|
9
|
-
"fibery/meta": {
|
|
10
|
-
typeId: string | undefined;
|
|
11
|
-
fields: FormField[] | undefined;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
declare const replaceIdsWithNamesInFormView: (schema: Schema, view: ViewRecord) => {
|
|
15
|
-
"fibery/meta": {
|
|
16
|
-
typeId: string | undefined;
|
|
17
|
-
fields: FormField[] | undefined;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
declare const deleteExpressionWithNotFoundFieldsOrTypesInFormView: (schema: Schema, view: ViewRecord) => {
|
|
21
|
-
"fibery/meta": {
|
|
22
|
-
typeId: string | undefined;
|
|
23
|
-
fields: FormField[] | undefined;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
4
|
+
declare const replaceNamesWithIdsInFormView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
5
|
+
declare const replaceIdsWithNamesInFormView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
6
|
+
declare const deleteExpressionWithNotFoundFieldsOrTypesInFormView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
26
7
|
//#endregion
|
|
27
8
|
export { deleteExpressionWithNotFoundFieldsOrTypesInFormView, replaceIdsWithNamesInFormView, replaceNamesWithIdsInFormView };
|
package/lib/private/map.d.ts
CHANGED
|
@@ -3,15 +3,15 @@ import { FieldObject, Schema } from "@fibery/schema";
|
|
|
3
3
|
import { Expression } from "@fibery/expression-utils/src/types";
|
|
4
4
|
import { Unit } from "@fibery/views/src/units/types";
|
|
5
5
|
//#region src/private/map.d.ts
|
|
6
|
-
declare const replaceNamesWithIdsInMapView: (schema: Schema, view:
|
|
7
|
-
declare const replaceIdsWithNamesInMapView: (schema: Schema, view:
|
|
8
|
-
declare const deleteExpressionWithNotFoundFieldsOrTypesInMapView: (schema: Schema, view:
|
|
9
|
-
declare const fixUserSelectedUnitsInMapView: (schema: Schema, view:
|
|
6
|
+
declare const replaceNamesWithIdsInMapView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
7
|
+
declare const replaceIdsWithNamesInMapView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
8
|
+
declare const deleteExpressionWithNotFoundFieldsOrTypesInMapView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
9
|
+
declare const fixUserSelectedUnitsInMapView: <V extends ViewRecord>(schema: Schema, view: V, { unitDefinitions, getDefaultUnitTypeForField }: {
|
|
10
10
|
unitDefinitions: UnitDefinitions;
|
|
11
11
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
12
|
-
}) =>
|
|
13
|
-
declare const fixContextExpressionWithBrokenPath: (schema: Schema, view:
|
|
14
|
-
declare const collectGarbage: (view:
|
|
15
|
-
declare const enableHideWhenEmptyForCheckedUnits: (view:
|
|
12
|
+
}) => V;
|
|
13
|
+
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
14
|
+
declare const collectGarbage: <V extends ViewRecord>(view: V) => V;
|
|
15
|
+
declare const enableHideWhenEmptyForCheckedUnits: <V extends ViewRecord>(view: V) => V;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInMapView, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInMapView, replaceIdsWithNamesInMapView, replaceNamesWithIdsInMapView };
|
package/lib/private/map.js
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteExpressionWithNotFoundFieldsOrTypesInFilter, deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression, isUnitExpressionValid, replaceIdsWithNamesInExpression, replaceIdsWithNamesInFilter, replaceIdsWithNamesInQueryExpression, replaceNamesWithIdsInExpression, replaceNamesWithIdsInFilter, replaceNamesWithIdsInQueryExpression, 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
|
//#region src/private/map.ts
|
|
7
|
-
const visitView = (view, visitor) =>
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
const visitView = (view, visitor) => {
|
|
7
|
+
const meta = view["fibery/meta"];
|
|
8
|
+
return {
|
|
9
|
+
...view,
|
|
10
|
+
"fibery/meta": {
|
|
11
|
+
...meta,
|
|
12
|
+
items: meta.items.map((item) => {
|
|
13
|
+
const fromType = get(item, ["query", "q/from"]);
|
|
14
|
+
if (!fromType) return item;
|
|
15
|
+
const nextItem = {
|
|
16
|
+
...item,
|
|
17
|
+
locationExpression: item.locationExpression ? visitor.visitExpression(fromType, item.locationExpression) : item.locationExpression,
|
|
18
|
+
contextExpression: visitContextExpression(fromType, item.contextExpression, visitor),
|
|
19
|
+
query: item.query ? visitor.visitQueryExpression(item.query) : null,
|
|
20
|
+
filter: item.filter ? visitor.visitFilter(fromType, item.filter) : null,
|
|
21
|
+
units: item.units ? item.units.filter(truthy).map((unit) => visitViewUnit(fromType, unit, visitor)).filter(isUnitExpressionValid).map((unit, idx, units) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, units) : unit).filter((unit) => unit !== REMOVE) : void 0,
|
|
22
|
+
colorCoding: item.colorCoding && item.colorCoding.map((colorCoding) => ({
|
|
23
|
+
...colorCoding,
|
|
24
|
+
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
25
|
+
})).filter((colorCoding) => colorCoding.expression !== null)
|
|
26
|
+
};
|
|
27
|
+
return Object.entries(nextItem).every(([key, value]) => Object.hasOwn(item, key) && item[key] === value) ? item : nextItem;
|
|
28
|
+
}).filter((item) => {
|
|
29
|
+
const { query } = item;
|
|
30
|
+
return query ? item : null;
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
26
35
|
const replaceNamesWithIdsInMapView = (schema, view) => {
|
|
27
36
|
return visitView(view, {
|
|
28
37
|
visitQueryExpression: (query) => replaceNamesWithIdsInQueryExpression(schema, query),
|
|
@@ -19,15 +19,15 @@ declare const replaceNamesWithIdsInGroupByExpression: (schema: Schema, groupByEx
|
|
|
19
19
|
expression: any;
|
|
20
20
|
};
|
|
21
21
|
} | null;
|
|
22
|
-
declare const replaceNamesWithIdsInSmartFolder: (schema: Schema, smartFolder:
|
|
23
|
-
declare const replaceIdsWithNamesInSmartFolder: (schema: Schema, smartFolder:
|
|
24
|
-
declare const deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder: (schema: Schema, smartFolder:
|
|
25
|
-
declare const fixContextExpressionWithBrokenPath: (schema: Schema, view:
|
|
26
|
-
declare const fixUserSelectedUnitsInSmartFolder: (schema: Schema, view:
|
|
22
|
+
declare const replaceNamesWithIdsInSmartFolder: <V extends ViewRecord>(schema: Schema, smartFolder: V) => V;
|
|
23
|
+
declare const replaceIdsWithNamesInSmartFolder: <V extends ViewRecord>(schema: Schema, smartFolder: V) => V;
|
|
24
|
+
declare const deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder: <V extends ViewRecord>(schema: Schema, smartFolder: V) => V;
|
|
25
|
+
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
26
|
+
declare const fixUserSelectedUnitsInSmartFolder: <V extends ViewRecord>(schema: Schema, view: V, { unitDefinitions, getDefaultUnitTypeForField }: {
|
|
27
27
|
unitDefinitions: UnitDefinitions;
|
|
28
28
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
29
|
-
}) =>
|
|
30
|
-
declare const collectGarbage: (view:
|
|
31
|
-
declare const enableHideWhenEmptyForCheckedUnits: (view:
|
|
29
|
+
}) => V;
|
|
30
|
+
declare const collectGarbage: <V extends ViewRecord>(view: V) => V;
|
|
31
|
+
declare const enableHideWhenEmptyForCheckedUnits: <V extends ViewRecord>(view: V) => V;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInGroupByExpression, deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInSmartFolder, replaceIdsWithNamesInGroupByExpression, replaceIdsWithNamesInSmartFolder, replaceNamesWithIdsInGroupByExpression, replaceNamesWithIdsInSmartFolder };
|
|
@@ -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),
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
|
-
import { FieldExpression } from "@fibery/expression-utils";
|
|
3
2
|
import { Select } from "@fibery/expression-utils/src/types";
|
|
3
|
+
import { FieldExpression as FieldExpression$1 } from "@fibery/expression-utils";
|
|
4
4
|
//#region src/unit-utils/enums.d.ts
|
|
5
5
|
declare const getEnumIconColorQuery: ({ typeObject, contextPath }: {
|
|
6
6
|
typeObject: TypeObject;
|
|
7
|
-
contextPath?: FieldExpression;
|
|
7
|
+
contextPath?: FieldExpression$1;
|
|
8
8
|
}) => Select;
|
|
9
9
|
declare function getEnumIconSelect(typeObject: TypeObject): {
|
|
10
10
|
"enum/icon": string[];
|
|
@@ -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 { DateRange } from "../../unit-definitions/date-range.js";
|
|
6
5
|
import { Date } from "../../unit-definitions/date.js";
|
|
6
|
+
import { DateRange } from "../../unit-definitions/date-range.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";
|
package/lib/units/grid.js
CHANGED
|
@@ -3,13 +3,11 @@ 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 { DateRange } from "../unit-definitions/date-range.js";
|
|
7
6
|
import { Date } from "../unit-definitions/date.js";
|
|
7
|
+
import { DateRange } from "../unit-definitions/date-range.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";
|
|
13
11
|
import { IconButton } from "../unit-definitions/icon-button.js";
|
|
14
12
|
import { Id } from "../unit-definitions/id.js";
|
|
15
13
|
import { Location } from "../unit-definitions/location.js";
|
|
@@ -27,7 +25,9 @@ import { TypeIcon } from "../unit-definitions/type-icon.js";
|
|
|
27
25
|
import { Url } from "../unit-definitions/url.js";
|
|
28
26
|
import { UserButton } from "../unit-definitions/user-button.js";
|
|
29
27
|
import { UserRole } from "../unit-definitions/user-role.js";
|
|
28
|
+
import { FileCollectionCount } from "../unit-definitions/file-collection-count.js";
|
|
30
29
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/views",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.1.1",
|
|
4
4
|
"description": "Operations on view objects",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Fibery",
|
|
@@ -32,16 +32,15 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"date-fns": "2.29.2",
|
|
34
34
|
"lodash": "4.17.21",
|
|
35
|
-
"moment": "2.
|
|
36
|
-
"@fibery/expression-utils": "
|
|
37
|
-
"@fibery/
|
|
38
|
-
"@fibery/
|
|
39
|
-
"@fibery/
|
|
35
|
+
"moment": "2.31.0",
|
|
36
|
+
"@fibery/expression-utils": "16.0.1",
|
|
37
|
+
"@fibery/query-utils": "7.2.0",
|
|
38
|
+
"@fibery/helpers": "4.1.1",
|
|
39
|
+
"@fibery/schema": "12.0.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@fibery/expression-utils": "^
|
|
43
|
-
"@fibery/schema": "^12.0.
|
|
44
|
-
"immutability-helper": "^2.4.0",
|
|
42
|
+
"@fibery/expression-utils": "^16.0.1",
|
|
43
|
+
"@fibery/schema": "^12.0.2",
|
|
45
44
|
"lodash": "4.17.21"
|
|
46
45
|
}
|
|
47
46
|
}
|