@airtable/blocks 1.18.1 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/dist/cjs/color_utils.js +21 -23
- package/dist/cjs/colors.js +4 -60
- package/dist/cjs/error_utils.js +15 -25
- package/dist/cjs/event_tracker.js +5 -11
- package/dist/cjs/global_config.js +107 -188
- package/dist/cjs/index.js +16 -40
- package/dist/cjs/injected/airtable_interface.js +1 -6
- package/dist/cjs/models/abstract_model.js +50 -81
- package/dist/cjs/models/abstract_model_with_async_data.js +102 -177
- package/dist/cjs/models/base.js +211 -374
- package/dist/cjs/models/create_aggregators.js +53 -47
- package/dist/cjs/models/cursor.js +125 -201
- package/dist/cjs/models/field.js +256 -303
- package/dist/cjs/models/grouped_record_query_result.js +210 -286
- package/dist/cjs/models/linked_records_query_result.js +276 -454
- package/dist/cjs/models/models.js +36 -50
- package/dist/cjs/models/mutation_constants.js +5 -9
- package/dist/cjs/models/mutations.js +125 -338
- package/dist/cjs/models/object_pool.js +37 -94
- package/dist/cjs/models/record.js +132 -226
- package/dist/cjs/models/record_coloring.js +14 -19
- package/dist/cjs/models/record_query_result.js +323 -282
- package/dist/cjs/models/record_store.js +355 -688
- package/dist/cjs/models/session.js +99 -158
- package/dist/cjs/models/table.js +361 -549
- package/dist/cjs/models/table_or_view_query_result.js +410 -765
- package/dist/cjs/models/view.js +161 -204
- package/dist/cjs/models/view_data_store.js +177 -282
- package/dist/cjs/models/view_metadata_query_result.js +96 -127
- package/dist/cjs/perform_record_action.js +69 -103
- package/dist/cjs/private_utils.js +133 -223
- package/dist/cjs/sdk.js +97 -142
- package/dist/cjs/settings_button.js +30 -57
- package/dist/cjs/stats/block_stats.js +3 -15
- package/dist/cjs/testing/abstract_mock_airtable_interface.js +53 -97
- package/dist/cjs/types/airtable_interface.js +36 -8
- package/dist/cjs/types/field.js +66 -12
- package/dist/cjs/types/mutations.js +99 -6
- package/dist/cjs/types/permission_levels.js +2 -4
- package/dist/cjs/types/undo_redo.js +2 -3
- package/dist/cjs/types/view.js +16 -11
- package/dist/cjs/ui/base_provider.js +14 -9
- package/dist/cjs/ui/baymax_utils.js +107 -1102
- package/dist/cjs/ui/block_wrapper.js +30 -68
- package/dist/cjs/ui/box.js +52 -56
- package/dist/cjs/ui/button.js +60 -77
- package/dist/cjs/ui/cell_renderer.js +78 -139
- package/dist/cjs/ui/choice_token.js +45 -47
- package/dist/cjs/ui/collaborator_token.js +33 -54
- package/dist/cjs/ui/color_palette.js +58 -106
- package/dist/cjs/ui/color_palette_synced.js +41 -52
- package/dist/cjs/ui/confirmation_dialog.js +53 -69
- package/dist/cjs/ui/control_sizes.js +21 -46
- package/dist/cjs/ui/create_detect_element_resize.js +16 -50
- package/dist/cjs/ui/css_helpers.js +3 -10
- package/dist/cjs/ui/dialog.js +44 -71
- package/dist/cjs/ui/dialog_close_button.js +52 -72
- package/dist/cjs/ui/expand_record.js +4 -11
- package/dist/cjs/ui/expand_record_list.js +6 -11
- package/dist/cjs/ui/expand_record_picker_async.js +18 -35
- package/dist/cjs/ui/field_icon.js +25 -28
- package/dist/cjs/ui/field_picker.js +47 -81
- package/dist/cjs/ui/field_picker_synced.js +33 -44
- package/dist/cjs/ui/form_field.js +45 -64
- package/dist/cjs/ui/geometry/geometry.js +6 -10
- package/dist/cjs/ui/geometry/point.js +5 -13
- package/dist/cjs/ui/geometry/rect.js +7 -29
- package/dist/cjs/ui/geometry/size.js +5 -13
- package/dist/cjs/ui/global_alert.js +35 -61
- package/dist/cjs/ui/global_config_synced_component_helpers.js +4 -13
- package/dist/cjs/ui/heading.js +63 -92
- package/dist/cjs/ui/icon.js +44 -66
- package/dist/cjs/ui/icon_config.js +13 -24
- package/dist/cjs/ui/initialize_block.js +23 -36
- package/dist/cjs/ui/input.js +74 -87
- package/dist/cjs/ui/input_synced.js +34 -43
- package/dist/cjs/ui/key_codes.js +4 -9
- package/dist/cjs/ui/label.js +45 -50
- package/dist/cjs/ui/link.js +74 -89
- package/dist/cjs/ui/loader.js +26 -42
- package/dist/cjs/ui/modal.js +63 -89
- package/dist/cjs/ui/model_picker_select.js +29 -47
- package/dist/cjs/ui/popover.js +98 -180
- package/dist/cjs/ui/progress_bar.js +45 -51
- package/dist/cjs/ui/record_card.js +143 -278
- package/dist/cjs/ui/record_card_list.js +117 -165
- package/dist/cjs/ui/remote_utils.js +5 -13
- package/dist/cjs/ui/sdk_context.js +7 -9
- package/dist/cjs/ui/select.js +84 -118
- package/dist/cjs/ui/select_and_select_buttons_helpers.js +29 -45
- package/dist/cjs/ui/select_buttons.js +54 -90
- package/dist/cjs/ui/select_buttons_synced.js +32 -41
- package/dist/cjs/ui/select_synced.js +32 -42
- package/dist/cjs/ui/switch.js +66 -84
- package/dist/cjs/ui/switch_synced.js +32 -38
- package/dist/cjs/ui/synced.js +16 -43
- package/dist/cjs/ui/system/all_styles_set.js +89 -22
- package/dist/cjs/ui/system/appearance/appearance_set.js +15 -26
- package/dist/cjs/ui/system/appearance/background_color.js +6 -12
- package/dist/cjs/ui/system/appearance/border.js +6 -12
- package/dist/cjs/ui/system/appearance/border_radius.js +6 -12
- package/dist/cjs/ui/system/appearance/box_shadow.js +6 -12
- package/dist/cjs/ui/system/appearance/opacity.js +5 -11
- package/dist/cjs/ui/system/dimensions/dimensions_set.js +15 -27
- package/dist/cjs/ui/system/dimensions/height.js +5 -11
- package/dist/cjs/ui/system/dimensions/max_height.js +5 -11
- package/dist/cjs/ui/system/dimensions/max_width.js +5 -11
- package/dist/cjs/ui/system/dimensions/min_height.js +5 -11
- package/dist/cjs/ui/system/dimensions/min_width.js +5 -11
- package/dist/cjs/ui/system/dimensions/width.js +5 -11
- package/dist/cjs/ui/system/display.js +8 -9
- package/dist/cjs/ui/system/flex_container/align_content.js +6 -12
- package/dist/cjs/ui/system/flex_container/align_items.js +6 -12
- package/dist/cjs/ui/system/flex_container/flex_container_set.js +15 -27
- package/dist/cjs/ui/system/flex_container/flex_direction.js +5 -11
- package/dist/cjs/ui/system/flex_container/flex_wrap.js +5 -11
- package/dist/cjs/ui/system/flex_container/justify_content.js +5 -11
- package/dist/cjs/ui/system/flex_container/justify_items.js +5 -11
- package/dist/cjs/ui/system/flex_item/align_self.js +6 -12
- package/dist/cjs/ui/system/flex_item/flex.js +5 -11
- package/dist/cjs/ui/system/flex_item/flex_basis.js +5 -11
- package/dist/cjs/ui/system/flex_item/flex_grow.js +5 -11
- package/dist/cjs/ui/system/flex_item/flex_item_set.js +15 -28
- package/dist/cjs/ui/system/flex_item/flex_shrink.js +5 -11
- package/dist/cjs/ui/system/flex_item/justify_self.js +5 -11
- package/dist/cjs/ui/system/flex_item/order.js +5 -11
- package/dist/cjs/ui/system/index.js +310 -362
- package/dist/cjs/ui/system/overflow.js +8 -9
- package/dist/cjs/ui/system/position/bottom.js +6 -13
- package/dist/cjs/ui/system/position/left.js +5 -12
- package/dist/cjs/ui/system/position/position.js +5 -11
- package/dist/cjs/ui/system/position/position_set.js +15 -27
- package/dist/cjs/ui/system/position/right.js +5 -12
- package/dist/cjs/ui/system/position/top.js +5 -12
- package/dist/cjs/ui/system/position/z_index.js +5 -11
- package/dist/cjs/ui/system/spacing/margin.js +5 -12
- package/dist/cjs/ui/system/spacing/padding.js +5 -12
- package/dist/cjs/ui/system/spacing/spacing_set.js +15 -23
- package/dist/cjs/ui/system/typography/font_family.js +5 -11
- package/dist/cjs/ui/system/typography/font_size.js +5 -11
- package/dist/cjs/ui/system/typography/font_style.js +5 -11
- package/dist/cjs/ui/system/typography/font_weight.js +5 -11
- package/dist/cjs/ui/system/typography/letter_spacing.js +5 -11
- package/dist/cjs/ui/system/typography/line_height.js +5 -11
- package/dist/cjs/ui/system/typography/text_align.js +5 -11
- package/dist/cjs/ui/system/typography/text_color.js +5 -11
- package/dist/cjs/ui/system/typography/text_decoration.js +5 -11
- package/dist/cjs/ui/system/typography/text_transform.js +5 -11
- package/dist/cjs/ui/system/typography/typography_set.js +15 -31
- package/dist/cjs/ui/system/utils/create_responsive_prop_type.js +2 -4
- package/dist/cjs/ui/system/utils/create_style_prop_types.js +5 -13
- package/dist/cjs/ui/system/utils/ensure_numbers_are_within_scale.js +4 -14
- package/dist/cjs/ui/system/utils/get_style_props_for_responsive_prop.js +30 -70
- package/dist/cjs/ui/table_picker.js +26 -43
- package/dist/cjs/ui/table_picker_synced.js +33 -42
- package/dist/cjs/ui/text.js +59 -71
- package/dist/cjs/ui/text_button.js +80 -97
- package/dist/cjs/ui/theme/default_theme/button_variants.js +1 -5
- package/dist/cjs/ui/theme/default_theme/control_sizes.js +29 -42
- package/dist/cjs/ui/theme/default_theme/heading_styles.js +4 -5
- package/dist/cjs/ui/theme/default_theme/index.js +15 -32
- package/dist/cjs/ui/theme/default_theme/input_variants.js +1 -5
- package/dist/cjs/ui/theme/default_theme/link_variants.js +1 -5
- package/dist/cjs/ui/theme/default_theme/select_buttons_variants.js +1 -5
- package/dist/cjs/ui/theme/default_theme/select_variants.js +10 -21
- package/dist/cjs/ui/theme/default_theme/switch_variants.js +8 -20
- package/dist/cjs/ui/theme/default_theme/text_button_variants.js +1 -5
- package/dist/cjs/ui/theme/default_theme/text_styles.js +1 -2
- package/dist/cjs/ui/theme/default_theme/tokens.js +33 -35
- package/dist/cjs/ui/theme/theme_context.js +3 -6
- package/dist/cjs/ui/theme/use_theme.js +1 -7
- package/dist/cjs/ui/tooltip.js +38 -79
- package/dist/cjs/ui/types/aria_props.js +3 -7
- package/dist/cjs/ui/types/data_attributes_prop.js +8 -6
- package/dist/cjs/ui/types/tooltip_anchor_props.js +4 -5
- package/dist/cjs/ui/ui.js +97 -130
- package/dist/cjs/ui/unstable_standalone_ui.js +18 -42
- package/dist/cjs/ui/use_array_identity.js +0 -4
- package/dist/cjs/ui/use_base.js +4 -13
- package/dist/cjs/ui/use_color_scheme.js +60 -0
- package/dist/cjs/ui/use_cursor.js +3 -12
- package/dist/cjs/ui/use_form_field.js +4 -6
- package/dist/cjs/ui/use_global_config.js +3 -10
- package/dist/cjs/ui/use_loadable.js +59 -132
- package/dist/cjs/ui/use_record_action_data.js +6 -12
- package/dist/cjs/ui/use_records.js +27 -28
- package/dist/cjs/ui/use_session.js +6 -15
- package/dist/cjs/ui/use_settings_button.js +4 -11
- package/dist/cjs/ui/use_styled_system.js +12 -21
- package/dist/cjs/ui/use_synced.js +0 -7
- package/dist/cjs/ui/use_text_color_for_background_color.js +1 -5
- package/dist/cjs/ui/use_view_metadata.js +5 -8
- package/dist/cjs/ui/use_viewport.js +1 -7
- package/dist/cjs/ui/use_watchable.js +36 -74
- package/dist/cjs/ui/view_picker.js +44 -78
- package/dist/cjs/ui/view_picker_synced.js +33 -44
- package/dist/cjs/ui/viewport_constraint.js +37 -64
- package/dist/cjs/ui/with_hooks.js +17 -22
- package/dist/cjs/ui/with_styled_system.js +33 -60
- package/dist/cjs/undo_redo.js +12 -32
- package/dist/cjs/unstable_private_utils.js +6 -8
- package/dist/cjs/unstable_testing_utils.js +44 -57
- package/dist/cjs/viewport.js +127 -189
- package/dist/cjs/warning.js +5 -6
- package/dist/cjs/watchable.js +66 -148
- package/dist/types/src/colors.d.ts +1 -1
- package/dist/types/src/colors.d.ts.map +1 -1
- package/dist/types/src/global_config.d.ts +1 -1
- package/dist/types/src/global_config.d.ts.map +1 -1
- package/dist/types/src/models/base.d.ts +1 -1
- package/dist/types/src/models/base.d.ts.map +1 -1
- package/dist/types/src/models/cursor.d.ts +1 -1
- package/dist/types/src/models/cursor.d.ts.map +1 -1
- package/dist/types/src/models/field.d.ts +1 -1
- package/dist/types/src/models/field.d.ts.map +1 -1
- package/dist/types/src/models/linked_records_query_result.d.ts.map +1 -1
- package/dist/types/src/models/models.d.ts.map +1 -1
- package/dist/types/src/models/record.d.ts +1 -1
- package/dist/types/src/models/record.d.ts.map +1 -1
- package/dist/types/src/models/record_coloring.d.ts +2 -2
- package/dist/types/src/models/record_coloring.d.ts.map +1 -1
- package/dist/types/src/models/record_query_result.d.ts +3 -3
- package/dist/types/src/models/record_query_result.d.ts.map +1 -1
- package/dist/types/src/models/session.d.ts +1 -1
- package/dist/types/src/models/session.d.ts.map +1 -1
- package/dist/types/src/models/table.d.ts +1 -1
- package/dist/types/src/models/table.d.ts.map +1 -1
- package/dist/types/src/models/view.d.ts +1 -1
- package/dist/types/src/models/view.d.ts.map +1 -1
- package/dist/types/src/models/view_metadata_query_result.d.ts +2 -2
- package/dist/types/src/models/view_metadata_query_result.d.ts.map +1 -1
- package/dist/types/src/perform_record_action.d.ts +1 -1
- package/dist/types/src/perform_record_action.d.ts.map +1 -1
- package/dist/types/src/private_utils.d.ts +8 -8
- package/dist/types/src/private_utils.d.ts.map +1 -1
- package/dist/types/src/sdk.d.ts +1 -1
- package/dist/types/src/sdk.d.ts.map +1 -1
- package/dist/types/src/settings_button.d.ts +1 -1
- package/dist/types/src/settings_button.d.ts.map +1 -1
- package/dist/types/src/types/aggregators.d.ts +1 -1
- package/dist/types/src/types/aggregators.d.ts.map +1 -1
- package/dist/types/src/types/airtable_interface.d.ts +6 -6
- package/dist/types/src/types/airtable_interface.d.ts.map +1 -1
- package/dist/types/src/types/attachment.d.ts +1 -1
- package/dist/types/src/types/attachment.d.ts.map +1 -1
- package/dist/types/src/types/base.d.ts +1 -1
- package/dist/types/src/types/base.d.ts.map +1 -1
- package/dist/types/src/types/block.d.ts +1 -1
- package/dist/types/src/types/block.d.ts.map +1 -1
- package/dist/types/src/types/collaborator.d.ts +1 -1
- package/dist/types/src/types/collaborator.d.ts.map +1 -1
- package/dist/types/src/types/field.d.ts +5 -5
- package/dist/types/src/types/field.d.ts.map +1 -1
- package/dist/types/src/types/global_config.d.ts +6 -6
- package/dist/types/src/types/global_config.d.ts.map +1 -1
- package/dist/types/src/types/mutations.d.ts +4 -4
- package/dist/types/src/types/mutations.d.ts.map +1 -1
- package/dist/types/src/types/permission_levels.d.ts +1 -1
- package/dist/types/src/types/permission_levels.d.ts.map +1 -1
- package/dist/types/src/types/record.d.ts +2 -2
- package/dist/types/src/types/record.d.ts.map +1 -1
- package/dist/types/src/types/record_action_data.d.ts +1 -1
- package/dist/types/src/types/record_action_data.d.ts.map +1 -1
- package/dist/types/src/types/table.d.ts +3 -3
- package/dist/types/src/types/table.d.ts.map +1 -1
- package/dist/types/src/types/undo_redo.d.ts +1 -1
- package/dist/types/src/types/undo_redo.d.ts.map +1 -1
- package/dist/types/src/types/view.d.ts +4 -4
- package/dist/types/src/types/view.d.ts.map +1 -1
- package/dist/types/src/ui/base_provider.d.ts +1 -1
- package/dist/types/src/ui/base_provider.d.ts.map +1 -1
- package/dist/types/src/ui/block_wrapper.d.ts +2 -2
- package/dist/types/src/ui/button.d.ts +2 -2
- package/dist/types/src/ui/button.d.ts.map +1 -1
- package/dist/types/src/ui/cell_renderer.d.ts +2 -2
- package/dist/types/src/ui/choice_token.d.ts +4 -4
- package/dist/types/src/ui/choice_token.d.ts.map +1 -1
- package/dist/types/src/ui/collaborator_token.d.ts +6 -6
- package/dist/types/src/ui/collaborator_token.d.ts.map +1 -1
- package/dist/types/src/ui/color_palette.d.ts +3 -3
- package/dist/types/src/ui/color_palette.d.ts.map +1 -1
- package/dist/types/src/ui/color_palette_synced.d.ts +2 -2
- package/dist/types/src/ui/confirmation_dialog.d.ts +1 -1
- package/dist/types/src/ui/control_sizes.d.ts +2 -2
- package/dist/types/src/ui/control_sizes.d.ts.map +1 -1
- package/dist/types/src/ui/dialog.d.ts +2 -2
- package/dist/types/src/ui/dialog.d.ts.map +1 -1
- package/dist/types/src/ui/dialog_close_button.d.ts +1 -1
- package/dist/types/src/ui/field_icon.d.ts +3 -3
- package/dist/types/src/ui/field_icon.d.ts.map +1 -1
- package/dist/types/src/ui/field_picker.d.ts +2 -2
- package/dist/types/src/ui/field_picker.d.ts.map +1 -1
- package/dist/types/src/ui/form_field.d.ts +1 -1
- package/dist/types/src/ui/form_field.d.ts.map +1 -1
- package/dist/types/src/ui/global_alert.d.ts +1 -1
- package/dist/types/src/ui/global_alert.d.ts.map +1 -1
- package/dist/types/src/ui/global_config_synced_component_helpers.d.ts +1 -1
- package/dist/types/src/ui/global_config_synced_component_helpers.d.ts.map +1 -1
- package/dist/types/src/ui/heading.d.ts +4 -4
- package/dist/types/src/ui/heading.d.ts.map +1 -1
- package/dist/types/src/ui/icon.d.ts +2 -2
- package/dist/types/src/ui/icon.d.ts.map +1 -1
- package/dist/types/src/ui/icon_config.d.ts +39 -39
- package/dist/types/src/ui/icon_config.d.ts.map +1 -1
- package/dist/types/src/ui/initialize_block.d.ts +3 -3
- package/dist/types/src/ui/initialize_block.d.ts.map +1 -1
- package/dist/types/src/ui/input.d.ts +16 -16
- package/dist/types/src/ui/input.d.ts.map +1 -1
- package/dist/types/src/ui/label.d.ts +1 -1
- package/dist/types/src/ui/label.d.ts.map +1 -1
- package/dist/types/src/ui/link.d.ts +2 -2
- package/dist/types/src/ui/link.d.ts.map +1 -1
- package/dist/types/src/ui/loader.d.ts +2 -2
- package/dist/types/src/ui/loader.d.ts.map +1 -1
- package/dist/types/src/ui/model_picker_select.d.ts +1 -1
- package/dist/types/src/ui/model_picker_select.d.ts.map +1 -1
- package/dist/types/src/ui/popover.d.ts +5 -5
- package/dist/types/src/ui/popover.d.ts.map +1 -1
- package/dist/types/src/ui/progress_bar.d.ts +2 -2
- package/dist/types/src/ui/progress_bar.d.ts.map +1 -1
- package/dist/types/src/ui/record_card.d.ts +3 -3
- package/dist/types/src/ui/record_card.d.ts.map +1 -1
- package/dist/types/src/ui/record_card_list.d.ts +3 -3
- package/dist/types/src/ui/record_card_list.d.ts.map +1 -1
- package/dist/types/src/ui/select.d.ts +4 -4
- package/dist/types/src/ui/select_and_select_buttons_helpers.d.ts +4 -4
- package/dist/types/src/ui/select_and_select_buttons_helpers.d.ts.map +1 -1
- package/dist/types/src/ui/select_buttons.d.ts +5 -5
- package/dist/types/src/ui/select_buttons.d.ts.map +1 -1
- package/dist/types/src/ui/switch.d.ts +2 -2
- package/dist/types/src/ui/switch.d.ts.map +1 -1
- package/dist/types/src/ui/synced.d.ts +3 -3
- package/dist/types/src/ui/system/all_styles_set.d.ts +0 -1
- package/dist/types/src/ui/system/all_styles_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/appearance/appearance_set.d.ts +0 -1
- package/dist/types/src/ui/system/appearance/appearance_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/appearance/background_color.d.ts +0 -1
- package/dist/types/src/ui/system/appearance/background_color.d.ts.map +1 -1
- package/dist/types/src/ui/system/appearance/border.d.ts +0 -1
- package/dist/types/src/ui/system/appearance/border.d.ts.map +1 -1
- package/dist/types/src/ui/system/appearance/border_radius.d.ts +0 -1
- package/dist/types/src/ui/system/appearance/border_radius.d.ts.map +1 -1
- package/dist/types/src/ui/system/appearance/box_shadow.d.ts +0 -1
- package/dist/types/src/ui/system/appearance/box_shadow.d.ts.map +1 -1
- package/dist/types/src/ui/system/appearance/opacity.d.ts +0 -1
- package/dist/types/src/ui/system/appearance/opacity.d.ts.map +1 -1
- package/dist/types/src/ui/system/dimensions/dimensions_set.d.ts +0 -1
- package/dist/types/src/ui/system/dimensions/dimensions_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/dimensions/height.d.ts +0 -1
- package/dist/types/src/ui/system/dimensions/height.d.ts.map +1 -1
- package/dist/types/src/ui/system/dimensions/max_height.d.ts +0 -1
- package/dist/types/src/ui/system/dimensions/max_height.d.ts.map +1 -1
- package/dist/types/src/ui/system/dimensions/max_width.d.ts +0 -1
- package/dist/types/src/ui/system/dimensions/max_width.d.ts.map +1 -1
- package/dist/types/src/ui/system/dimensions/min_height.d.ts +0 -1
- package/dist/types/src/ui/system/dimensions/min_height.d.ts.map +1 -1
- package/dist/types/src/ui/system/dimensions/min_width.d.ts +0 -1
- package/dist/types/src/ui/system/dimensions/min_width.d.ts.map +1 -1
- package/dist/types/src/ui/system/dimensions/width.d.ts +0 -1
- package/dist/types/src/ui/system/dimensions/width.d.ts.map +1 -1
- package/dist/types/src/ui/system/display.d.ts +0 -1
- package/dist/types/src/ui/system/display.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_container/align_content.d.ts +0 -1
- package/dist/types/src/ui/system/flex_container/align_content.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_container/align_items.d.ts +0 -1
- package/dist/types/src/ui/system/flex_container/align_items.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_container/flex_container_set.d.ts +0 -1
- package/dist/types/src/ui/system/flex_container/flex_container_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_container/flex_direction.d.ts +0 -1
- package/dist/types/src/ui/system/flex_container/flex_direction.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_container/flex_wrap.d.ts +0 -1
- package/dist/types/src/ui/system/flex_container/flex_wrap.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_container/justify_content.d.ts +0 -1
- package/dist/types/src/ui/system/flex_container/justify_content.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_container/justify_items.d.ts +0 -1
- package/dist/types/src/ui/system/flex_container/justify_items.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/align_self.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/align_self.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/flex.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/flex.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/flex_basis.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/flex_basis.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/flex_grow.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/flex_grow.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/flex_item_set.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/flex_item_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/flex_shrink.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/flex_shrink.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/justify_self.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/justify_self.d.ts.map +1 -1
- package/dist/types/src/ui/system/flex_item/order.d.ts +0 -1
- package/dist/types/src/ui/system/flex_item/order.d.ts.map +1 -1
- package/dist/types/src/ui/system/overflow.d.ts +0 -1
- package/dist/types/src/ui/system/overflow.d.ts.map +1 -1
- package/dist/types/src/ui/system/position/bottom.d.ts +0 -1
- package/dist/types/src/ui/system/position/bottom.d.ts.map +1 -1
- package/dist/types/src/ui/system/position/left.d.ts +0 -1
- package/dist/types/src/ui/system/position/left.d.ts.map +1 -1
- package/dist/types/src/ui/system/position/position.d.ts +0 -1
- package/dist/types/src/ui/system/position/position.d.ts.map +1 -1
- package/dist/types/src/ui/system/position/position_set.d.ts +0 -1
- package/dist/types/src/ui/system/position/position_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/position/right.d.ts +0 -1
- package/dist/types/src/ui/system/position/right.d.ts.map +1 -1
- package/dist/types/src/ui/system/position/top.d.ts +0 -1
- package/dist/types/src/ui/system/position/top.d.ts.map +1 -1
- package/dist/types/src/ui/system/position/z_index.d.ts +0 -1
- package/dist/types/src/ui/system/position/z_index.d.ts.map +1 -1
- package/dist/types/src/ui/system/spacing/margin.d.ts +0 -1
- package/dist/types/src/ui/system/spacing/margin.d.ts.map +1 -1
- package/dist/types/src/ui/system/spacing/padding.d.ts +0 -1
- package/dist/types/src/ui/system/spacing/padding.d.ts.map +1 -1
- package/dist/types/src/ui/system/spacing/spacing_set.d.ts +0 -1
- package/dist/types/src/ui/system/spacing/spacing_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/font_family.d.ts +0 -1
- package/dist/types/src/ui/system/typography/font_family.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/font_size.d.ts +0 -1
- package/dist/types/src/ui/system/typography/font_size.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/font_style.d.ts +0 -1
- package/dist/types/src/ui/system/typography/font_style.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/font_weight.d.ts +0 -1
- package/dist/types/src/ui/system/typography/font_weight.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/letter_spacing.d.ts +0 -1
- package/dist/types/src/ui/system/typography/letter_spacing.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/line_height.d.ts +0 -1
- package/dist/types/src/ui/system/typography/line_height.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/text_align.d.ts +0 -1
- package/dist/types/src/ui/system/typography/text_align.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/text_color.d.ts +0 -1
- package/dist/types/src/ui/system/typography/text_color.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/text_decoration.d.ts +0 -1
- package/dist/types/src/ui/system/typography/text_decoration.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/text_transform.d.ts +0 -1
- package/dist/types/src/ui/system/typography/text_transform.d.ts.map +1 -1
- package/dist/types/src/ui/system/typography/typography_set.d.ts +0 -1
- package/dist/types/src/ui/system/typography/typography_set.d.ts.map +1 -1
- package/dist/types/src/ui/system/utils/create_style_prop_types.d.ts +1 -1
- package/dist/types/src/ui/system/utils/create_style_prop_types.d.ts.map +1 -1
- package/dist/types/src/ui/system/utils/csstype.d.ts +578 -578
- package/dist/types/src/ui/system/utils/csstype.d.ts.map +1 -1
- package/dist/types/src/ui/system/utils/types.d.ts +4 -4
- package/dist/types/src/ui/system/utils/types.d.ts.map +1 -1
- package/dist/types/src/ui/table_picker.d.ts +1 -1
- package/dist/types/src/ui/table_picker.d.ts.map +1 -1
- package/dist/types/src/ui/text.d.ts +4 -4
- package/dist/types/src/ui/text.d.ts.map +1 -1
- package/dist/types/src/ui/text_button.d.ts +2 -2
- package/dist/types/src/ui/text_button.d.ts.map +1 -1
- package/dist/types/src/ui/theme/default_theme/heading_styles.d.ts +2 -2
- package/dist/types/src/ui/theme/default_theme/heading_styles.d.ts.map +1 -1
- package/dist/types/src/ui/theme/default_theme/index.d.ts +1 -1
- package/dist/types/src/ui/theme/theme_context.d.ts +1 -3
- package/dist/types/src/ui/theme/theme_context.d.ts.map +1 -1
- package/dist/types/src/ui/theme/use_theme.d.ts +1 -1
- package/dist/types/src/ui/tooltip.d.ts +3 -3
- package/dist/types/src/ui/types/data_attributes_prop.d.ts.map +1 -1
- package/dist/types/src/ui/types/tooltip_anchor_props.d.ts +0 -1
- package/dist/types/src/ui/types/tooltip_anchor_props.d.ts.map +1 -1
- package/dist/types/src/ui/ui.d.ts +1 -0
- package/dist/types/src/ui/ui.d.ts.map +1 -1
- package/dist/types/src/ui/use_base.d.ts.map +1 -1
- package/dist/types/src/ui/use_color_scheme.d.ts +28 -0
- package/dist/types/src/ui/use_color_scheme.d.ts.map +1 -0
- package/dist/types/src/ui/use_cursor.d.ts.map +1 -1
- package/dist/types/src/ui/use_form_field.d.ts +0 -2
- package/dist/types/src/ui/use_form_field.d.ts.map +1 -1
- package/dist/types/src/ui/use_records.d.ts +2 -2
- package/dist/types/src/ui/use_records.d.ts.map +1 -1
- package/dist/types/src/ui/use_session.d.ts.map +1 -1
- package/dist/types/src/ui/view_picker.d.ts +3 -3
- package/dist/types/src/ui/view_picker.d.ts.map +1 -1
- package/dist/types/src/ui/viewport_constraint.d.ts +3 -3
- package/dist/types/src/ui/viewport_constraint.d.ts.map +1 -1
- package/dist/types/src/viewport.d.ts +2 -2
- package/dist/types/src/viewport.d.ts.map +1 -1
- package/dist/types/src/warning.d.ts +1 -1
- package/dist/types/src/warning.d.ts.map +1 -1
- package/package.json +40 -34
- package/dist/types/stories/all_controls.stories.d.ts +0 -2
- package/dist/types/stories/all_controls.stories.d.ts.map +0 -1
- package/dist/types/stories/box.appearance.stories.d.ts +0 -2
- package/dist/types/stories/box.appearance.stories.d.ts.map +0 -1
- package/dist/types/stories/box.dimensions.stories.d.ts +0 -2
- package/dist/types/stories/box.dimensions.stories.d.ts.map +0 -1
- package/dist/types/stories/box.flex_container.stories.d.ts +0 -2
- package/dist/types/stories/box.flex_container.stories.d.ts.map +0 -1
- package/dist/types/stories/box.flex_item.stories.d.ts +0 -2
- package/dist/types/stories/box.flex_item.stories.d.ts.map +0 -1
- package/dist/types/stories/box.position.stories.d.ts +0 -2
- package/dist/types/stories/box.position.stories.d.ts.map +0 -1
- package/dist/types/stories/box.spacing.stories.d.ts +0 -2
- package/dist/types/stories/box.spacing.stories.d.ts.map +0 -1
- package/dist/types/stories/box.stories.d.ts +0 -2
- package/dist/types/stories/box.stories.d.ts.map +0 -1
- package/dist/types/stories/box.typography.stories.d.ts +0 -2
- package/dist/types/stories/box.typography.stories.d.ts.map +0 -1
- package/dist/types/stories/button.stories.d.ts +0 -2
- package/dist/types/stories/button.stories.d.ts.map +0 -1
- package/dist/types/stories/cell_renderer.stories.d.ts +0 -2
- package/dist/types/stories/cell_renderer.stories.d.ts.map +0 -1
- package/dist/types/stories/choice_token.stories.d.ts +0 -2
- package/dist/types/stories/choice_token.stories.d.ts.map +0 -1
- package/dist/types/stories/collaborator_token.stories.d.ts +0 -2
- package/dist/types/stories/collaborator_token.stories.d.ts.map +0 -1
- package/dist/types/stories/color_palette.stories.d.ts +0 -2
- package/dist/types/stories/color_palette.stories.d.ts.map +0 -1
- package/dist/types/stories/confirmation_dialog.stories.d.ts +0 -2
- package/dist/types/stories/confirmation_dialog.stories.d.ts.map +0 -1
- package/dist/types/stories/dialog.stories.d.ts +0 -2
- package/dist/types/stories/dialog.stories.d.ts.map +0 -1
- package/dist/types/stories/field_icon.stories.d.ts +0 -2
- package/dist/types/stories/field_icon.stories.d.ts.map +0 -1
- package/dist/types/stories/form_field.stories.d.ts +0 -2
- package/dist/types/stories/form_field.stories.d.ts.map +0 -1
- package/dist/types/stories/heading.size.stories.d.ts +0 -2
- package/dist/types/stories/heading.size.stories.d.ts.map +0 -1
- package/dist/types/stories/heading.stories.d.ts +0 -2
- package/dist/types/stories/heading.stories.d.ts.map +0 -1
- package/dist/types/stories/helpers/attachments.d.ts +0 -4
- package/dist/types/stories/helpers/attachments.d.ts.map +0 -1
- package/dist/types/stories/helpers/categorize_style_props.d.ts +0 -14
- package/dist/types/stories/helpers/categorize_style_props.d.ts.map +0 -1
- package/dist/types/stories/helpers/choice_options.d.ts +0 -7
- package/dist/types/stories/helpers/choice_options.d.ts.map +0 -1
- package/dist/types/stories/helpers/code_block.d.ts +0 -5
- package/dist/types/stories/helpers/code_block.d.ts.map +0 -1
- package/dist/types/stories/helpers/code_utils.d.ts +0 -32
- package/dist/types/stories/helpers/code_utils.d.ts.map +0 -1
- package/dist/types/stories/helpers/collaborator_options.d.ts +0 -7
- package/dist/types/stories/helpers/collaborator_options.d.ts.map +0 -1
- package/dist/types/stories/helpers/example.d.ts +0 -39
- package/dist/types/stories/helpers/example.d.ts.map +0 -1
- package/dist/types/stories/helpers/example_code_panel.d.ts +0 -10
- package/dist/types/stories/helpers/example_code_panel.d.ts.map +0 -1
- package/dist/types/stories/helpers/fake_cell_renderer.d.ts +0 -7
- package/dist/types/stories/helpers/fake_cell_renderer.d.ts.map +0 -1
- package/dist/types/stories/helpers/fake_foreign_record.d.ts +0 -5
- package/dist/types/stories/helpers/fake_foreign_record.d.ts.map +0 -1
- package/dist/types/stories/helpers/fake_record_card.d.ts +0 -13
- package/dist/types/stories/helpers/fake_record_card.d.ts.map +0 -1
- package/dist/types/stories/helpers/field_type.d.ts +0 -6
- package/dist/types/stories/helpers/field_type.d.ts.map +0 -1
- package/dist/types/stories/helpers/raf_throttle.d.ts +0 -5
- package/dist/types/stories/helpers/raf_throttle.d.ts.map +0 -1
- package/dist/types/stories/helpers/style_prop_list.d.ts +0 -9
- package/dist/types/stories/helpers/style_prop_list.d.ts.map +0 -1
- package/dist/types/stories/helpers/sync_source_options.d.ts +0 -7
- package/dist/types/stories/helpers/sync_source_options.d.ts.map +0 -1
- package/dist/types/stories/helpers/use_resizable_panel.d.ts +0 -27
- package/dist/types/stories/helpers/use_resizable_panel.d.ts.map +0 -1
- package/dist/types/stories/icon.stories.d.ts +0 -2
- package/dist/types/stories/icon.stories.d.ts.map +0 -1
- package/dist/types/stories/icon_example.d.ts +0 -3
- package/dist/types/stories/icon_example.d.ts.map +0 -1
- package/dist/types/stories/input.stories.d.ts +0 -2
- package/dist/types/stories/input.stories.d.ts.map +0 -1
- package/dist/types/stories/label.stories.d.ts +0 -2
- package/dist/types/stories/label.stories.d.ts.map +0 -1
- package/dist/types/stories/link.stories.d.ts +0 -2
- package/dist/types/stories/link.stories.d.ts.map +0 -1
- package/dist/types/stories/loader.stories.d.ts +0 -2
- package/dist/types/stories/loader.stories.d.ts.map +0 -1
- package/dist/types/stories/model_pickers.stories.d.ts +0 -2
- package/dist/types/stories/model_pickers.stories.d.ts.map +0 -1
- package/dist/types/stories/progress_bar.stories.d.ts +0 -2
- package/dist/types/stories/progress_bar.stories.d.ts.map +0 -1
- package/dist/types/stories/record_card.stories.d.ts +0 -2
- package/dist/types/stories/record_card.stories.d.ts.map +0 -1
- package/dist/types/stories/record_card_list.stories.d.ts +0 -2
- package/dist/types/stories/record_card_list.stories.d.ts.map +0 -1
- package/dist/types/stories/select.stories.d.ts +0 -2
- package/dist/types/stories/select.stories.d.ts.map +0 -1
- package/dist/types/stories/select_buttons.stories.d.ts +0 -2
- package/dist/types/stories/select_buttons.stories.d.ts.map +0 -1
- package/dist/types/stories/switch.stories.d.ts +0 -2
- package/dist/types/stories/switch.stories.d.ts.map +0 -1
- package/dist/types/stories/text.size.stories.d.ts +0 -2
- package/dist/types/stories/text.size.stories.d.ts.map +0 -1
- package/dist/types/stories/text.stories.d.ts +0 -2
- package/dist/types/stories/text.stories.d.ts.map +0 -1
- package/dist/types/stories/text_button.stories.d.ts +0 -2
- package/dist/types/stories/text_button.stories.d.ts.map +0 -1
- package/dist/types/stories/tooltip.stories.d.ts +0 -2
- package/dist/types/stories/tooltip.stories.d.ts.map +0 -1
- package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts +0 -124
- package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts.map +0 -1
- package/dist/types/test/airtable_interface_mocks/linked_records.d.ts +0 -4
- package/dist/types/test/airtable_interface_mocks/linked_records.d.ts.map +0 -1
- package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts +0 -61
- package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts.map +0 -1
- package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts +0 -4
- package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts.map +0 -1
- package/dist/types/test/error_utils.test.d.ts +0 -2
- package/dist/types/test/error_utils.test.d.ts.map +0 -1
- package/dist/types/test/get_style_props_for_responsive_prop.test.d.ts +0 -2
- package/dist/types/test/get_style_props_for_responsive_prop.test.d.ts.map +0 -1
- package/dist/types/test/index.test.d.ts +0 -2
- package/dist/types/test/index.test.d.ts.map +0 -1
- package/dist/types/test/models/base.test.d.ts +0 -2
- package/dist/types/test/models/base.test.d.ts.map +0 -1
- package/dist/types/test/models/cursor.test.d.ts +0 -2
- package/dist/types/test/models/cursor.test.d.ts.map +0 -1
- package/dist/types/test/models/field.test.d.ts +0 -2
- package/dist/types/test/models/field.test.d.ts.map +0 -1
- package/dist/types/test/models/linked_records_query_result.test.d.ts +0 -2
- package/dist/types/test/models/linked_records_query_result.test.d.ts.map +0 -1
- package/dist/types/test/models/mutations.test.d.ts +0 -2
- package/dist/types/test/models/mutations.test.d.ts.map +0 -1
- package/dist/types/test/models/object_pool.test.d.ts +0 -2
- package/dist/types/test/models/object_pool.test.d.ts.map +0 -1
- package/dist/types/test/models/record.test.d.ts +0 -2
- package/dist/types/test/models/record.test.d.ts.map +0 -1
- package/dist/types/test/models/session.test.d.ts +0 -2
- package/dist/types/test/models/session.test.d.ts.map +0 -1
- package/dist/types/test/models/table.test.d.ts +0 -2
- package/dist/types/test/models/table.test.d.ts.map +0 -1
- package/dist/types/test/models/table_mutations.test.d.ts +0 -2
- package/dist/types/test/models/table_mutations.test.d.ts.map +0 -1
- package/dist/types/test/models/table_or_view_query_result.test.d.ts +0 -2
- package/dist/types/test/models/table_or_view_query_result.test.d.ts.map +0 -1
- package/dist/types/test/models/view.test.d.ts +0 -2
- package/dist/types/test/models/view.test.d.ts.map +0 -1
- package/dist/types/test/models/view_metadata_query_result.test.d.ts +0 -2
- package/dist/types/test/models/view_metadata_query_result.test.d.ts.map +0 -1
- package/dist/types/test/private_utils.test.d.ts +0 -2
- package/dist/types/test/private_utils.test.d.ts.map +0 -1
- package/dist/types/test/sdk.test.d.ts +0 -2
- package/dist/types/test/sdk.test.d.ts.map +0 -1
- package/dist/types/test/setup_enzyme.d.ts +0 -2
- package/dist/types/test/setup_enzyme.d.ts.map +0 -1
- package/dist/types/test/test_helpers.d.ts +0 -11
- package/dist/types/test/test_helpers.d.ts.map +0 -1
- package/dist/types/test/ui/base_provider.test.d.ts +0 -2
- package/dist/types/test/ui/base_provider.test.d.ts.map +0 -1
- package/dist/types/test/ui/block_wrapper.test.d.ts +0 -2
- package/dist/types/test/ui/block_wrapper.test.d.ts.map +0 -1
- package/dist/types/test/ui/box.test.d.ts +0 -2
- package/dist/types/test/ui/box.test.d.ts.map +0 -1
- package/dist/types/test/ui/button.test.d.ts +0 -2
- package/dist/types/test/ui/button.test.d.ts.map +0 -1
- package/dist/types/test/ui/cell_renderer.test.d.ts +0 -2
- package/dist/types/test/ui/cell_renderer.test.d.ts.map +0 -1
- package/dist/types/test/ui/choice_token.test.d.ts +0 -2
- package/dist/types/test/ui/choice_token.test.d.ts.map +0 -1
- package/dist/types/test/ui/collaborator_token.test.d.ts +0 -2
- package/dist/types/test/ui/collaborator_token.test.d.ts.map +0 -1
- package/dist/types/test/ui/color_palette.test.d.ts +0 -2
- package/dist/types/test/ui/color_palette.test.d.ts.map +0 -1
- package/dist/types/test/ui/color_palette_synced.test.d.ts +0 -2
- package/dist/types/test/ui/color_palette_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/confirmation_dialog.test.d.ts +0 -2
- package/dist/types/test/ui/confirmation_dialog.test.d.ts.map +0 -1
- package/dist/types/test/ui/dialog.test.d.ts +0 -2
- package/dist/types/test/ui/dialog.test.d.ts.map +0 -1
- package/dist/types/test/ui/expand_record.test.d.ts +0 -2
- package/dist/types/test/ui/expand_record.test.d.ts.map +0 -1
- package/dist/types/test/ui/expand_record_list.test.d.ts +0 -2
- package/dist/types/test/ui/expand_record_list.test.d.ts.map +0 -1
- package/dist/types/test/ui/expand_record_picker_async.test.d.ts +0 -2
- package/dist/types/test/ui/expand_record_picker_async.test.d.ts.map +0 -1
- package/dist/types/test/ui/field_icon.test.d.ts +0 -2
- package/dist/types/test/ui/field_icon.test.d.ts.map +0 -1
- package/dist/types/test/ui/field_picker.test.d.ts +0 -2
- package/dist/types/test/ui/field_picker.test.d.ts.map +0 -1
- package/dist/types/test/ui/field_picker_synced.test.d.ts +0 -2
- package/dist/types/test/ui/field_picker_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/form_field.test.d.ts +0 -2
- package/dist/types/test/ui/form_field.test.d.ts.map +0 -1
- package/dist/types/test/ui/global_alert.test.d.ts +0 -2
- package/dist/types/test/ui/global_alert.test.d.ts.map +0 -1
- package/dist/types/test/ui/heading.test.d.ts +0 -2
- package/dist/types/test/ui/heading.test.d.ts.map +0 -1
- package/dist/types/test/ui/icon.test.d.ts +0 -2
- package/dist/types/test/ui/icon.test.d.ts.map +0 -1
- package/dist/types/test/ui/initialize_block.test.d.ts +0 -2
- package/dist/types/test/ui/initialize_block.test.d.ts.map +0 -1
- package/dist/types/test/ui/input.test.d.ts +0 -2
- package/dist/types/test/ui/input.test.d.ts.map +0 -1
- package/dist/types/test/ui/input_synced.test.d.ts +0 -2
- package/dist/types/test/ui/input_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/label.test.d.ts +0 -2
- package/dist/types/test/ui/label.test.d.ts.map +0 -1
- package/dist/types/test/ui/link.test.d.ts +0 -2
- package/dist/types/test/ui/link.test.d.ts.map +0 -1
- package/dist/types/test/ui/loader.test.d.ts +0 -2
- package/dist/types/test/ui/loader.test.d.ts.map +0 -1
- package/dist/types/test/ui/modal.test.d.ts +0 -2
- package/dist/types/test/ui/modal.test.d.ts.map +0 -1
- package/dist/types/test/ui/popover.test.d.ts +0 -2
- package/dist/types/test/ui/popover.test.d.ts.map +0 -1
- package/dist/types/test/ui/progress_bar.test.d.ts +0 -2
- package/dist/types/test/ui/progress_bar.test.d.ts.map +0 -1
- package/dist/types/test/ui/record_card.test.d.ts +0 -2
- package/dist/types/test/ui/record_card.test.d.ts.map +0 -1
- package/dist/types/test/ui/record_card_list.test.d.ts +0 -2
- package/dist/types/test/ui/record_card_list.test.d.ts.map +0 -1
- package/dist/types/test/ui/remote_utils.test.d.ts +0 -2
- package/dist/types/test/ui/remote_utils.test.d.ts.map +0 -1
- package/dist/types/test/ui/select.test.d.ts +0 -2
- package/dist/types/test/ui/select.test.d.ts.map +0 -1
- package/dist/types/test/ui/select_buttons.test.d.ts +0 -2
- package/dist/types/test/ui/select_buttons.test.d.ts.map +0 -1
- package/dist/types/test/ui/select_buttons_synced.test.d.ts +0 -2
- package/dist/types/test/ui/select_buttons_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/select_synced.test.d.ts +0 -2
- package/dist/types/test/ui/select_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/switch.test.d.ts +0 -2
- package/dist/types/test/ui/switch.test.d.ts.map +0 -1
- package/dist/types/test/ui/switch_synced.test.d.ts +0 -2
- package/dist/types/test/ui/switch_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/synced.test.d.ts +0 -2
- package/dist/types/test/ui/synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/table_picker.test.d.ts +0 -2
- package/dist/types/test/ui/table_picker.test.d.ts.map +0 -1
- package/dist/types/test/ui/table_picker_synced.test.d.ts +0 -2
- package/dist/types/test/ui/table_picker_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/text.test.d.ts +0 -2
- package/dist/types/test/ui/text.test.d.ts.map +0 -1
- package/dist/types/test/ui/text_button.test.d.ts +0 -2
- package/dist/types/test/ui/text_button.test.d.ts.map +0 -1
- package/dist/types/test/ui/tooltip.test.d.ts +0 -2
- package/dist/types/test/ui/tooltip.test.d.ts.map +0 -1
- package/dist/types/test/ui/ui.test.d.ts +0 -2
- package/dist/types/test/ui/ui.test.d.ts.map +0 -1
- package/dist/types/test/ui/unstable_standalone_ui.test.d.ts +0 -1
- package/dist/types/test/ui/unstable_standalone_ui.test.d.ts.map +0 -1
- package/dist/types/test/ui/use_array_identity.test.d.ts +0 -2
- package/dist/types/test/ui/use_array_identity.test.d.ts.map +0 -1
- package/dist/types/test/ui/use_loadable.test.d.ts +0 -2
- package/dist/types/test/ui/use_loadable.test.d.ts.map +0 -1
- package/dist/types/test/ui/use_record_action_data.test.d.ts +0 -2
- package/dist/types/test/ui/use_record_action_data.test.d.ts.map +0 -1
- package/dist/types/test/ui/use_records.test.d.ts +0 -2
- package/dist/types/test/ui/use_records.test.d.ts.map +0 -1
- package/dist/types/test/ui/use_view_metadata.test.d.ts +0 -2
- package/dist/types/test/ui/use_view_metadata.test.d.ts.map +0 -1
- package/dist/types/test/ui/use_watchable.test.d.ts +0 -2
- package/dist/types/test/ui/use_watchable.test.d.ts.map +0 -1
- package/dist/types/test/ui/view_picker.test.d.ts +0 -2
- package/dist/types/test/ui/view_picker.test.d.ts.map +0 -1
- package/dist/types/test/ui/view_picker_synced.test.d.ts +0 -2
- package/dist/types/test/ui/view_picker_synced.test.d.ts.map +0 -1
- package/dist/types/test/ui/viewport_constraint.test.d.ts +0 -2
- package/dist/types/test/ui/viewport_constraint.test.d.ts.map +0 -1
- package/dist/types/test/unstable_private_utils.test.d.ts +0 -1
- package/dist/types/test/unstable_private_utils.test.d.ts.map +0 -1
package/dist/cjs/models/field.js
CHANGED
|
@@ -1,57 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.symbol");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.symbol.description");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.array.filter");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.array.iterator");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.to-string");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.promise");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.set");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/web.dom-collections.iterator");
|
|
20
|
-
|
|
21
4
|
Object.defineProperty(exports, "__esModule", {
|
|
22
5
|
value: true
|
|
23
6
|
});
|
|
24
7
|
exports.default = void 0;
|
|
25
|
-
|
|
8
|
+
require("core-js/modules/es.symbol.js");
|
|
9
|
+
require("core-js/modules/es.symbol.description.js");
|
|
10
|
+
require("core-js/modules/es.array.filter.js");
|
|
11
|
+
require("core-js/modules/es.array.iterator.js");
|
|
12
|
+
require("core-js/modules/es.object.to-string.js");
|
|
13
|
+
require("core-js/modules/es.set.js");
|
|
14
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
26
15
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
27
|
-
|
|
28
|
-
require("regenerator-runtime/runtime");
|
|
29
|
-
|
|
16
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
30
17
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
31
|
-
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
32
19
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
33
|
-
|
|
34
20
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
35
|
-
|
|
36
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
37
|
-
|
|
38
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
39
|
-
|
|
40
21
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
41
|
-
|
|
42
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
43
|
-
|
|
44
23
|
var _mutations = require("../types/mutations");
|
|
45
|
-
|
|
46
24
|
var _field = require("../types/field");
|
|
47
|
-
|
|
48
25
|
var _private_utils = require("../private_utils");
|
|
49
|
-
|
|
50
26
|
var _abstract_model = _interopRequireDefault(require("./abstract_model"));
|
|
51
|
-
|
|
52
|
-
/** @module @airtable/blocks/models: Field */
|
|
53
|
-
|
|
54
|
-
/** */
|
|
27
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
28
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @module @airtable/blocks/models: Field */ /** */
|
|
55
29
|
// This doesn't follow our enum naming conventions because we want the keys
|
|
56
30
|
// to mirror the method/getter names on the model class.
|
|
57
31
|
var WatchableFieldKeys = Object.freeze({
|
|
@@ -62,6 +36,7 @@ var WatchableFieldKeys = Object.freeze({
|
|
|
62
36
|
description: 'description',
|
|
63
37
|
isFieldSynced: 'isFieldSynced'
|
|
64
38
|
});
|
|
39
|
+
|
|
65
40
|
/**
|
|
66
41
|
* All the watchable keys in a field.
|
|
67
42
|
* - `name`
|
|
@@ -70,7 +45,6 @@ var WatchableFieldKeys = Object.freeze({
|
|
|
70
45
|
* - `isComputed`
|
|
71
46
|
* - `description`
|
|
72
47
|
*/
|
|
73
|
-
|
|
74
48
|
/**
|
|
75
49
|
* Model class representing a field in a table.
|
|
76
50
|
*
|
|
@@ -84,52 +58,124 @@ var WatchableFieldKeys = Object.freeze({
|
|
|
84
58
|
* ```
|
|
85
59
|
* @docsPath models/Field
|
|
86
60
|
*/
|
|
87
|
-
var Field =
|
|
88
|
-
/*#__PURE__*/
|
|
89
|
-
function (_AbstractModel) {
|
|
90
|
-
(0, _inherits2.default)(Field, _AbstractModel);
|
|
91
|
-
(0, _createClass2.default)(Field, null, [{
|
|
92
|
-
key: "_isWatchableKey",
|
|
93
|
-
|
|
94
|
-
/** @internal */
|
|
95
|
-
|
|
96
|
-
/** @internal */
|
|
97
|
-
value: function _isWatchableKey(key) {
|
|
98
|
-
return (0, _private_utils.isEnumValue)(WatchableFieldKeys, key);
|
|
99
|
-
}
|
|
100
|
-
/** @internal */
|
|
101
|
-
|
|
102
|
-
}]);
|
|
103
|
-
|
|
61
|
+
var Field = /*#__PURE__*/function (_AbstractModel) {
|
|
104
62
|
/**
|
|
105
63
|
* @internal
|
|
106
64
|
*/
|
|
107
65
|
function Field(sdk, parentTable, fieldId) {
|
|
108
66
|
var _this;
|
|
109
|
-
|
|
110
67
|
(0, _classCallCheck2.default)(this, Field);
|
|
111
|
-
_this = (
|
|
112
|
-
|
|
113
|
-
(0, _defineProperty2.default)(
|
|
68
|
+
_this = _callSuper(this, Field, [sdk, fieldId]);
|
|
69
|
+
/** @internal */
|
|
70
|
+
(0, _defineProperty2.default)(_this, "_parentTable", void 0);
|
|
71
|
+
/** @internal */
|
|
72
|
+
(0, _defineProperty2.default)(_this, "_cachedFieldTypeConfigOrNull", void 0);
|
|
114
73
|
_this._parentTable = parentTable;
|
|
115
74
|
_this._cachedFieldTypeConfigOrNull = null;
|
|
116
75
|
return _this;
|
|
117
76
|
}
|
|
77
|
+
|
|
118
78
|
/**
|
|
119
79
|
* @internal
|
|
120
80
|
*/
|
|
81
|
+
(0, _inherits2.default)(Field, _AbstractModel);
|
|
82
|
+
return (0, _createClass2.default)(Field, [{
|
|
83
|
+
key: "_dataOrNullIfDeleted",
|
|
84
|
+
get: function get() {
|
|
85
|
+
var _tableData$fieldsById;
|
|
86
|
+
var tableData = this._baseData.tablesById[this.parentTable.id];
|
|
87
|
+
return (_tableData$fieldsById = tableData === null || tableData === void 0 ? void 0 : tableData.fieldsById[this._id]) !== null && _tableData$fieldsById !== void 0 ? _tableData$fieldsById : null;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The table that this field belongs to. Should never change because fields aren't moved between tables.
|
|
91
|
+
*
|
|
92
|
+
* @internal (since we may not be able to return parent model instances in the immutable models world)
|
|
93
|
+
* @example
|
|
94
|
+
* ```js
|
|
95
|
+
* const field = myTable.getFieldByName('Name');
|
|
96
|
+
* console.log(field.parentTable.id === myTable.id);
|
|
97
|
+
* // => true
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
}, {
|
|
101
|
+
key: "parentTable",
|
|
102
|
+
get: function get() {
|
|
103
|
+
return this._parentTable;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The name of the field. Can be watched.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```js
|
|
110
|
+
* console.log(myField.name);
|
|
111
|
+
* // => 'Name'
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
}, {
|
|
115
|
+
key: "name",
|
|
116
|
+
get: function get() {
|
|
117
|
+
return this._data.name;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The type of the field. Can be watched.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```js
|
|
124
|
+
* console.log(myField.type);
|
|
125
|
+
* // => 'singleLineText'
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
}, {
|
|
129
|
+
key: "type",
|
|
130
|
+
get: function get() {
|
|
131
|
+
var _this$_getCachedConfi = this._getCachedConfigFromFieldTypeProvider(),
|
|
132
|
+
type = _this$_getCachedConfi.type;
|
|
133
|
+
// We intend to switch from "lookup" to "multipleLookupValues", but need to support both
|
|
134
|
+
// until the transition is complete. See <https://airtable.quip.com/VxaMAmAfUscs> for more.
|
|
135
|
+
// @ts-ignore
|
|
136
|
+
if (type === 'lookup') {
|
|
137
|
+
return _field.FieldType.MULTIPLE_LOOKUP_VALUES;
|
|
138
|
+
} else {
|
|
139
|
+
return type;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The configuration options of the field. The structure of the field's
|
|
144
|
+
* options depend on the field's type. `null` if the field has no options.
|
|
145
|
+
* Can be watched.
|
|
146
|
+
*
|
|
147
|
+
* @see {@link FieldType}
|
|
148
|
+
* @example
|
|
149
|
+
* ```js
|
|
150
|
+
* import {FieldType} from '@airtable/blocks/models';
|
|
151
|
+
*
|
|
152
|
+
* if (myField.type === FieldType.CURRENCY) {
|
|
153
|
+
* console.log(myField.options.symbol);
|
|
154
|
+
* // => '$'
|
|
155
|
+
* }
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
}, {
|
|
159
|
+
key: "options",
|
|
160
|
+
get: function get() {
|
|
161
|
+
var _this$_getCachedConfi2 = this._getCachedConfigFromFieldTypeProvider(),
|
|
162
|
+
options = _this$_getCachedConfi2.options;
|
|
121
163
|
|
|
164
|
+
// TODO: In the next breaking release freeze (inside of the cache) and replace
|
|
165
|
+
// FieldOptions with readonly<FieldOptions>.
|
|
166
|
+
// Today this is required because we re-use the fieldTypeProvider.getConfig response.
|
|
167
|
+
return options ? (0, _private_utils.cloneDeep)(options) : null;
|
|
168
|
+
}
|
|
122
169
|
|
|
123
|
-
(0, _createClass2.default)(Field, [{
|
|
124
|
-
key: "_getCachedConfigFromFieldTypeProvider",
|
|
125
170
|
// We use a cached response from FieldTypeProvider because getting the config can
|
|
126
171
|
// be an expensive operation. In particular when fieldConfigs are extremely large
|
|
127
172
|
// (eg: Select fields with lots of select options)
|
|
173
|
+
}, {
|
|
174
|
+
key: "_getCachedConfigFromFieldTypeProvider",
|
|
128
175
|
value: function _getCachedConfigFromFieldTypeProvider() {
|
|
129
176
|
if (this._cachedFieldTypeConfigOrNull !== null) {
|
|
130
177
|
return this._cachedFieldTypeConfigOrNull;
|
|
131
178
|
}
|
|
132
|
-
|
|
133
179
|
var airtableInterface = this._sdk.__airtableInterface;
|
|
134
180
|
var appInterface = this._sdk.__appInterface;
|
|
135
181
|
this._cachedFieldTypeConfigOrNull = airtableInterface.fieldTypeProvider.getConfig(appInterface, this._data, this.parentTable.__getFieldNamesById());
|
|
@@ -140,6 +186,7 @@ function (_AbstractModel) {
|
|
|
140
186
|
value: function _clearCachedConfig() {
|
|
141
187
|
this._cachedFieldTypeConfigOrNull = null;
|
|
142
188
|
}
|
|
189
|
+
|
|
143
190
|
/**
|
|
144
191
|
* The type and options of the field to make type narrowing `FieldOptions` easier.
|
|
145
192
|
*
|
|
@@ -155,10 +202,14 @@ function (_AbstractModel) {
|
|
|
155
202
|
* }
|
|
156
203
|
* return DEFAULT_CHOICES;
|
|
157
204
|
*/
|
|
158
|
-
|
|
159
205
|
}, {
|
|
160
|
-
key: "
|
|
161
|
-
|
|
206
|
+
key: "config",
|
|
207
|
+
get: function get() {
|
|
208
|
+
return {
|
|
209
|
+
type: this.type,
|
|
210
|
+
options: this.options
|
|
211
|
+
};
|
|
212
|
+
}
|
|
162
213
|
/**
|
|
163
214
|
* Checks whether the current user has permission to perform the given options update.
|
|
164
215
|
*
|
|
@@ -179,6 +230,8 @@ function (_AbstractModel) {
|
|
|
179
230
|
* }
|
|
180
231
|
* ```
|
|
181
232
|
*/
|
|
233
|
+
}, {
|
|
234
|
+
key: "checkPermissionsForUpdateOptions",
|
|
182
235
|
value: function checkPermissionsForUpdateOptions(options) {
|
|
183
236
|
return this._sdk.__mutations.checkPermissionsForMutation({
|
|
184
237
|
type: _mutations.MutationTypes.UPDATE_SINGLE_FIELD_CONFIG,
|
|
@@ -190,6 +243,7 @@ function (_AbstractModel) {
|
|
|
190
243
|
}
|
|
191
244
|
});
|
|
192
245
|
}
|
|
246
|
+
|
|
193
247
|
/**
|
|
194
248
|
* An alias for `checkPermissionsForUpdateOptions(options).hasPermission`.
|
|
195
249
|
*
|
|
@@ -208,12 +262,12 @@ function (_AbstractModel) {
|
|
|
208
262
|
* }
|
|
209
263
|
* ```
|
|
210
264
|
*/
|
|
211
|
-
|
|
212
265
|
}, {
|
|
213
266
|
key: "hasPermissionToUpdateOptions",
|
|
214
267
|
value: function hasPermissionToUpdateOptions(options) {
|
|
215
268
|
return this.checkPermissionsForUpdateOptions(options).hasPermission;
|
|
216
269
|
}
|
|
270
|
+
|
|
217
271
|
/**
|
|
218
272
|
* Updates the options for this field.
|
|
219
273
|
*
|
|
@@ -250,19 +304,18 @@ function (_AbstractModel) {
|
|
|
250
304
|
* }
|
|
251
305
|
* ```
|
|
252
306
|
*/
|
|
253
|
-
|
|
254
307
|
}, {
|
|
255
308
|
key: "updateOptionsAsync",
|
|
256
|
-
value: function
|
|
257
|
-
var
|
|
309
|
+
value: (function () {
|
|
310
|
+
var _updateOptionsAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options) {
|
|
311
|
+
var opts,
|
|
258
312
|
_args = arguments;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
switch (_context.prev = _context.next) {
|
|
313
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
314
|
+
while (1) switch (_context.prev = _context.next) {
|
|
262
315
|
case 0:
|
|
263
316
|
opts = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
264
317
|
_context.next = 3;
|
|
265
|
-
return
|
|
318
|
+
return this._sdk.__mutations.applyMutationAsync({
|
|
266
319
|
type: _mutations.MutationTypes.UPDATE_SINGLE_FIELD_CONFIG,
|
|
267
320
|
tableId: this.parentTable.id,
|
|
268
321
|
id: this.id,
|
|
@@ -271,15 +324,18 @@ function (_AbstractModel) {
|
|
|
271
324
|
options: options
|
|
272
325
|
},
|
|
273
326
|
opts
|
|
274
|
-
})
|
|
275
|
-
|
|
327
|
+
});
|
|
276
328
|
case 3:
|
|
277
329
|
case "end":
|
|
278
330
|
return _context.stop();
|
|
279
331
|
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
332
|
+
}, _callee, this);
|
|
333
|
+
}));
|
|
334
|
+
function updateOptionsAsync(_x) {
|
|
335
|
+
return _updateOptionsAsync.apply(this, arguments);
|
|
336
|
+
}
|
|
337
|
+
return updateOptionsAsync;
|
|
338
|
+
}()
|
|
283
339
|
/**
|
|
284
340
|
* Checks whether the current user has permission to perform the given name update.
|
|
285
341
|
*
|
|
@@ -300,7 +356,7 @@ function (_AbstractModel) {
|
|
|
300
356
|
* }
|
|
301
357
|
* ```
|
|
302
358
|
*/
|
|
303
|
-
|
|
359
|
+
)
|
|
304
360
|
}, {
|
|
305
361
|
key: "checkPermissionsForUpdateName",
|
|
306
362
|
value: function checkPermissionsForUpdateName(name) {
|
|
@@ -311,6 +367,7 @@ function (_AbstractModel) {
|
|
|
311
367
|
name
|
|
312
368
|
});
|
|
313
369
|
}
|
|
370
|
+
|
|
314
371
|
/**
|
|
315
372
|
* An alias for `checkPermissionsForUpdateName(options).hasPermission`.
|
|
316
373
|
*
|
|
@@ -329,12 +386,12 @@ function (_AbstractModel) {
|
|
|
329
386
|
* }
|
|
330
387
|
* ```
|
|
331
388
|
*/
|
|
332
|
-
|
|
333
389
|
}, {
|
|
334
390
|
key: "hasPermissionToUpdateName",
|
|
335
391
|
value: function hasPermissionToUpdateName(name) {
|
|
336
392
|
return this.checkPermissionsForUpdateName(name).hasPermission;
|
|
337
393
|
}
|
|
394
|
+
|
|
338
395
|
/**
|
|
339
396
|
* Updates the name for this field.
|
|
340
397
|
*
|
|
@@ -352,29 +409,31 @@ function (_AbstractModel) {
|
|
|
352
409
|
* await myTextField.updateNameAsync('My New Name');
|
|
353
410
|
* ```
|
|
354
411
|
*/
|
|
355
|
-
|
|
356
412
|
}, {
|
|
357
413
|
key: "updateNameAsync",
|
|
358
|
-
value: function
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
switch (_context2.prev = _context2.next) {
|
|
414
|
+
value: (function () {
|
|
415
|
+
var _updateNameAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(name) {
|
|
416
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
417
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
362
418
|
case 0:
|
|
363
419
|
_context2.next = 2;
|
|
364
|
-
return
|
|
420
|
+
return this._sdk.__mutations.applyMutationAsync({
|
|
365
421
|
type: _mutations.MutationTypes.UPDATE_SINGLE_FIELD_NAME,
|
|
366
422
|
tableId: this.parentTable.id,
|
|
367
423
|
id: this.id,
|
|
368
424
|
name
|
|
369
|
-
})
|
|
370
|
-
|
|
425
|
+
});
|
|
371
426
|
case 2:
|
|
372
427
|
case "end":
|
|
373
428
|
return _context2.stop();
|
|
374
429
|
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
430
|
+
}, _callee2, this);
|
|
431
|
+
}));
|
|
432
|
+
function updateNameAsync(_x2) {
|
|
433
|
+
return _updateNameAsync.apply(this, arguments);
|
|
434
|
+
}
|
|
435
|
+
return updateNameAsync;
|
|
436
|
+
}()
|
|
378
437
|
/**
|
|
379
438
|
* Checks whether the current user has permission to perform the given description update.
|
|
380
439
|
*
|
|
@@ -395,7 +454,7 @@ function (_AbstractModel) {
|
|
|
395
454
|
* }
|
|
396
455
|
* ```
|
|
397
456
|
*/
|
|
398
|
-
|
|
457
|
+
)
|
|
399
458
|
}, {
|
|
400
459
|
key: "checkPermissionsForUpdateDescription",
|
|
401
460
|
value: function checkPermissionsForUpdateDescription(description) {
|
|
@@ -406,6 +465,7 @@ function (_AbstractModel) {
|
|
|
406
465
|
description
|
|
407
466
|
});
|
|
408
467
|
}
|
|
468
|
+
|
|
409
469
|
/**
|
|
410
470
|
* An alias for `checkPermissionsForUpdateDescription(options).hasPermission`.
|
|
411
471
|
*
|
|
@@ -424,12 +484,12 @@ function (_AbstractModel) {
|
|
|
424
484
|
* }
|
|
425
485
|
* ```
|
|
426
486
|
*/
|
|
427
|
-
|
|
428
487
|
}, {
|
|
429
488
|
key: "hasPermissionToUpdateDescription",
|
|
430
489
|
value: function hasPermissionToUpdateDescription(description) {
|
|
431
490
|
return this.checkPermissionsForUpdateDescription(description).hasPermission;
|
|
432
491
|
}
|
|
492
|
+
|
|
433
493
|
/**
|
|
434
494
|
* Updates the description for this field.
|
|
435
495
|
*
|
|
@@ -450,29 +510,31 @@ function (_AbstractModel) {
|
|
|
450
510
|
* await myTextField.updateDescriptionAsync('This is a text field');
|
|
451
511
|
* ```
|
|
452
512
|
*/
|
|
453
|
-
|
|
454
513
|
}, {
|
|
455
514
|
key: "updateDescriptionAsync",
|
|
456
|
-
value: function
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
switch (_context3.prev = _context3.next) {
|
|
515
|
+
value: (function () {
|
|
516
|
+
var _updateDescriptionAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(description) {
|
|
517
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
518
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
460
519
|
case 0:
|
|
461
520
|
_context3.next = 2;
|
|
462
|
-
return
|
|
521
|
+
return this._sdk.__mutations.applyMutationAsync({
|
|
463
522
|
type: _mutations.MutationTypes.UPDATE_SINGLE_FIELD_DESCRIPTION,
|
|
464
523
|
tableId: this.parentTable.id,
|
|
465
524
|
id: this.id,
|
|
466
525
|
description
|
|
467
|
-
})
|
|
468
|
-
|
|
526
|
+
});
|
|
469
527
|
case 2:
|
|
470
528
|
case "end":
|
|
471
529
|
return _context3.stop();
|
|
472
530
|
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
531
|
+
}, _callee3, this);
|
|
532
|
+
}));
|
|
533
|
+
function updateDescriptionAsync(_x3) {
|
|
534
|
+
return _updateDescriptionAsync.apply(this, arguments);
|
|
535
|
+
}
|
|
536
|
+
return updateDescriptionAsync;
|
|
537
|
+
}()
|
|
476
538
|
/**
|
|
477
539
|
* `true` if this field is synced, `false` otherwise. A field is
|
|
478
540
|
* "synced" if it's source is from another airtable base or external data source
|
|
@@ -480,13 +542,82 @@ function (_AbstractModel) {
|
|
|
480
542
|
*
|
|
481
543
|
* @hidden
|
|
482
544
|
*/
|
|
545
|
+
)
|
|
546
|
+
}, {
|
|
547
|
+
key: "isFieldSynced",
|
|
548
|
+
get: function get() {
|
|
549
|
+
var _this$_data$isSynced;
|
|
550
|
+
return (_this$_data$isSynced = this._data.isSynced) !== null && _this$_data$isSynced !== void 0 ? _this$_data$isSynced : false;
|
|
551
|
+
}
|
|
483
552
|
|
|
553
|
+
/**
|
|
554
|
+
* `true` if this field is computed, `false` otherwise. A field is
|
|
555
|
+
* "computed" if it's value is not set by user input (e.g. autoNumber, formula,
|
|
556
|
+
* etc.). Can be watched
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* ```js
|
|
560
|
+
* console.log(mySingleLineTextField.isComputed);
|
|
561
|
+
* // => false
|
|
562
|
+
* console.log(myAutoNumberField.isComputed);
|
|
563
|
+
* // => true
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
484
566
|
}, {
|
|
485
|
-
key: "
|
|
567
|
+
key: "isComputed",
|
|
568
|
+
get: function get() {
|
|
569
|
+
var airtableInterface = this._sdk.__airtableInterface;
|
|
570
|
+
return airtableInterface.fieldTypeProvider.isComputed(this._data);
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* `true` if this field is its parent table's primary field, `false` otherwise.
|
|
574
|
+
* Should never change because the primary field of a table cannot change.
|
|
575
|
+
*/
|
|
576
|
+
}, {
|
|
577
|
+
key: "isPrimaryField",
|
|
578
|
+
get: function get() {
|
|
579
|
+
return this.id === this.parentTable.primaryField.id;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* The description of the field, if it has one. Can be watched.
|
|
584
|
+
*
|
|
585
|
+
* @example
|
|
586
|
+
* ```js
|
|
587
|
+
* console.log(myField.description);
|
|
588
|
+
* // => 'This is my field'
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
}, {
|
|
592
|
+
key: "description",
|
|
593
|
+
get: function get() {
|
|
594
|
+
return this._data.description;
|
|
595
|
+
}
|
|
596
|
+
// The following method is untested because its implementation resists
|
|
597
|
+
// testing and because it is expected to be redesigned.
|
|
598
|
+
// istanbul ignore next
|
|
599
|
+
/**
|
|
600
|
+
* A list of available aggregators given this field's configuration.
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```js
|
|
604
|
+
* const fieldAggregators = myField.availableAggregators;
|
|
605
|
+
* ```
|
|
606
|
+
*/
|
|
607
|
+
}, {
|
|
608
|
+
key: "availableAggregators",
|
|
609
|
+
get: function get() {
|
|
610
|
+
var airtableInterface = this._sdk.__airtableInterface;
|
|
611
|
+
var availableAggregatorKeysSet = new Set(airtableInterface.aggregators.getAvailableAggregatorKeysForField(this._data));
|
|
612
|
+
var _require = require('./models'),
|
|
613
|
+
aggregators = _require.aggregators;
|
|
614
|
+
return (0, _private_utils.values)(aggregators).filter(aggregator => {
|
|
615
|
+
return availableAggregatorKeysSet.has(aggregator.key);
|
|
616
|
+
});
|
|
617
|
+
}
|
|
486
618
|
// The following method is untested because its implementation resists
|
|
487
619
|
// testing and because it is expected to be redesigned.
|
|
488
620
|
// istanbul ignore next
|
|
489
|
-
|
|
490
621
|
/**
|
|
491
622
|
* Checks if the given aggregator is available for this field.
|
|
492
623
|
*
|
|
@@ -505,6 +636,8 @@ function (_AbstractModel) {
|
|
|
505
636
|
* // => false
|
|
506
637
|
* ```
|
|
507
638
|
*/
|
|
639
|
+
}, {
|
|
640
|
+
key: "isAggregatorAvailable",
|
|
508
641
|
value: function isAggregatorAvailable(aggregator) {
|
|
509
642
|
var aggregatorKey = typeof aggregator === 'string' ? aggregator : aggregator.key;
|
|
510
643
|
var airtableInterface = this._sdk.__airtableInterface;
|
|
@@ -524,28 +657,28 @@ function (_AbstractModel) {
|
|
|
524
657
|
* // => true
|
|
525
658
|
* ```
|
|
526
659
|
*/
|
|
527
|
-
|
|
528
660
|
}, {
|
|
529
661
|
key: "convertStringToCellValue",
|
|
530
662
|
value: function convertStringToCellValue(string) {
|
|
531
663
|
var airtableInterface = this._sdk.__airtableInterface;
|
|
532
664
|
var appInterface = this._sdk.__appInterface;
|
|
533
|
-
var cellValue = airtableInterface.fieldTypeProvider.convertStringToCellValue(appInterface, string, this._data,
|
|
665
|
+
var cellValue = airtableInterface.fieldTypeProvider.convertStringToCellValue(appInterface, string, this._data,
|
|
666
|
+
// The opt parseDateCellValueInColumnTimeZone is used here to ensure date string
|
|
534
667
|
// inputs are interpreted correctly according to the `timeZone` of the dateTime field.
|
|
535
668
|
{
|
|
536
669
|
parseDateCellValueInColumnTimeZone: this.type === _field.FieldType.DATE_TIME
|
|
537
|
-
});
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
// Temporarily bail out of validating computed values (since validation will crash)
|
|
538
673
|
// while we work out if we actually have to validate or not. Ideally we just delete all
|
|
539
674
|
// the validation
|
|
540
675
|
// TODO(emma): delete me or tidy me up
|
|
541
|
-
|
|
542
676
|
if (this.isComputed) {
|
|
543
677
|
return cellValue;
|
|
544
|
-
}
|
|
545
|
-
|
|
678
|
+
}
|
|
546
679
|
|
|
680
|
+
// TODO(emma): do we need to validate here?
|
|
547
681
|
var validationResult = airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, cellValue, null, this._data);
|
|
548
|
-
|
|
549
682
|
if (validationResult.isValid) {
|
|
550
683
|
return cellValue;
|
|
551
684
|
} else {
|
|
@@ -555,219 +688,39 @@ function (_AbstractModel) {
|
|
|
555
688
|
/**
|
|
556
689
|
* @internal
|
|
557
690
|
*/
|
|
558
|
-
|
|
559
691
|
}, {
|
|
560
692
|
key: "__triggerOnChangeForDirtyPaths",
|
|
561
693
|
value: function __triggerOnChangeForDirtyPaths(dirtyPaths) {
|
|
562
694
|
// Always clear the cached config when anything on the field data model changes
|
|
563
695
|
this._clearCachedConfig();
|
|
564
|
-
|
|
565
696
|
if (dirtyPaths.name) {
|
|
566
697
|
this._onChange(WatchableFieldKeys.name);
|
|
567
698
|
}
|
|
568
|
-
|
|
569
699
|
if (dirtyPaths.type) {
|
|
570
|
-
this._onChange(WatchableFieldKeys.type);
|
|
571
|
-
// we know isComputed changed.
|
|
572
|
-
|
|
700
|
+
this._onChange(WatchableFieldKeys.type);
|
|
573
701
|
|
|
702
|
+
// TODO: it would be better if we only trigger this when
|
|
703
|
+
// we know isComputed changed.
|
|
574
704
|
this._onChange(WatchableFieldKeys.isComputed);
|
|
575
705
|
}
|
|
576
|
-
|
|
577
706
|
if (dirtyPaths.typeOptions) {
|
|
578
707
|
this._onChange(WatchableFieldKeys.options);
|
|
579
708
|
}
|
|
580
|
-
|
|
581
709
|
if (dirtyPaths.description) {
|
|
582
710
|
this._onChange(WatchableFieldKeys.description);
|
|
583
711
|
}
|
|
584
|
-
|
|
585
712
|
if (dirtyPaths.isSynced) {
|
|
586
713
|
this._onChange(WatchableFieldKeys.isFieldSynced);
|
|
587
714
|
}
|
|
588
715
|
}
|
|
589
|
-
}, {
|
|
590
|
-
key: "
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
var tableData = this._baseData.tablesById[this.parentTable.id];
|
|
595
|
-
return (_ref = tableData === null || tableData === void 0 ? void 0 : tableData.fieldsById[this._id]) !== null && _ref !== void 0 ? _ref : null;
|
|
596
|
-
}
|
|
597
|
-
/**
|
|
598
|
-
* The table that this field belongs to. Should never change because fields aren't moved between tables.
|
|
599
|
-
*
|
|
600
|
-
* @internal (since we may not be able to return parent model instances in the immutable models world)
|
|
601
|
-
* @example
|
|
602
|
-
* ```js
|
|
603
|
-
* const field = myTable.getFieldByName('Name');
|
|
604
|
-
* console.log(field.parentTable.id === myTable.id);
|
|
605
|
-
* // => true
|
|
606
|
-
* ```
|
|
607
|
-
*/
|
|
608
|
-
|
|
609
|
-
}, {
|
|
610
|
-
key: "parentTable",
|
|
611
|
-
get: function get() {
|
|
612
|
-
return this._parentTable;
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* The name of the field. Can be watched.
|
|
616
|
-
*
|
|
617
|
-
* @example
|
|
618
|
-
* ```js
|
|
619
|
-
* console.log(myField.name);
|
|
620
|
-
* // => 'Name'
|
|
621
|
-
* ```
|
|
622
|
-
*/
|
|
623
|
-
|
|
624
|
-
}, {
|
|
625
|
-
key: "name",
|
|
626
|
-
get: function get() {
|
|
627
|
-
return this._data.name;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* The type of the field. Can be watched.
|
|
631
|
-
*
|
|
632
|
-
* @example
|
|
633
|
-
* ```js
|
|
634
|
-
* console.log(myField.type);
|
|
635
|
-
* // => 'singleLineText'
|
|
636
|
-
* ```
|
|
637
|
-
*/
|
|
638
|
-
|
|
639
|
-
}, {
|
|
640
|
-
key: "type",
|
|
641
|
-
get: function get() {
|
|
642
|
-
var _this$_getCachedConfi = this._getCachedConfigFromFieldTypeProvider(),
|
|
643
|
-
type = _this$_getCachedConfi.type; // We intend to switch from "lookup" to "multipleLookupValues", but need to support both
|
|
644
|
-
// until the transition is complete. See <https://airtable.quip.com/VxaMAmAfUscs> for more.
|
|
645
|
-
// @ts-ignore
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
if (type === 'lookup') {
|
|
649
|
-
return _field.FieldType.MULTIPLE_LOOKUP_VALUES;
|
|
650
|
-
} else {
|
|
651
|
-
return type;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* The configuration options of the field. The structure of the field's
|
|
656
|
-
* options depend on the field's type. `null` if the field has no options.
|
|
657
|
-
* Can be watched.
|
|
658
|
-
*
|
|
659
|
-
* @see {@link FieldType}
|
|
660
|
-
* @example
|
|
661
|
-
* ```js
|
|
662
|
-
* import {FieldType} from '@airtable/blocks/models';
|
|
663
|
-
*
|
|
664
|
-
* if (myField.type === FieldType.CURRENCY) {
|
|
665
|
-
* console.log(myField.options.symbol);
|
|
666
|
-
* // => '$'
|
|
667
|
-
* }
|
|
668
|
-
* ```
|
|
669
|
-
*/
|
|
670
|
-
|
|
671
|
-
}, {
|
|
672
|
-
key: "options",
|
|
673
|
-
get: function get() {
|
|
674
|
-
var _this$_getCachedConfi2 = this._getCachedConfigFromFieldTypeProvider(),
|
|
675
|
-
options = _this$_getCachedConfi2.options; // TODO: In the next breaking release freeze (inside of the cache) and replace
|
|
676
|
-
// FieldOptions with readonly<FieldOptions>.
|
|
677
|
-
// Today this is required because we re-use the fieldTypeProvider.getConfig response.
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
return options ? (0, _private_utils.cloneDeep)(options) : null;
|
|
681
|
-
}
|
|
682
|
-
}, {
|
|
683
|
-
key: "config",
|
|
684
|
-
get: function get() {
|
|
685
|
-
return {
|
|
686
|
-
type: this.type,
|
|
687
|
-
options: this.options
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
}, {
|
|
691
|
-
key: "isFieldSynced",
|
|
692
|
-
get: function get() {
|
|
693
|
-
var _this$_data$isSynced;
|
|
694
|
-
|
|
695
|
-
return (_this$_data$isSynced = this._data.isSynced) !== null && _this$_data$isSynced !== void 0 ? _this$_data$isSynced : false;
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* `true` if this field is computed, `false` otherwise. A field is
|
|
699
|
-
* "computed" if it's value is not set by user input (e.g. autoNumber, formula,
|
|
700
|
-
* etc.). Can be watched
|
|
701
|
-
*
|
|
702
|
-
* @example
|
|
703
|
-
* ```js
|
|
704
|
-
* console.log(mySingleLineTextField.isComputed);
|
|
705
|
-
* // => false
|
|
706
|
-
* console.log(myAutoNumberField.isComputed);
|
|
707
|
-
* // => true
|
|
708
|
-
* ```
|
|
709
|
-
*/
|
|
710
|
-
|
|
711
|
-
}, {
|
|
712
|
-
key: "isComputed",
|
|
713
|
-
get: function get() {
|
|
714
|
-
var airtableInterface = this._sdk.__airtableInterface;
|
|
715
|
-
return airtableInterface.fieldTypeProvider.isComputed(this._data);
|
|
716
|
-
}
|
|
717
|
-
/**
|
|
718
|
-
* `true` if this field is its parent table's primary field, `false` otherwise.
|
|
719
|
-
* Should never change because the primary field of a table cannot change.
|
|
720
|
-
*/
|
|
721
|
-
|
|
722
|
-
}, {
|
|
723
|
-
key: "isPrimaryField",
|
|
724
|
-
get: function get() {
|
|
725
|
-
return this.id === this.parentTable.primaryField.id;
|
|
726
|
-
}
|
|
727
|
-
/**
|
|
728
|
-
* The description of the field, if it has one. Can be watched.
|
|
729
|
-
*
|
|
730
|
-
* @example
|
|
731
|
-
* ```js
|
|
732
|
-
* console.log(myField.description);
|
|
733
|
-
* // => 'This is my field'
|
|
734
|
-
* ```
|
|
735
|
-
*/
|
|
736
|
-
|
|
737
|
-
}, {
|
|
738
|
-
key: "description",
|
|
739
|
-
get: function get() {
|
|
740
|
-
return this._data.description;
|
|
741
|
-
} // The following method is untested because its implementation resists
|
|
742
|
-
// testing and because it is expected to be redesigned.
|
|
743
|
-
// istanbul ignore next
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* A list of available aggregators given this field's configuration.
|
|
747
|
-
*
|
|
748
|
-
* @example
|
|
749
|
-
* ```js
|
|
750
|
-
* const fieldAggregators = myField.availableAggregators;
|
|
751
|
-
* ```
|
|
752
|
-
*/
|
|
753
|
-
|
|
754
|
-
}, {
|
|
755
|
-
key: "availableAggregators",
|
|
756
|
-
get: function get() {
|
|
757
|
-
var airtableInterface = this._sdk.__airtableInterface;
|
|
758
|
-
var availableAggregatorKeysSet = new Set(airtableInterface.aggregators.getAvailableAggregatorKeysForField(this._data));
|
|
759
|
-
|
|
760
|
-
var _require = require('./models'),
|
|
761
|
-
aggregators = _require.aggregators;
|
|
762
|
-
|
|
763
|
-
return (0, _private_utils.values)(aggregators).filter(aggregator => {
|
|
764
|
-
return availableAggregatorKeysSet.has(aggregator.key);
|
|
765
|
-
});
|
|
716
|
+
}], [{
|
|
717
|
+
key: "_isWatchableKey",
|
|
718
|
+
value: /** @internal */
|
|
719
|
+
function _isWatchableKey(key) {
|
|
720
|
+
return (0, _private_utils.isEnumValue)(WatchableFieldKeys, key);
|
|
766
721
|
}
|
|
767
722
|
}]);
|
|
768
|
-
return Field;
|
|
769
723
|
}(_abstract_model.default);
|
|
770
|
-
|
|
724
|
+
/** @internal */
|
|
771
725
|
(0, _defineProperty2.default)(Field, "_className", 'Field');
|
|
772
|
-
var _default = Field;
|
|
773
|
-
exports.default = _default;
|
|
726
|
+
var _default = exports.default = Field;
|