@airtable/blocks 0.0.0-experimental-f52bc4e5e-20250709 → 0.0.0-experimental-75d011284-20250904
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.
- package/dist/cjs/base/assert_run_context.js +12 -0
- package/dist/cjs/base/index.js +30 -30
- package/dist/cjs/base/models/abstract_model_with_async_data.js +154 -237
- package/dist/cjs/base/models/base.js +188 -267
- package/dist/cjs/base/models/create_aggregators.js +29 -46
- package/dist/cjs/base/models/cursor.js +206 -294
- package/dist/cjs/base/models/field.js +307 -395
- package/dist/cjs/base/models/grouped_record_query_result.js +219 -338
- package/dist/cjs/base/models/linked_records_query_result.js +450 -625
- package/dist/cjs/base/models/models.js +19 -22
- package/dist/cjs/base/models/mutations.js +267 -293
- package/dist/cjs/base/models/object_pool.js +117 -156
- package/dist/cjs/base/models/record.js +191 -256
- package/dist/cjs/base/models/record_coloring.js +6 -6
- package/dist/cjs/base/models/record_query_result.js +351 -435
- package/dist/cjs/base/models/record_store.js +403 -753
- package/dist/cjs/base/models/session.js +125 -153
- package/dist/cjs/base/models/table.js +457 -605
- package/dist/cjs/base/models/table_or_view_query_result.js +656 -920
- package/dist/cjs/base/models/view.js +284 -389
- package/dist/cjs/base/models/view_data_store.js +218 -356
- package/dist/cjs/base/models/view_metadata_query_result.js +109 -157
- package/dist/cjs/base/perform_record_action.js +89 -131
- package/dist/cjs/base/sdk.js +129 -184
- package/dist/cjs/base/settings_button.js +54 -74
- package/dist/cjs/base/types/airtable_interface.js +1 -1
- package/dist/cjs/base/types/mutations.js +5 -11
- package/dist/cjs/base/types/undo_redo.js +1 -1
- package/dist/cjs/base/types/view.js +1 -1
- package/dist/cjs/base/ui/base_provider.js +6 -8
- package/dist/cjs/base/ui/baymax_utils.js +436 -108
- package/dist/cjs/base/ui/block_wrapper.js +81 -106
- package/dist/cjs/base/ui/box.js +34 -60
- package/dist/cjs/base/ui/button.js +44 -74
- package/dist/cjs/base/ui/cell_renderer.js +132 -189
- package/dist/cjs/base/ui/choice_token.js +25 -42
- package/dist/cjs/base/ui/collaborator_token.js +31 -53
- package/dist/cjs/base/ui/color_palette.js +130 -173
- package/dist/cjs/base/ui/color_palette_synced.js +41 -70
- package/dist/cjs/base/ui/confirmation_dialog.js +70 -120
- package/dist/cjs/base/ui/control_sizes.js +24 -22
- package/dist/cjs/base/ui/create_detect_element_resize.js +6 -10
- package/dist/cjs/base/ui/css_helpers.js +1 -1
- package/dist/cjs/base/ui/dialog.js +57 -98
- package/dist/cjs/base/ui/dialog_close_button.js +52 -98
- package/dist/cjs/base/ui/expand_record.js +1 -2
- package/dist/cjs/base/ui/expand_record_list.js +3 -4
- package/dist/cjs/base/ui/expand_record_picker_async.js +28 -57
- package/dist/cjs/base/ui/field_icon.js +15 -33
- package/dist/cjs/base/ui/field_picker.js +25 -70
- package/dist/cjs/base/ui/field_picker_synced.js +18 -40
- package/dist/cjs/base/ui/form_field.js +27 -55
- package/dist/cjs/base/ui/geometry/geometry.js +5 -5
- package/dist/cjs/base/ui/geometry/point.js +10 -12
- package/dist/cjs/base/ui/geometry/rect.js +36 -52
- package/dist/cjs/base/ui/geometry/size.js +10 -12
- package/dist/cjs/base/ui/global_alert.js +31 -52
- package/dist/cjs/base/ui/heading.js +45 -94
- package/dist/cjs/base/ui/icon.js +39 -59
- package/dist/cjs/base/ui/icon_config.js +6 -12
- package/dist/cjs/base/ui/initialize_block.js +16 -35
- package/dist/cjs/base/ui/input.js +62 -101
- package/dist/cjs/base/ui/input_synced.js +17 -40
- package/dist/cjs/base/ui/key_codes.js +2 -3
- package/dist/cjs/base/ui/label.js +30 -55
- package/dist/cjs/base/ui/link.js +54 -87
- package/dist/cjs/base/ui/loader.js +15 -36
- package/dist/cjs/base/ui/modal.js +88 -127
- package/dist/cjs/base/ui/model_picker_select.js +18 -44
- package/dist/cjs/base/ui/popover.js +236 -328
- package/dist/cjs/base/ui/progress_bar.js +34 -47
- package/dist/cjs/base/ui/record_card.js +389 -478
- package/dist/cjs/base/ui/record_card_list.js +150 -224
- package/dist/cjs/base/ui/select.js +60 -116
- package/dist/cjs/base/ui/select_and_select_buttons_helpers.js +15 -39
- package/dist/cjs/base/ui/select_buttons.js +50 -83
- package/dist/cjs/base/ui/select_buttons_synced.js +17 -39
- package/dist/cjs/base/ui/select_synced.js +17 -39
- package/dist/cjs/base/ui/switch.js +42 -71
- package/dist/cjs/base/ui/switch_synced.js +16 -38
- package/dist/cjs/base/ui/synced.js +27 -48
- package/dist/cjs/base/ui/system/all_styles_set.js +4 -12
- package/dist/cjs/base/ui/system/appearance/appearance_set.js +10 -13
- package/dist/cjs/base/ui/system/appearance/background_color.js +3 -6
- package/dist/cjs/base/ui/system/appearance/border.js +3 -6
- package/dist/cjs/base/ui/system/appearance/border_radius.js +3 -6
- package/dist/cjs/base/ui/system/appearance/box_shadow.js +3 -6
- package/dist/cjs/base/ui/system/appearance/opacity.js +3 -6
- package/dist/cjs/base/ui/system/dimensions/dimensions_set.js +11 -13
- package/dist/cjs/base/ui/system/dimensions/height.js +3 -6
- package/dist/cjs/base/ui/system/dimensions/max_height.js +3 -6
- package/dist/cjs/base/ui/system/dimensions/max_width.js +3 -6
- package/dist/cjs/base/ui/system/dimensions/min_height.js +3 -6
- package/dist/cjs/base/ui/system/dimensions/min_width.js +3 -6
- package/dist/cjs/base/ui/system/dimensions/width.js +3 -6
- package/dist/cjs/base/ui/system/display.js +3 -6
- package/dist/cjs/base/ui/system/flex_container/align_content.js +3 -6
- package/dist/cjs/base/ui/system/flex_container/align_items.js +3 -6
- package/dist/cjs/base/ui/system/flex_container/flex_container_set.js +11 -13
- package/dist/cjs/base/ui/system/flex_container/flex_direction.js +3 -6
- package/dist/cjs/base/ui/system/flex_container/flex_wrap.js +3 -6
- package/dist/cjs/base/ui/system/flex_container/justify_content.js +3 -6
- package/dist/cjs/base/ui/system/flex_container/justify_items.js +3 -6
- package/dist/cjs/base/ui/system/flex_item/align_self.js +3 -6
- package/dist/cjs/base/ui/system/flex_item/flex.js +3 -6
- package/dist/cjs/base/ui/system/flex_item/flex_basis.js +3 -6
- package/dist/cjs/base/ui/system/flex_item/flex_grow.js +3 -6
- package/dist/cjs/base/ui/system/flex_item/flex_item_set.js +12 -13
- package/dist/cjs/base/ui/system/flex_item/flex_shrink.js +3 -6
- package/dist/cjs/base/ui/system/flex_item/justify_self.js +3 -6
- package/dist/cjs/base/ui/system/flex_item/order.js +3 -6
- package/dist/cjs/base/ui/system/index.js +104 -416
- package/dist/cjs/base/ui/system/overflow.js +3 -6
- package/dist/cjs/base/ui/system/position/bottom.js +4 -6
- package/dist/cjs/base/ui/system/position/left.js +4 -6
- package/dist/cjs/base/ui/system/position/position.js +3 -6
- package/dist/cjs/base/ui/system/position/position_set.js +11 -13
- package/dist/cjs/base/ui/system/position/right.js +4 -6
- package/dist/cjs/base/ui/system/position/top.js +4 -6
- package/dist/cjs/base/ui/system/position/z_index.js +3 -6
- package/dist/cjs/base/ui/system/spacing/margin.js +4 -6
- package/dist/cjs/base/ui/system/spacing/padding.js +4 -6
- package/dist/cjs/base/ui/system/spacing/spacing_set.js +7 -13
- package/dist/cjs/base/ui/system/typography/font_family.js +3 -6
- package/dist/cjs/base/ui/system/typography/font_size.js +3 -6
- package/dist/cjs/base/ui/system/typography/font_style.js +3 -6
- package/dist/cjs/base/ui/system/typography/font_weight.js +3 -6
- package/dist/cjs/base/ui/system/typography/letter_spacing.js +3 -6
- package/dist/cjs/base/ui/system/typography/line_height.js +3 -6
- package/dist/cjs/base/ui/system/typography/text_align.js +3 -6
- package/dist/cjs/base/ui/system/typography/text_color.js +3 -6
- package/dist/cjs/base/ui/system/typography/text_decoration.js +3 -6
- package/dist/cjs/base/ui/system/typography/text_transform.js +3 -6
- package/dist/cjs/base/ui/system/typography/typography_set.js +15 -13
- package/dist/cjs/base/ui/system/utils/ensure_numbers_are_within_scale.js +3 -4
- package/dist/cjs/base/ui/system/utils/get_style_props_for_responsive_prop.js +47 -87
- package/dist/cjs/base/ui/table_picker.js +18 -42
- package/dist/cjs/base/ui/table_picker_synced.js +17 -39
- package/dist/cjs/base/ui/text.js +40 -73
- package/dist/cjs/base/ui/text_button.js +51 -83
- package/dist/cjs/base/ui/theme/default_theme/button_variants.js +3 -3
- package/dist/cjs/base/ui/theme/default_theme/control_sizes.js +51 -45
- package/dist/cjs/base/ui/theme/default_theme/heading_styles.js +1 -1
- package/dist/cjs/base/ui/theme/default_theme/index.js +9 -15
- package/dist/cjs/base/ui/theme/default_theme/input_variants.js +3 -3
- package/dist/cjs/base/ui/theme/default_theme/link_variants.js +3 -3
- package/dist/cjs/base/ui/theme/default_theme/select_buttons_variants.js +4 -4
- package/dist/cjs/base/ui/theme/default_theme/select_variants.js +8 -17
- package/dist/cjs/base/ui/theme/default_theme/switch_variants.js +23 -29
- package/dist/cjs/base/ui/theme/default_theme/text_button_variants.js +5 -5
- package/dist/cjs/base/ui/theme/default_theme/text_styles.js +1 -1
- package/dist/cjs/base/ui/theme/default_theme/tokens.js +14 -14
- package/dist/cjs/base/ui/theme/theme_context.js +2 -2
- package/dist/cjs/base/ui/theme/use_theme.js +2 -2
- package/dist/cjs/base/ui/tooltip.js +134 -174
- package/dist/cjs/base/ui/types/aria_props.js +1 -23
- package/dist/cjs/base/ui/types/data_attributes_prop.js +1 -18
- package/dist/cjs/base/ui/types/tooltip_anchor_props.js +1 -17
- package/dist/cjs/base/ui/ui.js +48 -49
- package/dist/cjs/base/ui/unstable_standalone_ui.js +27 -27
- package/dist/cjs/base/ui/use_base.js +1 -1
- package/dist/cjs/base/ui/use_cursor.js +5 -4
- package/dist/cjs/base/ui/use_form_field.js +1 -1
- package/dist/cjs/base/ui/use_loadable.js +25 -91
- package/dist/cjs/base/ui/use_record_action_data.js +4 -3
- package/dist/cjs/base/ui/use_records.js +9 -13
- package/dist/cjs/base/ui/use_session.js +1 -1
- package/dist/cjs/base/ui/use_settings_button.js +4 -3
- package/dist/cjs/base/ui/use_styled_system.js +7 -14
- package/dist/cjs/base/ui/use_text_color_for_background_color.js +4 -3
- package/dist/cjs/base/ui/use_view_metadata.js +4 -4
- package/dist/cjs/base/ui/use_viewport.js +2 -2
- package/dist/cjs/base/ui/view_picker.js +26 -70
- package/dist/cjs/base/ui/view_picker_synced.js +18 -40
- package/dist/cjs/base/ui/viewport_constraint.js +67 -114
- package/dist/cjs/base/ui/with_styled_system.js +25 -61
- package/dist/cjs/base/undo_redo.js +21 -32
- package/dist/cjs/base/unstable_testing_utils.js +27 -27
- package/dist/cjs/base/viewport.js +268 -312
- package/dist/cjs/injected/airtable_interface.js +4 -4
- package/dist/cjs/interface/assert_run_context.js +12 -0
- package/dist/cjs/interface/index.js +4 -18
- package/dist/cjs/interface/models/base.js +15 -34
- package/dist/cjs/interface/models/field.js +5 -19
- package/dist/cjs/interface/models/models.js +8 -7
- package/dist/cjs/interface/models/mutations.js +50 -66
- package/dist/cjs/interface/models/record.js +29 -49
- package/dist/cjs/interface/models/record_store.js +25 -57
- package/dist/cjs/interface/models/session.js +2 -16
- package/dist/cjs/interface/models/table.js +66 -95
- package/dist/cjs/interface/sdk.js +61 -87
- package/dist/cjs/interface/types/airtable_interface.js +2 -2
- package/dist/cjs/interface/types/mutations.js +3 -10
- package/dist/cjs/interface/ui/block_wrapper.js +56 -48
- package/dist/cjs/interface/ui/initialize_block.js +13 -28
- package/dist/cjs/interface/ui/ui.js +20 -19
- package/dist/cjs/interface/ui/use_base.js +1 -1
- package/dist/cjs/interface/ui/use_custom_properties.js +19 -35
- package/dist/cjs/interface/ui/use_records.js +6 -5
- package/dist/cjs/interface/ui/use_run_info.js +2 -2
- package/dist/cjs/interface/ui/use_session.js +1 -1
- package/dist/cjs/shared/color_utils.js +9 -16
- package/dist/cjs/shared/colors.js +2 -2
- package/dist/cjs/shared/error_utils.js +9 -11
- package/dist/cjs/shared/event_tracker.js +3 -3
- package/dist/cjs/shared/global_config.js +337 -449
- package/dist/cjs/shared/models/abstract_model.js +72 -97
- package/dist/cjs/shared/models/base_core.js +394 -514
- package/dist/cjs/shared/models/field_core.js +236 -279
- package/dist/cjs/shared/models/mutations_core.js +283 -379
- package/dist/cjs/shared/models/record_core.js +174 -231
- package/dist/cjs/shared/models/record_store_core.js +119 -172
- package/dist/cjs/shared/models/session_core.js +116 -170
- package/dist/cjs/shared/models/table_core.js +1258 -1501
- package/dist/cjs/shared/private_utils.js +54 -124
- package/dist/cjs/shared/sdk_core.js +68 -70
- package/dist/cjs/shared/types/field_core.js +1 -1
- package/dist/cjs/shared/types/mutation_constants.js +4 -4
- package/dist/cjs/shared/types/mutations_core.js +1 -1
- package/dist/cjs/shared/types/permission_levels.js +1 -1
- package/dist/cjs/shared/ui/global_config_synced_component_helpers.js +9 -9
- package/dist/cjs/shared/ui/loader.js +14 -35
- package/dist/cjs/shared/ui/remote_utils.js +5 -7
- package/dist/cjs/shared/ui/sdk_context.js +4 -8
- package/dist/cjs/shared/ui/use_array_identity.js +2 -2
- package/dist/cjs/shared/ui/use_base.js +6 -5
- package/dist/cjs/shared/ui/use_color_scheme.js +3 -8
- package/dist/cjs/shared/ui/use_global_config.js +5 -4
- package/dist/cjs/shared/ui/use_session.js +6 -5
- package/dist/cjs/shared/ui/use_synced.js +7 -5
- package/dist/cjs/shared/ui/use_watchable.js +13 -42
- package/dist/cjs/shared/ui/with_hooks.js +6 -13
- package/dist/cjs/shared/unstable_private_utils.js +4 -6
- package/dist/cjs/shared/warning.js +5 -5
- package/dist/cjs/shared/watchable.js +110 -176
- package/dist/cjs/stats/block_stats.js +62 -85
- package/dist/cjs/testing/base/abstract_mock_airtable_interface.js +208 -0
- package/dist/cjs/testing/interface/abstract_mock_airtable_interface.js +124 -0
- package/dist/types/src/base/assert_run_context.d.ts +2 -0
- package/dist/types/src/base/assert_run_context.d.ts.map +1 -0
- package/dist/types/src/base/index.d.ts +1 -0
- package/dist/types/src/base/index.d.ts.map +1 -1
- package/dist/types/src/base/models/models.d.ts +1 -0
- package/dist/types/src/base/models/models.d.ts.map +1 -1
- package/dist/types/src/base/models/mutations.d.ts.map +1 -1
- package/dist/types/src/base/sdk.d.ts.map +1 -1
- package/dist/types/src/base/ui/block_wrapper.d.ts +1 -1
- package/dist/types/src/base/ui/box.d.ts.map +1 -1
- package/dist/types/src/base/ui/button.d.ts +0 -5
- package/dist/types/src/base/ui/button.d.ts.map +1 -1
- package/dist/types/src/base/ui/cell_renderer.d.ts +1 -22
- package/dist/types/src/base/ui/cell_renderer.d.ts.map +1 -1
- package/dist/types/src/base/ui/choice_token.d.ts +1 -21
- package/dist/types/src/base/ui/choice_token.d.ts.map +1 -1
- package/dist/types/src/base/ui/collaborator_token.d.ts +0 -20
- package/dist/types/src/base/ui/collaborator_token.d.ts.map +1 -1
- package/dist/types/src/base/ui/color_palette.d.ts +1 -32
- package/dist/types/src/base/ui/color_palette.d.ts.map +1 -1
- package/dist/types/src/base/ui/color_palette_synced.d.ts +0 -14
- package/dist/types/src/base/ui/color_palette_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/confirmation_dialog.d.ts +0 -17
- package/dist/types/src/base/ui/confirmation_dialog.d.ts.map +1 -1
- package/dist/types/src/base/ui/control_sizes.d.ts +0 -1
- package/dist/types/src/base/ui/control_sizes.d.ts.map +1 -1
- package/dist/types/src/base/ui/dialog.d.ts +1 -23
- package/dist/types/src/base/ui/dialog.d.ts.map +1 -1
- package/dist/types/src/base/ui/dialog_close_button.d.ts +2 -24
- package/dist/types/src/base/ui/dialog_close_button.d.ts.map +1 -1
- package/dist/types/src/base/ui/field_icon.d.ts +1 -17
- package/dist/types/src/base/ui/field_icon.d.ts.map +1 -1
- package/dist/types/src/base/ui/field_picker.d.ts +0 -23
- package/dist/types/src/base/ui/field_picker.d.ts.map +1 -1
- package/dist/types/src/base/ui/field_picker_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/form_field.d.ts +0 -4
- package/dist/types/src/base/ui/form_field.d.ts.map +1 -1
- package/dist/types/src/base/ui/heading.d.ts +1 -1
- package/dist/types/src/base/ui/heading.d.ts.map +1 -1
- package/dist/types/src/base/ui/icon.d.ts +0 -16
- package/dist/types/src/base/ui/icon.d.ts.map +1 -1
- package/dist/types/src/base/ui/icon_config.d.ts +50 -51
- package/dist/types/src/base/ui/icon_config.d.ts.map +1 -1
- package/dist/types/src/base/ui/initialize_block.d.ts.map +1 -1
- package/dist/types/src/base/ui/input.d.ts +12 -46
- package/dist/types/src/base/ui/input.d.ts.map +1 -1
- package/dist/types/src/base/ui/input_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/label.d.ts.map +1 -1
- package/dist/types/src/base/ui/link.d.ts +1 -5
- package/dist/types/src/base/ui/link.d.ts.map +1 -1
- package/dist/types/src/base/ui/loader.d.ts +3 -20
- package/dist/types/src/base/ui/loader.d.ts.map +1 -1
- package/dist/types/src/base/ui/modal.d.ts +1 -14
- package/dist/types/src/base/ui/modal.d.ts.map +1 -1
- package/dist/types/src/base/ui/model_picker_select.d.ts.map +1 -1
- package/dist/types/src/base/ui/popover.d.ts +1 -17
- package/dist/types/src/base/ui/popover.d.ts.map +1 -1
- package/dist/types/src/base/ui/progress_bar.d.ts +1 -24
- package/dist/types/src/base/ui/progress_bar.d.ts.map +1 -1
- package/dist/types/src/base/ui/record_card.d.ts +1 -23
- package/dist/types/src/base/ui/record_card.d.ts.map +1 -1
- package/dist/types/src/base/ui/record_card_list.d.ts +1 -18
- package/dist/types/src/base/ui/record_card_list.d.ts.map +1 -1
- package/dist/types/src/base/ui/select.d.ts +0 -44
- package/dist/types/src/base/ui/select.d.ts.map +1 -1
- package/dist/types/src/base/ui/select_and_select_buttons_helpers.d.ts +0 -2
- package/dist/types/src/base/ui/select_and_select_buttons_helpers.d.ts.map +1 -1
- package/dist/types/src/base/ui/select_buttons.d.ts +0 -22
- package/dist/types/src/base/ui/select_buttons.d.ts.map +1 -1
- package/dist/types/src/base/ui/select_buttons_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/select_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/switch.d.ts +0 -22
- package/dist/types/src/base/ui/switch.d.ts.map +1 -1
- package/dist/types/src/base/ui/switch_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/synced.d.ts +2 -8
- package/dist/types/src/base/ui/synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/all_styles_set.d.ts +0 -3
- package/dist/types/src/base/ui/system/all_styles_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/appearance/appearance_set.d.ts +0 -1
- package/dist/types/src/base/ui/system/appearance/appearance_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/appearance/background_color.d.ts +0 -1
- package/dist/types/src/base/ui/system/appearance/background_color.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/appearance/border.d.ts +0 -1
- package/dist/types/src/base/ui/system/appearance/border.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/appearance/border_radius.d.ts +0 -1
- package/dist/types/src/base/ui/system/appearance/border_radius.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/appearance/box_shadow.d.ts +0 -1
- package/dist/types/src/base/ui/system/appearance/box_shadow.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/appearance/opacity.d.ts +0 -1
- package/dist/types/src/base/ui/system/appearance/opacity.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/dimensions/dimensions_set.d.ts +0 -1
- package/dist/types/src/base/ui/system/dimensions/dimensions_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/dimensions/height.d.ts +0 -1
- package/dist/types/src/base/ui/system/dimensions/height.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/dimensions/max_height.d.ts +0 -1
- package/dist/types/src/base/ui/system/dimensions/max_height.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/dimensions/max_width.d.ts +0 -1
- package/dist/types/src/base/ui/system/dimensions/max_width.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/dimensions/min_height.d.ts +0 -1
- package/dist/types/src/base/ui/system/dimensions/min_height.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/dimensions/min_width.d.ts +0 -1
- package/dist/types/src/base/ui/system/dimensions/min_width.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/dimensions/width.d.ts +0 -1
- package/dist/types/src/base/ui/system/dimensions/width.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/display.d.ts +0 -1
- package/dist/types/src/base/ui/system/display.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_container/align_content.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_container/align_content.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_container/align_items.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_container/align_items.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_container/flex_container_set.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_container/flex_container_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_container/flex_direction.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_container/flex_direction.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_container/flex_wrap.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_container/flex_wrap.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_container/justify_content.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_container/justify_content.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_container/justify_items.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_container/justify_items.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/align_self.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/align_self.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/flex.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/flex_basis.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_basis.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/flex_grow.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_grow.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/flex_item_set.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_item_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/flex_shrink.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_shrink.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/justify_self.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/justify_self.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/flex_item/order.d.ts +0 -1
- package/dist/types/src/base/ui/system/flex_item/order.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/index.d.ts +52 -52
- package/dist/types/src/base/ui/system/index.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/overflow.d.ts +0 -1
- package/dist/types/src/base/ui/system/overflow.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/position/bottom.d.ts +0 -1
- package/dist/types/src/base/ui/system/position/bottom.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/position/left.d.ts +0 -1
- package/dist/types/src/base/ui/system/position/left.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/position/position.d.ts +0 -1
- package/dist/types/src/base/ui/system/position/position.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/position/position_set.d.ts +0 -1
- package/dist/types/src/base/ui/system/position/position_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/position/right.d.ts +0 -1
- package/dist/types/src/base/ui/system/position/right.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/position/top.d.ts +0 -1
- package/dist/types/src/base/ui/system/position/top.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/position/z_index.d.ts +0 -1
- package/dist/types/src/base/ui/system/position/z_index.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/spacing/margin.d.ts +0 -1
- package/dist/types/src/base/ui/system/spacing/margin.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/spacing/padding.d.ts +0 -1
- package/dist/types/src/base/ui/system/spacing/padding.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/spacing/spacing_set.d.ts +0 -1
- package/dist/types/src/base/ui/system/spacing/spacing_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/font_family.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/font_family.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/font_size.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/font_size.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/font_style.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/font_style.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/font_weight.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/font_weight.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/letter_spacing.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/letter_spacing.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/line_height.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/line_height.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/text_align.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/text_align.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/text_color.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/text_color.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/text_decoration.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/text_decoration.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/text_transform.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/text_transform.d.ts.map +1 -1
- package/dist/types/src/base/ui/system/typography/typography_set.d.ts +0 -1
- package/dist/types/src/base/ui/system/typography/typography_set.d.ts.map +1 -1
- package/dist/types/src/base/ui/table_picker.d.ts +0 -21
- package/dist/types/src/base/ui/table_picker.d.ts.map +1 -1
- package/dist/types/src/base/ui/table_picker_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/text.d.ts +0 -3
- package/dist/types/src/base/ui/text.d.ts.map +1 -1
- package/dist/types/src/base/ui/text_button.d.ts +1 -5
- package/dist/types/src/base/ui/text_button.d.ts.map +1 -1
- package/dist/types/src/base/ui/theme/default_theme/index.d.ts +1 -1
- package/dist/types/src/base/ui/theme/theme_context.d.ts +1 -1
- package/dist/types/src/base/ui/theme/use_theme.d.ts +1 -1
- package/dist/types/src/base/ui/tooltip.d.ts +0 -16
- package/dist/types/src/base/ui/tooltip.d.ts.map +1 -1
- package/dist/types/src/base/ui/types/aria_props.d.ts.map +1 -1
- package/dist/types/src/base/ui/types/data_attributes_prop.d.ts +0 -4
- package/dist/types/src/base/ui/types/data_attributes_prop.d.ts.map +1 -1
- package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts +0 -7
- package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts.map +1 -1
- package/dist/types/src/base/ui/ui.d.ts +1 -0
- package/dist/types/src/base/ui/ui.d.ts.map +1 -1
- package/dist/types/src/base/ui/view_picker.d.ts +0 -23
- package/dist/types/src/base/ui/view_picker.d.ts.map +1 -1
- package/dist/types/src/base/ui/view_picker_synced.d.ts.map +1 -1
- package/dist/types/src/base/ui/viewport_constraint.d.ts +1 -14
- package/dist/types/src/base/ui/viewport_constraint.d.ts.map +1 -1
- package/dist/types/src/base/unstable_testing_utils.d.ts +1 -1
- package/dist/types/src/base/unstable_testing_utils.d.ts.map +1 -1
- package/dist/types/src/interface/assert_run_context.d.ts +2 -0
- package/dist/types/src/interface/assert_run_context.d.ts.map +1 -0
- package/dist/types/src/interface/index.d.ts +1 -6
- package/dist/types/src/interface/index.d.ts.map +1 -1
- package/dist/types/src/interface/models/models.d.ts +1 -0
- package/dist/types/src/interface/models/models.d.ts.map +1 -1
- package/dist/types/src/interface/models/mutations.d.ts.map +1 -1
- package/dist/types/src/interface/ui/initialize_block.d.ts.map +1 -1
- package/dist/types/src/interface/ui/ui.d.ts +1 -0
- package/dist/types/src/interface/ui/ui.d.ts.map +1 -1
- package/dist/types/src/interface/ui/use_custom_properties.d.ts +1 -1
- package/dist/types/src/shared/models/mutations_core.d.ts.map +1 -1
- package/dist/types/src/shared/private_utils.d.ts +0 -9
- package/dist/types/src/shared/private_utils.d.ts.map +1 -1
- package/dist/types/src/shared/ui/global_config_synced_component_helpers.d.ts +0 -2
- package/dist/types/src/shared/ui/global_config_synced_component_helpers.d.ts.map +1 -1
- package/dist/types/src/shared/ui/loader.d.ts.map +1 -1
- package/dist/types/src/shared/ui/with_hooks.d.ts +2 -2
- package/dist/types/src/shared/ui/with_hooks.d.ts.map +1 -1
- package/dist/types/src/testing/{abstract_mock_airtable_interface.d.ts → base/abstract_mock_airtable_interface.d.ts} +13 -13
- package/dist/types/src/testing/base/abstract_mock_airtable_interface.d.ts.map +1 -0
- package/dist/types/src/testing/interface/abstract_mock_airtable_interface.d.ts +51 -0
- package/dist/types/src/testing/interface/abstract_mock_airtable_interface.d.ts.map +1 -0
- package/package.json +13 -13
- package/dist/cjs/base/ui/system/utils/create_responsive_prop_type.js +0 -19
- package/dist/cjs/base/ui/system/utils/create_style_prop_types.js +0 -24
- package/dist/cjs/base/ui/system/utils/enum_prop_type_utils.js +0 -35
- package/dist/cjs/testing/abstract_mock_airtable_interface.js +0 -277
- package/dist/types/src/base/ui/system/utils/create_responsive_prop_type.d.ts +0 -2
- package/dist/types/src/base/ui/system/utils/create_responsive_prop_type.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/utils/create_style_prop_types.d.ts +0 -4
- package/dist/types/src/base/ui/system/utils/create_style_prop_types.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/utils/enum_prop_type_utils.d.ts +0 -21
- package/dist/types/src/base/ui/system/utils/enum_prop_type_utils.d.ts.map +0 -1
- package/dist/types/src/testing/abstract_mock_airtable_interface.d.ts.map +0 -1
|
@@ -1,65 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.js");
|
|
4
|
-
require("core-js/modules/es.symbol.description.js");
|
|
5
|
-
require("core-js/modules/es.array.from.js");
|
|
6
|
-
require("core-js/modules/es.array.slice.js");
|
|
7
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
8
|
-
require("core-js/modules/es.regexp.to-string.js");
|
|
9
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
3
|
Object.defineProperty(exports, "__esModule", {
|
|
11
4
|
value: true
|
|
12
5
|
});
|
|
13
6
|
exports.MutationsCore = exports.MUTATIONS_MAX_BATCH_SIZE = void 0;
|
|
14
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
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.iterator.js");
|
|
18
|
-
require("core-js/modules/es.array.map.js");
|
|
19
|
-
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
20
|
-
require("core-js/modules/es.object.to-string.js");
|
|
21
|
-
require("core-js/modules/es.promise.js");
|
|
22
|
-
require("core-js/modules/es.set.js");
|
|
23
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
25
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
26
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
27
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
28
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
7
|
var _mutations_core = require("../types/mutations_core");
|
|
30
8
|
var _error_utils = require("../error_utils");
|
|
31
9
|
var _private_utils = require("../private_utils");
|
|
32
|
-
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; } } }; }
|
|
33
|
-
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; } }
|
|
34
|
-
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; }
|
|
35
10
|
// Limit for how many items can be updated from a single batch mutation.
|
|
36
11
|
// This is number of records for MULTIPLE_RECORDS type mutations, and number of global config paths
|
|
37
12
|
// for SET_MULTIPLE_GLOBAL_CONFIG_PATHS.
|
|
38
13
|
// Same limit is enforced liveapp-side
|
|
39
|
-
|
|
14
|
+
const MUTATIONS_MAX_BATCH_SIZE = exports.MUTATIONS_MAX_BATCH_SIZE = 50;
|
|
40
15
|
|
|
41
16
|
// Liveapp requests must be under 2mb in size: we enforce a 1.9mb limit here to allow space for
|
|
42
17
|
// the other parts of the request
|
|
43
|
-
|
|
44
|
-
|
|
18
|
+
const MUTATIONS_MAX_BODY_SIZE = 1.9 * 1024 * 1024;
|
|
19
|
+
const MUTATION_HOLD_FOR_MS = 100;
|
|
45
20
|
|
|
46
21
|
/** @hidden */
|
|
47
|
-
|
|
22
|
+
class MutationsCore {
|
|
23
|
+
/** @internal */
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
|
|
48
35
|
/** @hidden */
|
|
49
|
-
|
|
50
|
-
(0, _classCallCheck2.default)(this, MutationsCore);
|
|
51
|
-
/** @internal */
|
|
52
|
-
(0, _defineProperty2.default)(this, "_airtableInterface", void 0);
|
|
53
|
-
/** @internal */
|
|
54
|
-
(0, _defineProperty2.default)(this, "_session", void 0);
|
|
55
|
-
/** @internal */
|
|
56
|
-
(0, _defineProperty2.default)(this, "_sdk", void 0);
|
|
57
|
-
/** @internal */
|
|
58
|
-
(0, _defineProperty2.default)(this, "_base", void 0);
|
|
59
|
-
/** @internal */
|
|
60
|
-
(0, _defineProperty2.default)(this, "_applyModelChanges", void 0);
|
|
61
|
-
/** @internal */
|
|
62
|
-
(0, _defineProperty2.default)(this, "_applyGlobalConfigUpdates", void 0);
|
|
36
|
+
constructor(sdk, session, base, applyModelChanges, applyGlobalConfigUpdates) {
|
|
63
37
|
this._airtableInterface = sdk.__airtableInterface;
|
|
64
38
|
this._session = session;
|
|
65
39
|
this._sdk = sdk;
|
|
@@ -69,371 +43,301 @@ var MutationsCore = exports.MutationsCore = /*#__PURE__*/function () {
|
|
|
69
43
|
}
|
|
70
44
|
|
|
71
45
|
/** @hidden */
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
case 11:
|
|
102
|
-
_context.prev = 11;
|
|
103
|
-
_context.t0 = _context["catch"](6);
|
|
104
|
-
if (!didApplyOptimisticUpdates) {
|
|
105
|
-
_context.next = 19;
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
// if we applied optimistic updates, we can't gracefully handle a promise rejection
|
|
109
|
-
// here - we can't un-apply optimistic updates, so the SDK's internal data model is
|
|
110
|
-
// in an unexpected state. Instead of letting this promise get rejected, throw an
|
|
111
|
-
// error after an async gap to crash the block, and make this promise await
|
|
112
|
-
// something that will never resolve so we don't run any of the developers error-
|
|
113
|
-
// handling code.
|
|
114
|
-
setTimeout(() => {
|
|
115
|
-
throw _context.t0;
|
|
116
|
-
}, 0);
|
|
117
|
-
_context.next = 17;
|
|
118
|
-
return new Promise(() => {});
|
|
119
|
-
case 17:
|
|
120
|
-
_context.next = 20;
|
|
121
|
-
break;
|
|
122
|
-
case 19:
|
|
123
|
-
throw _context.t0;
|
|
124
|
-
case 20:
|
|
125
|
-
case "end":
|
|
126
|
-
return _context.stop();
|
|
127
|
-
}
|
|
128
|
-
}, _callee, this, [[6, 11]]);
|
|
129
|
-
}));
|
|
130
|
-
function applyMutationAsync(_x) {
|
|
131
|
-
return _applyMutationAsync.apply(this, arguments);
|
|
46
|
+
async applyMutationAsync(mutation) {
|
|
47
|
+
this._assertMutationIsValid(mutation);
|
|
48
|
+
// Limit check is after validity check so that we display errors for when users pass in
|
|
49
|
+
// objects correctly (eg updating linked records cell value to be a record object) -
|
|
50
|
+
// otherwise the limit check will fail due to circular objects being converted to JSON first
|
|
51
|
+
this._assertMutationUnderLimits(mutation);
|
|
52
|
+
const permissionCheck = this.checkPermissionsForMutation(mutation);
|
|
53
|
+
if (!permissionCheck.hasPermission) {
|
|
54
|
+
throw (0, _error_utils.spawnError)('Cannot apply %s mutation: %s', mutation.type, permissionCheck.reasonDisplayString);
|
|
55
|
+
}
|
|
56
|
+
const didApplyOptimisticUpdates = this._applyOptimisticUpdatesForMutation(mutation);
|
|
57
|
+
try {
|
|
58
|
+
await this._getAirtableInterfaceAsAirtableInterfaceCore().applyMutationAsync(mutation, {
|
|
59
|
+
holdForMs: MUTATION_HOLD_FOR_MS
|
|
60
|
+
});
|
|
61
|
+
} catch (err) {
|
|
62
|
+
if (didApplyOptimisticUpdates) {
|
|
63
|
+
// if we applied optimistic updates, we can't gracefully handle a promise rejection
|
|
64
|
+
// here - we can't un-apply optimistic updates, so the SDK's internal data model is
|
|
65
|
+
// in an unexpected state. Instead of letting this promise get rejected, throw an
|
|
66
|
+
// error after an async gap to crash the block, and make this promise await
|
|
67
|
+
// something that will never resolve so we don't run any of the developers error-
|
|
68
|
+
// handling code.
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
throw err;
|
|
71
|
+
}, 0);
|
|
72
|
+
await new Promise(() => {});
|
|
73
|
+
} else {
|
|
74
|
+
throw err;
|
|
132
75
|
}
|
|
133
|
-
return applyMutationAsync;
|
|
134
|
-
}() /** @hidden */)
|
|
135
|
-
}, {
|
|
136
|
-
key: "checkPermissionsForMutation",
|
|
137
|
-
value: function checkPermissionsForMutation(mutation) {
|
|
138
|
-
return this._getAirtableInterfaceAsAirtableInterfaceCore().checkPermissionsForMutation(mutation, this._base.__getBaseData());
|
|
139
76
|
}
|
|
77
|
+
}
|
|
140
78
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
key: "_getAirtableInterfaceAsAirtableInterfaceCore",
|
|
146
|
-
value: function _getAirtableInterfaceAsAirtableInterfaceCore() {
|
|
147
|
-
return this._airtableInterface;
|
|
148
|
-
}
|
|
79
|
+
/** @hidden */
|
|
80
|
+
checkPermissionsForMutation(mutation) {
|
|
81
|
+
return this._getAirtableInterfaceAsAirtableInterfaceCore().checkPermissionsForMutation(mutation, this._base.__getBaseData());
|
|
82
|
+
}
|
|
149
83
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
84
|
+
// Not really sure why this is necessary. It seems like all callsites could just use
|
|
85
|
+
// this._airtableInterface directly, but TS complains.
|
|
86
|
+
/** @hidden */
|
|
87
|
+
_getAirtableInterfaceAsAirtableInterfaceCore() {
|
|
88
|
+
return this._airtableInterface;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
_assertMutationUnderLimits(mutation) {
|
|
93
|
+
// Two limits to check here:
|
|
94
|
+
// - for record-related mutations, it isn't above MUTATIONS_MAX_BATCH_SIZE
|
|
95
|
+
// - mutation payload size won't exceed liveapp request payload size limit
|
|
96
|
+
// Requests are sent as form-encoded utf-8 (1 byte characters)
|
|
97
|
+
if (encodeURIComponent(JSON.stringify(mutation)).length > MUTATIONS_MAX_BODY_SIZE) {
|
|
98
|
+
throw (0, _error_utils.spawnError)('Request exceeds maximum size limit of %s bytes', MUTATIONS_MAX_BODY_SIZE);
|
|
164
99
|
}
|
|
100
|
+
if (this._doesMutationExceedBatchSizeLimit(mutation)) {
|
|
101
|
+
throw (0, _error_utils.spawnError)('Request exceeds maximum batch size limit of %s items', MUTATIONS_MAX_BATCH_SIZE);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
165
104
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
//
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this._applyGlobalConfigUpdates(_mutation.updates);
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
var modelChanges = this._getOptimisticModelChangesForMutation(mutation);
|
|
180
|
-
if (modelChanges.length > 0) {
|
|
181
|
-
this._applyModelChanges(modelChanges);
|
|
182
|
-
return true;
|
|
183
|
-
}
|
|
184
|
-
return false;
|
|
105
|
+
/** @internal */
|
|
106
|
+
_applyOptimisticUpdatesForMutation(mutation) {
|
|
107
|
+
// GlobalConfig updates are different to other mutations (on models): for models, we
|
|
108
|
+
// only apply optimistic updates if the relevant models are loaded, whereas for
|
|
109
|
+
// SET_MULTIPLE_GLOBAL_CONFIG_PATHS we always apply optimistic updates.
|
|
110
|
+
if (mutation.type === _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS) {
|
|
111
|
+
// Not sure why this cast is necessary, but TS complains without it.
|
|
112
|
+
const _mutation = mutation;
|
|
113
|
+
this._applyGlobalConfigUpdates(_mutation.updates);
|
|
114
|
+
return true;
|
|
185
115
|
}
|
|
116
|
+
const modelChanges = this._getOptimisticModelChangesForMutation(mutation);
|
|
117
|
+
if (modelChanges.length > 0) {
|
|
118
|
+
this._applyModelChanges(modelChanges);
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
186
123
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
default:
|
|
203
|
-
return false;
|
|
204
|
-
}
|
|
124
|
+
/** @internal */
|
|
125
|
+
_doesMutationExceedBatchSizeLimit(mutation) {
|
|
126
|
+
switch (mutation.type) {
|
|
127
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_RECORDS_CELL_VALUES:
|
|
128
|
+
case _mutations_core.MutationTypesCore.CREATE_MULTIPLE_RECORDS:
|
|
129
|
+
return mutation.records.length > MUTATIONS_MAX_BATCH_SIZE;
|
|
130
|
+
case _mutations_core.MutationTypesCore.DELETE_MULTIPLE_RECORDS:
|
|
131
|
+
return mutation.recordIds.length > MUTATIONS_MAX_BATCH_SIZE;
|
|
132
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
|
|
133
|
+
return mutation.updates.length > MUTATIONS_MAX_BATCH_SIZE;
|
|
134
|
+
// The "default" case cannot be reached because this method is only
|
|
135
|
+
// invoked after the mutation type has been validated.
|
|
136
|
+
// istanbul ignore next
|
|
137
|
+
default:
|
|
138
|
+
return false;
|
|
205
139
|
}
|
|
140
|
+
}
|
|
206
141
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if (field.isComputed) {
|
|
212
|
-
throw (0, _error_utils.spawnError)("Can't set cell values: Field '%s' is computed and cannot be set", field.name);
|
|
213
|
-
}
|
|
142
|
+
/** @internal */
|
|
143
|
+
_assertFieldIsValidForMutation(field) {
|
|
144
|
+
if (field.isComputed) {
|
|
145
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: Field '%s' is computed and cannot be set", field.name);
|
|
214
146
|
}
|
|
147
|
+
}
|
|
215
148
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
// gives us slightly more confidence that we can do something other than completely crash
|
|
227
|
-
// the block in the event of an invalid mutation.
|
|
149
|
+
/** @internal */
|
|
150
|
+
_assertMutationIsValid(mutation) {
|
|
151
|
+
// We call validate the data (including any cell values) because if the data required for
|
|
152
|
+
// us to do that is already loaded in the block, we can error out before applying
|
|
153
|
+
// optimistic updates or sending the update to liveapp. That means that the error is
|
|
154
|
+
// recoverable. Once we apply optimistic updates, if liveapp rejects the update then we
|
|
155
|
+
// can't recover from that - we have to crash the block. We _could_ skip over these
|
|
156
|
+
// validations - it wouldn't cause issues outside of the block frame. But running them
|
|
157
|
+
// gives us slightly more confidence that we can do something other than completely crash
|
|
158
|
+
// the block in the event of an invalid mutation.
|
|
228
159
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
160
|
+
const appInterface = this._sdk.__appInterface;
|
|
161
|
+
switch (mutation.type) {
|
|
162
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_RECORDS_CELL_VALUES:
|
|
163
|
+
{
|
|
164
|
+
const {
|
|
165
|
+
tableId,
|
|
166
|
+
records
|
|
167
|
+
} = mutation;
|
|
168
|
+
const table = this._base.getTableByIdIfExists(tableId);
|
|
169
|
+
if (!table) {
|
|
170
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: No table with id %s exists", tableId);
|
|
171
|
+
}
|
|
239
172
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
if (this._isRecordStoreReadyForMutations(_recordStore)) {
|
|
252
|
-
existingRecord = _recordStore.getRecordByIdIfExists(record.id);
|
|
253
|
-
if (!existingRecord) {
|
|
254
|
-
throw (0, _error_utils.spawnError)("Can't set cell values: No record with id %s exists", record.id);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
for (var _i = 0, _Object$keys = Object.keys(record.cellValuesByFieldId); _i < _Object$keys.length; _i++) {
|
|
258
|
-
var _fieldId = _Object$keys[_i];
|
|
259
|
-
var field = table.getFieldByIdIfExists(_fieldId);
|
|
260
|
-
if (!field) {
|
|
261
|
-
throw (0, _error_utils.spawnError)("Can't set cell values: No field with id %s exists in table '%s'", _fieldId, table.name);
|
|
262
|
-
}
|
|
263
|
-
if (!checkedFieldIds.has(_fieldId)) {
|
|
264
|
-
this._assertFieldIsValidForMutation(field);
|
|
265
|
-
checkedFieldIds.add(_fieldId);
|
|
266
|
-
}
|
|
267
|
-
if (existingRecord && this._isFieldAvailableForMutation(_recordStore, field.id)) {
|
|
268
|
-
var validationResult = this._airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, record.cellValuesByFieldId[_fieldId], existingRecord._getRawCellValue(field), field._data);
|
|
269
|
-
if (!validationResult.isValid) {
|
|
270
|
-
throw (0, _error_utils.spawnError)("Can't set cell values: invalid cell value for field '%s'.\n%s", field.name, validationResult.reason);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
173
|
+
// For every mutation, we check that we're not trying to set fields that we don't support
|
|
174
|
+
// mutations for yet. When record data is loaded, we also check that the record we're
|
|
175
|
+
// updating actually exists and that the cell values are valid.
|
|
176
|
+
const recordStore = this._base.__getRecordStore(tableId);
|
|
177
|
+
const checkedFieldIds = new Set();
|
|
178
|
+
for (const record of records) {
|
|
179
|
+
let existingRecord = null;
|
|
180
|
+
if (this._isRecordStoreReadyForMutations(recordStore)) {
|
|
181
|
+
existingRecord = recordStore.getRecordByIdIfExists(record.id);
|
|
182
|
+
if (!existingRecord) {
|
|
183
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: No record with id %s exists", record.id);
|
|
274
184
|
}
|
|
275
|
-
} catch (err) {
|
|
276
|
-
_iterator.e(err);
|
|
277
|
-
} finally {
|
|
278
|
-
_iterator.f();
|
|
279
|
-
}
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
case _mutations_core.MutationTypesCore.DELETE_MULTIPLE_RECORDS:
|
|
283
|
-
{
|
|
284
|
-
var _tableId = mutation.tableId,
|
|
285
|
-
recordIds = mutation.recordIds;
|
|
286
|
-
var _table = this._base.getTableByIdIfExists(_tableId);
|
|
287
|
-
if (!_table) {
|
|
288
|
-
throw (0, _error_utils.spawnError)("Can't delete records: No table with id %s exists", _tableId);
|
|
289
185
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
186
|
+
for (const fieldId of Object.keys(record.cellValuesByFieldId)) {
|
|
187
|
+
const field = table.getFieldByIdIfExists(fieldId);
|
|
188
|
+
if (!field) {
|
|
189
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: No field with id %s exists in table '%s'", fieldId, table.name);
|
|
190
|
+
}
|
|
191
|
+
if (!checkedFieldIds.has(fieldId)) {
|
|
192
|
+
this._assertFieldIsValidForMutation(field);
|
|
193
|
+
checkedFieldIds.add(fieldId);
|
|
194
|
+
}
|
|
195
|
+
if (existingRecord && this._isFieldAvailableForMutation(recordStore, field.id)) {
|
|
196
|
+
const validationResult = this._airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, record.cellValuesByFieldId[fieldId], existingRecord._getRawCellValue(field), field._data);
|
|
197
|
+
if (!validationResult.isValid) {
|
|
198
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: invalid cell value for field '%s'.\n%s", field.name, validationResult.reason);
|
|
301
199
|
}
|
|
302
|
-
} catch (err) {
|
|
303
|
-
_iterator2.e(err);
|
|
304
|
-
} finally {
|
|
305
|
-
_iterator2.f();
|
|
306
200
|
}
|
|
307
201
|
}
|
|
308
|
-
return;
|
|
309
202
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
case _mutations_core.MutationTypesCore.DELETE_MULTIPLE_RECORDS:
|
|
206
|
+
{
|
|
207
|
+
const {
|
|
208
|
+
tableId,
|
|
209
|
+
recordIds
|
|
210
|
+
} = mutation;
|
|
211
|
+
const table = this._base.getTableByIdIfExists(tableId);
|
|
212
|
+
if (!table) {
|
|
213
|
+
throw (0, _error_utils.spawnError)("Can't delete records: No table with id %s exists", tableId);
|
|
214
|
+
}
|
|
215
|
+
const recordStore = this._base.__getRecordStore(tableId);
|
|
216
|
+
if (this._isRecordStoreReadyForMutations(recordStore)) {
|
|
217
|
+
for (const recordId of recordIds) {
|
|
218
|
+
const record = recordStore.getRecordByIdIfExists(recordId);
|
|
219
|
+
if (!record) {
|
|
220
|
+
throw (0, _error_utils.spawnError)("Can't delete records: No record with id %s exists in table '%s'", recordId, table.name);
|
|
221
|
+
}
|
|
318
222
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
223
|
+
}
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
case _mutations_core.MutationTypesCore.CREATE_MULTIPLE_RECORDS:
|
|
227
|
+
{
|
|
228
|
+
const {
|
|
229
|
+
tableId,
|
|
230
|
+
records
|
|
231
|
+
} = mutation;
|
|
232
|
+
const checkedFieldIds = new Set();
|
|
233
|
+
const table = this._base.getTableByIdIfExists(tableId);
|
|
234
|
+
if (!table) {
|
|
235
|
+
throw (0, _error_utils.spawnError)("Can't create records: No table with id %s exists", tableId);
|
|
236
|
+
}
|
|
237
|
+
for (const record of records) {
|
|
238
|
+
for (const fieldId of Object.keys(record.cellValuesByFieldId)) {
|
|
239
|
+
const field = table.getFieldByIdIfExists(fieldId);
|
|
240
|
+
if (!field) {
|
|
241
|
+
throw (0, _error_utils.spawnError)("Can't create records: No field with id %s exists in table '%s'", fieldId, table.name);
|
|
242
|
+
}
|
|
243
|
+
if (!checkedFieldIds.has(fieldId)) {
|
|
244
|
+
this._assertFieldIsValidForMutation(field);
|
|
245
|
+
checkedFieldIds.add(fieldId);
|
|
246
|
+
}
|
|
334
247
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
}
|
|
248
|
+
// Current cell value is null since the record doesn't exist.
|
|
249
|
+
const validationResult = this._airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, record.cellValuesByFieldId[fieldId], null, field._data);
|
|
250
|
+
if (!validationResult.isValid) {
|
|
251
|
+
throw (0, _error_utils.spawnError)("Can't create records: invalid cell value for field '%s'.\n%s", field.name, validationResult.reason);
|
|
341
252
|
}
|
|
342
|
-
} catch (err) {
|
|
343
|
-
_iterator3.e(err);
|
|
344
|
-
} finally {
|
|
345
|
-
_iterator3.f();
|
|
346
253
|
}
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
case _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
|
|
350
|
-
{
|
|
351
|
-
// globalConfig update is a special case: globalConfig handles validation before
|
|
352
|
-
// invoking this mutation, since it relies on internal state to validate the
|
|
353
|
-
// paths being set.
|
|
354
|
-
return;
|
|
355
254
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
|
|
258
|
+
{
|
|
259
|
+
// globalConfig update is a special case: globalConfig handles validation before
|
|
260
|
+
// invoking this mutation, since it relies on internal state to validate the
|
|
261
|
+
// paths being set.
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
default:
|
|
265
|
+
throw (0, _error_utils.spawnError)('unhandled mutation type: %s', mutation.type);
|
|
359
266
|
}
|
|
267
|
+
}
|
|
360
268
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
if (this._isFieldAvailableForMutation(_recordStore4, _fieldId3)) {
|
|
401
|
-
filteredCellValuesByFieldId[_fieldId3] = cellValue;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
} catch (err) {
|
|
405
|
-
_iterator4.e(err);
|
|
406
|
-
} finally {
|
|
407
|
-
_iterator4.f();
|
|
269
|
+
/** @internal */
|
|
270
|
+
_getOptimisticModelChangesForMutation(mutation) {
|
|
271
|
+
switch (mutation.type) {
|
|
272
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_RECORDS_CELL_VALUES:
|
|
273
|
+
{
|
|
274
|
+
const {
|
|
275
|
+
tableId,
|
|
276
|
+
records
|
|
277
|
+
} = mutation;
|
|
278
|
+
const recordStore = this._base.__getRecordStore(tableId);
|
|
279
|
+
return records.flatMap(record => Object.keys(record.cellValuesByFieldId).filter(fieldId => this._isFieldAvailableForMutation(recordStore, fieldId)).map(fieldId => ({
|
|
280
|
+
path: ['tablesById', tableId, 'recordsById', record.id, 'cellValuesByFieldId', fieldId],
|
|
281
|
+
value: record.cellValuesByFieldId[fieldId]
|
|
282
|
+
})));
|
|
283
|
+
}
|
|
284
|
+
case _mutations_core.MutationTypesCore.DELETE_MULTIPLE_RECORDS:
|
|
285
|
+
{
|
|
286
|
+
const {
|
|
287
|
+
tableId,
|
|
288
|
+
recordIds
|
|
289
|
+
} = mutation;
|
|
290
|
+
return recordIds.map(recordId => ({
|
|
291
|
+
path: ['tablesById', tableId, 'recordsById', recordId],
|
|
292
|
+
value: undefined
|
|
293
|
+
}));
|
|
294
|
+
}
|
|
295
|
+
case _mutations_core.MutationTypesCore.CREATE_MULTIPLE_RECORDS:
|
|
296
|
+
{
|
|
297
|
+
const {
|
|
298
|
+
tableId,
|
|
299
|
+
records
|
|
300
|
+
} = mutation;
|
|
301
|
+
const recordStore = this._base.__getRecordStore(tableId);
|
|
302
|
+
return records.map(record => {
|
|
303
|
+
// Only apply optimistic changes for fields that are "available" for mutation
|
|
304
|
+
const filteredCellValuesByFieldId = {};
|
|
305
|
+
for (const [fieldId, cellValue] of (0, _private_utils.entries)(record.cellValuesByFieldId)) {
|
|
306
|
+
if (this._isFieldAvailableForMutation(recordStore, fieldId)) {
|
|
307
|
+
filteredCellValuesByFieldId[fieldId] = cellValue;
|
|
408
308
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
309
|
+
}
|
|
310
|
+
return {
|
|
311
|
+
path: ['tablesById', tableId, 'recordsById', record.id],
|
|
312
|
+
value: {
|
|
313
|
+
...this._getDefaultRecordProperties(),
|
|
314
|
+
id: record.id,
|
|
315
|
+
cellValuesByFieldId: filteredCellValuesByFieldId
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
});
|
|
319
|
+
}
|
|
420
320
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
321
|
+
// The following branch is unreachable because this method's only
|
|
322
|
+
// call site is preceded by an explicit guard for this condition.
|
|
323
|
+
// istanbul ignore next
|
|
324
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
|
|
325
|
+
{
|
|
326
|
+
throw (0, _error_utils.spawnError)('attempting to generate model updates for SET_MULTIPLE_GLOBAL_CONFIG_PATH');
|
|
327
|
+
}
|
|
428
328
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
329
|
+
// The following branch is unreachable because this method's only
|
|
330
|
+
// call site is preceded by an explicit guard for this condition.
|
|
331
|
+
// istanbul ignore next
|
|
332
|
+
default:
|
|
333
|
+
throw (0, _error_utils.spawnError)('unhandled mutation type: %s', mutation.type);
|
|
435
334
|
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/** @internal */
|
|
338
|
+
|
|
339
|
+
/** @internal */
|
|
436
340
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
341
|
+
/** @internal */
|
|
342
|
+
}
|
|
343
|
+
exports.MutationsCore = MutationsCore;
|