@fibery/views 26.0.6 → 26.0.7
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/_virtual/_rolldown/runtime.js +1 -2
- package/lib/errors.d.ts +1 -3
- package/lib/errors.js +1 -2
- package/lib/field-utils/avatar.d.ts +1 -3
- package/lib/field-utils/avatar.js +1 -2
- package/lib/field-utils/back-references.d.ts +1 -3
- package/lib/field-utils/back-references.js +1 -2
- package/lib/field-utils/comments.d.ts +1 -3
- package/lib/field-utils/comments.js +1 -2
- package/lib/field-utils/date-time.d.ts +1 -3
- package/lib/field-utils/date-time.js +1 -2
- package/lib/field-utils/enum-value.d.ts +1 -3
- package/lib/field-utils/enum-value.js +1 -2
- package/lib/field-utils/file.d.ts +1 -3
- package/lib/field-utils/file.js +1 -2
- package/lib/field-utils/icon.d.ts +1 -3
- package/lib/field-utils/icon.js +1 -2
- package/lib/field-utils/number.d.ts +1 -3
- package/lib/field-utils/number.js +5 -8
- package/lib/field-utils/reference-collection.d.ts +1 -3
- package/lib/field-utils/reference-collection.js +5 -7
- package/lib/field-utils/reference.d.ts +1 -3
- package/lib/field-utils/reference.js +3 -4
- package/lib/field-utils/relation-view.d.ts +1 -3
- package/lib/field-utils/relation-view.js +1 -2
- package/lib/field-utils/rich-text.d.ts +1 -3
- package/lib/field-utils/rich-text.js +1 -2
- package/lib/field-utils/text.d.ts +1 -3
- package/lib/field-utils/text.js +1 -2
- package/lib/field-utils/user-active.d.ts +1 -3
- package/lib/field-utils/user-active.js +1 -2
- package/lib/field-utils/user-role.d.ts +1 -3
- package/lib/field-utils/user-role.js +1 -2
- package/lib/field-utils/workflow.d.ts +1 -3
- package/lib/field-utils/workflow.js +1 -2
- package/lib/filter.d.ts +1 -3
- package/lib/index.d.ts +2 -4
- package/lib/index.js +2 -3
- package/lib/meta-validation.d.ts +1 -3
- package/lib/meta-validation.js +5 -9
- package/lib/private/board.d.ts +1 -3
- package/lib/private/board.js +2 -3
- package/lib/private/calendar.d.ts +1 -3
- package/lib/private/calendar.js +2 -3
- package/lib/private/feed.d.ts +1 -3
- package/lib/private/feed.js +2 -3
- package/lib/private/form.d.ts +1 -3
- package/lib/private/form.js +1 -2
- package/lib/private/map.d.ts +1 -3
- package/lib/private/map.js +2 -3
- package/lib/private/smart-folder.d.ts +1 -3
- package/lib/private/smart-folder.js +2 -3
- package/lib/private/timeline.d.ts +1 -3
- package/lib/private/timeline.js +3 -4
- package/lib/private/units.d.ts +1 -3
- package/lib/private/units.js +17 -2
- package/lib/private/utils.d.ts +1 -3
- package/lib/private/utils.js +3 -5
- package/lib/refs.d.ts +1 -3
- package/lib/unit-definitions/avatar-collection.d.ts +1 -3
- package/lib/unit-definitions/avatar-collection.js +1 -2
- package/lib/unit-definitions/avatar-input.d.ts +2 -4
- package/lib/unit-definitions/avatar-input.js +1 -2
- package/lib/unit-definitions/avatar.d.ts +2 -4
- package/lib/unit-definitions/avatar.js +1 -2
- package/lib/unit-definitions/back-references-list.d.ts +3 -5
- package/lib/unit-definitions/back-references-list.js +2 -3
- package/lib/unit-definitions/bool-checkbox.d.ts +2 -4
- package/lib/unit-definitions/bool-checkbox.js +2 -3
- package/lib/unit-definitions/bool.d.ts +2 -4
- package/lib/unit-definitions/bool.js +2 -3
- package/lib/unit-definitions/collection-count.d.ts +2 -4
- package/lib/unit-definitions/collection-count.js +1 -2
- package/lib/unit-definitions/color-input.d.ts +2 -4
- package/lib/unit-definitions/color-input.js +2 -3
- package/lib/unit-definitions/comments-list.d.ts +2 -4
- package/lib/unit-definitions/comments-list.js +2 -3
- package/lib/unit-definitions/date-range-combobox.d.ts +2 -4
- package/lib/unit-definitions/date-range-combobox.js +2 -3
- package/lib/unit-definitions/date-range.d.ts +2 -4
- package/lib/unit-definitions/date-range.js +2 -3
- package/lib/unit-definitions/date-time-combobox.d.ts +2 -4
- package/lib/unit-definitions/date-time-combobox.js +2 -3
- package/lib/unit-definitions/date.d.ts +2 -4
- package/lib/unit-definitions/date.js +2 -3
- package/lib/unit-definitions/email-input.d.ts +4 -6
- package/lib/unit-definitions/email-input.js +1 -2
- package/lib/unit-definitions/email.d.ts +3 -5
- package/lib/unit-definitions/email.js +1 -2
- package/lib/unit-definitions/emoji.d.ts +3 -5
- package/lib/unit-definitions/emoji.js +1 -2
- package/lib/unit-definitions/file-collection-count.d.ts +2 -4
- package/lib/unit-definitions/file-collection-count.js +2 -3
- package/lib/unit-definitions/file-compact-collection.d.ts +2 -4
- package/lib/unit-definitions/file-compact-collection.js +2 -3
- package/lib/unit-definitions/file-compact-reference.d.ts +1 -3
- package/lib/unit-definitions/file-compact-reference.js +1 -2
- package/lib/unit-definitions/file-reference.d.ts +2 -4
- package/lib/unit-definitions/file-reference.js +2 -3
- package/lib/unit-definitions/files-gallery.d.ts +2 -4
- package/lib/unit-definitions/files-gallery.js +2 -3
- package/lib/unit-definitions/files-l-list-item.d.ts +2 -4
- package/lib/unit-definitions/files-l-list-item.js +2 -3
- package/lib/unit-definitions/files-l-list.d.ts +2 -4
- package/lib/unit-definitions/files-l-list.js +2 -3
- package/lib/unit-definitions/files-list-item.d.ts +2 -4
- package/lib/unit-definitions/files-list-item.js +2 -3
- package/lib/unit-definitions/files-list.d.ts +2 -4
- package/lib/unit-definitions/files-list.js +2 -3
- package/lib/unit-definitions/geometry-preview.d.ts +3 -5
- package/lib/unit-definitions/geometry-preview.js +1 -2
- package/lib/unit-definitions/icon-button.d.ts +2 -4
- package/lib/unit-definitions/icon-button.js +2 -3
- package/lib/unit-definitions/icon-input.d.ts +4 -6
- package/lib/unit-definitions/icon-input.js +1 -2
- package/lib/unit-definitions/id.d.ts +1 -3
- package/lib/unit-definitions/id.js +1 -2
- package/lib/unit-definitions/index.d.ts +4 -3
- package/lib/unit-definitions/index.js +6 -5
- package/lib/unit-definitions/json-input.d.ts +2 -4
- package/lib/unit-definitions/json-input.js +2 -3
- package/lib/unit-definitions/json-preview.d.ts +26 -0
- package/lib/unit-definitions/json-preview.js +31 -0
- package/lib/unit-definitions/location-input.d.ts +3 -5
- package/lib/unit-definitions/location-input.js +1 -2
- package/lib/unit-definitions/location.d.ts +3 -5
- package/lib/unit-definitions/location.js +1 -2
- package/lib/unit-definitions/not-found.d.ts +1 -3
- package/lib/unit-definitions/not-found.js +0 -1
- package/lib/unit-definitions/number-input.d.ts +2 -4
- package/lib/unit-definitions/number-input.js +2 -3
- package/lib/unit-definitions/number.d.ts +1 -3
- package/lib/unit-definitions/number.js +1 -2
- package/lib/unit-definitions/phone-input.d.ts +4 -6
- package/lib/unit-definitions/phone-input.js +1 -2
- package/lib/unit-definitions/phone.d.ts +4 -6
- package/lib/unit-definitions/phone.js +1 -2
- package/lib/unit-definitions/progress-bar.d.ts +1 -3
- package/lib/unit-definitions/progress-bar.js +1 -2
- package/lib/unit-definitions/reference-collection-combobox.d.ts +2 -4
- package/lib/unit-definitions/reference-collection-combobox.js +2 -3
- package/lib/unit-definitions/reference-collection-list.d.ts +2 -4
- package/lib/unit-definitions/reference-collection-list.js +2 -3
- package/lib/unit-definitions/reference-collection-view.d.ts +2 -4
- package/lib/unit-definitions/reference-collection-view.js +2 -3
- package/lib/unit-definitions/reference-collection.d.ts +2 -4
- package/lib/unit-definitions/reference-collection.js +2 -3
- package/lib/unit-definitions/reference-combobox.d.ts +2 -4
- package/lib/unit-definitions/reference-combobox.js +2 -3
- package/lib/unit-definitions/reference-icon.d.ts +3 -5
- package/lib/unit-definitions/reference-icon.js +1 -2
- package/lib/unit-definitions/reference.d.ts +1 -3
- package/lib/unit-definitions/reference.js +1 -2
- package/lib/unit-definitions/rich-text-document.d.ts +2 -4
- package/lib/unit-definitions/rich-text-document.js +2 -3
- package/lib/unit-definitions/rich-text-snippet.d.ts +1 -3
- package/lib/unit-definitions/rich-text-snippet.js +1 -2
- package/lib/unit-definitions/single-location-preview.d.ts +3 -5
- package/lib/unit-definitions/single-location-preview.js +1 -2
- package/lib/unit-definitions/text-input.d.ts +2 -4
- package/lib/unit-definitions/text-input.js +2 -3
- package/lib/unit-definitions/text.d.ts +2 -4
- package/lib/unit-definitions/text.js +2 -3
- package/lib/unit-definitions/title-input.d.ts +1 -3
- package/lib/unit-definitions/title-input.js +1 -2
- package/lib/unit-definitions/title.d.ts +2 -4
- package/lib/unit-definitions/title.js +1 -2
- package/lib/unit-definitions/type-badge-abbr.d.ts +1 -3
- package/lib/unit-definitions/type-badge-abbr.js +1 -2
- package/lib/unit-definitions/type-badge.d.ts +1 -3
- package/lib/unit-definitions/type-badge.js +1 -2
- package/lib/unit-definitions/type-icon.d.ts +1 -3
- package/lib/unit-definitions/type-icon.js +1 -2
- package/lib/unit-definitions/url-input.d.ts +4 -6
- package/lib/unit-definitions/url-input.js +1 -2
- package/lib/unit-definitions/url.d.ts +3 -5
- package/lib/unit-definitions/url.js +1 -2
- package/lib/unit-definitions/user-button.d.ts +1 -3
- package/lib/unit-definitions/user-button.js +1 -2
- package/lib/unit-definitions/user-role-input.d.ts +3 -5
- package/lib/unit-definitions/user-role-input.js +1 -2
- package/lib/unit-definitions/user-role.d.ts +3 -5
- package/lib/unit-definitions/user-role.js +2 -3
- package/lib/unit-utils/access.d.ts +1 -3
- package/lib/unit-utils/access.js +1 -2
- package/lib/unit-utils/can-edit-field.d.ts +1 -3
- package/lib/unit-utils/can-edit-field.js +1 -2
- package/lib/unit-utils/common.d.ts +2 -4
- package/lib/unit-utils/common.js +1 -2
- package/lib/unit-utils/decimal.d.ts +0 -2
- package/lib/unit-utils/decimal.js +1 -2
- package/lib/unit-utils/dynamic-keys.d.ts +1 -3
- package/lib/unit-utils/dynamic-keys.js +1 -2
- package/lib/unit-utils/enums.d.ts +1 -3
- package/lib/unit-utils/enums.js +2 -3
- package/lib/unit-utils/formatters.d.ts +1 -3
- package/lib/unit-utils/formatters.js +2 -4
- package/lib/unit-utils/get-export-value.d.ts +1 -3
- package/lib/unit-utils/get-export-value.js +1 -2
- package/lib/unit-utils/get-field-label.d.ts +1 -3
- package/lib/unit-utils/get-field-label.js +1 -2
- package/lib/unit-utils/get-unmatched-unit-label.d.ts +1 -3
- package/lib/unit-utils/get-unmatched-unit-label.js +2 -4
- package/lib/unit-utils/wrap-normalized-in-expression.d.ts +1 -3
- package/lib/unit-utils/wrap-normalized-in-expression.js +1 -2
- package/lib/units/board.d.ts +1 -3
- package/lib/units/board.js +1 -2
- package/lib/units/canvas/all-units-data-definitions.d.ts +5 -5
- package/lib/units/canvas/all-units-data-definitions.js +6 -7
- package/lib/units/canvas/index.d.ts +0 -1
- package/lib/units/canvas/index.js +1 -2
- package/lib/units/canvas/type-badge-abbr.d.ts +1 -3
- package/lib/units/canvas/type-badge-abbr.js +1 -2
- package/lib/units/canvas/type-badge.d.ts +1 -3
- package/lib/units/canvas/type-badge.js +1 -2
- package/lib/units/default.d.ts +0 -1
- package/lib/units/default.js +1 -2
- package/lib/units/gallery.d.ts +0 -2
- package/lib/units/gallery.js +1 -2
- package/lib/units/gantt.d.ts +1 -3
- package/lib/units/gantt.js +1 -2
- package/lib/units/get-unit-definitions-for-view-type.d.ts +1 -3
- package/lib/units/get-unit-definitions-for-view-type.js +2 -3
- package/lib/units/grid.d.ts +1 -3
- package/lib/units/grid.js +8 -7
- package/lib/units/list.d.ts +1 -3
- package/lib/units/list.js +1 -2
- package/lib/units/make-factory.d.ts +1 -3
- package/lib/units/make-factory.js +20 -28
- package/lib/units/types.d.ts +2 -4
- package/package.json +7 -9
package/lib/private/board.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ColorCoding, UnitDefinitions, ViewVisitor } from "./utils.js";
|
|
|
3
3
|
import { FieldObject, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
4
4
|
import { FieldExpression, Query } from "@fibery/expression-utils/src/types";
|
|
5
5
|
import { Unit } from "@fibery/views/src/units/types";
|
|
6
|
-
//#region src/private/board.d.ts
|
|
7
6
|
export type BoardItemShape<From extends string> = {
|
|
8
7
|
query?: Query<From> | null;
|
|
9
8
|
filter?: FilterGroup | null;
|
|
@@ -219,5 +218,4 @@ export declare const collectGarbage: <From extends string, I extends BoardItemSh
|
|
|
219
218
|
y: EnumsAxis<From, E> | ObjectsAxis<AxisHolderShape<From>> | VisitedAxisHolder<ObjectsAxis<AxisHolderShape<From>>, From> | null | undefined;
|
|
220
219
|
items: VisitedBoardItem<I, From>[];
|
|
221
220
|
};
|
|
222
|
-
};
|
|
223
|
-
//#endregion
|
|
221
|
+
};
|
package/lib/private/board.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, typeObjectById, typeObjectByName, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
2
1
|
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
2
|
+
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, typeObjectById, typeObjectByName, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
3
3
|
import { isFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
4
4
|
import { truthy } from "@fibery/helpers/src/_";
|
|
5
|
-
|
|
5
|
+
// src/private/board.ts
|
|
6
6
|
function visitQueryHolder(holder, visitor, visitHolderUnits = true) {
|
|
7
7
|
if (!holder) return holder;
|
|
8
8
|
const { query, filter, contextExpression, units, ...rest } = holder;
|
|
@@ -162,5 +162,4 @@ const enableHideWhenEmptyForCovers = (view) => {
|
|
|
162
162
|
const enableHideWhenEmptyForCheckedEditableUnits = (view) => visitViewKeepingEnums(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => enableHideWhenEmptyForCheckedEditableUnit(unit) }));
|
|
163
163
|
/** @deprecated Drop unchecked units with `visitViewKeepingEnums(view, identityViewVisitor({visitViewUnit}))`. */
|
|
164
164
|
const collectGarbage = (view) => visitViewKeepingEnums(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => unit.checked ? unit : REMOVE }));
|
|
165
|
-
//#endregion
|
|
166
165
|
export { collectGarbage, deleteExpressionWithNotFoundOrInvalidFieldsOrTypesInBoardView, enableHideWhenEmptyForCheckedEditableUnits, enableHideWhenEmptyForCovers, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInBoardView, replaceIdsWithNamesInBoardView, replaceNamesWithIdsInBoardView, visitViewKeepingEnums };
|
|
@@ -3,7 +3,6 @@ import { ColorCoding, UnitDefinitions, ViewVisitor } from "./utils.js";
|
|
|
3
3
|
import { FieldObject, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
4
4
|
import { Expression, FieldExpression, Query } from "@fibery/expression-utils/src/types";
|
|
5
5
|
import { Unit } from "@fibery/views/src/units/types";
|
|
6
|
-
//#region src/private/calendar.d.ts
|
|
7
6
|
export type CalendarItemShape<From extends string> = {
|
|
8
7
|
query?: Query<From> | null;
|
|
9
8
|
filter?: FilterGroup | null;
|
|
@@ -213,5 +212,4 @@ export declare const collectGarbage: <From extends string, I extends CalendarIte
|
|
|
213
212
|
}, "items"> & {
|
|
214
213
|
items: VisitedCalendarItem<I, From>[];
|
|
215
214
|
};
|
|
216
|
-
};
|
|
217
|
-
//#endregion
|
|
215
|
+
};
|
package/lib/private/calendar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
2
1
|
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
2
|
+
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
3
3
|
import { truthy } from "@fibery/helpers/src/_";
|
|
4
|
-
|
|
4
|
+
// src/private/calendar.ts
|
|
5
5
|
function visitItem(item, visitor) {
|
|
6
6
|
const { query, filter, startExpression, endExpression, contextExpression, units, colorCoding, ...rest } = item;
|
|
7
7
|
const fromType = query?.["q/from"];
|
|
@@ -41,5 +41,4 @@ const fixContextExpressionWithBrokenPath = (schema, view, defaultContextExpressi
|
|
|
41
41
|
const enableHideWhenEmptyForCheckedUnits = (view) => visitView(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => enableHideWhenEmptyForCheckedEditableUnit(unit) }));
|
|
42
42
|
/** @deprecated Drop unchecked units with `visitView(view, identityViewVisitor({visitViewUnit}))`. */
|
|
43
43
|
const collectGarbage = (view) => visitView(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => unit.checked ? unit : REMOVE }));
|
|
44
|
-
//#endregion
|
|
45
44
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInCalendarView, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInCalendarView, replaceIdsWithNamesInCalendarView, replaceNamesWithIdsInCalendarView, visitView };
|
package/lib/private/feed.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ColorCoding, UnitDefinitions, ViewVisitor } from "./utils.js";
|
|
|
3
3
|
import { FieldObject, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
4
4
|
import { FieldExpression, Query } from "@fibery/expression-utils/src/types";
|
|
5
5
|
import { Unit } from "@fibery/views/src/units/types";
|
|
6
|
-
//#region src/private/feed.d.ts
|
|
7
6
|
export type FeedItemShape<From extends string> = {
|
|
8
7
|
query?: Query<From> | null;
|
|
9
8
|
filter?: FilterGroup | null;
|
|
@@ -211,5 +210,4 @@ export declare const collectGarbage: <From extends string, I extends FeedItemSha
|
|
|
211
210
|
}, "items"> & {
|
|
212
211
|
items: VisitedFeedItem<I, From>[];
|
|
213
212
|
};
|
|
214
|
-
};
|
|
215
|
-
//#endregion
|
|
213
|
+
};
|
package/lib/private/feed.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
2
1
|
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
2
|
+
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
3
3
|
import { truthy } from "@fibery/helpers/src/_";
|
|
4
|
-
|
|
4
|
+
// src/private/feed.ts
|
|
5
5
|
function visitItem(item, visitor) {
|
|
6
6
|
const { query, filter, postExpression, contextExpression, units, colorCoding, ...rest } = item;
|
|
7
7
|
const fromType = query?.["q/from"];
|
|
@@ -40,5 +40,4 @@ const fixContextExpressionWithBrokenPath = (schema, view, defaultContextExpressi
|
|
|
40
40
|
const enableHideWhenEmptyForCheckedUnits = (view) => visitView(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => enableHideWhenEmptyForCheckedEditableUnit(unit) }));
|
|
41
41
|
/** @deprecated Drop unchecked units with `visitView(view, identityViewVisitor({visitViewUnit}))`. */
|
|
42
42
|
const collectGarbage = (view) => visitView(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => unit.checked ? unit : REMOVE }));
|
|
43
|
-
//#endregion
|
|
44
43
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInFeedView, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInFeedView, replaceIdsWithNamesInFeedView, replaceNamesWithIdsInFeedView, visitView };
|
package/lib/private/form.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FieldId, FieldName, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
2
|
-
//#region src/private/form.d.ts
|
|
3
2
|
export type FormFieldShape<Field extends string> = {
|
|
4
3
|
id: Field;
|
|
5
4
|
};
|
|
@@ -49,5 +48,4 @@ export declare const deleteExpressionWithNotFoundFieldsOrTypesInFormView: <Type
|
|
|
49
48
|
id: FieldName;
|
|
50
49
|
})[] | null | undefined;
|
|
51
50
|
}>;
|
|
52
|
-
};
|
|
53
|
-
//#endregion
|
|
51
|
+
};
|
package/lib/private/form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { typeObjectById, typeObjectByName } from "./utils.js";
|
|
2
|
-
|
|
2
|
+
// src/private/form.ts
|
|
3
3
|
const withMeta = (view, meta) => {
|
|
4
4
|
const { "fibery/meta": _previous, ...rest } = view;
|
|
5
5
|
return {
|
|
@@ -48,5 +48,4 @@ const deleteExpressionWithNotFoundFieldsOrTypesInFormView = (schema, view) => {
|
|
|
48
48
|
fields: fields && fields.filter((field) => Boolean(typeObject?.getFieldObjectByName(field.id)))
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { deleteExpressionWithNotFoundFieldsOrTypesInFormView, replaceIdsWithNamesInFormView, replaceNamesWithIdsInFormView };
|
package/lib/private/map.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ColorCoding, UnitDefinitions, ViewVisitor } from "./utils.js";
|
|
|
3
3
|
import { FieldObject, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
4
4
|
import { FieldExpression, Query } from "@fibery/expression-utils/src/types";
|
|
5
5
|
import { Unit } from "@fibery/views/src/units/types";
|
|
6
|
-
//#region src/private/map.d.ts
|
|
7
6
|
export type MapItemShape<From extends string> = {
|
|
8
7
|
query?: Query<From> | null;
|
|
9
8
|
filter?: FilterGroup | null;
|
|
@@ -211,5 +210,4 @@ export declare const collectGarbage: <From extends string, I extends MapItemShap
|
|
|
211
210
|
}, "items"> & {
|
|
212
211
|
items: VisitedMapItem<I, From>[];
|
|
213
212
|
};
|
|
214
|
-
};
|
|
215
|
-
//#endregion
|
|
213
|
+
};
|
package/lib/private/map.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
2
1
|
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
2
|
+
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
3
3
|
import { truthy } from "@fibery/helpers/src/_";
|
|
4
|
-
|
|
4
|
+
// src/private/map.ts
|
|
5
5
|
function visitItem(item, visitor) {
|
|
6
6
|
const { query, filter, locationExpression, contextExpression, units, colorCoding, ...rest } = item;
|
|
7
7
|
const fromType = query?.["q/from"];
|
|
@@ -40,5 +40,4 @@ const fixContextExpressionWithBrokenPath = (schema, view, defaultContextExpressi
|
|
|
40
40
|
const enableHideWhenEmptyForCheckedUnits = (view) => visitView(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => enableHideWhenEmptyForCheckedEditableUnit(unit) }));
|
|
41
41
|
/** @deprecated Drop unchecked units with `visitView(view, identityViewVisitor({visitViewUnit}))`. */
|
|
42
42
|
const collectGarbage = (view) => visitView(view, identityViewVisitor({ visitViewUnit: (_fromType, unit) => unit.checked ? unit : REMOVE }));
|
|
43
|
-
//#endregion
|
|
44
43
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInMapView, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInMapView, replaceIdsWithNamesInMapView, replaceNamesWithIdsInMapView, visitView };
|
|
@@ -3,7 +3,6 @@ import { ColorCoding, GroupByExpression, UnitDefinitions, ViewVisitor } from "./
|
|
|
3
3
|
import { FieldObject, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
4
4
|
import { Expression, FieldExpression, Query } from "@fibery/expression-utils/src/types";
|
|
5
5
|
import { Unit } from "@fibery/views/src/units/types";
|
|
6
|
-
//#region src/private/smart-folder.d.ts
|
|
7
6
|
export type SmartFolderItemShape<From extends string> = {
|
|
8
7
|
query?: Query<From> | null;
|
|
9
8
|
filter?: FilterGroup | null;
|
|
@@ -118,5 +117,4 @@ export declare const collectGarbage: <From extends string, I extends SmartFolder
|
|
|
118
117
|
pinnedColumnsWithIds: string[] | undefined;
|
|
119
118
|
columnAggFunc: Record<string, C> | undefined;
|
|
120
119
|
};
|
|
121
|
-
};
|
|
122
|
-
//#endregion
|
|
120
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteNotFoundViewVisitor, getFieldObjectsById, identityViewVisitor, replaceIdsWithNamesInUnitGroupKey, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsInUnitGroupKey, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
2
1
|
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
2
|
+
import { REMOVE, deleteExpressionWithNotFoundFieldsOrTypesInExpression, deleteNotFoundViewVisitor, getFieldObjectsById, identityViewVisitor, replaceIdsWithNamesInUnitGroupKey, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsInUnitGroupKey, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
3
3
|
import { truthy } from "@fibery/helpers/src/_";
|
|
4
4
|
import { replaceIdsWithNamesVisitor, replaceNamesWithIdsVisitor } from "@fibery/expression-utils/src/visitors";
|
|
5
5
|
import { deepEqual } from "@fibery/helpers/src/equal";
|
|
6
|
-
|
|
6
|
+
// src/private/smart-folder.ts
|
|
7
7
|
function visitItems(items, visitor) {
|
|
8
8
|
const removedItemsIndexes = items.flatMap((item, index) => item.query && visitor.visitQueryExpression(item.query) ? [] : [index]);
|
|
9
9
|
const removedBefore = (groupBy) => Object.keys(groupBy).map((key) => removedItemsIndexes.filter((n) => n < parseInt(key)).length);
|
|
@@ -104,5 +104,4 @@ const fixUserSelectedUnitsInSmartFolder = (schema, view, { unitDefinitions, getD
|
|
|
104
104
|
} }));
|
|
105
105
|
const enableHideWhenEmptyForCheckedUnits = (view) => visitSmartFolder(view, identitySmartFolderVisitor({ visitViewUnit: (_fromType, unit) => enableHideWhenEmptyForCheckedEditableUnit(unit) }));
|
|
106
106
|
const collectGarbage = (view) => visitSmartFolder(view, identitySmartFolderVisitor({ visitViewUnit: (_fromType, unit) => unit.checked ? unit : REMOVE }));
|
|
107
|
-
//#endregion
|
|
108
107
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInGroupByExpression, deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder, enableHideWhenEmptyForCheckedUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInSmartFolder, replaceIdsWithNamesInGroupByExpression, replaceIdsWithNamesInSmartFolder, replaceNamesWithIdsInGroupByExpression, replaceNamesWithIdsInSmartFolder, visitSmartFolder };
|
|
@@ -3,7 +3,6 @@ import { ColorCoding, GroupByExpression, UnitDefinitions, ViewVisitor } from "./
|
|
|
3
3
|
import { FieldObject, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
4
4
|
import { Expression, FieldExpression, Query } from "@fibery/expression-utils/src/types";
|
|
5
5
|
import { Unit } from "@fibery/views/src/units/types";
|
|
6
|
-
//#region src/private/timeline.d.ts
|
|
7
6
|
type TimelineVisitor<From extends string, To extends string> = ViewVisitor<From, To> & Required<Pick<ViewVisitor<From, To>, "visitGroupByExpression">>;
|
|
8
7
|
export type AxisSingleShape<From extends string> = {
|
|
9
8
|
query?: Query<From> | null;
|
|
@@ -542,5 +541,4 @@ export declare const collectGarbage: <From extends string, I extends TimelineIte
|
|
|
542
541
|
items: VisitedTimelineItem<I, From>[];
|
|
543
542
|
milestones: VisitedMilestone<T, From>[] | undefined;
|
|
544
543
|
};
|
|
545
|
-
};
|
|
546
|
-
//#endregion
|
|
544
|
+
};
|
package/lib/private/timeline.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, typeObjectById, typeObjectByName, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
2
|
-
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
3
1
|
import { deleteExpressionWithNotFoundFieldsOrTypesInGroupByExpression, replaceIdsWithNamesInGroupByExpression, replaceNamesWithIdsInGroupByExpression } from "./smart-folder.js";
|
|
2
|
+
import { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit } from "./units.js";
|
|
3
|
+
import { REMOVE, deleteNotFoundViewVisitor, identityViewVisitor, replaceIdsWithNamesViewVisitor, replaceNamesWithIdsViewVisitor, resetContextExpressionIfBroken, reuseIfUnchanged, typeObjectById, typeObjectByName, visitColorCoding, visitContextExpression, visitUnits } from "./utils.js";
|
|
4
4
|
import { truthy } from "@fibery/helpers/src/_";
|
|
5
|
-
|
|
5
|
+
// src/private/timeline.ts
|
|
6
6
|
const firstOrNull = (expression) => expression ? expression[0] : null;
|
|
7
7
|
const visitAxisSingle = (axis, visitor) => {
|
|
8
8
|
const { query, filter, contextExpression, units, groupByExpression, ...rest } = axis;
|
|
@@ -179,5 +179,4 @@ const fixUserSelectedUnitsInTimelineView = (schema, view, { unitDefinitions, get
|
|
|
179
179
|
const fixContextExpressionWithBrokenPath = (schema, view, defaultContextExpression) => visitViewKeepingEnums(view, identityTimelineVisitor({ visitContextExpression: (fromType, expression) => resetContextExpressionIfBroken(schema, fromType, expression, defaultContextExpression) }));
|
|
180
180
|
const enableHideWhenEmptyForCheckedEditableUnits = (view) => visitViewKeepingEnums(view, identityTimelineVisitor({ visitViewUnit: (_fromType, unit) => enableHideWhenEmptyForCheckedEditableUnit(unit) }));
|
|
181
181
|
const collectGarbage = (view) => visitViewKeepingEnums(view, identityTimelineVisitor({ visitViewUnit: (_fromType, unit) => unit.checked ? unit : REMOVE }));
|
|
182
|
-
//#endregion
|
|
183
182
|
export { collectGarbage, deleteExpressionWithNotFoundFieldsOrTypesInGanttView, deleteExpressionWithNotFoundFieldsOrTypesInTimelineView, enableHideWhenEmptyForCheckedEditableUnits, fixContextExpressionWithBrokenPath, fixUserSelectedUnitsInTimelineView, replaceIdsWithNamesInTimelineView, replaceNamesWithIdsInTimelineView, visitViewKeepingEnums };
|
package/lib/private/units.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { REMOVE, UnitDefinitions } from "./utils.js";
|
|
2
2
|
import { FieldObject, Schema } from "@fibery/schema";
|
|
3
3
|
import { Unit } from "@fibery/views/src/units/types";
|
|
4
|
-
//#region src/private/units.d.ts
|
|
5
4
|
export declare const fixViewUnit: (schema: Schema, fromType: string, unit: Unit, units: Unit[], { unitDefinitions, getDefaultUnitTypeForField, migrateFileCollectionUnit }: {
|
|
6
5
|
unitDefinitions: UnitDefinitions;
|
|
7
6
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
8
7
|
migrateFileCollectionUnit?: boolean;
|
|
9
8
|
}) => Unit | typeof REMOVE;
|
|
10
|
-
export declare const enableHideWhenEmptyForCheckedEditableUnit: (unit: Unit) => Unit;
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare const enableHideWhenEmptyForCheckedEditableUnit: (unit: Unit) => Unit;
|
package/lib/private/units.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AVATAR_EXTENSION_FIELD } from "../field-utils/avatar.js";
|
|
2
2
|
import { REMOVE } from "./utils.js";
|
|
3
3
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
4
|
-
|
|
4
|
+
// src/private/units.ts
|
|
5
5
|
const getField = (schema, fromType, field) => schema.getTypeObjectByName(fromType)?.getFieldObjectByName(field) ?? null;
|
|
6
6
|
const getFieldType = (schema, fromType, field) => getField(schema, fromType, field)?.type;
|
|
7
7
|
const getFieldMeta = (schema, fromType, field) => getField(schema, fromType, field)?.rawMeta;
|
|
@@ -105,7 +105,17 @@ const migrateUnit = (schema, fromType, unit, units, opts = migrateUnitOptsDefaul
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
const expressionFrom = (unit) => unit.expression;
|
|
108
|
+
const fieldUnitTypesWithoutExpression = /* @__PURE__ */ new Set([
|
|
109
|
+
...Object.keys({
|
|
110
|
+
id: true,
|
|
111
|
+
title: true
|
|
112
|
+
}),
|
|
113
|
+
"avatar",
|
|
114
|
+
"icon-button"
|
|
115
|
+
]);
|
|
116
|
+
const isFieldUnitWithoutExpression = (unit) => (unit.kind ?? getUnitKind(unit)) === "field" && !fieldUnitTypesWithoutExpression.has(unit.type) && !Array.isArray(expressionFrom(unit));
|
|
108
117
|
const fixViewUnit = (schema, fromType, unit, units, { unitDefinitions, getDefaultUnitTypeForField, migrateFileCollectionUnit = true }) => {
|
|
118
|
+
if (isFieldUnitWithoutExpression(unit)) return REMOVE;
|
|
109
119
|
const migrated = migrateUnit(schema, fromType, unit, units, { migrateFileCollectionUnit });
|
|
110
120
|
const expression = expressionFrom(unit) ?? [];
|
|
111
121
|
const fieldObject = getFieldByExpression(schema, fromType, expression);
|
|
@@ -129,6 +139,12 @@ const fixViewUnit = (schema, fromType, unit, units, { unitDefinitions, getDefaul
|
|
|
129
139
|
defaultUnit.checked = true;
|
|
130
140
|
return REMOVE;
|
|
131
141
|
}
|
|
142
|
+
const replacement = allowedUnits.find((u) => u.type === defaultUnitType) ?? allowedUnits[0];
|
|
143
|
+
if (replacement) return {
|
|
144
|
+
...replacement,
|
|
145
|
+
checked: true,
|
|
146
|
+
...unit.hideWhenEmpty === void 0 ? {} : { hideWhenEmpty: unit.hideWhenEmpty }
|
|
147
|
+
};
|
|
132
148
|
} else return REMOVE;
|
|
133
149
|
}
|
|
134
150
|
return migrated;
|
|
@@ -140,5 +156,4 @@ const enableHideWhenEmptyForCheckedEditableUnit = (unit) => {
|
|
|
140
156
|
};
|
|
141
157
|
return unit;
|
|
142
158
|
};
|
|
143
|
-
//#endregion
|
|
144
159
|
export { enableHideWhenEmptyForCheckedEditableUnit, fixViewUnit };
|
package/lib/private/utils.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Filter, FilterGroup } from "../filter.js";
|
|
|
2
2
|
import { FieldObject, Schema, TypeId, TypeName } from "@fibery/schema";
|
|
3
3
|
import { Expression, FieldExpression, Query } from "@fibery/expression-utils/src/types";
|
|
4
4
|
import { Unit } from "@fibery/views/src/units/types";
|
|
5
|
-
//#region src/private/utils.d.ts
|
|
6
5
|
/** @deprecated Use `Filter | FilterGroup` from `../filter`. */
|
|
7
6
|
export type ViewFilter = Filter | FilterGroup;
|
|
8
7
|
export declare const REMOVE: unique symbol;
|
|
@@ -68,5 +67,4 @@ export declare const replaceNamesWithIdsInUnitGroupKey: (unitGroupKey: string, s
|
|
|
68
67
|
export declare const replaceIdsWithNamesViewVisitor: (schema: Schema) => ViewVisitor<TypeName | TypeId, TypeName | TypeId>;
|
|
69
68
|
export declare const replaceNamesWithIdsViewVisitor: (schema: Schema) => ViewVisitor<TypeName | TypeId, TypeId | TypeName>;
|
|
70
69
|
export declare const deleteNotFoundViewVisitor: (schema: Schema) => ViewVisitor<string, TypeName>;
|
|
71
|
-
export declare const identityViewVisitor: <From extends string>(overrides?: Partial<ViewVisitor<From>>) => ViewVisitor<From>;
|
|
72
|
-
//#endregion
|
|
70
|
+
export declare const identityViewVisitor: <From extends string>(overrides?: Partial<ViewVisitor<From>>) => ViewVisitor<From>;
|
package/lib/private/utils.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { truthy } from "@fibery/helpers/src/_";
|
|
2
2
|
import { deleteExpressionsWithNotFoundFieldsVisitor, replaceIdsWithNamesVisitor, replaceNamesWithIdsVisitor } from "@fibery/expression-utils/src/visitors";
|
|
3
|
-
|
|
4
|
-
//#region src/private/utils.ts
|
|
3
|
+
// src/private/utils.ts
|
|
5
4
|
const REMOVE = Symbol("remove");
|
|
6
5
|
const skipRemove = (unit) => unit !== REMOVE;
|
|
7
6
|
const typeObjectById = (schema, id) => schema.getTypeObjectById(id);
|
|
@@ -41,11 +40,11 @@ const deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression = (schema, quer
|
|
|
41
40
|
if (!typeObject) return null;
|
|
42
41
|
const visitor = deleteExpressionsWithNotFoundFieldsVisitor(typeObject);
|
|
43
42
|
return {
|
|
44
|
-
...
|
|
43
|
+
...Object.fromEntries(Object.entries({
|
|
45
44
|
...queryExpression,
|
|
46
45
|
...whereExpression ? { "q/where": visitor.visitExpression(whereExpression) } : null,
|
|
47
46
|
...orderByExpression ? { "q/order-by": visitor.visitOrderByExpression(orderByExpression) } : null
|
|
48
|
-
}),
|
|
47
|
+
}).filter(([, value]) => value)),
|
|
49
48
|
"q/from": typeObject.name
|
|
50
49
|
};
|
|
51
50
|
};
|
|
@@ -185,5 +184,4 @@ const identityViewVisitor = (overrides = {}) => ({
|
|
|
185
184
|
visitExpression: (_fromType, expression) => expression,
|
|
186
185
|
...overrides
|
|
187
186
|
});
|
|
188
|
-
//#endregion
|
|
189
187
|
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
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FieldId, FieldName, TypeId, TypeName } from "@fibery/schema";
|
|
2
|
-
//#region src/refs.d.ts
|
|
3
2
|
export type Refs = {
|
|
4
3
|
type: string;
|
|
5
4
|
field: string;
|
|
@@ -15,5 +14,4 @@ export type NameRefs = {
|
|
|
15
14
|
export type MixedRefs = {
|
|
16
15
|
type: TypeName | TypeId;
|
|
17
16
|
field: FieldName | FieldId;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
17
|
+
};
|
|
@@ -2,7 +2,6 @@ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
|
2
2
|
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
3
|
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
4
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
-
//#region src/unit-definitions/avatar-collection.d.ts
|
|
6
5
|
export declare const AvatarCollection: {
|
|
7
6
|
type: "avatar-collection";
|
|
8
7
|
name: string;
|
|
@@ -26,5 +25,4 @@ export declare const AvatarCollection: {
|
|
|
26
25
|
getExportValue: typeof getReferenceCollectionExportValue;
|
|
27
26
|
canExport: () => true;
|
|
28
27
|
getExportLabel: typeof getFieldLabel;
|
|
29
|
-
};
|
|
30
|
-
//#endregion
|
|
28
|
+
};
|
|
@@ -6,7 +6,7 @@ import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
|
6
6
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
7
|
import { truthy } from "@fibery/helpers/src/_";
|
|
8
8
|
import { mergeDenormalizedSelects, toSelectMapClause } from "@fibery/query-utils/src/select";
|
|
9
|
-
|
|
9
|
+
// src/unit-definitions/avatar-collection.ts
|
|
10
10
|
const type = "avatar-collection";
|
|
11
11
|
const AvatarCollection = {
|
|
12
12
|
type,
|
|
@@ -55,5 +55,4 @@ const AvatarCollection = {
|
|
|
55
55
|
canExport: () => true,
|
|
56
56
|
getExportLabel: getFieldLabel
|
|
57
57
|
};
|
|
58
|
-
//#endregion
|
|
59
58
|
export { AvatarCollection };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
1
2
|
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
3
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
|
-
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
4
|
-
//#region src/unit-definitions/avatar-input.d.ts
|
|
5
4
|
export declare const AvatarInput: {
|
|
6
5
|
canEdit({ typeObject, unit: { expression } }: {
|
|
7
6
|
typeObject: import("@fibery/schema").TypeObject;
|
|
@@ -46,5 +45,4 @@ export declare const AvatarInput: {
|
|
|
46
45
|
makeUnit: ({ expression }?: {
|
|
47
46
|
expression?: UnitExpression;
|
|
48
47
|
}) => ExpressionFieldUnit;
|
|
49
|
-
};
|
|
50
|
-
//#endregion
|
|
48
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeUnitMethod } from "../unit-utils/common.js";
|
|
2
2
|
import { Avatar } from "./avatar.js";
|
|
3
|
-
|
|
3
|
+
// src/unit-definitions/avatar-input.ts
|
|
4
4
|
const type = "avatar-input";
|
|
5
5
|
const AvatarInput = {
|
|
6
6
|
...Avatar,
|
|
@@ -8,5 +8,4 @@ const AvatarInput = {
|
|
|
8
8
|
name: "Avatar",
|
|
9
9
|
makeUnit: makeUnitMethod(type)
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { AvatarInput };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
|
-
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
2
|
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
|
+
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
4
4
|
import { TypeObject } from "@fibery/schema";
|
|
5
|
-
//#region src/unit-definitions/avatar.d.ts
|
|
6
5
|
export declare const Avatar: {
|
|
7
6
|
type: "avatar";
|
|
8
7
|
name: string;
|
|
@@ -51,5 +50,4 @@ export declare const Avatar: {
|
|
|
51
50
|
typeObject: TypeObject;
|
|
52
51
|
unit: ExpressionFieldUnit;
|
|
53
52
|
}) => string;
|
|
54
|
-
};
|
|
55
|
-
//#endregion
|
|
53
|
+
};
|
|
@@ -6,7 +6,7 @@ import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
|
6
6
|
import { assertIsValidExpression, getFieldObjectByFieldExpression, getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
7
|
import { truthy } from "@fibery/helpers/src/_";
|
|
8
8
|
import { denormalizeSelect, mergeDenormalizedSelects, normalizeSelect, toSelectMapClause } from "@fibery/query-utils/src/select";
|
|
9
|
-
|
|
9
|
+
// src/unit-definitions/avatar.ts
|
|
10
10
|
const type = "avatar";
|
|
11
11
|
const getSelfAvatarSelectQuery = (typeObject) => getAvatarSelectQuery({ typeObject }) || {};
|
|
12
12
|
const Avatar = {
|
|
@@ -94,5 +94,4 @@ const Avatar = {
|
|
|
94
94
|
return "Avatar";
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
//#endregion
|
|
98
97
|
export { Avatar };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { EntityLinkProjection } from "../field-utils/back-references.js";
|
|
2
1
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { EntityLinkProjection } from "../field-utils/back-references.js";
|
|
3
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
4
|
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
4
5
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
6
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
6
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
7
|
-
//#region src/unit-definitions/back-references-list.d.ts
|
|
8
7
|
export declare const BackReferencesList: {
|
|
9
8
|
type: "back-references-list";
|
|
10
9
|
name: string;
|
|
@@ -28,5 +27,4 @@ export declare const BackReferencesList: {
|
|
|
28
27
|
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
29
28
|
getExportValue: typeof getExportValue;
|
|
30
29
|
canExport: () => true;
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
30
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getEntityLinksListSelect } from "../field-utils/back-references.js";
|
|
2
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
3
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
6
|
import { getFieldObjectByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
7
|
import { calculateDefaultOrderBy } from "@fibery/query-utils/src/query";
|
|
8
|
-
|
|
8
|
+
// src/unit-definitions/back-references-list.ts
|
|
9
9
|
const type = "back-references-list";
|
|
10
10
|
const getQuerySelect = (fieldObject) => {
|
|
11
11
|
const { name, typeObject } = fieldObject;
|
|
@@ -35,5 +35,4 @@ const BackReferencesList = {
|
|
|
35
35
|
getExportValue,
|
|
36
36
|
canExport: () => true
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { BackReferencesList };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
3
|
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
|
-
//#region src/unit-definitions/bool-checkbox.d.ts
|
|
7
6
|
export declare const BoolCheckbox: {
|
|
8
7
|
type: "bool-checkbox";
|
|
9
8
|
name: string;
|
|
@@ -20,5 +19,4 @@ export declare const BoolCheckbox: {
|
|
|
20
19
|
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
21
20
|
getExportValue: typeof getExportValue;
|
|
22
21
|
canExport: () => true;
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
22
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
1
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
|
-
|
|
6
|
+
// src/unit-definitions/bool-checkbox.ts
|
|
7
7
|
const type = "bool-checkbox";
|
|
8
8
|
const BoolCheckbox = {
|
|
9
9
|
type,
|
|
@@ -21,5 +21,4 @@ const BoolCheckbox = {
|
|
|
21
21
|
getExportValue,
|
|
22
22
|
canExport: () => true
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { BoolCheckbox };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
3
|
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
4
5
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
|
-
//#region src/unit-definitions/bool.d.ts
|
|
7
6
|
export declare const Bool: {
|
|
8
7
|
type: "bool";
|
|
9
8
|
name: string;
|
|
@@ -20,5 +19,4 @@ export declare const Bool: {
|
|
|
20
19
|
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
21
20
|
getExportValue: typeof getExportValue;
|
|
22
21
|
canExport: () => true;
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
22
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
1
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
3
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
|
-
|
|
6
|
+
// src/unit-definitions/bool.ts
|
|
7
7
|
const type = "bool";
|
|
8
8
|
const Bool = {
|
|
9
9
|
type,
|
|
@@ -21,5 +21,4 @@ const Bool = {
|
|
|
21
21
|
getExportValue,
|
|
22
22
|
canExport: () => true
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { Bool };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
1
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
3
3
|
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
4
|
-
//#region src/unit-definitions/collection-count.d.ts
|
|
5
4
|
export declare const CollectionCount: {
|
|
6
5
|
type: "collection-count";
|
|
7
6
|
name: string;
|
|
@@ -28,5 +27,4 @@ export declare const CollectionCount: {
|
|
|
28
27
|
displaySettings: NumberDisplaySettings;
|
|
29
28
|
}) => unknown;
|
|
30
29
|
canExport: () => true;
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
30
|
+
};
|
|
@@ -2,7 +2,7 @@ import { getCountKey, makeCollectionCountExpression } from "../field-utils/refer
|
|
|
2
2
|
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
3
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
4
|
import { getFieldObjectByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
5
|
-
|
|
5
|
+
// src/unit-definitions/collection-count.ts
|
|
6
6
|
const type = "collection-count";
|
|
7
7
|
const CollectionCount = {
|
|
8
8
|
type,
|
|
@@ -31,5 +31,4 @@ const CollectionCount = {
|
|
|
31
31
|
},
|
|
32
32
|
canExport: () => true
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
export { CollectionCount };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
2
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
3
|
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
3
4
|
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
|
-
//#region src/unit-definitions/color-input.d.ts
|
|
6
5
|
export declare const ColorInput: {
|
|
7
6
|
type: "color-input";
|
|
8
7
|
name: string;
|
|
@@ -19,5 +18,4 @@ export declare const ColorInput: {
|
|
|
19
18
|
calculateErrors: typeof calculateUnitExpressionErrors;
|
|
20
19
|
getExportValue: () => null;
|
|
21
20
|
canExport: () => false;
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
21
|
+
};
|