From fc916b83eb0b8e95758eeb7d320c4d54850f3ace Mon Sep 17 00:00:00 2001 From: Vasily Strelyaev Date: Fri, 1 Nov 2024 16:34:10 +0200 Subject: [PATCH] update exports and re-exports --- .../src/common/data/custom-store/index.ts | 2 +- .../src/common/data/custom-store.ts | 2 +- .../src/common/data/custom-store.ts | 2 +- packages/devextreme/.eslintignore | 4 +- packages/devextreme/.gitignore | 4 +- .../build/gulp/localization-template.jst | 4 +- .../devextreme/build/gulp/localization.js | 22 +- .../js/__internal/core/m_element_data.ts | 2 +- .../__internal/core/r1/component_wrapper.ts | 8 +- .../__internal/core/r1/utils/resolve_rtl.ts | 2 +- .../core/r1/utils/subscribe_to_event.ts | 10 +- .../js/__internal/core/r1/widget.tsx | 10 +- .../core/templates/m_bindable_template.ts | 4 +- .../core/templates/m_template_base.ts | 2 +- .../core/utils/m_date_serialization.ts | 4 +- .../core/utils/m_public_component.ts | 4 +- .../__internal/core/widget/dom_component.ts | 2 +- .../js/__internal/core/widget/widget.ts | 12 +- .../data/data_source/m_data_source.ts | 30 +- .../data/data_source/m_operation_manager.ts | 2 +- .../js/__internal/data/data_source/m_utils.ts | 8 +- .../js/__internal/data/m_abstract_store.ts | 8 +- .../js/__internal/data/m_array_query.ts | 23 +- .../js/__internal/data/m_array_store.ts | 14 +- .../js/__internal/data/m_array_utils.ts | 12 +- .../js/__internal/data/m_custom_store.ts | 24 +- .../js/__internal/data/m_local_store.ts | 7 +- .../devextreme/js/__internal/data/m_query.ts | 2 +- .../js/__internal/data/m_remote_query.ts | 7 +- .../js/__internal/data/m_store_helper.ts | 5 +- .../js/__internal/data/odata/m_context.ts | 6 +- .../__internal/data/odata/m_query_adapter.ts | 2 +- .../data/odata/m_request_dispatcher.ts | 5 +- .../js/__internal/data/odata/m_store.ts | 11 +- .../js/__internal/data/odata/m_utils.ts | 8 +- .../js/__internal/data_controller.ts | 6 +- .../events/core/m_emitter.feedback.ts | 8 +- .../js/__internal/events/core/m_emitter.ts | 2 +- .../events/core/m_emitter_registrator.ts | 10 +- .../events/core/m_event_registrator.ts | 2 +- .../__internal/events/core/m_events_engine.ts | 6 +- .../events/core/m_keyboard_processor.ts | 4 +- .../js/__internal/events/core/m_wheel.ts | 6 +- .../gesture/m_emitter.gesture.scroll.ts | 12 +- .../events/gesture/m_emitter.gesture.ts | 10 +- .../__internal/events/gesture/m_swipeable.ts | 14 +- .../js/__internal/events/m_click.ts | 14 +- .../js/__internal/events/m_contextmenu.ts | 8 +- .../js/__internal/events/m_dblclick.ts | 6 +- .../devextreme/js/__internal/events/m_drag.ts | 8 +- .../devextreme/js/__internal/events/m_hold.ts | 6 +- .../js/__internal/events/m_hover.ts | 8 +- .../js/__internal/events/m_pointer.ts | 8 +- .../js/__internal/events/m_remove.ts | 4 +- .../js/__internal/events/m_short.ts | 6 +- .../js/__internal/events/m_swipe.ts | 6 +- .../js/__internal/events/m_transform.ts | 6 +- .../__internal/events/m_visibility_change.ts | 2 +- .../js/__internal/events/pointer/m_base.ts | 6 +- .../js/__internal/events/pointer/m_mouse.ts | 4 +- .../events/pointer/m_mouse_and_touch.ts | 8 +- .../js/__internal/events/pointer/m_touch.ts | 2 +- .../js/__internal/events/utils/index.ts | 2 +- .../events/utils/m_event_nodes_disposing.ts | 4 +- .../filter_builder/m_filter_builder.ts | 6 +- .../js/__internal/filter_builder/m_utils.ts | 9 +- .../grids/data_grid/export/m_export.ts | 2 +- .../grids/data_grid/grouping/m_grouping.ts | 2 +- .../grouping/m_grouping_collapsed.ts | 3 +- .../data_grid/grouping/m_grouping_core.ts | 3 +- .../data_grid/grouping/m_grouping_expanded.ts | 7 +- .../grids/data_grid/m_aggregate_calculator.ts | 6 +- .../js/__internal/grids/data_grid/m_utils.ts | 3 +- .../grids/data_grid/summary/m_summary.ts | 9 +- .../grid_core/adaptivity/m_adaptivity.ts | 10 +- .../column_chooser/m_column_chooser.ts | 2 +- .../column_fixing/m_column_fixing.ts | 8 +- .../column_headers/m_column_headers.ts | 4 +- .../m_columns_controller.ts | 10 +- .../m_columns_controller_utils.ts | 2 +- .../m_columns_resizing_reordering.ts | 18 +- .../data_controller/m_data_controller.ts | 3 +- .../data_controller/m_data_helper_mixin.ts | 4 +- .../m_data_source_adapter.ts | 4 +- .../grids/grid_core/editing/m_editing.ts | 14 +- .../grid_core/editing/m_editing_cell_based.ts | 12 +- .../grid_core/editing/m_editing_form_based.ts | 4 +- .../editor_factory/m_editor_factory.ts | 13 +- .../error_handling/m_error_handling.ts | 6 +- .../grid_core/filter/m_filter_builder.ts | 2 +- .../filter/m_filter_custom_operations.ts | 4 +- .../grids/grid_core/filter/m_filter_panel.ts | 4 +- .../grids/grid_core/filter/m_filter_row.ts | 6 +- .../header_filter/m_header_filter.ts | 14 +- .../header_filter/m_header_filter_core.ts | 2 +- .../grid_core/header_panel/m_header_panel.ts | 2 +- .../m_keyboard_navigation.ts | 18 +- .../__internal/grids/grid_core/m_modules.ts | 2 +- .../js/__internal/grids/grid_core/m_utils.ts | 9 +- .../master_detail/m_master_detail.ts | 2 +- .../grids/grid_core/pager/m_pager.ts | 2 +- .../grids/grid_core/search/m_search.ts | 4 +- .../grids/grid_core/selection/m_selection.ts | 12 +- .../grids/grid_core/sorting/m_sorting.ts | 8 +- .../grid_core/sorting/m_sorting_mixin.ts | 2 +- .../state_storing/m_state_storing_core.ts | 2 +- .../grid_core/validating/m_validating.ts | 8 +- .../grids/grid_core/views/m_columns_view.ts | 10 +- .../grids/grid_core/views/m_grid_view.ts | 2 +- .../grids/grid_core/views/m_rows_view.ts | 6 +- .../m_virtual_scrolling_core.ts | 5 +- .../pivot_grid/data_source/m_data_source.ts | 4 +- .../grids/pivot_grid/export/m_export.ts | 2 +- .../field_chooser/m_field_chooser.ts | 2 +- .../field_chooser/m_field_chooser_base.ts | 8 +- .../pivot_grid/local_store/m_local_store.ts | 11 +- .../__internal/grids/pivot_grid/m_widget.ts | 8 +- .../grids/pivot_grid/m_widget_utils.ts | 6 +- .../pivot_grid/remote_store/m_remote_store.ts | 4 +- .../grids/pivot_grid/sortable/m_sortable.ts | 20 +- .../pivot_grid/xmla_store/m_xmla_store.ts | 9 +- .../m_data_source_adapter.ts | 8 +- .../grids/tree_list/editing/m_editing.ts | 2 +- .../__internal/grids/tree_list/rows/m_rows.ts | 4 +- .../devextreme/js/__internal/m_draggable.ts | 24 +- .../devextreme/js/__internal/m_sortable.ts | 6 +- .../common/base_pagination_props.ts | 2 +- .../drop_down_editors/select_box.tsx | 5 +- .../pagination/utils/compatibility_utils.ts | 2 +- .../scheduler/appointment_popup/m_form.ts | 4 +- .../scheduler/appointment_popup/m_popup.ts | 2 +- .../data_provider/m_appointment_filter.ts | 2 +- .../scheduler/appointments/m_appointment.ts | 12 +- .../appointments/m_appointment_collection.ts | 8 +- .../appointments/m_appointment_layout.ts | 2 +- .../scheduler/appointments/m_text_utils.ts | 2 +- .../m_strategy_horizontal_month_line.ts | 2 +- .../scheduler/header/m_date_navigator.ts | 2 +- .../js/__internal/scheduler/header/m_utils.ts | 4 +- .../m_compact_appointments_helper.ts | 6 +- .../scheduler/m_recurrence_editor.ts | 4 +- .../js/__internal/scheduler/m_scheduler.ts | 8 +- .../scheduler/r1/appointment_popup/config.ts | 4 +- .../components/base/all_day_panel_title.tsx | 2 +- .../js/__internal/scheduler/r1/utils/base.ts | 2 +- .../scheduler/r1/utils/format_weekday.ts | 2 +- .../js/__internal/scheduler/r1/utils/month.ts | 2 +- .../js/__internal/scheduler/r1/utils/week.ts | 2 +- .../__internal/scheduler/resources/m_utils.ts | 4 +- .../scheduler/workspaces/m_agenda.ts | 2 +- .../workspaces/m_virtual_scrolling.ts | 4 +- .../scheduler/workspaces/m_work_space.ts | 24 +- .../view_model/m_view_data_generator_month.ts | 2 +- .../js/__internal/ui/button/button.tsx | 4 +- .../ui/calendar/m_calendar.base_view.ts | 12 +- .../js/__internal/ui/calendar/m_calendar.ts | 16 +- .../ui/calendar/m_calendar.views.ts | 2 +- .../js/__internal/ui/chat/alertlist.ts | 2 +- .../js/__internal/ui/chat/avatar.ts | 2 +- .../devextreme/js/__internal/ui/chat/chat.ts | 10 +- .../js/__internal/ui/chat/messagebox.ts | 4 +- .../js/__internal/ui/chat/messagegroup.ts | 6 +- .../js/__internal/ui/chat/messagelist.ts | 4 +- .../js/__internal/ui/chat/typingindicator.ts | 2 +- .../js/__internal/ui/collection/base.ts | 2 +- .../ui/collection/m_collection_widget.base.ts | 16 +- .../ui/collection/m_collection_widget.edit.ts | 6 +- .../m_collection_widget.live_update.ts | 5 +- .../__internal/ui/color_box/m_color_view.ts | 10 +- .../ui/context_menu/m_context_menu.ts | 16 +- .../__internal/ui/date_box/m_date_box.base.ts | 4 +- .../ui/date_box/m_date_box.mask.parts.ts | 2 +- .../__internal/ui/date_box/m_date_box.mask.ts | 14 +- .../date_box/m_date_box.strategy.calendar.ts | 2 +- .../m_date_box.strategy.calendar_with_time.ts | 2 +- .../date_box/m_date_box.strategy.date_view.ts | 2 +- .../ui/date_box/m_date_box.strategy.list.ts | 2 +- .../ui/date_box/m_date_box.strategy.ts | 4 +- .../js/__internal/ui/date_box/m_date_utils.ts | 2 +- .../js/__internal/ui/date_box/m_date_view.ts | 2 +- .../ui/date_box/m_date_view_roller.ts | 10 +- .../js/__internal/ui/date_box/m_time_view.ts | 2 +- .../ui/date_range_box/m_date_range_box.ts | 6 +- .../date_range_box/m_multiselect_date_box.ts | 4 +- .../strategy/m_rangeCalendar.ts | 2 +- .../ui/drawer/m_drawer.animation.ts | 2 +- .../m_drawer.rendering.strategy.overlap.ts | 2 +- .../m_drawer.rendering.strategy.push.ts | 2 +- .../js/__internal/ui/drawer/m_drawer.ts | 8 +- .../ui/drop_down_editor/m_drop_down_button.ts | 4 +- .../ui/drop_down_editor/m_drop_down_editor.ts | 14 +- .../ui/drop_down_editor/m_drop_down_list.ts | 8 +- .../__internal/ui/editor/m_data_expression.ts | 4 +- .../js/__internal/ui/editor/m_editor.ts | 4 +- .../ui/form/components/m_field_item.ts | 4 +- .../ui/form/m_form.layout_manager.ts | 6 +- .../js/__internal/ui/form/m_form.ts | 6 +- .../hierarchical_collection/m_data_adapter.ts | 4 +- .../ui/html_editor/m_html_editor.ts | 12 +- .../ui/html_editor/modules/m_dropImage.ts | 4 +- .../ui/html_editor/modules/m_imageCursor.ts | 4 +- .../ui/html_editor/modules/m_imageUpload.ts | 4 +- .../ui/html_editor/modules/m_mentions.ts | 2 +- .../ui/html_editor/modules/m_popup.ts | 4 +- .../ui/html_editor/modules/m_resizing.ts | 8 +- .../html_editor/modules/m_tableContextMenu.ts | 6 +- .../ui/html_editor/modules/m_tableResizing.ts | 6 +- .../ui/html_editor/modules/m_toolbar.ts | 6 +- .../ui/html_editor/ui/m_formDialog.ts | 2 +- .../utils/m_image_uploader_helper.ts | 2 +- .../ui/html_editor/utils/m_toolbar_helper.ts | 2 +- .../js/__internal/ui/list/m_list.base.ts | 12 +- .../ui/list/m_list.edit.decorator.context.ts | 2 +- .../ui/list/m_list.edit.decorator.reorder.ts | 4 +- .../list/m_list.edit.decorator.selection.ts | 8 +- .../ui/list/m_list.edit.decorator.swipe.ts | 4 +- ...m_list.edit.decorator.switchable.button.ts | 4 +- .../m_list.edit.decorator.switchable.slide.ts | 14 +- .../list/m_list.edit.decorator.switchable.ts | 8 +- .../ui/list/m_list.edit.decorator.ts | 14 +- .../ui/list/m_list.edit.strategy.grouped.ts | 4 +- .../js/__internal/ui/list/m_list.edit.ts | 4 +- .../js/__internal/ui/m_accordion.ts | 8 +- .../js/__internal/ui/m_action_sheet.ts | 2 +- .../js/__internal/ui/m_autocomplete.ts | 2 +- .../js/__internal/ui/m_defer_rendering.ts | 6 +- .../devextreme/js/__internal/ui/m_dialog.ts | 4 +- .../js/__internal/ui/m_drop_down_box.ts | 4 +- .../js/__internal/ui/m_drop_down_button.ts | 2 +- .../js/__internal/ui/m_file_uploader.ts | 8 +- .../devextreme/js/__internal/ui/m_gallery.ts | 16 +- .../js/__internal/ui/m_load_indicator.ts | 2 +- .../js/__internal/ui/m_load_panel.ts | 2 +- .../devextreme/js/__internal/ui/m_lookup.ts | 6 +- .../js/__internal/ui/m_multi_view.ts | 8 +- .../js/__internal/ui/m_range_slider.ts | 6 +- .../js/__internal/ui/m_select_box.ts | 4 +- .../devextreme/js/__internal/ui/m_switch.ts | 14 +- .../devextreme/js/__internal/ui/m_tag_box.ts | 10 +- .../js/__internal/ui/m_text_area.ts | 8 +- .../js/__internal/ui/m_track_bar.ts | 2 +- .../js/__internal/ui/m_validation_engine.ts | 4 +- .../js/__internal/ui/m_validation_summary.ts | 2 +- .../devextreme/js/__internal/ui/map/m_map.ts | 6 +- .../ui/map/m_provider.google_static.ts | 4 +- .../js/__internal/ui/map/m_provider.ts | 2 +- .../js/__internal/ui/menu/m_menu.ts | 10 +- .../js/__internal/ui/menu/m_submenu.ts | 5 +- .../ui/multi_view/m_multi_view.animation.ts | 4 +- .../ui/number_box/m_number_box.base.ts | 10 +- .../ui/number_box/m_number_box.caret.ts | 2 +- .../ui/number_box/m_number_box.mask.ts | 14 +- .../ui/number_box/m_number_box.spin.ts | 10 +- .../ui/number_box/m_number_box.spins.ts | 6 +- .../js/__internal/ui/overlay/m_overlay.ts | 20 +- .../overlay/m_overlay_position_controller.ts | 6 +- .../js/__internal/ui/popover/m_popover.ts | 16 +- .../popover/m_popover_position_controller.ts | 6 +- .../js/__internal/ui/popup/m_popup.ts | 4 +- .../js/__internal/ui/popup/m_popup_drag.ts | 16 +- .../ui/popup/m_popup_position_controller.ts | 2 +- .../ui/radio_group/m_radio_button.ts | 6 +- .../js/__internal/ui/resizable/m_resizable.ts | 10 +- .../__internal/ui/scroll_view/m_animator.ts | 2 +- .../m_scroll_view.native.pull_down.ts | 2 +- .../m_scroll_view.native.swipe_down.ts | 4 +- .../ui/scroll_view/m_scroll_view.ts | 2 +- .../ui/scroll_view/m_scrollable.native.ts | 4 +- .../ui/scroll_view/m_scrollable.simulated.ts | 16 +- .../__internal/ui/scroll_view/m_scrollable.ts | 6 +- .../__internal/ui/scroll_view/m_scrollbar.ts | 8 +- .../m_selection.strategy.deferred.ts | 2 +- .../m_selection.strategy.standard.ts | 2 +- .../ui/selection/m_selection.strategy.ts | 2 +- .../js/__internal/ui/slider/m_slider.ts | 18 +- .../__internal/ui/slider/m_slider_tooltip.ts | 2 +- .../m_slider_tooltip_position_controller.ts | 5 +- .../ui/speed_dial_action/m_speed_dial_item.ts | 6 +- .../m_speed_dial_main_item.ts | 2 +- .../__internal/ui/splitter/resize_handle.ts | 12 +- .../js/__internal/ui/splitter/splitter.ts | 2 +- .../js/__internal/ui/splitter/utils/layout.ts | 2 +- .../ui/splitter/utils/layout_default.ts | 2 +- .../ui/splitter/utils/number_comparison.ts | 2 +- .../js/__internal/ui/tabs/m_tabs.ts | 8 +- .../js/__internal/ui/text_box/m_text_box.ts | 2 +- .../ui/text_box/m_text_editor.base.ts | 6 +- .../ui/text_box/m_text_editor.clear.ts | 8 +- .../ui/text_box/m_text_editor.label.ts | 10 +- .../text_box/m_text_editor.mask.strategy.ts | 4 +- .../ui/text_box/m_text_editor.mask.ts | 12 +- .../__internal/ui/text_box/m_utils.scroll.ts | 2 +- .../texteditor_button_collection/m_custom.ts | 6 +- .../js/__internal/ui/toast/m_toast.ts | 4 +- .../__internal/ui/toolbar/m_toolbar.base.ts | 2 +- .../ui/tree_view/m_tree_view.base.ts | 14 +- .../viz/chart_components/m_base_chart.ts | 4 +- .../js/__internal/viz/core/m_base_widget.ts | 2 +- packages/devextreme/js/animation/frame.d.ts | 25 +- packages/devextreme/js/animation/frame.js | 1 + packages/devextreme/js/animation/fx.d.ts | 166 +- packages/devextreme/js/animation/fx.js | 3 + .../devextreme/js/animation/position.d.ts | 125 +- packages/devextreme/js/animation/presets.d.ts | 57 +- packages/devextreme/js/animation/presets.js | 3 + .../js/animation/transition_executor.d.ts | 52 +- .../js/animation/transition_executor.js | 3 + .../devextreme/js/bundles/modules/core.js | 38 +- .../devextreme/js/bundles/modules/data.js | 40 +- .../js/bundles/modules/data.odata.js | 12 +- .../js/bundles/modules/file_management.js | 12 +- .../js/bundles/modules/parts/core.js | 28 +- packages/devextreme/js/common.d.ts | 87 +- packages/devextreme/js/common.js | 3 + .../devextreme/js/common/core/animation.d.ts | 356 ++++ .../devextreme/js/common/core/animation.js | 4 + .../js/common/core/animation/easing.js | 2 +- .../js/common/core/animation/frame.js | 4 +- .../devextreme/js/common/core/animation/fx.js | 20 +- .../js/common/core/animation/position.js | 26 +- .../common/core/animation/presets/presets.js | 10 +- .../core/animation/transition_executor.js | 1 + .../transition_executor.js | 14 +- .../js/common/core/animation/translator.js | 6 +- .../js/common/core/environment.d.ts | 178 ++ .../devextreme/js/common/core/environment.js | 4 + .../js/common/core/environment/devices.js | 2 +- .../core/environment/init_mobile_viewport.js | 1 + .../init_mobile_viewport.js | 18 +- .../core/environment/time_zone_utils.js | 2 +- .../devextreme/js/common/core/events.d.ts | 334 ++++ packages/devextreme/js/common/core/events.js | 7 + .../devextreme/js/common/core/events/click.js | 2 +- .../js/common/core/events/contextmenu.js | 2 +- .../core/events/core/emitter.feedback.js | 2 +- .../js/common/core/events/core/emitter.js | 2 +- .../core/events/core/emitter_registrator.js | 2 +- .../core/events/core/event_registrator.js | 2 +- .../core/event_registrator_callbacks.js | 2 +- .../core/events/core/events_engine.d.ts | 2 +- .../common/core/events/core/events_engine.js | 2 +- .../core/events/core/hook_touch_props.js | 2 +- .../core/events/core/keyboard_processor.js | 2 +- .../js/common/core/events/core/wheel.js | 2 +- .../js/common/core/events/double_click.js | 2 +- .../devextreme/js/common/core/events/drag.js | 2 +- .../core/events/gesture/emitter.gesture.js | 2 +- .../events/gesture/emitter.gesture.scroll.js | 2 +- .../common/core/events/gesture/swipeable.js | 2 +- .../devextreme/js/common/core/events/hold.js | 2 +- .../devextreme/js/common/core/events/hover.js | 2 +- .../js/common/core/events/index.d.ts | 336 +--- .../js/common/core/events/pointer.js | 2 +- .../js/common/core/events/pointer/base.js | 2 +- .../js/common/core/events/pointer/mouse.js | 2 +- .../core/events/pointer/mouse_and_touch.js | 2 +- .../js/common/core/events/pointer/observer.js | 2 +- .../js/common/core/events/pointer/touch.js | 2 +- .../js/common/core/events/remove.js | 2 +- .../devextreme/js/common/core/events/short.js | 2 +- .../devextreme/js/common/core/events/swipe.js | 2 +- .../js/common/core/events/transform.js | 2 +- .../common/core/events/utils/add_namespace.js | 2 +- .../events/utils/event_nodes_disposing.js | 2 +- .../common/core/events/utils/event_target.js | 2 +- .../js/common/core/events/utils/index.js | 2 +- .../common/core/events/visibility_change.js | 2 +- .../js/common/core/localization.d.ts | 132 ++ .../js/common/core/localization/core.js | 2 +- .../js/common/core/localization/currency.js | 2 +- .../js/common/core/localization/date.js | 8 +- .../core/localization/default_date_names.js | 2 +- .../core/localization/globalize/currency.js | 2 +- .../core/localization/globalize/date.js | 4 +- .../core/localization/globalize/number.js | 2 +- .../js/common/core/localization/intl/date.js | 2 +- .../common/core/localization/intl/number.js | 2 +- .../core/localization/ldml/date.parser.js | 4 +- .../common/core/localization/ldml/number.js | 2 +- .../js/common/core/localization/message.js | 8 +- .../js/common/core/localization/number.js | 12 +- .../js/common/core/localization/utils.js | 2 +- packages/devextreme/js/common/data.d.ts | 1652 +++++++++++++++++ packages/devextreme/js/common/data.js | 13 + .../js/common/data/abstract_store.d.ts | 18 +- .../js/common/data/abstract_store.js | 2 +- .../devextreme/js/common/data/array_query.js | 2 +- .../devextreme/js/common/data/array_store.js | 2 +- .../devextreme/js/common/data/array_utils.js | 2 +- .../js/common/data/custom-store.d.ts | 69 - .../devextreme/js/common/data/custom-store.js | 18 - .../devextreme/js/common/data/custom_store.js | 21 +- .../devextreme/js/common/data/data_helper.js | 166 ++ .../devextreme/js/common/data/data_source.js | 1 - .../js/common/data/data_source/data_source.js | 2 +- .../data/data_source/operation_manager.js | 2 +- .../js/common/data/data_source/utils.js | 2 +- .../js/common/data/endpoint_selector.js | 2 +- packages/devextreme/js/common/data/errors.js | 2 +- .../devextreme/js/common/data/local_store.js | 2 +- .../js/common/data/odata/context.js | 2 +- .../js/common/data/odata/query_adapter.js | 2 +- .../common/data/odata/request_dispatcher.js | 2 +- .../devextreme/js/common/data/odata/store.js | 2 +- .../devextreme/js/common/data/odata/utils.js | 2 +- packages/devextreme/js/common/data/query.js | 2 +- .../devextreme/js/common/data/remote_query.js | 2 +- .../devextreme/js/common/data/store_helper.js | 2 +- packages/devextreme/js/common/data/utils.js | 9 +- packages/devextreme/js/common/export.d.ts | 90 +- .../devextreme/js/common/export/excel.d.ts | 8 +- packages/devextreme/js/common/export/excel.js | 4 +- packages/devextreme/js/common/export/pdf.d.ts | 10 +- packages/devextreme/js/common/export/pdf.js | 6 +- .../devextreme/js/common/file_management.d.ts | 442 +++++ .../devextreme/js/common/file_management.js | 6 + .../common/file_management/custom_provider.js | 6 +- .../file_management/file_system_item.js | 2 +- .../common/file_management/object_provider.js | 16 +- .../common/file_management/provider_base.js | 14 +- .../common/file_management/remote_provider.js | 20 +- .../js/common/file_management/utils.js | 2 +- packages/devextreme/js/common/grids.d.ts | 21 +- .../js/common/set_template_engine.js | 1 + packages/devextreme/js/core/config.d.ts | 33 +- packages/devextreme/js/core/config.js | 3 + packages/devextreme/js/core/devices.d.ts | 137 +- packages/devextreme/js/core/devices.js | 3 + .../devextreme/js/core/dom_component.d.ts | 2 +- packages/devextreme/js/core/guid.d.ts | 23 +- packages/devextreme/js/core/guid.js | 3 + packages/devextreme/js/core/options.d.ts | 22 +- .../devextreme/js/core/options/utils.d.ts | 2 +- .../js/core/set_template_engine.d.ts | 9 +- .../devextreme/js/core/set_template_engine.js | 1 + .../js/core/templates/template.d.ts | 14 +- .../devextreme/js/core/utils/deferred.d.ts | 18 +- .../devextreme/js/data/abstract_store.d.ts | 21 + packages/devextreme/js/data/abstract_store.js | 1 + .../devextreme/js/data/apply_changes.d.ts | 10 +- packages/devextreme/js/data/apply_changes.js | 3 + packages/devextreme/js/data/array_store.d.ts | 65 +- packages/devextreme/js/data/array_store.js | 3 + packages/devextreme/js/data/custom_store.d.ts | 161 +- packages/devextreme/js/data/custom_store.js | 3 + packages/devextreme/js/data/data_source.d.ts | 474 +---- packages/devextreme/js/data/data_source.js | 3 + .../devextreme/js/data/endpoint_selector.d.ts | 16 +- .../devextreme/js/data/endpoint_selector.js | 3 + packages/devextreme/js/data/errors.d.ts | 26 +- packages/devextreme/js/data/errors.js | 2 + packages/devextreme/js/data/index.d.ts | 251 +-- packages/devextreme/js/data/load_options.d.ts | 2 +- packages/devextreme/js/data/local_store.d.ts | 69 +- packages/devextreme/js/data/local_store.js | 5 + .../devextreme/js/data/odata/context.d.ts | 120 +- packages/devextreme/js/data/odata/context.js | 3 + packages/devextreme/js/data/odata/store.d.ts | 112 +- packages/devextreme/js/data/odata/store.js | 3 + packages/devextreme/js/data/odata/utils.d.ts | 33 +- packages/devextreme/js/data/odata/utils.js | 1 + packages/devextreme/js/data/query.d.ts | 190 +- packages/devextreme/js/data/query.js | 3 + packages/devextreme/js/data/store.d.ts | 213 +-- packages/devextreme/js/data/utils.d.ts | 13 +- packages/devextreme/js/data/utils.js | 1 + packages/devextreme/js/data_helper.d.ts | 15 +- packages/devextreme/js/data_helper.js | 165 +- packages/devextreme/js/events/index.d.ts | 81 + packages/devextreme/js/events/index.js | 7 + packages/devextreme/js/excel_exporter.d.ts | 46 + packages/devextreme/js/excel_exporter.js | 1 + .../js/exporter/common/export_load_panel.js | 2 +- .../js/exporter/exceljs/export_format.js | 10 +- .../js/exporter/export_load_panel.d.ts | 6 + .../js/exporter/jspdf/autotable/export.js | 6 +- .../js/exporter/jspdf/common/export.js | 2 +- .../exporter/jspdf/common/rows_generator.js | 4 +- .../js/file_management/custom_provider.d.ts | 110 +- .../js/file_management/custom_provider.js | 5 + .../devextreme/js/file_management/error.d.ts | 27 +- .../devextreme/js/file_management/error.js | 3 + .../js/file_management/file_system_item.d.ts | 77 +- .../js/file_management/file_system_item.js | 3 + .../js/file_management/object_provider.d.ts | 51 +- .../js/file_management/object_provider.js | 5 + .../js/file_management/provider_base.d.ts | 137 +- .../js/file_management/provider_base.js | 3 + .../js/file_management/remote_provider.d.ts | 66 +- .../js/file_management/remote_provider.js | 5 + .../js/file_management/upload_info.d.ts | 42 +- packages/devextreme/js/format_helper.d.ts | 2 +- packages/devextreme/js/format_helper.js | 6 +- .../devextreme/js/integration/jquery.d.ts | 2 +- .../js/integration/jquery/easing.js | 2 +- .../js/integration/jquery/events.js | 4 +- .../devextreme/js/integration/jquery/hooks.js | 6 +- .../integration/knockout/event_registrator.js | 6 +- packages/devextreme/js/localization.d.ts | 169 +- packages/devextreme/js/localization.js | 9 + .../js/mobile/hide_top_overlay.d.ts | 9 +- .../devextreme/js/mobile/hide_top_overlay.js | 3 + .../js/mobile/init_mobile_viewport.d.ts | 9 +- .../js/mobile/init_mobile_viewport.js | 3 + packages/devextreme/js/pdf_exporter.d.ts | 34 + packages/devextreme/js/pdf_exporter.js | 4 + packages/devextreme/js/time_zone_utils.d.ts | 38 +- packages/devextreme/js/time_zone_utils.js | 1 + packages/devextreme/js/ui/accordion.d.ts | 4 +- packages/devextreme/js/ui/action_sheet.d.ts | 4 +- packages/devextreme/js/ui/autocomplete.d.ts | 2 +- packages/devextreme/js/ui/box.d.ts | 4 +- packages/devextreme/js/ui/button.d.ts | 2 +- packages/devextreme/js/ui/button_group.d.ts | 2 +- packages/devextreme/js/ui/calendar.d.ts | 2 +- packages/devextreme/js/ui/chat.d.ts | 4 +- packages/devextreme/js/ui/check_box.d.ts | 2 +- .../collection/ui.collection_widget.base.d.ts | 4 +- packages/devextreme/js/ui/color_box.d.ts | 2 +- packages/devextreme/js/ui/context_menu.d.ts | 6 +- .../js/ui/context_menu/ui.menu_base.d.ts | 4 +- packages/devextreme/js/ui/data_grid.d.ts | 5 +- packages/devextreme/js/ui/date_box.d.ts | 2 +- packages/devextreme/js/ui/date_range_box.d.ts | 2 +- .../devextreme/js/ui/defer_rendering.d.ts | 4 +- packages/devextreme/js/ui/diagram.d.ts | 4 +- .../js/ui/diagram/diagram.commands_manager.js | 2 +- .../js/ui/diagram/diagram.items_option.js | 2 +- .../js/ui/diagram/diagram.toolbox_manager.js | 2 +- .../ui/diagram/ui.diagram.dialog_manager.js | 2 +- .../js/ui/diagram/ui.diagram.dialogs.js | 2 +- .../devextreme/js/ui/diagram/ui.diagram.js | 10 +- .../js/ui/diagram/ui.diagram.panel.js | 6 +- .../js/ui/diagram/ui.diagram.toolbox.js | 2 +- packages/devextreme/js/ui/draggable.d.ts | 2 +- packages/devextreme/js/ui/drawer.d.ts | 2 +- packages/devextreme/js/ui/drop_down_box.d.ts | 4 +- .../devextreme/js/ui/drop_down_button.d.ts | 4 +- .../drop_down_editor/ui.drop_down_editor.d.ts | 2 +- .../drop_down_editor/ui.drop_down_list.d.ts | 4 +- packages/devextreme/js/ui/editor/editor.d.ts | 2 +- .../js/ui/editor/ui.data_expression.d.ts | 2 +- packages/devextreme/js/ui/file_manager.d.ts | 4 +- .../ui/file_manager/file_items_controller.js | 23 +- .../ui.file_manager.command_manager.js | 2 +- .../ui.file_manager.dialog.delete_item.js | 2 +- .../ui.file_manager.dialog.folder_chooser.js | 2 +- .../ui/file_manager/ui.file_manager.dialog.js | 2 +- .../ui.file_manager.dialog_manager.js | 2 +- .../file_manager/ui.file_manager.editing.js | 2 +- .../ui.file_manager.item_list.details.js | 2 +- .../file_manager/ui.file_manager.item_list.js | 8 +- .../ui.file_manager.item_list.thumbnails.js | 8 +- ..._manager.items_list.thumbnails.list_box.js | 6 +- .../js/ui/file_manager/ui.file_manager.js | 2 +- .../file_manager/ui.file_manager.messages.js | 4 +- ...ile_manager.notification.progress_panel.js | 2 +- .../file_manager/ui.file_manager.toolbar.js | 2 +- packages/devextreme/js/ui/file_uploader.d.ts | 4 +- packages/devextreme/js/ui/filter_builder.d.ts | 4 +- packages/devextreme/js/ui/form.d.ts | 2 +- packages/devextreme/js/ui/gallery.d.ts | 4 +- packages/devextreme/js/ui/gantt.d.ts | 4 +- .../devextreme/js/ui/gantt/ui.gantt.bars.js | 2 +- .../js/ui/gantt/ui.gantt.data.option.js | 2 +- .../js/ui/gantt/ui.gantt.dialogs.js | 4 +- .../js/ui/gantt/ui.gantt.export_helper.js | 4 +- .../devextreme/js/ui/gantt/ui.gantt.helper.js | 2 +- .../js/ui/gantt/ui.gantt.treelist.js | 3 +- .../devextreme/js/ui/gantt/ui.gantt.view.js | 8 +- packages/devextreme/js/ui/html_editor.d.ts | 4 +- packages/devextreme/js/ui/list.d.ts | 4 +- packages/devextreme/js/ui/load_indicator.d.ts | 2 +- packages/devextreme/js/ui/load_panel.d.ts | 7 +- packages/devextreme/js/ui/lookup.d.ts | 2 +- packages/devextreme/js/ui/map.d.ts | 2 +- packages/devextreme/js/ui/menu.d.ts | 4 +- packages/devextreme/js/ui/multi_view.d.ts | 4 +- packages/devextreme/js/ui/number_box.d.ts | 2 +- packages/devextreme/js/ui/overlay.d.ts | 4 +- packages/devextreme/js/ui/pivot_grid.d.ts | 2 +- .../js/ui/pivot_grid/data_source.d.ts | 5 +- .../js/ui/pivot_grid_field_chooser.d.ts | 2 +- packages/devextreme/js/ui/popover.d.ts | 7 +- packages/devextreme/js/ui/popup.d.ts | 7 +- packages/devextreme/js/ui/progress_bar.d.ts | 2 +- packages/devextreme/js/ui/radio_group.d.ts | 4 +- packages/devextreme/js/ui/range_slider.d.ts | 2 +- .../devextreme/js/ui/recurrence_editor.d.ts | 2 +- packages/devextreme/js/ui/resizable.d.ts | 2 +- packages/devextreme/js/ui/responsive_box.d.ts | 4 +- packages/devextreme/js/ui/scheduler.d.ts | 4 +- packages/devextreme/js/ui/scroll_view.d.ts | 2 +- .../js/ui/scroll_view/ui.scrollable.d.ts | 2 +- packages/devextreme/js/ui/select_box.d.ts | 2 +- .../devextreme/js/ui/shared/accessibility.js | 4 +- .../js/ui/shared/ui.editor_factory_mixin.js | 6 +- packages/devextreme/js/ui/slider.d.ts | 2 +- packages/devextreme/js/ui/sortable.d.ts | 2 +- .../devextreme/js/ui/speed_dial_action.d.ts | 2 +- packages/devextreme/js/ui/splitter.d.ts | 4 +- packages/devextreme/js/ui/splitter_control.js | 6 +- packages/devextreme/js/ui/switch.d.ts | 2 +- packages/devextreme/js/ui/tab_panel.d.ts | 4 +- packages/devextreme/js/ui/tabs.d.ts | 4 +- packages/devextreme/js/ui/tag_box.d.ts | 2 +- packages/devextreme/js/ui/text_area.d.ts | 2 +- packages/devextreme/js/ui/text_box.d.ts | 2 +- .../js/ui/text_box/ui.text_editor.base.d.ts | 2 +- packages/devextreme/js/ui/tile_view.d.ts | 4 +- packages/devextreme/js/ui/toast.d.ts | 7 +- packages/devextreme/js/ui/toolbar.d.ts | 4 +- packages/devextreme/js/ui/tooltip.d.ts | 2 +- packages/devextreme/js/ui/tree_list.d.ts | 4 +- packages/devextreme/js/ui/tree_view.d.ts | 4 +- .../devextreme/js/ui/validation_group.d.ts | 2 +- .../devextreme/js/ui/validation_summary.d.ts | 2 +- packages/devextreme/js/ui/validator.d.ts | 2 +- .../js/ui/widget/ui.search_box_mixin.js | 2 +- .../devextreme/js/ui/widget/ui.widget.d.ts | 2 +- packages/devextreme/js/utils.d.ts | 25 +- packages/devextreme/js/utils.js | 8 +- packages/devextreme/js/viz/bar_gauge.d.ts | 2 +- packages/devextreme/js/viz/bullet.d.ts | 2 +- packages/devextreme/js/viz/chart.d.ts | 2 +- .../js/viz/chart_components/base_chart.d.ts | 4 +- .../js/viz/chart_components/scroll_bar.js | 6 +- .../js/viz/chart_components/shutter_zoom.js | 2 +- .../js/viz/chart_components/tracker.js | 8 +- .../js/viz/chart_components/zoom_and_pan.js | 6 +- .../devextreme/js/viz/circular_gauge.d.ts | 2 +- .../devextreme/js/viz/components/tracker.js | 8 +- .../devextreme/js/viz/core/annotations.js | 8 +- .../devextreme/js/viz/core/base_widget.d.ts | 2 +- .../devextreme/js/viz/core/data_source.js | 2 +- packages/devextreme/js/viz/core/export.js | 6 +- .../js/viz/core/renderers/animation.js | 2 +- .../js/viz/core/renderers/renderer.js | 2 +- packages/devextreme/js/viz/funnel.d.ts | 4 +- .../devextreme/js/viz/gauges/base_gauge.d.ts | 2 +- packages/devextreme/js/viz/gauges/tracker.js | 8 +- packages/devextreme/js/viz/linear_gauge.d.ts | 2 +- packages/devextreme/js/viz/pie_chart.d.ts | 2 +- packages/devextreme/js/viz/polar_chart.d.ts | 2 +- .../devextreme/js/viz/range_selector.d.ts | 4 +- .../js/viz/range_selector/tracker.js | 4 +- packages/devextreme/js/viz/sankey.d.ts | 4 +- packages/devextreme/js/viz/sparkline.d.ts | 4 +- .../js/viz/sparklines/base_sparkline.d.ts | 2 +- .../js/viz/sparklines/base_sparkline.js | 6 +- packages/devextreme/js/viz/tree_map.d.ts | 4 +- packages/devextreme/js/viz/vector_map.d.ts | 4 +- .../devextreme/js/viz/vector_map/map_layer.js | 2 +- .../devextreme/js/viz/vector_map/tracker.js | 6 +- packages/devextreme/project.json | 8 +- pnpm-lock.yaml | 8 +- 656 files changed, 5617 insertions(+), 4935 deletions(-) create mode 100644 packages/devextreme/js/animation/frame.js create mode 100644 packages/devextreme/js/animation/fx.js create mode 100644 packages/devextreme/js/animation/presets.js create mode 100644 packages/devextreme/js/animation/transition_executor.js create mode 100644 packages/devextreme/js/common.js create mode 100644 packages/devextreme/js/common/core/animation.d.ts create mode 100644 packages/devextreme/js/common/core/animation.js create mode 100644 packages/devextreme/js/common/core/environment.d.ts create mode 100644 packages/devextreme/js/common/core/environment.js create mode 100644 packages/devextreme/js/common/core/events.d.ts create mode 100644 packages/devextreme/js/common/core/events.js create mode 100644 packages/devextreme/js/common/core/localization.d.ts create mode 100644 packages/devextreme/js/common/data.d.ts create mode 100644 packages/devextreme/js/common/data.js delete mode 100644 packages/devextreme/js/common/data/custom-store.d.ts delete mode 100644 packages/devextreme/js/common/data/custom-store.js create mode 100644 packages/devextreme/js/common/data/data_helper.js create mode 100644 packages/devextreme/js/common/file_management.d.ts create mode 100644 packages/devextreme/js/common/file_management.js create mode 100644 packages/devextreme/js/core/config.js create mode 100644 packages/devextreme/js/core/devices.js create mode 100644 packages/devextreme/js/core/guid.js create mode 100644 packages/devextreme/js/core/set_template_engine.js create mode 100644 packages/devextreme/js/data/abstract_store.d.ts create mode 100644 packages/devextreme/js/data/abstract_store.js create mode 100644 packages/devextreme/js/data/apply_changes.js create mode 100644 packages/devextreme/js/data/array_store.js create mode 100644 packages/devextreme/js/data/custom_store.js create mode 100644 packages/devextreme/js/data/data_source.js create mode 100644 packages/devextreme/js/data/endpoint_selector.js create mode 100644 packages/devextreme/js/data/errors.js create mode 100644 packages/devextreme/js/data/local_store.js create mode 100644 packages/devextreme/js/data/odata/context.js create mode 100644 packages/devextreme/js/data/odata/store.js create mode 100644 packages/devextreme/js/data/odata/utils.js create mode 100644 packages/devextreme/js/data/query.js create mode 100644 packages/devextreme/js/data/utils.js create mode 100644 packages/devextreme/js/events/index.d.ts create mode 100644 packages/devextreme/js/events/index.js create mode 100644 packages/devextreme/js/excel_exporter.d.ts create mode 100644 packages/devextreme/js/excel_exporter.js create mode 100644 packages/devextreme/js/exporter/export_load_panel.d.ts create mode 100644 packages/devextreme/js/file_management/custom_provider.js create mode 100644 packages/devextreme/js/file_management/error.js create mode 100644 packages/devextreme/js/file_management/file_system_item.js create mode 100644 packages/devextreme/js/file_management/object_provider.js create mode 100644 packages/devextreme/js/file_management/provider_base.js create mode 100644 packages/devextreme/js/file_management/remote_provider.js create mode 100644 packages/devextreme/js/localization.js create mode 100644 packages/devextreme/js/mobile/hide_top_overlay.js create mode 100644 packages/devextreme/js/mobile/init_mobile_viewport.js create mode 100644 packages/devextreme/js/pdf_exporter.d.ts create mode 100644 packages/devextreme/js/pdf_exporter.js create mode 100644 packages/devextreme/js/time_zone_utils.js diff --git a/packages/devextreme-angular/src/common/data/custom-store/index.ts b/packages/devextreme-angular/src/common/data/custom-store/index.ts index b2cfac7968f9..537eb821f043 100644 --- a/packages/devextreme-angular/src/common/data/custom-store/index.ts +++ b/packages/devextreme-angular/src/common/data/custom-store/index.ts @@ -5,4 +5,4 @@ export { isLoadResultObject, LoadResult, LoadResultObject, -} from 'devextreme/common/data/custom-store'; +} from 'devextreme/common/data'; diff --git a/packages/devextreme-react/src/common/data/custom-store.ts b/packages/devextreme-react/src/common/data/custom-store.ts index 8b01da88d434..e374282d5bf5 100644 --- a/packages/devextreme-react/src/common/data/custom-store.ts +++ b/packages/devextreme-react/src/common/data/custom-store.ts @@ -5,4 +5,4 @@ export { isLoadResultObject, LoadResult, LoadResultObject, -} from "devextreme/common/data/custom-store"; +} from "devextreme/common/data"; diff --git a/packages/devextreme-vue/src/common/data/custom-store.ts b/packages/devextreme-vue/src/common/data/custom-store.ts index 8b01da88d434..e374282d5bf5 100644 --- a/packages/devextreme-vue/src/common/data/custom-store.ts +++ b/packages/devextreme-vue/src/common/data/custom-store.ts @@ -5,4 +5,4 @@ export { isLoadResultObject, LoadResult, LoadResultObject, -} from "devextreme/common/data/custom-store"; +} from "devextreme/common/data"; diff --git a/packages/devextreme/.eslintignore b/packages/devextreme/.eslintignore index 70ca1568cdd2..1a2960b65e26 100644 --- a/packages/devextreme/.eslintignore +++ b/packages/devextreme/.eslintignore @@ -11,5 +11,5 @@ themebuilder-scss/src/data/metadata/* js/bundles/dx.custom.js testing/jest/utils/transformers/* ts/ -js/localization/cldr-data/* -js/localization/default_messages.js +js/common/core/localization/cldr-data/* +js/common/core/localization/default_messages.js diff --git a/packages/devextreme/.gitignore b/packages/devextreme/.gitignore index c5b940a2af46..777c69052a83 100644 --- a/packages/devextreme/.gitignore +++ b/packages/devextreme/.gitignore @@ -5,8 +5,8 @@ node_modules /testing/LastSuiteTime.txt /dotnet_packages /js/bundles/dx.custom.js -/js/localization/default_messages.js -/js/localization/cldr-data +/js/common/core/localization/default_messages.js +/js/common/core/localization/cldr-data /js/renovation/**/*.j.tsx /js/renovation/code_coverage /scss/bundles/*.scss diff --git a/packages/devextreme/build/gulp/localization-template.jst b/packages/devextreme/build/gulp/localization-template.jst index 43dffba193b4..a4d509eaba9d 100644 --- a/packages/devextreme/build/gulp/localization-template.jst +++ b/packages/devextreme/build/gulp/localization-template.jst @@ -1,10 +1,10 @@ (function(root, factory) { if(typeof define === 'function' && define.amd) { define(function(require) { - factory(require("devextreme/localization")); + factory(require("devextreme/common/core/localization")); }); } else if(typeof module === "object" && module.exports) { - factory(require("devextreme/localization")); + factory(require("devextreme/common/core/localization")); } else { factory(DevExpress.localization); } diff --git a/packages/devextreme/build/gulp/localization.js b/packages/devextreme/build/gulp/localization.js index e106422732f0..b55f61901c81 100644 --- a/packages/devextreme/build/gulp/localization.js +++ b/packages/devextreme/build/gulp/localization.js @@ -84,7 +84,7 @@ const accountingFormats = function() { }; const RESULT_PATH = path.join(context.RESULT_JS_PATH, 'localization'); -const DICTIONARY_SOURCE_FOLDER = 'js/localization/messages'; +const DICTIONARY_SOURCE_FOLDER = 'js/common/core/localization/messages'; const getLocales = function(directory) { return fs.readdirSync(directory).map(file => { @@ -110,7 +110,7 @@ const getMessages = function(directory, locale) { }; gulp.task('clean-cldr-data', function() { - return del('js/localization/cldr-data/**', { force: true }); + return del('js/common/core/localization/cldr-data/**', { force: true }); }); gulp.task('generate-community-locales', () => { @@ -119,8 +119,8 @@ gulp.task('generate-community-locales', () => { return gulp .src([ - 'js/localization/messages/*.json', - '!js/localization/messages/en.json' + 'js/common/core/localization/messages/*.json', + '!js/common/core/localization/messages/en.json' ]) .pipe(through.obj(function(file, encoding, callback) { const parsedFile = JSON.parse(file.contents.toString(encoding)); @@ -169,38 +169,38 @@ gulp.task('localization-messages', gulp.parallel(getLocales(DICTIONARY_SOURCE_FO gulp.task('localization-generated-sources', gulp.parallel([ { - data: require('../../js/localization/messages/en.json'), + data: require('../../js/common/core/localization/messages/en.json'), filename: 'default_messages.js', exportName: 'defaultMessages', - destination: 'js/localization' + destination: 'js/common/core/localization' }, { data: parentLocales, filename: 'parent_locales.js', - destination: 'js/localization/cldr-data' + destination: 'js/common/core/localization/cldr-data' }, { data: firstDayOfWeekData(), filename: 'first_day_of_week_data.js', - destination: 'js/localization/cldr-data' + destination: 'js/common/core/localization/cldr-data' }, { data: accountingFormats(), filename: 'accounting_formats.js', - destination: 'js/localization/cldr-data' + destination: 'js/common/core/localization/cldr-data' }, { data: globalizeEnCldr, exportName: 'enCldr', filename: 'en.js', - destination: 'js/localization/cldr-data' + destination: 'js/common/core/localization/cldr-data' }, { data: globalizeSupplementalCldr, exportName: 'supplementalCldr', filename: 'supplemental.js', - destination: 'js/localization/cldr-data' + destination: 'js/common/core/localization/cldr-data' } ].map((source) => Object.assign( function() { diff --git a/packages/devextreme/js/__internal/core/m_element_data.ts b/packages/devextreme/js/__internal/core/m_element_data.ts index 8af4d1935a13..11b9557bf56a 100644 --- a/packages/devextreme/js/__internal/core/m_element_data.ts +++ b/packages/devextreme/js/__internal/core/m_element_data.ts @@ -1,7 +1,7 @@ /* eslint-disable object-shorthand */ +import eventsEngine from '@js/common/core/events/core/events_engine'; import domAdapter from '@js/core/dom_adapter'; import MemorizedCallbacks from '@js/core/memorized_callbacks'; -import eventsEngine from '@js/events/core/events_engine'; const dataMap = new WeakMap(); let strategy; diff --git a/packages/devextreme/js/__internal/core/r1/component_wrapper.ts b/packages/devextreme/js/__internal/core/r1/component_wrapper.ts index a11bbebfb715..95f558df6ac3 100644 --- a/packages/devextreme/js/__internal/core/r1/component_wrapper.ts +++ b/packages/devextreme/js/__internal/core/r1/component_wrapper.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable class-methods-use-this */ -import '@js/events/click'; -import '@js/events/core/emitter.feedback'; -import '@js/events/hover'; +import '@js/common/core/events/click'; +import '@js/common/core/events/core/emitter.feedback'; +import '@js/common/core/events/hover'; import domAdapter from '@js/core/dom_adapter'; import DOMComponent from '@js/core/dom_component'; @@ -21,8 +21,8 @@ import { createRef, } from 'inferno'; +import KeyboardProcessor from '../../../common/core/events/core/keyboard_processor'; import renderer from '../../../core/inferno_renderer'; -import KeyboardProcessor from '../../../events/core/keyboard_processor'; import type { TemplateModel } from './template_wrapper'; import { buildTemplateArgs, TemplateWrapper } from './template_wrapper'; import type { Option, TemplateComponent } from './types'; diff --git a/packages/devextreme/js/__internal/core/r1/utils/resolve_rtl.ts b/packages/devextreme/js/__internal/core/r1/utils/resolve_rtl.ts index 246e558ae571..7c0700be9562 100644 --- a/packages/devextreme/js/__internal/core/r1/utils/resolve_rtl.ts +++ b/packages/devextreme/js/__internal/core/r1/utils/resolve_rtl.ts @@ -1,4 +1,4 @@ -import globalConfig from '../../../../core/config'; +import { config as globalConfig } from '../../../../common'; import { isDefined } from '../../../../core/utils/type'; import type { ConfigContextValue } from '../config_context'; diff --git a/packages/devextreme/js/__internal/core/r1/utils/subscribe_to_event.ts b/packages/devextreme/js/__internal/core/r1/utils/subscribe_to_event.ts index 677c90d89209..7dfc1d9c63b2 100644 --- a/packages/devextreme/js/__internal/core/r1/utils/subscribe_to_event.ts +++ b/packages/devextreme/js/__internal/core/r1/utils/subscribe_to_event.ts @@ -1,8 +1,8 @@ -import * as clickEvent from '../../../../events/click'; -import eventsEngine from '../../../../events/core/events_engine'; -import scrollEvents from '../../../../events/gesture/emitter.gesture.scroll'; -import pointerEvents from '../../../../events/pointer'; -import { addNamespace } from '../../../../events/utils/index'; +import * as clickEvent from '../../../../common/core/events/click'; +import eventsEngine from '../../../../common/core/events/core/events_engine'; +import scrollEvents from '../../../../common/core/events/gesture/emitter.gesture.scroll'; +import pointerEvents from '../../../../common/core/events/pointer'; +import { addNamespace } from '../../../../common/core/events/utils/index'; import type { EffectReturn } from './effect_return'; export function subscribeToEvent(eventName: string) { diff --git a/packages/devextreme/js/__internal/core/r1/widget.tsx b/packages/devextreme/js/__internal/core/r1/widget.tsx index 52b1cf9d11d0..526403080bd6 100644 --- a/packages/devextreme/js/__internal/core/r1/widget.tsx +++ b/packages/devextreme/js/__internal/core/r1/widget.tsx @@ -2,22 +2,22 @@ /* eslint-disable spellcheck/spell-checker */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import '@js/events/click'; -import '@js/events/hover'; +import '@js/common/core/events/click'; +import '@js/common/core/events/hover'; import { createReRenderEffect, InfernoEffect, InfernoWrapperComponent, } from '@devextreme/runtime/inferno'; import type { RefObject } from '@devextreme-generator/declarations'; +import { + dxClick, focus, keyboard, resize, visibility, +} from '@js/common/core/events/short'; import domAdapter from '@js/core/dom_adapter'; import errors from '@js/core/errors'; import { extend } from '@js/core/utils/extend'; import resizeCallbacks from '@js/core/utils/resize_callbacks'; import { normalizeStyleProp } from '@js/core/utils/style'; import { isFunction } from '@js/core/utils/type'; -import { - dxClick, focus, keyboard, resize, visibility, -} from '@js/events/short'; import type { ConfigContextValue } from '@ts/core/r1/config_context'; import { ConfigContext } from '@ts/core/r1/config_context'; import { ConfigProvider } from '@ts/core/r1/config_provider'; diff --git a/packages/devextreme/js/__internal/core/templates/m_bindable_template.ts b/packages/devextreme/js/__internal/core/templates/m_bindable_template.ts index b3239ee92178..5c47e96de8bd 100644 --- a/packages/devextreme/js/__internal/core/templates/m_bindable_template.ts +++ b/packages/devextreme/js/__internal/core/templates/m_bindable_template.ts @@ -1,8 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; import $ from '@js/core/renderer'; import { TemplateBase } from '@js/core/templates/template_base'; import { isPrimitive } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; const watchChanges = (function () { const globalWatch = (data, watchMethod, callback) => watchMethod(() => data, callback); diff --git a/packages/devextreme/js/__internal/core/templates/m_template_base.ts b/packages/devextreme/js/__internal/core/templates/m_template_base.ts index e3f84627b56e..31170824a5c2 100644 --- a/packages/devextreme/js/__internal/core/templates/m_template_base.ts +++ b/packages/devextreme/js/__internal/core/templates/m_template_base.ts @@ -1,9 +1,9 @@ +import { triggerShownEvent } from '@js/common/core/events/visibility_change'; import domAdapter from '@js/core/dom_adapter'; import errors from '@js/core/errors'; import $ from '@js/core/renderer'; import Callbacks from '@js/core/utils/callbacks'; import { contains } from '@js/core/utils/dom'; -import { triggerShownEvent } from '@js/events/visibility_change'; export const renderedCallbacks = Callbacks({ syncStrategy: true }); diff --git a/packages/devextreme/js/__internal/core/utils/m_date_serialization.ts b/packages/devextreme/js/__internal/core/utils/m_date_serialization.ts index 09ffd2877370..5b38c0af6aa1 100644 --- a/packages/devextreme/js/__internal/core/utils/m_date_serialization.ts +++ b/packages/devextreme/js/__internal/core/utils/m_date_serialization.ts @@ -1,7 +1,7 @@ +import defaultDateNames from '@js/common/core/localization/default_date_names'; +import { getFormatter as getLDMLFormatter } from '@js/common/core/localization/ldml/date.formatter'; import config from '@js/core/config'; import { isDate, isNumeric as isNumber, isString } from '@js/core/utils/type'; -import defaultDateNames from '@js/localization/default_date_names'; -import { getFormatter as getLDMLFormatter } from '@js/localization/ldml/date.formatter'; const NUMBER_SERIALIZATION_FORMAT = 'number'; const DATE_SERIALIZATION_FORMAT = 'yyyy/MM/dd'; diff --git a/packages/devextreme/js/__internal/core/utils/m_public_component.ts b/packages/devextreme/js/__internal/core/utils/m_public_component.ts index be3be2f12cd1..3501b55626e0 100644 --- a/packages/devextreme/js/__internal/core/utils/m_public_component.ts +++ b/packages/devextreme/js/__internal/core/utils/m_public_component.ts @@ -1,7 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; import { data as elementData } from '@js/core/element_data'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; const COMPONENT_NAMES_DATA_KEY = 'dxComponents'; const ANONYMOUS_COMPONENT_DATA_KEY = 'dxPrivateComponent'; diff --git a/packages/devextreme/js/__internal/core/widget/dom_component.ts b/packages/devextreme/js/__internal/core/widget/dom_component.ts index 2f178dd41f63..16b821f280cf 100644 --- a/packages/devextreme/js/__internal/core/widget/dom_component.ts +++ b/packages/devextreme/js/__internal/core/widget/dom_component.ts @@ -1,3 +1,4 @@ +import { resize as resizeEvent, visibility as visibilityEvents } from '@js/common/core/events/short'; import config from '@js/core/config'; import type { DOMComponentOptions } from '@js/core/dom_component'; import { getPublicElement } from '@js/core/element'; @@ -14,7 +15,6 @@ import windowResizeCallbacks from '@js/core/utils/resize_callbacks'; import { addShadowDomStyles } from '@js/core/utils/shadow_dom'; import { isDefined, isFunction, isString } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { resize as resizeEvent, visibility as visibilityEvents } from '@js/events/short'; import license, { peekValidationPerformed } from '@ts/core/license/license_validation'; import TemplateManagerModule from '@ts/core/m_template_manager'; diff --git a/packages/devextreme/js/__internal/core/widget/widget.ts b/packages/devextreme/js/__internal/core/widget/widget.ts index 7bc01ab41ff0..10fed27edd87 100644 --- a/packages/devextreme/js/__internal/core/widget/widget.ts +++ b/packages/devextreme/js/__internal/core/widget/widget.ts @@ -1,7 +1,10 @@ -import '@js/events/click'; -import '@js/events/core/emitter.feedback'; -import '@js/events/hover'; +import '@js/common/core/events/click'; +import '@js/common/core/events/core/emitter.feedback'; +import '@js/common/core/events/hover'; +import { + active, focus, hover, keyboard, +} from '@js/common/core/events/short'; import Action from '@js/core/action'; import devices from '@js/core/devices'; import type { DefaultOptionsRule } from '@js/core/options/utils'; @@ -13,9 +16,6 @@ import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isPlainObject } from '@js/core/utils/type'; import { compare as compareVersions } from '@js/core/utils/version'; -import { - active, focus, hover, keyboard, -} from '@js/events/short'; import { focusable as focusableSelector } from '@js/ui/widget/selectors'; import type { WidgetOptions } from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/data/data_source/m_data_source.ts b/packages/devextreme/js/__internal/data/data_source/m_data_source.ts index be4f4ea3fd45..be9ab21092f0 100644 --- a/packages/devextreme/js/__internal/data/data_source/m_data_source.ts +++ b/packages/devextreme/js/__internal/data/data_source/m_data_source.ts @@ -1,3 +1,16 @@ +import { CustomStore } from '@js/common/data'; +import { applyBatch } from '@js/common/data/array_utils'; +import OperationManager from '@js/common/data/data_source/operation_manager'; +import { + CANCELED_TOKEN, + isPending, + mapDataRespectingGrouping, + normalizeDataSourceOptions, + normalizeLoadResult, + normalizeStoreLoadOptionAccessorArguments, +} from '@js/common/data/data_source/utils'; +import { errors } from '@js/common/data/errors'; +import { throttleChanges } from '@js/common/data/utils'; import Class from '@js/core/class'; import { EventsStrategy } from '@js/core/events_strategy'; import { Deferred, when } from '@js/core/utils/deferred'; @@ -7,21 +20,6 @@ import { create } from '@js/core/utils/queue'; import { isBoolean, isDefined, isEmptyObject, isNumeric, isObject, isString, } from '@js/core/utils/type'; -import { applyBatch } from '@js/data/array_utils'; -import CustomStore from '@js/data/custom_store'; -import OperationManager from '@js/data/data_source/operation_manager'; -import { - CANCELED_TOKEN, - isPending, - mapDataRespectingGrouping, - normalizeDataSourceOptions, - normalizeLoadResult, - normalizeStoreLoadOptionAccessorArguments, -} from '@js/data/data_source/utils'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -// @ts-expect-error -import { throttleChanges } from '@js/data/utils'; import commonUtils from '@ts/core/utils/m_common'; export const DataSource = Class.inherit({ @@ -354,7 +352,7 @@ export const DataSource = Class.inherit({ const handleDone = (data) => { const isEmptyArray = Array.isArray(data) && !data.length; if (!isDefined(data) || isEmptyArray) { - d.reject(new errors.Error('E4009')); + d.reject(errors.Error('E4009')); } else { if (!Array.isArray(data)) { data = [data]; diff --git a/packages/devextreme/js/__internal/data/data_source/m_operation_manager.ts b/packages/devextreme/js/__internal/data/data_source/m_operation_manager.ts index 2723d076cd8a..cfde35fffb6f 100644 --- a/packages/devextreme/js/__internal/data/data_source/m_operation_manager.ts +++ b/packages/devextreme/js/__internal/data/data_source/m_operation_manager.ts @@ -1,4 +1,4 @@ -import { CANCELED_TOKEN } from '@js/data/data_source/utils'; +import { CANCELED_TOKEN } from '@js/common/data/data_source/utils'; export default class OperationManager { constructor() { diff --git a/packages/devextreme/js/__internal/data/data_source/m_utils.ts b/packages/devextreme/js/__internal/data/data_source/m_utils.ts index dabe7a87573a..c870ac67ad42 100644 --- a/packages/devextreme/js/__internal/data/data_source/m_utils.ts +++ b/packages/devextreme/js/__internal/data/data_source/m_utils.ts @@ -1,12 +1,10 @@ +import { ArrayStore, CustomStore } from '@js/common/data'; +import Store from '@js/common/data/abstract_store'; +import { normalizeSortingInfo } from '@js/common/data/utils'; import ajaxUtils from '@js/core/utils/ajax'; import { extend } from '@js/core/utils/extend'; import { each, map } from '@js/core/utils/iterator'; import { isPlainObject } from '@js/core/utils/type'; -import Store from '@js/data/abstract_store'; -import ArrayStore from '@js/data/array_store'; -import CustomStore from '@js/data/custom_store'; -// @ts-expect-error -import { normalizeSortingInfo } from '@js/data/utils'; export const CANCELED_TOKEN = 'canceled'; diff --git a/packages/devextreme/js/__internal/data/m_abstract_store.ts b/packages/devextreme/js/__internal/data/m_abstract_store.ts index 9e2a8b6fb1a6..ac3fa00acaed 100644 --- a/packages/devextreme/js/__internal/data/m_abstract_store.ts +++ b/packages/devextreme/js/__internal/data/m_abstract_store.ts @@ -1,3 +1,6 @@ +import { errors, handleError } from '@js/common/data/errors'; +import storeHelper from '@js/common/data/store_helper'; +import { processRequestResultLock } from '@js/common/data/utils'; import Class from '@js/core/class'; import { EventsStrategy } from '@js/core/events_strategy'; import { noop } from '@js/core/utils/common'; @@ -5,11 +8,6 @@ import { compileGetter } from '@js/core/utils/data'; import { Deferred, when } from '@js/core/utils/deferred'; import { each } from '@js/core/utils/iterator'; import { isEmptyObject } from '@js/core/utils/type'; -// @ts-expect-error -import { errors, handleError } from '@js/data/errors'; -import storeHelper from '@js/data/store_helper'; -// @ts-expect-error -import { processRequestResultLock } from '@js/data/utils'; const { abstract } = Class; const { queryByOptions } = storeHelper; diff --git a/packages/devextreme/js/__internal/data/m_array_query.ts b/packages/devextreme/js/__internal/data/m_array_query.ts index 6c02d4285a66..6bc800f398dc 100644 --- a/packages/devextreme/js/__internal/data/m_array_query.ts +++ b/packages/devextreme/js/__internal/data/m_array_query.ts @@ -1,24 +1,17 @@ -import Class from '@js/core/class'; -import { compileGetter, toComparable } from '@js/core/utils/data'; -import { Deferred } from '@js/core/utils/deferred'; -import { each, map } from '@js/core/utils/iterator'; -import { isDefined, isFunction, isString } from '@js/core/utils/type'; -// @ts-expect-error -import { errors, handleError as handleDataError } from '@js/data/errors'; +import { errors, handleError as handleDataError } from '@js/common/data/errors'; import { - // @ts-expect-error aggregators, - // @ts-expect-error isConjunctiveOperator as isConjunctiveOperatorChecker, - // @ts-expect-error isGroupCriterion, - // @ts-expect-error isUnaryOperation, - // @ts-expect-error isUniformEqualsByOr, - // @ts-expect-error normalizeBinaryCriterion, -} from '@js/data/utils'; +} from '@js/common/data/utils'; +import Class from '@js/core/class'; +import { compileGetter, toComparable } from '@js/core/utils/data'; +import { Deferred } from '@js/core/utils/deferred'; +import { each, map } from '@js/core/utils/iterator'; +import { isDefined, isFunction, isString } from '@js/core/utils/type'; const Iterator = Class.inherit({ @@ -281,7 +274,7 @@ const compileCriteria = (function () { each(crit, function () { if (Array.isArray(this) || isFunction(this)) { if (ops.length > 1 && isConjunctiveOperator !== isConjunctiveNextOperator) { - throw new errors.Error('E4019'); + throw errors.Error('E4019'); } // @ts-expect-error ops.push(compileCriteria(this, langParams)); diff --git a/packages/devextreme/js/__internal/data/m_array_store.ts b/packages/devextreme/js/__internal/data/m_array_store.ts index 2fc03b31d615..1033bed83641 100644 --- a/packages/devextreme/js/__internal/data/m_array_store.ts +++ b/packages/devextreme/js/__internal/data/m_array_store.ts @@ -1,12 +1,10 @@ -import Store from '@js/data/abstract_store'; +import { query as Query } from '@js/common/data'; +import Store from '@js/common/data/abstract_store'; import { applyBatch, indexByKey, insert, remove, update, -} from '@js/data/array_utils'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -import Query from '@js/data/query'; -// @ts-expect-error -import { rejectedPromise, trivialPromise } from '@js/data/utils'; +} from '@js/common/data/array_utils'; +import { errors } from '@js/common/data/errors'; +import { rejectedPromise, trivialPromise } from '@js/common/data/utils'; // @ts-expect-error const ArrayStore = Store.inherit({ @@ -37,9 +35,11 @@ const ArrayStore = Store.inherit({ const index = indexByKey(this, this._array, key); if (index === -1) { + // @ts-expect-error return rejectedPromise(errors.Error('E4009')); } + // @ts-expect-error return trivialPromise(this._array[index]); }, diff --git a/packages/devextreme/js/__internal/data/m_array_utils.ts b/packages/devextreme/js/__internal/data/m_array_utils.ts index 818eb0ee1ff8..4922dc77ef28 100644 --- a/packages/devextreme/js/__internal/data/m_array_utils.ts +++ b/packages/devextreme/js/__internal/data/m_array_utils.ts @@ -1,3 +1,5 @@ +import { errors } from '@js/common/data/errors'; +import { keysEqual, rejectedPromise, trivialPromise } from '@js/common/data/utils'; import config from '@js/core/config'; import Guid from '@js/core/guid'; import { compileGetter } from '@js/core/utils/data'; @@ -6,10 +8,6 @@ import { deepExtendArraySafe } from '@js/core/utils/object'; import { isDefined, isEmptyObject, isObject, isPlainObject, } from '@js/core/utils/type'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -// @ts-expect-error -import { keysEqual, rejectedPromise, trivialPromise } from '@js/data/utils'; function hasKey(target, keyOrKeys) { let key; @@ -143,6 +141,7 @@ function applyBatch({ } function getErrorResult(isBatch, logError, errorCode) { + // @ts-expect-error return !isBatch ? rejectedPromise(errors.Error(errorCode)) : logError && errors.log(errorCode); } @@ -188,6 +187,7 @@ function update(keyInfo, array, key, data, isBatch, immutable, logError) { if (immutable === true && isDefined(target)) { const newTarget = createObjectWithChanges(target, data); array[index] = newTarget; + // @ts-expect-error return !isBatch && trivialPromise(newTarget, key); } } @@ -198,8 +198,10 @@ function update(keyInfo, array, key, data, isBatch, immutable, logError) { deepExtendArraySafe(target, data, extendComplexObject, false, true, true); if (!isBatch) { if (config().useLegacyStoreResult) { + // @ts-expect-error return trivialPromise(key, data); } + // @ts-expect-error return trivialPromise(target, key); } } @@ -232,6 +234,7 @@ function insert(keyInfo, array, data, index, isBatch, logError, skipCopying) { setDataByKeyMapValue(array, keyValue, obj); if (!isBatch) { + // @ts-expect-error return trivialPromise(config().useLegacyStoreResult ? data : obj, keyValue); } } @@ -243,6 +246,7 @@ function remove(keyInfo, array, key, isBatch, logError) { setDataByKeyMapValue(array, key, null); } if (!isBatch) { + // @ts-expect-error return trivialPromise(key); } if (index < 0) { return getErrorResult(isBatch, logError, 'E4009'); diff --git a/packages/devextreme/js/__internal/data/m_custom_store.ts b/packages/devextreme/js/__internal/data/m_custom_store.ts index c36840d51bad..0d00a5eb84e4 100644 --- a/packages/devextreme/js/__internal/data/m_custom_store.ts +++ b/packages/devextreme/js/__internal/data/m_custom_store.ts @@ -1,22 +1,18 @@ +import Store from '@js/common/data/abstract_store'; +import arrayQuery from '@js/common/data/array_query'; +import { applyBatch } from '@js/common/data/array_utils'; +import { errors } from '@js/common/data/errors'; +import storeHelper from '@js/common/data/store_helper'; +import { + errorMessageFromXhr as errorMessageFromXhrUtility, + keysEqual, + XHR_ERROR_UNLOAD, +} from '@js/common/data/utils'; import config from '@js/core/config'; import $ from '@js/core/renderer'; // @ts-expect-error import { Deferred, fromPromise, when } from '@js/core/utils/deferred'; import { isFunction } from '@js/core/utils/type'; -import Store from '@js/data/abstract_store'; -import arrayQuery from '@js/data/array_query'; -import { applyBatch } from '@js/data/array_utils'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -import storeHelper from '@js/data/store_helper'; -import { - // @ts-expect-error - errorMessageFromXhr as errorMessageFromXhrUtility, - // @ts-expect-error - keysEqual, - // @ts-expect-error - XHR_ERROR_UNLOAD, -} from '@js/data/utils'; const TOTAL_COUNT = 'totalCount'; const LOAD = 'load'; diff --git a/packages/devextreme/js/__internal/data/m_local_store.ts b/packages/devextreme/js/__internal/data/m_local_store.ts index 118cea0ecf27..88f176493373 100644 --- a/packages/devextreme/js/__internal/data/m_local_store.ts +++ b/packages/devextreme/js/__internal/data/m_local_store.ts @@ -1,10 +1,9 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { ArrayStore } from '@js/common/data'; +import { errors } from '@js/common/data/errors'; import Class from '@js/core/class'; import domAdapter from '@js/core/dom_adapter'; import { getWindow } from '@js/core/utils/window'; -import ArrayStore from '@js/data/array_store'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -import eventsEngine from '@js/events/core/events_engine'; const window = getWindow(); const { abstract } = Class; diff --git a/packages/devextreme/js/__internal/data/m_query.ts b/packages/devextreme/js/__internal/data/m_query.ts index e308e41f081f..c35f346ae08c 100644 --- a/packages/devextreme/js/__internal/data/m_query.ts +++ b/packages/devextreme/js/__internal/data/m_query.ts @@ -1,4 +1,4 @@ -import { queryImpl } from '@js/data/query_implementation'; +import { queryImpl } from '@js/common/data/query_implementation'; const query = function () { const impl = Array.isArray(arguments[0]) ? 'array' : 'remote'; diff --git a/packages/devextreme/js/__internal/data/m_remote_query.ts b/packages/devextreme/js/__internal/data/m_remote_query.ts index 46b9ad0a6309..53fb79c54c50 100644 --- a/packages/devextreme/js/__internal/data/m_remote_query.ts +++ b/packages/devextreme/js/__internal/data/m_remote_query.ts @@ -1,11 +1,10 @@ /* eslint-disable @typescript-eslint/naming-convention */ +import arrayQueryImpl from '@js/common/data/array_query'; +import { errors, handleError } from '@js/common/data/errors'; +import queryAdapters from '@js/common/data/query_adapters'; import { Deferred } from '@js/core/utils/deferred'; import { each } from '@js/core/utils/iterator'; import { isFunction } from '@js/core/utils/type'; -import arrayQueryImpl from '@js/data/array_query'; -// @ts-expect-error -import { errors, handleError } from '@js/data/errors'; -import queryAdapters from '@js/data/query_adapters'; const remoteQueryImpl = function (url, queryOptions, tasks) { tasks = tasks || []; diff --git a/packages/devextreme/js/__internal/data/m_store_helper.ts b/packages/devextreme/js/__internal/data/m_store_helper.ts index 532127da73ae..fda349998c10 100644 --- a/packages/devextreme/js/__internal/data/m_store_helper.ts +++ b/packages/devextreme/js/__internal/data/m_store_helper.ts @@ -1,10 +1,9 @@ +import arrayQuery from '@js/common/data/array_query'; +import { normalizeSortingInfo } from '@js/common/data/utils'; // @ts-expect-error import { grep } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; -import arrayQuery from '@js/data/array_query'; -// @ts-expect-error -import { normalizeSortingInfo } from '@js/data/utils'; function multiLevelGroup(query, groupInfo) { query = query.groupBy(groupInfo[0].selector); diff --git a/packages/devextreme/js/__internal/data/odata/m_context.ts b/packages/devextreme/js/__internal/data/odata/m_context.ts index 0da972b6b409..5e46acd82570 100644 --- a/packages/devextreme/js/__internal/data/odata/m_context.ts +++ b/packages/devextreme/js/__internal/data/odata/m_context.ts @@ -1,12 +1,12 @@ -import '@js/data/odata/query_adapter'; +import '@js/common/data/odata/query_adapter'; +import { ODataStore } from '@js/common/data'; +import RequestDispatcher from '@js/common/data/odata/request_dispatcher'; import Class from '@js/core/class'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isPlainObject } from '@js/core/utils/type'; -import RequestDispatcher from '@js/data/odata/request_dispatcher'; -import ODataStore from '@js/data/odata/store'; import { errors, handleError } from '../m_errors'; import { escapeServiceOperationParams, formatFunctionInvocationUrl } from './m_utils'; diff --git a/packages/devextreme/js/__internal/data/odata/m_query_adapter.ts b/packages/devextreme/js/__internal/data/odata/m_query_adapter.ts index 95a3eb1e1fbd..8e06ae78e816 100644 --- a/packages/devextreme/js/__internal/data/odata/m_query_adapter.ts +++ b/packages/devextreme/js/__internal/data/odata/m_query_adapter.ts @@ -1,8 +1,8 @@ +import queryAdapters from '@js/common/data/query_adapters'; import config from '@js/core/config'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isFunction } from '@js/core/utils/type'; -import queryAdapters from '@js/data/query_adapters'; import { errors } from '../m_errors'; import { diff --git a/packages/devextreme/js/__internal/data/odata/m_request_dispatcher.ts b/packages/devextreme/js/__internal/data/odata/m_request_dispatcher.ts index 616638cac8bf..c1dbe9f8ca6b 100644 --- a/packages/devextreme/js/__internal/data/odata/m_request_dispatcher.ts +++ b/packages/devextreme/js/__internal/data/odata/m_request_dispatcher.ts @@ -1,7 +1,6 @@ -import '@js/data/odata/query_adapter'; +import '@js/common/data/odata/query_adapter'; -// @ts-expect-error -import { sendRequest } from '@js/data/odata/utils'; +import { sendRequest } from '@js/common/data/odata/utils'; const DEFAULT_PROTOCOL_VERSION = 4; diff --git a/packages/devextreme/js/__internal/data/odata/m_store.ts b/packages/devextreme/js/__internal/data/odata/m_store.ts index 0442335481a6..49c2982e4528 100644 --- a/packages/devextreme/js/__internal/data/odata/m_store.ts +++ b/packages/devextreme/js/__internal/data/odata/m_store.ts @@ -1,13 +1,12 @@ -import '@js/data/odata/query_adapter'; +import '@js/common/data/odata/query_adapter'; +import { query } from '@js/common/data'; +import Store from '@js/common/data/abstract_store'; +import { errors } from '@js/common/data/errors'; +import RequestDispatcher from '@js/common/data/odata/request_dispatcher'; import config from '@js/core/config'; import { Deferred, when } from '@js/core/utils/deferred'; import { isDefined } from '@js/core/utils/type'; -import Store from '@js/data/abstract_store'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -import RequestDispatcher from '@js/data/odata/request_dispatcher'; -import query from '@js/data/query'; import { convertPrimitiveValue, diff --git a/packages/devextreme/js/__internal/data/odata/m_utils.ts b/packages/devextreme/js/__internal/data/odata/m_utils.ts index fcbbd5117c4d..cf043c0de3c9 100644 --- a/packages/devextreme/js/__internal/data/odata/m_utils.ts +++ b/packages/devextreme/js/__internal/data/odata/m_utils.ts @@ -1,3 +1,5 @@ +import { errors } from '@js/common/data/errors'; +import { errorMessageFromXhr, XHR_ERROR_UNLOAD } from '@js/common/data/utils'; import Class from '@js/core/class'; import Guid from '@js/core/guid'; import ajax from '@js/core/utils/ajax'; @@ -10,10 +12,6 @@ import { format as stringFormat } from '@js/core/utils/string'; import { isDefined, isObject, isPlainObject, type, } from '@js/core/utils/type'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -// @ts-expect-error -import { errorMessageFromXhr, XHR_ERROR_UNLOAD } from '@js/data/utils'; const GUID_REGEX = /^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$/; @@ -237,7 +235,7 @@ export const sendRequest = (protocolVersion, request, options) => { if (isFinite(count)) { d.resolve(count); } else { - d.reject(new errors.Error('E4018')); + d.reject(errors.Error('E4018')); } } else if (nextUrl && !isPaged) { if (!isAbsoluteUrl(nextUrl)) { diff --git a/packages/devextreme/js/__internal/data_controller.ts b/packages/devextreme/js/__internal/data_controller.ts index 45aaa57acaf9..27d3cc1cd485 100644 --- a/packages/devextreme/js/__internal/data_controller.ts +++ b/packages/devextreme/js/__internal/data_controller.ts @@ -1,10 +1,10 @@ import { Deferred } from '@js/core/utils/deferred'; +import { ArrayStore } from '../common/data'; +import { DataSource } from '../common/data/data_source/data_source'; +import { normalizeDataSourceOptions } from '../common/data/data_source/utils'; import { extend } from '../core/utils/extend'; import { isDefined } from '../core/utils/type'; -import ArrayStore from '../data/array_store'; -import { DataSource } from '../data/data_source/data_source'; -import { normalizeDataSourceOptions } from '../data/data_source/utils'; interface DataSourceType { _userData: unknown; diff --git a/packages/devextreme/js/__internal/events/core/m_emitter.feedback.ts b/packages/devextreme/js/__internal/events/core/m_emitter.feedback.ts index 1649da5afd88..cd2ced59a6df 100644 --- a/packages/devextreme/js/__internal/events/core/m_emitter.feedback.ts +++ b/packages/devextreme/js/__internal/events/core/m_emitter.feedback.ts @@ -1,10 +1,10 @@ +import Emitter from '@js/common/core/events/core/emitter'; +import registerEmitter from '@js/common/core/events/core/emitter_registrator'; +import pointerEvents from '@js/common/core/events/pointer'; +import { isMouseEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import { ensureDefined, noop } from '@js/core/utils/common'; import { contains } from '@js/core/utils/dom'; -import Emitter from '@js/events/core/emitter'; -import registerEmitter from '@js/events/core/emitter_registrator'; -import pointerEvents from '@js/events/pointer'; -import { isMouseEvent } from '@js/events/utils/index'; import devices from '@ts/core/m_devices'; const ACTIVE_EVENT_NAME = 'dxactive'; diff --git a/packages/devextreme/js/__internal/events/core/m_emitter.ts b/packages/devextreme/js/__internal/events/core/m_emitter.ts index 65d31a3b7aa6..fd09b7c43782 100644 --- a/packages/devextreme/js/__internal/events/core/m_emitter.ts +++ b/packages/devextreme/js/__internal/events/core/m_emitter.ts @@ -1,9 +1,9 @@ +import { fireEvent, hasTouches, isDxMouseWheelEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import $ from '@js/core/renderer'; import Callbacks from '@js/core/utils/callbacks'; import { noop } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; -import { fireEvent, hasTouches, isDxMouseWheelEvent } from '@js/events/utils/index'; const Emitter = Class.inherit({ diff --git a/packages/devextreme/js/__internal/events/core/m_emitter_registrator.ts b/packages/devextreme/js/__internal/events/core/m_emitter_registrator.ts index 48d06a7f38bd..801b84dddb0c 100644 --- a/packages/devextreme/js/__internal/events/core/m_emitter_registrator.ts +++ b/packages/devextreme/js/__internal/events/core/m_emitter_registrator.ts @@ -1,3 +1,8 @@ +import registerEvent from '@js/common/core/events/core/event_registrator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as wheelEventName } from '@js/common/core/events/core/wheel'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, isMouseEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import domAdapter from '@js/core/dom_adapter'; import { data as elementData } from '@js/core/element_data'; @@ -5,11 +10,6 @@ import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import readyCallbacks from '@js/core/utils/ready_callbacks'; -import registerEvent from '@js/events/core/event_registrator'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as wheelEventName } from '@js/events/core/wheel'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, isMouseEvent } from '@js/events/utils/index'; const MANAGER_EVENT = 'dxEventManager'; const EMITTER_DATA = 'dxEmitter'; diff --git a/packages/devextreme/js/__internal/events/core/m_event_registrator.ts b/packages/devextreme/js/__internal/events/core/m_event_registrator.ts index 1300b04f4577..b84e875dfc31 100644 --- a/packages/devextreme/js/__internal/events/core/m_event_registrator.ts +++ b/packages/devextreme/js/__internal/events/core/m_event_registrator.ts @@ -1,5 +1,5 @@ +import callbacks from '@js/common/core/events/core/event_registrator_callbacks'; import { each } from '@js/core/utils/iterator'; -import callbacks from '@js/events/core/event_registrator_callbacks'; const registerEvent = function (name, eventObject) { const strategy: any = {}; diff --git a/packages/devextreme/js/__internal/events/core/m_events_engine.ts b/packages/devextreme/js/__internal/events/core/m_events_engine.ts index 53f51b8a8fd8..26730956c6d8 100644 --- a/packages/devextreme/js/__internal/events/core/m_events_engine.ts +++ b/packages/devextreme/js/__internal/events/core/m_events_engine.ts @@ -1,3 +1,6 @@ +import registerEventCallbacks from '@js/common/core/events/core/event_registrator_callbacks'; +import hookTouchProps from '@js/common/core/events/core/hook_touch_props'; +import { getEventTarget } from '@js/common/core/events/utils/event_target'; import domAdapter from '@js/core/dom_adapter'; import errors from '@js/core/errors'; import callOnce from '@js/core/utils/call_once'; @@ -8,9 +11,6 @@ import { isFunction, isObject, isString, isWindow, } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import registerEventCallbacks from '@js/events/core/event_registrator_callbacks'; -import hookTouchProps from '@js/events/core/hook_touch_props'; -import { getEventTarget } from '@js/events/utils/event_target'; const window = getWindow(); diff --git a/packages/devextreme/js/__internal/events/core/m_keyboard_processor.ts b/packages/devextreme/js/__internal/events/core/m_keyboard_processor.ts index bc3194beeda1..6c8cda2690f9 100644 --- a/packages/devextreme/js/__internal/events/core/m_keyboard_processor.ts +++ b/packages/devextreme/js/__internal/events/core/m_keyboard_processor.ts @@ -1,7 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, normalizeKeyName } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import $ from '@js/core/renderer'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, normalizeKeyName } from '@js/events/utils/index'; const COMPOSITION_START_EVENT = 'compositionstart'; const COMPOSITION_END_EVENT = 'compositionend'; diff --git a/packages/devextreme/js/__internal/events/core/m_wheel.ts b/packages/devextreme/js/__internal/events/core/m_wheel.ts index f4f94e27f02a..c579e0ec7856 100644 --- a/packages/devextreme/js/__internal/events/core/m_wheel.ts +++ b/packages/devextreme/js/__internal/events/core/m_wheel.ts @@ -1,7 +1,7 @@ +import registerEvent from '@js/common/core/events/core/event_registrator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, fireEvent } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; -import registerEvent from '@js/events/core/event_registrator'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, fireEvent } from '@js/events/utils/index'; const EVENT_NAME = 'dxmousewheel'; const EVENT_NAMESPACE = 'dxWheel'; diff --git a/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.scroll.ts b/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.scroll.ts index abd66c8d2c0d..6edadbe1125b 100644 --- a/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.scroll.ts +++ b/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.scroll.ts @@ -1,11 +1,11 @@ -import { cancelAnimationFrame, requestAnimationFrame } from '@js/animation/frame'; -import Class from '@js/core/class'; -import registerEmitter from '@js/events/core/emitter_registrator'; -import eventsEngine from '@js/events/core/events_engine'; -import GestureEmitter from '@js/events/gesture/emitter.gesture'; +import { cancelAnimationFrame, requestAnimationFrame } from '@js/common/core/animation/frame'; +import registerEmitter from '@js/common/core/events/core/emitter_registrator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import GestureEmitter from '@js/common/core/events/gesture/emitter.gesture'; import { addNamespace, eventData, eventDelta, isDxMouseWheelEvent, isMouseEvent, -} from '@js/events/utils/index'; +} from '@js/common/core/events/utils/index'; +import Class from '@js/core/class'; import devices from '@ts/core/m_devices'; const { abstract } = Class; diff --git a/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.ts b/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.ts index c507772f7c90..26a9be9ac708 100644 --- a/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.ts +++ b/packages/devextreme/js/__internal/events/gesture/m_emitter.gesture.ts @@ -1,3 +1,8 @@ +import Emitter from '@js/common/core/events/core/emitter'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + createEvent, eventData, eventDelta, isDxMouseWheelEvent, isTouchEvent, needSkipEvent, +} from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; import callOnce from '@js/core/utils/call_once'; import { noop } from '@js/core/utils/common'; @@ -5,11 +10,6 @@ import { sign } from '@js/core/utils/math'; import readyCallbacks from '@js/core/utils/ready_callbacks'; import { styleProp } from '@js/core/utils/style'; import { isDefined } from '@js/core/utils/type'; -import Emitter from '@js/events/core/emitter'; -import eventsEngine from '@js/events/core/events_engine'; -import { - createEvent, eventData, eventDelta, isDxMouseWheelEvent, isTouchEvent, needSkipEvent, -} from '@js/events/utils/index'; import devices from '@ts/core/m_devices'; import domUtils from '@ts/core/utils/m_dom'; diff --git a/packages/devextreme/js/__internal/events/gesture/m_swipeable.ts b/packages/devextreme/js/__internal/events/gesture/m_swipeable.ts index 4ba1540119cd..d321ed8f4a38 100644 --- a/packages/devextreme/js/__internal/events/gesture/m_swipeable.ts +++ b/packages/devextreme/js/__internal/events/gesture/m_swipeable.ts @@ -1,14 +1,14 @@ -import DOMComponent from '@js/core/dom_component'; -import { extend } from '@js/core/utils/extend'; -import { each } from '@js/core/utils/iterator'; -import { name } from '@js/core/utils/public_component'; -import eventsEngine from '@js/events/core/events_engine'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import { end as swipeEventEnd, start as swipeEventStart, swipe as swipeEventSwipe, -} from '@js/events/swipe'; -import { addNamespace } from '@js/events/utils/index'; +} from '@js/common/core/events/swipe'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import DOMComponent from '@js/core/dom_component'; +import { extend } from '@js/core/utils/extend'; +import { each } from '@js/core/utils/iterator'; +import { name } from '@js/core/utils/public_component'; const DX_SWIPEABLE = 'dxSwipeable'; const SWIPEABLE_CLASS = 'dx-swipeable'; diff --git a/packages/devextreme/js/__internal/events/m_click.ts b/packages/devextreme/js/__internal/events/m_click.ts index 6b1804bc55e2..03bc4dc7d685 100644 --- a/packages/devextreme/js/__internal/events/m_click.ts +++ b/packages/devextreme/js/__internal/events/m_click.ts @@ -1,13 +1,13 @@ import { cancelAnimationFrame, requestAnimationFrame } from '@js/animation/frame'; +import Emitter from '@js/common/core/events/core/emitter'; +import registerEmitter from '@js/common/core/events/core/emitter_registrator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { subscribeNodesDisposing, unsubscribeNodesDisposing } from '@js/common/core/events/utils/event_nodes_disposing'; +import { getEventTarget } from '@js/common/core/events/utils/event_target'; +import { addNamespace, fireEvent } from '@js/common/core/events/utils/index'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; -import Emitter from '@js/events/core/emitter'; -import registerEmitter from '@js/events/core/emitter_registrator'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { subscribeNodesDisposing, unsubscribeNodesDisposing } from '@js/events/utils/event_nodes_disposing'; -import { getEventTarget } from '@js/events/utils/event_target'; -import { addNamespace, fireEvent } from '@js/events/utils/index'; import devices from '@ts/core/m_devices'; import domUtils from '@ts/core/utils/m_dom'; diff --git a/packages/devextreme/js/__internal/events/m_contextmenu.ts b/packages/devextreme/js/__internal/events/m_contextmenu.ts index d0816416647c..e4b7c1f54023 100644 --- a/packages/devextreme/js/__internal/events/m_contextmenu.ts +++ b/packages/devextreme/js/__internal/events/m_contextmenu.ts @@ -1,9 +1,9 @@ +import registerEvent from '@js/common/core/events/core/event_registrator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import holdEvent from '@js/common/core/events/hold'; +import { addNamespace, fireEvent, isMouseEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import $ from '@js/core/renderer'; -import registerEvent from '@js/events/core/event_registrator'; -import eventsEngine from '@js/events/core/events_engine'; -import holdEvent from '@js/events/hold'; -import { addNamespace, fireEvent, isMouseEvent } from '@js/events/utils/index'; import devices from '@ts/core/m_devices'; import supportUtils from '@ts/core/utils/m_support'; diff --git a/packages/devextreme/js/__internal/events/m_dblclick.ts b/packages/devextreme/js/__internal/events/m_dblclick.ts index 6628b8d0c4fe..646a7793fff9 100644 --- a/packages/devextreme/js/__internal/events/m_dblclick.ts +++ b/packages/devextreme/js/__internal/events/m_dblclick.ts @@ -1,9 +1,9 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, fireEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import domAdapter from '@js/core/dom_adapter'; import { closestCommonParent } from '@js/core/utils/dom'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, fireEvent } from '@js/events/utils/index'; const DBLCLICK_EVENT_NAME = 'dxdblclick'; const DBLCLICK_NAMESPACE = 'dxDblClick'; diff --git a/packages/devextreme/js/__internal/events/m_drag.ts b/packages/devextreme/js/__internal/events/m_drag.ts index 952dd4b7f624..30388f15bff5 100644 --- a/packages/devextreme/js/__internal/events/m_drag.ts +++ b/packages/devextreme/js/__internal/events/m_drag.ts @@ -1,12 +1,12 @@ +import registerEmitter from '@js/common/core/events/core/emitter_registrator'; +import registerEvent from '@js/common/core/events/core/event_registrator'; +import GestureEmitter from '@js/common/core/events/gesture/emitter.gesture'; +import { eventData as eData, fireEvent } from '@js/common/core/events/utils/index'; import { data as elementData, removeData } from '@js/core/element_data'; import $ from '@js/core/renderer'; import { wrapToArray } from '@js/core/utils/array'; import { contains } from '@js/core/utils/dom'; import * as iteratorUtils from '@js/core/utils/iterator'; -import registerEmitter from '@js/events/core/emitter_registrator'; -import registerEvent from '@js/events/core/event_registrator'; -import GestureEmitter from '@js/events/gesture/emitter.gesture'; -import { eventData as eData, fireEvent } from '@js/events/utils/index'; const DRAG_START_EVENT = 'dxdragstart'; const DRAG_EVENT = 'dxdrag'; diff --git a/packages/devextreme/js/__internal/events/m_hold.ts b/packages/devextreme/js/__internal/events/m_hold.ts index f5fb13543588..3248dc50f4f8 100644 --- a/packages/devextreme/js/__internal/events/m_hold.ts +++ b/packages/devextreme/js/__internal/events/m_hold.ts @@ -1,6 +1,6 @@ -import Emitter from '@js/events/core/emitter'; -import registerEmitter from '@js/events/core/emitter_registrator'; -import { eventData, eventDelta } from '@js/events/utils/index'; +import Emitter from '@js/common/core/events/core/emitter'; +import registerEmitter from '@js/common/core/events/core/emitter_registrator'; +import { eventData, eventDelta } from '@js/common/core/events/utils/index'; const { abs } = Math; diff --git a/packages/devextreme/js/__internal/events/m_hover.ts b/packages/devextreme/js/__internal/events/m_hover.ts index ef963775cc64..29f764e69be2 100644 --- a/packages/devextreme/js/__internal/events/m_hover.ts +++ b/packages/devextreme/js/__internal/events/m_hover.ts @@ -1,9 +1,9 @@ +import registerEvent from '@js/common/core/events/core/event_registrator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, fireEvent, isTouchEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import { data as elementData, removeData } from '@js/core/element_data'; -import registerEvent from '@js/events/core/event_registrator'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, fireEvent, isTouchEvent } from '@js/events/utils/index'; import devices from '@ts/core/m_devices'; const HOVERSTART_NAMESPACE = 'dxHoverStart'; diff --git a/packages/devextreme/js/__internal/events/m_pointer.ts b/packages/devextreme/js/__internal/events/m_pointer.ts index e4025dbd0371..2db6c39e3a42 100644 --- a/packages/devextreme/js/__internal/events/m_pointer.ts +++ b/packages/devextreme/js/__internal/events/m_pointer.ts @@ -1,9 +1,9 @@ +import registerEvent from '@js/common/core/events/core/event_registrator'; +import MouseStrategy from '@js/common/core/events/pointer/mouse'; +import MouseAndTouchStrategy from '@js/common/core/events/pointer/mouse_and_touch'; +import TouchStrategy from '@js/common/core/events/pointer/touch'; import GlobalConfig from '@js/core/config'; import { each } from '@js/core/utils/iterator'; -import registerEvent from '@js/events/core/event_registrator'; -import MouseStrategy from '@js/events/pointer/mouse'; -import MouseAndTouchStrategy from '@js/events/pointer/mouse_and_touch'; -import TouchStrategy from '@js/events/pointer/touch'; import devices from '@ts/core/m_devices'; import support from '@ts/core/utils/m_support'; diff --git a/packages/devextreme/js/__internal/events/m_remove.ts b/packages/devextreme/js/__internal/events/m_remove.ts index 7db6f04f4725..4131b1b6533c 100644 --- a/packages/devextreme/js/__internal/events/m_remove.ts +++ b/packages/devextreme/js/__internal/events/m_remove.ts @@ -1,7 +1,7 @@ +import registerEvent from '@js/common/core/events/core/event_registrator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import { beforeCleanData } from '@js/core/element_data'; import $ from '@js/core/renderer'; -import registerEvent from '@js/events/core/event_registrator'; -import eventsEngine from '@js/events/core/events_engine'; export const removeEvent = 'dxremove'; const eventPropName = 'dxRemoveEvent'; diff --git a/packages/devextreme/js/__internal/events/m_short.ts b/packages/devextreme/js/__internal/events/m_short.ts index 4ef502a5058f..b65e4fd4d2c4 100644 --- a/packages/devextreme/js/__internal/events/m_short.ts +++ b/packages/devextreme/js/__internal/events/m_short.ts @@ -1,6 +1,6 @@ -import eventsEngine from '@js/events/core/events_engine'; -import KeyboardProcessor from '@js/events/core/keyboard_processor'; -import { addNamespace as pureAddNamespace } from '@js/events/utils/index'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import KeyboardProcessor from '@js/common/core/events/core/keyboard_processor'; +import { addNamespace as pureAddNamespace } from '@js/common/core/events/utils/index'; function addNamespace(event, namespace) { return namespace ? pureAddNamespace(event, namespace) : event; diff --git a/packages/devextreme/js/__internal/events/m_swipe.ts b/packages/devextreme/js/__internal/events/m_swipe.ts index fbea0dddd200..4b533b43885a 100644 --- a/packages/devextreme/js/__internal/events/m_swipe.ts +++ b/packages/devextreme/js/__internal/events/m_swipe.ts @@ -1,7 +1,7 @@ +import registerEmitter from '@js/common/core/events/core/emitter_registrator'; +import GestureEmitter from '@js/common/core/events/gesture/emitter.gesture'; +import { eventData } from '@js/common/core/events/utils/index'; import { getHeight, getWidth } from '@js/core/utils/size'; -import registerEmitter from '@js/events/core/emitter_registrator'; -import GestureEmitter from '@js/events/gesture/emitter.gesture'; -import { eventData } from '@js/events/utils/index'; const SWIPE_START_EVENT = 'dxswipestart'; const SWIPE_EVENT = 'dxswipe'; diff --git a/packages/devextreme/js/__internal/events/m_transform.ts b/packages/devextreme/js/__internal/events/m_transform.ts index 6f3ae247bc28..3fea6fd1756c 100644 --- a/packages/devextreme/js/__internal/events/m_transform.ts +++ b/packages/devextreme/js/__internal/events/m_transform.ts @@ -1,8 +1,8 @@ +import Emitter from '@js/common/core/events/core/emitter'; +import registerEmitter from '@js/common/core/events/core/emitter_registrator'; +import { hasTouches } from '@js/common/core/events/utils/index'; import * as iteratorUtils from '@js/core/utils/iterator'; import { fitIntoRange, sign as mathSign } from '@js/core/utils/math'; -import Emitter from '@js/events/core/emitter'; -import registerEmitter from '@js/events/core/emitter_registrator'; -import { hasTouches } from '@js/events/utils/index'; interface EventAlias { name: string; diff --git a/packages/devextreme/js/__internal/events/m_visibility_change.ts b/packages/devextreme/js/__internal/events/m_visibility_change.ts index 73649aaeb138..278bc4047a3d 100644 --- a/packages/devextreme/js/__internal/events/m_visibility_change.ts +++ b/packages/devextreme/js/__internal/events/m_visibility_change.ts @@ -1,5 +1,5 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; import $ from '@js/core/renderer'; -import eventsEngine from '@js/events/core/events_engine'; const triggerVisibilityChangeEvent = function (eventName) { const VISIBILITY_CHANGE_SELECTOR = '.dx-visibility-change-handler'; diff --git a/packages/devextreme/js/__internal/events/pointer/m_base.ts b/packages/devextreme/js/__internal/events/pointer/m_base.ts index 9f09bc77971f..4a74403e2b36 100644 --- a/packages/devextreme/js/__internal/events/pointer/m_base.ts +++ b/packages/devextreme/js/__internal/events/pointer/m_base.ts @@ -1,9 +1,9 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { getEventTarget } from '@js/common/core/events/utils/event_target'; +import { addNamespace, eventSource, fireEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import domAdapter from '@js/core/dom_adapter'; import browser from '@js/core/utils/browser'; -import eventsEngine from '@js/events/core/events_engine'; -import { getEventTarget } from '@js/events/utils/event_target'; -import { addNamespace, eventSource, fireEvent } from '@js/events/utils/index'; const POINTER_EVENTS_NAMESPACE = 'dxPointerEvents'; diff --git a/packages/devextreme/js/__internal/events/pointer/m_mouse.ts b/packages/devextreme/js/__internal/events/pointer/m_mouse.ts index 6923ca95f16e..c5bb04abef0d 100644 --- a/packages/devextreme/js/__internal/events/pointer/m_mouse.ts +++ b/packages/devextreme/js/__internal/events/pointer/m_mouse.ts @@ -1,6 +1,6 @@ +import BaseStrategy from '@js/common/core/events/pointer/base'; +import Observer from '@js/common/core/events/pointer/observer'; import { extend } from '@js/core/utils/extend'; -import BaseStrategy from '@js/events/pointer/base'; -import Observer from '@js/events/pointer/observer'; /* eslint-disable spellcheck/spell-checker */ const eventMap = { diff --git a/packages/devextreme/js/__internal/events/pointer/m_mouse_and_touch.ts b/packages/devextreme/js/__internal/events/pointer/m_mouse_and_touch.ts index ace13e48880c..c4a325233da1 100644 --- a/packages/devextreme/js/__internal/events/pointer/m_mouse_and_touch.ts +++ b/packages/devextreme/js/__internal/events/pointer/m_mouse_and_touch.ts @@ -1,8 +1,8 @@ +import BaseStrategy from '@js/common/core/events/pointer/base'; +import MouseStrategy from '@js/common/core/events/pointer/mouse'; +import TouchStrategy from '@js/common/core/events/pointer/touch'; +import { isMouseEvent } from '@js/common/core/events/utils/index'; import { extend } from '@js/core/utils/extend'; -import BaseStrategy from '@js/events/pointer/base'; -import MouseStrategy from '@js/events/pointer/mouse'; -import TouchStrategy from '@js/events/pointer/touch'; -import { isMouseEvent } from '@js/events/utils/index'; /* eslint-disable spellcheck/spell-checker */ const eventMap = { diff --git a/packages/devextreme/js/__internal/events/pointer/m_touch.ts b/packages/devextreme/js/__internal/events/pointer/m_touch.ts index f6fc7b28f21f..159f8652c595 100644 --- a/packages/devextreme/js/__internal/events/pointer/m_touch.ts +++ b/packages/devextreme/js/__internal/events/pointer/m_touch.ts @@ -1,6 +1,6 @@ +import BaseStrategy from '@js/common/core/events/pointer/base'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; -import BaseStrategy from '@js/events/pointer/base'; import devices from '@ts/core/m_devices'; /* eslint-disable spellcheck/spell-checker */ diff --git a/packages/devextreme/js/__internal/events/utils/index.ts b/packages/devextreme/js/__internal/events/utils/index.ts index 407f3dced19d..ed0d11d30964 100644 --- a/packages/devextreme/js/__internal/events/utils/index.ts +++ b/packages/devextreme/js/__internal/events/utils/index.ts @@ -1,7 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; -import eventsEngine from '@js/events/core/events_engine'; import { focused } from '@js/ui/widget/selectors'; import mappedAddNamespace from './m_add_namespace'; diff --git a/packages/devextreme/js/__internal/events/utils/m_event_nodes_disposing.ts b/packages/devextreme/js/__internal/events/utils/m_event_nodes_disposing.ts index 3baf9abb34ae..4db01c1452c5 100644 --- a/packages/devextreme/js/__internal/events/utils/m_event_nodes_disposing.ts +++ b/packages/devextreme/js/__internal/events/utils/m_event_nodes_disposing.ts @@ -1,5 +1,5 @@ -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; function nodesByEvent(event) { return event && [ diff --git a/packages/devextreme/js/__internal/filter_builder/m_filter_builder.ts b/packages/devextreme/js/__internal/filter_builder/m_filter_builder.ts index e58cb65a7804..605c96c40094 100644 --- a/packages/devextreme/js/__internal/filter_builder/m_filter_builder.ts +++ b/packages/devextreme/js/__internal/filter_builder/m_filter_builder.ts @@ -1,4 +1,7 @@ /* eslint-disable max-classes-per-file */ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { normalizeKeyName } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import Guid from '@js/core/guid'; @@ -6,9 +9,6 @@ import $ from '@js/core/renderer'; import { when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { normalizeKeyName } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Popup from '@js/ui/popup/ui.popup'; import EditorFactoryMixin from '@js/ui/shared/ui.editor_factory_mixin'; import TreeView from '@js/ui/tree_view'; diff --git a/packages/devextreme/js/__internal/filter_builder/m_utils.ts b/packages/devextreme/js/__internal/filter_builder/m_utils.ts index 600b85c216da..373b1ff2dbf3 100644 --- a/packages/devextreme/js/__internal/filter_builder/m_utils.ts +++ b/packages/devextreme/js/__internal/filter_builder/m_utils.ts @@ -1,14 +1,13 @@ +import messageLocalization from '@js/common/core/localization/message'; +import { DataSource } from '@js/common/data/data_source/data_source'; +import { errors as dataErrors } from '@js/common/data/errors'; import $ from '@js/core/renderer'; import { compileGetter } from '@js/core/utils/data'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { captionize } from '@js/core/utils/inflector'; import { isDefined, isFunction } from '@js/core/utils/type'; -import { DataSource } from '@js/data/data_source/data_source'; -// @ts-expect-error errors.d.ts is badly typed and doesn't contain all exported entities. -import { errors as dataErrors } from '@js/data/errors'; import formatHelper from '@js/format_helper'; -import messageLocalization from '@js/localization/message'; import filterUtils from '@js/ui/shared/filtering'; import errors from '@js/ui/widget/ui.errors'; @@ -142,7 +141,7 @@ function getCriteriaOperation(criteria) { const item = criteria[i]; if (!Array.isArray(item)) { if (value && value !== item) { - throw new dataErrors.Error('E4019'); + throw dataErrors.Error('E4019'); } if (item !== '!') { value = item; diff --git a/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts b/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts index d27e6139b0e9..b3bee519040b 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts @@ -2,13 +2,13 @@ import '@js/ui/button'; import '@js/ui/drop_down_button'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { getDefaultAlignment } from '@js/core/utils/position'; import { format } from '@js/core/utils/string'; import { isDefined, isFunction } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import List from '@js/ui/list_light'; import errors from '@js/ui/widget/ui.errors'; import { prepareItems } from '@ts/grids/grid_core/m_export'; diff --git a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts index 7093eac76a80..921272af50c6 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts @@ -1,12 +1,12 @@ /* eslint-disable max-classes-per-file */ /* eslint-disable @typescript-eslint/method-signature-style */ +import messageLocalization from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import { Deferred, when } from '@js/core/utils/deferred'; import { each } from '@js/core/utils/iterator'; import { getHeight } from '@js/core/utils/size'; import { isDefined, isString } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import { restoreFocus, setTabIndex } from '@js/ui/shared/accessibility'; import type { DataController } from '@ts/grids/grid_core/data_controller/m_data_controller'; import type DataSourceAdapter from '@ts/grids/grid_core/data_source_adapter/m_data_source_adapter'; diff --git a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_collapsed.ts b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_collapsed.ts index 6ab6b600ee71..72613af77893 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_collapsed.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_collapsed.ts @@ -1,8 +1,7 @@ +import { errors as dataErrors } from '@js/common/data/errors'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; -// @ts-expect-error -import { errors as dataErrors } from '@js/data/errors'; import errors from '@js/ui/widget/ui.errors'; import dataGridCore from '../m_core'; diff --git a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_core.ts b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_core.ts index 1ae9b0b1dc66..b876477b9cde 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_core.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_core.ts @@ -1,7 +1,6 @@ +import { normalizeSortingInfo } from '@js/common/data/utils'; import $ from '@js/core/renderer'; import { when } from '@js/core/utils/deferred'; -// @ts-expect-error -import { normalizeSortingInfo } from '@js/data/utils'; import gridCore from '../m_core'; diff --git a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_expanded.ts b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_expanded.ts index 77c4f349e578..32dc9e30c3da 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_expanded.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping_expanded.ts @@ -1,11 +1,10 @@ +import { query as dataQuery } from '@js/common/data'; +import storeHelper from '@js/common/data/store_helper'; +import { keysEqual } from '@js/common/data/utils'; import { toComparable } from '@js/core/utils/data'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; -import dataQuery from '@js/data/query'; -import storeHelper from '@js/data/store_helper'; -// @ts-expect-error -import { keysEqual } from '@js/data/utils'; import dataGridCore from '../m_core'; import { createGroupFilter } from '../m_utils'; diff --git a/packages/devextreme/js/__internal/grids/data_grid/m_aggregate_calculator.ts b/packages/devextreme/js/__internal/grids/data_grid/m_aggregate_calculator.ts index 89a0e7cb35d7..4c9f0afb875c 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/m_aggregate_calculator.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/m_aggregate_calculator.ts @@ -1,9 +1,7 @@ +import { errors } from '@js/common/data/errors'; +import { aggregators } from '@js/common/data/utils'; import { compileGetter } from '@js/core/utils/data'; import { isFunction } from '@js/core/utils/type'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -// @ts-expect-error -import { aggregators } from '@js/data/utils'; function depthFirstSearch(i, depth, root, callback) { let j = 0; diff --git a/packages/devextreme/js/__internal/grids/data_grid/m_utils.ts b/packages/devextreme/js/__internal/grids/data_grid/m_utils.ts index cb7600b999ef..0d2a9d97bc6a 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/m_utils.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/m_utils.ts @@ -1,5 +1,4 @@ -// @ts-expect-error -import { normalizeSortingInfo } from '@js/data/utils'; +import { normalizeSortingInfo } from '@js/common/data/utils'; import gridCoreUtils from '@ts/grids/grid_core/m_utils'; export function createGroupFilter(path, storeLoadOptions) { diff --git a/packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts b/packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts index 2374ed7fb45b..ee73a2917d83 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts @@ -1,4 +1,8 @@ /* eslint-disable max-classes-per-file */ +import messageLocalization from '@js/common/core/localization/message'; +import { query as dataQuery } from '@js/common/data'; +import storeHelper from '@js/common/data/store_helper'; +import { normalizeSortingInfo } from '@js/common/data/utils'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { compileGetter } from '@js/core/utils/data'; @@ -8,11 +12,6 @@ import { isDefined, isEmptyObject, isFunction, isPlainObject, isString, } from '@js/core/utils/type'; -import dataQuery from '@js/data/query'; -import storeHelper from '@js/data/store_helper'; -// @ts-expect-error -import { normalizeSortingInfo } from '@js/data/utils'; -import messageLocalization from '@js/localization/message'; import errors from '@js/ui/widget/ui.errors'; import type { DataController } from '@ts/grids/grid_core/data_controller/m_data_controller'; import type DataSourceAdapter from '@ts/grids/grid_core/data_source_adapter/m_data_source_adapter'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts b/packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts index e0a12ad41188..629865388b6b 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts @@ -1,5 +1,10 @@ /* eslint-disable @typescript-eslint/method-signature-style */ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import Guid from '@js/core/guid'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -10,11 +15,6 @@ import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { getWidth } from '@js/core/utils/size'; import { isDefined, isString } from '@js/core/utils/type'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Form from '@js/ui/form'; import { isMaterial } from '@js/ui/themes'; import type { ResizingController } from '@ts/grids/grid_core/views/m_grid_view'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts b/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts index c101645afb3c..4bbb66dc45f3 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts @@ -1,4 +1,5 @@ /* eslint-disable max-classes-per-file */ +import messageLocalization from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import { deferUpdate } from '@js/core/utils/common'; @@ -6,7 +7,6 @@ import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { getOuterHeight, getOuterWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import Popup from '@js/ui/popup/ui.popup'; // @ts-expect-error diff --git a/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts b/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts index d23ba5972130..6266c8539cb2 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts @@ -1,7 +1,10 @@ /* eslint-disable max-classes-per-file */ // TODO Move DataGrid's summary methods to the DataGrid // TODO Move virtual scrolling related methods to the virtual_scrolling -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as wheelEventName } from '@js/common/core/events/core/wheel'; +import messageLocalization from '@js/common/core/localization/message'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import browser from '@js/core/utils/browser'; @@ -11,9 +14,6 @@ import { getBoundingRect } from '@js/core/utils/position'; import { getOuterWidth } from '@js/core/utils/size'; import { setWidth } from '@js/core/utils/style'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as wheelEventName } from '@js/events/core/wheel'; -import messageLocalization from '@js/localization/message'; import Scrollable from '@js/ui/scroll_view/ui.scrollable'; import type { EditorFactory } from '@ts/grids/grid_core/editor_factory/m_editor_factory'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/column_headers/m_column_headers.ts b/packages/devextreme/js/__internal/grids/grid_core/column_headers/m_column_headers.ts index bbd921c1439e..b3b267cbc9a7 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/column_headers/m_column_headers.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/column_headers/m_column_headers.ts @@ -1,3 +1,5 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import messageLocalization from '@js/common/core/localization/message'; import domAdapter from '@js/core/dom_adapter'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -5,8 +7,6 @@ import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { getHeight } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import messageLocalization from '@js/localization/message'; import type { HeaderFilterController } from '@ts/grids/grid_core/header_filter/m_header_filter'; import type { HeaderPanel } from '@ts/grids/grid_core/header_panel/m_header_panel'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts b/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts index a61e4fed960b..d7c1e1283939 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts @@ -1,4 +1,9 @@ /* eslint-disable prefer-destructuring */ +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; +import Store from '@js/common/data/abstract_store'; +import { DataSource } from '@js/common/data/data_source/data_source'; +import { normalizeDataSourceOptions } from '@js/common/data/data_source/utils'; import type { ColumnBase } from '@js/common/grids'; import config from '@js/core/config'; import $ from '@js/core/renderer'; @@ -13,11 +18,6 @@ import { isString, } from '@js/core/utils/type'; import variableWrapper from '@js/core/utils/variable_wrapper'; -import Store from '@js/data/abstract_store'; -import { DataSource } from '@js/data/data_source/data_source'; -import { normalizeDataSourceOptions } from '@js/data/data_source/utils'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import filterUtils from '@js/ui/shared/filtering'; import errors from '@js/ui/widget/ui.errors'; import inflector from '@ts/core/utils/m_inflector'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller_utils.ts b/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller_utils.ts index ca081854f989..8753c2518ede 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller_utils.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller_utils.ts @@ -1,4 +1,5 @@ /* eslint-disable prefer-destructuring */ +import numberLocalization from '@js/common/core/localization/number'; import { normalizeIndexes } from '@js/core/utils/array'; import { equalByValue } from '@js/core/utils/common'; import { compileGetter, compileSetter } from '@js/core/utils/data'; @@ -11,7 +12,6 @@ import { isDefined, isFunction, isNumeric, isObject, isString, type, } from '@js/core/utils/type'; import variableWrapper from '@js/core/utils/variable_wrapper'; -import numberLocalization from '@js/localization/number'; import { HIDDEN_COLUMNS_WIDTH } from '../adaptivity/const'; import gridCoreUtils from '../m_utils'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/columns_resizing_reordering/m_columns_resizing_reordering.ts b/packages/devextreme/js/__internal/grids/grid_core/columns_resizing_reordering/m_columns_resizing_reordering.ts index 7c8cef2d217c..367084fe60b1 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/columns_resizing_reordering/m_columns_resizing_reordering.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/columns_resizing_reordering/m_columns_resizing_reordering.ts @@ -1,5 +1,13 @@ /* eslint-disable max-classes-per-file */ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + end as dragEventEnd, + move as dragEventMove, + start as dragEventStart, +} from '@js/common/core/events/drag'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, eventData as getEventData, isTouchEvent } from '@js/common/core/events/utils/index'; import domAdapter from '@js/core/dom_adapter'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -12,14 +20,6 @@ import { setHeight, setWidth, } from '@js/core/utils/size'; import { isDefined, isObject, isString } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { - end as dragEventEnd, - move as dragEventMove, - start as dragEventStart, -} from '@js/events/drag'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, eventData as getEventData, isTouchEvent } from '@js/events/utils/index'; import swatchContainer from '@js/ui/widget/swatch_container'; import type { EditorFactory } from '@ts/grids/grid_core/editor_factory/m_editor_factory'; import type { ModuleType } from '@ts/grids/grid_core/m_types'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_controller.ts b/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_controller.ts index 1512ba48ea41..dec26e1f58d0 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_controller.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_controller.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/method-signature-style */ +import { ArrayStore, CustomStore } from '@js/common/data'; import $ from '@js/core/renderer'; import { findChanges } from '@js/core/utils/array_compare'; import { deferRender, equalByValue } from '@js/core/utils/common'; @@ -6,8 +7,6 @@ import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isObject } from '@js/core/utils/type'; -import ArrayStore from '@js/data/array_store'; -import CustomStore from '@js/data/custom_store'; import errors from '@js/ui/widget/ui.errors'; import type { EditingController } from '@ts/grids/grid_core/editing/m_editing'; import type { EditorFactory } from '@ts/grids/grid_core/editor_factory/m_editor_factory'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_helper_mixin.ts b/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_helper_mixin.ts index 50c95f81ed83..b05b335e9fdd 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_helper_mixin.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/data_controller/m_data_helper_mixin.ts @@ -1,6 +1,6 @@ +import { DataSource } from '@js/common/data/data_source/data_source'; +import { normalizeDataSourceOptions } from '@js/common/data/data_source/utils'; import { extend } from '@js/core/utils/extend'; -import { DataSource } from '@js/data/data_source/data_source'; -import { normalizeDataSourceOptions } from '@js/data/data_source/utils'; import DataController from '@ts/ui/collection/m_data_controller'; import type { Controller } from '../m_modules'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/data_source_adapter/m_data_source_adapter.ts b/packages/devextreme/js/__internal/grids/grid_core/data_source_adapter/m_data_source_adapter.ts index abc0466823e5..6e327b7d403e 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/data_source_adapter/m_data_source_adapter.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/data_source_adapter/m_data_source_adapter.ts @@ -1,12 +1,12 @@ /* eslint-disable @typescript-eslint/no-dynamic-delete */ +import { ArrayStore } from '@js/common/data'; +import { applyBatch } from '@js/common/data/array_utils'; import Callbacks from '@js/core/utils/callbacks'; import { getKeyHash } from '@js/core/utils/common'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isFunction, isPlainObject } from '@js/core/utils/type'; -import ArrayStore from '@js/data/array_store'; -import { applyBatch } from '@js/data/array_utils'; import modules from '../m_modules'; import gridCoreUtils from '../m_utils'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts index 909f40ff90a3..0095fd766fc5 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts @@ -1,4 +1,11 @@ /* eslint-disable @typescript-eslint/no-unused-vars, max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { removeEvent } from '@js/common/core/events/remove'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; +import { createObjectWithChanges } from '@js/common/data/array_utils'; import type { GridsEditMode } from '@js/common/grids'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; @@ -17,13 +24,6 @@ import { isDefined, isEmptyObject, isFunction, isObject, } from '@js/core/utils/type'; -import { createObjectWithChanges } from '@js/data/array_utils'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { removeEvent } from '@js/events/remove'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import { confirm } from '@js/ui/dialog'; import { current, isFluent } from '@js/ui/themes'; import domUtils from '@ts/core/utils/m_dom'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts index ce2c2a1936c0..f6a407840b87 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts @@ -1,4 +1,10 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import holdEvent from '@js/common/core/events/hold'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import { createObjectWithChanges } from '@js/common/data/array_utils'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; import { deferRender } from '@js/core/utils/common'; @@ -6,12 +12,6 @@ import type { DeferredObj } from '@js/core/utils/deferred'; import { Deferred, when } from '@js/core/utils/deferred'; import { isElementInDom } from '@js/core/utils/dom'; import { isDefined, isString } from '@js/core/utils/type'; -import { createObjectWithChanges } from '@js/data/array_utils'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import holdEvent from '@js/events/hold'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import type { HeaderPanel } from '@ts/grids/grid_core/header_panel/m_header_panel'; import type { RowsView } from '@ts/grids/grid_core/views/m_rows_view'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_form_based.ts b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_form_based.ts index 640d8e1c773c..05a530e0f618 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_form_based.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_form_based.ts @@ -1,4 +1,6 @@ /* eslint-disable max-classes-per-file */ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; import devices from '@js/core/devices'; import Guid from '@js/core/guid'; import type { dxElementWrapper } from '@js/core/renderer'; @@ -9,8 +11,6 @@ import { isElementInDom } from '@js/core/utils/dom'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isString } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; import Button from '@js/ui/button'; import Form from '@js/ui/form'; import Popup from '@js/ui/popup/ui.popup'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/editor_factory/m_editor_factory.ts b/packages/devextreme/js/__internal/grids/grid_core/editor_factory/m_editor_factory.ts index 36b8347d87c3..f117beb1800d 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/editor_factory/m_editor_factory.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/editor_factory/m_editor_factory.ts @@ -1,5 +1,9 @@ /* eslint-disable @typescript-eslint/method-signature-style */ -import positionUtils from '@js/animation/position'; +import positionUtils from '@js/common/core/animation/position'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, normalizeKeyName } from '@js/common/core/events/utils/index'; import domAdapter from '@js/core/dom_adapter'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -10,10 +14,6 @@ import { getOuterHeight, getOuterWidth, setOuterHeight, setOuterWidth, } from '@js/core/utils/size'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, normalizeKeyName } from '@js/events/utils/index'; import EditorFactoryMixin from '@js/ui/shared/ui.editor_factory_mixin'; import type { ColumnsResizerViewController, @@ -194,7 +194,6 @@ export class EditorFactory extends ViewControllerWithMixin { private _updateFocusOverlaySize($element, position) { $element.hide(); - // @ts-expect-error const location = positionUtils.calculate($element, extend({ collision: 'fit' }, position)); if (location.h.oversize > 0) { @@ -273,7 +272,7 @@ export class EditorFactory extends ViewControllerWithMixin { }; this._updateFocusOverlaySize(this._$focusOverlay, focusOverlayPosition); - // @ts-expect-error + positionUtils.setup(this._$focusOverlay, focusOverlayPosition); this._$focusOverlay.css('visibility', 'visible'); // for ios diff --git a/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts b/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts index e3130f6ba24f..d73f533a203c 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts @@ -1,9 +1,9 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { each } from '@js/core/utils/iterator'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import messageLocalization from '@js/localization/message'; import type { ColumnsController } from '@ts/grids/grid_core/columns_controller/m_columns_controller'; import type { ResizingController } from '@ts/grids/grid_core/views/m_grid_view'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_builder.ts b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_builder.ts index da01a1164d22..ba331eaf8860 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_builder.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_builder.ts @@ -1,6 +1,6 @@ +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; -import messageLocalization from '@js/localization/message'; import FilterBuilder from '@js/ui/filter_builder'; import Popup from '@js/ui/popup/ui.popup'; import ScrollView from '@js/ui/scroll_view'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_custom_operations.ts b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_custom_operations.ts index b852a5466d81..9a64587d5845 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_custom_operations.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_custom_operations.ts @@ -1,8 +1,8 @@ +import messageLocalization from '@js/common/core/localization/message'; +import { DataSource } from '@js/common/data/data_source/data_source'; import $ from '@js/core/renderer'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; -import { DataSource } from '@js/data/data_source/data_source'; -import messageLocalization from '@js/localization/message'; import errors from '@js/ui/widget/ui.errors'; import { getFilterExpression, isCondition, isGroup, renderValueText, diff --git a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_panel.ts b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_panel.ts index 28085ef378dd..f103c2486d24 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_panel.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_panel.ts @@ -1,10 +1,10 @@ /* eslint-disable max-classes-per-file */ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import messageLocalization from '@js/common/core/localization/message'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { Deferred, when } from '@js/core/utils/deferred'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import messageLocalization from '@js/localization/message'; import CheckBox from '@js/ui/check_box'; import inflector from '@ts/core/utils/m_inflector'; import { diff --git a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts index 55bc1642dd67..496779c3de95 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts @@ -1,13 +1,13 @@ /* eslint-disable max-classes-per-file */ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { normalizeKeyName } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { equalByValue } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { each, map } from '@js/core/utils/iterator'; import { getOuterWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { normalizeKeyName } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Editor from '@js/ui/editor/editor'; import Menu from '@js/ui/menu'; import Overlay from '@js/ui/overlay/ui.overlay'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter.ts b/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter.ts index 8e93098c9c74..be85d2b8b756 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter.ts @@ -1,17 +1,17 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; +import { query as dataQuery } from '@js/common/data'; +import { normalizeDataSourceOptions } from '@js/common/data/data_source/utils'; +import storeHelper from '@js/common/data/store_helper'; import { compileGetter } from '@js/core/utils/data'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { getDefaultAlignment } from '@js/core/utils/position'; import { isDefined, isFunction, isObject } from '@js/core/utils/type'; -import { normalizeDataSourceOptions } from '@js/data/data_source/utils'; -import dataQuery from '@js/data/query'; -import storeHelper from '@js/data/store_helper'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import { restoreFocus, saveFocusedElementInfo } from '@js/ui/shared/accessibility'; import filterUtils from '@js/ui/shared/filtering'; import type { ColumnHeadersView } from '@ts/grids/grid_core/column_headers/m_column_headers'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter_core.ts b/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter_core.ts index a03c6ff85d0d..e26027a1f9f4 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter_core.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter_core.ts @@ -2,11 +2,11 @@ import '@ts/ui/list/modules/m_search'; import '@ts/ui/list/modules/m_selection'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isFunction } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import List from '@js/ui/list_light'; import Popup from '@js/ui/popup/ui.popup'; import TreeView from '@js/ui/tree_view'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts b/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts index 9a0565cb7b7d..b89733dfe7f3 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts @@ -1,9 +1,9 @@ /* eslint-disable max-classes-per-file */ +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { getPathParts } from '@js/core/utils/data'; import { extend } from '@js/core/utils/extend'; import { isDefined, isString } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import type { Properties as ToolbarProperties } from '@js/ui/toolbar'; import Toolbar from '@js/ui/toolbar'; import type { EditingController } from '@ts/grids/grid_core/editing/m_editing'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/keyboard_navigation/m_keyboard_navigation.ts b/packages/devextreme/js/__internal/grids/grid_core/keyboard_navigation/m_keyboard_navigation.ts index 96222c594410..ea93d5a8d7c1 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/keyboard_navigation/m_keyboard_navigation.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/keyboard_navigation/m_keyboard_navigation.ts @@ -1,4 +1,13 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { keyboard } from '@js/common/core/events/short'; +import { + addNamespace, + createEvent, + isCommandKeyPressed, +} from '@js/common/core/events/utils/index'; import { noop } from '@js/core//utils/common'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; @@ -13,15 +22,6 @@ import { getWidth, } from '@js/core/utils/size'; import { isDeferred, isDefined, isEmptyObject } from '@js/core/utils/type'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { keyboard } from '@js/events/short'; -import { - addNamespace, - createEvent, - isCommandKeyPressed, -} from '@js/events/utils/index'; import * as accessibility from '@js/ui/shared/accessibility'; import { focused } from '@js/ui/widget/selectors'; import type { AdaptiveColumnsController } from '@ts/grids/grid_core/adaptivity/m_adaptivity'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/m_modules.ts b/packages/devextreme/js/__internal/grids/grid_core/m_modules.ts index 33c4b6202543..98b7a1b77786 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/m_modules.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/m_modules.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ /* eslint-disable max-classes-per-file */ /* eslint-disable @typescript-eslint/method-signature-style */ +import messageLocalization from '@js/common/core/localization/message'; import type { Component } from '@js/core/component'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -10,7 +11,6 @@ import { grep } from '@js/core/utils/common'; import { each } from '@js/core/utils/iterator'; import { isFunction } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; import errors from '@js/ui/widget/ui.errors'; import type { diff --git a/packages/devextreme/js/__internal/grids/grid_core/m_utils.ts b/packages/devextreme/js/__internal/grids/grid_core/m_utils.ts index 58000479439c..9ec06444f676 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/m_utils.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/m_utils.ts @@ -1,5 +1,9 @@ // @ts-check +import eventsEngine from '@js/common/core/events/core/events_engine'; +import DataSource from '@js/common/data/data_source'; +import { normalizeDataSourceOptions } from '@js/common/data/data_source/utils'; +import { normalizeSortingInfo as normalizeSortingInfoUtility } from '@js/common/data/utils'; import $ from '@js/core/renderer'; import { equalByValue } from '@js/core/utils/common'; import { toComparable } from '@js/core/utils/data'; @@ -12,11 +16,6 @@ import { format } from '@js/core/utils/string'; import { isDefined, isFunction, isString } from '@js/core/utils/type'; import variableWrapper from '@js/core/utils/variable_wrapper'; import { getWindow } from '@js/core/utils/window'; -import { DataSource } from '@js/data/data_source/data_source'; -import { normalizeDataSourceOptions } from '@js/data/data_source/utils'; -// @ts-expect-error -import { normalizeSortingInfo as normalizeSortingInfoUtility } from '@js/data/utils'; -import eventsEngine from '@js/events/core/events_engine'; import formatHelper from '@js/format_helper'; import LoadPanel from '@js/ui/load_panel'; import sharedFiltering from '@js/ui/shared/filtering'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/master_detail/m_master_detail.ts b/packages/devextreme/js/__internal/grids/grid_core/master_detail/m_master_detail.ts index b8c03fb566b3..abfb08354af7 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/master_detail/m_master_detail.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/master_detail/m_master_detail.ts @@ -1,4 +1,5 @@ /* eslint-disable max-classes-per-file */ +import messageLocalization from '@js/common/core/localization/message'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; // @ts-expect-error @@ -7,7 +8,6 @@ import { Deferred, when } from '@js/core/utils/deferred'; import { each } from '@js/core/utils/iterator'; import { getHeight, getWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import type { ColumnsController } from '@ts/grids/grid_core/columns_controller/m_columns_controller'; import type { DataController } from '@ts/grids/grid_core/data_controller/m_data_controller'; import type { ModuleType } from '@ts/grids/grid_core/m_types'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/pager/m_pager.ts b/packages/devextreme/js/__internal/grids/grid_core/pager/m_pager.ts index 7f7a91c8d8c8..3aa5a32261dc 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/pager/m_pager.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/pager/m_pager.ts @@ -1,6 +1,6 @@ +import messageLocalization from '@js/common/core/localization/message'; import { isDefined } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; import Pagination from '@ts/pagination/wrappers/pagination'; import modules from '../m_modules'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts b/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts index f88bd74c25cc..68b333b53419 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts @@ -1,10 +1,10 @@ /* eslint-disable max-classes-per-file */ /* eslint-disable @typescript-eslint/method-signature-style */ +import messageLocalization from '@js/common/core/localization/message'; +import { query as dataQuery } from '@js/common/data'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; import { compileGetter, toComparable } from '@js/core/utils/data'; -import dataQuery from '@js/data/query'; -import messageLocalization from '@js/localization/message'; import type { Column } from '../columns_controller/m_columns_controller'; import type { DataController, Filter } from '../data_controller/m_data_controller'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/selection/m_selection.ts b/packages/devextreme/js/__internal/grids/grid_core/selection/m_selection.ts index f285d250cc38..0c91b098fa77 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/selection/m_selection.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/selection/m_selection.ts @@ -1,4 +1,10 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import holdEvent from '@js/common/core/events/hold'; +import { addNamespace, isCommandKeyPressed } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; +import { applyBatch } from '@js/common/data/array_utils'; import $ from '@js/core/renderer'; import { equalByValue } from '@js/core/utils/common'; import type { DeferredObj } from '@js/core/utils/deferred'; @@ -6,12 +12,6 @@ import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined } from '@js/core/utils/type'; -import { applyBatch } from '@js/data/array_utils'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import holdEvent from '@js/events/hold'; -import { addNamespace, isCommandKeyPressed } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import errors from '@js/ui/widget/ui.errors'; import supportUtils from '@ts/core/utils/m_support'; import type { ColumnHeadersView } from '@ts/grids/grid_core/column_headers/m_column_headers'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting.ts b/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting.ts index 9bdd1b6867c7..a9c53b297c68 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting.ts @@ -1,10 +1,10 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, isCommandKeyPressed } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { isDefined } from '@js/core/utils/type'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, isCommandKeyPressed } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import type { ColumnHeadersView } from '@ts/grids/grid_core/column_headers/m_column_headers'; import type { HeaderPanel } from '@ts/grids/grid_core/header_panel/m_header_panel'; import type { ModuleType } from '@ts/grids/grid_core/m_types'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting_mixin.ts b/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting_mixin.ts index 089620c6a2db..6e47646043a8 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting_mixin.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/sorting/m_sorting_mixin.ts @@ -1,6 +1,6 @@ +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { isDefined } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import type { ModuleType } from '@ts/grids/grid_core/m_types'; const SORT_CLASS = 'dx-sort'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/state_storing/m_state_storing_core.ts b/packages/devextreme/js/__internal/grids/grid_core/state_storing/m_state_storing_core.ts index 62a492635cf6..81e653e05061 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/state_storing/m_state_storing_core.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/state_storing/m_state_storing_core.ts @@ -1,3 +1,4 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; // @ts-expect-error import { fromPromise } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; @@ -5,7 +6,6 @@ import { each } from '@js/core/utils/iterator'; import { sessionStorage } from '@js/core/utils/storage'; import { isDefined, isEmptyObject, isPlainObject } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; import errors from '@js/ui/widget/ui.errors'; import type { ExportController } from '@ts/grids/data_grid/export/m_export'; import type { ColumnsController } from '@ts/grids/grid_core/columns_controller/m_columns_controller'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/validating/m_validating.ts b/packages/devextreme/js/__internal/grids/grid_core/validating/m_validating.ts index 1813541f9a98..84574c29c998 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/validating/m_validating.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/validating/m_validating.ts @@ -1,5 +1,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable max-classes-per-file */ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import messageLocalization from '@js/common/core/localization/message'; +import { createObjectWithChanges } from '@js/common/data/array_utils'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import browser from '@js/core/utils/browser'; @@ -14,10 +18,6 @@ import { } from '@js/core/utils/size'; import { encodeHtml } from '@js/core/utils/string'; import { isDefined, isEmptyObject, isObject } from '@js/core/utils/type'; -import { createObjectWithChanges } from '@js/data/array_utils'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import LoadIndicator from '@js/ui/load_indicator'; import Overlay from '@js/ui/overlay/ui.overlay'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/views/m_columns_view.ts b/packages/devextreme/js/__internal/grids/grid_core/views/m_columns_view.ts index 6c59de1a57e1..6ec48dc84253 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/views/m_columns_view.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/views/m_columns_view.ts @@ -1,4 +1,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as dblclickEvent } from '@js/common/core/events/double_click'; +import pointerEvents from '@js/common/core/events/pointer'; +import { removeEvent } from '@js/common/core/events/remove'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; import { data as elementData } from '@js/core/element_data'; @@ -21,11 +26,6 @@ import { isRenderer, isString, } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as dblclickEvent } from '@js/events/double_click'; -import pointerEvents from '@js/events/pointer'; -import { removeEvent } from '@js/events/remove'; import supportUtils from '@ts/core/utils/m_support'; import type { AdaptiveColumnsController } from '@ts/grids/grid_core/adaptivity/m_adaptivity'; import type { ColumnChooserController, ColumnChooserView } from '@ts/grids/grid_core/column_chooser/m_column_chooser'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts b/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts index 8f16b49b3026..27a873c482ed 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts @@ -1,4 +1,5 @@ /* eslint-disable max-classes-per-file */ +import messageLocalization from '@js/common/core/localization/message'; import domAdapter from '@js/core/dom_adapter'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -11,7 +12,6 @@ import { getBoundingRect } from '@js/core/utils/position'; import { getHeight, getWidth } from '@js/core/utils/size'; import { isDefined, isNumeric, isString } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; import * as accessibility from '@js/ui/shared/accessibility'; import type { EditorFactory } from '@ts/grids/grid_core/editor_factory/m_editor_factory'; import { A11yStatusContainerComponent } from '@ts/grids/grid_core/views/a11y_status_container_component'; diff --git a/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts b/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts index 654e98ca9cba..f604ad7aeb38 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts @@ -1,5 +1,8 @@ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ /* eslint-disable @typescript-eslint/no-unused-vars */ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; +import messageLocalization from '@js/common/core/localization/message'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import browser from '@js/core/utils/browser'; @@ -13,9 +16,6 @@ import { isEmpty } from '@js/core/utils/string'; import { setHeight } from '@js/core/utils/style'; import { isDefined, isNumeric, isString } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; -import messageLocalization from '@js/localization/message'; import Scrollable from '@js/ui/scroll_view/ui.scrollable'; import type { ColumnHeadersView } from '@ts/grids/grid_core/column_headers/m_column_headers'; import type { diff --git a/packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/m_virtual_scrolling_core.ts b/packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/m_virtual_scrolling_core.ts index 94c528bfed7f..6126c458ccc9 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/m_virtual_scrolling_core.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/m_virtual_scrolling_core.ts @@ -1,4 +1,5 @@ -import positionUtils from '@js/animation/position'; +import positionUtils from '@js/common/core/animation/position'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import $ from '@js/core/renderer'; import browser from '@js/core/utils/browser'; import Callbacks from '@js/core/utils/callbacks'; @@ -6,7 +7,6 @@ import { Deferred } from '@js/core/utils/deferred'; import { each } from '@js/core/utils/iterator'; import { isDefined } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; import gridCoreUtils from '../m_utils'; import { VirtualDataLoader } from '../virtual_data_loader/m_virtual_data_loader'; @@ -27,7 +27,6 @@ function subscribeToExternalScrollers($element, scrollChangedHandler, $targetEle function getElementOffset(scrollable) { const $scrollableElement = scrollable.element ? scrollable.$element() : scrollable; - // @ts-expect-error const scrollableOffset = positionUtils.offset($scrollableElement); if (!scrollableOffset) { diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/data_source/m_data_source.ts b/packages/devextreme/js/__internal/grids/pivot_grid/data_source/m_data_source.ts index e918861e9f53..1e0dfc4edce2 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/data_source/m_data_source.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/data_source/m_data_source.ts @@ -1,3 +1,5 @@ +import Store from '@js/common/data/abstract_store'; +import { normalizeDataSourceOptions } from '@js/common/data/data_source/utils'; import Class from '@js/core/class'; import { EventsStrategy } from '@js/core/events_strategy'; import { normalizeIndexes } from '@js/core/utils/array'; @@ -8,8 +10,6 @@ import { isDefined, isFunction, isNumeric, isPlainObject, isString, } from '@js/core/utils/type'; -import Store from '@js/data/abstract_store'; -import { normalizeDataSourceOptions } from '@js/data/data_source/utils'; import commonUtils from '@ts/core/utils/m_common'; import inflector from '@ts/core/utils/m_inflector'; diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/export/m_export.ts b/packages/devextreme/js/__internal/grids/pivot_grid/export/m_export.ts index 2eb856688eaa..62779c70e2be 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/export/m_export.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/export/m_export.ts @@ -1,3 +1,4 @@ +import localizationNumber from '@js/common/core/localization/number'; import Class from '@js/core/class'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; @@ -6,7 +7,6 @@ import { getDefaultAlignment } from '@js/core/utils/position'; import { isDefined, isFunction } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; import formatHelper from '@js/format_helper'; -import localizationNumber from '@js/localization/number'; import { prepareItems } from '@ts/grids/grid_core/m_export'; const DEFAULT_DATA_TYPE = 'string'; diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser.ts b/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser.ts index 8de13c1f0cf1..91a449e64ae4 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser.ts @@ -1,5 +1,6 @@ import '../data_source/m_data_source'; +import localizationMessage from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; @@ -7,7 +8,6 @@ import { getImageContainer } from '@js/core/utils/icon'; import { each } from '@js/core/utils/iterator'; import { isDefined } from '@js/core/utils/type'; import { hasWindow as hasWindowFn } from '@js/core/utils/window'; -import localizationMessage from '@js/localization/message'; import ContextMenu from '@js/ui/context_menu'; import TreeView from '@js/ui/tree_view'; diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser_base.ts b/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser_base.ts index f5529b5637a7..97457a57e1e8 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser_base.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/field_chooser/m_field_chooser_base.ts @@ -1,14 +1,14 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import localizationMessage from '@js/common/core/localization/message'; +import { ArrayStore } from '@js/common/data'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each, map } from '@js/core/utils/iterator'; import { isDefined } from '@js/core/utils/type'; -import ArrayStore from '@js/data/array_store'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import localizationMessage from '@js/localization/message'; import Widget from '@js/ui/widget/ui.widget'; import columnStateMixin from '@ts/grids/grid_core/column_state_mixin/m_column_state_mixin'; import { diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/local_store/m_local_store.ts b/packages/devextreme/js/__internal/grids/pivot_grid/local_store/m_local_store.ts index 8bf174c771ab..8c40d6bcc4a6 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/local_store/m_local_store.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/local_store/m_local_store.ts @@ -1,3 +1,7 @@ +import { ArrayStore, CustomStore, query as dataQuery } from '@js/common/data'; +import { DataSource } from '@js/common/data/data_source/data_source'; +// eslint-disable-next-line import/extensions +import { aggregators } from '@js/common/data/utils'; import Class from '@js/core/class'; import { noop } from '@js/core/utils/common'; import { compileGetter, toComparable } from '@js/core/utils/data'; @@ -5,13 +9,6 @@ import dateSerialization from '@js/core/utils/date_serialization'; import { Deferred, when } from '@js/core/utils/deferred'; import { each } from '@js/core/utils/iterator'; import { isDefined, isNumeric, isString } from '@js/core/utils/type'; -import ArrayStore from '@js/data/array_store'; -import CustomStore from '@js/data/custom_store'; -import { DataSource } from '@js/data/data_source/data_source'; -import dataQuery from '@js/data/query'; -// eslint-disable-next-line import/extensions -// @ts-expect-error -import { aggregators } from '@js/data/utils'; import { discoverObjectFields, diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/m_widget.ts b/packages/devextreme/js/__internal/grids/pivot_grid/m_widget.ts index 3253b006ca7a..903711ff9f93 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/m_widget.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/m_widget.ts @@ -1,3 +1,7 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import localizationMessage from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import { getPublicElement } from '@js/core/element'; import $ from '@js/core/renderer'; @@ -12,10 +16,6 @@ import { import { format as formatString } from '@js/core/utils/string'; import { isDefined } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; -import localizationMessage from '@js/localization/message'; import type { Properties } from '@js/ui/button'; import Button from '@js/ui/button'; import ContextMenu from '@js/ui/context_menu'; diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/m_widget_utils.ts b/packages/devextreme/js/__internal/grids/pivot_grid/m_widget_utils.ts index 697ddbd57e77..74032611b459 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/m_widget_utils.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/m_widget_utils.ts @@ -1,3 +1,6 @@ +import localizationDate from '@js/common/core/localization/date'; +import { ArrayStore } from '@js/common/data'; +import { DataSource } from '@js/common/data/data_source/data_source'; import domAdapter from '@js/core/dom_adapter'; import coreAjaxUtils from '@js/core/utils/ajax'; import callOnce from '@js/core/utils/call_once'; @@ -6,10 +9,7 @@ import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each, map } from '@js/core/utils/iterator'; import { isDefined, isNumeric, type } from '@js/core/utils/type'; -import ArrayStore from '@js/data/array_store'; -import { DataSource } from '@js/data/data_source/data_source'; import formatHelper from '@js/format_helper'; -import localizationDate from '@js/localization/date'; import { CLASSES } from './const'; diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/remote_store/m_remote_store.ts b/packages/devextreme/js/__internal/grids/pivot_grid/remote_store/m_remote_store.ts index 6e480b6e7a35..2ad0119a8873 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/remote_store/m_remote_store.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/remote_store/m_remote_store.ts @@ -1,11 +1,11 @@ +import { DataSource } from '@js/common/data/data_source/data_source'; +import { normalizeLoadResult } from '@js/common/data/data_source/utils'; import Class from '@js/core/class'; import dateSerialization from '@js/core/utils/date_serialization'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isString } from '@js/core/utils/type'; -import { DataSource } from '@js/data/data_source/data_source'; -import { normalizeLoadResult } from '@js/data/data_source/utils'; import pivotGridUtils, { capitalizeFirstLetter, diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/sortable/m_sortable.ts b/packages/devextreme/js/__internal/grids/pivot_grid/sortable/m_sortable.ts index 9b2599eb8b60..b8d8acbac108 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/sortable/m_sortable.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/sortable/m_sortable.ts @@ -1,3 +1,13 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + drop as dragEventDrop, + end as dragEventEnd, + enter as dragEventEnter, + leave as dragEventLeave, + move as dragEventMove, + start as dragEventStart, +} from '@js/common/core/events/drag'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import DOMComponent from '@js/core/dom_component'; @@ -9,16 +19,6 @@ import { setWidth, } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { - drop as dragEventDrop, - end as dragEventEnd, - enter as dragEventEnter, - leave as dragEventLeave, - move as dragEventMove, - start as dragEventStart, -} from '@js/events/drag'; -import { addNamespace } from '@js/events/utils/index'; import swatchContainer from '@js/ui/widget/swatch_container'; const { getSwatchContainer } = swatchContainer; diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/xmla_store/m_xmla_store.ts b/packages/devextreme/js/__internal/grids/pivot_grid/xmla_store/m_xmla_store.ts index 0c169ba4ca76..fffca92b9638 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/xmla_store/m_xmla_store.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/xmla_store/m_xmla_store.ts @@ -1,3 +1,5 @@ +import { getLanguageId } from '@js/common/core/localization/language_codes'; +import { errors } from '@js/common/data/errors'; import Class from '@js/core/class'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; @@ -9,9 +11,6 @@ import { isDefined, isFunction, isNumeric, isString, } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -// @ts-expect-error -import { errors } from '@js/data/errors'; -import { getLanguageId } from '@js/localization/language_codes'; import pivotGridUtils, { foreachTree, @@ -70,7 +69,7 @@ const XmlaStore = Class.inherit((function () { xml = undefined; } if (!xml || xml.getElementsByTagName('parsererror').length || xml.childNodes.length === 0) { - throw new errors.Error('E4023', text); + throw errors.Error('E4023', text); } } catch (e: any) { deferred.reject({ @@ -833,7 +832,7 @@ const XmlaStore = Class.inherit((function () { if (errorElement.length) { const description = errorElement.attr('Description'); - const error = new errors.Error('E4000', description); + const error = errors.Error('E4000', description); errors.log('E4000', description); return error; } diff --git a/packages/devextreme/js/__internal/grids/tree_list/data_source_adapter/m_data_source_adapter.ts b/packages/devextreme/js/__internal/grids/tree_list/data_source_adapter/m_data_source_adapter.ts index 68c1d7fef938..22142820ca32 100644 --- a/packages/devextreme/js/__internal/grids/tree_list/data_source_adapter/m_data_source_adapter.ts +++ b/packages/devextreme/js/__internal/grids/tree_list/data_source_adapter/m_data_source_adapter.ts @@ -1,13 +1,13 @@ +import { query } from '@js/common/data'; +import ArrayStore from '@js/common/data/array_store'; +import { createObjectWithChanges } from '@js/common/data/array_utils'; +import storeHelper from '@js/common/data/store_helper'; import { equalByValue } from '@js/core/utils/common'; import { compileGetter, compileSetter } from '@js/core/utils/data'; import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isFunction } from '@js/core/utils/type'; -import ArrayStore from '@js/data/array_store'; -import { createObjectWithChanges } from '@js/data/array_utils'; -import query from '@js/data/query'; -import storeHelper from '@js/data/store_helper'; import errors from '@js/ui/widget/ui.errors'; import DataSourceAdapter from '@ts/grids/grid_core/data_source_adapter/m_data_source_adapter'; import gridCoreUtils from '@ts/grids/grid_core/m_utils'; diff --git a/packages/devextreme/js/__internal/grids/tree_list/editing/m_editing.ts b/packages/devextreme/js/__internal/grids/tree_list/editing/m_editing.ts index 2bf1d2d645c0..3473089fbc3a 100644 --- a/packages/devextreme/js/__internal/grids/tree_list/editing/m_editing.ts +++ b/packages/devextreme/js/__internal/grids/tree_list/editing/m_editing.ts @@ -1,11 +1,11 @@ /* eslint-disable max-classes-per-file */ import '../module_not_extended/editor_factory'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { isDefined } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import errors from '@js/ui/widget/ui.errors'; import type { DataController } from '@ts/grids/grid_core/data_controller/m_data_controller'; import { dataControllerEditingExtenderMixin, editingModule } from '@ts/grids/grid_core/editing/m_editing'; diff --git a/packages/devextreme/js/__internal/grids/tree_list/rows/m_rows.ts b/packages/devextreme/js/__internal/grids/tree_list/rows/m_rows.ts index 359bad272b51..d6dee9e48511 100644 --- a/packages/devextreme/js/__internal/grids/tree_list/rows/m_rows.ts +++ b/packages/devextreme/js/__internal/grids/tree_list/rows/m_rows.ts @@ -1,7 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; import $ from '@js/core/renderer'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; import { rowsModule, RowsView } from '@ts/grids/grid_core/views/m_rows_view'; import treeListCore from '../m_core'; diff --git a/packages/devextreme/js/__internal/m_draggable.ts b/packages/devextreme/js/__internal/m_draggable.ts index 0b9dddc299f6..effe2a324beb 100644 --- a/packages/devextreme/js/__internal/m_draggable.ts +++ b/packages/devextreme/js/__internal/m_draggable.ts @@ -1,5 +1,15 @@ -import positionUtils from '@js/animation/position'; -import { locate, move } from '@js/animation/translator'; +import positionUtils from '@js/common/core/animation/position'; +import { locate, move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + end as dragEventEnd, + enter as dragEventEnter, + leave as dragEventLeave, + move as dragEventMove, + start as dragEventStart, +} from '@js/common/core/events/drag'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, needSkipEvent } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import DOMComponent from '@js/core/dom_component'; @@ -22,16 +32,6 @@ import { quadToObject } from '@js/core/utils/string'; import { isFunction, isNumeric, isObject } from '@js/core/utils/type'; import { value as viewPort } from '@js/core/utils/view_port'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { - end as dragEventEnd, - enter as dragEventEnter, - leave as dragEventLeave, - move as dragEventMove, - start as dragEventStart, -} from '@js/events/drag'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, needSkipEvent } from '@js/events/utils/index'; import Animator from './ui/scroll_view/m_animator'; diff --git a/packages/devextreme/js/__internal/m_sortable.ts b/packages/devextreme/js/__internal/m_sortable.ts index 781a83d89ebf..32c3ec3737a3 100644 --- a/packages/devextreme/js/__internal/m_sortable.ts +++ b/packages/devextreme/js/__internal/m_sortable.ts @@ -1,5 +1,6 @@ -import fx from '@js/animation/fx'; -import { resetPosition } from '@js/animation/translator'; +import { fx } from '@js/common/core/animation'; +import { resetPosition } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import registerComponent from '@js/core/component_registrator'; import { getPublicElement } from '@js/core/element'; import $ from '@js/core/renderer'; @@ -10,7 +11,6 @@ import { getHeight, getOuterHeight, getOuterWidth, getWidth, } from '@js/core/utils/size'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; import Draggable from '@ts/m_draggable'; import { isDefined } from '../core/utils/type'; diff --git a/packages/devextreme/js/__internal/pagination/common/base_pagination_props.ts b/packages/devextreme/js/__internal/pagination/common/base_pagination_props.ts index 7e2b48c1b369..bddc0fa54a79 100644 --- a/packages/devextreme/js/__internal/pagination/common/base_pagination_props.ts +++ b/packages/devextreme/js/__internal/pagination/common/base_pagination_props.ts @@ -2,7 +2,7 @@ import type { DisplayMode } from '@js/common'; import type { PageSize } from '@js/ui/pagination_types'; import { BaseWidgetDefaultProps, type BaseWidgetProps } from '@ts/core/r1/base_props'; -import messageLocalization from '../../../localization/message'; +import messageLocalization from '../../../common/core/localization/message'; import type { EventCallback } from '../../core/r1/event_callback'; export interface BasePaginationProps extends BaseWidgetProps { diff --git a/packages/devextreme/js/__internal/pagination/drop_down_editors/select_box.tsx b/packages/devextreme/js/__internal/pagination/drop_down_editors/select_box.tsx index bce6e0ee9111..2e3a63db9898 100644 --- a/packages/devextreme/js/__internal/pagination/drop_down_editors/select_box.tsx +++ b/packages/devextreme/js/__internal/pagination/drop_down_editors/select_box.tsx @@ -1,9 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { BaseInfernoComponent } from '@devextreme/runtime/inferno'; -import type Store from '../../../data/abstract_store'; -import type DataSource from '../../../data/data_source'; -import type { Options as DataSourceOptions } from '../../../data/data_source'; +import type { DataSource, DataSourceOptions } from '../../../common/data'; +import type Store from '../../../common/data/abstract_store'; import LegacySelectBox from '../../../ui/select_box'; import { DomComponentWrapper } from '../../core/r1/dom_component_wrapper'; import type { EventCallback } from '../../core/r1/event_callback'; diff --git a/packages/devextreme/js/__internal/pagination/utils/compatibility_utils.ts b/packages/devextreme/js/__internal/pagination/utils/compatibility_utils.ts index 4881cc6d2d46..74328d9776ca 100644 --- a/packages/devextreme/js/__internal/pagination/utils/compatibility_utils.ts +++ b/packages/devextreme/js/__internal/pagination/utils/compatibility_utils.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-unsafe-return */ -import messageLocalization from '@js/localization/message'; +import messageLocalization from '@js/common/core/localization/message'; import type { PaginationConfigContextValue } from '../common/pagination_config_context'; import { PaginationConfigContext } from '../common/pagination_config_context'; diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts index a96877ded246..9b04d677e6e4 100644 --- a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts +++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts @@ -4,13 +4,13 @@ import '@js/ui/tag_box'; import '@js/ui/switch'; import '@js/ui/select_box'; +import messageLocalization from '@js/common/core/localization/message'; +import { DataSource } from '@js/common/data'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import dateUtils from '@js/core/utils/date'; import dateSerialization from '@js/core/utils/date_serialization'; import { extend } from '@js/core/utils/extend'; -import DataSource from '@js/data/data_source'; -import messageLocalization from '@js/localization/message'; import Form from '@js/ui/form'; import { current, isFluent } from '@js/ui/themes'; import { ExpressionUtils } from '@ts/scheduler/m_expression_utils'; diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_popup.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_popup.ts index 64fe53bf3ab0..ce7c358d7dc7 100644 --- a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_popup.ts +++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_popup.ts @@ -1,8 +1,8 @@ +import { triggerResizeEvent } from '@js/common/core/events/visibility_change'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import dateUtils from '@js/core/utils/date'; import { Deferred, when } from '@js/core/utils/deferred'; -import { triggerResizeEvent } from '@js/events/visibility_change'; import Popup from '@js/ui/popup/ui.popup'; import { ExpressionUtils } from '@ts/scheduler/m_expression_utils'; import { diff --git a/packages/devextreme/js/__internal/scheduler/appointments/data_provider/m_appointment_filter.ts b/packages/devextreme/js/__internal/scheduler/appointments/data_provider/m_appointment_filter.ts index f3cc15047a10..fd8871d1ef2b 100644 --- a/packages/devextreme/js/__internal/scheduler/appointments/data_provider/m_appointment_filter.ts +++ b/packages/devextreme/js/__internal/scheduler/appointments/data_provider/m_appointment_filter.ts @@ -1,9 +1,9 @@ /* eslint-disable max-classes-per-file */ +import { query } from '@js/common/data'; import { wrapToArray } from '@js/core/utils/array'; import dateUtils from '@js/core/utils/date'; import { each, map } from '@js/core/utils/iterator'; import { isDefined, isFunction } from '@js/core/utils/type'; -import query from '@js/data/query'; import { dateUtilsTs } from '@ts/core/utils/date'; import { getAppointmentTakesAllDay, getDatesWithoutTime, hasResourceValue, isDateAndTimeView, diff --git a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment.ts b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment.ts index 0dd31f4410de..f4f0e34f8b38 100644 --- a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment.ts +++ b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment.ts @@ -1,5 +1,10 @@ /* eslint-disable max-classes-per-file */ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import DOMComponent from '@js/core/dom_component'; import type { dxElementWrapper } from '@js/core/renderer'; @@ -7,11 +12,6 @@ import $ from '@js/core/renderer'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import Resizable from '@js/ui/resizable'; import { hide, show } from '@ts/ui/tooltip/m_tooltip'; diff --git a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts index 2da4eaddbc57..d695e1cb885e 100644 --- a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts +++ b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts @@ -1,5 +1,8 @@ /* eslint-disable spellcheck/spell-checker */ -import { locate, move } from '@js/animation/translator'; +import { locate, move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as dblclickEvent } from '@js/common/core/events/double_click'; +import { addNamespace, isFakeClickEvent } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; @@ -19,9 +22,6 @@ import { setOuterHeight, setOuterWidth } from '@js/core/utils/size'; import { isDeferred, isDefined, isPlainObject, isString, } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as dblclickEvent } from '@js/events/double_click'; -import { addNamespace, isFakeClickEvent } from '@js/events/utils/index'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.edit'; import { dateUtilsTs } from '@ts/core/utils/date'; diff --git a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_layout.ts b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_layout.ts index 460f0fbd9ca7..7d19d23b76d8 100644 --- a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_layout.ts +++ b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_layout.ts @@ -1,6 +1,6 @@ +import messageLocalization from '@js/common/core/localization/message'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; -import messageLocalization from '@js/localization/message'; import { APPOINTMENT_CONTENT_CLASSES } from '../m_classes'; diff --git a/packages/devextreme/js/__internal/scheduler/appointments/m_text_utils.ts b/packages/devextreme/js/__internal/scheduler/appointments/m_text_utils.ts index b9298006d4ed..066513962ec9 100644 --- a/packages/devextreme/js/__internal/scheduler/appointments/m_text_utils.ts +++ b/packages/devextreme/js/__internal/scheduler/appointments/m_text_utils.ts @@ -1,5 +1,5 @@ +import dateLocalization from '@js/common/core/localization/date'; import dateUtils from '@js/core/utils/date'; -import dateLocalization from '@js/localization/date'; export const createFormattedDateText = (options) => { const { diff --git a/packages/devextreme/js/__internal/scheduler/appointments/rendering_strategies/m_strategy_horizontal_month_line.ts b/packages/devextreme/js/__internal/scheduler/appointments/rendering_strategies/m_strategy_horizontal_month_line.ts index a39a230f7211..fff21cf6d952 100644 --- a/packages/devextreme/js/__internal/scheduler/appointments/rendering_strategies/m_strategy_horizontal_month_line.ts +++ b/packages/devextreme/js/__internal/scheduler/appointments/rendering_strategies/m_strategy_horizontal_month_line.ts @@ -1,5 +1,5 @@ +import { query } from '@js/common/data'; import dateUtils from '@js/core/utils/date'; -import query from '@js/data/query'; import { sortAppointmentsByStartDate } from '../data_provider/m_utils'; import HorizontalAppointmentsStrategy from './m_strategy_horizontal'; diff --git a/packages/devextreme/js/__internal/scheduler/header/m_date_navigator.ts b/packages/devextreme/js/__internal/scheduler/header/m_date_navigator.ts index a97f263a1ff0..826640e86704 100644 --- a/packages/devextreme/js/__internal/scheduler/header/m_date_navigator.ts +++ b/packages/devextreme/js/__internal/scheduler/header/m_date_navigator.ts @@ -1,5 +1,5 @@ +import messageLocalization from '@js/common/core/localization/message'; import dateUtils from '@js/core/utils/date'; -import messageLocalization from '@js/localization/message'; import { isMaterialBased } from '@js/ui/themes'; const { trimTime } = dateUtils; diff --git a/packages/devextreme/js/__internal/scheduler/header/m_utils.ts b/packages/devextreme/js/__internal/scheduler/header/m_utils.ts index 11a2a6b0deb7..fef9f566e07d 100644 --- a/packages/devextreme/js/__internal/scheduler/header/m_utils.ts +++ b/packages/devextreme/js/__internal/scheduler/header/m_utils.ts @@ -1,9 +1,9 @@ +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import errors from '@js/core/errors'; import dateUtils from '@js/core/utils/date'; import { camelize } from '@js/core/utils/inflector'; import { isFunction, isObject } from '@js/core/utils/type'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import { VIEWS } from '../m_constants'; diff --git a/packages/devextreme/js/__internal/scheduler/m_compact_appointments_helper.ts b/packages/devextreme/js/__internal/scheduler/m_compact_appointments_helper.ts index c43e764f13c9..2c9fa2d270e0 100644 --- a/packages/devextreme/js/__internal/scheduler/m_compact_appointments_helper.ts +++ b/packages/devextreme/js/__internal/scheduler/m_compact_appointments_helper.ts @@ -1,8 +1,8 @@ -import { locate, move } from '@js/animation/translator'; +import { locate, move } from '@js/common/core/animation/translator'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { FunctionTemplate } from '@js/core/templates/function_template'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import { createAppointmentAdapter } from './m_appointment_adapter'; diff --git a/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts b/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts index c656bfbf4069..b08fc871d1ef 100644 --- a/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts +++ b/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts @@ -1,14 +1,14 @@ /* eslint-disable max-classes-per-file, spellcheck/spell-checker */ import '@js/ui/radio_group'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import Guid from '@js/core/guid'; import $ from '@js/core/renderer'; import dateUtils from '@js/core/utils/date'; import { extend } from '@js/core/utils/extend'; import { isDefined } from '@js/core/utils/type'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import ButtonGroup from '@js/ui/button_group'; import DateBox from '@js/ui/date_box'; import Editor from '@js/ui/editor/editor'; diff --git a/packages/devextreme/js/__internal/scheduler/m_scheduler.ts b/packages/devextreme/js/__internal/scheduler/m_scheduler.ts index d399317ce3cc..5800975e9c72 100644 --- a/packages/devextreme/js/__internal/scheduler/m_scheduler.ts +++ b/packages/devextreme/js/__internal/scheduler/m_scheduler.ts @@ -1,3 +1,7 @@ +import { triggerResizeEvent } from '@js/common/core/events/visibility_change'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; +import DataHelperMixin from '@js/common/data/data_helper'; import registerComponent from '@js/core/component_registrator'; import config from '@js/core/config'; import devices from '@js/core/devices'; @@ -26,10 +30,6 @@ import { isString, } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import DataHelperMixin from '@js/data_helper'; -import { triggerResizeEvent } from '@js/events/visibility_change'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import { custom as customDialog } from '@js/ui/dialog'; import type { AppointmentTooltipShowingEvent } from '@js/ui/scheduler'; import { isMaterial, isMaterialBased } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/scheduler/r1/appointment_popup/config.ts b/packages/devextreme/js/__internal/scheduler/r1/appointment_popup/config.ts index c8bd33cec9a2..39d5b62a65f2 100644 --- a/packages/devextreme/js/__internal/scheduler/r1/appointment_popup/config.ts +++ b/packages/devextreme/js/__internal/scheduler/r1/appointment_popup/config.ts @@ -1,8 +1,8 @@ -import type { AnimationConfig } from '@js/animation/fx'; +import type { AnimationConfig } from '@js/common/core/animation'; +import messageLocalization from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import { getWidth } from '@js/core/utils/size'; import { getWindow } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; import type { IToolbarButtonConfig } from './types'; diff --git a/packages/devextreme/js/__internal/scheduler/r1/components/base/all_day_panel_title.tsx b/packages/devextreme/js/__internal/scheduler/r1/components/base/all_day_panel_title.tsx index bdc5b4b08aaa..13a65b2279e5 100644 --- a/packages/devextreme/js/__internal/scheduler/r1/components/base/all_day_panel_title.tsx +++ b/packages/devextreme/js/__internal/scheduler/r1/components/base/all_day_panel_title.tsx @@ -1,6 +1,6 @@ import type { InfernoEffect } from '@devextreme/runtime/inferno'; import { createReRenderEffect, InfernoWrapperComponent } from '@devextreme/runtime/inferno'; -import messageLocalization from '@js/localization/message'; +import messageLocalization from '@js/common/core/localization/message'; export class AllDayPanelTitle extends InfernoWrapperComponent { createEffects(): InfernoEffect[] { diff --git a/packages/devextreme/js/__internal/scheduler/r1/utils/base.ts b/packages/devextreme/js/__internal/scheduler/r1/utils/base.ts index e6d62b3559bc..623b80ddeb20 100644 --- a/packages/devextreme/js/__internal/scheduler/r1/utils/base.ts +++ b/packages/devextreme/js/__internal/scheduler/r1/utils/base.ts @@ -1,7 +1,7 @@ +import dateLocalization from '@js/common/core/localization/date'; import { equalByValue } from '@js/core/utils/common'; import dateUtils from '@js/core/utils/date'; import { isDefined } from '@js/core/utils/type'; -import dateLocalization from '@js/localization/date'; import { dateUtilsTs } from '@ts/core/utils/date'; import { VERTICAL_GROUP_COUNT_CLASSES } from '../../m_classes'; diff --git a/packages/devextreme/js/__internal/scheduler/r1/utils/format_weekday.ts b/packages/devextreme/js/__internal/scheduler/r1/utils/format_weekday.ts index eabb46e6e8de..d70223d06c11 100644 --- a/packages/devextreme/js/__internal/scheduler/r1/utils/format_weekday.ts +++ b/packages/devextreme/js/__internal/scheduler/r1/utils/format_weekday.ts @@ -1,4 +1,4 @@ -import dateLocalization from '@js/localization/date'; +import dateLocalization from '@js/common/core/localization/date'; export const formatWeekday = (date: Date): string => dateLocalization .getDayNames('abbreviated')[date.getDay()]; diff --git a/packages/devextreme/js/__internal/scheduler/r1/utils/month.ts b/packages/devextreme/js/__internal/scheduler/r1/utils/month.ts index 564312f12709..3a6f01562b6f 100644 --- a/packages/devextreme/js/__internal/scheduler/r1/utils/month.ts +++ b/packages/devextreme/js/__internal/scheduler/r1/utils/month.ts @@ -1,5 +1,5 @@ +import dateLocalization from '@js/common/core/localization/date'; import dateUtils from '@js/core/utils/date'; -import dateLocalization from '@js/localization/date'; import type { CalculateCellIndex } from '../types'; import { diff --git a/packages/devextreme/js/__internal/scheduler/r1/utils/week.ts b/packages/devextreme/js/__internal/scheduler/r1/utils/week.ts index 9ccd7560fced..720780d027b0 100644 --- a/packages/devextreme/js/__internal/scheduler/r1/utils/week.ts +++ b/packages/devextreme/js/__internal/scheduler/r1/utils/week.ts @@ -1,5 +1,5 @@ +import dateLocalization from '@js/common/core/localization/date'; import dateUtils from '@js/core/utils/date'; -import dateLocalization from '@js/localization/date'; import type { CalculateStartViewDate } from '../types'; import { diff --git a/packages/devextreme/js/__internal/scheduler/resources/m_utils.ts b/packages/devextreme/js/__internal/scheduler/resources/m_utils.ts index a6950525075d..1fc8c59c2ca7 100644 --- a/packages/devextreme/js/__internal/scheduler/resources/m_utils.ts +++ b/packages/devextreme/js/__internal/scheduler/resources/m_utils.ts @@ -1,3 +1,5 @@ +import { DataSource } from '@js/common/data/data_source/data_source'; +import { normalizeDataSourceOptions } from '@js/common/data/data_source/utils'; import { wrapToArray } from '@js/core/utils/array'; import { equalByValue } from '@js/core/utils/common'; import { compileGetter, compileSetter } from '@js/core/utils/data'; @@ -6,8 +8,6 @@ import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { deepExtendArraySafe } from '@js/core/utils/object'; import { isDefined } from '@js/core/utils/type'; -import { DataSource } from '@js/data/data_source/data_source'; -import { normalizeDataSourceOptions } from '@js/data/data_source/utils'; import { current, isFluent } from '@js/ui/themes'; import { getGroupCount, hasResourceValue } from '@ts/scheduler/r1/utils/index'; diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_agenda.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_agenda.ts index 48bf90751cf6..3e2703f6c06a 100644 --- a/packages/devextreme/js/__internal/scheduler/workspaces/m_agenda.ts +++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_agenda.ts @@ -1,3 +1,4 @@ +import dateLocalization from '@js/common/core/localization/date'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; @@ -7,7 +8,6 @@ import dateUtils from '@js/core/utils/date'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { setHeight, setOuterHeight } from '@js/core/utils/size'; -import dateLocalization from '@js/localization/date'; import { agendaUtils, formatWeekday, getVerticalGroupCountClass } from '@ts/scheduler/r1/utils/index'; import { diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_virtual_scrolling.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_virtual_scrolling.ts index 0b80c1148f07..fe016b0bfdcb 100644 --- a/packages/devextreme/js/__internal/scheduler/workspaces/m_virtual_scrolling.ts +++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_virtual_scrolling.ts @@ -1,9 +1,9 @@ /* eslint-disable max-classes-per-file */ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import domAdapter from '@js/core/dom_adapter'; import { isDefined } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; const DEFAULT_CELL_HEIGHT = 50; const MIN_CELL_WIDTH = 1; diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts index ce2f2d5d840b..fd8011b776b1 100644 --- a/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts +++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts @@ -1,4 +1,15 @@ -import { locate, resetPosition } from '@js/animation/translator'; +import { locate, resetPosition } from '@js/common/core/animation/translator'; +import { name as clickEventName } from '@js/common/core/events/click'; +import { name as contextMenuEventName } from '@js/common/core/events/contextmenu'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + drop as dragEventDrop, + enter as dragEventEnter, + leave as dragEventLeave, +} from '@js/common/core/events/drag'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, isMouseEvent } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; import $ from '@js/core/renderer'; @@ -17,17 +28,6 @@ import { } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import { name as contextMenuEventName } from '@js/events/contextmenu'; -import eventsEngine from '@js/events/core/events_engine'; -import { - drop as dragEventDrop, - enter as dragEventEnter, - leave as dragEventLeave, -} from '@js/events/drag'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, isMouseEvent } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Scrollable from '@js/ui/scroll_view/ui.scrollable'; import errors from '@js/ui/widget/ui.errors'; import { getMemoizeScrollTo } from '@ts/core/utils/scroll'; diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator_month.ts b/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator_month.ts index 20b5e5ad5137..64246160bc32 100644 --- a/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator_month.ts +++ b/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator_month.ts @@ -1,5 +1,5 @@ +import dateLocalization from '@js/common/core/localization/date'; import dateUtils from '@js/core/utils/date'; -import dateLocalization from '@js/localization/date'; import { getToday, isFirstCellInMonthWithIntervalCount, monthUtils, setOptionHour, } from '@ts/scheduler/r1/utils/index'; diff --git a/packages/devextreme/js/__internal/ui/button/button.tsx b/packages/devextreme/js/__internal/ui/button/button.tsx index 4c6c01568c63..eca0ce7f4d69 100644 --- a/packages/devextreme/js/__internal/ui/button/button.tsx +++ b/packages/devextreme/js/__internal/ui/button/button.tsx @@ -2,12 +2,12 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { createReRenderEffect, InfernoEffect, InfernoWrapperComponent } from '@devextreme/runtime/inferno'; +import { click } from '@js/common/core/events/short'; +import messageLocalization from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import { convertRulesToOptions, createDefaultOptionRules } from '@js/core/options/utils'; import { getImageSourceType } from '@js/core/utils/icon'; import { camelize } from '@js/core/utils/inflector'; -import { click } from '@js/events/short'; -import messageLocalization from '@js/localization/message'; import { current, isMaterial } from '@js/ui/themes'; import type { EffectReturn } from '@ts/core/r1/utils/effect_return'; import { getTemplate } from '@ts/core/r1/utils/index'; diff --git a/packages/devextreme/js/__internal/ui/calendar/m_calendar.base_view.ts b/packages/devextreme/js/__internal/ui/calendar/m_calendar.base_view.ts index af12441db9b4..89f9e58d8879 100644 --- a/packages/devextreme/js/__internal/ui/calendar/m_calendar.base_view.ts +++ b/packages/devextreme/js/__internal/ui/calendar/m_calendar.base_view.ts @@ -1,3 +1,9 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { start as hoverStartEventName } from '@js/common/core/events/hover'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; import { data as elementData } from '@js/core/element_data'; @@ -6,12 +12,6 @@ import { noop } from '@js/core/utils/common'; import coreDateUtils from '@js/core/utils/date'; import dateSerialization from '@js/core/utils/date_serialization'; import { extend } from '@js/core/utils/extend'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { start as hoverStartEventName } from '@js/events/hover'; -import { addNamespace } from '@js/events/utils/index'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import Widget from '@js/ui/widget/ui.widget'; // @ts-expect-error diff --git a/packages/devextreme/js/__internal/ui/calendar/m_calendar.ts b/packages/devextreme/js/__internal/ui/calendar/m_calendar.ts index ee851870fc81..ef0b48f5f88c 100644 --- a/packages/devextreme/js/__internal/ui/calendar/m_calendar.ts +++ b/packages/devextreme/js/__internal/ui/calendar/m_calendar.ts @@ -1,5 +1,11 @@ -import fx from '@js/animation/fx'; -import { move } from '@js/animation/translator'; +import { fx } from '@js/common/core/animation'; +import { move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import Swipeable from '@js/common/core/events/gesture/swipeable'; +import { end as hoverEndEventName } from '@js/common/core/events/hover'; +import { addNamespace, isCommandKeyPressed } from '@js/common/core/events/utils/index'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import Guid from '@js/core/guid'; @@ -15,12 +21,6 @@ import { isDefined, isFunction, isNumeric, isString, } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import Swipeable from '@js/events/gesture/swipeable'; -import { end as hoverEndEventName } from '@js/events/hover'; -import { addNamespace, isCommandKeyPressed } from '@js/events/utils/index'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import Editor from '@js/ui/editor/editor'; import { isFluent } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/calendar/m_calendar.views.ts b/packages/devextreme/js/__internal/ui/calendar/m_calendar.views.ts index 87026c6e198f..3a7cca47bd99 100644 --- a/packages/devextreme/js/__internal/ui/calendar/m_calendar.views.ts +++ b/packages/devextreme/js/__internal/ui/calendar/m_calendar.views.ts @@ -1,10 +1,10 @@ +import dateLocalization from '@js/common/core/localization/date'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import dateUtils from '@js/core/utils/date'; import dateSerialization from '@js/core/utils/date_serialization'; import { extend } from '@js/core/utils/extend'; -import dateLocalization from '@js/localization/date'; import BaseView from './m_calendar.base_view'; diff --git a/packages/devextreme/js/__internal/ui/chat/alertlist.ts b/packages/devextreme/js/__internal/ui/chat/alertlist.ts index 34fbcc8cccf1..e241c105b49e 100644 --- a/packages/devextreme/js/__internal/ui/chat/alertlist.ts +++ b/packages/devextreme/js/__internal/ui/chat/alertlist.ts @@ -1,5 +1,5 @@ +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; -import messageLocalization from '@js/localization/message'; import type { Alert, } from '@js/ui/chat'; diff --git a/packages/devextreme/js/__internal/ui/chat/avatar.ts b/packages/devextreme/js/__internal/ui/chat/avatar.ts index b794a3904ffe..6ad857a810c2 100644 --- a/packages/devextreme/js/__internal/ui/chat/avatar.ts +++ b/packages/devextreme/js/__internal/ui/chat/avatar.ts @@ -1,7 +1,7 @@ +import messageLocalization from '@js/common/core/localization/message'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { isDefined } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import type { WidgetOptions } from '@js/ui/widget/ui.widget'; import type { OptionChanged } from '@ts/core/widget/types'; import Widget from '@ts/core/widget/widget'; diff --git a/packages/devextreme/js/__internal/ui/chat/chat.ts b/packages/devextreme/js/__internal/ui/chat/chat.ts index 3d589021de4e..da52480d7f3f 100644 --- a/packages/devextreme/js/__internal/ui/chat/chat.ts +++ b/packages/devextreme/js/__internal/ui/chat/chat.ts @@ -1,12 +1,12 @@ +import { Guid } from '@js/common'; +import type { Format } from '@js/common/core/localization'; +import messageLocalization from '@js/common/core/localization/message'; +import type { DataSourceOptions } from '@js/common/data'; +import { DataHelperMixin } from '@js/common/data'; import registerComponent from '@js/core/component_registrator'; -import Guid from '@js/core/guid'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { isDefined } from '@js/core/utils/type'; -import type { Options as DataSourceOptions } from '@js/data/data_source'; -import DataHelperMixin from '@js/data_helper'; -import type { Format } from '@js/localization'; -import messageLocalization from '@js/localization/message'; import type { Message, MessageEnteredEvent, diff --git a/packages/devextreme/js/__internal/ui/chat/messagebox.ts b/packages/devextreme/js/__internal/ui/chat/messagebox.ts index 6453cad0ec62..b2c236b368a3 100644 --- a/packages/devextreme/js/__internal/ui/chat/messagebox.ts +++ b/packages/devextreme/js/__internal/ui/chat/messagebox.ts @@ -1,6 +1,6 @@ +import type { NativeEventInfo } from '@js/common/core/events'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; -import type { NativeEventInfo } from '@js/events'; -import messageLocalization from '@js/localization/message'; import type { ClickEvent } from '@js/ui/button'; import Button from '@js/ui/button'; import type { Properties as DOMComponentProperties } from '@ts/core/widget/dom_component'; diff --git a/packages/devextreme/js/__internal/ui/chat/messagegroup.ts b/packages/devextreme/js/__internal/ui/chat/messagegroup.ts index 5520bef856a9..aa9557e24a5b 100644 --- a/packages/devextreme/js/__internal/ui/chat/messagegroup.ts +++ b/packages/devextreme/js/__internal/ui/chat/messagegroup.ts @@ -1,10 +1,10 @@ +import type { Format } from '@js/common/core/localization'; +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import dateSerialization from '@js/core/utils/date_serialization'; import { isDate } from '@js/core/utils/type'; -import type { Format } from '@js/localization'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import type { Message } from '@js/ui/chat'; import type { WidgetOptions } from '@js/ui/widget/ui.widget'; import type { OptionChanged } from '@ts/core/widget/types'; diff --git a/packages/devextreme/js/__internal/ui/chat/messagelist.ts b/packages/devextreme/js/__internal/ui/chat/messagelist.ts index a458238c255d..f71392852490 100644 --- a/packages/devextreme/js/__internal/ui/chat/messagelist.ts +++ b/packages/devextreme/js/__internal/ui/chat/messagelist.ts @@ -1,3 +1,5 @@ +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import Guid from '@js/core/guid'; import type { DeepPartial, @@ -12,8 +14,6 @@ import { isElementInDom } from '@js/core/utils/dom'; import { getHeight } from '@js/core/utils/size'; import { isDate, isDefined } from '@js/core/utils/type'; import type { Format } from '@js/localization'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import type { Message, User } from '@js/ui/chat'; import ScrollView from '@js/ui/scroll_view'; import type { WidgetOptions } from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/chat/typingindicator.ts b/packages/devextreme/js/__internal/ui/chat/typingindicator.ts index 7182bf7a9e35..2e62ca6080fa 100644 --- a/packages/devextreme/js/__internal/ui/chat/typingindicator.ts +++ b/packages/devextreme/js/__internal/ui/chat/typingindicator.ts @@ -1,7 +1,7 @@ +import messageLocalization from '@js/common/core/localization/message'; import type { Properties as DOMComponentProperties } from '@js/core/dom_component'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; -import messageLocalization from '@js/localization/message'; import type { User } from '@js/ui/chat'; import DOMComponent from '@ts/core/widget/dom_component'; import type { OptionChanged } from '@ts/core/widget/types'; diff --git a/packages/devextreme/js/__internal/ui/collection/base.ts b/packages/devextreme/js/__internal/ui/collection/base.ts index deb3dd9d0f36..9928a0d14007 100644 --- a/packages/devextreme/js/__internal/ui/collection/base.ts +++ b/packages/devextreme/js/__internal/ui/collection/base.ts @@ -1,5 +1,5 @@ +import type { DataSource } from '@js/common/data'; import type { dxElementWrapper } from '@js/core/renderer'; -import type DataSource from '@js/data/data_source'; import type { CollectionWidgetOptions, ItemLike } from '@js/ui/collection/ui.collection_widget.base'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.base'; diff --git a/packages/devextreme/js/__internal/ui/collection/m_collection_widget.base.ts b/packages/devextreme/js/__internal/ui/collection/m_collection_widget.base.ts index 718be5a55af9..f1acb6603a61 100644 --- a/packages/devextreme/js/__internal/ui/collection/m_collection_widget.base.ts +++ b/packages/devextreme/js/__internal/ui/collection/m_collection_widget.base.ts @@ -1,3 +1,11 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import { name as contextMenuEventName } from '@js/common/core/events/contextmenu'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import holdEvent from '@js/common/core/events/hold'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, isCommandKeyPressed } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; +import { DataHelperMixin } from '@js/common/data'; import Action from '@js/core/action'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; @@ -17,14 +25,6 @@ import { each } from '@js/core/utils/iterator'; import { getOuterHeight, getOuterWidth } from '@js/core/utils/size'; import { findTemplates } from '@js/core/utils/template_manager'; import { isDefined, isFunction, isPlainObject } from '@js/core/utils/type'; -import DataHelperMixin from '@js/data_helper'; -import { name as clickEventName } from '@js/events/click'; -import { name as contextMenuEventName } from '@js/events/contextmenu'; -import eventsEngine from '@js/events/core/events_engine'; -import holdEvent from '@js/events/hold'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, isCommandKeyPressed } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import { focusable } from '@js/ui/widget/selectors'; import Widget from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/collection/m_collection_widget.edit.ts b/packages/devextreme/js/__internal/ui/collection/m_collection_widget.edit.ts index 20a164a29af9..2a6f79d24a2e 100644 --- a/packages/devextreme/js/__internal/ui/collection/m_collection_widget.edit.ts +++ b/packages/devextreme/js/__internal/ui/collection/m_collection_widget.edit.ts @@ -1,3 +1,6 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { DataSource } from '@js/common/data/data_source/data_source'; +import { normalizeLoadResult } from '@js/common/data/data_source/utils'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { compileGetter } from '@js/core/utils/data'; @@ -10,9 +13,6 @@ import { import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined } from '@js/core/utils/type'; -import { DataSource } from '@js/data/data_source/data_source'; -import { normalizeLoadResult } from '@js/data/data_source/utils'; -import eventsEngine from '@js/events/core/events_engine'; import errors from '@js/ui/widget/ui.errors'; import Selection from '@ts/ui/selection/m_selection'; diff --git a/packages/devextreme/js/__internal/ui/collection/m_collection_widget.live_update.ts b/packages/devextreme/js/__internal/ui/collection/m_collection_widget.live_update.ts index 2d0dc6e585f6..a5a7c5648097 100644 --- a/packages/devextreme/js/__internal/ui/collection/m_collection_widget.live_update.ts +++ b/packages/devextreme/js/__internal/ui/collection/m_collection_widget.live_update.ts @@ -1,3 +1,5 @@ +import { indexByKey, insert, update } from '@js/common/data/array_utils'; +import { keysEqual } from '@js/common/data/utils'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; import { findChanges } from '@js/core/utils/array_compare'; @@ -5,9 +7,6 @@ import { noop } from '@js/core/utils/common'; import { when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; -import { indexByKey, insert, update } from '@js/data/array_utils'; -// @ts-expect-error -import { keysEqual } from '@js/data/utils'; import CollectionWidget from './m_collection_widget.edit'; diff --git a/packages/devextreme/js/__internal/ui/color_box/m_color_view.ts b/packages/devextreme/js/__internal/ui/color_box/m_color_view.ts index fa15351f6048..1968b94ee191 100644 --- a/packages/devextreme/js/__internal/ui/color_box/m_color_view.ts +++ b/packages/devextreme/js/__internal/ui/color_box/m_color_view.ts @@ -1,15 +1,15 @@ -import { locate, move } from '@js/animation/translator'; import Color from '@js/color'; +import { locate, move } from '@js/common/core/animation/translator'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { isCommandKeyPressed } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import Guid from '@js/core/guid'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { getHeight, getOuterHeight, getWidth } from '@js/core/utils/size'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { isCommandKeyPressed } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Draggable from '@js/ui/draggable'; import Editor from '@js/ui/editor/editor'; import NumberBox from '@js/ui/number_box'; diff --git a/packages/devextreme/js/__internal/ui/context_menu/m_context_menu.ts b/packages/devextreme/js/__internal/ui/context_menu/m_context_menu.ts index db6054566a6b..30c11c7f6906 100644 --- a/packages/devextreme/js/__internal/ui/context_menu/m_context_menu.ts +++ b/packages/devextreme/js/__internal/ui/context_menu/m_context_menu.ts @@ -1,7 +1,11 @@ /* eslint-disable max-classes-per-file */ -import fx from '@js/animation/fx'; -import type { PositionConfig } from '@js/animation/position'; -import animationPosition from '@js/animation/position'; +import type { PositionConfig } from '@js/common/core/animation'; +import { fx } from '@js/common/core/animation'; +import animationPosition from '@js/common/core/animation/position'; +import { name as contextMenuEventName } from '@js/common/core/events/contextmenu'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import holdEvent from '@js/common/core/events/hold'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; @@ -19,10 +23,6 @@ import { isDefined, isFunction, isObject, isPlainObject, isRenderer, isWindow, } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import { name as contextMenuEventName } from '@js/events/contextmenu'; -import eventsEngine from '@js/events/core/events_engine'; -import holdEvent from '@js/events/hold'; -import { addNamespace } from '@js/events/utils/index'; import type { Item } from '@js/ui/context_menu'; import type { Properties as OverlayProperties } from '@js/ui/overlay'; import type dxOverlay from '@js/ui/overlay'; @@ -716,7 +716,6 @@ class ContextMenu extends MenuBase { this._scrollToElement($item); const submenuPosition = this._getSubmenuPosition($item); - // @ts-expect-error animationPosition.setup($submenu, submenuPosition); }); } @@ -789,7 +788,6 @@ class ContextMenu extends MenuBase { fx.stop($submenu); } - // @ts-expect-error animationPosition.setup($submenu, submenuPosition); if (animation) { diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.base.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.base.ts index b77ceedc7d34..af0d0c18a7e2 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.base.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.base.ts @@ -1,3 +1,5 @@ +import dateLocalization from '@js/common/core/localization/date'; +import messageLocalization from '@js/common/core/localization/message'; import config from '@js/core/config'; import devices from '@js/core/devices'; import browser from '@js/core/utils/browser'; @@ -9,8 +11,6 @@ import { each } from '@js/core/utils/iterator'; import { inputType } from '@js/core/utils/support'; import { isDate as isDateType, isNumeric, isString } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import dateLocalization from '@js/localization/date'; -import messageLocalization from '@js/localization/message'; import DropDownEditor from '@ts/ui/drop_down_editor/m_drop_down_editor'; import Calendar from './m_date_box.strategy.calendar'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.parts.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.parts.ts index f02403eab6ae..f22389d2aeec 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.parts.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.parts.ts @@ -1,7 +1,7 @@ +import { getPatternSetters } from '@js/common/core/localization/ldml/date.parser'; import { noop } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { fitIntoRange } from '@js/core/utils/math'; -import { getPatternSetters } from '@js/localization/ldml/date.parser'; const monthGetter = (date) => date.getMonth() + 1; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.ts index 3cc127de11ac..0d77af4f8eb6 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.mask.ts @@ -1,3 +1,10 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/common/core/events/utils/index'; +import dateLocalization from '@js/common/core/localization/date'; +import defaultDateNames from '@js/common/core/localization/default_date_names'; +import { getFormat } from '@js/common/core/localization/ldml/date.format'; +import { getRegExpInfo } from '@js/common/core/localization/ldml/date.parser'; +import numberLocalization from '@js/common/core/localization/number'; import devices from '@js/core/devices'; import browser from '@js/core/utils/browser'; import { clipboardText } from '@js/core/utils/dom'; @@ -6,13 +13,6 @@ import { fitIntoRange, inRange, sign } from '@js/core/utils/math'; import { isDate, isDefined, isFunction, isString, } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/events/utils/index'; -import dateLocalization from '@js/localization/date'; -import defaultDateNames from '@js/localization/default_date_names'; -import { getFormat } from '@js/localization/ldml/date.format'; -import { getRegExpInfo } from '@js/localization/ldml/date.parser'; -import numberLocalization from '@js/localization/number'; import DateBoxBase from './m_date_box.base'; import { getDatePartIndexByPosition, renderDateParts } from './m_date_box.mask.parts'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar.ts index bec81621a3fc..f8262d92a7fc 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar.ts @@ -1,9 +1,9 @@ +import messageLocalization from '@js/common/core/localization/message'; // @ts-expect-error import { splitPair } from '@js/core/utils/common'; import dateUtils from '@js/core/utils/date'; import { extend } from '@js/core/utils/extend'; import { isEmptyObject, isFunction } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; import Calendar from '@js/ui/calendar'; import { isMaterial } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar_with_time.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar_with_time.ts index 44daeef1e3bd..e8dde0f33e23 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar_with_time.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar_with_time.ts @@ -1,9 +1,9 @@ +import dateLocalization from '@js/common/core/localization/date'; import $ from '@js/core/renderer'; import dateUtils from '@js/core/utils/date'; import { extend } from '@js/core/utils/extend'; import { getWidth } from '@js/core/utils/size'; import { getWindow } from '@js/core/utils/window'; -import dateLocalization from '@js/localization/date'; import Box from '@js/ui/box'; import CalendarStrategy from './m_date_box.strategy.calendar'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.date_view.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.date_view.ts index ce25b0f19ac6..bdaea2cfd82a 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.date_view.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.date_view.ts @@ -1,8 +1,8 @@ +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { inputType } from '@js/core/utils/support'; import { getWindow } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; import DateBoxStrategy from './m_date_box.strategy'; import dateUtils from './m_date_utils'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.list.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.list.ts index c114e8f99fb0..9c3a104fa91b 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.list.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.list.ts @@ -1,12 +1,12 @@ import '@ts/ui/list/modules/m_selection'; +import dateLocalization from '@js/common/core/localization/date'; import { ensureDefined, noop } from '@js/core/utils/common'; import dateSerialization from '@js/core/utils/date_serialization'; import { extend } from '@js/core/utils/extend'; import { getHeight, getOuterHeight } from '@js/core/utils/size'; import { isDate } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import dateLocalization from '@js/localization/date'; import List from '@js/ui/list_light'; import { getSizeValue } from '@ts/ui/drop_down_editor/m_utils'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.ts index 2dc3574f0859..4928de858ac8 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.ts @@ -1,8 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import dateLocalization from '@js/common/core/localization/date'; import Class from '@js/core/class'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; -import eventsEngine from '@js/events/core/events_engine'; -import dateLocalization from '@js/localization/date'; const { abstract } = Class; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_utils.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_utils.ts index 3e2c68199587..28429841f8b0 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_utils.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_utils.ts @@ -1,8 +1,8 @@ +import dateLocalization from '@js/common/core/localization/date'; import $ from '@js/core/renderer'; import dateSerialization from '@js/core/utils/date_serialization'; import { each } from '@js/core/utils/iterator'; import { isDate } from '@js/core/utils/type'; -import dateLocalization from '@js/localization/date'; const DATE_COMPONENTS = ['year', 'day', 'month', 'day']; const TIME_COMPONENTS = ['hours', 'minutes', 'seconds', 'milliseconds']; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_view.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_view.ts index f67d639bb999..ed2217734bbe 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_view.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_view.ts @@ -1,9 +1,9 @@ +import dateLocalization from '@js/common/core/localization/date'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import dateUtils from '@js/core/utils/date'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; -import dateLocalization from '@js/localization/date'; import Editor from '@js/ui/editor/editor'; import uiDateUtils from './m_date_utils'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_date_view_roller.ts b/packages/devextreme/js/__internal/ui/date_box/m_date_view_roller.ts index c14f5ee0b266..74ca62286777 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_date_view_roller.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_date_view_roller.ts @@ -1,14 +1,14 @@ -import fx from '@js/animation/fx'; -import { resetPosition } from '@js/animation/translator'; +import { fx } from '@js/common/core/animation'; +import { resetPosition } from '@js/common/core/animation/translator'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { getHeight } from '@js/core/utils/size'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import { convertToLocation } from '@ts/ui/scroll_view/utils/convert_location'; import Scrollable from '../scroll_view/m_scrollable'; diff --git a/packages/devextreme/js/__internal/ui/date_box/m_time_view.ts b/packages/devextreme/js/__internal/ui/date_box/m_time_view.ts index 3f3205139499..c146f763a4ed 100644 --- a/packages/devextreme/js/__internal/ui/date_box/m_time_view.ts +++ b/packages/devextreme/js/__internal/ui/date_box/m_time_view.ts @@ -1,7 +1,7 @@ +import dateLocalization from '@js/common/core/localization/date'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; -import dateLocalization from '@js/localization/date'; import Box from '@js/ui/box'; import Editor from '@js/ui/editor/editor'; import NumberBox from '@js/ui/number_box'; diff --git a/packages/devextreme/js/__internal/ui/date_range_box/m_date_range_box.ts b/packages/devextreme/js/__internal/ui/date_range_box/m_date_range_box.ts index 5261da4a7cef..a9a104d12dd4 100644 --- a/packages/devextreme/js/__internal/ui/date_range_box/m_date_range_box.ts +++ b/packages/devextreme/js/__internal/ui/date_range_box/m_date_range_box.ts @@ -1,4 +1,7 @@ import type { Position } from '@js/common'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import config from '@js/core/config'; import devices from '@js/core/devices'; @@ -11,9 +14,6 @@ import { extend } from '@js/core/utils/extend'; import { getImageContainer } from '@js/core/utils/icon'; import { camelize } from '@js/core/utils/inflector'; import { each } from '@js/core/utils/iterator'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import type { Properties } from '@js/ui/date_range_box'; import Editor from '@js/ui/editor/editor'; import { current, isFluent, isMaterial } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/date_range_box/m_multiselect_date_box.ts b/packages/devextreme/js/__internal/ui/date_range_box/m_multiselect_date_box.ts index ebaa709861c0..71733688e805 100644 --- a/packages/devextreme/js/__internal/ui/date_range_box/m_multiselect_date_box.ts +++ b/packages/devextreme/js/__internal/ui/date_range_box/m_multiselect_date_box.ts @@ -1,8 +1,8 @@ // eslint-disable-next-line max-classes-per-file +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils'; import $ from '@js/core/renderer'; import { getWidth } from '@js/core/utils/size'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils'; // eslint-disable-next-line @typescript-eslint/consistent-type-imports import type { DateBoxBase, Properties } from '@js/ui/date_box'; import DateBox from '@js/ui/date_box'; diff --git a/packages/devextreme/js/__internal/ui/date_range_box/strategy/m_rangeCalendar.ts b/packages/devextreme/js/__internal/ui/date_range_box/strategy/m_rangeCalendar.ts index c8137ddf56da..e56696abe042 100644 --- a/packages/devextreme/js/__internal/ui/date_range_box/strategy/m_rangeCalendar.ts +++ b/packages/devextreme/js/__internal/ui/date_range_box/strategy/m_rangeCalendar.ts @@ -1,6 +1,6 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; import { extend } from '@js/core/utils/extend'; import { isFunction } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; import type Calendar from '@js/ui/calendar'; import type DateBox from '@js/ui/date_box'; diff --git a/packages/devextreme/js/__internal/ui/drawer/m_drawer.animation.ts b/packages/devextreme/js/__internal/ui/drawer/m_drawer.animation.ts index b4249c6bc0c0..bdd3d9e52b1b 100644 --- a/packages/devextreme/js/__internal/ui/drawer/m_drawer.animation.ts +++ b/packages/devextreme/js/__internal/ui/drawer/m_drawer.animation.ts @@ -1,4 +1,4 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; import { camelize } from '@js/core/utils/inflector'; export const animation = { diff --git a/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.overlap.ts b/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.overlap.ts index 5754cccc4dfc..ffa6c038f006 100644 --- a/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.overlap.ts +++ b/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.overlap.ts @@ -1,4 +1,4 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; import $ from '@js/core/renderer'; import { ensureDefined } from '@js/core/utils/common'; import { camelize } from '@js/core/utils/inflector'; diff --git a/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.push.ts b/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.push.ts index 77520c1e1205..ac51bd026c4a 100644 --- a/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.push.ts +++ b/packages/devextreme/js/__internal/ui/drawer/m_drawer.rendering.strategy.push.ts @@ -1,4 +1,4 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; import $ from '@js/core/renderer'; import { animation } from './m_drawer.animation'; diff --git a/packages/devextreme/js/__internal/ui/drawer/m_drawer.ts b/packages/devextreme/js/__internal/ui/drawer/m_drawer.ts index f1ad55b444c1..1b3692e20630 100644 --- a/packages/devextreme/js/__internal/ui/drawer/m_drawer.ts +++ b/packages/devextreme/js/__internal/ui/drawer/m_drawer.ts @@ -1,4 +1,7 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import { name as CLICK_EVENT_NAME } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { triggerResizeEvent } from '@js/common/core/events/visibility_change'; import registerComponent from '@js/core/component_registrator'; import { getPublicElement } from '@js/core/element'; import $ from '@js/core/renderer'; @@ -8,9 +11,6 @@ import { extend } from '@js/core/utils/extend'; import { getBoundingRect } from '@js/core/utils/position'; import { isDefined, isFunction } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { name as CLICK_EVENT_NAME } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { triggerResizeEvent } from '@js/events/visibility_change'; import Widget from '@js/ui/widget/ui.widget'; import { animation } from './m_drawer.animation'; diff --git a/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_button.ts b/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_button.ts index 6a85f9d55e71..577e44ea8826 100644 --- a/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_button.ts +++ b/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_button.ts @@ -1,7 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; -import eventsEngine from '@js/events/core/events_engine'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import TextEditorButton from '../text_box/texteditor_button_collection/m_button'; diff --git a/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_editor.ts b/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_editor.ts index b6d00e1c7216..36b252952a40 100644 --- a/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_editor.ts +++ b/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_editor.ts @@ -1,5 +1,9 @@ -import animationPosition from '@js/animation/position'; -import { locate, move } from '@js/animation/translator'; +import animationPosition from '@js/common/core/animation/position'; +import { locate, move } from '@js/common/core/animation/translator'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; @@ -16,10 +20,6 @@ import { each } from '@js/core/utils/iterator'; import { getDefaultAlignment } from '@js/core/utils/position'; import { isDefined } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Popup from '@js/ui/popup/ui.popup'; import TextBox from '@js/ui/text_box'; import { focused } from '@js/ui/widget/selectors'; @@ -731,9 +731,7 @@ const DropDownEditor = TextBox.inherit({ let positionSide = 'bottom'; if (this._popup && this._popup.option('visible')) { - // @ts-expect-error const { top: myTop } = animationPosition.setup(this.$element()); - // @ts-expect-error const { top: popupTop } = animationPosition.setup(this._popup.$content()); positionSide = (myTop + this.option('popupPosition').offset.v) > popupTop ? 'bottom' : 'top'; diff --git a/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_list.ts b/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_list.ts index d3414175c387..8e0de4d64e39 100644 --- a/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_list.ts +++ b/packages/devextreme/js/__internal/ui/drop_down_editor/m_drop_down_list.ts @@ -1,3 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; +import { query as dataQuery } from '@js/common/data'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import Guid from '@js/core/guid'; @@ -15,10 +19,6 @@ import { each } from '@js/core/utils/iterator'; import { getOuterHeight } from '@js/core/utils/size'; import { isDefined, isObject, isWindow } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import dataQuery from '@js/data/query'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import DataExpressionMixin from '@js/ui/editor/ui.data_expression'; import List from '@js/ui/list_light'; import errors from '@js/ui/widget/ui.errors'; diff --git a/packages/devextreme/js/__internal/ui/editor/m_data_expression.ts b/packages/devextreme/js/__internal/ui/editor/m_data_expression.ts index c61e64b46529..e754a1a477eb 100644 --- a/packages/devextreme/js/__internal/ui/editor/m_data_expression.ts +++ b/packages/devextreme/js/__internal/ui/editor/m_data_expression.ts @@ -1,3 +1,4 @@ +import { ArrayStore, DataHelperMixin, DataSource } from '@js/common/data'; import { ensureDefined, noop } from '@js/core/utils/common'; import { compileGetter, @@ -9,9 +10,6 @@ import { isDefined, isFunction, isObject as isObjectType, isString, } from '@js/core/utils/type'; import variableWrapper from '@js/core/utils/variable_wrapper'; -import ArrayStore from '@js/data/array_store'; -import { DataSource } from '@js/data/data_source/data_source'; -import DataHelperMixin from '@js/data_helper'; const DataExpressionMixin = extend({}, DataHelperMixin, { diff --git a/packages/devextreme/js/__internal/ui/editor/m_editor.ts b/packages/devextreme/js/__internal/ui/editor/m_editor.ts index fc2201b1b3e3..ceb25826f671 100644 --- a/packages/devextreme/js/__internal/ui/editor/m_editor.ts +++ b/packages/devextreme/js/__internal/ui/editor/m_editor.ts @@ -1,3 +1,5 @@ +import EventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, normalizeKeyName } from '@js/common/core/events/utils/index'; import { data } from '@js/core/element_data'; import Guid from '@js/core/guid'; import $ from '@js/core/renderer'; @@ -5,8 +7,6 @@ import Callbacks from '@js/core/utils/callbacks'; import { noop } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { hasWindow } from '@js/core/utils/window'; -import EventsEngine from '@js/events/core/events_engine'; -import { addNamespace, normalizeKeyName } from '@js/events/utils/index'; import ValidationEngine from '@js/ui/validation_engine'; import ValidationMessage from '@js/ui/validation_message'; import Widget from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/form/components/m_field_item.ts b/packages/devextreme/js/__internal/ui/form/components/m_field_item.ts index 8a30e848a70b..c54022e26604 100644 --- a/packages/devextreme/js/__internal/ui/form/components/m_field_item.ts +++ b/packages/devextreme/js/__internal/ui/form/components/m_field_item.ts @@ -1,9 +1,9 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import { getPublicElement } from '@js/core/element'; import $ from '@js/core/renderer'; import { captionize } from '@js/core/utils/inflector'; import { format } from '@js/core/utils/string'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; import { isMaterialBased } from '@js/ui/themes'; import Validator from '@js/ui/validator'; import errors from '@js/ui/widget/ui.errors'; diff --git a/packages/devextreme/js/__internal/ui/form/m_form.layout_manager.ts b/packages/devextreme/js/__internal/ui/form/m_form.layout_manager.ts index 591a96c1fc71..870f9bfe3735 100644 --- a/packages/devextreme/js/__internal/ui/form/m_form.layout_manager.ts +++ b/packages/devextreme/js/__internal/ui/form/m_form.layout_manager.ts @@ -4,6 +4,9 @@ import '@js/ui/check_box'; import '@js/ui/date_box'; import '@js/ui/button'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { removeEvent } from '@js/common/core/events/remove'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { normalizeIndexes } from '@js/core/utils/array'; @@ -17,9 +20,6 @@ import { import variableWrapper from '@js/core/utils/variable_wrapper'; // @ts-expect-error import { getCurrentScreenFactor, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { removeEvent } from '@js/events/remove'; -import messageLocalization from '@js/localization/message'; import ResponsiveBox from '@js/ui/responsive_box'; import Widget from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/form/m_form.ts b/packages/devextreme/js/__internal/ui/form/m_form.ts index 64e1f0f5463e..fde3b04ae54d 100644 --- a/packages/devextreme/js/__internal/ui/form/m_form.ts +++ b/packages/devextreme/js/__internal/ui/form/m_form.ts @@ -2,6 +2,9 @@ import './m_form.layout_manager'; import '@js/ui/validation_summary'; import '@js/ui/validation_group'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { triggerResizeEvent, triggerShownEvent } from '@js/common/core/events/visibility_change'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import config from '@js/core/config'; import { getPublicElement } from '@js/core/element'; @@ -17,9 +20,6 @@ import { } from '@js/core/utils/type'; // @ts-expect-error import { defaultScreenFactorFunc, getCurrentScreenFactor, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { triggerResizeEvent, triggerShownEvent } from '@js/events/visibility_change'; -import messageLocalization from '@js/localization/message'; import Editor from '@js/ui/editor/editor'; import Scrollable from '@js/ui/scroll_view/ui.scrollable'; import TabPanel from '@js/ui/tab_panel'; diff --git a/packages/devextreme/js/__internal/ui/hierarchical_collection/m_data_adapter.ts b/packages/devextreme/js/__internal/ui/hierarchical_collection/m_data_adapter.ts index 6825fae3427e..e3af15f04f54 100644 --- a/packages/devextreme/js/__internal/ui/hierarchical_collection/m_data_adapter.ts +++ b/packages/devextreme/js/__internal/ui/hierarchical_collection/m_data_adapter.ts @@ -1,10 +1,10 @@ +import { query } from '@js/common/data'; +import storeHelper from '@js/common/data/store_helper'; import Class from '@js/core/class'; import { noop } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isFunction } from '@js/core/utils/type'; -import query from '@js/data/query'; -import storeHelper from '@js/data/store_helper'; import TextBox from '@js/ui/text_box'; import errors from '@js/ui/widget/ui.errors'; import uiSearchBoxMixin from '@js/ui/widget/ui.search_box_mixin'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/m_html_editor.ts b/packages/devextreme/js/__internal/ui/html_editor/m_html_editor.ts index 9fe17a38b91c..3540d6232c4b 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/m_html_editor.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/m_html_editor.ts @@ -1,5 +1,11 @@ import './converters/m_delta'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import scrollEvents from '@js/common/core/events/gesture/emitter.gesture.scroll'; +// @ts-expect-error +import { Event as dxEvent } from '@js/common/core/events/index'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import config from '@js/core/config'; import devices from '@js/core/devices'; @@ -16,12 +22,6 @@ import { import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { isDefined, isFunction } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import scrollEvents from '@js/events/gesture/emitter.gesture.scroll'; -// @ts-expect-error -import { Event as dxEvent } from '@js/events/index'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import Editor from '@js/ui/editor/editor'; import { prepareScrollData } from '@ts/ui/text_box/m_utils.scroll'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_dropImage.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_dropImage.ts index 6f8ceef66a34..eb734a59f814 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_dropImage.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_dropImage.ts @@ -1,8 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import browser from '@js/core/utils/browser'; import { each } from '@js/core/utils/iterator'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import Quill from 'devextreme-quill'; import BaseModule from './m_base'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageCursor.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageCursor.ts index a8f042f84d32..e3ced1a7faa3 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageCursor.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageCursor.ts @@ -1,5 +1,5 @@ -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import Quill from 'devextreme-quill'; import BaseModule from './m_base'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageUpload.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageUpload.ts index 14b7814d9d4d..ede71155ee4d 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageUpload.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_imageUpload.ts @@ -1,8 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import FileUploader from '@js/ui/file_uploader'; import Quill from 'devextreme-quill'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_mentions.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_mentions.ts index a2499d886156..a388a9a09263 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_mentions.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_mentions.ts @@ -1,9 +1,9 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; import { getPublicElement } from '@js/core/element'; import $ from '@js/core/renderer'; import { compileGetter } from '@js/core/utils/data'; import { extend } from '@js/core/utils/extend'; import { isString } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; import type List from '@js/ui/list'; import type Popup from '@js/ui/popup'; import Quill from 'devextreme-quill'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_popup.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_popup.ts index c9c1887b245d..3bd2b87f3245 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_popup.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_popup.ts @@ -1,8 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { getHeight } from '@js/core/utils/size'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import type ListType from '@js/ui/list'; import List from '@js/ui/list_light'; import Popup from '@js/ui/popup'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_resizing.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_resizing.ts index 886c663b42d9..cde4c424f0f7 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_resizing.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_resizing.ts @@ -1,4 +1,7 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; +import { name as ClickEvent } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, normalizeKeyName } from '@js/common/core/events/utils/index'; import devices from '@js/core/devices'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -6,9 +9,6 @@ import { getBoundingRect } from '@js/core/utils/position'; import { getHeight, getOuterHeight, getOuterWidth, getWidth, } from '@js/core/utils/size'; -import { name as ClickEvent } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, normalizeKeyName } from '@js/events/utils/index'; import Resizable from '@js/ui/resizable'; import Quill from 'devextreme-quill'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableContextMenu.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableContextMenu.ts index d2311df2fff6..c777642b350d 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableContextMenu.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableContextMenu.ts @@ -1,11 +1,11 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import localizationMessage from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { camelize, titleize } from '@js/core/utils/inflector'; import { each } from '@js/core/utils/iterator'; import { isObject, isString } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; -import localizationMessage from '@js/localization/message'; import type { Item } from '@js/ui/context_menu'; import ContextMenu from '@js/ui/context_menu'; import Quill from 'devextreme-quill'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableResizing.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableResizing.ts index b5661d37ac40..8b0896f416a5 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableResizing.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_tableResizing.ts @@ -1,4 +1,6 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; @@ -8,8 +10,6 @@ import _windowResizeCallbacks from '@js/core/utils/resize_callbacks'; import { getHeight, getOuterHeight, getOuterWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import type { Properties } from '@js/ui/draggable'; import Draggable from '@js/ui/draggable'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/modules/m_toolbar.ts b/packages/devextreme/js/__internal/ui/html_editor/modules/m_toolbar.ts index c9886e82c697..108eeaed3bb4 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/modules/m_toolbar.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/modules/m_toolbar.ts @@ -2,6 +2,9 @@ import '@js/ui/select_box'; import '@ts/ui/color_box/m_color_view'; import '@js/ui/number_box'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import localizationMessage from '@js/common/core/localization/message'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; @@ -10,9 +13,6 @@ import { each } from '@js/core/utils/iterator'; import { isDefined, isEmptyObject, isObject, isString, } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; -import localizationMessage from '@js/localization/message'; import type { Item } from '@js/ui/toolbar'; import Toolbar from '@js/ui/toolbar'; import errors from '@js/ui/widget/ui.errors'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/ui/m_formDialog.ts b/packages/devextreme/js/__internal/ui/html_editor/ui/m_formDialog.ts index 432b67b44bf6..a0930e02d7de 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/ui/m_formDialog.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/ui/m_formDialog.ts @@ -1,3 +1,4 @@ +import localizationMessage from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import type { DeferredObj } from '@js/core/utils/deferred'; @@ -8,7 +9,6 @@ import { getCurrentScreenFactor, hasWindow, } from '@js/core/utils/window'; -import localizationMessage from '@js/localization/message'; import Form from '@js/ui/form'; import Popup from '@js/ui/popup'; import { isFluent, isMaterialBased } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/utils/m_image_uploader_helper.ts b/packages/devextreme/js/__internal/ui/html_editor/utils/m_image_uploader_helper.ts index 5020b1e2365c..0e4b344ece1c 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/utils/m_image_uploader_helper.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/utils/m_image_uploader_helper.ts @@ -1,11 +1,11 @@ /* eslint-disable max-classes-per-file */ +import localizationMessage from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { map } from '@js/core/utils/iterator'; import { getHeight, getWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import localizationMessage from '@js/localization/message'; import ButtonGroup from '@js/ui/button_group'; import FileUploader from '@js/ui/file_uploader'; import TextBox from '@js/ui/text_box'; diff --git a/packages/devextreme/js/__internal/ui/html_editor/utils/m_toolbar_helper.ts b/packages/devextreme/js/__internal/ui/html_editor/utils/m_toolbar_helper.ts index f107910b39a8..fd601a7300c9 100644 --- a/packages/devextreme/js/__internal/ui/html_editor/utils/m_toolbar_helper.ts +++ b/packages/devextreme/js/__internal/ui/html_editor/utils/m_toolbar_helper.ts @@ -1,10 +1,10 @@ +import localizationMessage from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { camelize } from '@js/core/utils/inflector'; import { each } from '@js/core/utils/iterator'; import { getOuterHeight, getOuterWidth, getWidth } from '@js/core/utils/size'; import { isBoolean, isDefined } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import localizationMessage from '@js/localization/message'; import ButtonGroup from '@js/ui/button_group'; import ColorBox from '@js/ui/color_box'; import Form from '@js/ui/form'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.base.ts b/packages/devextreme/js/__internal/ui/list/m_list.base.ts index fc62ab778350..a3b123cff5fa 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.base.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.base.ts @@ -1,4 +1,9 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { end as swipeEventEnd } from '@js/common/core/events/swipe'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; import Guid from '@js/core/guid'; @@ -13,11 +18,6 @@ import { each } from '@js/core/utils/iterator'; import { getHeight, getOuterHeight, setHeight } from '@js/core/utils/size'; import { isDefined, isPlainObject } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { end as swipeEventEnd } from '@js/events/swipe'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.live_update'; import ScrollView from '@js/ui/scroll_view'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.context.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.context.ts index 48ac21a6214d..4844e6a695bf 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.context.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.context.ts @@ -1,6 +1,6 @@ +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { getOuterHeight, getOuterWidth } from '@js/core/utils/size'; -import messageLocalization from '@js/localization/message'; import Overlay from '@js/ui/overlay/ui.overlay'; import { ListBase } from './m_list.base'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.reorder.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.reorder.ts index 979bf0e05366..927458f864b5 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.reorder.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.reorder.ts @@ -1,8 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { isMouseEvent } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { getWidth, setWidth } from '@js/core/utils/size'; -import eventsEngine from '@js/events/core/events_engine'; -import { isMouseEvent } from '@js/events/utils/index'; import Sortable from '@js/ui/sortable'; import EditDecorator from './m_list.edit.decorator'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.selection.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.selection.ts index 439109aaafe5..e0a5ff758ec2 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.selection.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.selection.ts @@ -1,10 +1,10 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { Deferred, type DeferredObj } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import CheckBox from '@js/ui/check_box'; import RadioButton from '@js/ui/radio_group/radio_button'; import errors from '@js/ui/widget/ui.errors'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.swipe.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.swipe.ts index 21211b6ce514..92034e437435 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.swipe.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.swipe.ts @@ -1,5 +1,5 @@ -import fx from '@js/animation/fx'; -import { move } from '@js/animation/translator'; +import { fx } from '@js/common/core/animation'; +import { move } from '@js/common/core/animation/translator'; import { Deferred } from '@js/core/utils/deferred'; import { getWidth } from '@js/core/utils/size'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.button.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.button.ts index 73b27f305daa..dfe55b474bd0 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.button.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.button.ts @@ -1,7 +1,7 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { getOuterWidth, getWidth } from '@js/core/utils/size'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import { isMaterialBased } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.slide.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.slide.ts index 06bf94d30bf7..81878f22113c 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.slide.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.slide.ts @@ -1,13 +1,13 @@ -import fx from '@js/animation/fx'; -import { locate, move } from '@js/animation/translator'; +import { fx } from '@js/common/core/animation'; +import { locate, move } from '@js/common/core/animation/translator'; +import { name as clickEventName } from '@js/common/core/events/click'; +import { active } from '@js/common/core/events/core/emitter.feedback'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { getOuterWidth, setWidth } from '@js/core/utils/size'; -import { name as clickEventName } from '@js/events/click'; -import { active } from '@js/events/core/emitter.feedback'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import ActionSheet from '@js/ui/action_sheet'; import { isMaterialBased } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.ts index 320f64e8804d..c2a2c7cbe771 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.switchable.ts @@ -1,10 +1,10 @@ +import { active } from '@js/common/core/events/core/emitter.feedback'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { getOuterHeight, setHeight } from '@js/core/utils/size'; -import { active } from '@js/events/core/emitter.feedback'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import EditDecorator from './m_list.edit.decorator'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.ts index 6eede70a613f..cf883ae334c3 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.decorator.ts @@ -1,14 +1,14 @@ -import Class from '@js/core/class'; -import $ from '@js/core/renderer'; -import { noop } from '@js/core/utils/common'; -import { getWidth } from '@js/core/utils/size'; -import eventsEngine from '@js/events/core/events_engine'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import { end as swipeEventEnd, start as swipeEventStart, swipe as swipeEventSwipe, -} from '@js/events/swipe'; -import { addNamespace } from '@js/events/utils/index'; +} from '@js/common/core/events/swipe'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import Class from '@js/core/class'; +import $ from '@js/core/renderer'; +import { noop } from '@js/core/utils/common'; +import { getWidth } from '@js/core/utils/size'; const LIST_EDIT_DECORATOR = 'dxListEditDecorator'; const SWIPE_START_EVENT_NAME = addNamespace(swipeEventStart, LIST_EDIT_DECORATOR); diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.strategy.grouped.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.strategy.grouped.ts index a1804e5b7877..72bfa9613cbe 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.strategy.grouped.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.strategy.grouped.ts @@ -1,8 +1,8 @@ +import { query } from '@js/common/data'; +import storeHelper from '@js/common/data/store_helper'; import $ from '@js/core/renderer'; import { each } from '@js/core/utils/iterator'; import { isNumeric } from '@js/core/utils/type'; -import query from '@js/data/query'; -import storeHelper from '@js/data/store_helper'; import EditStrategy from '@ts/ui/collection/m_collection_widget.edit.strategy.plain'; const LIST_ITEM_CLASS = 'dx-list-item'; diff --git a/packages/devextreme/js/__internal/ui/list/m_list.edit.ts b/packages/devextreme/js/__internal/ui/list/m_list.edit.ts index c464c048dcaf..5b8f8d09ec23 100644 --- a/packages/devextreme/js/__internal/ui/list/m_list.edit.ts +++ b/packages/devextreme/js/__internal/ui/list/m_list.edit.ts @@ -1,7 +1,7 @@ +import { isTouchEvent } from '@js/common/core/events/utils/index'; +import localizationMessage from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; -import { isTouchEvent } from '@js/events/utils/index'; -import localizationMessage from '@js/localization/message'; import { ListBase } from './m_list.base'; import EditProvider from './m_list.edit.provider'; diff --git a/packages/devextreme/js/__internal/ui/m_accordion.ts b/packages/devextreme/js/__internal/ui/m_accordion.ts index a46f7b9992ad..4aa7e2630597 100644 --- a/packages/devextreme/js/__internal/ui/m_accordion.ts +++ b/packages/devextreme/js/__internal/ui/m_accordion.ts @@ -1,4 +1,7 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; @@ -12,9 +15,6 @@ import { getImageContainer } from '@js/core/utils/icon'; import * as iteratorUtils from '@js/core/utils/iterator'; import { getHeight, getOuterHeight, setHeight } from '@js/core/utils/size'; import { isDefined, isPlainObject } from '@js/core/utils/type'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.live_update'; import { isMaterialBased } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/m_action_sheet.ts b/packages/devextreme/js/__internal/ui/m_action_sheet.ts index bbe997297eac..754c9e6d72eb 100644 --- a/packages/devextreme/js/__internal/ui/m_action_sheet.ts +++ b/packages/devextreme/js/__internal/ui/m_action_sheet.ts @@ -1,3 +1,4 @@ +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { BindableTemplate } from '@js/core/templates/bindable_template'; @@ -5,7 +6,6 @@ import { noop } from '@js/core/utils/common'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { getWindow } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.edit'; import Popover from '@js/ui/popover/ui.popover'; diff --git a/packages/devextreme/js/__internal/ui/m_autocomplete.ts b/packages/devextreme/js/__internal/ui/m_autocomplete.ts index fde9e9388e2e..0d0b5e25b557 100644 --- a/packages/devextreme/js/__internal/ui/m_autocomplete.ts +++ b/packages/devextreme/js/__internal/ui/m_autocomplete.ts @@ -1,9 +1,9 @@ +import { isCommandKeyPressed } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; -import { isCommandKeyPressed } from '@js/events/utils/index'; import DropDownList from '@js/ui/drop_down_editor/ui.drop_down_list'; const AUTOCOMPLETE_CLASS = 'dx-autocomplete'; diff --git a/packages/devextreme/js/__internal/ui/m_defer_rendering.ts b/packages/devextreme/js/__internal/ui/m_defer_rendering.ts index 1894a410a47d..75ac61edb085 100644 --- a/packages/devextreme/js/__internal/ui/m_defer_rendering.ts +++ b/packages/devextreme/js/__internal/ui/m_defer_rendering.ts @@ -1,4 +1,6 @@ -import { TransitionExecutor } from '@js/animation/transition_executor/transition_executor'; +import { TransitionExecutor } from '@js/common/core/animation/transition_executor/transition_executor'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { triggerShownEvent } from '@js/common/core/events/visibility_change'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; @@ -17,8 +19,6 @@ import { each } from '@js/core/utils/iterator'; import { getBoundingRect } from '@js/core/utils/position'; import { isPromise } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { triggerShownEvent } from '@js/events/visibility_change'; import LoadIndicator from '@js/ui/load_indicator'; import Widget from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/m_dialog.ts b/packages/devextreme/js/__internal/ui/m_dialog.ts index 5bf591ec0c58..05a3ae4c94fe 100644 --- a/packages/devextreme/js/__internal/ui/m_dialog.ts +++ b/packages/devextreme/js/__internal/ui/m_dialog.ts @@ -1,3 +1,5 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import messageLocalization from '@js/common/core/localization/message'; import Action from '@js/core/action'; import config from '@js/core/config'; import devices from '@js/core/devices'; @@ -10,8 +12,6 @@ import { getHeight, getWidth } from '@js/core/utils/size'; import { isPlainObject } from '@js/core/utils/type'; import { value as getViewport } from '@js/core/utils/view_port'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import messageLocalization from '@js/localization/message'; import Popup from '@js/ui/popup/ui.popup'; import { isFluent } from '@js/ui/themes'; import errors from '@js/ui/widget/ui.errors'; diff --git a/packages/devextreme/js/__internal/ui/m_drop_down_box.ts b/packages/devextreme/js/__internal/ui/m_drop_down_box.ts index cf6dbb96de22..dbf14e91dd60 100644 --- a/packages/devextreme/js/__internal/ui/m_drop_down_box.ts +++ b/packages/devextreme/js/__internal/ui/m_drop_down_box.ts @@ -1,3 +1,5 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { normalizeKeyName } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; @@ -9,8 +11,6 @@ import { Deferred, when } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { map } from '@js/core/utils/iterator'; import { isDefined, isObject } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { normalizeKeyName } from '@js/events/utils/index'; import DataExpressionMixin from '@js/ui/editor/ui.data_expression'; import { tabbable } from '@js/ui/widget/selectors'; import DropDownEditor from '@ts/ui/drop_down_editor/m_drop_down_editor'; diff --git a/packages/devextreme/js/__internal/ui/m_drop_down_button.ts b/packages/devextreme/js/__internal/ui/m_drop_down_button.ts index 0ea068ef0dc2..49ba7ec7a25a 100644 --- a/packages/devextreme/js/__internal/ui/m_drop_down_button.ts +++ b/packages/devextreme/js/__internal/ui/m_drop_down_button.ts @@ -1,3 +1,4 @@ +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import { getPublicElement } from '@js/core/element'; import Guid from '@js/core/guid'; @@ -10,7 +11,6 @@ import { extend } from '@js/core/utils/extend'; import { getImageContainer } from '@js/core/utils/icon'; import { isDefined, isObject, isPlainObject } from '@js/core/utils/type'; import DataController from '@js/data_controller'; -import messageLocalization from '@js/localization/message'; import ButtonGroup from '@js/ui/button_group'; import List from '@js/ui/list_light'; import Popup from '@js/ui/popup/ui.popup'; diff --git a/packages/devextreme/js/__internal/ui/m_file_uploader.ts b/packages/devextreme/js/__internal/ui/m_file_uploader.ts index a40626874bc1..9a18fdc2d69c 100644 --- a/packages/devextreme/js/__internal/ui/m_file_uploader.ts +++ b/packages/devextreme/js/__internal/ui/m_file_uploader.ts @@ -1,4 +1,8 @@ /* eslint-disable max-classes-per-file */ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, isTouchEvent } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; @@ -14,10 +18,6 @@ import { each } from '@js/core/utils/iterator'; import { getOffset, getWidth } from '@js/core/utils/size'; import { isDefined, isFunction, isNumeric } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, isTouchEvent } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import type { ButtonStyle, ButtonType } from '@js/ui/button'; import Button from '@js/ui/button'; import type { Properties as PublicProperties } from '@js/ui/file_uploader'; diff --git a/packages/devextreme/js/__internal/ui/m_gallery.ts b/packages/devextreme/js/__internal/ui/m_gallery.ts index 69f20a920198..da1f5b71aff6 100644 --- a/packages/devextreme/js/__internal/ui/m_gallery.ts +++ b/packages/devextreme/js/__internal/ui/m_gallery.ts @@ -1,5 +1,11 @@ -import fx from '@js/animation/fx'; -import { move } from '@js/animation/translator'; +import { fx } from '@js/common/core/animation'; +import { move } from '@js/common/core/animation/translator'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import Swipeable from '@js/common/core/events/gesture/swipeable'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import { triggerResizeEvent } from '@js/common/core/events/visibility_change'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; @@ -13,12 +19,6 @@ import { } from '@js/core/utils/size'; import { isDefined, isPlainObject } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import Swipeable from '@js/events/gesture/swipeable'; -import { addNamespace } from '@js/events/utils/index'; -import { triggerResizeEvent } from '@js/events/visibility_change'; -import messageLocalization from '@js/localization/message'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.edit'; import Widget from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/m_load_indicator.ts b/packages/devextreme/js/__internal/ui/m_load_indicator.ts index fb3f48ba0749..236a336da665 100644 --- a/packages/devextreme/js/__internal/ui/m_load_indicator.ts +++ b/packages/devextreme/js/__internal/ui/m_load_indicator.ts @@ -1,10 +1,10 @@ +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { getHeight, getWidth } from '@js/core/utils/size'; import { getNavigator } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; // @ts-expect-error import { current, isGeneric, isMaterialBased } from '@js/ui/themes'; import Widget from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/m_load_panel.ts b/packages/devextreme/js/__internal/ui/m_load_panel.ts index 814d508493e6..2af54f41313a 100644 --- a/packages/devextreme/js/__internal/ui/m_load_panel.ts +++ b/packages/devextreme/js/__internal/ui/m_load_panel.ts @@ -1,9 +1,9 @@ +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; -import messageLocalization from '@js/localization/message'; import LoadIndicator from '@js/ui/load_indicator'; import Overlay from '@js/ui/overlay/ui.overlay'; import { isFluent, isMaterial } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/m_lookup.ts b/packages/devextreme/js/__internal/ui/m_lookup.ts index ca59c2b8e16d..62d154414269 100644 --- a/packages/devextreme/js/__internal/ui/m_lookup.ts +++ b/packages/devextreme/js/__internal/ui/m_lookup.ts @@ -1,4 +1,6 @@ -import { locate, move, resetPosition } from '@js/animation/translator'; +import { locate, move, resetPosition } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; @@ -13,8 +15,6 @@ import { } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; import { getWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import messageLocalization from '@js/localization/message'; import DropDownList from '@js/ui/drop_down_editor/ui.drop_down_list'; import Popover from '@js/ui/popover/ui.popover'; import TextBox from '@js/ui/text_box'; diff --git a/packages/devextreme/js/__internal/ui/m_multi_view.ts b/packages/devextreme/js/__internal/ui/m_multi_view.ts index bbc5676e62c3..88ef4cec2820 100644 --- a/packages/devextreme/js/__internal/ui/m_multi_view.ts +++ b/packages/devextreme/js/__internal/ui/m_multi_view.ts @@ -1,4 +1,7 @@ -import { locate } from '@js/animation/translator'; +import { locate } from '@js/common/core/animation/translator'; +import Swipeable from '@js/common/core/events/gesture/swipeable'; +import { triggerResizeEvent } from '@js/common/core/events/visibility_change'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; @@ -9,9 +12,6 @@ import { extend } from '@js/core/utils/extend'; import { sign } from '@js/core/utils/math'; import { getWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import Swipeable from '@js/events/gesture/swipeable'; -import { triggerResizeEvent } from '@js/events/visibility_change'; -import messageLocalization from '@js/localization/message'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.live_update'; import { _translator, animation } from './multi_view/m_multi_view.animation'; diff --git a/packages/devextreme/js/__internal/ui/m_range_slider.ts b/packages/devextreme/js/__internal/ui/m_range_slider.ts index 8f0501990950..b9fd532e0ae4 100644 --- a/packages/devextreme/js/__internal/ui/m_range_slider.ts +++ b/packages/devextreme/js/__internal/ui/m_range_slider.ts @@ -1,12 +1,12 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { eventData } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; // @ts-expect-error import { applyServerDecimalSeparator } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { getWidth } from '@js/core/utils/size'; -import eventsEngine from '@js/events/core/events_engine'; -import { eventData } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Slider from '@js/ui/slider'; import SliderHandle from './slider/m_slider_handle'; diff --git a/packages/devextreme/js/__internal/ui/m_select_box.ts b/packages/devextreme/js/__internal/ui/m_select_box.ts index 5775e1abca5b..2b1f6afc8334 100644 --- a/packages/devextreme/js/__internal/ui/m_select_box.ts +++ b/packages/devextreme/js/__internal/ui/m_select_box.ts @@ -1,5 +1,7 @@ import '@ts/ui/list/modules/m_selection'; +import { normalizeKeyName } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; @@ -11,8 +13,6 @@ import { Deferred, fromPromise } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isDefined, isPromise } from '@js/core/utils/type'; -import { normalizeKeyName } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import DropDownList from '@js/ui/drop_down_editor/ui.drop_down_list'; const DISABLED_STATE_SELECTOR = '.dx-state-disabled'; diff --git a/packages/devextreme/js/__internal/ui/m_switch.ts b/packages/devextreme/js/__internal/ui/m_switch.ts index 184442a4002f..d2de40a8152d 100644 --- a/packages/devextreme/js/__internal/ui/m_switch.ts +++ b/packages/devextreme/js/__internal/ui/m_switch.ts @@ -1,4 +1,10 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import { name as clickEventName } from '@js/common/core/events/click'; +import { lock } from '@js/common/core/events/core/emitter.feedback'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import Swipeable from '@js/common/core/events/gesture/swipeable'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; @@ -6,12 +12,6 @@ import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { getBoundingRect } from '@js/core/utils/position'; import { getOuterWidth } from '@js/core/utils/size'; -import { name as clickEventName } from '@js/events/click'; -import { lock } from '@js/events/core/emitter.feedback'; -import eventsEngine from '@js/events/core/events_engine'; -import Swipeable from '@js/events/gesture/swipeable'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import Editor from '@js/ui/editor/editor'; const SWITCH_CLASS = 'dx-switch'; diff --git a/packages/devextreme/js/__internal/ui/m_tag_box.ts b/packages/devextreme/js/__internal/ui/m_tag_box.ts index 00a424704b45..52c05ea7045a 100644 --- a/packages/devextreme/js/__internal/ui/m_tag_box.ts +++ b/packages/devextreme/js/__internal/ui/m_tag_box.ts @@ -1,3 +1,8 @@ +import { name as clickEvent } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; +import { normalizeLoadResult } from '@js/common/data/data_source/utils'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; @@ -16,11 +21,6 @@ import { SelectionFilterCreator as FilterCreator } from '@js/core/utils/selectio import { getHeight, getOuterWidth } from '@js/core/utils/size'; import { isDefined, isObject, isString } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { normalizeLoadResult } from '@js/data/data_source/utils'; -import { name as clickEvent } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import SelectBox from '@js/ui/select_box'; import errors from '@js/ui/widget/ui.errors'; import caret from '@ts/ui/text_box/m_utils.caret'; diff --git a/packages/devextreme/js/__internal/ui/m_text_area.ts b/packages/devextreme/js/__internal/ui/m_text_area.ts index c44159027e0b..e96b7593b6eb 100644 --- a/packages/devextreme/js/__internal/ui/m_text_area.ts +++ b/packages/devextreme/js/__internal/ui/m_text_area.ts @@ -1,3 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import scrollEvents from '@js/common/core/events/gesture/emitter.gesture.scroll'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, eventData } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { ensureDefined, noop } from '@js/core/utils/common'; @@ -7,10 +11,6 @@ import { } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import scrollEvents from '@js/events/gesture/emitter.gesture.scroll'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, eventData } from '@js/events/utils/index'; import TextBox from '@js/ui/text_box'; import { allowScroll, prepareScrollData } from '@ts/ui/text_box/m_utils.scroll'; diff --git a/packages/devextreme/js/__internal/ui/m_track_bar.ts b/packages/devextreme/js/__internal/ui/m_track_bar.ts index d27ad1547dce..2bd30976db84 100644 --- a/packages/devextreme/js/__internal/ui/m_track_bar.ts +++ b/packages/devextreme/js/__internal/ui/m_track_bar.ts @@ -1,4 +1,4 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; diff --git a/packages/devextreme/js/__internal/ui/m_validation_engine.ts b/packages/devextreme/js/__internal/ui/m_validation_engine.ts index 2e16c4df9e42..35858d1ff3c2 100644 --- a/packages/devextreme/js/__internal/ui/m_validation_engine.ts +++ b/packages/devextreme/js/__internal/ui/m_validation_engine.ts @@ -1,4 +1,6 @@ /* eslint-disable max-classes-per-file */ +import messageLocalization from '@js/common/core/localization/message'; +import numberLocalization from '@js/common/core/localization/number'; import Class from '@js/core/class'; import errors from '@js/core/errors'; import { EventsStrategy } from '@js/core/events_strategy'; @@ -20,8 +22,6 @@ import { isPromise, isString, } from '@js/core/utils/type'; -import messageLocalization from '@js/localization/message'; -import numberLocalization from '@js/localization/number'; const EMAIL_VALIDATION_REGEX = /^[\d\w.+_-]+@[\d\w._-]+\.[\w]+$/i; diff --git a/packages/devextreme/js/__internal/ui/m_validation_summary.ts b/packages/devextreme/js/__internal/ui/m_validation_summary.ts index 1a112152a53f..d3c7ea85d50c 100644 --- a/packages/devextreme/js/__internal/ui/m_validation_summary.ts +++ b/packages/devextreme/js/__internal/ui/m_validation_summary.ts @@ -1,9 +1,9 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; import registerComponent from '@js/core/component_registrator'; // @ts-expect-error import { grep } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { each, map } from '@js/core/utils/iterator'; -import eventsEngine from '@js/events/core/events_engine'; import CollectionWidget from '@js/ui/collection/ui.collection_widget.edit'; import ValidationEngine from './m_validation_engine'; diff --git a/packages/devextreme/js/__internal/ui/map/m_map.ts b/packages/devextreme/js/__internal/ui/map/m_map.ts index 0978656a6b6b..1548b3613005 100644 --- a/packages/devextreme/js/__internal/ui/map/m_map.ts +++ b/packages/devextreme/js/__internal/ui/map/m_map.ts @@ -1,3 +1,6 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; @@ -9,9 +12,6 @@ import { extend } from '@js/core/utils/extend'; import { titleize } from '@js/core/utils/inflector'; import { each } from '@js/core/utils/iterator'; import { isNumeric } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import errors from '@js/ui/widget/ui.errors'; import Widget from '@js/ui/widget/ui.widget'; diff --git a/packages/devextreme/js/__internal/ui/map/m_provider.google_static.ts b/packages/devextreme/js/__internal/ui/map/m_provider.google_static.ts index 6ba8b1315cd9..5a9d38c315d3 100644 --- a/packages/devextreme/js/__internal/ui/map/m_provider.google_static.ts +++ b/packages/devextreme/js/__internal/ui/map/m_provider.google_static.ts @@ -1,8 +1,8 @@ import Color from '@js/color'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import { each } from '@js/core/utils/iterator'; import { getHeight, getWidth } from '@js/core/utils/size'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; import Provider from './m_provider'; diff --git a/packages/devextreme/js/__internal/ui/map/m_provider.ts b/packages/devextreme/js/__internal/ui/map/m_provider.ts index c77f1445d9a6..dd34bd4d1bbe 100644 --- a/packages/devextreme/js/__internal/ui/map/m_provider.ts +++ b/packages/devextreme/js/__internal/ui/map/m_provider.ts @@ -1,7 +1,7 @@ +import { addNamespace } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import { map } from '@js/core/utils/iterator'; import { isNumeric, isPlainObject } from '@js/core/utils/type'; -import { addNamespace } from '@js/events/utils/index'; const { abstract } = Class; diff --git a/packages/devextreme/js/__internal/ui/menu/m_menu.ts b/packages/devextreme/js/__internal/ui/menu/m_menu.ts index 09966d9edef2..519e3a827cf3 100644 --- a/packages/devextreme/js/__internal/ui/menu/m_menu.ts +++ b/packages/devextreme/js/__internal/ui/menu/m_menu.ts @@ -1,4 +1,8 @@ -import type { PositionConfig } from '@js/animation/position'; +import type { PositionConfig } from '@js/common/core/animation'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { end as hoverEventEnd } from '@js/common/core/events/hover'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import { getPublicElement } from '@js/core/element'; import type { dxElementWrapper } from '@js/core/renderer'; @@ -8,10 +12,6 @@ import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { getOuterWidth } from '@js/core/utils/size'; import { isDefined, isObject, isPlainObject } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { end as hoverEventEnd } from '@js/events/hover'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import Button from '@js/ui/button'; import type { Item } from '@js/ui/menu'; import type { Properties as OverlayProperties } from '@js/ui/overlay'; diff --git a/packages/devextreme/js/__internal/ui/menu/m_submenu.ts b/packages/devextreme/js/__internal/ui/menu/m_submenu.ts index 30ede2cb371e..96aaa27e3f9a 100644 --- a/packages/devextreme/js/__internal/ui/menu/m_submenu.ts +++ b/packages/devextreme/js/__internal/ui/menu/m_submenu.ts @@ -1,7 +1,7 @@ import '@js/ui/context_menu'; -import type { PositionConfig } from '@js/animation/position'; -import animationPosition from '@js/animation/position'; +import type { PositionConfig } from '@js/common/core/animation'; +import animationPosition from '@js/common/core/animation/position'; import { getPublicElement } from '@js/core/element'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; @@ -178,7 +178,6 @@ class Submenu extends ContextMenu { position.offset = '2.5 0'; position.at = position.my = 'right bottom'; } - // @ts-expect-error animationPosition.setup(this.$contentDelimiter, position); } diff --git a/packages/devextreme/js/__internal/ui/multi_view/m_multi_view.animation.ts b/packages/devextreme/js/__internal/ui/multi_view/m_multi_view.animation.ts index dd3f3ef4bdfb..efe04ac43cff 100644 --- a/packages/devextreme/js/__internal/ui/multi_view/m_multi_view.animation.ts +++ b/packages/devextreme/js/__internal/ui/multi_view/m_multi_view.animation.ts @@ -1,5 +1,5 @@ -import fx from '@js/animation/fx'; -import { move } from '@js/animation/translator'; +import { fx } from '@js/common/core/animation'; +import { move } from '@js/common/core/animation/translator'; import type { dxElementWrapper } from '@js/core/renderer'; // eslint-disable-next-line @typescript-eslint/naming-convention diff --git a/packages/devextreme/js/__internal/ui/number_box/m_number_box.base.ts b/packages/devextreme/js/__internal/ui/number_box/m_number_box.base.ts index 00f836ade6c6..89609c2545f6 100644 --- a/packages/devextreme/js/__internal/ui/number_box/m_number_box.base.ts +++ b/packages/devextreme/js/__internal/ui/number_box/m_number_box.base.ts @@ -1,3 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + addNamespace, getChar, isCommandKeyPressed, normalizeKeyName, +} from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; @@ -11,11 +16,6 @@ import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { fitIntoRange, inRange } from '@js/core/utils/math'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { - addNamespace, getChar, isCommandKeyPressed, normalizeKeyName, -} from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import TextEditor from '@js/ui/text_box/ui.text_editor'; import SpinButtons from './m_number_box.spins'; diff --git a/packages/devextreme/js/__internal/ui/number_box/m_number_box.caret.ts b/packages/devextreme/js/__internal/ui/number_box/m_number_box.caret.ts index 3373be789bca..88760d7972ff 100644 --- a/packages/devextreme/js/__internal/ui/number_box/m_number_box.caret.ts +++ b/packages/devextreme/js/__internal/ui/number_box/m_number_box.caret.ts @@ -1,6 +1,6 @@ +import number from '@js/common/core/localization/number'; import { escapeRegExp } from '@js/core/utils/common'; import { fitIntoRange } from '@js/core/utils/math'; -import number from '@js/localization/number'; import { getNthOccurrence, getRealSeparatorIndex, splitByIndex } from './m_utils'; diff --git a/packages/devextreme/js/__internal/ui/number_box/m_number_box.mask.ts b/packages/devextreme/js/__internal/ui/number_box/m_number_box.mask.ts index c400b56d2b2a..b5220125bf00 100644 --- a/packages/devextreme/js/__internal/ui/number_box/m_number_box.mask.ts +++ b/packages/devextreme/js/__internal/ui/number_box/m_number_box.mask.ts @@ -1,3 +1,10 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as dxDblClickEvent } from '@js/common/core/events/double_click'; +import { + addNamespace, getChar, isCommandKeyPressed, normalizeKeyName, +} from '@js/common/core/events/utils/index'; +import { getFormat as getLDMLFormat } from '@js/common/core/localization/ldml/number'; +import number from '@js/common/core/localization/number'; import devices from '@js/core/devices'; import { ensureDefined, escapeRegExp } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; @@ -5,13 +12,6 @@ import { fitIntoRange, inRange } from '@js/core/utils/math'; import { isDefined, isFunction, isNumeric, isString, } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as dxDblClickEvent } from '@js/events/double_click'; -import { - addNamespace, getChar, isCommandKeyPressed, normalizeKeyName, -} from '@js/events/utils/index'; -import { getFormat as getLDMLFormat } from '@js/localization/ldml/number'; -import number from '@js/localization/number'; import NumberBoxBase from './m_number_box.base'; import { diff --git a/packages/devextreme/js/__internal/ui/number_box/m_number_box.spin.ts b/packages/devextreme/js/__internal/ui/number_box/m_number_box.spin.ts index e793737c9572..018093e1f112 100644 --- a/packages/devextreme/js/__internal/ui/number_box/m_number_box.spin.ts +++ b/packages/devextreme/js/__internal/ui/number_box/m_number_box.spin.ts @@ -1,12 +1,12 @@ +import { lock } from '@js/common/core/events/core/emitter.feedback'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import holdEvent from '@js/common/core/events/hold'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; -import { lock } from '@js/events/core/emitter.feedback'; -import eventsEngine from '@js/events/core/events_engine'; -import holdEvent from '@js/events/hold'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import Widget from '@js/ui/widget/ui.widget'; const SPIN_CLASS = 'dx-numberbox-spin'; diff --git a/packages/devextreme/js/__internal/ui/number_box/m_number_box.spins.ts b/packages/devextreme/js/__internal/ui/number_box/m_number_box.spins.ts index edd241e304b1..5a4b212f3087 100644 --- a/packages/devextreme/js/__internal/ui/number_box/m_number_box.spins.ts +++ b/packages/devextreme/js/__internal/ui/number_box/m_number_box.spins.ts @@ -1,8 +1,8 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointer from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; -import eventsEngine from '@js/events/core/events_engine'; -import pointer from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import TextEditorButton from '@ts/ui/text_box/texteditor_button_collection/m_button'; import SpinButton from './m_number_box.spin'; diff --git a/packages/devextreme/js/__internal/ui/overlay/m_overlay.ts b/packages/devextreme/js/__internal/ui/overlay/m_overlay.ts index fff3c3b4bad1..86535626c15b 100644 --- a/packages/devextreme/js/__internal/ui/overlay/m_overlay.ts +++ b/packages/devextreme/js/__internal/ui/overlay/m_overlay.ts @@ -1,4 +1,13 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import { hideCallback as hideTopOverlayCallback } from '@js/common/core/environment/hide_callback'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + move as dragEventMove, +} from '@js/common/core/events/drag'; +import pointerEvents from '@js/common/core/events/pointer'; +import { keyboard } from '@js/common/core/events/short'; +import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/common/core/events/utils/index'; +import { triggerHidingEvent, triggerResizeEvent, triggerShownEvent } from '@js/common/core/events/visibility_change'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; @@ -17,15 +26,6 @@ import { isFunction, isObject, isPromise, isWindow, } from '@js/core/utils/type'; import { changeCallback } from '@js/core/utils/view_port'; -import eventsEngine from '@js/events/core/events_engine'; -import { - move as dragEventMove, -} from '@js/events/drag'; -import pointerEvents from '@js/events/pointer'; -import { keyboard } from '@js/events/short'; -import { addNamespace, isCommandKeyPressed, normalizeKeyName } from '@js/events/utils/index'; -import { triggerHidingEvent, triggerResizeEvent, triggerShownEvent } from '@js/events/visibility_change'; -import { hideCallback as hideTopOverlayCallback } from '@js/mobile/hide_callback'; import type OverlayInstance from '@js/ui/overlay'; import { tabbable } from '@js/ui/widget/selectors'; import uiErrors from '@js/ui/widget/ui.errors'; diff --git a/packages/devextreme/js/__internal/ui/overlay/m_overlay_position_controller.ts b/packages/devextreme/js/__internal/ui/overlay/m_overlay_position_controller.ts index c05b35db1bf7..d14bd3518c32 100644 --- a/packages/devextreme/js/__internal/ui/overlay/m_overlay_position_controller.ts +++ b/packages/devextreme/js/__internal/ui/overlay/m_overlay_position_controller.ts @@ -1,5 +1,5 @@ -import positionUtils from '@js/animation/position'; -import { locate, move, resetPosition } from '@js/animation/translator'; +import positionUtils from '@js/common/core/animation/position'; +import { locate, move, resetPosition } from '@js/common/core/animation/translator'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; @@ -162,7 +162,6 @@ class OverlayPositionController { positionWrapper() { if (this._$visualContainer) { - // @ts-expect-error positionUtils.setup(this._$wrapper, { my: 'top left', at: 'top left', of: this._$visualContainer }); } } @@ -188,7 +187,6 @@ class OverlayPositionController { this._$wrapper.css('overflow', 'hidden'); if (!this._props._skipContentPositioning) { - // @ts-expect-error const resultPosition = positionUtils.setup(this._$content, this._position); this._initialPosition = resultPosition; } diff --git a/packages/devextreme/js/__internal/ui/popover/m_popover.ts b/packages/devextreme/js/__internal/ui/popover/m_popover.ts index a44645739713..b250bf143193 100644 --- a/packages/devextreme/js/__internal/ui/popover/m_popover.ts +++ b/packages/devextreme/js/__internal/ui/popover/m_popover.ts @@ -1,5 +1,7 @@ -import positionUtils from '@js/animation/position'; -import { move } from '@js/animation/translator'; +import positionUtils from '@js/common/core/animation/position'; +import { move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; @@ -12,8 +14,6 @@ import { } from '@js/core/utils/size'; import { isObject, isString } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import Popup from '@js/ui/popup/ui.popup'; import { isMaterial, isMaterialBased } from '@js/ui/themes'; import errors from '@js/ui/widget/ui.errors'; @@ -258,7 +258,6 @@ const Popover = Popup.inherit({ this._updateContentSize(shouldUpdateDimensions); const contentPosition = this._getContainerPosition(); - // @ts-expect-error const resultLocation = positionUtils.setup(this.$overlayContent(), contentPosition); const positionSide = this._getSideByLocation(resultLocation); @@ -288,7 +287,6 @@ const Popover = Popup.inherit({ if (!this.$content() || !shouldUpdateDimensions) { return; } - // @ts-expect-error const containerLocation = positionUtils.calculate(this.$overlayContent(), this._getContainerPosition()); if ((containerLocation.h.oversize > 0) && this._isHorizontalSide() && !containerLocation.h.fit) { @@ -343,13 +341,11 @@ const Popover = Popup.inherit({ const axis = this._isVerticalSide(side) ? 'left' : 'top'; const sizeProperty = this._isVerticalSide(side) ? 'width' : 'height'; const $target = $(this._positionController._position.of); - // @ts-expect-error - const targetOffset = positionUtils.offset($target) || { top: 0, left: 0 }; - // @ts-expect-error + const targetOffset = positionUtils.offset($target) ?? { top: 0, left: 0 }; const contentOffset = positionUtils.offset(this.$overlayContent()); const arrowSize = arrowRect[sizeProperty]; - const contentLocation = contentOffset[axis]; + const contentLocation = contentOffset?.[axis]; const contentSize = getBoundingRect(this.$overlayContent().get(0))[sizeProperty]; const targetLocation = targetOffset[axis]; const targetElement = $target.get(0); diff --git a/packages/devextreme/js/__internal/ui/popover/m_popover_position_controller.ts b/packages/devextreme/js/__internal/ui/popover/m_popover_position_controller.ts index 0d00d2866111..29aa705618c1 100644 --- a/packages/devextreme/js/__internal/ui/popover/m_popover_position_controller.ts +++ b/packages/devextreme/js/__internal/ui/popover/m_popover_position_controller.ts @@ -1,4 +1,4 @@ -import positionUtils from '@js/animation/position'; +import positionUtils from '@js/common/core/animation/position'; import type { dxElementWrapper } from '@js/core/renderer'; // @ts-expect-error import { pairToObject } from '@js/core/utils/common'; @@ -93,9 +93,7 @@ class PopoverPositionController extends OverlayPositionController { } _isPopoverInside(): boolean { - // @ts-expect-error const my = positionUtils.setup.normalizeAlign(this._position.my); - // @ts-expect-error const at = positionUtils.setup.normalizeAlign(this._position.at); return my.h === at.h && my.v === at.v; @@ -110,9 +108,7 @@ class PopoverPositionController extends OverlayPositionController { } _getDisplaySide(position) { - // @ts-expect-error const my = positionUtils.setup.normalizeAlign(position.my); - // @ts-expect-error const at = positionUtils.setup.normalizeAlign(position.at); const weightSign = WEIGHT_OF_SIDES[my.h] === WEIGHT_OF_SIDES[at.h] && WEIGHT_OF_SIDES[my.v] === WEIGHT_OF_SIDES[at.v] ? -1 : 1; diff --git a/packages/devextreme/js/__internal/ui/popup/m_popup.ts b/packages/devextreme/js/__internal/ui/popup/m_popup.ts index 7739ea48e868..fac7d0cc9259 100644 --- a/packages/devextreme/js/__internal/ui/popup/m_popup.ts +++ b/packages/devextreme/js/__internal/ui/popup/m_popup.ts @@ -1,5 +1,7 @@ import '@js/ui/toolbar/ui.toolbar.base'; +import { triggerResizeEvent } from '@js/common/core/events/visibility_change'; +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; @@ -24,8 +26,6 @@ import { } from '@js/core/utils/size'; import { isDefined, isObject } from '@js/core/utils/type'; import { compare as compareVersions } from '@js/core/utils/version'; -import { triggerResizeEvent } from '@js/events/visibility_change'; -import messageLocalization from '@js/localization/message'; import Button from '@js/ui/button'; import Overlay from '@js/ui/overlay/ui.overlay'; import type { ToolbarItem } from '@js/ui/popup'; diff --git a/packages/devextreme/js/__internal/ui/popup/m_popup_drag.ts b/packages/devextreme/js/__internal/ui/popup/m_popup_drag.ts index 73ce016aa3e8..d984d73c3d58 100644 --- a/packages/devextreme/js/__internal/ui/popup/m_popup_drag.ts +++ b/packages/devextreme/js/__internal/ui/popup/m_popup_drag.ts @@ -1,15 +1,15 @@ -import { locate, move } from '@js/animation/translator'; -import domAdapter from '@js/core/dom_adapter'; -import { fitIntoRange } from '@js/core/utils/math'; -import { getOffset, getOuterHeight, getOuterWidth } from '@js/core/utils/size'; -import { isWindow } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; +import { locate, move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; import { end as dragEndEvent, move as dragMoveEvent, start as dragStartEvent, -} from '@js/events/drag'; -import { addNamespace } from '@js/events/utils/index'; +} from '@js/common/core/events/drag'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import domAdapter from '@js/core/dom_adapter'; +import { fitIntoRange } from '@js/core/utils/math'; +import { getOffset, getOuterHeight, getOuterWidth } from '@js/core/utils/size'; +import { isWindow } from '@js/core/utils/type'; const KEYBOARD_DRAG_STEP = 5; diff --git a/packages/devextreme/js/__internal/ui/popup/m_popup_position_controller.ts b/packages/devextreme/js/__internal/ui/popup/m_popup_position_controller.ts index 12334b4a5d47..1c0d46fbc48b 100644 --- a/packages/devextreme/js/__internal/ui/popup/m_popup_position_controller.ts +++ b/packages/devextreme/js/__internal/ui/popup/m_popup_position_controller.ts @@ -1,4 +1,4 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { originalViewPort } from '@js/core/utils/view_port'; diff --git a/packages/devextreme/js/__internal/ui/radio_group/m_radio_button.ts b/packages/devextreme/js/__internal/ui/radio_group/m_radio_button.ts index 36ab609b7982..fd31c1302776 100644 --- a/packages/devextreme/js/__internal/ui/radio_group/m_radio_button.ts +++ b/packages/devextreme/js/__internal/ui/radio_group/m_radio_button.ts @@ -1,10 +1,10 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import Editor from '@js/ui/editor/editor'; const RADIO_BUTTON_CLASS = 'dx-radiobutton'; diff --git a/packages/devextreme/js/__internal/ui/resizable/m_resizable.ts b/packages/devextreme/js/__internal/ui/resizable/m_resizable.ts index d02ec6cb39c0..9a3507161565 100644 --- a/packages/devextreme/js/__internal/ui/resizable/m_resizable.ts +++ b/packages/devextreme/js/__internal/ui/resizable/m_resizable.ts @@ -1,4 +1,8 @@ -import { locate, move } from '@js/animation/translator'; +import { locate, move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { end as dragEventEnd, move as dragEventMove, start as dragEventStart } from '@js/common/core/events/drag'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import { triggerResizeEvent } from '@js/common/core/events/visibility_change'; import registerComponent from '@js/core/component_registrator'; import DOMComponent from '@js/core/dom_component'; import $ from '@js/core/renderer'; @@ -12,10 +16,6 @@ import { } from '@js/core/utils/size'; import { isFunction, isPlainObject, isWindow } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { end as dragEventEnd, move as dragEventMove, start as dragEventStart } from '@js/events/drag'; -import { addNamespace } from '@js/events/utils/index'; -import { triggerResizeEvent } from '@js/events/visibility_change'; const RESIZABLE = 'dxResizable'; const RESIZABLE_CLASS = 'dx-resizable'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_animator.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_animator.ts index 65a014773612..7aff7918cecc 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_animator.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_animator.ts @@ -1,4 +1,4 @@ -import { cancelAnimationFrame, requestAnimationFrame } from '@js/animation/frame'; +import { cancelAnimationFrame, requestAnimationFrame } from '@js/common/core/animation/frame'; import Class from '@js/core/class'; import { noop } from '@js/core/utils/common'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.pull_down.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.pull_down.ts index f7c515dc6864..e8bf15657bdb 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.pull_down.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.pull_down.ts @@ -1,4 +1,4 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; import $ from '@js/core/renderer'; import Callbacks from '@js/core/utils/callbacks'; import { Deferred } from '@js/core/utils/deferred'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.swipe_down.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.swipe_down.ts index f0295cce3485..f0ebaa778434 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.swipe_down.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.native.swipe_down.ts @@ -1,9 +1,9 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; +import { eventData } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; import Callbacks from '@js/core/utils/callbacks'; import { Deferred } from '@js/core/utils/deferred'; import { getOuterHeight } from '@js/core/utils/size'; -import { eventData } from '@js/events/utils/index'; import LoadIndicator from '@js/ui/load_indicator'; import NativeStrategy from './m_scrollable.native'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.ts index d11c542cd256..6dfd0a1616aa 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scroll_view.ts @@ -1,3 +1,4 @@ +import messageLocalization from '@js/common/core/localization/message'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import { getPublicElement } from '@js/core/element'; @@ -5,7 +6,6 @@ import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { hasWindow } from '@js/core/utils/window'; -import messageLocalization from '@js/localization/message'; import LoadIndicator from '@js/ui/load_indicator'; import LoadPanel from '@js/ui/load_panel'; import { isMaterialBased } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.native.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.native.ts index 429b15cf60ba..9699c39704f4 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.native.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.native.ts @@ -1,11 +1,11 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { isDxMouseWheelEvent } from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { each } from '@js/core/utils/iterator'; import { getHeight, getWidth } from '@js/core/utils/size'; -import eventsEngine from '@js/events/core/events_engine'; -import { isDxMouseWheelEvent } from '@js/events/utils/index'; import Scrollbar from './m_scrollbar'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts index 46d3d27e2540..66309a045793 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts @@ -1,4 +1,11 @@ -import { locate, move, resetPosition } from '@js/animation/translator'; +import { locate, move, resetPosition } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { + addNamespace as addEventNamespace, + isCommandKeyPressed, + isDxMouseWheelEvent, + normalizeKeyName, +} from '@js/common/core/events/utils/index'; import Class from '@js/core/class'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; @@ -19,13 +26,6 @@ import { getBoundingRect } from '@js/core/utils/position'; import { getHeight, getWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import { - addNamespace as addEventNamespace, - isCommandKeyPressed, - isDxMouseWheelEvent, - normalizeKeyName, -} from '@js/events/utils/index'; import Animator from './m_animator'; import Scrollbar from './m_scrollbar'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.ts index 89f68984aaaf..f781eebb4fc6 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.ts @@ -1,3 +1,6 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import scrollEvents from '@js/common/core/events/gesture/emitter.gesture.scroll'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import DOMComponent from '@js/core/dom_component'; @@ -12,9 +15,6 @@ import { } from '@js/core/utils/size'; import { isDefined, isPlainObject } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import scrollEvents from '@js/events/gesture/emitter.gesture.scroll'; -import { addNamespace } from '@js/events/utils/index'; import { getElementLocationInternal } from '@ts/ui/scroll_view/utils/get_element_location_internal'; import supportUtils from '../../core/utils/m_support'; diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollbar.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollbar.ts index cdfec30b44c2..8c04a693e1bb 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollbar.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollbar.ts @@ -1,4 +1,7 @@ -import { move } from '@js/animation/translator'; +import { move } from '@js/common/core/animation/translator'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; // @ts-expect-error @@ -6,9 +9,6 @@ import { deferRenderer } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import readyCallback from '@js/core/utils/ready_callbacks'; import { isPlainObject } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import Widget from '@js/ui/widget/ui.widget'; const SCROLLBAR = 'dxScrollbar'; diff --git a/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.deferred.ts b/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.deferred.ts index 617e73cba900..dd7d7d65771b 100644 --- a/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.deferred.ts +++ b/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.deferred.ts @@ -1,7 +1,7 @@ +import { query as dataQuery } from '@js/common/data'; import type { DeferredObj } from '@js/core/utils/deferred'; import { Deferred } from '@js/core/utils/deferred'; import { isString } from '@js/core/utils/type'; -import dataQuery from '@js/data/query'; import errors from '@js/ui/widget/ui.errors'; import SelectionStrategy from './m_selection.strategy'; diff --git a/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.standard.ts b/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.standard.ts index bafa1b45fa41..e7eadf838005 100644 --- a/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.standard.ts +++ b/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.standard.ts @@ -1,3 +1,4 @@ +import { query as dataQuery } from '@js/common/data'; import { getUniqueValues, removeDuplicates } from '@js/core/utils/array'; import { isKeysEqual } from '@js/core/utils/array_compare'; import { getKeyHash } from '@js/core/utils/common'; @@ -5,7 +6,6 @@ import type { DeferredObj } from '@js/core/utils/deferred'; import { Deferred, when } from '@js/core/utils/deferred'; import { SelectionFilterCreator } from '@js/core/utils/selection_filter'; import { isDefined, isObject } from '@js/core/utils/type'; -import dataQuery from '@js/data/query'; import errors from '@js/ui/widget/ui.errors'; import SelectionStrategy from './m_selection.strategy'; diff --git a/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.ts b/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.ts index 3c8e23cfbeaf..2af464bca86d 100644 --- a/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.ts +++ b/packages/devextreme/js/__internal/ui/selection/m_selection.strategy.ts @@ -1,3 +1,4 @@ +import { query as dataQuery } from '@js/common/data'; import { equalByValue, getKeyHash, @@ -5,7 +6,6 @@ import { } from '@js/core/utils/common'; import { Deferred } from '@js/core/utils/deferred'; import { isObject, isPlainObject, isPromise } from '@js/core/utils/type'; -import dataQuery from '@js/data/query'; export default class SelectionStrategy { options: any; diff --git a/packages/devextreme/js/__internal/ui/slider/m_slider.ts b/packages/devextreme/js/__internal/ui/slider/m_slider.ts index 51f370d60ccc..cbd72f849fa1 100644 --- a/packages/devextreme/js/__internal/ui/slider/m_slider.ts +++ b/packages/devextreme/js/__internal/ui/slider/m_slider.ts @@ -1,3 +1,12 @@ +import { name as clickName } from '@js/common/core/events/click'; +import { lock } from '@js/common/core/events/core/emitter.feedback'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import Swipeable from '@js/common/core/events/gesture/swipeable'; +import pointerEvents from '@js/common/core/events/pointer'; +import { + addNamespace, eventData, isMouseEvent, isTouchEvent, +} from '@js/common/core/events/utils/index'; +import numberLocalization from '@js/common/core/localization/number'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; @@ -7,15 +16,6 @@ import { Deferred } from '@js/core/utils/deferred'; import { extend } from '@js/core/utils/extend'; import { getExponentLength, getRemainderByDivision, roundFloatPart } from '@js/core/utils/math'; import { getWidth, setWidth } from '@js/core/utils/size'; -import { name as clickName } from '@js/events/click'; -import { lock } from '@js/events/core/emitter.feedback'; -import eventsEngine from '@js/events/core/events_engine'; -import Swipeable from '@js/events/gesture/swipeable'; -import pointerEvents from '@js/events/pointer'; -import { - addNamespace, eventData, isMouseEvent, isTouchEvent, -} from '@js/events/utils/index'; -import numberLocalization from '@js/localization/number'; import { current as currentTheme, isMaterial } from '@js/ui/themes'; import { render } from '@js/ui/widget/utils.ink_ripple'; diff --git a/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip.ts b/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip.ts index d51d927804e9..784891de302f 100644 --- a/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip.ts +++ b/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip.ts @@ -1,5 +1,5 @@ +import numberLocalization from '@js/common/core/localization/number'; import { extend } from '@js/core/utils/extend'; -import numberLocalization from '@js/localization/number'; import Tooltip from '@js/ui/tooltip'; import { SliderTooltipPositionController } from './m_slider_tooltip_position_controller'; diff --git a/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip_position_controller.ts b/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip_position_controller.ts index a4b3eeb760fa..3189c9ec6f7c 100644 --- a/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip_position_controller.ts +++ b/packages/devextreme/js/__internal/ui/slider/m_slider_tooltip_position_controller.ts @@ -1,5 +1,5 @@ -import positionUtils from '@js/animation/position'; -import { move } from '@js/animation/translator'; +import positionUtils from '@js/common/core/animation/position'; +import { move } from '@js/common/core/animation/translator'; import { extend } from '@js/core/utils/extend'; import { isString } from '@js/core/utils/type'; import { PopoverPositionController } from '@ts/ui/popover/m_popover_position_controller'; @@ -36,7 +36,6 @@ class SliderTooltipPositionController extends PopoverPositionController { } _fitIntoSlider() { - // @ts-expect-error const { collisionSide, oversize } = positionUtils.calculate(this._$content, this._position).h; const { left } = this._visualPosition; const isLeftSide = collisionSide === 'left'; diff --git a/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_item.ts b/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_item.ts index cc43aca58d0f..3a8b7dd7bbea 100644 --- a/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_item.ts +++ b/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_item.ts @@ -1,11 +1,11 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { getImageContainer } from '@js/core/utils/icon'; import { isPlainObject } from '@js/core/utils/type'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; import Overlay from '@js/ui/overlay/ui.overlay'; import type { Properties as PublicProperties } from '@js/ui/speed_dial_action'; import { isMaterial } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_main_item.ts b/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_main_item.ts index 15c48196802b..0dda420c847e 100644 --- a/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_main_item.ts +++ b/packages/devextreme/js/__internal/ui/speed_dial_action/m_speed_dial_main_item.ts @@ -1,9 +1,9 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; import config from '@js/core/config'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { getHeight } from '@js/core/utils/size'; -import eventsEngine from '@js/events/core/events_engine'; import { isCompact, isFluent, isMaterial } from '@js/ui/themes'; import swatchContainer from '@js/ui/widget/swatch_container'; import errors from '@js/ui/widget/ui.errors'; diff --git a/packages/devextreme/js/__internal/ui/splitter/resize_handle.ts b/packages/devextreme/js/__internal/ui/splitter/resize_handle.ts index 6eec1305cf50..9cc1873e1d54 100644 --- a/packages/devextreme/js/__internal/ui/splitter/resize_handle.ts +++ b/packages/devextreme/js/__internal/ui/splitter/resize_handle.ts @@ -1,14 +1,14 @@ import type { DragDirection } from '@js/common'; +import { name as CLICK_EVENT } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as DOUBLE_CLICK_EVENT } from '@js/common/core/events/double_click'; +import { end as dragEventEnd, move as dragEventMove, start as dragEventStart } from '@js/common/core/events/drag'; +import { addNamespace, isCommandKeyPressed } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import Guid from '@js/core/guid'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import type { DxEvent } from '@js/events'; -import { name as CLICK_EVENT } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as DOUBLE_CLICK_EVENT } from '@js/events/double_click'; -import { end as dragEventEnd, move as dragEventMove, start as dragEventStart } from '@js/events/drag'; -import { addNamespace, isCommandKeyPressed } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import type { ItemCollapsedEvent, ItemExpandedEvent, ResizeEndEvent, ResizeEvent, ResizeStartEvent, } from '@js/ui/splitter'; diff --git a/packages/devextreme/js/__internal/ui/splitter/splitter.ts b/packages/devextreme/js/__internal/ui/splitter/splitter.ts index dbee3d77e7f5..0f906fd923b5 100644 --- a/packages/devextreme/js/__internal/ui/splitter/splitter.ts +++ b/packages/devextreme/js/__internal/ui/splitter/splitter.ts @@ -1,4 +1,5 @@ import type { Orientation } from '@js/common'; +import { lock } from '@js/common/core/events/core/emitter.feedback'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; @@ -15,7 +16,6 @@ import { } from '@js/core/utils/size'; import { isDefined, isObject } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { lock } from '@js/events/core/emitter.feedback'; import type { Item, ItemCollapsedEvent, diff --git a/packages/devextreme/js/__internal/ui/splitter/utils/layout.ts b/packages/devextreme/js/__internal/ui/splitter/utils/layout.ts index a0d846c8b177..27122e2004e5 100644 --- a/packages/devextreme/js/__internal/ui/splitter/utils/layout.ts +++ b/packages/devextreme/js/__internal/ui/splitter/utils/layout.ts @@ -1,4 +1,5 @@ import type { Orientation } from '@js/common'; +import { toFixed } from '@js/common/core/localization/utils'; import type { dxElementWrapper } from '@js/core/renderer'; import { getHeight, @@ -8,7 +9,6 @@ import { normalizeStyleProp, styleProp, } from '@js/core/utils/style'; import { isDefined, isNumeric, isString } from '@js/core/utils/type'; -import { toFixed } from '@js/localization/utils'; import type { Item } from '@js/ui/splitter'; import { compareNumbersWithPrecision, PRECISION } from './number_comparison'; diff --git a/packages/devextreme/js/__internal/ui/splitter/utils/layout_default.ts b/packages/devextreme/js/__internal/ui/splitter/utils/layout_default.ts index 798ee8a0d866..a7fa013f7288 100644 --- a/packages/devextreme/js/__internal/ui/splitter/utils/layout_default.ts +++ b/packages/devextreme/js/__internal/ui/splitter/utils/layout_default.ts @@ -1,5 +1,5 @@ +import { toFixed } from '@js/common/core/localization/utils'; import { isDefined } from '@js/core/utils/type'; -import { toFixed } from '@js/localization/utils'; import { findLastIndexOfVisibleItem, normalizePanelSize } from './layout'; import { compareNumbersWithPrecision, PRECISION } from './number_comparison'; diff --git a/packages/devextreme/js/__internal/ui/splitter/utils/number_comparison.ts b/packages/devextreme/js/__internal/ui/splitter/utils/number_comparison.ts index 670d3307dc62..0416630d991e 100644 --- a/packages/devextreme/js/__internal/ui/splitter/utils/number_comparison.ts +++ b/packages/devextreme/js/__internal/ui/splitter/utils/number_comparison.ts @@ -1,4 +1,4 @@ -import { toFixed } from '@js/localization/utils'; +import { toFixed } from '@js/common/core/localization/utils'; export const PRECISION = 10; diff --git a/packages/devextreme/js/__internal/ui/tabs/m_tabs.ts b/packages/devextreme/js/__internal/ui/tabs/m_tabs.ts index a2db08e89388..5de945ae4b4b 100644 --- a/packages/devextreme/js/__internal/ui/tabs/m_tabs.ts +++ b/packages/devextreme/js/__internal/ui/tabs/m_tabs.ts @@ -1,3 +1,7 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import holdEvent from '@js/common/core/events/hold'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import devices from '@js/core/devices'; import $ from '@js/core/renderer'; @@ -9,10 +13,6 @@ import { each } from '@js/core/utils/iterator'; import { getHeight, getOuterWidth, getWidth } from '@js/core/utils/size'; import { isDefined, isPlainObject } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; -import holdEvent from '@js/events/hold'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import Button from '@js/ui/button'; // eslint-disable-next-line import/no-named-default import { default as CollectionWidget } from '@js/ui/collection/ui.collection_widget.live_update'; diff --git a/packages/devextreme/js/__internal/ui/text_box/m_text_box.ts b/packages/devextreme/js/__internal/ui/text_box/m_text_box.ts index 4f6251a9fb85..32bfec720511 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_text_box.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_text_box.ts @@ -1,9 +1,9 @@ +import { normalizeKeyName } from '@js/common/core/events/utils/index'; import registerComponent from '@js/core/component_registrator'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import { getOuterWidth, getWidth } from '@js/core/utils/size'; import { getWindow } from '@js/core/utils/window'; -import { normalizeKeyName } from '@js/events/utils/index'; import TextEditor from './m_text_editor'; diff --git a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts index 71c712a49748..42e42501905f 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts @@ -1,3 +1,6 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace, normalizeKeyName } from '@js/common/core/events/utils/index'; import config from '@js/core/config'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; @@ -9,9 +12,6 @@ import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { getWidth } from '@js/core/utils/size'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace, normalizeKeyName } from '@js/events/utils/index'; import Editor from '@js/ui/editor/editor'; import LoadIndicator from '@js/ui/load_indicator'; import { current, isFluent, isMaterial } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.clear.ts b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.clear.ts index 19640aaf9635..98a1b9268b4a 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.clear.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.clear.ts @@ -1,8 +1,8 @@ +import { name as click } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointer from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; -import { name as click } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import pointer from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; import TextEditorButton from '@ts/ui/text_box/texteditor_button_collection/m_button'; const pointerDown = pointer.down; diff --git a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.label.ts b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.label.ts index 5aaed4429ea1..dfc4060b3a6b 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.label.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.label.ts @@ -1,13 +1,13 @@ +import { name as click } from '@js/common/core/events/click'; +import { active } from '@js/common/core/events/core/emitter.feedback'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { start as hoverStart } from '@js/common/core/events/hover'; +import { addNamespace } from '@js/common/core/events/utils/index'; import Guid from '@js/core/guid'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; import { getWidth } from '@js/core/utils/size'; import { getWindow } from '@js/core/utils/window'; -import { name as click } from '@js/events/click'; -import { active } from '@js/events/core/emitter.feedback'; -import eventsEngine from '@js/events/core/events_engine'; -import { start as hoverStart } from '@js/events/hover'; -import { addNamespace } from '@js/events/utils/index'; const TEXTEDITOR_LABEL_CLASS = 'dx-texteditor-label'; const TEXTEDITOR_WITH_LABEL_CLASS = 'dx-texteditor-with-label'; diff --git a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.strategy.ts b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.strategy.ts index 772fc3a57beb..4832d3a02585 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.strategy.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.strategy.ts @@ -1,7 +1,7 @@ +import EventsEngine from '@js/common/core/events/core/events_engine'; +import { addNamespace } from '@js/common/core/events/utils/index'; import browser from '@js/core/utils/browser'; import { clipboardText as getClipboardText } from '@js/core/utils/dom'; -import EventsEngine from '@js/events/core/events_engine'; -import { addNamespace } from '@js/events/utils/index'; const MASK_EVENT_NAMESPACE = 'dxMask'; const BLUR_EVENT = 'blur beforedeactivate'; diff --git a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.ts b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.ts index 3441f1c700b7..7d01c93a5bc4 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.mask.ts @@ -1,15 +1,15 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as wheelEventName } from '@js/common/core/events/core/wheel'; +import { + addNamespace, createEvent, isCommandKeyPressed, normalizeKeyName, +} from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { noop } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { each } from '@js/core/utils/iterator'; import { isEmpty } from '@js/core/utils/string'; import { isDefined } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as wheelEventName } from '@js/events/core/wheel'; -import { - addNamespace, createEvent, isCommandKeyPressed, normalizeKeyName, -} from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import { focused } from '@js/ui/widget/selectors'; import TextEditorBase from './m_text_editor.base'; diff --git a/packages/devextreme/js/__internal/ui/text_box/m_utils.scroll.ts b/packages/devextreme/js/__internal/ui/text_box/m_utils.scroll.ts index 5ee6e307f364..3adde44c9925 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_utils.scroll.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_utils.scroll.ts @@ -1,5 +1,5 @@ +import { isDxMouseWheelEvent } from '@js/common/core/events/utils/index'; import $ from '@js/core/renderer'; -import { isDxMouseWheelEvent } from '@js/events/utils/index'; // @ts-expect-error const allowScroll = function (container, delta, shiftKey?: boolean) { diff --git a/packages/devextreme/js/__internal/ui/text_box/texteditor_button_collection/m_custom.ts b/packages/devextreme/js/__internal/ui/text_box/texteditor_button_collection/m_custom.ts index 75475fc6559c..e3b4b922030b 100644 --- a/packages/devextreme/js/__internal/ui/text_box/texteditor_button_collection/m_custom.ts +++ b/packages/devextreme/js/__internal/ui/text_box/texteditor_button_collection/m_custom.ts @@ -1,8 +1,8 @@ +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { end, start } from '@js/common/core/events/hover'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { end, start } from '@js/events/hover'; import Button from '@js/ui/button'; import TextEditorButton from './m_button'; diff --git a/packages/devextreme/js/__internal/ui/toast/m_toast.ts b/packages/devextreme/js/__internal/ui/toast/m_toast.ts index a6df10c0a7bd..c53cb40caeee 100644 --- a/packages/devextreme/js/__internal/ui/toast/m_toast.ts +++ b/packages/devextreme/js/__internal/ui/toast/m_toast.ts @@ -1,11 +1,11 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import pointerEvents from '@js/common/core/events/pointer'; import registerComponent from '@js/core/component_registrator'; import domAdapter from '@js/core/dom_adapter'; import $ from '@js/core/renderer'; import { extend } from '@js/core/utils/extend'; import readyCallbacks from '@js/core/utils/ready_callbacks'; import { isString } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import pointerEvents from '@js/events/pointer'; import Overlay from '@js/ui/overlay/ui.overlay'; import { isMaterialBased } from '@js/ui/themes'; diff --git a/packages/devextreme/js/__internal/ui/toolbar/m_toolbar.base.ts b/packages/devextreme/js/__internal/ui/toolbar/m_toolbar.base.ts index a033f1d3e494..681af45f4cef 100644 --- a/packages/devextreme/js/__internal/ui/toolbar/m_toolbar.base.ts +++ b/packages/devextreme/js/__internal/ui/toolbar/m_toolbar.base.ts @@ -1,4 +1,4 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; import registerComponent from '@js/core/component_registrator'; import type { dxElementWrapper } from '@js/core/renderer'; import $ from '@js/core/renderer'; diff --git a/packages/devextreme/js/__internal/ui/tree_view/m_tree_view.base.ts b/packages/devextreme/js/__internal/ui/tree_view/m_tree_view.base.ts index eb1df50f5cec..bab507e26c34 100644 --- a/packages/devextreme/js/__internal/ui/tree_view/m_tree_view.base.ts +++ b/packages/devextreme/js/__internal/ui/tree_view/m_tree_view.base.ts @@ -1,4 +1,10 @@ -import fx from '@js/animation/fx'; +import { fx } from '@js/common/core/animation'; +import { name as clickEventName } from '@js/common/core/events/click'; +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { name as dblclickEvent } from '@js/common/core/events/double_click'; +import pointerEvents from '@js/common/core/events/pointer'; +import { addNamespace } from '@js/common/core/events/utils/index'; +import messageLocalization from '@js/common/core/localization/message'; import domAdapter from '@js/core/dom_adapter'; import { getPublicElement } from '@js/core/element'; import $ from '@js/core/renderer'; @@ -14,12 +20,6 @@ import { isDefined, isFunction, isPrimitive, isString, } from '@js/core/utils/type'; import { hasWindow } from '@js/core/utils/window'; -import { name as clickEventName } from '@js/events/click'; -import eventsEngine from '@js/events/core/events_engine'; -import { name as dblclickEvent } from '@js/events/double_click'; -import pointerEvents from '@js/events/pointer'; -import { addNamespace } from '@js/events/utils/index'; -import messageLocalization from '@js/localization/message'; import CheckBox from '@js/ui/check_box'; import HierarchicalCollectionWidget from '@js/ui/hierarchical_collection/ui.hierarchical_collection_widget'; import LoadIndicator from '@js/ui/load_indicator'; diff --git a/packages/devextreme/js/__internal/viz/chart_components/m_base_chart.ts b/packages/devextreme/js/__internal/viz/chart_components/m_base_chart.ts index fbc70a2bc258..5a6b1c8382d8 100644 --- a/packages/devextreme/js/__internal/viz/chart_components/m_base_chart.ts +++ b/packages/devextreme/js/__internal/viz/chart_components/m_base_chart.ts @@ -1,10 +1,10 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; +import { isPointerEvent, isTouchEvent } from '@js/common/core/events/utils/index'; // @ts-expect-error import { grep, noop } from '@js/core/utils/common'; import { extend } from '@js/core/utils/extend'; import { reverseEach as _reverseEach } from '@js/core/utils/iterator'; import { isDefined as _isDefined, isFunction } from '@js/core/utils/type'; -import eventsEngine from '@js/events/core/events_engine'; -import { isPointerEvent, isTouchEvent } from '@js/events/utils/index'; import { LayoutManager } from '@js/viz/chart_components/layout_manager'; import * as trackerModule from '@js/viz/chart_components/tracker'; import { ThemeManager } from '@js/viz/components/chart_theme_manager'; diff --git a/packages/devextreme/js/__internal/viz/core/m_base_widget.ts b/packages/devextreme/js/__internal/viz/core/m_base_widget.ts index bd9c5079613d..511302860a8e 100644 --- a/packages/devextreme/js/__internal/viz/core/m_base_widget.ts +++ b/packages/devextreme/js/__internal/viz/core/m_base_widget.ts @@ -1,3 +1,4 @@ +import eventsEngine from '@js/common/core/events/core/events_engine'; import devices from '@js/core/devices'; import domAdapter from '@js/core/dom_adapter'; import DOMComponent from '@js/core/dom_component'; @@ -11,7 +12,6 @@ import { isDefined, isFunction, isNumeric, isObject as _isObject, type, } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; -import eventsEngine from '@js/events/core/events_engine'; import { BaseThemeManager } from '@js/viz/core/base_theme_manager'; import { createEventTrigger, diff --git a/packages/devextreme/js/animation/frame.d.ts b/packages/devextreme/js/animation/frame.d.ts index b9bd4438793d..cd553b566da2 100644 --- a/packages/devextreme/js/animation/frame.d.ts +++ b/packages/devextreme/js/animation/frame.d.ts @@ -1,15 +1,10 @@ -/** - * @docid utils.cancelAnimationFrame - * @publicName cancelAnimationFrame(requestID) - * @namespace DevExpress.utils - * @public - */ -export function cancelAnimationFrame(requestID: number): void; - -/** - * @docid utils.requestAnimationFrame - * @publicName requestAnimationFrame(callback) - * @namespace DevExpress.utils - * @public - */ -export function requestAnimationFrame(callback: Function): number; +export { + /** + * @deprecated Use cancelAnimationFrame from common/core/animation instead + */ + cancelAnimationFrame, + /** + * @deprecated Use requestAnimationFrame from common/core/animation instead + */ + requestAnimationFrame, +} from '../common/core/animation'; diff --git a/packages/devextreme/js/animation/frame.js b/packages/devextreme/js/animation/frame.js new file mode 100644 index 000000000000..d2d9b93ca616 --- /dev/null +++ b/packages/devextreme/js/animation/frame.js @@ -0,0 +1 @@ +export { cancelAnimationFrame, requestAnimationFrame } from '../common/core/animation'; diff --git a/packages/devextreme/js/animation/fx.d.ts b/packages/devextreme/js/animation/fx.d.ts index 8cfa9aa74356..9d55d58ee02d 100644 --- a/packages/devextreme/js/animation/fx.d.ts +++ b/packages/devextreme/js/animation/fx.d.ts @@ -1,153 +1,31 @@ -import { DxElement } from '../core/element'; -import { DxPromise } from '../core/utils/deferred'; -import { PositionConfig } from './position'; - -import { - Direction, -} from '../common'; - -export type AnimationType = 'css' | 'fade' | 'fadeIn' | 'fadeOut' | 'pop' | 'slide' | 'slideIn' | 'slideOut'; +import { fx, AnimationConfig } from '../common/core/animation'; + +export { + /** + * @deprecated Use AnimationState from common/core/animation instead + */ + AnimationState, + + /** + * @deprecated Use AnimationConfig from common/core/animation instead + */ + AnimationConfig, +} from '../common/core/animation'; + +export { + /** + * @deprecated Use AnimationType from common/core/animation instead + */ + AnimationType, +} from '../common/core/animation'; /** - * @docid * @public - * @type object - */ -export type AnimationState = string | number | { - /** - * @docid - * @public - */ - opacity: number; -} | { - /** - * @docid - * @public - */ - scale: number; -} | { - /** - * @docid - * @public - */ - position: PositionConfig; -} | { - /** - * @docid - * @public - */ - left: number; -} | { - /** - * @docid - * @public - */ - top: number; -}; - -/** - * @docid - * @namespace DevExpress - * @type object|number|string - * @public - */ -export type AnimationConfig = { - /** - * @docid - * @public - */ - complete?: (($element: DxElement, config: AnimationConfig) => void); - /** - * @docid - * @default 0 - * @public - */ - delay?: number; - /** - * @docid - * @default undefined - * @public - */ - direction?: Direction; - /** - * @docid - * @default 400 - * @public - */ - duration?: number; - /** - * @docid - * @default 'ease' - * @public - */ - easing?: string; - /** - * @docid - * @default {} - * @public - */ - from?: AnimationState; - /** - * @docid - * @default undefined - * @public - */ - staggerDelay?: number; - /** - * @docid - * @public - */ - start?: (($element: DxElement, config: AnimationConfig) => void); - /** - * @docid - * @default {} - * @public - */ - to?: AnimationState; - /** - * @docid - * @default 'custom' - * @public - */ - type?: AnimationType; -}; - -/** - * @public - * @deprecated Use the AnimationConfig type instead + * @deprecated Use the AnimationConfig type from common/core/animation instead */ export type animationConfig = AnimationConfig; /** - * @public - * @docid - * @section utils - * @namespace DevExpress + * @deprecated Use fx from common/core/animation instead */ -declare const fx: { - /** - * @docid - * @publicName animate(element, config) - * @return Promise - * @namespace DevExpress.fx - * @public - */ - animate(element: Element, config: AnimationConfig): DxPromise; - - /** - * @docid - * @publicName isAnimating(element) - * @namespace DevExpress.fx - * @public - */ - isAnimating(element: Element): boolean; - - /** - * @docid - * @publicName stop(element, jumpToEnd) - * @namespace DevExpress.fx - * @public - */ - stop(element: Element, jumpToEnd: boolean): void; -}; export default fx; diff --git a/packages/devextreme/js/animation/fx.js b/packages/devextreme/js/animation/fx.js new file mode 100644 index 000000000000..8cbfcfb4bd36 --- /dev/null +++ b/packages/devextreme/js/animation/fx.js @@ -0,0 +1,3 @@ +import { fx } from '../common/core/animation'; + +export default fx; diff --git a/packages/devextreme/js/animation/position.d.ts b/packages/devextreme/js/animation/position.d.ts index bdc714237b6d..14ceb70f0caf 100644 --- a/packages/devextreme/js/animation/position.d.ts +++ b/packages/devextreme/js/animation/position.d.ts @@ -1,115 +1,22 @@ -import { - UserDefinedElement, -} from '../core/element'; +import { PositionConfig } from '../common/core/animation'; -import { - HorizontalAlignment, - PositionAlignment, - VerticalAlignment, -} from '../common'; - -/** @public */ -export type CollisionResolution = 'fit' | 'flip' | 'flipfit' | 'none'; -/** @public */ -export type CollisionResolutionCombination = 'fit' | 'fit flip' | 'fit flipfit' | 'fit none' | 'flip' | 'flip fit' | 'flip none' | 'flipfit' | 'flipfit fit' | 'flipfit none' | 'none' | 'none fit' | 'none flip' | 'none flipfit'; - -/** - * @docid - * @namespace DevExpress - * @type object - * @public - */ -export interface PositionConfig { - /** - * @docid - * @public - */ - at?: PositionAlignment | { - /** - * @docid - */ - x?: HorizontalAlignment; - /** - * @docid - */ - y?: VerticalAlignment; - }; - /** - * @docid - * @public - */ - boundary?: string | UserDefinedElement | Window; - /** - * @docid - * @public - */ - boundaryOffset?: string | { - /** - * @docid - * @default 0 - */ - x?: number; - /** - * @docid - * @default 0 - */ - y?: number; - }; - /** - * @docid - * @public - */ - collision?: CollisionResolutionCombination | { - /** - * @docid - * @default 'none' - */ - x?: CollisionResolution; - /** - * @docid - * @default 'none' - */ - y?: CollisionResolution; - }; - /** - * @docid - * @public - */ - my?: PositionAlignment | { - /** - * @docid - */ - x?: HorizontalAlignment; - /** - * @docid - */ - y?: VerticalAlignment; - }; - /** - * @docid - * @public - */ - of?: string | UserDefinedElement | Window; - /** - * @docid - * @public - */ - offset?: string | { - /** - * @docid - * @default 0 - */ - x?: number; - /** - * @docid - * @default 0 - */ - y?: number; - }; -} +export { + /** + * @deprecated Use CollisionResolution from common/core/animation instead + */ + CollisionResolution, + /** + * @deprecated Use CollisionResolutionCombination from common/core/animation instead + */ + CollisionResolutionCombination, + /** + * @deprecated Use PositionConfig from common/core/animation instead + */ + PositionConfig, +} from '../common/core/animation'; /** * @public - * @deprecated Use the PositionConfig type instead + * @deprecated Use the PositionConfig type from common/core/animation instead */ export interface positionConfig extends PositionConfig { } diff --git a/packages/devextreme/js/animation/presets.d.ts b/packages/devextreme/js/animation/presets.d.ts index bed84b56a128..c71e9502ba89 100644 --- a/packages/devextreme/js/animation/presets.d.ts +++ b/packages/devextreme/js/animation/presets.d.ts @@ -1,59 +1,6 @@ -import { - Device, -} from '../core/devices'; - -import { - AnimationConfig, -} from './fx'; +import { animationPresets } from '../common/core/animation'; /** - * @docid - * @namespace DevExpress - * @public + * @deprecated Use animationPresets from common/core/animation instead */ -declare const animationPresets: { - /** - * @docid - * @publicName applyChanges() - * @public - */ - applyChanges(): void; - /** - * @docid - * @publicName clear() - * @public - */ - clear(): void; - /** - * @docid - * @publicName clear(name) - * @public - */ - clear(name: string): void; - /** - * @docid - * @publicName getPreset(name) - * @public - */ - getPreset(name: string): AnimationConfig; - /** - * @docid - * @publicName registerDefaultPresets() - * @public - */ - registerDefaultPresets(): void; - /** - * @docid - * @publicName registerPreset(name, config) - * @public - */ - registerPreset(name: string, config: { animation: AnimationConfig; device?: Device }): void; - /** - * @docid - * @publicName resetToDefaults() - * @public - */ - resetToDefaults(): void; -}; - export default animationPresets; diff --git a/packages/devextreme/js/animation/presets.js b/packages/devextreme/js/animation/presets.js new file mode 100644 index 000000000000..e6b56dc14e3f --- /dev/null +++ b/packages/devextreme/js/animation/presets.js @@ -0,0 +1,3 @@ +import { animationPresets } from '../common/core/animation'; + +export default animationPresets; diff --git a/packages/devextreme/js/animation/transition_executor.d.ts b/packages/devextreme/js/animation/transition_executor.d.ts index ebfe785da8d4..a6e19d96c443 100644 --- a/packages/devextreme/js/animation/transition_executor.d.ts +++ b/packages/devextreme/js/animation/transition_executor.d.ts @@ -1,52 +1,6 @@ -import { - UserDefinedElementsArray, -} from '../core/element'; - -import { - DxPromise, -} from '../core/utils/deferred'; - -import { - AnimationConfig, -} from './fx'; +import { TransitionExecutor } from '../common/core/animation'; /** - * @docid - * @namespace DevExpress - * @public + * @deprecated Use TransitionExecutor from common/core/animation instead */ -export default class TransitionExecutor { - /** - * @docid - * @publicName enter(elements, animation) - * @param1 elements:jQuery - * @public - */ - enter(elements: UserDefinedElementsArray, animation: AnimationConfig | string): void; - /** - * @docid - * @publicName leave(elements, animation) - * @param1 elements:jQuery - * @public - */ - leave(elements: UserDefinedElementsArray, animation: AnimationConfig | string): void; - /** - * @docid - * @publicName reset() - * @public - */ - reset(): void; - /** - * @docid - * @publicName start() - * @return Promise - * @public - */ - start(): DxPromise; - /** - * @docid - * @publicName stop() - * @public - */ - stop(): void; -} +export default TransitionExecutor; diff --git a/packages/devextreme/js/animation/transition_executor.js b/packages/devextreme/js/animation/transition_executor.js new file mode 100644 index 000000000000..231dbc1b3789 --- /dev/null +++ b/packages/devextreme/js/animation/transition_executor.js @@ -0,0 +1,3 @@ +import { TransitionExecutor } from '../common/core/animation'; + +export default TransitionExecutor; diff --git a/packages/devextreme/js/bundles/modules/core.js b/packages/devextreme/js/bundles/modules/core.js index 6af1b7be42b0..91d94e2657b1 100644 --- a/packages/devextreme/js/bundles/modules/core.js +++ b/packages/devextreme/js/bundles/modules/core.js @@ -12,8 +12,8 @@ if(DevExpress._DEVEXTREME_BUNDLE_INITIALIZED) { DevExpress._DEVEXTREME_BUNDLE_INITIALIZED = true; DevExpress.clientExporter = require('../../exporter'); -DevExpress.excelExporter = require('../../excel_exporter'); -DevExpress.pdfExporter = require('../../pdf_exporter'); +DevExpress.excelExporter = require('../../common/export/excel'); +DevExpress.pdfExporter = require('../../common/export/pdf'); DevExpress.VERSION = require('../../core/version').version; DevExpress.assertDevExtremeVersion = require('../../core/version_check').assertDevExtremeVersion; @@ -24,12 +24,12 @@ DevExpress.DOMComponent = require('../../core/dom_component'); DevExpress.Component = require('../../core/component').Component; DevExpress.registerComponent = require('../../core/component_registrator'); -DevExpress.devices = require('../../core/devices'); +DevExpress.devices = require('../../common/core/environment').devices; DevExpress.trial = require('../../core/trial_panel'); DevExpress.Color = require('../../color'); -const animationFrame = require('../../animation/frame'); +const animationFrame = require('../../common/core/animation/frame'); /** * @name utils @@ -40,14 +40,14 @@ DevExpress.utils = {}; DevExpress.utils.requestAnimationFrame = animationFrame.requestAnimationFrame; DevExpress.utils.cancelAnimationFrame = animationFrame.cancelAnimationFrame; -DevExpress.utils.initMobileViewport = require('../../mobile/init_mobile_viewport/init_mobile_viewport').initMobileViewport; +DevExpress.utils.initMobileViewport = require('../../common/core/environment').initMobileViewport; -DevExpress.utils.getTimeZones = require('../../time_zone_utils').getTimeZones; +DevExpress.utils.getTimeZones = require('../../common/core/environment').getTimeZones; // TODO: MODULARITY: Remove this DevExpress.utils.extendFromObject = require('../../core/utils/extend').extendFromObject; -DevExpress.utils.triggerShownEvent = require('../../events/visibility_change').triggerShownEvent; -DevExpress.utils.triggerHidingEvent = require('../../events/visibility_change').triggerHidingEvent; +DevExpress.utils.triggerShownEvent = require('../../common/core/events/visibility_change').triggerShownEvent; +DevExpress.utils.triggerHidingEvent = require('../../common/core/events/visibility_change').triggerHidingEvent; DevExpress.utils.resetActiveElement = require('../../core/utils/dom').resetActiveElement; DevExpress.utils.findBestMatches = require('../../core/utils/common').findBestMatches; DevExpress.createQueue = require('../../core/utils/queue').create; @@ -66,23 +66,23 @@ DevExpress.utils.ajax = require('../../core/utils/ajax'); DevExpress.viewPort = require('../../core/utils/view_port').value; -DevExpress.hideTopOverlay = require('../../mobile/hide_top_overlay'); +DevExpress.hideTopOverlay = require('../../common/core/environment').hideTopOverlay; DevExpress.formatHelper = require('../../format_helper'); -DevExpress.config = require('../../core/config'); +DevExpress.config = require('../../common').config; -DevExpress.animationPresets = require('../../animation/presets/presets').presets; -DevExpress.fx = require('../../animation/fx'); -DevExpress.TransitionExecutor = require('../../animation/transition_executor/transition_executor').TransitionExecutor; -DevExpress.AnimationPresetCollection = require('../../animation/presets/presets').PresetCollection; +DevExpress.animationPresets = require('../../common/core/animation/presets/presets').presets; +DevExpress.fx = require('../../common/core/animation').fx; +DevExpress.TransitionExecutor = require('../../common/core/animation/transition_executor/transition_executor').TransitionExecutor; +DevExpress.AnimationPresetCollection = require('../../common/core/animation/presets/presets').PresetCollection; -DevExpress.events = require('../../events'); +DevExpress.events = require('../../common/core/events'); -DevExpress.events.click = require('../../events/click'); -DevExpress.events.utils = require('../../events/utils'); -DevExpress.events.GestureEmitter = require('../../events/gesture/emitter.gesture'); +DevExpress.events.click = require('../../common/core/events/click'); +DevExpress.events.utils = require('../../common/core/events/utils'); +DevExpress.events.GestureEmitter = require('../../common/core/events/gesture/emitter.gesture'); -DevExpress.localization = require('../../localization'); +DevExpress.localization = require('../../common/core/localization'); DevExpress.templateRendered = require('../../core/templates/template_base').renderedCallbacks; DevExpress.setTemplateEngine = require('../../core/templates/template_engine_registry').setTemplateEngine; diff --git a/packages/devextreme/js/bundles/modules/data.js b/packages/devextreme/js/bundles/modules/data.js index a1b15cd9d629..fe7a2cfc1937 100644 --- a/packages/devextreme/js/bundles/modules/data.js +++ b/packages/devextreme/js/bundles/modules/data.js @@ -6,34 +6,34 @@ module.exports = DevExpress.data = DevExpress.data || {}; Object.defineProperty(DevExpress.data, 'errorHandler', { get: function() { - return require('../../data/errors').errorHandler; + return require('../../common/data').errorHandler; }, set: function(value) { errors.log('W0003', 'DevExpress.data', 'errorHandler', '21.1', 'Use the \'setErrorHandler\' method instead'); - require('../../data/errors').setErrorHandler(value); + require('../../common/data/errors').setErrorHandler(value); } }); // TODO: try remove (plugins failed without this) Object.defineProperty(DevExpress.data, '_errorHandler', { get: function() { - return require('../../data/errors').handleError; + return require('../../common/data/errors').handleError; }, set: function(value) { errors.log('W0003', 'DevExpress.data', '_errorHandler', '21.1', 'Use the \'setErrorHandler\' method instead'); - require('../../data/errors').setErrorHandler(value); + require('../../common/data/errors').setErrorHandler(value); } }); -DevExpress.data.setErrorHandler = require('../../data/errors').setErrorHandler; -DevExpress.data.DataSource = require('../../data/data_source'); -DevExpress.data.query = require('../../data/query'); -DevExpress.data.Store = require('../../data/abstract_store'); -DevExpress.data.ArrayStore = require('../../data/array_store'); -DevExpress.data.CustomStore = require('../../data/custom_store'); -DevExpress.data.LocalStore = require('../../data/local_store'); -DevExpress.data.base64_encode = require('../../data/utils').base64_encode; -DevExpress.data.applyChanges = require('../../data/apply_changes'); +DevExpress.data.setErrorHandler = require('../../common/data/errors').setErrorHandler; +DevExpress.data.DataSource = require('../../common/data/data_source'); +DevExpress.data.query = require('../../common/data/query'); +DevExpress.data.Store = require('../../common/data/abstract_store'); +DevExpress.data.ArrayStore = require('../../common/data/array_store'); +DevExpress.data.CustomStore = require('../../common/data/custom_store'); +DevExpress.data.LocalStore = require('../../common/data/local_store'); +DevExpress.data.base64_encode = require('../../common/data/utils').base64_encode; +DevExpress.data.applyChanges = require('../../common/data/apply_changes'); DevExpress.data.Guid = require('../../core/guid'); @@ -41,12 +41,12 @@ DevExpress.data.utils = {}; DevExpress.data.utils.compileGetter = require('../../core/utils/data').compileGetter; DevExpress.data.utils.compileSetter = require('../../core/utils/data').compileSetter; -DevExpress.EndpointSelector = require('../../data/endpoint_selector'); +DevExpress.EndpointSelector = require('../../common/data/endpoint_selector'); -DevExpress.data.queryImpl = require('../../data/query_implementation').queryImpl; -DevExpress.data.queryAdapters = require('../../data/query_adapters'); +DevExpress.data.queryImpl = require('../../common/data/query_implementation').queryImpl; +DevExpress.data.queryAdapters = require('../../common/data/query_adapters'); -const dataUtils = require('../../data/utils'); +const dataUtils = require('../../common/data/utils'); DevExpress.data.utils.normalizeBinaryCriterion = dataUtils.normalizeBinaryCriterion; DevExpress.data.utils.normalizeSortingInfo = dataUtils.normalizeSortingInfo; @@ -59,7 +59,7 @@ DevExpress.data.utils.processRequestResultLock = dataUtils.processRequestResultL DevExpress.data.utils.toComparable = require('../../core/utils/data').toComparable; -DevExpress.data.utils.multiLevelGroup = require('../../data/store_helper').multiLevelGroup; -DevExpress.data.utils.arrangeSortingInfo = require('../../data/store_helper').arrangeSortingInfo; +DevExpress.data.utils.multiLevelGroup = require('../../common/data/store_helper').multiLevelGroup; +DevExpress.data.utils.arrangeSortingInfo = require('../../common/data/store_helper').arrangeSortingInfo; -DevExpress.data.utils.normalizeDataSourceOptions = require('../../data/data_source/utils').normalizeDataSourceOptions; +DevExpress.data.utils.normalizeDataSourceOptions = require('../../common/data/data_source/utils').normalizeDataSourceOptions; diff --git a/packages/devextreme/js/bundles/modules/data.odata.js b/packages/devextreme/js/bundles/modules/data.odata.js index d8c83c7cf918..72ae54bc7b18 100644 --- a/packages/devextreme/js/bundles/modules/data.odata.js +++ b/packages/devextreme/js/bundles/modules/data.odata.js @@ -2,16 +2,16 @@ /* eslint-disable import/no-commonjs */ require('./data'); -DevExpress.data.ODataStore = require('../../data/odata/store'); -DevExpress.data.ODataContext = require('../../data/odata/context'); +DevExpress.data.ODataStore = require('../../common/data/odata/store'); +DevExpress.data.ODataContext = require('../../common/data/odata/context'); DevExpress.data.utils = DevExpress.data.utils || {}; DevExpress.data.utils.odata = {}; -DevExpress.data.utils.odata.keyConverters = require('../../data/odata/utils').keyConverters; -DevExpress.data.EdmLiteral = require('../../data/odata/utils').EdmLiteral; +DevExpress.data.utils.odata.keyConverters = require('../../common/data/odata/utils').keyConverters; +DevExpress.data.EdmLiteral = require('../../common/data/odata/utils').EdmLiteral; -const ODataUtilsModule = require('../../data/odata/utils'); +const ODataUtilsModule = require('../../common/data/odata/utils'); DevExpress.data.utils.odata.serializePropName = ODataUtilsModule.serializePropName; DevExpress.data.utils.odata.serializeValue = ODataUtilsModule.serializeValue; DevExpress.data.utils.odata.serializeKey = ODataUtilsModule.serializeKey; @@ -22,4 +22,4 @@ DevExpress.data.OData__internals = ODataUtilsModule.OData__internals; ///#ENDDEBUG DevExpress.data.queryAdapters = DevExpress.data.queryAdapters || {}; -DevExpress.data.queryAdapters.odata = require('../../data/odata/query_adapter').odata; +DevExpress.data.queryAdapters.odata = require('../../common/data/odata/query_adapter').odata; diff --git a/packages/devextreme/js/bundles/modules/file_management.js b/packages/devextreme/js/bundles/modules/file_management.js index c0261198c33d..efad0e8266a5 100644 --- a/packages/devextreme/js/bundles/modules/file_management.js +++ b/packages/devextreme/js/bundles/modules/file_management.js @@ -1,10 +1,12 @@ /* eslint-disable import/no-commonjs */ import DevExpress from './core'; -import FileSystemError from '../../file_management/error'; -import FileSystemItem from '../../file_management/file_system_item'; -import ObjectFileSystemProvider from '../../file_management/object_provider'; -import RemoteFileSystemProvider from '../../file_management/remote_provider'; -import CustomFileSystemProvider from '../../file_management/custom_provider'; +import { + FileSystemError, + FileSystemItem, + ObjectFileSystemProvider, + RemoteFileSystemProvider, + CustomFileSystemProvider, +} from '../../common/file_management'; module.exports = DevExpress.fileManagement = DevExpress.fileManagement || {}; diff --git a/packages/devextreme/js/bundles/modules/parts/core.js b/packages/devextreme/js/bundles/modules/parts/core.js index fa8f8003c335..7a14d9d9ee5f 100644 --- a/packages/devextreme/js/bundles/modules/parts/core.js +++ b/packages/devextreme/js/bundles/modules/parts/core.js @@ -9,23 +9,23 @@ const DevExpress = require('../../../bundles/modules/core'); require('../../../integration/jquery'); require('../../../integration/knockout'); -require('../../../localization/globalize/core'); -require('../../../localization/globalize/message'); -require('../../../localization/globalize/number'); -require('../../../localization/globalize/date'); -require('../../../localization/globalize/currency'); +require('../../../common/core/localization/globalize/core'); +require('../../../common/core/localization/globalize/message'); +require('../../../common/core/localization/globalize/number'); +require('../../../common/core/localization/globalize/date'); +require('../../../common/core/localization/globalize/currency'); /* Events (dx.module-core.js) */ -require('../../../events/click'); -require('../../../events/contextmenu'); -require('../../../events/double_click'); -require('../../../events/drag'); -require('../../../events/hold'); -require('../../../events/hover'); -require('../../../events/pointer'); -require('../../../events/swipe'); -require('../../../events/transform'); +require('../../../common/core/events/click'); +require('../../../common/core/events/contextmenu'); +require('../../../common/core/events/double_click'); +require('../../../common/core/events/drag'); +require('../../../common/core/events/hold'); +require('../../../common/core/events/hover'); +require('../../../common/core/events/pointer'); +require('../../../common/core/events/swipe'); +require('../../../common/core/events/transform'); /// BUNDLER_PARTS_END module.exports = DevExpress; diff --git a/packages/devextreme/js/common.d.ts b/packages/devextreme/js/common.d.ts index 6b2a1902b9c2..a4654e6b6437 100644 --- a/packages/devextreme/js/common.d.ts +++ b/packages/devextreme/js/common.d.ts @@ -1,13 +1,22 @@ -import { PositionConfig } from './animation/position'; +import { PositionConfig } from './common/core/animation'; import type { OmitInternal, } from './core'; -import { FloatingActionButtonDirection } from './core/config'; + +import { + Device, +} from './common/core/environment'; + +import { + DeepPartial, +} from './core'; import type dxDraggable from './ui/draggable'; import type dxScrollable from './ui/scroll_view/ui.scrollable'; import type dxSortable from './ui/sortable'; import type { Properties as ButtonProperties } from './ui/button'; +import { PromiseType } from './core/utils/deferred'; +import { UserDefinedElement } from './core/element'; /** * @public @@ -887,3 +896,77 @@ export type PagerBase = { */ label?: string; }; + +/** + * @docid + * @type Promise + * @namespace DevExpress.core.utils + */ +// eslint-disable-next-line @typescript-eslint/no-invalid-void-type +export type DxPromise = {} extends PromiseType ? Promise : PromiseType; + +/** + * @docid + * @namespace DevExpress.data + * @public + */ +export class Guid { + constructor(); + constructor(value: string); + /** + * @docid + * @publicName toString() + * @public + */ + toString(): string; + /** + * @docid + * @publicName valueOf() + * @public + */ + valueOf(): string; +} + +/** +* @docid +* @public +*/ +export type DefaultOptionsRule = { + device?: Device | Device[] | ((device: Device) => boolean); + options: DeepPartial; +}; + +/** @public */ +export type FloatingActionButtonDirection = 'auto' | 'up' | 'down'; + +/** + * @docid + * @publicName config() + * @namespace DevExpress + * @public + */ +export function config(): GlobalConfig; + +/** + * @docid + * @publicName config(config) + * @namespace DevExpress + * @public + */ +// eslint-disable-next-line @typescript-eslint/no-shadow +export function config(config: GlobalConfig): void; + +/** + * @docid + * @section Common + * @public + */ +export type Template = string | Function | UserDefinedElement; + +/** + * @docid + * @publicName setTemplateEngine(options) + * @namespace DevExpress + * @public + */ +export function setTemplateEngine(templateEngineOptions: { compile?: Function; render?: Function }): void; diff --git a/packages/devextreme/js/common.js b/packages/devextreme/js/common.js new file mode 100644 index 000000000000..96cc4203e8c8 --- /dev/null +++ b/packages/devextreme/js/common.js @@ -0,0 +1,3 @@ +export { default as config } from './common/config'; +export { default as Guid } from './common/guid'; +export { default as setTemplateEngine } from './common/set_template_engine'; diff --git a/packages/devextreme/js/common/core/animation.d.ts b/packages/devextreme/js/common/core/animation.d.ts new file mode 100644 index 000000000000..b1ce9f1e4c05 --- /dev/null +++ b/packages/devextreme/js/common/core/animation.d.ts @@ -0,0 +1,356 @@ +import { DxElement, UserDefinedElementsArray, UserDefinedElement } from '../../core/element'; +import { Device } from './environment'; + +import { + HorizontalAlignment, + PositionAlignment, + VerticalAlignment, + Direction, + DxPromise, +} from '../../common'; + +export type AnimationType = 'css' | 'fade' | 'fadeIn' | 'fadeOut' | 'pop' | 'slide' | 'slideIn' | 'slideOut'; + +/** + * @docid utils.cancelAnimationFrame + * @publicName cancelAnimationFrame(requestID) + * @namespace DevExpress.utils + * @public + */ +export function cancelAnimationFrame(requestID: number): void; + +/** + * @docid utils.requestAnimationFrame + * @publicName requestAnimationFrame(callback) + * @namespace DevExpress.utils + * @public + */ +export function requestAnimationFrame(callback: Function): number; + +/** + * @docid + * @public + * @type object + */ +export type AnimationState = string | number | { + /** + * @docid + * @public + */ + opacity: number; +} | { + /** + * @docid + * @public + */ + scale: number; +} | { + /** + * @docid + * @public + */ + position: PositionConfig; +} | { + /** + * @docid + * @public + */ + left: number; +} | { + /** + * @docid + * @public + */ + top: number; +}; + +/** + * @docid + * @namespace DevExpress + * @type object|number|string + * @public + */ +export type AnimationConfig = { + /** + * @docid + * @public + */ + complete?: (($element: DxElement, config: AnimationConfig) => void); + /** + * @docid + * @default 0 + * @public + */ + delay?: number; + /** + * @docid + * @default undefined + * @public + */ + direction?: Direction; + /** + * @docid + * @default 400 + * @public + */ + duration?: number; + /** + * @docid + * @default 'ease' + * @public + */ + easing?: string; + /** + * @docid + * @default {} + * @public + */ + from?: AnimationState; + /** + * @docid + * @default undefined + * @public + */ + staggerDelay?: number; + /** + * @docid + * @public + */ + start?: (($element: DxElement, config: AnimationConfig) => void); + /** + * @docid + * @default {} + * @public + */ + to?: AnimationState; + /** + * @docid + * @default 'custom' + * @public + */ + type?: AnimationType; +}; + +/** + * @public + * @docid + * @section utils + * @namespace DevExpress + */ +export declare const fx: { + /** + * @docid + * @publicName animate(element, config) + * @return Promise + * @namespace DevExpress.fx + * @public + */ + animate(element: Element, config: AnimationConfig): DxPromise; + + /** + * @docid + * @publicName isAnimating(element) + * @namespace DevExpress.fx + * @public + */ + isAnimating(element: Element): boolean; + + /** + * @docid + * @publicName stop(element, jumpToEnd) + * @namespace DevExpress.fx + * @public + */ + stop(element: Element, jumpToEnd: boolean): void; +}; + +/** @public */ +export type CollisionResolution = 'fit' | 'flip' | 'flipfit' | 'none'; +/** @public */ +export type CollisionResolutionCombination = 'fit' | 'fit flip' | 'fit flipfit' | 'fit none' | 'flip' | 'flip fit' | 'flip none' | 'flipfit' | 'flipfit fit' | 'flipfit none' | 'none' | 'none fit' | 'none flip' | 'none flipfit'; + +/** + * @docid + * @namespace DevExpress + * @type object + * @public + */ +export interface PositionConfig { + /** + * @docid + * @public + */ + at?: PositionAlignment | { + /** + * @docid + */ + x?: HorizontalAlignment; + /** + * @docid + */ + y?: VerticalAlignment; + }; + /** + * @docid + * @public + */ + boundary?: string | UserDefinedElement | Window; + /** + * @docid + * @public + */ + boundaryOffset?: string | { + /** + * @docid + * @default 0 + */ + x?: number; + /** + * @docid + * @default 0 + */ + y?: number; + }; + /** + * @docid + * @public + */ + collision?: CollisionResolutionCombination | { + /** + * @docid + * @default 'none' + */ + x?: CollisionResolution; + /** + * @docid + * @default 'none' + */ + y?: CollisionResolution; + }; + /** + * @docid + * @public + */ + my?: PositionAlignment | { + /** + * @docid + */ + x?: HorizontalAlignment; + /** + * @docid + */ + y?: VerticalAlignment; + }; + /** + * @docid + * @public + */ + of?: string | UserDefinedElement | Window; + /** + * @docid + * @public + */ + offset?: string | { + /** + * @docid + * @default 0 + */ + x?: number; + /** + * @docid + * @default 0 + */ + y?: number; + }; +} + +/** + * @docid + * @namespace DevExpress + * @public + */ +export declare const animationPresets: { + /** + * @docid + * @publicName applyChanges() + * @public + */ + applyChanges(): void; + /** + * @docid + * @publicName clear() + * @public + */ + clear(): void; + /** + * @docid + * @publicName clear(name) + * @public + */ + clear(name: string): void; + /** + * @docid + * @publicName getPreset(name) + * @public + */ + getPreset(name: string): AnimationConfig; + /** + * @docid + * @publicName registerDefaultPresets() + * @public + */ + registerDefaultPresets(): void; + /** + * @docid + * @publicName registerPreset(name, config) + * @public + */ + registerPreset(name: string, config: { animation: AnimationConfig; device?: Device }): void; + /** + * @docid + * @publicName resetToDefaults() + * @public + */ + resetToDefaults(): void; +}; + +/** + * @docid + * @namespace DevExpress + * @public + */ +export class TransitionExecutor { + /** + * @docid + * @publicName enter(elements, animation) + * @param1 elements:jQuery + * @public + */ + enter(elements: UserDefinedElementsArray, animation: AnimationConfig | string): void; + /** + * @docid + * @publicName leave(elements, animation) + * @param1 elements:jQuery + * @public + */ + leave(elements: UserDefinedElementsArray, animation: AnimationConfig | string): void; + /** + * @docid + * @publicName reset() + * @public + */ + reset(): void; + /** + * @docid + * @publicName start() + * @return Promise + * @public + */ + start(): DxPromise; + /** + * @docid + * @publicName stop() + * @public + */ + stop(): void; +} diff --git a/packages/devextreme/js/common/core/animation.js b/packages/devextreme/js/common/core/animation.js new file mode 100644 index 000000000000..3257df279e74 --- /dev/null +++ b/packages/devextreme/js/common/core/animation.js @@ -0,0 +1,4 @@ +export { requestAnimationFrame, cancelAnimationFrame } from './animation/frame'; +export { default as fx } from './animation/fx'; +export { default as animationPresets } from './animation/presets'; +export { default as TransitionExecutor } from './animation/transition_executor'; diff --git a/packages/devextreme/js/common/core/animation/easing.js b/packages/devextreme/js/common/core/animation/easing.js index a44fbd765536..8c3e7fc7ff88 100644 --- a/packages/devextreme/js/common/core/animation/easing.js +++ b/packages/devextreme/js/common/core/animation/easing.js @@ -1,4 +1,4 @@ -import { isFunction } from '../core/utils/type'; +import { isFunction } from '../../../core/utils/type'; const CSS_TRANSITION_EASING_REGEX = /cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/; diff --git a/packages/devextreme/js/common/core/animation/frame.js b/packages/devextreme/js/common/core/animation/frame.js index 85c3847c9ec6..c1142d2775e2 100644 --- a/packages/devextreme/js/common/core/animation/frame.js +++ b/packages/devextreme/js/common/core/animation/frame.js @@ -1,6 +1,6 @@ -import { hasWindow, getWindow } from '../core/utils/window'; +import { hasWindow, getWindow } from '../../../core/utils/window'; const window = hasWindow() ? getWindow() : {}; -import callOnce from '../core/utils/call_once'; +import callOnce from '../../../core/utils/call_once'; const FRAME_ANIMATION_STEP_TIME = 1000 / 60; diff --git a/packages/devextreme/js/common/core/animation/fx.js b/packages/devextreme/js/common/core/animation/fx.js index c6cc7f7898be..6eaac35fca2c 100644 --- a/packages/devextreme/js/common/core/animation/fx.js +++ b/packages/devextreme/js/common/core/animation/fx.js @@ -1,12 +1,12 @@ -import $ from '../core/renderer'; -import { getWindow } from '../core/utils/window'; +import $ from '../../../core/renderer'; +import { getWindow } from '../../../core/utils/window'; const window = getWindow(); import eventsEngine from '../events/core/events_engine'; -import errors from '../core/errors'; -import { getPublicElement } from '../core/element'; -import { extend } from '../core/utils/extend'; -import { isFunction, isPlainObject } from '../core/utils/type'; -import { each, map } from '../core/utils/iterator'; +import errors from '../../../core/errors'; +import { getPublicElement } from '../../../core/element'; +import { extend } from '../../../core/utils/extend'; +import { isFunction, isPlainObject } from '../../../core/utils/type'; +import { each, map } from '../../../core/utils/iterator'; import { getTranslateCss, parseTranslate, @@ -19,13 +19,13 @@ import { getEasing } from './easing'; import { requestAnimationFrame, cancelAnimationFrame } from './frame'; -import supportUtils from '../__internal/core/utils/m_support'; +import supportUtils from '../../../__internal/core/utils/m_support'; import positionUtils from './position'; import { removeEvent } from '../events/remove'; import { addNamespace } from '../events/utils/index'; -import { when, Deferred } from '../core/utils/deferred'; +import { when, Deferred } from '../../../core/utils/deferred'; const removeEventName = addNamespace(removeEvent, 'dxFX'); -import { noop } from '../core/utils/common'; +import { noop } from '../../../core/utils/common'; const RELATIVE_VALUE_REGEX = /^([+-])=(.*)/i; diff --git a/packages/devextreme/js/common/core/animation/position.js b/packages/devextreme/js/common/core/animation/position.js index a0de691c56d0..23f9edc549d4 100644 --- a/packages/devextreme/js/common/core/animation/position.js +++ b/packages/devextreme/js/common/core/animation/position.js @@ -1,19 +1,19 @@ -import { getOuterWidth, getOuterHeight, getWidth, getHeight } from '../core/utils/size'; -import $ from '../core/renderer'; +import { getOuterWidth, getOuterHeight, getWidth, getHeight } from '../../../core/utils/size'; +import $ from '../../../core/renderer'; -import { splitPair, pairToObject } from '../core/utils/common'; -import { each } from '../core/utils/iterator'; -import { getWindow } from '../core/utils/window'; +import { splitPair, pairToObject } from '../../../core/utils/common'; +import { each } from '../../../core/utils/iterator'; +import { getWindow } from '../../../core/utils/window'; const window = getWindow(); -import domAdapter from '../core/dom_adapter'; -import { isWindow, isDefined } from '../core/utils/type'; -import { extend } from '../core/utils/extend'; -import { getBoundingRect } from '../core/utils/position'; -import browser from '../core/utils/browser'; +import domAdapter from '../../../core/dom_adapter'; +import { isWindow, isDefined } from '../../../core/utils/type'; +import { extend } from '../../../core/utils/extend'; +import { getBoundingRect } from '../../../core/utils/position'; +import browser from '../../../core/utils/browser'; import { resetPosition, move } from './translator'; -import { touch } from '../core/utils/support'; -import devices from '../core/devices'; -import { setStyle } from '../core/utils/style'; +import { touch } from '../../../core/utils/support'; +import devices from '../../../core/devices'; +import { setStyle } from '../../../core/utils/style'; const horzRe = /left|right/; const vertRe = /top|bottom/; diff --git a/packages/devextreme/js/common/core/animation/presets/presets.js b/packages/devextreme/js/common/core/animation/presets/presets.js index 7775d572ff57..3b6f2bf23508 100644 --- a/packages/devextreme/js/common/core/animation/presets/presets.js +++ b/packages/devextreme/js/common/core/animation/presets/presets.js @@ -1,8 +1,8 @@ -import { getWidth } from '../../core/utils/size'; -import { Component } from '../../core/component'; -import { each } from '../../core/utils/iterator'; -import { extend } from '../../core/utils/extend'; -import devices from '../../core/devices'; +import { getWidth } from '../../../../core/utils/size'; +import { Component } from '../../../../core/component'; +import { each } from '../../../../core/utils/iterator'; +import { extend } from '../../../../core/utils/extend'; +import devices from '../../environment/devices'; import fx from '../fx'; const directionPostfixes = { diff --git a/packages/devextreme/js/common/core/animation/transition_executor.js b/packages/devextreme/js/common/core/animation/transition_executor.js index 62e969cd574c..2e874294f9a9 100644 --- a/packages/devextreme/js/common/core/animation/transition_executor.js +++ b/packages/devextreme/js/common/core/animation/transition_executor.js @@ -1,2 +1,3 @@ import { TransitionExecutor } from './transition_executor/transition_executor'; + export default TransitionExecutor; diff --git a/packages/devextreme/js/common/core/animation/transition_executor/transition_executor.js b/packages/devextreme/js/common/core/animation/transition_executor/transition_executor.js index c52563030251..abbd1ad22452 100644 --- a/packages/devextreme/js/common/core/animation/transition_executor/transition_executor.js +++ b/packages/devextreme/js/common/core/animation/transition_executor/transition_executor.js @@ -1,12 +1,12 @@ -import $ from '../../core/renderer'; -import Class from '../../core/class'; -import { extend } from '../../core/utils/extend'; -import commonUtils from '../../__internal/core/utils/m_common'; -import { isFunction, isPlainObject } from '../../core/utils/type'; -import { map } from '../../core/utils/iterator'; +import $ from '../../../../core/renderer'; +import Class from '../../../../core/class'; +import { extend } from '../../../../core/utils/extend'; +import commonUtils from '../../../../__internal/core/utils/m_common'; +import { isFunction, isPlainObject } from '../../../../core/utils/type'; +import { map } from '../../../../core/utils/iterator'; import fx from '../fx'; import { presets } from '../presets/presets'; -import { when, Deferred } from '../../core/utils/deferred'; +import { when, Deferred } from '../../../../core/utils/deferred'; const directionPostfixes = { forward: ' dx-forward', diff --git a/packages/devextreme/js/common/core/animation/translator.js b/packages/devextreme/js/common/core/animation/translator.js index d07d84115ffc..6f3cce60d091 100644 --- a/packages/devextreme/js/common/core/animation/translator.js +++ b/packages/devextreme/js/common/core/animation/translator.js @@ -1,6 +1,6 @@ -import $ from '../core/renderer'; -import { data as elementData, removeData } from '../core/element_data'; -import { type } from '../core/utils/type'; +import $ from '../../../core/renderer'; +import { data as elementData, removeData } from '../../../core/element_data'; +import { type } from '../../../core/utils/type'; const TRANSLATOR_DATA_KEY = 'dxTranslator'; const TRANSFORM_MATRIX_REGEX = /matrix(3d)?\((.+?)\)/; diff --git a/packages/devextreme/js/common/core/environment.d.ts b/packages/devextreme/js/common/core/environment.d.ts new file mode 100644 index 000000000000..25939dbdf1f2 --- /dev/null +++ b/packages/devextreme/js/common/core/environment.d.ts @@ -0,0 +1,178 @@ +/** + * @public + * @docid + * @section commonObjectStructures + * @namespace DevExpress + */ +export type Device = { + /** + * @docid + * @public + */ + android?: boolean; + /** + * @docid + * @public + */ + deviceType?: 'phone' | 'tablet' | 'desktop'; + /** + * @docid + * @public + */ + generic?: boolean; + /** + * @docid + * @public + */ + grade?: 'A' | 'B' | 'C'; + /** + * @docid + * @public + */ + ios?: boolean; + /** + * @docid + * @public + */ + phone?: boolean; + /** + * @docid + * @public + */ + platform?: 'android' | 'ios' | 'generic'; + /** + * @docid + * @public + */ + tablet?: boolean; + /** + * @docid + * @public + */ + version?: Array; +}; + +type EventName = 'orientationChanged'; + +/** +* @docid +* @publicName devices +* @section Utils +* @namespace DevExpress +* @public +*/ +declare class DevicesObject { + constructor(options?: { window?: Window }); + /** + * @docid + * @publicName current() + * @public + */ + current(): Device; + /** + * @docid + * @publicName current(deviceName) + * @public + */ + current(deviceName: string | Device): void; + /** + * @docid + * @publicName off(eventName) + * @param1 eventName:string + * @return this + * @public + */ + off(eventName: EventName): this; + /** + * @docid + * @publicName off(eventName, eventHandler) + * @param1 eventName:string + * @return this + * @public + */ + off(eventName: EventName, eventHandler: Function): this; + /** + * @docid + * @publicName on(eventName, eventHandler) + * @param1 eventName:string + * @return this + * @public + */ + on(eventName: EventName, eventHandler: Function): this; + /** + * @docid + * @publicName on(events) + * @param1 events:object + * @return this + * @public + */ + on(events: { [key in EventName]?: Function }): this; + /** + * @docid + * @publicName orientation() + * @return String + * @public + */ + orientation(): 'portrait' | 'landscape' | undefined; + /** + * @docid + * @publicName real() + * @public + */ + real(): Device; + isSimulator(): boolean; +} + +/** +* @const devices +* @namespace DevExpress +* @hidden +* @public +*/ + +export declare const devices: DevicesObject; + +/** + * @docid + * @publicName hideTopOverlay() + * @namespace DevExpress + * @public + */ +export function hideTopOverlay(): boolean; + +/** + * @docid utils.initMobileViewport + * @publicName initMobileViewport(options) + * @namespace DevExpress.utils + * @public + */ +export function initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; + +/** + * @docid + * @public + */ +export interface dxSchedulerTimeZone { + /** + * @docid + */ + id: string; + /** + * @docid + */ + offset: number; + /** + * @docid + */ + title: string; +} + +/** +* @docid utils.getTimeZones +* @publicName getTimeZones(date) +* @param1 date:Date|undefined +* @namespace DevExpress.utils +* @static +* @public +*/ +export function getTimeZones(date?: Date): Array; diff --git a/packages/devextreme/js/common/core/environment.js b/packages/devextreme/js/common/core/environment.js new file mode 100644 index 000000000000..049d7782b4c6 --- /dev/null +++ b/packages/devextreme/js/common/core/environment.js @@ -0,0 +1,4 @@ +export { default as devices } from './environment/devices'; +export { default as hideTopOverlay } from './environment/hide_top_overlay'; +export { default as initMobileViewport } from './environment/init_mobile_viewport'; +export { getTimeZones } from './environment/time_zone_utils'; diff --git a/packages/devextreme/js/common/core/environment/devices.js b/packages/devextreme/js/common/core/environment/devices.js index 3dec987c04a6..5e7fa24382e6 100644 --- a/packages/devextreme/js/common/core/environment/devices.js +++ b/packages/devextreme/js/common/core/environment/devices.js @@ -5,4 +5,4 @@ * @param1_field1 window:Window * @hidden */ -export { default } from '../__internal/core/m_devices'; +export { default } from '../../../__internal/core/m_devices'; diff --git a/packages/devextreme/js/common/core/environment/init_mobile_viewport.js b/packages/devextreme/js/common/core/environment/init_mobile_viewport.js index e653449b86fb..dcbf6087aa1b 100644 --- a/packages/devextreme/js/common/core/environment/init_mobile_viewport.js +++ b/packages/devextreme/js/common/core/environment/init_mobile_viewport.js @@ -1,2 +1,3 @@ import { initMobileViewport } from './init_mobile_viewport/init_mobile_viewport'; + export default initMobileViewport; diff --git a/packages/devextreme/js/common/core/environment/init_mobile_viewport/init_mobile_viewport.js b/packages/devextreme/js/common/core/environment/init_mobile_viewport/init_mobile_viewport.js index 37b7ccfa47f3..d337bd7dcc8a 100644 --- a/packages/devextreme/js/common/core/environment/init_mobile_viewport/init_mobile_viewport.js +++ b/packages/devextreme/js/common/core/environment/init_mobile_viewport/init_mobile_viewport.js @@ -1,15 +1,15 @@ -import { getWidth, setWidth } from '../../core/utils/size'; -import $ from '../../core/renderer'; -import { getWindow } from '../../core/utils/window'; +import { getWidth, setWidth } from '../../../../core/utils/size'; +import $ from '../../../../core/renderer'; +import { getWindow } from '../../../../core/utils/window'; const window = getWindow(); import eventsEngine from '../../events/core/events_engine'; -import { extend } from '../../core/utils/extend'; -import resizeCallbacks from '../../core/utils/resize_callbacks'; -import { styleProp } from '../../core/utils/style'; +import { extend } from '../../../../core/utils/extend'; +import resizeCallbacks from '../../../../core/utils/resize_callbacks'; +import { styleProp } from '../../../../core/utils/style'; -import devices from '../../__internal/core/m_devices'; -import domAdapter from '../../__internal/core/m_dom_adapter'; -import supportUtils from '../../__internal/core/utils/m_support'; +import devices from '../../../../__internal/core/m_devices'; +import domAdapter from '../../../../__internal/core/m_dom_adapter'; +import supportUtils from '../../../../__internal/core/utils/m_support'; export const initMobileViewport = function(options) { options = extend({}, options); diff --git a/packages/devextreme/js/common/core/environment/time_zone_utils.js b/packages/devextreme/js/common/core/environment/time_zone_utils.js index e959a19f83c2..4bbab0e11a5e 100644 --- a/packages/devextreme/js/common/core/environment/time_zone_utils.js +++ b/packages/devextreme/js/common/core/environment/time_zone_utils.js @@ -1,3 +1,3 @@ -import timeZoneUtils from './__internal/scheduler/m_utils_time_zone'; +import timeZoneUtils from '../../../__internal/scheduler/m_utils_time_zone'; export const getTimeZones = timeZoneUtils.getTimeZones; diff --git a/packages/devextreme/js/common/core/events.d.ts b/packages/devextreme/js/common/core/events.d.ts new file mode 100644 index 000000000000..20f62233a427 --- /dev/null +++ b/packages/devextreme/js/common/core/events.d.ts @@ -0,0 +1,334 @@ +import { DxElement } from '../../core/element'; + +/* eslint-disable @typescript-eslint/no-empty-interface */ +export interface EventExtension { } +export interface EventType { } +/* eslint-enable @typescript-eslint/no-empty-interface */ + +/** + * @docid + * @type EventObject|jQuery.Event + */ +export type DxEvent = {} extends EventType ? (EventObject & TNativeEvent) : EventType; + +/** + * @docid + * @public + */ +export interface InitializedEventInfo { + /** + * @docid + * @type this + */ + readonly component?: TComponent; + /** @docid */ + readonly element?: DxElement; +} + +/** + * @docid + * @public + */ +export interface EventInfo { + /** + * @docid + * @type this + */ + readonly component: TComponent; + /** @docid */ + readonly element: DxElement; + /** + * @docid + * @hidden + */ + readonly model?: any; +} + +/** +* @docid +* @public +*/ +export interface NativeEventInfo { + /** + * @docid + * @type this + */ + readonly component: TComponent; + /** @docid */ + readonly element: DxElement; + /** + * @docid + * @hidden + */ + readonly model?: any; + /** + * @docid + * @type event + */ + readonly event?: DxEvent; +} + +/** + * @docid + * @public + */ +export interface ChangedOptionInfo { + /** @docid */ + readonly name: string; + /** @docid */ + readonly fullName: string; + /** @docid */ + readonly value?: any; + /** @docid */ + readonly previousValue?: any; +} + +/** +* @docid +* @public +*/ +export interface ItemInfo { + /** + * @docid + * @type object + */ + readonly itemData?: TItemData; + /** @docid */ + readonly itemElement: DxElement; + /** @docid */ + readonly itemIndex: number; +} + +/** + * @docid + * @public + */ +export interface Cancelable { + /** @docid */ + cancel?: boolean; +} + +/** +* @docid +* @public +*/ +export type AsyncCancelable = { + /** + * @docid + * @type boolean|Promise + */ + cancel: boolean | PromiseLike; +}; + +/** + * @docid + * @section commonObjectStructures + * @public + */ +export type EventObject = { + /** + * @docid + * @public + */ + currentTarget: Element; + + /** + * @docid + * @public + */ + data: any; + + /** + * @docid + * @public + */ + delegateTarget: Element; + + /** + * @docid + * @public + */ + target: Element; + /** + * @docid + * @publicName isDefaultPrevented() + * @public + */ + isDefaultPrevented(): boolean; + /** + * @docid + * @publicName isImmediatePropagationStopped() + * @public + */ + isImmediatePropagationStopped(): boolean; + /** + * @docid + * @publicName isPropagationStopped() + * @public + */ + isPropagationStopped(): boolean; + /** + * @docid + * @publicName preventDefault() + * @public + */ + preventDefault(): void; + /** + * @docid + * @publicName stopImmediatePropagation() + * @public + */ + stopImmediatePropagation(): void; + /** + * @docid + * @publicName stopPropagation() + * @public + */ + stopPropagation(): void; +}; + +/** + * @docid eventsMethods.off + * @publicName off(element) + * @namespace DevExpress.events + * @public + */ +export function off(element: Element | Array): void; + +/** + * @docid eventsMethods.off + * @publicName off(element, eventName) + * @namespace DevExpress.events + * @public + */ +export function off(element: Element | Array, eventName: string): void; + +/** + * @docid eventsMethods.off + * @publicName off(element, eventName, handler) + * @namespace DevExpress.events + * @public + */ +export function off(element: Element | Array, eventName: string, handler: Function): void; + +/** + * @docid eventsMethods.off + * @publicName off(element, eventName, selector) + * @namespace DevExpress.events + * @public + */ +export function off(element: Element | Array, eventName: string, selector: string): void; + +/** + * @docid eventsMethods.off + * @publicName off(element, eventName, selector, handler) + * @namespace DevExpress.events + * @public + */ +export function off(element: Element | Array, eventName: string, selector: string, handler: Function): void; + +/** + * @docid eventsMethods.on + * @publicName on(element, eventName, data, handler) + * @namespace DevExpress.events + * @param3 data:object + * @public + */ +export function on(element: Element | Array, eventName: string, data: any, handler: Function): void; + +/** + * @docid eventsMethods.on + * @publicName on(element, eventName, handler) + * @namespace DevExpress.events + * @public + */ +export function on(element: Element | Array, eventName: string, handler: Function): void; + +/** + * @docid eventsMethods.on + * @publicName on(element, eventName, selector, data, handler) + * @namespace DevExpress.events + * @param4 data:object + * @public + */ +export function on(element: Element | Array, eventName: string, selector: string, data: any, handler: Function): void; + +/** + * @docid eventsMethods.on + * @publicName on(element, eventName, selector, handler) + * @namespace DevExpress.events + * @public + */ +export function on(element: Element | Array, eventName: string, selector: string, handler: Function): void; + +/** + * @docid eventsMethods.one + * @publicName one(element, eventName, data, handler) + * @namespace DevExpress.events + * @param3 data:object + * @public + */ +export function one(element: Element | Array, eventName: string, data: any, handler: Function): void; + +/** + * @docid eventsMethods.one + * @publicName one(element, eventName, handler) + * @namespace DevExpress.events + * @public + */ +export function one(element: Element | Array, eventName: string, handler: Function): void; + +/** + * @docid eventsMethods.one + * @publicName one(element, eventName, selector, data, handler) + * @namespace DevExpress.events + * @param4 data:object + * @public + */ +export function one(element: Element | Array, eventName: string, selector: string, data: any, handler: Function): void; + +/** + * @docid eventsMethods.one + * @publicName one(element, eventName, selector, handler) + * @namespace DevExpress.events + * @public + */ +export function one(element: Element | Array, eventName: string, selector: string, handler: Function): void; + +/** + * @docid eventsMethods.trigger + * @publicName trigger(element, event) + * @namespace DevExpress.events + * @param2 event:string|event + * @public + */ +export function trigger(element: Element | Array, event: string | DxEvent): void; + +/** + * @docid eventsMethods.trigger + * @publicName trigger(element, event, extraParameters) + * @namespace DevExpress.events + * @param2 event:string|event + * @param3 extraParameters:object + * @public + */ +export function trigger(element: Element | Array, event: string | DxEvent, extraParameters: any): void; + +/** + * @docid eventsMethods.triggerHandler + * @publicName triggerHandler(element, event) + * @namespace DevExpress.events + * @param2 event:string|event + * @hidden + */ +export function triggerHandler(element: Element | Array, event: string | DxEvent): void; + +/** + * @docid eventsMethods.triggerHandler + * @publicName triggerHandler(element, event, extraParameters) + * @namespace DevExpress.events + * @param2 event:string|event + * @param3 extraParameters:object + * @hidden + */ +export function triggerHandler(element: Element | Array, event: string | DxEvent, extraParameters: any): void; diff --git a/packages/devextreme/js/common/core/events.js b/packages/devextreme/js/common/core/events.js new file mode 100644 index 000000000000..0bb7a9e21c13 --- /dev/null +++ b/packages/devextreme/js/common/core/events.js @@ -0,0 +1,7 @@ +export { + on, + one, + off, + trigger, + triggerHandler, +} from './events/index'; diff --git a/packages/devextreme/js/common/core/events/click.js b/packages/devextreme/js/common/core/events/click.js index b11d13e812b5..e8f6d2b71543 100644 --- a/packages/devextreme/js/common/core/events/click.js +++ b/packages/devextreme/js/common/core/events/click.js @@ -5,4 +5,4 @@ * @module events/click */ -export * from '../__internal/events/m_click'; +export * from '../../../__internal/events/m_click'; diff --git a/packages/devextreme/js/common/core/events/contextmenu.js b/packages/devextreme/js/common/core/events/contextmenu.js index d8c4c5830d05..fbc7d931c96a 100644 --- a/packages/devextreme/js/common/core/events/contextmenu.js +++ b/packages/devextreme/js/common/core/events/contextmenu.js @@ -5,4 +5,4 @@ * @module events/contextmenu */ -export * from '../__internal/events/m_contextmenu'; +export * from '../../../__internal/events/m_contextmenu'; diff --git a/packages/devextreme/js/common/core/events/core/emitter.feedback.js b/packages/devextreme/js/common/core/events/core/emitter.feedback.js index f086130e30a5..f9bd36072953 100644 --- a/packages/devextreme/js/common/core/events/core/emitter.feedback.js +++ b/packages/devextreme/js/common/core/events/core/emitter.feedback.js @@ -1 +1 @@ -export * from '../../__internal/events/core/m_emitter.feedback'; +export * from '../../../../__internal/events/core/m_emitter.feedback'; diff --git a/packages/devextreme/js/common/core/events/core/emitter.js b/packages/devextreme/js/common/core/events/core/emitter.js index 223a042f3077..16a98780423c 100644 --- a/packages/devextreme/js/common/core/events/core/emitter.js +++ b/packages/devextreme/js/common/core/events/core/emitter.js @@ -1 +1 @@ -export { default } from '../../__internal/events/core/m_emitter'; +export { default } from '../../../../__internal/events/core/m_emitter'; diff --git a/packages/devextreme/js/common/core/events/core/emitter_registrator.js b/packages/devextreme/js/common/core/events/core/emitter_registrator.js index c9f061241a98..a58da303773d 100644 --- a/packages/devextreme/js/common/core/events/core/emitter_registrator.js +++ b/packages/devextreme/js/common/core/events/core/emitter_registrator.js @@ -1 +1 @@ -export { default } from '../../__internal/events/core/m_emitter_registrator'; +export { default } from '../../../../__internal/events/core/m_emitter_registrator'; diff --git a/packages/devextreme/js/common/core/events/core/event_registrator.js b/packages/devextreme/js/common/core/events/core/event_registrator.js index 4de26caede8d..79d9f9c3afee 100644 --- a/packages/devextreme/js/common/core/events/core/event_registrator.js +++ b/packages/devextreme/js/common/core/events/core/event_registrator.js @@ -1 +1 @@ -export { default } from '../../__internal/events/core/m_event_registrator'; +export { default } from '../../../../__internal/events/core/m_event_registrator'; diff --git a/packages/devextreme/js/common/core/events/core/event_registrator_callbacks.js b/packages/devextreme/js/common/core/events/core/event_registrator_callbacks.js index fc0c626b1575..186b84d66c72 100644 --- a/packages/devextreme/js/common/core/events/core/event_registrator_callbacks.js +++ b/packages/devextreme/js/common/core/events/core/event_registrator_callbacks.js @@ -1,3 +1,3 @@ -import MemorizedCallbacks from '../../core/memorized_callbacks'; +import MemorizedCallbacks from '../../../../core/memorized_callbacks'; export default new MemorizedCallbacks(); diff --git a/packages/devextreme/js/common/core/events/core/events_engine.d.ts b/packages/devextreme/js/common/core/events/core/events_engine.d.ts index a5f7cd4fadd5..6fa6b862e6d5 100644 --- a/packages/devextreme/js/common/core/events/core/events_engine.d.ts +++ b/packages/devextreme/js/common/core/events/core/events_engine.d.ts @@ -7,5 +7,5 @@ type EventsEngineType = { }; declare const eventsEngine: EventsEngineType; -export declare function set(eventEngine: any): void; +export function set(eventEngine: any): void; export default eventsEngine; diff --git a/packages/devextreme/js/common/core/events/core/events_engine.js b/packages/devextreme/js/common/core/events/core/events_engine.js index a8e5d0c5e304..a054da76531c 100644 --- a/packages/devextreme/js/common/core/events/core/events_engine.js +++ b/packages/devextreme/js/common/core/events/core/events_engine.js @@ -1 +1 @@ -export { default } from '../../__internal/events/core/m_events_engine'; +export { default } from '../../../../__internal/events/core/m_events_engine'; diff --git a/packages/devextreme/js/common/core/events/core/hook_touch_props.js b/packages/devextreme/js/common/core/events/core/hook_touch_props.js index 96daa6e79e09..38903edf8c54 100644 --- a/packages/devextreme/js/common/core/events/core/hook_touch_props.js +++ b/packages/devextreme/js/common/core/events/core/hook_touch_props.js @@ -1 +1 @@ -export { default } from '../../__internal/events/core/m_hook_touch_props'; +export { default } from '../../../../__internal/events/core/m_hook_touch_props'; diff --git a/packages/devextreme/js/common/core/events/core/keyboard_processor.js b/packages/devextreme/js/common/core/events/core/keyboard_processor.js index d7e367d4c144..bcb1a25c2576 100644 --- a/packages/devextreme/js/common/core/events/core/keyboard_processor.js +++ b/packages/devextreme/js/common/core/events/core/keyboard_processor.js @@ -1 +1 @@ -export { default } from '../../__internal/events/core/m_keyboard_processor'; +export { default } from '../../../../__internal/events/core/m_keyboard_processor'; diff --git a/packages/devextreme/js/common/core/events/core/wheel.js b/packages/devextreme/js/common/core/events/core/wheel.js index c9d2e35c81d2..0c94207e4c62 100644 --- a/packages/devextreme/js/common/core/events/core/wheel.js +++ b/packages/devextreme/js/common/core/events/core/wheel.js @@ -1 +1 @@ -export * from '../../__internal/events/core/m_wheel'; +export * from '../../../../__internal/events/core/m_wheel'; diff --git a/packages/devextreme/js/common/core/events/double_click.js b/packages/devextreme/js/common/core/events/double_click.js index 3e0cf4edb96e..6b14a60f2ffb 100644 --- a/packages/devextreme/js/common/core/events/double_click.js +++ b/packages/devextreme/js/common/core/events/double_click.js @@ -1,4 +1,4 @@ -import { name, dblClick } from '../__internal/events/m_dblclick'; +import { name, dblClick } from '../../../__internal/events/m_dblclick'; import registerEvent from './core/event_registrator'; registerEvent(name, dblClick); diff --git a/packages/devextreme/js/common/core/events/drag.js b/packages/devextreme/js/common/core/events/drag.js index c03bdb173853..9a3b67fda0ea 100644 --- a/packages/devextreme/js/common/core/events/drag.js +++ b/packages/devextreme/js/common/core/events/drag.js @@ -42,4 +42,4 @@ * @type_function_param1_field2 cancel:boolean * @module events/drag */ -export * from '../__internal/events/m_drag'; +export * from '../../../__internal/events/m_drag'; diff --git a/packages/devextreme/js/common/core/events/gesture/emitter.gesture.js b/packages/devextreme/js/common/core/events/gesture/emitter.gesture.js index bacdf0ee957e..289513d8018d 100644 --- a/packages/devextreme/js/common/core/events/gesture/emitter.gesture.js +++ b/packages/devextreme/js/common/core/events/gesture/emitter.gesture.js @@ -1 +1 @@ -export { default } from '../../__internal/events/gesture/m_emitter.gesture'; +export { default } from '../../../../__internal/events/gesture/m_emitter.gesture'; diff --git a/packages/devextreme/js/common/core/events/gesture/emitter.gesture.scroll.js b/packages/devextreme/js/common/core/events/gesture/emitter.gesture.scroll.js index d3ae4e160f92..dccab6bcd841 100644 --- a/packages/devextreme/js/common/core/events/gesture/emitter.gesture.scroll.js +++ b/packages/devextreme/js/common/core/events/gesture/emitter.gesture.scroll.js @@ -1 +1 @@ -export { default } from '../../__internal/events/gesture/m_emitter.gesture.scroll'; +export { default } from '../../../../__internal/events/gesture/m_emitter.gesture.scroll'; diff --git a/packages/devextreme/js/common/core/events/gesture/swipeable.js b/packages/devextreme/js/common/core/events/gesture/swipeable.js index e6d44d8d75e9..7ad8476f5ecb 100644 --- a/packages/devextreme/js/common/core/events/gesture/swipeable.js +++ b/packages/devextreme/js/common/core/events/gesture/swipeable.js @@ -1 +1 @@ -export { default } from '../../__internal/events/gesture/m_swipeable'; +export { default } from '../../../../__internal/events/gesture/m_swipeable'; diff --git a/packages/devextreme/js/common/core/events/hold.js b/packages/devextreme/js/common/core/events/hold.js index 2174679ed7e7..f3370e430a6c 100644 --- a/packages/devextreme/js/common/core/events/hold.js +++ b/packages/devextreme/js/common/core/events/hold.js @@ -5,4 +5,4 @@ * @module events/hold */ -export { default } from '../__internal/events/m_hold'; +export { default } from '../../../__internal/events/m_hold'; diff --git a/packages/devextreme/js/common/core/events/hover.js b/packages/devextreme/js/common/core/events/hover.js index e603188362d0..54da4e40155a 100644 --- a/packages/devextreme/js/common/core/events/hover.js +++ b/packages/devextreme/js/common/core/events/hover.js @@ -12,4 +12,4 @@ * @module events/hover */ -export * from '../__internal/events/m_hover'; +export * from '../../../__internal/events/m_hover'; diff --git a/packages/devextreme/js/common/core/events/index.d.ts b/packages/devextreme/js/common/core/events/index.d.ts index 999a80e69b94..2f9791daed3a 100644 --- a/packages/devextreme/js/common/core/events/index.d.ts +++ b/packages/devextreme/js/common/core/events/index.d.ts @@ -1,196 +1,8 @@ -import { - DxElement, -} from '../core/element'; - -/* eslint-disable @typescript-eslint/no-empty-interface */ -export interface EventExtension { } -export interface EventType { } -/* eslint-enable @typescript-eslint/no-empty-interface */ -/** - * @docid - * @type EventObject|jQuery.Event - */ -export type DxEvent = {} extends EventType ? (EventObject & TNativeEvent) : EventType; - -/** - * @docid - * @public - */ -export interface InitializedEventInfo { - /** - * @docid - * @type this - */ - readonly component?: TComponent; - /** @docid */ - readonly element?: DxElement; -} - -/** - * @docid - * @public - */ -export interface EventInfo { - /** - * @docid - * @type this - */ - readonly component: TComponent; - /** @docid */ - readonly element: DxElement; - /** - * @docid - * @hidden - */ - readonly model?: any; -} - -/** - * @docid - * @public - */ -export interface NativeEventInfo { - /** - * @docid - * @type this - */ - readonly component: TComponent; - /** @docid */ - readonly element: DxElement; - /** - * @docid - * @hidden - */ - readonly model?: any; - /** - * @docid - * @type event - */ - readonly event?: DxEvent; -} - -/** - * @docid - * @public - */ -export interface ChangedOptionInfo { - /** @docid */ - readonly name: string; - /** @docid */ - readonly fullName: string; - /** @docid */ - readonly value?: any; - /** @docid */ - readonly previousValue?: any; -} - -/** - * @docid - * @public - */ -export interface ItemInfo { - /** - * @docid - * @type object - */ - readonly itemData?: TItemData; - /** @docid */ - readonly itemElement: DxElement; - /** @docid */ - readonly itemIndex: number; -} - -/** - * @docid - * @public - */ -export interface Cancelable { - /** @docid */ - cancel?: boolean; -} - -/** - * @docid - * @public - */ -export type AsyncCancelable = { - /** - * @docid - * @type boolean|Promise - */ - cancel: boolean | PromiseLike; -}; +import { EventObject, DxEvent } from '../events'; /** @deprecated EventObject */ export type dxEvent = EventObject; -/** - * @docid - * @section commonObjectStructures - * @public - */ -export type EventObject = { - /** - * @docid - * @public - */ - currentTarget: Element; - - /** - * @docid - * @public - */ - data: any; - - /** - * @docid - * @public - */ - delegateTarget: Element; - - /** - * @docid - * @public - */ - target: Element; - /** - * @docid - * @publicName isDefaultPrevented() - * @public - */ - isDefaultPrevented(): boolean; - /** - * @docid - * @publicName isImmediatePropagationStopped() - * @public - */ - isImmediatePropagationStopped(): boolean; - /** - * @docid - * @publicName isPropagationStopped() - * @public - */ - isPropagationStopped(): boolean; - /** - * @docid - * @publicName preventDefault() - * @public - */ - preventDefault(): void; - /** - * @docid - * @publicName stopImmediatePropagation() - * @public - */ - stopImmediatePropagation(): void; - /** - * @docid - * @publicName stopPropagation() - * @public - */ - stopPropagation(): void; -}; - /** * @docid * @type EventObject|jQuery.Event @@ -206,149 +18,3 @@ export type event = DxEvent; * @hidden */ export function eventsHandler(event: DxEvent, extraParameters: any): boolean; - -/** - * @docid eventsMethods.off - * @publicName off(element) - * @namespace DevExpress.events - * @public - */ -export function off(element: Element | Array): void; - -/** - * @docid eventsMethods.off - * @publicName off(element, eventName) - * @namespace DevExpress.events - * @public - */ -export function off(element: Element | Array, eventName: string): void; - -/** - * @docid eventsMethods.off - * @publicName off(element, eventName, handler) - * @namespace DevExpress.events - * @public - */ -export function off(element: Element | Array, eventName: string, handler: Function): void; - -/** - * @docid eventsMethods.off - * @publicName off(element, eventName, selector) - * @namespace DevExpress.events - * @public - */ -export function off(element: Element | Array, eventName: string, selector: string): void; - -/** - * @docid eventsMethods.off - * @publicName off(element, eventName, selector, handler) - * @namespace DevExpress.events - * @public - */ -export function off(element: Element | Array, eventName: string, selector: string, handler: Function): void; - -/** - * @docid eventsMethods.on - * @publicName on(element, eventName, data, handler) - * @namespace DevExpress.events - * @param3 data:object - * @public - */ -export function on(element: Element | Array, eventName: string, data: any, handler: Function): void; - -/** - * @docid eventsMethods.on - * @publicName on(element, eventName, handler) - * @namespace DevExpress.events - * @public - */ -export function on(element: Element | Array, eventName: string, handler: Function): void; - -/** - * @docid eventsMethods.on - * @publicName on(element, eventName, selector, data, handler) - * @namespace DevExpress.events - * @param4 data:object - * @public - */ -export function on(element: Element | Array, eventName: string, selector: string, data: any, handler: Function): void; - -/** - * @docid eventsMethods.on - * @publicName on(element, eventName, selector, handler) - * @namespace DevExpress.events - * @public - */ -export function on(element: Element | Array, eventName: string, selector: string, handler: Function): void; - -/** - * @docid eventsMethods.one - * @publicName one(element, eventName, data, handler) - * @namespace DevExpress.events - * @param3 data:object - * @public - */ -export function one(element: Element | Array, eventName: string, data: any, handler: Function): void; - -/** - * @docid eventsMethods.one - * @publicName one(element, eventName, handler) - * @namespace DevExpress.events - * @public - */ -export function one(element: Element | Array, eventName: string, handler: Function): void; - -/** - * @docid eventsMethods.one - * @publicName one(element, eventName, selector, data, handler) - * @namespace DevExpress.events - * @param4 data:object - * @public - */ -export function one(element: Element | Array, eventName: string, selector: string, data: any, handler: Function): void; - -/** - * @docid eventsMethods.one - * @publicName one(element, eventName, selector, handler) - * @namespace DevExpress.events - * @public - */ -export function one(element: Element | Array, eventName: string, selector: string, handler: Function): void; - -/** - * @docid eventsMethods.trigger - * @publicName trigger(element, event) - * @namespace DevExpress.events - * @param2 event:string|event - * @public - */ -export function trigger(element: Element | Array, event: string | DxEvent): void; - -/** - * @docid eventsMethods.trigger - * @publicName trigger(element, event, extraParameters) - * @namespace DevExpress.events - * @param2 event:string|event - * @param3 extraParameters:object - * @public - */ -export function trigger(element: Element | Array, event: string | DxEvent, extraParameters: any): void; - -/** - * @docid eventsMethods.triggerHandler - * @publicName triggerHandler(element, event) - * @namespace DevExpress.events - * @param2 event:string|event - * @hidden - */ -export function triggerHandler(element: Element | Array, event: string | DxEvent): void; - -/** - * @docid eventsMethods.triggerHandler - * @publicName triggerHandler(element, event, extraParameters) - * @namespace DevExpress.events - * @param2 event:string|event - * @param3 extraParameters:object - * @hidden - */ -export function triggerHandler(element: Element | Array, event: string | DxEvent, extraParameters: any): void; diff --git a/packages/devextreme/js/common/core/events/pointer.js b/packages/devextreme/js/common/core/events/pointer.js index 76b7978e98d7..6293482e3f40 100644 --- a/packages/devextreme/js/common/core/events/pointer.js +++ b/packages/devextreme/js/common/core/events/pointer.js @@ -55,4 +55,4 @@ * @module events/pointer */ -export { default } from '../__internal/events/m_pointer'; +export { default } from '../../../__internal/events/m_pointer'; diff --git a/packages/devextreme/js/common/core/events/pointer/base.js b/packages/devextreme/js/common/core/events/pointer/base.js index 305dab9967e0..5d381e0b1bd7 100644 --- a/packages/devextreme/js/common/core/events/pointer/base.js +++ b/packages/devextreme/js/common/core/events/pointer/base.js @@ -1 +1 @@ -export { default } from '../../__internal/events/pointer/m_base'; +export { default } from '../../../../__internal/events/pointer/m_base'; diff --git a/packages/devextreme/js/common/core/events/pointer/mouse.js b/packages/devextreme/js/common/core/events/pointer/mouse.js index aaded4766988..ea5914c7618d 100644 --- a/packages/devextreme/js/common/core/events/pointer/mouse.js +++ b/packages/devextreme/js/common/core/events/pointer/mouse.js @@ -1 +1 @@ -export { default } from '../../__internal/events/pointer/m_mouse'; +export { default } from '../../../../__internal/events/pointer/m_mouse'; diff --git a/packages/devextreme/js/common/core/events/pointer/mouse_and_touch.js b/packages/devextreme/js/common/core/events/pointer/mouse_and_touch.js index dde0522c0306..1b08169cfa1b 100644 --- a/packages/devextreme/js/common/core/events/pointer/mouse_and_touch.js +++ b/packages/devextreme/js/common/core/events/pointer/mouse_and_touch.js @@ -1 +1 @@ -export { default } from '../../__internal/events/pointer/m_mouse_and_touch'; +export { default } from '../../../../__internal/events/pointer/m_mouse_and_touch'; diff --git a/packages/devextreme/js/common/core/events/pointer/observer.js b/packages/devextreme/js/common/core/events/pointer/observer.js index 6b5fefe472db..23d7d02347de 100644 --- a/packages/devextreme/js/common/core/events/pointer/observer.js +++ b/packages/devextreme/js/common/core/events/pointer/observer.js @@ -1 +1 @@ -export { default } from '../../__internal/events/pointer/m_observer'; +export { default } from '../../../../__internal/events/pointer/m_observer'; diff --git a/packages/devextreme/js/common/core/events/pointer/touch.js b/packages/devextreme/js/common/core/events/pointer/touch.js index f41aa71ccc75..340b3fea5bbf 100644 --- a/packages/devextreme/js/common/core/events/pointer/touch.js +++ b/packages/devextreme/js/common/core/events/pointer/touch.js @@ -1 +1 @@ -export { default } from '../../__internal/events/pointer/m_touch'; +export { default } from '../../../../__internal/events/pointer/m_touch'; diff --git a/packages/devextreme/js/common/core/events/remove.js b/packages/devextreme/js/common/core/events/remove.js index b475e099cbec..8c8d8ad142d9 100644 --- a/packages/devextreme/js/common/core/events/remove.js +++ b/packages/devextreme/js/common/core/events/remove.js @@ -5,4 +5,4 @@ * @module events/remove */ -export * from '../__internal/events/m_remove'; +export * from '../../../__internal/events/m_remove'; diff --git a/packages/devextreme/js/common/core/events/short.js b/packages/devextreme/js/common/core/events/short.js index 70e38ebf6b7b..0520fdf01641 100644 --- a/packages/devextreme/js/common/core/events/short.js +++ b/packages/devextreme/js/common/core/events/short.js @@ -1 +1 @@ -export * from '../__internal/events/m_short'; +export * from '../../../__internal/events/m_short'; diff --git a/packages/devextreme/js/common/core/events/swipe.js b/packages/devextreme/js/common/core/events/swipe.js index 31e61bbd529e..a65c8d786508 100644 --- a/packages/devextreme/js/common/core/events/swipe.js +++ b/packages/devextreme/js/common/core/events/swipe.js @@ -22,4 +22,4 @@ * @module events/swipe */ -export * from '../__internal/events/m_swipe'; +export * from '../../../__internal/events/m_swipe'; diff --git a/packages/devextreme/js/common/core/events/transform.js b/packages/devextreme/js/common/core/events/transform.js index db22a4cec363..a93e6d82b40b 100644 --- a/packages/devextreme/js/common/core/events/transform.js +++ b/packages/devextreme/js/common/core/events/transform.js @@ -1,4 +1,4 @@ -import { exportNames } from '../__internal/events/m_transform'; +import { exportNames } from '../../../__internal/events/m_transform'; /** * @name UI Events.dxtransformstart diff --git a/packages/devextreme/js/common/core/events/utils/add_namespace.js b/packages/devextreme/js/common/core/events/utils/add_namespace.js index ffa6a046fa06..3adbbc2f4233 100644 --- a/packages/devextreme/js/common/core/events/utils/add_namespace.js +++ b/packages/devextreme/js/common/core/events/utils/add_namespace.js @@ -1 +1 @@ -export { default } from '../../__internal/events/utils/m_add_namespace'; +export { default } from '../../../../__internal/events/utils/m_add_namespace'; diff --git a/packages/devextreme/js/common/core/events/utils/event_nodes_disposing.js b/packages/devextreme/js/common/core/events/utils/event_nodes_disposing.js index 0dd3c94270d2..fee24fce3ef6 100644 --- a/packages/devextreme/js/common/core/events/utils/event_nodes_disposing.js +++ b/packages/devextreme/js/common/core/events/utils/event_nodes_disposing.js @@ -1 +1 @@ -export * from '../../__internal/events/utils/m_event_nodes_disposing'; +export * from '../../../../__internal/events/utils/m_event_nodes_disposing'; diff --git a/packages/devextreme/js/common/core/events/utils/event_target.js b/packages/devextreme/js/common/core/events/utils/event_target.js index 6b0f3d4dd2a0..f384e1acc1a7 100644 --- a/packages/devextreme/js/common/core/events/utils/event_target.js +++ b/packages/devextreme/js/common/core/events/utils/event_target.js @@ -1 +1 @@ -export * from '../../__internal/events/utils/m_event_target'; +export * from '../../../../__internal/events/utils/m_event_target'; diff --git a/packages/devextreme/js/common/core/events/utils/index.js b/packages/devextreme/js/common/core/events/utils/index.js index 4e21a47cee31..a486606d05b0 100644 --- a/packages/devextreme/js/common/core/events/utils/index.js +++ b/packages/devextreme/js/common/core/events/utils/index.js @@ -1 +1 @@ -export * from '../../__internal/events/utils/index'; +export * from '../../../../__internal/events/utils/index'; diff --git a/packages/devextreme/js/common/core/events/visibility_change.js b/packages/devextreme/js/common/core/events/visibility_change.js index eae6f20c886a..93ea077c6d9a 100644 --- a/packages/devextreme/js/common/core/events/visibility_change.js +++ b/packages/devextreme/js/common/core/events/visibility_change.js @@ -1,4 +1,4 @@ -import VisibilityChangeModule from '../__internal/events/m_visibility_change'; +import VisibilityChangeModule from '../../../__internal/events/m_visibility_change'; export const triggerShownEvent = VisibilityChangeModule.triggerShownEvent; export const triggerHidingEvent = VisibilityChangeModule.triggerHidingEvent; diff --git a/packages/devextreme/js/common/core/localization.d.ts b/packages/devextreme/js/common/core/localization.d.ts new file mode 100644 index 000000000000..4af2ac4d0953 --- /dev/null +++ b/packages/devextreme/js/common/core/localization.d.ts @@ -0,0 +1,132 @@ +import { Format as PredefinedFormat } from '../../common'; + +/** + * @docid localization.formatDate + * @publicName formatDate(value, format) + * @static + * @namespace DevExpress.localization + * @public + */ +export function formatDate(value: Date, format: Format): string; + +/** + * @docid localization.formatMessage + * @publicName formatMessage(key, value) + * @param2 value:string|Array + * @static + * @namespace DevExpress.localization + * @public + */ +export function formatMessage(key: string, ...values: Array): string; + +/** + * @docid localization.formatNumber + * @publicName formatNumber(value, format) + * @static + * @namespace DevExpress.localization + * @public + */ +export function formatNumber(value: number, format: Format): string; + +/** + * @docid localization.loadMessages + * @publicName loadMessages(messages) + * @param1 messages:object + * @static + * @namespace DevExpress.localization + * @public + */ +export function loadMessages(messages: any): void; + +/** + * @docid localization.locale + * @publicName locale() + * @static + * @namespace DevExpress.localization + * @public + */ +export function locale(): string; + +/** + * @docid localization.locale + * @publicName locale(locale) + * @static + * @namespace DevExpress.localization + * @public + */ +// eslint-disable-next-line @typescript-eslint/no-shadow +export function locale(locale: string): void; + +/** + * @docid localization.parseDate + * @publicName parseDate(text, format) + * @static + * @namespace DevExpress.localization + * @public + */ +export function parseDate(text: string, format: Format): Date; + +/** + * @docid localization.parseNumber + * @publicName parseNumber(text, format) + * @static + * @namespace DevExpress.localization + * @public + */ +export function parseNumber(text: string, format: Format): number; + +type ExternalFormat = + Intl.DateTimeFormatOptions | + Intl.NumberFormatOptions; + +/** + * @docid + * @type Object|Enums.Format|string|function + * @default undefined + * @section Common + * @namespace DevExpress.ui + * @public + */ +export type Format = + FormatObject | + PredefinedFormat | + string | + ((value: number | Date) => string) | + ((value: Date) => string) | + ((value: number) => string) | + ExternalFormat; + +export interface FormatObject { + /** + * @docid Format.currency + * @public + */ + currency?: string; + /** + * @docid Format.useCurrencyAccountingStyle + * @type boolean + * @default true + * @public + */ + useCurrencyAccountingStyle?: boolean; + /** + * @docid Format.formatter + * @public + */ + formatter?: ((value: number | Date) => string); + /** + * @docid Format.parser + * @public + */ + parser?: ((value: string) => number | Date); + /** + * @docid Format.precision + * @public + */ + precision?: number; + /** + * @docid Format.type + * @public + */ + type?: PredefinedFormat | string; +} diff --git a/packages/devextreme/js/common/core/localization/core.js b/packages/devextreme/js/common/core/localization/core.js index 0d096f183a46..7887125559e6 100644 --- a/packages/devextreme/js/common/core/localization/core.js +++ b/packages/devextreme/js/common/core/localization/core.js @@ -1,4 +1,4 @@ -import dependencyInjector from '../core/utils/dependency_injector'; +import dependencyInjector from '../../../core/utils/dependency_injector'; import parentLocales from './cldr-data/parent_locales'; import getParentLocale from './parentLocale'; diff --git a/packages/devextreme/js/common/core/localization/currency.js b/packages/devextreme/js/common/core/localization/currency.js index b469b714666c..9e3cc67301cf 100644 --- a/packages/devextreme/js/common/core/localization/currency.js +++ b/packages/devextreme/js/common/core/localization/currency.js @@ -1,4 +1,4 @@ -import { extend } from '../core/utils/extend'; +import { extend } from '../../../core/utils/extend'; export default { _formatNumberCore: function(value, format, formatConfig) { diff --git a/packages/devextreme/js/common/core/localization/date.js b/packages/devextreme/js/common/core/localization/date.js index abc316d12dd4..4b5a29ed137c 100644 --- a/packages/devextreme/js/common/core/localization/date.js +++ b/packages/devextreme/js/common/core/localization/date.js @@ -1,7 +1,7 @@ -import dependencyInjector from '../core/utils/dependency_injector'; -import { isString } from '../core/utils/type'; -import { each } from '../core/utils/iterator'; -import errors from '../core/errors'; +import dependencyInjector from '../../../core/utils/dependency_injector'; +import { isString } from '../../../core/utils/type'; +import { each } from '../../../core/utils/iterator'; +import errors from '../../../core/errors'; import { getFormatter as getLDMLDateFormatter } from './ldml/date.formatter'; import { getFormat as getLDMLDateFormat } from './ldml/date.format'; import { getParser as getLDMLDateParser } from './ldml/date.parser'; diff --git a/packages/devextreme/js/common/core/localization/default_date_names.js b/packages/devextreme/js/common/core/localization/default_date_names.js index 85bbdaf91fee..8d45246eb399 100644 --- a/packages/devextreme/js/common/core/localization/default_date_names.js +++ b/packages/devextreme/js/common/core/localization/default_date_names.js @@ -1,4 +1,4 @@ -import { map } from '../core/utils/iterator'; +import { map } from '../../../core/utils/iterator'; const MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; const DAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; diff --git a/packages/devextreme/js/common/core/localization/globalize/currency.js b/packages/devextreme/js/common/core/localization/globalize/currency.js index 37b3a818c73d..dbeae744cb6c 100644 --- a/packages/devextreme/js/common/core/localization/globalize/currency.js +++ b/packages/devextreme/js/common/core/localization/globalize/currency.js @@ -6,7 +6,7 @@ import '../currency'; import 'globalize/currency'; // eslint-disable-next-line no-restricted-imports import Globalize from 'globalize'; -import config from '../../core/config'; +import { config } from '../../../../common'; import numberLocalization from '../number'; const CURRENCY_STYLES = ['symbol', 'accounting']; diff --git a/packages/devextreme/js/common/core/localization/globalize/date.js b/packages/devextreme/js/common/core/localization/globalize/date.js index dddeb7827dbb..24f3e4eb5b05 100644 --- a/packages/devextreme/js/common/core/localization/globalize/date.js +++ b/packages/devextreme/js/common/core/localization/globalize/date.js @@ -9,8 +9,8 @@ const RTL_MARKS_REGEX = /[\u200E\u200F]/g; // eslint-disable-next-line no-restricted-imports import Globalize from 'globalize'; import dateLocalization from '../date'; -import { isObject } from '../../core/utils/type'; -import * as iteratorUtils from '../../core/utils/iterator'; +import { isObject } from '../../../../core/utils/type'; +import * as iteratorUtils from '../../../../core/utils/iterator'; if(Globalize && Globalize.formatDate) { diff --git a/packages/devextreme/js/common/core/localization/globalize/number.js b/packages/devextreme/js/common/core/localization/globalize/number.js index 4a3cdda578d8..568d9599cb8b 100644 --- a/packages/devextreme/js/common/core/localization/globalize/number.js +++ b/packages/devextreme/js/common/core/localization/globalize/number.js @@ -2,7 +2,7 @@ import './core'; // eslint-disable-next-line no-restricted-imports import Globalize from 'globalize'; import numberLocalization from '../number'; -import errors from '../../core/errors'; +import errors from '../../../../core/errors'; // eslint-disable-next-line no-restricted-imports, import/no-unresolved import 'globalize/number'; diff --git a/packages/devextreme/js/common/core/localization/intl/date.js b/packages/devextreme/js/common/core/localization/intl/date.js index c75851db4d23..d1bed9a81c3a 100644 --- a/packages/devextreme/js/common/core/localization/intl/date.js +++ b/packages/devextreme/js/common/core/localization/intl/date.js @@ -1,5 +1,5 @@ /* globals Intl */ -import { extend } from '../../core/utils/extend'; +import { extend } from '../../../../core/utils/extend'; import localizationCoreUtils from '../core'; const SYMBOLS_TO_REMOVE_REGEX = /[\u200E\u200F]/g; diff --git a/packages/devextreme/js/common/core/localization/intl/number.js b/packages/devextreme/js/common/core/localization/intl/number.js index 15c172fd1e78..55012d3da52b 100644 --- a/packages/devextreme/js/common/core/localization/intl/number.js +++ b/packages/devextreme/js/common/core/localization/intl/number.js @@ -1,5 +1,5 @@ /* globals Intl */ -import dxConfig from '../../core/config'; +import { config as dxConfig } from '../../../../common'; import localizationCoreUtils from '../core'; import openXmlCurrencyFormat from '../open_xml_currency_format'; import accountingFormats from '../cldr-data/accounting_formats'; diff --git a/packages/devextreme/js/common/core/localization/ldml/date.parser.js b/packages/devextreme/js/common/core/localization/ldml/date.parser.js index b9ad3b6f3ca7..96197a9ee6d5 100644 --- a/packages/devextreme/js/common/core/localization/ldml/date.parser.js +++ b/packages/devextreme/js/common/core/localization/ldml/date.parser.js @@ -1,5 +1,5 @@ -import { escapeRegExp } from '../../core/utils/common'; -import { logger } from '../../core/utils/console'; +import { escapeRegExp } from '../../../../core/utils/common'; +import { logger } from '../../../../core/utils/console'; const FORMAT_TYPES = { '3': 'abbreviated', diff --git a/packages/devextreme/js/common/core/localization/ldml/number.js b/packages/devextreme/js/common/core/localization/ldml/number.js index 180e103fa70d..628a8713d3a0 100644 --- a/packages/devextreme/js/common/core/localization/ldml/number.js +++ b/packages/devextreme/js/common/core/localization/ldml/number.js @@ -1,4 +1,4 @@ -import { fitIntoRange, multiplyInExponentialForm } from '../../core/utils/math'; +import { fitIntoRange, multiplyInExponentialForm } from '../../../../core/utils/math'; import { toFixed } from '../utils'; const DEFAULT_CONFIG = { thousandsSeparator: ',', decimalSeparator: '.' }; diff --git a/packages/devextreme/js/common/core/localization/message.js b/packages/devextreme/js/common/core/localization/message.js index aa0af71f02f5..d0772abe30c0 100644 --- a/packages/devextreme/js/common/core/localization/message.js +++ b/packages/devextreme/js/common/core/localization/message.js @@ -1,7 +1,7 @@ -import dependencyInjector from '../core/utils/dependency_injector'; -import { extend } from '../core/utils/extend'; -import { format as stringFormat } from '../core/utils/string'; -import { humanize } from '../core/utils/inflector'; +import dependencyInjector from '../../../core/utils/dependency_injector'; +import { extend } from '../../../core/utils/extend'; +import { format as stringFormat } from '../../../core/utils/string'; +import { humanize } from '../../../core/utils/inflector'; import coreLocalization from './core'; import { defaultMessages } from './default_messages'; diff --git a/packages/devextreme/js/common/core/localization/number.js b/packages/devextreme/js/common/core/localization/number.js index 4a5a8330b68c..e9db126e1347 100644 --- a/packages/devextreme/js/common/core/localization/number.js +++ b/packages/devextreme/js/common/core/localization/number.js @@ -1,10 +1,10 @@ -import dependencyInjector from '../core/utils/dependency_injector'; -import { escapeRegExp } from '../core/utils/common'; -import { each } from '../core/utils/iterator'; -import { isPlainObject } from '../core/utils/type'; +import dependencyInjector from '../../../core/utils/dependency_injector'; +import { escapeRegExp } from '../../../core/utils/common'; +import { each } from '../../../core/utils/iterator'; +import { isPlainObject } from '../../../core/utils/type'; import { getFormatter } from './ldml/number'; -import config from '../core/config'; -import errors from '../core/errors'; +import config from '../../../core/config'; +import errors from '../../../core/errors'; import { toFixed } from './utils'; import currencyLocalization from './currency'; import intlNumberLocalization from './intl/number'; diff --git a/packages/devextreme/js/common/core/localization/utils.js b/packages/devextreme/js/common/core/localization/utils.js index ca7164e0d1b8..3deba5d56cc6 100644 --- a/packages/devextreme/js/common/core/localization/utils.js +++ b/packages/devextreme/js/common/core/localization/utils.js @@ -1,4 +1,4 @@ -import { sign, multiplyInExponentialForm } from '../core/utils/math'; +import { sign, multiplyInExponentialForm } from '../../../core/utils/math'; const DECIMAL_BASE = 10; diff --git a/packages/devextreme/js/common/data.d.ts b/packages/devextreme/js/common/data.d.ts new file mode 100644 index 000000000000..b7976748649b --- /dev/null +++ b/packages/devextreme/js/common/data.d.ts @@ -0,0 +1,1652 @@ +/* eslint-disable max-classes-per-file */ +import { DxPromise } from '../common'; +import { DxExtendedPromise } from '../core/utils/deferred'; +import { DeepPartial } from '../core/index'; +import AbstractStore, { AbstractStoreOptions } from './data/abstract_store'; + +/** + * @docid Utils.applyChanges + * @publicName applyChanges(data, changes, options) + * @param3 options?:any + * @namespace DevExpress.data + * @public + */ +export function applyChanges(data: Array, changes: Array, options?: { keyExpr?: string | Array; immutable?: boolean }): Array; + +/** + * @docid StoreOptions + * @namespace DevExpress.data.Store + * @hidden + */ +export type StoreOptionsBase< + TItem = any, + TKey = any, +> = { + /** + * @docid StoreOptions.errorHandler + * @public + */ + errorHandler?: Function; + /** + * @docid StoreOptions.key + * @public + */ + key?: string | Array; + /** + * @docid StoreOptions.onInserted + * @type_function_param1 values:object + * @type_function_param2 key:object|string|number + * @action + * @public + */ + onInserted?: ((values: TItem, key: TKey) => void); + /** + * @docid StoreOptions.onInserting + * @type_function_param1 values:object + * @action + * @public + */ + onInserting?: ((values: TItem) => void); + /** + * @docid StoreOptions.onLoading + * @type_function_param1 loadOptions:LoadOptions + * @action + * @public + */ + onLoading?: ((loadOptions: LoadOptions) => void); + /** + * @docid StoreOptions.onModified + * @action + * @public + */ + onModified?: Function; + /** + * @docid StoreOptions.onModifying + * @action + * @public + */ + onModifying?: Function; + /** + * @docid StoreOptions.onPush + * @action + * @public + */ + onPush?: ((changes: Array) => void); + /** + * @docid StoreOptions.onRemoved + * @type_function_param1 key:object|string|number + * @action + * @public + */ + onRemoved?: ((key: TKey) => void); + /** + * @docid StoreOptions.onRemoving + * @type_function_param1 key:object|string|number + * @action + * @public + */ + onRemoving?: ((key: TKey) => void); + /** + * @docid StoreOptions.onUpdated + * @type_function_param1 key:object|string|number + * @type_function_param2 values:object + * @action + * @public + */ + onUpdated?: ((key: TKey, values: TItem) => void); + /** + * @docid StoreOptions.onUpdating + * @type_function_param1 key:object|string|number + * @type_function_param2 values:object + * @action + * @public + */ + onUpdating?: ((key: TKey, values: TItem) => void); +}; + +type StoreBaseEventName = 'loaded' | 'loading' | 'inserted' | 'inserting' | 'updated' | 'updating' | 'push' | 'removed' | 'removing' | 'modified' | 'modifying'; + +/** + * @docid Store + * @namespace DevExpress.data + * @hidden + * @options StoreOptionsBase + */ +export class StoreBase< + TItem = any, + TKey = any, +> { + constructor(options?: StoreOptionsBase); + /** + * @docid + * @publicName insert(values) + * @param1 values:object + * @return Promise + * @public + */ + insert(values: TItem): DxExtendedPromise; + /** + * @docid + * @publicName key() + * @public + */ + key(): string | Array; + /** + * @docid + * @publicName keyOf(obj) + * @param1 obj:object + * @return any|string|number + * @public + */ + keyOf(obj: TItem): TKey; + /** + * @docid + * @publicName off(eventName) + * @param1 eventName:string + * @return this + * @public + */ + off(eventName: StoreBaseEventName): this; + /** + * @docid + * @publicName off(eventName, eventHandler) + * @param1 eventName:string + * @return this + * @public + */ + off(eventName: StoreBaseEventName, eventHandler: Function): this; + /** + * @docid + * @publicName on(eventName, eventHandler) + * @param1 eventName:string + * @return this + * @public + */ + on(eventName: StoreBaseEventName, eventHandler: Function): this; + /** + * @docid + * @publicName on(events) + * @param1 events:object + * @return this + * @public + */ + on(events: { [key in StoreBaseEventName]?: Function }): this; + /** + * @docid + * @publicName push(changes) + * @param1 changes:Array + * @public + */ + push(changes: Array<{ type: 'insert' | 'update' | 'remove'; data?: DeepPartial; key?: TKey; index?: number }>): void; + /** + * @docid + * @publicName remove(key) + * @param1 key:object|string|number + * @return Promise + * @public + */ + remove(key: TKey): DxPromise; + /** + * @docid + * @publicName totalCount(options) + * @param1_field filter:object + * @param1_field group:object + * @return Promise + * @public + */ + totalCount(obj: { filter?: FilterDescriptor | Array; group?: GroupDescriptor | Array> }): DxPromise; + /** + * @docid + * @publicName update(key, values) + * @param1 key:object|string|number + * @param2 values:object + * @return Promise + * @public + */ + update(key: TKey, values: DeepPartial): DxExtendedPromise; +} + +/** + * @docid + * @namespace DevExpress.data + */ +export interface ArrayStoreOptions< + TItem = any, + TKey = any, +> extends AbstractStoreOptions { + /** + * @docid + * @public + */ + data?: Array; +} + +/** + * @docid + * @inherits Store + * @public + * @options ArrayStoreOptions + */ +export class ArrayStore< + TItem = any, + TKey = any, +> extends AbstractStore { + constructor(options?: ArrayStoreOptions); + /** + * @docid + * @publicName byKey(key) + * @param1 key:object|string|number + * @return Promise + * @public + */ + byKey(key: TKey): DxPromise; + /** + * @docid + * @publicName clear() + * @public + */ + clear(): void; + /** + * @docid + * @publicName createQuery() + * @return object + * @public + */ + createQuery(): Query; +} + +/** + * @docid + * @public + */ +export type GroupItem< + TItem = any, +> = { + /** @docid */ + key: any | string | number; + /** + * @docid + * @type Array|Array|null + */ + items: Array | Array> | null; + /** @docid */ + count?: number; + /** @docid */ + summary?: Array; +}; + +type LoadResultArray = Array | Array>; + +/** + * @docid + * @public + */ +export type LoadResultObject = { + /** + * @docid + * @type Array|Array + */ + data: Array | Array>; + /** @docid */ + totalCount?: number; + /** @docid */ + summary?: Array; + /** @docid */ + groupCount?: number; + }; + +/** + * @docid + * @public + * @type object + */ +export type LoadResult< + TItem = any, +> = + | Object + | LoadResultArray + | LoadResultObject; + +/** + * @docid + * @public + */ +export function isLoadResultObject(res: LoadResult): res is LoadResultObject; + +/** + * @docid + * @public + */ +export function isGroupItemsArray(res: LoadResult): res is Array>; + +/** + * @docid + * @public + */ +export function isItemsArray(res: LoadResult): res is Array; + +type LoadFunctionResult = T | DxPromise | PromiseLike; + +/** + * @docid + * @public + * @type object + * @deprecated Use LoadResult instead + */ +export type ResolvedData = LoadResult; + +/** + * @docid + * @namespace DevExpress.data + */ +export interface CustomStoreOptions< + TItem = any, + TKey = any, +> extends StoreOptionsBase { + /** + * @docid + * @public + * @type_function_param1 key:object|string|number + * @type_function_param2 extraOptions:LoadOptions + * @type_function_return Promise + */ + byKey?: ((key: TKey, extraOptions?: LoadOptions) => PromiseLike); + /** + * @docid + * @default true + * @public + */ + cacheRawData?: boolean; + /** + * @docid + * @type_function_param1 values:object + * @type_function_return Promise + * @public + */ + insert?: ((values: TItem) => PromiseLike); + /** + * @docid + * @type_function_param1 options:LoadOptions + * @type_function_return LoadResult|Promise + * @public + */ + load: (options: LoadOptions) => LoadFunctionResult>; + /** + * @docid + * @default 'processed' + * @public + */ + loadMode?: 'processed' | 'raw'; + /** + * @docid + * @type_function_param1 result:LoadResult + * @type_function_param2 loadOptions:LoadOptions + * @action + * @public + */ + onLoaded?: ((result: LoadResult, loadOptions: LoadOptions) => void); + /** + * @docid + * @type_function_param1 key:object|string|number + * @type_function_return Promise + * @public + */ + remove?: ((key: TKey) => PromiseLike); + /** + * @docid + * @type_function_param1_field filter:object + * @type_function_param1_field group:object + * @type_function_return Promise + * @public + */ + totalCount?: ((loadOptions: { filter?: FilterDescriptor | Array; group?: GroupDescriptor | Array> }) => PromiseLike); + /** + * @docid + * @type_function_param1 key:object|string|number + * @type_function_param2 values:object + * @type_function_return Promise + * @public + */ + update?: ((key: TKey, values: TItem) => PromiseLike); + /** + * @docid + * @default undefined + * @public + */ + useDefaultSearch?: boolean; +} + +/** + * @docid + * @inherits Store + * @public + * @options CustomStoreOptions + */ +export class CustomStore< + TItem = any, + TKey = any, +> extends StoreBase { + constructor(options?: CustomStoreOptions); + /** + * @docid + * @publicName byKey(key, extraOptions) + * @param1 key:object|string|number + * @param2 extraOptions:LoadOptions + * @return Promise + * @public + */ + byKey(key: TKey, extraOptions?: LoadOptions): DxPromise; + /** + * @docid + * @publicName clearRawDataCache() + * @public + */ + clearRawDataCache(): void; + /** + * @docid + * @publicName load() + * @return Promise + * @public + */ + load(): DxExtendedPromise>; + /** + * @docid + * @publicName load(options) + * @param1 options:LoadOptions + * @return Promise + * @public + */ + load(options: LoadOptions): DxExtendedPromise>; +} + +type DataSourceEventName = 'changed' | 'loadError' | 'loadingChanged'; + +/** + * @namespace DevExpress.data + * @docid + */ +export interface DataSourceOptions< + TStoreItem = any, + TMappedItem = TStoreItem, + TItem = TMappedItem, + TKey = any, +> { + /** + * @docid + * @public + */ + customQueryParams?: any; + /** + * @docid + * @public + */ + expand?: Array | string; + /** + * @docid + * @type Filter expression + * @public + */ + filter?: FilterDescriptor | Array; + /** + * @docid + * @type Group expression + * @public + */ + group?: GroupDescriptor | Array>; + /** + * @docid + * @public + */ + // eslint-disable-next-line spellcheck/spell-checker + langParams?: LangParams; + /** + * @docid + * @type_function_param1 dataItem:object + * @type_function_return object + * @public + */ + map?: ((dataItem: TStoreItem) => TMappedItem); + /** + * @docid + * @type_function_param1_field changes:Array + * @action + * @public + */ + onChanged?: ((e: { readonly changes?: Array }) => void); + /** + * @docid + * @action + * @public + */ + onLoadError?: ((error: { readonly message?: string }) => void); + /** + * @docid + * @action + * @public + */ + onLoadingChanged?: ((isLoading: boolean) => void); + /** + * @docid + * @default 20 + * @public + */ + pageSize?: number; + /** + * @docid + * @default undefined + * @public + */ + paginate?: boolean; + /** + * @docid + * @type_function_param1 data:Array + * @type_function_return Array + * @public + */ + postProcess?: ((data: Array) => Array); + /** + * @docid + * @default undefined + * @public + */ + pushAggregationTimeout?: number; + /** + * @docid + * @public + */ + requireTotalCount?: boolean; + /** + * @docid + * @default false + * @public + */ + reshapeOnPush?: boolean; + /** + * @docid + * @type getter|Array + * @public + */ + searchExpr?: string | Function | Array; + /** + * @docid + * @default "contains" + * @public + */ + searchOperation?: SearchOperation; + /** + * @docid + * @default null + * @public + */ + searchValue?: any; + /** + * @docid + * @type Select expression + * @public + */ + select?: SelectDescriptor; + /** + * @docid + * @type Sort expression + * @public + */ + sort?: SortDescriptor | Array>; + /** + * @docid + * @public + * @type Store|StoreOptions|Array + */ + store?: Array | Store | StoreOptions; +} + +/** + * @docid + * @public + * @options DataSourceOptions + */ +export class DataSource< + TItem = any, + TKey = any, +> { + constructor(data: Array); + constructor(options: CustomStoreOptions | DataSourceOptions); + constructor(store: Store); + constructor(url: string); + /** + * @docid + * @publicName cancel(operationId) + * @public + */ + cancel(operationId: number): boolean; + /** + * @docid + * @publicName dispose() + * @public + */ + dispose(): void; + /** + * @docid + * @publicName filter() + * @return object + * @public + */ + filter(): FilterDescriptor | Array; + /** + * @docid + * @publicName filter(filterExpr) + * @param1 filterExpr:object + * @public + */ + filter(filterExpr: FilterDescriptor | Array): void; + /** + * @docid + * @publicName group() + * @return object + * @public + */ + group(): GroupDescriptor | Array>; + /** + * @docid + * @publicName group(groupExpr) + * @param1 groupExpr:object + * @public + */ + group(groupExpr: GroupDescriptor | Array>): void; + /** + * @docid + * @publicName isLastPage() + * @public + */ + isLastPage(): boolean; + /** + * @docid + * @publicName isLoaded() + * @public + */ + isLoaded(): boolean; + /** + * @docid + * @publicName isLoading() + * @public + */ + isLoading(): boolean; + /** + * @docid + * @publicName items() + * @public + */ + items(): Array; + /** + * @docid + * @publicName key() + * @public + */ + key(): string | Array; + /** + * @docid + * @publicName load() + * @return Promise + * @public + */ + load(): DxExtendedPromise; + /** + * @docid + * @publicName loadOptions() + * @return object + * @public + */ + loadOptions(): LoadOptions; + /** + * @docid + * @publicName off(eventName) + * @param1 eventName:string + * @return this + * @public + */ + off(eventName: DataSourceEventName): this; + /** + * @docid + * @publicName off(eventName, eventHandler) + * @param1 eventName:string + * @return this + * @public + */ + off(eventName: DataSourceEventName, eventHandler: Function): this; + /** + * @docid + * @publicName on(eventName, eventHandler) + * @param1 eventName:string + * @return this + * @public + */ + on(eventName: DataSourceEventName, eventHandler: Function): this; + /** + * @docid + * @publicName on(events) + * @param1 events:object + * @return this + * @public + */ + on(events: { [key in DataSourceEventName]?: Function }): this; + /** + * @docid + * @publicName pageIndex() + * @return numeric + * @public + */ + pageIndex(): number; + /** + * @docid + * @publicName pageIndex(newIndex) + * @param1 newIndex:numeric + * @public + */ + pageIndex(newIndex: number): void; + /** + * @docid + * @publicName pageSize() + * @return numeric + * @public + */ + pageSize(): number; + /** + * @docid + * @publicName pageSize(value) + * @param1 value:numeric + * @public + */ + pageSize(value: number): void; + /** + * @docid + * @publicName paginate() + * @public + */ + paginate(): boolean; + /** + * @docid + * @publicName paginate(value) + * @public + */ + paginate(value: boolean): void; + /** + * @docid + * @publicName reload() + * @return Promise + * @public + */ + reload(): DxExtendedPromise; + /** + * @docid + * @publicName requireTotalCount() + * @public + */ + requireTotalCount(): boolean; + /** + * @docid + * @publicName requireTotalCount(value) + * @public + */ + requireTotalCount(value: boolean): void; + /** + * @docid + * @publicName searchExpr() + * @return getter|Array + * @public + */ + searchExpr(): string & Function & Array; + /** + * @docid + * @publicName searchExpr(expr) + * @param1 expr:getter|Array + * @public + */ + searchExpr(expr: string | Function | Array): void; + /** + * @docid + * @publicName searchOperation() + * @public + */ + searchOperation(): string; + /** + * @docid + * @publicName searchOperation(op) + * @public + */ + searchOperation(op: string): void; + /** + * @docid + * @publicName searchValue() + * @public + */ + searchValue(): any; + /** + * @docid + * @publicName searchValue(value) + * @public + */ + searchValue(value: any): void; + /** + * @docid + * @publicName select() + * @return any + * @public + */ + select(): SelectDescriptor; + /** + * @docid + * @publicName select(expr) + * @param1 expr:any + * @public + */ + select(expr: SelectDescriptor): void; + /** + * @docid + * @publicName sort() + * @return any + * @public + */ + sort(): SortDescriptor | Array>; + /** + * @docid + * @publicName sort(sortExpr) + * @param1 sortExpr:any + * @public + */ + sort(sortExpr: SortDescriptor | Array>): void; + /** + * @docid + * @publicName store() + * @return object + * @public + */ + store(): Store; + /** + * @docid + * @publicName totalCount() + * @return numeric + * @public + */ + totalCount(): number; +} + +/** + * @docid + * @type Store|DataSource|DataSourceOptions|string|Array|null + */ +export type DataSourceLike = + string | + Array | + Store | + DataSourceOptionsStub | + DataSource; + +interface DataSourceOptionsStub< + TStoreItem = any, + TMappedItem = TStoreItem, + TItem = TMappedItem, +> { + customQueryParams?: any; + expand?: Array | string; + filter?: FilterDescriptor | Array; + group?: GroupDescriptor | Array>; + map?: ((dataItem: TStoreItem) => TMappedItem); + onChanged?: ((e: { readonly changes?: Array }) => void); + onLoadError?: ((error: { readonly message?: string }) => void); + onLoadingChanged?: ((isLoading: boolean) => void); + pageSize?: number; + paginate?: boolean; + postProcess?: ((data: Array) => Array); + pushAggregationTimeout?: number; + requireTotalCount?: boolean; + reshapeOnPush?: boolean; + searchExpr?: string | Function | Array; + searchOperation?: SearchOperation; + searchValue?: any; + select?: SelectDescriptor; + sort?: SortDescriptor | Array>; + store?: Array | Store | StoreOptions; +} + +/** + * @public + */ +export type SearchOperation = '=' | '<>' | '>' | '>=' | '<' | '<=' | 'startswith' | 'endswith' | 'contains' | 'notcontains'; + +/** + * @public + */ +export type GroupingInterval = 'year' | 'quarter' | 'month' | 'day' | 'dayOfWeek' | 'hour' | 'minute' | 'second'; + +type KeySelector = string | ((source: T) => string | number | Date | Object); + +type SelectionDescriptor = { + selector: KeySelector; +}; + +type OrderingDescriptor = SelectionDescriptor & { + desc?: boolean; +}; + +/** + * @docid + * @public + * @type object + * @skip + */ +export type SortDescriptor = KeySelector | OrderingDescriptor; + +/** + * @docid + * @public + * @type object + * @skip + */ +export type GroupDescriptor = KeySelector | (OrderingDescriptor & { + groupInterval?: number | GroupingInterval; + isExpanded?: boolean; +}); + +/** + * @docid + * @public + * @type object + * @skip + */ +export type SelectDescriptor = string | Array | ((source: T) => any); +/** + * @docid + * @public + */ +export type FilterDescriptor = any; +/** + * @docid + * @public + */ +export type LangParams = { + /** + * @docid + * @public + */ + locale: string; + /** + * @docid + * @public + * @type object + */ + collatorOptions?: Intl.CollatorOptions; +}; + + /** + * @docid + * @public + * @type object + */ + export type SummaryDescriptor = KeySelector | SelectionDescriptor & { + summaryType?: 'sum' | 'avg' | 'min' | 'max' | 'count'; +}; + +/** + * @public + * @docid + * @namespace DevExpress.data + * @type object + */ +export interface LoadOptions { + /** + * @docid + * @public + */ + customQueryParams?: any; + /** + * @docid + * @public + */ + startDate?: Date; + /** + * @docid + * @public + */ + endDate?: Date; + /** + * @docid + * @public + */ + expand?: Array; + /** + * @docid + * @public + * @type object + */ + filter?: FilterDescriptor | Array; + /** + * @docid + * @public + * @type object + */ + group?: GroupDescriptor | Array>; + /** + * @docid + * @public + * @type SummaryDescriptor | Array + */ + groupSummary?: SummaryDescriptor | Array>; + /** + * @docid + * @public + */ + parentIds?: Array; + /** + * @docid + * @public + */ + requireGroupCount?: boolean; + /** + * @docid + * @public + */ + requireTotalCount?: boolean; + /** + * @docid + * @type getter|Array + * @public + */ + searchExpr?: string | Function | Array; + /** + * @docid + * @public + */ + searchOperation?: SearchOperation; + /** + * @docid + * @public + */ + searchValue?: any; + /** + * @docid + * @public + * @type object + */ + select?: SelectDescriptor; + /** + * @docid + * @public + */ + skip?: number; + /** + * @docid + * @public + * @type object + */ + sort?: SortDescriptor | Array>; + /** + * @docid + * @public + */ + take?: number; + /** + * @docid + * @public + * @type SummaryDescriptor | Array + */ + totalSummary?: SummaryDescriptor | Array>; + /** + * @docid + * @public + */ + userData?: any; +} + +/** +* @public +* @namespace DevExpress.data.utils +*/ +export type Store = + CustomStore | + ArrayStore | + LocalStore | + ODataStore; + +/** +* @public +* @namespace DevExpress.data.utils +* @type object +*/ +export type StoreOptions = + CustomStoreOptions | + ArrayStoreOptions & { type: 'array' } | + LocalStoreOptions & { type: 'local' } | + ODataStoreOptions & { type: 'odata' }; + +/** + * @docid + * @namespace DevExpress + * @public + */ +export class EndpointSelector { + constructor(options: any); + /** + * @docid + * @publicName urlFor(key) + * @public + */ + urlFor(key: string): string; +} + +/** + * @docid Utils.errorHandler + * @type function(e) + * @namespace DevExpress.data + * @deprecated Utils.setErrorHandler + * @public + */ +export function errorHandler(e: Error): void; + +/** + * @docid Utils.setErrorHandler + * @type function(handler) + * @namespace DevExpress.data + * @public + */ +export function setErrorHandler(handler: (e: Error) => void): void; + +/** + * @docid + * @namespace DevExpress.data + */ +export interface LocalStoreOptions< + TItem = any, + TKey = any, +> extends ArrayStoreOptions { + /** + * @docid + * @default 10000 + * @public + */ + flushInterval?: number; + /** + * @docid + * @default false + * @public + */ + immediate?: boolean; + /** + * @docid + * @public + */ + name?: string; +} + +/** + * @docid + * @inherits ArrayStore + * @public + * @options LocalStoreOptions + */ +export class LocalStore< + TItem = any, + TKey = any, +> extends ArrayStore { + constructor(options?: LocalStoreOptions); + /** + * @docid + * @publicName clear() + * @public + */ + clear(): void; +} + +/** + * @docid + * @type object + * @public + */ +export interface Query { + /** + * @docid + * @publicName aggregate(seed, step, finalize) + * @param1 seed:object + * @return Promise + * @public + */ + aggregate(seed: any, step: Function, finalize: Function): DxPromise; + /** + * @docid + * @publicName aggregate(step) + * @return Promise + * @public + */ + aggregate(step: Function): DxPromise; + /** + * @docid + * @publicName avg() + * @return Promise + * @public + */ + avg(): DxPromise; + /** + * @docid + * @publicName avg(getter) + * @param1 getter:object + * @return Promise + * @public + */ + avg(getter: any): DxPromise; + /** + * @docid + * @publicName count() + * @return Promise + * @public + */ + count(): DxPromise; + /** + * @docid + * @publicName enumerate() + * @return Promise + * @public + */ + enumerate(): DxPromise; + /** + * @docid + * @publicName filter(criteria) + * @public + */ + filter(criteria: Array): Query; + /** + * @docid + * @publicName filter(predicate) + * @public + */ + filter(predicate: Function): Query; + /** + * @docid + * @publicName groupBy(getter) + * @param1 getter:object + * @public + */ + groupBy(getter: any): Query; + /** + * @docid + * @publicName max() + * @return Promise + * @public + */ + max(): DxPromise; + /** + * @docid + * @publicName max(getter) + * @param1 getter:object + * @return Promise + * @public + */ + max(getter: any): DxPromise; + /** + * @docid + * @publicName min() + * @return Promise + * @public + */ + min(): DxPromise; + /** + * @docid + * @publicName min(getter) + * @param1 getter:object + * @return Promise + * @public + */ + min(getter: any): DxPromise; + /** + * @docid + * @publicName select(getter) + * @param1 getter:object|Array + * @public + */ + select(...getters: any[]): Query; + /** + * @docid + * @publicName slice(skip, take) + * @param2 take:number|undefined + * @public + */ + slice(skip: number, take?: number): Query; + /** + * @docid + * @publicName sortBy(getter) + * @param1 getter:object + * @public + */ + sortBy(getter: any): Query; + /** + * @docid + * @publicName sortBy(getter, desc) + * @param1 getter:object + * @public + */ + sortBy(getter: any, desc: boolean): Query; + /** + * @docid + * @publicName sum() + * @return Promise + * @public + */ + sum(): DxPromise; + /** + * @docid + * @publicName sum(getter) + * @param1 getter:object + * @return Promise + * @public + */ + sum(getter: any): DxPromise; + /** + * @docid + * @publicName thenBy(getter) + * @param1 getter:object + * @public + */ + thenBy(getter: any): Query; + /** + * @docid + * @publicName thenBy(getter, desc) + * @param1 getter:object + * @public + */ + thenBy(getter: any, desc: boolean): Query; + /** + * @docid + * @publicName toArray() + * @public + */ + toArray(): Array; +} + +/** + * @docid Utils.query + * @publicName query(array, queryOptions) + * @param2 queryOptions:object + * @namespace DevExpress.data + * @public + */ +export function query(array: Array, queryOptions?: any): Query; + +/** + * @docid Utils.query + * @publicName query(url, queryOptions) + * @param2 queryOptions:object + * @namespace DevExpress.data + * @public + */ +export function query(url: string, queryOptions: any): Query; + +/** + * @docid Utils.base64_encode + * @publicName base64_encode(input) + * @namespace DevExpress.data + * @public + */ +export function base64_encode(input: string | Array): string; + +/** + * @docid Utils.compileGetter + * @publicName compileGetter(expr) + * @namespace DevExpress.data.utils + * @public + */ +export function compileGetter(expr: string | Array): Function; + +/** + * @docid Utils.compileSetter + * @publicName compileSetter(expr) + * @namespace DevExpress.data.utils + * @public + */ +export function compileSetter(expr: string | Array): Function; + +/** + * @docid + * @hidden + */ +export class DataHelperMixin { + /** + * @docid + * @publicName getDataSource() + * @public + */ + getDataSource(): DataSource; +} + +export interface ODataRequestOptions { + accepts: any; + async: boolean; + contentType: string | boolean; + data: any; + dataType: string; + headers: any; + jsonp?: boolean; + method: string; + timeout: number; + url: string; + xhrFields: any; +} + +export type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'MERGE'; + +/** + * @docid + * @namespace DevExpress.data + * @type object + */ +export interface ODataContextOptions { + /** + * @docid + * @type_function_param1_field params:object + * @type_function_param1_field payload:object + * @type_function_param1_field headers:object + * @public + */ + beforeSend?: ((options: { url: string; async: boolean; method: string; timeout: number; params: any; payload: any; headers: any }) => void); + /** + * @docid + * @public + */ + deserializeDates?: boolean; + /** + * @docid + * @public + */ + entities?: any; + /** + * @docid + * @type_function_param1 e:Error + * @type_function_param1_field errorDetails:object + * @type_function_param1_field requestOptions:object + * @public + */ + errorHandler?: ((e: { httpStatus: number; errorDetails: any; requestOptions: ODataRequestOptions }) => void); + /** + * @docid + * @public + */ + filterToLower?: boolean; + /** + * @docid + * @default false + * @public + */ + jsonp?: boolean; + /** + * @docid + * @public + */ + url?: string; + /** + * @docid + * @default 4 + * @acceptValues 2|3|4 + * @public + */ + version?: number; + /** + * @docid + * @default false + * @public + */ + withCredentials?: boolean; +} +/** + * @docid + * @public + * @options ODataContextOptions + */ +export class ODataContext { + constructor(options?: ODataContextOptions); + /** + * @docid + * @publicName get(operationName, params) + * @param2 params:object + * @return Promise + * @public + */ + get(operationName: string, params: any): DxPromise; + /** + * @docid + * @publicName invoke(operationName, params, httpMethod) + * @param2 params:object + * @param3 httpMethod:string + * @return Promise + * @public + */ + invoke(operationName: string, params: any, httpMethod: HttpMethod): DxPromise; + /** + * @docid + * @publicName objectLink(entityAlias, key) + * @param2 key:object|string|number + * @return object + * @public + */ + objectLink(entityAlias: string, key: any | string | number): any; +} + +/** + * @docid + * @namespace DevExpress.data + */ +export interface ODataStoreOptions< + TItem = any, + TKey = any, +> extends StoreOptionsBase { + /** + * @docid + * @type_function_param1_field params:object + * @type_function_param1_field payload:object + * @type_function_param1_field headers:object + * @public + */ + beforeSend?: ((options: { url: string; async: boolean; method: string; timeout: number; params: any; payload: any; headers: any }) => void); + /** + * @docid + * @public + */ + deserializeDates?: boolean; + /** + * @docid + * @type_function_param1 e:Error + * @type_function_param1_field errorDetails:object + * @type_function_param1_field requestOptions:object + * @public + */ + errorHandler?: ((e: { httpStatus: number; errorDetails: any; requestOptions: ODataRequestOptions }) => void); + /** + * @docid + * @default {} + * @public + */ + fieldTypes?: any; + /** + * @docid + * @public + */ + filterToLower?: boolean; + /** + * @docid + * @default false + * @public + */ + jsonp?: boolean; + /** + * @docid + * @type string|object + * @acceptValues "String"|"Int32"|"Int64"|"Guid"|"Boolean"|"Single"|"Decimal" + * @public + */ + keyType?: 'String' | 'Int32' | 'Int64' | 'Guid' | 'Boolean' | 'Single' | 'Decimal' | any; + /** + * @docid + * @public + */ + url?: string; + /** + * @docid + * @default 4 + * @acceptValues 2|3|4 + * @public + */ + version?: number; + /** + * @docid + * @default false + * @public + */ + withCredentials?: boolean; +} + +/** + * @docid + * @inherits Store + * @public + * @options ODataStoreOptions + */ +export class ODataStore< + TItem = any, + TKey = any, +> extends StoreBase { + constructor(options?: ODataStoreOptions); + /** + * @docid + * @publicName byKey(key, extraOptions) + * @param1 key:object|string|number + * @return Promise + * @public + */ + byKey(key: TKey, extraOptions?: { expand?: string | Array; select?: string | Array }): DxPromise; + /** + * @docid + * @publicName createQuery(loadOptions) + * @return object + * @public + */ + createQuery(loadOptions?: { expand?: string | Array; requireTotalCount?: boolean; customQueryParams?: any }): Query; +} + +/** + * @docid + * @namespace DevExpress.data + * @public + */ +export class EdmLiteral { + constructor(value: string); + /** + * @docid + * @publicName valueOf() + * @public + */ + valueOf(): string; +} + +/** + * @const Utils.keyConverters + * @publicName odata.keyConverters + * @namespace DevExpress.data.utils.odata + * @public + */ +// eslint-disable-next-line vars-on-top, import/no-mutable-exports, no-var, @typescript-eslint/init-declarations, @typescript-eslint/no-explicit-any +export var keyConverters: any; diff --git a/packages/devextreme/js/common/data.js b/packages/devextreme/js/common/data.js new file mode 100644 index 000000000000..82f267f97a39 --- /dev/null +++ b/packages/devextreme/js/common/data.js @@ -0,0 +1,13 @@ +export { default as applyChanges } from './data/apply_changes'; +export { default as ArrayStore } from './data/array_store'; +export { default as CustomStore } from './data/custom_store'; +export { default as DataSource } from './data/data_source'; +export { default as EndpointSelector } from './data/endpoint_selector'; +export { errorHandler, setErrorHandler } from './data/errors'; +export { default as LocalStore } from './data/local_store'; +export { default as query } from './data/query'; +export { base64_encode, compileGetter, compileSetter } from './data/utils'; +export { default as DataHelperMixin } from './data/data_helper'; +export { default as ODataContext } from './data/odata/context'; +export { default as ODataStore } from './data/odata/store'; +export { EdmLiteral, keyConverters } from './data/odata/utils'; diff --git a/packages/devextreme/js/common/data/abstract_store.d.ts b/packages/devextreme/js/common/data/abstract_store.d.ts index 98fe86b7122e..f9cd0a1e2126 100644 --- a/packages/devextreme/js/common/data/abstract_store.d.ts +++ b/packages/devextreme/js/common/data/abstract_store.d.ts @@ -1,13 +1,11 @@ import { DxExtendedPromise, -} from '../core/utils/deferred'; -import { - Store as BaseStore, - Options as BaseStoreOptions, -} from './store'; +} from '../../core/utils/deferred'; import { + StoreBase, + StoreOptionsBase, LoadOptions, -} from './index'; +} from '../data'; export type Options< TItem = any, @@ -20,7 +18,7 @@ export type Options< interface AbstractStoreOptions< TItem = any, TKey = any, - > extends BaseStoreOptions { + > extends StoreOptionsBase { /** * @docid StoreOptions.onLoaded * @type_function_param2 loadOptions:LoadOptions @@ -36,7 +34,7 @@ interface AbstractStoreOptions< export default class AbstractStore< TItem = any, TKey = any, - > extends BaseStore { + > extends StoreBase { constructor(options?: Options); /** * @docid Store.load() @@ -59,10 +57,10 @@ export default class AbstractStore< * @namespace DevExpress.data * @deprecated Use Options from data/store instead */ -export type StoreOptions = BaseStoreOptions; +export type StoreOptions = StoreOptionsBase; /** * @namespace DevExpress.data * @deprecated Use Store from data/store instead */ -export type Store = BaseStore; +export type Store = StoreBase; diff --git a/packages/devextreme/js/common/data/abstract_store.js b/packages/devextreme/js/common/data/abstract_store.js index 28ec4a10a01a..a5d02c408838 100644 --- a/packages/devextreme/js/common/data/abstract_store.js +++ b/packages/devextreme/js/common/data/abstract_store.js @@ -1 +1 @@ -export { default } from '../__internal/data/m_abstract_store'; +export { default } from '../../__internal/data/m_abstract_store'; diff --git a/packages/devextreme/js/common/data/array_query.js b/packages/devextreme/js/common/data/array_query.js index eb370819807a..a3877e9bbd98 100644 --- a/packages/devextreme/js/common/data/array_query.js +++ b/packages/devextreme/js/common/data/array_query.js @@ -1 +1 @@ -export { default } from '../__internal/data/m_array_query'; +export { default } from '../../__internal/data/m_array_query'; diff --git a/packages/devextreme/js/common/data/array_store.js b/packages/devextreme/js/common/data/array_store.js index a6a9ab189189..0715f4b3927f 100644 --- a/packages/devextreme/js/common/data/array_store.js +++ b/packages/devextreme/js/common/data/array_store.js @@ -1 +1 @@ -export { default } from '../__internal/data/m_array_store'; +export { default } from '../../__internal/data/m_array_store'; diff --git a/packages/devextreme/js/common/data/array_utils.js b/packages/devextreme/js/common/data/array_utils.js index 7d6bc9402225..74993adf03d4 100644 --- a/packages/devextreme/js/common/data/array_utils.js +++ b/packages/devextreme/js/common/data/array_utils.js @@ -1 +1 @@ -export * from '../__internal/data/m_array_utils'; +export * from '../../__internal/data/m_array_utils'; diff --git a/packages/devextreme/js/common/data/custom-store.d.ts b/packages/devextreme/js/common/data/custom-store.d.ts deleted file mode 100644 index a10801a29fc5..000000000000 --- a/packages/devextreme/js/common/data/custom-store.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @docid - * @public - */ -export type GroupItem< - TItem = any, -> = { - /** @docid */ - key: any | string | number; - /** - * @docid - * @type Array|Array|null - */ - items: Array | Array> | null; - /** @docid */ - count?: number; - /** @docid */ - summary?: Array; -}; - -type LoadResultArray = Array | Array>; - -/** - * @docid - * @public - */ -export type LoadResultObject = { - /** - * @docid - * @type Array|Array - */ - data: Array | Array>; - /** @docid */ - totalCount?: number; - /** @docid */ - summary?: Array; - /** @docid */ - groupCount?: number; - }; - -/** - * @docid - * @public - * @type object - */ -export type LoadResult< - TItem = any, -> = - | Object - | LoadResultArray - | LoadResultObject; - -/** - * @docid - * @public - */ -export function isLoadResultObject(res: LoadResult): res is LoadResultObject; - -/** - * @docid - * @public - */ -export function isGroupItemsArray(res: LoadResult): res is Array>; - -/** - * @docid - * @public - */ -export function isItemsArray(res: LoadResult): res is Array; diff --git a/packages/devextreme/js/common/data/custom-store.js b/packages/devextreme/js/common/data/custom-store.js deleted file mode 100644 index 095a86a5b60b..000000000000 --- a/packages/devextreme/js/common/data/custom-store.js +++ /dev/null @@ -1,18 +0,0 @@ -function isGroupItem(item) { - if(item === undefined || item === null || typeof item !== 'object') { - return false; - } - return 'key' in item && 'items' in item; -} - -export function isLoadResultObject(res) { - return !Array.isArray(res) && 'data' in res; -} - -export function isGroupItemsArray(res) { - return Array.isArray(res) && !!res.length && isGroupItem(res[0]); -} - -export function isItemsArray(res) { - return Array.isArray(res) && !isGroupItem(res[0]); -} diff --git a/packages/devextreme/js/common/data/custom_store.js b/packages/devextreme/js/common/data/custom_store.js index ce6176339591..d819e26f5476 100644 --- a/packages/devextreme/js/common/data/custom_store.js +++ b/packages/devextreme/js/common/data/custom_store.js @@ -1 +1,20 @@ -export { default } from '../__internal/data/m_custom_store'; +export { default } from '../../__internal/data/m_custom_store'; + +function isGroupItem(item) { + if(item === undefined || item === null || typeof item !== 'object') { + return false; + } + return 'key' in item && 'items' in item; +} + +export function isLoadResultObject(res) { + return !Array.isArray(res) && 'data' in res; +} + +export function isGroupItemsArray(res) { + return Array.isArray(res) && !!res.length && isGroupItem(res[0]); +} + +export function isItemsArray(res) { + return Array.isArray(res) && !isGroupItem(res[0]); +} diff --git a/packages/devextreme/js/common/data/data_helper.js b/packages/devextreme/js/common/data/data_helper.js new file mode 100644 index 000000000000..998956583371 --- /dev/null +++ b/packages/devextreme/js/common/data/data_helper.js @@ -0,0 +1,166 @@ + +import { DataSource } from './data_source/data_source'; +import { extend } from '../../core/utils/extend'; +import { normalizeDataSourceOptions } from './data_source/utils'; +import DataController from '../../__internal/ui/collection/m_data_controller'; + +const DATA_SOURCE_OPTIONS_METHOD = '_dataSourceOptions'; +const DATA_SOURCE_CHANGED_METHOD = '_dataSourceChangedHandler'; +const DATA_SOURCE_LOAD_ERROR_METHOD = '_dataSourceLoadErrorHandler'; +const DATA_SOURCE_LOADING_CHANGED_METHOD = '_dataSourceLoadingChangedHandler'; +const DATA_SOURCE_FROM_URL_LOAD_MODE_METHOD = '_dataSourceFromUrlLoadMode'; +const SPECIFIC_DATA_SOURCE_OPTION = '_getSpecificDataSourceOption'; +const NORMALIZE_DATA_SOURCE = '_normalizeDataSource'; + + +const DataHelperMixin = { + + postCtor: function() { + this.on('disposing', function() { + this._disposeDataSource(); + }.bind(this)); + }, + + _refreshDataSource: function() { + this._initDataSource(); + this._loadDataSource(); + }, + + _initDataSource: function() { + let dataSourceOptions = (SPECIFIC_DATA_SOURCE_OPTION in this) ? this[SPECIFIC_DATA_SOURCE_OPTION]() : this.option('dataSource'); + let widgetDataSourceOptions; + let dataSourceType; + + this._disposeDataSource(); + + if(dataSourceOptions) { + if(dataSourceOptions instanceof DataSource) { + this._isSharedDataSource = true; + this._dataSource = dataSourceOptions; + } else { + widgetDataSourceOptions = (DATA_SOURCE_OPTIONS_METHOD in this) ? this[DATA_SOURCE_OPTIONS_METHOD]() : {}; + dataSourceType = this._dataSourceType ? this._dataSourceType() : DataSource; + + dataSourceOptions = normalizeDataSourceOptions(dataSourceOptions, { + fromUrlLoadMode: (DATA_SOURCE_FROM_URL_LOAD_MODE_METHOD in this) && this[DATA_SOURCE_FROM_URL_LOAD_MODE_METHOD]() + }); + + this._dataSource = new dataSourceType(extend(true, {}, widgetDataSourceOptions, dataSourceOptions)); + } + + if(NORMALIZE_DATA_SOURCE in this) { + this._dataSource = this[NORMALIZE_DATA_SOURCE](this._dataSource); + } + + this._addDataSourceHandlers(); + this._initDataController(); + } + }, + + _initDataController: function() { + const dataController = this.option?.('_dataController'); + const dataSource = this._dataSource; + + if(dataController) { + this._dataController = dataController; + } else { + this._dataController = new DataController(dataSource); + } + }, + + _addDataSourceHandlers: function() { + if(DATA_SOURCE_CHANGED_METHOD in this) { + this._addDataSourceChangeHandler(); + } + + if(DATA_SOURCE_LOAD_ERROR_METHOD in this) { + this._addDataSourceLoadErrorHandler(); + } + + if(DATA_SOURCE_LOADING_CHANGED_METHOD in this) { + this._addDataSourceLoadingChangedHandler(); + } + + this._addReadyWatcher(); + }, + + _addReadyWatcher: function() { + this.readyWatcher = (function(isLoading) { + this._ready && this._ready(!isLoading); + }).bind(this); + this._dataSource.on('loadingChanged', this.readyWatcher); + }, + + _addDataSourceChangeHandler: function() { + const dataSource = this._dataSource; + this._proxiedDataSourceChangedHandler = (function(e) { + this[DATA_SOURCE_CHANGED_METHOD](dataSource.items(), e); + }).bind(this); + dataSource.on('changed', this._proxiedDataSourceChangedHandler); + }, + + _addDataSourceLoadErrorHandler: function() { + this._proxiedDataSourceLoadErrorHandler = this[DATA_SOURCE_LOAD_ERROR_METHOD].bind(this); + this._dataSource.on('loadError', this._proxiedDataSourceLoadErrorHandler); + }, + + _addDataSourceLoadingChangedHandler: function() { + this._proxiedDataSourceLoadingChangedHandler = this[DATA_SOURCE_LOADING_CHANGED_METHOD].bind(this); + this._dataSource.on('loadingChanged', this._proxiedDataSourceLoadingChangedHandler); + }, + + _loadDataSource: function() { + const dataSource = this._dataSource; + if(dataSource) { + if(dataSource.isLoaded()) { + this._proxiedDataSourceChangedHandler && this._proxiedDataSourceChangedHandler(); + } else { + dataSource.load(); + } + } + }, + + _loadSingle: function(key, value) { + key = key === 'this' ? this._dataSource.key() || 'this' : key; + return this._dataSource.loadSingle(key, value); + }, + + _isLastPage: function() { + return !this._dataSource || this._dataSource.isLastPage() || !this._dataSource._pageSize; + }, + + _isDataSourceLoading: function() { + return this._dataSource && this._dataSource.isLoading(); + }, + + _disposeDataSource: function() { + if(this._dataSource) { + if(this._isSharedDataSource) { + delete this._isSharedDataSource; + + this._proxiedDataSourceChangedHandler && this._dataSource.off('changed', this._proxiedDataSourceChangedHandler); + this._proxiedDataSourceLoadErrorHandler && this._dataSource.off('loadError', this._proxiedDataSourceLoadErrorHandler); + this._proxiedDataSourceLoadingChangedHandler && this._dataSource.off('loadingChanged', this._proxiedDataSourceLoadingChangedHandler); + + if(this._dataSource._eventsStrategy) { + this._dataSource._eventsStrategy.off('loadingChanged', this.readyWatcher); + } + } else { + this._dataSource.dispose(); + } + + delete this._dataSource; + + delete this._proxiedDataSourceChangedHandler; + delete this._proxiedDataSourceLoadErrorHandler; + delete this._proxiedDataSourceLoadingChangedHandler; + } + }, + + getDataSource: function() { + return this._dataSource || null; + } + +}; + +export default DataHelperMixin; diff --git a/packages/devextreme/js/common/data/data_source.js b/packages/devextreme/js/common/data/data_source.js index fcf080056c7a..56ca945f1932 100644 --- a/packages/devextreme/js/common/data/data_source.js +++ b/packages/devextreme/js/common/data/data_source.js @@ -1,3 +1,2 @@ - import { DataSource } from './data_source/data_source'; export default DataSource; diff --git a/packages/devextreme/js/common/data/data_source/data_source.js b/packages/devextreme/js/common/data/data_source/data_source.js index f8d6c50bce74..806ca4198f06 100644 --- a/packages/devextreme/js/common/data/data_source/data_source.js +++ b/packages/devextreme/js/common/data/data_source/data_source.js @@ -26,4 +26,4 @@ * @name DataSourceOptions.store.type * @type Enums.StoreType */ -export * from '../../__internal/data/data_source/m_data_source'; +export * from '../../../__internal/data/data_source/m_data_source'; diff --git a/packages/devextreme/js/common/data/data_source/operation_manager.js b/packages/devextreme/js/common/data/data_source/operation_manager.js index 42f6097f70a8..059f55b8e65f 100644 --- a/packages/devextreme/js/common/data/data_source/operation_manager.js +++ b/packages/devextreme/js/common/data/data_source/operation_manager.js @@ -1 +1 @@ -export { default } from '../../__internal/data/data_source/m_operation_manager'; +export { default } from '../../../__internal/data/data_source/m_operation_manager'; diff --git a/packages/devextreme/js/common/data/data_source/utils.js b/packages/devextreme/js/common/data/data_source/utils.js index 030e499772d0..8b2686832ca6 100644 --- a/packages/devextreme/js/common/data/data_source/utils.js +++ b/packages/devextreme/js/common/data/data_source/utils.js @@ -1 +1 @@ -export * from '../../__internal/data/data_source/m_utils'; +export * from '../../../__internal/data/data_source/m_utils'; diff --git a/packages/devextreme/js/common/data/endpoint_selector.js b/packages/devextreme/js/common/data/endpoint_selector.js index 278737be119a..e613c011c0ce 100644 --- a/packages/devextreme/js/common/data/endpoint_selector.js +++ b/packages/devextreme/js/common/data/endpoint_selector.js @@ -4,4 +4,4 @@ * @param1 options:Object * @hidden */ -export { default } from '../__internal/data/m_endpoint_selector'; +export { default } from '../../__internal/data/m_endpoint_selector'; diff --git a/packages/devextreme/js/common/data/errors.js b/packages/devextreme/js/common/data/errors.js index 73263e080700..f2ad9f675151 100644 --- a/packages/devextreme/js/common/data/errors.js +++ b/packages/devextreme/js/common/data/errors.js @@ -88,4 +88,4 @@ * @name ErrorsData.W4002 */ -export * from '../__internal/data/m_errors'; +export * from '../../__internal/data/m_errors'; diff --git a/packages/devextreme/js/common/data/local_store.js b/packages/devextreme/js/common/data/local_store.js index 4788d4b71d29..2b903d32d98b 100644 --- a/packages/devextreme/js/common/data/local_store.js +++ b/packages/devextreme/js/common/data/local_store.js @@ -1 +1 @@ -export { default } from '../__internal/data/m_local_store'; +export { default } from '../../__internal/data/m_local_store'; diff --git a/packages/devextreme/js/common/data/odata/context.js b/packages/devextreme/js/common/data/odata/context.js index e3621d0b626c..e6d45490192c 100644 --- a/packages/devextreme/js/common/data/odata/context.js +++ b/packages/devextreme/js/common/data/odata/context.js @@ -1 +1 @@ -export { default } from '../../__internal/data/odata/m_context'; +export { default } from '../../../__internal/data/odata/m_context'; diff --git a/packages/devextreme/js/common/data/odata/query_adapter.js b/packages/devextreme/js/common/data/odata/query_adapter.js index 4b6486934b8c..a56104665e6c 100644 --- a/packages/devextreme/js/common/data/odata/query_adapter.js +++ b/packages/devextreme/js/common/data/odata/query_adapter.js @@ -1 +1 @@ -export * from '../../__internal/data/odata/m_query_adapter'; +export * from '../../../__internal/data/odata/m_query_adapter'; diff --git a/packages/devextreme/js/common/data/odata/request_dispatcher.js b/packages/devextreme/js/common/data/odata/request_dispatcher.js index 0aba5a72cb0f..13fc3dc1b4c6 100644 --- a/packages/devextreme/js/common/data/odata/request_dispatcher.js +++ b/packages/devextreme/js/common/data/odata/request_dispatcher.js @@ -1 +1 @@ -export { default } from '../../__internal/data/odata/m_request_dispatcher'; +export { default } from '../../../__internal/data/odata/m_request_dispatcher'; diff --git a/packages/devextreme/js/common/data/odata/store.js b/packages/devextreme/js/common/data/odata/store.js index 8168fdb0262c..75362c160631 100644 --- a/packages/devextreme/js/common/data/odata/store.js +++ b/packages/devextreme/js/common/data/odata/store.js @@ -1 +1 @@ -export { default } from '../../__internal/data/odata/m_store'; +export { default } from '../../../__internal/data/odata/m_store'; diff --git a/packages/devextreme/js/common/data/odata/utils.js b/packages/devextreme/js/common/data/odata/utils.js index c1c0081a98d0..dd6b652bf0b2 100644 --- a/packages/devextreme/js/common/data/odata/utils.js +++ b/packages/devextreme/js/common/data/odata/utils.js @@ -3,4 +3,4 @@ * @publicName ctor(value) * @param1 value:string */ -export * from '../../__internal/data/odata/m_utils'; +export * from '../../../__internal/data/odata/m_utils'; diff --git a/packages/devextreme/js/common/data/query.js b/packages/devextreme/js/common/data/query.js index 9daad5afb660..b1e2c444e038 100644 --- a/packages/devextreme/js/common/data/query.js +++ b/packages/devextreme/js/common/data/query.js @@ -1 +1 @@ -export { default } from '../__internal/data/m_query'; +export { default } from '../../__internal/data/m_query'; diff --git a/packages/devextreme/js/common/data/remote_query.js b/packages/devextreme/js/common/data/remote_query.js index b147929d99c5..592ebfe65d2c 100644 --- a/packages/devextreme/js/common/data/remote_query.js +++ b/packages/devextreme/js/common/data/remote_query.js @@ -1 +1 @@ -export { default } from '../__internal/data/m_remote_query'; +export { default } from '../../__internal/data/m_remote_query'; diff --git a/packages/devextreme/js/common/data/store_helper.js b/packages/devextreme/js/common/data/store_helper.js index b52b1c493c83..bb0fca23c7d1 100644 --- a/packages/devextreme/js/common/data/store_helper.js +++ b/packages/devextreme/js/common/data/store_helper.js @@ -1 +1 @@ -export { default } from '../__internal/data/m_store_helper'; +export { default } from '../../__internal/data/m_store_helper'; diff --git a/packages/devextreme/js/common/data/utils.js b/packages/devextreme/js/common/data/utils.js index f056b6c0caa8..a59212919375 100644 --- a/packages/devextreme/js/common/data/utils.js +++ b/packages/devextreme/js/common/data/utils.js @@ -1,4 +1,11 @@ +import { compileGetter, compileSetter } from '../../core/utils/data'; + /** * @name Utils */ -export * from '../__internal/data/m_utils'; +export * from '../../__internal/data/m_utils'; + +export { + compileGetter, + compileSetter +}; diff --git a/packages/devextreme/js/common/export.d.ts b/packages/devextreme/js/common/export.d.ts index fbe88f9161db..d6ef042f215a 100644 --- a/packages/devextreme/js/common/export.d.ts +++ b/packages/devextreme/js/common/export.d.ts @@ -4,49 +4,49 @@ * @namespace DevExpress */ export interface ExportLoadPanel { - /** - * @docid - * @default true - */ - enabled?: boolean; - /** - * @docid - * @default "Exporting..." - */ - text?: string; - /** - * @docid - * @default 200 - */ - width?: number; - /** - * @docid - * @default 90 - */ - height?: number; - /** - * @docid - * @default true - */ - showIndicator?: boolean; - /** - * @docid - * @default "" - */ - indicatorSrc?: string; - /** - * @docid - * @default true - */ - showPane?: boolean; - /** - * @docid - * @default false - */ - shading?: boolean; - /** - * @docid - * @default '' - */ - shadingColor?: string; + /** + * @docid + * @default true + */ + enabled?: boolean; + /** + * @docid + * @default "Exporting..." + */ + text?: string; + /** + * @docid + * @default 200 + */ + width?: number; + /** + * @docid + * @default 90 + */ + height?: number; + /** + * @docid + * @default true + */ + showIndicator?: boolean; + /** + * @docid + * @default "" + */ + indicatorSrc?: string; + /** + * @docid + * @default true + */ + showPane?: boolean; + /** + * @docid + * @default false + */ + shading?: boolean; + /** + * @docid + * @default '' + */ + shadingColor?: string; } diff --git a/packages/devextreme/js/common/export/excel.d.ts b/packages/devextreme/js/common/export/excel.d.ts index 9caa39277801..6ec0dab75ead 100644 --- a/packages/devextreme/js/common/export/excel.d.ts +++ b/packages/devextreme/js/common/export/excel.d.ts @@ -1,7 +1,7 @@ -import { DxPromise } from './core/utils/deferred'; -import dxDataGrid, { Column } from './ui/data_grid'; -import dxPivotGrid, { Cell } from './ui/pivot_grid'; -import { ExportLoadPanel } from './exporter/export_load_panel'; +import { DxPromise } from '../../common'; +import dxDataGrid, { Column } from '../../ui/data_grid'; +import dxPivotGrid, { Cell } from '../../ui/pivot_grid'; +import { ExportLoadPanel } from '../export'; /** * @public diff --git a/packages/devextreme/js/common/export/excel.js b/packages/devextreme/js/common/export/excel.js index 811a52494b39..c4ebeb180080 100644 --- a/packages/devextreme/js/common/export/excel.js +++ b/packages/devextreme/js/common/export/excel.js @@ -1,5 +1,5 @@ -import { exportDataGrid } from './exporter/exceljs/export_data_grid'; -import { exportPivotGrid } from './exporter/exceljs/export_pivot_grid'; +import { exportDataGrid } from '../../exporter/exceljs/export_data_grid'; +import { exportPivotGrid } from '../../exporter/exceljs/export_pivot_grid'; /** * @name excelExporter diff --git a/packages/devextreme/js/common/export/pdf.d.ts b/packages/devextreme/js/common/export/pdf.d.ts index 50cf1e7c1dfd..1449c4051673 100644 --- a/packages/devextreme/js/common/export/pdf.d.ts +++ b/packages/devextreme/js/common/export/pdf.d.ts @@ -1,13 +1,13 @@ -import { DxPromise } from './core/utils/deferred'; -import dxDataGrid from './ui/data_grid'; -import { ExportLoadPanel } from './exporter/export_load_panel'; +import { DxPromise } from '../../common'; +import dxDataGrid from '../../ui/data_grid'; +import { ExportLoadPanel } from '../export'; import dxGantt, { GanttPdfExportMode, GanttPdfExportDateRange, -} from './ui/gantt'; +} from '../../ui/gantt'; import { DataGridCell as ExcelCell, -} from './excel_exporter'; +} from './excel'; /** * @public diff --git a/packages/devextreme/js/common/export/pdf.js b/packages/devextreme/js/common/export/pdf.js index 47aeeefad84c..efb7c84c2bcd 100644 --- a/packages/devextreme/js/common/export/pdf.js +++ b/packages/devextreme/js/common/export/pdf.js @@ -1,6 +1,6 @@ -import { exportDataGrid } from './exporter/jspdf/export_data_grid'; -import { exportDataGrid as exportDataGridWithAutoTable } from './exporter/jspdf/autotable/export_data_grid'; -import { exportGantt } from './exporter/jspdf/export_gantt'; +import { exportDataGrid } from '../../exporter/jspdf/export_data_grid'; +import { exportDataGrid as exportDataGridWithAutoTable } from '../../exporter/jspdf/autotable/export_data_grid'; +import { exportGantt } from '../../exporter/jspdf/export_gantt'; /** * @name PdfDataGridCell diff --git a/packages/devextreme/js/common/file_management.d.ts b/packages/devextreme/js/common/file_management.d.ts new file mode 100644 index 000000000000..1bf8dca9975e --- /dev/null +++ b/packages/devextreme/js/common/file_management.d.ts @@ -0,0 +1,442 @@ +/* eslint-disable max-classes-per-file */ +import { + DxPromise, +} from '../common'; + +/** + * @docid + * @namespace DevExpress.fileManagement + * @public + */ +export interface UploadInfo { + /** + * @docid + * @public + */ + bytesUploaded: number; + + /** + * @docid + * @public + */ + chunkCount: number; + + /** + * @docid + * @public + */ + customData: any; + + /** + * @docid + * @public + */ + chunkBlob: Blob; + + /** + * @docid + * @public + */ + chunkIndex: number; +} + +/** + * @namespace DevExpress.fileManagement + * @docid + * @type object + */ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export interface FileSystemProviderBaseOptions { + /** + * @docid + * @public + */ + dateModifiedExpr?: string | Function; + /** + * @docid + * @public + */ + isDirectoryExpr?: string | Function; + /** + * @docid + * @public + */ + keyExpr?: string | Function; + /** + * @docid + * @public + */ + nameExpr?: string | Function; + /** + * @docid + * @public + */ + sizeExpr?: string | Function; + /** + * @docid + * @public + */ + thumbnailExpr?: string | Function; +} + +/** +* @docid +* @namespace DevExpress.fileManagement +* @hidden +* @options FileSystemProviderBaseOptions +*/ +export class FileSystemProviderBase { + constructor(options?: FileSystemProviderBaseOptions); + /** + * @docid + * @publicName getItems() + * @return Promise> + * @public + */ + getItems(parentDirectory: FileSystemItem): DxPromise>; + + /** + * @docid + * @publicName renameItem() + * @return Promise + * @public + */ + renameItem(item: FileSystemItem, newName: string): DxPromise; + + /** + * @docid + * @publicName createDirectory() + * @return Promise + * @public + */ + createDirectory(parentDirectory: FileSystemItem, name: string): DxPromise; + + /** + * @docid + * @publicName deleteItems() + * @return Array> + * @public + */ + deleteItems(items: Array): Array>; + + /** + * @docid + * @publicName moveItems() + * @return Array> + * @public + */ + moveItems(items: Array, destinationDirectory: FileSystemItem): Array>; + + /** + * @docid + * @publicName copyItems() + * @return Array> + * @public + */ + copyItems(items: Array, destinationDirectory: FileSystemItem): Array>; + + /** + * @docid + * @publicName uploadFileChunk() + * @return Promise + * @public + */ + uploadFileChunk(fileData: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem): DxPromise; + + /** + * @docid + * @publicName abortFileUpload() + * @return Promise + * @public + */ + abortFileUpload(fileData: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem): DxPromise; + + /** + * @docid + * @publicName downloadItems() + * @public + */ + downloadItems(items: Array): void; + + /** + * @docid + * @publicName getItemsContent() + * @return Promise + * @public + */ + getItemsContent(items: Array): DxPromise; +} + +/** + * @docid FileSystemItem + * @namespace DevExpress.fileManagement + * @public + */ +export class FileSystemItem { + constructor(path: string, isDirectory: boolean, pathKeys?: Array); + + /** + * @docid FileSystemItem.path + * @public + */ + path: string; + + /** + * @docid FileSystemItem.pathKeys + * @public + */ + pathKeys: Array; + + /** + * @docid FileSystemItem.key + * @public + */ + key: string; + + /** + * @docid FileSystemItem.name + * @public + */ + name: string; + + /** + * @docid FileSystemItem.dateModified + * @public + */ + dateModified: Date; + + /** + * @docid FileSystemItem.size + * @public + */ + size: number; + + /** + * @docid FileSystemItem.isDirectory + * @public + */ + isDirectory: boolean; + + /** + * @docid FileSystemItem.hasSubDirectories + * @public + */ + hasSubDirectories: boolean; + + /** + * @docid FileSystemItem.thumbnail + * @public + */ + thumbnail: string; + + /** + * @docid FileSystemItem.dataItem + * @public + */ + dataItem: any; + + /** + * @docid FileSystemItem.getFileExtension + * @publicName getFileExtension() + * @public + */ + getFileExtension(): string; +} + +/** + * @namespace DevExpress.fileManagement + * @docid + */ +export interface CustomFileSystemProviderOptions extends FileSystemProviderBaseOptions { + /** + * @docid + * @type_function_return Promise|any + * @public + */ + abortFileUpload?: ((file: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem) => PromiseLike | any); + + /** + * @docid + * @type_function_return Promise|any + * @public + */ + copyItem?: ((item: FileSystemItem, destinationDirectory: FileSystemItem) => PromiseLike | any); + + /** + * @docid + * @type_function_return Promise|any + * @public + */ + createDirectory?: ((parentDirectory: FileSystemItem, name: string) => PromiseLike | any); + + /** + * @docid + * @type_function_return Promise|any + * @public + */ + deleteItem?: ((item: FileSystemItem) => PromiseLike | any); + + /** + * @docid + * @public + */ + downloadItems?: ((items: Array) => void); + + /** + * @docid + * @type_function_return Promise>|Array + * @public + */ + getItems?: ((parentDirectory: FileSystemItem) => PromiseLike> | Array); + + /** + * @docid + * @type_function_return Promise|object + * @public + */ + getItemsContent?: ((items: Array) => PromiseLike | any); + + /** + * @docid + * @public + */ + hasSubDirectoriesExpr?: string | Function; + + /** + * @docid + * @type_function_return Promise|any + * @public + */ + moveItem?: ((item: FileSystemItem, destinationDirectory: FileSystemItem) => PromiseLike | any); + + /** + * @docid + * @type_function_return Promise|any + * @public + */ + renameItem?: ((item: FileSystemItem, newName: string) => PromiseLike | any); + + /** + * @docid + * @type_function_return Promise|any + * @public + */ + uploadFileChunk?: ((file: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem) => PromiseLike | any); +} + +/** +* @docid +* @inherits FileSystemProviderBase +* @namespace DevExpress.fileManagement +* @public +* @options CustomFileSystemProviderOptions +*/ +export class CustomFileSystemProvider extends FileSystemProviderBase { + constructor(options?: CustomFileSystemProviderOptions); +} + +/** + * @docid FileSystemError + * @namespace DevExpress.fileManagement + * @public + */ +export class FileSystemError { + constructor(errorCode?: number, fileSystemItem?: FileSystemItem, errorText?: string); + /** + * @docid FileSystemError.fileSystemItem + * @public + */ + fileSystemItem?: FileSystemItem; + + /** + * @docid FileSystemError.errorCode + * @public + */ + errorCode?: number; + + /** + * @docid FileSystemError.errorText + * @public + */ + errorText?: string; +} + +/** + * @namespace DevExpress.fileManagement + * @docid + */ +export interface ObjectFileSystemProviderOptions extends FileSystemProviderBaseOptions { + /** + * @docid + * @public + */ + contentExpr?: string | Function; + /** + * @docid + * @public + */ + data?: Array; + /** + * @docid + * @public + */ + itemsExpr?: string | Function; +} + +/** +* @docid +* @inherits FileSystemProviderBase +* @namespace DevExpress.fileManagement +* @public +* @options ObjectFileSystemProviderOptions +*/ +export class ObjectFileSystemProvider extends FileSystemProviderBase { + constructor(options?: ObjectFileSystemProviderOptions); +} + +/** + * @namespace DevExpress.fileManagement + * @docid + */ +export interface RemoteFileSystemProviderOptions extends FileSystemProviderBaseOptions { + /** + * @docid + * @type_function_param1_field headers:object + * @type_function_param1_field xhrFields:object + * @type_function_param1_field formData:object + * @public + */ + beforeAjaxSend?: ((options: { headers?: any; xhrFields?: any; formData?: any }) => void); + /** + * @docid + * @type_function_param1_field formData:object + * @public + */ + beforeSubmit?: ((options: { formData?: any }) => void); + /** + * @docid + * @public + */ + endpointUrl?: string; + /** + * @docid + * @public + */ + hasSubDirectoriesExpr?: string | Function; + /** + * @docid + * @default {} + * @public + */ + requestHeaders?: any; +} +/** +* @docid +* @inherits FileSystemProviderBase +* @namespace DevExpress.fileManagement +* @public +* @options RemoteFileSystemProviderOptions +*/ +export class RemoteFileSystemProvider extends FileSystemProviderBase { + constructor(options?: RemoteFileSystemProviderOptions); +} diff --git a/packages/devextreme/js/common/file_management.js b/packages/devextreme/js/common/file_management.js new file mode 100644 index 000000000000..6d260b044eac --- /dev/null +++ b/packages/devextreme/js/common/file_management.js @@ -0,0 +1,6 @@ +export { default as CustomFileSystemProvider } from './file_management/custom_provider'; +export { default as FileSystemError } from './file_management/error'; +export { default as FileSystemItem } from './file_management/file_system_item'; +export { default as ObjectFileSystemProvider } from './file_management/object_provider'; +export { default as FileSystemProviderBase } from './file_management/provider_base'; +export { default as RemoteFileSystemProvider } from './file_management/remote_provider'; diff --git a/packages/devextreme/js/common/file_management/custom_provider.js b/packages/devextreme/js/common/file_management/custom_provider.js index e69895dc7da3..27a0eb299f08 100644 --- a/packages/devextreme/js/common/file_management/custom_provider.js +++ b/packages/devextreme/js/common/file_management/custom_provider.js @@ -1,6 +1,6 @@ -import { ensureDefined, noop } from '../core/utils/common'; -import { isFunction } from '../core/utils/type'; -import { compileGetter } from '../core/utils/data'; +import { ensureDefined, noop } from '../../core/utils/common'; +import { isFunction } from '../../core/utils/type'; +import { compileGetter } from '../../core/utils/data'; import FileSystemProviderBase from './provider_base'; diff --git a/packages/devextreme/js/common/file_management/file_system_item.js b/packages/devextreme/js/common/file_management/file_system_item.js index 0e5b9b37aa94..7e5051eb6044 100644 --- a/packages/devextreme/js/common/file_management/file_system_item.js +++ b/packages/devextreme/js/common/file_management/file_system_item.js @@ -1,4 +1,4 @@ -import { isString } from '../core/utils/type'; +import { isString } from '../../core/utils/type'; import { pathCombine, getFileExtension, getPathParts, getName, getEscapedFileName, PATH_SEPARATOR } from './utils'; class FileSystemItem { diff --git a/packages/devextreme/js/common/file_management/object_provider.js b/packages/devextreme/js/common/file_management/object_provider.js index a05ae10457b3..5e6c8e2a87d7 100644 --- a/packages/devextreme/js/common/file_management/object_provider.js +++ b/packages/devextreme/js/common/file_management/object_provider.js @@ -1,12 +1,12 @@ -import { ensureDefined } from '../core/utils/common'; -import { compileGetter, compileSetter } from '../core/utils/data'; -import Guid from '../core/guid'; -import { isFunction } from '../core/utils/type'; +import { ensureDefined } from '../../core/utils/common'; +import { compileGetter, compileSetter } from '../../core/utils/data'; +import Guid from '../../core/guid'; +import { isFunction } from '../../core/utils/type'; import { errors } from '../data/errors'; -import { Deferred } from '../core/utils/deferred'; -import { getWindow } from '../core/utils/window'; -import { fileSaver } from '../exporter/file_saver'; -import Errors from '../ui/widget/ui.errors'; +import { Deferred } from '../../core/utils/deferred'; +import { getWindow } from '../../core/utils/window'; +import { fileSaver } from '../../exporter/file_saver'; +import Errors from '../../ui/widget/ui.errors'; import JSZip from 'jszip'; import FileSystemProviderBase from './provider_base'; diff --git a/packages/devextreme/js/common/file_management/provider_base.js b/packages/devextreme/js/common/file_management/provider_base.js index 667d0484c9cf..1f62dc781bd2 100644 --- a/packages/devextreme/js/common/file_management/provider_base.js +++ b/packages/devextreme/js/common/file_management/provider_base.js @@ -1,10 +1,10 @@ -import { compileGetter } from '../core/utils/data'; -import { ensureDefined } from '../core/utils/common'; -import dateSerialization from '../core/utils/date_serialization'; -import { each } from '../core/utils/iterator'; -import { isPromise } from '../core/utils/type'; -import { Deferred, fromPromise } from '../core/utils/deferred'; -import FileSystemItem from './file_system_item'; +import { compileGetter } from '../../core/utils/data'; +import { ensureDefined } from '../../core/utils/common'; +import dateSerialization from '../../core/utils/date_serialization'; +import { each } from '../../core/utils/iterator'; +import { isPromise } from '../../core/utils/type'; +import { Deferred, fromPromise } from '../../core/utils/deferred'; +import { FileSystemItem } from '../file_management'; const DEFAULT_FILE_UPLOAD_CHUNK_SIZE = 200000; diff --git a/packages/devextreme/js/common/file_management/remote_provider.js b/packages/devextreme/js/common/file_management/remote_provider.js index c1c657ce5c7b..ef0e1c533d41 100644 --- a/packages/devextreme/js/common/file_management/remote_provider.js +++ b/packages/devextreme/js/common/file_management/remote_provider.js @@ -1,15 +1,15 @@ -import $ from '../core/renderer'; -import ajax from '../core/utils/ajax'; -import { ensureDefined, noop } from '../core/utils/common'; -import Guid from '../core/guid'; -import { getWindow } from '../core/utils/window'; -import { each } from '../core/utils/iterator'; -import { Deferred } from '../core/utils/deferred'; -import eventsEngine from '../events/core/events_engine'; +import $ from '../../core/renderer'; +import ajax from '../../core/utils/ajax'; +import { ensureDefined, noop } from '../../core/utils/common'; +import Guid from '../../core/guid'; +import { getWindow } from '../../core/utils/window'; +import { each } from '../../core/utils/iterator'; +import { Deferred } from '../../core/utils/deferred'; +import eventsEngine from '../core/events/core/events_engine'; import FileSystemProviderBase from './provider_base'; -import { compileGetter } from '../core/utils/data'; -import { isDefined, isEmptyObject, isFunction } from '../core/utils/type'; +import { compileGetter } from '../../core/utils/data'; +import { isDefined, isEmptyObject, isFunction } from '../../core/utils/type'; const window = getWindow(); const FILE_CHUNK_BLOB_NAME = 'chunk'; diff --git a/packages/devextreme/js/common/file_management/utils.js b/packages/devextreme/js/common/file_management/utils.js index 763d00575a1f..fdb0ef08b4a3 100644 --- a/packages/devextreme/js/common/file_management/utils.js +++ b/packages/devextreme/js/common/file_management/utils.js @@ -1,4 +1,4 @@ -import { each } from '../core/utils/iterator'; +import { each } from '../../core/utils/iterator'; export const PATH_SEPARATOR = '/'; diff --git a/packages/devextreme/js/common/grids.d.ts b/packages/devextreme/js/common/grids.d.ts index f7f4b5368cb2..5d1ef3103b0f 100644 --- a/packages/devextreme/js/common/grids.d.ts +++ b/packages/devextreme/js/common/grids.d.ts @@ -14,6 +14,8 @@ import { SortOrder, ValidationRule, PagerBase, + DxPromise, + Template as template, } from '../common'; import { @@ -27,27 +29,20 @@ import { } from '../core/element'; import { - DxPromise, -} from '../core/utils/deferred'; - -import { - template, -} from '../core/templates/template'; - -import DataSource, { - Options as DataSourceOptions, + DataSource, + DataSourceOptions, DataSourceLike, -} from '../data/data_source'; +} from './data'; import { Cancelable, EventInfo, NativeEventInfo, -} from '../events/index'; +} from './core/events'; import { Format, -} from '../localization'; +} from './core/localization'; import { FilterLookupDataSource, @@ -70,7 +65,7 @@ import { import { WidgetOptions, } from '../ui/widget/ui.widget'; -import { PositionConfig } from '../animation/position'; +import { PositionConfig } from './core/animation'; /** * @docid diff --git a/packages/devextreme/js/common/set_template_engine.js b/packages/devextreme/js/common/set_template_engine.js index 31aeacde2545..de327c598a08 100644 --- a/packages/devextreme/js/common/set_template_engine.js +++ b/packages/devextreme/js/common/set_template_engine.js @@ -1,2 +1,3 @@ import { setTemplateEngine } from '../__internal/core/m_set_template_engine'; + export default setTemplateEngine; diff --git a/packages/devextreme/js/core/config.d.ts b/packages/devextreme/js/core/config.d.ts index 51490ed48a42..9f1241d87245 100644 --- a/packages/devextreme/js/core/config.d.ts +++ b/packages/devextreme/js/core/config.d.ts @@ -1,24 +1,14 @@ -import { GlobalConfig } from '../common'; +import { + config, + GlobalConfig, +} from '../common'; -/** @public */ -export type FloatingActionButtonDirection = 'auto' | 'up' | 'down'; - -/** - * @docid - * @publicName config() - * @namespace DevExpress - * @public - */ -declare function config(): GlobalConfig; - -/** - * @docid - * @publicName config(config) - * @namespace DevExpress - * @public - */ -// eslint-disable-next-line @typescript-eslint/no-shadow -declare function config(config: GlobalConfig): void; +export { + /** + * @deprecated Use FloatingActionButtonDirection from /common instead + */ + FloatingActionButtonDirection, +} from '../common'; /** * @namespace DevExpress @@ -26,4 +16,7 @@ declare function config(config: GlobalConfig): void; */ export type globalConfig = GlobalConfig; +/** + * @deprecated Use config from /common instead + */ export default config; diff --git a/packages/devextreme/js/core/config.js b/packages/devextreme/js/core/config.js new file mode 100644 index 000000000000..17d8c0fbf2b9 --- /dev/null +++ b/packages/devextreme/js/core/config.js @@ -0,0 +1,3 @@ +import { config } from '../common'; + +export default config; diff --git a/packages/devextreme/js/core/devices.d.ts b/packages/devextreme/js/core/devices.d.ts index 4ec5b6781d3e..9affb55bcb85 100644 --- a/packages/devextreme/js/core/devices.d.ts +++ b/packages/devextreme/js/core/devices.d.ts @@ -1,134 +1,13 @@ -/** - * @public - * @docid - * @section commonObjectStructures - * @namespace DevExpress - */ -export type Device = { - /** - * @docid - * @public - */ - android?: boolean; - /** - * @docid - * @public - */ - deviceType?: 'phone' | 'tablet' | 'desktop'; - /** - * @docid - * @public - */ - generic?: boolean; - /** - * @docid - * @public - */ - grade?: 'A' | 'B' | 'C'; - /** - * @docid - * @public - */ - ios?: boolean; - /** - * @docid - * @public - */ - phone?: boolean; - /** - * @docid - * @public - */ - platform?: 'android' | 'ios' | 'generic'; - /** - * @docid - * @public - */ - tablet?: boolean; - /** - * @docid - * @public - */ - version?: Array; -}; - -type EventName = 'orientationChanged'; +import { devices } from '../common/core/environment'; -/** - * @docid - * @publicName devices - * @section Utils - * @namespace DevExpress - * @public - */ -declare class DevicesObject { - constructor(options?: { window?: Window }); - /** - * @docid - * @publicName current() - * @public - */ - current(): Device; - /** - * @docid - * @publicName current(deviceName) - * @public - */ - current(deviceName: string | Device): void; - /** - * @docid - * @publicName off(eventName) - * @param1 eventName:string - * @return this - * @public - */ - off(eventName: EventName): this; - /** - * @docid - * @publicName off(eventName, eventHandler) - * @param1 eventName:string - * @return this - * @public - */ - off(eventName: EventName, eventHandler: Function): this; - /** - * @docid - * @publicName on(eventName, eventHandler) - * @param1 eventName:string - * @return this - * @public - */ - on(eventName: EventName, eventHandler: Function): this; - /** - * @docid - * @publicName on(events) - * @param1 events:object - * @return this - * @public - */ - on(events: { [key in EventName]?: Function }): this; - /** - * @docid - * @publicName orientation() - * @return String - * @public - */ - orientation(): 'portrait' | 'landscape' | undefined; - /** - * @docid - * @publicName real() - * @public - */ - real(): Device; - isSimulator(): boolean; -} +export { + /** + * @deprecated Use Device from /common/core/environment instead + */ + Device, +} from '../common/core/environment'; /** - * @const devices - * @namespace DevExpress - * @hidden - * @public + * @deprecated Use devices from /common/core/environment instead */ - -declare const devices: DevicesObject; export default devices; diff --git a/packages/devextreme/js/core/devices.js b/packages/devextreme/js/core/devices.js new file mode 100644 index 000000000000..e069c4e5fb31 --- /dev/null +++ b/packages/devextreme/js/core/devices.js @@ -0,0 +1,3 @@ +import { devices } from '../common/core/environment'; + +export default devices; diff --git a/packages/devextreme/js/core/dom_component.d.ts b/packages/devextreme/js/core/dom_component.d.ts index d0155930d743..6ce6b675fef5 100644 --- a/packages/devextreme/js/core/dom_component.d.ts +++ b/packages/devextreme/js/core/dom_component.d.ts @@ -12,7 +12,7 @@ import { ChangedOptionInfo, EventInfo, InitializedEventInfo, -} from '../events/index'; +} from '../common/core/events'; import { TemplateManager } from './template_manager'; import { FunctionTemplate } from './templates/function_template'; diff --git a/packages/devextreme/js/core/guid.d.ts b/packages/devextreme/js/core/guid.d.ts index b84c5497c208..640d639b1d82 100644 --- a/packages/devextreme/js/core/guid.d.ts +++ b/packages/devextreme/js/core/guid.d.ts @@ -1,21 +1,6 @@ +import { Guid } from '../common'; + /** - * @docid - * @namespace DevExpress.data - * @public + * @deprecated Use Guid from /common instead */ -export default class Guid { - constructor(); - constructor(value: string); - /** - * @docid - * @publicName toString() - * @public - */ - toString(): string; - /** - * @docid - * @publicName valueOf() - * @public - */ - valueOf(): string; -} +export default Guid; diff --git a/packages/devextreme/js/core/guid.js b/packages/devextreme/js/core/guid.js new file mode 100644 index 000000000000..80747a9917bb --- /dev/null +++ b/packages/devextreme/js/core/guid.js @@ -0,0 +1,3 @@ +import { Guid } from '../common'; + +export default Guid; diff --git a/packages/devextreme/js/core/options.d.ts b/packages/devextreme/js/core/options.d.ts index 3a2aca745d3d..0d433d31595b 100644 --- a/packages/devextreme/js/core/options.d.ts +++ b/packages/devextreme/js/core/options.d.ts @@ -1,16 +1,6 @@ -import { - Device, -} from './devices'; - -import { - DeepPartial, -} from './index'; - -/** - * @docid - * @public - */ -export type DefaultOptionsRule = { - device?: Device | Device[] | ((device: Device) => boolean); - options: DeepPartial; -}; +export { + /** + * @deprecated Use DefaultOptionsRule from /common instead + */ + DefaultOptionsRule, +} from '../common'; diff --git a/packages/devextreme/js/core/options/utils.d.ts b/packages/devextreme/js/core/options/utils.d.ts index cd098f2fc766..327a1e004535 100644 --- a/packages/devextreme/js/core/options/utils.d.ts +++ b/packages/devextreme/js/core/options/utils.d.ts @@ -1,6 +1,6 @@ import { Device, -} from '../devices'; +} from '../../common/core/environment'; import { DefaultOptionsRule, diff --git a/packages/devextreme/js/core/set_template_engine.d.ts b/packages/devextreme/js/core/set_template_engine.d.ts index e0ff4f7dc9a7..2db0dfc8641c 100644 --- a/packages/devextreme/js/core/set_template_engine.d.ts +++ b/packages/devextreme/js/core/set_template_engine.d.ts @@ -1,9 +1,6 @@ +import { setTemplateEngine } from '../common'; + /** - * @docid - * @publicName setTemplateEngine(options) - * @namespace DevExpress - * @public + * @deprecated Use setTemplateEngine from /common instead */ -declare function setTemplateEngine(templateEngineOptions: { compile?: Function; render?: Function }): void; - export default setTemplateEngine; diff --git a/packages/devextreme/js/core/set_template_engine.js b/packages/devextreme/js/core/set_template_engine.js new file mode 100644 index 000000000000..c7d3a1ad5914 --- /dev/null +++ b/packages/devextreme/js/core/set_template_engine.js @@ -0,0 +1 @@ +export { setTemplateEngine as default } from '../common'; diff --git a/packages/devextreme/js/core/templates/template.d.ts b/packages/devextreme/js/core/templates/template.d.ts index 47bc5899f2ce..610371fe71df 100644 --- a/packages/devextreme/js/core/templates/template.d.ts +++ b/packages/devextreme/js/core/templates/template.d.ts @@ -1,6 +1,9 @@ -import { - UserDefinedElement, -} from '../element'; +export type { + /** + * @deprecated Use Template from /common instead + */ + Template as template, +} from '../../common'; /** * @docid @@ -28,8 +31,5 @@ export class Template { } /** - * @docid - * @section Common - * @public + * @deprecated Use Template from /common instead */ -export type template = string | Function | UserDefinedElement; diff --git a/packages/devextreme/js/core/utils/deferred.d.ts b/packages/devextreme/js/core/utils/deferred.d.ts index 060192b9f3af..813ca0886aaa 100644 --- a/packages/devextreme/js/core/utils/deferred.d.ts +++ b/packages/devextreme/js/core/utils/deferred.d.ts @@ -1,8 +1,17 @@ +import type { DxPromise } from '../../common'; + +export type { + /** + * @deprecated Use DxPromise from /common instead + */ + DxPromise, +} from '../../common'; + interface Callback { // eslint-disable-next-line @typescript-eslint/prefer-function-type (value: T, ...args: T[]): void; } -declare class DeferredObj { +export class DeferredObj { constructor(); state(): 'pending' | 'rejected' | 'resolved'; always(alwaysCallback?: Callback): DeferredObj; @@ -24,13 +33,6 @@ export function Deferred(): DeferredObj; // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-unused-vars export interface PromiseType { } -/** - * @docid - * @type Promise - * @namespace DevExpress.core.utils - */ -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type -export type DxPromise = {} extends PromiseType ? Promise : PromiseType; /** @namespace DevExpress.core.utils */ export type DxExtendedPromise = DxPromise & { diff --git a/packages/devextreme/js/data/abstract_store.d.ts b/packages/devextreme/js/data/abstract_store.d.ts new file mode 100644 index 000000000000..3c81f6a0fcfc --- /dev/null +++ b/packages/devextreme/js/data/abstract_store.d.ts @@ -0,0 +1,21 @@ +import AbstractStore from '../common/data/abstract_store'; + +export { + /** + * @deprecated Use Options from common/data/abstract_store instead + */ + Options, + /** + * @deprecated Use StoreOptions from common/data/abstract_store instead + */ + StoreOptions, + /** + * @deprecated Use Store from common/data/abstract_store instead + */ + Store, +} from '../common/data/abstract_store'; + +/** + * @deprecated Use the default export from common/data/abstract_store instead + */ +export default AbstractStore; diff --git a/packages/devextreme/js/data/abstract_store.js b/packages/devextreme/js/data/abstract_store.js new file mode 100644 index 000000000000..1209bbeb82c1 --- /dev/null +++ b/packages/devextreme/js/data/abstract_store.js @@ -0,0 +1 @@ +export { default } from '../common/data/abstract_store'; diff --git a/packages/devextreme/js/data/apply_changes.d.ts b/packages/devextreme/js/data/apply_changes.d.ts index 8073ae0becbb..90017ffe8313 100644 --- a/packages/devextreme/js/data/apply_changes.d.ts +++ b/packages/devextreme/js/data/apply_changes.d.ts @@ -1,10 +1,6 @@ +import { applyChanges } from '../common/data'; + /** - * @docid Utils.applyChanges - * @publicName applyChanges(data, changes, options) - * @param3 options?:any - * @namespace DevExpress.data - * @public + * @deprecated Use applyChanges from /common/data instead */ -declare function applyChanges(data: Array, changes: Array, options?: { keyExpr?: string | Array; immutable?: boolean }): Array; - export default applyChanges; diff --git a/packages/devextreme/js/data/apply_changes.js b/packages/devextreme/js/data/apply_changes.js new file mode 100644 index 000000000000..29a114fa0de0 --- /dev/null +++ b/packages/devextreme/js/data/apply_changes.js @@ -0,0 +1,3 @@ +import { applyChanges } from '../common/data'; + +export default applyChanges; diff --git a/packages/devextreme/js/data/array_store.d.ts b/packages/devextreme/js/data/array_store.d.ts index 60a69bff9384..60e27adc7392 100644 --- a/packages/devextreme/js/data/array_store.d.ts +++ b/packages/devextreme/js/data/array_store.d.ts @@ -1,61 +1,22 @@ -import Store, { - Options as StoreOptions, -} from './abstract_store'; -import { Query } from './query'; -import { DxPromise } from '../core/utils/deferred'; +import { ArrayStore, ArrayStoreOptions } from '../common/data'; -/** @public */ -export type Options< - TItem = any, - TKey = any, -> = ArrayStoreOptions; - -/** - * @docid - * @namespace DevExpress.data - * @deprecated Use Options instead - */ -export interface ArrayStoreOptions< - TItem = any, - TKey = any, -> extends StoreOptions { +export { /** - * @docid - * @public + * @deprecated Use ArrayStoreOptions from /common/data instead */ - data?: Array; -} + ArrayStoreOptions, +} from '../common/data'; /** - * @docid - * @inherits Store * @public - * @options ArrayStoreOptions + * @deprecated Use ArrayStoreOptions from /common/data instead */ -export default class ArrayStore< +export type Options< TItem = any, TKey = any, -> extends Store { - constructor(options?: Options); - /** - * @docid - * @publicName byKey(key) - * @param1 key:object|string|number - * @return Promise - * @public - */ - byKey(key: TKey): DxPromise; - /** - * @docid - * @publicName clear() - * @public - */ - clear(): void; - /** - * @docid - * @publicName createQuery() - * @return object - * @public - */ - createQuery(): Query; -} +> = ArrayStoreOptions; + +/** + * @deprecated Use ArrayStore from /common/data instead + */ +export default ArrayStore; diff --git a/packages/devextreme/js/data/array_store.js b/packages/devextreme/js/data/array_store.js new file mode 100644 index 000000000000..ce5397786f90 --- /dev/null +++ b/packages/devextreme/js/data/array_store.js @@ -0,0 +1,3 @@ +import { ArrayStore } from '../common/data'; + +export default ArrayStore; diff --git a/packages/devextreme/js/data/custom_store.d.ts b/packages/devextreme/js/data/custom_store.d.ts index 393939ed6022..45a84ef17941 100644 --- a/packages/devextreme/js/data/custom_store.d.ts +++ b/packages/devextreme/js/data/custom_store.d.ts @@ -1,151 +1,30 @@ -import { FilterDescriptor, GroupDescriptor, LoadOptions } from './index'; -import { Store, Options as StoreOptions } from './store'; -import { DxExtendedPromise, DxPromise } from '../core/utils/deferred'; -import { GroupItem as CustomStoreGroupItem, LoadResult } from '../common/data/custom-store'; +import { CustomStore, CustomStoreOptions } from '../common/data'; -/** @public */ -export type Options< - TItem = any, - TKey = any, -> = CustomStoreOptions; +export { + /** + * @deprecated Use GroupItem from /common/data instead + */ + GroupItem, + /** + * @deprecated Use ResolvedData from /common/data instead + */ + ResolvedData, + /** + * @deprecated Use CustomStoreOptions from /common/data instead + */ + CustomStoreOptions, +} from '../common/data'; /** * @public - * @deprecated Use GroupItem from common/data/custom-store instead + * @deprecated Use CustomStoreOptions from /common/data instead */ -export type GroupItem = CustomStoreGroupItem; - -/** - * @docid - * @public - * @type object - * @deprecated Use LoadResult instead - */ -export type ResolvedData = LoadResult; - -type LoadFunctionResult = T | DxPromise | PromiseLike; - -/** - * @docid - * @namespace DevExpress.data - * @deprecated Use Options instead - */ -export interface CustomStoreOptions< +export type Options< TItem = any, TKey = any, -> extends StoreOptions { - /** - * @docid - * @public - * @type_function_param1 key:object|string|number - * @type_function_param2 extraOptions:LoadOptions - * @type_function_return Promise - */ - byKey?: ((key: TKey, extraOptions?: LoadOptions) => PromiseLike); - /** - * @docid - * @default true - * @public - */ - cacheRawData?: boolean; - /** - * @docid - * @type_function_param1 values:object - * @type_function_return Promise - * @public - */ - insert?: ((values: TItem) => PromiseLike); - /** - * @docid - * @type_function_param1 options:LoadOptions - * @type_function_return LoadResult|Promise - * @public - */ - load: (options: LoadOptions) => LoadFunctionResult>; - /** - * @docid - * @default 'processed' - * @public - */ - loadMode?: 'processed' | 'raw'; - /** - * @docid - * @type_function_param1 result:LoadResult - * @type_function_param2 loadOptions:LoadOptions - * @action - * @public - */ - onLoaded?: ((result: LoadResult, loadOptions: LoadOptions) => void); - /** - * @docid - * @type_function_param1 key:object|string|number - * @type_function_return Promise - * @public - */ - remove?: ((key: TKey) => PromiseLike); - /** - * @docid - * @type_function_param1_field filter:object - * @type_function_param1_field group:object - * @type_function_return Promise - * @public - */ - totalCount?: ((loadOptions: { filter?: FilterDescriptor | Array; group?: GroupDescriptor | Array> }) => PromiseLike); - /** - * @docid - * @type_function_param1 key:object|string|number - * @type_function_param2 values:object - * @type_function_return Promise - * @public - */ - update?: ((key: TKey, values: TItem) => PromiseLike); - /** - * @docid - * @default undefined - * @public - */ - useDefaultSearch?: boolean; -} +> = CustomStoreOptions; /** - * @docid - * @inherits Store - * @public - * @options CustomStoreOptions + * @deprecated Use CustomStore from /common/data instead */ -export default class CustomStore< - TItem = any, - TKey = any, -> extends Store { - constructor(options?: Options); - /** - * @docid - * @publicName byKey(key, extraOptions) - * @param1 key:object|string|number - * @param2 extraOptions:LoadOptions - * @return Promise - * @public - */ - byKey(key: TKey, extraOptions?: LoadOptions): DxPromise; - /** - * @docid - * @publicName clearRawDataCache() - * @public - */ - clearRawDataCache(): void; - /** - * @docid - * @publicName load() - * @return Promise - * @public - */ - load(): DxExtendedPromise>; - /** - * @docid - * @publicName load(options) - * @param1 options:LoadOptions - * @return Promise - * @public - */ - load(options: LoadOptions): DxExtendedPromise>; -} +export default CustomStore; diff --git a/packages/devextreme/js/data/custom_store.js b/packages/devextreme/js/data/custom_store.js new file mode 100644 index 000000000000..87d450a69c4e --- /dev/null +++ b/packages/devextreme/js/data/custom_store.js @@ -0,0 +1,3 @@ +import { CustomStore } from '../common/data'; + +export default CustomStore; diff --git a/packages/devextreme/js/data/data_source.d.ts b/packages/devextreme/js/data/data_source.d.ts index 0222b5f1e5ff..f89ccb24fd70 100644 --- a/packages/devextreme/js/data/data_source.d.ts +++ b/packages/devextreme/js/data/data_source.d.ts @@ -1,468 +1,28 @@ -import { - FilterDescriptor, - GroupDescriptor, LangParams, - LoadOptions, - SearchOperation, - SelectDescriptor, - SortDescriptor, - Store, - StoreOptions, -} from './index'; -import { DxExtendedPromise } from '../core/utils/deferred'; -import { Options as CustomStoreOptions } from './custom_store'; +import { DataSource, DataSourceOptions } from '../common/data'; -/** @public */ -export type Options< - TStoreItem = any, - TMappedItem = TStoreItem, - TItem = TMappedItem, - TKey = any, -> = DataSourceOptions; +export { + /** + * @deprecated Use DataSourceOptions from /common/data instead + */ + DataSourceOptions, + /** + * @deprecated Use DataSourceLike from /common/data instead + */ + DataSourceLike, +} from '../common/data'; /** - * @namespace DevExpress.data - * @deprecated Use Options instead - * @docid + * @public + * @deprecated Use DataSourceOptions from /common/data instead */ -export interface DataSourceOptions< +export type Options< TStoreItem = any, TMappedItem = TStoreItem, TItem = TMappedItem, TKey = any, -> { - /** - * @docid - * @public - */ - customQueryParams?: any; - /** - * @docid - * @public - */ - expand?: Array | string; - /** - * @docid - * @type Filter expression - * @public - */ - filter?: FilterDescriptor | Array; - /** - * @docid - * @type Group expression - * @public - */ - group?: GroupDescriptor | Array>; - /** - * @docid - * @public - */ - // eslint-disable-next-line spellcheck/spell-checker - langParams?: LangParams; - /** - * @docid - * @type_function_param1 dataItem:object - * @type_function_return object - * @public - */ - map?: ((dataItem: TStoreItem) => TMappedItem); - /** - * @docid - * @type_function_param1_field changes:Array - * @action - * @public - */ - onChanged?: ((e: { readonly changes?: Array }) => void); - /** - * @docid - * @action - * @public - */ - onLoadError?: ((error: { readonly message?: string }) => void); - /** - * @docid - * @action - * @public - */ - onLoadingChanged?: ((isLoading: boolean) => void); - /** - * @docid - * @default 20 - * @public - */ - pageSize?: number; - /** - * @docid - * @default undefined - * @public - */ - paginate?: boolean; - /** - * @docid - * @type_function_param1 data:Array - * @type_function_return Array - * @public - */ - postProcess?: ((data: Array) => Array); - /** - * @docid - * @default undefined - * @public - */ - pushAggregationTimeout?: number; - /** - * @docid - * @public - */ - requireTotalCount?: boolean; - /** - * @docid - * @default false - * @public - */ - reshapeOnPush?: boolean; - /** - * @docid - * @type getter|Array - * @public - */ - searchExpr?: string | Function | Array; - /** - * @docid - * @default "contains" - * @public - */ - searchOperation?: SearchOperation; - /** - * @docid - * @default null - * @public - */ - searchValue?: any; - /** - * @docid - * @type Select expression - * @public - */ - select?: SelectDescriptor; - /** - * @docid - * @type Sort expression - * @public - */ - sort?: SortDescriptor | Array>; - /** - * @docid - * @public - * @type Store|StoreOptions|Array - */ - store?: Array | Store | StoreOptions; -} -/** - * @docid - * @public - * @options DataSourceOptions - */ -export default class DataSource< - TItem = any, - TKey = any, -> { - constructor(data: Array); - constructor(options: CustomStoreOptions | Options); - constructor(store: Store); - constructor(url: string); - /** - * @docid - * @publicName cancel(operationId) - * @public - */ - cancel(operationId: number): boolean; - /** - * @docid - * @publicName dispose() - * @public - */ - dispose(): void; - /** - * @docid - * @publicName filter() - * @return object - * @public - */ - filter(): FilterDescriptor | Array; - /** - * @docid - * @publicName filter(filterExpr) - * @param1 filterExpr:object - * @public - */ - filter(filterExpr: FilterDescriptor | Array): void; - /** - * @docid - * @publicName group() - * @return object - * @public - */ - group(): GroupDescriptor | Array>; - /** - * @docid - * @publicName group(groupExpr) - * @param1 groupExpr:object - * @public - */ - group(groupExpr: GroupDescriptor | Array>): void; - /** - * @docid - * @publicName isLastPage() - * @public - */ - isLastPage(): boolean; - /** - * @docid - * @publicName isLoaded() - * @public - */ - isLoaded(): boolean; - /** - * @docid - * @publicName isLoading() - * @public - */ - isLoading(): boolean; - /** - * @docid - * @publicName items() - * @public - */ - items(): Array; - /** - * @docid - * @publicName key() - * @public - */ - key(): string | Array; - /** - * @docid - * @publicName load() - * @return Promise - * @public - */ - load(): DxExtendedPromise; - /** - * @docid - * @publicName loadOptions() - * @return object - * @public - */ - loadOptions(): LoadOptions; - /** - * @docid - * @publicName off(eventName) - * @param1 eventName:string - * @return this - * @public - */ - off(eventName: EventName): this; - /** - * @docid - * @publicName off(eventName, eventHandler) - * @param1 eventName:string - * @return this - * @public - */ - off(eventName: EventName, eventHandler: Function): this; - /** - * @docid - * @publicName on(eventName, eventHandler) - * @param1 eventName:string - * @return this - * @public - */ - on(eventName: EventName, eventHandler: Function): this; - /** - * @docid - * @publicName on(events) - * @param1 events:object - * @return this - * @public - */ - on(events: { [key in EventName]?: Function }): this; - /** - * @docid - * @publicName pageIndex() - * @return numeric - * @public - */ - pageIndex(): number; - /** - * @docid - * @publicName pageIndex(newIndex) - * @param1 newIndex:numeric - * @public - */ - pageIndex(newIndex: number): void; - /** - * @docid - * @publicName pageSize() - * @return numeric - * @public - */ - pageSize(): number; - /** - * @docid - * @publicName pageSize(value) - * @param1 value:numeric - * @public - */ - pageSize(value: number): void; - /** - * @docid - * @publicName paginate() - * @public - */ - paginate(): boolean; - /** - * @docid - * @publicName paginate(value) - * @public - */ - paginate(value: boolean): void; - /** - * @docid - * @publicName reload() - * @return Promise - * @public - */ - reload(): DxExtendedPromise; - /** - * @docid - * @publicName requireTotalCount() - * @public - */ - requireTotalCount(): boolean; - /** - * @docid - * @publicName requireTotalCount(value) - * @public - */ - requireTotalCount(value: boolean): void; - /** - * @docid - * @publicName searchExpr() - * @return getter|Array - * @public - */ - searchExpr(): string & Function & Array; - /** - * @docid - * @publicName searchExpr(expr) - * @param1 expr:getter|Array - * @public - */ - searchExpr(expr: string | Function | Array): void; - /** - * @docid - * @publicName searchOperation() - * @public - */ - searchOperation(): string; - /** - * @docid - * @publicName searchOperation(op) - * @public - */ - searchOperation(op: string): void; - /** - * @docid - * @publicName searchValue() - * @public - */ - searchValue(): any; - /** - * @docid - * @publicName searchValue(value) - * @public - */ - searchValue(value: any): void; - /** - * @docid - * @publicName select() - * @return any - * @public - */ - select(): SelectDescriptor; - /** - * @docid - * @publicName select(expr) - * @param1 expr:any - * @public - */ - select(expr: SelectDescriptor): void; - /** - * @docid - * @publicName sort() - * @return any - * @public - */ - sort(): SortDescriptor | Array>; - /** - * @docid - * @publicName sort(sortExpr) - * @param1 sortExpr:any - * @public - */ - sort(sortExpr: SortDescriptor | Array>): void; - /** - * @docid - * @publicName store() - * @return object - * @public - */ - store(): Store; - /** - * @docid - * @publicName totalCount() - * @return numeric - * @public - */ - totalCount(): number; -} +> = DataSourceOptions; /** - * @docid - * @type Store|DataSource|DataSourceOptions|string|Array|null + * @deprecated Use DataSource from /common/data instead */ -export type DataSourceLike = - string | - Array | - Store | - DataSourceOptionsStub | - DataSource; - -interface DataSourceOptionsStub< - TStoreItem = any, - TMappedItem = TStoreItem, - TItem = TMappedItem, -> { - customQueryParams?: any; - expand?: Array | string; - filter?: FilterDescriptor | Array; - group?: GroupDescriptor | Array>; - map?: ((dataItem: TStoreItem) => TMappedItem); - onChanged?: ((e: { readonly changes?: Array }) => void); - onLoadError?: ((error: { readonly message?: string }) => void); - onLoadingChanged?: ((isLoading: boolean) => void); - pageSize?: number; - paginate?: boolean; - postProcess?: ((data: Array) => Array); - pushAggregationTimeout?: number; - requireTotalCount?: boolean; - reshapeOnPush?: boolean; - searchExpr?: string | Function | Array; - searchOperation?: SearchOperation; - searchValue?: any; - select?: SelectDescriptor; - sort?: SortDescriptor | Array>; - store?: Array | Store | StoreOptions; -} - -type EventName = 'changed' | 'loadError' | 'loadingChanged'; +export default DataSource; diff --git a/packages/devextreme/js/data/data_source.js b/packages/devextreme/js/data/data_source.js new file mode 100644 index 000000000000..3e60483985f1 --- /dev/null +++ b/packages/devextreme/js/data/data_source.js @@ -0,0 +1,3 @@ +import { DataSource } from '../common/data'; + +export default DataSource; diff --git a/packages/devextreme/js/data/endpoint_selector.d.ts b/packages/devextreme/js/data/endpoint_selector.d.ts index 19c601d6eec4..0fbb4d8a718b 100644 --- a/packages/devextreme/js/data/endpoint_selector.d.ts +++ b/packages/devextreme/js/data/endpoint_selector.d.ts @@ -1,14 +1,6 @@ +import { EndpointSelector } from '../common/data'; + /** - * @docid - * @namespace DevExpress - * @public + * @deprecated Use EndpointSelector from /common/data instead */ -export default class EndpointSelector { - constructor(options: any); - /** - * @docid - * @publicName urlFor(key) - * @public - */ - urlFor(key: string): string; -} +export default EndpointSelector; diff --git a/packages/devextreme/js/data/endpoint_selector.js b/packages/devextreme/js/data/endpoint_selector.js new file mode 100644 index 000000000000..868960c2ae4a --- /dev/null +++ b/packages/devextreme/js/data/endpoint_selector.js @@ -0,0 +1,3 @@ +import { EndpointSelector } from '../common/data'; + +export default EndpointSelector; diff --git a/packages/devextreme/js/data/errors.d.ts b/packages/devextreme/js/data/errors.d.ts index a51ecdc208e5..2062b34e7a57 100644 --- a/packages/devextreme/js/data/errors.d.ts +++ b/packages/devextreme/js/data/errors.d.ts @@ -1,16 +1,10 @@ -/** - * @docid Utils.errorHandler - * @type function(e) - * @namespace DevExpress.data - * @deprecated Utils.setErrorHandler - * @public - */ -export function errorHandler(e: Error): void; - -/** - * @docid Utils.setErrorHandler - * @type function(handler) - * @namespace DevExpress.data - * @public - */ -export function setErrorHandler(handler: (e: Error) => void): void; +export { + /** + * @deprecated Use setErrorHandler from /common/data instead + */ + setErrorHandler, + /** + * @deprecated Use errorHandler from /common/data instead + */ + errorHandler, +} from '../common/data'; diff --git a/packages/devextreme/js/data/errors.js b/packages/devextreme/js/data/errors.js new file mode 100644 index 000000000000..bde57eb9729f --- /dev/null +++ b/packages/devextreme/js/data/errors.js @@ -0,0 +1,2 @@ +export { setErrorHandler } from '../common/data'; +export { errorHandler } from '../common/data/errors'; diff --git a/packages/devextreme/js/data/index.d.ts b/packages/devextreme/js/data/index.d.ts index 22ddfbea28bb..2bc3f9dcc3b5 100644 --- a/packages/devextreme/js/data/index.d.ts +++ b/packages/devextreme/js/data/index.d.ts @@ -1,213 +1,46 @@ -import CustomStore, { Options as CustomStoreOptions } from './custom_store'; -import ArrayStore, { Options as ArrayStoreOptions } from './array_store'; -import LocalStore, { Options as LocalStoreOptions } from './local_store'; -import ODataStore, { Options as ODataStoreOptions } from './odata/store'; - -/** - * @public - */ -export type SearchOperation = '=' | '<>' | '>' | '>=' | '<' | '<=' | 'startswith' | 'endswith' | 'contains' | 'notcontains'; - -type KeySelector = string | ((source: T) => string | number | Date | Object); - -type SelectionDescriptor = { - selector: KeySelector; -}; - -type OrderingDescriptor = SelectionDescriptor & { - desc?: boolean; -}; - -/** - * @public - */ -export type GroupingInterval = 'year' | 'quarter' | 'month' | 'day' | 'dayOfWeek' | 'hour' | 'minute' | 'second'; - -/** - * @docid - * @public - * @type object - * @skip - */ -export type GroupDescriptor = KeySelector | (OrderingDescriptor & { - groupInterval?: number | GroupingInterval; - isExpanded?: boolean; -}); - -/** - * @docid - * @public - * @type object - * @skip - */ -export type SortDescriptor = KeySelector | OrderingDescriptor; - -/** - * @docid - * @public - * @type object - * @skip - */ -export type SelectDescriptor = string | Array | ((source: T) => any); -/** - * @docid - * @public - */ -export type FilterDescriptor = any; -/** - * @docid - * @public - */ -export type LangParams = { +export { /** - * @docid - * @public + * @deprecated Use SearchOperation from /common/data instead */ - locale: string; + SearchOperation, /** - * @docid - * @public - * @type object + * @deprecated Use GroupingInterval from /common/data instead */ - collatorOptions?: Intl.CollatorOptions; -}; - /** - * @docid - * @public - * @type object - */ -export type SummaryDescriptor = KeySelector | SelectionDescriptor & { - summaryType?: 'sum' | 'avg' | 'min' | 'max' | 'count'; -}; - -/** - * @public - * @docid - * @namespace DevExpress.data - * @type object - */ -export interface LoadOptions { - /** - * @docid - * @public - */ - customQueryParams?: any; - /** - * @docid - * @public - */ - startDate?: Date; - /** - * @docid - * @public - */ - endDate?: Date; - /** - * @docid - * @public - */ - expand?: Array; - /** - * @docid - * @public - * @type object - */ - filter?: FilterDescriptor | Array; - /** - * @docid - * @public - * @type object - */ - group?: GroupDescriptor | Array>; - /** - * @docid - * @public - * @type SummaryDescriptor | Array - */ - groupSummary?: SummaryDescriptor | Array>; - /** - * @docid - * @public - */ - parentIds?: Array; - /** - * @docid - * @public - */ - requireGroupCount?: boolean; - /** - * @docid - * @public - */ - requireTotalCount?: boolean; - /** - * @docid - * @type getter|Array - * @public - */ - searchExpr?: string | Function | Array; - /** - * @docid - * @public - */ - searchOperation?: SearchOperation; - /** - * @docid - * @public - */ - searchValue?: any; - /** - * @docid - * @public - * @type object - */ - select?: SelectDescriptor; - /** - * @docid - * @public - */ - skip?: number; - /** - * @docid - * @public - * @type object - */ - sort?: SortDescriptor | Array>; - /** - * @docid - * @public - */ - take?: number; - /** - * @docid - * @public - * @type SummaryDescriptor | Array - */ - totalSummary?: SummaryDescriptor | Array>; - /** - * @docid - * @public - */ - userData?: any; -} - -/** - * @public - * @namespace DevExpress.data.utils - */ -export type Store = - CustomStore | - ArrayStore | - LocalStore | - ODataStore; - -/** - * @public - * @namespace DevExpress.data.utils - * @type object - */ -export type StoreOptions = - CustomStoreOptions | - ArrayStoreOptions & { type: 'array' } | - LocalStoreOptions & { type: 'local' } | - ODataStoreOptions & { type: 'odata' }; + GroupingInterval, + /** + * @deprecated Use GroupDescriptor from /common/data instead + */ + GroupDescriptor, + /** + * @deprecated Use SortDescriptor from /common/data instead + */ + SortDescriptor, + /** + * @deprecated Use SelectDescriptor from /common/data instead + */ + SelectDescriptor, + /** + * @deprecated Use FilterDescriptor from /common/data instead + */ + FilterDescriptor, + /** + * @deprecated Use LangParams from /common/data instead + */ + LangParams, + /** + * @deprecated Use SummaryDescriptor from /common/data instead + */ + SummaryDescriptor, + /** + * @deprecated Use LoadOptions from /common/data instead + */ + LoadOptions, + /** + * @deprecated Use Store from /common/data instead + */ + Store, + /** + * @deprecated Use StoreOptions from /common/data instead + */ + StoreOptions, +} from '../common/data'; diff --git a/packages/devextreme/js/data/load_options.d.ts b/packages/devextreme/js/data/load_options.d.ts index 27306760f118..0542d92eef5f 100644 --- a/packages/devextreme/js/data/load_options.d.ts +++ b/packages/devextreme/js/data/load_options.d.ts @@ -1,4 +1,4 @@ -import { LoadOptions as BaseLoadOptions } from './index'; +import { LoadOptions as BaseLoadOptions } from '../common/data'; /** @deprecated Use LoadOptions from 'devextreme/data' instead */ export interface LoadOptions extends BaseLoadOptions { } diff --git a/packages/devextreme/js/data/local_store.d.ts b/packages/devextreme/js/data/local_store.d.ts index 930258b98fba..2dbf421e7e8b 100644 --- a/packages/devextreme/js/data/local_store.d.ts +++ b/packages/devextreme/js/data/local_store.d.ts @@ -1,56 +1,25 @@ -import ArrayStore, { - ArrayStoreOptions, -} from './array_store'; +import { + LocalStoreOptions, + LocalStore, +} from '../common/data'; -/** @public */ -export type Options< - TItem = any, - TKey = any, -> = LocalStoreOptions; +export { + /** + * @deprecated Use LocalStoreOptions from /common/data instead + */ + LocalStoreOptions, +} from '../common/data'; /** - * @docid - * @namespace DevExpress.data - * @deprecated Use Options instead + * @deprecated Use LocalStore from /common/data instead */ -export interface LocalStoreOptions< - TItem = any, - TKey = any, -> extends ArrayStoreOptions { - /** - * @docid - * @default 10000 - * @public - */ - flushInterval?: number; - /** - * @docid - * @default false - * @public - */ - immediate?: boolean; - /** - * @docid - * @public - */ - name?: string; -} +export default LocalStore; /** - * @docid - * @inherits ArrayStore - * @public - * @options LocalStoreOptions - */ -export default class LocalStore< - TItem = any, - TKey = any, -> extends ArrayStore { - constructor(options?: Options); - /** - * @docid - * @publicName clear() - * @public - */ - clear(): void; -} +* @public +* @deprecated Use LocalStoreOptions from /common/data instead +*/ +export type Options< + TItem = any, + TKey = any, +> = LocalStoreOptions; diff --git a/packages/devextreme/js/data/local_store.js b/packages/devextreme/js/data/local_store.js new file mode 100644 index 000000000000..d2b036a6c5ae --- /dev/null +++ b/packages/devextreme/js/data/local_store.js @@ -0,0 +1,5 @@ +import { + LocalStore, +} from '../common/data'; + +export default LocalStore; diff --git a/packages/devextreme/js/data/odata/context.d.ts b/packages/devextreme/js/data/odata/context.d.ts index 08ac14b0028c..517cd5b56d75 100644 --- a/packages/devextreme/js/data/odata/context.d.ts +++ b/packages/devextreme/js/data/odata/context.d.ts @@ -1,115 +1,13 @@ -import { - DxPromise, -} from '../../core/utils/deferred'; +import { ODataContext } from '../../common/data'; -export interface ODataRequestOptions { - accepts: any; - async: boolean; - contentType: string | boolean; - data: any; - dataType: string; - headers: any; - jsonp?: boolean; - method: string; - timeout: number; - url: string; - xhrFields: any; -} +export { + /** + * @deprecated Use ODataContextOptions from /common/data instead + */ + ODataContextOptions, +} from '../../common/data'; /** - * @docid - * @namespace DevExpress.data - * @type object + * @deprecated Use ODataContext from /common/data instead */ -export interface ODataContextOptions { - /** - * @docid - * @type_function_param1_field params:object - * @type_function_param1_field payload:object - * @type_function_param1_field headers:object - * @public - */ - beforeSend?: ((options: { url: string; async: boolean; method: string; timeout: number; params: any; payload: any; headers: any }) => void); - /** - * @docid - * @public - */ - deserializeDates?: boolean; - /** - * @docid - * @public - */ - entities?: any; - /** - * @docid - * @type_function_param1 e:Error - * @type_function_param1_field errorDetails:object - * @type_function_param1_field requestOptions:object - * @public - */ - errorHandler?: ((e: { httpStatus: number; errorDetails: any; requestOptions: ODataRequestOptions }) => void); - /** - * @docid - * @public - */ - filterToLower?: boolean; - /** - * @docid - * @default false - * @public - */ - jsonp?: boolean; - /** - * @docid - * @public - */ - url?: string; - /** - * @docid - * @default 4 - * @acceptValues 2|3|4 - * @public - */ - version?: number; - /** - * @docid - * @default false - * @public - */ - withCredentials?: boolean; -} -/** - * @docid - * @public - * @options ODataContextOptions - */ -export default class ODataContext { - constructor(options?: ODataContextOptions); - /** - * @docid - * @publicName get(operationName, params) - * @param2 params:object - * @return Promise - * @public - */ - get(operationName: string, params: any): DxPromise; - /** - * @docid - * @publicName invoke(operationName, params, httpMethod) - * @param2 params:object - * @param3 httpMethod:string - * @return Promise - * @public - */ - invoke(operationName: string, params: any, httpMethod: HttpMethod): DxPromise; - /** - * @docid - * @publicName objectLink(entityAlias, key) - * @param2 key:object|string|number - * @return object - * @public - */ - objectLink(entityAlias: string, key: any | string | number): any; -} - -type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'MERGE'; +export default ODataContext; diff --git a/packages/devextreme/js/data/odata/context.js b/packages/devextreme/js/data/odata/context.js new file mode 100644 index 000000000000..036f266d0d82 --- /dev/null +++ b/packages/devextreme/js/data/odata/context.js @@ -0,0 +1,3 @@ +import { ODataContext } from '../../common/data'; + +export default ODataContext; diff --git a/packages/devextreme/js/data/odata/store.d.ts b/packages/devextreme/js/data/odata/store.d.ts index 1d493c231314..d15b355abe15 100644 --- a/packages/devextreme/js/data/odata/store.d.ts +++ b/packages/devextreme/js/data/odata/store.d.ts @@ -1,112 +1,22 @@ -import { DxPromise } from '../../core/utils/deferred'; -import Store, { Options as StoreOptions } from '../abstract_store'; -import { Query } from '../query'; -import { ODataRequestOptions } from './context'; +import { ODataStoreOptions, ODataStore } from '../../common/data'; -/** @public */ +/** + * @public + * @deprecated Use ODataStoreOptions from /common/data instead + */ export type Options< TItem = any, TKey = any, > = ODataStoreOptions; -/** - * @docid - * @namespace DevExpress.data - * @deprecated Use Options instead - */ -export interface ODataStoreOptions< - TItem = any, - TKey = any, -> extends StoreOptions { - /** - * @docid - * @type_function_param1_field params:object - * @type_function_param1_field payload:object - * @type_function_param1_field headers:object - * @public - */ - beforeSend?: ((options: { url: string; async: boolean; method: string; timeout: number; params: any; payload: any; headers: any }) => void); - /** - * @docid - * @public - */ - deserializeDates?: boolean; - /** - * @docid - * @type_function_param1 e:Error - * @type_function_param1_field errorDetails:object - * @type_function_param1_field requestOptions:object - * @public - */ - errorHandler?: ((e: { httpStatus: number; errorDetails: any; requestOptions: ODataRequestOptions }) => void); - /** - * @docid - * @default {} - * @public - */ - fieldTypes?: any; - /** - * @docid - * @public - */ - filterToLower?: boolean; - /** - * @docid - * @default false - * @public - */ - jsonp?: boolean; - /** - * @docid - * @type string|object - * @acceptValues "String"|"Int32"|"Int64"|"Guid"|"Boolean"|"Single"|"Decimal" - * @public - */ - keyType?: 'String' | 'Int32' | 'Int64' | 'Guid' | 'Boolean' | 'Single' | 'Decimal' | any; - /** - * @docid - * @public - */ - url?: string; - /** - * @docid - * @default 4 - * @acceptValues 2|3|4 - * @public - */ - version?: number; +export { /** - * @docid - * @default false - * @public + * @deprecated Use ODataStoreOptions from /common/data instead */ - withCredentials?: boolean; -} + ODataStoreOptions, +}; /** - * @docid - * @inherits Store - * @public - * @options ODataStoreOptions + * @deprecated Use ODataStore from /common/data instead */ -export default class ODataStore< - TItem = any, - TKey = any, -> extends Store { - constructor(options?: Options); - /** - * @docid - * @publicName byKey(key, extraOptions) - * @param1 key:object|string|number - * @return Promise - * @public - */ - byKey(key: TKey, extraOptions?: { expand?: string | Array; select?: string | Array }): DxPromise; - /** - * @docid - * @publicName createQuery(loadOptions) - * @return object - * @public - */ - createQuery(loadOptions?: { expand?: string | Array; requireTotalCount?: boolean; customQueryParams?: any }): Query; -} +export default ODataStore; diff --git a/packages/devextreme/js/data/odata/store.js b/packages/devextreme/js/data/odata/store.js new file mode 100644 index 000000000000..a7c9ceaf80e8 --- /dev/null +++ b/packages/devextreme/js/data/odata/store.js @@ -0,0 +1,3 @@ +import { ODataStore } from '../../common/data'; + +export default ODataStore; diff --git a/packages/devextreme/js/data/odata/utils.d.ts b/packages/devextreme/js/data/odata/utils.d.ts index 17b6810f4510..5c61cd7c4305 100644 --- a/packages/devextreme/js/data/odata/utils.d.ts +++ b/packages/devextreme/js/data/odata/utils.d.ts @@ -1,23 +1,10 @@ -/** - * @docid - * @namespace DevExpress.data - * @public - */ -export class EdmLiteral { - constructor(value: string); - /** - * @docid - * @publicName valueOf() - * @public - */ - valueOf(): string; -} - -/** - * @const Utils.keyConverters - * @publicName odata.keyConverters - * @namespace DevExpress.data.utils.odata - * @public - */ -// eslint-disable-next-line vars-on-top, import/no-mutable-exports, no-var, @typescript-eslint/init-declarations, @typescript-eslint/no-explicit-any -export var keyConverters: any; +export { + /** + * @deprecated Use EdmLiteral from /common/data instead + */ + EdmLiteral, + /** + * @deprecated Use keyConverters from /common/data instead + */ + keyConverters, +} from '../../common/data'; diff --git a/packages/devextreme/js/data/odata/utils.js b/packages/devextreme/js/data/odata/utils.js new file mode 100644 index 000000000000..14553296f4fe --- /dev/null +++ b/packages/devextreme/js/data/odata/utils.js @@ -0,0 +1 @@ +export { EdmLiteral, keyConverters } from '../../common/data'; diff --git a/packages/devextreme/js/data/query.d.ts b/packages/devextreme/js/data/query.d.ts index 5c009faf1be0..e352c11ad441 100644 --- a/packages/devextreme/js/data/query.d.ts +++ b/packages/devextreme/js/data/query.d.ts @@ -1,187 +1,13 @@ -import { - DxPromise, -} from '../core/utils/deferred'; +import { query } from '../common/data'; -/** - * @docid - * @type object - * @public - */ -export interface Query { - /** - * @docid - * @publicName aggregate(seed, step, finalize) - * @param1 seed:object - * @return Promise - * @public - */ - aggregate(seed: any, step: Function, finalize: Function): DxPromise; - /** - * @docid - * @publicName aggregate(step) - * @return Promise - * @public - */ - aggregate(step: Function): DxPromise; - /** - * @docid - * @publicName avg() - * @return Promise - * @public - */ - avg(): DxPromise; - /** - * @docid - * @publicName avg(getter) - * @param1 getter:object - * @return Promise - * @public - */ - avg(getter: any): DxPromise; - /** - * @docid - * @publicName count() - * @return Promise - * @public - */ - count(): DxPromise; - /** - * @docid - * @publicName enumerate() - * @return Promise - * @public - */ - enumerate(): DxPromise; - /** - * @docid - * @publicName filter(criteria) - * @public - */ - filter(criteria: Array): Query; - /** - * @docid - * @publicName filter(predicate) - * @public - */ - filter(predicate: Function): Query; - /** - * @docid - * @publicName groupBy(getter) - * @param1 getter:object - * @public - */ - groupBy(getter: any): Query; - /** - * @docid - * @publicName max() - * @return Promise - * @public - */ - max(): DxPromise; - /** - * @docid - * @publicName max(getter) - * @param1 getter:object - * @return Promise - * @public - */ - max(getter: any): DxPromise; - /** - * @docid - * @publicName min() - * @return Promise - * @public - */ - min(): DxPromise; - /** - * @docid - * @publicName min(getter) - * @param1 getter:object - * @return Promise - * @public - */ - min(getter: any): DxPromise; - /** - * @docid - * @publicName select(getter) - * @param1 getter:object|Array - * @public - */ - select(...getters: any[]): Query; - /** - * @docid - * @publicName slice(skip, take) - * @param2 take:number|undefined - * @public - */ - slice(skip: number, take?: number): Query; - /** - * @docid - * @publicName sortBy(getter) - * @param1 getter:object - * @public - */ - sortBy(getter: any): Query; - /** - * @docid - * @publicName sortBy(getter, desc) - * @param1 getter:object - * @public - */ - sortBy(getter: any, desc: boolean): Query; - /** - * @docid - * @publicName sum() - * @return Promise - * @public - */ - sum(): DxPromise; - /** - * @docid - * @publicName sum(getter) - * @param1 getter:object - * @return Promise - * @public - */ - sum(getter: any): DxPromise; - /** - * @docid - * @publicName thenBy(getter) - * @param1 getter:object - * @public - */ - thenBy(getter: any): Query; - /** - * @docid - * @publicName thenBy(getter, desc) - * @param1 getter:object - * @public - */ - thenBy(getter: any, desc: boolean): Query; - /** - * @docid - * @publicName toArray() - * @public - */ - toArray(): Array; -} - -/** - * @docid Utils.query - * @publicName query(array, queryOptions) - * @param2 queryOptions:object - * @namespace DevExpress.data - * @public - */ -declare function query(array: Array, queryOptions?: any): Query; +export { + /** + * @deprecated Use Query from /common/data instead + */ + Query, +} from '../common/data'; /** - * @docid Utils.query - * @publicName query(url, queryOptions) - * @param2 queryOptions:object - * @namespace DevExpress.data - * @public + * @deprecated Use query from /common/data instead */ -declare function query(url: string, queryOptions: any): Query; - export default query; diff --git a/packages/devextreme/js/data/query.js b/packages/devextreme/js/data/query.js new file mode 100644 index 000000000000..919279dbfc6b --- /dev/null +++ b/packages/devextreme/js/data/query.js @@ -0,0 +1,3 @@ +import { query } from '../common/data'; + +export default query; diff --git a/packages/devextreme/js/data/store.d.ts b/packages/devextreme/js/data/store.d.ts index b3800fb57a41..fe85e4cd6877 100644 --- a/packages/devextreme/js/data/store.d.ts +++ b/packages/devextreme/js/data/store.d.ts @@ -1,203 +1,10 @@ -import { - DxPromise, - DxExtendedPromise, -} from '../core/utils/deferred'; -import { DeepPartial } from '../core/index'; -import { - FilterDescriptor, - GroupDescriptor, - LoadOptions, -} from './index'; - -/** - * @docid StoreOptions - * @namespace DevExpress.data.Store - * @hidden - */ -export type Options< - TItem = any, - TKey = any, -> = { - /** - * @docid StoreOptions.errorHandler - * @public - */ - errorHandler?: Function; - /** - * @docid StoreOptions.key - * @public - */ - key?: string | Array; - /** - * @docid StoreOptions.onInserted - * @type_function_param1 values:object - * @type_function_param2 key:object|string|number - * @action - * @public - */ - onInserted?: ((values: TItem, key: TKey) => void); - /** - * @docid StoreOptions.onInserting - * @type_function_param1 values:object - * @action - * @public - */ - onInserting?: ((values: TItem) => void); - /** - * @docid StoreOptions.onLoading - * @type_function_param1 loadOptions:LoadOptions - * @action - * @public - */ - onLoading?: ((loadOptions: LoadOptions) => void); - /** - * @docid StoreOptions.onModified - * @action - * @public - */ - onModified?: Function; - /** - * @docid StoreOptions.onModifying - * @action - * @public - */ - onModifying?: Function; - /** - * @docid StoreOptions.onPush - * @action - * @public - */ - onPush?: ((changes: Array) => void); - /** - * @docid StoreOptions.onRemoved - * @type_function_param1 key:object|string|number - * @action - * @public - */ - onRemoved?: ((key: TKey) => void); - /** - * @docid StoreOptions.onRemoving - * @type_function_param1 key:object|string|number - * @action - * @public - */ - onRemoving?: ((key: TKey) => void); - /** - * @docid StoreOptions.onUpdated - * @type_function_param1 key:object|string|number - * @type_function_param2 values:object - * @action - * @public - */ - onUpdated?: ((key: TKey, values: TItem) => void); - /** - * @docid StoreOptions.onUpdating - * @type_function_param1 key:object|string|number - * @type_function_param2 values:object - * @action - * @public - */ - onUpdating?: ((key: TKey, values: TItem) => void); -}; - -type EventName = 'loaded' | 'loading' | 'inserted' | 'inserting' | 'updated' | 'updating' | 'push' | 'removed' | 'removing' | 'modified' | 'modifying'; - -/** - * @docid Store - * @namespace DevExpress.data - * @hidden - * @options Options - */ -export class Store< - TItem = any, - TKey = any, -> { - constructor(options?: Options); - /** - * @docid - * @publicName insert(values) - * @param1 values:object - * @return Promise - * @public - */ - insert(values: TItem): DxExtendedPromise; - /** - * @docid - * @publicName key() - * @public - */ - key(): string | Array; - /** - * @docid - * @publicName keyOf(obj) - * @param1 obj:object - * @return any|string|number - * @public - */ - keyOf(obj: TItem): TKey; - /** - * @docid - * @publicName off(eventName) - * @param1 eventName:string - * @return this - * @public - */ - off(eventName: EventName): this; - /** - * @docid - * @publicName off(eventName, eventHandler) - * @param1 eventName:string - * @return this - * @public - */ - off(eventName: EventName, eventHandler: Function): this; - /** - * @docid - * @publicName on(eventName, eventHandler) - * @param1 eventName:string - * @return this - * @public - */ - on(eventName: EventName, eventHandler: Function): this; - /** - * @docid - * @publicName on(events) - * @param1 events:object - * @return this - * @public - */ - on(events: { [key in EventName]?: Function }): this; - /** - * @docid - * @publicName push(changes) - * @param1 changes:Array - * @public - */ - push(changes: Array<{ type: 'insert' | 'update' | 'remove'; data?: DeepPartial; key?: TKey; index?: number }>): void; - /** - * @docid - * @publicName remove(key) - * @param1 key:object|string|number - * @return Promise - * @public - */ - remove(key: TKey): DxPromise; - /** - * @docid - * @publicName totalCount(options) - * @param1_field filter:object - * @param1_field group:object - * @return Promise - * @public - */ - totalCount(obj: { filter?: FilterDescriptor | Array; group?: GroupDescriptor | Array> }): DxPromise; - /** - * @docid - * @publicName update(key, values) - * @param1 key:object|string|number - * @param2 values:object - * @return Promise - * @public - */ - update(key: TKey, values: DeepPartial): DxExtendedPromise; -} +export { + /** + * @deprecated Use StoreOptionsBase from /common/data instead + */ + StoreOptionsBase as Options, + /** + * @deprecated Use StoreBase from /common/data instead + */ + StoreBase as Store, +} from '../common/data'; diff --git a/packages/devextreme/js/data/utils.d.ts b/packages/devextreme/js/data/utils.d.ts index c32257ed8259..fc6ca7bdd009 100644 --- a/packages/devextreme/js/data/utils.d.ts +++ b/packages/devextreme/js/data/utils.d.ts @@ -1,7 +1,6 @@ -/** - * @docid Utils.base64_encode - * @publicName base64_encode(input) - * @namespace DevExpress.data - * @public - */ -export function base64_encode(input: string | Array): string; +export { + /** + * @deprecated Use base64_encode from /common/data instead + */ + base64_encode, +} from '../common/data'; diff --git a/packages/devextreme/js/data/utils.js b/packages/devextreme/js/data/utils.js new file mode 100644 index 000000000000..28c16d2b39ff --- /dev/null +++ b/packages/devextreme/js/data/utils.js @@ -0,0 +1 @@ +export { base64_encode } from '../common/data'; diff --git a/packages/devextreme/js/data_helper.d.ts b/packages/devextreme/js/data_helper.d.ts index ba00d91f5bc7..6af09beb52ca 100644 --- a/packages/devextreme/js/data_helper.d.ts +++ b/packages/devextreme/js/data_helper.d.ts @@ -1,14 +1,3 @@ -import DataSource from './data/data_source'; +import { DataHelperMixin } from './common/data'; -/** - * @docid - * @hidden - */ -export default class DataHelperMixin { - /** - * @docid - * @publicName getDataSource() - * @public - */ - getDataSource(): DataSource; -} +export default DataHelperMixin; diff --git a/packages/devextreme/js/data_helper.js b/packages/devextreme/js/data_helper.js index 7bff404fea60..6af09beb52ca 100644 --- a/packages/devextreme/js/data_helper.js +++ b/packages/devextreme/js/data_helper.js @@ -1,166 +1,3 @@ - -import { DataSource } from './data/data_source/data_source'; -import { extend } from './core/utils/extend'; -import { normalizeDataSourceOptions } from './data/data_source/utils'; -import DataController from './__internal/ui/collection/m_data_controller'; - -const DATA_SOURCE_OPTIONS_METHOD = '_dataSourceOptions'; -const DATA_SOURCE_CHANGED_METHOD = '_dataSourceChangedHandler'; -const DATA_SOURCE_LOAD_ERROR_METHOD = '_dataSourceLoadErrorHandler'; -const DATA_SOURCE_LOADING_CHANGED_METHOD = '_dataSourceLoadingChangedHandler'; -const DATA_SOURCE_FROM_URL_LOAD_MODE_METHOD = '_dataSourceFromUrlLoadMode'; -const SPECIFIC_DATA_SOURCE_OPTION = '_getSpecificDataSourceOption'; -const NORMALIZE_DATA_SOURCE = '_normalizeDataSource'; - - -const DataHelperMixin = { - - postCtor: function() { - this.on('disposing', function() { - this._disposeDataSource(); - }.bind(this)); - }, - - _refreshDataSource: function() { - this._initDataSource(); - this._loadDataSource(); - }, - - _initDataSource: function() { - let dataSourceOptions = (SPECIFIC_DATA_SOURCE_OPTION in this) ? this[SPECIFIC_DATA_SOURCE_OPTION]() : this.option('dataSource'); - let widgetDataSourceOptions; - let dataSourceType; - - this._disposeDataSource(); - - if(dataSourceOptions) { - if(dataSourceOptions instanceof DataSource) { - this._isSharedDataSource = true; - this._dataSource = dataSourceOptions; - } else { - widgetDataSourceOptions = (DATA_SOURCE_OPTIONS_METHOD in this) ? this[DATA_SOURCE_OPTIONS_METHOD]() : {}; - dataSourceType = this._dataSourceType ? this._dataSourceType() : DataSource; - - dataSourceOptions = normalizeDataSourceOptions(dataSourceOptions, { - fromUrlLoadMode: (DATA_SOURCE_FROM_URL_LOAD_MODE_METHOD in this) && this[DATA_SOURCE_FROM_URL_LOAD_MODE_METHOD]() - }); - - this._dataSource = new dataSourceType(extend(true, {}, widgetDataSourceOptions, dataSourceOptions)); - } - - if(NORMALIZE_DATA_SOURCE in this) { - this._dataSource = this[NORMALIZE_DATA_SOURCE](this._dataSource); - } - - this._addDataSourceHandlers(); - this._initDataController(); - } - }, - - _initDataController: function() { - const dataController = this.option?.('_dataController'); - const dataSource = this._dataSource; - - if(dataController) { - this._dataController = dataController; - } else { - this._dataController = new DataController(dataSource); - } - }, - - _addDataSourceHandlers: function() { - if(DATA_SOURCE_CHANGED_METHOD in this) { - this._addDataSourceChangeHandler(); - } - - if(DATA_SOURCE_LOAD_ERROR_METHOD in this) { - this._addDataSourceLoadErrorHandler(); - } - - if(DATA_SOURCE_LOADING_CHANGED_METHOD in this) { - this._addDataSourceLoadingChangedHandler(); - } - - this._addReadyWatcher(); - }, - - _addReadyWatcher: function() { - this.readyWatcher = (function(isLoading) { - this._ready && this._ready(!isLoading); - }).bind(this); - this._dataSource.on('loadingChanged', this.readyWatcher); - }, - - _addDataSourceChangeHandler: function() { - const dataSource = this._dataSource; - this._proxiedDataSourceChangedHandler = (function(e) { - this[DATA_SOURCE_CHANGED_METHOD](dataSource.items(), e); - }).bind(this); - dataSource.on('changed', this._proxiedDataSourceChangedHandler); - }, - - _addDataSourceLoadErrorHandler: function() { - this._proxiedDataSourceLoadErrorHandler = this[DATA_SOURCE_LOAD_ERROR_METHOD].bind(this); - this._dataSource.on('loadError', this._proxiedDataSourceLoadErrorHandler); - }, - - _addDataSourceLoadingChangedHandler: function() { - this._proxiedDataSourceLoadingChangedHandler = this[DATA_SOURCE_LOADING_CHANGED_METHOD].bind(this); - this._dataSource.on('loadingChanged', this._proxiedDataSourceLoadingChangedHandler); - }, - - _loadDataSource: function() { - const dataSource = this._dataSource; - if(dataSource) { - if(dataSource.isLoaded()) { - this._proxiedDataSourceChangedHandler && this._proxiedDataSourceChangedHandler(); - } else { - dataSource.load(); - } - } - }, - - _loadSingle: function(key, value) { - key = key === 'this' ? this._dataSource.key() || 'this' : key; - return this._dataSource.loadSingle(key, value); - }, - - _isLastPage: function() { - return !this._dataSource || this._dataSource.isLastPage() || !this._dataSource._pageSize; - }, - - _isDataSourceLoading: function() { - return this._dataSource && this._dataSource.isLoading(); - }, - - _disposeDataSource: function() { - if(this._dataSource) { - if(this._isSharedDataSource) { - delete this._isSharedDataSource; - - this._proxiedDataSourceChangedHandler && this._dataSource.off('changed', this._proxiedDataSourceChangedHandler); - this._proxiedDataSourceLoadErrorHandler && this._dataSource.off('loadError', this._proxiedDataSourceLoadErrorHandler); - this._proxiedDataSourceLoadingChangedHandler && this._dataSource.off('loadingChanged', this._proxiedDataSourceLoadingChangedHandler); - - if(this._dataSource._eventsStrategy) { - this._dataSource._eventsStrategy.off('loadingChanged', this.readyWatcher); - } - } else { - this._dataSource.dispose(); - } - - delete this._dataSource; - - delete this._proxiedDataSourceChangedHandler; - delete this._proxiedDataSourceLoadErrorHandler; - delete this._proxiedDataSourceLoadingChangedHandler; - } - }, - - getDataSource: function() { - return this._dataSource || null; - } - -}; +import { DataHelperMixin } from './common/data'; export default DataHelperMixin; diff --git a/packages/devextreme/js/events/index.d.ts b/packages/devextreme/js/events/index.d.ts new file mode 100644 index 000000000000..0fc61f7a4913 --- /dev/null +++ b/packages/devextreme/js/events/index.d.ts @@ -0,0 +1,81 @@ +export { + /** + * @deprecated Use on from /common/core/events instead + */ + on, + /** + * @deprecated Use one from /common/core/events instead + */ + one, + /** + * @deprecated Use off from /common/core/events instead + */ + off, + /** + * @deprecated Use trigger from /common/core/events instead + */ + trigger, + /** + * @deprecated Use triggerHandler from /common/core/events instead + */ + triggerHandler, + /** + * @deprecated Use DxEvent from /common/core/events instead + */ + DxEvent, + /** + * @deprecated Use InitializedEventInfo from /common/core/events instead + */ + InitializedEventInfo, + /** + * @deprecated Use EventInfo from /common/core/events instead + */ + EventInfo, + /** + * @deprecated Use NativeEventInfo from /common/core/events instead + */ + NativeEventInfo, + /** + * @deprecated Use ChangedOptionInfo from /common/core/events instead + */ + ChangedOptionInfo, + /** + * @deprecated Use ItemInfo from /common/core/events instead + */ + ItemInfo, + /** + * @deprecated Use Cancelable from /common/core/events instead + */ + Cancelable, + /** + * @deprecated Use AsyncCancelable from /common/core/events instead + */ + AsyncCancelable, + /** + * @deprecated Use EventObject from /common/core/events instead + */ + EventObject, + /** + * @deprecated Use EventExtension from /common/core/events instead + */ + EventExtension, + /** + * @deprecated Use EventType from /common/core/events instead + */ + EventType, +} from '../common/core/events'; + +export { + /** + * @deprecated Use eventsHandler from /common/core/events/index instead + */ + eventsHandler, + /** + * @deprecated Use dxEvent from /common/core/events/index instead + */ + dxEvent, + /** + * @deprecated Use event from /common/core/events/index instead + */ + event, +} from '../common/core/events/index'; diff --git a/packages/devextreme/js/events/index.js b/packages/devextreme/js/events/index.js new file mode 100644 index 000000000000..0de37da44056 --- /dev/null +++ b/packages/devextreme/js/events/index.js @@ -0,0 +1,7 @@ +export { + on, + one, + off, + trigger, + triggerHandler, +} from '../common/core/events'; diff --git a/packages/devextreme/js/excel_exporter.d.ts b/packages/devextreme/js/excel_exporter.d.ts new file mode 100644 index 000000000000..0eb84a9933ef --- /dev/null +++ b/packages/devextreme/js/excel_exporter.d.ts @@ -0,0 +1,46 @@ +export { + /** + * @deprecated Use DataGridCell from common/export/excel instead + */ + DataGridCell, + /** + * @deprecated Use ExcelDataGridCell from common/export/excel instead + */ + ExcelDataGridCell, + /** + * @deprecated Use PivotGridCell from common/export/excel instead + */ + PivotGridCell, + /** + * @deprecated Use ExcelPivotGridCell from common/export/excel instead + */ + ExcelPivotGridCell, + /** + * @deprecated Use CellAddress from common/export/excel instead + */ + CellAddress, + /** + * @deprecated Use CellRange from common/export/excel instead + */ + CellRange, + /** + * @deprecated Use ExcelExportBaseProps from common/export/excel instead + */ + ExcelExportBaseProps, + /** + * @deprecated Use ExcelExportDataGridProps from common/export/excel instead + */ + ExcelExportDataGridProps, + /** + * @deprecated Use ExcelExportPivotGridProps from common/export/excel instead + */ + ExcelExportPivotGridProps, + /** + * @deprecated Use exportDataGrid from common/export/excel instead + */ + exportDataGrid, + /** + * @deprecated Use exportPivotGrid from common/export/excel instead + */ + exportPivotGrid, +} from './common/export/excel'; diff --git a/packages/devextreme/js/excel_exporter.js b/packages/devextreme/js/excel_exporter.js new file mode 100644 index 000000000000..48ace077fbad --- /dev/null +++ b/packages/devextreme/js/excel_exporter.js @@ -0,0 +1 @@ +export { exportDataGrid, exportPivotGrid } from './common/export/excel'; diff --git a/packages/devextreme/js/exporter/common/export_load_panel.js b/packages/devextreme/js/exporter/common/export_load_panel.js index 8d303b1943b6..1f045f5d30a5 100644 --- a/packages/devextreme/js/exporter/common/export_load_panel.js +++ b/packages/devextreme/js/exporter/common/export_load_panel.js @@ -1,6 +1,6 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import { isDefined } from '../../core/utils/type'; import LoadPanel from '../../ui/load_panel'; import gridUtils from '../../__internal/grids/grid_core/m_utils'; diff --git a/packages/devextreme/js/exporter/exceljs/export_format.js b/packages/devextreme/js/exporter/exceljs/export_format.js index 1286c1454c15..3389898b69f6 100644 --- a/packages/devextreme/js/exporter/exceljs/export_format.js +++ b/packages/devextreme/js/exporter/exceljs/export_format.js @@ -1,11 +1,11 @@ import { format as stringFormat } from '../../core/utils/string'; -import numberFormatter from '../../localization/number'; -import dateLocalization from '../../localization/date'; +import numberFormatter from '../../common/core/localization/number'; +import dateLocalization from '../../common/core/localization/date'; import { isDefined, isString, isObject, isNumeric } from '../../core/utils/type'; -import { getFormat } from '../../localization/ldml/date.format'; -import { getLanguageId } from '../../localization/language_codes'; +import { getFormat } from '../../common/core/localization/ldml/date.format'; +import { getLanguageId } from '../../common/core/localization/language_codes'; import { extend } from '../../core/utils/extend'; -import '../../localization/currency'; +import '../../common/core/localization/currency'; const ARABIC_ZERO_CODE = 1632; const DEFINED_NUMBER_FORMTATS = { diff --git a/packages/devextreme/js/exporter/export_load_panel.d.ts b/packages/devextreme/js/exporter/export_load_panel.d.ts new file mode 100644 index 000000000000..45817ec0c6d7 --- /dev/null +++ b/packages/devextreme/js/exporter/export_load_panel.d.ts @@ -0,0 +1,6 @@ +export { + /** + * @deprecated Use ExportLoadPanel from /common/export instead + */ + ExportLoadPanel, +} from '../common/export'; diff --git a/packages/devextreme/js/exporter/jspdf/autotable/export.js b/packages/devextreme/js/exporter/jspdf/autotable/export.js index 99da73c8c40f..8de1697c21cc 100644 --- a/packages/devextreme/js/exporter/jspdf/autotable/export.js +++ b/packages/devextreme/js/exporter/jspdf/autotable/export.js @@ -1,8 +1,8 @@ import { isDate, isDefined, isObject, isFunction, isNumeric } from '../../../core/utils/type'; import { extend } from '../../../core/utils/extend'; -import dateLocalization from '../../../localization/date'; -import numberLocalization from '../../../localization/number'; -import messageLocalization from '../../../localization/message'; +import dateLocalization from '../../../common/core/localization/date'; +import numberLocalization from '../../../common/core/localization/number'; +import messageLocalization from '../../../common/core/localization/message'; import { ExportLoadPanel } from '../../common/export_load_panel'; import { hasWindow } from '../../../core/utils/window'; diff --git a/packages/devextreme/js/exporter/jspdf/common/export.js b/packages/devextreme/js/exporter/jspdf/common/export.js index ccd774e6b600..b87e90605629 100644 --- a/packages/devextreme/js/exporter/jspdf/common/export.js +++ b/packages/devextreme/js/exporter/jspdf/common/export.js @@ -7,7 +7,7 @@ import { generateRowsInfo, getBaseTableStyle } from './rows_generator'; import { splitByPages } from './rows_splitting'; import { drawCellsContent, drawCellsLines, drawGridLines, getDocumentStyles, setDocumentStyles, addNewPage } from './draw_utils'; import { applyRtl, applyWordWrap, toPdfUnit } from './pdf_utils'; -import messageLocalization from '../../../localization/message'; +import messageLocalization from '../../../common/core/localization/message'; import { ExportLoadPanel } from '../../common/export_load_panel'; import { hasWindow } from '../../../core/utils/window'; diff --git a/packages/devextreme/js/exporter/jspdf/common/rows_generator.js b/packages/devextreme/js/exporter/jspdf/common/rows_generator.js index 3aac4c886ec6..47f487d48d45 100644 --- a/packages/devextreme/js/exporter/jspdf/common/rows_generator.js +++ b/packages/devextreme/js/exporter/jspdf/common/rows_generator.js @@ -1,6 +1,6 @@ import { isDate, isDefined, isNumeric } from '../../../core/utils/type'; -import dateLocalization from '../../../localization/date'; -import numberLocalization from '../../../localization/number'; +import dateLocalization from '../../../common/core/localization/date'; +import numberLocalization from '../../../common/core/localization/number'; import { toPdfUnit } from './pdf_utils'; const defaultStyles = { diff --git a/packages/devextreme/js/file_management/custom_provider.d.ts b/packages/devextreme/js/file_management/custom_provider.d.ts index ec107e21c6d8..7238822a56ea 100644 --- a/packages/devextreme/js/file_management/custom_provider.d.ts +++ b/packages/devextreme/js/file_management/custom_provider.d.ts @@ -1,102 +1,22 @@ -import FileSystemProviderBase, { - FileSystemProviderBaseOptions, -} from './provider_base'; - -import FileSystemItem from './file_system_item'; -import UploadInfo from './upload_info'; - -/** @public */ -export type Options = CustomFileSystemProviderOptions; +import { + CustomFileSystemProviderOptions, + CustomFileSystemProvider, +} from '../common/file_management'; /** - * @deprecated Use Options instead - * @namespace DevExpress.fileManagement - * @docid + * @public + * @deprecated Use CustomFileSystemProviderOptions from /common/file_management instead */ -export interface CustomFileSystemProviderOptions extends FileSystemProviderBaseOptions { - /** - * @docid - * @type_function_return Promise|any - * @public - */ - abortFileUpload?: ((file: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem) => PromiseLike | any); - - /** - * @docid - * @type_function_return Promise|any - * @public - */ - copyItem?: ((item: FileSystemItem, destinationDirectory: FileSystemItem) => PromiseLike | any); - - /** - * @docid - * @type_function_return Promise|any - * @public - */ - createDirectory?: ((parentDirectory: FileSystemItem, name: string) => PromiseLike | any); - - /** - * @docid - * @type_function_return Promise|any - * @public - */ - deleteItem?: ((item: FileSystemItem) => PromiseLike | any); - - /** - * @docid - * @public - */ - downloadItems?: ((items: Array) => void); - - /** - * @docid - * @type_function_return Promise>|Array - * @public - */ - getItems?: ((parentDirectory: FileSystemItem) => PromiseLike> | Array); - - /** - * @docid - * @type_function_return Promise|object - * @public - */ - getItemsContent?: ((items: Array) => PromiseLike | any); - - /** - * @docid - * @public - */ - hasSubDirectoriesExpr?: string | Function; - - /** - * @docid - * @type_function_return Promise|any - * @public - */ - moveItem?: ((item: FileSystemItem, destinationDirectory: FileSystemItem) => PromiseLike | any); - - /** - * @docid - * @type_function_return Promise|any - * @public - */ - renameItem?: ((item: FileSystemItem, newName: string) => PromiseLike | any); +export type Options = CustomFileSystemProviderOptions; - /** - * @docid - * @type_function_return Promise|any - * @public - */ - uploadFileChunk?: ((file: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem) => PromiseLike | any); -} +export { + /** + * @deprecated Use CustomFileSystemProviderOptions from /common/file_management instead + */ + CustomFileSystemProviderOptions, +}; /** - * @docid - * @inherits FileSystemProviderBase - * @namespace DevExpress.fileManagement - * @public - * @options CustomFileSystemProviderOptions + * @deprecated Use CustomFileSystemProvider from /common/file_management instead */ -export default class CustomFileSystemProvider extends FileSystemProviderBase { - constructor(options?: Options); -} +export default CustomFileSystemProvider; diff --git a/packages/devextreme/js/file_management/custom_provider.js b/packages/devextreme/js/file_management/custom_provider.js new file mode 100644 index 000000000000..799cb7a1365e --- /dev/null +++ b/packages/devextreme/js/file_management/custom_provider.js @@ -0,0 +1,5 @@ +import { + CustomFileSystemProvider, +} from '../common/file_management'; + +export default CustomFileSystemProvider; diff --git a/packages/devextreme/js/file_management/error.d.ts b/packages/devextreme/js/file_management/error.d.ts index 7856bb15add7..7458c232bbf9 100644 --- a/packages/devextreme/js/file_management/error.d.ts +++ b/packages/devextreme/js/file_management/error.d.ts @@ -1,27 +1,6 @@ -import FileSystemItem from './file_system_item'; +import { FileSystemError } from '../common/file_management'; /** - * @docid FileSystemError - * @namespace DevExpress.fileManagement - * @public + * @deprecated Use FileSystemError from /common/file_management instead */ -export default class FileSystemError { - constructor(errorCode?: number, fileSystemItem?: FileSystemItem, errorText?: string); - /** - * @docid FileSystemError.fileSystemItem - * @public - */ - fileSystemItem?: FileSystemItem; - - /** - * @docid FileSystemError.errorCode - * @public - */ - errorCode?: number; - - /** - * @docid FileSystemError.errorText - * @public - */ - errorText?: string; -} +export default FileSystemError; diff --git a/packages/devextreme/js/file_management/error.js b/packages/devextreme/js/file_management/error.js new file mode 100644 index 000000000000..bc3a01a67800 --- /dev/null +++ b/packages/devextreme/js/file_management/error.js @@ -0,0 +1,3 @@ +import { FileSystemError } from '../common/file_management'; + +export default FileSystemError; diff --git a/packages/devextreme/js/file_management/file_system_item.d.ts b/packages/devextreme/js/file_management/file_system_item.d.ts index b71fc61a9646..2774f614f7fe 100644 --- a/packages/devextreme/js/file_management/file_system_item.d.ts +++ b/packages/devextreme/js/file_management/file_system_item.d.ts @@ -1,75 +1,6 @@ +import { FileSystemItem } from '../common/file_management'; + /** - * @docid FileSystemItem - * @namespace DevExpress.fileManagement - * @public + * @deprecated Use FileSystemItem from /common/file_management instead */ -export default class FileSystemItem { - constructor(path: string, isDirectory: boolean, pathKeys?: Array); - - /** - * @docid FileSystemItem.path - * @public - */ - path: string; - - /** - * @docid FileSystemItem.pathKeys - * @public - */ - pathKeys: Array; - - /** - * @docid FileSystemItem.key - * @public - */ - key: string; - - /** - * @docid FileSystemItem.name - * @public - */ - name: string; - - /** - * @docid FileSystemItem.dateModified - * @public - */ - dateModified: Date; - - /** - * @docid FileSystemItem.size - * @public - */ - size: number; - - /** - * @docid FileSystemItem.isDirectory - * @public - */ - isDirectory: boolean; - - /** - * @docid FileSystemItem.hasSubDirectories - * @public - */ - hasSubDirectories: boolean; - - /** - * @docid FileSystemItem.thumbnail - * @public - */ - thumbnail: string; - - /** - * @docid FileSystemItem.dataItem - * @public - */ - dataItem: any; - - /** - * @docid FileSystemItem.getFileExtension - * @publicName getFileExtension() - * @public - */ - getFileExtension(): string; -} +export default FileSystemItem; diff --git a/packages/devextreme/js/file_management/file_system_item.js b/packages/devextreme/js/file_management/file_system_item.js new file mode 100644 index 000000000000..390f1ed93b5e --- /dev/null +++ b/packages/devextreme/js/file_management/file_system_item.js @@ -0,0 +1,3 @@ +import { FileSystemItem } from '../common/file_management'; + +export default FileSystemItem; diff --git a/packages/devextreme/js/file_management/object_provider.d.ts b/packages/devextreme/js/file_management/object_provider.d.ts index 9bb5db1c2738..9fe3906bcd67 100644 --- a/packages/devextreme/js/file_management/object_provider.d.ts +++ b/packages/devextreme/js/file_management/object_provider.d.ts @@ -1,39 +1,22 @@ -import FileSystemProviderBase, { - FileSystemProviderBaseOptions, -} from './provider_base'; +import { + ObjectFileSystemProviderOptions, + ObjectFileSystemProvider, +} from '../common/file_management'; -/** @public */ +/** + * @public + * @deprecated Use ObjectFileSystemProviderOptions from /common/file_management instead +*/ export type Options = ObjectFileSystemProviderOptions; +export { + /** + * @deprecated Use ObjectFileSystemProviderOptions from /common/file_management instead + */ + ObjectFileSystemProviderOptions, +}; + /** - * @deprecated Use Options instead - * @namespace DevExpress.fileManagement - * @docid - */ -export interface ObjectFileSystemProviderOptions extends FileSystemProviderBaseOptions { - /** - * @docid - * @public - */ - contentExpr?: string | Function; - /** - * @docid - * @public - */ - data?: Array; - /** - * @docid - * @public - */ - itemsExpr?: string | Function; -} -/** - * @docid - * @inherits FileSystemProviderBase - * @namespace DevExpress.fileManagement - * @public - * @options ObjectFileSystemProviderOptions + * @deprecated Use ObjectFileSystemProvider from /common/file_management instead */ -export default class ObjectFileSystemProvider extends FileSystemProviderBase { - constructor(options?: Options); -} +export default ObjectFileSystemProvider; diff --git a/packages/devextreme/js/file_management/object_provider.js b/packages/devextreme/js/file_management/object_provider.js new file mode 100644 index 000000000000..88ac1779ab7a --- /dev/null +++ b/packages/devextreme/js/file_management/object_provider.js @@ -0,0 +1,5 @@ +import { + ObjectFileSystemProvider, +} from '../common/file_management'; + +export default ObjectFileSystemProvider; diff --git a/packages/devextreme/js/file_management/provider_base.d.ts b/packages/devextreme/js/file_management/provider_base.d.ts index ce7f8f11d911..f551bd8cfbe4 100644 --- a/packages/devextreme/js/file_management/provider_base.d.ts +++ b/packages/devextreme/js/file_management/provider_base.d.ts @@ -1,132 +1,13 @@ -import FileSystemItem from './file_system_item'; -import UploadInfo from './upload_info'; +import { FileSystemProviderBase } from '../common/file_management'; -import { - DxPromise, -} from '../core/utils/deferred'; +export { + /** + * @deprecated Use FileSystemProviderBaseOptions from /common/file_management instead + */ + FileSystemProviderBaseOptions, +} from '../common/file_management'; /** - * @namespace DevExpress.fileManagement - * @docid - * @type object + * @deprecated Use FileSystemProviderBase from /common/file_management instead */ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export interface FileSystemProviderBaseOptions { - /** - * @docid - * @public - */ - dateModifiedExpr?: string | Function; - /** - * @docid - * @public - */ - isDirectoryExpr?: string | Function; - /** - * @docid - * @public - */ - keyExpr?: string | Function; - /** - * @docid - * @public - */ - nameExpr?: string | Function; - /** - * @docid - * @public - */ - sizeExpr?: string | Function; - /** - * @docid - * @public - */ - thumbnailExpr?: string | Function; -} -/** - * @docid - * @namespace DevExpress.fileManagement - * @hidden - * @options FileSystemProviderBaseOptions - */ -export default class FileSystemProviderBase { - constructor(options?: FileSystemProviderBaseOptions); - /** - * @docid - * @publicName getItems() - * @return Promise> - * @public - */ - getItems(parentDirectory: FileSystemItem): DxPromise>; - - /** - * @docid - * @publicName renameItem() - * @return Promise - * @public - */ - renameItem(item: FileSystemItem, newName: string): DxPromise; - - /** - * @docid - * @publicName createDirectory() - * @return Promise - * @public - */ - createDirectory(parentDirectory: FileSystemItem, name: string): DxPromise; - - /** - * @docid - * @publicName deleteItems() - * @return Array> - * @public - */ - deleteItems(items: Array): Array>; - - /** - * @docid - * @publicName moveItems() - * @return Array> - * @public - */ - moveItems(items: Array, destinationDirectory: FileSystemItem): Array>; - - /** - * @docid - * @publicName copyItems() - * @return Array> - * @public - */ - copyItems(items: Array, destinationDirectory: FileSystemItem): Array>; - - /** - * @docid - * @publicName uploadFileChunk() - * @return Promise - * @public - */ - uploadFileChunk(fileData: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem): DxPromise; - - /** - * @docid - * @publicName abortFileUpload() - * @return Promise - * @public - */ - abortFileUpload(fileData: File, uploadInfo: UploadInfo, destinationDirectory: FileSystemItem): DxPromise; - - /** - * @docid - * @publicName downloadItems() - * @public - */ - downloadItems(items: Array): void; - - /** - * @docid - * @publicName getItemsContent() - * @return Promise - * @public - */ - getItemsContent(items: Array): DxPromise; -} +export default FileSystemProviderBase; diff --git a/packages/devextreme/js/file_management/provider_base.js b/packages/devextreme/js/file_management/provider_base.js new file mode 100644 index 000000000000..668d680e9097 --- /dev/null +++ b/packages/devextreme/js/file_management/provider_base.js @@ -0,0 +1,3 @@ +import { FileSystemProviderBase } from '../common/file_management'; + +export default FileSystemProviderBase; diff --git a/packages/devextreme/js/file_management/remote_provider.d.ts b/packages/devextreme/js/file_management/remote_provider.d.ts index 3a76d61f436d..506f2e3549fd 100644 --- a/packages/devextreme/js/file_management/remote_provider.d.ts +++ b/packages/devextreme/js/file_management/remote_provider.d.ts @@ -1,54 +1,22 @@ -import FileSystemProviderBase, { - FileSystemProviderBaseOptions, -} from './provider_base'; - -/** @public */ -export type Options = RemoteFileSystemProviderOptions; +import { + RemoteFileSystemProvider, + RemoteFileSystemProviderOptions, +} from '../common/file_management'; /** - * @deprecated Use Options instead - * @namespace DevExpress.fileManagement - * @docid + * @public + * @deprecated Use RemoteFileSystemProviderOptions from /common/file_management instead */ -export interface RemoteFileSystemProviderOptions extends FileSystemProviderBaseOptions { - /** - * @docid - * @type_function_param1_field headers:object - * @type_function_param1_field xhrFields:object - * @type_function_param1_field formData:object - * @public - */ - beforeAjaxSend?: ((options: { headers?: any; xhrFields?: any; formData?: any }) => void); - /** - * @docid - * @type_function_param1_field formData:object - * @public - */ - beforeSubmit?: ((options: { formData?: any }) => void); - /** - * @docid - * @public - */ - endpointUrl?: string; - /** - * @docid - * @public - */ - hasSubDirectoriesExpr?: string | Function; - /** - * @docid - * @default {} - * @public - */ - requestHeaders?: any; -} +export type Options = RemoteFileSystemProviderOptions; + +export { + /** + * @deprecated Use RemoteFileSystemProviderOptions from /common/file_management instead + */ + RemoteFileSystemProviderOptions, +}; + /** - * @docid - * @inherits FileSystemProviderBase - * @namespace DevExpress.fileManagement - * @public - * @options RemoteFileSystemProviderOptions + * @deprecated Use RemoteFileSystemProvider from /common/file_management instead */ -export default class RemoteFileSystemProvider extends FileSystemProviderBase { - constructor(options?: Options); -} +export default RemoteFileSystemProvider; diff --git a/packages/devextreme/js/file_management/remote_provider.js b/packages/devextreme/js/file_management/remote_provider.js new file mode 100644 index 000000000000..87cb49dceac6 --- /dev/null +++ b/packages/devextreme/js/file_management/remote_provider.js @@ -0,0 +1,5 @@ +import { + RemoteFileSystemProvider, +} from '../common/file_management'; + +export default RemoteFileSystemProvider; diff --git a/packages/devextreme/js/file_management/upload_info.d.ts b/packages/devextreme/js/file_management/upload_info.d.ts index bc5a26146cae..3dda0fbe6c56 100644 --- a/packages/devextreme/js/file_management/upload_info.d.ts +++ b/packages/devextreme/js/file_management/upload_info.d.ts @@ -1,36 +1,6 @@ -/** - * @docid - * @namespace DevExpress.fileManagement - * @public - */ -export default interface UploadInfo { - /** - * @docid - * @public - */ - bytesUploaded: number; - - /** - * @docid - * @public - */ - chunkCount: number; - - /** - * @docid - * @public - */ - customData: any; - - /** - * @docid - * @public - */ - chunkBlob: Blob; - - /** - * @docid - * @public - */ - chunkIndex: number; -} +export { + /** + * @deprecated Use UploadInfo from /common/file_management instead + */ + UploadInfo, +} from '../common/file_management'; diff --git a/packages/devextreme/js/format_helper.d.ts b/packages/devextreme/js/format_helper.d.ts index ed4f1c706830..b92812b5e6cb 100644 --- a/packages/devextreme/js/format_helper.d.ts +++ b/packages/devextreme/js/format_helper.d.ts @@ -1,6 +1,6 @@ import { Format, -} from './localization'; +} from './common/core/localization'; export interface FormatHelper { format( diff --git a/packages/devextreme/js/format_helper.js b/packages/devextreme/js/format_helper.js index f194972695c0..de05bc7ec2a0 100644 --- a/packages/devextreme/js/format_helper.js +++ b/packages/devextreme/js/format_helper.js @@ -7,11 +7,11 @@ import { isPlainObject } from './core/utils/type'; import dateUtils from './core/utils/date'; -import numberLocalization from './localization/number'; -import dateLocalization from './localization/date'; +import numberLocalization from './common/core/localization/number'; +import dateLocalization from './common/core/localization/date'; import dependencyInjector from './core/utils/dependency_injector'; -import './localization/currency'; +import './common/core/localization/currency'; export default dependencyInjector({ format: function(value, format) { diff --git a/packages/devextreme/js/integration/jquery.d.ts b/packages/devextreme/js/integration/jquery.d.ts index ccb50918ffb6..adfc6a505e17 100644 --- a/packages/devextreme/js/integration/jquery.d.ts +++ b/packages/devextreme/js/integration/jquery.d.ts @@ -92,7 +92,7 @@ declare module '../core/utils/deferred' { interface PromiseType extends JQueryPromise { } } -declare module '../events/index' { +declare module '../common/core/events' { interface EventType extends JQueryEventObject { cancel?: boolean; } diff --git a/packages/devextreme/js/integration/jquery/easing.js b/packages/devextreme/js/integration/jquery/easing.js index 8c26bcbb08cf..a569caf2a777 100644 --- a/packages/devextreme/js/integration/jquery/easing.js +++ b/packages/devextreme/js/integration/jquery/easing.js @@ -1,6 +1,6 @@ // eslint-disable-next-line no-restricted-imports import jQuery from 'jquery'; -import { setEasing } from '../../animation/easing'; +import { setEasing } from '../../common/core/animation/easing'; if(jQuery) { setEasing(jQuery.easing); diff --git a/packages/devextreme/js/integration/jquery/events.js b/packages/devextreme/js/integration/jquery/events.js index 1c1368d4fe39..15bd55198735 100644 --- a/packages/devextreme/js/integration/jquery/events.js +++ b/packages/devextreme/js/integration/jquery/events.js @@ -1,8 +1,8 @@ // eslint-disable-next-line no-restricted-imports import jQuery from 'jquery'; -import eventsEngine from '../../events/core/events_engine'; +import eventsEngine from '../../common/core/events/core/events_engine'; import useJQueryFn from './use_jquery'; -import registerEventCallbacks from '../../events/core/event_registrator_callbacks'; +import registerEventCallbacks from '../../common/core/events/core/event_registrator_callbacks'; import domAdapter from '../../core/dom_adapter'; const useJQuery = useJQueryFn(); diff --git a/packages/devextreme/js/integration/jquery/hooks.js b/packages/devextreme/js/integration/jquery/hooks.js index 156ab55a7be0..0b2d0a6a5deb 100644 --- a/packages/devextreme/js/integration/jquery/hooks.js +++ b/packages/devextreme/js/integration/jquery/hooks.js @@ -5,9 +5,9 @@ const useJQuery = useJQueryFn(); import { compare as compareVersion } from '../../core/utils/version'; import { each } from '../../core/utils/iterator'; import { isNumeric } from '../../core/utils/type'; -import { setEventFixMethod } from '../../events/utils/index'; -import registerEvent from '../../events/core/event_registrator'; -import hookTouchProps from '../../events/core/hook_touch_props'; +import { setEventFixMethod } from '../../common/core/events/utils/index'; +import registerEvent from '../../common/core/events/core/event_registrator'; +import hookTouchProps from '../../common/core/events/core/hook_touch_props'; if(useJQuery) { if(compareVersion(jQuery.fn.jquery, [3]) < 0) { diff --git a/packages/devextreme/js/integration/knockout/event_registrator.js b/packages/devextreme/js/integration/knockout/event_registrator.js index 81f23cb31023..38be731ab78b 100644 --- a/packages/devextreme/js/integration/knockout/event_registrator.js +++ b/packages/devextreme/js/integration/knockout/event_registrator.js @@ -1,10 +1,10 @@ import $ from '../../core/renderer'; -import eventsEngine from '../../events/core/events_engine'; +import eventsEngine from '../../common/core/events/core/events_engine'; // eslint-disable-next-line no-restricted-imports import ko from 'knockout'; import { isPlainObject } from '../../core/utils/type'; -import eventRegistratorCallbacks from '../../events/core/event_registrator_callbacks'; -import { addNamespace } from '../../events/utils/index'; +import eventRegistratorCallbacks from '../../common/core/events/core/event_registrator_callbacks'; +import { addNamespace } from '../../common/core/events/utils/index'; if(ko) { eventRegistratorCallbacks.add(function(name) { diff --git a/packages/devextreme/js/localization.d.ts b/packages/devextreme/js/localization.d.ts index 7a9ca3a007fb..108bfcd95ac6 100644 --- a/packages/devextreme/js/localization.d.ts +++ b/packages/devextreme/js/localization.d.ts @@ -1,131 +1,38 @@ -import { Format as PredefinedFormat } from './common'; - -/** - * @docid localization.formatDate - * @publicName formatDate(value, format) - * @static - * @namespace DevExpress.localization - * @public - */ -export function formatDate(value: Date, format: Format): string; - -/** - * @docid localization.formatMessage - * @publicName formatMessage(key, value) - * @param2 value:string|Array - * @static - * @namespace DevExpress.localization - * @public - */ -export function formatMessage(key: string, ...values: Array): string; - -/** - * @docid localization.formatNumber - * @publicName formatNumber(value, format) - * @static - * @namespace DevExpress.localization - * @public - */ -export function formatNumber(value: number, format: Format): string; - -/** - * @docid localization.loadMessages - * @publicName loadMessages(messages) - * @param1 messages:object - * @static - * @namespace DevExpress.localization - * @public - */ -export function loadMessages(messages: any): void; - -/** - * @docid localization.locale - * @publicName locale() - * @static - * @namespace DevExpress.localization - * @public - */ -export function locale(): string; - -/** - * @docid localization.locale - * @publicName locale(locale) - * @static - * @namespace DevExpress.localization - * @public - */ -// eslint-disable-next-line @typescript-eslint/no-shadow -export function locale(locale: string): void; - -/** - * @docid localization.parseDate - * @publicName parseDate(text, format) - * @static - * @namespace DevExpress.localization - * @public - */ -export function parseDate(text: string, format: Format): Date; - -/** - * @docid localization.parseNumber - * @publicName parseNumber(text, format) - * @static - * @namespace DevExpress.localization - * @public - */ -export function parseNumber(text: string, format: Format): number; - -export interface FormatObject { - /** - * @docid Format.currency - * @public - */ - currency?: string; - /** - * @docid Format.useCurrencyAccountingStyle - * @type boolean - * @default true - * @public - */ - useCurrencyAccountingStyle?: boolean; - /** - * @docid Format.formatter - * @public - */ - formatter?: ((value: number | Date) => string); - /** - * @docid Format.parser - * @public - */ - parser?: ((value: string) => number | Date); - /** - * @docid Format.precision - * @public - */ - precision?: number; - /** - * @docid Format.type - * @public - */ - type?: PredefinedFormat | string; -} -type ExternalFormat = - Intl.DateTimeFormatOptions | - Intl.NumberFormatOptions; - -/** - * @docid - * @type Object|Enums.Format|string|function - * @default undefined - * @section Common - * @namespace DevExpress.ui - * @public - */ -export type Format = - FormatObject | - PredefinedFormat | - string | - ((value: number | Date) => string) | - ((value: Date) => string) | - ((value: number) => string) | - ExternalFormat; +export { + /** + * @deprecated Use formatDate from common/core/localization instead + */ + formatDate, + /** + * @deprecated Use formatMessage from common/core/localization instead + */ + formatMessage, + /** + * @deprecated Use formatNumber from common/core/localization instead + */ + formatNumber, + /** + * @deprecated Use loadMessages from common/core/localization instead + */ + loadMessages, + /** + * @deprecated Use locale from common/core/localization instead + */ + locale, + /** + * @deprecated Use parseDate from common/core/localization instead + */ + parseDate, + /** + * @deprecated Use parseNumber from common/core/localization instead + */ + parseNumber, + /** + * @deprecated Use Format from common/core/localization instead + */ + Format, + /** + * @deprecated Use FormatObject from common/core/localization instead + */ + FormatObject, +} from './common/core/localization'; diff --git a/packages/devextreme/js/localization.js b/packages/devextreme/js/localization.js new file mode 100644 index 000000000000..f184d26ec496 --- /dev/null +++ b/packages/devextreme/js/localization.js @@ -0,0 +1,9 @@ +export { + formatDate, + formatMessage, + formatNumber, + loadMessages, + locale, + parseDate, + parseNumber, +} from './common/core/localization'; diff --git a/packages/devextreme/js/mobile/hide_top_overlay.d.ts b/packages/devextreme/js/mobile/hide_top_overlay.d.ts index a292db6c2e1d..12cca1f8506d 100644 --- a/packages/devextreme/js/mobile/hide_top_overlay.d.ts +++ b/packages/devextreme/js/mobile/hide_top_overlay.d.ts @@ -1,7 +1,6 @@ +import { hideTopOverlay } from '../common/core/environment'; + /** - * @docid - * @publicName hideTopOverlay() - * @namespace DevExpress - * @public + * @deprecated Use hideTopOverlay from /common/core/environment instead */ -export default function hideTopOverlay(): boolean; +export default hideTopOverlay; diff --git a/packages/devextreme/js/mobile/hide_top_overlay.js b/packages/devextreme/js/mobile/hide_top_overlay.js new file mode 100644 index 000000000000..2c333b5ede11 --- /dev/null +++ b/packages/devextreme/js/mobile/hide_top_overlay.js @@ -0,0 +1,3 @@ +import { hideTopOverlay } from '../common/core/environment'; + +export default hideTopOverlay; diff --git a/packages/devextreme/js/mobile/init_mobile_viewport.d.ts b/packages/devextreme/js/mobile/init_mobile_viewport.d.ts index f05a90738bcd..febf3469ff1c 100644 --- a/packages/devextreme/js/mobile/init_mobile_viewport.d.ts +++ b/packages/devextreme/js/mobile/init_mobile_viewport.d.ts @@ -1,7 +1,6 @@ +import { initMobileViewport } from '../common/core/environment'; + /** - * @docid utils.initMobileViewport - * @publicName initMobileViewport(options) - * @namespace DevExpress.utils - * @public + * @deprecated Use initMobileViewport from /common/core/environment instead */ -export default function initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; +export default initMobileViewport; diff --git a/packages/devextreme/js/mobile/init_mobile_viewport.js b/packages/devextreme/js/mobile/init_mobile_viewport.js new file mode 100644 index 000000000000..337826dd1c1b --- /dev/null +++ b/packages/devextreme/js/mobile/init_mobile_viewport.js @@ -0,0 +1,3 @@ +import { initMobileViewport } from '../common/core/environment'; + +export default initMobileViewport; diff --git a/packages/devextreme/js/pdf_exporter.d.ts b/packages/devextreme/js/pdf_exporter.d.ts new file mode 100644 index 000000000000..b1cdf3f7347e --- /dev/null +++ b/packages/devextreme/js/pdf_exporter.d.ts @@ -0,0 +1,34 @@ +export { + /** + * @deprecated Use DataGridCell from common/export/pdf instead + */ + DataGridCell, + /** + * @deprecated Use PdfDataGridCell from common/export/pdf instead + */ + PdfDataGridCell, + /** + * @deprecated Use Cell from common/export/pdf instead + */ + Cell, + /** + * @deprecated Use PdfExportDataGridProps from common/export/pdf instead + */ + PdfExportDataGridProps, + /** + * @deprecated Use PdfExportGanttProps from common/export/pdf instead + */ + PdfExportGanttProps, + /** + * @deprecated Use PdfExportGanttFont from common/export/pdf instead + */ + PdfExportGanttFont, + /** + * @deprecated Use exportGantt from common/export/pdf instead + */ + exportGantt, + /** + * @deprecated Use exportDataGrid from common/export/pdf instead + */ + exportDataGrid, +} from './common/export/pdf'; diff --git a/packages/devextreme/js/pdf_exporter.js b/packages/devextreme/js/pdf_exporter.js new file mode 100644 index 000000000000..f45868b39e0d --- /dev/null +++ b/packages/devextreme/js/pdf_exporter.js @@ -0,0 +1,4 @@ +export { + exportGantt, + exportDataGrid, +} from './common/export/pdf'; diff --git a/packages/devextreme/js/time_zone_utils.d.ts b/packages/devextreme/js/time_zone_utils.d.ts index 621a32cd4d41..602050f30945 100644 --- a/packages/devextreme/js/time_zone_utils.d.ts +++ b/packages/devextreme/js/time_zone_utils.d.ts @@ -1,28 +1,10 @@ -/** - * @docid - * @public - */ -export interface dxSchedulerTimeZone { - /** - * @docid - */ - id: string; - /** - * @docid - */ - offset: number; - /** - * @docid - */ - title: string; -} - -/** - * @docid utils.getTimeZones - * @publicName getTimeZones(date) - * @param1 date:Date|undefined - * @namespace DevExpress.utils - * @static - * @public - */ -export function getTimeZones(date?: Date): Array; +export { + /** + * @deprecated Use getTimeZones from common/core/environment instead + */ + getTimeZones, + /** + * @deprecated Use dxSchedulerTimeZone from common/core/environment instead + */ + dxSchedulerTimeZone, +} from './common/core/environment'; diff --git a/packages/devextreme/js/time_zone_utils.js b/packages/devextreme/js/time_zone_utils.js new file mode 100644 index 000000000000..b88a0df88d76 --- /dev/null +++ b/packages/devextreme/js/time_zone_utils.js @@ -0,0 +1 @@ +export { getTimeZones } from './common/core/environment'; diff --git a/packages/devextreme/js/ui/accordion.d.ts b/packages/devextreme/js/ui/accordion.d.ts index 5adf8da4f38d..9c0b451eb117 100644 --- a/packages/devextreme/js/ui/accordion.d.ts +++ b/packages/devextreme/js/ui/accordion.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { UserDefinedElement, DxElement, @@ -18,7 +18,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/action_sheet.d.ts b/packages/devextreme/js/ui/action_sheet.d.ts index f8415c1c7aca..240091e9b523 100644 --- a/packages/devextreme/js/ui/action_sheet.d.ts +++ b/packages/devextreme/js/ui/action_sheet.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { UserDefinedElement, } from '../core/element'; @@ -14,7 +14,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/autocomplete.d.ts b/packages/devextreme/js/ui/autocomplete.d.ts index b83d05497b9b..f62990b9d195 100644 --- a/packages/devextreme/js/ui/autocomplete.d.ts +++ b/packages/devextreme/js/ui/autocomplete.d.ts @@ -4,7 +4,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import dxDropDownList, { dxDropDownListOptions, diff --git a/packages/devextreme/js/ui/box.d.ts b/packages/devextreme/js/ui/box.d.ts index 4392472ffd22..b0afb58fac56 100644 --- a/packages/devextreme/js/ui/box.d.ts +++ b/packages/devextreme/js/ui/box.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { EventInfo, @@ -6,7 +6,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/button.d.ts b/packages/devextreme/js/ui/button.d.ts index 3ba82d0055b1..936163f6650a 100644 --- a/packages/devextreme/js/ui/button.d.ts +++ b/packages/devextreme/js/ui/button.d.ts @@ -12,7 +12,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/button_group.d.ts b/packages/devextreme/js/ui/button_group.d.ts index 9d4ce383459d..8a2c753a160a 100644 --- a/packages/devextreme/js/ui/button_group.d.ts +++ b/packages/devextreme/js/ui/button_group.d.ts @@ -13,7 +13,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/calendar.d.ts b/packages/devextreme/js/ui/calendar.d.ts index 3ed784196d27..f8427c88bb97 100644 --- a/packages/devextreme/js/ui/calendar.d.ts +++ b/packages/devextreme/js/ui/calendar.d.ts @@ -8,7 +8,7 @@ import { EventInfo, InitializedEventInfo, NativeEventInfo, -} from '../events/index'; +} from '../common/core/events'; import { template, diff --git a/packages/devextreme/js/ui/chat.d.ts b/packages/devextreme/js/ui/chat.d.ts index 4edc79502d00..a2119352e62e 100644 --- a/packages/devextreme/js/ui/chat.d.ts +++ b/packages/devextreme/js/ui/chat.d.ts @@ -4,8 +4,8 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; -import DataSource, { DataSourceLike } from '../data/data_source'; +} from '../common/core/events'; +import { DataSource, DataSourceLike } from '../common/data'; /** * @docid _ui_chat_DisposingEvent diff --git a/packages/devextreme/js/ui/check_box.d.ts b/packages/devextreme/js/ui/check_box.d.ts index 2c0d2e676847..7f3993b60f83 100644 --- a/packages/devextreme/js/ui/check_box.d.ts +++ b/packages/devextreme/js/ui/check_box.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Editor, { EditorOptions, diff --git a/packages/devextreme/js/ui/collection/ui.collection_widget.base.d.ts b/packages/devextreme/js/ui/collection/ui.collection_widget.base.d.ts index ee2df9161cfe..8801dfb960b9 100644 --- a/packages/devextreme/js/ui/collection/ui.collection_widget.base.d.ts +++ b/packages/devextreme/js/ui/collection/ui.collection_widget.base.d.ts @@ -7,14 +7,14 @@ import { template, } from '../../core/templates/template'; -import DataSource, { DataSourceLike } from '../../data/data_source'; +import { DataSource, DataSourceLike } from '../../common/data'; import { EventInfo, NativeEventInfo, ItemInfo, AsyncCancelable, -} from '../../events/index'; +} from '../../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/color_box.d.ts b/packages/devextreme/js/ui/color_box.d.ts index 35b9855eb355..79710ceff59e 100644 --- a/packages/devextreme/js/ui/color_box.d.ts +++ b/packages/devextreme/js/ui/color_box.d.ts @@ -8,7 +8,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { template, diff --git a/packages/devextreme/js/ui/context_menu.d.ts b/packages/devextreme/js/ui/context_menu.d.ts index b46cb82c015e..143bf7244ba5 100644 --- a/packages/devextreme/js/ui/context_menu.d.ts +++ b/packages/devextreme/js/ui/context_menu.d.ts @@ -1,7 +1,7 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { PositionConfig, -} from '../animation/position'; +} from '../common/core/animation'; import { UserDefinedElement, @@ -19,7 +19,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import dxMenuBase, { dxMenuBaseOptions, diff --git a/packages/devextreme/js/ui/context_menu/ui.menu_base.d.ts b/packages/devextreme/js/ui/context_menu/ui.menu_base.d.ts index aaf33396145e..5437b88da685 100644 --- a/packages/devextreme/js/ui/context_menu/ui.menu_base.d.ts +++ b/packages/devextreme/js/ui/context_menu/ui.menu_base.d.ts @@ -1,7 +1,7 @@ -import { DataSourceLike } from '../../data/data_source'; +import { DataSourceLike } from '../../common/data'; import { AnimationConfig, -} from '../../animation/fx'; +} from '../../common/core/animation'; import HierarchicalCollectionWidget, { HierarchicalCollectionWidgetOptions, diff --git a/packages/devextreme/js/ui/data_grid.d.ts b/packages/devextreme/js/ui/data_grid.d.ts index b8a13cf38af9..de95a0c20807 100644 --- a/packages/devextreme/js/ui/data_grid.d.ts +++ b/packages/devextreme/js/ui/data_grid.d.ts @@ -1,5 +1,4 @@ -import DataSource, { -} from '../data/data_source'; +import { DataSource } from '../common/data'; import { UserDefinedElement, @@ -21,7 +20,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { dxToolbarItem, diff --git a/packages/devextreme/js/ui/date_box.d.ts b/packages/devextreme/js/ui/date_box.d.ts index f40473eb31aa..b140b0ef0201 100644 --- a/packages/devextreme/js/ui/date_box.d.ts +++ b/packages/devextreme/js/ui/date_box.d.ts @@ -4,7 +4,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { ComponentDisabledDate, diff --git a/packages/devextreme/js/ui/date_range_box.d.ts b/packages/devextreme/js/ui/date_range_box.d.ts index 4e32102d3958..17198fb90abf 100644 --- a/packages/devextreme/js/ui/date_range_box.d.ts +++ b/packages/devextreme/js/ui/date_range_box.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { DxElement, diff --git a/packages/devextreme/js/ui/defer_rendering.d.ts b/packages/devextreme/js/ui/defer_rendering.d.ts index abb81eb76620..1be09a2d60c5 100644 --- a/packages/devextreme/js/ui/defer_rendering.d.ts +++ b/packages/devextreme/js/ui/defer_rendering.d.ts @@ -1,12 +1,12 @@ import { AnimationConfig, -} from '../animation/fx'; +} from '../common/core/animation'; import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/diagram.d.ts b/packages/devextreme/js/ui/diagram.d.ts index 4bce2a60510c..eb8c8074ca5b 100644 --- a/packages/devextreme/js/ui/diagram.d.ts +++ b/packages/devextreme/js/ui/diagram.d.ts @@ -1,4 +1,4 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { DxElement, @@ -12,7 +12,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/diagram/diagram.commands_manager.js b/packages/devextreme/js/ui/diagram/diagram.commands_manager.js index 8bc38b7db5a5..f629f72ec95d 100644 --- a/packages/devextreme/js/ui/diagram/diagram.commands_manager.js +++ b/packages/devextreme/js/ui/diagram/diagram.commands_manager.js @@ -3,7 +3,7 @@ import { fileSaver } from '../../exporter/file_saver'; import { isFunction } from '../../core/utils/type'; import { getWindow } from '../../core/utils/window'; import { extend } from '../../core/utils/extend'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; const SEPARATOR = 'separator'; const SEPARATOR_COMMAND = { widget: SEPARATOR }; diff --git a/packages/devextreme/js/ui/diagram/diagram.items_option.js b/packages/devextreme/js/ui/diagram/diagram.items_option.js index b1a2bc3c9851..2ae6694bdbe3 100644 --- a/packages/devextreme/js/ui/diagram/diagram.items_option.js +++ b/packages/devextreme/js/ui/diagram/diagram.items_option.js @@ -1,6 +1,6 @@ import { extend } from '../../core/utils/extend'; import { Component } from '../../core/component'; -import DataHelperMixin from '../../data_helper'; +import DataHelperMixin from '../../common/data/data_helper'; const ItemsOptionBase = Component.inherit({}).include(DataHelperMixin); diff --git a/packages/devextreme/js/ui/diagram/diagram.toolbox_manager.js b/packages/devextreme/js/ui/diagram/diagram.toolbox_manager.js index ccc9541dc75f..a63f31fbf31f 100644 --- a/packages/devextreme/js/ui/diagram/diagram.toolbox_manager.js +++ b/packages/devextreme/js/ui/diagram/diagram.toolbox_manager.js @@ -1,4 +1,4 @@ -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; const DiagramToolboxManager = { getDefaultGroups() { diff --git a/packages/devextreme/js/ui/diagram/ui.diagram.dialog_manager.js b/packages/devextreme/js/ui/diagram/ui.diagram.dialog_manager.js index 5142203af7a8..b148918f36cb 100644 --- a/packages/devextreme/js/ui/diagram/ui.diagram.dialog_manager.js +++ b/packages/devextreme/js/ui/diagram/ui.diagram.dialog_manager.js @@ -1,6 +1,6 @@ import $ from '../../core/renderer'; import { getDiagram } from './diagram.importer'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import FileUploader from '../file_uploader'; import { getWindow } from '../../core/utils/window'; diff --git a/packages/devextreme/js/ui/diagram/ui.diagram.dialogs.js b/packages/devextreme/js/ui/diagram/ui.diagram.dialogs.js index d1b45ff7851f..63aed4ebbf5d 100644 --- a/packages/devextreme/js/ui/diagram/ui.diagram.dialogs.js +++ b/packages/devextreme/js/ui/diagram/ui.diagram.dialogs.js @@ -1,6 +1,6 @@ import $ from '../../core/renderer'; import Widget from '../widget/ui.widget'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import Popup from '../popup/ui.popup'; import { extend } from '../../core/utils/extend'; diff --git a/packages/devextreme/js/ui/diagram/ui.diagram.js b/packages/devextreme/js/ui/diagram/ui.diagram.js index d0bb7bfd93a5..d6fcf75e9385 100644 --- a/packages/devextreme/js/ui/diagram/ui.diagram.js +++ b/packages/devextreme/js/ui/diagram/ui.diagram.js @@ -6,14 +6,14 @@ import registerComponent from '../../core/component_registrator'; import { extend } from '../../core/utils/extend'; import { isFunction, isDefined } from '../../core/utils/type'; import { compileSetter, compileGetter } from '../../core/utils/data'; -import positionUtils from '../../animation/position'; +import positionUtils from '../../common/core/animation/position'; import { getDiagram } from './diagram.importer'; import { getWindow, hasWindow } from '../../core/utils/window'; import { getPublicElement } from '../../core/element'; -import eventsEngine from '../../events/core/events_engine'; -import { addNamespace } from '../../events/utils/index'; -import messageLocalization from '../../localization/message'; -import numberLocalization from '../../localization/number'; +import eventsEngine from '../../common/core/events/core/events_engine'; +import { addNamespace } from '../../common/core/events/utils/index'; +import messageLocalization from '../../common/core/localization/message'; +import numberLocalization from '../../common/core/localization/number'; import * as zIndexPool from '../../__internal/ui/overlay/m_z_index'; import Overlay from '../overlay/ui.overlay'; diff --git a/packages/devextreme/js/ui/diagram/ui.diagram.panel.js b/packages/devextreme/js/ui/diagram/ui.diagram.panel.js index 1c80f4e69635..437d008446ee 100644 --- a/packages/devextreme/js/ui/diagram/ui.diagram.panel.js +++ b/packages/devextreme/js/ui/diagram/ui.diagram.panel.js @@ -1,8 +1,8 @@ import $ from '../../core/renderer'; import Widget from '../widget/ui.widget'; -import eventsEngine from '../../events/core/events_engine'; -import { addNamespace } from '../../events/utils/index'; -import pointerEvents from '../../events/pointer'; +import eventsEngine from '../../common/core/events/core/events_engine'; +import { addNamespace } from '../../common/core/events/utils/index'; +import pointerEvents from '../../common/core/events/pointer'; const POINTERUP_EVENT_NAME = addNamespace(pointerEvents.up, 'dxDiagramPanel'); const PREVENT_REFOCUS_SELECTOR = '.dx-textbox'; diff --git a/packages/devextreme/js/ui/diagram/ui.diagram.toolbox.js b/packages/devextreme/js/ui/diagram/ui.diagram.toolbox.js index 6d2111f7e48b..58c444b77add 100644 --- a/packages/devextreme/js/ui/diagram/ui.diagram.toolbox.js +++ b/packages/devextreme/js/ui/diagram/ui.diagram.toolbox.js @@ -3,7 +3,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; import { hasWindow } from '../../core/utils/window'; import { Deferred } from '../../core/utils/deferred'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import TextBox from '../text_box'; import Accordion from '../accordion'; import ScrollView from '../scroll_view'; diff --git a/packages/devextreme/js/ui/draggable.d.ts b/packages/devextreme/js/ui/draggable.d.ts index 261ff15d9d5c..029d65817824 100644 --- a/packages/devextreme/js/ui/draggable.d.ts +++ b/packages/devextreme/js/ui/draggable.d.ts @@ -17,7 +17,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxSortable from './sortable'; diff --git a/packages/devextreme/js/ui/drawer.d.ts b/packages/devextreme/js/ui/drawer.d.ts index 4581c95ace2e..82621f51eddf 100644 --- a/packages/devextreme/js/ui/drawer.d.ts +++ b/packages/devextreme/js/ui/drawer.d.ts @@ -15,7 +15,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/drop_down_box.d.ts b/packages/devextreme/js/ui/drop_down_box.d.ts index fbd490fadcc8..288f96183971 100644 --- a/packages/devextreme/js/ui/drop_down_box.d.ts +++ b/packages/devextreme/js/ui/drop_down_box.d.ts @@ -7,14 +7,14 @@ import { template, } from '../core/templates/template'; -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxDropDownEditor, { dxDropDownEditorOptions, diff --git a/packages/devextreme/js/ui/drop_down_button.d.ts b/packages/devextreme/js/ui/drop_down_button.d.ts index 100ddc8eb681..838fa06356e9 100644 --- a/packages/devextreme/js/ui/drop_down_button.d.ts +++ b/packages/devextreme/js/ui/drop_down_button.d.ts @@ -16,14 +16,14 @@ import { template, } from '../core/templates/template'; -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Item as dxListItem, diff --git a/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_editor.d.ts b/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_editor.d.ts index dd6084994fe5..b80fd4af50ee 100644 --- a/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_editor.d.ts +++ b/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_editor.d.ts @@ -21,7 +21,7 @@ import { import { EventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import { ApplyValueMode, diff --git a/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_list.d.ts b/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_list.d.ts index 5f7e8cf0e7ab..2275d2d27399 100644 --- a/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_list.d.ts +++ b/packages/devextreme/js/ui/drop_down_editor/ui.drop_down_list.d.ts @@ -7,13 +7,13 @@ import { template, } from '../../core/templates/template'; -import DataSource from '../../data/data_source'; +import { DataSource } from '../../common/data'; import { EventInfo, NativeEventInfo, ItemInfo, -} from '../../events/index'; +} from '../../common/core/events'; import { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/editor/editor.d.ts b/packages/devextreme/js/ui/editor/editor.d.ts index d73494dde913..2083bbf82587 100644 --- a/packages/devextreme/js/ui/editor/editor.d.ts +++ b/packages/devextreme/js/ui/editor/editor.d.ts @@ -1,6 +1,6 @@ import { NativeEventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/editor/ui.data_expression.d.ts b/packages/devextreme/js/ui/editor/ui.data_expression.d.ts index 85bf54f884a8..840360abf7f4 100644 --- a/packages/devextreme/js/ui/editor/ui.data_expression.d.ts +++ b/packages/devextreme/js/ui/editor/ui.data_expression.d.ts @@ -7,7 +7,7 @@ import { template, } from '../../core/templates/template'; -import DataSource, { DataSourceLike } from '../../data/data_source'; +import { DataSource, DataSourceLike } from '../../common/data'; import { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/file_manager.d.ts b/packages/devextreme/js/ui/file_manager.d.ts index cb068f2980d5..fc48eb618911 100644 --- a/packages/devextreme/js/ui/file_manager.d.ts +++ b/packages/devextreme/js/ui/file_manager.d.ts @@ -13,9 +13,9 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; -import FileSystemItem from '../file_management/file_system_item'; +import { FileSystemItem } from '../common/file_management'; import { Item as dxContextMenuItem, diff --git a/packages/devextreme/js/ui/file_manager/file_items_controller.js b/packages/devextreme/js/ui/file_manager/file_items_controller.js index 449bd85be5b8..2ab5a32c8eb8 100644 --- a/packages/devextreme/js/ui/file_manager/file_items_controller.js +++ b/packages/devextreme/js/ui/file_manager/file_items_controller.js @@ -1,11 +1,18 @@ -import FileSystemProviderBase from '../../file_management/provider_base'; -import FileSystemItem from '../../file_management/file_system_item'; -import ObjectFileSystemProvider from '../../file_management/object_provider'; -import RemoteFileSystemProvider from '../../file_management/remote_provider'; -import CustomFileSystemProvider from '../../file_management/custom_provider'; -import FileSystemError from '../../file_management/error'; -import ErrorCode from '../../file_management/error_codes'; -import { pathCombine, getEscapedFileName, getPathParts, getFileExtension } from '../../file_management/utils'; +import { + FileSystemProviderBase, + FileSystemItem, + ObjectFileSystemProvider, + RemoteFileSystemProvider, + CustomFileSystemProvider, + FileSystemError, +} from '../../common/file_management'; +import ErrorCode from '../../common/file_management/error_codes'; +import { + pathCombine, + getEscapedFileName, + getPathParts, + getFileExtension, +} from '../../common/file_management/utils'; import { whenSome } from './ui.file_manager.common'; import { Deferred, when } from '../../core/utils/deferred'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.command_manager.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.command_manager.js index 1237f4116aa8..f36384de22d0 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.command_manager.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.command_manager.js @@ -1,7 +1,7 @@ import { extend } from '../../core/utils/extend'; import { each } from '../../core/utils/iterator'; import { isString } from '../../core/utils/type'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; export const defaultPermissions = { create: false, diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.delete_item.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.delete_item.js index b0a72f413ed4..506a2a1f6bf5 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.delete_item.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.delete_item.js @@ -1,7 +1,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import ScrollView from '../scroll_view'; import FileManagerDialogBase from './ui.file_manager.dialog'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.folder_chooser.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.folder_chooser.js index 3be7c3c0b8f6..9b65622d2bdb 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.folder_chooser.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.folder_chooser.js @@ -1,7 +1,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import { getMapFromObject } from './ui.file_manager.common'; import FileManagerDialogBase from './ui.file_manager.dialog'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.js index bd8d77ee1966..0cc00154b8a1 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog.js @@ -1,7 +1,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; import { isDefined } from '../../core/utils/type'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import Widget from '../widget/ui.widget'; import Popup from '../popup/ui.popup'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog_manager.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog_manager.js index d731aec0b34f..aae402052bd5 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog_manager.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.dialog_manager.js @@ -1,7 +1,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import FileManagerNameEditorDialog from './ui.file_manager.dialog.name_editor'; import FileManagerFolderChooserDialog from './ui.file_manager.dialog.folder_chooser'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.editing.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.editing.js index 9991c9357a41..6e35258b626f 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.editing.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.editing.js @@ -5,7 +5,7 @@ import { each } from '../../core/utils/iterator'; import { format } from '../../core/utils/string'; import { isDefined } from '../../core/utils/type'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import Widget from '../widget/ui.widget'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.details.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.details.js index 2fffacec6c98..4a361c39cdd7 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.details.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.details.js @@ -2,7 +2,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; import { extendAttributes, getDisplayFileSize } from './ui.file_manager.common'; import { isString, isFunction, isDefined } from '../../core/utils/type'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; // NOTE: Using the "public" export here for the theme-builder deps check import DataGrid from '../../ui/data_grid'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.js index 87257e5df141..8985811a3d7a 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.js @@ -1,13 +1,13 @@ import { extend } from '../../core/utils/extend'; import { when } from '../../core/utils/deferred'; import { hasWindow } from '../../core/utils/window'; -import { name as dblClickName } from '../../events/double_click'; -import { addNamespace } from '../../events/utils/index'; -import eventsEngine from '../../events/core/events_engine'; +import { name as dblClickName } from '../../common/core/events/double_click'; +import { addNamespace } from '../../common/core/events/utils/index'; +import eventsEngine from '../../common/core/events/core/events_engine'; import { getImageContainer } from '../../core/utils/icon'; import devices from '../../core/devices'; -import CustomStore from '../../data/custom_store'; +import { CustomStore } from '../../common/data'; import Widget from '../widget/ui.widget'; const FILE_MANAGER_FILES_VIEW_CLASS = 'dx-filemanager-files-view'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.thumbnails.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.thumbnails.js index f3ab8a3687f0..3b4cd4ceb621 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.thumbnails.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.item_list.thumbnails.js @@ -2,11 +2,11 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; import { isDefined } from '../../core/utils/type'; import { Deferred } from '../../core/utils/deferred'; -import eventsEngine from '../../events/core/events_engine'; -import { addNamespace } from '../../events/utils/index'; -import { name as contextMenuEventName } from '../../events/contextmenu'; +import eventsEngine from '../../common/core/events/core/events_engine'; +import { addNamespace } from '../../common/core/events/utils/index'; +import { name as contextMenuEventName } from '../../common/core/events/contextmenu'; import { getDisplayFileSize } from './ui.file_manager.common'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import FileManagerThumbnailListBox from './ui.file_manager.items_list.thumbnails.list_box'; import FileManagerItemListBase from './ui.file_manager.item_list'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.items_list.thumbnails.list_box.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.items_list.thumbnails.list_box.js index 72a2f9ab816f..72c087b05dd6 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.items_list.thumbnails.list_box.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.items_list.thumbnails.list_box.js @@ -4,9 +4,9 @@ import { extend } from '../../core/utils/extend'; import { isDefined } from '../../core/utils/type'; import { Deferred, when } from '../../core/utils/deferred'; -import holdEvent from '../../events/hold'; -import { addNamespace, isCommandKeyPressed } from '../../events/utils/index'; -import eventsEngine from '../../events/core/events_engine'; +import holdEvent from '../../common/core/events/hold'; +import { addNamespace, isCommandKeyPressed } from '../../common/core/events/utils/index'; +import eventsEngine from '../../common/core/events/core/events_engine'; import { BindableTemplate } from '../../core/templates/bindable_template'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.js index e63c6cbf3421..f10f3472a1df 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.js @@ -4,7 +4,7 @@ import { isDefined, isEmptyObject, isFunction, type } from '../../core/utils/typ import { Deferred, when } from '../../core/utils/deferred'; import { ensureDefined, equalByValue } from '../../core/utils/common'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import registerComponent from '../../core/component_registrator'; import Widget from '../widget/ui.widget'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.messages.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.messages.js index ed2f8e56831f..1fa72bf914e0 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.messages.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.messages.js @@ -1,5 +1,5 @@ -import messageLocalization from '../../localization/message'; -import ErrorCode from '../../file_management/error_codes'; +import messageLocalization from '../../common/core/localization/message'; +import ErrorCode from '../../common/file_management/error_codes'; export const FileManagerMessages = { get: (errorCode, args) => { diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.notification.progress_panel.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.notification.progress_panel.js index e45c45790920..2a5f02aefa4e 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.notification.progress_panel.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.notification.progress_panel.js @@ -2,7 +2,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; import { ensureDefined } from '../../core/utils/common'; import { getImageContainer } from '../../core/utils/icon'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import Widget from '../widget/ui.widget'; import ProgressBar from '../progress_bar'; diff --git a/packages/devextreme/js/ui/file_manager/ui.file_manager.toolbar.js b/packages/devextreme/js/ui/file_manager/ui.file_manager.toolbar.js index 59d87bb01862..79f3efc7c79c 100644 --- a/packages/devextreme/js/ui/file_manager/ui.file_manager.toolbar.js +++ b/packages/devextreme/js/ui/file_manager/ui.file_manager.toolbar.js @@ -3,7 +3,7 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; import { isDefined, isString } from '../../core/utils/type'; import { ensureDefined } from '../../core/utils/common'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import { extendAttributes } from './ui.file_manager.common'; import { isCompact, isFluent, isMaterial } from '../themes'; diff --git a/packages/devextreme/js/ui/file_uploader.d.ts b/packages/devextreme/js/ui/file_uploader.d.ts index 1e9ff69045fa..06375ae3376b 100644 --- a/packages/devextreme/js/ui/file_uploader.d.ts +++ b/packages/devextreme/js/ui/file_uploader.d.ts @@ -8,13 +8,13 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Editor, { EditorOptions, } from './editor/editor'; -import UploadInfo from '../file_management/upload_info'; +import { UploadInfo } from '../common/file_management'; /** @public */ export type FileUploadMode = 'instantly' | 'useButtons' | 'useForm'; diff --git a/packages/devextreme/js/ui/filter_builder.d.ts b/packages/devextreme/js/ui/filter_builder.d.ts index 8001a75b48c7..bd1ba1b7dc75 100644 --- a/packages/devextreme/js/ui/filter_builder.d.ts +++ b/packages/devextreme/js/ui/filter_builder.d.ts @@ -1,4 +1,4 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { UserDefinedElement, DxElement, @@ -13,7 +13,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/form.d.ts b/packages/devextreme/js/ui/form.d.ts index f59e50bc8acd..b2547286e6dd 100644 --- a/packages/devextreme/js/ui/form.d.ts +++ b/packages/devextreme/js/ui/form.d.ts @@ -15,7 +15,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxButton, { dxButtonOptions, diff --git a/packages/devextreme/js/ui/gallery.d.ts b/packages/devextreme/js/ui/gallery.d.ts index c4e051936c5e..650217eff86e 100644 --- a/packages/devextreme/js/ui/gallery.d.ts +++ b/packages/devextreme/js/ui/gallery.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { DxPromise, } from '../core/utils/deferred'; @@ -9,7 +9,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/gantt.d.ts b/packages/devextreme/js/ui/gantt.d.ts index 97e0caa5a4dc..eb9314a3bbdd 100644 --- a/packages/devextreme/js/ui/gantt.d.ts +++ b/packages/devextreme/js/ui/gantt.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { UserDefinedElement, DxElement, @@ -11,7 +11,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Column as TreeListColumn, diff --git a/packages/devextreme/js/ui/gantt/ui.gantt.bars.js b/packages/devextreme/js/ui/gantt/ui.gantt.bars.js index cbb62d2e9031..28d6a889c58c 100644 --- a/packages/devextreme/js/ui/gantt/ui.gantt.bars.js +++ b/packages/devextreme/js/ui/gantt/ui.gantt.bars.js @@ -1,7 +1,7 @@ import $ from '../../core/renderer'; import ToolbarMenu from '../toolbar'; import ContextMenu from '../context_menu'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import { extend } from '../../core/utils/extend'; const TOOLBAR_SEPARATOR_CLASS = 'dx-gantt-toolbar-separator'; diff --git a/packages/devextreme/js/ui/gantt/ui.gantt.data.option.js b/packages/devextreme/js/ui/gantt/ui.gantt.data.option.js index 2e0ded84f6c6..8076b7d23e39 100644 --- a/packages/devextreme/js/ui/gantt/ui.gantt.data.option.js +++ b/packages/devextreme/js/ui/gantt/ui.gantt.data.option.js @@ -1,5 +1,5 @@ import { Component } from '../../core/component'; -import DataHelperMixin from '../../data_helper'; +import DataHelperMixin from '../../common/data/data_helper'; class DataOption extends Component { constructor(optionName, getLoadPanel, dataSourceChangedCallback) { diff --git a/packages/devextreme/js/ui/gantt/ui.gantt.dialogs.js b/packages/devextreme/js/ui/gantt/ui.gantt.dialogs.js index a76e4335f2d6..390c582e843a 100644 --- a/packages/devextreme/js/ui/gantt/ui.gantt.dialogs.js +++ b/packages/devextreme/js/ui/gantt/ui.gantt.dialogs.js @@ -2,8 +2,8 @@ import Popup from '../popup/ui.popup'; import Form from '../form'; import '../tag_box'; import '../radio_group'; -import dateLocalization from '../../localization/date'; -import messageLocalization from '../../localization/message'; +import dateLocalization from '../../common/core/localization/date'; +import messageLocalization from '../../common/core/localization/message'; import '../list_light'; import '../../__internal/ui/list/modules/m_deleting'; diff --git a/packages/devextreme/js/ui/gantt/ui.gantt.export_helper.js b/packages/devextreme/js/ui/gantt/ui.gantt.export_helper.js index f38c0a3ef829..b69f447846d3 100644 --- a/packages/devextreme/js/ui/gantt/ui.gantt.export_helper.js +++ b/packages/devextreme/js/ui/gantt/ui.gantt.export_helper.js @@ -1,8 +1,8 @@ import { getWindow } from '../../core/utils/window'; import gridCoreUtils from '../../__internal/grids/grid_core/m_utils'; import { isDate, isDefined, isNumeric } from '../../core/utils/type'; -import dateLocalization from '../../localization/date'; -import numberLocalization from '../../localization/number'; +import dateLocalization from '../../common/core/localization/date'; +import numberLocalization from '../../common/core/localization/number'; const window = getWindow(); const TREELIST_EMPTY_SPACE = 'dx-treelist-empty-space'; diff --git a/packages/devextreme/js/ui/gantt/ui.gantt.helper.js b/packages/devextreme/js/ui/gantt/ui.gantt.helper.js index 8fc9506795bf..e9895f0502d6 100644 --- a/packages/devextreme/js/ui/gantt/ui.gantt.helper.js +++ b/packages/devextreme/js/ui/gantt/ui.gantt.helper.js @@ -1,6 +1,6 @@ import { compileGetter, compileSetter } from '../../core/utils/data'; import { isFunction } from '../../core/utils/type'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; export const GanttHelper = { diff --git a/packages/devextreme/js/ui/gantt/ui.gantt.treelist.js b/packages/devextreme/js/ui/gantt/ui.gantt.treelist.js index 4e51cb597724..2203e0cf5911 100644 --- a/packages/devextreme/js/ui/gantt/ui.gantt.treelist.js +++ b/packages/devextreme/js/ui/gantt/ui.gantt.treelist.js @@ -4,8 +4,7 @@ import dxTreeList from '../tree_list'; import { getBoundingRect } from '../../core/utils/position'; import { isDefined } from '../../core/utils/type'; import { GanttHelper } from './ui.gantt.helper'; -import { DataSource } from '../../data/data_source/data_source'; -import ArrayStore from '../../data/array_store'; +import { DataSource, ArrayStore } from '../../common/data'; import { compileGetter } from '../../core/utils/data'; import { GanttTreeListNodesState } from './ui.gantt.treelist.nodes_state'; diff --git a/packages/devextreme/js/ui/gantt/ui.gantt.view.js b/packages/devextreme/js/ui/gantt/ui.gantt.view.js index 837d04d55a18..27fe3aaabde1 100644 --- a/packages/devextreme/js/ui/gantt/ui.gantt.view.js +++ b/packages/devextreme/js/ui/gantt/ui.gantt.view.js @@ -2,12 +2,12 @@ import $ from '../../core/renderer'; import Widget from '../widget/ui.widget'; import { getGanttViewCore } from './gantt_importer'; import { TaskAreaContainer } from './ui.gantt.task.area.container'; -import dateLocalization from '../../localization/date'; +import dateLocalization from '../../common/core/localization/date'; import { isDefined } from '../../core/utils/type'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import { format } from '../../core/utils/string'; -import coreLocalization from '../../localization/core'; -import { requestAnimationFrame, cancelAnimationFrame } from '../../animation/frame'; +import coreLocalization from '../../common/core/localization/core'; +import { requestAnimationFrame, cancelAnimationFrame } from '../../common/core/animation/frame'; const visualStateKey = 'visualState'; diff --git a/packages/devextreme/js/ui/html_editor.d.ts b/packages/devextreme/js/ui/html_editor.d.ts index a17504cff560..199b4f1670df 100644 --- a/packages/devextreme/js/ui/html_editor.d.ts +++ b/packages/devextreme/js/ui/html_editor.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { UserDefinedElement, DxElement, @@ -13,7 +13,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { EditorStyle, diff --git a/packages/devextreme/js/ui/list.d.ts b/packages/devextreme/js/ui/list.d.ts index dc278622f40f..9ffc5956153e 100644 --- a/packages/devextreme/js/ui/list.d.ts +++ b/packages/devextreme/js/ui/list.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { UserDefinedElement, DxElement, @@ -18,7 +18,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/load_indicator.d.ts b/packages/devextreme/js/ui/load_indicator.d.ts index 59187c5bece3..4836f99b6b8c 100644 --- a/packages/devextreme/js/ui/load_indicator.d.ts +++ b/packages/devextreme/js/ui/load_indicator.d.ts @@ -2,7 +2,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/load_panel.d.ts b/packages/devextreme/js/ui/load_panel.d.ts index 5392eeee8788..c76f66bc9be2 100644 --- a/packages/devextreme/js/ui/load_panel.d.ts +++ b/packages/devextreme/js/ui/load_panel.d.ts @@ -7,15 +7,12 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { AnimationConfig, -} from '../animation/fx'; - -import { PositionConfig, -} from '../animation/position'; +} from '../common/core/animation'; import dxOverlay, { dxOverlayAnimation, diff --git a/packages/devextreme/js/ui/lookup.d.ts b/packages/devextreme/js/ui/lookup.d.ts index 934a12d0c8d7..6de3c2d17016 100644 --- a/packages/devextreme/js/ui/lookup.d.ts +++ b/packages/devextreme/js/ui/lookup.d.ts @@ -13,7 +13,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/map.d.ts b/packages/devextreme/js/ui/map.d.ts index 29899a7c5388..159188f2b6a6 100644 --- a/packages/devextreme/js/ui/map.d.ts +++ b/packages/devextreme/js/ui/map.d.ts @@ -7,7 +7,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/menu.d.ts b/packages/devextreme/js/ui/menu.d.ts index 5eda089cabe1..2fc60f73cf8a 100644 --- a/packages/devextreme/js/ui/menu.d.ts +++ b/packages/devextreme/js/ui/menu.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { DxElement, } from '../core/element'; @@ -10,7 +10,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/multi_view.d.ts b/packages/devextreme/js/ui/multi_view.d.ts index 0e08bdbdd4f8..5109770c3349 100644 --- a/packages/devextreme/js/ui/multi_view.d.ts +++ b/packages/devextreme/js/ui/multi_view.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { EventInfo, @@ -6,7 +6,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/number_box.d.ts b/packages/devextreme/js/ui/number_box.d.ts index 800db028e92b..dead674ae10d 100644 --- a/packages/devextreme/js/ui/number_box.d.ts +++ b/packages/devextreme/js/ui/number_box.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { TextEditorButton, diff --git a/packages/devextreme/js/ui/overlay.d.ts b/packages/devextreme/js/ui/overlay.d.ts index e27a254f215c..4d1bceda02f9 100644 --- a/packages/devextreme/js/ui/overlay.d.ts +++ b/packages/devextreme/js/ui/overlay.d.ts @@ -1,6 +1,6 @@ import { AnimationConfig, -} from '../animation/fx'; +} from '../common/core/animation'; import { UserDefinedElement, @@ -19,7 +19,7 @@ import { DxEvent, Cancelable, EventInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/pivot_grid.d.ts b/packages/devextreme/js/ui/pivot_grid.d.ts index cda99d3eaed4..9c8840a8b30e 100644 --- a/packages/devextreme/js/ui/pivot_grid.d.ts +++ b/packages/devextreme/js/ui/pivot_grid.d.ts @@ -8,7 +8,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import PivotGridDataSource, { Field, diff --git a/packages/devextreme/js/ui/pivot_grid/data_source.d.ts b/packages/devextreme/js/ui/pivot_grid/data_source.d.ts index ae1f66d4fffd..f6cb506ead28 100644 --- a/packages/devextreme/js/ui/pivot_grid/data_source.d.ts +++ b/packages/devextreme/js/ui/pivot_grid/data_source.d.ts @@ -3,11 +3,10 @@ import { } from '../../core/utils/deferred'; import { + DataSource, Store, StoreOptions, -} from '../../data/index'; - -import DataSource from '../../data/data_source'; +} from '../../common/data'; import { Format, diff --git a/packages/devextreme/js/ui/pivot_grid_field_chooser.d.ts b/packages/devextreme/js/ui/pivot_grid_field_chooser.d.ts index 349e043f27dd..6a29c3621081 100644 --- a/packages/devextreme/js/ui/pivot_grid_field_chooser.d.ts +++ b/packages/devextreme/js/ui/pivot_grid_field_chooser.d.ts @@ -3,7 +3,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import PivotGridDataSource, { Field, diff --git a/packages/devextreme/js/ui/popover.d.ts b/packages/devextreme/js/ui/popover.d.ts index 6020623dad31..1702f9d83c19 100644 --- a/packages/devextreme/js/ui/popover.d.ts +++ b/packages/devextreme/js/ui/popover.d.ts @@ -1,10 +1,7 @@ import { AnimationConfig, -} from '../animation/fx'; - -import { PositionConfig, -} from '../animation/position'; +} from '../common/core/animation'; import { UserDefinedElement, @@ -20,7 +17,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxPopup, { dxPopupAnimation, diff --git a/packages/devextreme/js/ui/popup.d.ts b/packages/devextreme/js/ui/popup.d.ts index 3cf795b168bd..452bde669570 100644 --- a/packages/devextreme/js/ui/popup.d.ts +++ b/packages/devextreme/js/ui/popup.d.ts @@ -1,10 +1,7 @@ import { AnimationConfig, -} from '../animation/fx'; - -import { PositionConfig, -} from '../animation/position'; +} from '../common/core/animation'; import { UserDefinedElement, @@ -21,7 +18,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Item as dxToolbarItem, diff --git a/packages/devextreme/js/ui/progress_bar.d.ts b/packages/devextreme/js/ui/progress_bar.d.ts index e840b6ce2de1..6c308b0c7b12 100644 --- a/packages/devextreme/js/ui/progress_bar.d.ts +++ b/packages/devextreme/js/ui/progress_bar.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/radio_group.d.ts b/packages/devextreme/js/ui/radio_group.d.ts index 699adbdde305..e93f9b414096 100644 --- a/packages/devextreme/js/ui/radio_group.d.ts +++ b/packages/devextreme/js/ui/radio_group.d.ts @@ -1,11 +1,11 @@ -import DataSource from '../data/data_source'; +import { DataSource } from '../common/data'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Editor, { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/range_slider.d.ts b/packages/devextreme/js/ui/range_slider.d.ts index a0e8e4167909..3eef9e2964b3 100644 --- a/packages/devextreme/js/ui/range_slider.d.ts +++ b/packages/devextreme/js/ui/range_slider.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/recurrence_editor.d.ts b/packages/devextreme/js/ui/recurrence_editor.d.ts index dc4fa28f503c..aacb84fefb02 100644 --- a/packages/devextreme/js/ui/recurrence_editor.d.ts +++ b/packages/devextreme/js/ui/recurrence_editor.d.ts @@ -7,7 +7,7 @@ import { InitializedEventInfo, ChangedOptionInfo, NativeEventInfo, -} from '../events/index'; +} from '../common/core/events'; /** * @docid _ui_recurrence_editor_ContentReadyEvent diff --git a/packages/devextreme/js/ui/resizable.d.ts b/packages/devextreme/js/ui/resizable.d.ts index 758dcce5f9c6..4544015da700 100644 --- a/packages/devextreme/js/ui/resizable.d.ts +++ b/packages/devextreme/js/ui/resizable.d.ts @@ -8,7 +8,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; /** @public */ export type ResizeHandle = 'bottom' | 'left' | 'right' | 'top' | 'all'; diff --git a/packages/devextreme/js/ui/responsive_box.d.ts b/packages/devextreme/js/ui/responsive_box.d.ts index ab8ad419ab06..fbbbd777f042 100644 --- a/packages/devextreme/js/ui/responsive_box.d.ts +++ b/packages/devextreme/js/ui/responsive_box.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { EventInfo, @@ -6,7 +6,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/scheduler.d.ts b/packages/devextreme/js/ui/scheduler.d.ts index a37a90eb1e22..8bf58d2b16e0 100644 --- a/packages/devextreme/js/ui/scheduler.d.ts +++ b/packages/devextreme/js/ui/scheduler.d.ts @@ -7,7 +7,7 @@ import { template, } from '../core/templates/template'; -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { DxEvent, @@ -16,7 +16,7 @@ import { InitializedEventInfo, ChangedOptionInfo, Cancelable, -} from '../events/index'; +} from '../common/core/events'; import { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/scroll_view.d.ts b/packages/devextreme/js/ui/scroll_view.d.ts index c108118780e4..00bc3601f549 100644 --- a/packages/devextreme/js/ui/scroll_view.d.ts +++ b/packages/devextreme/js/ui/scroll_view.d.ts @@ -6,7 +6,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxScrollable, { dxScrollableOptions, diff --git a/packages/devextreme/js/ui/scroll_view/ui.scrollable.d.ts b/packages/devextreme/js/ui/scroll_view/ui.scrollable.d.ts index d07682976007..9600f8cc8f27 100644 --- a/packages/devextreme/js/ui/scroll_view/ui.scrollable.d.ts +++ b/packages/devextreme/js/ui/scroll_view/ui.scrollable.d.ts @@ -13,7 +13,7 @@ import { import { NativeEventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import { ScrollDirection, diff --git a/packages/devextreme/js/ui/select_box.d.ts b/packages/devextreme/js/ui/select_box.d.ts index 3c2745db0b62..282a005a6ee1 100644 --- a/packages/devextreme/js/ui/select_box.d.ts +++ b/packages/devextreme/js/ui/select_box.d.ts @@ -13,7 +13,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import { DropDownButtonTemplateDataModel, diff --git a/packages/devextreme/js/ui/shared/accessibility.js b/packages/devextreme/js/ui/shared/accessibility.js index ea60e4a209a1..50bde28ff3b1 100644 --- a/packages/devextreme/js/ui/shared/accessibility.js +++ b/packages/devextreme/js/ui/shared/accessibility.js @@ -1,6 +1,6 @@ import $ from '../../core/renderer'; -import eventsEngine from '../../events/core/events_engine'; -import { normalizeKeyName } from '../../events/utils/index'; +import eventsEngine from '../../common/core/events/core/events_engine'; +import { normalizeKeyName } from '../../common/core/events/utils/index'; import { extend } from '../../core/utils/extend'; import domAdapter from '../../core/dom_adapter'; import { noop } from '../../core/utils/common'; diff --git a/packages/devextreme/js/ui/shared/ui.editor_factory_mixin.js b/packages/devextreme/js/ui/shared/ui.editor_factory_mixin.js index bc73c09becb3..e2f693daa68c 100644 --- a/packages/devextreme/js/ui/shared/ui.editor_factory_mixin.js +++ b/packages/devextreme/js/ui/shared/ui.editor_factory_mixin.js @@ -1,5 +1,5 @@ import $ from '../../core/renderer'; -import eventsEngine from '../../events/core/events_engine'; +import eventsEngine from '../../common/core/events/core/events_engine'; import { isDefined, isObject, isFunction } from '../../core/utils/type'; import variableWrapper from '../../core/utils/variable_wrapper'; import { compileGetter } from '../../core/utils/data'; @@ -7,8 +7,8 @@ import browser from '../../core/utils/browser'; import { extend } from '../../core/utils/extend'; import devices from '../../core/devices'; import { getPublicElement } from '../../core/element'; -import { normalizeDataSourceOptions } from '../../data/data_source/utils'; -import { normalizeKeyName } from '../../events/utils/index'; +import { normalizeDataSourceOptions } from '../../common/data/data_source/utils'; +import { normalizeKeyName } from '../../common/core/events/utils/index'; const { isWrapped } = variableWrapper; diff --git a/packages/devextreme/js/ui/slider.d.ts b/packages/devextreme/js/ui/slider.d.ts index 8842dffcae6d..42b09d9de9ab 100644 --- a/packages/devextreme/js/ui/slider.d.ts +++ b/packages/devextreme/js/ui/slider.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/sortable.d.ts b/packages/devextreme/js/ui/sortable.d.ts index 0ca43e0f6f99..27bcb7d2004b 100644 --- a/packages/devextreme/js/ui/sortable.d.ts +++ b/packages/devextreme/js/ui/sortable.d.ts @@ -16,7 +16,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxDraggable, { DraggableBase, diff --git a/packages/devextreme/js/ui/speed_dial_action.d.ts b/packages/devextreme/js/ui/speed_dial_action.d.ts index dbf290e61954..b71f1026f344 100644 --- a/packages/devextreme/js/ui/speed_dial_action.d.ts +++ b/packages/devextreme/js/ui/speed_dial_action.d.ts @@ -7,7 +7,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Widget, { WidgetOptions, diff --git a/packages/devextreme/js/ui/splitter.d.ts b/packages/devextreme/js/ui/splitter.d.ts index 254726b90974..b37a13934999 100644 --- a/packages/devextreme/js/ui/splitter.d.ts +++ b/packages/devextreme/js/ui/splitter.d.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { Cancelable, @@ -8,7 +8,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/splitter_control.js b/packages/devextreme/js/ui/splitter_control.js index 340a5f9e01d1..1d1a53df352a 100644 --- a/packages/devextreme/js/ui/splitter_control.js +++ b/packages/devextreme/js/ui/splitter_control.js @@ -1,10 +1,10 @@ import $ from '../core/renderer'; import Widget from './widget/ui.widget'; import domAdapter from '../core/dom_adapter'; -import eventsEngine from '../events/core/events_engine'; -import pointerEvents from '../events/pointer'; +import eventsEngine from '../common/core/events/core/events_engine'; +import pointerEvents from '../common/core/events/pointer'; import { getWindow } from '../core/utils/window'; -import { addNamespace } from '../events/utils/index'; +import { addNamespace } from '../common/core/events/utils/index'; import Guid from '../core/guid'; const window = getWindow(); diff --git a/packages/devextreme/js/ui/switch.d.ts b/packages/devextreme/js/ui/switch.d.ts index 4969ab64ef37..0abcc3da551b 100644 --- a/packages/devextreme/js/ui/switch.d.ts +++ b/packages/devextreme/js/ui/switch.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import Editor, { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/tab_panel.d.ts b/packages/devextreme/js/ui/tab_panel.d.ts index df996cb013b9..8293e78d5bae 100644 --- a/packages/devextreme/js/ui/tab_panel.d.ts +++ b/packages/devextreme/js/ui/tab_panel.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { UserDefinedElement, DxElement, @@ -14,7 +14,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import { Position, diff --git a/packages/devextreme/js/ui/tabs.d.ts b/packages/devextreme/js/ui/tabs.d.ts index 97decc7aaeed..0c9173246562 100644 --- a/packages/devextreme/js/ui/tabs.d.ts +++ b/packages/devextreme/js/ui/tabs.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { EventInfo, @@ -6,7 +6,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/tag_box.d.ts b/packages/devextreme/js/ui/tag_box.d.ts index ab0c10ea9a76..c3b22df294d0 100644 --- a/packages/devextreme/js/ui/tag_box.d.ts +++ b/packages/devextreme/js/ui/tag_box.d.ts @@ -14,7 +14,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import { SelectionChangeInfo, diff --git a/packages/devextreme/js/ui/text_area.d.ts b/packages/devextreme/js/ui/text_area.d.ts index 25e1fb968571..eb40dde73621 100644 --- a/packages/devextreme/js/ui/text_area.d.ts +++ b/packages/devextreme/js/ui/text_area.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/text_box.d.ts b/packages/devextreme/js/ui/text_box.d.ts index 853df90583e8..75762ea2ce4c 100644 --- a/packages/devextreme/js/ui/text_box.d.ts +++ b/packages/devextreme/js/ui/text_box.d.ts @@ -3,7 +3,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { ValueChangedInfo, diff --git a/packages/devextreme/js/ui/text_box/ui.text_editor.base.d.ts b/packages/devextreme/js/ui/text_box/ui.text_editor.base.d.ts index 323cf3ce58ed..4523d23133dc 100644 --- a/packages/devextreme/js/ui/text_box/ui.text_editor.base.d.ts +++ b/packages/devextreme/js/ui/text_box/ui.text_editor.base.d.ts @@ -1,6 +1,6 @@ import { NativeEventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import dxButton from '../button'; diff --git a/packages/devextreme/js/ui/tile_view.d.ts b/packages/devextreme/js/ui/tile_view.d.ts index 14e6acc8d1c2..ecfcb9a5da22 100644 --- a/packages/devextreme/js/ui/tile_view.d.ts +++ b/packages/devextreme/js/ui/tile_view.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { EventInfo, @@ -6,7 +6,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/toast.d.ts b/packages/devextreme/js/ui/toast.d.ts index 7f124dbe5912..38176acf8948 100644 --- a/packages/devextreme/js/ui/toast.d.ts +++ b/packages/devextreme/js/ui/toast.d.ts @@ -1,10 +1,7 @@ import { AnimationConfig, -} from '../animation/fx'; - -import { PositionConfig, -} from '../animation/position'; +} from '../common/core/animation'; import { DxEvent, @@ -12,7 +9,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxOverlay, { dxOverlayAnimation, diff --git a/packages/devextreme/js/ui/toolbar.d.ts b/packages/devextreme/js/ui/toolbar.d.ts index bd461cb7a2ee..59c579766111 100644 --- a/packages/devextreme/js/ui/toolbar.d.ts +++ b/packages/devextreme/js/ui/toolbar.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { UserDefinedElement, DxElement, @@ -14,7 +14,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import { ToolbarItemLocation, diff --git a/packages/devextreme/js/ui/tooltip.d.ts b/packages/devextreme/js/ui/tooltip.d.ts index 2f815b1dbfe0..6397deb27f01 100644 --- a/packages/devextreme/js/ui/tooltip.d.ts +++ b/packages/devextreme/js/ui/tooltip.d.ts @@ -3,7 +3,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import dxPopover, { dxPopoverOptions, diff --git a/packages/devextreme/js/ui/tree_list.d.ts b/packages/devextreme/js/ui/tree_list.d.ts index 97ac3423f925..ab9f147ac313 100644 --- a/packages/devextreme/js/ui/tree_list.d.ts +++ b/packages/devextreme/js/ui/tree_list.d.ts @@ -12,7 +12,7 @@ import { DxPromise, } from '../core/utils/deferred'; -import DataSource from '../data/data_source'; +import { DataSource } from '../common/data'; import { Cancelable, @@ -20,7 +20,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { DataStructure, diff --git a/packages/devextreme/js/ui/tree_view.d.ts b/packages/devextreme/js/ui/tree_view.d.ts index dc21bb03bd48..329bed82c2cb 100644 --- a/packages/devextreme/js/ui/tree_view.d.ts +++ b/packages/devextreme/js/ui/tree_view.d.ts @@ -1,4 +1,4 @@ -import { DataSourceLike } from '../data/data_source'; +import { DataSourceLike } from '../common/data'; import { DxElement, } from '../core/element'; @@ -12,7 +12,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { CollectionWidgetItem, diff --git a/packages/devextreme/js/ui/validation_group.d.ts b/packages/devextreme/js/ui/validation_group.d.ts index 5e614e2ba787..4a5a361a1f03 100644 --- a/packages/devextreme/js/ui/validation_group.d.ts +++ b/packages/devextreme/js/ui/validation_group.d.ts @@ -10,7 +10,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { AsyncRule, diff --git a/packages/devextreme/js/ui/validation_summary.d.ts b/packages/devextreme/js/ui/validation_summary.d.ts index 6b51ce56c76a..ed2e75a213ee 100644 --- a/packages/devextreme/js/ui/validation_summary.d.ts +++ b/packages/devextreme/js/ui/validation_summary.d.ts @@ -4,7 +4,7 @@ import { InitializedEventInfo, ChangedOptionInfo, ItemInfo, -} from '../events/index'; +} from '../common/core/events'; import CollectionWidget, { CollectionWidgetOptions, diff --git a/packages/devextreme/js/ui/validator.d.ts b/packages/devextreme/js/ui/validator.d.ts index cba624c8287a..8cc8a58c6628 100644 --- a/packages/devextreme/js/ui/validator.d.ts +++ b/packages/devextreme/js/ui/validator.d.ts @@ -10,7 +10,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { AsyncRule, diff --git a/packages/devextreme/js/ui/widget/ui.search_box_mixin.js b/packages/devextreme/js/ui/widget/ui.search_box_mixin.js index c386734ad875..4491d72a5413 100644 --- a/packages/devextreme/js/ui/widget/ui.search_box_mixin.js +++ b/packages/devextreme/js/ui/widget/ui.search_box_mixin.js @@ -1,6 +1,6 @@ import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import errors from '../widget/ui.errors'; import { Deferred } from '../../core/utils/deferred'; import { stubComponent } from '../../core/utils/stubs'; diff --git a/packages/devextreme/js/ui/widget/ui.widget.d.ts b/packages/devextreme/js/ui/widget/ui.widget.d.ts index f36dd75cf3ef..c10a7b46d05c 100644 --- a/packages/devextreme/js/ui/widget/ui.widget.d.ts +++ b/packages/devextreme/js/ui/widget/ui.widget.d.ts @@ -5,7 +5,7 @@ import DOMComponent, { import { EventInfo, -} from '../../events/index'; +} from '../../common/core/events'; /** * @namespace DevExpress.ui diff --git a/packages/devextreme/js/utils.d.ts b/packages/devextreme/js/utils.d.ts index 21d9b4461ad5..b1759c3b2cf0 100644 --- a/packages/devextreme/js/utils.d.ts +++ b/packages/devextreme/js/utils.d.ts @@ -1,15 +1,10 @@ -/** - * @docid Utils.compileGetter - * @publicName compileGetter(expr) - * @namespace DevExpress.data.utils - * @public - */ -export function compileGetter(expr: string | Array): Function; - -/** - * @docid Utils.compileSetter - * @publicName compileSetter(expr) - * @namespace DevExpress.data.utils - * @public - */ -export function compileSetter(expr: string | Array): Function; +export { + /** + * @deprecated Use compileGetter from common/data instead + */ + compileGetter, + /** + * @deprecated Use compileSetter from common/data instead + */ + compileSetter, +} from './common/data'; diff --git a/packages/devextreme/js/utils.js b/packages/devextreme/js/utils.js index 1733a2aedeb2..39ce31a3a29a 100644 --- a/packages/devextreme/js/utils.js +++ b/packages/devextreme/js/utils.js @@ -1,7 +1 @@ -import { compileGetter, compileSetter } from './core/utils/data'; - - -export { - compileGetter, - compileSetter -}; +export { compileGetter, compileSetter } from './common/data'; diff --git a/packages/devextreme/js/viz/bar_gauge.d.ts b/packages/devextreme/js/viz/bar_gauge.d.ts index 5c0158274143..a56d336adec0 100644 --- a/packages/devextreme/js/viz/bar_gauge.d.ts +++ b/packages/devextreme/js/viz/bar_gauge.d.ts @@ -11,7 +11,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/bullet.d.ts b/packages/devextreme/js/viz/bullet.d.ts index bc8109b69794..e9e8995d2d97 100644 --- a/packages/devextreme/js/viz/bullet.d.ts +++ b/packages/devextreme/js/viz/bullet.d.ts @@ -2,7 +2,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { FileSavingEventInfo, diff --git a/packages/devextreme/js/viz/chart.d.ts b/packages/devextreme/js/viz/chart.d.ts index 6c898a30c081..09db2ff9aa98 100644 --- a/packages/devextreme/js/viz/chart.d.ts +++ b/packages/devextreme/js/viz/chart.d.ts @@ -9,7 +9,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/chart_components/base_chart.d.ts b/packages/devextreme/js/viz/chart_components/base_chart.d.ts index 038db129a2d5..1f3585e69f95 100644 --- a/packages/devextreme/js/viz/chart_components/base_chart.d.ts +++ b/packages/devextreme/js/viz/chart_components/base_chart.d.ts @@ -7,12 +7,12 @@ import { template, } from '../../core/templates/template'; -import DataSource, { DataSourceLike } from '../../data/data_source'; +import { DataSource, DataSourceLike } from '../../common/data'; import { EventInfo, NativeEventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/chart_components/scroll_bar.js b/packages/devextreme/js/viz/chart_components/scroll_bar.js index c94223ce2a0b..cb0a054dfe4b 100644 --- a/packages/devextreme/js/viz/chart_components/scroll_bar.js +++ b/packages/devextreme/js/viz/chart_components/scroll_bar.js @@ -1,10 +1,10 @@ -import eventsEngine from '../../events/core/events_engine'; -import { fireEvent } from '../../events/utils/index'; +import eventsEngine from '../../common/core/events/core/events_engine'; +import { fireEvent } from '../../common/core/events/utils/index'; import { extend } from '../../core/utils/extend'; import { Translator2D } from '../translators/translator2d'; import { isDefined } from '../../core/utils/type'; import { noop } from '../../core/utils/common'; -import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../events/drag'; +import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../common/core/events/drag'; const _min = Math.min; const _max = Math.max; diff --git a/packages/devextreme/js/viz/chart_components/shutter_zoom.js b/packages/devextreme/js/viz/chart_components/shutter_zoom.js index 97b0becfb80a..d58f07eacd99 100644 --- a/packages/devextreme/js/viz/chart_components/shutter_zoom.js +++ b/packages/devextreme/js/viz/chart_components/shutter_zoom.js @@ -1,4 +1,4 @@ -import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../events/drag'; +import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../common/core/events/drag'; const SHUTTER_EVENTS_NS = '.shutter-zoom'; const DRAG_START_EVENT_NAME = dragEventStart + SHUTTER_EVENTS_NS; const DRAG_UPDATE_EVENT_NAME = dragEventMove + SHUTTER_EVENTS_NS; diff --git a/packages/devextreme/js/viz/chart_components/tracker.js b/packages/devextreme/js/viz/chart_components/tracker.js index c196126e275b..5a4493c32e7d 100644 --- a/packages/devextreme/js/viz/chart_components/tracker.js +++ b/packages/devextreme/js/viz/chart_components/tracker.js @@ -1,12 +1,12 @@ import domAdapter from '../../core/dom_adapter'; -import eventsEngine from '../../events/core/events_engine'; -import { name as clickEventName } from '../../events/click'; +import eventsEngine from '../../common/core/events/core/events_engine'; +import { name as clickEventName } from '../../common/core/events/click'; import { extend } from '../../core/utils/extend'; import { each as _each } from '../../core/utils/iterator'; import consts from '../components/consts'; import { getDistance, pointInCanvas as inCanvas, normalizeEnum as _normalizeEnum } from '../core/utils'; -import pointerEvents from '../../events/pointer'; -import { addNamespace } from '../../events/utils/index'; +import pointerEvents from '../../common/core/events/pointer'; +import { addNamespace } from '../../common/core/events/utils/index'; import { isDefined } from '../../core/utils/type'; import { noop as _noop } from '../../core/utils/common'; import errors from '../../core/errors'; diff --git a/packages/devextreme/js/viz/chart_components/zoom_and_pan.js b/packages/devextreme/js/viz/chart_components/zoom_and_pan.js index 3d9c68eaefeb..c6493f5a425d 100644 --- a/packages/devextreme/js/viz/chart_components/zoom_and_pan.js +++ b/packages/devextreme/js/viz/chart_components/zoom_and_pan.js @@ -2,9 +2,9 @@ import { isDefined } from '../../core/utils/type'; import { extend } from '../../core/utils/extend'; import { normalizeEnum, getVizRangeObject } from '../core/utils'; -import { name as wheelEvent } from '../../events/core/wheel'; -import * as transformEvents from '../../events/transform'; -import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../events/drag'; +import { name as wheelEvent } from '../../common/core/events/core/wheel'; +import * as transformEvents from '../../common/core/events/transform'; +import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../common/core/events/drag'; const EVENTS_NS = '.zoomAndPanNS'; diff --git a/packages/devextreme/js/viz/circular_gauge.d.ts b/packages/devextreme/js/viz/circular_gauge.d.ts index 7e03ddd94923..94f06421a142 100644 --- a/packages/devextreme/js/viz/circular_gauge.d.ts +++ b/packages/devextreme/js/viz/circular_gauge.d.ts @@ -6,7 +6,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { FileSavingEventInfo, diff --git a/packages/devextreme/js/viz/components/tracker.js b/packages/devextreme/js/viz/components/tracker.js index 4d586ec57b6d..c08f04c6e8e7 100644 --- a/packages/devextreme/js/viz/components/tracker.js +++ b/packages/devextreme/js/viz/components/tracker.js @@ -1,8 +1,8 @@ -import { eventData as _eventData } from '../../events/utils/index'; +import { eventData as _eventData } from '../../common/core/events/utils/index'; import domAdapter from '../../core/dom_adapter'; -import { name as clickEventName } from '../../events/click'; -import pointer from '../../events/pointer'; -import eventsEngine from '../../events/core/events_engine'; +import { name as clickEventName } from '../../common/core/events/click'; +import pointer from '../../common/core/events/pointer'; +import eventsEngine from '../../common/core/events/core/events_engine'; const downPointerEventName = pointer.down; const movePointerEventName = pointer.move; diff --git a/packages/devextreme/js/viz/core/annotations.js b/packages/devextreme/js/viz/core/annotations.js index cbd5cfcc92fb..100b8afc6d4f 100644 --- a/packages/devextreme/js/viz/core/annotations.js +++ b/packages/devextreme/js/viz/core/annotations.js @@ -4,10 +4,10 @@ import { Tooltip } from '../core/tooltip'; import { extend } from '../../core/utils/extend'; import { patchFontOptions } from './utils'; import { Plaque } from './plaque'; -import pointerEvents from '../../events/pointer'; -import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../events/drag'; -import { addNamespace } from '../../events/utils/index'; -import eventsEngine from '../../events/core/events_engine'; +import pointerEvents from '../../common/core/events/pointer'; +import { start as dragEventStart, move as dragEventMove, end as dragEventEnd } from '../../common/core/events/drag'; +import { addNamespace } from '../../common/core/events/utils/index'; +import eventsEngine from '../../common/core/events/core/events_engine'; const getDocument = domAdapter.getDocument; diff --git a/packages/devextreme/js/viz/core/base_widget.d.ts b/packages/devextreme/js/viz/core/base_widget.d.ts index 4815ee3303df..a9b1f1f44572 100644 --- a/packages/devextreme/js/viz/core/base_widget.d.ts +++ b/packages/devextreme/js/viz/core/base_widget.d.ts @@ -10,7 +10,7 @@ import { import { Cancelable, EventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/core/data_source.js b/packages/devextreme/js/viz/core/data_source.js index 5f33a3c1ee9c..27518ef780e8 100644 --- a/packages/devextreme/js/viz/core/data_source.js +++ b/packages/devextreme/js/viz/core/data_source.js @@ -1,5 +1,5 @@ import { noop } from '../../core/utils/common'; -import DataHelperMixin from '../../data_helper'; +import DataHelperMixin from '../../common/data/data_helper'; const postCtor = DataHelperMixin.postCtor; let name; const members = { diff --git a/packages/devextreme/js/viz/core/export.js b/packages/devextreme/js/viz/core/export.js index 3cfb800306f7..49add1f9fbe9 100644 --- a/packages/devextreme/js/viz/core/export.js +++ b/packages/devextreme/js/viz/core/export.js @@ -3,11 +3,11 @@ import { getWindow } from '../../core/utils/window'; import { patchFontOptions } from './utils'; import { HIDDEN_FOR_EXPORT } from '../../core/utils/svg'; import { export as _export, image as imageExporter, svg as svgExporter, pdf as pdfExporter } from '../../exporter'; -import messageLocalization from '../../localization/message'; +import messageLocalization from '../../common/core/localization/message'; import { isDefined } from '../../core/utils/type'; import { getTheme } from '../themes'; -import { start as hoverEventStart, end as hoverEventEnd } from '../../events/hover'; -import pointerEvents from '../../events/pointer'; +import { start as hoverEventStart, end as hoverEventEnd } from '../../common/core/events/hover'; +import pointerEvents from '../../common/core/events/pointer'; import { logger } from '../../core/utils/console'; import { getWidth } from '../../core/utils/size'; import { Renderer } from './renderers/renderer'; diff --git a/packages/devextreme/js/viz/core/renderers/animation.js b/packages/devextreme/js/viz/core/renderers/animation.js index 91e2c79bb021..beea948c287c 100644 --- a/packages/devextreme/js/viz/core/renderers/animation.js +++ b/packages/devextreme/js/viz/core/renderers/animation.js @@ -1,4 +1,4 @@ -import { requestAnimationFrame, cancelAnimationFrame } from '../../../animation/frame'; +import { requestAnimationFrame, cancelAnimationFrame } from '../../../common/core/animation/frame'; const noop = function() { }; export const easingFunctions = { easeOutCubic: function(pos, start, end) { return (pos === 1) ? end : ((1 - Math.pow((1 - pos), 3)) * (end - start) + (+start)); }, diff --git a/packages/devextreme/js/viz/core/renderers/renderer.js b/packages/devextreme/js/viz/core/renderers/renderer.js index 4795d7acbc6d..3317f2c83207 100644 --- a/packages/devextreme/js/viz/core/renderers/renderer.js +++ b/packages/devextreme/js/viz/core/renderers/renderer.js @@ -3,7 +3,7 @@ import domAdapter from '../../../core/dom_adapter'; import { getWindow } from '../../../core/utils/window'; import callOnce from '../../../core/utils/call_once'; -import eventsEngine from '../../../events/core/events_engine'; +import eventsEngine from '../../../common/core/events/core/events_engine'; import { getSvgMarkup } from '../../../core/utils/svg'; import { AnimationController } from './animation'; import { normalizeBBox, rotateBBox, normalizeEnum, normalizeArcParams, getNextDefsSvgId } from '../utils'; diff --git a/packages/devextreme/js/viz/funnel.d.ts b/packages/devextreme/js/viz/funnel.d.ts index d424b708adb3..0690f7fd1d9b 100644 --- a/packages/devextreme/js/viz/funnel.d.ts +++ b/packages/devextreme/js/viz/funnel.d.ts @@ -1,4 +1,4 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { UserDefinedElement, @@ -14,7 +14,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/gauges/base_gauge.d.ts b/packages/devextreme/js/viz/gauges/base_gauge.d.ts index fb222dde2462..f8a6ae6d6df5 100644 --- a/packages/devextreme/js/viz/gauges/base_gauge.d.ts +++ b/packages/devextreme/js/viz/gauges/base_gauge.d.ts @@ -9,7 +9,7 @@ import { import { EventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/gauges/tracker.js b/packages/devextreme/js/viz/gauges/tracker.js index 7c148091735e..48816cd98603 100644 --- a/packages/devextreme/js/viz/gauges/tracker.js +++ b/packages/devextreme/js/viz/gauges/tracker.js @@ -1,10 +1,10 @@ -import eventsEngine from '../../events/core/events_engine'; +import eventsEngine from '../../common/core/events/core/events_engine'; import Class from '../../core/class'; import domAdapter from '../../core/dom_adapter'; -import { name as wheelEventName } from '../../events/core/wheel'; +import { name as wheelEventName } from '../../common/core/events/core/wheel'; import ReadyCallbacks from '../../core/utils/ready_callbacks'; -import { addNamespace } from '../../events/utils/index'; -import pointerEvents from '../../events/pointer'; +import { addNamespace } from '../../common/core/events/utils/index'; +import pointerEvents from '../../common/core/events/pointer'; ///#DEBUG import { debug } from '../../core/utils/console'; ///#ENDDEBUG diff --git a/packages/devextreme/js/viz/linear_gauge.d.ts b/packages/devextreme/js/viz/linear_gauge.d.ts index 0079aa0c4867..06283ea8b9bd 100644 --- a/packages/devextreme/js/viz/linear_gauge.d.ts +++ b/packages/devextreme/js/viz/linear_gauge.d.ts @@ -2,7 +2,7 @@ import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { FileSavingEventInfo, diff --git a/packages/devextreme/js/viz/pie_chart.d.ts b/packages/devextreme/js/viz/pie_chart.d.ts index 0846c9581c62..eabc9ead6a27 100644 --- a/packages/devextreme/js/viz/pie_chart.d.ts +++ b/packages/devextreme/js/viz/pie_chart.d.ts @@ -12,7 +12,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/polar_chart.d.ts b/packages/devextreme/js/viz/polar_chart.d.ts index eaa47013633d..b162828c807e 100644 --- a/packages/devextreme/js/viz/polar_chart.d.ts +++ b/packages/devextreme/js/viz/polar_chart.d.ts @@ -9,7 +9,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/range_selector.d.ts b/packages/devextreme/js/viz/range_selector.d.ts index 94b84f47b93f..5a81764fd387 100644 --- a/packages/devextreme/js/viz/range_selector.d.ts +++ b/packages/devextreme/js/viz/range_selector.d.ts @@ -1,11 +1,11 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/range_selector/tracker.js b/packages/devextreme/js/viz/range_selector/tracker.js index 4c64a4980ad4..703565ce6823 100644 --- a/packages/devextreme/js/viz/range_selector/tracker.js +++ b/packages/devextreme/js/viz/range_selector/tracker.js @@ -1,5 +1,5 @@ -import eventsEngine from '../../events/core/events_engine'; -import pointerEvents from '../../events/pointer'; +import eventsEngine from '../../common/core/events/core/events_engine'; +import pointerEvents from '../../common/core/events/pointer'; import { getWindow } from '../../core/utils/window'; import domAdapter from '../../core/dom_adapter'; import { each } from '../../core/utils/iterator'; diff --git a/packages/devextreme/js/viz/sankey.d.ts b/packages/devextreme/js/viz/sankey.d.ts index 981dee2f9ae1..de85f92f7a72 100644 --- a/packages/devextreme/js/viz/sankey.d.ts +++ b/packages/devextreme/js/viz/sankey.d.ts @@ -1,4 +1,4 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { UserDefinedElement, @@ -14,7 +14,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import BaseWidget, { BaseWidgetOptions, diff --git a/packages/devextreme/js/viz/sparkline.d.ts b/packages/devextreme/js/viz/sparkline.d.ts index f8e6a90a67fd..cecf579e5ed6 100644 --- a/packages/devextreme/js/viz/sparkline.d.ts +++ b/packages/devextreme/js/viz/sparkline.d.ts @@ -1,10 +1,10 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { EventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { FileSavingEventInfo, diff --git a/packages/devextreme/js/viz/sparklines/base_sparkline.d.ts b/packages/devextreme/js/viz/sparklines/base_sparkline.d.ts index 43b849ce6a51..dfed02eb3e73 100644 --- a/packages/devextreme/js/viz/sparklines/base_sparkline.d.ts +++ b/packages/devextreme/js/viz/sparklines/base_sparkline.d.ts @@ -9,7 +9,7 @@ import { import { EventInfo, -} from '../../events/index'; +} from '../../common/core/events'; import BaseWidget, { BaseWidgetExport, diff --git a/packages/devextreme/js/viz/sparklines/base_sparkline.js b/packages/devextreme/js/viz/sparklines/base_sparkline.js index f69136bf7669..697fe576ff61 100644 --- a/packages/devextreme/js/viz/sparklines/base_sparkline.js +++ b/packages/devextreme/js/viz/sparklines/base_sparkline.js @@ -1,10 +1,10 @@ -import eventsEngine from '../../events/core/events_engine'; +import eventsEngine from '../../common/core/events/core/events_engine'; import domAdapter from '../../core/dom_adapter'; import { isFunction } from '../../core/utils/type'; import BaseWidget from '../../__internal/viz/core/m_base_widget'; import { extend } from '../../core/utils/extend'; -import { addNamespace } from '../../events/utils/index'; -import pointerEvents from '../../events/pointer'; +import { addNamespace } from '../../common/core/events/utils/index'; +import pointerEvents from '../../common/core/events/pointer'; import { pointInCanvas } from '../core/utils'; import $ from '../../core/renderer'; diff --git a/packages/devextreme/js/viz/tree_map.d.ts b/packages/devextreme/js/viz/tree_map.d.ts index 4270731fecfe..983b16d117e7 100644 --- a/packages/devextreme/js/viz/tree_map.d.ts +++ b/packages/devextreme/js/viz/tree_map.d.ts @@ -1,4 +1,4 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { UserDefinedElement, @@ -14,7 +14,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import BaseWidget, { BaseWidgetMargin, diff --git a/packages/devextreme/js/viz/vector_map.d.ts b/packages/devextreme/js/viz/vector_map.d.ts index 39a4d586c616..4ef62ed50fc6 100644 --- a/packages/devextreme/js/viz/vector_map.d.ts +++ b/packages/devextreme/js/viz/vector_map.d.ts @@ -1,4 +1,4 @@ -import DataSource, { DataSourceLike } from '../data/data_source'; +import { DataSource, DataSourceLike } from '../common/data'; import { UserDefinedElement, @@ -14,7 +14,7 @@ import { NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, -} from '../events/index'; +} from '../common/core/events'; import { Format, diff --git a/packages/devextreme/js/viz/vector_map/map_layer.js b/packages/devextreme/js/viz/vector_map/map_layer.js index a7bb5cffa499..a6b60250c913 100644 --- a/packages/devextreme/js/viz/vector_map/map_layer.js +++ b/packages/devextreme/js/viz/vector_map/map_layer.js @@ -1,7 +1,7 @@ import { noop } from '../../core/utils/common'; import { extend } from '../../core/utils/extend'; import { each } from '../../core/utils/iterator'; -import DataHelperMixin from '../../data_helper'; +import DataHelperMixin from '../../common/data/data_helper'; import { isFunction as _isFunction, isDefined as _isDefined } from '../../core/utils/type'; import { Deferred, when } from '../../core/utils/deferred'; import { parseScalar as _parseScalar, diff --git a/packages/devextreme/js/viz/vector_map/tracker.js b/packages/devextreme/js/viz/vector_map/tracker.js index b6f0a8e241d6..e94fbbb5b31f 100644 --- a/packages/devextreme/js/viz/vector_map/tracker.js +++ b/packages/devextreme/js/viz/vector_map/tracker.js @@ -1,9 +1,9 @@ -import eventsEngine from '../../events/core/events_engine'; +import eventsEngine from '../../common/core/events/core/events_engine'; import { getNavigator, hasProperty } from '../../core/utils/window'; import domAdapter from '../../core/dom_adapter'; import { makeEventEmitter } from './event_emitter'; -import { addNamespace } from '../../events/utils/index'; -import { name as wheelEventName } from '../../events/core/wheel'; +import { addNamespace } from '../../common/core/events/utils/index'; +import { name as wheelEventName } from '../../common/core/events/core/wheel'; import { parseScalar } from '../core/utils'; const navigator = getNavigator(); diff --git a/packages/devextreme/project.json b/packages/devextreme/project.json index 5d2b5674ecaf..e6d99395baf0 100644 --- a/packages/devextreme/project.json +++ b/packages/devextreme/project.json @@ -21,8 +21,8 @@ "{projectRoot}/artifacts", "!{projectRoot}/artifacts/css", "{projectRoot}/js/bundles/dx.custom.js", - "{projectRoot}/js/localization/cldr-data", - "{projectRoot}/js/localization/default_messages.js", + "{projectRoot}/js/common/core/localization/cldr-data", + "{projectRoot}/js/common/core/localization/default_messages.js", "{projectRoot}/js/renovation/**/*.j.tsx", "{projectRoot}/testing/tests/Renovation/widgets.json" ] @@ -64,8 +64,8 @@ "{projectRoot}/artifacts", "!{projectRoot}/artifacts/css", "{projectRoot}/js/bundles/dx.custom.js", - "{projectRoot}/js/localization/cldr-data", - "{projectRoot}/js/localization/default_messages.js", + "{projectRoot}/js/common/core/localization/cldr-data", + "{projectRoot}/js/common/core/localization/default_messages.js", "{projectRoot}/js/renovation/**/*.j.tsx", "{projectRoot}/testing/tests/Renovation/widgets.json" ], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 378311237f5e..bf5cef964a7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20352,15 +20352,13 @@ snapshots: transitivePeerDependencies: - '@parcel/core' - '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': + '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.11) '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/logger': 2.12.0 '@parcel/utils': 2.12.0 lmdb: 2.8.5 - transitivePeerDependencies: - - '@swc/helpers' '@parcel/codeframe@2.12.0': dependencies: @@ -20420,7 +20418,7 @@ snapshots: '@parcel/core@2.12.0(@swc/helpers@0.5.11)': dependencies: '@mischnic/json-sourcemap': 0.1.1 - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/diagnostic': 2.12.0 '@parcel/events': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) @@ -20835,7 +20833,7 @@ snapshots: '@parcel/types@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': dependencies: - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/diagnostic': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)