@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,96 +1,68 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.array.from.js");
4
+ require("core-js/modules/es.array.slice.js");
5
+ require("core-js/modules/es.regexp.exec.js");
6
+ require("core-js/modules/es.regexp.to-string.js");
3
7
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- require("core-js/modules/es.symbol");
6
-
7
- require("core-js/modules/es.symbol.description");
8
-
9
- require("core-js/modules/es.array.filter");
10
-
11
- require("core-js/modules/es.array.flat-map");
12
-
13
- require("core-js/modules/es.array.includes");
14
-
15
- require("core-js/modules/es.array.iterator");
16
-
17
- require("core-js/modules/es.array.map");
18
-
19
- require("core-js/modules/es.array.unscopables.flat-map");
20
-
21
- require("core-js/modules/es.object.to-string");
22
-
23
- require("core-js/modules/es.promise");
24
-
25
- require("core-js/modules/es.set");
26
-
27
- require("core-js/modules/es.string.includes");
28
-
29
- require("core-js/modules/web.dom-collections.iterator");
30
-
31
- require("core-js/modules/web.url.to-json");
32
-
33
8
  Object.defineProperty(exports, "__esModule", {
34
9
  value: true
35
10
  });
36
11
  exports.default = void 0;
37
-
38
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
39
-
40
12
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
41
-
42
- require("regenerator-runtime/runtime");
43
-
13
+ require("core-js/modules/es.symbol.js");
14
+ require("core-js/modules/es.symbol.description.js");
15
+ require("core-js/modules/es.array.filter.js");
16
+ require("core-js/modules/es.array.flat-map.js");
17
+ require("core-js/modules/es.array.includes.js");
18
+ require("core-js/modules/es.array.iterator.js");
19
+ require("core-js/modules/es.array.map.js");
20
+ require("core-js/modules/es.array.unscopables.flat-map.js");
21
+ require("core-js/modules/es.object.to-string.js");
22
+ require("core-js/modules/es.promise.js");
23
+ require("core-js/modules/es.set.js");
24
+ require("core-js/modules/es.string.includes.js");
25
+ require("core-js/modules/web.dom-collections.iterator.js");
26
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
27
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
44
28
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
45
-
46
29
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
47
-
48
30
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
49
-
50
31
  var _airtable_interface = require("../types/airtable_interface");
51
-
52
32
  var _mutations = require("../types/mutations");
53
-
54
33
  var _private_utils = require("../private_utils");
55
-
56
34
  var _error_utils = require("../error_utils");
57
-
58
35
  var _mutation_constants = require("./mutation_constants");
59
-
36
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
37
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
38
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
60
39
  // Limit for how many items can be updated from a single batch mutation.
61
40
  // This is number of records for MULTIPLE_RECORDS type mutations, and number of global config paths
62
41
  // for SET_MULTIPLE_GLOBAL_CONFIG_PATHS.
63
42
  // Same limit is enforced liveapp-side
64
- var MUTATIONS_MAX_BATCH_SIZE = 50; // Liveapp requests must be under 2mb in size: we enforce a 1.9mb limit here to allow space for
65
- // the other parts of the request
43
+ var MUTATIONS_MAX_BATCH_SIZE = 50;
66
44
 
45
+ // Liveapp requests must be under 2mb in size: we enforce a 1.9mb limit here to allow space for
46
+ // the other parts of the request
67
47
  var MUTATIONS_MAX_BODY_SIZE = 1.9 * 1024 * 1024;
68
48
  var MUTATION_HOLD_FOR_MS = 100;
69
- /** @internal */
70
-
71
- var Mutations =
72
- /*#__PURE__*/
73
- function () {
74
- /** @internal */
75
-
76
- /** @internal */
77
-
78
- /** @internal */
79
-
80
- /** @internal */
81
-
82
- /** @internal */
83
-
84
- /** @internal */
85
49
 
50
+ /** @internal */
51
+ var Mutations = /*#__PURE__*/function () {
86
52
  /** @hidden */
87
53
  function Mutations(sdk, session, base, applyModelChanges, applyGlobalConfigUpdates) {
88
54
  (0, _classCallCheck2.default)(this, Mutations);
55
+ /** @internal */
89
56
  (0, _defineProperty2.default)(this, "_airtableInterface", void 0);
57
+ /** @internal */
90
58
  (0, _defineProperty2.default)(this, "_session", void 0);
59
+ /** @internal */
91
60
  (0, _defineProperty2.default)(this, "_sdk", void 0);
61
+ /** @internal */
92
62
  (0, _defineProperty2.default)(this, "_base", void 0);
63
+ /** @internal */
93
64
  (0, _defineProperty2.default)(this, "_applyModelChanges", void 0);
65
+ /** @internal */
94
66
  (0, _defineProperty2.default)(this, "_applyGlobalConfigUpdates", void 0);
95
67
  this._airtableInterface = sdk.__airtableInterface;
96
68
  this._session = session;
@@ -99,54 +71,44 @@ function () {
99
71
  this._applyModelChanges = applyModelChanges;
100
72
  this._applyGlobalConfigUpdates = applyGlobalConfigUpdates;
101
73
  }
102
- /** @hidden */
103
-
104
74
 
105
- (0, _createClass2.default)(Mutations, [{
75
+ /** @hidden */
76
+ return (0, _createClass2.default)(Mutations, [{
106
77
  key: "applyMutationAsync",
107
- value: function applyMutationAsync(mutation) {
108
- var permissionCheck, didApplyOptimisticUpdates;
109
- return _regenerator.default.async(function applyMutationAsync$(_context) {
110
- while (1) {
111
- switch (_context.prev = _context.next) {
78
+ value: (function () {
79
+ var _applyMutationAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(mutation) {
80
+ var permissionCheck, didApplyOptimisticUpdates;
81
+ return _regenerator.default.wrap(function _callee$(_context) {
82
+ while (1) switch (_context.prev = _context.next) {
112
83
  case 0:
113
- this._assertMutationIsValid(mutation); // Limit check is after validity check so that we display errors for when users pass in
84
+ this._assertMutationIsValid(mutation);
85
+ // Limit check is after validity check so that we display errors for when users pass in
114
86
  // objects correctly (eg updating linked records cell value to be a record object) -
115
87
  // otherwise the limit check will fail due to circular objects being converted to JSON first
116
-
117
-
118
88
  this._assertMutationUnderLimits(mutation);
119
-
120
89
  permissionCheck = this.checkPermissionsForMutation(mutation);
121
-
122
90
  if (permissionCheck.hasPermission) {
123
91
  _context.next = 5;
124
92
  break;
125
93
  }
126
-
127
94
  throw (0, _error_utils.spawnError)('Cannot apply %s mutation: %s', mutation.type, permissionCheck.reasonDisplayString);
128
-
129
95
  case 5:
130
96
  didApplyOptimisticUpdates = this._applyOptimisticUpdatesForMutation(mutation);
131
97
  _context.prev = 6;
132
98
  _context.next = 9;
133
- return _regenerator.default.awrap(this._airtableInterface.applyMutationAsync(mutation, {
99
+ return this._airtableInterface.applyMutationAsync(mutation, {
134
100
  holdForMs: MUTATION_HOLD_FOR_MS
135
- }));
136
-
101
+ });
137
102
  case 9:
138
103
  _context.next = 20;
139
104
  break;
140
-
141
105
  case 11:
142
106
  _context.prev = 11;
143
107
  _context.t0 = _context["catch"](6);
144
-
145
108
  if (!didApplyOptimisticUpdates) {
146
109
  _context.next = 19;
147
110
  break;
148
111
  }
149
-
150
112
  // if we applied optimistic updates, we can't gracefully handle a promise rejection
151
113
  // here - we can't un-apply optimistic updates, so the SDK's internal data model is
152
114
  // in an unexpected state. Instead of letting this promise get rejected, throw an
@@ -157,31 +119,30 @@ function () {
157
119
  throw _context.t0;
158
120
  }, 0);
159
121
  _context.next = 17;
160
- return _regenerator.default.awrap(new Promise(() => {}));
161
-
122
+ return new Promise(() => {});
162
123
  case 17:
163
124
  _context.next = 20;
164
125
  break;
165
-
166
126
  case 19:
167
127
  throw _context.t0;
168
-
169
128
  case 20:
170
129
  case "end":
171
130
  return _context.stop();
172
131
  }
173
- }
174
- }, null, this, [[6, 11]]);
175
- }
176
- /** @hidden */
177
-
132
+ }, _callee, this, [[6, 11]]);
133
+ }));
134
+ function applyMutationAsync(_x) {
135
+ return _applyMutationAsync.apply(this, arguments);
136
+ }
137
+ return applyMutationAsync;
138
+ }() /** @hidden */)
178
139
  }, {
179
140
  key: "checkPermissionsForMutation",
180
141
  value: function checkPermissionsForMutation(mutation) {
181
142
  return this._airtableInterface.checkPermissionsForMutation(mutation, this._base.__getBaseData());
182
143
  }
183
- /** @internal */
184
144
 
145
+ /** @internal */
185
146
  }, {
186
147
  key: "_assertMutationUnderLimits",
187
148
  value: function _assertMutationUnderLimits(mutation) {
@@ -192,13 +153,12 @@ function () {
192
153
  if (encodeURIComponent(JSON.stringify(mutation)).length > MUTATIONS_MAX_BODY_SIZE) {
193
154
  throw (0, _error_utils.spawnError)('Request exceeds maximum size limit of %s bytes', MUTATIONS_MAX_BODY_SIZE);
194
155
  }
195
-
196
156
  if (this._doesMutationExceedBatchSizeLimit(mutation)) {
197
157
  throw (0, _error_utils.spawnError)('Request exceeds maximum batch size limit of %s items', MUTATIONS_MAX_BATCH_SIZE);
198
158
  }
199
159
  }
200
- /** @internal */
201
160
 
161
+ /** @internal */
202
162
  }, {
203
163
  key: "_doesMutationExceedBatchSizeLimit",
204
164
  value: function _doesMutationExceedBatchSizeLimit(mutation) {
@@ -206,22 +166,19 @@ function () {
206
166
  case _mutations.MutationTypes.SET_MULTIPLE_RECORDS_CELL_VALUES:
207
167
  case _mutations.MutationTypes.CREATE_MULTIPLE_RECORDS:
208
168
  return mutation.records.length > MUTATIONS_MAX_BATCH_SIZE;
209
-
210
169
  case _mutations.MutationTypes.DELETE_MULTIPLE_RECORDS:
211
170
  return mutation.recordIds.length > MUTATIONS_MAX_BATCH_SIZE;
212
-
213
171
  case _mutations.MutationTypes.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
214
172
  return mutation.updates.length > MUTATIONS_MAX_BATCH_SIZE;
215
173
  // The "default" case cannot be reached because this method is only
216
174
  // invoked after the mutation type has been validated.
217
175
  // istanbul ignore next
218
-
219
176
  default:
220
177
  return false;
221
178
  }
222
179
  }
223
- /** @internal */
224
180
 
181
+ /** @internal */
225
182
  }, {
226
183
  key: "_assertFieldIsValidForMutation",
227
184
  value: function _assertFieldIsValidForMutation(field) {
@@ -229,28 +186,26 @@ function () {
229
186
  throw (0, _error_utils.spawnError)("Can't set cell values: Field '%s' is computed and cannot be set", field.name);
230
187
  }
231
188
  }
232
- /** @internal */
233
189
 
190
+ /** @internal */
234
191
  }, {
235
192
  key: "_assertFieldNameIsValidForMutation",
236
193
  value: function _assertFieldNameIsValidForMutation(name, table) {
237
194
  if (!name) {
238
195
  throw (0, _error_utils.spawnError)("Can't create or update field: must provide non-empty name");
239
196
  }
240
-
241
197
  if (name.length > _mutation_constants.MAX_FIELD_NAME_LENGTH) {
242
198
  throw (0, _error_utils.spawnError)("Can't create or update field: name '%s' exceeds maximum length of %s characters", name, _mutation_constants.MAX_FIELD_NAME_LENGTH);
243
- } // Verify the new name doesn't collide with any existing field name.
244
-
199
+ }
245
200
 
201
+ // Verify the new name doesn't collide with any existing field name.
246
202
  var existingLowercaseFieldNames = table.fields.map(field => field.name.toLowerCase());
247
-
248
203
  if (existingLowercaseFieldNames.includes(name.toLowerCase())) {
249
204
  throw (0, _error_utils.spawnError)("Can't create or update field: field with name '%s' already exists", name);
250
205
  }
251
206
  }
252
- /** @internal */
253
207
 
208
+ /** @internal */
254
209
  }, {
255
210
  key: "_assertMutationIsValid",
256
211
  value: function _assertMutationIsValid(mutation) {
@@ -262,61 +217,48 @@ function () {
262
217
  // validations - it wouldn't cause issues outside of the block frame. But running them
263
218
  // gives us slightly more confidence that we can do something other than completely crash
264
219
  // the block in the event of an invalid mutation.
220
+
265
221
  var appInterface = this._sdk.__appInterface;
266
222
  var billingPlanGrouping = this._base.__billingPlanGrouping;
267
-
268
223
  switch (mutation.type) {
269
224
  case _mutations.MutationTypes.SET_MULTIPLE_RECORDS_CELL_VALUES:
270
225
  {
271
226
  var tableId = mutation.tableId,
272
- records = mutation.records;
273
-
227
+ records = mutation.records;
274
228
  var table = this._base.getTableByIdIfExists(tableId);
275
-
276
229
  if (!table) {
277
230
  throw (0, _error_utils.spawnError)("Can't set cell values: No table with id %s exists", tableId);
278
- } // For every mutation, we check that we're not trying to set fields that we don't support
231
+ }
232
+
233
+ // For every mutation, we check that we're not trying to set fields that we don't support
279
234
  // mutations for yet. When record data is loaded, we also check that the record we're
280
235
  // updating actually exists and that the cell values are valid.
281
-
282
-
283
236
  var recordStore = this._base.__getRecordStore(tableId);
284
-
285
237
  var checkedFieldIds = new Set();
286
- var _iteratorNormalCompletion = true;
287
- var _didIteratorError = false;
288
- var _iteratorError = undefined;
289
-
238
+ var _iterator = _createForOfIteratorHelper(records),
239
+ _step;
290
240
  try {
291
- for (var _iterator = records[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
241
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
292
242
  var record = _step.value;
293
243
  var existingRecord = null;
294
-
295
244
  if (recordStore.isRecordMetadataLoaded) {
296
245
  existingRecord = recordStore.getRecordByIdIfExists(record.id);
297
-
298
246
  if (!existingRecord) {
299
247
  throw (0, _error_utils.spawnError)("Can't set cell values: No record with id %s exists", record.id);
300
248
  }
301
249
  }
302
-
303
250
  for (var _i = 0, _Object$keys = Object.keys(record.cellValuesByFieldId); _i < _Object$keys.length; _i++) {
304
251
  var fieldId = _Object$keys[_i];
305
252
  var field = table.getFieldByIdIfExists(fieldId);
306
-
307
253
  if (!field) {
308
254
  throw (0, _error_utils.spawnError)("Can't set cell values: No field with id %s exists in table '%s'", fieldId, table.name);
309
255
  }
310
-
311
256
  if (!checkedFieldIds.has(fieldId)) {
312
257
  this._assertFieldIsValidForMutation(field);
313
-
314
258
  checkedFieldIds.add(fieldId);
315
259
  }
316
-
317
260
  if (existingRecord && recordStore.areCellValuesLoadedForFieldId(fieldId)) {
318
261
  var validationResult = this._airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, record.cellValuesByFieldId[fieldId], existingRecord._getRawCellValue(field), field._data);
319
-
320
262
  if (!validationResult.isValid) {
321
263
  throw (0, _error_utils.spawnError)("Can't set cell values: invalid cell value for field '%s'.\n%s", field.name, validationResult.reason);
322
264
  }
@@ -324,132 +266,79 @@ function () {
324
266
  }
325
267
  }
326
268
  } catch (err) {
327
- _didIteratorError = true;
328
- _iteratorError = err;
269
+ _iterator.e(err);
329
270
  } finally {
330
- try {
331
- if (!_iteratorNormalCompletion && _iterator.return != null) {
332
- _iterator.return();
333
- }
334
- } finally {
335
- if (_didIteratorError) {
336
- throw _iteratorError;
337
- }
338
- }
271
+ _iterator.f();
339
272
  }
340
-
341
273
  return;
342
274
  }
343
-
344
275
  case _mutations.MutationTypes.DELETE_MULTIPLE_RECORDS:
345
276
  {
346
277
  var _tableId = mutation.tableId,
347
- recordIds = mutation.recordIds;
348
-
278
+ recordIds = mutation.recordIds;
349
279
  var _table = this._base.getTableByIdIfExists(_tableId);
350
-
351
280
  if (!_table) {
352
281
  throw (0, _error_utils.spawnError)("Can't delete records: No table with id %s exists", _tableId);
353
282
  }
354
-
355
283
  var _recordStore = this._base.__getRecordStore(_tableId);
356
-
357
284
  if (_recordStore.isRecordMetadataLoaded) {
358
- var _iteratorNormalCompletion2 = true;
359
- var _didIteratorError2 = false;
360
- var _iteratorError2 = undefined;
361
-
285
+ var _iterator2 = _createForOfIteratorHelper(recordIds),
286
+ _step2;
362
287
  try {
363
- for (var _iterator2 = recordIds[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
288
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
364
289
  var recordId = _step2.value;
365
-
366
290
  var _record = _recordStore.getRecordByIdIfExists(recordId);
367
-
368
291
  if (!_record) {
369
292
  throw (0, _error_utils.spawnError)("Can't delete records: No record with id %s exists in table '%s'", recordId, _table.name);
370
293
  }
371
294
  }
372
295
  } catch (err) {
373
- _didIteratorError2 = true;
374
- _iteratorError2 = err;
296
+ _iterator2.e(err);
375
297
  } finally {
376
- try {
377
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
378
- _iterator2.return();
379
- }
380
- } finally {
381
- if (_didIteratorError2) {
382
- throw _iteratorError2;
383
- }
384
- }
298
+ _iterator2.f();
385
299
  }
386
300
  }
387
-
388
301
  return;
389
302
  }
390
-
391
303
  case _mutations.MutationTypes.CREATE_MULTIPLE_RECORDS:
392
304
  {
393
305
  var _tableId2 = mutation.tableId,
394
- _records = mutation.records;
395
-
306
+ _records = mutation.records;
396
307
  var _checkedFieldIds = new Set();
397
-
398
308
  var _table2 = this._base.getTableByIdIfExists(_tableId2);
399
-
400
309
  if (!_table2) {
401
310
  throw (0, _error_utils.spawnError)("Can't create records: No table with id %s exists", _tableId2);
402
311
  }
403
-
404
- var _iteratorNormalCompletion3 = true;
405
- var _didIteratorError3 = false;
406
- var _iteratorError3 = undefined;
407
-
312
+ var _iterator3 = _createForOfIteratorHelper(_records),
313
+ _step3;
408
314
  try {
409
- for (var _iterator3 = _records[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
315
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
410
316
  var _record2 = _step3.value;
411
-
412
317
  for (var _i2 = 0, _Object$keys2 = Object.keys(_record2.cellValuesByFieldId); _i2 < _Object$keys2.length; _i2++) {
413
318
  var _fieldId = _Object$keys2[_i2];
414
-
415
319
  var _field = _table2.getFieldByIdIfExists(_fieldId);
416
-
417
320
  if (!_field) {
418
321
  throw (0, _error_utils.spawnError)("Can't create records: No field with id %s exists in table '%s'", _fieldId, _table2.name);
419
322
  }
420
-
421
323
  if (!_checkedFieldIds.has(_fieldId)) {
422
324
  this._assertFieldIsValidForMutation(_field);
423
-
424
325
  _checkedFieldIds.add(_fieldId);
425
- } // Current cell value is null since the record doesn't exist.
426
-
326
+ }
427
327
 
328
+ // Current cell value is null since the record doesn't exist.
428
329
  var _validationResult = this._airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, _record2.cellValuesByFieldId[_fieldId], null, _field._data);
429
-
430
330
  if (!_validationResult.isValid) {
431
331
  throw (0, _error_utils.spawnError)("Can't create records: invalid cell value for field '%s'.\n%s", _field.name, _validationResult.reason);
432
332
  }
433
333
  }
434
334
  }
435
335
  } catch (err) {
436
- _didIteratorError3 = true;
437
- _iteratorError3 = err;
336
+ _iterator3.e(err);
438
337
  } finally {
439
- try {
440
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
441
- _iterator3.return();
442
- }
443
- } finally {
444
- if (_didIteratorError3) {
445
- throw _iteratorError3;
446
- }
447
- }
338
+ _iterator3.f();
448
339
  }
449
-
450
340
  return;
451
341
  }
452
-
453
342
  case _mutations.MutationTypes.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
454
343
  {
455
344
  // globalConfig update is a special case: globalConfig handles validation before
@@ -457,247 +346,181 @@ function () {
457
346
  // paths being set.
458
347
  return;
459
348
  }
460
-
461
349
  case _mutations.MutationTypes.CREATE_SINGLE_FIELD:
462
350
  {
463
351
  var _tableId3 = mutation.tableId,
464
- name = mutation.name,
465
- config = mutation.config,
466
- description = mutation.description;
467
-
352
+ name = mutation.name,
353
+ config = mutation.config,
354
+ description = mutation.description;
468
355
  var _table3 = this._base.getTableByIdIfExists(_tableId3);
469
-
470
356
  if (!_table3) {
471
357
  throw (0, _error_utils.spawnError)("Can't create field: No table with id %s exists", _tableId3);
472
358
  }
473
-
474
359
  if (_table3.fields.length >= _mutation_constants.MAX_NUM_FIELDS_PER_TABLE) {
475
360
  throw (0, _error_utils.spawnError)("Can't create field: table already has the maximum of %s fields", _mutation_constants.MAX_NUM_FIELDS_PER_TABLE);
476
361
  }
362
+ this._assertFieldNameIsValidForMutation(name, _table3);
477
363
 
478
- this._assertFieldNameIsValidForMutation(name, _table3); // Current config / field data is null since the field doesn't exist.
479
-
480
-
364
+ // Current config / field data is null since the field doesn't exist.
481
365
  var _validationResult2 = this._airtableInterface.fieldTypeProvider.validateConfigForUpdate(appInterface, config, null, null, billingPlanGrouping);
482
-
483
366
  if (!_validationResult2.isValid) {
484
367
  throw (0, _error_utils.spawnError)("Can't create field: invalid field config.\n%s", _validationResult2.reason);
485
368
  }
486
-
487
369
  if (description && description.length > _mutation_constants.MAX_FIELD_DESCRIPTION_LENGTH) {
488
370
  throw (0, _error_utils.spawnError)("Can't create field: description exceeds maximum length of %s characters", _mutation_constants.MAX_FIELD_DESCRIPTION_LENGTH);
489
371
  }
490
-
491
372
  return;
492
373
  }
493
-
494
374
  case _mutations.MutationTypes.UPDATE_SINGLE_FIELD_CONFIG:
495
375
  {
496
376
  var _tableId4 = mutation.tableId,
497
- id = mutation.id,
498
- _config = mutation.config,
499
- opts = mutation.opts;
500
-
377
+ id = mutation.id,
378
+ _config = mutation.config,
379
+ opts = mutation.opts;
501
380
  var _table4 = this._base.getTableByIdIfExists(_tableId4);
502
-
503
381
  if (!_table4) {
504
382
  throw (0, _error_utils.spawnError)("Can't update field: No table with id %s exists", _tableId4);
505
383
  }
506
-
507
384
  var _field2 = _table4.getFieldByIdIfExists(id);
508
-
509
385
  if (!_field2) {
510
386
  throw (0, _error_utils.spawnError)("Can't update field: No field with id %s exists", id);
511
- } // we get the config directly instead of using field.type/field.options to get it
387
+ }
388
+
389
+ // we get the config directly instead of using field.type/field.options to get it
512
390
  // in one call and because field.options returns null instead of undefined when
513
391
  // a field does not have options, whilst we need to pass undefined
514
-
515
-
516
392
  var currentConfig = this._airtableInterface.fieldTypeProvider.getConfig(appInterface, _field2._data, _field2.parentTable.__getFieldNamesById());
517
-
518
393
  var _validationResult3 = this._airtableInterface.fieldTypeProvider.validateConfigForUpdate(appInterface, _config, currentConfig, _field2._data, billingPlanGrouping, opts);
519
-
520
394
  if (!_validationResult3.isValid) {
521
395
  throw (0, _error_utils.spawnError)("Can't update field: invalid field config.\n%s", _validationResult3.reason);
522
396
  }
523
-
524
397
  return;
525
398
  }
526
-
527
399
  case _mutations.MutationTypes.UPDATE_SINGLE_FIELD_DESCRIPTION:
528
400
  {
529
401
  var _tableId5 = mutation.tableId,
530
- _id = mutation.id,
531
- _description = mutation.description;
532
-
402
+ _id = mutation.id,
403
+ _description = mutation.description;
533
404
  var _table5 = this._base.getTableByIdIfExists(_tableId5);
534
-
535
405
  if (!_table5) {
536
406
  throw (0, _error_utils.spawnError)("Can't update field: No table with id %s exists", _tableId5);
537
407
  }
538
-
539
408
  var _field3 = _table5.getFieldByIdIfExists(_id);
540
-
541
409
  if (!_field3) {
542
410
  throw (0, _error_utils.spawnError)("Can't update field: No field with id %s exists", _id);
543
411
  }
544
-
545
412
  if (_description && _description.length > _mutation_constants.MAX_FIELD_DESCRIPTION_LENGTH) {
546
413
  throw (0, _error_utils.spawnError)("Can't update field: description exceeds maximum length of %s characters", _mutation_constants.MAX_FIELD_DESCRIPTION_LENGTH);
547
414
  }
548
-
549
415
  return;
550
416
  }
551
-
552
417
  case _mutations.MutationTypes.UPDATE_SINGLE_FIELD_NAME:
553
418
  {
554
419
  var _tableId6 = mutation.tableId,
555
- _id2 = mutation.id,
556
- _name = mutation.name;
557
-
420
+ _id2 = mutation.id,
421
+ _name = mutation.name;
558
422
  var _table6 = this._base.getTableByIdIfExists(_tableId6);
559
-
560
423
  if (!_table6) {
561
424
  throw (0, _error_utils.spawnError)("Can't update field: No table with id %s exists", _tableId6);
562
425
  }
563
-
564
426
  var _field4 = _table6.getFieldByIdIfExists(_id2);
565
-
566
427
  if (!_field4) {
567
428
  throw (0, _error_utils.spawnError)("Can't update field: No field with id %s exists", _id2);
568
- } // We skip name validation if it's the same name:
429
+ }
430
+
431
+ // We skip name validation if it's the same name:
569
432
  // If it's exactly same name, this will result in no-op;
570
433
  // If it's only case change, we allow update and we know this name is already validated before;
571
-
572
-
573
434
  if (_field4.name.toLowerCase() !== _name.toLowerCase()) {
574
435
  this._assertFieldNameIsValidForMutation(_name, _table6);
575
436
  }
576
-
577
437
  return;
578
438
  }
579
-
580
439
  case _mutations.MutationTypes.CREATE_SINGLE_TABLE:
581
440
  {
582
441
  var _name2 = mutation.name,
583
- fields = mutation.fields;
584
-
442
+ fields = mutation.fields;
585
443
  if (!_name2) {
586
444
  throw (0, _error_utils.spawnError)("Can't create table: must provide non-empty name");
587
445
  }
588
-
589
446
  if (_name2.length > _mutation_constants.MAX_TABLE_NAME_LENGTH) {
590
447
  throw (0, _error_utils.spawnError)("Can't create table: name '%s' exceeds maximum length of %s characters", _name2, _mutation_constants.MAX_TABLE_NAME_LENGTH);
591
448
  }
592
-
593
449
  var existingLowercaseTableNames = this._base.tables.map(table => table.name.toLowerCase());
594
-
595
450
  if (existingLowercaseTableNames.includes(_name2.toLowerCase())) {
596
451
  throw (0, _error_utils.spawnError)("Can't create table: table with name '%s' already exists", _name2);
597
452
  }
598
-
599
453
  if (fields.length === 0) {
600
454
  throw (0, _error_utils.spawnError)("Can't create table: must specify at least one field");
601
455
  }
602
-
603
456
  if (fields.length > _mutation_constants.MAX_NUM_FIELDS_PER_TABLE) {
604
457
  throw (0, _error_utils.spawnError)("Can't create table: number of fields exceeds maximum of %s", _mutation_constants.MAX_NUM_FIELDS_PER_TABLE);
605
458
  }
606
-
607
459
  var lowercaseFieldNames = new Set();
608
- var _iteratorNormalCompletion4 = true;
609
- var _didIteratorError4 = false;
610
- var _iteratorError4 = undefined;
611
-
460
+ var _iterator4 = _createForOfIteratorHelper(fields),
461
+ _step4;
612
462
  try {
613
- for (var _iterator4 = fields[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
463
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
614
464
  var _field5 = _step4.value;
615
-
616
465
  if (!_field5.name) {
617
466
  throw (0, _error_utils.spawnError)("Can't create table: must provide non-empty name for every field");
618
467
  }
619
-
620
468
  if (_field5.name.length > _mutation_constants.MAX_FIELD_NAME_LENGTH) {
621
469
  throw (0, _error_utils.spawnError)("Can't create table: field name '%s' exceeds maximum length of %s characters", _field5.name, _mutation_constants.MAX_FIELD_NAME_LENGTH);
622
470
  }
623
-
624
471
  var lowercaseFieldName = _field5.name.toLowerCase();
625
-
626
472
  if (lowercaseFieldNames.has(lowercaseFieldName)) {
627
473
  throw (0, _error_utils.spawnError)("Can't create table: duplicate field name '%s'", _field5.name);
628
474
  }
475
+ lowercaseFieldNames.add(lowercaseFieldName);
629
476
 
630
- lowercaseFieldNames.add(lowercaseFieldName); // Current config / field data is null since the field doesn't exist.
631
-
477
+ // Current config / field data is null since the field doesn't exist.
632
478
  var _validationResult4 = this._airtableInterface.fieldTypeProvider.validateConfigForUpdate(appInterface, _field5.config, null, null, billingPlanGrouping);
633
-
634
479
  if (!_validationResult4.isValid) {
635
480
  throw (0, _error_utils.spawnError)("Can't create table: invalid field config for field '%s'.\n%s", _field5.name, _validationResult4.reason);
636
481
  }
637
-
638
482
  if (_field5.description && _field5.description.length > _mutation_constants.MAX_FIELD_DESCRIPTION_LENGTH) {
639
483
  throw (0, _error_utils.spawnError)("Can't create table: description for field '%s' exceeds maximum length of %s characters", _field5.name, _mutation_constants.MAX_FIELD_DESCRIPTION_LENGTH);
640
484
  }
641
485
  }
642
486
  } catch (err) {
643
- _didIteratorError4 = true;
644
- _iteratorError4 = err;
487
+ _iterator4.e(err);
645
488
  } finally {
646
- try {
647
- if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
648
- _iterator4.return();
649
- }
650
- } finally {
651
- if (_didIteratorError4) {
652
- throw _iteratorError4;
653
- }
654
- }
489
+ _iterator4.f();
655
490
  }
656
-
657
491
  var primaryField = fields[0];
658
-
659
492
  if (!this._airtableInterface.fieldTypeProvider.canBePrimary(appInterface, primaryField.config, billingPlanGrouping)) {
660
493
  throw (0, _error_utils.spawnError)("Can't create table: first field '%s' has type '%s' which cannot be a primary field", primaryField.name, primaryField.config.type);
661
494
  }
662
-
663
495
  return;
664
496
  }
665
-
666
497
  case _mutations.MutationTypes.UPDATE_VIEW_METADATA:
667
498
  {
668
499
  var _tableId7 = mutation.tableId,
669
- viewId = mutation.viewId;
500
+ viewId = mutation.viewId;
670
501
  var runContext = this._airtableInterface.sdkInitData.runContext;
671
-
672
502
  if (runContext.type !== _airtable_interface.BlockRunContextType.VIEW) {
673
503
  throw (0, _error_utils.spawnError)('Setting view metadata is only valid for views');
674
504
  }
675
-
676
505
  if (runContext.viewId !== viewId || runContext.tableId !== _tableId7) {
677
506
  throw (0, _error_utils.spawnError)('Custom views can only set view metadata on themselves');
678
507
  }
679
-
680
508
  var _table7 = this._base.getTableByIdIfExists(_tableId7);
681
-
682
509
  if (!_table7) {
683
510
  throw (0, _error_utils.spawnError)("Can't update metadata: No table with id %s exists", _tableId7);
684
511
  }
685
-
686
512
  var view = _table7.getViewByIdIfExists(viewId);
687
-
688
513
  if (!view) {
689
514
  throw (0, _error_utils.spawnError)("Can't update metadata: No view with id %s exists", viewId);
690
515
  }
691
-
692
516
  return;
693
517
  }
694
-
695
518
  default:
696
519
  throw (0, _error_utils.spawnUnknownSwitchCaseError)('mutation type', mutation, 'type');
697
520
  }
698
521
  }
699
- /** @internal */
700
522
 
523
+ /** @internal */
701
524
  }, {
702
525
  key: "_applyOptimisticUpdatesForMutation",
703
526
  value: function _applyOptimisticUpdatesForMutation(mutation) {
@@ -706,22 +529,17 @@ function () {
706
529
  // SET_MULTIPLE_GLOBAL_CONFIG_PATHS we always apply optimistic updates.
707
530
  if (mutation.type === _mutations.MutationTypes.SET_MULTIPLE_GLOBAL_CONFIG_PATHS) {
708
531
  this._applyGlobalConfigUpdates(mutation.updates);
709
-
710
532
  return true;
711
533
  }
712
-
713
534
  var modelChanges = this._getOptimisticModelChangesForMutation(mutation);
714
-
715
535
  if (modelChanges.length > 0) {
716
536
  this._applyModelChanges(modelChanges);
717
-
718
537
  return true;
719
538
  }
720
-
721
539
  return false;
722
540
  }
723
- /** @internal */
724
541
 
542
+ /** @internal */
725
543
  }, {
726
544
  key: "_getOptimisticModelChangesForMutation",
727
545
  value: function _getOptimisticModelChangesForMutation(mutation) {
@@ -729,84 +547,59 @@ function () {
729
547
  case _mutations.MutationTypes.SET_MULTIPLE_RECORDS_CELL_VALUES:
730
548
  {
731
549
  var tableId = mutation.tableId,
732
- records = mutation.records;
733
-
550
+ records = mutation.records;
734
551
  var recordStore = this._base.__getRecordStore(tableId);
735
-
736
552
  return records.flatMap(record => Object.keys(record.cellValuesByFieldId).filter(fieldId => recordStore.areCellValuesLoadedForFieldId(fieldId)).map(fieldId => ({
737
553
  path: ['tablesById', tableId, 'recordsById', record.id, 'cellValuesByFieldId', fieldId],
738
554
  value: record.cellValuesByFieldId[fieldId]
739
555
  })));
740
556
  }
741
-
742
557
  case _mutations.MutationTypes.DELETE_MULTIPLE_RECORDS:
743
558
  {
744
559
  var _tableId8 = mutation.tableId,
745
- recordIds = mutation.recordIds;
746
-
560
+ recordIds = mutation.recordIds;
747
561
  var _recordStore2 = this._base.__getRecordStore(_tableId8);
748
-
749
562
  if (!_recordStore2.isRecordMetadataLoaded) {
750
563
  return [];
751
564
  }
752
-
753
565
  return [...recordIds.map(recordId => ({
754
566
  path: ['tablesById', _tableId8, 'recordsById', recordId],
755
567
  value: undefined
756
568
  })), ...this._base.getTableById(_tableId8).views.flatMap(view => {
757
569
  var viewDataStore = _recordStore2.getViewDataStore(view.id);
758
-
759
570
  if (!viewDataStore.isDataLoaded) {
760
571
  return [];
761
572
  }
762
-
763
573
  return viewDataStore.__generateChangesForParentTableDeleteMultipleRecords(recordIds);
764
574
  })];
765
575
  }
766
-
767
576
  case _mutations.MutationTypes.CREATE_MULTIPLE_RECORDS:
768
577
  {
769
578
  var _tableId9 = mutation.tableId,
770
- _records2 = mutation.records;
771
-
579
+ _records2 = mutation.records;
772
580
  var _recordStore3 = this._base.__getRecordStore(_tableId9);
773
-
774
581
  if (!_recordStore3.isRecordMetadataLoaded) {
775
582
  return [];
776
583
  }
777
-
778
584
  return [..._records2.map(record => {
779
585
  // Only apply optimistic changes for fields that are loaded
780
586
  var filteredCellValuesByFieldId = {};
781
- var _iteratorNormalCompletion5 = true;
782
- var _didIteratorError5 = false;
783
- var _iteratorError5 = undefined;
784
-
587
+ var _iterator5 = _createForOfIteratorHelper((0, _private_utils.entries)(record.cellValuesByFieldId)),
588
+ _step5;
785
589
  try {
786
- for (var _iterator5 = (0, _private_utils.entries)(record.cellValuesByFieldId)[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
590
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
787
591
  var _step5$value = (0, _slicedToArray2.default)(_step5.value, 2),
788
- fieldId = _step5$value[0],
789
- cellValue = _step5$value[1];
790
-
592
+ fieldId = _step5$value[0],
593
+ cellValue = _step5$value[1];
791
594
  if (_recordStore3.areCellValuesLoadedForFieldId(fieldId)) {
792
595
  filteredCellValuesByFieldId[fieldId] = cellValue;
793
596
  }
794
597
  }
795
598
  } catch (err) {
796
- _didIteratorError5 = true;
797
- _iteratorError5 = err;
599
+ _iterator5.e(err);
798
600
  } finally {
799
- try {
800
- if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
801
- _iterator5.return();
802
- }
803
- } finally {
804
- if (_didIteratorError5) {
805
- throw _iteratorError5;
806
- }
807
- }
601
+ _iterator5.f();
808
602
  }
809
-
810
603
  return {
811
604
  path: ['tablesById', _tableId9, 'recordsById', record.id],
812
605
  value: {
@@ -818,23 +611,20 @@ function () {
818
611
  };
819
612
  }), ...this._base.getTableById(_tableId9).views.flatMap(view => {
820
613
  var viewDataStore = _recordStore3.getViewDataStore(view.id);
821
-
822
614
  if (!viewDataStore.isDataLoaded) {
823
615
  return [];
824
616
  }
825
-
826
617
  return viewDataStore.__generateChangesForParentTableAddMultipleRecords(_records2.map(record => record.id));
827
618
  })];
828
619
  }
620
+
829
621
  // The following branch is unreachable because this method's only
830
622
  // call site is preceded by an explicit guard for this condition.
831
623
  // istanbul ignore next
832
-
833
624
  case _mutations.MutationTypes.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
834
625
  {
835
626
  throw (0, _error_utils.spawnError)('attempting to generate model updates for SET_MULTIPLE_GLOBAL_CONFIG_PATH');
836
627
  }
837
-
838
628
  case _mutations.MutationTypes.CREATE_SINGLE_FIELD:
839
629
  case _mutations.MutationTypes.UPDATE_SINGLE_FIELD_CONFIG:
840
630
  case _mutations.MutationTypes.UPDATE_SINGLE_FIELD_DESCRIPTION:
@@ -845,17 +635,14 @@ function () {
845
635
  // No optimistic updates for field, view metadata, or table mutations.
846
636
  return [];
847
637
  }
638
+
848
639
  // The following branch is unreachable because this method's only
849
640
  // call site is preceded by an explicit guard for this condition.
850
641
  // istanbul ignore next
851
-
852
642
  default:
853
643
  throw (0, _error_utils.spawnUnknownSwitchCaseError)('mutation type', mutation, 'type');
854
644
  }
855
645
  }
856
646
  }]);
857
- return Mutations;
858
647
  }();
859
-
860
- var _default = Mutations;
861
- exports.default = _default;
648
+ var _default = exports.default = Mutations;