@fibery/views 25.1.4 → 26.0.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/errors.d.ts +2 -3
- package/lib/field-utils/avatar.d.ts +8 -9
- package/lib/field-utils/back-references.d.ts +4 -5
- package/lib/field-utils/comments.d.ts +5 -6
- package/lib/field-utils/date-time.d.ts +7 -8
- package/lib/field-utils/enum-value.d.ts +6 -7
- package/lib/field-utils/file.d.ts +3 -4
- package/lib/field-utils/icon.d.ts +6 -7
- package/lib/field-utils/number.d.ts +11 -12
- package/lib/field-utils/reference-collection.d.ts +6 -7
- package/lib/field-utils/reference.d.ts +3 -4
- package/lib/field-utils/relation-view.d.ts +2 -3
- package/lib/field-utils/rich-text.d.ts +9 -10
- package/lib/field-utils/text.d.ts +9 -10
- package/lib/field-utils/user-active.d.ts +3 -4
- package/lib/field-utils/user-role.d.ts +3 -4
- package/lib/field-utils/workflow.d.ts +9 -10
- package/lib/filter.d.ts +29 -0
- package/lib/filter.js +0 -0
- package/lib/index.d.ts +57 -21
- package/lib/index.js +101 -94
- package/lib/meta-validation.d.ts +3 -4
- package/lib/private/board.d.ts +218 -14
- package/lib/private/board.js +138 -231
- package/lib/private/calendar.d.ts +213 -13
- package/lib/private/calendar.js +35 -81
- package/lib/private/feed.d.ts +211 -13
- package/lib/private/feed.js +34 -80
- package/lib/private/form.d.ts +52 -7
- package/lib/private/form.js +41 -48
- package/lib/private/map.d.ts +211 -13
- package/lib/private/map.js +34 -80
- package/lib/private/smart-folder.d.ts +118 -29
- package/lib/private/smart-folder.js +70 -148
- package/lib/private/timeline.d.ts +535 -31
- package/lib/private/timeline.js +158 -219
- package/lib/private/units.d.ts +3 -4
- package/lib/private/utils.d.ts +63 -57
- package/lib/private/utils.js +71 -49
- package/lib/refs.d.ts +19 -0
- package/lib/refs.js +0 -0
- package/lib/unit-definitions/avatar-collection.d.ts +29 -4
- package/lib/unit-definitions/avatar-collection.js +1 -1
- package/lib/unit-definitions/avatar-input.d.ts +49 -4
- package/lib/unit-definitions/avatar.d.ts +54 -4
- package/lib/unit-definitions/avatar.js +1 -1
- package/lib/unit-definitions/back-references-list.d.ts +31 -4
- package/lib/unit-definitions/back-references-list.js +1 -1
- package/lib/unit-definitions/bool-checkbox.d.ts +23 -4
- package/lib/unit-definitions/bool-checkbox.js +1 -1
- package/lib/unit-definitions/bool.d.ts +23 -4
- package/lib/unit-definitions/bool.js +1 -1
- package/lib/unit-definitions/collection-count.d.ts +31 -4
- package/lib/unit-definitions/color-input.d.ts +22 -4
- package/lib/unit-definitions/color-input.js +1 -1
- package/lib/unit-definitions/comments-list.d.ts +63 -4
- package/lib/unit-definitions/comments-list.js +1 -1
- package/lib/unit-definitions/date-range-combobox.d.ts +23 -4
- package/lib/unit-definitions/date-range-combobox.js +1 -1
- package/lib/unit-definitions/date-range.d.ts +23 -4
- package/lib/unit-definitions/date-range.js +1 -1
- package/lib/unit-definitions/date-time-combobox.d.ts +23 -4
- package/lib/unit-definitions/date-time-combobox.js +1 -1
- package/lib/unit-definitions/date.d.ts +23 -4
- package/lib/unit-definitions/date.js +1 -1
- package/lib/unit-definitions/email-input.d.ts +23 -4
- package/lib/unit-definitions/email.d.ts +23 -4
- package/lib/unit-definitions/emoji.d.ts +23 -4
- package/lib/unit-definitions/file-collection-count.d.ts +23 -4
- package/lib/unit-definitions/file-collection-count.js +1 -1
- package/lib/unit-definitions/file-compact-collection.d.ts +23 -4
- package/lib/unit-definitions/file-compact-collection.js +1 -1
- package/lib/unit-definitions/file-compact-reference.d.ts +27 -4
- package/lib/unit-definitions/file-reference.d.ts +23 -4
- package/lib/unit-definitions/file-reference.js +1 -1
- package/lib/unit-definitions/files-gallery.d.ts +23 -4
- package/lib/unit-definitions/files-gallery.js +1 -1
- package/lib/unit-definitions/files-l-list-item.d.ts +23 -4
- package/lib/unit-definitions/files-l-list-item.js +1 -1
- package/lib/unit-definitions/files-l-list.d.ts +23 -4
- package/lib/unit-definitions/files-l-list.js +1 -1
- package/lib/unit-definitions/files-list-item.d.ts +23 -4
- package/lib/unit-definitions/files-list-item.js +1 -1
- package/lib/unit-definitions/files-list.d.ts +23 -4
- package/lib/unit-definitions/files-list.js +1 -1
- package/lib/unit-definitions/geometry-preview.d.ts +23 -4
- package/lib/unit-definitions/icon-button.d.ts +28 -4
- package/lib/unit-definitions/icon-button.js +1 -1
- package/lib/unit-definitions/icon-input.d.ts +23 -4
- package/lib/unit-definitions/id.d.ts +32 -4
- package/lib/unit-definitions/index.js +2 -2
- package/lib/unit-definitions/json-input.d.ts +22 -4
- package/lib/unit-definitions/json-input.js +1 -1
- package/lib/unit-definitions/location-input.d.ts +23 -4
- package/lib/unit-definitions/location.d.ts +23 -4
- package/lib/unit-definitions/not-found.d.ts +6 -4
- package/lib/unit-definitions/number-input.d.ts +23 -4
- package/lib/unit-definitions/number-input.js +1 -1
- package/lib/unit-definitions/number.d.ts +27 -4
- package/lib/unit-definitions/phone-input.d.ts +23 -4
- package/lib/unit-definitions/phone.d.ts +23 -4
- package/lib/unit-definitions/progress-bar.d.ts +26 -4
- package/lib/unit-definitions/reference-collection-combobox.d.ts +19 -4
- package/lib/unit-definitions/reference-collection-combobox.js +1 -1
- package/lib/unit-definitions/reference-collection-list.d.ts +19 -4
- package/lib/unit-definitions/reference-collection-list.js +1 -1
- package/lib/unit-definitions/reference-collection-view.d.ts +19 -4
- package/lib/unit-definitions/reference-collection-view.js +1 -1
- package/lib/unit-definitions/reference-collection.d.ts +23 -4
- package/lib/unit-definitions/reference-collection.js +1 -1
- package/lib/unit-definitions/reference-combobox.d.ts +19 -4
- package/lib/unit-definitions/reference-combobox.js +1 -1
- package/lib/unit-definitions/reference-icon.d.ts +27 -4
- package/lib/unit-definitions/reference.d.ts +27 -4
- package/lib/unit-definitions/rich-text-document.d.ts +23 -4
- package/lib/unit-definitions/rich-text-document.js +1 -1
- package/lib/unit-definitions/rich-text-snippet.d.ts +25 -5
- package/lib/unit-definitions/single-location-preview.d.ts +23 -4
- package/lib/unit-definitions/text-input.d.ts +23 -4
- package/lib/unit-definitions/text-input.js +1 -1
- package/lib/unit-definitions/text.d.ts +23 -4
- package/lib/unit-definitions/text.js +1 -1
- package/lib/unit-definitions/title-input.d.ts +24 -4
- package/lib/unit-definitions/title.d.ts +27 -4
- package/lib/unit-definitions/type-badge-abbr.d.ts +15 -4
- package/lib/unit-definitions/type-badge.d.ts +15 -4
- package/lib/unit-definitions/type-icon.d.ts +15 -4
- package/lib/unit-definitions/url-input.d.ts +23 -4
- package/lib/unit-definitions/url.d.ts +23 -4
- package/lib/unit-definitions/user-button.d.ts +13 -4
- package/lib/unit-definitions/user-role-input.d.ts +26 -4
- package/lib/unit-definitions/user-role.d.ts +27 -4
- package/lib/unit-definitions/user-role.js +1 -1
- package/lib/unit-utils/access.d.ts +4 -5
- package/lib/unit-utils/can-edit-field.d.ts +4 -5
- package/lib/unit-utils/common.d.ts +16 -11
- package/lib/unit-utils/decimal.js +4 -4
- package/lib/unit-utils/dynamic-keys.d.ts +8 -9
- package/lib/unit-utils/enums.d.ts +4 -5
- package/lib/unit-utils/formatters.d.ts +15 -16
- package/lib/unit-utils/get-export-value.d.ts +18 -19
- package/lib/unit-utils/get-field-label.d.ts +4 -5
- package/lib/unit-utils/get-unmatched-unit-label.d.ts +2 -3
- package/lib/unit-utils/wrap-normalized-in-expression.d.ts +2 -3
- package/lib/units/board.d.ts +22 -25
- package/lib/units/board.js +2 -1
- package/lib/units/canvas/all-units-data-definitions.js +1 -1
- package/lib/units/canvas/index.d.ts +19 -24
- package/lib/units/canvas/type-badge-abbr.d.ts +13 -35
- package/lib/units/canvas/type-badge.d.ts +13 -35
- package/lib/units/default.d.ts +21 -22
- package/lib/units/default.js +2 -1
- package/lib/units/gallery.d.ts +5 -3
- package/lib/units/gantt.d.ts +23 -24
- package/lib/units/gantt.js +3 -2
- package/lib/units/get-unit-definitions-for-view-type.d.ts +4 -4
- package/lib/units/grid.d.ts +14 -25
- package/lib/units/grid.js +5 -4
- package/lib/units/list.d.ts +17 -26
- package/lib/units/list.js +2 -1
- package/lib/units/make-factory.d.ts +25 -27
- package/lib/units/types.d.ts +19 -13
- package/package.json +10 -10
package/lib/errors.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
2
|
//#region src/field-utils/avatar.d.ts
|
|
3
|
-
declare const AVATAR_MIXIN_NAME = "avatar/avatar-mixin";
|
|
4
|
-
declare const AVATAR_EXTENSION_FIELD = "avatar/avatars";
|
|
5
|
-
declare const isAvatarExtensionEnabledType: (typeObject: TypeObject) => boolean;
|
|
6
|
-
declare const isAvatarExtensionField: (fieldObject: FieldObject) => boolean;
|
|
7
|
-
declare const getAvatarSelect: (fieldObject: FieldObject) => import("@fibery/
|
|
8
|
-
declare const getAvatarSelectQuery: ({ typeObject }: {
|
|
3
|
+
export declare const AVATAR_MIXIN_NAME = "avatar/avatar-mixin";
|
|
4
|
+
export declare const AVATAR_EXTENSION_FIELD = "avatar/avatars";
|
|
5
|
+
export declare const isAvatarExtensionEnabledType: (typeObject: TypeObject) => boolean;
|
|
6
|
+
export declare const isAvatarExtensionField: (fieldObject: FieldObject) => boolean;
|
|
7
|
+
export declare const getAvatarSelect: (fieldObject: FieldObject) => import("@fibery/schema").Select;
|
|
8
|
+
export declare const getAvatarSelectQuery: ({ typeObject }: {
|
|
9
9
|
typeObject: TypeObject;
|
|
10
10
|
}) => {
|
|
11
11
|
[x: string]: "__NOTHING_INTERESTING__TitleField__" | "fibery/id" | {
|
|
12
12
|
"q/from": import("@fibery/schema").FieldName[];
|
|
13
13
|
"q/limit": string;
|
|
14
|
-
"q/select": import("@fibery/
|
|
14
|
+
"q/select": import("@fibery/schema").Select;
|
|
15
15
|
};
|
|
16
16
|
"fibery/id": "fibery/id";
|
|
17
17
|
__NOTHING_INTERESTING__TitleField__: "__NOTHING_INTERESTING__TitleField__";
|
|
@@ -19,5 +19,4 @@ declare const getAvatarSelectQuery: ({ typeObject }: {
|
|
|
19
19
|
"fibery/id"?: undefined;
|
|
20
20
|
__NOTHING_INTERESTING__TitleField__?: undefined;
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { AVATAR_EXTENSION_FIELD, AVATAR_MIXIN_NAME, getAvatarSelect, getAvatarSelectQuery, isAvatarExtensionEnabledType, isAvatarExtensionField };
|
|
22
|
+
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EntityId, FieldObject, TypeId, TypeObject } from "@fibery/schema";
|
|
2
2
|
import { FiberyObject, Projection } from "@fibery/expression-utils/src/types";
|
|
3
3
|
//#region src/field-utils/back-references.d.ts
|
|
4
|
-
declare const isReferenceExtensionField: (fieldObject: FieldObject) => boolean;
|
|
5
|
-
type EntityLinkProjection = FiberyObject & {
|
|
4
|
+
export declare const isReferenceExtensionField: (fieldObject: FieldObject) => boolean;
|
|
5
|
+
export type EntityLinkProjection = FiberyObject & {
|
|
6
6
|
"fibery/creation-date": string;
|
|
7
7
|
"Collaboration~Documents/ParagraphSecret": string;
|
|
8
8
|
"Collaboration~Documents/FromTypeId": TypeId;
|
|
@@ -14,6 +14,5 @@ type EntityLinkProjection = FiberyObject & {
|
|
|
14
14
|
"fibery/id": string;
|
|
15
15
|
} | null;
|
|
16
16
|
};
|
|
17
|
-
declare const getEntityLinksListSelect: (typeObject: TypeObject) => Projection<EntityLinkProjection>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { EntityLinkProjection, getEntityLinksListSelect, isReferenceExtensionField };
|
|
17
|
+
export declare const getEntityLinksListSelect: (typeObject: TypeObject) => Projection<EntityLinkProjection>;
|
|
18
|
+
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { accessCheckKey } from "../unit-utils/access.js";
|
|
2
2
|
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
3
3
|
//#region src/field-utils/comments.d.ts
|
|
4
|
-
declare const isCommentExtensionField: (fieldObject: FieldObject) => boolean;
|
|
5
|
-
declare const getCommentsListSelect: (typeObject: TypeObject) => {
|
|
4
|
+
export declare const isCommentExtensionField: (fieldObject: FieldObject) => boolean;
|
|
5
|
+
export declare const getCommentsListSelect: (typeObject: TypeObject) => {
|
|
6
6
|
"fibery/id": "fibery/id";
|
|
7
7
|
"fibery/public-id": "fibery/public-id";
|
|
8
8
|
"fibery/creation-date": string;
|
|
@@ -27,7 +27,7 @@ declare const getCommentsListSelect: (typeObject: TypeObject) => {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
declare const getQuerySelect: (fieldObject: FieldObject) => {
|
|
30
|
+
export declare const getQuerySelect: (fieldObject: FieldObject) => {
|
|
31
31
|
[x: string]: {
|
|
32
32
|
"q/from": import("@fibery/schema").FieldName[];
|
|
33
33
|
"q/select": {
|
|
@@ -55,9 +55,8 @@ declare const getQuerySelect: (fieldObject: FieldObject) => {
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
"q/order-by": import("@fibery/
|
|
58
|
+
"q/order-by": import("@fibery/schema").OrderBy | undefined;
|
|
59
59
|
"q/limit": string;
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
|
-
export { getCommentsListSelect, getQuerySelect, isCommentExtensionField };
|
|
62
|
+
//#endregion
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Moment, MomentInput, unitOfTime } from "moment/moment";
|
|
2
2
|
//#region src/field-utils/date-time.d.ts
|
|
3
|
-
declare const parseDate: (isoDate: MomentInput) => Moment;
|
|
4
|
-
declare const serializeDate: (momentDate: Moment) => string;
|
|
5
|
-
declare const parseDateTime: (isoDateTime: MomentInput) => Moment;
|
|
6
|
-
declare const serializeDateTime: (momentDate: Moment) => string;
|
|
7
|
-
declare const parseStart: ({ value, type }: {
|
|
3
|
+
export declare const parseDate: (isoDate: MomentInput) => Moment;
|
|
4
|
+
export declare const serializeDate: (momentDate: Moment) => string;
|
|
5
|
+
export declare const parseDateTime: (isoDateTime: MomentInput) => Moment;
|
|
6
|
+
export declare const serializeDateTime: (momentDate: Moment) => string;
|
|
7
|
+
export declare const parseStart: ({ value, type }: {
|
|
8
8
|
value: MomentInput;
|
|
9
9
|
type: string;
|
|
10
10
|
}) => Moment;
|
|
11
|
-
declare const parseEnd: ({ value, type, minimumDelta }: {
|
|
11
|
+
export declare const parseEnd: ({ value, type, minimumDelta }: {
|
|
12
12
|
value: MomentInput;
|
|
13
13
|
type: string;
|
|
14
14
|
minimumDelta?: [number, unitOfTime.DurationConstructor] | null;
|
|
15
15
|
}) => Moment;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { parseDate, parseDateTime, parseEnd, parseStart, serializeDate, serializeDateTime };
|
|
16
|
+
//#endregion
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { NumberFormat } from "./number.js";
|
|
2
2
|
import { FieldObject, SpaceName, TypeObject } from "@fibery/schema";
|
|
3
3
|
//#region src/field-utils/enum-value.d.ts
|
|
4
|
-
declare const enumNumberFieldName = "Value";
|
|
5
|
-
declare const getEnumNumberFieldName: (namespace: SpaceName) => string;
|
|
6
|
-
declare const defaultEnumNumberFieldMeta: {
|
|
4
|
+
export declare const enumNumberFieldName = "Value";
|
|
5
|
+
export declare const getEnumNumberFieldName: (namespace: SpaceName) => string;
|
|
6
|
+
export declare const defaultEnumNumberFieldMeta: {
|
|
7
7
|
numberFormat: NumberFormat;
|
|
8
8
|
numberPrecision: number;
|
|
9
9
|
numberUnit: null;
|
|
10
10
|
numberCurrencyCode: null;
|
|
11
11
|
numberUseThousandSeparator: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare const getIsNumberFieldObjectTaken: (typeObject: TypeObject) => boolean;
|
|
14
|
-
declare const getNumberFieldObject: (typeObject: TypeObject) => FieldObject | undefined;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { defaultEnumNumberFieldMeta, enumNumberFieldName, getEnumNumberFieldName, getIsNumberFieldObjectTaken, getNumberFieldObject };
|
|
13
|
+
export declare const getIsNumberFieldObjectTaken: (typeObject: TypeObject) => boolean;
|
|
14
|
+
export declare const getNumberFieldObject: (typeObject: TypeObject) => FieldObject | undefined;
|
|
15
|
+
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
2
|
//#region src/field-utils/file.d.ts
|
|
3
|
-
declare const getFilesSelect: ({ typeObject }: {
|
|
3
|
+
export declare const getFilesSelect: ({ typeObject }: {
|
|
4
4
|
typeObject: TypeObject;
|
|
5
|
-
}) => import("@fibery/
|
|
6
|
-
//#endregion
|
|
7
|
-
export { getFilesSelect };
|
|
5
|
+
}) => import("@fibery/schema").Select;
|
|
6
|
+
//#endregion
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
2
|
//#region src/field-utils/icon.d.ts
|
|
3
|
-
declare const ICON_MIXIN_NAME = "icon/icon-mixin";
|
|
4
|
-
declare const ICON_EXTENSION_FIELD = "icon/icon";
|
|
5
|
-
declare const isIconExtensionEnabledType: (typeObject: TypeObject) => boolean;
|
|
6
|
-
declare const isIconExtensionField: (fieldObject: FieldObject) => boolean;
|
|
7
|
-
declare const getEntityIconSelect: ({ typeObject }: {
|
|
3
|
+
export declare const ICON_MIXIN_NAME = "icon/icon-mixin";
|
|
4
|
+
export declare const ICON_EXTENSION_FIELD = "icon/icon";
|
|
5
|
+
export declare const isIconExtensionEnabledType: (typeObject: TypeObject) => boolean;
|
|
6
|
+
export declare const isIconExtensionField: (fieldObject: FieldObject) => boolean;
|
|
7
|
+
export declare const getEntityIconSelect: ({ typeObject }: {
|
|
8
8
|
typeObject: TypeObject;
|
|
9
9
|
}) => {
|
|
10
10
|
[x: string]: import("@fibery/schema").FieldName;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { ICON_EXTENSION_FIELD, ICON_MIXIN_NAME, getEntityIconSelect, isIconExtensionEnabledType, isIconExtensionField };
|
|
12
|
+
//#endregion
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { FieldObject } from "@fibery/schema";
|
|
2
2
|
//#region src/field-utils/number.d.ts
|
|
3
|
-
declare enum NumberFormat {
|
|
3
|
+
export declare enum NumberFormat {
|
|
4
4
|
NUMBER = "Number",
|
|
5
5
|
MONEY = "Money",
|
|
6
6
|
PERCENT = "Percent"
|
|
7
7
|
}
|
|
8
|
-
type NumberDisplaySettings = {
|
|
8
|
+
export type NumberDisplaySettings = {
|
|
9
9
|
thousandSeparator: string;
|
|
10
10
|
decimalSeparator: string;
|
|
11
11
|
};
|
|
12
|
-
type NumberFieldMeta = {
|
|
12
|
+
export type NumberFieldMeta = {
|
|
13
13
|
numberFormat: NumberFormat;
|
|
14
14
|
numberPrecision: number;
|
|
15
15
|
numberUnit: string | null;
|
|
16
16
|
numberCurrencyCode: string | null;
|
|
17
17
|
numberUseThousandSeparator: boolean;
|
|
18
18
|
};
|
|
19
|
-
declare const getDefaultCurrencyCode: (numberFormat: NumberFormat) => "USD" | null;
|
|
20
|
-
declare const getDefaultPrecision: (numberFormat: NumberFormat) => 0 | 2;
|
|
21
|
-
declare const getInitialNumberFieldMeta: () => NumberFieldMeta;
|
|
22
|
-
declare const externalizePrecision: (numberFormat: NumberFormat, numberPrecision: number) => number;
|
|
23
|
-
declare function getNumberFormatOrDefault(numberFormat: NumberFormat | undefined): NumberFormat;
|
|
24
|
-
declare const parseNumberMeta: ({ rawNumberPrecision, rawNumberUnit, rawNumberCurrencyCode, rawNumberUseThousandSeparator, rawNumberFormat, fieldType }: {
|
|
19
|
+
export declare const getDefaultCurrencyCode: (numberFormat: NumberFormat) => "USD" | null;
|
|
20
|
+
export declare const getDefaultPrecision: (numberFormat: NumberFormat) => 0 | 2;
|
|
21
|
+
export declare const getInitialNumberFieldMeta: () => NumberFieldMeta;
|
|
22
|
+
export declare const externalizePrecision: (numberFormat: NumberFormat, numberPrecision: number) => number;
|
|
23
|
+
export declare function getNumberFormatOrDefault(numberFormat: NumberFormat | undefined): NumberFormat;
|
|
24
|
+
export declare const parseNumberMeta: ({ rawNumberPrecision, rawNumberUnit, rawNumberCurrencyCode, rawNumberUseThousandSeparator, rawNumberFormat, fieldType }: {
|
|
25
25
|
rawNumberPrecision: unknown;
|
|
26
26
|
rawNumberUnit: unknown;
|
|
27
27
|
rawNumberCurrencyCode: unknown;
|
|
@@ -29,6 +29,5 @@ declare const parseNumberMeta: ({ rawNumberPrecision, rawNumberUnit, rawNumberCu
|
|
|
29
29
|
rawNumberFormat: unknown;
|
|
30
30
|
fieldType: string;
|
|
31
31
|
}) => NumberFieldMeta;
|
|
32
|
-
declare const parseNumberFieldMeta: (fieldObject: FieldObject) => NumberFieldMeta;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { NumberDisplaySettings, NumberFieldMeta, NumberFormat, externalizePrecision, getDefaultCurrencyCode, getDefaultPrecision, getInitialNumberFieldMeta, getNumberFormatOrDefault, parseNumberFieldMeta, parseNumberMeta };
|
|
32
|
+
export declare const parseNumberFieldMeta: (fieldObject: FieldObject) => NumberFieldMeta;
|
|
33
|
+
//#endregion
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { FieldObject } from "@fibery/schema";
|
|
2
2
|
import { QueryLimit } from "@fibery/expression-utils/src/types";
|
|
3
3
|
//#region src/field-utils/reference-collection.d.ts
|
|
4
|
-
declare const REFERENCE_COLLECTION_LIMIT = 1000;
|
|
5
|
-
declare const makeCollectionCountExpression: (field: string | string[]) => (string | string[])[];
|
|
6
|
-
declare const getCountKey: (field: string) => string;
|
|
7
|
-
declare const getCollectionCountSelect: (field: string) => {
|
|
4
|
+
export declare const REFERENCE_COLLECTION_LIMIT = 1000;
|
|
5
|
+
export declare const makeCollectionCountExpression: (field: string | string[]) => (string | string[])[];
|
|
6
|
+
export declare const getCountKey: (field: string) => string;
|
|
7
|
+
export declare const getCollectionCountSelect: (field: string) => {
|
|
8
8
|
[x: string]: (string | string[])[];
|
|
9
9
|
};
|
|
10
|
-
declare const calculateReferenceCollectionQuery: ({ fieldObjects, expression, limit }: {
|
|
10
|
+
export declare const calculateReferenceCollectionQuery: ({ fieldObjects, expression, limit }: {
|
|
11
11
|
fieldObjects: FieldObject[];
|
|
12
12
|
expression: string[];
|
|
13
13
|
limit: QueryLimit;
|
|
14
14
|
}) => Record<string, unknown>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { REFERENCE_COLLECTION_LIMIT, calculateReferenceCollectionQuery, getCollectionCountSelect, getCountKey, makeCollectionCountExpression };
|
|
15
|
+
//#endregion
|
|
@@ -2,9 +2,8 @@ import { FieldObject, 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
4
|
//#region src/field-utils/reference.d.ts
|
|
5
|
-
declare const getReferenceTypeSelectClause: ({ typeObject }: {
|
|
5
|
+
export declare const getReferenceTypeSelectClause: ({ typeObject }: {
|
|
6
6
|
typeObject: TypeObject;
|
|
7
7
|
}, contextPath: FieldExpression$1) => Select;
|
|
8
|
-
declare const getReferenceFieldNormalizedSelectClause: (fieldObject: FieldObject, contextPath: FieldExpression$1) => any;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { getReferenceFieldNormalizedSelectClause, getReferenceTypeSelectClause };
|
|
8
|
+
export declare const getReferenceFieldNormalizedSelectClause: (fieldObject: FieldObject, contextPath: FieldExpression$1) => any;
|
|
9
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FieldObject } from "@fibery/schema";
|
|
2
2
|
//#region src/field-utils/relation-view.d.ts
|
|
3
|
-
declare const isRelationViewField: (fieldObject: FieldObject) => boolean;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { isRelationViewField };
|
|
3
|
+
export declare const isRelationViewField: (fieldObject: FieldObject) => boolean;
|
|
4
|
+
//#endregion
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionFieldUnit } from "../units/types.js";
|
|
2
2
|
import { TypeObject } from "@fibery/schema";
|
|
3
3
|
import { FieldExpression } from "@fibery/expression-utils/src/types";
|
|
4
4
|
//#region src/field-utils/rich-text.d.ts
|
|
5
|
-
declare const hasAccessToSecretKey: string;
|
|
6
|
-
declare const getHasAccessToSecretExpr: (expression: FieldExpression) => (string | (string | import("@fibery/
|
|
7
|
-
declare const getHasAccessToSecret: (expression: FieldExpression) => {
|
|
8
|
-
[hasAccessToSecretKey]: (string | (string | import("@fibery/
|
|
5
|
+
export declare const hasAccessToSecretKey: string;
|
|
6
|
+
export declare const getHasAccessToSecretExpr: (expression: FieldExpression) => (string | (string | import("@fibery/schema").MultiFieldAccess)[])[];
|
|
7
|
+
export declare const getHasAccessToSecret: (expression: FieldExpression) => {
|
|
8
|
+
[hasAccessToSecretKey]: (string | (string | import("@fibery/schema").MultiFieldAccess)[])[];
|
|
9
9
|
};
|
|
10
|
-
declare function getRichTextQuerySelect({ typeObject, unit: { expression }, includeSnippet }: {
|
|
10
|
+
export declare function getRichTextQuerySelect({ typeObject, unit: { expression }, includeSnippet }: {
|
|
11
11
|
typeObject: TypeObject;
|
|
12
|
-
unit:
|
|
12
|
+
unit: ExpressionFieldUnit;
|
|
13
13
|
includeSnippet?: boolean;
|
|
14
|
-
}): import("@fibery/
|
|
15
|
-
//#endregion
|
|
16
|
-
export { getHasAccessToSecret, getHasAccessToSecretExpr, getRichTextQuerySelect, hasAccessToSecretKey };
|
|
14
|
+
}): import("@fibery/schema").Select;
|
|
15
|
+
//#endregion
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
//#region src/field-utils/text.d.ts
|
|
2
|
-
declare const TextUIMetaKey = "ui/type";
|
|
3
|
-
declare const TextUIMeta: {
|
|
2
|
+
export declare const TextUIMetaKey = "ui/type";
|
|
3
|
+
export declare const TextUIMeta: {
|
|
4
4
|
Phone: string;
|
|
5
5
|
Email: string;
|
|
6
6
|
URL: string;
|
|
7
7
|
};
|
|
8
|
-
declare const TextTypes: {
|
|
8
|
+
export declare const TextTypes: {
|
|
9
9
|
CustomPhone: string;
|
|
10
10
|
CustomEmail: string;
|
|
11
11
|
CustomURL: string;
|
|
12
12
|
};
|
|
13
|
-
declare const TextTypeToFiberyType: {
|
|
13
|
+
export declare const TextTypeToFiberyType: {
|
|
14
14
|
[TextTypes.CustomPhone]: string;
|
|
15
15
|
[TextTypes.CustomEmail]: string;
|
|
16
16
|
[TextTypes.CustomURL]: string;
|
|
17
17
|
};
|
|
18
|
-
declare const TextTypeToUiMeta: {
|
|
18
|
+
export declare const TextTypeToUiMeta: {
|
|
19
19
|
[TextTypes.CustomPhone]: {
|
|
20
20
|
"ui/type": string;
|
|
21
21
|
};
|
|
@@ -26,8 +26,7 @@ declare const TextTypeToUiMeta: {
|
|
|
26
26
|
"ui/type": string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
declare const TextUiMetaToTextType: Record<string, string>;
|
|
30
|
-
declare const getTextType: (fieldMeta: Record<string, unknown>) => string;
|
|
31
|
-
declare const getTextTypeLabel: (textType: string) => string;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { TextTypeToFiberyType, TextTypeToUiMeta, TextTypes, TextUIMeta, TextUIMetaKey, TextUiMetaToTextType, getTextType, getTextTypeLabel };
|
|
29
|
+
export declare const TextUiMetaToTextType: Record<string, string>;
|
|
30
|
+
export declare const getTextType: (fieldMeta: Record<string, unknown>) => string;
|
|
31
|
+
export declare const getTextTypeLabel: (textType: string) => string;
|
|
32
|
+
//#endregion
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { TypeObject } from "@fibery/schema";
|
|
2
2
|
import { FieldExpression } from "@fibery/expression-utils";
|
|
3
3
|
//#region src/field-utils/user-active.d.ts
|
|
4
|
-
declare const getIsUserActiveSelect: ({ typeObject, contextPath }: {
|
|
4
|
+
export declare const getIsUserActiveSelect: ({ typeObject, contextPath }: {
|
|
5
5
|
typeObject: TypeObject;
|
|
6
6
|
contextPath?: FieldExpression;
|
|
7
7
|
}) => {
|
|
8
|
-
[x: string]: (string | (string | import("@fibery/
|
|
8
|
+
[x: string]: (string | (string | import("@fibery/schema").MultiFieldAccess)[])[];
|
|
9
9
|
} | null;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { getIsUserActiveSelect };
|
|
10
|
+
//#endregion
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { FieldObject } from "@fibery/schema";
|
|
2
2
|
//#region src/field-utils/user-role.d.ts
|
|
3
|
-
declare const isUserRoleField: (fieldObject: FieldObject) => boolean;
|
|
4
|
-
declare const getUserRoleByKey: (roleKey: string) => {
|
|
3
|
+
export declare const isUserRoleField: (fieldObject: FieldObject) => boolean;
|
|
4
|
+
export declare const getUserRoleByKey: (roleKey: string) => {
|
|
5
5
|
key: string;
|
|
6
6
|
label: string;
|
|
7
7
|
} | undefined;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { getUserRoleByKey, isUserRoleField };
|
|
8
|
+
//#endregion
|
|
@@ -2,24 +2,23 @@ import { TypeObject } from "@fibery/schema";
|
|
|
2
2
|
import { FiberyObject } from "@fibery/expression-utils/src/types";
|
|
3
3
|
import { FieldExpression as FieldExpression$1 } from "@fibery/expression-utils";
|
|
4
4
|
//#region src/field-utils/workflow.d.ts
|
|
5
|
-
declare function isWorkflowType(typeObject: TypeObject): boolean;
|
|
6
|
-
declare const getWorkflowFieldObject: (typeObject: TypeObject) => import("@fibery/schema").FieldObject | undefined;
|
|
7
|
-
declare const getIsFinalStateSelect: ({ typeObject, contextPath }: {
|
|
5
|
+
export declare function isWorkflowType(typeObject: TypeObject): boolean;
|
|
6
|
+
export declare const getWorkflowFieldObject: (typeObject: TypeObject) => import("@fibery/schema").FieldObject | undefined;
|
|
7
|
+
export declare const getIsFinalStateSelect: ({ typeObject, contextPath }: {
|
|
8
8
|
typeObject: TypeObject;
|
|
9
|
-
contextPath?: FieldExpression$1;
|
|
9
|
+
contextPath?: FieldExpression$1 | FieldExpression$1[];
|
|
10
10
|
}) => {
|
|
11
|
-
[x: string]: (string | (string |
|
|
11
|
+
[x: string]: (string | (string | FieldExpression$1)[])[];
|
|
12
12
|
} | null;
|
|
13
13
|
/** Reads the final-state flag off an already-fetched object, keyed the same way the select writes it. */
|
|
14
|
-
declare const getIsInFinalState: ({ typeObject, object, contextPath }: {
|
|
14
|
+
export declare const getIsInFinalState: ({ typeObject, object, contextPath }: {
|
|
15
15
|
typeObject: TypeObject;
|
|
16
16
|
object: FiberyObject;
|
|
17
|
-
contextPath?: FieldExpression$1;
|
|
17
|
+
contextPath?: FieldExpression$1 | FieldExpression$1[];
|
|
18
18
|
}) => boolean | null | undefined;
|
|
19
|
-
declare function getWorkflowTypeSelect(typeObject: TypeObject): {
|
|
19
|
+
export declare function getWorkflowTypeSelect(typeObject: TypeObject): {
|
|
20
20
|
"workflow/Type": string[];
|
|
21
21
|
} | {
|
|
22
22
|
"workflow/Type"?: undefined;
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
|
-
export { getIsFinalStateSelect, getIsInFinalState, getWorkflowFieldObject, getWorkflowTypeSelect, isWorkflowType };
|
|
24
|
+
//#endregion
|
package/lib/filter.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Expression } from "@fibery/expression-utils/src/types";
|
|
2
|
+
//#region src/filter.d.ts
|
|
3
|
+
export type LogicalOperator = "or" | "and";
|
|
4
|
+
export type FilterValue = {
|
|
5
|
+
/** q/where expression like ["=", ["kanban/name"], "$where1"] **/
|
|
6
|
+
expression: Expression;
|
|
7
|
+
params: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
type FilterBase = {
|
|
10
|
+
id: string;
|
|
11
|
+
pinned: boolean;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
/** When true pinned toggle filter is OFF by default */
|
|
17
|
+
defaultDisabled?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type Filter = FilterBase & {
|
|
20
|
+
kind: "filter";
|
|
21
|
+
overridable?: boolean;
|
|
22
|
+
value: FilterValue;
|
|
23
|
+
};
|
|
24
|
+
export type FilterGroup = FilterBase & {
|
|
25
|
+
kind: "group";
|
|
26
|
+
operator: LogicalOperator;
|
|
27
|
+
value: Array<FilterGroup | Filter>;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
package/lib/filter.js
ADDED
|
File without changes
|
package/lib/index.d.ts
CHANGED
|
@@ -4,31 +4,67 @@ import { UnitDefinitions, ViewRecord } from "./private/utils.js";
|
|
|
4
4
|
import { deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder, replaceIdsWithNamesInSmartFolder, replaceNamesWithIdsInSmartFolder } from "./private/smart-folder.js";
|
|
5
5
|
import { assertMetaValid, isMetaValid } from "./meta-validation.js";
|
|
6
6
|
import { FieldObject, Schema } from "@fibery/schema";
|
|
7
|
-
import {
|
|
7
|
+
import { FieldExpression } from "@fibery/expression-utils/src/types";
|
|
8
8
|
//#region src/index.d.ts
|
|
9
|
-
declare const
|
|
10
|
-
|
|
9
|
+
export declare const getViewCardTypes: <From extends string>({ "fibery/meta": { items } }: {
|
|
10
|
+
"fibery/meta": {
|
|
11
|
+
items: {
|
|
12
|
+
query: {
|
|
13
|
+
"q/from": From;
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
}) => From[];
|
|
18
|
+
/** @deprecated Unused; kept for the deprecated `collectGarbage` signature. */
|
|
19
|
+
export type CollectGarbageSchema = unknown;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Dispatch on `view["fibery/type"]` and call the per-kind `collectGarbage` from `./private/board`,
|
|
22
|
+
* `./private/smart-folder`, `./private/timeline`, `./private/calendar`, `./private/feed` or `./private/map`;
|
|
23
|
+
* each is `visitView(view, identityViewVisitor({visitViewUnit: (_, unit) => unit.checked ? unit : REMOVE}))`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const collectGarbage: <V extends ViewRecord>(_schema: CollectGarbageSchema, view: V) => V;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Dispatch on `view["fibery/type"]` where the view union is known and call the per-kind
|
|
28
|
+
* converter directly: `deleteExpressionWithNotFoundOrInvalidFieldsOrTypesInBoardView` (`./private/board`),
|
|
29
|
+
* `deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder`, `…InTimelineView` / `…InGanttView`
|
|
30
|
+
* (`./private/timeline`), `…InCalendarView`, `…InFeedView`, `…InFormView`, `…InMapView`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const deleteExpressionWithNotFoundFieldsOrTypesInView: <V extends ViewRecord>(schema: Schema, view: V, ensureAxisInvariant?: boolean) => V;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Dispatch on `view["fibery/type"]` and call the per-kind converter directly:
|
|
35
|
+
* `fixUserSelectedUnitsInBoardView` (`./private/board`), `fixUserSelectedUnitsInSmartFolder`,
|
|
36
|
+
* `fixUserSelectedUnitsInTimelineView` (timeline and gantt), `…InCalendarView`, `…InFeedView`, `…InMapView`.
|
|
37
|
+
*/
|
|
38
|
+
export declare const fixUserSelectedUnits: <V extends ViewRecord>(schema: Schema, view: V, options: {
|
|
11
39
|
unitDefinitions: UnitDefinitions;
|
|
12
40
|
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
13
41
|
}) => V;
|
|
14
|
-
declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: Expression) => V;
|
|
15
42
|
/**
|
|
16
|
-
*
|
|
43
|
+
* @deprecated Dispatch on `view["fibery/type"]` and call `fixContextExpressionWithBrokenPath` from the
|
|
44
|
+
* matching module: `./private/board`, `./private/smart-folder`, `./private/timeline`, `./private/calendar`,
|
|
45
|
+
* `./private/feed` or `./private/map`.
|
|
46
|
+
*/
|
|
47
|
+
export declare const fixContextExpressionWithBrokenPath: <V extends ViewRecord>(schema: Schema, view: V, defaultContextExpression: FieldExpression) => V;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Dispatch on `view["fibery/type"]` and call the per-kind converter directly:
|
|
50
|
+
* `replaceNamesWithIdsInBoardView` (`./private/board`), `replaceNamesWithIdsInSmartFolder`,
|
|
51
|
+
* `replaceNamesWithIdsInTimelineView` (`./private/timeline`, gantt too),
|
|
52
|
+
* `…InCalendarView`, `…InFeedView`, `…InFormView`, `…InMapView`.
|
|
53
|
+
*/
|
|
54
|
+
export declare const replaceNamesWithIdsInView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Dispatch on `view["fibery/type"]` and call the per-kind converter directly:
|
|
57
|
+
* `replaceIdsWithNamesInBoardView` (`./private/board`), `replaceIdsWithNamesInSmartFolder`,
|
|
58
|
+
* `replaceIdsWithNamesInTimelineView` (`./private/timeline`, gantt too),
|
|
59
|
+
* `…InCalendarView`, `…InFeedView`, `…InFormView`, `…InMapView`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const replaceIdsWithNamesInView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Strip `showEmptyUnitValues` yourself and, when it was `false`, call the per-kind enabler:
|
|
64
|
+
* `enableHideWhenEmptyForCovers` + `enableHideWhenEmptyForCheckedEditableUnits` (`./private/board`),
|
|
65
|
+
* `enableHideWhenEmptyForCheckedUnits` (`./private/smart-folder`, `./private/calendar`, `./private/feed`,
|
|
66
|
+
* `./private/map`), `enableHideWhenEmptyForCheckedEditableUnits` (`./private/timeline`).
|
|
17
67
|
*/
|
|
18
|
-
|
|
19
|
-
declare const collectGarbage: (_schema: CollectGarbageSchema, view: ViewRecord) => unknown;
|
|
20
|
-
declare const replaceNamesWithIdsInView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
21
|
-
declare const replaceIdsWithNamesInView: <V extends ViewRecord>(schema: Schema, view: V) => V;
|
|
22
|
-
type ViewMeta = {
|
|
23
|
-
items: {
|
|
24
|
-
query: {
|
|
25
|
-
"q/from": string;
|
|
26
|
-
};
|
|
27
|
-
}[];
|
|
28
|
-
};
|
|
29
|
-
declare const getViewCardTypes: ({ "fibery/meta": { items } }: {
|
|
30
|
-
"fibery/meta": ViewMeta;
|
|
31
|
-
}) => string[];
|
|
32
|
-
declare const migrateHideWhenEmptyToUnitsLevel: <V extends ViewRecord>(view: V) => V;
|
|
68
|
+
export declare const migrateHideWhenEmptyToUnitsLevel: <V extends ViewRecord>(view: V) => V;
|
|
33
69
|
//#endregion
|
|
34
|
-
export {
|
|
70
|
+
export { InvalidMetaError, assertMetaValid, deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder, isMetaValid, replaceIdsWithNamesInSmartFolder, replaceNamesWithIdsInSmartFolder };
|