@fibery/views 19.0.0 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/errors.d.ts +2 -0
- package/lib/src/errors.js +6 -0
- package/lib/src/field-utils/avatar.d.ts +1 -1
- package/lib/src/field-utils/avatar.js +1 -1
- package/lib/src/field-utils/back-references.d.ts +1 -1
- package/lib/src/field-utils/comments.d.ts +1 -1
- package/lib/src/field-utils/date-time.d.ts +5 -5
- package/lib/src/field-utils/date-time.js +1 -1
- package/lib/src/field-utils/enum-value.d.ts +1 -1
- package/lib/src/field-utils/file.d.ts +1 -1
- package/lib/src/field-utils/file.js +1 -1
- package/lib/src/field-utils/icon.d.ts +1 -1
- package/lib/src/field-utils/number.d.ts +1 -1
- package/lib/src/field-utils/reference-collection.d.ts +2 -2
- package/lib/src/field-utils/reference-collection.js +4 -4
- package/lib/src/field-utils/reference.d.ts +2 -2
- package/lib/src/field-utils/reference.js +4 -4
- package/lib/src/field-utils/relation-view.d.ts +1 -1
- package/lib/src/field-utils/rich-text.d.ts +2 -2
- package/lib/src/field-utils/rich-text.js +1 -1
- package/lib/src/field-utils/text.d.ts +1 -1
- package/lib/src/field-utils/user-active.d.ts +2 -2
- package/lib/src/field-utils/user-role.d.ts +1 -1
- package/lib/src/field-utils/workflow.d.ts +2 -2
- package/lib/src/index.d.ts +30 -16
- package/lib/src/index.js +7 -2
- package/lib/src/meta-validation.d.ts +10 -0
- package/lib/src/meta-validation.js +78 -0
- package/lib/src/private/board.d.ts +15 -11
- package/lib/src/private/board.js +8 -7
- package/lib/src/private/calendar.d.ts +14 -10
- package/lib/src/private/calendar.js +4 -3
- package/lib/src/private/feed.d.ts +14 -10
- package/lib/src/private/feed.js +4 -3
- package/lib/src/private/form.d.ts +25 -3
- package/lib/src/private/form.js +3 -3
- package/lib/src/private/map.d.ts +14 -10
- package/lib/src/private/map.js +4 -3
- package/lib/src/private/smart-folder.d.ts +23 -15
- package/lib/src/private/smart-folder.js +16 -13
- package/lib/src/private/timeline.d.ts +39 -10
- package/lib/src/private/timeline.js +8 -6
- package/lib/src/private/units.d.ts +10 -6
- package/lib/src/private/units.js +32 -24
- package/lib/src/private/utils.d.ts +64 -17
- package/lib/src/private/utils.js +26 -20
- package/lib/src/truthy.d.ts +1 -0
- package/lib/src/truthy.js +7 -0
- package/lib/src/unit-definitions/avatar-collection.d.ts +1 -1
- package/lib/src/unit-definitions/avatar-collection.js +5 -10
- package/lib/src/unit-definitions/avatar-input.d.ts +1 -1
- package/lib/src/unit-definitions/avatar-input.js +1 -1
- package/lib/src/unit-definitions/avatar.d.ts +1 -1
- package/lib/src/unit-definitions/avatar.js +5 -7
- package/lib/src/unit-definitions/back-references-list.d.ts +1 -1
- package/lib/src/unit-definitions/back-references-list.js +3 -3
- package/lib/src/unit-definitions/bool-checkbox.d.ts +1 -1
- package/lib/src/unit-definitions/bool-checkbox.js +2 -2
- package/lib/src/unit-definitions/bool.d.ts +1 -1
- package/lib/src/unit-definitions/bool.js +1 -1
- package/lib/src/unit-definitions/collection-count.d.ts +1 -1
- package/lib/src/unit-definitions/collection-count.js +4 -2
- package/lib/src/unit-definitions/color-input.d.ts +1 -1
- package/lib/src/unit-definitions/color-input.js +1 -1
- package/lib/src/unit-definitions/comments-list.d.ts +1 -1
- package/lib/src/unit-definitions/comments-list.js +1 -1
- package/lib/src/unit-definitions/date-range-combobox.d.ts +1 -1
- package/lib/src/unit-definitions/date-range-combobox.js +1 -1
- package/lib/src/unit-definitions/date-range.d.ts +1 -1
- package/lib/src/unit-definitions/date-range.js +1 -1
- package/lib/src/unit-definitions/date-time-combobox.d.ts +1 -1
- package/lib/src/unit-definitions/date-time-combobox.js +2 -2
- package/lib/src/unit-definitions/date.d.ts +1 -1
- package/lib/src/unit-definitions/date.js +2 -2
- package/lib/src/unit-definitions/email-input.d.ts +1 -1
- package/lib/src/unit-definitions/email-input.js +1 -1
- package/lib/src/unit-definitions/email.d.ts +1 -1
- package/lib/src/unit-definitions/email.js +1 -1
- package/lib/src/unit-definitions/emoji.d.ts +1 -1
- package/lib/src/unit-definitions/emoji.js +1 -1
- package/lib/src/unit-definitions/file-collection-count.d.ts +1 -1
- package/lib/src/unit-definitions/file-collection-count.js +11 -9
- package/lib/src/unit-definitions/file-compact-collection.d.ts +1 -1
- package/lib/src/unit-definitions/file-compact-collection.js +11 -9
- package/lib/src/unit-definitions/file-compact-reference.d.ts +1 -1
- package/lib/src/unit-definitions/file-compact-reference.js +3 -12
- package/lib/src/unit-definitions/file-reference.d.ts +1 -1
- package/lib/src/unit-definitions/file-reference.js +8 -6
- package/lib/src/unit-definitions/files-gallery.d.ts +1 -1
- package/lib/src/unit-definitions/files-gallery.js +11 -9
- package/lib/src/unit-definitions/files-l-list-item.d.ts +1 -1
- package/lib/src/unit-definitions/files-l-list-item.js +8 -6
- package/lib/src/unit-definitions/files-l-list.d.ts +1 -1
- package/lib/src/unit-definitions/files-l-list.js +11 -9
- package/lib/src/unit-definitions/files-list-item.d.ts +1 -1
- package/lib/src/unit-definitions/files-list-item.js +8 -6
- package/lib/src/unit-definitions/files-list.d.ts +1 -1
- package/lib/src/unit-definitions/files-list.js +11 -9
- package/lib/src/unit-definitions/geometry-preview.d.ts +1 -1
- package/lib/src/unit-definitions/geometry-preview.js +1 -1
- package/lib/src/unit-definitions/icon-button.d.ts +1 -1
- package/lib/src/unit-definitions/icon-button.js +1 -1
- package/lib/src/unit-definitions/icon-input.d.ts +1 -1
- package/lib/src/unit-definitions/icon-input.js +1 -1
- package/lib/src/unit-definitions/id.d.ts +1 -1
- package/lib/src/unit-definitions/json-input.d.ts +1 -1
- package/lib/src/unit-definitions/json-input.js +1 -1
- package/lib/src/unit-definitions/location-input.d.ts +1 -1
- package/lib/src/unit-definitions/location-input.js +1 -1
- package/lib/src/unit-definitions/location.d.ts +1 -1
- package/lib/src/unit-definitions/location.js +1 -1
- package/lib/src/unit-definitions/not-found.d.ts +1 -1
- package/lib/src/unit-definitions/number-input.d.ts +1 -1
- package/lib/src/unit-definitions/number-input.js +2 -2
- package/lib/src/unit-definitions/number.d.ts +1 -1
- package/lib/src/unit-definitions/number.js +2 -4
- package/lib/src/unit-definitions/phone-input.d.ts +1 -1
- package/lib/src/unit-definitions/phone-input.js +1 -1
- package/lib/src/unit-definitions/phone.d.ts +1 -1
- package/lib/src/unit-definitions/phone.js +1 -1
- package/lib/src/unit-definitions/progress-bar.d.ts +1 -1
- package/lib/src/unit-definitions/progress-bar.js +1 -4
- package/lib/src/unit-definitions/reference-collection-combobox.d.ts +1 -1
- package/lib/src/unit-definitions/reference-collection-combobox.js +1 -1
- package/lib/src/unit-definitions/reference-collection-list.d.ts +1 -1
- package/lib/src/unit-definitions/reference-collection-list.js +1 -1
- package/lib/src/unit-definitions/reference-collection-view.d.ts +1 -1
- package/lib/src/unit-definitions/reference-collection-view.js +1 -1
- package/lib/src/unit-definitions/reference-collection.d.ts +1 -1
- package/lib/src/unit-definitions/reference-collection.js +3 -3
- package/lib/src/unit-definitions/reference-combobox.d.ts +1 -1
- package/lib/src/unit-definitions/reference-combobox.js +1 -1
- package/lib/src/unit-definitions/reference-icon.d.ts +1 -1
- package/lib/src/unit-definitions/reference-icon.js +1 -1
- package/lib/src/unit-definitions/reference.d.ts +1 -1
- package/lib/src/unit-definitions/reference.js +1 -1
- package/lib/src/unit-definitions/rich-text-document.d.ts +1 -1
- package/lib/src/unit-definitions/rich-text-document.js +2 -2
- package/lib/src/unit-definitions/rich-text-snippet.d.ts +2 -1
- package/lib/src/unit-definitions/rich-text-snippet.js +6 -11
- package/lib/src/unit-definitions/single-location-preview.d.ts +1 -1
- package/lib/src/unit-definitions/single-location-preview.js +1 -1
- package/lib/src/unit-definitions/text-input.d.ts +1 -1
- package/lib/src/unit-definitions/text-input.js +2 -2
- package/lib/src/unit-definitions/text.d.ts +1 -1
- package/lib/src/unit-definitions/text.js +2 -2
- package/lib/src/unit-definitions/title-input.d.ts +1 -1
- package/lib/src/unit-definitions/title.d.ts +1 -1
- package/lib/src/unit-definitions/type-badge-abbr.d.ts +1 -1
- package/lib/src/unit-definitions/type-badge.d.ts +1 -1
- package/lib/src/unit-definitions/type-icon.d.ts +1 -1
- package/lib/src/unit-definitions/url-input.d.ts +1 -1
- package/lib/src/unit-definitions/url-input.js +1 -1
- package/lib/src/unit-definitions/url.d.ts +1 -1
- package/lib/src/unit-definitions/url.js +1 -1
- package/lib/src/unit-definitions/user-button.d.ts +1 -1
- package/lib/src/unit-definitions/user-role-input.d.ts +1 -1
- package/lib/src/unit-definitions/user-role-input.js +1 -1
- package/lib/src/unit-definitions/user-role.d.ts +1 -1
- package/lib/src/unit-definitions/user-role.js +1 -1
- package/lib/src/unit-utils/access.d.ts +2 -2
- package/lib/src/unit-utils/can-edit-field.d.ts +2 -2
- package/lib/src/unit-utils/common.d.ts +3 -3
- package/lib/src/unit-utils/common.js +1 -1
- package/lib/src/unit-utils/enums.d.ts +2 -2
- package/lib/src/unit-utils/formatters.d.ts +2 -2
- package/lib/src/unit-utils/get-export-value.d.ts +4 -4
- package/lib/src/unit-utils/get-export-value.js +3 -3
- package/lib/src/unit-utils/get-field-label.d.ts +2 -2
- package/lib/src/unit-utils/get-unmatched-unit-label.d.ts +1 -1
- package/lib/src/unit-utils/schema.d.ts +1 -1
- package/lib/src/unit-utils/wrap-normalized-in-expression.d.ts +3 -0
- package/lib/src/unit-utils/wrap-normalized-in-expression.js +14 -0
- package/lib/src/units/board.d.ts +5 -5
- package/lib/src/units/board.js +1 -1
- package/lib/src/units/canvas/index.d.ts +4 -4
- package/lib/src/units/canvas/index.js +1 -1
- package/lib/src/units/canvas/type-badge-abbr.d.ts +1 -1
- package/lib/src/units/canvas/type-badge.d.ts +1 -1
- package/lib/src/units/default.d.ts +5 -5
- package/lib/src/units/default.js +1 -1
- package/lib/src/units/gallery.d.ts +1 -1
- package/lib/src/units/gantt.d.ts +5 -5
- package/lib/src/units/gantt.js +1 -1
- package/lib/src/units/get-unit-definitions-for-view-type.js +4 -4
- package/lib/src/units/grid.d.ts +4 -4
- package/lib/src/units/grid.js +7 -7
- package/lib/src/units/list.d.ts +5 -5
- package/lib/src/units/list.js +1 -1
- package/lib/src/units/make-factory.d.ts +4 -5
- package/lib/src/units/make-factory.js +26 -15
- package/lib/src/units/types.d.ts +5 -5
- package/package.json +18 -18
- package/lib/jest.config.cjs +0 -34
- package/lib/jest.config.d.cts +0 -3
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RichTextSnippet = void 0;
|
|
3
|
+
exports.RichTextSnippet = exports.type = void 0;
|
|
4
4
|
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
6
5
|
const common_1 = require("../unit-utils/common");
|
|
7
6
|
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
8
|
-
const
|
|
7
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
8
|
+
exports.type = "rich-text-snippet";
|
|
9
9
|
exports.RichTextSnippet = {
|
|
10
|
-
type,
|
|
10
|
+
type: exports.type,
|
|
11
11
|
name: "Snippet",
|
|
12
12
|
canEdit() {
|
|
13
13
|
return false;
|
|
14
14
|
},
|
|
15
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
15
|
+
makeUnit: (0, common_1.makeUnitMethod)(exports.type),
|
|
16
16
|
getLabel({ typeObject, unit }) {
|
|
17
|
-
|
|
18
|
-
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({
|
|
19
|
-
typeObject,
|
|
20
|
-
expression,
|
|
21
|
-
});
|
|
22
|
-
return `${fieldObject.title} (Snippet)`;
|
|
17
|
+
return `${(0, get_field_label_1.getFieldLabel)({ typeObject, unit })} (Snippet)`;
|
|
23
18
|
},
|
|
24
19
|
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
25
20
|
return (0, query_1.getQuerySelectForExpression)({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const SingleLocationPreview: UnitDataDefinition<FieldUnit>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SingleLocationPreview = void 0;
|
|
4
|
-
const text_1 = require("./text");
|
|
5
4
|
const common_1 = require("../unit-utils/common");
|
|
5
|
+
const text_1 = require("./text");
|
|
6
6
|
const type = "single-location-preview";
|
|
7
7
|
exports.SingleLocationPreview = {
|
|
8
8
|
type,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const TextInput: UnitDataDefinition<FieldUnit>;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TextInput = void 0;
|
|
4
4
|
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
5
6
|
const common_1 = require("../unit-utils/common");
|
|
6
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
7
7
|
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
8
|
-
const
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
9
|
const type = "text-input";
|
|
10
10
|
exports.TextInput = {
|
|
11
11
|
type,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const Text: UnitDataDefinition<FieldUnit>;
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Text = void 0;
|
|
4
4
|
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
5
|
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
6
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
7
|
-
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
8
6
|
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
9
|
const type = "text";
|
|
10
10
|
exports.Text = {
|
|
11
11
|
type,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const TitleInput: UnitDataDefinition<FieldUnit>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const Title: UnitDataDefinition<FieldUnit>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DbUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { DbUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const TypeBadgeAbbr: UnitDataDefinition<DbUnit>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DbUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { DbUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const TypeBadge: UnitDataDefinition<DbUnit>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DbUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { DbUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const TypeIcon: UnitDataDefinition<DbUnit>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const UrlInput: UnitDataDefinition<FieldUnit>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UrlInput = void 0;
|
|
4
|
-
const text_input_1 = require("./text-input");
|
|
5
4
|
const common_1 = require("../unit-utils/common");
|
|
5
|
+
const text_input_1 = require("./text-input");
|
|
6
6
|
const type = "url-input";
|
|
7
7
|
exports.UrlInput = {
|
|
8
8
|
...text_input_1.TextInput,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const Url: UnitDataDefinition<FieldUnit>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Url = void 0;
|
|
4
|
-
const text_1 = require("./text");
|
|
5
4
|
const common_1 = require("../unit-utils/common");
|
|
5
|
+
const text_1 = require("./text");
|
|
6
6
|
const type = "url";
|
|
7
7
|
exports.Url = {
|
|
8
8
|
type,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ButtonUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { ButtonUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const UserButton: UnitDataDefinition<ButtonUnit>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const UserRoleInput: UnitDataDefinition<FieldUnit>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserRoleInput = void 0;
|
|
4
|
-
const user_role_1 = require("./user-role");
|
|
5
4
|
const common_1 = require("../unit-utils/common");
|
|
5
|
+
const user_role_1 = require("./user-role");
|
|
6
6
|
const type = "user-role-input";
|
|
7
7
|
exports.UserRoleInput = {
|
|
8
8
|
...user_role_1.UserRole,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
1
|
+
import type { FieldUnit, UnitDataDefinition } from "../units/types";
|
|
2
2
|
export declare const UserRole: UnitDataDefinition<FieldUnit>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserRole = void 0;
|
|
4
4
|
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
-
const common_1 = require("../unit-utils/common");
|
|
6
5
|
const user_role_1 = require("../field-utils/user-role");
|
|
7
6
|
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
7
|
+
const common_1 = require("../unit-utils/common");
|
|
8
8
|
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
9
9
|
const type = "user-role";
|
|
10
10
|
exports.UserRole = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FieldExpression } from "@fibery/expression-utils";
|
|
2
|
+
import type { TypeObject } from "@fibery/schema";
|
|
3
3
|
export declare const accessCheckKey: string;
|
|
4
4
|
export declare const generateAccessCheckQueryExpression: ({ typeObject, contextPath, }: {
|
|
5
5
|
typeObject: TypeObject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TypeObject } from "@fibery/schema";
|
|
2
|
-
import { FieldUnit } from "../units/types";
|
|
1
|
+
import type { TypeObject } from "@fibery/schema";
|
|
2
|
+
import type { FieldUnit } from "../units/types";
|
|
3
3
|
export declare const canEditField: ({ typeObject, unit: { expression } }: {
|
|
4
4
|
typeObject: TypeObject;
|
|
5
5
|
unit: FieldUnit;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TypeObject } from "@fibery/schema";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { TypeObject } from "@fibery/schema";
|
|
2
|
+
import type { $TSFixMe } from "../tsfixme";
|
|
3
|
+
import type { FieldUnit, PureUnit, Unit, UnitExpression } from "../units/types";
|
|
4
4
|
export declare const makeUnitMethod: (type: FieldUnit["type"]) => ({ expression }?: {
|
|
5
5
|
expression?: UnitExpression;
|
|
6
6
|
}) => FieldUnit;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.canEditFieldExpression = exports.asString = exports.toPureUnit = exports.isUnitEnabled = exports.calculateUnitExpressionErrors = exports.makeUnitMethod = void 0;
|
|
7
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
7
8
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
9
|
const get_unmatched_unit_label_1 = require("./get-unmatched-unit-label");
|
|
9
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
10
10
|
const makeUnitMethod = (type) => ({ expression } = {}) => {
|
|
11
11
|
(0, utils_1.assertIsValidExpression)(expression);
|
|
12
12
|
return { type, kind: "field", expression: expression };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FieldExpression } from "@fibery/expression-utils";
|
|
1
|
+
import type { FieldExpression } from "@fibery/expression-utils";
|
|
3
2
|
import type { Select } from "@fibery/expression-utils/src/types";
|
|
3
|
+
import type { TypeObject } from "@fibery/schema";
|
|
4
4
|
export declare const getEnumIconColorQuery: ({ typeObject, contextPath, }: {
|
|
5
5
|
typeObject: TypeObject;
|
|
6
6
|
contextPath?: FieldExpression;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldObject } from "@fibery/schema";
|
|
2
|
-
import { NumberDisplaySettings } from "../field-utils/number";
|
|
1
|
+
import type { FieldObject } from "@fibery/schema";
|
|
2
|
+
import type { NumberDisplaySettings } from "../field-utils/number";
|
|
3
3
|
export declare const defaultLocale = "en-US";
|
|
4
4
|
export declare const defaultDateFormat = "MMM D, YYYY";
|
|
5
5
|
export declare const defaultDateTimeFormat = "MMM D, YYYY HH:mm";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
3
|
-
import { NumberDisplaySettings } from "../field-utils/number";
|
|
4
|
-
import {
|
|
1
|
+
import type { FiberyObject } from "@fibery/expression-utils/src/types";
|
|
2
|
+
import type { FieldObject, TypeObject } from "@fibery/schema";
|
|
3
|
+
import type { NumberDisplaySettings } from "../field-utils/number";
|
|
4
|
+
import type { FieldUnit } from "../units/types";
|
|
5
5
|
export declare const getExportValue: ({ object, unit }: {
|
|
6
6
|
object: FiberyObject;
|
|
7
7
|
unit: FieldUnit;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNumberExportValue = exports.getTitleExportValue = exports.getLocationExportValue = exports.getDateRangeExportValue = exports.formatDateRangeExportValue = exports.getSnippetExportValue = exports.getReferenceExportValue = exports.getReferenceCollectionExportValue = exports.getExportValue = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
4
5
|
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
6
|
const date_fns_1 = require("date-fns");
|
|
6
7
|
const number_1 = require("../field-utils/number");
|
|
@@ -14,8 +15,7 @@ const getReferenceCollectionExportValue = ({ unit, typeObject, object, }) => {
|
|
|
14
15
|
if (!value || value.length === 0) {
|
|
15
16
|
return value;
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
-
const fieldObject = typeObject.fieldObjectsByName[field];
|
|
18
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression: unit.expression });
|
|
19
19
|
return value.map((v) => v[fieldObject.typeObject.titleField]);
|
|
20
20
|
};
|
|
21
21
|
exports.getReferenceCollectionExportValue = getReferenceCollectionExportValue;
|
|
@@ -51,7 +51,7 @@ const formatDateRangeExportValue = (value, fieldObject) => {
|
|
|
51
51
|
exports.formatDateRangeExportValue = formatDateRangeExportValue;
|
|
52
52
|
const getDateRangeExportValue = ({ object, unit, typeObject, }) => {
|
|
53
53
|
const value = (0, exports.getExportValue)({ object, unit });
|
|
54
|
-
const fieldObject = (0,
|
|
54
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ expression: unit.expression, typeObject });
|
|
55
55
|
return (0, exports.formatDateRangeExportValue)(value, fieldObject);
|
|
56
56
|
};
|
|
57
57
|
exports.getDateRangeExportValue = getDateRangeExportValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TypeObject } from "@fibery/schema";
|
|
2
|
-
import { FieldUnit } from "../units/types";
|
|
1
|
+
import type { TypeObject } from "@fibery/schema";
|
|
2
|
+
import type { FieldUnit } from "../units/types";
|
|
3
3
|
export declare const getFieldLabel: ({ typeObject, unit }: {
|
|
4
4
|
typeObject: TypeObject;
|
|
5
5
|
unit: FieldUnit;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Unit } from "../units/types";
|
|
1
|
+
import type { Unit } from "../units/types";
|
|
2
2
|
export declare const getUnmatchedUnitLabel: (unit: Unit) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema } from "@fibery/schema";
|
|
1
|
+
import type { Schema } from "@fibery/schema";
|
|
2
2
|
export declare const extractTypePart: (type: string) => string;
|
|
3
3
|
export declare const extractTypeNamespacePart: (type: string) => string;
|
|
4
4
|
export declare const getTypeById: (schema: Schema, id: string) => import("@fibery/schema").TypeObject | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FieldExpression } from "@fibery/expression-utils/src/types";
|
|
2
|
+
import type { FieldObject } from "@fibery/schema";
|
|
3
|
+
export declare const wrapNormalizedInExpression: (innerNormalized: Record<string, unknown>, fieldObjects: FieldObject[], expression: FieldExpression) => Record<string, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapNormalizedInExpression = void 0;
|
|
4
|
+
const wrapNormalizedInExpression = (innerNormalized, fieldObjects, expression) => [...expression].reverse().reduce((inner, field, reversedIndex) => {
|
|
5
|
+
const originalIndex = expression.length - 1 - reversedIndex;
|
|
6
|
+
const isTerminal = originalIndex === expression.length - 1;
|
|
7
|
+
if (!isTerminal) {
|
|
8
|
+
const { idField } = fieldObjects[originalIndex].typeObject;
|
|
9
|
+
const innerWithId = idField ? { [idField]: idField, ...inner } : inner;
|
|
10
|
+
return { [field]: innerWithId };
|
|
11
|
+
}
|
|
12
|
+
return { [field]: inner };
|
|
13
|
+
}, innerNormalized);
|
|
14
|
+
exports.wrapNormalizedInExpression = wrapNormalizedInExpression;
|
package/lib/src/units/board.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { TypeObject } from "@fibery/schema";
|
|
1
|
+
import type { TypeObject } from "@fibery/schema";
|
|
2
2
|
export declare const getTypeUnits: () => import("./types").PureUnit[], getUnitName: (unit: import("./types").Unit) => string | null, getUnitsForType: (typeObject: TypeObject, options?: {
|
|
3
|
-
|
|
3
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
4
4
|
showHiddenFields?: boolean;
|
|
5
5
|
isSharingMode?: boolean;
|
|
6
6
|
}) => {
|
|
7
7
|
unit: import("./types").Unit;
|
|
8
8
|
fieldObject: import("@fibery/schema").FieldObject;
|
|
9
9
|
}[], getUnitsForField: (fieldObject: import("@fibery/schema").FieldObject, options?: {
|
|
10
|
-
|
|
10
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
11
11
|
showHiddenFields?: boolean;
|
|
12
12
|
isSharingMode?: boolean;
|
|
13
13
|
}) => import("./types").Unit[], getUnitsForTypePerField: (typeObject: TypeObject, options?: {
|
|
14
|
-
|
|
14
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
15
15
|
showHiddenFields?: boolean;
|
|
16
16
|
isSharingMode?: boolean;
|
|
17
17
|
}) => {
|
|
18
18
|
fieldObject: import("@fibery/schema").FieldObject;
|
|
19
19
|
units: import("./types").Unit[];
|
|
20
20
|
}[], getUnitLabel: (typeObject: TypeObject, unit: import("./types").Unit) => string, getHardcodedUnitsForView: (typeObject: TypeObject) => ({
|
|
21
|
-
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-list" | "date" | "date-time" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "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";
|
|
21
|
+
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "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";
|
|
22
22
|
expression: import("./types").UnitExpression;
|
|
23
23
|
kind: "field";
|
|
24
24
|
settings?: Record<string, unknown> | undefined;
|
package/lib/src/units/board.js
CHANGED
|
@@ -36,8 +36,8 @@ var _a;
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.getDefaultUnits = exports.getUnitDataDefinition = exports.getCardUnitsSelect = exports.getHardcodedUnitsForView = exports.getUnitLabel = exports.getUnitsForTypePerField = exports.getUnitsForField = exports.getUnitsForType = exports.getUnitName = exports.getTypeUnits = void 0;
|
|
38
38
|
const avatar_1 = require("../field-utils/avatar");
|
|
39
|
-
const make_factory_1 = require("./make-factory");
|
|
40
39
|
const allUnitDefinitions = __importStar(require("../unit-definitions"));
|
|
40
|
+
const make_factory_1 = require("./make-factory");
|
|
41
41
|
_a = (0, make_factory_1.makeUnitDefinitionsFactory)(allUnitDefinitions), exports.getTypeUnits = _a.getTypeUnits, exports.getUnitName = _a.getUnitName, exports.getUnitsForType = _a.getUnitsForType, exports.getUnitsForField = _a.getUnitsForField, exports.getUnitsForTypePerField = _a.getUnitsForTypePerField, exports.getUnitLabel = _a.getUnitLabel, exports.getHardcodedUnitsForView = _a.getHardcodedUnitsForView, exports.getCardUnitsSelect = _a.getCardUnitsSelect, exports.getUnitDataDefinition = _a.getUnitDataDefinition;
|
|
42
42
|
const getDefaultUnits = (typeObject) => {
|
|
43
43
|
const { Title, Avatar, TypeBadgeAbbr } = allUnitDefinitions;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const getTypeUnits: () => import("../types").PureUnit[], getUnitName: (unit: import("../types").Unit) => string | null, getUnitsForField: (fieldObject: import("@fibery/schema").FieldObject, options?: {
|
|
2
|
-
|
|
2
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
3
3
|
showHiddenFields?: boolean;
|
|
4
4
|
isSharingMode?: boolean;
|
|
5
5
|
}) => import("../types").Unit[], getUnitsForType: (typeObject: import("@fibery/schema").TypeObject, options?: {
|
|
6
|
-
|
|
6
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
7
7
|
showHiddenFields?: boolean;
|
|
8
8
|
isSharingMode?: boolean;
|
|
9
9
|
}) => {
|
|
10
10
|
unit: import("../types").Unit;
|
|
11
11
|
fieldObject: import("@fibery/schema").FieldObject;
|
|
12
12
|
}[], getUnitsForTypePerField: (typeObject: import("@fibery/schema").TypeObject, options?: {
|
|
13
|
-
|
|
13
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
14
14
|
showHiddenFields?: boolean;
|
|
15
15
|
isSharingMode?: boolean;
|
|
16
16
|
}) => {
|
|
@@ -21,7 +21,7 @@ export declare const getTypeUnits: () => import("../types").PureUnit[], getUnitN
|
|
|
21
21
|
typeObject: import("@fibery/schema").TypeObject;
|
|
22
22
|
units: import("../types").Unit[];
|
|
23
23
|
}) => any, getHardcodedUnitsForView: (typeObject: import("@fibery/schema").TypeObject) => ({
|
|
24
|
-
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-list" | "date" | "date-time" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "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";
|
|
24
|
+
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "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";
|
|
25
25
|
expression: import("../types").UnitExpression;
|
|
26
26
|
kind: "field";
|
|
27
27
|
settings?: Record<string, unknown> | undefined;
|
|
@@ -35,8 +35,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
var _a;
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.getDefaultUnits = exports.getHardcodedUnitsForView = exports.getCardUnitsSelect = exports.getUnitLabel = exports.getUnitsForTypePerField = exports.getUnitsForType = exports.getUnitsForField = exports.getUnitName = exports.getTypeUnits = void 0;
|
|
38
|
-
const make_factory_1 = require("../make-factory");
|
|
39
38
|
const rich_text_snippet_1 = require("../../unit-definitions/rich-text-snippet");
|
|
39
|
+
const make_factory_1 = require("../make-factory");
|
|
40
40
|
const unitDefinitions = __importStar(require("./all-units-data-definitions"));
|
|
41
41
|
const allUnitDefinitions = { ...unitDefinitions, RichTextSnippet: rich_text_snippet_1.RichTextSnippet };
|
|
42
42
|
// noinspection JSUnusedGlobalSymbols
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { TypeObject } from "@fibery/schema";
|
|
1
|
+
import type { TypeObject } from "@fibery/schema";
|
|
2
2
|
export declare const getTypeUnits: () => import("./types").PureUnit[], getUnitName: (unit: import("./types").Unit) => string | null, getUnitsForType: (typeObject: TypeObject, options?: {
|
|
3
|
-
|
|
3
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
4
4
|
showHiddenFields?: boolean;
|
|
5
5
|
isSharingMode?: boolean;
|
|
6
6
|
}) => {
|
|
7
7
|
unit: import("./types").Unit;
|
|
8
8
|
fieldObject: import("@fibery/schema").FieldObject;
|
|
9
9
|
}[], getUnitsForField: (fieldObject: import("@fibery/schema").FieldObject, options?: {
|
|
10
|
-
|
|
10
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
11
11
|
showHiddenFields?: boolean;
|
|
12
12
|
isSharingMode?: boolean;
|
|
13
13
|
}) => import("./types").Unit[], getUnitsForTypePerField: (typeObject: TypeObject, options?: {
|
|
14
|
-
|
|
14
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
15
15
|
showHiddenFields?: boolean;
|
|
16
16
|
isSharingMode?: boolean;
|
|
17
17
|
}) => {
|
|
@@ -22,7 +22,7 @@ export declare const getTypeUnits: () => import("./types").PureUnit[], getUnitNa
|
|
|
22
22
|
typeObject: TypeObject;
|
|
23
23
|
units: import("./types").Unit[];
|
|
24
24
|
}) => any, getUnitLabel: (typeObject: TypeObject, unit: import("./types").Unit) => string, getHardcodedUnitsForView: (typeObject: TypeObject) => ({
|
|
25
|
-
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-list" | "date" | "date-time" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "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";
|
|
25
|
+
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "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";
|
|
26
26
|
expression: import("./types").UnitExpression;
|
|
27
27
|
kind: "field";
|
|
28
28
|
settings?: Record<string, unknown> | undefined;
|
package/lib/src/units/default.js
CHANGED
|
@@ -36,8 +36,8 @@ var _a;
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.getDefaultUnits = exports.getHardcodedUnitsForView = exports.getUnitLabel = exports.getCardUnitsSelect = exports.getUnitsForTypePerField = exports.getUnitsForField = exports.getUnitsForType = exports.getUnitName = exports.getTypeUnits = void 0;
|
|
38
38
|
const avatar_1 = require("../field-utils/avatar");
|
|
39
|
-
const make_factory_1 = require("./make-factory");
|
|
40
39
|
const allUnitDefinitions = __importStar(require("../unit-definitions"));
|
|
40
|
+
const make_factory_1 = require("./make-factory");
|
|
41
41
|
_a = (0, make_factory_1.makeUnitDefinitionsFactory)(allUnitDefinitions), exports.getTypeUnits = _a.getTypeUnits, exports.getUnitName = _a.getUnitName, exports.getUnitsForType = _a.getUnitsForType, exports.getUnitsForField = _a.getUnitsForField, exports.getUnitsForTypePerField = _a.getUnitsForTypePerField, exports.getCardUnitsSelect = _a.getCardUnitsSelect, exports.getUnitLabel = _a.getUnitLabel, exports.getHardcodedUnitsForView = _a.getHardcodedUnitsForView;
|
|
42
42
|
const getDefaultUnits = (typeObject) => {
|
|
43
43
|
const { Title, Avatar, TypeBadgeAbbr } = allUnitDefinitions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TypeObject } from "@fibery/schema";
|
|
1
|
+
import type { TypeObject } from "@fibery/schema";
|
|
2
2
|
export { getCardUnitsSelect, getHardcodedUnitsForView, getTypeUnits, getUnitDataDefinition, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField, } from "./board";
|
|
3
3
|
export declare const getDefaultUnits: (_typeObject: TypeObject) => import("./types").PureUnit[];
|
package/lib/src/units/gantt.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { TypeObject } from "@fibery/schema";
|
|
1
|
+
import type { TypeObject } from "@fibery/schema";
|
|
2
2
|
export declare const getTypeUnits: () => import("./types").PureUnit[], getUnitName: (unit: import("./types").Unit) => string | null, getUnitsForType: (typeObject: TypeObject, options?: {
|
|
3
|
-
|
|
3
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
4
4
|
showHiddenFields?: boolean;
|
|
5
5
|
isSharingMode?: boolean;
|
|
6
6
|
}) => {
|
|
7
7
|
unit: import("./types").Unit;
|
|
8
8
|
fieldObject: import("@fibery/schema").FieldObject;
|
|
9
9
|
}[], getUnitsForField: (fieldObject: import("@fibery/schema").FieldObject, options?: {
|
|
10
|
-
|
|
10
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
11
11
|
showHiddenFields?: boolean;
|
|
12
12
|
isSharingMode?: boolean;
|
|
13
13
|
}) => import("./types").Unit[], getUnitsForTypePerField: (typeObject: TypeObject, options?: {
|
|
14
|
-
|
|
14
|
+
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
15
15
|
showHiddenFields?: boolean;
|
|
16
16
|
isSharingMode?: boolean;
|
|
17
17
|
}) => {
|
|
@@ -22,7 +22,7 @@ export declare const getTypeUnits: () => import("./types").PureUnit[], getUnitNa
|
|
|
22
22
|
typeObject: TypeObject;
|
|
23
23
|
units: import("./types").Unit[];
|
|
24
24
|
}) => any, getUnitLabel: (typeObject: TypeObject, unit: import("./types").Unit) => string, getHardcodedUnitsForView: (typeObject: TypeObject) => ({
|
|
25
|
-
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-list" | "date" | "date-time" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "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";
|
|
25
|
+
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "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";
|
|
26
26
|
expression: import("./types").UnitExpression;
|
|
27
27
|
kind: "field";
|
|
28
28
|
settings?: Record<string, unknown> | undefined;
|
package/lib/src/units/gantt.js
CHANGED
|
@@ -36,8 +36,8 @@ var _a;
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.getDefaultLaneUnits = exports.getDefaultUnits = exports.getHardcodedUnitsForView = exports.getUnitLabel = exports.getCardUnitsSelect = exports.getUnitsForTypePerField = exports.getUnitsForField = exports.getUnitsForType = exports.getUnitName = exports.getTypeUnits = void 0;
|
|
38
38
|
const avatar_1 = require("../field-utils/avatar");
|
|
39
|
-
const make_factory_1 = require("./make-factory");
|
|
40
39
|
const allUnitDefinitions = __importStar(require("../unit-definitions"));
|
|
40
|
+
const make_factory_1 = require("./make-factory");
|
|
41
41
|
_a = (0, make_factory_1.makeUnitDefinitionsFactory)(allUnitDefinitions), exports.getTypeUnits = _a.getTypeUnits, exports.getUnitName = _a.getUnitName, exports.getUnitsForType = _a.getUnitsForType, exports.getUnitsForField = _a.getUnitsForField, exports.getUnitsForTypePerField = _a.getUnitsForTypePerField, exports.getCardUnitsSelect = _a.getCardUnitsSelect, exports.getUnitLabel = _a.getUnitLabel, exports.getHardcodedUnitsForView = _a.getHardcodedUnitsForView;
|
|
42
42
|
const getDefaultUnits = () => {
|
|
43
43
|
const { Title } = allUnitDefinitions;
|
|
@@ -34,13 +34,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.getUnitDefinitionsForViewType = void 0;
|
|
37
|
-
const defaultDefinitions = __importStar(require("./default"));
|
|
38
37
|
const boardDefinitions = __importStar(require("./board"));
|
|
39
38
|
const canvasDefinitions = __importStar(require("./canvas"));
|
|
40
|
-
const
|
|
41
|
-
const gridDefinitions = __importStar(require("./grid"));
|
|
42
|
-
const ganttDefinitions = __importStar(require("./gantt"));
|
|
39
|
+
const defaultDefinitions = __importStar(require("./default"));
|
|
43
40
|
const galleryDefinitions = __importStar(require("./gallery"));
|
|
41
|
+
const ganttDefinitions = __importStar(require("./gantt"));
|
|
42
|
+
const gridDefinitions = __importStar(require("./grid"));
|
|
43
|
+
const listDefinitions = __importStar(require("./list"));
|
|
44
44
|
const getUnitDefinitionsForViewType = (viewType) => {
|
|
45
45
|
switch (viewType) {
|
|
46
46
|
case "board":
|