@fibery/views 26.0.5 → 26.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_virtual/_rolldown/runtime.js +1 -2
- package/lib/errors.d.ts +1 -3
- package/lib/errors.js +1 -2
- package/lib/field-utils/avatar.d.ts +1 -3
- package/lib/field-utils/avatar.js +1 -2
- package/lib/field-utils/back-references.d.ts +1 -3
- package/lib/field-utils/back-references.js +1 -2
- package/lib/field-utils/comments.d.ts +1 -3
- package/lib/field-utils/comments.js +1 -2
- package/lib/field-utils/date-time.d.ts +1 -3
- package/lib/field-utils/date-time.js +1 -2
- package/lib/field-utils/enum-value.d.ts +1 -3
- package/lib/field-utils/enum-value.js +1 -2
- package/lib/field-utils/file.d.ts +1 -3
- package/lib/field-utils/file.js +1 -2
- package/lib/field-utils/icon.d.ts +1 -3
- package/lib/field-utils/icon.js +1 -2
- package/lib/field-utils/number.d.ts +1 -3
- package/lib/field-utils/number.js +5 -8
- package/lib/field-utils/reference-collection.d.ts +1 -3
- package/lib/field-utils/reference-collection.js +5 -7
- package/lib/field-utils/reference.d.ts +1 -3
- package/lib/field-utils/reference.js +3 -4
- package/lib/field-utils/relation-view.d.ts +1 -3
- package/lib/field-utils/relation-view.js +1 -2
- package/lib/field-utils/rich-text.d.ts +1 -3
- package/lib/field-utils/rich-text.js +1 -2
- package/lib/field-utils/text.d.ts +1 -3
- package/lib/field-utils/text.js +1 -2
- package/lib/field-utils/user-active.d.ts +1 -3
- package/lib/field-utils/user-active.js +1 -2
- package/lib/field-utils/user-role.d.ts +1 -3
- package/lib/field-utils/user-role.js +1 -2
- package/lib/field-utils/workflow.d.ts +1 -3
- package/lib/field-utils/workflow.js +1 -2
- package/lib/filter.d.ts +1 -3
- package/lib/index.d.ts +2 -4
- package/lib/index.js +2 -3
- package/lib/meta-validation.d.ts +1 -3
- package/lib/meta-validation.js +7 -12
- package/lib/private/board.d.ts +3 -4
- package/lib/private/board.js +6 -7
- package/lib/private/calendar.d.ts +1 -3
- package/lib/private/calendar.js +2 -3
- package/lib/private/feed.d.ts +1 -3
- package/lib/private/feed.js +2 -3
- package/lib/private/form.d.ts +1 -3
- package/lib/private/form.js +1 -2
- package/lib/private/map.d.ts +1 -3
- package/lib/private/map.js +2 -3
- package/lib/private/smart-folder.d.ts +1 -3
- package/lib/private/smart-folder.js +2 -3
- package/lib/private/timeline.d.ts +1 -3
- package/lib/private/timeline.js +7 -8
- package/lib/private/units.d.ts +1 -3
- package/lib/private/units.js +17 -2
- package/lib/private/utils.d.ts +1 -3
- package/lib/private/utils.js +3 -5
- package/lib/refs.d.ts +1 -3
- package/lib/unit-definitions/avatar-collection.d.ts +1 -3
- package/lib/unit-definitions/avatar-collection.js +1 -2
- package/lib/unit-definitions/avatar-input.d.ts +2 -4
- package/lib/unit-definitions/avatar-input.js +1 -2
- package/lib/unit-definitions/avatar.d.ts +2 -4
- package/lib/unit-definitions/avatar.js +1 -2
- package/lib/unit-definitions/back-references-list.d.ts +3 -5
- package/lib/unit-definitions/back-references-list.js +2 -3
- package/lib/unit-definitions/bool-checkbox.d.ts +2 -4
- package/lib/unit-definitions/bool-checkbox.js +2 -3
- package/lib/unit-definitions/bool.d.ts +2 -4
- package/lib/unit-definitions/bool.js +2 -3
- package/lib/unit-definitions/collection-count.d.ts +2 -4
- package/lib/unit-definitions/collection-count.js +1 -2
- package/lib/unit-definitions/color-input.d.ts +2 -4
- package/lib/unit-definitions/color-input.js +2 -3
- package/lib/unit-definitions/comments-list.d.ts +2 -4
- package/lib/unit-definitions/comments-list.js +2 -3
- package/lib/unit-definitions/date-range-combobox.d.ts +2 -4
- package/lib/unit-definitions/date-range-combobox.js +2 -3
- package/lib/unit-definitions/date-range.d.ts +2 -4
- package/lib/unit-definitions/date-range.js +2 -3
- package/lib/unit-definitions/date-time-combobox.d.ts +2 -4
- package/lib/unit-definitions/date-time-combobox.js +2 -3
- package/lib/unit-definitions/date.d.ts +2 -4
- package/lib/unit-definitions/date.js +2 -3
- package/lib/unit-definitions/email-input.d.ts +4 -6
- package/lib/unit-definitions/email-input.js +1 -2
- package/lib/unit-definitions/email.d.ts +3 -5
- package/lib/unit-definitions/email.js +1 -2
- package/lib/unit-definitions/emoji.d.ts +3 -5
- package/lib/unit-definitions/emoji.js +1 -2
- package/lib/unit-definitions/file-collection-count.d.ts +2 -4
- package/lib/unit-definitions/file-collection-count.js +2 -3
- package/lib/unit-definitions/file-compact-collection.d.ts +2 -4
- package/lib/unit-definitions/file-compact-collection.js +2 -3
- package/lib/unit-definitions/file-compact-reference.d.ts +1 -3
- package/lib/unit-definitions/file-compact-reference.js +1 -2
- package/lib/unit-definitions/file-reference.d.ts +2 -4
- package/lib/unit-definitions/file-reference.js +2 -3
- package/lib/unit-definitions/files-gallery.d.ts +2 -4
- package/lib/unit-definitions/files-gallery.js +2 -3
- package/lib/unit-definitions/files-l-list-item.d.ts +2 -4
- package/lib/unit-definitions/files-l-list-item.js +2 -3
- package/lib/unit-definitions/files-l-list.d.ts +2 -4
- package/lib/unit-definitions/files-l-list.js +2 -3
- package/lib/unit-definitions/files-list-item.d.ts +2 -4
- package/lib/unit-definitions/files-list-item.js +2 -3
- package/lib/unit-definitions/files-list.d.ts +2 -4
- package/lib/unit-definitions/files-list.js +2 -3
- package/lib/unit-definitions/geometry-preview.d.ts +3 -5
- package/lib/unit-definitions/geometry-preview.js +1 -2
- package/lib/unit-definitions/icon-button.d.ts +2 -4
- package/lib/unit-definitions/icon-button.js +2 -3
- package/lib/unit-definitions/icon-input.d.ts +4 -6
- package/lib/unit-definitions/icon-input.js +1 -2
- package/lib/unit-definitions/id.d.ts +1 -3
- package/lib/unit-definitions/id.js +1 -2
- package/lib/unit-definitions/index.d.ts +4 -3
- package/lib/unit-definitions/index.js +6 -5
- package/lib/unit-definitions/json-input.d.ts +2 -4
- package/lib/unit-definitions/json-input.js +2 -3
- package/lib/unit-definitions/json-preview.d.ts +26 -0
- package/lib/unit-definitions/json-preview.js +31 -0
- package/lib/unit-definitions/location-input.d.ts +3 -5
- package/lib/unit-definitions/location-input.js +1 -2
- package/lib/unit-definitions/location.d.ts +3 -5
- package/lib/unit-definitions/location.js +1 -2
- package/lib/unit-definitions/not-found.d.ts +1 -3
- package/lib/unit-definitions/not-found.js +0 -1
- package/lib/unit-definitions/number-input.d.ts +2 -4
- package/lib/unit-definitions/number-input.js +2 -3
- package/lib/unit-definitions/number.d.ts +1 -3
- package/lib/unit-definitions/number.js +1 -2
- package/lib/unit-definitions/phone-input.d.ts +4 -6
- package/lib/unit-definitions/phone-input.js +1 -2
- package/lib/unit-definitions/phone.d.ts +4 -6
- package/lib/unit-definitions/phone.js +1 -2
- package/lib/unit-definitions/progress-bar.d.ts +1 -3
- package/lib/unit-definitions/progress-bar.js +1 -2
- package/lib/unit-definitions/reference-collection-combobox.d.ts +2 -4
- package/lib/unit-definitions/reference-collection-combobox.js +2 -3
- package/lib/unit-definitions/reference-collection-list.d.ts +2 -4
- package/lib/unit-definitions/reference-collection-list.js +2 -3
- package/lib/unit-definitions/reference-collection-view.d.ts +2 -4
- package/lib/unit-definitions/reference-collection-view.js +2 -3
- package/lib/unit-definitions/reference-collection.d.ts +2 -4
- package/lib/unit-definitions/reference-collection.js +2 -3
- package/lib/unit-definitions/reference-combobox.d.ts +2 -4
- package/lib/unit-definitions/reference-combobox.js +2 -3
- package/lib/unit-definitions/reference-icon.d.ts +3 -5
- package/lib/unit-definitions/reference-icon.js +1 -2
- package/lib/unit-definitions/reference.d.ts +1 -3
- package/lib/unit-definitions/reference.js +1 -2
- package/lib/unit-definitions/rich-text-document.d.ts +2 -4
- package/lib/unit-definitions/rich-text-document.js +2 -3
- package/lib/unit-definitions/rich-text-snippet.d.ts +1 -3
- package/lib/unit-definitions/rich-text-snippet.js +1 -2
- package/lib/unit-definitions/single-location-preview.d.ts +3 -5
- package/lib/unit-definitions/single-location-preview.js +1 -2
- package/lib/unit-definitions/text-input.d.ts +2 -4
- package/lib/unit-definitions/text-input.js +2 -3
- package/lib/unit-definitions/text.d.ts +2 -4
- package/lib/unit-definitions/text.js +2 -3
- package/lib/unit-definitions/title-input.d.ts +1 -3
- package/lib/unit-definitions/title-input.js +1 -2
- package/lib/unit-definitions/title.d.ts +2 -4
- package/lib/unit-definitions/title.js +1 -2
- package/lib/unit-definitions/type-badge-abbr.d.ts +1 -3
- package/lib/unit-definitions/type-badge-abbr.js +1 -2
- package/lib/unit-definitions/type-badge.d.ts +1 -3
- package/lib/unit-definitions/type-badge.js +1 -2
- package/lib/unit-definitions/type-icon.d.ts +1 -3
- package/lib/unit-definitions/type-icon.js +1 -2
- package/lib/unit-definitions/url-input.d.ts +4 -6
- package/lib/unit-definitions/url-input.js +1 -2
- package/lib/unit-definitions/url.d.ts +3 -5
- package/lib/unit-definitions/url.js +1 -2
- package/lib/unit-definitions/user-button.d.ts +1 -3
- package/lib/unit-definitions/user-button.js +1 -2
- package/lib/unit-definitions/user-role-input.d.ts +3 -5
- package/lib/unit-definitions/user-role-input.js +1 -2
- package/lib/unit-definitions/user-role.d.ts +3 -5
- package/lib/unit-definitions/user-role.js +2 -3
- package/lib/unit-utils/access.d.ts +1 -3
- package/lib/unit-utils/access.js +1 -2
- package/lib/unit-utils/can-edit-field.d.ts +1 -3
- package/lib/unit-utils/can-edit-field.js +1 -2
- package/lib/unit-utils/common.d.ts +2 -4
- package/lib/unit-utils/common.js +1 -2
- package/lib/unit-utils/decimal.d.ts +0 -2
- package/lib/unit-utils/decimal.js +1 -2
- package/lib/unit-utils/dynamic-keys.d.ts +1 -3
- package/lib/unit-utils/dynamic-keys.js +1 -2
- package/lib/unit-utils/enums.d.ts +1 -3
- package/lib/unit-utils/enums.js +2 -3
- package/lib/unit-utils/formatters.d.ts +1 -3
- package/lib/unit-utils/formatters.js +2 -4
- package/lib/unit-utils/get-export-value.d.ts +1 -3
- package/lib/unit-utils/get-export-value.js +1 -2
- package/lib/unit-utils/get-field-label.d.ts +1 -3
- package/lib/unit-utils/get-field-label.js +1 -2
- package/lib/unit-utils/get-unmatched-unit-label.d.ts +1 -3
- package/lib/unit-utils/get-unmatched-unit-label.js +2 -4
- package/lib/unit-utils/wrap-normalized-in-expression.d.ts +1 -3
- package/lib/unit-utils/wrap-normalized-in-expression.js +1 -2
- package/lib/units/board.d.ts +1 -3
- package/lib/units/board.js +1 -2
- package/lib/units/canvas/all-units-data-definitions.d.ts +5 -5
- package/lib/units/canvas/all-units-data-definitions.js +6 -7
- package/lib/units/canvas/index.d.ts +0 -1
- package/lib/units/canvas/index.js +1 -2
- package/lib/units/canvas/type-badge-abbr.d.ts +1 -3
- package/lib/units/canvas/type-badge-abbr.js +1 -2
- package/lib/units/canvas/type-badge.d.ts +1 -3
- package/lib/units/canvas/type-badge.js +1 -2
- package/lib/units/default.d.ts +0 -1
- package/lib/units/default.js +1 -2
- package/lib/units/gallery.d.ts +0 -2
- package/lib/units/gallery.js +1 -2
- package/lib/units/gantt.d.ts +1 -3
- package/lib/units/gantt.js +1 -2
- package/lib/units/get-unit-definitions-for-view-type.d.ts +1 -3
- package/lib/units/get-unit-definitions-for-view-type.js +2 -3
- package/lib/units/grid.d.ts +1 -3
- package/lib/units/grid.js +8 -7
- package/lib/units/list.d.ts +1 -3
- package/lib/units/list.js +1 -2
- package/lib/units/make-factory.d.ts +1 -3
- package/lib/units/make-factory.js +21 -28
- package/lib/units/types.d.ts +2 -4
- package/package.json +7 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/unit-definitions/user-button.ts
|
|
2
2
|
const type = "user-button";
|
|
3
3
|
const UserButton = {
|
|
4
4
|
type,
|
|
@@ -22,5 +22,4 @@ const UserButton = {
|
|
|
22
22
|
getExportValue: () => null,
|
|
23
23
|
canExport: () => false
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { UserButton };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
2
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
1
3
|
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
4
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
|
-
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
4
|
-
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
|
-
//#region src/unit-definitions/user-role-input.d.ts
|
|
6
5
|
export declare const UserRoleInput: {
|
|
7
6
|
canEdit: typeof canEditField;
|
|
8
7
|
getLabel: () => string;
|
|
@@ -23,5 +22,4 @@ export declare const UserRoleInput: {
|
|
|
23
22
|
makeUnit: ({ expression }?: {
|
|
24
23
|
expression?: UnitExpression;
|
|
25
24
|
}) => ExpressionFieldUnit;
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
25
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeUnitMethod } from "../unit-utils/common.js";
|
|
2
2
|
import { UserRole } from "./user-role.js";
|
|
3
|
-
|
|
3
|
+
// src/unit-definitions/user-role-input.tsx
|
|
4
4
|
const type = "user-role-input";
|
|
5
5
|
const UserRoleInput = {
|
|
6
6
|
...UserRole,
|
|
@@ -8,5 +8,4 @@ const UserRoleInput = {
|
|
|
8
8
|
name: "Compact List",
|
|
9
9
|
makeUnit: makeUnitMethod(type)
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { UserRoleInput };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
1
|
import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
|
|
3
|
-
import {
|
|
2
|
+
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
4
3
|
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
|
+
import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
|
|
5
5
|
import { TypeObject } from "@fibery/schema";
|
|
6
|
-
//#region src/unit-definitions/user-role.d.ts
|
|
7
6
|
export declare const UserRole: {
|
|
8
7
|
type: "user-role";
|
|
9
8
|
name: string;
|
|
@@ -24,5 +23,4 @@ export declare const UserRole: {
|
|
|
24
23
|
displaySettings: NumberDisplaySettings;
|
|
25
24
|
}) => string | null | undefined;
|
|
26
25
|
canExport: () => true;
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
26
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getUserRoleByKey } from "../field-utils/user-role.js";
|
|
2
|
-
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
2
|
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
3
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
4
4
|
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
5
5
|
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
|
-
|
|
6
|
+
// src/unit-definitions/user-role.ts
|
|
7
7
|
const type = "user-role";
|
|
8
8
|
const UserRole = {
|
|
9
9
|
type,
|
|
@@ -31,5 +31,4 @@ const UserRole = {
|
|
|
31
31
|
},
|
|
32
32
|
canExport: () => true
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
export { UserRole };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
2
|
import { FieldExpression } from "@fibery/expression-utils";
|
|
3
|
-
//#region src/unit-utils/access.d.ts
|
|
4
3
|
export declare const accessCheckKey: string;
|
|
5
4
|
export declare const generateAccessCheckQueryExpression: ({ typeObject, contextPath }: {
|
|
6
5
|
typeObject: TypeObject;
|
|
7
6
|
contextPath?: FieldExpression;
|
|
8
7
|
}) => {
|
|
9
8
|
[accessCheckKey]: (string | (string | import("@fibery/schema").MultiFieldAccess)[])[];
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
9
|
+
};
|
package/lib/unit-utils/access.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { accessCheckKeyKeyPrefix, makeDynamicKey } from "./dynamic-keys.js";
|
|
2
|
-
|
|
2
|
+
// src/unit-utils/access.ts
|
|
3
3
|
const accessCheckKey = makeDynamicKey(accessCheckKeyKeyPrefix);
|
|
4
4
|
const generateAccessCheckQueryExpression = ({ typeObject, contextPath = [] }) => {
|
|
5
5
|
const titleFieldName = typeObject.titleField;
|
|
6
6
|
return titleFieldName ? { [accessCheckKey]: ["q/access?", [...contextPath, titleFieldName]] } : {};
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { accessCheckKey, generateAccessCheckQueryExpression };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ExpressionFieldUnit } from "../units/types.js";
|
|
2
2
|
import { TypeObject } from "@fibery/schema";
|
|
3
|
-
//#region src/unit-utils/can-edit-field.d.ts
|
|
4
3
|
export declare const canEditField: ({ typeObject, unit: { expression } }: {
|
|
5
4
|
typeObject: TypeObject;
|
|
6
5
|
unit: ExpressionFieldUnit;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
//#endregion
|
|
6
|
+
}) => boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { canEditFieldExpression } from "./common.js";
|
|
2
|
-
|
|
2
|
+
// src/unit-utils/can-edit-field.ts
|
|
3
3
|
const canEditField = ({ typeObject, unit: { expression } }) => {
|
|
4
4
|
return canEditFieldExpression(typeObject, expression);
|
|
5
5
|
};
|
|
6
|
-
//#endregion
|
|
7
6
|
export { canEditField };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ExpressionFieldUnit, Unit, UnitExpression } from "../units/types.js";
|
|
2
2
|
import { TypeObject } from "@fibery/schema";
|
|
3
|
-
//#region src/unit-utils/common.d.ts
|
|
4
3
|
export declare const makeUnitMethod: (type: ExpressionFieldUnit["type"]) => ({ expression }?: {
|
|
5
4
|
expression?: UnitExpression;
|
|
6
5
|
}) => ExpressionFieldUnit;
|
|
@@ -28,7 +27,7 @@ export declare const toPureUnit: (unit: Unit) => {
|
|
|
28
27
|
kind: "field";
|
|
29
28
|
settings?: Record<string, unknown>;
|
|
30
29
|
hideWhenEmpty?: boolean;
|
|
31
|
-
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-collection" | "comments-list" | "date" | "date-range" | "date-range-combobox" | "date-time" | "date-time-combobox" | "date-time-range" | "email" | "email-input" | "emoji" | "field" | "file-collection-count" | "file-compact-collection" | "file-compact-reference" | "file-reference" | "files-collection" | "files-gallery" | "files-l-list" | "files-l-list-item" | "files-list" | "files-list-item" | "geometry-preview" | "icon-button" | "icon-input" | "id" | "json-input" | "location" | "location-input" | "number" | "number-input" | "phone" | "phone-input" | "progress-bar" | "reference" | "reference-collection" | "reference-collection-combobox" | "reference-collection-list" | "reference-collection-view" | "reference-combobox" | "reference-icon" | "rich-text-document" | "rich-text-snippet" | "single-location-preview" | "text" | "text-input" | "title" | "title-input" | "url" | "url-input" | "user-role" | "user-role-input";
|
|
30
|
+
type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-collection" | "comments-list" | "date" | "date-range" | "date-range-combobox" | "date-time" | "date-time-combobox" | "date-time-range" | "email" | "email-input" | "emoji" | "field" | "file-collection-count" | "file-compact-collection" | "file-compact-reference" | "file-reference" | "files-collection" | "files-gallery" | "files-l-list" | "files-l-list-item" | "files-list" | "files-list-item" | "geometry-preview" | "icon-button" | "icon-input" | "id" | "json-input" | "json-preview" | "location" | "location-input" | "number" | "number-input" | "phone" | "phone-input" | "progress-bar" | "reference" | "reference-collection" | "reference-collection-combobox" | "reference-collection-list" | "reference-collection-view" | "reference-combobox" | "reference-icon" | "rich-text-document" | "rich-text-snippet" | "single-location-preview" | "text" | "text-input" | "title" | "title-input" | "url" | "url-input" | "user-role" | "user-role-input";
|
|
32
31
|
expression: UnitExpression;
|
|
33
32
|
} | {
|
|
34
33
|
kind: "field";
|
|
@@ -38,5 +37,4 @@ export declare const toPureUnit: (unit: Unit) => {
|
|
|
38
37
|
expression?: UnitExpression;
|
|
39
38
|
};
|
|
40
39
|
export declare const asString: (something: unknown) => string;
|
|
41
|
-
export declare const canEditFieldExpression: (typeObject: TypeObject, expression: UnitExpression) => boolean;
|
|
42
|
-
//#endregion
|
|
40
|
+
export declare const canEditFieldExpression: (typeObject: TypeObject, expression: UnitExpression) => boolean;
|
package/lib/unit-utils/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getUnmatchedUnitLabel } from "./get-unmatched-unit-label.js";
|
|
2
2
|
import { assertIsValidExpression, getFieldObjectByFieldExpression, isFieldExpressionValid } from "@fibery/expression-utils/src/utils";
|
|
3
|
-
|
|
3
|
+
// src/unit-utils/common.ts
|
|
4
4
|
const makeUnitMethod = (type) => ({ expression } = {}) => {
|
|
5
5
|
assertIsValidExpression(expression);
|
|
6
6
|
return {
|
|
@@ -37,5 +37,4 @@ const canEditFieldExpression = (typeObject, expression) => {
|
|
|
37
37
|
return fieldObject.type !== "fibery/file" && !fieldObject.isReadOnly;
|
|
38
38
|
} else return false;
|
|
39
39
|
};
|
|
40
|
-
//#endregion
|
|
41
40
|
export { asString, calculateUnitExpressionErrors, canEditFieldExpression, isUnitEnabled, makeUnitMethod, toPureUnit };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/unit-utils/decimal.d.ts
|
|
2
1
|
declare class Decimal {
|
|
3
2
|
static readonly ROUND_UP = 0;
|
|
4
3
|
static readonly ROUND_DOWN = 1;
|
|
@@ -40,5 +39,4 @@ declare class Decimal {
|
|
|
40
39
|
*/
|
|
41
40
|
static isDecimal(value: string): boolean;
|
|
42
41
|
}
|
|
43
|
-
//#endregion
|
|
44
42
|
export { Decimal as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/unit-utils/decimal.ts
|
|
2
2
|
const EXP_LIMIT = 9e15;
|
|
3
3
|
const MAX_DIGITS = 1e9;
|
|
4
4
|
const minE = -9e15;
|
|
@@ -244,5 +244,4 @@ var Decimal = class Decimal {
|
|
|
244
244
|
return isDecimalRegex.test(value);
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
|
-
//#endregion
|
|
248
247
|
export { Decimal as default };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
//#region src/unit-utils/dynamic-keys.d.ts
|
|
2
1
|
export declare const isUserActiveDynamicKeyPrefix = "is-user-active";
|
|
3
2
|
export declare const isFinalStateDynamicKeyPrefix = "is-final-state";
|
|
4
3
|
export declare const colorCodingKeyPrefix = "color-coding";
|
|
5
4
|
export declare const hasAccessToSecretKeyPrefix = "has-access-to-secret";
|
|
6
5
|
export declare const collectionCountKeyPrefix = "collection-count";
|
|
7
6
|
export declare const accessCheckKeyKeyPrefix = "access/check";
|
|
8
|
-
export declare const makeDynamicKey: (prefix: string, key?: string) => string;
|
|
9
|
-
//#endregion
|
|
7
|
+
export declare const makeDynamicKey: (prefix: string, key?: string) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/unit-utils/dynamic-keys.ts
|
|
2
2
|
const isUserActiveDynamicKeyPrefix = "is-user-active";
|
|
3
3
|
const isFinalStateDynamicKeyPrefix = "is-final-state";
|
|
4
4
|
const colorCodingKeyPrefix = "color-coding";
|
|
@@ -8,5 +8,4 @@ const accessCheckKeyKeyPrefix = "access/check";
|
|
|
8
8
|
const makeDynamicKey = (prefix, key) => {
|
|
9
9
|
return `?${prefix}${key === void 0 ? "" : `_${key}`}`;
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { accessCheckKeyKeyPrefix, collectionCountKeyPrefix, colorCodingKeyPrefix, hasAccessToSecretKeyPrefix, isFinalStateDynamicKeyPrefix, isUserActiveDynamicKeyPrefix, makeDynamicKey };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
2
|
import { Select } from "@fibery/expression-utils/src/types";
|
|
3
3
|
import { FieldExpression as FieldExpression$1 } from "@fibery/expression-utils";
|
|
4
|
-
//#region src/unit-utils/enums.d.ts
|
|
5
4
|
export declare const getEnumIconColorQuery: ({ typeObject, contextPath }: {
|
|
6
5
|
typeObject: TypeObject;
|
|
7
6
|
contextPath?: FieldExpression$1;
|
|
@@ -25,5 +24,4 @@ export declare const getEnumsRequest: (enumTypeObject: TypeObject) => {
|
|
|
25
24
|
"q/order-by": (string | string[])[][];
|
|
26
25
|
};
|
|
27
26
|
params: {};
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
27
|
+
};
|
package/lib/unit-utils/enums.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { generateAccessCheckQueryExpression } from "./access.js";
|
|
2
1
|
import { getNumberFieldObject } from "../field-utils/enum-value.js";
|
|
2
|
+
import { generateAccessCheckQueryExpression } from "./access.js";
|
|
3
3
|
import { toSelectMapClause } from "@fibery/query-utils/src/select";
|
|
4
|
-
|
|
4
|
+
// src/unit-utils/enums.ts
|
|
5
5
|
const getWorkflowQuery = ({ typeObject }) => {
|
|
6
6
|
if (!typeObject.isEnum) return null;
|
|
7
7
|
return typeObject.nameParts.namespace === "workflow" ? {
|
|
@@ -44,5 +44,4 @@ const getEnumsRequest = (enumTypeObject) => {
|
|
|
44
44
|
params: {}
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { getEnumIconColorQuery, getEnumIconSelect, getEnumsRequest };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
2
2
|
import { FieldObject } from "@fibery/schema";
|
|
3
|
-
//#region src/unit-utils/formatters.d.ts
|
|
4
3
|
export declare const defaultLocale = "en-US";
|
|
5
4
|
export declare const defaultDateFormat = "MMM D, YYYY";
|
|
6
5
|
export declare const defaultDateTimeFormat = "MMM D, YYYY HH:mm";
|
|
@@ -48,5 +47,4 @@ export declare const formatDateTimeRange: ({ value, type, dateFormat, timeFormat
|
|
|
48
47
|
}) => string;
|
|
49
48
|
export declare function formatUnitUrl(url: string): {
|
|
50
49
|
host: string;
|
|
51
|
-
};
|
|
52
|
-
//#endregion
|
|
50
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { parseEnd, parseStart } from "../field-utils/date-time.js";
|
|
2
2
|
import { parseNumberFieldMeta } from "../field-utils/number.js";
|
|
3
3
|
import Decimal from "./decimal.js";
|
|
4
|
-
|
|
5
|
-
//#region src/unit-utils/formatters.ts
|
|
4
|
+
// src/unit-utils/formatters.ts
|
|
6
5
|
const defaultLocale = "en-US";
|
|
7
6
|
const defaultDateFormat = "MMM D, YYYY";
|
|
8
7
|
const defaultDateTimeFormat = "MMM D, YYYY HH:mm";
|
|
@@ -69,7 +68,7 @@ const formatNumberWithoutUnit = ({ value, format = "Number", displaySettings, cu
|
|
|
69
68
|
}
|
|
70
69
|
};
|
|
71
70
|
const formatNumberWithUnitAsString = ({ value, format = "Number", displaySettings, unit, currencyCode, precision, useThousandSeparator, withNumberUnit = true }) => {
|
|
72
|
-
if (
|
|
71
|
+
if (value === null || value === void 0) return "";
|
|
73
72
|
return `${formatNumberWithoutUnit({
|
|
74
73
|
value,
|
|
75
74
|
format,
|
|
@@ -124,5 +123,4 @@ function formatUnitUrl(url) {
|
|
|
124
123
|
return { host: url };
|
|
125
124
|
}
|
|
126
125
|
}
|
|
127
|
-
//#endregion
|
|
128
126
|
export { defaultDateFormat, defaultDateTimeFormat, defaultLocale, defaultTimeFormat, formatArbitraryNumber, formatCurrency, formatDateRange, formatDateTimeRange, formatNumber, formatNumberWithUnitAsString, formatNumberWithUnitAsStringByFieldObject, formatNumberWithoutUnit, formatPercent, formatUnitUrl };
|
|
@@ -2,7 +2,6 @@ import { NumberDisplaySettings } from "../field-utils/number.js";
|
|
|
2
2
|
import { ExpressionFieldUnit } from "../units/types.js";
|
|
3
3
|
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
4
4
|
import { FiberyObject } from "@fibery/expression-utils/src/types";
|
|
5
|
-
//#region src/unit-utils/get-export-value.d.ts
|
|
6
5
|
export declare const getExportValue: <Value = unknown>({ object, unit }: {
|
|
7
6
|
object: FiberyObject;
|
|
8
7
|
unit: ExpressionFieldUnit;
|
|
@@ -43,5 +42,4 @@ export declare const getNumberExportValue: ({ object, unit, typeObject, displayS
|
|
|
43
42
|
typeObject: TypeObject;
|
|
44
43
|
unit: ExpressionFieldUnit;
|
|
45
44
|
displaySettings: NumberDisplaySettings;
|
|
46
|
-
}) => string;
|
|
47
|
-
//#endregion
|
|
45
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { formatNumberWithUnitAsString } from "./formatters.js";
|
|
|
3
3
|
import { getFieldObjectByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
4
4
|
import { getValueByFieldExpression } from "@fibery/query-utils/src/query";
|
|
5
5
|
import { formatISO, parseISO, subDays, subSeconds } from "date-fns";
|
|
6
|
-
|
|
6
|
+
// src/unit-utils/get-export-value.ts
|
|
7
7
|
const getExportValue = ({ object, unit }) => {
|
|
8
8
|
return getValueByFieldExpression(object, unit.expression);
|
|
9
9
|
};
|
|
@@ -79,5 +79,4 @@ const getNumberExportValue = ({ object, unit, typeObject, displaySettings }) =>
|
|
|
79
79
|
withNumberUnit: true
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
|
-
//#endregion
|
|
83
82
|
export { formatDateRangeExportValue, getDateRangeExportValue, getExportValue, getLocationExportValue, getNumberExportValue, getReferenceCollectionExportValue, getReferenceExportValue, getSnippetExportValue, getTitleExportValue };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ExpressionFieldUnit } from "../units/types.js";
|
|
2
2
|
import { TypeObject } from "@fibery/schema";
|
|
3
|
-
//#region src/unit-utils/get-field-label.d.ts
|
|
4
3
|
export declare const getFieldLabel: ({ typeObject, unit }: {
|
|
5
4
|
typeObject: TypeObject;
|
|
6
5
|
unit: ExpressionFieldUnit;
|
|
7
|
-
}) => string;
|
|
8
|
-
//#endregion
|
|
6
|
+
}) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
2
|
-
|
|
2
|
+
// src/unit-utils/get-field-label.ts
|
|
3
3
|
const getFieldLabel = ({ typeObject, unit }) => {
|
|
4
4
|
const { expression } = unit;
|
|
5
5
|
return getFieldObjectsByFieldExpression({
|
|
@@ -7,5 +7,4 @@ const getFieldLabel = ({ typeObject, unit }) => {
|
|
|
7
7
|
expression
|
|
8
8
|
}).map((fieldObject) => fieldObject.title).join(" -> ");
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { getFieldLabel };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const getUnmatchedUnitLabel = (unit) => JSON.stringify(omit(unit, ["checked"]));
|
|
4
|
-
//#endregion
|
|
1
|
+
// src/unit-utils/get-unmatched-unit-label.ts
|
|
2
|
+
const getUnmatchedUnitLabel = ({ checked, ...unit }) => JSON.stringify(unit);
|
|
5
3
|
export { getUnmatchedUnitLabel };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { FieldObject } from "@fibery/schema";
|
|
2
2
|
import { FieldExpression } from "@fibery/expression-utils/src/types";
|
|
3
|
-
|
|
4
|
-
export declare const wrapNormalizedInExpression: (innerNormalized: Record<string, unknown>, fieldObjects: FieldObject[], expression: FieldExpression) => Record<string, unknown>;
|
|
5
|
-
//#endregion
|
|
3
|
+
export declare const wrapNormalizedInExpression: (innerNormalized: Record<string, unknown>, fieldObjects: FieldObject[], expression: FieldExpression) => Record<string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/unit-utils/wrap-normalized-in-expression.ts
|
|
2
2
|
const wrapNormalizedInExpression = (innerNormalized, fieldObjects, expression) => [...expression].reverse().reduce((inner, field, reversedIndex) => {
|
|
3
3
|
const originalIndex = expression.length - 1 - reversedIndex;
|
|
4
4
|
if (!(originalIndex === expression.length - 1)) {
|
|
@@ -11,5 +11,4 @@ const wrapNormalizedInExpression = (innerNormalized, fieldObjects, expression) =
|
|
|
11
11
|
}
|
|
12
12
|
return { [field]: inner };
|
|
13
13
|
}, innerNormalized);
|
|
14
|
-
//#endregion
|
|
15
14
|
export { wrapNormalizedInExpression };
|
package/lib/units/board.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ButtonUnit, DbUnit, ExpressionFieldUnit, PureUnit, Unit, UnitDataDefinition, UnitExpression } from "./types.js";
|
|
2
2
|
import { MissingUnitDefinition } from "../unit-definitions/not-found.js";
|
|
3
3
|
import { TypeObject } from "@fibery/schema";
|
|
4
|
-
//#region src/units/board.d.ts
|
|
5
4
|
export declare const getTypeUnits: () => PureUnit[], getUnitName: (unit: Unit) => string | null, getUnitsForType: (typeObject: TypeObject, options?: {
|
|
6
5
|
parentFieldObjects?: import("@fibery/schema").FieldObject[];
|
|
7
6
|
showHiddenFields?: boolean;
|
|
@@ -43,5 +42,4 @@ export declare const getDefaultUnits: (typeObject: TypeObject) => ({
|
|
|
43
42
|
} | {
|
|
44
43
|
type: "type-badge-abbr";
|
|
45
44
|
kind: "db";
|
|
46
|
-
})[];
|
|
47
|
-
//#endregion
|
|
45
|
+
})[];
|
package/lib/units/board.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/board.ts
|
|
7
7
|
var board_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
getCardUnitsSelect: () => getCardUnitsSelect,
|
|
9
9
|
getDefaultUnits: () => getDefaultUnits,
|
|
@@ -21,5 +21,4 @@ const getDefaultUnits = (typeObject) => {
|
|
|
21
21
|
const { Title, Avatar, TypeBadgeAbbr } = unit_definitions_exports;
|
|
22
22
|
return [Title && Title.makeUnit(), typeObject && isAvatarExtensionEnabledType(typeObject) ? Avatar && Avatar.makeUnit() : TypeBadgeAbbr && TypeBadgeAbbr.makeUnit()].filter(truthy);
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { board_exports, getCardUnitsSelect, getDefaultUnits, getHardcodedUnitsForView, getTypeUnits, getUnitDataDefinition, getUnitLabel, getUnitName, getUnitsForField, getUnitsForType, getUnitsForTypePerField };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Avatar } from "../../unit-definitions/avatar.js";
|
|
2
1
|
import { Bool } from "../../unit-definitions/bool.js";
|
|
3
2
|
import { CollectionCount } from "../../unit-definitions/collection-count.js";
|
|
4
|
-
import { DateRange } from "../../unit-definitions/date-range.js";
|
|
5
3
|
import { Date } from "../../unit-definitions/date.js";
|
|
4
|
+
import { DateRange } from "../../unit-definitions/date-range.js";
|
|
6
5
|
import { Email } from "../../unit-definitions/email.js";
|
|
7
|
-
import { Emoji } from "../../unit-definitions/emoji.js";
|
|
8
6
|
import { Id } from "../../unit-definitions/id.js";
|
|
9
|
-
import { Location } from "../../unit-definitions/location.js";
|
|
10
7
|
import { Number } from "../../unit-definitions/number.js";
|
|
11
8
|
import { Phone } from "../../unit-definitions/phone.js";
|
|
12
|
-
import { ReferenceCollection } from "../../unit-definitions/reference-collection.js";
|
|
13
9
|
import { Reference } from "../../unit-definitions/reference.js";
|
|
10
|
+
import { ReferenceCollection } from "../../unit-definitions/reference-collection.js";
|
|
14
11
|
import { Text } from "../../unit-definitions/text.js";
|
|
15
12
|
import { Title } from "../../unit-definitions/title.js";
|
|
16
13
|
import { Url } from "../../unit-definitions/url.js";
|
|
14
|
+
import { Location } from "../../unit-definitions/location.js";
|
|
15
|
+
import { Emoji } from "../../unit-definitions/emoji.js";
|
|
16
|
+
import { Avatar } from "../../unit-definitions/avatar.js";
|
|
17
17
|
import { TypeBadge } from "./type-badge.js";
|
|
18
18
|
import { TypeBadgeAbbr } from "./type-badge-abbr.js";
|
|
19
19
|
export { Avatar, Bool, CollectionCount, Date, DateRange, Email, Emoji, Id, Location, Number, Phone, Reference, ReferenceCollection, Text, Title, TypeBadge, TypeBadgeAbbr, Url };
|
|
@@ -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)[];
|