@fibery/views 26.0.6 → 26.0.8
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 +7 -20
- 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 +4 -15
- 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 +4 -5
- 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 +5 -6
- package/lib/private/timeline.d.ts +1 -3
- package/lib/private/timeline.js +6 -7
- 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 +3 -15
- 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 +3 -14
- 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 +3 -14
- 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 +3 -5
- 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 +2 -3
- package/lib/unit-utils/wrap-normalized-in-expression.js +15 -14
- 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
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { Avatar } from "../../unit-definitions/avatar.js";
|
|
3
2
|
import { Bool } from "../../unit-definitions/bool.js";
|
|
4
3
|
import { CollectionCount } from "../../unit-definitions/collection-count.js";
|
|
5
4
|
import { Date } from "../../unit-definitions/date.js";
|
|
6
5
|
import { DateRange } from "../../unit-definitions/date-range.js";
|
|
7
|
-
import { Text } from "../../unit-definitions/text.js";
|
|
8
6
|
import { Email } from "../../unit-definitions/email.js";
|
|
9
|
-
import { Emoji } from "../../unit-definitions/emoji.js";
|
|
10
7
|
import { Id } from "../../unit-definitions/id.js";
|
|
11
|
-
import { Location } from "../../unit-definitions/location.js";
|
|
12
8
|
import { Number } from "../../unit-definitions/number.js";
|
|
13
9
|
import { Phone } from "../../unit-definitions/phone.js";
|
|
14
|
-
import { ReferenceCollection } from "../../unit-definitions/reference-collection.js";
|
|
15
10
|
import { Reference } from "../../unit-definitions/reference.js";
|
|
11
|
+
import { ReferenceCollection } from "../../unit-definitions/reference-collection.js";
|
|
12
|
+
import { Text } from "../../unit-definitions/text.js";
|
|
16
13
|
import { Title } from "../../unit-definitions/title.js";
|
|
17
14
|
import { Url } from "../../unit-definitions/url.js";
|
|
15
|
+
import { Location } from "../../unit-definitions/location.js";
|
|
16
|
+
import { Emoji } from "../../unit-definitions/emoji.js";
|
|
17
|
+
import { Avatar } from "../../unit-definitions/avatar.js";
|
|
18
18
|
import { TypeBadge } from "./type-badge.js";
|
|
19
19
|
import { TypeBadgeAbbr } from "./type-badge-abbr.js";
|
|
20
|
-
|
|
20
|
+
// src/units/canvas/all-units-data-definitions.ts
|
|
21
21
|
var all_units_data_definitions_exports = /* @__PURE__ */ __exportAll({
|
|
22
22
|
Avatar: () => Avatar,
|
|
23
23
|
Bool: () => Bool,
|
|
@@ -38,5 +38,4 @@ var all_units_data_definitions_exports = /* @__PURE__ */ __exportAll({
|
|
|
38
38
|
TypeBadgeAbbr: () => TypeBadgeAbbr,
|
|
39
39
|
Url: () => Url
|
|
40
40
|
});
|
|
41
|
-
//#endregion
|
|
42
41
|
export { Avatar, Bool, CollectionCount, Date, DateRange, Email, Emoji, Id, Location, Number, Phone, Reference, ReferenceCollection, Text, Title, TypeBadge, TypeBadgeAbbr, Url, all_units_data_definitions_exports };
|
|
@@ -2,7 +2,7 @@ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { RichTextSnippet } from "../../unit-definitions/rich-text-snippet.js";
|
|
3
3
|
import { makeUnitDefinitionsFactory } from "../make-factory.js";
|
|
4
4
|
import { all_units_data_definitions_exports } from "./all-units-data-definitions.js";
|
|
5
|
-
|
|
5
|
+
// src/units/canvas/index.ts
|
|
6
6
|
var canvas_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
getCardUnitsSelect: () => getCardUnitsSelect,
|
|
8
8
|
getDefaultUnits: () => getDefaultUnits,
|
|
@@ -23,5 +23,4 @@ const getDefaultUnits = () => {
|
|
|
23
23
|
const { Title, TypeBadge } = allUnitDefinitions;
|
|
24
24
|
return [Title && Title.makeUnit(), TypeBadge && TypeBadge.makeUnit()].filter(Boolean);
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { canvas_exports, getCardUnitsSelect, getDefaultUnits, getHardcodedUnitsForView, getTypeUnits, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
|
-
//#region src/units/canvas/type-badge-abbr.d.ts
|
|
3
2
|
export declare const TypeBadgeAbbr: {
|
|
4
3
|
type: "type-badge-abbr";
|
|
5
4
|
name: string;
|
|
@@ -15,5 +14,4 @@ export declare const TypeBadgeAbbr: {
|
|
|
15
14
|
getQuerySelect({ typeObject }: {
|
|
16
15
|
typeObject: TypeObject;
|
|
17
16
|
}): import("@fibery/schema").Select;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
17
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { TypeBadgeAbbr as TypeBadgeAbbr$1 } from "../../unit-definitions/type-badge-abbr.js";
|
|
2
2
|
import { toSelectMapClause } from "@fibery/query-utils/src/select";
|
|
3
|
-
|
|
3
|
+
// src/units/canvas/type-badge-abbr.ts
|
|
4
4
|
const TypeBadgeAbbr = {
|
|
5
5
|
...TypeBadgeAbbr$1,
|
|
6
6
|
getQuerySelect({ typeObject }) {
|
|
7
7
|
return typeObject.name === "fibery/view" ? toSelectMapClause(["fibery/type"]) : {};
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { TypeBadgeAbbr };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
|
-
//#region src/units/canvas/type-badge.d.ts
|
|
3
2
|
export declare const TypeBadge: {
|
|
4
3
|
type: "type-badge";
|
|
5
4
|
name: string;
|
|
@@ -15,5 +14,4 @@ export declare const TypeBadge: {
|
|
|
15
14
|
getQuerySelect({ typeObject }: {
|
|
16
15
|
typeObject: TypeObject;
|
|
17
16
|
}): import("@fibery/schema").Select;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
17
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { TypeBadge as TypeBadge$1 } from "../../unit-definitions/type-badge.js";
|
|
2
2
|
import { toSelectMapClause } from "@fibery/query-utils/src/select";
|
|
3
|
-
|
|
3
|
+
// src/units/canvas/type-badge.ts
|
|
4
4
|
const TypeBadge = {
|
|
5
5
|
...TypeBadge$1,
|
|
6
6
|
getQuerySelect({ typeObject }) {
|
|
7
7
|
return typeObject.name === "fibery/view" ? toSelectMapClause(["fibery/type"]) : {};
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { TypeBadge };
|
package/lib/units/default.d.ts
CHANGED
package/lib/units/default.js
CHANGED
|
@@ -3,7 +3,7 @@ import { isAvatarExtensionEnabledType } from "../field-utils/avatar.js";
|
|
|
3
3
|
import { unit_definitions_exports } from "../unit-definitions/index.js";
|
|
4
4
|
import { makeUnitDefinitionsFactory } from "./make-factory.js";
|
|
5
5
|
import { truthy } from "@fibery/helpers/src/_";
|
|
6
|
-
|
|
6
|
+
// src/units/default.ts
|
|
7
7
|
var default_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
getCardUnitsSelect: () => getCardUnitsSelect,
|
|
9
9
|
getDefaultUnits: () => getDefaultUnits,
|
|
@@ -20,5 +20,4 @@ const getDefaultUnits = (typeObject) => {
|
|
|
20
20
|
const { Title, Avatar, TypeBadgeAbbr } = unit_definitions_exports;
|
|
21
21
|
return [Title && Title.makeUnit(), typeObject && isAvatarExtensionEnabledType(typeObject) ? Avatar && Avatar.makeUnit() : TypeBadgeAbbr && TypeBadgeAbbr.makeUnit()].filter(truthy);
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { default_exports, getCardUnitsSelect, getDefaultUnits, getHardcodedUnitsForView, getTypeUnits, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField };
|
package/lib/units/gallery.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { getCardUnitsSelect, getHardcodedUnitsForView, getTypeUnits, getUnitDataDefinition, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField } from "./board.js";
|
|
2
2
|
import { TypeObject } from "@fibery/schema";
|
|
3
|
-
//#region src/units/gallery.d.ts
|
|
4
3
|
export declare const getDefaultUnits: (_typeObject: TypeObject) => {
|
|
5
4
|
type: "title";
|
|
6
5
|
kind: "field";
|
|
7
6
|
}[];
|
|
8
|
-
//#endregion
|
|
9
7
|
export { getCardUnitsSelect, getHardcodedUnitsForView, getTypeUnits, getUnitDataDefinition, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField };
|
package/lib/units/gallery.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Title } from "../unit-definitions/title.js";
|
|
3
3
|
import { getCardUnitsSelect, getHardcodedUnitsForView, getTypeUnits, getUnitDataDefinition, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField } from "./board.js";
|
|
4
|
-
|
|
4
|
+
// src/units/gallery.ts
|
|
5
5
|
var gallery_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
getCardUnitsSelect: () => getCardUnitsSelect,
|
|
7
7
|
getDefaultUnits: () => getDefaultUnits,
|
|
@@ -17,5 +17,4 @@ var gallery_exports = /* @__PURE__ */ __exportAll({
|
|
|
17
17
|
const getDefaultUnits = (_typeObject) => {
|
|
18
18
|
return [Title.makeUnit()];
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { gallery_exports, getCardUnitsSelect, getDefaultUnits, getHardcodedUnitsForView, getTypeUnits, getUnitDataDefinition, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField };
|
package/lib/units/gantt.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonUnit, DbUnit, ExpressionFieldUnit, PureUnit, Unit, UnitExpression } from "./types.js";
|
|
2
2
|
import { TypeObject } from "@fibery/schema";
|
|
3
|
-
//#region src/units/gantt.d.ts
|
|
4
3
|
export declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => string | null, getUnitsForType: (typeObject: TypeObject, options?: {
|
|
5
4
|
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
6
5
|
showHiddenFields?: boolean;
|
|
@@ -46,5 +45,4 @@ export declare const getDefaultLaneUnits: (typeObject: TypeObject) => ({
|
|
|
46
45
|
} | {
|
|
47
46
|
type: "type-badge-abbr";
|
|
48
47
|
kind: "db";
|
|
49
|
-
} | ExpressionFieldUnit)[];
|
|
50
|
-
//#endregion
|
|
48
|
+
} | ExpressionFieldUnit)[];
|
package/lib/units/gantt.js
CHANGED
|
@@ -3,7 +3,7 @@ import { isAvatarExtensionEnabledType } from "../field-utils/avatar.js";
|
|
|
3
3
|
import { unit_definitions_exports } from "../unit-definitions/index.js";
|
|
4
4
|
import { makeUnitDefinitionsFactory } from "./make-factory.js";
|
|
5
5
|
import { truthy } from "@fibery/helpers/src/_";
|
|
6
|
-
|
|
6
|
+
// src/units/gantt.ts
|
|
7
7
|
var gantt_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
getCardUnitsSelect: () => getCardUnitsSelect,
|
|
9
9
|
getDefaultLaneUnits: () => getDefaultLaneUnits,
|
|
@@ -25,5 +25,4 @@ const getDefaultLaneUnits = (typeObject) => {
|
|
|
25
25
|
const { Title, Avatar, Emoji, TypeBadgeAbbr } = unit_definitions_exports;
|
|
26
26
|
return [Title && Title.makeUnit(), typeObject && isAvatarExtensionEnabledType(typeObject) && Avatar && Avatar.makeUnit() || typeObject.isEnum && Boolean(typeObject.getFieldObjectByName("enum/icon")) && Emoji && Emoji.makeUnit({ expression: ["enum/icon"] }) || TypeBadgeAbbr && TypeBadgeAbbr.makeUnit()].filter(truthy);
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { gantt_exports, getCardUnitsSelect, getDefaultLaneUnits, getDefaultUnits, getHardcodedUnitsForView, getTypeUnits, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { index_d_exports } from "./canvas/index.js";
|
|
2
2
|
import { default_d_exports } from "./default.js";
|
|
3
|
-
|
|
4
|
-
export declare const getUnitDefinitionsForViewType: (viewType: string) => typeof default_d_exports | typeof index_d_exports;
|
|
5
|
-
//#endregion
|
|
3
|
+
export declare const getUnitDefinitionsForViewType: (viewType: string) => typeof default_d_exports | typeof index_d_exports;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { board_exports } from "./board.js";
|
|
2
|
+
import { canvas_exports } from "./canvas/index.js";
|
|
2
3
|
import { default_exports } from "./default.js";
|
|
3
4
|
import { gallery_exports } from "./gallery.js";
|
|
4
5
|
import { gantt_exports } from "./gantt.js";
|
|
5
|
-
import { canvas_exports } from "./canvas/index.js";
|
|
6
6
|
import { grid_exports } from "./grid.js";
|
|
7
7
|
import { list_exports } from "./list.js";
|
|
8
|
-
|
|
8
|
+
// src/units/get-unit-definitions-for-view-type.ts
|
|
9
9
|
const getUnitDefinitionsForViewType = (viewType) => {
|
|
10
10
|
switch (viewType) {
|
|
11
11
|
case "board": return board_exports;
|
|
@@ -18,5 +18,4 @@ const getUnitDefinitionsForViewType = (viewType) => {
|
|
|
18
18
|
default: return default_exports;
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { getUnitDefinitionsForViewType };
|
package/lib/units/grid.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ButtonUnit, DbUnit, ExpressionFieldUnit, PureUnit, Unit, UnitExpression } from "./types.js";
|
|
2
|
-
//#region src/units/grid.d.ts
|
|
3
2
|
export declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => string | null, getUnitsForType: (typeObject: import("@fibery/schema").TypeObject, options?: {
|
|
4
3
|
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
5
4
|
showHiddenFields?: boolean;
|
|
@@ -34,5 +33,4 @@ export declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) =
|
|
|
34
33
|
export declare const getDefaultUnits: () => {
|
|
35
34
|
type: "title";
|
|
36
35
|
kind: "field";
|
|
37
|
-
}[];
|
|
38
|
-
//#endregion
|
|
36
|
+
}[];
|
package/lib/units/grid.js
CHANGED
|
@@ -3,21 +3,24 @@ import { AvatarCollection } from "../unit-definitions/avatar-collection.js";
|
|
|
3
3
|
import { Avatar } from "../unit-definitions/avatar.js";
|
|
4
4
|
import { Bool } from "../unit-definitions/bool.js";
|
|
5
5
|
import { CollectionCount } from "../unit-definitions/collection-count.js";
|
|
6
|
-
import { Date } from "../unit-definitions/date.js";
|
|
7
6
|
import { DateRange } from "../unit-definitions/date-range.js";
|
|
8
|
-
import {
|
|
7
|
+
import { Date } from "../unit-definitions/date.js";
|
|
9
8
|
import { Email } from "../unit-definitions/email.js";
|
|
10
9
|
import { Emoji } from "../unit-definitions/emoji.js";
|
|
10
|
+
import { FileCollectionCount } from "../unit-definitions/file-collection-count.js";
|
|
11
|
+
import { FilesGallery } from "../unit-definitions/files-gallery.js";
|
|
11
12
|
import { IconButton } from "../unit-definitions/icon-button.js";
|
|
12
13
|
import { Id } from "../unit-definitions/id.js";
|
|
14
|
+
import { JsonPreview } from "../unit-definitions/json-preview.js";
|
|
13
15
|
import { Location } from "../unit-definitions/location.js";
|
|
14
16
|
import { Number } from "../unit-definitions/number.js";
|
|
15
17
|
import { Phone } from "../unit-definitions/phone.js";
|
|
16
18
|
import { ProgressBar } from "../unit-definitions/progress-bar.js";
|
|
17
19
|
import { ReferenceCollection } from "../unit-definitions/reference-collection.js";
|
|
18
|
-
import { Reference } from "../unit-definitions/reference.js";
|
|
19
20
|
import { ReferenceIcon } from "../unit-definitions/reference-icon.js";
|
|
21
|
+
import { Reference } from "../unit-definitions/reference.js";
|
|
20
22
|
import { RichTextSnippet } from "../unit-definitions/rich-text-snippet.js";
|
|
23
|
+
import { Text } from "../unit-definitions/text.js";
|
|
21
24
|
import { Title } from "../unit-definitions/title.js";
|
|
22
25
|
import { TypeBadgeAbbr } from "../unit-definitions/type-badge-abbr.js";
|
|
23
26
|
import { TypeBadge } from "../unit-definitions/type-badge.js";
|
|
@@ -25,12 +28,10 @@ import { TypeIcon } from "../unit-definitions/type-icon.js";
|
|
|
25
28
|
import { Url } from "../unit-definitions/url.js";
|
|
26
29
|
import { UserButton } from "../unit-definitions/user-button.js";
|
|
27
30
|
import { UserRole } from "../unit-definitions/user-role.js";
|
|
28
|
-
import { FileCollectionCount } from "../unit-definitions/file-collection-count.js";
|
|
29
31
|
import { makeUnitDefinitionsFactory } from "./make-factory.js";
|
|
30
|
-
import { FilesGallery } from "../unit-definitions/files-gallery.js";
|
|
31
32
|
import { truthy } from "@fibery/helpers/src/_";
|
|
32
33
|
import { FileReference } from "@fibery/views/src/unit-definitions/file-reference";
|
|
33
|
-
|
|
34
|
+
// src/units/grid.ts
|
|
34
35
|
var grid_exports = /* @__PURE__ */ __exportAll({
|
|
35
36
|
getCardUnitsSelect: () => getCardUnitsSelect,
|
|
36
37
|
getDefaultUnits: () => getDefaultUnits,
|
|
@@ -67,6 +68,7 @@ const allUnitDefinitions = {
|
|
|
67
68
|
TypeBadgeAbbr,
|
|
68
69
|
TypeIcon,
|
|
69
70
|
RichTextSnippet,
|
|
71
|
+
JsonPreview,
|
|
70
72
|
IconButton,
|
|
71
73
|
UserRole,
|
|
72
74
|
FileCollectionCount,
|
|
@@ -78,5 +80,4 @@ const getDefaultUnits = () => {
|
|
|
78
80
|
const { Title } = allUnitDefinitions;
|
|
79
81
|
return [Title && Title.makeUnit()].filter(truthy);
|
|
80
82
|
};
|
|
81
|
-
//#endregion
|
|
82
83
|
export { getCardUnitsSelect, getDefaultUnits, getHardcodedUnitsForView, getTypeUnits, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField, grid_exports };
|
package/lib/units/list.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonUnit, DbUnit, ExpressionFieldUnit, PureUnit, Unit, UnitExpression } from "./types.js";
|
|
2
2
|
import { TypeObject } from "@fibery/schema";
|
|
3
|
-
//#region src/units/list.d.ts
|
|
4
3
|
export declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => string | null, getUnitsForType: (typeObject: TypeObject, options?: {
|
|
5
4
|
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
6
5
|
showHiddenFields?: boolean;
|
|
@@ -39,5 +38,4 @@ export declare const getDefaultUnits: (typeObject: TypeObject) => ({
|
|
|
39
38
|
} | {
|
|
40
39
|
type: "title";
|
|
41
40
|
kind: "field";
|
|
42
|
-
})[];
|
|
43
|
-
//#endregion
|
|
41
|
+
})[];
|
package/lib/units/list.js
CHANGED
|
@@ -3,7 +3,7 @@ import { isAvatarExtensionEnabledType } from "../field-utils/avatar.js";
|
|
|
3
3
|
import { unit_definitions_exports } from "../unit-definitions/index.js";
|
|
4
4
|
import { makeUnitDefinitionsFactory } from "./make-factory.js";
|
|
5
5
|
import { truthy } from "@fibery/helpers/src/_";
|
|
6
|
-
|
|
6
|
+
// src/units/list.ts
|
|
7
7
|
var list_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
getCardUnitsSelect: () => getCardUnitsSelect,
|
|
9
9
|
getDefaultUnits: () => getDefaultUnits,
|
|
@@ -20,5 +20,4 @@ const getDefaultUnits = (typeObject) => {
|
|
|
20
20
|
const { Title, Avatar } = unit_definitions_exports;
|
|
21
21
|
return [Title && Title.makeUnit(), typeObject && isAvatarExtensionEnabledType(typeObject) && Avatar && Avatar.makeUnit()].filter(truthy);
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { getCardUnitsSelect, getDefaultUnits, getHardcodedUnitsForView, getTypeUnits, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField, list_exports };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ButtonUnit, DbUnit, ExpressionFieldUnit, FieldUnit, PureUnit, Unit, UnitDataDefinition, UnitExpression } from "./types.js";
|
|
2
2
|
import { MissingUnitDefinition } from "../unit-definitions/not-found.js";
|
|
3
3
|
import { FieldObject, Schema, TypeObject } from "@fibery/schema";
|
|
4
|
-
//#region src/units/make-factory.d.ts
|
|
5
4
|
type AnyUnitDataDefinition = (UnitDataDefinition<FieldUnit & {
|
|
6
5
|
type: "id" | "title";
|
|
7
6
|
}> & {
|
|
@@ -47,5 +46,4 @@ export declare const makeUnitDefinitionsFactory: (allUnitDefinitions: UnitDefini
|
|
|
47
46
|
units: Unit[];
|
|
48
47
|
}) => import("@fibery/schema").Select;
|
|
49
48
|
getUnitDataDefinition: (unit: Unit) => UnitDataDefinition<Unit> | MissingUnitDefinition;
|
|
50
|
-
};
|
|
51
|
-
//#endregion
|
|
49
|
+
};
|
|
@@ -5,22 +5,17 @@ import { parseNumberFieldMeta } from "../field-utils/number.js";
|
|
|
5
5
|
import { isRelationViewField } from "../field-utils/relation-view.js";
|
|
6
6
|
import { TextUIMeta } from "../field-utils/text.js";
|
|
7
7
|
import { isUserRoleField } from "../field-utils/user-role.js";
|
|
8
|
-
import { calculateUnitExpressionErrors, isUnitEnabled } from "../unit-utils/common.js";
|
|
9
8
|
import { NotFound } from "../unit-definitions/not-found.js";
|
|
9
|
+
import { calculateUnitExpressionErrors, isUnitEnabled } from "../unit-utils/common.js";
|
|
10
10
|
import { truthy } from "@fibery/helpers/src/_";
|
|
11
11
|
import { mergeDenormalizedSelects } from "@fibery/query-utils/src/select";
|
|
12
|
-
import {
|
|
13
|
-
import { single } from "@fibery/helpers/utils/array";
|
|
12
|
+
import { isPlainObject } from "@fibery/helpers/src/object";
|
|
13
|
+
import { groupBy, single } from "@fibery/helpers/utils/array";
|
|
14
14
|
import { assert, traceError } from "@fibery/helpers/utils/trace";
|
|
15
|
-
|
|
16
|
-
import flatMap from "lodash/flatMap.js";
|
|
17
|
-
import groupBy from "lodash/groupBy.js";
|
|
18
|
-
import isPlainObject from "lodash/isPlainObject.js";
|
|
19
|
-
import sortBy from "lodash/sortBy.js";
|
|
20
|
-
//#region src/units/make-factory.ts
|
|
15
|
+
// src/units/make-factory.ts
|
|
21
16
|
const NoUnitsCreator = () => [];
|
|
22
17
|
const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
23
|
-
const { BackReferencesList, Bool, BoolCheckbox, ColorInput, CommentsList, Text, TextInput, Email, EmailInput, Emoji, IconInput, JsonInput, Number, NumberInput, ProgressBar, ReferenceCombobox, ReferenceCollection, ReferenceCollectionList, ReferenceCollectionView, ReferenceCollectionCombobox, FileReference, FileCompactReference, FilesGallery, FileList, FileListItem, FileLList, FileLListItem, FileCollectionCount, FileCompactCollection, Date, DateTimeCombobox, DateRange, DateRangeCombobox, Avatar, AvatarCollection, AvatarInput, CollectionCount, Reference, ReferenceIcon, TypeIcon, TypeBadge, TypeBadgeAbbr, Title, TitleInput, Id, UserButton, Phone, PhoneInput, Location, LocationInput, SingleLocationPreview, GeometryPreview, RichText, RichTextSnippet, RichTextDocument, CommentsCollection, Url, UrlInput, UserRole, UserRoleInput, IconButton } = allUnitDefinitions;
|
|
18
|
+
const { BackReferencesList, Bool, BoolCheckbox, ColorInput, CommentsList, Text, TextInput, Email, EmailInput, Emoji, IconInput, JsonInput, JsonPreview, Number, NumberInput, ProgressBar, ReferenceCombobox, ReferenceCollection, ReferenceCollectionList, ReferenceCollectionView, ReferenceCollectionCombobox, FileReference, FileCompactReference, FilesGallery, FileList, FileListItem, FileLList, FileLListItem, FileCollectionCount, FileCompactCollection, Date, DateTimeCombobox, DateRange, DateRangeCombobox, Avatar, AvatarCollection, AvatarInput, CollectionCount, Reference, ReferenceIcon, TypeIcon, TypeBadge, TypeBadgeAbbr, Title, TitleInput, Id, UserButton, Phone, PhoneInput, Location, LocationInput, SingleLocationPreview, GeometryPreview, RichText, RichTextSnippet, RichTextDocument, CommentsCollection, Url, UrlInput, UserRole, UserRoleInput, IconButton } = allUnitDefinitions;
|
|
24
19
|
const unitsFactoryByBasicFieldType = {
|
|
25
20
|
"fibery/bool": () => [Bool, BoolCheckbox],
|
|
26
21
|
"fibery/date": () => [Date, DateTimeCombobox],
|
|
@@ -66,6 +61,7 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
66
61
|
"fibery/rich-text": NoUnitsCreator,
|
|
67
62
|
"fibery/rank": NoUnitsCreator,
|
|
68
63
|
"fibery/json-value": () => [GeometryPreview, JsonInput],
|
|
64
|
+
"fibery/json": () => [JsonPreview, JsonInput],
|
|
69
65
|
"fibery/uuid": NoUnitsCreator,
|
|
70
66
|
"fibery/decimal": (fieldObject) => [
|
|
71
67
|
Number,
|
|
@@ -158,7 +154,7 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
158
154
|
if (fieldObject.type === "comments/comment" && CommentsCollection) return [CommentsCollection].filter(Boolean).map(makeUnit);
|
|
159
155
|
if (isUserRoleField(fieldObject)) return [UserRole, UserRoleInput].filter(Boolean).map(makeUnit);
|
|
160
156
|
if (fieldObject.isHidden && !showHiddenFields) return [];
|
|
161
|
-
return (unitsFactoryByFieldKind[fieldObject.kind] ||
|
|
157
|
+
return (unitsFactoryByFieldKind[fieldObject.kind] || (() => []))(fieldObject, options).filter(truthy).map(makeUnit);
|
|
162
158
|
};
|
|
163
159
|
const staticUnitsTypeOrder = [
|
|
164
160
|
Id,
|
|
@@ -170,6 +166,10 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
170
166
|
Title,
|
|
171
167
|
UserButton
|
|
172
168
|
].filter(Boolean).map(({ type }) => type);
|
|
169
|
+
const getStaticTypeOrder = (unit) => {
|
|
170
|
+
const index = staticUnitsTypeOrder.indexOf(unit.type);
|
|
171
|
+
return index === -1 ? staticUnitsTypeOrder.length : index;
|
|
172
|
+
};
|
|
173
173
|
function getTypeUnits() {
|
|
174
174
|
return [
|
|
175
175
|
TypeIcon,
|
|
@@ -181,17 +181,13 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
181
181
|
* @returns flat list of all units for given type
|
|
182
182
|
*/
|
|
183
183
|
function getUnitsForType(typeObject, options = {}) {
|
|
184
|
-
|
|
184
|
+
return typeObject.fieldObjects.filter((x) => !x.isHidden).flatMap((fieldObject) => getUnitsForField(fieldObject, options).map((unit) => ({
|
|
185
185
|
unit,
|
|
186
186
|
fieldObject
|
|
187
187
|
}))).concat(getTypeUnits().map((unit) => ({
|
|
188
188
|
unit,
|
|
189
189
|
fieldObject: typeObject.titleFieldObject
|
|
190
|
-
})));
|
|
191
|
-
return sortBy(collection, ({ unit }) => {
|
|
192
|
-
const index = staticUnitsTypeOrder.indexOf(unit.type);
|
|
193
|
-
return index === -1 ? staticUnitsTypeOrder.length : index;
|
|
194
|
-
});
|
|
190
|
+
}))).sort((a, b) => getStaticTypeOrder(a.unit) - getStaticTypeOrder(b.unit));
|
|
195
191
|
}
|
|
196
192
|
/**
|
|
197
193
|
* @returns list of units grouped by field
|
|
@@ -205,12 +201,8 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
205
201
|
units
|
|
206
202
|
});
|
|
207
203
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
const index = staticUnitsTypeOrder.indexOf(unit.type);
|
|
211
|
-
return index === -1 ? staticUnitsTypeOrder.length : index;
|
|
212
|
-
}).sort((a, b) => a - b)[0];
|
|
213
|
-
});
|
|
204
|
+
const getFieldOrder = ({ units }) => Math.min(...units.map(getStaticTypeOrder));
|
|
205
|
+
return collection.sort((a, b) => getFieldOrder(a) - getFieldOrder(b));
|
|
214
206
|
}
|
|
215
207
|
const hardcodedFieldNames = [
|
|
216
208
|
"fibery/creation-date",
|
|
@@ -228,9 +220,9 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
228
220
|
})
|
|
229
221
|
].filter(Boolean);
|
|
230
222
|
};
|
|
231
|
-
const unitDefinitionsByTypeLookup =
|
|
223
|
+
const unitDefinitionsByTypeLookup = new Map(Array.from(groupBy(Object.values(allUnitDefinitions), (x) => x.type), ([type, definitions]) => [type, single(definitions)]));
|
|
232
224
|
const getUnitLabel = (typeObject, unit) => {
|
|
233
|
-
const unitDefinition = unitDefinitionsByTypeLookup
|
|
225
|
+
const unitDefinition = unitDefinitionsByTypeLookup.get(unit.type);
|
|
234
226
|
if (!unitDefinition) return "";
|
|
235
227
|
return unitDefinition.getLabel({
|
|
236
228
|
typeObject,
|
|
@@ -238,12 +230,13 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
238
230
|
});
|
|
239
231
|
};
|
|
240
232
|
const getUnitName = (unit) => {
|
|
241
|
-
const unitDefinition = unitDefinitionsByTypeLookup
|
|
233
|
+
const unitDefinition = unitDefinitionsByTypeLookup.get(unit.type);
|
|
242
234
|
if (!unitDefinition) return null;
|
|
243
235
|
return unitDefinition.name;
|
|
244
236
|
};
|
|
245
237
|
const getUnitDataDefinition = (unit) => {
|
|
246
|
-
|
|
238
|
+
const unitDefinition = unitDefinitionsByTypeLookup.get(unit.type);
|
|
239
|
+
if (unitDefinition) return unitDefinition;
|
|
247
240
|
console.warn(`Unit Definition of type "${unit.type}" does not exist.`);
|
|
248
241
|
return NotFound;
|
|
249
242
|
};
|
|
@@ -277,5 +270,4 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
277
270
|
getUnitDataDefinition
|
|
278
271
|
};
|
|
279
272
|
};
|
|
280
|
-
//#endregion
|
|
281
273
|
export { makeUnitDefinitionsFactory };
|
package/lib/units/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
2
|
import { Schema, TypeId, TypeObject } from "@fibery/schema";
|
|
3
3
|
import { FiberyObject } from "@fibery/expression-utils/src/types";
|
|
4
|
-
//#region src/units/types.d.ts
|
|
5
4
|
export type ButtonUnit = {
|
|
6
5
|
kind: "user-button";
|
|
7
6
|
type: "user-button" | "icon-button";
|
|
@@ -28,7 +27,7 @@ type FieldUnitMetadata = {
|
|
|
28
27
|
settings?: Record<string, unknown>;
|
|
29
28
|
hideWhenEmpty?: boolean;
|
|
30
29
|
};
|
|
31
|
-
type FieldUnitType = "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-collection" | "comments-list" | "date" | "date-time" | "date-time-range" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "files-collection" | "files-gallery" | "files-list" | "files-list-item" | "files-l-list" | "files-l-list-item" | "file-reference" | "file-compact-collection" | "file-compact-reference" | "file-collection-count" | "geometry-preview" | "icon-button" | "icon-input" | "id" | "json-input" | "location" | "location-input" | "number" | "number-input" | "phone" | "phone-input" | "progress-bar" | "reference" | "reference-icon" | "reference-combobox" | "reference-collection" | "reference-collection-list" | "reference-collection-view" | "reference-collection-combobox" | "rich-text-snippet" | "rich-text-document" | "single-location-preview" | "text" | "text-input" | "title" | "title-input" | "url" | "url-input" | "user-role" | "user-role-input";
|
|
30
|
+
type FieldUnitType = "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-collection" | "comments-list" | "date" | "date-time" | "date-time-range" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "files-collection" | "files-gallery" | "files-list" | "files-list-item" | "files-l-list" | "files-l-list-item" | "file-reference" | "file-compact-collection" | "file-compact-reference" | "file-collection-count" | "geometry-preview" | "icon-button" | "icon-input" | "id" | "json-input" | "json-preview" | "location" | "location-input" | "number" | "number-input" | "phone" | "phone-input" | "progress-bar" | "reference" | "reference-icon" | "reference-combobox" | "reference-collection" | "reference-collection-list" | "reference-collection-view" | "reference-collection-combobox" | "rich-text-snippet" | "rich-text-document" | "single-location-preview" | "text" | "text-input" | "title" | "title-input" | "url" | "url-input" | "user-role" | "user-role-input";
|
|
32
31
|
export type ExpressionFieldUnit = FieldUnitMetadata & {
|
|
33
32
|
type: FieldUnitType;
|
|
34
33
|
expression: UnitExpression;
|
|
@@ -76,5 +75,4 @@ export type UnitDataDefinition<T extends Unit> = {
|
|
|
76
75
|
typeObject: TypeObject;
|
|
77
76
|
unit: T;
|
|
78
77
|
}) => string;
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
78
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/views",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.8",
|
|
4
4
|
"description": "Operations on view objects",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Fibery",
|
|
@@ -30,17 +30,15 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@fibery/expression-utils": "17.0.
|
|
34
|
-
"@fibery/helpers": "
|
|
35
|
-
"@fibery/query-utils": "7.2.
|
|
36
|
-
"@fibery/schema": "13.1.
|
|
33
|
+
"@fibery/expression-utils": "17.0.6",
|
|
34
|
+
"@fibery/helpers": "7.1.0",
|
|
35
|
+
"@fibery/query-utils": "7.2.10",
|
|
36
|
+
"@fibery/schema": "13.1.6",
|
|
37
37
|
"date-fns": "3.6.0",
|
|
38
|
-
"lodash": "4.18.1",
|
|
39
38
|
"moment": "2.31.0"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
|
-
"@fibery/expression-utils": "^17.0.
|
|
43
|
-
"@fibery/schema": "^13.1.
|
|
44
|
-
"lodash": "4.18.1"
|
|
41
|
+
"@fibery/expression-utils": "^17.0.6",
|
|
42
|
+
"@fibery/schema": "^13.1.6"
|
|
45
43
|
}
|
|
46
44
|
}
|