@fibery/views 26.0.6 → 26.0.8

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 (231) hide show
  1. package/lib/_virtual/_rolldown/runtime.js +1 -2
  2. package/lib/errors.d.ts +1 -3
  3. package/lib/errors.js +1 -2
  4. package/lib/field-utils/avatar.d.ts +1 -3
  5. package/lib/field-utils/avatar.js +1 -2
  6. package/lib/field-utils/back-references.d.ts +1 -3
  7. package/lib/field-utils/back-references.js +1 -2
  8. package/lib/field-utils/comments.d.ts +1 -3
  9. package/lib/field-utils/comments.js +1 -2
  10. package/lib/field-utils/date-time.d.ts +1 -3
  11. package/lib/field-utils/date-time.js +1 -2
  12. package/lib/field-utils/enum-value.d.ts +1 -3
  13. package/lib/field-utils/enum-value.js +1 -2
  14. package/lib/field-utils/file.d.ts +1 -3
  15. package/lib/field-utils/file.js +1 -2
  16. package/lib/field-utils/icon.d.ts +1 -3
  17. package/lib/field-utils/icon.js +1 -2
  18. package/lib/field-utils/number.d.ts +1 -3
  19. package/lib/field-utils/number.js +5 -8
  20. package/lib/field-utils/reference-collection.d.ts +1 -3
  21. package/lib/field-utils/reference-collection.js +7 -20
  22. package/lib/field-utils/reference.d.ts +1 -3
  23. package/lib/field-utils/reference.js +3 -4
  24. package/lib/field-utils/relation-view.d.ts +1 -3
  25. package/lib/field-utils/relation-view.js +1 -2
  26. package/lib/field-utils/rich-text.d.ts +1 -3
  27. package/lib/field-utils/rich-text.js +4 -15
  28. package/lib/field-utils/text.d.ts +1 -3
  29. package/lib/field-utils/text.js +1 -2
  30. package/lib/field-utils/user-active.d.ts +1 -3
  31. package/lib/field-utils/user-active.js +1 -2
  32. package/lib/field-utils/user-role.d.ts +1 -3
  33. package/lib/field-utils/user-role.js +1 -2
  34. package/lib/field-utils/workflow.d.ts +1 -3
  35. package/lib/field-utils/workflow.js +1 -2
  36. package/lib/filter.d.ts +1 -3
  37. package/lib/index.d.ts +2 -4
  38. package/lib/index.js +2 -3
  39. package/lib/meta-validation.d.ts +1 -3
  40. package/lib/meta-validation.js +5 -9
  41. package/lib/private/board.d.ts +1 -3
  42. package/lib/private/board.js +4 -5
  43. package/lib/private/calendar.d.ts +1 -3
  44. package/lib/private/calendar.js +2 -3
  45. package/lib/private/feed.d.ts +1 -3
  46. package/lib/private/feed.js +2 -3
  47. package/lib/private/form.d.ts +1 -3
  48. package/lib/private/form.js +1 -2
  49. package/lib/private/map.d.ts +1 -3
  50. package/lib/private/map.js +2 -3
  51. package/lib/private/smart-folder.d.ts +1 -3
  52. package/lib/private/smart-folder.js +5 -6
  53. package/lib/private/timeline.d.ts +1 -3
  54. package/lib/private/timeline.js +6 -7
  55. package/lib/private/units.d.ts +1 -3
  56. package/lib/private/units.js +17 -2
  57. package/lib/private/utils.d.ts +1 -3
  58. package/lib/private/utils.js +3 -5
  59. package/lib/refs.d.ts +1 -3
  60. package/lib/unit-definitions/avatar-collection.d.ts +1 -3
  61. package/lib/unit-definitions/avatar-collection.js +3 -15
  62. package/lib/unit-definitions/avatar-input.d.ts +2 -4
  63. package/lib/unit-definitions/avatar-input.js +1 -2
  64. package/lib/unit-definitions/avatar.d.ts +2 -4
  65. package/lib/unit-definitions/avatar.js +3 -14
  66. package/lib/unit-definitions/back-references-list.d.ts +3 -5
  67. package/lib/unit-definitions/back-references-list.js +2 -3
  68. package/lib/unit-definitions/bool-checkbox.d.ts +2 -4
  69. package/lib/unit-definitions/bool-checkbox.js +2 -3
  70. package/lib/unit-definitions/bool.d.ts +2 -4
  71. package/lib/unit-definitions/bool.js +2 -3
  72. package/lib/unit-definitions/collection-count.d.ts +2 -4
  73. package/lib/unit-definitions/collection-count.js +1 -2
  74. package/lib/unit-definitions/color-input.d.ts +2 -4
  75. package/lib/unit-definitions/color-input.js +2 -3
  76. package/lib/unit-definitions/comments-list.d.ts +2 -4
  77. package/lib/unit-definitions/comments-list.js +2 -3
  78. package/lib/unit-definitions/date-range-combobox.d.ts +2 -4
  79. package/lib/unit-definitions/date-range-combobox.js +2 -3
  80. package/lib/unit-definitions/date-range.d.ts +2 -4
  81. package/lib/unit-definitions/date-range.js +2 -3
  82. package/lib/unit-definitions/date-time-combobox.d.ts +2 -4
  83. package/lib/unit-definitions/date-time-combobox.js +2 -3
  84. package/lib/unit-definitions/date.d.ts +2 -4
  85. package/lib/unit-definitions/date.js +2 -3
  86. package/lib/unit-definitions/email-input.d.ts +4 -6
  87. package/lib/unit-definitions/email-input.js +1 -2
  88. package/lib/unit-definitions/email.d.ts +3 -5
  89. package/lib/unit-definitions/email.js +1 -2
  90. package/lib/unit-definitions/emoji.d.ts +3 -5
  91. package/lib/unit-definitions/emoji.js +1 -2
  92. package/lib/unit-definitions/file-collection-count.d.ts +2 -4
  93. package/lib/unit-definitions/file-collection-count.js +2 -3
  94. package/lib/unit-definitions/file-compact-collection.d.ts +2 -4
  95. package/lib/unit-definitions/file-compact-collection.js +2 -3
  96. package/lib/unit-definitions/file-compact-reference.d.ts +1 -3
  97. package/lib/unit-definitions/file-compact-reference.js +1 -2
  98. package/lib/unit-definitions/file-reference.d.ts +2 -4
  99. package/lib/unit-definitions/file-reference.js +2 -3
  100. package/lib/unit-definitions/files-gallery.d.ts +2 -4
  101. package/lib/unit-definitions/files-gallery.js +2 -3
  102. package/lib/unit-definitions/files-l-list-item.d.ts +2 -4
  103. package/lib/unit-definitions/files-l-list-item.js +2 -3
  104. package/lib/unit-definitions/files-l-list.d.ts +2 -4
  105. package/lib/unit-definitions/files-l-list.js +2 -3
  106. package/lib/unit-definitions/files-list-item.d.ts +2 -4
  107. package/lib/unit-definitions/files-list-item.js +2 -3
  108. package/lib/unit-definitions/files-list.d.ts +2 -4
  109. package/lib/unit-definitions/files-list.js +2 -3
  110. package/lib/unit-definitions/geometry-preview.d.ts +3 -5
  111. package/lib/unit-definitions/geometry-preview.js +1 -2
  112. package/lib/unit-definitions/icon-button.d.ts +2 -4
  113. package/lib/unit-definitions/icon-button.js +2 -3
  114. package/lib/unit-definitions/icon-input.d.ts +4 -6
  115. package/lib/unit-definitions/icon-input.js +1 -2
  116. package/lib/unit-definitions/id.d.ts +1 -3
  117. package/lib/unit-definitions/id.js +1 -2
  118. package/lib/unit-definitions/index.d.ts +4 -3
  119. package/lib/unit-definitions/index.js +6 -5
  120. package/lib/unit-definitions/json-input.d.ts +2 -4
  121. package/lib/unit-definitions/json-input.js +2 -3
  122. package/lib/unit-definitions/json-preview.d.ts +26 -0
  123. package/lib/unit-definitions/json-preview.js +31 -0
  124. package/lib/unit-definitions/location-input.d.ts +3 -5
  125. package/lib/unit-definitions/location-input.js +1 -2
  126. package/lib/unit-definitions/location.d.ts +3 -5
  127. package/lib/unit-definitions/location.js +1 -2
  128. package/lib/unit-definitions/not-found.d.ts +1 -3
  129. package/lib/unit-definitions/not-found.js +0 -1
  130. package/lib/unit-definitions/number-input.d.ts +2 -4
  131. package/lib/unit-definitions/number-input.js +2 -3
  132. package/lib/unit-definitions/number.d.ts +1 -3
  133. package/lib/unit-definitions/number.js +1 -2
  134. package/lib/unit-definitions/phone-input.d.ts +4 -6
  135. package/lib/unit-definitions/phone-input.js +1 -2
  136. package/lib/unit-definitions/phone.d.ts +4 -6
  137. package/lib/unit-definitions/phone.js +1 -2
  138. package/lib/unit-definitions/progress-bar.d.ts +1 -3
  139. package/lib/unit-definitions/progress-bar.js +1 -2
  140. package/lib/unit-definitions/reference-collection-combobox.d.ts +2 -4
  141. package/lib/unit-definitions/reference-collection-combobox.js +2 -3
  142. package/lib/unit-definitions/reference-collection-list.d.ts +2 -4
  143. package/lib/unit-definitions/reference-collection-list.js +2 -3
  144. package/lib/unit-definitions/reference-collection-view.d.ts +2 -4
  145. package/lib/unit-definitions/reference-collection-view.js +2 -3
  146. package/lib/unit-definitions/reference-collection.d.ts +2 -4
  147. package/lib/unit-definitions/reference-collection.js +2 -3
  148. package/lib/unit-definitions/reference-combobox.d.ts +2 -4
  149. package/lib/unit-definitions/reference-combobox.js +2 -3
  150. package/lib/unit-definitions/reference-icon.d.ts +3 -5
  151. package/lib/unit-definitions/reference-icon.js +1 -2
  152. package/lib/unit-definitions/reference.d.ts +1 -3
  153. package/lib/unit-definitions/reference.js +3 -14
  154. package/lib/unit-definitions/rich-text-document.d.ts +2 -4
  155. package/lib/unit-definitions/rich-text-document.js +2 -3
  156. package/lib/unit-definitions/rich-text-snippet.d.ts +1 -3
  157. package/lib/unit-definitions/rich-text-snippet.js +1 -2
  158. package/lib/unit-definitions/single-location-preview.d.ts +3 -5
  159. package/lib/unit-definitions/single-location-preview.js +1 -2
  160. package/lib/unit-definitions/text-input.d.ts +2 -4
  161. package/lib/unit-definitions/text-input.js +2 -3
  162. package/lib/unit-definitions/text.d.ts +2 -4
  163. package/lib/unit-definitions/text.js +2 -3
  164. package/lib/unit-definitions/title-input.d.ts +1 -3
  165. package/lib/unit-definitions/title-input.js +1 -2
  166. package/lib/unit-definitions/title.d.ts +2 -4
  167. package/lib/unit-definitions/title.js +1 -2
  168. package/lib/unit-definitions/type-badge-abbr.d.ts +1 -3
  169. package/lib/unit-definitions/type-badge-abbr.js +1 -2
  170. package/lib/unit-definitions/type-badge.d.ts +1 -3
  171. package/lib/unit-definitions/type-badge.js +1 -2
  172. package/lib/unit-definitions/type-icon.d.ts +1 -3
  173. package/lib/unit-definitions/type-icon.js +1 -2
  174. package/lib/unit-definitions/url-input.d.ts +4 -6
  175. package/lib/unit-definitions/url-input.js +1 -2
  176. package/lib/unit-definitions/url.d.ts +3 -5
  177. package/lib/unit-definitions/url.js +1 -2
  178. package/lib/unit-definitions/user-button.d.ts +1 -3
  179. package/lib/unit-definitions/user-button.js +1 -2
  180. package/lib/unit-definitions/user-role-input.d.ts +3 -5
  181. package/lib/unit-definitions/user-role-input.js +1 -2
  182. package/lib/unit-definitions/user-role.d.ts +3 -5
  183. package/lib/unit-definitions/user-role.js +2 -3
  184. package/lib/unit-utils/access.d.ts +1 -3
  185. package/lib/unit-utils/access.js +1 -2
  186. package/lib/unit-utils/can-edit-field.d.ts +1 -3
  187. package/lib/unit-utils/can-edit-field.js +1 -2
  188. package/lib/unit-utils/common.d.ts +2 -4
  189. package/lib/unit-utils/common.js +1 -2
  190. package/lib/unit-utils/decimal.d.ts +0 -2
  191. package/lib/unit-utils/decimal.js +1 -2
  192. package/lib/unit-utils/dynamic-keys.d.ts +1 -3
  193. package/lib/unit-utils/dynamic-keys.js +1 -2
  194. package/lib/unit-utils/enums.d.ts +1 -3
  195. package/lib/unit-utils/enums.js +2 -3
  196. package/lib/unit-utils/formatters.d.ts +1 -3
  197. package/lib/unit-utils/formatters.js +3 -5
  198. package/lib/unit-utils/get-export-value.d.ts +1 -3
  199. package/lib/unit-utils/get-export-value.js +1 -2
  200. package/lib/unit-utils/get-field-label.d.ts +1 -3
  201. package/lib/unit-utils/get-field-label.js +1 -2
  202. package/lib/unit-utils/get-unmatched-unit-label.d.ts +1 -3
  203. package/lib/unit-utils/get-unmatched-unit-label.js +2 -4
  204. package/lib/unit-utils/wrap-normalized-in-expression.d.ts +2 -3
  205. package/lib/unit-utils/wrap-normalized-in-expression.js +15 -14
  206. package/lib/units/board.d.ts +1 -3
  207. package/lib/units/board.js +1 -2
  208. package/lib/units/canvas/all-units-data-definitions.d.ts +5 -5
  209. package/lib/units/canvas/all-units-data-definitions.js +6 -7
  210. package/lib/units/canvas/index.d.ts +0 -1
  211. package/lib/units/canvas/index.js +1 -2
  212. package/lib/units/canvas/type-badge-abbr.d.ts +1 -3
  213. package/lib/units/canvas/type-badge-abbr.js +1 -2
  214. package/lib/units/canvas/type-badge.d.ts +1 -3
  215. package/lib/units/canvas/type-badge.js +1 -2
  216. package/lib/units/default.d.ts +0 -1
  217. package/lib/units/default.js +1 -2
  218. package/lib/units/gallery.d.ts +0 -2
  219. package/lib/units/gallery.js +1 -2
  220. package/lib/units/gantt.d.ts +1 -3
  221. package/lib/units/gantt.js +1 -2
  222. package/lib/units/get-unit-definitions-for-view-type.d.ts +1 -3
  223. package/lib/units/get-unit-definitions-for-view-type.js +2 -3
  224. package/lib/units/grid.d.ts +1 -3
  225. package/lib/units/grid.js +8 -7
  226. package/lib/units/list.d.ts +1 -3
  227. package/lib/units/list.js +1 -2
  228. package/lib/units/make-factory.d.ts +1 -3
  229. package/lib/units/make-factory.js +20 -28
  230. package/lib/units/types.d.ts +2 -4
  231. package/package.json +7 -9
@@ -1,4 +1,3 @@
1
- //#region src/unit-definitions/type-badge.d.ts
2
1
  export declare const TypeBadge: {
3
2
  type: "type-badge";
4
3
  name: string;
@@ -12,5 +11,4 @@ export declare const TypeBadge: {
12
11
  calculateErrors(): never[];
13
12
  getExportValue(): null;
14
13
  canExport: () => false;
15
- };
16
- //#endregion
14
+ };
@@ -1,4 +1,4 @@
1
- //#region src/unit-definitions/type-badge.ts
1
+ // src/unit-definitions/type-badge.ts
2
2
  const type = "type-badge";
3
3
  const TypeBadge = {
4
4
  type,
@@ -24,5 +24,4 @@ const TypeBadge = {
24
24
  },
25
25
  canExport: () => false
26
26
  };
27
- //#endregion
28
27
  export { TypeBadge };
@@ -1,4 +1,3 @@
1
- //#region src/unit-definitions/type-icon.d.ts
2
1
  export declare const TypeIcon: {
3
2
  type: "type-icon";
4
3
  name: string;
@@ -12,5 +11,4 @@ export declare const TypeIcon: {
12
11
  calculateErrors(): never[];
13
12
  getExportValue(): null;
14
13
  canExport: () => false;
15
- };
16
- //#endregion
14
+ };
@@ -1,4 +1,4 @@
1
- //#region src/unit-definitions/type-icon.ts
1
+ // src/unit-definitions/type-icon.ts
2
2
  const type = "type-icon";
3
3
  const TypeIcon = {
4
4
  type,
@@ -24,5 +24,4 @@ const TypeIcon = {
24
24
  },
25
25
  canExport: () => false
26
26
  };
27
- //#endregion
28
27
  export { TypeIcon };
@@ -1,9 +1,8 @@
1
- import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
1
+ import { canEditField } from "../unit-utils/can-edit-field.js";
2
+ import { getFieldLabel } from "../unit-utils/get-field-label.js";
2
3
  import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
3
4
  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";
6
- //#region src/unit-definitions/url-input.d.ts
5
+ import { ExpressionFieldUnit, UnitExpression } from "../units/types.js";
7
6
  export declare const UrlInput: {
8
7
  canEdit: typeof canEditField;
9
8
  getLabel: typeof getFieldLabel;
@@ -20,5 +19,4 @@ export declare const UrlInput: {
20
19
  makeUnit: ({ expression }?: {
21
20
  expression?: UnitExpression;
22
21
  }) => ExpressionFieldUnit;
23
- };
24
- //#endregion
22
+ };
@@ -1,6 +1,6 @@
1
1
  import { makeUnitMethod } from "../unit-utils/common.js";
2
2
  import { TextInput } from "./text-input.js";
3
- //#region src/unit-definitions/url-input.tsx
3
+ // src/unit-definitions/url-input.tsx
4
4
  const type = "url-input";
5
5
  const UrlInput = {
6
6
  ...TextInput,
@@ -8,5 +8,4 @@ const UrlInput = {
8
8
  name: "Input",
9
9
  makeUnit: makeUnitMethod(type)
10
10
  };
11
- //#endregion
12
11
  export { UrlInput };
@@ -1,9 +1,8 @@
1
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
2
  import { getFieldLabel } from "../unit-utils/get-field-label.js";
3
+ import { calculateUnitExpressionErrors } from "../unit-utils/common.js";
5
4
  import { canEditField } from "../unit-utils/can-edit-field.js";
6
- //#region src/unit-definitions/url.d.ts
5
+ import { getExportValue } from "../unit-utils/get-export-value.js";
7
6
  export declare const Url: {
8
7
  type: "url";
9
8
  name: string;
@@ -20,5 +19,4 @@ export declare const Url: {
20
19
  canEdit: typeof canEditField;
21
20
  getExportValue: typeof getExportValue;
22
21
  canExport: () => true;
23
- };
24
- //#endregion
22
+ };
@@ -1,6 +1,6 @@
1
1
  import { makeUnitMethod } from "../unit-utils/common.js";
2
2
  import { Text } from "./text.js";
3
- //#region src/unit-definitions/url.ts
3
+ // src/unit-definitions/url.ts
4
4
  const type = "url";
5
5
  const Url = {
6
6
  type,
@@ -13,5 +13,4 @@ const Url = {
13
13
  getExportValue: Text.getExportValue,
14
14
  canExport: () => true
15
15
  };
16
- //#endregion
17
16
  export { Url };
@@ -1,5 +1,4 @@
1
1
  import { ButtonUnit } from "../units/types.js";
2
- //#region src/unit-definitions/user-button.d.ts
3
2
  export declare const UserButton: {
4
3
  type: "user-button";
5
4
  name: string;
@@ -10,5 +9,4 @@ export declare const UserButton: {
10
9
  calculateErrors: () => never[];
11
10
  getExportValue: () => null;
12
11
  canExport: () => false;
13
- };
14
- //#endregion
12
+ };
@@ -1,4 +1,4 @@
1
- //#region src/unit-definitions/user-button.ts
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
- //#region src/unit-definitions/user-role-input.tsx
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 { calculateUnitExpressionErrors } from "../unit-utils/common.js";
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 { canEditField } from "../unit-utils/can-edit-field.js";
2
3
  import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
3
4
  import { getExportValue } from "../unit-utils/get-export-value.js";
4
- import { canEditField } from "../unit-utils/can-edit-field.js";
5
5
  import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
6
- //#region src/unit-definitions/user-role.ts
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
+ };
@@ -1,9 +1,8 @@
1
1
  import { accessCheckKeyKeyPrefix, makeDynamicKey } from "./dynamic-keys.js";
2
- //#region src/unit-utils/access.ts
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
- //#region src/unit-utils/can-edit-field.ts
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;
@@ -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
- //#region src/unit-utils/common.ts
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
- //#region src/unit-utils/decimal.ts
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
- //#region src/unit-utils/dynamic-keys.ts
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
+ };
@@ -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
- //#region src/unit-utils/enums.ts
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
- import isNil from "lodash/isNil.js";
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";
@@ -64,12 +63,12 @@ const formatNumberWithoutUnit = ({ value, format = "Number", displaySettings, cu
64
63
  case "Percent": return formatPercent(useThousandSeparator, precision, value, displaySettings);
65
64
  default: return value;
66
65
  }
67
- } catch (error) {
66
+ } catch {
68
67
  return value;
69
68
  }
70
69
  };
71
70
  const formatNumberWithUnitAsString = ({ value, format = "Number", displaySettings, unit, currencyCode, precision, useThousandSeparator, withNumberUnit = true }) => {
72
- if (isNil(value)) return "";
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
- //#region src/unit-utils/get-export-value.ts
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
- //#region src/unit-utils/get-field-label.ts
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,4 +1,2 @@
1
1
  import { Unit } from "../units/types.js";
2
- //#region src/unit-utils/get-unmatched-unit-label.d.ts
3
- export declare const getUnmatchedUnitLabel: (unit: Unit) => string;
4
- //#endregion
2
+ export declare const getUnmatchedUnitLabel: ({ checked, ...unit }: Unit) => string;
@@ -1,5 +1,3 @@
1
- import omit from "lodash/omit.js";
2
- //#region src/unit-utils/get-unmatched-unit-label.ts
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,4 @@
1
1
  import { FieldObject } from "@fibery/schema";
2
2
  import { FieldExpression } from "@fibery/expression-utils/src/types";
3
- //#region src/unit-utils/wrap-normalized-in-expression.d.ts
4
- export declare const wrapNormalizedInExpression: (innerNormalized: Record<string, unknown>, fieldObjects: FieldObject[], expression: FieldExpression) => Record<string, unknown>;
5
- //#endregion
3
+ export declare const wrapNormalizedInExpression: (select: Record<string, unknown>, fieldObjects: FieldObject[], expression: FieldExpression) => Record<string, unknown>;
4
+ export declare const wrapCollectionSelectInExpression: (select: Record<string, unknown>, fieldObjects: FieldObject[], expression: readonly string[]) => Record<string, unknown>;
@@ -1,15 +1,16 @@
1
- //#region src/unit-utils/wrap-normalized-in-expression.ts
2
- const wrapNormalizedInExpression = (innerNormalized, fieldObjects, expression) => [...expression].reverse().reduce((inner, field, reversedIndex) => {
3
- const originalIndex = expression.length - 1 - reversedIndex;
4
- if (!(originalIndex === expression.length - 1)) {
5
- const { idField } = fieldObjects[originalIndex].typeObject;
6
- const innerWithId = idField ? {
7
- [idField]: idField,
8
- ...inner
9
- } : inner;
10
- return { [field]: innerWithId };
1
+ // src/unit-utils/wrap-normalized-in-expression.ts
2
+ function wrapSelectInExpression(select, fieldObjects, expression, getIdSelect) {
3
+ let nested = select;
4
+ for (let index = expression.length - 1; index >= 0; index--) {
5
+ const idField = index < expression.length - 1 ? fieldObjects[index].typeObject.idField : void 0;
6
+ const inner = idField ? {
7
+ [idField]: getIdSelect(idField, index),
8
+ ...nested
9
+ } : nested;
10
+ nested = { [String(expression[index])]: inner };
11
11
  }
12
- return { [field]: inner };
13
- }, innerNormalized);
14
- //#endregion
15
- export { wrapNormalizedInExpression };
12
+ return nested;
13
+ }
14
+ const wrapNormalizedInExpression = (select, fieldObjects, expression) => wrapSelectInExpression(select, fieldObjects, expression, (id) => id);
15
+ const wrapCollectionSelectInExpression = (select, fieldObjects, expression) => wrapSelectInExpression(select, fieldObjects, expression, (id, index) => [...expression.slice(0, index + 1), id]);
16
+ export { wrapCollectionSelectInExpression, wrapNormalizedInExpression };
@@ -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
+ })[];
@@ -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
- //#region src/units/board.ts
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 };