@fibery/views 25.1.5 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/errors.d.ts +2 -3
- package/lib/field-utils/avatar.d.ts +8 -9
- package/lib/field-utils/back-references.d.ts +4 -5
- package/lib/field-utils/comments.d.ts +5 -6
- package/lib/field-utils/date-time.d.ts +7 -8
- package/lib/field-utils/enum-value.d.ts +6 -7
- package/lib/field-utils/file.d.ts +3 -4
- package/lib/field-utils/icon.d.ts +6 -7
- package/lib/field-utils/number.d.ts +11 -12
- package/lib/field-utils/reference-collection.d.ts +6 -7
- package/lib/field-utils/reference.d.ts +3 -4
- package/lib/field-utils/relation-view.d.ts +2 -3
- package/lib/field-utils/rich-text.d.ts +9 -10
- package/lib/field-utils/text.d.ts +9 -10
- package/lib/field-utils/user-active.d.ts +3 -4
- package/lib/field-utils/user-role.d.ts +3 -4
- package/lib/field-utils/workflow.d.ts +9 -10
- package/lib/filter.d.ts +29 -0
- package/lib/filter.js +0 -0
- package/lib/index.d.ts +57 -21
- package/lib/index.js +101 -94
- package/lib/meta-validation.d.ts +3 -4
- package/lib/private/board.d.ts +218 -14
- package/lib/private/board.js +138 -231
- package/lib/private/calendar.d.ts +213 -13
- package/lib/private/calendar.js +35 -81
- package/lib/private/feed.d.ts +211 -13
- package/lib/private/feed.js +34 -80
- package/lib/private/form.d.ts +52 -7
- package/lib/private/form.js +41 -48
- package/lib/private/map.d.ts +211 -13
- package/lib/private/map.js +34 -80
- package/lib/private/smart-folder.d.ts +118 -29
- package/lib/private/smart-folder.js +70 -148
- package/lib/private/timeline.d.ts +535 -31
- package/lib/private/timeline.js +158 -219
- package/lib/private/units.d.ts +3 -4
- package/lib/private/utils.d.ts +63 -57
- package/lib/private/utils.js +71 -49
- package/lib/refs.d.ts +19 -0
- package/lib/refs.js +0 -0
- package/lib/unit-definitions/avatar-collection.d.ts +29 -4
- package/lib/unit-definitions/avatar-collection.js +1 -1
- package/lib/unit-definitions/avatar-input.d.ts +49 -4
- package/lib/unit-definitions/avatar.d.ts +54 -4
- package/lib/unit-definitions/avatar.js +1 -1
- package/lib/unit-definitions/back-references-list.d.ts +31 -4
- package/lib/unit-definitions/bool-checkbox.d.ts +23 -4
- package/lib/unit-definitions/bool.d.ts +23 -4
- package/lib/unit-definitions/collection-count.d.ts +31 -4
- package/lib/unit-definitions/color-input.d.ts +22 -4
- package/lib/unit-definitions/comments-list.d.ts +63 -4
- package/lib/unit-definitions/date-range-combobox.d.ts +23 -4
- package/lib/unit-definitions/date-range.d.ts +23 -4
- package/lib/unit-definitions/date-time-combobox.d.ts +23 -4
- package/lib/unit-definitions/date.d.ts +23 -4
- package/lib/unit-definitions/email-input.d.ts +23 -4
- package/lib/unit-definitions/email.d.ts +23 -4
- package/lib/unit-definitions/emoji.d.ts +23 -4
- package/lib/unit-definitions/file-collection-count.d.ts +23 -4
- package/lib/unit-definitions/file-compact-collection.d.ts +23 -4
- package/lib/unit-definitions/file-compact-reference.d.ts +27 -4
- package/lib/unit-definitions/file-reference.d.ts +23 -4
- package/lib/unit-definitions/files-gallery.d.ts +23 -4
- package/lib/unit-definitions/files-l-list-item.d.ts +23 -4
- package/lib/unit-definitions/files-l-list.d.ts +23 -4
- package/lib/unit-definitions/files-list-item.d.ts +23 -4
- package/lib/unit-definitions/files-list.d.ts +23 -4
- package/lib/unit-definitions/geometry-preview.d.ts +23 -4
- package/lib/unit-definitions/icon-button.d.ts +28 -4
- package/lib/unit-definitions/icon-input.d.ts +23 -4
- package/lib/unit-definitions/id.d.ts +32 -4
- package/lib/unit-definitions/index.js +2 -2
- package/lib/unit-definitions/json-input.d.ts +22 -4
- package/lib/unit-definitions/location-input.d.ts +23 -4
- package/lib/unit-definitions/location.d.ts +23 -4
- package/lib/unit-definitions/not-found.d.ts +6 -4
- package/lib/unit-definitions/number-input.d.ts +23 -4
- package/lib/unit-definitions/number.d.ts +27 -4
- package/lib/unit-definitions/phone-input.d.ts +23 -4
- package/lib/unit-definitions/phone.d.ts +23 -4
- package/lib/unit-definitions/progress-bar.d.ts +26 -4
- package/lib/unit-definitions/reference-collection-combobox.d.ts +19 -4
- package/lib/unit-definitions/reference-collection-list.d.ts +19 -4
- package/lib/unit-definitions/reference-collection-view.d.ts +19 -4
- package/lib/unit-definitions/reference-collection.d.ts +23 -4
- package/lib/unit-definitions/reference-combobox.d.ts +19 -4
- package/lib/unit-definitions/reference-icon.d.ts +27 -4
- package/lib/unit-definitions/reference.d.ts +27 -4
- package/lib/unit-definitions/rich-text-document.d.ts +23 -4
- package/lib/unit-definitions/rich-text-snippet.d.ts +25 -5
- package/lib/unit-definitions/single-location-preview.d.ts +23 -4
- package/lib/unit-definitions/text-input.d.ts +23 -4
- package/lib/unit-definitions/text.d.ts +23 -4
- package/lib/unit-definitions/title-input.d.ts +24 -4
- package/lib/unit-definitions/title.d.ts +27 -4
- package/lib/unit-definitions/type-badge-abbr.d.ts +15 -4
- package/lib/unit-definitions/type-badge.d.ts +15 -4
- package/lib/unit-definitions/type-icon.d.ts +15 -4
- package/lib/unit-definitions/url-input.d.ts +23 -4
- package/lib/unit-definitions/url.d.ts +23 -4
- package/lib/unit-definitions/user-button.d.ts +13 -4
- package/lib/unit-definitions/user-role-input.d.ts +26 -4
- package/lib/unit-definitions/user-role.d.ts +27 -4
- package/lib/unit-utils/access.d.ts +4 -5
- package/lib/unit-utils/can-edit-field.d.ts +4 -5
- package/lib/unit-utils/common.d.ts +16 -11
- package/lib/unit-utils/decimal.js +4 -4
- package/lib/unit-utils/dynamic-keys.d.ts +8 -9
- package/lib/unit-utils/enums.d.ts +4 -5
- package/lib/unit-utils/formatters.d.ts +15 -16
- package/lib/unit-utils/get-export-value.d.ts +18 -19
- package/lib/unit-utils/get-field-label.d.ts +4 -5
- package/lib/unit-utils/get-unmatched-unit-label.d.ts +2 -3
- package/lib/unit-utils/wrap-normalized-in-expression.d.ts +2 -3
- package/lib/units/board.d.ts +22 -25
- package/lib/units/board.js +2 -1
- package/lib/units/canvas/all-units-data-definitions.js +1 -1
- package/lib/units/canvas/index.d.ts +19 -24
- package/lib/units/canvas/type-badge-abbr.d.ts +13 -35
- package/lib/units/canvas/type-badge.d.ts +13 -35
- package/lib/units/default.d.ts +21 -22
- package/lib/units/default.js +2 -1
- package/lib/units/gallery.d.ts +5 -3
- package/lib/units/gantt.d.ts +23 -24
- package/lib/units/gantt.js +3 -2
- package/lib/units/get-unit-definitions-for-view-type.d.ts +4 -4
- package/lib/units/grid.d.ts +14 -25
- package/lib/units/grid.js +5 -4
- package/lib/units/list.d.ts +17 -26
- package/lib/units/list.js +2 -1
- package/lib/units/make-factory.d.ts +25 -27
- package/lib/units/types.d.ts +19 -13
- package/package.json +8 -8
package/lib/private/utils.js
CHANGED
|
@@ -4,17 +4,26 @@ import pickBy from "lodash/pickBy.js";
|
|
|
4
4
|
//#region src/private/utils.ts
|
|
5
5
|
const REMOVE = Symbol("remove");
|
|
6
6
|
const skipRemove = (unit) => unit !== REMOVE;
|
|
7
|
-
|
|
7
|
+
const typeObjectById = (schema, id) => schema.getTypeObjectById(id);
|
|
8
|
+
const typeObjectByName = (schema, name) => schema.getTypeObjectByName(name);
|
|
9
|
+
const visitColorCoding = (fromType, colorCoding, visitor) => colorCoding.flatMap((entry) => {
|
|
10
|
+
const expression = visitor.visitExpression(fromType, entry.expression);
|
|
11
|
+
return expression === null ? [] : [{
|
|
12
|
+
...entry,
|
|
13
|
+
expression
|
|
14
|
+
}];
|
|
15
|
+
});
|
|
16
|
+
const reuseIfUnchanged = (prev, next) => Object.keys(prev).length === Object.keys(next).length && Object.entries(next).every(([key, value]) => Object.hasOwn(prev, key) && Reflect.get(prev, key) === value) ? prev : next;
|
|
17
|
+
const pruneFilterGroup = (filter, visitExpression) => {
|
|
8
18
|
if (filter.kind !== "group") return null;
|
|
9
19
|
const value = filter.value.map((nestedFilter) => {
|
|
10
|
-
if (nestedFilter.kind === "group") return
|
|
11
|
-
const
|
|
12
|
-
const expression = leaf.value.expression ? visitExpression(leaf.value.expression) : null;
|
|
20
|
+
if (nestedFilter.kind === "group") return pruneFilterGroup(nestedFilter, visitExpression);
|
|
21
|
+
const expression = nestedFilter.value.expression ? visitExpression(nestedFilter.value.expression) : null;
|
|
13
22
|
if (!expression) return null;
|
|
14
23
|
return {
|
|
15
|
-
...
|
|
24
|
+
...nestedFilter,
|
|
16
25
|
value: {
|
|
17
|
-
...
|
|
26
|
+
...nestedFilter.value,
|
|
18
27
|
expression
|
|
19
28
|
}
|
|
20
29
|
};
|
|
@@ -24,20 +33,21 @@ function visitDeleteExpressionInFilterGroup(filter, visitExpression) {
|
|
|
24
33
|
...filter,
|
|
25
34
|
value
|
|
26
35
|
};
|
|
27
|
-
}
|
|
28
|
-
const deleteExpressionWithNotFoundFieldsOrTypesInFilter = (schema, fromType, filter) => {
|
|
29
|
-
return visitDeleteExpressionInFilterGroup(filter, (expression) => deleteExpressionWithNotFoundFieldsOrTypesInExpression(schema, fromType, expression));
|
|
30
36
|
};
|
|
37
|
+
const deleteExpressionWithNotFoundFieldsOrTypesInFilter = (schema, fromType, filter) => pruneFilterGroup(filter, (expression) => deleteExpressionWithNotFoundFieldsOrTypesInExpression(schema, fromType, expression));
|
|
31
38
|
const deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression = (schema, queryExpression) => {
|
|
32
39
|
const { "q/from": fromExpression, "q/where": whereExpression, "q/order-by": orderByExpression } = queryExpression;
|
|
33
40
|
const typeObject = schema.getTypeObjectByName(fromExpression);
|
|
34
41
|
if (!typeObject) return null;
|
|
35
42
|
const visitor = deleteExpressionsWithNotFoundFieldsVisitor(typeObject);
|
|
36
|
-
return
|
|
37
|
-
...
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
return {
|
|
44
|
+
...pickBy({
|
|
45
|
+
...queryExpression,
|
|
46
|
+
...whereExpression ? { "q/where": visitor.visitExpression(whereExpression) } : null,
|
|
47
|
+
...orderByExpression ? { "q/order-by": visitor.visitOrderByExpression(orderByExpression) } : null
|
|
48
|
+
}),
|
|
49
|
+
"q/from": typeObject.name
|
|
50
|
+
};
|
|
41
51
|
};
|
|
42
52
|
const replaceNamesWithIdsInExpression = (schema, fromType, expression) => {
|
|
43
53
|
const typeObject = schema.getTypeObjectByName(fromType);
|
|
@@ -53,18 +63,23 @@ const visitViewUnit = (fromType, unit, visitor) => {
|
|
|
53
63
|
if (unit.kind === "user-button") return unit;
|
|
54
64
|
const { expression } = unit;
|
|
55
65
|
if (!expression) return unit;
|
|
56
|
-
|
|
66
|
+
const nextExpression = visitor.visitExpression(fromType, expression);
|
|
67
|
+
return nextExpression ? {
|
|
57
68
|
...unit,
|
|
58
|
-
expression:
|
|
69
|
+
expression: nextExpression
|
|
70
|
+
} : {
|
|
71
|
+
...unit,
|
|
72
|
+
expression: null
|
|
59
73
|
};
|
|
60
74
|
};
|
|
75
|
+
const visitUnits = (fromType, units, visitor) => units.map((unit) => visitViewUnit(fromType, unit, visitor)).filter(truthy).filter(isUnitExpressionValid).map((unit, idx, visited) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, visited) : unit).filter(skipRemove);
|
|
61
76
|
const visitContextExpression = (fromType, contextExpression, visitor) => {
|
|
62
|
-
|
|
63
|
-
return
|
|
77
|
+
if (!contextExpression) return contextExpression;
|
|
78
|
+
return visitor.visitContextExpression ? visitor.visitContextExpression(fromType, contextExpression) : visitor.visitExpression(fromType, contextExpression);
|
|
64
79
|
};
|
|
65
80
|
const replaceIdsWithNamesInQueryExpression = (schema, queryExpression) => {
|
|
66
81
|
const { "q/from": fromExpression, "q/where": whereExpression, "q/order-by": orderByExpression } = queryExpression;
|
|
67
|
-
const typeObject = schema
|
|
82
|
+
const typeObject = typeObjectById(schema, fromExpression);
|
|
68
83
|
if (!typeObject) return queryExpression;
|
|
69
84
|
const visitor = replaceIdsWithNamesVisitor(typeObject);
|
|
70
85
|
return {
|
|
@@ -74,39 +89,31 @@ const replaceIdsWithNamesInQueryExpression = (schema, queryExpression) => {
|
|
|
74
89
|
...orderByExpression ? { "q/order-by": visitor.visitOrderByExpression(orderByExpression) } : null
|
|
75
90
|
};
|
|
76
91
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
value: {
|
|
88
|
-
...leaf.value,
|
|
89
|
-
expression: leaf.value.expression ? visitExpression(leaf.value.expression) : null
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
})
|
|
93
|
-
};
|
|
94
|
-
}
|
|
92
|
+
const visitFilterGroup = (filter, visitExpression) => ({
|
|
93
|
+
...filter,
|
|
94
|
+
value: filter.value.map((nestedFilter) => nestedFilter.kind === "group" ? visitFilterGroup(nestedFilter, visitExpression) : {
|
|
95
|
+
...nestedFilter,
|
|
96
|
+
value: {
|
|
97
|
+
...nestedFilter.value,
|
|
98
|
+
expression: nestedFilter.value.expression ? visitExpression(nestedFilter.value.expression) : nestedFilter.value.expression
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
});
|
|
95
102
|
const replaceIdsWithNamesInFilter = (schema, fromType, filter) => {
|
|
96
103
|
const typeObject = schema.getTypeObjectById(fromType);
|
|
97
104
|
if (!typeObject) return filter;
|
|
98
105
|
const visitor = replaceIdsWithNamesVisitor(typeObject);
|
|
99
|
-
return filter ? visitFilterGroup(filter, (expression) => visitor.visitExpression(expression)
|
|
106
|
+
return filter && filter.kind === "group" ? visitFilterGroup(filter, (expression) => visitor.visitExpression(expression)) : null;
|
|
100
107
|
};
|
|
101
108
|
const replaceNamesWithIdsInFilter = (schema, fromType, filter) => {
|
|
102
109
|
const typeObject = schema.getTypeObjectByName(fromType);
|
|
103
110
|
if (!typeObject) return filter;
|
|
104
111
|
const visitor = replaceNamesWithIdsVisitor(typeObject);
|
|
105
|
-
return filter ? visitFilterGroup(filter, (expression) => visitor.visitExpression(expression)
|
|
112
|
+
return filter && filter.kind === "group" ? visitFilterGroup(filter, (expression) => visitor.visitExpression(expression)) : null;
|
|
106
113
|
};
|
|
107
114
|
const replaceNamesWithIdsInQueryExpression = (schema, queryExpression) => {
|
|
108
115
|
const { "q/from": fromExpression, "q/where": whereExpression, "q/order-by": orderByExpression } = queryExpression;
|
|
109
|
-
const typeObject = schema
|
|
116
|
+
const typeObject = typeObjectByName(schema, fromExpression);
|
|
110
117
|
if (!typeObject) return queryExpression;
|
|
111
118
|
const visitor = replaceNamesWithIdsVisitor(typeObject);
|
|
112
119
|
return {
|
|
@@ -122,15 +129,9 @@ const deleteExpressionWithNotFoundFieldsOrTypesInExpression = (schema, fromType,
|
|
|
122
129
|
return deleteExpressionsWithNotFoundFieldsVisitor(typeObject).visitExpression(expression);
|
|
123
130
|
};
|
|
124
131
|
const resetContextExpressionIfBroken = (schema, fromType, expression, defaultExpression) => deleteExpressionWithNotFoundFieldsOrTypesInExpression(schema, fromType, expression) || defaultExpression;
|
|
125
|
-
const isUnitExpressionValid = (unit) =>
|
|
126
|
-
if (Object.hasOwn(unit, "expression")) {
|
|
127
|
-
const { expression } = unit;
|
|
128
|
-
return expression !== null;
|
|
129
|
-
}
|
|
130
|
-
return true;
|
|
131
|
-
};
|
|
132
|
+
const isUnitExpressionValid = (unit) => !("expression" in unit) || unit.expression !== null;
|
|
132
133
|
const getFieldObjectsById = (smartFolder, schema) => {
|
|
133
|
-
return smartFolder["fibery/meta"].items.map((item) => item.query["q/from"]).reduce((acc, type) => {
|
|
134
|
+
return (smartFolder["fibery/meta"].items ?? []).map((item) => item.query?.["q/from"]).filter(truthy).reduce((acc, type) => {
|
|
134
135
|
const typeObject = schema.getTypeObjectById(type);
|
|
135
136
|
if (!typeObject) return acc;
|
|
136
137
|
for (const fieldObject of typeObject.fieldObjects) acc[fieldObject.id] = fieldObject;
|
|
@@ -163,5 +164,26 @@ const replaceNamesWithIdsInUnitGroupKey = (unitGroupKey, schema) => {
|
|
|
163
164
|
return `${unitType}_${fieldObject.id}`;
|
|
164
165
|
}).filter(Boolean).join("|");
|
|
165
166
|
};
|
|
167
|
+
const replaceIdsWithNamesViewVisitor = (schema) => ({
|
|
168
|
+
visitQueryExpression: (query) => replaceIdsWithNamesInQueryExpression(schema, query),
|
|
169
|
+
visitFilter: (fromType, filter) => replaceIdsWithNamesInFilter(schema, fromType, filter),
|
|
170
|
+
visitExpression: (fromType, expression) => replaceIdsWithNamesInExpression(schema, fromType, expression)
|
|
171
|
+
});
|
|
172
|
+
const replaceNamesWithIdsViewVisitor = (schema) => ({
|
|
173
|
+
visitQueryExpression: (query) => replaceNamesWithIdsInQueryExpression(schema, query),
|
|
174
|
+
visitFilter: (fromType, filter) => replaceNamesWithIdsInFilter(schema, fromType, filter),
|
|
175
|
+
visitExpression: (fromType, expression) => replaceNamesWithIdsInExpression(schema, fromType, expression)
|
|
176
|
+
});
|
|
177
|
+
const deleteNotFoundViewVisitor = (schema) => ({
|
|
178
|
+
visitQueryExpression: (query) => deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression(schema, query),
|
|
179
|
+
visitFilter: (fromType, filter) => deleteExpressionWithNotFoundFieldsOrTypesInFilter(schema, fromType, filter),
|
|
180
|
+
visitExpression: (fromType, expression) => deleteExpressionWithNotFoundFieldsOrTypesInExpression(schema, fromType, expression)
|
|
181
|
+
});
|
|
182
|
+
const identityViewVisitor = (overrides = {}) => ({
|
|
183
|
+
visitQueryExpression: (query) => query,
|
|
184
|
+
visitFilter: (_fromType, filter) => filter,
|
|
185
|
+
visitExpression: (_fromType, expression) => expression,
|
|
186
|
+
...overrides
|
|
187
|
+
});
|
|
166
188
|
//#endregion
|
|
167
|
-
export { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteExpressionWithNotFoundFieldsOrTypesInFilter, deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression, getFieldObjectsById, isUnitExpressionValid, replaceIdsWithNamesInExpression, replaceIdsWithNamesInFilter, replaceIdsWithNamesInQueryExpression, replaceIdsWithNamesInUnitGroupKey, replaceNamesWithIdsInExpression, replaceNamesWithIdsInFilter, replaceNamesWithIdsInQueryExpression, replaceNamesWithIdsInUnitGroupKey, resetContextExpressionIfBroken, skipRemove, visitContextExpression, visitViewUnit };
|
|
189
|
+
export { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteExpressionWithNotFoundFieldsOrTypesInFilter, deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression, deleteNotFoundViewVisitor, getFieldObjectsById, identityViewVisitor, isUnitExpressionValid, replaceIdsWithNamesInExpression, replaceIdsWithNamesInFilter, replaceIdsWithNamesInQueryExpression, replaceIdsWithNamesInUnitGroupKey, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsInExpression, replaceNamesWithIdsInFilter, replaceNamesWithIdsInQueryExpression, replaceNamesWithIdsInUnitGroupKey, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, skipRemove, typeObjectById, typeObjectByName, visitColorCoding, visitContextExpression, visitUnits, visitViewUnit };
|
package/lib/refs.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FieldId, FieldName, TypeId, TypeName } from "@fibery/schema";
|
|
2
|
+
//#region src/refs.d.ts
|
|
3
|
+
export type Refs = {
|
|
4
|
+
type: string;
|
|
5
|
+
field: string;
|
|
6
|
+
};
|
|
7
|
+
export type IdRefs = {
|
|
8
|
+
type: TypeId;
|
|
9
|
+
field: FieldId;
|
|
10
|
+
};
|
|
11
|
+
export type NameRefs = {
|
|
12
|
+
type: TypeName;
|
|
13
|
+
field: FieldName;
|
|
14
|
+
};
|
|
15
|
+
export type MixedRefs = {
|
|
16
|
+
type: TypeName | TypeId;
|
|
17
|
+
field: FieldName | FieldId;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
package/lib/refs.js
ADDED
|
File without changes
|
|
@@ -1,5 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
|
+
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
2
5
|
//#region src/unit-definitions/avatar-collection.d.ts
|
|
3
|
-
declare const AvatarCollection:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
export declare const AvatarCollection: {
|
|
7
|
+
type: "avatar-collection";
|
|
8
|
+
name: string;
|
|
9
|
+
canEdit({ typeObject, unit: { expression } }: {
|
|
10
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
11
|
+
unit: ExpressionFieldUnit;
|
|
12
|
+
}): boolean;
|
|
13
|
+
getLabel({ typeObject, unit }: {
|
|
14
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
15
|
+
unit: ExpressionFieldUnit;
|
|
16
|
+
}): string;
|
|
17
|
+
makeUnit: ({ expression }?: {
|
|
18
|
+
expression?: UnitExpression;
|
|
19
|
+
}) => ExpressionFieldUnit;
|
|
20
|
+
getQuerySelect({ typeObject, unit: { expression } }: {
|
|
21
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
22
|
+
unit: ExpressionFieldUnit;
|
|
23
|
+
schema: import("@fibery/schema").Schema;
|
|
24
|
+
}): Record<string, unknown>;
|
|
25
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
26
|
+
getExportValue: typeof getReferenceCollectionExportValue;
|
|
27
|
+
canExport: () => true;
|
|
28
|
+
getExportLabel: typeof getFieldLabel;
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
@@ -3,8 +3,8 @@ import { generateAccessCheckQueryExpression } from "../unit-utils/access.js";
|
|
|
3
3
|
import { calculateUnitExpressionErrors, canEditFieldExpression, makeUnitMethod } from "../unit-utils/common.js";
|
|
4
4
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
5
5
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
6
|
-
import { truthy } from "@fibery/helpers/src/_";
|
|
7
6
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
|
+
import { truthy } from "@fibery/helpers/src/_";
|
|
8
8
|
import { mergeDenormalizedSelects, toSelectMapClause } from "@fibery/query-utils/src/select";
|
|
9
9
|
//#region src/unit-definitions/avatar-collection.ts
|
|
10
10
|
const type = "avatar-collection";
|
|
@@ -1,5 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
2
4
|
//#region src/unit-definitions/avatar-input.d.ts
|
|
3
|
-
declare const AvatarInput:
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
export declare const AvatarInput: {
|
|
6
|
+
canEdit({ typeObject, unit: { expression } }: {
|
|
7
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
8
|
+
unit: ExpressionFieldUnit;
|
|
9
|
+
}): boolean;
|
|
10
|
+
getLabel({ typeObject, unit }: {
|
|
11
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
12
|
+
unit: ExpressionFieldUnit;
|
|
13
|
+
}): string;
|
|
14
|
+
getQuerySelect({ typeObject, unit: { expression } }: {
|
|
15
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
16
|
+
unit: ExpressionFieldUnit;
|
|
17
|
+
schema: import("@fibery/schema").Schema;
|
|
18
|
+
}): import("@fibery/schema").Select | {
|
|
19
|
+
[x: string]: "__NOTHING_INTERESTING__TitleField__" | "fibery/id" | {
|
|
20
|
+
"q/from": import("@fibery/schema").FieldName[];
|
|
21
|
+
"q/limit": string;
|
|
22
|
+
"q/select": import("@fibery/schema").Select;
|
|
23
|
+
};
|
|
24
|
+
"fibery/id": "fibery/id";
|
|
25
|
+
__NOTHING_INTERESTING__TitleField__: "__NOTHING_INTERESTING__TitleField__";
|
|
26
|
+
} | {
|
|
27
|
+
"fibery/id"?: undefined;
|
|
28
|
+
__NOTHING_INTERESTING__TitleField__?: undefined;
|
|
29
|
+
};
|
|
30
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
31
|
+
getExportValue: ({ typeObject, unit, object }: {
|
|
32
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
33
|
+
unit: ExpressionFieldUnit;
|
|
34
|
+
object: import("@fibery/expression-utils/src/types").FiberyObject;
|
|
35
|
+
displaySettings: NumberDisplaySettings;
|
|
36
|
+
}) => string | null | undefined;
|
|
37
|
+
canExport: ({ unit }: {
|
|
38
|
+
unit: ExpressionFieldUnit;
|
|
39
|
+
}) => boolean;
|
|
40
|
+
getExportLabel: ({ unit, typeObject }: {
|
|
41
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
42
|
+
unit: ExpressionFieldUnit;
|
|
43
|
+
}) => string;
|
|
44
|
+
type: "avatar-input";
|
|
45
|
+
name: string;
|
|
46
|
+
makeUnit: ({ expression }?: {
|
|
47
|
+
expression?: UnitExpression;
|
|
48
|
+
}) => ExpressionFieldUnit;
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
@@ -1,5 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
4
|
+
import { TypeObject } from "@fibery/schema";
|
|
2
5
|
//#region src/unit-definitions/avatar.d.ts
|
|
3
|
-
declare const Avatar:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
export declare const Avatar: {
|
|
7
|
+
type: "avatar";
|
|
8
|
+
name: string;
|
|
9
|
+
canEdit({ typeObject, unit: { expression } }: {
|
|
10
|
+
typeObject: TypeObject;
|
|
11
|
+
unit: ExpressionFieldUnit;
|
|
12
|
+
}): boolean;
|
|
13
|
+
getLabel({ typeObject, unit }: {
|
|
14
|
+
typeObject: TypeObject;
|
|
15
|
+
unit: ExpressionFieldUnit;
|
|
16
|
+
}): string;
|
|
17
|
+
makeUnit(args?: {
|
|
18
|
+
expression: UnitExpression;
|
|
19
|
+
}): {
|
|
20
|
+
type: "avatar";
|
|
21
|
+
kind: "field";
|
|
22
|
+
expression: string[];
|
|
23
|
+
};
|
|
24
|
+
getQuerySelect({ typeObject, unit: { expression } }: {
|
|
25
|
+
typeObject: TypeObject;
|
|
26
|
+
unit: ExpressionFieldUnit;
|
|
27
|
+
schema: import("@fibery/schema").Schema;
|
|
28
|
+
}): import("@fibery/schema").Select | {
|
|
29
|
+
[x: string]: "__NOTHING_INTERESTING__TitleField__" | "fibery/id" | {
|
|
30
|
+
"q/from": import("@fibery/schema").FieldName[];
|
|
31
|
+
"q/limit": string;
|
|
32
|
+
"q/select": import("@fibery/schema").Select;
|
|
33
|
+
};
|
|
34
|
+
"fibery/id": "fibery/id";
|
|
35
|
+
__NOTHING_INTERESTING__TitleField__: "__NOTHING_INTERESTING__TitleField__";
|
|
36
|
+
} | {
|
|
37
|
+
"fibery/id"?: undefined;
|
|
38
|
+
__NOTHING_INTERESTING__TitleField__?: undefined;
|
|
39
|
+
};
|
|
40
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
41
|
+
getExportValue: ({ typeObject, unit, object }: {
|
|
42
|
+
typeObject: TypeObject;
|
|
43
|
+
unit: ExpressionFieldUnit;
|
|
44
|
+
object: import("@fibery/expression-utils/src/types").FiberyObject;
|
|
45
|
+
displaySettings: NumberDisplaySettings;
|
|
46
|
+
}) => string | null | undefined;
|
|
47
|
+
canExport: ({ unit }: {
|
|
48
|
+
unit: ExpressionFieldUnit;
|
|
49
|
+
}) => boolean;
|
|
50
|
+
getExportLabel: ({ unit, typeObject }: {
|
|
51
|
+
typeObject: TypeObject;
|
|
52
|
+
unit: ExpressionFieldUnit;
|
|
53
|
+
}) => string;
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
@@ -3,8 +3,8 @@ import { generateAccessCheckQueryExpression } from "../unit-utils/access.js";
|
|
|
3
3
|
import { calculateUnitExpressionErrors, canEditFieldExpression } from "../unit-utils/common.js";
|
|
4
4
|
import { getReferenceExportValue } from "../unit-utils/get-export-value.js";
|
|
5
5
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
6
|
-
import { truthy } from "@fibery/helpers/src/_";
|
|
7
6
|
import { assertIsValidExpression, getFieldObjectByFieldExpression, getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
|
+
import { truthy } from "@fibery/helpers/src/_";
|
|
8
8
|
import { denormalizeSelect, mergeDenormalizedSelects, normalizeSelect, toSelectMapClause } from "@fibery/query-utils/src/select";
|
|
9
9
|
//#region src/unit-definitions/avatar.ts
|
|
10
10
|
const type = "avatar";
|
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityLinkProjection } from "../field-utils/back-references.js";
|
|
2
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
4
|
+
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
6
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
7
|
//#region src/unit-definitions/back-references-list.d.ts
|
|
3
|
-
declare const BackReferencesList:
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
export declare const BackReferencesList: {
|
|
9
|
+
type: "back-references-list";
|
|
10
|
+
name: string;
|
|
11
|
+
canEdit: typeof canEditField;
|
|
12
|
+
makeUnit: ({ expression }?: {
|
|
13
|
+
expression?: UnitExpression;
|
|
14
|
+
}) => ExpressionFieldUnit;
|
|
15
|
+
getLabel: typeof getFieldLabel;
|
|
16
|
+
getQuerySelect: ({ typeObject, unit }: {
|
|
17
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
18
|
+
unit: ExpressionFieldUnit;
|
|
19
|
+
schema: import("@fibery/schema").Schema;
|
|
20
|
+
}) => {
|
|
21
|
+
[x: string]: {
|
|
22
|
+
"q/from": import("@fibery/schema").FieldName[];
|
|
23
|
+
"q/select": import("@fibery/expression-utils/src/types").Projection<EntityLinkProjection>;
|
|
24
|
+
"q/order-by": import("@fibery/schema").OrderBy | undefined;
|
|
25
|
+
"q/limit": string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
29
|
+
getExportValue: typeof getExportValue;
|
|
30
|
+
canExport: () => true;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
|
+
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
6
|
//#region src/unit-definitions/bool-checkbox.d.ts
|
|
3
|
-
declare const BoolCheckbox:
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
export declare const BoolCheckbox: {
|
|
8
|
+
type: "bool-checkbox";
|
|
9
|
+
name: string;
|
|
10
|
+
canEdit: typeof canEditField;
|
|
11
|
+
getLabel: typeof getFieldLabel;
|
|
12
|
+
makeUnit: ({ expression }?: {
|
|
13
|
+
expression?: UnitExpression;
|
|
14
|
+
}) => ExpressionFieldUnit;
|
|
15
|
+
getQuerySelect({ typeObject, unit: { expression } }: {
|
|
16
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
17
|
+
unit: ExpressionFieldUnit;
|
|
18
|
+
schema: import("@fibery/schema").Schema;
|
|
19
|
+
}): import("@fibery/schema").Select;
|
|
20
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
21
|
+
getExportValue: typeof getExportValue;
|
|
22
|
+
canExport: () => true;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
|
+
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
6
|
//#region src/unit-definitions/bool.d.ts
|
|
3
|
-
declare const Bool:
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
export declare const Bool: {
|
|
8
|
+
type: "bool";
|
|
9
|
+
name: string;
|
|
10
|
+
canEdit: typeof canEditField;
|
|
11
|
+
getLabel: typeof getFieldLabel;
|
|
12
|
+
makeUnit: ({ expression }?: {
|
|
13
|
+
expression?: UnitExpression;
|
|
14
|
+
}) => ExpressionFieldUnit;
|
|
15
|
+
getQuerySelect({ typeObject, unit: { expression } }: {
|
|
16
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
17
|
+
unit: ExpressionFieldUnit;
|
|
18
|
+
schema: import("@fibery/schema").Schema;
|
|
19
|
+
}): import("@fibery/schema").Select;
|
|
20
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
21
|
+
getExportValue: typeof getExportValue;
|
|
22
|
+
canExport: () => true;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
2
4
|
//#region src/unit-definitions/collection-count.d.ts
|
|
3
|
-
declare const CollectionCount:
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
export declare const CollectionCount: {
|
|
6
|
+
type: "collection-count";
|
|
7
|
+
name: string;
|
|
8
|
+
canEdit: () => false;
|
|
9
|
+
makeUnit: ({ expression }?: {
|
|
10
|
+
expression?: UnitExpression;
|
|
11
|
+
}) => ExpressionFieldUnit;
|
|
12
|
+
getLabel({ typeObject, unit }: {
|
|
13
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
14
|
+
unit: ExpressionFieldUnit;
|
|
15
|
+
}): string;
|
|
16
|
+
getQuerySelect({ unit: { expression } }: {
|
|
17
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
18
|
+
unit: ExpressionFieldUnit;
|
|
19
|
+
schema: import("@fibery/schema").Schema;
|
|
20
|
+
}): {
|
|
21
|
+
[x: string]: (string | string[])[];
|
|
22
|
+
};
|
|
23
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
24
|
+
getExportValue: ({ object, unit }: {
|
|
25
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
26
|
+
unit: ExpressionFieldUnit;
|
|
27
|
+
object: import("@fibery/expression-utils/src/types").FiberyObject;
|
|
28
|
+
displaySettings: NumberDisplaySettings;
|
|
29
|
+
}) => unknown;
|
|
30
|
+
canExport: () => true;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
5
|
//#region src/unit-definitions/color-input.d.ts
|
|
3
|
-
declare const ColorInput:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
export declare const ColorInput: {
|
|
7
|
+
type: "color-input";
|
|
8
|
+
name: string;
|
|
9
|
+
canEdit: typeof canEditField;
|
|
10
|
+
makeUnit: ({ expression }?: {
|
|
11
|
+
expression?: UnitExpression;
|
|
12
|
+
}) => ExpressionFieldUnit;
|
|
13
|
+
getLabel: typeof getFieldLabel;
|
|
14
|
+
getQuerySelect({ typeObject, unit: { expression } }: {
|
|
15
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
16
|
+
unit: ExpressionFieldUnit;
|
|
17
|
+
schema: import("@fibery/schema").Schema;
|
|
18
|
+
}): import("@fibery/schema").Select;
|
|
19
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
20
|
+
getExportValue: () => null;
|
|
21
|
+
canExport: () => false;
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
@@ -1,5 +1,64 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
|
+
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
6
|
//#region src/unit-definitions/comments-list.d.ts
|
|
3
|
-
declare const CommentsList:
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
export declare const CommentsList: {
|
|
8
|
+
type: "comments-list";
|
|
9
|
+
name: string;
|
|
10
|
+
canEdit: typeof canEditField;
|
|
11
|
+
makeUnit: ({ expression }?: {
|
|
12
|
+
expression?: UnitExpression;
|
|
13
|
+
}) => ExpressionFieldUnit;
|
|
14
|
+
getLabel: typeof getFieldLabel;
|
|
15
|
+
getQuerySelect: ({ typeObject, unit }: {
|
|
16
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
17
|
+
unit: ExpressionFieldUnit;
|
|
18
|
+
schema: import("@fibery/schema").Schema;
|
|
19
|
+
}) => {
|
|
20
|
+
[x: string]: {
|
|
21
|
+
"q/from": import("@fibery/schema").FieldName[];
|
|
22
|
+
"q/select": {
|
|
23
|
+
"fibery/id": "fibery/id";
|
|
24
|
+
"fibery/public-id": "fibery/public-id";
|
|
25
|
+
"fibery/creation-date": string;
|
|
26
|
+
"comment/document-secret": string;
|
|
27
|
+
"comments/parent": {
|
|
28
|
+
"fibery/id": string[];
|
|
29
|
+
};
|
|
30
|
+
"fibery/created-by": {
|
|
31
|
+
[x: string]: (string | string[])[] | {
|
|
32
|
+
"q/from": string[];
|
|
33
|
+
"q/limit": string;
|
|
34
|
+
"q/select": {
|
|
35
|
+
"fibery/id": string[];
|
|
36
|
+
"fibery/name": string[];
|
|
37
|
+
"fibery/content-type": string[];
|
|
38
|
+
"fibery/secret": string[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
"fibery/id": string[];
|
|
42
|
+
"user/email": string[];
|
|
43
|
+
"user/name": string[];
|
|
44
|
+
"avatar/avatars": {
|
|
45
|
+
"q/from": string[];
|
|
46
|
+
"q/limit": string;
|
|
47
|
+
"q/select": {
|
|
48
|
+
"fibery/id": string[];
|
|
49
|
+
"fibery/name": string[];
|
|
50
|
+
"fibery/content-type": string[];
|
|
51
|
+
"fibery/secret": string[];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
"q/order-by": import("@fibery/schema").OrderBy | undefined;
|
|
57
|
+
"q/limit": string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
61
|
+
getExportValue: typeof getExportValue;
|
|
62
|
+
canExport: () => true;
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
|
+
import { getDateRangeExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
6
|
//#region src/unit-definitions/date-range-combobox.d.ts
|
|
3
|
-
declare const DateRangeCombobox:
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
export declare const DateRangeCombobox: {
|
|
8
|
+
type: "date-range-combobox";
|
|
9
|
+
name: string;
|
|
10
|
+
canEdit: typeof canEditField;
|
|
11
|
+
makeUnit: ({ expression }?: {
|
|
12
|
+
expression?: UnitExpression;
|
|
13
|
+
}) => ExpressionFieldUnit;
|
|
14
|
+
getLabel: typeof getFieldLabel;
|
|
15
|
+
getQuerySelect: ({ typeObject, unit: { expression } }: {
|
|
16
|
+
typeObject: import("@fibery/schema").TypeObject;
|
|
17
|
+
unit: ExpressionFieldUnit;
|
|
18
|
+
schema: import("@fibery/schema").Schema;
|
|
19
|
+
}) => import("@fibery/schema").Select;
|
|
20
|
+
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
21
|
+
getExportValue: typeof getDateRangeExportValue;
|
|
22
|
+
canExport: () => true;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|