@fibery/views 25.1.5 → 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 (134) 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/bool-checkbox.d.ts +23 -4
  49. package/lib/unit-definitions/bool.d.ts +23 -4
  50. package/lib/unit-definitions/collection-count.d.ts +31 -4
  51. package/lib/unit-definitions/color-input.d.ts +22 -4
  52. package/lib/unit-definitions/comments-list.d.ts +63 -4
  53. package/lib/unit-definitions/date-range-combobox.d.ts +23 -4
  54. package/lib/unit-definitions/date-range.d.ts +23 -4
  55. package/lib/unit-definitions/date-time-combobox.d.ts +23 -4
  56. package/lib/unit-definitions/date.d.ts +23 -4
  57. package/lib/unit-definitions/email-input.d.ts +23 -4
  58. package/lib/unit-definitions/email.d.ts +23 -4
  59. package/lib/unit-definitions/emoji.d.ts +23 -4
  60. package/lib/unit-definitions/file-collection-count.d.ts +23 -4
  61. package/lib/unit-definitions/file-compact-collection.d.ts +23 -4
  62. package/lib/unit-definitions/file-compact-reference.d.ts +27 -4
  63. package/lib/unit-definitions/file-reference.d.ts +23 -4
  64. package/lib/unit-definitions/files-gallery.d.ts +23 -4
  65. package/lib/unit-definitions/files-l-list-item.d.ts +23 -4
  66. package/lib/unit-definitions/files-l-list.d.ts +23 -4
  67. package/lib/unit-definitions/files-list-item.d.ts +23 -4
  68. package/lib/unit-definitions/files-list.d.ts +23 -4
  69. package/lib/unit-definitions/geometry-preview.d.ts +23 -4
  70. package/lib/unit-definitions/icon-button.d.ts +28 -4
  71. package/lib/unit-definitions/icon-input.d.ts +23 -4
  72. package/lib/unit-definitions/id.d.ts +32 -4
  73. package/lib/unit-definitions/index.js +2 -2
  74. package/lib/unit-definitions/json-input.d.ts +22 -4
  75. package/lib/unit-definitions/location-input.d.ts +23 -4
  76. package/lib/unit-definitions/location.d.ts +23 -4
  77. package/lib/unit-definitions/not-found.d.ts +6 -4
  78. package/lib/unit-definitions/number-input.d.ts +23 -4
  79. package/lib/unit-definitions/number.d.ts +27 -4
  80. package/lib/unit-definitions/phone-input.d.ts +23 -4
  81. package/lib/unit-definitions/phone.d.ts +23 -4
  82. package/lib/unit-definitions/progress-bar.d.ts +26 -4
  83. package/lib/unit-definitions/reference-collection-combobox.d.ts +19 -4
  84. package/lib/unit-definitions/reference-collection-list.d.ts +19 -4
  85. package/lib/unit-definitions/reference-collection-view.d.ts +19 -4
  86. package/lib/unit-definitions/reference-collection.d.ts +23 -4
  87. package/lib/unit-definitions/reference-combobox.d.ts +19 -4
  88. package/lib/unit-definitions/reference-icon.d.ts +27 -4
  89. package/lib/unit-definitions/reference.d.ts +27 -4
  90. package/lib/unit-definitions/rich-text-document.d.ts +23 -4
  91. package/lib/unit-definitions/rich-text-snippet.d.ts +25 -5
  92. package/lib/unit-definitions/single-location-preview.d.ts +23 -4
  93. package/lib/unit-definitions/text-input.d.ts +23 -4
  94. package/lib/unit-definitions/text.d.ts +23 -4
  95. package/lib/unit-definitions/title-input.d.ts +24 -4
  96. package/lib/unit-definitions/title.d.ts +27 -4
  97. package/lib/unit-definitions/type-badge-abbr.d.ts +15 -4
  98. package/lib/unit-definitions/type-badge.d.ts +15 -4
  99. package/lib/unit-definitions/type-icon.d.ts +15 -4
  100. package/lib/unit-definitions/url-input.d.ts +23 -4
  101. package/lib/unit-definitions/url.d.ts +23 -4
  102. package/lib/unit-definitions/user-button.d.ts +13 -4
  103. package/lib/unit-definitions/user-role-input.d.ts +26 -4
  104. package/lib/unit-definitions/user-role.d.ts +27 -4
  105. package/lib/unit-utils/access.d.ts +4 -5
  106. package/lib/unit-utils/can-edit-field.d.ts +4 -5
  107. package/lib/unit-utils/common.d.ts +16 -11
  108. package/lib/unit-utils/decimal.js +4 -4
  109. package/lib/unit-utils/dynamic-keys.d.ts +8 -9
  110. package/lib/unit-utils/enums.d.ts +4 -5
  111. package/lib/unit-utils/formatters.d.ts +15 -16
  112. package/lib/unit-utils/get-export-value.d.ts +18 -19
  113. package/lib/unit-utils/get-field-label.d.ts +4 -5
  114. package/lib/unit-utils/get-unmatched-unit-label.d.ts +2 -3
  115. package/lib/unit-utils/wrap-normalized-in-expression.d.ts +2 -3
  116. package/lib/units/board.d.ts +22 -25
  117. package/lib/units/board.js +2 -1
  118. package/lib/units/canvas/all-units-data-definitions.js +1 -1
  119. package/lib/units/canvas/index.d.ts +19 -24
  120. package/lib/units/canvas/type-badge-abbr.d.ts +13 -35
  121. package/lib/units/canvas/type-badge.d.ts +13 -35
  122. package/lib/units/default.d.ts +21 -22
  123. package/lib/units/default.js +2 -1
  124. package/lib/units/gallery.d.ts +5 -3
  125. package/lib/units/gantt.d.ts +23 -24
  126. package/lib/units/gantt.js +3 -2
  127. package/lib/units/get-unit-definitions-for-view-type.d.ts +4 -4
  128. package/lib/units/grid.d.ts +14 -25
  129. package/lib/units/grid.js +5 -4
  130. package/lib/units/list.d.ts +17 -26
  131. package/lib/units/list.js +2 -1
  132. package/lib/units/make-factory.d.ts +25 -27
  133. package/lib/units/types.d.ts +19 -13
  134. package/package.json +8 -8
@@ -2,7 +2,7 @@ import { NumberDisplaySettings } from "../field-utils/number.js";
2
2
  import { Schema, TypeId, TypeObject } from "@fibery/schema";
3
3
  import { FiberyObject } from "@fibery/expression-utils/src/types";
4
4
  //#region src/units/types.d.ts
5
- type ButtonUnit = {
5
+ export type ButtonUnit = {
6
6
  kind: "user-button";
7
7
  type: "user-button" | "icon-button";
8
8
  data: {
@@ -14,27 +14,34 @@ type ButtonUnit = {
14
14
  hideWhenEmpty?: boolean;
15
15
  icon?: string;
16
16
  };
17
- type UnitExpression = string[];
18
- type DbUnit = {
17
+ export type UnitExpression = string[];
18
+ export type DbUnit = {
19
19
  kind: "db";
20
20
  type: "type-icon" | "type-badge" | "type-badge-abbr";
21
21
  expression?: UnitExpression;
22
22
  checked?: boolean;
23
23
  hideWhenEmpty?: boolean;
24
24
  };
25
- type FieldUnit = {
25
+ type FieldUnitMetadata = {
26
26
  kind: "field";
27
- type: "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-list" | "date" | "date-time" | "date-time-range" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "files-collection" | "files-gallery" | "files-list" | "files-list-item" | "files-l-list" | "files-l-list-item" | "file-reference" | "file-compact-collection" | "file-compact-reference" | "file-collection-count" | "geometry-preview" | "icon-button" | "icon-input" | "id" | "json-input" | "location" | "location-input" | "number" | "number-input" | "phone" | "phone-input" | "progress-bar" | "reference" | "reference-icon" | "reference-combobox" | "reference-collection" | "reference-collection-list" | "reference-collection-view" | "reference-collection-combobox" | "rich-text-snippet" | "rich-text-document" | "single-location-preview" | "text" | "text-input" | "title" | "title-input" | "url" | "url-input" | "user-role" | "user-role-input";
28
- expression: UnitExpression;
29
27
  checked?: boolean;
30
28
  settings?: Record<string, unknown>;
31
29
  hideWhenEmpty?: boolean;
32
30
  };
33
- type Unit = FieldUnit | ButtonUnit | DbUnit;
34
- type ToPure<T extends Unit> = Omit<T, "checked">;
35
- type PureUnit = ToPure<FieldUnit> | ToPure<ButtonUnit> | ToPure<DbUnit>;
36
- type UnitDataDefinition<T extends Unit> = {
37
- type: string;
31
+ type FieldUnitType = "avatar" | "avatar-collection" | "avatar-input" | "back-references-list" | "bool" | "bool-checkbox" | "collection-count" | "color-input" | "comments-collection" | "comments-list" | "date" | "date-time" | "date-time-range" | "date-time-combobox" | "date-range" | "date-range-combobox" | "email" | "email-input" | "emoji" | "field" | "files-collection" | "files-gallery" | "files-list" | "files-list-item" | "files-l-list" | "files-l-list-item" | "file-reference" | "file-compact-collection" | "file-compact-reference" | "file-collection-count" | "geometry-preview" | "icon-button" | "icon-input" | "id" | "json-input" | "location" | "location-input" | "number" | "number-input" | "phone" | "phone-input" | "progress-bar" | "reference" | "reference-icon" | "reference-combobox" | "reference-collection" | "reference-collection-list" | "reference-collection-view" | "reference-collection-combobox" | "rich-text-snippet" | "rich-text-document" | "single-location-preview" | "text" | "text-input" | "title" | "title-input" | "url" | "url-input" | "user-role" | "user-role-input";
32
+ export type ExpressionFieldUnit = FieldUnitMetadata & {
33
+ type: FieldUnitType;
34
+ expression: UnitExpression;
35
+ };
36
+ export type FieldUnit = ExpressionFieldUnit | (FieldUnitMetadata & {
37
+ type: "id" | "title";
38
+ expression?: UnitExpression;
39
+ });
40
+ export type Unit = FieldUnit | ButtonUnit | DbUnit;
41
+ type ToPure<T extends Unit> = T extends Unit ? Omit<T, "checked"> : never;
42
+ export type PureUnit = ToPure<FieldUnit> | ToPure<ButtonUnit> | ToPure<DbUnit>;
43
+ export type UnitDataDefinition<T extends Unit> = {
44
+ type: T["type"];
38
45
  name: string;
39
46
  canEdit: (params: {
40
47
  typeObject: TypeObject;
@@ -70,5 +77,4 @@ type UnitDataDefinition<T extends Unit> = {
70
77
  unit: T;
71
78
  }) => string;
72
79
  };
73
- //#endregion
74
- export { ButtonUnit, DbUnit, FieldUnit, PureUnit, Unit, UnitDataDefinition, UnitExpression };
80
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/views",
3
- "version": "25.1.5",
3
+ "version": "26.0.0",
4
4
  "description": "Operations on view objects",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Fibery",
@@ -30,17 +30,17 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
+ "@fibery/expression-utils": "17.0.0",
34
+ "@fibery/helpers": "5.0.0",
35
+ "@fibery/query-utils": "7.2.4",
36
+ "@fibery/schema": "13.1.0",
33
37
  "date-fns": "2.29.2",
34
38
  "lodash": "4.18.1",
35
- "moment": "2.31.0",
36
- "@fibery/expression-utils": "16.0.4",
37
- "@fibery/helpers": "4.2.1",
38
- "@fibery/query-utils": "7.2.3",
39
- "@fibery/schema": "13.0.2"
39
+ "moment": "2.31.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@fibery/expression-utils": "^16.0.4",
43
- "@fibery/schema": "^13.0.2",
42
+ "@fibery/expression-utils": "^17.0.0",
43
+ "@fibery/schema": "^13.1.0",
44
44
  "lodash": "4.18.1"
45
45
  }
46
46
  }