@fibery/views 19.0.1 → 19.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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 +3 -3
- package/lib/src/field-utils/user-active.js +3 -8
- package/lib/src/field-utils/user-role.d.ts +1 -1
- package/lib/src/field-utils/workflow.d.ts +2 -2
- package/lib/src/field-utils/workflow.js +2 -5
- package/lib/src/index.d.ts +2 -0
- package/lib/src/index.js +6 -1
- package/lib/src/meta-validation.d.ts +10 -0
- package/lib/src/meta-validation.js +78 -0
- package/lib/src/private/board.d.ts +1 -1
- package/lib/src/private/calendar.d.ts +1 -1
- package/lib/src/private/feed.d.ts +1 -1
- package/lib/src/private/map.d.ts +1 -1
- package/lib/src/private/smart-folder.d.ts +1 -1
- package/lib/src/private/smart-folder.js +1 -1
- package/lib/src/private/timeline.d.ts +1 -1
- package/lib/src/private/timeline.js +1 -1
- package/lib/src/private/units.d.ts +1 -1
- package/lib/src/private/utils.d.ts +1 -1
- package/lib/src/unit-definitions/avatar-collection.d.ts +1 -1
- package/lib/src/unit-definitions/avatar-collection.js +3 -7
- 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 +2 -2
- 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/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 +2 -2
- package/lib/src/unit-definitions/file-compact-collection.d.ts +1 -1
- package/lib/src/unit-definitions/file-compact-collection.js +2 -2
- package/lib/src/unit-definitions/file-compact-reference.d.ts +1 -1
- package/lib/src/unit-definitions/file-compact-reference.js +1 -1
- package/lib/src/unit-definitions/file-reference.d.ts +1 -1
- package/lib/src/unit-definitions/file-reference.js +2 -2
- package/lib/src/unit-definitions/files-gallery.d.ts +1 -1
- package/lib/src/unit-definitions/files-gallery.js +2 -2
- package/lib/src/unit-definitions/files-l-list-item.d.ts +1 -1
- package/lib/src/unit-definitions/files-l-list-item.js +2 -2
- package/lib/src/unit-definitions/files-l-list.d.ts +1 -1
- package/lib/src/unit-definitions/files-l-list.js +2 -2
- package/lib/src/unit-definitions/files-list-item.d.ts +1 -1
- package/lib/src/unit-definitions/files-list-item.js +2 -2
- package/lib/src/unit-definitions/files-list.d.ts +1 -1
- package/lib/src/unit-definitions/files-list.js +2 -2
- 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/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/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 +1 -1
- 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 +2 -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 +2 -2
- package/lib/src/units/board.d.ts +1 -1
- package/lib/src/units/board.js +1 -1
- 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 +1 -1
- package/lib/src/units/default.js +1 -1
- package/lib/src/units/gallery.d.ts +1 -1
- package/lib/src/units/gantt.d.ts +1 -1
- 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.js +7 -7
- package/lib/src/units/list.d.ts +1 -1
- package/lib/src/units/list.js +1 -1
- package/lib/src/units/make-factory.d.ts +2 -2
- package/lib/src/units/make-factory.js +10 -10
- package/lib/src/units/types.d.ts +4 -4
- package/package.json +7 -7
|
@@ -4,25 +4,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.makeUnitDefinitionsFactory = void 0;
|
|
7
|
+
const _1 = require("@fibery/helpers/src/_");
|
|
8
|
+
const array_1 = require("@fibery/helpers/utils/array");
|
|
9
|
+
const trace_1 = require("@fibery/helpers/utils/trace");
|
|
10
|
+
const select_1 = require("@fibery/query-utils/src/select");
|
|
7
11
|
const compact_1 = __importDefault(require("lodash/compact"));
|
|
8
12
|
const constant_1 = __importDefault(require("lodash/constant"));
|
|
9
13
|
const flatMap_1 = __importDefault(require("lodash/flatMap"));
|
|
10
14
|
const groupBy_1 = __importDefault(require("lodash/groupBy"));
|
|
11
15
|
const isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));
|
|
12
|
-
const mapValues_1 = __importDefault(require("lodash/mapValues"));
|
|
13
16
|
const sortBy_1 = __importDefault(require("lodash/sortBy"));
|
|
14
|
-
const trace_1 = require("@fibery/helpers/utils/trace");
|
|
15
|
-
const number_1 = require("../field-utils/number");
|
|
16
|
-
const text_1 = require("../field-utils/text");
|
|
17
17
|
const avatar_1 = require("../field-utils/avatar");
|
|
18
|
-
const comments_1 = require("../field-utils/comments");
|
|
19
18
|
const back_references_1 = require("../field-utils/back-references");
|
|
19
|
+
const comments_1 = require("../field-utils/comments");
|
|
20
|
+
const number_1 = require("../field-utils/number");
|
|
20
21
|
const relation_view_1 = require("../field-utils/relation-view");
|
|
21
|
-
const
|
|
22
|
-
const common_1 = require("../unit-utils/common");
|
|
23
|
-
const not_found_1 = require("../unit-definitions/not-found");
|
|
24
|
-
const array_1 = require("@fibery/helpers/utils/array");
|
|
22
|
+
const text_1 = require("../field-utils/text");
|
|
25
23
|
const user_role_1 = require("../field-utils/user-role");
|
|
24
|
+
const not_found_1 = require("../unit-definitions/not-found");
|
|
25
|
+
const common_1 = require("../unit-utils/common");
|
|
26
26
|
const NoUnitsCreator = () => [];
|
|
27
27
|
const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
28
28
|
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;
|
|
@@ -203,7 +203,7 @@ const makeUnitDefinitionsFactory = (allUnitDefinitions) => {
|
|
|
203
203
|
...getUnitsForField(typeObject.fieldObjectsByName["fibery/container-entity-type"]),
|
|
204
204
|
].filter(Boolean);
|
|
205
205
|
};
|
|
206
|
-
const unitDefinitionsByTypeLookup = (0,
|
|
206
|
+
const unitDefinitionsByTypeLookup = (0, _1.mapValues)((0, groupBy_1.default)(allUnitDefinitions, (x) => x.type), (value) => (0, array_1.single)(value));
|
|
207
207
|
const getUnitLabel = (typeObject, unit) => {
|
|
208
208
|
const unitDefinition = unitDefinitionsByTypeLookup[unit.type];
|
|
209
209
|
if (!unitDefinition) {
|
package/lib/src/units/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { FiberyObject } from "@fibery/expression-utils/src/types";
|
|
2
|
+
import type { Schema, TypeObject } from "@fibery/schema";
|
|
3
|
+
import type { NumberDisplaySettings } from "../field-utils/number";
|
|
4
|
+
import type { $TSFixMe } from "../tsfixme";
|
|
5
5
|
export type ButtonUnit = {
|
|
6
6
|
kind: "user-button";
|
|
7
7
|
type: "user-button" | "icon-button";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/views",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Operations on view objects",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"lodash": "4.17.21",
|
|
40
40
|
"moment": "2.29.4",
|
|
41
41
|
"@fibery/context-filters": "1.1.4",
|
|
42
|
-
"@fibery/expression-utils": "9.7.
|
|
43
|
-
"@fibery/
|
|
44
|
-
"@fibery/
|
|
45
|
-
"@fibery/
|
|
42
|
+
"@fibery/expression-utils": "9.7.2",
|
|
43
|
+
"@fibery/query-utils": "1.1.7",
|
|
44
|
+
"@fibery/schema": "10.2.17",
|
|
45
|
+
"@fibery/helpers": "3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/core": "7.28.5",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@fibery/babel-preset": "7.4.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@fibery/expression-utils": "^9.7.
|
|
56
|
-
"@fibery/schema": "^10.2.
|
|
55
|
+
"@fibery/expression-utils": "^9.7.2",
|
|
56
|
+
"@fibery/schema": "^10.2.17",
|
|
57
57
|
"immutability-helper": "^2.4.0",
|
|
58
58
|
"lodash": "4.17.21"
|
|
59
59
|
},
|