@airtable/blocks 1.18.1 → 1.19.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 (747) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/dist/cjs/color_utils.js +21 -23
  3. package/dist/cjs/colors.js +4 -60
  4. package/dist/cjs/error_utils.js +15 -25
  5. package/dist/cjs/event_tracker.js +5 -11
  6. package/dist/cjs/global_config.js +107 -188
  7. package/dist/cjs/index.js +16 -40
  8. package/dist/cjs/injected/airtable_interface.js +1 -6
  9. package/dist/cjs/models/abstract_model.js +50 -81
  10. package/dist/cjs/models/abstract_model_with_async_data.js +102 -177
  11. package/dist/cjs/models/base.js +211 -374
  12. package/dist/cjs/models/create_aggregators.js +53 -47
  13. package/dist/cjs/models/cursor.js +125 -201
  14. package/dist/cjs/models/field.js +256 -303
  15. package/dist/cjs/models/grouped_record_query_result.js +210 -286
  16. package/dist/cjs/models/linked_records_query_result.js +276 -454
  17. package/dist/cjs/models/models.js +36 -50
  18. package/dist/cjs/models/mutation_constants.js +5 -9
  19. package/dist/cjs/models/mutations.js +125 -338
  20. package/dist/cjs/models/object_pool.js +37 -94
  21. package/dist/cjs/models/record.js +132 -226
  22. package/dist/cjs/models/record_coloring.js +14 -19
  23. package/dist/cjs/models/record_query_result.js +323 -282
  24. package/dist/cjs/models/record_store.js +355 -688
  25. package/dist/cjs/models/session.js +99 -158
  26. package/dist/cjs/models/table.js +361 -549
  27. package/dist/cjs/models/table_or_view_query_result.js +410 -765
  28. package/dist/cjs/models/view.js +161 -204
  29. package/dist/cjs/models/view_data_store.js +177 -282
  30. package/dist/cjs/models/view_metadata_query_result.js +96 -127
  31. package/dist/cjs/perform_record_action.js +69 -103
  32. package/dist/cjs/private_utils.js +133 -223
  33. package/dist/cjs/sdk.js +97 -142
  34. package/dist/cjs/settings_button.js +30 -57
  35. package/dist/cjs/stats/block_stats.js +3 -15
  36. package/dist/cjs/testing/abstract_mock_airtable_interface.js +53 -97
  37. package/dist/cjs/types/airtable_interface.js +36 -8
  38. package/dist/cjs/types/field.js +66 -12
  39. package/dist/cjs/types/mutations.js +99 -6
  40. package/dist/cjs/types/permission_levels.js +2 -4
  41. package/dist/cjs/types/undo_redo.js +2 -3
  42. package/dist/cjs/types/view.js +16 -11
  43. package/dist/cjs/ui/base_provider.js +14 -9
  44. package/dist/cjs/ui/baymax_utils.js +107 -1102
  45. package/dist/cjs/ui/block_wrapper.js +30 -68
  46. package/dist/cjs/ui/box.js +52 -56
  47. package/dist/cjs/ui/button.js +60 -77
  48. package/dist/cjs/ui/cell_renderer.js +78 -139
  49. package/dist/cjs/ui/choice_token.js +45 -47
  50. package/dist/cjs/ui/collaborator_token.js +33 -54
  51. package/dist/cjs/ui/color_palette.js +58 -106
  52. package/dist/cjs/ui/color_palette_synced.js +41 -52
  53. package/dist/cjs/ui/confirmation_dialog.js +53 -69
  54. package/dist/cjs/ui/control_sizes.js +21 -46
  55. package/dist/cjs/ui/create_detect_element_resize.js +16 -50
  56. package/dist/cjs/ui/css_helpers.js +3 -10
  57. package/dist/cjs/ui/dialog.js +44 -71
  58. package/dist/cjs/ui/dialog_close_button.js +52 -72
  59. package/dist/cjs/ui/expand_record.js +4 -11
  60. package/dist/cjs/ui/expand_record_list.js +6 -11
  61. package/dist/cjs/ui/expand_record_picker_async.js +18 -35
  62. package/dist/cjs/ui/field_icon.js +25 -28
  63. package/dist/cjs/ui/field_picker.js +47 -81
  64. package/dist/cjs/ui/field_picker_synced.js +33 -44
  65. package/dist/cjs/ui/form_field.js +45 -64
  66. package/dist/cjs/ui/geometry/geometry.js +6 -10
  67. package/dist/cjs/ui/geometry/point.js +5 -13
  68. package/dist/cjs/ui/geometry/rect.js +7 -29
  69. package/dist/cjs/ui/geometry/size.js +5 -13
  70. package/dist/cjs/ui/global_alert.js +35 -61
  71. package/dist/cjs/ui/global_config_synced_component_helpers.js +4 -13
  72. package/dist/cjs/ui/heading.js +63 -92
  73. package/dist/cjs/ui/icon.js +44 -66
  74. package/dist/cjs/ui/icon_config.js +13 -24
  75. package/dist/cjs/ui/initialize_block.js +23 -36
  76. package/dist/cjs/ui/input.js +74 -87
  77. package/dist/cjs/ui/input_synced.js +34 -43
  78. package/dist/cjs/ui/key_codes.js +4 -9
  79. package/dist/cjs/ui/label.js +45 -50
  80. package/dist/cjs/ui/link.js +74 -89
  81. package/dist/cjs/ui/loader.js +26 -42
  82. package/dist/cjs/ui/modal.js +63 -89
  83. package/dist/cjs/ui/model_picker_select.js +29 -47
  84. package/dist/cjs/ui/popover.js +98 -180
  85. package/dist/cjs/ui/progress_bar.js +45 -51
  86. package/dist/cjs/ui/record_card.js +143 -278
  87. package/dist/cjs/ui/record_card_list.js +117 -165
  88. package/dist/cjs/ui/remote_utils.js +5 -13
  89. package/dist/cjs/ui/sdk_context.js +7 -9
  90. package/dist/cjs/ui/select.js +84 -118
  91. package/dist/cjs/ui/select_and_select_buttons_helpers.js +29 -45
  92. package/dist/cjs/ui/select_buttons.js +54 -90
  93. package/dist/cjs/ui/select_buttons_synced.js +32 -41
  94. package/dist/cjs/ui/select_synced.js +32 -42
  95. package/dist/cjs/ui/switch.js +66 -84
  96. package/dist/cjs/ui/switch_synced.js +32 -38
  97. package/dist/cjs/ui/synced.js +16 -43
  98. package/dist/cjs/ui/system/all_styles_set.js +89 -22
  99. package/dist/cjs/ui/system/appearance/appearance_set.js +15 -26
  100. package/dist/cjs/ui/system/appearance/background_color.js +6 -12
  101. package/dist/cjs/ui/system/appearance/border.js +6 -12
  102. package/dist/cjs/ui/system/appearance/border_radius.js +6 -12
  103. package/dist/cjs/ui/system/appearance/box_shadow.js +6 -12
  104. package/dist/cjs/ui/system/appearance/opacity.js +5 -11
  105. package/dist/cjs/ui/system/dimensions/dimensions_set.js +15 -27
  106. package/dist/cjs/ui/system/dimensions/height.js +5 -11
  107. package/dist/cjs/ui/system/dimensions/max_height.js +5 -11
  108. package/dist/cjs/ui/system/dimensions/max_width.js +5 -11
  109. package/dist/cjs/ui/system/dimensions/min_height.js +5 -11
  110. package/dist/cjs/ui/system/dimensions/min_width.js +5 -11
  111. package/dist/cjs/ui/system/dimensions/width.js +5 -11
  112. package/dist/cjs/ui/system/display.js +8 -9
  113. package/dist/cjs/ui/system/flex_container/align_content.js +6 -12
  114. package/dist/cjs/ui/system/flex_container/align_items.js +6 -12
  115. package/dist/cjs/ui/system/flex_container/flex_container_set.js +15 -27
  116. package/dist/cjs/ui/system/flex_container/flex_direction.js +5 -11
  117. package/dist/cjs/ui/system/flex_container/flex_wrap.js +5 -11
  118. package/dist/cjs/ui/system/flex_container/justify_content.js +5 -11
  119. package/dist/cjs/ui/system/flex_container/justify_items.js +5 -11
  120. package/dist/cjs/ui/system/flex_item/align_self.js +6 -12
  121. package/dist/cjs/ui/system/flex_item/flex.js +5 -11
  122. package/dist/cjs/ui/system/flex_item/flex_basis.js +5 -11
  123. package/dist/cjs/ui/system/flex_item/flex_grow.js +5 -11
  124. package/dist/cjs/ui/system/flex_item/flex_item_set.js +15 -28
  125. package/dist/cjs/ui/system/flex_item/flex_shrink.js +5 -11
  126. package/dist/cjs/ui/system/flex_item/justify_self.js +5 -11
  127. package/dist/cjs/ui/system/flex_item/order.js +5 -11
  128. package/dist/cjs/ui/system/index.js +310 -362
  129. package/dist/cjs/ui/system/overflow.js +8 -9
  130. package/dist/cjs/ui/system/position/bottom.js +6 -13
  131. package/dist/cjs/ui/system/position/left.js +5 -12
  132. package/dist/cjs/ui/system/position/position.js +5 -11
  133. package/dist/cjs/ui/system/position/position_set.js +15 -27
  134. package/dist/cjs/ui/system/position/right.js +5 -12
  135. package/dist/cjs/ui/system/position/top.js +5 -12
  136. package/dist/cjs/ui/system/position/z_index.js +5 -11
  137. package/dist/cjs/ui/system/spacing/margin.js +5 -12
  138. package/dist/cjs/ui/system/spacing/padding.js +5 -12
  139. package/dist/cjs/ui/system/spacing/spacing_set.js +15 -23
  140. package/dist/cjs/ui/system/typography/font_family.js +5 -11
  141. package/dist/cjs/ui/system/typography/font_size.js +5 -11
  142. package/dist/cjs/ui/system/typography/font_style.js +5 -11
  143. package/dist/cjs/ui/system/typography/font_weight.js +5 -11
  144. package/dist/cjs/ui/system/typography/letter_spacing.js +5 -11
  145. package/dist/cjs/ui/system/typography/line_height.js +5 -11
  146. package/dist/cjs/ui/system/typography/text_align.js +5 -11
  147. package/dist/cjs/ui/system/typography/text_color.js +5 -11
  148. package/dist/cjs/ui/system/typography/text_decoration.js +5 -11
  149. package/dist/cjs/ui/system/typography/text_transform.js +5 -11
  150. package/dist/cjs/ui/system/typography/typography_set.js +15 -31
  151. package/dist/cjs/ui/system/utils/create_responsive_prop_type.js +2 -4
  152. package/dist/cjs/ui/system/utils/create_style_prop_types.js +5 -13
  153. package/dist/cjs/ui/system/utils/ensure_numbers_are_within_scale.js +4 -14
  154. package/dist/cjs/ui/system/utils/get_style_props_for_responsive_prop.js +30 -70
  155. package/dist/cjs/ui/table_picker.js +26 -43
  156. package/dist/cjs/ui/table_picker_synced.js +33 -42
  157. package/dist/cjs/ui/text.js +59 -71
  158. package/dist/cjs/ui/text_button.js +80 -97
  159. package/dist/cjs/ui/theme/default_theme/button_variants.js +1 -5
  160. package/dist/cjs/ui/theme/default_theme/control_sizes.js +29 -42
  161. package/dist/cjs/ui/theme/default_theme/heading_styles.js +4 -5
  162. package/dist/cjs/ui/theme/default_theme/index.js +15 -32
  163. package/dist/cjs/ui/theme/default_theme/input_variants.js +1 -5
  164. package/dist/cjs/ui/theme/default_theme/link_variants.js +1 -5
  165. package/dist/cjs/ui/theme/default_theme/select_buttons_variants.js +1 -5
  166. package/dist/cjs/ui/theme/default_theme/select_variants.js +10 -21
  167. package/dist/cjs/ui/theme/default_theme/switch_variants.js +8 -20
  168. package/dist/cjs/ui/theme/default_theme/text_button_variants.js +1 -5
  169. package/dist/cjs/ui/theme/default_theme/text_styles.js +1 -2
  170. package/dist/cjs/ui/theme/default_theme/tokens.js +33 -35
  171. package/dist/cjs/ui/theme/theme_context.js +3 -6
  172. package/dist/cjs/ui/theme/use_theme.js +1 -7
  173. package/dist/cjs/ui/tooltip.js +38 -79
  174. package/dist/cjs/ui/types/aria_props.js +3 -7
  175. package/dist/cjs/ui/types/data_attributes_prop.js +8 -6
  176. package/dist/cjs/ui/types/tooltip_anchor_props.js +4 -5
  177. package/dist/cjs/ui/ui.js +97 -130
  178. package/dist/cjs/ui/unstable_standalone_ui.js +18 -42
  179. package/dist/cjs/ui/use_array_identity.js +0 -4
  180. package/dist/cjs/ui/use_base.js +4 -13
  181. package/dist/cjs/ui/use_color_scheme.js +60 -0
  182. package/dist/cjs/ui/use_cursor.js +3 -12
  183. package/dist/cjs/ui/use_form_field.js +4 -6
  184. package/dist/cjs/ui/use_global_config.js +3 -10
  185. package/dist/cjs/ui/use_loadable.js +59 -132
  186. package/dist/cjs/ui/use_record_action_data.js +6 -12
  187. package/dist/cjs/ui/use_records.js +27 -28
  188. package/dist/cjs/ui/use_session.js +6 -15
  189. package/dist/cjs/ui/use_settings_button.js +4 -11
  190. package/dist/cjs/ui/use_styled_system.js +12 -21
  191. package/dist/cjs/ui/use_synced.js +0 -7
  192. package/dist/cjs/ui/use_text_color_for_background_color.js +1 -5
  193. package/dist/cjs/ui/use_view_metadata.js +5 -8
  194. package/dist/cjs/ui/use_viewport.js +1 -7
  195. package/dist/cjs/ui/use_watchable.js +36 -74
  196. package/dist/cjs/ui/view_picker.js +44 -78
  197. package/dist/cjs/ui/view_picker_synced.js +33 -44
  198. package/dist/cjs/ui/viewport_constraint.js +37 -64
  199. package/dist/cjs/ui/with_hooks.js +17 -22
  200. package/dist/cjs/ui/with_styled_system.js +33 -60
  201. package/dist/cjs/undo_redo.js +12 -32
  202. package/dist/cjs/unstable_private_utils.js +6 -8
  203. package/dist/cjs/unstable_testing_utils.js +44 -57
  204. package/dist/cjs/viewport.js +127 -189
  205. package/dist/cjs/warning.js +5 -6
  206. package/dist/cjs/watchable.js +66 -148
  207. package/dist/types/src/colors.d.ts +1 -1
  208. package/dist/types/src/colors.d.ts.map +1 -1
  209. package/dist/types/src/global_config.d.ts +1 -1
  210. package/dist/types/src/global_config.d.ts.map +1 -1
  211. package/dist/types/src/models/base.d.ts +1 -1
  212. package/dist/types/src/models/base.d.ts.map +1 -1
  213. package/dist/types/src/models/cursor.d.ts +1 -1
  214. package/dist/types/src/models/cursor.d.ts.map +1 -1
  215. package/dist/types/src/models/field.d.ts +1 -1
  216. package/dist/types/src/models/field.d.ts.map +1 -1
  217. package/dist/types/src/models/linked_records_query_result.d.ts.map +1 -1
  218. package/dist/types/src/models/models.d.ts.map +1 -1
  219. package/dist/types/src/models/record.d.ts +1 -1
  220. package/dist/types/src/models/record.d.ts.map +1 -1
  221. package/dist/types/src/models/record_coloring.d.ts +2 -2
  222. package/dist/types/src/models/record_coloring.d.ts.map +1 -1
  223. package/dist/types/src/models/record_query_result.d.ts +3 -3
  224. package/dist/types/src/models/record_query_result.d.ts.map +1 -1
  225. package/dist/types/src/models/session.d.ts +1 -1
  226. package/dist/types/src/models/session.d.ts.map +1 -1
  227. package/dist/types/src/models/table.d.ts +1 -1
  228. package/dist/types/src/models/table.d.ts.map +1 -1
  229. package/dist/types/src/models/view.d.ts +1 -1
  230. package/dist/types/src/models/view.d.ts.map +1 -1
  231. package/dist/types/src/models/view_metadata_query_result.d.ts +2 -2
  232. package/dist/types/src/models/view_metadata_query_result.d.ts.map +1 -1
  233. package/dist/types/src/perform_record_action.d.ts +1 -1
  234. package/dist/types/src/perform_record_action.d.ts.map +1 -1
  235. package/dist/types/src/private_utils.d.ts +8 -8
  236. package/dist/types/src/private_utils.d.ts.map +1 -1
  237. package/dist/types/src/sdk.d.ts +1 -1
  238. package/dist/types/src/sdk.d.ts.map +1 -1
  239. package/dist/types/src/settings_button.d.ts +1 -1
  240. package/dist/types/src/settings_button.d.ts.map +1 -1
  241. package/dist/types/src/types/aggregators.d.ts +1 -1
  242. package/dist/types/src/types/aggregators.d.ts.map +1 -1
  243. package/dist/types/src/types/airtable_interface.d.ts +6 -6
  244. package/dist/types/src/types/airtable_interface.d.ts.map +1 -1
  245. package/dist/types/src/types/attachment.d.ts +1 -1
  246. package/dist/types/src/types/attachment.d.ts.map +1 -1
  247. package/dist/types/src/types/base.d.ts +1 -1
  248. package/dist/types/src/types/base.d.ts.map +1 -1
  249. package/dist/types/src/types/block.d.ts +1 -1
  250. package/dist/types/src/types/block.d.ts.map +1 -1
  251. package/dist/types/src/types/collaborator.d.ts +1 -1
  252. package/dist/types/src/types/collaborator.d.ts.map +1 -1
  253. package/dist/types/src/types/field.d.ts +5 -5
  254. package/dist/types/src/types/field.d.ts.map +1 -1
  255. package/dist/types/src/types/global_config.d.ts +6 -6
  256. package/dist/types/src/types/global_config.d.ts.map +1 -1
  257. package/dist/types/src/types/mutations.d.ts +4 -4
  258. package/dist/types/src/types/mutations.d.ts.map +1 -1
  259. package/dist/types/src/types/permission_levels.d.ts +1 -1
  260. package/dist/types/src/types/permission_levels.d.ts.map +1 -1
  261. package/dist/types/src/types/record.d.ts +2 -2
  262. package/dist/types/src/types/record.d.ts.map +1 -1
  263. package/dist/types/src/types/record_action_data.d.ts +1 -1
  264. package/dist/types/src/types/record_action_data.d.ts.map +1 -1
  265. package/dist/types/src/types/table.d.ts +3 -3
  266. package/dist/types/src/types/table.d.ts.map +1 -1
  267. package/dist/types/src/types/undo_redo.d.ts +1 -1
  268. package/dist/types/src/types/undo_redo.d.ts.map +1 -1
  269. package/dist/types/src/types/view.d.ts +4 -4
  270. package/dist/types/src/types/view.d.ts.map +1 -1
  271. package/dist/types/src/ui/base_provider.d.ts +1 -1
  272. package/dist/types/src/ui/base_provider.d.ts.map +1 -1
  273. package/dist/types/src/ui/block_wrapper.d.ts +2 -2
  274. package/dist/types/src/ui/button.d.ts +2 -2
  275. package/dist/types/src/ui/button.d.ts.map +1 -1
  276. package/dist/types/src/ui/cell_renderer.d.ts +2 -2
  277. package/dist/types/src/ui/choice_token.d.ts +4 -4
  278. package/dist/types/src/ui/choice_token.d.ts.map +1 -1
  279. package/dist/types/src/ui/collaborator_token.d.ts +6 -6
  280. package/dist/types/src/ui/collaborator_token.d.ts.map +1 -1
  281. package/dist/types/src/ui/color_palette.d.ts +3 -3
  282. package/dist/types/src/ui/color_palette.d.ts.map +1 -1
  283. package/dist/types/src/ui/color_palette_synced.d.ts +2 -2
  284. package/dist/types/src/ui/confirmation_dialog.d.ts +1 -1
  285. package/dist/types/src/ui/control_sizes.d.ts +2 -2
  286. package/dist/types/src/ui/control_sizes.d.ts.map +1 -1
  287. package/dist/types/src/ui/dialog.d.ts +2 -2
  288. package/dist/types/src/ui/dialog.d.ts.map +1 -1
  289. package/dist/types/src/ui/dialog_close_button.d.ts +1 -1
  290. package/dist/types/src/ui/field_icon.d.ts +3 -3
  291. package/dist/types/src/ui/field_icon.d.ts.map +1 -1
  292. package/dist/types/src/ui/field_picker.d.ts +2 -2
  293. package/dist/types/src/ui/field_picker.d.ts.map +1 -1
  294. package/dist/types/src/ui/form_field.d.ts +1 -1
  295. package/dist/types/src/ui/form_field.d.ts.map +1 -1
  296. package/dist/types/src/ui/global_alert.d.ts +1 -1
  297. package/dist/types/src/ui/global_alert.d.ts.map +1 -1
  298. package/dist/types/src/ui/global_config_synced_component_helpers.d.ts +1 -1
  299. package/dist/types/src/ui/global_config_synced_component_helpers.d.ts.map +1 -1
  300. package/dist/types/src/ui/heading.d.ts +4 -4
  301. package/dist/types/src/ui/heading.d.ts.map +1 -1
  302. package/dist/types/src/ui/icon.d.ts +2 -2
  303. package/dist/types/src/ui/icon.d.ts.map +1 -1
  304. package/dist/types/src/ui/icon_config.d.ts +39 -39
  305. package/dist/types/src/ui/icon_config.d.ts.map +1 -1
  306. package/dist/types/src/ui/initialize_block.d.ts +3 -3
  307. package/dist/types/src/ui/initialize_block.d.ts.map +1 -1
  308. package/dist/types/src/ui/input.d.ts +16 -16
  309. package/dist/types/src/ui/input.d.ts.map +1 -1
  310. package/dist/types/src/ui/label.d.ts +1 -1
  311. package/dist/types/src/ui/label.d.ts.map +1 -1
  312. package/dist/types/src/ui/link.d.ts +2 -2
  313. package/dist/types/src/ui/link.d.ts.map +1 -1
  314. package/dist/types/src/ui/loader.d.ts +2 -2
  315. package/dist/types/src/ui/loader.d.ts.map +1 -1
  316. package/dist/types/src/ui/model_picker_select.d.ts +1 -1
  317. package/dist/types/src/ui/model_picker_select.d.ts.map +1 -1
  318. package/dist/types/src/ui/popover.d.ts +5 -5
  319. package/dist/types/src/ui/popover.d.ts.map +1 -1
  320. package/dist/types/src/ui/progress_bar.d.ts +2 -2
  321. package/dist/types/src/ui/progress_bar.d.ts.map +1 -1
  322. package/dist/types/src/ui/record_card.d.ts +3 -3
  323. package/dist/types/src/ui/record_card.d.ts.map +1 -1
  324. package/dist/types/src/ui/record_card_list.d.ts +3 -3
  325. package/dist/types/src/ui/record_card_list.d.ts.map +1 -1
  326. package/dist/types/src/ui/select.d.ts +4 -4
  327. package/dist/types/src/ui/select_and_select_buttons_helpers.d.ts +4 -4
  328. package/dist/types/src/ui/select_and_select_buttons_helpers.d.ts.map +1 -1
  329. package/dist/types/src/ui/select_buttons.d.ts +5 -5
  330. package/dist/types/src/ui/select_buttons.d.ts.map +1 -1
  331. package/dist/types/src/ui/switch.d.ts +2 -2
  332. package/dist/types/src/ui/switch.d.ts.map +1 -1
  333. package/dist/types/src/ui/synced.d.ts +3 -3
  334. package/dist/types/src/ui/system/all_styles_set.d.ts +0 -1
  335. package/dist/types/src/ui/system/all_styles_set.d.ts.map +1 -1
  336. package/dist/types/src/ui/system/appearance/appearance_set.d.ts +0 -1
  337. package/dist/types/src/ui/system/appearance/appearance_set.d.ts.map +1 -1
  338. package/dist/types/src/ui/system/appearance/background_color.d.ts +0 -1
  339. package/dist/types/src/ui/system/appearance/background_color.d.ts.map +1 -1
  340. package/dist/types/src/ui/system/appearance/border.d.ts +0 -1
  341. package/dist/types/src/ui/system/appearance/border.d.ts.map +1 -1
  342. package/dist/types/src/ui/system/appearance/border_radius.d.ts +0 -1
  343. package/dist/types/src/ui/system/appearance/border_radius.d.ts.map +1 -1
  344. package/dist/types/src/ui/system/appearance/box_shadow.d.ts +0 -1
  345. package/dist/types/src/ui/system/appearance/box_shadow.d.ts.map +1 -1
  346. package/dist/types/src/ui/system/appearance/opacity.d.ts +0 -1
  347. package/dist/types/src/ui/system/appearance/opacity.d.ts.map +1 -1
  348. package/dist/types/src/ui/system/dimensions/dimensions_set.d.ts +0 -1
  349. package/dist/types/src/ui/system/dimensions/dimensions_set.d.ts.map +1 -1
  350. package/dist/types/src/ui/system/dimensions/height.d.ts +0 -1
  351. package/dist/types/src/ui/system/dimensions/height.d.ts.map +1 -1
  352. package/dist/types/src/ui/system/dimensions/max_height.d.ts +0 -1
  353. package/dist/types/src/ui/system/dimensions/max_height.d.ts.map +1 -1
  354. package/dist/types/src/ui/system/dimensions/max_width.d.ts +0 -1
  355. package/dist/types/src/ui/system/dimensions/max_width.d.ts.map +1 -1
  356. package/dist/types/src/ui/system/dimensions/min_height.d.ts +0 -1
  357. package/dist/types/src/ui/system/dimensions/min_height.d.ts.map +1 -1
  358. package/dist/types/src/ui/system/dimensions/min_width.d.ts +0 -1
  359. package/dist/types/src/ui/system/dimensions/min_width.d.ts.map +1 -1
  360. package/dist/types/src/ui/system/dimensions/width.d.ts +0 -1
  361. package/dist/types/src/ui/system/dimensions/width.d.ts.map +1 -1
  362. package/dist/types/src/ui/system/display.d.ts +0 -1
  363. package/dist/types/src/ui/system/display.d.ts.map +1 -1
  364. package/dist/types/src/ui/system/flex_container/align_content.d.ts +0 -1
  365. package/dist/types/src/ui/system/flex_container/align_content.d.ts.map +1 -1
  366. package/dist/types/src/ui/system/flex_container/align_items.d.ts +0 -1
  367. package/dist/types/src/ui/system/flex_container/align_items.d.ts.map +1 -1
  368. package/dist/types/src/ui/system/flex_container/flex_container_set.d.ts +0 -1
  369. package/dist/types/src/ui/system/flex_container/flex_container_set.d.ts.map +1 -1
  370. package/dist/types/src/ui/system/flex_container/flex_direction.d.ts +0 -1
  371. package/dist/types/src/ui/system/flex_container/flex_direction.d.ts.map +1 -1
  372. package/dist/types/src/ui/system/flex_container/flex_wrap.d.ts +0 -1
  373. package/dist/types/src/ui/system/flex_container/flex_wrap.d.ts.map +1 -1
  374. package/dist/types/src/ui/system/flex_container/justify_content.d.ts +0 -1
  375. package/dist/types/src/ui/system/flex_container/justify_content.d.ts.map +1 -1
  376. package/dist/types/src/ui/system/flex_container/justify_items.d.ts +0 -1
  377. package/dist/types/src/ui/system/flex_container/justify_items.d.ts.map +1 -1
  378. package/dist/types/src/ui/system/flex_item/align_self.d.ts +0 -1
  379. package/dist/types/src/ui/system/flex_item/align_self.d.ts.map +1 -1
  380. package/dist/types/src/ui/system/flex_item/flex.d.ts +0 -1
  381. package/dist/types/src/ui/system/flex_item/flex.d.ts.map +1 -1
  382. package/dist/types/src/ui/system/flex_item/flex_basis.d.ts +0 -1
  383. package/dist/types/src/ui/system/flex_item/flex_basis.d.ts.map +1 -1
  384. package/dist/types/src/ui/system/flex_item/flex_grow.d.ts +0 -1
  385. package/dist/types/src/ui/system/flex_item/flex_grow.d.ts.map +1 -1
  386. package/dist/types/src/ui/system/flex_item/flex_item_set.d.ts +0 -1
  387. package/dist/types/src/ui/system/flex_item/flex_item_set.d.ts.map +1 -1
  388. package/dist/types/src/ui/system/flex_item/flex_shrink.d.ts +0 -1
  389. package/dist/types/src/ui/system/flex_item/flex_shrink.d.ts.map +1 -1
  390. package/dist/types/src/ui/system/flex_item/justify_self.d.ts +0 -1
  391. package/dist/types/src/ui/system/flex_item/justify_self.d.ts.map +1 -1
  392. package/dist/types/src/ui/system/flex_item/order.d.ts +0 -1
  393. package/dist/types/src/ui/system/flex_item/order.d.ts.map +1 -1
  394. package/dist/types/src/ui/system/overflow.d.ts +0 -1
  395. package/dist/types/src/ui/system/overflow.d.ts.map +1 -1
  396. package/dist/types/src/ui/system/position/bottom.d.ts +0 -1
  397. package/dist/types/src/ui/system/position/bottom.d.ts.map +1 -1
  398. package/dist/types/src/ui/system/position/left.d.ts +0 -1
  399. package/dist/types/src/ui/system/position/left.d.ts.map +1 -1
  400. package/dist/types/src/ui/system/position/position.d.ts +0 -1
  401. package/dist/types/src/ui/system/position/position.d.ts.map +1 -1
  402. package/dist/types/src/ui/system/position/position_set.d.ts +0 -1
  403. package/dist/types/src/ui/system/position/position_set.d.ts.map +1 -1
  404. package/dist/types/src/ui/system/position/right.d.ts +0 -1
  405. package/dist/types/src/ui/system/position/right.d.ts.map +1 -1
  406. package/dist/types/src/ui/system/position/top.d.ts +0 -1
  407. package/dist/types/src/ui/system/position/top.d.ts.map +1 -1
  408. package/dist/types/src/ui/system/position/z_index.d.ts +0 -1
  409. package/dist/types/src/ui/system/position/z_index.d.ts.map +1 -1
  410. package/dist/types/src/ui/system/spacing/margin.d.ts +0 -1
  411. package/dist/types/src/ui/system/spacing/margin.d.ts.map +1 -1
  412. package/dist/types/src/ui/system/spacing/padding.d.ts +0 -1
  413. package/dist/types/src/ui/system/spacing/padding.d.ts.map +1 -1
  414. package/dist/types/src/ui/system/spacing/spacing_set.d.ts +0 -1
  415. package/dist/types/src/ui/system/spacing/spacing_set.d.ts.map +1 -1
  416. package/dist/types/src/ui/system/typography/font_family.d.ts +0 -1
  417. package/dist/types/src/ui/system/typography/font_family.d.ts.map +1 -1
  418. package/dist/types/src/ui/system/typography/font_size.d.ts +0 -1
  419. package/dist/types/src/ui/system/typography/font_size.d.ts.map +1 -1
  420. package/dist/types/src/ui/system/typography/font_style.d.ts +0 -1
  421. package/dist/types/src/ui/system/typography/font_style.d.ts.map +1 -1
  422. package/dist/types/src/ui/system/typography/font_weight.d.ts +0 -1
  423. package/dist/types/src/ui/system/typography/font_weight.d.ts.map +1 -1
  424. package/dist/types/src/ui/system/typography/letter_spacing.d.ts +0 -1
  425. package/dist/types/src/ui/system/typography/letter_spacing.d.ts.map +1 -1
  426. package/dist/types/src/ui/system/typography/line_height.d.ts +0 -1
  427. package/dist/types/src/ui/system/typography/line_height.d.ts.map +1 -1
  428. package/dist/types/src/ui/system/typography/text_align.d.ts +0 -1
  429. package/dist/types/src/ui/system/typography/text_align.d.ts.map +1 -1
  430. package/dist/types/src/ui/system/typography/text_color.d.ts +0 -1
  431. package/dist/types/src/ui/system/typography/text_color.d.ts.map +1 -1
  432. package/dist/types/src/ui/system/typography/text_decoration.d.ts +0 -1
  433. package/dist/types/src/ui/system/typography/text_decoration.d.ts.map +1 -1
  434. package/dist/types/src/ui/system/typography/text_transform.d.ts +0 -1
  435. package/dist/types/src/ui/system/typography/text_transform.d.ts.map +1 -1
  436. package/dist/types/src/ui/system/typography/typography_set.d.ts +0 -1
  437. package/dist/types/src/ui/system/typography/typography_set.d.ts.map +1 -1
  438. package/dist/types/src/ui/system/utils/create_style_prop_types.d.ts +1 -1
  439. package/dist/types/src/ui/system/utils/create_style_prop_types.d.ts.map +1 -1
  440. package/dist/types/src/ui/system/utils/csstype.d.ts +578 -578
  441. package/dist/types/src/ui/system/utils/csstype.d.ts.map +1 -1
  442. package/dist/types/src/ui/system/utils/types.d.ts +4 -4
  443. package/dist/types/src/ui/system/utils/types.d.ts.map +1 -1
  444. package/dist/types/src/ui/table_picker.d.ts +1 -1
  445. package/dist/types/src/ui/table_picker.d.ts.map +1 -1
  446. package/dist/types/src/ui/text.d.ts +4 -4
  447. package/dist/types/src/ui/text.d.ts.map +1 -1
  448. package/dist/types/src/ui/text_button.d.ts +2 -2
  449. package/dist/types/src/ui/text_button.d.ts.map +1 -1
  450. package/dist/types/src/ui/theme/default_theme/heading_styles.d.ts +2 -2
  451. package/dist/types/src/ui/theme/default_theme/heading_styles.d.ts.map +1 -1
  452. package/dist/types/src/ui/theme/default_theme/index.d.ts +1 -1
  453. package/dist/types/src/ui/theme/theme_context.d.ts +1 -3
  454. package/dist/types/src/ui/theme/theme_context.d.ts.map +1 -1
  455. package/dist/types/src/ui/theme/use_theme.d.ts +1 -1
  456. package/dist/types/src/ui/tooltip.d.ts +3 -3
  457. package/dist/types/src/ui/types/data_attributes_prop.d.ts.map +1 -1
  458. package/dist/types/src/ui/types/tooltip_anchor_props.d.ts +0 -1
  459. package/dist/types/src/ui/types/tooltip_anchor_props.d.ts.map +1 -1
  460. package/dist/types/src/ui/ui.d.ts +1 -0
  461. package/dist/types/src/ui/ui.d.ts.map +1 -1
  462. package/dist/types/src/ui/use_base.d.ts.map +1 -1
  463. package/dist/types/src/ui/use_color_scheme.d.ts +28 -0
  464. package/dist/types/src/ui/use_color_scheme.d.ts.map +1 -0
  465. package/dist/types/src/ui/use_cursor.d.ts.map +1 -1
  466. package/dist/types/src/ui/use_form_field.d.ts +0 -2
  467. package/dist/types/src/ui/use_form_field.d.ts.map +1 -1
  468. package/dist/types/src/ui/use_records.d.ts +2 -2
  469. package/dist/types/src/ui/use_records.d.ts.map +1 -1
  470. package/dist/types/src/ui/use_session.d.ts.map +1 -1
  471. package/dist/types/src/ui/view_picker.d.ts +3 -3
  472. package/dist/types/src/ui/view_picker.d.ts.map +1 -1
  473. package/dist/types/src/ui/viewport_constraint.d.ts +3 -3
  474. package/dist/types/src/ui/viewport_constraint.d.ts.map +1 -1
  475. package/dist/types/src/viewport.d.ts +2 -2
  476. package/dist/types/src/viewport.d.ts.map +1 -1
  477. package/dist/types/src/warning.d.ts +1 -1
  478. package/dist/types/src/warning.d.ts.map +1 -1
  479. package/package.json +40 -34
  480. package/dist/types/stories/all_controls.stories.d.ts +0 -2
  481. package/dist/types/stories/all_controls.stories.d.ts.map +0 -1
  482. package/dist/types/stories/box.appearance.stories.d.ts +0 -2
  483. package/dist/types/stories/box.appearance.stories.d.ts.map +0 -1
  484. package/dist/types/stories/box.dimensions.stories.d.ts +0 -2
  485. package/dist/types/stories/box.dimensions.stories.d.ts.map +0 -1
  486. package/dist/types/stories/box.flex_container.stories.d.ts +0 -2
  487. package/dist/types/stories/box.flex_container.stories.d.ts.map +0 -1
  488. package/dist/types/stories/box.flex_item.stories.d.ts +0 -2
  489. package/dist/types/stories/box.flex_item.stories.d.ts.map +0 -1
  490. package/dist/types/stories/box.position.stories.d.ts +0 -2
  491. package/dist/types/stories/box.position.stories.d.ts.map +0 -1
  492. package/dist/types/stories/box.spacing.stories.d.ts +0 -2
  493. package/dist/types/stories/box.spacing.stories.d.ts.map +0 -1
  494. package/dist/types/stories/box.stories.d.ts +0 -2
  495. package/dist/types/stories/box.stories.d.ts.map +0 -1
  496. package/dist/types/stories/box.typography.stories.d.ts +0 -2
  497. package/dist/types/stories/box.typography.stories.d.ts.map +0 -1
  498. package/dist/types/stories/button.stories.d.ts +0 -2
  499. package/dist/types/stories/button.stories.d.ts.map +0 -1
  500. package/dist/types/stories/cell_renderer.stories.d.ts +0 -2
  501. package/dist/types/stories/cell_renderer.stories.d.ts.map +0 -1
  502. package/dist/types/stories/choice_token.stories.d.ts +0 -2
  503. package/dist/types/stories/choice_token.stories.d.ts.map +0 -1
  504. package/dist/types/stories/collaborator_token.stories.d.ts +0 -2
  505. package/dist/types/stories/collaborator_token.stories.d.ts.map +0 -1
  506. package/dist/types/stories/color_palette.stories.d.ts +0 -2
  507. package/dist/types/stories/color_palette.stories.d.ts.map +0 -1
  508. package/dist/types/stories/confirmation_dialog.stories.d.ts +0 -2
  509. package/dist/types/stories/confirmation_dialog.stories.d.ts.map +0 -1
  510. package/dist/types/stories/dialog.stories.d.ts +0 -2
  511. package/dist/types/stories/dialog.stories.d.ts.map +0 -1
  512. package/dist/types/stories/field_icon.stories.d.ts +0 -2
  513. package/dist/types/stories/field_icon.stories.d.ts.map +0 -1
  514. package/dist/types/stories/form_field.stories.d.ts +0 -2
  515. package/dist/types/stories/form_field.stories.d.ts.map +0 -1
  516. package/dist/types/stories/heading.size.stories.d.ts +0 -2
  517. package/dist/types/stories/heading.size.stories.d.ts.map +0 -1
  518. package/dist/types/stories/heading.stories.d.ts +0 -2
  519. package/dist/types/stories/heading.stories.d.ts.map +0 -1
  520. package/dist/types/stories/helpers/attachments.d.ts +0 -4
  521. package/dist/types/stories/helpers/attachments.d.ts.map +0 -1
  522. package/dist/types/stories/helpers/categorize_style_props.d.ts +0 -14
  523. package/dist/types/stories/helpers/categorize_style_props.d.ts.map +0 -1
  524. package/dist/types/stories/helpers/choice_options.d.ts +0 -7
  525. package/dist/types/stories/helpers/choice_options.d.ts.map +0 -1
  526. package/dist/types/stories/helpers/code_block.d.ts +0 -5
  527. package/dist/types/stories/helpers/code_block.d.ts.map +0 -1
  528. package/dist/types/stories/helpers/code_utils.d.ts +0 -32
  529. package/dist/types/stories/helpers/code_utils.d.ts.map +0 -1
  530. package/dist/types/stories/helpers/collaborator_options.d.ts +0 -7
  531. package/dist/types/stories/helpers/collaborator_options.d.ts.map +0 -1
  532. package/dist/types/stories/helpers/example.d.ts +0 -39
  533. package/dist/types/stories/helpers/example.d.ts.map +0 -1
  534. package/dist/types/stories/helpers/example_code_panel.d.ts +0 -10
  535. package/dist/types/stories/helpers/example_code_panel.d.ts.map +0 -1
  536. package/dist/types/stories/helpers/fake_cell_renderer.d.ts +0 -7
  537. package/dist/types/stories/helpers/fake_cell_renderer.d.ts.map +0 -1
  538. package/dist/types/stories/helpers/fake_foreign_record.d.ts +0 -5
  539. package/dist/types/stories/helpers/fake_foreign_record.d.ts.map +0 -1
  540. package/dist/types/stories/helpers/fake_record_card.d.ts +0 -13
  541. package/dist/types/stories/helpers/fake_record_card.d.ts.map +0 -1
  542. package/dist/types/stories/helpers/field_type.d.ts +0 -6
  543. package/dist/types/stories/helpers/field_type.d.ts.map +0 -1
  544. package/dist/types/stories/helpers/raf_throttle.d.ts +0 -5
  545. package/dist/types/stories/helpers/raf_throttle.d.ts.map +0 -1
  546. package/dist/types/stories/helpers/style_prop_list.d.ts +0 -9
  547. package/dist/types/stories/helpers/style_prop_list.d.ts.map +0 -1
  548. package/dist/types/stories/helpers/sync_source_options.d.ts +0 -7
  549. package/dist/types/stories/helpers/sync_source_options.d.ts.map +0 -1
  550. package/dist/types/stories/helpers/use_resizable_panel.d.ts +0 -27
  551. package/dist/types/stories/helpers/use_resizable_panel.d.ts.map +0 -1
  552. package/dist/types/stories/icon.stories.d.ts +0 -2
  553. package/dist/types/stories/icon.stories.d.ts.map +0 -1
  554. package/dist/types/stories/icon_example.d.ts +0 -3
  555. package/dist/types/stories/icon_example.d.ts.map +0 -1
  556. package/dist/types/stories/input.stories.d.ts +0 -2
  557. package/dist/types/stories/input.stories.d.ts.map +0 -1
  558. package/dist/types/stories/label.stories.d.ts +0 -2
  559. package/dist/types/stories/label.stories.d.ts.map +0 -1
  560. package/dist/types/stories/link.stories.d.ts +0 -2
  561. package/dist/types/stories/link.stories.d.ts.map +0 -1
  562. package/dist/types/stories/loader.stories.d.ts +0 -2
  563. package/dist/types/stories/loader.stories.d.ts.map +0 -1
  564. package/dist/types/stories/model_pickers.stories.d.ts +0 -2
  565. package/dist/types/stories/model_pickers.stories.d.ts.map +0 -1
  566. package/dist/types/stories/progress_bar.stories.d.ts +0 -2
  567. package/dist/types/stories/progress_bar.stories.d.ts.map +0 -1
  568. package/dist/types/stories/record_card.stories.d.ts +0 -2
  569. package/dist/types/stories/record_card.stories.d.ts.map +0 -1
  570. package/dist/types/stories/record_card_list.stories.d.ts +0 -2
  571. package/dist/types/stories/record_card_list.stories.d.ts.map +0 -1
  572. package/dist/types/stories/select.stories.d.ts +0 -2
  573. package/dist/types/stories/select.stories.d.ts.map +0 -1
  574. package/dist/types/stories/select_buttons.stories.d.ts +0 -2
  575. package/dist/types/stories/select_buttons.stories.d.ts.map +0 -1
  576. package/dist/types/stories/switch.stories.d.ts +0 -2
  577. package/dist/types/stories/switch.stories.d.ts.map +0 -1
  578. package/dist/types/stories/text.size.stories.d.ts +0 -2
  579. package/dist/types/stories/text.size.stories.d.ts.map +0 -1
  580. package/dist/types/stories/text.stories.d.ts +0 -2
  581. package/dist/types/stories/text.stories.d.ts.map +0 -1
  582. package/dist/types/stories/text_button.stories.d.ts +0 -2
  583. package/dist/types/stories/text_button.stories.d.ts.map +0 -1
  584. package/dist/types/stories/tooltip.stories.d.ts +0 -2
  585. package/dist/types/stories/tooltip.stories.d.ts.map +0 -1
  586. package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts +0 -124
  587. package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts.map +0 -1
  588. package/dist/types/test/airtable_interface_mocks/linked_records.d.ts +0 -4
  589. package/dist/types/test/airtable_interface_mocks/linked_records.d.ts.map +0 -1
  590. package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts +0 -61
  591. package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts.map +0 -1
  592. package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts +0 -4
  593. package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts.map +0 -1
  594. package/dist/types/test/error_utils.test.d.ts +0 -2
  595. package/dist/types/test/error_utils.test.d.ts.map +0 -1
  596. package/dist/types/test/get_style_props_for_responsive_prop.test.d.ts +0 -2
  597. package/dist/types/test/get_style_props_for_responsive_prop.test.d.ts.map +0 -1
  598. package/dist/types/test/index.test.d.ts +0 -2
  599. package/dist/types/test/index.test.d.ts.map +0 -1
  600. package/dist/types/test/models/base.test.d.ts +0 -2
  601. package/dist/types/test/models/base.test.d.ts.map +0 -1
  602. package/dist/types/test/models/cursor.test.d.ts +0 -2
  603. package/dist/types/test/models/cursor.test.d.ts.map +0 -1
  604. package/dist/types/test/models/field.test.d.ts +0 -2
  605. package/dist/types/test/models/field.test.d.ts.map +0 -1
  606. package/dist/types/test/models/linked_records_query_result.test.d.ts +0 -2
  607. package/dist/types/test/models/linked_records_query_result.test.d.ts.map +0 -1
  608. package/dist/types/test/models/mutations.test.d.ts +0 -2
  609. package/dist/types/test/models/mutations.test.d.ts.map +0 -1
  610. package/dist/types/test/models/object_pool.test.d.ts +0 -2
  611. package/dist/types/test/models/object_pool.test.d.ts.map +0 -1
  612. package/dist/types/test/models/record.test.d.ts +0 -2
  613. package/dist/types/test/models/record.test.d.ts.map +0 -1
  614. package/dist/types/test/models/session.test.d.ts +0 -2
  615. package/dist/types/test/models/session.test.d.ts.map +0 -1
  616. package/dist/types/test/models/table.test.d.ts +0 -2
  617. package/dist/types/test/models/table.test.d.ts.map +0 -1
  618. package/dist/types/test/models/table_mutations.test.d.ts +0 -2
  619. package/dist/types/test/models/table_mutations.test.d.ts.map +0 -1
  620. package/dist/types/test/models/table_or_view_query_result.test.d.ts +0 -2
  621. package/dist/types/test/models/table_or_view_query_result.test.d.ts.map +0 -1
  622. package/dist/types/test/models/view.test.d.ts +0 -2
  623. package/dist/types/test/models/view.test.d.ts.map +0 -1
  624. package/dist/types/test/models/view_metadata_query_result.test.d.ts +0 -2
  625. package/dist/types/test/models/view_metadata_query_result.test.d.ts.map +0 -1
  626. package/dist/types/test/private_utils.test.d.ts +0 -2
  627. package/dist/types/test/private_utils.test.d.ts.map +0 -1
  628. package/dist/types/test/sdk.test.d.ts +0 -2
  629. package/dist/types/test/sdk.test.d.ts.map +0 -1
  630. package/dist/types/test/setup_enzyme.d.ts +0 -2
  631. package/dist/types/test/setup_enzyme.d.ts.map +0 -1
  632. package/dist/types/test/test_helpers.d.ts +0 -11
  633. package/dist/types/test/test_helpers.d.ts.map +0 -1
  634. package/dist/types/test/ui/base_provider.test.d.ts +0 -2
  635. package/dist/types/test/ui/base_provider.test.d.ts.map +0 -1
  636. package/dist/types/test/ui/block_wrapper.test.d.ts +0 -2
  637. package/dist/types/test/ui/block_wrapper.test.d.ts.map +0 -1
  638. package/dist/types/test/ui/box.test.d.ts +0 -2
  639. package/dist/types/test/ui/box.test.d.ts.map +0 -1
  640. package/dist/types/test/ui/button.test.d.ts +0 -2
  641. package/dist/types/test/ui/button.test.d.ts.map +0 -1
  642. package/dist/types/test/ui/cell_renderer.test.d.ts +0 -2
  643. package/dist/types/test/ui/cell_renderer.test.d.ts.map +0 -1
  644. package/dist/types/test/ui/choice_token.test.d.ts +0 -2
  645. package/dist/types/test/ui/choice_token.test.d.ts.map +0 -1
  646. package/dist/types/test/ui/collaborator_token.test.d.ts +0 -2
  647. package/dist/types/test/ui/collaborator_token.test.d.ts.map +0 -1
  648. package/dist/types/test/ui/color_palette.test.d.ts +0 -2
  649. package/dist/types/test/ui/color_palette.test.d.ts.map +0 -1
  650. package/dist/types/test/ui/color_palette_synced.test.d.ts +0 -2
  651. package/dist/types/test/ui/color_palette_synced.test.d.ts.map +0 -1
  652. package/dist/types/test/ui/confirmation_dialog.test.d.ts +0 -2
  653. package/dist/types/test/ui/confirmation_dialog.test.d.ts.map +0 -1
  654. package/dist/types/test/ui/dialog.test.d.ts +0 -2
  655. package/dist/types/test/ui/dialog.test.d.ts.map +0 -1
  656. package/dist/types/test/ui/expand_record.test.d.ts +0 -2
  657. package/dist/types/test/ui/expand_record.test.d.ts.map +0 -1
  658. package/dist/types/test/ui/expand_record_list.test.d.ts +0 -2
  659. package/dist/types/test/ui/expand_record_list.test.d.ts.map +0 -1
  660. package/dist/types/test/ui/expand_record_picker_async.test.d.ts +0 -2
  661. package/dist/types/test/ui/expand_record_picker_async.test.d.ts.map +0 -1
  662. package/dist/types/test/ui/field_icon.test.d.ts +0 -2
  663. package/dist/types/test/ui/field_icon.test.d.ts.map +0 -1
  664. package/dist/types/test/ui/field_picker.test.d.ts +0 -2
  665. package/dist/types/test/ui/field_picker.test.d.ts.map +0 -1
  666. package/dist/types/test/ui/field_picker_synced.test.d.ts +0 -2
  667. package/dist/types/test/ui/field_picker_synced.test.d.ts.map +0 -1
  668. package/dist/types/test/ui/form_field.test.d.ts +0 -2
  669. package/dist/types/test/ui/form_field.test.d.ts.map +0 -1
  670. package/dist/types/test/ui/global_alert.test.d.ts +0 -2
  671. package/dist/types/test/ui/global_alert.test.d.ts.map +0 -1
  672. package/dist/types/test/ui/heading.test.d.ts +0 -2
  673. package/dist/types/test/ui/heading.test.d.ts.map +0 -1
  674. package/dist/types/test/ui/icon.test.d.ts +0 -2
  675. package/dist/types/test/ui/icon.test.d.ts.map +0 -1
  676. package/dist/types/test/ui/initialize_block.test.d.ts +0 -2
  677. package/dist/types/test/ui/initialize_block.test.d.ts.map +0 -1
  678. package/dist/types/test/ui/input.test.d.ts +0 -2
  679. package/dist/types/test/ui/input.test.d.ts.map +0 -1
  680. package/dist/types/test/ui/input_synced.test.d.ts +0 -2
  681. package/dist/types/test/ui/input_synced.test.d.ts.map +0 -1
  682. package/dist/types/test/ui/label.test.d.ts +0 -2
  683. package/dist/types/test/ui/label.test.d.ts.map +0 -1
  684. package/dist/types/test/ui/link.test.d.ts +0 -2
  685. package/dist/types/test/ui/link.test.d.ts.map +0 -1
  686. package/dist/types/test/ui/loader.test.d.ts +0 -2
  687. package/dist/types/test/ui/loader.test.d.ts.map +0 -1
  688. package/dist/types/test/ui/modal.test.d.ts +0 -2
  689. package/dist/types/test/ui/modal.test.d.ts.map +0 -1
  690. package/dist/types/test/ui/popover.test.d.ts +0 -2
  691. package/dist/types/test/ui/popover.test.d.ts.map +0 -1
  692. package/dist/types/test/ui/progress_bar.test.d.ts +0 -2
  693. package/dist/types/test/ui/progress_bar.test.d.ts.map +0 -1
  694. package/dist/types/test/ui/record_card.test.d.ts +0 -2
  695. package/dist/types/test/ui/record_card.test.d.ts.map +0 -1
  696. package/dist/types/test/ui/record_card_list.test.d.ts +0 -2
  697. package/dist/types/test/ui/record_card_list.test.d.ts.map +0 -1
  698. package/dist/types/test/ui/remote_utils.test.d.ts +0 -2
  699. package/dist/types/test/ui/remote_utils.test.d.ts.map +0 -1
  700. package/dist/types/test/ui/select.test.d.ts +0 -2
  701. package/dist/types/test/ui/select.test.d.ts.map +0 -1
  702. package/dist/types/test/ui/select_buttons.test.d.ts +0 -2
  703. package/dist/types/test/ui/select_buttons.test.d.ts.map +0 -1
  704. package/dist/types/test/ui/select_buttons_synced.test.d.ts +0 -2
  705. package/dist/types/test/ui/select_buttons_synced.test.d.ts.map +0 -1
  706. package/dist/types/test/ui/select_synced.test.d.ts +0 -2
  707. package/dist/types/test/ui/select_synced.test.d.ts.map +0 -1
  708. package/dist/types/test/ui/switch.test.d.ts +0 -2
  709. package/dist/types/test/ui/switch.test.d.ts.map +0 -1
  710. package/dist/types/test/ui/switch_synced.test.d.ts +0 -2
  711. package/dist/types/test/ui/switch_synced.test.d.ts.map +0 -1
  712. package/dist/types/test/ui/synced.test.d.ts +0 -2
  713. package/dist/types/test/ui/synced.test.d.ts.map +0 -1
  714. package/dist/types/test/ui/table_picker.test.d.ts +0 -2
  715. package/dist/types/test/ui/table_picker.test.d.ts.map +0 -1
  716. package/dist/types/test/ui/table_picker_synced.test.d.ts +0 -2
  717. package/dist/types/test/ui/table_picker_synced.test.d.ts.map +0 -1
  718. package/dist/types/test/ui/text.test.d.ts +0 -2
  719. package/dist/types/test/ui/text.test.d.ts.map +0 -1
  720. package/dist/types/test/ui/text_button.test.d.ts +0 -2
  721. package/dist/types/test/ui/text_button.test.d.ts.map +0 -1
  722. package/dist/types/test/ui/tooltip.test.d.ts +0 -2
  723. package/dist/types/test/ui/tooltip.test.d.ts.map +0 -1
  724. package/dist/types/test/ui/ui.test.d.ts +0 -2
  725. package/dist/types/test/ui/ui.test.d.ts.map +0 -1
  726. package/dist/types/test/ui/unstable_standalone_ui.test.d.ts +0 -1
  727. package/dist/types/test/ui/unstable_standalone_ui.test.d.ts.map +0 -1
  728. package/dist/types/test/ui/use_array_identity.test.d.ts +0 -2
  729. package/dist/types/test/ui/use_array_identity.test.d.ts.map +0 -1
  730. package/dist/types/test/ui/use_loadable.test.d.ts +0 -2
  731. package/dist/types/test/ui/use_loadable.test.d.ts.map +0 -1
  732. package/dist/types/test/ui/use_record_action_data.test.d.ts +0 -2
  733. package/dist/types/test/ui/use_record_action_data.test.d.ts.map +0 -1
  734. package/dist/types/test/ui/use_records.test.d.ts +0 -2
  735. package/dist/types/test/ui/use_records.test.d.ts.map +0 -1
  736. package/dist/types/test/ui/use_view_metadata.test.d.ts +0 -2
  737. package/dist/types/test/ui/use_view_metadata.test.d.ts.map +0 -1
  738. package/dist/types/test/ui/use_watchable.test.d.ts +0 -2
  739. package/dist/types/test/ui/use_watchable.test.d.ts.map +0 -1
  740. package/dist/types/test/ui/view_picker.test.d.ts +0 -2
  741. package/dist/types/test/ui/view_picker.test.d.ts.map +0 -1
  742. package/dist/types/test/ui/view_picker_synced.test.d.ts +0 -2
  743. package/dist/types/test/ui/view_picker_synced.test.d.ts.map +0 -1
  744. package/dist/types/test/ui/viewport_constraint.test.d.ts +0 -2
  745. package/dist/types/test/ui/viewport_constraint.test.d.ts.map +0 -1
  746. package/dist/types/test/unstable_private_utils.test.d.ts +0 -1
  747. package/dist/types/test/unstable_private_utils.test.d.ts.map +0 -1
@@ -1,60 +1,38 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.symbol.js");
4
+ require("core-js/modules/es.array.filter.js");
5
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
6
+ require("core-js/modules/es.object.to-string.js");
7
+ require("core-js/modules/web.dom-collections.for-each.js");
3
8
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- require("core-js/modules/es.symbol");
6
-
7
- require("core-js/modules/es.array.filter");
8
-
9
- require("core-js/modules/es.array.map");
10
-
11
- require("core-js/modules/es.object.get-own-property-descriptors");
12
-
13
- require("core-js/modules/es.object.to-string");
14
-
15
- require("core-js/modules/es.promise");
16
-
17
- require("core-js/modules/web.dom-collections.for-each");
18
-
19
9
  Object.defineProperty(exports, "__esModule", {
20
10
  value: true
21
11
  });
22
12
  exports.default = void 0;
23
-
13
+ require("core-js/modules/es.array.map.js");
24
14
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
25
-
26
- require("regenerator-runtime/runtime");
27
-
15
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
28
16
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
29
-
17
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
30
18
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
31
-
32
19
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
33
-
34
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
35
-
36
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
37
-
38
20
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
39
-
40
21
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
41
-
42
22
  var _error_utils = require("../error_utils");
43
-
44
23
  var _private_utils = require("../private_utils");
45
-
46
24
  var _abstract_model_with_async_data = _interopRequireDefault(require("./abstract_model_with_async_data"));
47
-
48
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
49
-
50
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
51
-
25
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
27
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
28
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @module @airtable/blocks/models: View */ /** */
52
29
  var WatchableViewMetadataKeys = {
53
30
  allFields: 'allFields',
54
31
  visibleFields: 'visibleFields',
55
32
  isDataLoaded: 'isDataLoaded',
56
33
  groupLevels: 'groupLevels'
57
34
  };
35
+
58
36
  /**
59
37
  * A key in {@link ViewMetadataQueryResult} that can be watched.
60
38
  * - `allFields`
@@ -62,6 +40,15 @@ var WatchableViewMetadataKeys = {
62
40
  * - `isDataLoaded`
63
41
  */
64
42
 
43
+ /** @hidden */
44
+
45
+ /**
46
+ * @hidden
47
+ */
48
+
49
+ /**
50
+ * @hidden
51
+ */
65
52
  /**
66
53
  * Contains information about a view that isn't loaded by default e.g. field order and visible fields.
67
54
  *
@@ -84,147 +71,118 @@ var WatchableViewMetadataKeys = {
84
71
  * ```
85
72
  * @docsPath models/query results/ViewMetadataQueryResult
86
73
  */
87
- var ViewMetadataQueryResult =
88
- /*#__PURE__*/
89
- function (_AbstractModelWithAsy) {
90
- (0, _inherits2.default)(ViewMetadataQueryResult, _AbstractModelWithAsy);
91
- (0, _createClass2.default)(ViewMetadataQueryResult, null, [{
92
- key: "_isWatchableKey",
93
-
94
- /** @internal */
95
-
96
- /** @internal */
97
- value: function _isWatchableKey(key) {
98
- return (0, _private_utils.isEnumValue)(WatchableViewMetadataKeys, key);
99
- }
100
- /** @internal */
101
-
102
- }, {
103
- key: "_shouldLoadDataForKey",
104
- value: function _shouldLoadDataForKey(key) {
105
- return key === WatchableViewMetadataKeys.allFields || key === WatchableViewMetadataKeys.visibleFields || key === WatchableViewMetadataKeys.groupLevels;
106
- }
107
- /** */
108
-
109
- }]);
110
-
74
+ var ViewMetadataQueryResult = /*#__PURE__*/function (_AbstractModelWithAsy) {
111
75
  /** @internal */
112
76
  function ViewMetadataQueryResult(sdk, parentView, viewDataStore) {
113
77
  var _this;
114
-
115
78
  (0, _classCallCheck2.default)(this, ViewMetadataQueryResult);
116
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ViewMetadataQueryResult).call(this, sdk, (0, _private_utils.getLocallyUniqueId)('ViewMetadataQueryResult')));
117
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parentView", void 0);
118
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_viewDataStore", void 0);
119
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onVisibleFieldIdsChange", () => {
79
+ _this = _callSuper(this, ViewMetadataQueryResult, [sdk, (0, _private_utils.getLocallyUniqueId)('ViewMetadataQueryResult')]);
80
+ /** */
81
+ (0, _defineProperty2.default)(_this, "parentView", void 0);
82
+ /** @internal */
83
+ (0, _defineProperty2.default)(_this, "_viewDataStore", void 0);
84
+ /** @internal */
85
+ (0, _defineProperty2.default)(_this, "_onVisibleFieldIdsChange", () => {
120
86
  _this._onChange(WatchableViewMetadataKeys.visibleFields);
121
87
  });
122
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onAllFieldIdsChange", () => {
88
+ /** @internal */
89
+ (0, _defineProperty2.default)(_this, "_onAllFieldIdsChange", () => {
123
90
  _this._onChange(WatchableViewMetadataKeys.allFields);
124
91
  });
125
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onGroupLevelsChange", () => {
92
+ /** @internal */
93
+ (0, _defineProperty2.default)(_this, "_onGroupLevelsChange", () => {
126
94
  _this._onChange(WatchableViewMetadataKeys.groupLevels);
127
95
  });
128
96
  _this.parentView = parentView;
129
97
  _this._viewDataStore = viewDataStore;
130
98
  return _this;
131
99
  }
132
- /** @internal */
133
100
 
101
+ /** @internal */
102
+ (0, _inherits2.default)(ViewMetadataQueryResult, _AbstractModelWithAsy);
103
+ return (0, _createClass2.default)(ViewMetadataQueryResult, [{
104
+ key: "__poolKey",
105
+ get: function get() {
106
+ return this.parentView.id;
107
+ }
134
108
 
135
- (0, _createClass2.default)(ViewMetadataQueryResult, [{
136
- key: "_onChangeIsDataLoaded",
109
+ /** @internal */
110
+ }, {
111
+ key: "_dataOrNullIfDeleted",
112
+ get: function get() {
113
+ if (this._viewDataStore.isDeleted) {
114
+ return null;
115
+ }
116
+ if (!this._viewDataStore.isDataLoaded) {
117
+ return {
118
+ visibleFieldIds: null,
119
+ allFieldIds: null,
120
+ groupLevels: null
121
+ };
122
+ }
123
+ return {
124
+ visibleFieldIds: this._viewDataStore.visibleFieldIds,
125
+ allFieldIds: this._viewDataStore.allFieldIds,
126
+ groupLevels: this._viewDataStore.groupLevels
127
+ };
128
+ }
137
129
 
138
130
  /** @internal */
131
+ }, {
132
+ key: "_onChangeIsDataLoaded",
139
133
  value: function _onChangeIsDataLoaded() {
140
134
  this._onChange(WatchableViewMetadataKeys.isDataLoaded);
141
135
  }
142
- /** @internal */
143
136
 
137
+ /** @internal */
144
138
  }, {
145
139
  key: "_loadDataAsync",
146
- value: function _loadDataAsync() {
147
- return _regenerator.default.async(function _loadDataAsync$(_context) {
148
- while (1) {
149
- switch (_context.prev = _context.next) {
140
+ value: (function () {
141
+ var _loadDataAsync2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
142
+ return _regenerator.default.wrap(function _callee$(_context) {
143
+ while (1) switch (_context.prev = _context.next) {
150
144
  case 0:
151
145
  _context.next = 2;
152
- return _regenerator.default.awrap(this._viewDataStore.loadDataAsync());
153
-
146
+ return this._viewDataStore.loadDataAsync();
154
147
  case 2:
155
148
  this._viewDataStore.watch('visibleFieldIds', this._onVisibleFieldIdsChange);
156
-
157
149
  this._viewDataStore.watch('allFieldIds', this._onAllFieldIdsChange);
158
-
159
150
  this._viewDataStore.watch('groupLevels', this._onGroupLevelsChange);
160
-
161
151
  return _context.abrupt("return", [WatchableViewMetadataKeys.visibleFields, WatchableViewMetadataKeys.allFields, WatchableViewMetadataKeys.groupLevels]);
162
-
163
152
  case 6:
164
153
  case "end":
165
154
  return _context.stop();
166
155
  }
167
- }
168
- }, null, this);
169
- }
170
- /** @internal */
171
-
156
+ }, _callee, this);
157
+ }));
158
+ function _loadDataAsync() {
159
+ return _loadDataAsync2.apply(this, arguments);
160
+ }
161
+ return _loadDataAsync;
162
+ }() /** @internal */)
172
163
  }, {
173
164
  key: "_unloadData",
174
165
  value: function _unloadData() {
175
166
  this._viewDataStore.unwatch('visibleFieldIds', this._onVisibleFieldIdsChange);
176
-
177
167
  this._viewDataStore.unwatch('allFieldIds', this._onAllFieldIdsChange);
178
-
179
168
  this._viewDataStore.unwatch('groupLevels', this._onGroupLevelsChange);
180
-
181
169
  this._viewDataStore.unloadData();
182
170
  }
183
- /** @internal */
184
-
185
- }, {
186
- key: "__poolKey",
187
- get: function get() {
188
- return this.parentView.id;
189
- }
190
- /** @internal */
191
-
192
- }, {
193
- key: "_dataOrNullIfDeleted",
194
- get: function get() {
195
- if (this._viewDataStore.isDeleted) {
196
- return null;
197
- }
198
-
199
- if (!this._viewDataStore.isDataLoaded) {
200
- return {
201
- visibleFieldIds: null,
202
- allFieldIds: null,
203
- groupLevels: null
204
- };
205
- }
206
-
207
- return {
208
- visibleFieldIds: this._viewDataStore.visibleFieldIds,
209
- allFieldIds: this._viewDataStore.allFieldIds,
210
- groupLevels: this._viewDataStore.groupLevels
211
- };
212
- }
213
171
  }, {
214
172
  key: "allFields",
215
-
173
+ get:
216
174
  /**
217
175
  * Returns every field in the table in the order they appear in this view. Watchable.
218
176
  */
219
- get: function get() {
177
+ function get() {
220
178
  var allFieldIds = this._data.allFieldIds;
221
179
  (0, _error_utils.invariant)(allFieldIds, 'view meta data is not loaded');
222
180
  return allFieldIds.map(fieldId => this.parentView.parentTable.getFieldById(fieldId));
223
181
  }
182
+
224
183
  /**
225
184
  * Returns every field visible in this view. Watchable.
226
185
  */
227
-
228
186
  }, {
229
187
  key: "visibleFields",
230
188
  get: function get() {
@@ -232,24 +190,35 @@ function (_AbstractModelWithAsy) {
232
190
  (0, _error_utils.invariant)(visibleFieldIds, 'view meta data is not loaded');
233
191
  return visibleFieldIds.map(fieldId => this.parentView.parentTable.getFieldById(fieldId));
234
192
  }
193
+
235
194
  /**
236
195
  * Returns group levels for this view. Watchable.
237
196
  *
238
197
  * @hidden
239
198
  */
240
-
241
199
  }, {
242
200
  key: "groupLevels",
243
201
  get: function get() {
244
202
  var groupLevels = this._data.groupLevels;
245
- return groupLevels ? groupLevels.map(singleConfig => _objectSpread({}, singleConfig, {
203
+ return groupLevels ? groupLevels.map(singleConfig => _objectSpread(_objectSpread({}, singleConfig), {}, {
246
204
  field: this.parentView.parentTable.getFieldById(singleConfig.fieldId)
247
205
  })) : null;
248
206
  }
207
+ }], [{
208
+ key: "_isWatchableKey",
209
+ value: /** @internal */
210
+ function _isWatchableKey(key) {
211
+ return (0, _private_utils.isEnumValue)(WatchableViewMetadataKeys, key);
212
+ }
213
+
214
+ /** @internal */
215
+ }, {
216
+ key: "_shouldLoadDataForKey",
217
+ value: function _shouldLoadDataForKey(key) {
218
+ return key === WatchableViewMetadataKeys.allFields || key === WatchableViewMetadataKeys.visibleFields || key === WatchableViewMetadataKeys.groupLevels;
219
+ }
249
220
  }]);
250
- return ViewMetadataQueryResult;
251
221
  }(_abstract_model_with_async_data.default);
252
-
222
+ /** @internal */
253
223
  (0, _defineProperty2.default)(ViewMetadataQueryResult, "_className", 'ViewMetadataQueryResult');
254
- var _default = ViewMetadataQueryResult;
255
- exports.default = _default;
224
+ var _default = exports.default = ViewMetadataQueryResult;
@@ -1,52 +1,38 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- require("core-js/modules/es.object.to-string");
6
-
7
- require("core-js/modules/es.promise");
8
-
9
4
  Object.defineProperty(exports, "__esModule", {
10
5
  value: true
11
6
  });
12
- exports.registerRecordActionDataCallback = registerRecordActionDataCallback;
7
+ exports.WatchablePerformRecordActionKeys = exports.PerformRecordAction = void 0;
13
8
  exports.__injectSdkIntoPerformRecordAction = __injectSdkIntoPerformRecordAction;
14
- exports.PerformRecordAction = exports.WatchablePerformRecordActionKeys = void 0;
15
-
9
+ exports.registerRecordActionDataCallback = registerRecordActionDataCallback;
16
10
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
17
-
18
- require("regenerator-runtime/runtime");
19
-
11
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
20
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
21
-
22
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
23
-
24
14
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
25
-
26
15
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
27
-
28
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
29
-
30
16
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
31
-
32
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
33
-
34
18
  var _error_utils = require("./error_utils");
35
-
36
19
  var _abstract_model_with_async_data = _interopRequireDefault(require("./models/abstract_model_with_async_data"));
37
-
38
20
  var _private_utils = require("./private_utils");
39
-
21
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
22
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
40
23
  /** @hidden */
41
- var WatchablePerformRecordActionKeys = Object.freeze({
24
+ var WatchablePerformRecordActionKeys = exports.WatchablePerformRecordActionKeys = Object.freeze({
42
25
  // isDataLoaded must be a watchable key for a LoadableModel.
43
26
  isDataLoaded: 'isDataLoaded',
44
27
  recordActionData: 'recordActionData'
45
28
  });
46
- /** @hidden */
47
29
 
48
- exports.WatchablePerformRecordActionKeys = WatchablePerformRecordActionKeys;
30
+ /** @hidden */
49
31
 
32
+ /**
33
+ * Returned by {@link registerRecordActionDataCallback}. Call it to unregister the previously
34
+ * registered function. Do this before registering another function or unmounting the component.
35
+ * */
50
36
  /**
51
37
  * This class exists to manage registering a callback to receive "Open block" / "Perform record
52
38
  * action" messages.
@@ -68,134 +54,121 @@ exports.WatchablePerformRecordActionKeys = WatchablePerformRecordActionKeys;
68
54
  *
69
55
  * @internal
70
56
  * */
71
- var PerformRecordAction =
72
- /*#__PURE__*/
73
- function (_AbstractModelWithAsy) {
74
- (0, _inherits2.default)(PerformRecordAction, _AbstractModelWithAsy);
75
-
76
- /** @internal */
77
-
78
- /** @internal */
79
-
80
- /** @internal */
81
-
82
- /**
83
- * The data from the latest record action, or null if none have occurred yet.
84
- *
85
- * @internal */
86
-
57
+ var PerformRecordAction = exports.PerformRecordAction = /*#__PURE__*/function (_AbstractModelWithAsy) {
87
58
  /** @hidden */
88
59
  function PerformRecordAction(sdk, airtableInterface) {
89
60
  var _this;
90
-
91
61
  (0, _classCallCheck2.default)(this, PerformRecordAction);
92
- _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(PerformRecordAction).call(this, sdk, 'performRecordAction'));
93
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_airtableInterface", void 0);
94
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_hasRegisteredHandler", void 0);
95
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_hasCompletedInitialDataLoad", void 0);
96
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recordActionData", void 0);
62
+ _this = _callSuper(this, PerformRecordAction, [sdk, 'performRecordAction']);
63
+ /** @internal */
64
+ (0, _defineProperty2.default)(_this, "_airtableInterface", void 0);
65
+ /** @internal */
66
+ (0, _defineProperty2.default)(_this, "_hasRegisteredHandler", void 0);
67
+ /** @internal */
68
+ (0, _defineProperty2.default)(_this, "_hasCompletedInitialDataLoad", void 0);
69
+ /**
70
+ * The data from the latest record action, or null if none have occurred yet.
71
+ *
72
+ * @internal */
73
+ (0, _defineProperty2.default)(_this, "recordActionData", void 0);
97
74
  _this._airtableInterface = airtableInterface;
98
75
  _this._hasRegisteredHandler = false;
99
76
  _this._hasCompletedInitialDataLoad = false;
100
77
  _this.recordActionData = null;
101
- _this._handlePerformRecordAction = _this._handlePerformRecordAction.bind((0, _assertThisInitialized2.default)(_this));
78
+ _this._handlePerformRecordAction = _this._handlePerformRecordAction.bind(_this);
102
79
  return _this;
103
80
  }
104
- /** @internal */
105
-
106
81
 
107
- (0, _createClass2.default)(PerformRecordAction, [{
82
+ /** @internal */
83
+ (0, _inherits2.default)(PerformRecordAction, _AbstractModelWithAsy);
84
+ return (0, _createClass2.default)(PerformRecordAction, [{
108
85
  key: "_handlePerformRecordAction",
109
-
110
- /** @hidden */
111
- value: function _handlePerformRecordAction(data) {
86
+ value: /** @hidden */
87
+ function _handlePerformRecordAction(data) {
112
88
  this.recordActionData = data;
113
-
114
89
  this._onChange(WatchablePerformRecordActionKeys.recordActionData, data);
115
90
  }
91
+
116
92
  /**
117
93
  * This accessor method is defined solely to satisfy the contract of the
118
94
  * AbstractModel class.
119
95
  *
120
96
  * @internal */
97
+ }, {
98
+ key: "_dataOrNullIfDeleted",
99
+ get: function get() {
100
+ return (0, _error_utils.invariant)(false, 'The `data` property of PerformRecordAction should not be referenced');
101
+ }
121
102
 
103
+ /**
104
+ * This accessor method is defined because the parent implementation uses _dataOrNullIfDeleted
105
+ *
106
+ * @inheritdoc */
122
107
  }, {
123
- key: "_onChangeIsDataLoaded",
108
+ key: "isDeleted",
109
+ get: function get() {
110
+ return false;
111
+ }
124
112
 
125
113
  /**
126
114
  * AbstractModelWithAsyncData implementation
127
115
  */
128
116
 
129
117
  /** @internal */
118
+ }, {
119
+ key: "_onChangeIsDataLoaded",
130
120
  value: function _onChangeIsDataLoaded() {
131
- this._onChange(WatchablePerformRecordActionKeys.isDataLoaded); // Handle the case where there was a pending action whilst we were registering the handler.
121
+ this._onChange(WatchablePerformRecordActionKeys.isDataLoaded);
122
+
123
+ // Handle the case where there was a pending action whilst we were registering the handler.
132
124
  // We only want to do this on the very initial load when we're actually registering the
133
125
  // handler: avoid triggering this when the data is "unloaded" and "loaded".
134
-
135
-
136
126
  if (!this._hasCompletedInitialDataLoad) {
137
127
  this._hasCompletedInitialDataLoad = true;
138
-
139
128
  if (this.recordActionData) {
140
129
  this._handlePerformRecordAction(this.recordActionData);
141
130
  }
142
131
  }
143
132
  }
144
- /** @internal */
145
133
 
134
+ /** @internal */
146
135
  }, {
147
136
  key: "_loadDataAsync",
148
- value: function _loadDataAsync() {
149
- return _regenerator.default.async(function _loadDataAsync$(_context) {
150
- while (1) {
151
- switch (_context.prev = _context.next) {
137
+ value: (function () {
138
+ var _loadDataAsync2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
139
+ return _regenerator.default.wrap(function _callee$(_context) {
140
+ while (1) switch (_context.prev = _context.next) {
152
141
  case 0:
153
142
  if (this._hasRegisteredHandler) {
154
143
  _context.next = 5;
155
144
  break;
156
145
  }
157
-
158
146
  this._hasRegisteredHandler = true;
159
147
  _context.next = 4;
160
- return _regenerator.default.awrap(this._airtableInterface.fetchAndSubscribeToPerformRecordActionAsync(this._handlePerformRecordAction));
161
-
148
+ return this._airtableInterface.fetchAndSubscribeToPerformRecordActionAsync(this._handlePerformRecordAction);
162
149
  case 4:
163
150
  this.recordActionData = _context.sent;
164
-
165
151
  case 5:
166
152
  return _context.abrupt("return", []);
167
-
168
153
  case 6:
169
154
  case "end":
170
155
  return _context.stop();
171
156
  }
172
- }
173
- }, null, this);
174
- }
175
- /** @internal */
176
-
157
+ }, _callee, this);
158
+ }));
159
+ function _loadDataAsync() {
160
+ return _loadDataAsync2.apply(this, arguments);
161
+ }
162
+ return _loadDataAsync;
163
+ }() /** @internal */)
177
164
  }, {
178
165
  key: "_unloadData",
179
- value: function _unloadData() {} // Hack: Don't do anything, since "loading" means registering a handler, and we don't need
180
- // to unregister it.
181
-
182
- /** @internal */
183
-
184
- }, {
185
- key: "_dataOrNullIfDeleted",
186
- get: function get() {
187
- return (0, _error_utils.invariant)(false, 'The `data` property of PerformRecordAction should not be referenced');
166
+ value: function _unloadData() {
167
+ // Hack: Don't do anything, since "loading" means registering a handler, and we don't need
168
+ // to unregister it.
188
169
  }
189
- /**
190
- * This accessor method is defined because the parent implementation uses _dataOrNullIfDeleted
191
- *
192
- * @inheritdoc */
193
170
 
194
- }, {
195
- key: "isDeleted",
196
- get: function get() {
197
- return false;
198
- }
171
+ /** @internal */
199
172
  }], [{
200
173
  key: "_isWatchableKey",
201
174
  value: function _isWatchableKey(key) {
@@ -209,7 +182,6 @@ function (_AbstractModelWithAsy) {
209
182
  return key === WatchablePerformRecordActionKeys.recordActionData;
210
183
  }
211
184
  }]);
212
- return PerformRecordAction;
213
185
  }(_abstract_model_with_async_data.default);
214
186
  /**
215
187
  * Registers a callback to handle "open block" / "perform record action" events (from button field).
@@ -267,25 +239,19 @@ function (_AbstractModelWithAsy) {
267
239
  * ```
268
240
  *
269
241
  */
270
-
271
-
272
- exports.PerformRecordAction = PerformRecordAction;
273
-
274
242
  function registerRecordActionDataCallback(callback) {
275
243
  var _sdk2 = sdk,
276
- performRecordAction = _sdk2.performRecordAction;
277
-
244
+ performRecordAction = _sdk2.performRecordAction;
278
245
  var wrappedCallback = (model, key, data) => {
279
246
  callback(data);
280
247
  };
281
-
282
248
  performRecordAction.watch(WatchablePerformRecordActionKeys.recordActionData, wrappedCallback);
283
249
  return () => performRecordAction.unwatch(WatchablePerformRecordActionKeys.recordActionData, wrappedCallback);
284
250
  }
251
+ var sdk;
285
252
 
286
- var sdk; // The application-level Sdk instance must be injected dynamically to avoid
253
+ // The application-level Sdk instance must be injected dynamically to avoid
287
254
  // circular dependencies at the time of module resolution.
288
-
289
255
  function __injectSdkIntoPerformRecordAction(_sdk) {
290
256
  sdk = _sdk;
291
257
  }