@fibery/views 19.1.1 → 20.0.1

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 (470) hide show
  1. package/lib/_virtual/_rolldown/runtime.js +13 -0
  2. package/lib/errors.d.ts +4 -0
  3. package/lib/errors.js +4 -0
  4. package/lib/field-utils/avatar.d.ts +23 -0
  5. package/lib/field-utils/avatar.js +35 -0
  6. package/lib/field-utils/back-references.d.ts +18 -0
  7. package/lib/field-utils/back-references.js +15 -0
  8. package/lib/field-utils/comments.d.ts +63 -0
  9. package/lib/field-utils/comments.js +41 -0
  10. package/lib/field-utils/date-time.d.ts +17 -0
  11. package/lib/field-utils/date-time.js +31 -0
  12. package/lib/field-utils/enum-value.d.ts +16 -0
  13. package/lib/field-utils/enum-value.js +26 -0
  14. package/lib/field-utils/file.d.ts +7 -0
  15. package/lib/field-utils/file.js +14 -0
  16. package/lib/field-utils/icon.d.ts +13 -0
  17. package/lib/field-utils/icon.js +17 -0
  18. package/lib/field-utils/number.d.ts +34 -0
  19. package/lib/field-utils/number.js +64 -0
  20. package/lib/field-utils/reference-collection.d.ts +16 -0
  21. package/lib/field-utils/reference-collection.js +49 -0
  22. package/lib/field-utils/reference.d.ts +10 -0
  23. package/lib/field-utils/reference.js +55 -0
  24. package/lib/field-utils/relation-view.d.ts +5 -0
  25. package/lib/field-utils/relation-view.js +7 -0
  26. package/lib/field-utils/rich-text.d.ts +16 -0
  27. package/lib/field-utils/rich-text.js +33 -0
  28. package/lib/field-utils/text.d.ts +38 -0
  29. package/lib/field-utils/text.js +37 -0
  30. package/lib/field-utils/user-active.d.ts +11 -0
  31. package/lib/field-utils/user-active.js +24 -0
  32. package/lib/field-utils/user-role.d.ts +9 -0
  33. package/lib/field-utils/user-role.js +23 -0
  34. package/lib/field-utils/workflow.d.ts +18 -0
  35. package/lib/field-utils/workflow.js +48 -0
  36. package/lib/index.d.ts +34 -1
  37. package/lib/index.js +169 -16
  38. package/lib/meta-validation.d.ts +13 -0
  39. package/lib/meta-validation.js +53 -0
  40. package/lib/private/board.d.ts +18 -0
  41. package/lib/private/board.js +234 -0
  42. package/lib/private/calendar.d.ts +17 -0
  43. package/lib/private/calendar.js +82 -0
  44. package/lib/private/feed.d.ts +17 -0
  45. package/lib/private/feed.js +81 -0
  46. package/lib/private/form.d.ts +27 -0
  47. package/lib/private/form.js +57 -0
  48. package/lib/private/map.d.ts +17 -0
  49. package/lib/private/map.js +81 -0
  50. package/lib/private/smart-folder.d.ts +33 -0
  51. package/lib/private/smart-folder.js +165 -0
  52. package/lib/private/timeline.d.ts +41 -0
  53. package/lib/private/timeline.js +223 -0
  54. package/lib/private/units.d.ts +12 -0
  55. package/lib/private/units.js +131 -0
  56. package/lib/private/utils.d.ts +66 -0
  57. package/lib/private/utils.js +179 -0
  58. package/lib/tsfixme.d.ts +4 -0
  59. package/lib/tsfixme.js +0 -0
  60. package/lib/unit-definitions/avatar-collection.d.ts +5 -0
  61. package/lib/unit-definitions/avatar-collection.js +59 -0
  62. package/lib/unit-definitions/avatar-input.d.ts +5 -0
  63. package/lib/unit-definitions/avatar-input.js +12 -0
  64. package/lib/unit-definitions/avatar.d.ts +5 -0
  65. package/lib/unit-definitions/avatar.js +95 -0
  66. package/lib/unit-definitions/back-references-list.d.ts +5 -0
  67. package/lib/unit-definitions/back-references-list.js +39 -0
  68. package/lib/unit-definitions/bool-checkbox.d.ts +5 -0
  69. package/lib/unit-definitions/bool-checkbox.js +25 -0
  70. package/lib/unit-definitions/bool.d.ts +5 -0
  71. package/lib/unit-definitions/bool.js +25 -0
  72. package/lib/unit-definitions/collection-count.d.ts +5 -0
  73. package/lib/unit-definitions/collection-count.js +35 -0
  74. package/lib/unit-definitions/color-input.d.ts +5 -0
  75. package/lib/unit-definitions/color-input.js +24 -0
  76. package/lib/unit-definitions/comments-list.d.ts +5 -0
  77. package/lib/unit-definitions/comments-list.js +27 -0
  78. package/lib/unit-definitions/date-range-combobox.d.ts +5 -0
  79. package/lib/unit-definitions/date-range-combobox.js +25 -0
  80. package/lib/unit-definitions/date-range.d.ts +5 -0
  81. package/lib/unit-definitions/date-range.js +25 -0
  82. package/lib/unit-definitions/date-time-combobox.d.ts +5 -0
  83. package/lib/unit-definitions/date-time-combobox.js +25 -0
  84. package/lib/unit-definitions/date.d.ts +5 -0
  85. package/lib/unit-definitions/date.js +25 -0
  86. package/lib/unit-definitions/email-input.d.ts +5 -0
  87. package/lib/unit-definitions/email-input.js +12 -0
  88. package/lib/unit-definitions/email.d.ts +5 -0
  89. package/lib/unit-definitions/email.js +17 -0
  90. package/lib/unit-definitions/emoji.d.ts +5 -0
  91. package/lib/unit-definitions/emoji.js +17 -0
  92. package/lib/unit-definitions/file-collection-count.d.ts +5 -0
  93. package/lib/unit-definitions/file-collection-count.js +34 -0
  94. package/lib/unit-definitions/file-compact-collection.d.ts +5 -0
  95. package/lib/unit-definitions/file-compact-collection.js +34 -0
  96. package/lib/unit-definitions/file-compact-reference.d.ts +5 -0
  97. package/lib/unit-definitions/file-compact-reference.js +47 -0
  98. package/lib/unit-definitions/file-reference.d.ts +5 -0
  99. package/lib/unit-definitions/file-reference.js +30 -0
  100. package/lib/unit-definitions/files-gallery.d.ts +5 -0
  101. package/lib/unit-definitions/files-gallery.js +34 -0
  102. package/lib/unit-definitions/files-l-list-item.d.ts +5 -0
  103. package/lib/unit-definitions/files-l-list-item.js +30 -0
  104. package/lib/unit-definitions/files-l-list.d.ts +5 -0
  105. package/lib/unit-definitions/files-l-list.js +34 -0
  106. package/lib/unit-definitions/files-list-item.d.ts +5 -0
  107. package/lib/unit-definitions/files-list-item.js +30 -0
  108. package/lib/unit-definitions/files-list.d.ts +5 -0
  109. package/lib/unit-definitions/files-list.js +34 -0
  110. package/lib/unit-definitions/geometry-preview.d.ts +5 -0
  111. package/lib/unit-definitions/geometry-preview.js +17 -0
  112. package/lib/unit-definitions/icon-button.d.ts +5 -0
  113. package/lib/unit-definitions/icon-button.js +41 -0
  114. package/lib/unit-definitions/icon-input.d.ts +5 -0
  115. package/lib/unit-definitions/icon-input.js +12 -0
  116. package/lib/unit-definitions/id.d.ts +5 -0
  117. package/lib/unit-definitions/id.js +30 -0
  118. package/lib/unit-definitions/index.d.ts +28 -0
  119. package/lib/unit-definitions/index.js +60 -0
  120. package/lib/unit-definitions/json-input.d.ts +5 -0
  121. package/lib/unit-definitions/json-input.js +24 -0
  122. package/lib/unit-definitions/location-input.d.ts +5 -0
  123. package/lib/unit-definitions/location-input.js +18 -0
  124. package/lib/unit-definitions/location.d.ts +5 -0
  125. package/lib/unit-definitions/location.js +17 -0
  126. package/lib/unit-definitions/not-found.d.ts +5 -0
  127. package/lib/unit-definitions/not-found.js +22 -0
  128. package/lib/unit-definitions/number-input.d.ts +5 -0
  129. package/lib/unit-definitions/number-input.js +25 -0
  130. package/lib/unit-definitions/number.d.ts +5 -0
  131. package/lib/unit-definitions/number.js +31 -0
  132. package/lib/unit-definitions/phone-input.d.ts +5 -0
  133. package/lib/unit-definitions/phone-input.js +12 -0
  134. package/lib/unit-definitions/phone.d.ts +5 -0
  135. package/lib/unit-definitions/phone.js +12 -0
  136. package/lib/unit-definitions/progress-bar.d.ts +5 -0
  137. package/lib/unit-definitions/progress-bar.js +32 -0
  138. package/lib/unit-definitions/reference-collection-combobox.d.ts +5 -0
  139. package/lib/unit-definitions/reference-collection-combobox.js +21 -0
  140. package/lib/unit-definitions/reference-collection-list.d.ts +5 -0
  141. package/lib/unit-definitions/reference-collection-list.js +21 -0
  142. package/lib/unit-definitions/reference-collection-view.d.ts +5 -0
  143. package/lib/unit-definitions/reference-collection-view.js +19 -0
  144. package/lib/unit-definitions/reference-collection.d.ts +5 -0
  145. package/lib/unit-definitions/reference-collection.js +30 -0
  146. package/lib/unit-definitions/reference-combobox.d.ts +5 -0
  147. package/lib/unit-definitions/reference-combobox.js +21 -0
  148. package/lib/unit-definitions/reference-icon.d.ts +5 -0
  149. package/lib/unit-definitions/reference-icon.js +12 -0
  150. package/lib/unit-definitions/reference.d.ts +5 -0
  151. package/lib/unit-definitions/reference.js +63 -0
  152. package/lib/unit-definitions/rich-text-document.d.ts +5 -0
  153. package/lib/unit-definitions/rich-text-document.js +26 -0
  154. package/lib/unit-definitions/rich-text-snippet.d.ts +6 -0
  155. package/lib/unit-definitions/rich-text-snippet.js +35 -0
  156. package/lib/unit-definitions/single-location-preview.d.ts +5 -0
  157. package/lib/unit-definitions/single-location-preview.js +17 -0
  158. package/lib/unit-definitions/text-input.d.ts +5 -0
  159. package/lib/unit-definitions/text-input.js +25 -0
  160. package/lib/unit-definitions/text.d.ts +5 -0
  161. package/lib/unit-definitions/text.js +25 -0
  162. package/lib/unit-definitions/title-input.d.ts +5 -0
  163. package/lib/unit-definitions/title-input.js +19 -0
  164. package/lib/unit-definitions/title.d.ts +5 -0
  165. package/lib/unit-definitions/title.js +33 -0
  166. package/lib/unit-definitions/type-badge-abbr.d.ts +5 -0
  167. package/lib/unit-definitions/type-badge-abbr.js +28 -0
  168. package/lib/unit-definitions/type-badge.d.ts +5 -0
  169. package/lib/unit-definitions/type-badge.js +28 -0
  170. package/lib/unit-definitions/type-icon.d.ts +5 -0
  171. package/lib/unit-definitions/type-icon.js +28 -0
  172. package/lib/unit-definitions/url-input.d.ts +5 -0
  173. package/lib/unit-definitions/url-input.js +12 -0
  174. package/lib/unit-definitions/url.d.ts +5 -0
  175. package/lib/unit-definitions/url.js +17 -0
  176. package/lib/unit-definitions/user-button.d.ts +5 -0
  177. package/lib/unit-definitions/user-button.js +26 -0
  178. package/lib/unit-definitions/user-role-input.d.ts +5 -0
  179. package/lib/unit-definitions/user-role-input.js +12 -0
  180. package/lib/unit-definitions/user-role.d.ts +5 -0
  181. package/lib/unit-definitions/user-role.js +35 -0
  182. package/lib/unit-utils/access.d.ts +12 -0
  183. package/lib/unit-utils/access.js +9 -0
  184. package/lib/unit-utils/can-edit-field.d.ts +9 -0
  185. package/lib/unit-utils/can-edit-field.js +7 -0
  186. package/lib/unit-utils/common.d.ts +17 -0
  187. package/lib/unit-utils/common.js +39 -0
  188. package/lib/unit-utils/decimal.d.ts +44 -0
  189. package/lib/unit-utils/decimal.js +248 -0
  190. package/lib/unit-utils/dynamic-keys.d.ts +10 -0
  191. package/lib/unit-utils/dynamic-keys.js +12 -0
  192. package/lib/unit-utils/enums.d.ts +30 -0
  193. package/lib/unit-utils/enums.js +48 -0
  194. package/lib/unit-utils/formatters.d.ts +53 -0
  195. package/lib/unit-utils/formatters.js +128 -0
  196. package/lib/unit-utils/get-export-value.d.ts +48 -0
  197. package/lib/unit-utils/get-export-value.js +83 -0
  198. package/lib/unit-utils/get-field-label.d.ts +9 -0
  199. package/lib/unit-utils/get-field-label.js +11 -0
  200. package/lib/unit-utils/get-unmatched-unit-label.d.ts +5 -0
  201. package/lib/unit-utils/get-unmatched-unit-label.js +5 -0
  202. package/lib/unit-utils/schema.d.ts +7 -0
  203. package/lib/unit-utils/schema.js +9 -0
  204. package/lib/unit-utils/wrap-normalized-in-expression.d.ts +6 -0
  205. package/lib/unit-utils/wrap-normalized-in-expression.js +15 -0
  206. package/lib/units/board.d.ts +50 -0
  207. package/lib/units/board.js +24 -0
  208. package/lib/units/canvas/all-units-data-definitions.d.ts +19 -0
  209. package/lib/units/canvas/all-units-data-definitions.js +42 -0
  210. package/lib/units/canvas/index.d.ts +49 -0
  211. package/lib/units/canvas/index.js +27 -0
  212. package/lib/units/canvas/type-badge-abbr.d.ts +42 -0
  213. package/lib/units/canvas/type-badge-abbr.js +11 -0
  214. package/lib/units/canvas/type-badge.d.ts +42 -0
  215. package/lib/units/canvas/type-badge.js +11 -0
  216. package/lib/units/default.d.ts +50 -0
  217. package/lib/units/default.js +23 -0
  218. package/lib/units/gallery.d.ts +7 -0
  219. package/lib/units/gallery.js +21 -0
  220. package/lib/units/gantt.d.ts +51 -0
  221. package/lib/units/gantt.js +28 -0
  222. package/lib/units/get-unit-definitions-for-view-type.d.ts +5 -0
  223. package/lib/units/get-unit-definitions-for-view-type.js +22 -0
  224. package/lib/units/grid.d.ts +49 -0
  225. package/lib/units/grid.js +81 -0
  226. package/lib/units/list.d.ts +52 -0
  227. package/lib/units/list.js +23 -0
  228. package/lib/units/make-factory.d.ts +53 -0
  229. package/lib/units/make-factory.js +272 -0
  230. package/lib/units/types.d.ts +75 -0
  231. package/lib/units/types.js +0 -0
  232. package/package.json +18 -40
  233. package/lib/src/errors.d.ts +0 -2
  234. package/lib/src/errors.js +0 -6
  235. package/lib/src/field-utils/avatar.d.ts +0 -20
  236. package/lib/src/field-utils/avatar.js +0 -42
  237. package/lib/src/field-utils/back-references.d.ts +0 -15
  238. package/lib/src/field-utils/back-references.js +0 -21
  239. package/lib/src/field-utils/comments.d.ts +0 -60
  240. package/lib/src/field-utils/comments.js +0 -46
  241. package/lib/src/field-utils/date-time.d.ts +0 -14
  242. package/lib/src/field-utils/date-time.js +0 -56
  243. package/lib/src/field-utils/enum-value.d.ts +0 -13
  244. package/lib/src/field-utils/enum-value.js +0 -29
  245. package/lib/src/field-utils/file.d.ts +0 -4
  246. package/lib/src/field-utils/file.js +0 -18
  247. package/lib/src/field-utils/icon.d.ts +0 -10
  248. package/lib/src/field-utils/icon.js +0 -26
  249. package/lib/src/field-utils/number.d.ts +0 -31
  250. package/lib/src/field-utils/number.js +0 -91
  251. package/lib/src/field-utils/reference-collection.d.ts +0 -13
  252. package/lib/src/field-utils/reference-collection.js +0 -67
  253. package/lib/src/field-utils/reference.d.ts +0 -7
  254. package/lib/src/field-utils/reference.js +0 -57
  255. package/lib/src/field-utils/relation-view.d.ts +0 -2
  256. package/lib/src/field-utils/relation-view.js +0 -12
  257. package/lib/src/field-utils/rich-text.d.ts +0 -13
  258. package/lib/src/field-utils/rich-text.js +0 -38
  259. package/lib/src/field-utils/text.d.ts +0 -35
  260. package/lib/src/field-utils/text.js +0 -40
  261. package/lib/src/field-utils/user-active.d.ts +0 -8
  262. package/lib/src/field-utils/user-active.js +0 -23
  263. package/lib/src/field-utils/user-role.d.ts +0 -6
  264. package/lib/src/field-utils/user-role.js +0 -25
  265. package/lib/src/field-utils/workflow.d.ts +0 -15
  266. package/lib/src/field-utils/workflow.js +0 -53
  267. package/lib/src/index.d.ts +0 -30
  268. package/lib/src/index.js +0 -263
  269. package/lib/src/meta-validation.d.ts +0 -10
  270. package/lib/src/meta-validation.js +0 -78
  271. package/lib/src/private/board.d.ts +0 -15
  272. package/lib/src/private/board.js +0 -327
  273. package/lib/src/private/calendar.d.ts +0 -14
  274. package/lib/src/private/calendar.js +0 -123
  275. package/lib/src/private/feed.d.ts +0 -14
  276. package/lib/src/private/feed.js +0 -120
  277. package/lib/src/private/form.d.ts +0 -25
  278. package/lib/src/private/form.js +0 -61
  279. package/lib/src/private/map.d.ts +0 -14
  280. package/lib/src/private/map.js +0 -120
  281. package/lib/src/private/smart-folder.d.ts +0 -31
  282. package/lib/src/private/smart-folder.js +0 -277
  283. package/lib/src/private/test-data/garbage-test.d.ts +0 -649
  284. package/lib/src/private/test-data/garbage-test.js +0 -520
  285. package/lib/src/private/test-data/kanban.d.ts +0 -1123
  286. package/lib/src/private/test-data/kanban.js +0 -1203
  287. package/lib/src/private/test-data/tasks.d.ts +0 -3216
  288. package/lib/src/private/test-data/tasks.js +0 -2731
  289. package/lib/src/private/timeline.d.ts +0 -39
  290. package/lib/src/private/timeline.js +0 -325
  291. package/lib/src/private/units.d.ts +0 -10
  292. package/lib/src/private/units.js +0 -165
  293. package/lib/src/private/utils.d.ts +0 -64
  294. package/lib/src/private/utils.js +0 -273
  295. package/lib/src/truthy.d.ts +0 -1
  296. package/lib/src/truthy.js +0 -7
  297. package/lib/src/tsfixme.d.ts +0 -1
  298. package/lib/src/tsfixme.js +0 -2
  299. package/lib/src/unit-definitions/avatar-collection.d.ts +0 -2
  300. package/lib/src/unit-definitions/avatar-collection.js +0 -54
  301. package/lib/src/unit-definitions/avatar-input.d.ts +0 -2
  302. package/lib/src/unit-definitions/avatar-input.js +0 -12
  303. package/lib/src/unit-definitions/avatar.d.ts +0 -2
  304. package/lib/src/unit-definitions/avatar.js +0 -88
  305. package/lib/src/unit-definitions/back-references-list.d.ts +0 -2
  306. package/lib/src/unit-definitions/back-references-list.js +0 -38
  307. package/lib/src/unit-definitions/bool-checkbox.d.ts +0 -2
  308. package/lib/src/unit-definitions/bool-checkbox.js +0 -25
  309. package/lib/src/unit-definitions/bool.d.ts +0 -2
  310. package/lib/src/unit-definitions/bool.js +0 -22
  311. package/lib/src/unit-definitions/collection-count.d.ts +0 -2
  312. package/lib/src/unit-definitions/collection-count.js +0 -32
  313. package/lib/src/unit-definitions/color-input.d.ts +0 -2
  314. package/lib/src/unit-definitions/color-input.js +0 -21
  315. package/lib/src/unit-definitions/comments-list.d.ts +0 -2
  316. package/lib/src/unit-definitions/comments-list.js +0 -25
  317. package/lib/src/unit-definitions/date-range-combobox.d.ts +0 -2
  318. package/lib/src/unit-definitions/date-range-combobox.js +0 -22
  319. package/lib/src/unit-definitions/date-range.d.ts +0 -2
  320. package/lib/src/unit-definitions/date-range.js +0 -22
  321. package/lib/src/unit-definitions/date-time-combobox.d.ts +0 -2
  322. package/lib/src/unit-definitions/date-time-combobox.js +0 -22
  323. package/lib/src/unit-definitions/date.d.ts +0 -2
  324. package/lib/src/unit-definitions/date.js +0 -22
  325. package/lib/src/unit-definitions/email-input.d.ts +0 -2
  326. package/lib/src/unit-definitions/email-input.js +0 -12
  327. package/lib/src/unit-definitions/email.d.ts +0 -2
  328. package/lib/src/unit-definitions/email.js +0 -17
  329. package/lib/src/unit-definitions/emoji.d.ts +0 -2
  330. package/lib/src/unit-definitions/emoji.js +0 -17
  331. package/lib/src/unit-definitions/file-collection-count.d.ts +0 -2
  332. package/lib/src/unit-definitions/file-collection-count.js +0 -32
  333. package/lib/src/unit-definitions/file-compact-collection.d.ts +0 -2
  334. package/lib/src/unit-definitions/file-compact-collection.js +0 -32
  335. package/lib/src/unit-definitions/file-compact-reference.d.ts +0 -2
  336. package/lib/src/unit-definitions/file-compact-reference.js +0 -37
  337. package/lib/src/unit-definitions/file-reference.d.ts +0 -2
  338. package/lib/src/unit-definitions/file-reference.js +0 -28
  339. package/lib/src/unit-definitions/files-gallery.d.ts +0 -2
  340. package/lib/src/unit-definitions/files-gallery.js +0 -32
  341. package/lib/src/unit-definitions/files-l-list-item.d.ts +0 -2
  342. package/lib/src/unit-definitions/files-l-list-item.js +0 -28
  343. package/lib/src/unit-definitions/files-l-list.d.ts +0 -2
  344. package/lib/src/unit-definitions/files-l-list.js +0 -32
  345. package/lib/src/unit-definitions/files-list-item.d.ts +0 -2
  346. package/lib/src/unit-definitions/files-list-item.js +0 -28
  347. package/lib/src/unit-definitions/files-list.d.ts +0 -2
  348. package/lib/src/unit-definitions/files-list.js +0 -32
  349. package/lib/src/unit-definitions/geometry-preview.d.ts +0 -2
  350. package/lib/src/unit-definitions/geometry-preview.js +0 -17
  351. package/lib/src/unit-definitions/icon-button.d.ts +0 -2
  352. package/lib/src/unit-definitions/icon-button.js +0 -29
  353. package/lib/src/unit-definitions/icon-input.d.ts +0 -2
  354. package/lib/src/unit-definitions/icon-input.js +0 -12
  355. package/lib/src/unit-definitions/id.d.ts +0 -2
  356. package/lib/src/unit-definitions/id.js +0 -29
  357. package/lib/src/unit-definitions/index.d.ts +0 -27
  358. package/lib/src/unit-definitions/index.js +0 -57
  359. package/lib/src/unit-definitions/json-input.d.ts +0 -2
  360. package/lib/src/unit-definitions/json-input.js +0 -21
  361. package/lib/src/unit-definitions/location-input.d.ts +0 -2
  362. package/lib/src/unit-definitions/location-input.js +0 -18
  363. package/lib/src/unit-definitions/location.d.ts +0 -2
  364. package/lib/src/unit-definitions/location.js +0 -17
  365. package/lib/src/unit-definitions/not-found.d.ts +0 -2
  366. package/lib/src/unit-definitions/not-found.js +0 -24
  367. package/lib/src/unit-definitions/number-input.d.ts +0 -2
  368. package/lib/src/unit-definitions/number-input.js +0 -22
  369. package/lib/src/unit-definitions/number.d.ts +0 -2
  370. package/lib/src/unit-definitions/number.js +0 -25
  371. package/lib/src/unit-definitions/phone-input.d.ts +0 -2
  372. package/lib/src/unit-definitions/phone-input.js +0 -12
  373. package/lib/src/unit-definitions/phone.d.ts +0 -2
  374. package/lib/src/unit-definitions/phone.js +0 -12
  375. package/lib/src/unit-definitions/progress-bar.d.ts +0 -2
  376. package/lib/src/unit-definitions/progress-bar.js +0 -29
  377. package/lib/src/unit-definitions/reference-collection-combobox.d.ts +0 -2
  378. package/lib/src/unit-definitions/reference-collection-combobox.js +0 -21
  379. package/lib/src/unit-definitions/reference-collection-list.d.ts +0 -2
  380. package/lib/src/unit-definitions/reference-collection-list.js +0 -22
  381. package/lib/src/unit-definitions/reference-collection-view.d.ts +0 -2
  382. package/lib/src/unit-definitions/reference-collection-view.js +0 -19
  383. package/lib/src/unit-definitions/reference-collection.d.ts +0 -2
  384. package/lib/src/unit-definitions/reference-collection.js +0 -28
  385. package/lib/src/unit-definitions/reference-combobox.d.ts +0 -2
  386. package/lib/src/unit-definitions/reference-combobox.js +0 -21
  387. package/lib/src/unit-definitions/reference-icon.d.ts +0 -2
  388. package/lib/src/unit-definitions/reference-icon.js +0 -12
  389. package/lib/src/unit-definitions/reference.d.ts +0 -2
  390. package/lib/src/unit-definitions/reference.js +0 -61
  391. package/lib/src/unit-definitions/rich-text-document.d.ts +0 -2
  392. package/lib/src/unit-definitions/rich-text-document.js +0 -22
  393. package/lib/src/unit-definitions/rich-text-snippet.d.ts +0 -3
  394. package/lib/src/unit-definitions/rich-text-snippet.js +0 -34
  395. package/lib/src/unit-definitions/single-location-preview.d.ts +0 -2
  396. package/lib/src/unit-definitions/single-location-preview.js +0 -17
  397. package/lib/src/unit-definitions/text-input.d.ts +0 -2
  398. package/lib/src/unit-definitions/text-input.js +0 -22
  399. package/lib/src/unit-definitions/text.d.ts +0 -2
  400. package/lib/src/unit-definitions/text.js +0 -22
  401. package/lib/src/unit-definitions/title-input.d.ts +0 -2
  402. package/lib/src/unit-definitions/title-input.js +0 -16
  403. package/lib/src/unit-definitions/title.d.ts +0 -2
  404. package/lib/src/unit-definitions/title.js +0 -34
  405. package/lib/src/unit-definitions/type-badge-abbr.d.ts +0 -2
  406. package/lib/src/unit-definitions/type-badge-abbr.js +0 -25
  407. package/lib/src/unit-definitions/type-badge.d.ts +0 -2
  408. package/lib/src/unit-definitions/type-badge.js +0 -25
  409. package/lib/src/unit-definitions/type-icon.d.ts +0 -2
  410. package/lib/src/unit-definitions/type-icon.js +0 -25
  411. package/lib/src/unit-definitions/url-input.d.ts +0 -2
  412. package/lib/src/unit-definitions/url-input.js +0 -12
  413. package/lib/src/unit-definitions/url.d.ts +0 -2
  414. package/lib/src/unit-definitions/url.js +0 -17
  415. package/lib/src/unit-definitions/user-button.d.ts +0 -2
  416. package/lib/src/unit-definitions/user-button.js +0 -23
  417. package/lib/src/unit-definitions/user-role-input.d.ts +0 -2
  418. package/lib/src/unit-definitions/user-role-input.js +0 -12
  419. package/lib/src/unit-definitions/user-role.d.ts +0 -2
  420. package/lib/src/unit-definitions/user-role.js +0 -29
  421. package/lib/src/unit-utils/access.d.ts +0 -9
  422. package/lib/src/unit-utils/access.js +0 -14
  423. package/lib/src/unit-utils/can-edit-field.d.ts +0 -6
  424. package/lib/src/unit-utils/can-edit-field.js +0 -8
  425. package/lib/src/unit-utils/common.d.ts +0 -14
  426. package/lib/src/unit-utils/common.js +0 -43
  427. package/lib/src/unit-utils/decimal.d.ts +0 -42
  428. package/lib/src/unit-utils/decimal.js +0 -418
  429. package/lib/src/unit-utils/dynamic-keys.d.ts +0 -7
  430. package/lib/src/unit-utils/dynamic-keys.js +0 -13
  431. package/lib/src/unit-utils/enums.d.ts +0 -27
  432. package/lib/src/unit-utils/enums.js +0 -69
  433. package/lib/src/unit-utils/formatters.d.ts +0 -50
  434. package/lib/src/unit-utils/formatters.js +0 -163
  435. package/lib/src/unit-utils/get-export-value.d.ts +0 -45
  436. package/lib/src/unit-utils/get-export-value.js +0 -83
  437. package/lib/src/unit-utils/get-field-label.d.ts +0 -6
  438. package/lib/src/unit-utils/get-field-label.js +0 -10
  439. package/lib/src/unit-utils/get-unmatched-unit-label.d.ts +0 -2
  440. package/lib/src/unit-utils/get-unmatched-unit-label.js +0 -9
  441. package/lib/src/unit-utils/schema.d.ts +0 -4
  442. package/lib/src/unit-utils/schema.js +0 -12
  443. package/lib/src/unit-utils/wrap-normalized-in-expression.d.ts +0 -3
  444. package/lib/src/unit-utils/wrap-normalized-in-expression.js +0 -14
  445. package/lib/src/units/board.d.ts +0 -46
  446. package/lib/src/units/board.js +0 -51
  447. package/lib/src/units/canvas/all-units-data-definitions.d.ts +0 -18
  448. package/lib/src/units/canvas/all-units-data-definitions.js +0 -40
  449. package/lib/src/units/canvas/index.d.ts +0 -45
  450. package/lib/src/units/canvas/index.js +0 -48
  451. package/lib/src/units/canvas/type-badge-abbr.d.ts +0 -36
  452. package/lib/src/units/canvas/type-badge-abbr.js +0 -11
  453. package/lib/src/units/canvas/type-badge.d.ts +0 -36
  454. package/lib/src/units/canvas/type-badge.js +0 -11
  455. package/lib/src/units/default.d.ts +0 -46
  456. package/lib/src/units/default.js +0 -51
  457. package/lib/src/units/gallery.d.ts +0 -3
  458. package/lib/src/units/gallery.js +0 -18
  459. package/lib/src/units/gantt.d.ts +0 -47
  460. package/lib/src/units/gantt.js +0 -59
  461. package/lib/src/units/get-unit-definitions-for-view-type.d.ts +0 -2
  462. package/lib/src/units/get-unit-definitions-for-view-type.js +0 -64
  463. package/lib/src/units/grid.d.ts +0 -45
  464. package/lib/src/units/grid.js +0 -71
  465. package/lib/src/units/list.d.ts +0 -46
  466. package/lib/src/units/list.js +0 -49
  467. package/lib/src/units/make-factory.d.ts +0 -51
  468. package/lib/src/units/make-factory.js +0 -261
  469. package/lib/src/units/types.d.ts +0 -73
  470. package/lib/src/units/types.js +0 -2
@@ -1,163 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.formatDateTimeRange = exports.formatDateRange = exports.formatNumberWithUnitAsStringByFieldObject = exports.formatNumberWithUnitAsString = exports.formatNumberWithoutUnit = exports.formatPercent = exports.formatCurrency = exports.formatNumber = exports.formatArbitraryNumber = exports.defaultTimeFormat = exports.defaultDateTimeFormat = exports.defaultDateFormat = exports.defaultLocale = void 0;
7
- exports.formatUnitUrl = formatUnitUrl;
8
- const isNil_1 = __importDefault(require("lodash/isNil"));
9
- const date_time_1 = require("../field-utils/date-time");
10
- const number_1 = require("../field-utils/number");
11
- const decimal_1 = __importDefault(require("./decimal"));
12
- exports.defaultLocale = "en-US";
13
- exports.defaultDateFormat = "MMM D, YYYY";
14
- exports.defaultDateTimeFormat = "MMM D, YYYY HH:mm";
15
- exports.defaultTimeFormat = "HH:mm";
16
- const applyDisplaySettings = (parts, displaySettings) => {
17
- if (!displaySettings) {
18
- return parts.map((part) => part.value).join("");
19
- }
20
- return parts
21
- .map((part) => {
22
- if (part.type === "group") {
23
- return displaySettings.thousandSeparator;
24
- }
25
- if (part.type === "decimal") {
26
- return displaySettings.decimalSeparator;
27
- }
28
- return part.value;
29
- })
30
- .join("");
31
- };
32
- const formatArbitraryNumber = (value, displaySettings, options = {}) => {
33
- const formatter = new Intl.NumberFormat(exports.defaultLocale, {
34
- style: "decimal",
35
- ...options,
36
- });
37
- return applyDisplaySettings(formatter.formatToParts(value), displaySettings);
38
- };
39
- exports.formatArbitraryNumber = formatArbitraryNumber;
40
- const formatNumber = (useGrouping, precision, value, displaySettings) => {
41
- const formatter = new Intl.NumberFormat(exports.defaultLocale, {
42
- style: "decimal",
43
- useGrouping,
44
- minimumFractionDigits: precision,
45
- maximumFractionDigits: precision,
46
- signDisplay: "negative",
47
- });
48
- return applyDisplaySettings(formatter.formatToParts(value), displaySettings);
49
- };
50
- exports.formatNumber = formatNumber;
51
- const formatCurrency = (currency, useGrouping, precision, value, displaySettings) => {
52
- const formatter = new Intl.NumberFormat(exports.defaultLocale, {
53
- style: "currency",
54
- currency,
55
- useGrouping,
56
- minimumFractionDigits: precision,
57
- maximumFractionDigits: precision,
58
- signDisplay: "negative",
59
- });
60
- return applyDisplaySettings(formatter.formatToParts(Number(value)), displaySettings);
61
- };
62
- exports.formatCurrency = formatCurrency;
63
- const formatPercent = (useGrouping, precision, value, displaySettings) => {
64
- const formatter = new Intl.NumberFormat(exports.defaultLocale, {
65
- style: "percent",
66
- useGrouping,
67
- minimumFractionDigits: precision,
68
- maximumFractionDigits: precision,
69
- signDisplay: "negative",
70
- });
71
- return applyDisplaySettings(formatter.formatToParts(Number(value)), displaySettings);
72
- };
73
- exports.formatPercent = formatPercent;
74
- const formatNumberWithoutUnit = ({ value, format = number_1.NumberFormat.NUMBER, displaySettings, currencyCode, precision, useThousandSeparator, }) => {
75
- try {
76
- switch (format) {
77
- case number_1.NumberFormat.NUMBER: {
78
- const valueWithPrecision = new decimal_1.default(value).toFixed(precision, decimal_1.default.ROUND_HALF_CEIL);
79
- return (0, exports.formatNumber)(useThousandSeparator, precision, Number(valueWithPrecision), displaySettings);
80
- }
81
- case number_1.NumberFormat.MONEY: {
82
- return (0, exports.formatCurrency)(currencyCode, useThousandSeparator, precision, value, displaySettings);
83
- }
84
- case number_1.NumberFormat.PERCENT: {
85
- return (0, exports.formatPercent)(useThousandSeparator, precision, value, displaySettings);
86
- }
87
- default:
88
- return value;
89
- }
90
- }
91
- catch (error) {
92
- return value;
93
- }
94
- };
95
- exports.formatNumberWithoutUnit = formatNumberWithoutUnit;
96
- const formatNumberWithUnitAsString = ({ value, format = number_1.NumberFormat.NUMBER, displaySettings, unit, currencyCode, precision, useThousandSeparator, withNumberUnit = true, }) => {
97
- if ((0, isNil_1.default)(value)) {
98
- return "";
99
- }
100
- const formattedValue = (0, exports.formatNumberWithoutUnit)({
101
- value,
102
- format,
103
- displaySettings,
104
- currencyCode,
105
- precision,
106
- useThousandSeparator,
107
- });
108
- const showUnit = format === number_1.NumberFormat.NUMBER && unit && withNumberUnit;
109
- const suffix = showUnit ? ` ${unit}` : "";
110
- return `${formattedValue}${suffix}`;
111
- };
112
- exports.formatNumberWithUnitAsString = formatNumberWithUnitAsString;
113
- const formatNumberWithUnitAsStringByFieldObject = (fieldObject, value, displaySettings) => {
114
- const { numberFormat, numberPrecision, numberUnit, numberCurrencyCode, numberUseThousandSeparator } = (0, number_1.parseNumberFieldMeta)(fieldObject);
115
- return (0, exports.formatNumberWithUnitAsString)({
116
- value,
117
- format: numberFormat,
118
- displaySettings,
119
- unit: numberUnit,
120
- currencyCode: numberCurrencyCode,
121
- precision: numberPrecision,
122
- useThousandSeparator: numberUseThousandSeparator,
123
- withNumberUnit: true,
124
- });
125
- };
126
- exports.formatNumberWithUnitAsStringByFieldObject = formatNumberWithUnitAsStringByFieldObject;
127
- const formatDateRange = ({ value, type, format = exports.defaultDateFormat, }) => {
128
- const formattedStart = value ? (0, date_time_1.parseStart)({ value: value.start, type }).format(format) : "No Start Date";
129
- const formattedEnd = value ? (0, date_time_1.parseEnd)({ value: value.end, type }).format(format) : "No End Date";
130
- return `${formattedStart} → ${formattedEnd}`;
131
- };
132
- exports.formatDateRange = formatDateRange;
133
- const formatDateTimeRange = ({ value, type, dateFormat = exports.defaultDateFormat, timeFormat = exports.defaultTimeFormat, dateTimeFormat = exports.defaultDateTimeFormat, }) => {
134
- if (!value) {
135
- return `No Start Date → No End Date`;
136
- }
137
- const startDate = (0, date_time_1.parseStart)({ value: value.start, type });
138
- const endDate = (0, date_time_1.parseEnd)({ value: value.end, type });
139
- if (startDate && endDate && startDate.isSame(endDate, "day")) {
140
- return `${startDate.format(dateFormat)} ${startDate.format(timeFormat)} → ${endDate.format(timeFormat)}`;
141
- }
142
- return `${startDate.format(dateTimeFormat)} → ${endDate.format(dateTimeFormat)}`;
143
- };
144
- exports.formatDateTimeRange = formatDateTimeRange;
145
- function formatUnitUrl(url) {
146
- try {
147
- const trimmed = url.trim();
148
- // if not a full URL we return it as-is
149
- if (url === "" || url === " " || url === "/" || url === "https://" || url === "http://" || url === "www.") {
150
- return { host: trimmed };
151
- }
152
- // otherwise, clean up a full URL
153
- const cleaned = trimmed
154
- .replace(/^https?:\/\//, "")
155
- .replace(/^www\./, "")
156
- .replace(/\/+$/, "");
157
- const host = cleaned.length > 200 ? cleaned.slice(0, 197) + "…" : cleaned;
158
- return { host };
159
- }
160
- catch {
161
- return { host: url };
162
- }
163
- }
@@ -1,45 +0,0 @@
1
- import type { FiberyObject } from "@fibery/expression-utils/src/types";
2
- import type { FieldObject, TypeObject } from "@fibery/schema";
3
- import type { NumberDisplaySettings } from "../field-utils/number";
4
- import type { FieldUnit } from "../units/types";
5
- export declare const getExportValue: ({ object, unit }: {
6
- object: FiberyObject;
7
- unit: FieldUnit;
8
- }) => any;
9
- export declare const getReferenceCollectionExportValue: ({ unit, typeObject, object, }: {
10
- object: FiberyObject;
11
- unit: FieldUnit;
12
- typeObject: TypeObject;
13
- }) => (string | undefined)[] | FiberyObject[] | null;
14
- export declare const getReferenceExportValue: ({ unit, typeObject, object, }: {
15
- object: FiberyObject;
16
- unit: FieldUnit;
17
- typeObject: TypeObject;
18
- }) => string | null | undefined;
19
- export declare const getSnippetExportValue: ({ object, unit }: {
20
- object: FiberyObject;
21
- unit: FieldUnit;
22
- }) => any;
23
- export declare const formatDateRangeExportValue: (value: {
24
- start: string;
25
- end: string;
26
- } | null, fieldObject: FieldObject | null) => string | null;
27
- export declare const getDateRangeExportValue: ({ object, unit, typeObject, }: {
28
- object: FiberyObject;
29
- unit: FieldUnit;
30
- typeObject: TypeObject;
31
- }) => string | null;
32
- export declare const getLocationExportValue: ({ object, unit }: {
33
- object: FiberyObject;
34
- unit: FieldUnit;
35
- }) => any;
36
- export declare const getTitleExportValue: ({ object, typeObject }: {
37
- object: FiberyObject;
38
- typeObject: TypeObject;
39
- }) => string | undefined;
40
- export declare const getNumberExportValue: ({ object, unit, typeObject, displaySettings, }: {
41
- object: FiberyObject;
42
- typeObject: TypeObject;
43
- unit: FieldUnit;
44
- displaySettings: NumberDisplaySettings;
45
- }) => string;
@@ -1,83 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNumberExportValue = exports.getTitleExportValue = exports.getLocationExportValue = exports.getDateRangeExportValue = exports.formatDateRangeExportValue = exports.getSnippetExportValue = exports.getReferenceExportValue = exports.getReferenceCollectionExportValue = exports.getExportValue = void 0;
4
- const utils_1 = require("@fibery/expression-utils/src/utils");
5
- const query_1 = require("@fibery/query-utils/src/query");
6
- const date_fns_1 = require("date-fns");
7
- const number_1 = require("../field-utils/number");
8
- const formatters_1 = require("./formatters");
9
- const getExportValue = ({ object, unit }) => {
10
- return (0, query_1.getValueByFieldExpression)(object, unit.expression);
11
- };
12
- exports.getExportValue = getExportValue;
13
- const getReferenceCollectionExportValue = ({ unit, typeObject, object, }) => {
14
- const value = (0, query_1.getValueByFieldExpression)(object, unit.expression);
15
- if (!value || value.length === 0) {
16
- return value;
17
- }
18
- const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression: unit.expression });
19
- return value.map((v) => v[fieldObject.typeObject.titleField]);
20
- };
21
- exports.getReferenceCollectionExportValue = getReferenceCollectionExportValue;
22
- const getReferenceExportValue = ({ unit, typeObject, object, }) => {
23
- const value = (0, query_1.getValueByFieldExpression)(object, unit.expression);
24
- if (!value) {
25
- return value;
26
- }
27
- const [field] = unit.expression;
28
- const fieldObject = typeObject.fieldObjectsByName[field];
29
- return value[fieldObject.typeObject.titleField];
30
- };
31
- exports.getReferenceExportValue = getReferenceExportValue;
32
- const getSnippetExportValue = ({ object, unit }) => {
33
- const value = (0, exports.getExportValue)({ object, unit });
34
- return value?.["Collaboration~Documents/Snippet"];
35
- };
36
- exports.getSnippetExportValue = getSnippetExportValue;
37
- const formatDateRangeExportValue = (value, fieldObject) => {
38
- if (value) {
39
- const start = value.start;
40
- let end = value.end;
41
- if (fieldObject?.type === "fibery/date-range") {
42
- end = (0, date_fns_1.formatISO)((0, date_fns_1.subDays)((0, date_fns_1.parseISO)(end), 1), { representation: "date" });
43
- }
44
- else if (fieldObject?.type === "fibery/date-time-range") {
45
- end = (0, date_fns_1.subSeconds)((0, date_fns_1.parseISO)(end), 1).toISOString();
46
- }
47
- return `${start} - ${end}`;
48
- }
49
- return value;
50
- };
51
- exports.formatDateRangeExportValue = formatDateRangeExportValue;
52
- const getDateRangeExportValue = ({ object, unit, typeObject, }) => {
53
- const value = (0, exports.getExportValue)({ object, unit });
54
- const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ expression: unit.expression, typeObject });
55
- return (0, exports.formatDateRangeExportValue)(value, fieldObject);
56
- };
57
- exports.getDateRangeExportValue = getDateRangeExportValue;
58
- const getLocationExportValue = ({ object, unit }) => {
59
- const value = (0, exports.getExportValue)({ object, unit });
60
- return value ? JSON.stringify(value) : value;
61
- };
62
- exports.getLocationExportValue = getLocationExportValue;
63
- const getTitleExportValue = ({ object, typeObject }) => {
64
- return object?.[typeObject.titleField];
65
- };
66
- exports.getTitleExportValue = getTitleExportValue;
67
- const getNumberExportValue = ({ object, unit, typeObject, displaySettings, }) => {
68
- const [field] = unit.expression;
69
- const fieldObject = typeObject.fieldObjectsByName[field];
70
- const value = (0, query_1.getValueByFieldExpression)(object, unit.expression);
71
- const { numberFormat, numberPrecision, numberUnit, numberCurrencyCode, numberUseThousandSeparator } = (0, number_1.parseNumberFieldMeta)(fieldObject);
72
- return (0, formatters_1.formatNumberWithUnitAsString)({
73
- value,
74
- format: numberFormat,
75
- displaySettings,
76
- unit: numberUnit,
77
- currencyCode: numberCurrencyCode,
78
- precision: numberPrecision,
79
- useThousandSeparator: numberUseThousandSeparator,
80
- withNumberUnit: true,
81
- });
82
- };
83
- exports.getNumberExportValue = getNumberExportValue;
@@ -1,6 +0,0 @@
1
- import type { TypeObject } from "@fibery/schema";
2
- import type { FieldUnit } from "../units/types";
3
- export declare const getFieldLabel: ({ typeObject, unit }: {
4
- typeObject: TypeObject;
5
- unit: FieldUnit;
6
- }) => string;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFieldLabel = void 0;
4
- const utils_1 = require("@fibery/expression-utils/src/utils");
5
- const getFieldLabel = ({ typeObject, unit }) => {
6
- const { expression } = unit;
7
- const fieldObjects = (0, utils_1.getFieldObjectsByFieldExpression)({ typeObject, expression });
8
- return fieldObjects.map((fieldObject) => fieldObject.title).join(" -> ");
9
- };
10
- exports.getFieldLabel = getFieldLabel;
@@ -1,2 +0,0 @@
1
- import type { Unit } from "../units/types";
2
- export declare const getUnmatchedUnitLabel: (unit: Unit) => string;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getUnmatchedUnitLabel = void 0;
7
- const omit_1 = __importDefault(require("lodash/omit"));
8
- const getUnmatchedUnitLabel = (unit) => JSON.stringify((0, omit_1.default)(unit, ["checked"]));
9
- exports.getUnmatchedUnitLabel = getUnmatchedUnitLabel;
@@ -1,4 +0,0 @@
1
- import type { Schema } from "@fibery/schema";
2
- export declare const extractTypePart: (type: string) => string;
3
- export declare const extractTypeNamespacePart: (type: string) => string;
4
- export declare const getTypeById: (schema: Schema, id: string) => import("@fibery/schema").TypeObject | undefined;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTypeById = exports.extractTypeNamespacePart = exports.extractTypePart = void 0;
4
- const schema_1 = require("@fibery/schema");
5
- const extractTypePart = (type) => (0, schema_1.parseType)(type).name;
6
- exports.extractTypePart = extractTypePart;
7
- const extractTypeNamespacePart = (type) => (0, schema_1.parseType)(type).namespace;
8
- exports.extractTypeNamespacePart = extractTypeNamespacePart;
9
- const getTypeById = (schema, id) => {
10
- return Object.hasOwn(schema.typeObjectsById, id) ? schema.typeObjectsById[id] : undefined;
11
- };
12
- exports.getTypeById = getTypeById;
@@ -1,3 +0,0 @@
1
- import type { FieldExpression } from "@fibery/expression-utils/src/types";
2
- import type { FieldObject } from "@fibery/schema";
3
- export declare const wrapNormalizedInExpression: (innerNormalized: Record<string, unknown>, fieldObjects: FieldObject[], expression: FieldExpression) => Record<string, unknown>;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.wrapNormalizedInExpression = void 0;
4
- const wrapNormalizedInExpression = (innerNormalized, fieldObjects, expression) => [...expression].reverse().reduce((inner, field, reversedIndex) => {
5
- const originalIndex = expression.length - 1 - reversedIndex;
6
- const isTerminal = originalIndex === expression.length - 1;
7
- if (!isTerminal) {
8
- const { idField } = fieldObjects[originalIndex].typeObject;
9
- const innerWithId = idField ? { [idField]: idField, ...inner } : inner;
10
- return { [field]: innerWithId };
11
- }
12
- return { [field]: inner };
13
- }, innerNormalized);
14
- exports.wrapNormalizedInExpression = wrapNormalizedInExpression;
@@ -1,46 +0,0 @@
1
- import type { TypeObject } from "@fibery/schema";
2
- export declare const getTypeUnits: () => import("./types").PureUnit[], getUnitName: (unit: import("./types").Unit) => string | null, getUnitsForType: (typeObject: TypeObject, options?: {
3
- parentFieldObjects?: import("@fibery/schema").FieldObject[];
4
- showHiddenFields?: boolean;
5
- isSharingMode?: boolean;
6
- }) => {
7
- unit: import("./types").Unit;
8
- fieldObject: import("@fibery/schema").FieldObject;
9
- }[], getUnitsForField: (fieldObject: import("@fibery/schema").FieldObject, options?: {
10
- parentFieldObjects?: import("@fibery/schema").FieldObject[];
11
- showHiddenFields?: boolean;
12
- isSharingMode?: boolean;
13
- }) => import("./types").Unit[], getUnitsForTypePerField: (typeObject: TypeObject, options?: {
14
- parentFieldObjects?: import("@fibery/schema").FieldObject[];
15
- showHiddenFields?: boolean;
16
- isSharingMode?: boolean;
17
- }) => {
18
- fieldObject: import("@fibery/schema").FieldObject;
19
- units: import("./types").Unit[];
20
- }[], getUnitLabel: (typeObject: TypeObject, unit: import("./types").Unit) => string, getHardcodedUnitsForView: (typeObject: TypeObject) => ({
21
- 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";
22
- expression: import("./types").UnitExpression;
23
- kind: "field";
24
- settings?: Record<string, unknown> | undefined;
25
- hideWhenEmpty?: boolean | undefined;
26
- } | {
27
- type: "user-button" | "icon-button";
28
- kind: "user-button";
29
- hideWhenEmpty?: boolean | undefined;
30
- data: {
31
- id: string;
32
- typeId: string;
33
- };
34
- label: string;
35
- icon?: string | undefined;
36
- } | {
37
- type: "type-icon" | "type-badge" | "type-badge-abbr";
38
- expression?: import("./types").UnitExpression | undefined;
39
- kind: "db";
40
- hideWhenEmpty?: boolean | undefined;
41
- })[], getCardUnitsSelect: ({ schema, typeObject, units }: {
42
- schema: import("@fibery/schema").Schema;
43
- typeObject: TypeObject;
44
- units: import("./types").Unit[];
45
- }) => any, getUnitDataDefinition: (unit: import("./types").Unit) => import("./types").UnitDataDefinition<import("./types").FieldUnit> | import("./types").UnitDataDefinition<import("./types").DbUnit> | import("./types").UnitDataDefinition<import("./types").ButtonUnit>;
46
- export declare const getDefaultUnits: (typeObject: TypeObject) => import("./types").PureUnit[];
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var _a;
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.getDefaultUnits = exports.getUnitDataDefinition = exports.getCardUnitsSelect = exports.getHardcodedUnitsForView = exports.getUnitLabel = exports.getUnitsForTypePerField = exports.getUnitsForField = exports.getUnitsForType = exports.getUnitName = exports.getTypeUnits = void 0;
38
- const avatar_1 = require("../field-utils/avatar");
39
- const allUnitDefinitions = __importStar(require("../unit-definitions"));
40
- const make_factory_1 = require("./make-factory");
41
- _a = (0, make_factory_1.makeUnitDefinitionsFactory)(allUnitDefinitions), exports.getTypeUnits = _a.getTypeUnits, exports.getUnitName = _a.getUnitName, exports.getUnitsForType = _a.getUnitsForType, exports.getUnitsForField = _a.getUnitsForField, exports.getUnitsForTypePerField = _a.getUnitsForTypePerField, exports.getUnitLabel = _a.getUnitLabel, exports.getHardcodedUnitsForView = _a.getHardcodedUnitsForView, exports.getCardUnitsSelect = _a.getCardUnitsSelect, exports.getUnitDataDefinition = _a.getUnitDataDefinition;
42
- const getDefaultUnits = (typeObject) => {
43
- const { Title, Avatar, TypeBadgeAbbr } = allUnitDefinitions;
44
- return [
45
- Title && Title.makeUnit(),
46
- typeObject && (0, avatar_1.isAvatarExtensionEnabledType)(typeObject)
47
- ? Avatar && Avatar.makeUnit()
48
- : TypeBadgeAbbr && TypeBadgeAbbr.makeUnit(),
49
- ].filter(Boolean);
50
- };
51
- exports.getDefaultUnits = getDefaultUnits;
@@ -1,18 +0,0 @@
1
- export { Bool } from "../../unit-definitions/bool";
2
- export { CollectionCount } from "../../unit-definitions/collection-count";
3
- export { Date } from "../../unit-definitions/date";
4
- export { DateRange } from "../../unit-definitions/date-range";
5
- export { Email } from "../../unit-definitions/email";
6
- export { Id } from "../../unit-definitions/id";
7
- export { Number } from "../../unit-definitions/number";
8
- export { Phone } from "../../unit-definitions/phone";
9
- export { Reference } from "../../unit-definitions/reference";
10
- export { ReferenceCollection } from "../../unit-definitions/reference-collection";
11
- export { Text } from "../../unit-definitions/text";
12
- export { Title } from "../../unit-definitions/title";
13
- export { Url } from "../../unit-definitions/url";
14
- export { Location } from "../../unit-definitions/location";
15
- export { Emoji } from "../../unit-definitions/emoji";
16
- export { Avatar } from "../../unit-definitions/avatar";
17
- export { TypeBadge } from "./type-badge";
18
- export { TypeBadgeAbbr } from "./type-badge-abbr";
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeBadgeAbbr = exports.TypeBadge = exports.Avatar = exports.Emoji = exports.Location = exports.Url = exports.Title = exports.Text = exports.ReferenceCollection = exports.Reference = exports.Phone = exports.Number = exports.Id = exports.Email = exports.DateRange = exports.Date = exports.CollectionCount = exports.Bool = void 0;
4
- var bool_1 = require("../../unit-definitions/bool");
5
- Object.defineProperty(exports, "Bool", { enumerable: true, get: function () { return bool_1.Bool; } });
6
- var collection_count_1 = require("../../unit-definitions/collection-count");
7
- Object.defineProperty(exports, "CollectionCount", { enumerable: true, get: function () { return collection_count_1.CollectionCount; } });
8
- var date_1 = require("../../unit-definitions/date");
9
- Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return date_1.Date; } });
10
- var date_range_1 = require("../../unit-definitions/date-range");
11
- Object.defineProperty(exports, "DateRange", { enumerable: true, get: function () { return date_range_1.DateRange; } });
12
- var email_1 = require("../../unit-definitions/email");
13
- Object.defineProperty(exports, "Email", { enumerable: true, get: function () { return email_1.Email; } });
14
- var id_1 = require("../../unit-definitions/id");
15
- Object.defineProperty(exports, "Id", { enumerable: true, get: function () { return id_1.Id; } });
16
- var number_1 = require("../../unit-definitions/number");
17
- Object.defineProperty(exports, "Number", { enumerable: true, get: function () { return number_1.Number; } });
18
- var phone_1 = require("../../unit-definitions/phone");
19
- Object.defineProperty(exports, "Phone", { enumerable: true, get: function () { return phone_1.Phone; } });
20
- var reference_1 = require("../../unit-definitions/reference");
21
- Object.defineProperty(exports, "Reference", { enumerable: true, get: function () { return reference_1.Reference; } });
22
- var reference_collection_1 = require("../../unit-definitions/reference-collection");
23
- Object.defineProperty(exports, "ReferenceCollection", { enumerable: true, get: function () { return reference_collection_1.ReferenceCollection; } });
24
- var text_1 = require("../../unit-definitions/text");
25
- Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return text_1.Text; } });
26
- var title_1 = require("../../unit-definitions/title");
27
- Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return title_1.Title; } });
28
- var url_1 = require("../../unit-definitions/url");
29
- Object.defineProperty(exports, "Url", { enumerable: true, get: function () { return url_1.Url; } });
30
- var location_1 = require("../../unit-definitions/location");
31
- Object.defineProperty(exports, "Location", { enumerable: true, get: function () { return location_1.Location; } });
32
- var emoji_1 = require("../../unit-definitions/emoji");
33
- Object.defineProperty(exports, "Emoji", { enumerable: true, get: function () { return emoji_1.Emoji; } });
34
- var avatar_1 = require("../../unit-definitions/avatar");
35
- Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return avatar_1.Avatar; } });
36
- // These two are canvas-specific
37
- var type_badge_1 = require("./type-badge");
38
- Object.defineProperty(exports, "TypeBadge", { enumerable: true, get: function () { return type_badge_1.TypeBadge; } });
39
- var type_badge_abbr_1 = require("./type-badge-abbr");
40
- Object.defineProperty(exports, "TypeBadgeAbbr", { enumerable: true, get: function () { return type_badge_abbr_1.TypeBadgeAbbr; } });
@@ -1,45 +0,0 @@
1
- export declare const getTypeUnits: () => import("../types").PureUnit[], getUnitName: (unit: import("../types").Unit) => string | null, getUnitsForField: (fieldObject: import("@fibery/schema").FieldObject, options?: {
2
- parentFieldObjects?: import("@fibery/schema").FieldObject[];
3
- showHiddenFields?: boolean;
4
- isSharingMode?: boolean;
5
- }) => import("../types").Unit[], getUnitsForType: (typeObject: import("@fibery/schema").TypeObject, options?: {
6
- parentFieldObjects?: import("@fibery/schema").FieldObject[];
7
- showHiddenFields?: boolean;
8
- isSharingMode?: boolean;
9
- }) => {
10
- unit: import("../types").Unit;
11
- fieldObject: import("@fibery/schema").FieldObject;
12
- }[], getUnitsForTypePerField: (typeObject: import("@fibery/schema").TypeObject, options?: {
13
- parentFieldObjects?: import("@fibery/schema").FieldObject[];
14
- showHiddenFields?: boolean;
15
- isSharingMode?: boolean;
16
- }) => {
17
- fieldObject: import("@fibery/schema").FieldObject;
18
- units: import("../types").Unit[];
19
- }[], getUnitLabel: (typeObject: import("@fibery/schema").TypeObject, unit: import("../types").Unit) => string, getCardUnitsSelect: ({ schema, typeObject, units }: {
20
- schema: import("@fibery/schema").Schema;
21
- typeObject: import("@fibery/schema").TypeObject;
22
- units: import("../types").Unit[];
23
- }) => any, getHardcodedUnitsForView: (typeObject: import("@fibery/schema").TypeObject) => ({
24
- 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";
25
- expression: import("../types").UnitExpression;
26
- kind: "field";
27
- settings?: Record<string, unknown> | undefined;
28
- hideWhenEmpty?: boolean | undefined;
29
- } | {
30
- type: "user-button" | "icon-button";
31
- kind: "user-button";
32
- hideWhenEmpty?: boolean | undefined;
33
- data: {
34
- id: string;
35
- typeId: string;
36
- };
37
- label: string;
38
- icon?: string | undefined;
39
- } | {
40
- type: "type-icon" | "type-badge" | "type-badge-abbr";
41
- expression?: import("../types").UnitExpression | undefined;
42
- kind: "db";
43
- hideWhenEmpty?: boolean | undefined;
44
- })[];
45
- export declare const getDefaultUnits: () => import("../types").PureUnit[];
@@ -1,48 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var _a;
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.getDefaultUnits = exports.getHardcodedUnitsForView = exports.getCardUnitsSelect = exports.getUnitLabel = exports.getUnitsForTypePerField = exports.getUnitsForType = exports.getUnitsForField = exports.getUnitName = exports.getTypeUnits = void 0;
38
- const rich_text_snippet_1 = require("../../unit-definitions/rich-text-snippet");
39
- const make_factory_1 = require("../make-factory");
40
- const unitDefinitions = __importStar(require("./all-units-data-definitions"));
41
- const allUnitDefinitions = { ...unitDefinitions, RichTextSnippet: rich_text_snippet_1.RichTextSnippet };
42
- // noinspection JSUnusedGlobalSymbols
43
- _a = (0, make_factory_1.makeUnitDefinitionsFactory)(allUnitDefinitions), exports.getTypeUnits = _a.getTypeUnits, exports.getUnitName = _a.getUnitName, exports.getUnitsForField = _a.getUnitsForField, exports.getUnitsForType = _a.getUnitsForType, exports.getUnitsForTypePerField = _a.getUnitsForTypePerField, exports.getUnitLabel = _a.getUnitLabel, exports.getCardUnitsSelect = _a.getCardUnitsSelect, exports.getHardcodedUnitsForView = _a.getHardcodedUnitsForView;
44
- const getDefaultUnits = () => {
45
- const { Title, TypeBadge } = allUnitDefinitions;
46
- return [Title && Title.makeUnit(), TypeBadge && TypeBadge.makeUnit()].filter(Boolean);
47
- };
48
- exports.getDefaultUnits = getDefaultUnits;