@airtable/blocks 0.0.0-experimental-f1c9010b3-20250609 → 0.0.0-experimental-15dc8a3ea-20250616
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/base/models/linked_records_query_result.js +2 -2
- package/dist/cjs/base/models/models.js +5 -5
- package/dist/cjs/base/models/mutations.js +86 -264
- package/dist/cjs/base/models/record_query_result.js +5 -5
- package/dist/cjs/base/models/table.js +1 -1070
- package/dist/cjs/base/types/field.js +1 -0
- package/dist/cjs/base/types/mutations.js +0 -27
- package/dist/cjs/base/ui/cell_renderer.js +2 -2
- package/dist/cjs/base/ui/field_picker.js +2 -2
- package/dist/cjs/base/ui/record_card.js +13 -13
- package/dist/cjs/base/unstable_testing_utils.js +3 -2
- package/dist/cjs/interface/models/models.js +5 -5
- package/dist/cjs/interface/models/mutations.js +40 -26
- package/dist/cjs/interface/models/record.js +27 -2
- package/dist/cjs/interface/types/airtable_interface.js +1 -0
- package/dist/cjs/interface/types/field.js +1 -0
- package/dist/cjs/shared/models/field_core.js +3 -3
- package/dist/cjs/shared/models/mutations_core.js +268 -0
- package/dist/cjs/shared/models/record_core.js +4 -4
- package/dist/cjs/shared/models/table_core.js +1070 -0
- package/dist/cjs/shared/types/mutations_core.js +28 -1
- package/dist/types/src/base/models/base.d.ts +1 -1
- package/dist/types/src/base/models/base.d.ts.map +1 -1
- package/dist/types/src/base/models/field.d.ts +1 -1
- package/dist/types/src/base/models/field.d.ts.map +1 -1
- package/dist/types/src/base/models/models.d.ts +1 -1
- 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/models/record.d.ts +5 -1
- package/dist/types/src/base/models/record.d.ts.map +1 -1
- package/dist/types/src/base/models/table.d.ts +3 -836
- package/dist/types/src/base/models/table.d.ts.map +1 -1
- package/dist/types/src/base/types/airtable_interface.d.ts +1 -1
- package/dist/types/src/base/types/airtable_interface.d.ts.map +1 -1
- package/dist/types/src/base/types/base.d.ts +5 -2
- package/dist/types/src/base/types/base.d.ts.map +1 -1
- package/dist/types/src/base/types/field.d.ts +8 -0
- package/dist/types/src/base/types/field.d.ts.map +1 -0
- package/dist/types/src/base/types/mutations.d.ts +7 -90
- package/dist/types/src/base/types/mutations.d.ts.map +1 -1
- package/dist/types/src/base/types/table.d.ts +8 -2
- package/dist/types/src/base/types/table.d.ts.map +1 -1
- package/dist/types/src/base/ui/field_picker.d.ts +1 -1
- package/dist/types/src/base/ui/field_picker.d.ts.map +1 -1
- package/dist/types/src/base/unstable_testing_utils.d.ts +2 -1
- package/dist/types/src/base/unstable_testing_utils.d.ts.map +1 -1
- package/dist/types/src/interface/models/models.d.ts +1 -1
- 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/models/record.d.ts +17 -0
- package/dist/types/src/interface/models/record.d.ts.map +1 -1
- package/dist/types/src/interface/types/airtable_interface.d.ts +12 -2
- package/dist/types/src/interface/types/airtable_interface.d.ts.map +1 -1
- package/dist/types/src/interface/types/base.d.ts +5 -2
- package/dist/types/src/interface/types/base.d.ts.map +1 -1
- package/dist/types/src/interface/types/field.d.ts +10 -0
- package/dist/types/src/interface/types/field.d.ts.map +1 -0
- package/dist/types/src/interface/types/mutations.d.ts +3 -0
- package/dist/types/src/interface/types/mutations.d.ts.map +1 -1
- package/dist/types/src/interface/types/table.d.ts +14 -2
- package/dist/types/src/interface/types/table.d.ts.map +1 -1
- package/dist/types/src/sdk_mode.d.ts +8 -2
- package/dist/types/src/sdk_mode.d.ts.map +1 -1
- package/dist/types/src/shared/models/field_core.d.ts +2 -2
- package/dist/types/src/shared/models/field_core.d.ts.map +1 -1
- package/dist/types/src/shared/models/mutations_core.d.ts.map +1 -1
- package/dist/types/src/shared/models/table_core.d.ts +835 -2
- package/dist/types/src/shared/models/table_core.d.ts.map +1 -1
- package/dist/types/src/shared/types/airtable_interface_core.d.ts +9 -9
- package/dist/types/src/shared/types/airtable_interface_core.d.ts.map +1 -1
- package/dist/types/src/shared/types/base_core.d.ts +3 -3
- package/dist/types/src/shared/types/base_core.d.ts.map +1 -1
- package/dist/types/src/shared/types/{field.d.ts → field_core.d.ts} +3 -3
- package/dist/types/src/shared/types/field_core.d.ts.map +1 -0
- package/dist/types/src/shared/types/mutations_core.d.ts +90 -2
- package/dist/types/src/shared/types/mutations_core.d.ts.map +1 -1
- package/dist/types/src/shared/types/table_core.d.ts +3 -8
- package/dist/types/src/shared/types/table_core.d.ts.map +1 -1
- package/dist/types/src/testing/abstract_mock_airtable_interface.d.ts +1 -1
- package/dist/types/src/testing/abstract_mock_airtable_interface.d.ts.map +1 -1
- package/package.json +2 -16
- package/CHANGELOG.md +0 -561
- package/dist/types/src/shared/types/field.d.ts.map +0 -1
- package/dist/types/stories/all_controls.stories.d.ts +0 -10
- package/dist/types/stories/all_controls.stories.d.ts.map +0 -1
- package/dist/types/stories/box/appearance.stories.d.ts +0 -21
- package/dist/types/stories/box/appearance.stories.d.ts.map +0 -1
- package/dist/types/stories/box/box.stories.d.ts +0 -45
- package/dist/types/stories/box/box.stories.d.ts.map +0 -1
- package/dist/types/stories/box/dimensions.stories.d.ts +0 -24
- package/dist/types/stories/box/dimensions.stories.d.ts.map +0 -1
- package/dist/types/stories/box/flex_container.stories.d.ts +0 -24
- package/dist/types/stories/box/flex_container.stories.d.ts.map +0 -1
- package/dist/types/stories/box/flex_item.stories.d.ts +0 -25
- package/dist/types/stories/box/flex_item.stories.d.ts.map +0 -1
- package/dist/types/stories/box/position.stories.d.ts +0 -25
- package/dist/types/stories/box/position.stories.d.ts.map +0 -1
- package/dist/types/stories/box/spacing.stories.d.ts +0 -39
- package/dist/types/stories/box/spacing.stories.d.ts.map +0 -1
- package/dist/types/stories/box/typography.stories.d.ts +0 -33
- package/dist/types/stories/box/typography.stories.d.ts.map +0 -1
- package/dist/types/stories/button.stories.d.ts +0 -48
- package/dist/types/stories/button.stories.d.ts.map +0 -1
- package/dist/types/stories/cell_renderer.stories.d.ts +0 -11
- package/dist/types/stories/cell_renderer.stories.d.ts.map +0 -1
- package/dist/types/stories/choice_token.stories.d.ts +0 -24
- package/dist/types/stories/choice_token.stories.d.ts.map +0 -1
- package/dist/types/stories/collaborator_token.stories.d.ts +0 -29
- package/dist/types/stories/collaborator_token.stories.d.ts.map +0 -1
- package/dist/types/stories/color_palette.stories.d.ts +0 -12
- package/dist/types/stories/color_palette.stories.d.ts.map +0 -1
- package/dist/types/stories/confirmation_dialog.stories.d.ts +0 -10
- package/dist/types/stories/confirmation_dialog.stories.d.ts.map +0 -1
- package/dist/types/stories/dialog.stories.d.ts +0 -10
- package/dist/types/stories/dialog.stories.d.ts.map +0 -1
- package/dist/types/stories/field_icon.stories.d.ts +0 -10
- package/dist/types/stories/field_icon.stories.d.ts.map +0 -1
- package/dist/types/stories/field_picker.stories.d.ts +0 -12
- package/dist/types/stories/field_picker.stories.d.ts.map +0 -1
- package/dist/types/stories/form_field.stories.d.ts +0 -33
- package/dist/types/stories/form_field.stories.d.ts.map +0 -1
- package/dist/types/stories/heading.size.stories.d.ts +0 -19
- package/dist/types/stories/heading.size.stories.d.ts.map +0 -1
- package/dist/types/stories/heading.stories.d.ts +0 -33
- 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 -18
- 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 -27
- package/dist/types/stories/input.stories.d.ts.map +0 -1
- package/dist/types/stories/label.stories.d.ts +0 -36
- package/dist/types/stories/label.stories.d.ts.map +0 -1
- package/dist/types/stories/link.stories.d.ts +0 -45
- package/dist/types/stories/link.stories.d.ts.map +0 -1
- package/dist/types/stories/loader.stories.d.ts +0 -21
- package/dist/types/stories/loader.stories.d.ts.map +0 -1
- package/dist/types/stories/progress_bar.stories.d.ts +0 -27
- package/dist/types/stories/progress_bar.stories.d.ts.map +0 -1
- package/dist/types/stories/record_card.stories.d.ts +0 -9
- package/dist/types/stories/record_card.stories.d.ts.map +0 -1
- package/dist/types/stories/record_card_list.stories.d.ts +0 -9
- package/dist/types/stories/record_card_list.stories.d.ts.map +0 -1
- package/dist/types/stories/select.stories.d.ts +0 -30
- package/dist/types/stories/select.stories.d.ts.map +0 -1
- package/dist/types/stories/select_buttons.stories.d.ts +0 -30
- package/dist/types/stories/select_buttons.stories.d.ts.map +0 -1
- package/dist/types/stories/switch.stories.d.ts +0 -48
- package/dist/types/stories/switch.stories.d.ts.map +0 -1
- package/dist/types/stories/table_picker.stories.d.ts +0 -12
- package/dist/types/stories/table_picker.stories.d.ts.map +0 -1
- package/dist/types/stories/text.size.stories.d.ts +0 -16
- package/dist/types/stories/text.size.stories.d.ts.map +0 -1
- package/dist/types/stories/text.stories.d.ts +0 -36
- package/dist/types/stories/text.stories.d.ts.map +0 -1
- package/dist/types/stories/text_button.stories.d.ts +0 -45
- package/dist/types/stories/text_button.stories.d.ts.map +0 -1
- package/dist/types/stories/tooltip.stories.d.ts +0 -10
- package/dist/types/stories/tooltip.stories.d.ts.map +0 -1
- package/dist/types/stories/view_picker.stories.d.ts +0 -12
- package/dist/types/stories/view_picker.stories.d.ts.map +0 -1
- package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts +0 -122
- 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 -60
- 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_color_scheme.test.d.ts +0 -2
- package/dist/types/test/ui/use_color_scheme.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/shared/types/{field.js → field_core.js} +0 -0
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
|
5
|
+
require("core-js/modules/es.array.from.js");
|
|
6
|
+
require("core-js/modules/es.array.slice.js");
|
|
7
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
8
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
3
9
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
10
|
Object.defineProperty(exports, "__esModule", {
|
|
5
11
|
value: true
|
|
6
12
|
});
|
|
7
13
|
exports.MutationsCore = exports.MUTATIONS_MAX_BATCH_SIZE = void 0;
|
|
8
14
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
15
|
+
require("core-js/modules/es.array.filter.js");
|
|
16
|
+
require("core-js/modules/es.array.flat-map.js");
|
|
17
|
+
require("core-js/modules/es.array.iterator.js");
|
|
18
|
+
require("core-js/modules/es.array.map.js");
|
|
19
|
+
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
9
20
|
require("core-js/modules/es.object.to-string.js");
|
|
10
21
|
require("core-js/modules/es.promise.js");
|
|
22
|
+
require("core-js/modules/es.set.js");
|
|
23
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
25
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
26
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
27
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
28
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
29
|
var _mutations_core = require("../types/mutations_core");
|
|
16
30
|
var _error_utils = require("../error_utils");
|
|
31
|
+
var _private_utils = require("../private_utils");
|
|
32
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
33
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
34
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17
35
|
// Limit for how many items can be updated from a single batch mutation.
|
|
18
36
|
// This is number of records for MULTIPLE_RECORDS type mutations, and number of global config paths
|
|
19
37
|
// for SET_MULTIPLE_GLOBAL_CONFIG_PATHS.
|
|
@@ -166,6 +184,256 @@ var MutationsCore = exports.MutationsCore = /*#__PURE__*/function () {
|
|
|
166
184
|
return false;
|
|
167
185
|
}
|
|
168
186
|
|
|
187
|
+
/** @internal */
|
|
188
|
+
}, {
|
|
189
|
+
key: "_doesMutationExceedBatchSizeLimit",
|
|
190
|
+
value: function _doesMutationExceedBatchSizeLimit(mutation) {
|
|
191
|
+
switch (mutation.type) {
|
|
192
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_RECORDS_CELL_VALUES:
|
|
193
|
+
case _mutations_core.MutationTypesCore.CREATE_MULTIPLE_RECORDS:
|
|
194
|
+
return mutation.records.length > MUTATIONS_MAX_BATCH_SIZE;
|
|
195
|
+
case _mutations_core.MutationTypesCore.DELETE_MULTIPLE_RECORDS:
|
|
196
|
+
return mutation.recordIds.length > MUTATIONS_MAX_BATCH_SIZE;
|
|
197
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
|
|
198
|
+
return mutation.updates.length > MUTATIONS_MAX_BATCH_SIZE;
|
|
199
|
+
// The "default" case cannot be reached because this method is only
|
|
200
|
+
// invoked after the mutation type has been validated.
|
|
201
|
+
// istanbul ignore next
|
|
202
|
+
default:
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** @internal */
|
|
208
|
+
}, {
|
|
209
|
+
key: "_assertFieldIsValidForMutation",
|
|
210
|
+
value: function _assertFieldIsValidForMutation(field) {
|
|
211
|
+
if (field.isComputed) {
|
|
212
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: Field '%s' is computed and cannot be set", field.name);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** @internal */
|
|
217
|
+
}, {
|
|
218
|
+
key: "_assertMutationIsValid",
|
|
219
|
+
value: function _assertMutationIsValid(mutation) {
|
|
220
|
+
// We call validate the data (including any cell values) because if the data required for
|
|
221
|
+
// us to do that is already loaded in the block, we can error out before applying
|
|
222
|
+
// optimistic updates or sending the update to liveapp. That means that the error is
|
|
223
|
+
// recoverable. Once we apply optimistic updates, if liveapp rejects the update then we
|
|
224
|
+
// can't recover from that - we have to crash the block. We _could_ skip over these
|
|
225
|
+
// validations - it wouldn't cause issues outside of the block frame. But running them
|
|
226
|
+
// gives us slightly more confidence that we can do something other than completely crash
|
|
227
|
+
// the block in the event of an invalid mutation.
|
|
228
|
+
|
|
229
|
+
var appInterface = this._sdk.__appInterface;
|
|
230
|
+
switch (mutation.type) {
|
|
231
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_RECORDS_CELL_VALUES:
|
|
232
|
+
{
|
|
233
|
+
var tableId = mutation.tableId,
|
|
234
|
+
records = mutation.records;
|
|
235
|
+
var table = this._base.getTableByIdIfExists(tableId);
|
|
236
|
+
if (!table) {
|
|
237
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: No table with id %s exists", tableId);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// For every mutation, we check that we're not trying to set fields that we don't support
|
|
241
|
+
// mutations for yet. When record data is loaded, we also check that the record we're
|
|
242
|
+
// updating actually exists and that the cell values are valid.
|
|
243
|
+
var _recordStore = this._base.__getRecordStore(tableId);
|
|
244
|
+
var checkedFieldIds = new Set();
|
|
245
|
+
var _iterator = _createForOfIteratorHelper(records),
|
|
246
|
+
_step;
|
|
247
|
+
try {
|
|
248
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
249
|
+
var record = _step.value;
|
|
250
|
+
var existingRecord = null;
|
|
251
|
+
if (this._isRecordStoreReadyForMutations(_recordStore)) {
|
|
252
|
+
existingRecord = _recordStore.getRecordByIdIfExists(record.id);
|
|
253
|
+
if (!existingRecord) {
|
|
254
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: No record with id %s exists", record.id);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
for (var _i = 0, _Object$keys = Object.keys(record.cellValuesByFieldId); _i < _Object$keys.length; _i++) {
|
|
258
|
+
var _fieldId = _Object$keys[_i];
|
|
259
|
+
var field = table.getFieldByIdIfExists(_fieldId);
|
|
260
|
+
if (!field) {
|
|
261
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: No field with id %s exists in table '%s'", _fieldId, table.name);
|
|
262
|
+
}
|
|
263
|
+
if (!checkedFieldIds.has(_fieldId)) {
|
|
264
|
+
this._assertFieldIsValidForMutation(field);
|
|
265
|
+
checkedFieldIds.add(_fieldId);
|
|
266
|
+
}
|
|
267
|
+
if (existingRecord && this._isFieldAvailableForMutation(_recordStore, field.id)) {
|
|
268
|
+
var validationResult = this._airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, record.cellValuesByFieldId[_fieldId], existingRecord._getRawCellValue(field), field._data);
|
|
269
|
+
if (!validationResult.isValid) {
|
|
270
|
+
throw (0, _error_utils.spawnError)("Can't set cell values: invalid cell value for field '%s'.\n%s", field.name, validationResult.reason);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
} catch (err) {
|
|
276
|
+
_iterator.e(err);
|
|
277
|
+
} finally {
|
|
278
|
+
_iterator.f();
|
|
279
|
+
}
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
case _mutations_core.MutationTypesCore.DELETE_MULTIPLE_RECORDS:
|
|
283
|
+
{
|
|
284
|
+
var _tableId = mutation.tableId,
|
|
285
|
+
recordIds = mutation.recordIds;
|
|
286
|
+
var _table = this._base.getTableByIdIfExists(_tableId);
|
|
287
|
+
if (!_table) {
|
|
288
|
+
throw (0, _error_utils.spawnError)("Can't delete records: No table with id %s exists", _tableId);
|
|
289
|
+
}
|
|
290
|
+
var _recordStore2 = this._base.__getRecordStore(_tableId);
|
|
291
|
+
if (this._isRecordStoreReadyForMutations(_recordStore2)) {
|
|
292
|
+
var _iterator2 = _createForOfIteratorHelper(recordIds),
|
|
293
|
+
_step2;
|
|
294
|
+
try {
|
|
295
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
296
|
+
var recordId = _step2.value;
|
|
297
|
+
var _record = _recordStore2.getRecordByIdIfExists(recordId);
|
|
298
|
+
if (!_record) {
|
|
299
|
+
throw (0, _error_utils.spawnError)("Can't delete records: No record with id %s exists in table '%s'", recordId, _table.name);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
} catch (err) {
|
|
303
|
+
_iterator2.e(err);
|
|
304
|
+
} finally {
|
|
305
|
+
_iterator2.f();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
case _mutations_core.MutationTypesCore.CREATE_MULTIPLE_RECORDS:
|
|
311
|
+
{
|
|
312
|
+
var _tableId2 = mutation.tableId,
|
|
313
|
+
_records = mutation.records;
|
|
314
|
+
var _checkedFieldIds = new Set();
|
|
315
|
+
var _table2 = this._base.getTableByIdIfExists(_tableId2);
|
|
316
|
+
if (!_table2) {
|
|
317
|
+
throw (0, _error_utils.spawnError)("Can't create records: No table with id %s exists", _tableId2);
|
|
318
|
+
}
|
|
319
|
+
var _iterator3 = _createForOfIteratorHelper(_records),
|
|
320
|
+
_step3;
|
|
321
|
+
try {
|
|
322
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
323
|
+
var _record2 = _step3.value;
|
|
324
|
+
for (var _i2 = 0, _Object$keys2 = Object.keys(_record2.cellValuesByFieldId); _i2 < _Object$keys2.length; _i2++) {
|
|
325
|
+
var _fieldId2 = _Object$keys2[_i2];
|
|
326
|
+
var _field = _table2.getFieldByIdIfExists(_fieldId2);
|
|
327
|
+
if (!_field) {
|
|
328
|
+
throw (0, _error_utils.spawnError)("Can't create records: No field with id %s exists in table '%s'", _fieldId2, _table2.name);
|
|
329
|
+
}
|
|
330
|
+
if (!_checkedFieldIds.has(_fieldId2)) {
|
|
331
|
+
this._assertFieldIsValidForMutation(_field);
|
|
332
|
+
_checkedFieldIds.add(_fieldId2);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Current cell value is null since the record doesn't exist.
|
|
336
|
+
var _validationResult = this._airtableInterface.fieldTypeProvider.validateCellValueForUpdate(appInterface, _record2.cellValuesByFieldId[_fieldId2], null, _field._data);
|
|
337
|
+
if (!_validationResult.isValid) {
|
|
338
|
+
throw (0, _error_utils.spawnError)("Can't create records: invalid cell value for field '%s'.\n%s", _field.name, _validationResult.reason);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
} catch (err) {
|
|
343
|
+
_iterator3.e(err);
|
|
344
|
+
} finally {
|
|
345
|
+
_iterator3.f();
|
|
346
|
+
}
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
|
|
350
|
+
{
|
|
351
|
+
// globalConfig update is a special case: globalConfig handles validation before
|
|
352
|
+
// invoking this mutation, since it relies on internal state to validate the
|
|
353
|
+
// paths being set.
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
default:
|
|
357
|
+
throw (0, _error_utils.spawnError)('unhandled mutation type: %s', mutation.type);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/** @internal */
|
|
362
|
+
}, {
|
|
363
|
+
key: "_getOptimisticModelChangesForMutation",
|
|
364
|
+
value: function _getOptimisticModelChangesForMutation(mutation) {
|
|
365
|
+
switch (mutation.type) {
|
|
366
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_RECORDS_CELL_VALUES:
|
|
367
|
+
{
|
|
368
|
+
var tableId = mutation.tableId,
|
|
369
|
+
records = mutation.records;
|
|
370
|
+
var _recordStore3 = this._base.__getRecordStore(tableId);
|
|
371
|
+
return records.flatMap(record => Object.keys(record.cellValuesByFieldId).filter(fieldId => this._isFieldAvailableForMutation(_recordStore3, fieldId)).map(fieldId => ({
|
|
372
|
+
path: ['tablesById', tableId, 'recordsById', record.id, 'cellValuesByFieldId', fieldId],
|
|
373
|
+
value: record.cellValuesByFieldId[fieldId]
|
|
374
|
+
})));
|
|
375
|
+
}
|
|
376
|
+
case _mutations_core.MutationTypesCore.DELETE_MULTIPLE_RECORDS:
|
|
377
|
+
{
|
|
378
|
+
var _tableId3 = mutation.tableId,
|
|
379
|
+
recordIds = mutation.recordIds;
|
|
380
|
+
return recordIds.map(recordId => ({
|
|
381
|
+
path: ['tablesById', _tableId3, 'recordsById', recordId],
|
|
382
|
+
value: undefined
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
case _mutations_core.MutationTypesCore.CREATE_MULTIPLE_RECORDS:
|
|
386
|
+
{
|
|
387
|
+
var _tableId4 = mutation.tableId,
|
|
388
|
+
_records2 = mutation.records;
|
|
389
|
+
var _recordStore4 = this._base.__getRecordStore(_tableId4);
|
|
390
|
+
return _records2.map(record => {
|
|
391
|
+
// Only apply optimistic changes for fields that are "available" for mutation
|
|
392
|
+
var filteredCellValuesByFieldId = {};
|
|
393
|
+
var _iterator4 = _createForOfIteratorHelper((0, _private_utils.entries)(record.cellValuesByFieldId)),
|
|
394
|
+
_step4;
|
|
395
|
+
try {
|
|
396
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
397
|
+
var _step4$value = (0, _slicedToArray2.default)(_step4.value, 2),
|
|
398
|
+
_fieldId3 = _step4$value[0],
|
|
399
|
+
cellValue = _step4$value[1];
|
|
400
|
+
if (this._isFieldAvailableForMutation(_recordStore4, _fieldId3)) {
|
|
401
|
+
filteredCellValuesByFieldId[_fieldId3] = cellValue;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
} catch (err) {
|
|
405
|
+
_iterator4.e(err);
|
|
406
|
+
} finally {
|
|
407
|
+
_iterator4.f();
|
|
408
|
+
}
|
|
409
|
+
return {
|
|
410
|
+
path: ['tablesById', _tableId4, 'recordsById', record.id],
|
|
411
|
+
value: {
|
|
412
|
+
id: record.id,
|
|
413
|
+
cellValuesByFieldId: filteredCellValuesByFieldId,
|
|
414
|
+
commentCount: 0,
|
|
415
|
+
createdTime: new Date().toJSON()
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// The following branch is unreachable because this method's only
|
|
422
|
+
// call site is preceded by an explicit guard for this condition.
|
|
423
|
+
// istanbul ignore next
|
|
424
|
+
case _mutations_core.MutationTypesCore.SET_MULTIPLE_GLOBAL_CONFIG_PATHS:
|
|
425
|
+
{
|
|
426
|
+
throw (0, _error_utils.spawnError)('attempting to generate model updates for SET_MULTIPLE_GLOBAL_CONFIG_PATH');
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// The following branch is unreachable because this method's only
|
|
430
|
+
// call site is preceded by an explicit guard for this condition.
|
|
431
|
+
// istanbul ignore next
|
|
432
|
+
default:
|
|
433
|
+
throw (0, _error_utils.spawnError)('unhandled mutation type: %s', mutation.type);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
169
437
|
/** @internal */
|
|
170
438
|
}]);
|
|
171
439
|
}();
|
|
@@ -22,9 +22,9 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
23
|
var _private_utils = require("../private_utils");
|
|
24
24
|
var _error_utils = require("../error_utils");
|
|
25
|
-
var
|
|
25
|
+
var _field_core = require("../types/field_core");
|
|
26
26
|
var _abstract_model = _interopRequireDefault(require("./abstract_model"));
|
|
27
|
-
var
|
|
27
|
+
var _field_core2 = require("./field_core");
|
|
28
28
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
29
29
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
30
30
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -96,7 +96,7 @@ var RecordCore = exports.RecordCore = /*#__PURE__*/function (_AbstractModel) {
|
|
|
96
96
|
}, {
|
|
97
97
|
key: "_getFieldMatching",
|
|
98
98
|
value: function _getFieldMatching(fieldOrFieldIdOrFieldName) {
|
|
99
|
-
if (fieldOrFieldIdOrFieldName instanceof
|
|
99
|
+
if (fieldOrFieldIdOrFieldName instanceof _field_core2.FieldCore) {
|
|
100
100
|
return this._parentTable.__getFieldMatching(fieldOrFieldIdOrFieldName.id);
|
|
101
101
|
}
|
|
102
102
|
return this.parentTable.__getFieldMatching(fieldOrFieldIdOrFieldName);
|
|
@@ -144,7 +144,7 @@ var RecordCore = exports.RecordCore = /*#__PURE__*/function (_AbstractModel) {
|
|
|
144
144
|
var cellValue = this._getRawCellValue(field);
|
|
145
145
|
|
|
146
146
|
// HACK: migrate to new public lookup cell value format if needed
|
|
147
|
-
if (typeof cellValue === 'object' && cellValue !== null && field.type ===
|
|
147
|
+
if (typeof cellValue === 'object' && cellValue !== null && field.type === _field_core.FieldType.MULTIPLE_LOOKUP_VALUES && !this._sdk.__airtableInterface.sdkInitData.isUsingNewLookupCellValueFormat) {
|
|
148
148
|
var cellValueForMigration = [];
|
|
149
149
|
(0, _error_utils.invariant)(Array.isArray(cellValue.linkedRecordIds), 'linkedRecordIds');
|
|
150
150
|
var _iterator = _createForOfIteratorHelper(cellValue.linkedRecordIds),
|