diff --git a/packages/devextreme/js/__internal/ui/form/m_form.ts b/packages/devextreme/js/__internal/ui/form/m_form.ts index 64e1f0f5463e..edc707cf4e6f 100644 --- a/packages/devextreme/js/__internal/ui/form/m_form.ts +++ b/packages/devextreme/js/__internal/ui/form/m_form.ts @@ -18,7 +18,7 @@ import { // @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 visibilityEventsModule 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'; @@ -321,7 +321,7 @@ const Form = Widget.inherit({ inOneColumn, }); - triggerResizeEvent(this.$element().find(`.${TOOLBAR_CLASS}`)); + visibilityEventsModule.triggerResizeEvent(this.$element().find(`.${TOOLBAR_CLASS}`)); }, _clean() { @@ -503,7 +503,7 @@ const Form = Widget.inherit({ onItemRendered: (args) => { item.tabPanelOptions?.onItemRendered?.(args); - triggerShownEvent(args.itemElement); + visibilityEventsModule.triggerShownEvent(args.itemElement); }, itemTemplate: (itemData, e, container) => { const $container = $(container); diff --git a/packages/devextreme/js/__internal/ui/m_gallery.ts b/packages/devextreme/js/__internal/ui/m_gallery.ts index 69f20a920198..86cf2a966d30 100644 --- a/packages/devextreme/js/__internal/ui/m_gallery.ts +++ b/packages/devextreme/js/__internal/ui/m_gallery.ts @@ -17,7 +17,7 @@ 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 visibilityChange 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'; @@ -311,7 +311,7 @@ const Gallery = CollectionWidget.inherit({ return () => { if (!this._wasAnyItemTemplateRendered) { this._wasAnyItemTemplateRendered = true; - triggerResizeEvent(this.$element()); // NOTE: T1132935 + visibilityChange.triggerResizeEvent(this.$element()); // NOTE: T1132935 } }; }, diff --git a/packages/devextreme/js/__internal/ui/m_resizable.ts b/packages/devextreme/js/__internal/ui/m_resizable.ts index 576ddaf7b759..91258bad8a57 100644 --- a/packages/devextreme/js/__internal/ui/m_resizable.ts +++ b/packages/devextreme/js/__internal/ui/m_resizable.ts @@ -15,7 +15,7 @@ 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'; +import visibilityChange from '@js/events/visibility_change'; const RESIZABLE = 'dxResizable'; const RESIZABLE_CLASS = 'dx-resizable'; @@ -387,7 +387,7 @@ const Resizable = DOMComponent.inherit({ handles: this._movingSides, }); - triggerResizeEvent(this.$element()); + visibilityChange.triggerResizeEvent(this.$element()); }, _isCornerHandler(sides) { diff --git a/packages/devextreme/js/events/visibility_change.js b/packages/devextreme/js/events/visibility_change.js index 11c982814886..21d50d68cc8d 100644 --- a/packages/devextreme/js/events/visibility_change.js +++ b/packages/devextreme/js/events/visibility_change.js @@ -3,3 +3,5 @@ export { triggerShownEvent, triggerResizeEvent } from '../__internal/events/m_visibility_change'; + +export { default } from '../__internal/events/m_visibility_change';