refactor(many): use utils import (#27160)

This commit is contained in:
Maria Hutt
2023-04-12 13:25:14 -07:00
committed by GitHub
parent 9f51bdc145
commit 0a0345a84a
114 changed files with 350 additions and 327 deletions

View File

@ -1,6 +1,7 @@
import { createAnimation } from '@utils/animation/animation';
import { getElementRoot } from '@utils/helpers';
import type { Animation } from '../../../interface';
import { createAnimation } from '../../../utils/animation/animation';
import { getElementRoot } from '../../../utils/helpers';
import { SwipeToCloseDefaults } from '../gestures/swipe-to-close';
import type { ModalAnimationOptions } from '../modal-interface';

View File

@ -1,6 +1,7 @@
import { createAnimation } from '@utils/animation/animation';
import { getElementRoot } from '@utils/helpers';
import type { Animation } from '../../../interface';
import { createAnimation } from '../../../utils/animation/animation';
import { getElementRoot } from '../../../utils/helpers';
import { SwipeToCloseDefaults } from '../gestures/swipe-to-close';
import type { ModalAnimationOptions } from '../modal-interface';

View File

@ -1,6 +1,7 @@
import { createAnimation } from '@utils/animation/animation';
import { getElementRoot } from '@utils/helpers';
import type { Animation } from '../../../interface';
import { createAnimation } from '../../../utils/animation/animation';
import { getElementRoot } from '../../../utils/helpers';
import type { ModalAnimationOptions } from '../modal-interface';
import { createSheetEnterAnimation } from './sheet';

View File

@ -1,6 +1,7 @@
import { createAnimation } from '@utils/animation/animation';
import { getElementRoot } from '@utils/helpers';
import type { Animation } from '../../../interface';
import { createAnimation } from '../../../utils/animation/animation';
import { getElementRoot } from '../../../utils/helpers';
import type { ModalAnimationOptions } from '../modal-interface';
import { createSheetLeaveAnimation } from './sheet';

View File

@ -1,4 +1,5 @@
import { createAnimation } from '../../../utils/animation/animation';
import { createAnimation } from '@utils/animation/animation';
import type { ModalAnimationOptions } from '../modal-interface';
import { getBackdropValueForSheet } from '../utils';

View File

@ -1,7 +1,8 @@
import { createGesture } from '@utils/gesture';
import { clamp, raf } from '@utils/helpers';
import type { Animation } from '../../../interface';
import type { GestureDetail } from '../../../utils/gesture';
import { createGesture } from '../../../utils/gesture';
import { clamp, raf } from '../../../utils/helpers';
import { getBackdropValueForSheet } from '../utils';
import { calculateSpringStep, handleCanDismiss } from './utils';

View File

@ -1,14 +1,10 @@
import { getTimeGivenProgression } from '@utils/animation/cubic-bezier';
import { isIonContent, findClosestIonContent, disableContentScrollY, resetContentScrollY } from '@utils/content';
import { createGesture } from '@utils/gesture';
import { clamp, getElementRoot } from '@utils/helpers';
import type { Animation } from '../../../interface';
import { getTimeGivenProgression } from '../../../utils/animation/cubic-bezier';
import {
isIonContent,
findClosestIonContent,
disableContentScrollY,
resetContentScrollY,
} from '../../../utils/content';
import type { GestureDetail } from '../../../utils/gesture';
import { createGesture } from '../../../utils/gesture';
import { clamp, getElementRoot } from '../../../utils/helpers';
import type { Style as StatusBarStyle } from '../../../utils/native/status-bar';
import { setCardStatusBarDark, setCardStatusBarDefault } from '../utils';

View File

@ -1,5 +1,6 @@
import { GESTURE } from '@utils/overlays';
import type { Animation } from '../../../interface';
import { GESTURE } from '../../../utils/overlays';
export const handleCanDismiss = async (el: HTMLIonModalElement, animation: Animation) => {
/**

View File

@ -1,5 +1,23 @@
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Method, Prop, State, Watch, h, writeTask } from '@stencil/core';
import { findIonContent, printIonContentErrorMsg } from '@utils/content';
import { CoreDelegate, attachComponent, detachComponent } from '@utils/framework-delegate';
import { raf, inheritAttributes, hasLazyBuild } from '@utils/helpers';
import type { Attributes } from '@utils/helpers';
import { printIonWarning } from '@utils/logging';
import { Style as StatusBarStyle, StatusBar } from '@utils/native/status-bar';
import {
GESTURE,
BACKDROP,
activeAnimations,
dismiss,
eventMethod,
prepareOverlay,
present,
createTriggerController,
} from '@utils/overlays';
import { getClassMap } from '@utils/theme';
import { deepReady } from '@utils/transition';
import { config } from '../../global/config';
import { getIonMode } from '../../global/ionic-global';
@ -12,26 +30,8 @@ import type {
Gesture,
OverlayInterface,
} from '../../interface';
import { findIonContent, printIonContentErrorMsg } from '../../utils/content';
import { CoreDelegate, attachComponent, detachComponent } from '../../utils/framework-delegate';
import { raf, inheritAttributes, hasLazyBuild } from '../../utils/helpers';
import type { Attributes } from '../../utils/helpers';
import { KEYBOARD_DID_OPEN } from '../../utils/keyboard/keyboard';
import { printIonWarning } from '../../utils/logging';
import { Style as StatusBarStyle, StatusBar } from '../../utils/native/status-bar';
import {
GESTURE,
BACKDROP,
activeAnimations,
dismiss,
eventMethod,
prepareOverlay,
present,
createTriggerController,
} from '../../utils/overlays';
import type { OverlayEventDetail } from '../../utils/overlays-interface';
import { getClassMap } from '../../utils/theme';
import { deepReady } from '../../utils/transition';
import { iosEnterAnimation } from './animations/ios.enter';
import { iosLeaveAnimation } from './animations/ios.leave';

View File

@ -1,5 +1,5 @@
import { StatusBar, Style } from '../../utils/native/status-bar';
import { win } from '../../utils/window';
import { StatusBar, Style } from '@utils/native/status-bar';
import { win } from '@utils/window';
/**
* Use y = mx + b to