@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.
Files changed (163) hide show
  1. package/lib/errors.d.ts +2 -3
  2. package/lib/field-utils/avatar.d.ts +8 -9
  3. package/lib/field-utils/back-references.d.ts +4 -5
  4. package/lib/field-utils/comments.d.ts +5 -6
  5. package/lib/field-utils/date-time.d.ts +7 -8
  6. package/lib/field-utils/enum-value.d.ts +6 -7
  7. package/lib/field-utils/file.d.ts +3 -4
  8. package/lib/field-utils/icon.d.ts +6 -7
  9. package/lib/field-utils/number.d.ts +11 -12
  10. package/lib/field-utils/reference-collection.d.ts +6 -7
  11. package/lib/field-utils/reference.d.ts +3 -4
  12. package/lib/field-utils/relation-view.d.ts +2 -3
  13. package/lib/field-utils/rich-text.d.ts +9 -10
  14. package/lib/field-utils/text.d.ts +9 -10
  15. package/lib/field-utils/user-active.d.ts +3 -4
  16. package/lib/field-utils/user-role.d.ts +3 -4
  17. package/lib/field-utils/workflow.d.ts +9 -10
  18. package/lib/filter.d.ts +29 -0
  19. package/lib/filter.js +0 -0
  20. package/lib/index.d.ts +57 -21
  21. package/lib/index.js +101 -94
  22. package/lib/meta-validation.d.ts +3 -4
  23. package/lib/private/board.d.ts +218 -14
  24. package/lib/private/board.js +138 -231
  25. package/lib/private/calendar.d.ts +213 -13
  26. package/lib/private/calendar.js +35 -81
  27. package/lib/private/feed.d.ts +211 -13
  28. package/lib/private/feed.js +34 -80
  29. package/lib/private/form.d.ts +52 -7
  30. package/lib/private/form.js +41 -48
  31. package/lib/private/map.d.ts +211 -13
  32. package/lib/private/map.js +34 -80
  33. package/lib/private/smart-folder.d.ts +118 -29
  34. package/lib/private/smart-folder.js +70 -148
  35. package/lib/private/timeline.d.ts +535 -31
  36. package/lib/private/timeline.js +158 -219
  37. package/lib/private/units.d.ts +3 -4
  38. package/lib/private/utils.d.ts +63 -57
  39. package/lib/private/utils.js +71 -49
  40. package/lib/refs.d.ts +19 -0
  41. package/lib/refs.js +0 -0
  42. package/lib/unit-definitions/avatar-collection.d.ts +29 -4
  43. package/lib/unit-definitions/avatar-collection.js +1 -1
  44. package/lib/unit-definitions/avatar-input.d.ts +49 -4
  45. package/lib/unit-definitions/avatar.d.ts +54 -4
  46. package/lib/unit-definitions/avatar.js +1 -1
  47. package/lib/unit-definitions/back-references-list.d.ts +31 -4
  48. package/lib/unit-definitions/back-references-list.js +1 -1
  49. package/lib/unit-definitions/bool-checkbox.d.ts +23 -4
  50. package/lib/unit-definitions/bool-checkbox.js +1 -1
  51. package/lib/unit-definitions/bool.d.ts +23 -4
  52. package/lib/unit-definitions/bool.js +1 -1
  53. package/lib/unit-definitions/collection-count.d.ts +31 -4
  54. package/lib/unit-definitions/color-input.d.ts +22 -4
  55. package/lib/unit-definitions/color-input.js +1 -1
  56. package/lib/unit-definitions/comments-list.d.ts +63 -4
  57. package/lib/unit-definitions/comments-list.js +1 -1
  58. package/lib/unit-definitions/date-range-combobox.d.ts +23 -4
  59. package/lib/unit-definitions/date-range-combobox.js +1 -1
  60. package/lib/unit-definitions/date-range.d.ts +23 -4
  61. package/lib/unit-definitions/date-range.js +1 -1
  62. package/lib/unit-definitions/date-time-combobox.d.ts +23 -4
  63. package/lib/unit-definitions/date-time-combobox.js +1 -1
  64. package/lib/unit-definitions/date.d.ts +23 -4
  65. package/lib/unit-definitions/date.js +1 -1
  66. package/lib/unit-definitions/email-input.d.ts +23 -4
  67. package/lib/unit-definitions/email.d.ts +23 -4
  68. package/lib/unit-definitions/emoji.d.ts +23 -4
  69. package/lib/unit-definitions/file-collection-count.d.ts +23 -4
  70. package/lib/unit-definitions/file-collection-count.js +1 -1
  71. package/lib/unit-definitions/file-compact-collection.d.ts +23 -4
  72. package/lib/unit-definitions/file-compact-collection.js +1 -1
  73. package/lib/unit-definitions/file-compact-reference.d.ts +27 -4
  74. package/lib/unit-definitions/file-reference.d.ts +23 -4
  75. package/lib/unit-definitions/file-reference.js +1 -1
  76. package/lib/unit-definitions/files-gallery.d.ts +23 -4
  77. package/lib/unit-definitions/files-gallery.js +1 -1
  78. package/lib/unit-definitions/files-l-list-item.d.ts +23 -4
  79. package/lib/unit-definitions/files-l-list-item.js +1 -1
  80. package/lib/unit-definitions/files-l-list.d.ts +23 -4
  81. package/lib/unit-definitions/files-l-list.js +1 -1
  82. package/lib/unit-definitions/files-list-item.d.ts +23 -4
  83. package/lib/unit-definitions/files-list-item.js +1 -1
  84. package/lib/unit-definitions/files-list.d.ts +23 -4
  85. package/lib/unit-definitions/files-list.js +1 -1
  86. package/lib/unit-definitions/geometry-preview.d.ts +23 -4
  87. package/lib/unit-definitions/icon-button.d.ts +28 -4
  88. package/lib/unit-definitions/icon-button.js +1 -1
  89. package/lib/unit-definitions/icon-input.d.ts +23 -4
  90. package/lib/unit-definitions/id.d.ts +32 -4
  91. package/lib/unit-definitions/index.js +2 -2
  92. package/lib/unit-definitions/json-input.d.ts +22 -4
  93. package/lib/unit-definitions/json-input.js +1 -1
  94. package/lib/unit-definitions/location-input.d.ts +23 -4
  95. package/lib/unit-definitions/location.d.ts +23 -4
  96. package/lib/unit-definitions/not-found.d.ts +6 -4
  97. package/lib/unit-definitions/number-input.d.ts +23 -4
  98. package/lib/unit-definitions/number-input.js +1 -1
  99. package/lib/unit-definitions/number.d.ts +27 -4
  100. package/lib/unit-definitions/phone-input.d.ts +23 -4
  101. package/lib/unit-definitions/phone.d.ts +23 -4
  102. package/lib/unit-definitions/progress-bar.d.ts +26 -4
  103. package/lib/unit-definitions/reference-collection-combobox.d.ts +19 -4
  104. package/lib/unit-definitions/reference-collection-combobox.js +1 -1
  105. package/lib/unit-definitions/reference-collection-list.d.ts +19 -4
  106. package/lib/unit-definitions/reference-collection-list.js +1 -1
  107. package/lib/unit-definitions/reference-collection-view.d.ts +19 -4
  108. package/lib/unit-definitions/reference-collection-view.js +1 -1
  109. package/lib/unit-definitions/reference-collection.d.ts +23 -4
  110. package/lib/unit-definitions/reference-collection.js +1 -1
  111. package/lib/unit-definitions/reference-combobox.d.ts +19 -4
  112. package/lib/unit-definitions/reference-combobox.js +1 -1
  113. package/lib/unit-definitions/reference-icon.d.ts +27 -4
  114. package/lib/unit-definitions/reference.d.ts +27 -4
  115. package/lib/unit-definitions/rich-text-document.d.ts +23 -4
  116. package/lib/unit-definitions/rich-text-document.js +1 -1
  117. package/lib/unit-definitions/rich-text-snippet.d.ts +25 -5
  118. package/lib/unit-definitions/single-location-preview.d.ts +23 -4
  119. package/lib/unit-definitions/text-input.d.ts +23 -4
  120. package/lib/unit-definitions/text-input.js +1 -1
  121. package/lib/unit-definitions/text.d.ts +23 -4
  122. package/lib/unit-definitions/text.js +1 -1
  123. package/lib/unit-definitions/title-input.d.ts +24 -4
  124. package/lib/unit-definitions/title.d.ts +27 -4
  125. package/lib/unit-definitions/type-badge-abbr.d.ts +15 -4
  126. package/lib/unit-definitions/type-badge.d.ts +15 -4
  127. package/lib/unit-definitions/type-icon.d.ts +15 -4
  128. package/lib/unit-definitions/url-input.d.ts +23 -4
  129. package/lib/unit-definitions/url.d.ts +23 -4
  130. package/lib/unit-definitions/user-button.d.ts +13 -4
  131. package/lib/unit-definitions/user-role-input.d.ts +26 -4
  132. package/lib/unit-definitions/user-role.d.ts +27 -4
  133. package/lib/unit-definitions/user-role.js +1 -1
  134. package/lib/unit-utils/access.d.ts +4 -5
  135. package/lib/unit-utils/can-edit-field.d.ts +4 -5
  136. package/lib/unit-utils/common.d.ts +16 -11
  137. package/lib/unit-utils/decimal.js +4 -4
  138. package/lib/unit-utils/dynamic-keys.d.ts +8 -9
  139. package/lib/unit-utils/enums.d.ts +4 -5
  140. package/lib/unit-utils/formatters.d.ts +15 -16
  141. package/lib/unit-utils/get-export-value.d.ts +18 -19
  142. package/lib/unit-utils/get-field-label.d.ts +4 -5
  143. package/lib/unit-utils/get-unmatched-unit-label.d.ts +2 -3
  144. package/lib/unit-utils/wrap-normalized-in-expression.d.ts +2 -3
  145. package/lib/units/board.d.ts +22 -25
  146. package/lib/units/board.js +2 -1
  147. package/lib/units/canvas/all-units-data-definitions.js +1 -1
  148. package/lib/units/canvas/index.d.ts +19 -24
  149. package/lib/units/canvas/type-badge-abbr.d.ts +13 -35
  150. package/lib/units/canvas/type-badge.d.ts +13 -35
  151. package/lib/units/default.d.ts +21 -22
  152. package/lib/units/default.js +2 -1
  153. package/lib/units/gallery.d.ts +5 -3
  154. package/lib/units/gantt.d.ts +23 -24
  155. package/lib/units/gantt.js +3 -2
  156. package/lib/units/get-unit-definitions-for-view-type.d.ts +4 -4
  157. package/lib/units/grid.d.ts +14 -25
  158. package/lib/units/grid.js +5 -4
  159. package/lib/units/list.d.ts +17 -26
  160. package/lib/units/list.js +2 -1
  161. package/lib/units/make-factory.d.ts +25 -27
  162. package/lib/units/types.d.ts +19 -13
  163. package/package.json +10 -10
@@ -1,8 +1,8 @@
1
1
  import { getFilesSelect } from "../field-utils/file.js";
2
2
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
3
- import { canEditField } from "../unit-utils/can-edit-field.js";
4
3
  import { getExportValue } from "../unit-utils/get-export-value.js";
5
4
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
6
6
  import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
7
7
  import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
8
8
  import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/files-list.d.ts
3
- declare const FileList: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { FileList };
7
+ export declare const FileList: {
8
+ type: "files-list";
9
+ name: string;
10
+ canEdit: typeof canEditField;
11
+ getLabel: typeof getFieldLabel;
12
+ calculateErrors: typeof calculateUnitExpressionErrors;
13
+ makeUnit: ({ expression }?: {
14
+ expression?: UnitExpression;
15
+ }) => ExpressionFieldUnit;
16
+ getQuerySelect({ typeObject, unit: { expression } }: {
17
+ typeObject: import("@fibery/schema").TypeObject;
18
+ unit: ExpressionFieldUnit;
19
+ schema: import("@fibery/schema").Schema;
20
+ }): import("@fibery/schema").Select;
21
+ getExportValue: typeof getExportValue;
22
+ canExport: () => true;
23
+ };
24
+ //#endregion
@@ -1,8 +1,8 @@
1
1
  import { getFilesSelect } from "../field-utils/file.js";
2
2
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
3
- import { canEditField } from "../unit-utils/can-edit-field.js";
4
3
  import { getExportValue } from "../unit-utils/get-export-value.js";
5
4
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
6
6
  import { wrapNormalizedInExpression } from "../unit-utils/wrap-normalized-in-expression.js";
7
7
  import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
8
8
  import { denormalizeSelect, normalizeSelect } from "@fibery/query-utils/src/select";
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/geometry-preview.d.ts
3
- declare const GeometryPreview: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { GeometryPreview };
7
+ export declare const GeometryPreview: {
8
+ type: "geometry-preview";
9
+ name: string;
10
+ makeUnit: ({ expression }?: {
11
+ expression?: UnitExpression;
12
+ }) => ExpressionFieldUnit;
13
+ getLabel: typeof getFieldLabel;
14
+ getQuerySelect: ({ typeObject, unit: { expression } }: {
15
+ typeObject: import("@fibery/schema").TypeObject;
16
+ unit: ExpressionFieldUnit;
17
+ schema: import("@fibery/schema").Schema;
18
+ }) => import("@fibery/schema").Select;
19
+ calculateErrors: typeof calculateUnitExpressionErrors;
20
+ canEdit: typeof canEditField;
21
+ getExportValue: typeof getExportValue;
22
+ canExport: () => true;
23
+ };
24
+ //#endregion
@@ -1,5 +1,29 @@
1
- import { ButtonUnit, FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ButtonUnit, ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
2
  //#region src/unit-definitions/icon-button.d.ts
3
- declare const IconButton: UnitDataDefinition<FieldUnit | ButtonUnit>;
4
- //#endregion
5
- export { IconButton };
3
+ export declare const IconButton: {
4
+ type: "icon-button";
5
+ name: string;
6
+ makeUnit(params: {
7
+ expression: UnitExpression;
8
+ } | undefined): ExpressionFieldUnit;
9
+ canEdit({ typeObject, unit }: {
10
+ typeObject: import("@fibery/schema").TypeObject;
11
+ unit: ButtonUnit | ExpressionFieldUnit;
12
+ }): boolean;
13
+ getLabel({ typeObject, unit }: {
14
+ typeObject: import("@fibery/schema").TypeObject;
15
+ unit: ButtonUnit | ExpressionFieldUnit;
16
+ }): string;
17
+ getQuerySelect({ typeObject, unit }: {
18
+ typeObject: import("@fibery/schema").TypeObject;
19
+ unit: ButtonUnit | ExpressionFieldUnit;
20
+ schema: import("@fibery/schema").Schema;
21
+ }): import("@fibery/schema").Select;
22
+ calculateErrors({ typeObject, unit }: {
23
+ typeObject: import("@fibery/schema").TypeObject;
24
+ unit: ButtonUnit | ExpressionFieldUnit;
25
+ }): string[];
26
+ getExportValue: () => null;
27
+ canExport: () => false;
28
+ };
29
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
2
- import { canEditField } from "../unit-utils/can-edit-field.js";
3
2
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
3
+ import { canEditField } from "../unit-utils/can-edit-field.js";
4
4
  import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
5
5
  //#region src/unit-definitions/icon-button.ts
6
6
  const type = "icon-button";
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/icon-input.d.ts
3
- declare const IconInput: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { IconInput };
7
+ export declare const IconInput: {
8
+ getLabel: typeof getFieldLabel;
9
+ getQuerySelect: ({ typeObject, unit: { expression } }: {
10
+ typeObject: import("@fibery/schema").TypeObject;
11
+ unit: ExpressionFieldUnit;
12
+ schema: import("@fibery/schema").Schema;
13
+ }) => import("@fibery/schema").Select;
14
+ calculateErrors: typeof calculateUnitExpressionErrors;
15
+ canEdit: typeof canEditField;
16
+ getExportValue: typeof getExportValue;
17
+ canExport: () => true;
18
+ type: "icon-input";
19
+ name: string;
20
+ makeUnit: ({ expression }?: {
21
+ expression?: UnitExpression;
22
+ }) => ExpressionFieldUnit;
23
+ };
24
+ //#endregion
@@ -1,5 +1,33 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { NumberDisplaySettings } from "../field-utils/number.js";
2
+ import { FieldUnit } from "../units/types.js";
2
3
  //#region src/unit-definitions/id.d.ts
3
- declare const Id: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { Id };
4
+ export declare const Id: {
5
+ type: "id";
6
+ name: string;
7
+ canEdit: () => false;
8
+ makeUnit(): {
9
+ type: "id";
10
+ kind: "field";
11
+ };
12
+ getLabel({ typeObject }: {
13
+ typeObject: import("@fibery/schema").TypeObject;
14
+ unit: FieldUnit;
15
+ }): string;
16
+ getQuerySelect({ typeObject }: {
17
+ typeObject: import("@fibery/schema").TypeObject;
18
+ unit: FieldUnit;
19
+ schema: import("@fibery/schema").Schema;
20
+ }): import("@fibery/schema").Select;
21
+ calculateErrors({ typeObject, unit }: {
22
+ typeObject: import("@fibery/schema").TypeObject;
23
+ unit: FieldUnit;
24
+ }): string[];
25
+ getExportValue: ({ object, typeObject }: {
26
+ typeObject: import("@fibery/schema").TypeObject;
27
+ unit: FieldUnit;
28
+ object: import("@fibery/expression-utils/src/types").FiberyObject;
29
+ displaySettings: NumberDisplaySettings;
30
+ }) => import("@fibery/schema").PublicId | null | undefined;
31
+ canExport: () => true;
32
+ };
33
+ //#endregion
@@ -3,11 +3,12 @@ import { AvatarCollection } from "./avatar-collection.js";
3
3
  import { Avatar } from "./avatar.js";
4
4
  import { Bool } from "./bool.js";
5
5
  import { CollectionCount } from "./collection-count.js";
6
- import { Date } from "./date.js";
7
6
  import { DateRange } from "./date-range.js";
7
+ import { Date } from "./date.js";
8
8
  import { Text } from "./text.js";
9
9
  import { Email } from "./email.js";
10
10
  import { Emoji } from "./emoji.js";
11
+ import { FileCollectionCount } from "./file-collection-count.js";
11
12
  import { IconButton } from "./icon-button.js";
12
13
  import { Id } from "./id.js";
13
14
  import { Location } from "./location.js";
@@ -25,7 +26,6 @@ import { TypeIcon } from "./type-icon.js";
25
26
  import { Url } from "./url.js";
26
27
  import { UserButton } from "./user-button.js";
27
28
  import { UserRole } from "./user-role.js";
28
- import { FileCollectionCount } from "./file-collection-count.js";
29
29
  //#region src/unit-definitions/index.ts
30
30
  var unit_definitions_exports = /* @__PURE__ */ __exportAll({
31
31
  Avatar: () => Avatar,
@@ -1,5 +1,23 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
4
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
5
  //#region src/unit-definitions/json-input.d.ts
3
- declare const JsonInput: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { JsonInput };
6
+ export declare const JsonInput: {
7
+ type: "json-input";
8
+ name: string;
9
+ canEdit: typeof canEditField;
10
+ makeUnit: ({ expression }?: {
11
+ expression?: UnitExpression;
12
+ }) => ExpressionFieldUnit;
13
+ getLabel: typeof getFieldLabel;
14
+ getQuerySelect({ typeObject, unit: { expression } }: {
15
+ typeObject: import("@fibery/schema").TypeObject;
16
+ unit: ExpressionFieldUnit;
17
+ schema: import("@fibery/schema").Schema;
18
+ }): import("@fibery/schema").Select;
19
+ calculateErrors: typeof calculateUnitExpressionErrors;
20
+ getExportValue: () => null;
21
+ canExport: () => false;
22
+ };
23
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
2
- import { canEditField } from "../unit-utils/can-edit-field.js";
3
2
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
3
+ import { canEditField } from "../unit-utils/can-edit-field.js";
4
4
  import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
5
5
  //#region src/unit-definitions/json-input.ts
6
6
  const type = "json-input";
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getLocationExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/location-input.d.ts
3
- declare const LocationInput: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { LocationInput };
7
+ export declare const LocationInput: {
8
+ type: "location-input";
9
+ name: string;
10
+ makeUnit: ({ expression }?: {
11
+ expression?: UnitExpression;
12
+ }) => ExpressionFieldUnit;
13
+ getLabel: typeof getFieldLabel;
14
+ getQuerySelect: ({ typeObject, unit: { expression } }: {
15
+ typeObject: import("@fibery/schema").TypeObject;
16
+ unit: ExpressionFieldUnit;
17
+ schema: import("@fibery/schema").Schema;
18
+ }) => import("@fibery/schema").Select;
19
+ calculateErrors: typeof calculateUnitExpressionErrors;
20
+ canEdit: typeof canEditField;
21
+ getExportValue: typeof getLocationExportValue;
22
+ canExport: () => true;
23
+ };
24
+ //#endregion
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getLocationExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/location.d.ts
3
- declare const Location: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { Location };
7
+ export declare const Location: {
8
+ type: "location";
9
+ name: string;
10
+ makeUnit: ({ expression }?: {
11
+ expression?: UnitExpression;
12
+ }) => ExpressionFieldUnit;
13
+ getLabel: typeof getFieldLabel;
14
+ getQuerySelect: ({ typeObject, unit: { expression } }: {
15
+ typeObject: import("@fibery/schema").TypeObject;
16
+ unit: ExpressionFieldUnit;
17
+ schema: import("@fibery/schema").Schema;
18
+ }) => import("@fibery/schema").Select;
19
+ calculateErrors: typeof calculateUnitExpressionErrors;
20
+ canEdit: typeof canEditField;
21
+ getExportValue: typeof getLocationExportValue;
22
+ canExport: () => true;
23
+ };
24
+ //#endregion
@@ -1,5 +1,7 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { Unit, UnitDataDefinition } from "../units/types.js";
2
2
  //#region src/unit-definitions/not-found.d.ts
3
- declare const NotFound: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { NotFound };
3
+ export type MissingUnitDefinition = Omit<UnitDataDefinition<Unit>, "type"> & {
4
+ type: "not-found";
5
+ };
6
+ export declare const NotFound: MissingUnitDefinition;
7
+ //#endregion
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getNumberExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/number-input.d.ts
3
- declare const NumberInput: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { NumberInput };
7
+ export declare const NumberInput: {
8
+ type: "number-input";
9
+ name: string;
10
+ makeUnit: ({ expression }?: {
11
+ expression?: UnitExpression;
12
+ }) => ExpressionFieldUnit;
13
+ getLabel: typeof getFieldLabel;
14
+ getQuerySelect({ typeObject, unit: { expression } }: {
15
+ typeObject: import("@fibery/schema").TypeObject;
16
+ unit: ExpressionFieldUnit;
17
+ schema: import("@fibery/schema").Schema;
18
+ }): import("@fibery/schema").Select;
19
+ calculateErrors: typeof calculateUnitExpressionErrors;
20
+ canEdit: typeof canEditField;
21
+ getExportValue: typeof getNumberExportValue;
22
+ canExport: () => true;
23
+ };
24
+ //#endregion
@@ -1,7 +1,7 @@
1
1
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
2
- import { canEditField } from "../unit-utils/can-edit-field.js";
3
2
  import { getNumberExportValue } from "../unit-utils/get-export-value.js";
4
3
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
4
+ import { canEditField } from "../unit-utils/can-edit-field.js";
5
5
  import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
6
6
  //#region src/unit-definitions/number-input.tsx
7
7
  const type = "number-input";
@@ -1,5 +1,28 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getNumberExportValue } from "../unit-utils/get-export-value.js";
2
4
  //#region src/unit-definitions/number.d.ts
3
- declare const Number: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { Number };
5
+ export declare const Number: {
6
+ type: "number";
7
+ name: string;
8
+ makeUnit: ({ expression }?: {
9
+ expression?: UnitExpression;
10
+ }) => ExpressionFieldUnit;
11
+ getLabel({ typeObject, unit }: {
12
+ typeObject: import("@fibery/schema").TypeObject;
13
+ unit: ExpressionFieldUnit;
14
+ }): string;
15
+ getQuerySelect({ typeObject, unit: { expression } }: {
16
+ typeObject: import("@fibery/schema").TypeObject;
17
+ unit: ExpressionFieldUnit;
18
+ schema: import("@fibery/schema").Schema;
19
+ }): import("@fibery/schema").Select;
20
+ calculateErrors: typeof calculateUnitExpressionErrors;
21
+ canEdit({ typeObject, unit: { expression } }: {
22
+ typeObject: import("@fibery/schema").TypeObject;
23
+ unit: ExpressionFieldUnit;
24
+ }): boolean;
25
+ getExportValue: typeof getNumberExportValue;
26
+ canExport: () => true;
27
+ };
28
+ //#endregion
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/phone-input.d.ts
3
- declare const PhoneInput: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { PhoneInput };
7
+ export declare const PhoneInput: {
8
+ canEdit: typeof canEditField;
9
+ getLabel: typeof getFieldLabel;
10
+ getQuerySelect({ typeObject, unit: { expression } }: {
11
+ typeObject: import("@fibery/schema").TypeObject;
12
+ unit: ExpressionFieldUnit;
13
+ schema: import("@fibery/schema").Schema;
14
+ }): import("@fibery/schema").Select;
15
+ calculateErrors: typeof calculateUnitExpressionErrors;
16
+ getExportValue: typeof getExportValue;
17
+ canExport: () => true;
18
+ type: "phone-input";
19
+ name: string;
20
+ makeUnit: ({ expression }?: {
21
+ expression?: UnitExpression;
22
+ }) => ExpressionFieldUnit;
23
+ };
24
+ //#endregion
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/phone.d.ts
3
- declare const Phone: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { Phone };
7
+ export declare const Phone: {
8
+ canEdit: typeof canEditField;
9
+ getLabel: typeof getFieldLabel;
10
+ getQuerySelect({ typeObject, unit: { expression } }: {
11
+ typeObject: import("@fibery/schema").TypeObject;
12
+ unit: ExpressionFieldUnit;
13
+ schema: import("@fibery/schema").Schema;
14
+ }): import("@fibery/schema").Select;
15
+ calculateErrors: typeof calculateUnitExpressionErrors;
16
+ getExportValue: typeof getExportValue;
17
+ canExport: () => true;
18
+ type: "phone";
19
+ name: string;
20
+ makeUnit: ({ expression }?: {
21
+ expression?: UnitExpression;
22
+ }) => ExpressionFieldUnit;
23
+ };
24
+ //#endregion
@@ -1,5 +1,27 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getNumberExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
2
5
  //#region src/unit-definitions/progress-bar.d.ts
3
- declare const ProgressBar: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { ProgressBar };
6
+ export declare const ProgressBar: {
7
+ type: "progress-bar";
8
+ name: string;
9
+ makeUnit: ({ expression }?: {
10
+ expression?: UnitExpression;
11
+ }) => ExpressionFieldUnit;
12
+ getLabel({ typeObject, unit }: {
13
+ typeObject: import("@fibery/schema").TypeObject;
14
+ unit: ExpressionFieldUnit;
15
+ }): string;
16
+ getQuerySelect({ typeObject, unit: { expression } }: {
17
+ typeObject: import("@fibery/schema").TypeObject;
18
+ unit: ExpressionFieldUnit;
19
+ schema: import("@fibery/schema").Schema;
20
+ }): import("@fibery/schema").Select;
21
+ calculateErrors: typeof calculateUnitExpressionErrors;
22
+ canEdit(): false;
23
+ getExportValue: typeof getNumberExportValue;
24
+ canExport: () => true;
25
+ getExportLabel: typeof getFieldLabel;
26
+ };
27
+ //#endregion
@@ -1,5 +1,20 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/reference-collection-combobox.d.ts
3
- declare const ReferenceCollectionCombobox: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { ReferenceCollectionCombobox };
7
+ export declare const ReferenceCollectionCombobox: {
8
+ type: "reference-collection-combobox";
9
+ name: string;
10
+ canEdit: typeof canEditField;
11
+ makeUnit: ({ expression }?: {
12
+ expression?: UnitExpression;
13
+ }) => ExpressionFieldUnit;
14
+ getLabel: typeof getFieldLabel;
15
+ getQuerySelect: () => never;
16
+ calculateErrors: typeof calculateUnitExpressionErrors;
17
+ getExportValue: typeof getExportValue;
18
+ canExport: () => true;
19
+ };
20
+ //#endregion
@@ -1,7 +1,7 @@
1
1
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
2
- import { canEditField } from "../unit-utils/can-edit-field.js";
3
2
  import { getExportValue } from "../unit-utils/get-export-value.js";
4
3
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
4
+ import { canEditField } from "../unit-utils/can-edit-field.js";
5
5
  //#region src/unit-definitions/reference-collection-combobox.ts
6
6
  const type = "reference-collection-combobox";
7
7
  const ReferenceCollectionCombobox = {
@@ -1,5 +1,20 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/reference-collection-list.d.ts
3
- declare const ReferenceCollectionList: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { ReferenceCollectionList };
7
+ export declare const ReferenceCollectionList: {
8
+ type: "reference-collection-list";
9
+ name: string;
10
+ canEdit: typeof canEditField;
11
+ makeUnit: ({ expression }?: {
12
+ expression?: UnitExpression;
13
+ }) => ExpressionFieldUnit;
14
+ getLabel: typeof getFieldLabel;
15
+ getQuerySelect: () => {};
16
+ calculateErrors: typeof calculateUnitExpressionErrors;
17
+ getExportValue: typeof getReferenceCollectionExportValue;
18
+ canExport: () => true;
19
+ };
20
+ //#endregion
@@ -1,7 +1,7 @@
1
1
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
2
- import { canEditField } from "../unit-utils/can-edit-field.js";
3
2
  import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
4
3
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
4
+ import { canEditField } from "../unit-utils/can-edit-field.js";
5
5
  //#region src/unit-definitions/reference-collection-list.tsx
6
6
  const type = "reference-collection-list";
7
7
  const ReferenceCollectionList = {
@@ -1,5 +1,20 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/reference-collection-view.d.ts
3
- declare const ReferenceCollectionView: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { ReferenceCollectionView };
7
+ export declare const ReferenceCollectionView: {
8
+ type: "reference-collection-view";
9
+ name: string;
10
+ canEdit: typeof canEditField;
11
+ makeUnit: ({ expression }?: {
12
+ expression?: UnitExpression;
13
+ }) => ExpressionFieldUnit;
14
+ getLabel: typeof getFieldLabel;
15
+ getQuerySelect: () => {};
16
+ calculateErrors: typeof calculateUnitExpressionErrors;
17
+ getExportValue: typeof getReferenceCollectionExportValue;
18
+ canExport: () => true;
19
+ };
20
+ //#endregion
@@ -1,7 +1,7 @@
1
1
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
2
- import { canEditField } from "../unit-utils/can-edit-field.js";
3
2
  import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
4
3
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
4
+ import { canEditField } from "../unit-utils/can-edit-field.js";
5
5
  //#region src/unit-definitions/reference-collection-view.tsx
6
6
  const type = "reference-collection-view";
7
7
  const ReferenceCollectionView = {
@@ -1,5 +1,24 @@
1
- import { FieldUnit, UnitDataDefinition } from "../units/types.js";
1
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
2
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
+ import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
4
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
5
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
6
  //#region src/unit-definitions/reference-collection.d.ts
3
- declare const ReferenceCollection: UnitDataDefinition<FieldUnit>;
4
- //#endregion
5
- export { ReferenceCollection };
7
+ export declare const ReferenceCollection: {
8
+ type: "reference-collection";
9
+ name: string;
10
+ getLabel: typeof getFieldLabel;
11
+ makeUnit: ({ expression }?: {
12
+ expression?: UnitExpression;
13
+ }) => ExpressionFieldUnit;
14
+ getQuerySelect({ typeObject, unit: { expression } }: {
15
+ typeObject: import("@fibery/schema").TypeObject;
16
+ unit: ExpressionFieldUnit;
17
+ schema: import("@fibery/schema").Schema;
18
+ }): Record<string, unknown>;
19
+ calculateErrors: typeof calculateUnitExpressionErrors;
20
+ canEdit: typeof canEditField;
21
+ getExportValue: typeof getReferenceCollectionExportValue;
22
+ canExport: () => true;
23
+ };
24
+ //#endregion