@airtable/blocks 0.0.0-experimental-f52bc4e5e-20250709 → 0.0.0-experimental-3649c7162-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/esm/base/assert_run_context.js +12 -0
- package/dist/{cjs → esm}/base/index.js +30 -32
- package/dist/esm/base/models/abstract_model_with_async_data.js +190 -0
- package/dist/esm/base/models/base.js +252 -0
- package/dist/esm/base/models/create_aggregators.js +90 -0
- package/dist/esm/base/models/cursor.js +305 -0
- package/dist/esm/base/models/field.js +338 -0
- package/dist/esm/base/models/grouped_record_query_result.js +280 -0
- package/dist/esm/base/models/linked_records_query_result.js +553 -0
- package/dist/{cjs → esm}/base/models/models.js +19 -40
- package/dist/esm/base/models/mutations.js +312 -0
- package/dist/esm/base/models/object_pool.js +145 -0
- package/dist/esm/base/models/record.js +239 -0
- package/dist/{cjs → esm}/base/models/record_coloring.js +6 -6
- package/dist/esm/base/models/record_query_result.js +657 -0
- package/dist/esm/base/models/record_store.js +475 -0
- package/dist/esm/base/models/session.js +154 -0
- package/dist/esm/base/models/table.js +520 -0
- package/dist/esm/base/models/table_or_view_query_result.js +749 -0
- package/dist/esm/base/models/view.js +326 -0
- package/dist/esm/base/models/view_data_store.js +265 -0
- package/dist/esm/base/models/view_metadata_query_result.js +176 -0
- package/dist/esm/base/perform_record_action.js +215 -0
- package/dist/esm/base/sdk.js +178 -0
- package/dist/esm/base/settings_button.js +118 -0
- package/dist/{cjs → esm}/base/types/airtable_interface.js +1 -1
- package/dist/{cjs → esm}/base/types/mutations.js +5 -11
- package/dist/{cjs → esm}/base/types/undo_redo.js +1 -1
- package/dist/{cjs → esm}/base/types/view.js +1 -1
- package/dist/{cjs → esm}/base/ui/base_provider.js +6 -8
- package/dist/esm/base/ui/baymax_utils.js +461 -0
- package/dist/esm/base/ui/block_wrapper.js +118 -0
- package/dist/esm/base/ui/box.js +84 -0
- package/dist/esm/base/ui/button.js +152 -0
- package/dist/esm/base/ui/cell_renderer.js +198 -0
- package/dist/esm/base/ui/choice_token.js +93 -0
- package/dist/esm/base/ui/collaborator_token.js +123 -0
- package/dist/esm/base/ui/color_palette.js +196 -0
- package/dist/esm/base/ui/color_palette_synced.js +69 -0
- package/dist/esm/base/ui/confirmation_dialog.js +103 -0
- package/dist/{cjs → esm}/base/ui/control_sizes.js +24 -22
- package/dist/{cjs → esm}/base/ui/create_detect_element_resize.js +6 -10
- package/dist/{cjs → esm}/base/ui/css_helpers.js +1 -1
- package/dist/esm/base/ui/dialog.js +101 -0
- package/dist/esm/base/ui/dialog_close_button.js +106 -0
- package/dist/{cjs → esm}/base/ui/expand_record.js +1 -2
- package/dist/{cjs → esm}/base/ui/expand_record_list.js +3 -4
- package/dist/esm/base/ui/expand_record_picker_async.js +71 -0
- package/dist/esm/base/ui/field_icon.js +44 -0
- package/dist/esm/base/ui/field_picker.js +98 -0
- package/dist/esm/base/ui/field_picker_synced.js +66 -0
- package/dist/esm/base/ui/form_field.js +109 -0
- package/dist/{cjs → esm}/base/ui/geometry/geometry.js +5 -5
- package/dist/esm/base/ui/geometry/point.js +19 -0
- package/dist/esm/base/ui/geometry/rect.js +51 -0
- package/dist/esm/base/ui/geometry/size.js +19 -0
- package/dist/esm/base/ui/global_alert.js +71 -0
- package/dist/esm/base/ui/heading.js +132 -0
- package/dist/esm/base/ui/icon.js +109 -0
- package/dist/{cjs → esm}/base/ui/icon_config.js +6 -12
- package/dist/{cjs → esm}/base/ui/initialize_block.js +16 -35
- package/dist/esm/base/ui/input.js +161 -0
- package/dist/esm/base/ui/input_synced.js +66 -0
- package/dist/{cjs → esm}/base/ui/key_codes.js +2 -3
- package/dist/esm/base/ui/label.js +80 -0
- package/dist/esm/base/ui/link.js +196 -0
- package/dist/esm/base/ui/loader.js +61 -0
- package/dist/esm/base/ui/modal.js +145 -0
- package/dist/esm/base/ui/model_picker_select.js +57 -0
- package/dist/esm/base/ui/popover.js +315 -0
- package/dist/esm/base/ui/progress_bar.js +115 -0
- package/dist/esm/base/ui/record_card.js +564 -0
- package/dist/esm/base/ui/record_card_list.js +303 -0
- package/dist/esm/base/ui/select.js +191 -0
- package/dist/esm/base/ui/select_and_select_buttons_helpers.js +63 -0
- package/dist/esm/base/ui/select_buttons.js +159 -0
- package/dist/esm/base/ui/select_buttons_synced.js +62 -0
- package/dist/esm/base/ui/select_synced.js +65 -0
- package/dist/esm/base/ui/switch.js +167 -0
- package/dist/esm/base/ui/switch_synced.js +53 -0
- package/dist/esm/base/ui/synced.js +49 -0
- package/dist/{cjs → esm}/base/ui/system/all_styles_set.js +4 -12
- package/dist/esm/base/ui/system/appearance/appearance_set.js +27 -0
- package/dist/esm/base/ui/system/appearance/background_color.js +18 -0
- package/dist/{cjs → esm}/base/ui/system/appearance/border.js +3 -6
- package/dist/esm/base/ui/system/appearance/border_radius.js +18 -0
- package/dist/esm/base/ui/system/appearance/box_shadow.js +18 -0
- package/dist/esm/base/ui/system/appearance/opacity.js +18 -0
- package/dist/esm/base/ui/system/dimensions/dimensions_set.js +29 -0
- package/dist/esm/base/ui/system/dimensions/height.js +18 -0
- package/dist/esm/base/ui/system/dimensions/max_height.js +18 -0
- package/dist/esm/base/ui/system/dimensions/max_width.js +18 -0
- package/dist/esm/base/ui/system/dimensions/min_height.js +18 -0
- package/dist/esm/base/ui/system/dimensions/min_width.js +18 -0
- package/dist/esm/base/ui/system/dimensions/width.js +18 -0
- package/dist/esm/base/ui/system/display.js +19 -0
- package/dist/esm/base/ui/system/flex_container/align_content.js +15 -0
- package/dist/esm/base/ui/system/flex_container/align_items.js +15 -0
- package/dist/esm/base/ui/system/flex_container/flex_container_set.js +29 -0
- package/dist/esm/base/ui/system/flex_container/flex_direction.js +15 -0
- package/dist/esm/base/ui/system/flex_container/flex_wrap.js +15 -0
- package/dist/esm/base/ui/system/flex_container/justify_content.js +15 -0
- package/dist/esm/base/ui/system/flex_container/justify_items.js +16 -0
- package/dist/esm/base/ui/system/flex_item/align_self.js +15 -0
- package/dist/esm/base/ui/system/flex_item/flex.js +15 -0
- package/dist/esm/base/ui/system/flex_item/flex_basis.js +15 -0
- package/dist/esm/base/ui/system/flex_item/flex_grow.js +15 -0
- package/dist/esm/base/ui/system/flex_item/flex_item_set.js +31 -0
- package/dist/esm/base/ui/system/flex_item/flex_shrink.js +15 -0
- package/dist/esm/base/ui/system/flex_item/justify_self.js +16 -0
- package/dist/esm/base/ui/system/flex_item/order.js +15 -0
- package/dist/{cjs → esm}/base/ui/system/index.js +104 -416
- package/dist/esm/base/ui/system/overflow.js +21 -0
- package/dist/{cjs → esm}/base/ui/system/position/bottom.js +4 -6
- package/dist/{cjs → esm}/base/ui/system/position/left.js +4 -6
- package/dist/esm/base/ui/system/position/position.js +15 -0
- package/dist/esm/base/ui/system/position/position_set.js +29 -0
- package/dist/{cjs → esm}/base/ui/system/position/right.js +4 -6
- package/dist/{cjs → esm}/base/ui/system/position/top.js +4 -6
- package/dist/esm/base/ui/system/position/z_index.js +18 -0
- package/dist/{cjs → esm}/base/ui/system/spacing/margin.js +4 -6
- package/dist/{cjs → esm}/base/ui/system/spacing/padding.js +4 -6
- package/dist/esm/base/ui/system/spacing/spacing_set.js +21 -0
- package/dist/esm/base/ui/system/typography/font_family.js +18 -0
- package/dist/esm/base/ui/system/typography/font_size.js +18 -0
- package/dist/esm/base/ui/system/typography/font_style.js +15 -0
- package/dist/esm/base/ui/system/typography/font_weight.js +18 -0
- package/dist/esm/base/ui/system/typography/letter_spacing.js +18 -0
- package/dist/esm/base/ui/system/typography/line_height.js +15 -0
- package/dist/esm/base/ui/system/typography/text_align.js +15 -0
- package/dist/esm/base/ui/system/typography/text_color.js +18 -0
- package/dist/esm/base/ui/system/typography/text_decoration.js +15 -0
- package/dist/esm/base/ui/system/typography/text_transform.js +15 -0
- package/dist/esm/base/ui/system/typography/typography_set.js +37 -0
- package/dist/{cjs → esm}/base/ui/system/utils/ensure_numbers_are_within_scale.js +3 -4
- package/dist/esm/base/ui/system/utils/get_style_props_for_responsive_prop.js +73 -0
- package/dist/esm/base/ui/table_picker.js +71 -0
- package/dist/esm/base/ui/table_picker_synced.js +62 -0
- package/dist/esm/base/ui/text.js +117 -0
- package/dist/esm/base/ui/text_button.js +196 -0
- package/dist/{cjs → esm}/base/ui/theme/default_theme/button_variants.js +3 -3
- package/dist/esm/base/ui/theme/default_theme/control_sizes.js +102 -0
- package/dist/{cjs → esm}/base/ui/theme/default_theme/heading_styles.js +1 -1
- package/dist/{cjs → esm}/base/ui/theme/default_theme/index.js +9 -15
- package/dist/{cjs → esm}/base/ui/theme/default_theme/input_variants.js +3 -3
- package/dist/{cjs → esm}/base/ui/theme/default_theme/link_variants.js +3 -3
- package/dist/{cjs → esm}/base/ui/theme/default_theme/select_buttons_variants.js +4 -4
- package/dist/esm/base/ui/theme/default_theme/select_variants.js +50 -0
- package/dist/esm/base/ui/theme/default_theme/switch_variants.js +85 -0
- package/dist/{cjs → esm}/base/ui/theme/default_theme/text_button_variants.js +5 -5
- package/dist/{cjs → esm}/base/ui/theme/default_theme/text_styles.js +1 -1
- package/dist/{cjs → esm}/base/ui/theme/default_theme/tokens.js +14 -14
- package/dist/{cjs → esm}/base/ui/theme/theme_context.js +2 -2
- package/dist/{cjs → esm}/base/ui/theme/use_theme.js +2 -2
- package/dist/esm/base/ui/tooltip.js +175 -0
- package/dist/{cjs → esm}/base/ui/ui.js +48 -49
- package/dist/{cjs → esm}/base/ui/unstable_standalone_ui.js +27 -27
- package/dist/{cjs → esm}/base/ui/use_base.js +1 -1
- package/dist/{cjs → esm}/base/ui/use_cursor.js +5 -4
- package/dist/{cjs → esm}/base/ui/use_form_field.js +1 -1
- package/dist/{cjs → esm}/base/ui/use_loadable.js +25 -91
- package/dist/{cjs → esm}/base/ui/use_record_action_data.js +4 -3
- package/dist/{cjs → esm}/base/ui/use_records.js +9 -13
- package/dist/{cjs → esm}/base/ui/use_session.js +1 -1
- package/dist/{cjs → esm}/base/ui/use_settings_button.js +4 -3
- package/dist/esm/base/ui/use_styled_system.js +25 -0
- package/dist/{cjs → esm}/base/ui/use_text_color_for_background_color.js +4 -3
- package/dist/{cjs → esm}/base/ui/use_view_metadata.js +4 -4
- package/dist/{cjs → esm}/base/ui/use_viewport.js +2 -2
- package/dist/esm/base/ui/view_picker.js +89 -0
- package/dist/esm/base/ui/view_picker_synced.js +66 -0
- package/dist/esm/base/ui/viewport_constraint.js +129 -0
- package/dist/esm/base/ui/with_styled_system.js +129 -0
- package/dist/esm/base/undo_redo.js +37 -0
- package/dist/{cjs → esm}/base/unstable_testing_utils.js +27 -27
- package/dist/esm/base/viewport.js +353 -0
- package/dist/esm/injected/airtable_interface.js +22 -0
- package/dist/esm/interface/assert_run_context.js +12 -0
- package/dist/esm/interface/index.js +22 -0
- package/dist/esm/interface/models/base.js +35 -0
- package/dist/esm/interface/models/field.js +28 -0
- package/dist/{cjs → esm}/interface/models/models.js +8 -7
- package/dist/esm/interface/models/mutations.js +63 -0
- package/dist/esm/interface/models/record.js +51 -0
- package/dist/esm/interface/models/record_store.js +51 -0
- package/dist/esm/interface/models/session.js +28 -0
- package/dist/esm/interface/models/table.js +97 -0
- package/dist/esm/interface/sdk.js +78 -0
- package/dist/{cjs → esm}/interface/types/airtable_interface.js +2 -2
- package/dist/esm/interface/types/mutations.js +17 -0
- package/dist/esm/interface/ui/block_wrapper.js +69 -0
- package/dist/{cjs → esm}/interface/ui/initialize_block.js +13 -28
- package/dist/{cjs → esm}/interface/ui/ui.js +20 -19
- package/dist/{cjs → esm}/interface/ui/use_base.js +1 -1
- package/dist/{cjs → esm}/interface/ui/use_custom_properties.js +19 -35
- package/dist/{cjs → esm}/interface/ui/use_records.js +6 -5
- package/dist/{cjs → esm}/interface/ui/use_run_info.js +2 -2
- package/dist/{cjs → esm}/interface/ui/use_session.js +1 -1
- package/dist/{cjs → esm}/shared/color_utils.js +9 -16
- package/dist/{cjs → esm}/shared/colors.js +2 -2
- package/dist/{cjs → esm}/shared/error_utils.js +9 -11
- package/dist/{cjs → esm}/shared/event_tracker.js +3 -3
- package/dist/esm/shared/global_config.js +399 -0
- package/dist/esm/shared/models/abstract_model.js +94 -0
- package/dist/esm/shared/models/base_core.js +482 -0
- package/dist/esm/shared/models/field_core.js +288 -0
- package/dist/esm/shared/models/mutations_core.js +343 -0
- package/dist/esm/shared/models/record_core.js +215 -0
- package/dist/esm/shared/models/record_store_core.js +160 -0
- package/dist/esm/shared/models/session_core.js +160 -0
- package/dist/esm/shared/models/table_core.js +1318 -0
- package/dist/{cjs → esm}/shared/private_utils.js +54 -124
- package/dist/esm/shared/sdk_core.js +113 -0
- package/dist/{cjs → esm}/shared/types/field_core.js +1 -1
- package/dist/esm/shared/types/mutation_constants.js +11 -0
- package/dist/{cjs → esm}/shared/types/mutations_core.js +1 -1
- package/dist/{cjs → esm}/shared/types/permission_levels.js +1 -1
- package/dist/esm/shared/types/record.js +1 -0
- package/dist/esm/shared/types/stat.js +1 -0
- package/dist/esm/shared/types/table_core.js +1 -0
- package/dist/{cjs → esm}/shared/ui/global_config_synced_component_helpers.js +9 -9
- package/dist/esm/shared/ui/loader.js +47 -0
- package/dist/{cjs → esm}/shared/ui/remote_utils.js +5 -7
- package/dist/{cjs → esm}/shared/ui/sdk_context.js +4 -8
- package/dist/{cjs → esm}/shared/ui/use_array_identity.js +2 -2
- package/dist/{cjs → esm}/shared/ui/use_base.js +6 -5
- package/dist/{cjs → esm}/shared/ui/use_color_scheme.js +3 -8
- package/dist/{cjs → esm}/shared/ui/use_global_config.js +5 -4
- package/dist/{cjs → esm}/shared/ui/use_session.js +6 -5
- package/dist/{cjs → esm}/shared/ui/use_synced.js +7 -5
- package/dist/{cjs → esm}/shared/ui/use_watchable.js +13 -42
- package/dist/{cjs → esm}/shared/ui/with_hooks.js +6 -13
- package/dist/{cjs → esm}/shared/unstable_private_utils.js +4 -6
- package/dist/{cjs → esm}/shared/warning.js +5 -5
- package/dist/esm/shared/watchable.js +150 -0
- package/dist/esm/stats/block_stats.js +73 -0
- package/dist/esm/testing/base/abstract_mock_airtable_interface.js +208 -0
- package/dist/esm/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/base.d.ts +19 -0
- package/dist/types/src/base/models/base.d.ts.map +1 -1
- package/dist/types/src/base/models/create_aggregators.d.ts +3 -4
- package/dist/types/src/base/models/create_aggregators.d.ts.map +1 -1
- package/dist/types/src/base/models/field.d.ts +3 -2
- package/dist/types/src/base/models/field.d.ts.map +1 -1
- package/dist/types/src/base/models/models.d.ts +1 -2
- 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/models.js +1 -1
- package/package.json +24 -23
- package/types.js +1 -1
- package/dist/cjs/base/models/abstract_model_with_async_data.js +0 -273
- package/dist/cjs/base/models/base.js +0 -306
- package/dist/cjs/base/models/create_aggregators.js +0 -115
- package/dist/cjs/base/models/cursor.js +0 -393
- package/dist/cjs/base/models/field.js +0 -427
- package/dist/cjs/base/models/grouped_record_query_result.js +0 -399
- package/dist/cjs/base/models/linked_records_query_result.js +0 -728
- package/dist/cjs/base/models/mutations.js +0 -338
- package/dist/cjs/base/models/object_pool.js +0 -184
- package/dist/cjs/base/models/record.js +0 -304
- package/dist/cjs/base/models/record_query_result.js +0 -741
- package/dist/cjs/base/models/record_store.js +0 -825
- package/dist/cjs/base/models/session.js +0 -182
- package/dist/cjs/base/models/table.js +0 -668
- package/dist/cjs/base/models/table_or_view_query_result.js +0 -1013
- package/dist/cjs/base/models/view.js +0 -431
- package/dist/cjs/base/models/view_data_store.js +0 -403
- package/dist/cjs/base/models/view_metadata_query_result.js +0 -224
- package/dist/cjs/base/perform_record_action.js +0 -257
- package/dist/cjs/base/sdk.js +0 -233
- package/dist/cjs/base/settings_button.js +0 -138
- package/dist/cjs/base/ui/baymax_utils.js +0 -133
- package/dist/cjs/base/ui/block_wrapper.js +0 -143
- package/dist/cjs/base/ui/box.js +0 -110
- package/dist/cjs/base/ui/button.js +0 -182
- package/dist/cjs/base/ui/cell_renderer.js +0 -255
- package/dist/cjs/base/ui/choice_token.js +0 -110
- package/dist/cjs/base/ui/collaborator_token.js +0 -145
- package/dist/cjs/base/ui/color_palette.js +0 -239
- package/dist/cjs/base/ui/color_palette_synced.js +0 -98
- package/dist/cjs/base/ui/confirmation_dialog.js +0 -153
- package/dist/cjs/base/ui/dialog.js +0 -142
- package/dist/cjs/base/ui/dialog_close_button.js +0 -152
- package/dist/cjs/base/ui/expand_record_picker_async.js +0 -100
- package/dist/cjs/base/ui/field_icon.js +0 -62
- package/dist/cjs/base/ui/field_picker.js +0 -143
- package/dist/cjs/base/ui/field_picker_synced.js +0 -88
- package/dist/cjs/base/ui/form_field.js +0 -137
- package/dist/cjs/base/ui/geometry/point.js +0 -21
- package/dist/cjs/base/ui/geometry/rect.js +0 -67
- package/dist/cjs/base/ui/geometry/size.js +0 -21
- package/dist/cjs/base/ui/global_alert.js +0 -92
- package/dist/cjs/base/ui/heading.js +0 -181
- package/dist/cjs/base/ui/icon.js +0 -129
- package/dist/cjs/base/ui/input.js +0 -200
- package/dist/cjs/base/ui/input_synced.js +0 -89
- package/dist/cjs/base/ui/label.js +0 -105
- package/dist/cjs/base/ui/link.js +0 -229
- package/dist/cjs/base/ui/loader.js +0 -82
- package/dist/cjs/base/ui/modal.js +0 -184
- package/dist/cjs/base/ui/model_picker_select.js +0 -83
- package/dist/cjs/base/ui/popover.js +0 -407
- package/dist/cjs/base/ui/progress_bar.js +0 -128
- package/dist/cjs/base/ui/record_card.js +0 -653
- package/dist/cjs/base/ui/record_card_list.js +0 -377
- package/dist/cjs/base/ui/select.js +0 -247
- package/dist/cjs/base/ui/select_and_select_buttons_helpers.js +0 -87
- package/dist/cjs/base/ui/select_buttons.js +0 -192
- package/dist/cjs/base/ui/select_buttons_synced.js +0 -84
- package/dist/cjs/base/ui/select_synced.js +0 -87
- package/dist/cjs/base/ui/switch.js +0 -196
- package/dist/cjs/base/ui/switch_synced.js +0 -75
- package/dist/cjs/base/ui/synced.js +0 -70
- package/dist/cjs/base/ui/system/appearance/appearance_set.js +0 -30
- package/dist/cjs/base/ui/system/appearance/background_color.js +0 -21
- package/dist/cjs/base/ui/system/appearance/border_radius.js +0 -21
- package/dist/cjs/base/ui/system/appearance/box_shadow.js +0 -21
- package/dist/cjs/base/ui/system/appearance/opacity.js +0 -21
- package/dist/cjs/base/ui/system/dimensions/dimensions_set.js +0 -31
- package/dist/cjs/base/ui/system/dimensions/height.js +0 -21
- package/dist/cjs/base/ui/system/dimensions/max_height.js +0 -21
- package/dist/cjs/base/ui/system/dimensions/max_width.js +0 -21
- package/dist/cjs/base/ui/system/dimensions/min_height.js +0 -21
- package/dist/cjs/base/ui/system/dimensions/min_width.js +0 -21
- package/dist/cjs/base/ui/system/dimensions/width.js +0 -21
- package/dist/cjs/base/ui/system/display.js +0 -22
- package/dist/cjs/base/ui/system/flex_container/align_content.js +0 -18
- package/dist/cjs/base/ui/system/flex_container/align_items.js +0 -18
- package/dist/cjs/base/ui/system/flex_container/flex_container_set.js +0 -31
- package/dist/cjs/base/ui/system/flex_container/flex_direction.js +0 -18
- package/dist/cjs/base/ui/system/flex_container/flex_wrap.js +0 -18
- package/dist/cjs/base/ui/system/flex_container/justify_content.js +0 -18
- package/dist/cjs/base/ui/system/flex_container/justify_items.js +0 -19
- package/dist/cjs/base/ui/system/flex_item/align_self.js +0 -18
- package/dist/cjs/base/ui/system/flex_item/flex.js +0 -18
- package/dist/cjs/base/ui/system/flex_item/flex_basis.js +0 -18
- package/dist/cjs/base/ui/system/flex_item/flex_grow.js +0 -18
- package/dist/cjs/base/ui/system/flex_item/flex_item_set.js +0 -32
- package/dist/cjs/base/ui/system/flex_item/flex_shrink.js +0 -18
- package/dist/cjs/base/ui/system/flex_item/justify_self.js +0 -19
- package/dist/cjs/base/ui/system/flex_item/order.js +0 -18
- package/dist/cjs/base/ui/system/overflow.js +0 -24
- package/dist/cjs/base/ui/system/position/position.js +0 -18
- package/dist/cjs/base/ui/system/position/position_set.js +0 -31
- package/dist/cjs/base/ui/system/position/z_index.js +0 -21
- package/dist/cjs/base/ui/system/spacing/spacing_set.js +0 -27
- package/dist/cjs/base/ui/system/typography/font_family.js +0 -21
- package/dist/cjs/base/ui/system/typography/font_size.js +0 -21
- package/dist/cjs/base/ui/system/typography/font_style.js +0 -18
- package/dist/cjs/base/ui/system/typography/font_weight.js +0 -21
- package/dist/cjs/base/ui/system/typography/letter_spacing.js +0 -21
- package/dist/cjs/base/ui/system/typography/line_height.js +0 -18
- package/dist/cjs/base/ui/system/typography/text_align.js +0 -18
- package/dist/cjs/base/ui/system/typography/text_color.js +0 -21
- package/dist/cjs/base/ui/system/typography/text_decoration.js +0 -18
- package/dist/cjs/base/ui/system/typography/text_transform.js +0 -18
- package/dist/cjs/base/ui/system/typography/typography_set.js +0 -35
- 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/base/ui/system/utils/get_style_props_for_responsive_prop.js +0 -113
- package/dist/cjs/base/ui/table_picker.js +0 -95
- package/dist/cjs/base/ui/table_picker_synced.js +0 -84
- package/dist/cjs/base/ui/text.js +0 -150
- package/dist/cjs/base/ui/text_button.js +0 -228
- package/dist/cjs/base/ui/theme/default_theme/control_sizes.js +0 -96
- package/dist/cjs/base/ui/theme/default_theme/select_variants.js +0 -59
- package/dist/cjs/base/ui/theme/default_theme/switch_variants.js +0 -91
- package/dist/cjs/base/ui/tooltip.js +0 -215
- package/dist/cjs/base/ui/types/aria_props.js +0 -23
- package/dist/cjs/base/ui/types/data_attributes_prop.js +0 -18
- package/dist/cjs/base/ui/types/tooltip_anchor_props.js +0 -17
- package/dist/cjs/base/ui/use_styled_system.js +0 -32
- package/dist/cjs/base/ui/view_picker.js +0 -133
- package/dist/cjs/base/ui/view_picker_synced.js +0 -88
- package/dist/cjs/base/ui/viewport_constraint.js +0 -176
- package/dist/cjs/base/ui/with_styled_system.js +0 -165
- package/dist/cjs/base/undo_redo.js +0 -48
- package/dist/cjs/base/viewport.js +0 -397
- package/dist/cjs/injected/airtable_interface.js +0 -22
- package/dist/cjs/interface/index.js +0 -36
- package/dist/cjs/interface/models/base.js +0 -54
- package/dist/cjs/interface/models/field.js +0 -42
- package/dist/cjs/interface/models/mutations.js +0 -79
- package/dist/cjs/interface/models/record.js +0 -71
- package/dist/cjs/interface/models/record_store.js +0 -83
- package/dist/cjs/interface/models/session.js +0 -42
- package/dist/cjs/interface/models/table.js +0 -126
- package/dist/cjs/interface/sdk.js +0 -104
- package/dist/cjs/interface/types/mutations.js +0 -24
- package/dist/cjs/interface/ui/block_wrapper.js +0 -61
- package/dist/cjs/shared/global_config.js +0 -511
- package/dist/cjs/shared/models/abstract_model.js +0 -119
- package/dist/cjs/shared/models/base_core.js +0 -602
- package/dist/cjs/shared/models/field_core.js +0 -331
- package/dist/cjs/shared/models/mutations_core.js +0 -439
- package/dist/cjs/shared/models/record_core.js +0 -272
- package/dist/cjs/shared/models/record_store_core.js +0 -213
- package/dist/cjs/shared/models/session_core.js +0 -214
- package/dist/cjs/shared/models/table_core.js +0 -1561
- package/dist/cjs/shared/sdk_core.js +0 -115
- package/dist/cjs/shared/types/mutation_constants.js +0 -11
- package/dist/cjs/shared/ui/loader.js +0 -68
- package/dist/cjs/shared/watchable.js +0 -216
- package/dist/cjs/stats/block_stats.js +0 -96
- 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
- /package/dist/{cjs → esm}/base/types/aggregators.js +0 -0
- /package/dist/{cjs → esm}/base/types/backend_fetch_types.js +0 -0
- /package/dist/{cjs → esm}/base/types/base.js +0 -0
- /package/dist/{cjs → esm}/base/types/cursor.js +0 -0
- /package/dist/{cjs → esm}/base/types/field.js +0 -0
- /package/dist/{cjs → esm}/base/types/record.js +0 -0
- /package/dist/{cjs → esm}/base/types/record_action_data.js +0 -0
- /package/dist/{cjs → esm}/base/types/table.js +0 -0
- /package/dist/{cjs → esm}/base/types/viewport.js +0 -0
- /package/dist/{cjs → esm}/base/ui/system/utils/csstype.js +0 -0
- /package/dist/{cjs → esm}/base/ui/system/utils/types.js +0 -0
- /package/dist/{cjs/interface/types/base.js → esm/base/ui/types/aria_props.js} +0 -0
- /package/dist/{cjs/interface/types/field.js → esm/base/ui/types/data_attributes_prop.js} +0 -0
- /package/dist/{cjs/interface/types/record.js → esm/base/ui/types/tooltip_anchor_props.js} +0 -0
- /package/dist/{cjs/interface/types/table.js → esm/interface/types/base.js} +0 -0
- /package/dist/{cjs/sdk_mode.js → esm/interface/types/field.js} +0 -0
- /package/dist/{cjs/shared → esm/interface}/types/record.js +0 -0
- /package/dist/{cjs/shared/types/airtable_interface_core.js → esm/interface/types/table.js} +0 -0
- /package/dist/{cjs → esm}/interface/ui/expand_record.js +0 -0
- /package/dist/{cjs/shared/types/attachment.js → esm/sdk_mode.js} +0 -0
- /package/dist/{cjs/shared/types/base_core.js → esm/shared/types/airtable_interface_core.js} +0 -0
- /package/dist/{cjs/shared/types/collaborator.js → esm/shared/types/attachment.js} +0 -0
- /package/dist/{cjs/shared/types/global_config.js → esm/shared/types/base_core.js} +0 -0
- /package/dist/{cjs/shared/types/hyper_ids.js → esm/shared/types/collaborator.js} +0 -0
- /package/dist/{cjs/shared/types/stat.js → esm/shared/types/global_config.js} +0 -0
- /package/dist/{cjs/shared/types/table_core.js → esm/shared/types/hyper_ids.js} +0 -0
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.WatchablePerformRecordActionKeys = exports.PerformRecordAction = void 0;
|
|
8
|
-
exports.__injectSdkIntoPerformRecordAction = __injectSdkIntoPerformRecordAction;
|
|
9
|
-
exports.registerRecordActionDataCallback = registerRecordActionDataCallback;
|
|
10
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
-
var _error_utils = require("../shared/error_utils");
|
|
19
|
-
var _private_utils = require("../shared/private_utils");
|
|
20
|
-
var _abstract_model_with_async_data = _interopRequireDefault(require("./models/abstract_model_with_async_data"));
|
|
21
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
-
/** @hidden */
|
|
24
|
-
var WatchablePerformRecordActionKeys = exports.WatchablePerformRecordActionKeys = Object.freeze({
|
|
25
|
-
// isDataLoaded must be a watchable key for a LoadableModel.
|
|
26
|
-
isDataLoaded: 'isDataLoaded',
|
|
27
|
-
recordActionData: 'recordActionData'
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
/** @hidden */
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Returned by {@link registerRecordActionDataCallback}. Call it to unregister the previously
|
|
34
|
-
* registered function. Do this before registering another function or unmounting the component.
|
|
35
|
-
* */
|
|
36
|
-
/**
|
|
37
|
-
* This class exists to manage registering a callback to receive "Open block" / "Perform record
|
|
38
|
-
* action" messages.
|
|
39
|
-
* This is different to other message handlers (_registerHandlers) since the callback is specified
|
|
40
|
-
* by the block: it registers it during first render (vs the SDK registering during initialisation).
|
|
41
|
-
*
|
|
42
|
-
* On the liveapp side, we ensure that pending messages are held until the block registers the
|
|
43
|
-
* callback (or another message is sent). If there's a pending message, it is returned at
|
|
44
|
-
* registration.
|
|
45
|
-
*
|
|
46
|
-
* This class implements AbstractModelWithAsyncData in order to take advantage of useLoadable's
|
|
47
|
-
* suspense handling. "Loading" the model means registering the handler with liveapp. This allows us
|
|
48
|
-
* to suspend the block and return the initial pending message on first render.
|
|
49
|
-
*
|
|
50
|
-
* One difference is that _unloadData will not unregister the airtableInterface handler. We don't
|
|
51
|
-
* support unregistering it at this time for simplicity.
|
|
52
|
-
*
|
|
53
|
-
* This class is internal: users should use registerRecordActionDataCallback or useRecordActionData.
|
|
54
|
-
*
|
|
55
|
-
* @internal
|
|
56
|
-
* */
|
|
57
|
-
var PerformRecordAction = exports.PerformRecordAction = /*#__PURE__*/function (_AbstractModelWithAsy) {
|
|
58
|
-
/** @hidden */
|
|
59
|
-
function PerformRecordAction(sdk, airtableInterface) {
|
|
60
|
-
var _this;
|
|
61
|
-
(0, _classCallCheck2.default)(this, PerformRecordAction);
|
|
62
|
-
_this = _callSuper(this, PerformRecordAction, [sdk, 'performRecordAction']);
|
|
63
|
-
/** @internal */
|
|
64
|
-
(0, _defineProperty2.default)(_this, "_airtableInterface", void 0);
|
|
65
|
-
/** @internal */
|
|
66
|
-
(0, _defineProperty2.default)(_this, "_hasRegisteredHandler", void 0);
|
|
67
|
-
/** @internal */
|
|
68
|
-
(0, _defineProperty2.default)(_this, "_hasCompletedInitialDataLoad", void 0);
|
|
69
|
-
/**
|
|
70
|
-
* The data from the latest record action, or null if none have occurred yet.
|
|
71
|
-
*
|
|
72
|
-
* @internal */
|
|
73
|
-
(0, _defineProperty2.default)(_this, "recordActionData", void 0);
|
|
74
|
-
_this._airtableInterface = airtableInterface;
|
|
75
|
-
_this._hasRegisteredHandler = false;
|
|
76
|
-
_this._hasCompletedInitialDataLoad = false;
|
|
77
|
-
_this.recordActionData = null;
|
|
78
|
-
_this._handlePerformRecordAction = _this._handlePerformRecordAction.bind(_this);
|
|
79
|
-
return _this;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** @internal */
|
|
83
|
-
(0, _inherits2.default)(PerformRecordAction, _AbstractModelWithAsy);
|
|
84
|
-
return (0, _createClass2.default)(PerformRecordAction, [{
|
|
85
|
-
key: "_handlePerformRecordAction",
|
|
86
|
-
value: /** @hidden */
|
|
87
|
-
function _handlePerformRecordAction(data) {
|
|
88
|
-
this.recordActionData = data;
|
|
89
|
-
this._onChange(WatchablePerformRecordActionKeys.recordActionData, data);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* This accessor method is defined solely to satisfy the contract of the
|
|
94
|
-
* AbstractModel class.
|
|
95
|
-
*
|
|
96
|
-
* @internal */
|
|
97
|
-
}, {
|
|
98
|
-
key: "_dataOrNullIfDeleted",
|
|
99
|
-
get: function get() {
|
|
100
|
-
return (0, _error_utils.invariant)(false, 'The `data` property of PerformRecordAction should not be referenced');
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* This accessor method is defined because the parent implementation uses _dataOrNullIfDeleted
|
|
105
|
-
*
|
|
106
|
-
* @inheritdoc */
|
|
107
|
-
}, {
|
|
108
|
-
key: "isDeleted",
|
|
109
|
-
get: function get() {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* AbstractModelWithAsyncData implementation
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
/** @internal */
|
|
118
|
-
}, {
|
|
119
|
-
key: "_onChangeIsDataLoaded",
|
|
120
|
-
value: function _onChangeIsDataLoaded() {
|
|
121
|
-
this._onChange(WatchablePerformRecordActionKeys.isDataLoaded);
|
|
122
|
-
|
|
123
|
-
// Handle the case where there was a pending action whilst we were registering the handler.
|
|
124
|
-
// We only want to do this on the very initial load when we're actually registering the
|
|
125
|
-
// handler: avoid triggering this when the data is "unloaded" and "loaded".
|
|
126
|
-
if (!this._hasCompletedInitialDataLoad) {
|
|
127
|
-
this._hasCompletedInitialDataLoad = true;
|
|
128
|
-
if (this.recordActionData) {
|
|
129
|
-
this._handlePerformRecordAction(this.recordActionData);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/** @internal */
|
|
135
|
-
}, {
|
|
136
|
-
key: "_loadDataAsync",
|
|
137
|
-
value: (function () {
|
|
138
|
-
var _loadDataAsync2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
139
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
140
|
-
while (1) switch (_context.prev = _context.next) {
|
|
141
|
-
case 0:
|
|
142
|
-
if (this._hasRegisteredHandler) {
|
|
143
|
-
_context.next = 5;
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
this._hasRegisteredHandler = true;
|
|
147
|
-
_context.next = 4;
|
|
148
|
-
return this._airtableInterface.fetchAndSubscribeToPerformRecordActionAsync(this._handlePerformRecordAction);
|
|
149
|
-
case 4:
|
|
150
|
-
this.recordActionData = _context.sent;
|
|
151
|
-
case 5:
|
|
152
|
-
return _context.abrupt("return", []);
|
|
153
|
-
case 6:
|
|
154
|
-
case "end":
|
|
155
|
-
return _context.stop();
|
|
156
|
-
}
|
|
157
|
-
}, _callee, this);
|
|
158
|
-
}));
|
|
159
|
-
function _loadDataAsync() {
|
|
160
|
-
return _loadDataAsync2.apply(this, arguments);
|
|
161
|
-
}
|
|
162
|
-
return _loadDataAsync;
|
|
163
|
-
}() /** @internal */)
|
|
164
|
-
}, {
|
|
165
|
-
key: "_unloadData",
|
|
166
|
-
value: function _unloadData() {
|
|
167
|
-
// Hack: Don't do anything, since "loading" means registering a handler, and we don't need
|
|
168
|
-
// to unregister it.
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/** @internal */
|
|
172
|
-
}], [{
|
|
173
|
-
key: "_isWatchableKey",
|
|
174
|
-
value: function _isWatchableKey(key) {
|
|
175
|
-
return (0, _private_utils.isEnumValue)(WatchablePerformRecordActionKeys, key);
|
|
176
|
-
}
|
|
177
|
-
}, {
|
|
178
|
-
key: "_shouldLoadDataForKey",
|
|
179
|
-
value: function _shouldLoadDataForKey(key) {
|
|
180
|
-
// Watching recordActionData will load data (aka register handler with liveapp) and trigger
|
|
181
|
-
// callback when done.
|
|
182
|
-
return key === WatchablePerformRecordActionKeys.recordActionData;
|
|
183
|
-
}
|
|
184
|
-
}]);
|
|
185
|
-
}(_abstract_model_with_async_data.default);
|
|
186
|
-
/**
|
|
187
|
-
* Registers a callback to handle "open block" / "perform record action" events (from button field).
|
|
188
|
-
*
|
|
189
|
-
* Returns a unsubscribe function that should be used to unregister the callback for cleanup on
|
|
190
|
-
* component unmount, or if you wish to register a different function.
|
|
191
|
-
*
|
|
192
|
-
* Also see {@link useRecordActionData}, which subscribes to the same events in a synchronous way.
|
|
193
|
-
*
|
|
194
|
-
* Your block will not receive "perform record action" events until a callback is registered -
|
|
195
|
-
* they're held until registration to ensure the block is ready to handle the event (e.g. has
|
|
196
|
-
* finished loading).
|
|
197
|
-
*
|
|
198
|
-
* Because of this, we recommend only registering a callback once, in your top level component -
|
|
199
|
-
* otherwise, messages could be received while not all callbacks have been successfully registered.
|
|
200
|
-
* Similarly, using both `registerRecordActionDataCallback` and `useRecordActionData` is not
|
|
201
|
-
* supported.
|
|
202
|
-
*
|
|
203
|
-
* You can test your block in development by sending "perform record action" events to your block
|
|
204
|
-
* in the "Advanced" panel of the block developer tools.
|
|
205
|
-
*
|
|
206
|
-
* After releasing your block, you can use it with a button field by choosing the "Open custom
|
|
207
|
-
* block" action and selecting your block.
|
|
208
|
-
*
|
|
209
|
-
* @example
|
|
210
|
-
* ```js
|
|
211
|
-
* import React, {useEffect, useState} from 'react';
|
|
212
|
-
* import {registerRecordActionDataCallback} from '@airtable/blocks/base/ui';
|
|
213
|
-
*
|
|
214
|
-
* function LatestRecordAction() {
|
|
215
|
-
* const [recordActionData, setRecordActionData] = useState(null);
|
|
216
|
-
*
|
|
217
|
-
* const callback = (data) => {
|
|
218
|
-
* console.log('Record action received', data);
|
|
219
|
-
* setRecordActionData(data);
|
|
220
|
-
* }
|
|
221
|
-
*
|
|
222
|
-
* useEffect(() => {
|
|
223
|
-
* // Return the unsubscribe function so it's run on cleanup.
|
|
224
|
-
* return registerRecordActionDataCallback(callback);
|
|
225
|
-
* }, [callback]);
|
|
226
|
-
*
|
|
227
|
-
* if (recordActionData === null) {
|
|
228
|
-
* return <span>No events yet</span>;
|
|
229
|
-
* }
|
|
230
|
-
*
|
|
231
|
-
* return (
|
|
232
|
-
* <ul>
|
|
233
|
-
* <li>Record id: {recordActionData.recordId}</li>
|
|
234
|
-
* <li>View id: {recordActionData.viewId}</li>
|
|
235
|
-
* <li>Table id: {recordActionData.tableId}</li>
|
|
236
|
-
* </ul>
|
|
237
|
-
* );
|
|
238
|
-
* }
|
|
239
|
-
* ```
|
|
240
|
-
*
|
|
241
|
-
*/
|
|
242
|
-
function registerRecordActionDataCallback(callback) {
|
|
243
|
-
var _sdk2 = sdk,
|
|
244
|
-
performRecordAction = _sdk2.performRecordAction;
|
|
245
|
-
var wrappedCallback = (model, key, data) => {
|
|
246
|
-
callback(data);
|
|
247
|
-
};
|
|
248
|
-
performRecordAction.watch(WatchablePerformRecordActionKeys.recordActionData, wrappedCallback);
|
|
249
|
-
return () => performRecordAction.unwatch(WatchablePerformRecordActionKeys.recordActionData, wrappedCallback);
|
|
250
|
-
}
|
|
251
|
-
var sdk;
|
|
252
|
-
|
|
253
|
-
// The application-level Sdk instance must be injected dynamically to avoid
|
|
254
|
-
// circular dependencies at the time of module resolution.
|
|
255
|
-
function __injectSdkIntoPerformRecordAction(_sdk) {
|
|
256
|
-
sdk = _sdk;
|
|
257
|
-
}
|
package/dist/cjs/base/sdk.js
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.iterator.js");
|
|
4
|
-
require("core-js/modules/es.object.to-string.js");
|
|
5
|
-
require("core-js/modules/es.weak-map.js");
|
|
6
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
7
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
8
|
-
Object.defineProperty(exports, "__esModule", {
|
|
9
|
-
value: true
|
|
10
|
-
});
|
|
11
|
-
exports.default = void 0;
|
|
12
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
-
var React = _interopRequireWildcard(require("react"));
|
|
21
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
|
-
var _sdk_core = require("../shared/sdk_core");
|
|
23
|
-
var _viewport = _interopRequireDefault(require("./viewport"));
|
|
24
|
-
var _base = _interopRequireDefault(require("./models/base"));
|
|
25
|
-
var _session = _interopRequireDefault(require("./models/session"));
|
|
26
|
-
var _mutations = _interopRequireDefault(require("./models/mutations"));
|
|
27
|
-
var _cursor = _interopRequireDefault(require("./models/cursor"));
|
|
28
|
-
var _settings_button = _interopRequireDefault(require("./settings_button"));
|
|
29
|
-
var _undo_redo = _interopRequireDefault(require("./undo_redo"));
|
|
30
|
-
var _perform_record_action = require("./perform_record_action");
|
|
31
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
32
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
33
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
34
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @hidden */ /** */ // NOTE: The version of React running in the Block SDK is controlled by the block.
|
|
35
|
-
// The SDK should not make too many assumptions about which version of React or
|
|
36
|
-
// ReactDOM is running.
|
|
37
|
-
// HACK: make sure React.PropTypes is defined. If the block is using a newer
|
|
38
|
-
// version of React, PropTypes won't be available, but a few SDK components
|
|
39
|
-
// try to reference it. Once grepping React.PropTypes in hyperbase doesn't
|
|
40
|
-
// return any matches, we can remove this hack.
|
|
41
|
-
if (!React.PropTypes) {
|
|
42
|
-
React.PropTypes = _propTypes.default;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** @hidden */
|
|
46
|
-
|
|
47
|
-
/** @internal */
|
|
48
|
-
function defaultUpdateBatcher(applyUpdates) {
|
|
49
|
-
applyUpdates();
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* We document this manually.
|
|
54
|
-
*
|
|
55
|
-
* @hidden
|
|
56
|
-
*/
|
|
57
|
-
var BaseBlockSdk = exports.default = /*#__PURE__*/function (_BlockSdkCore) {
|
|
58
|
-
/** @hidden */
|
|
59
|
-
function BaseBlockSdk(airtableInterface) {
|
|
60
|
-
var _this;
|
|
61
|
-
(0, _classCallCheck2.default)(this, BaseBlockSdk);
|
|
62
|
-
_this = _callSuper(this, BaseBlockSdk, [airtableInterface]);
|
|
63
|
-
/** Controls the block's viewport. You can fullscreen the block and add size
|
|
64
|
-
* constrains using `viewport`.
|
|
65
|
-
*/
|
|
66
|
-
(0, _defineProperty2.default)(_this, "viewport", void 0);
|
|
67
|
-
/** Returns information about the active table, active view, and selected records. */
|
|
68
|
-
(0, _defineProperty2.default)(_this, "cursor", void 0);
|
|
69
|
-
/**
|
|
70
|
-
* Controls the block's {@link settingsButton settings button}.
|
|
71
|
-
*/
|
|
72
|
-
(0, _defineProperty2.default)(_this, "settingsButton", void 0);
|
|
73
|
-
/** @hidden */
|
|
74
|
-
(0, _defineProperty2.default)(_this, "undoRedo", void 0);
|
|
75
|
-
/** @internal */
|
|
76
|
-
(0, _defineProperty2.default)(_this, "performRecordAction", void 0);
|
|
77
|
-
// When models are updated on the frontend, we want to batch them together and have React do a
|
|
78
|
-
// single render.
|
|
79
|
-
//
|
|
80
|
-
// Without this, in sync-mode React (the current default), anything that triggers an update
|
|
81
|
-
// (like .setState or .forceUpdate) will instantly, synchronously re-render. So if you have an
|
|
82
|
-
// update that triggers multiple updates across your tree, you get multiple renders in an
|
|
83
|
-
// unpredictable order. This is bad because it's unnecessary work and the update order can
|
|
84
|
-
// contradict react's normal top-down data flow which can cause subtle bugs.
|
|
85
|
-
//
|
|
86
|
-
// We set _runWithUpdateBatching to ReactDOM.unstable_batchedUpdates to facilitate this. We
|
|
87
|
-
// don't know for sure though that React is in use on the page, so we leave actually setting
|
|
88
|
-
// this when the developer sets up their block with React, in UI.initializeBlock.
|
|
89
|
-
//
|
|
90
|
-
// This can be eliminated if we stop supporting versions of React below 18. In React 18,
|
|
91
|
-
// updates are always batched by default.
|
|
92
|
-
/** @internal */
|
|
93
|
-
(0, _defineProperty2.default)(_this, "_runWithUpdateBatching", defaultUpdateBatcher);
|
|
94
|
-
var sdkInitData = airtableInterface.sdkInitData;
|
|
95
|
-
|
|
96
|
-
// Bind the public methods on this class so users can import
|
|
97
|
-
// just the method, e.g.
|
|
98
|
-
// import {reload} from '@airtable/blocks/base';
|
|
99
|
-
_this.unstable_fetchAsync = _this.unstable_fetchAsync.bind(_this);
|
|
100
|
-
_this.viewport = new _viewport.default(sdkInitData.isFullscreen, airtableInterface);
|
|
101
|
-
_this.cursor = new _cursor.default(_this);
|
|
102
|
-
_this.settingsButton = new _settings_button.default(airtableInterface);
|
|
103
|
-
_this.undoRedo = new _undo_redo.default(airtableInterface);
|
|
104
|
-
_this.performRecordAction = new _perform_record_action.PerformRecordAction(_this, airtableInterface);
|
|
105
|
-
|
|
106
|
-
// Now that we've constructed our models, let's hook them up to realtime changes.
|
|
107
|
-
_this._registerHandlers();
|
|
108
|
-
|
|
109
|
-
// TODO: freeze this object before we ship the code editor.
|
|
110
|
-
return _this;
|
|
111
|
-
}
|
|
112
|
-
/** @internal */
|
|
113
|
-
(0, _inherits2.default)(BaseBlockSdk, _BlockSdkCore);
|
|
114
|
-
return (0, _createClass2.default)(BaseBlockSdk, [{
|
|
115
|
-
key: "_constructSession",
|
|
116
|
-
value: function _constructSession() {
|
|
117
|
-
return new _session.default(this);
|
|
118
|
-
}
|
|
119
|
-
/** @internal */
|
|
120
|
-
}, {
|
|
121
|
-
key: "_constructBase",
|
|
122
|
-
value: function _constructBase() {
|
|
123
|
-
return new _base.default(this);
|
|
124
|
-
}
|
|
125
|
-
/** @internal */
|
|
126
|
-
}, {
|
|
127
|
-
key: "_constructMutations",
|
|
128
|
-
value: function _constructMutations() {
|
|
129
|
-
return new _mutations.default(this, this.session, this.base, changes => this.__applyModelChanges(changes), updates => this.__applyGlobalConfigUpdates(updates));
|
|
130
|
-
}
|
|
131
|
-
/** @internal */
|
|
132
|
-
}, {
|
|
133
|
-
key: "__applyModelChanges",
|
|
134
|
-
value: function __applyModelChanges(changes) {
|
|
135
|
-
this._runWithUpdateBatching(() => {
|
|
136
|
-
var changedBasePaths = this.base.__applyChangesWithoutTriggeringEvents(changes);
|
|
137
|
-
var changedCursorKeys = this.cursor.__applyChangesWithoutTriggeringEvents(changes);
|
|
138
|
-
var changedSessionKeys = this.session.__applyChangesWithoutTriggeringEvents(changes);
|
|
139
|
-
this.base.__triggerOnChangeForChangedPaths(changedBasePaths);
|
|
140
|
-
this.cursor.__triggerOnChangeForChangedKeys(changedCursorKeys);
|
|
141
|
-
this.session.__triggerOnChangeForChangedKeys(changedSessionKeys);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
/** @internal */
|
|
145
|
-
}, {
|
|
146
|
-
key: "__applyGlobalConfigUpdates",
|
|
147
|
-
value: function __applyGlobalConfigUpdates(updates) {
|
|
148
|
-
this._runWithUpdateBatching(() => {
|
|
149
|
-
this.globalConfig.__setMultipleKvPaths(updates);
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
/** @internal */
|
|
153
|
-
}, {
|
|
154
|
-
key: "_registerHandlers",
|
|
155
|
-
value: function _registerHandlers() {
|
|
156
|
-
// base
|
|
157
|
-
|
|
158
|
-
this.__airtableInterface.subscribeToModelUpdates(_ref => {
|
|
159
|
-
var changes = _ref.changes;
|
|
160
|
-
this.__applyModelChanges(changes);
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
// global config
|
|
164
|
-
this.__airtableInterface.subscribeToGlobalConfigUpdates(_ref2 => {
|
|
165
|
-
var updates = _ref2.updates;
|
|
166
|
-
this.__applyGlobalConfigUpdates(updates);
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
// settings button
|
|
170
|
-
this.__airtableInterface.subscribeToSettingsButtonClick(() => {
|
|
171
|
-
if (this.settingsButton.isVisible) {
|
|
172
|
-
this._runWithUpdateBatching(() => {
|
|
173
|
-
// Since there's an async gap when communicating with liveapp,
|
|
174
|
-
// no-op if the button has been hidden since it was clicked.
|
|
175
|
-
this.settingsButton.__onClick();
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
// viewport
|
|
181
|
-
this.__airtableInterface.subscribeToEnterFullScreen(() => {
|
|
182
|
-
this._runWithUpdateBatching(() => {
|
|
183
|
-
this.viewport.__onEnterFullscreen();
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
this.__airtableInterface.subscribeToExitFullScreen(() => {
|
|
187
|
-
this._runWithUpdateBatching(() => {
|
|
188
|
-
this.viewport.__onExitFullscreen();
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
this.__airtableInterface.subscribeToFocus(() => {
|
|
192
|
-
this._runWithUpdateBatching(() => {
|
|
193
|
-
this.viewport.__focus();
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
/** @internal */
|
|
198
|
-
}, {
|
|
199
|
-
key: "__setBatchedUpdatesFn",
|
|
200
|
-
value: function __setBatchedUpdatesFn(newUpdateBatcher) {
|
|
201
|
-
this._runWithUpdateBatching = newUpdateBatcher;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/** @hidden */
|
|
205
|
-
}, {
|
|
206
|
-
key: "unstable_fetchAsync",
|
|
207
|
-
value: (function () {
|
|
208
|
-
var _unstable_fetchAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(requestJson) {
|
|
209
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
210
|
-
while (1) switch (_context.prev = _context.next) {
|
|
211
|
-
case 0:
|
|
212
|
-
_context.next = 2;
|
|
213
|
-
return this.__airtableInterface.performBackendFetchAsync(requestJson);
|
|
214
|
-
case 2:
|
|
215
|
-
return _context.abrupt("return", _context.sent);
|
|
216
|
-
case 3:
|
|
217
|
-
case "end":
|
|
218
|
-
return _context.stop();
|
|
219
|
-
}
|
|
220
|
-
}, _callee, this);
|
|
221
|
-
}));
|
|
222
|
-
function unstable_fetchAsync(_x) {
|
|
223
|
-
return _unstable_fetchAsync.apply(this, arguments);
|
|
224
|
-
}
|
|
225
|
-
return unstable_fetchAsync;
|
|
226
|
-
}() /** @hidden */)
|
|
227
|
-
}, {
|
|
228
|
-
key: "getBlockRunContext",
|
|
229
|
-
value: function getBlockRunContext() {
|
|
230
|
-
return this.__airtableInterface.sdkInitData.runContext;
|
|
231
|
-
}
|
|
232
|
-
}]);
|
|
233
|
-
}(_sdk_core.BlockSdkCore);
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _watchable = _interopRequireDefault(require("../shared/watchable"));
|
|
15
|
-
var _private_utils = require("../shared/private_utils");
|
|
16
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
17
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @module @airtable/blocks: settingsButton */ /** */
|
|
18
|
-
var WatchableSettingsButtonKeys = Object.freeze({
|
|
19
|
-
isVisible: 'isVisible',
|
|
20
|
-
click: 'click'
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A watchable key in {@link SettingsButton}.
|
|
25
|
-
* - `isVisible`
|
|
26
|
-
* - `click`
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* Interface to the settings button that lives outside the extension's viewport.
|
|
30
|
-
*
|
|
31
|
-
* The {@link useSettingsButton} hook is the recommended way to use the settings button, but you can
|
|
32
|
-
* also use it with {@link useWatchable} if you want more granular control (for example, to only
|
|
33
|
-
* show the button conditionally).
|
|
34
|
-
*
|
|
35
|
-
* @alias settingsButton
|
|
36
|
-
* @example
|
|
37
|
-
* ```js
|
|
38
|
-
* import {settingsButton} from '@airtable/blocks/base';
|
|
39
|
-
* import {useWatchable} from '@airtable/blocks/base/ui';
|
|
40
|
-
*
|
|
41
|
-
* function AppWithSettings({shouldShowSettingsButton}) {
|
|
42
|
-
* useEffect(() => {
|
|
43
|
-
* // A count of calls to `show()` and `hide()` is maintained internally. The button will
|
|
44
|
-
* // stay visible if there are more calls to `show()` than `hide()` - so here, we check
|
|
45
|
-
* // `isVisible` so we only we only call them when necessary.
|
|
46
|
-
* // The button is not visible by default.
|
|
47
|
-
* if (shouldShowSettingsButton && !settingsButton.isVisible) {
|
|
48
|
-
* settingsButton.show();
|
|
49
|
-
* } else if (!shouldShowSettingsButton && settingsButton.isVisible) {
|
|
50
|
-
* settingsButton.hide();
|
|
51
|
-
* }
|
|
52
|
-
* });
|
|
53
|
-
*
|
|
54
|
-
* useWatchable(settingsButton, 'click', function() {
|
|
55
|
-
* alert('Clicked!');
|
|
56
|
-
* });
|
|
57
|
-
* }
|
|
58
|
-
* ```
|
|
59
|
-
* @docsPath models/SettingsButton
|
|
60
|
-
*/
|
|
61
|
-
var SettingsButton = /*#__PURE__*/function (_Watchable) {
|
|
62
|
-
/** @internal */
|
|
63
|
-
function SettingsButton(airtableInterface) {
|
|
64
|
-
var _this;
|
|
65
|
-
(0, _classCallCheck2.default)(this, SettingsButton);
|
|
66
|
-
_this = _callSuper(this, SettingsButton);
|
|
67
|
-
/** @internal */
|
|
68
|
-
(0, _defineProperty2.default)(_this, "_refCount", void 0);
|
|
69
|
-
/** @internal */
|
|
70
|
-
(0, _defineProperty2.default)(_this, "_airtableInterface", void 0);
|
|
71
|
-
_this._refCount = 0;
|
|
72
|
-
_this._airtableInterface = airtableInterface;
|
|
73
|
-
return _this;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Whether the settings button is being shown.
|
|
78
|
-
* Can be watched.
|
|
79
|
-
*/
|
|
80
|
-
(0, _inherits2.default)(SettingsButton, _Watchable);
|
|
81
|
-
return (0, _createClass2.default)(SettingsButton, [{
|
|
82
|
-
key: "isVisible",
|
|
83
|
-
get: function get() {
|
|
84
|
-
return this._refCount > 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Show the settings button.
|
|
89
|
-
*/
|
|
90
|
-
}, {
|
|
91
|
-
key: "show",
|
|
92
|
-
value: function show() {
|
|
93
|
-
// Is now visible: trigger change watches and set it to be visible
|
|
94
|
-
if (this._refCount === 0) {
|
|
95
|
-
this._onChange(WatchableSettingsButtonKeys.isVisible, true);
|
|
96
|
-
this._airtableInterface.setSettingsButtonVisibility(true);
|
|
97
|
-
}
|
|
98
|
-
this._refCount += 1;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Hide the settings button.
|
|
103
|
-
*
|
|
104
|
-
* Note: A count of calls to `show()` and `hide()` is maintained internally. The button will
|
|
105
|
-
* stay visible if there are more calls to `show()` than `hide()`.
|
|
106
|
-
*/
|
|
107
|
-
}, {
|
|
108
|
-
key: "hide",
|
|
109
|
-
value: function hide() {
|
|
110
|
-
// Be forgiving if hide() is called too many times, since we don't expose the count
|
|
111
|
-
if (this._refCount > 0) {
|
|
112
|
-
this._refCount -= 1;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// Should no longer be visible: trigger change watches and set it to be not visible
|
|
116
|
-
if (this._refCount === 0) {
|
|
117
|
-
this._onChange(WatchableSettingsButtonKeys.isVisible, false);
|
|
118
|
-
this._airtableInterface.setSettingsButtonVisibility(false);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/** @internal */
|
|
123
|
-
}, {
|
|
124
|
-
key: "__onClick",
|
|
125
|
-
value: function __onClick() {
|
|
126
|
-
this._onChange(WatchableSettingsButtonKeys.click);
|
|
127
|
-
}
|
|
128
|
-
}], [{
|
|
129
|
-
key: "_isWatchableKey",
|
|
130
|
-
value: /** @internal */
|
|
131
|
-
function _isWatchableKey(key) {
|
|
132
|
-
return (0, _private_utils.isEnumValue)(WatchableSettingsButtonKeys, key);
|
|
133
|
-
}
|
|
134
|
-
}]);
|
|
135
|
-
}(_watchable.default);
|
|
136
|
-
/** @internal */
|
|
137
|
-
(0, _defineProperty2.default)(SettingsButton, "_className", 'SettingsButton');
|
|
138
|
-
var _default = exports.default = SettingsButton;
|