Skip to content

Commit 87d2804

Browse files
committed
chore: use ts-essentials
1 parent 9e5a348 commit 87d2804

File tree

103 files changed

+136
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+136
-115
lines changed

.changeset/beige-bananas-grin-233.md

+5

src/anchor/anchor.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
tap,
2424
} from 'rxjs';
2525

26-
import { buildBem, isTemplateRef, last } from '../utils';
26+
import { buildBem, isTemplateRef, last } from '../internal/utils';
2727

2828
import { AnchorDirectiveChild } from './anchor.directive';
2929
import { AnchorItem, AnchorTreeItem } from './types';

src/anchor/anchor.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
} from '@angular/core';
2222
import { Subject, fromEvent, merge, startWith, takeUntil } from 'rxjs';
2323

24-
import { observeResizeOn } from '../utils';
24+
import { observeResizeOn } from '../internal/utils';
2525

2626
import { AnchorComponent } from './anchor.component';
2727

src/anchor/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { last } from '../utils';
1+
import { last } from '../internal/utils';
22

33
import { AnchorItem, AnchorTreeItem } from './types';
44

src/autocomplete/autocomplete.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
withLatestFrom,
2626
} from 'rxjs';
2727

28-
import { publishRef } from '../utils';
28+
import { publishRef } from '../internal/utils';
2929

3030
import { AutocompletePlaceholderComponent } from './autocomplete-placeholder.component';
3131
import { AutoCompleteDirective } from './autocomplete.directive';

src/autocomplete/autocomplete.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import {
2828
distinctUntilChanged,
2929
} from 'rxjs';
3030

31+
import { scrollIntoView } from '../internal/utils';
3132
import { BaseTooltip, TooltipTrigger, TooltipType } from '../tooltip';
3233
import { AnimationType } from '../tooltip/animations';
33-
import { scrollIntoView } from '../utils';
3434

3535
import { AutocompleteComponent } from './autocomplete.component';
3636
import { AutoCompleteContext, SuggestionFilterFn } from './autocomplete.types';

src/autocomplete/suggestion-group/suggestion-group.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@angular/core';
1111
import { Observable, combineLatest, of, map, startWith, switchMap } from 'rxjs';
1212

13-
import { publishRef } from '../../utils';
13+
import { publishRef } from '../../internal/utils';
1414
import { SuggestionComponent } from '../suggestion/suggestion.component';
1515

1616
@Component({

src/autocomplete/suggestion/suggestion.component.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ import {
2020
tap,
2121
} from 'rxjs';
2222

23-
import { Bem, buildBem, coerceAttrBoolean, publishRef } from '../../utils';
23+
import {
24+
Bem,
25+
buildBem,
26+
coerceAttrBoolean,
27+
publishRef,
28+
} from '../../internal/utils';
2429
import { AutocompleteComponent } from '../autocomplete.component';
2530

2631
@Component({

src/button/button.component.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, DebugElement } from '@angular/core';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
44

5-
import { ComponentSize } from '../types';
5+
import { ComponentSize } from '../internal/types';
66

77
import { ButtonComponent } from './button.component';
88
import { ButtonType } from './button.types';

src/button/button.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from '@angular/core';
1212

1313
import { IconComponent } from '../icon/icon.component';
14-
import { ComponentSize } from '../types';
14+
import { ComponentSize } from '../internal/types';
1515

1616
import { ButtonType } from './button.types';
1717

src/button/button.types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValueOf } from '../types';
1+
import { ValueOf } from '../internal/types';
22

33
export const ButtonType = {
44
Default: 'default',

src/date-picker/calendar/header/component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import dayjs, { ConfigType, Dayjs } from 'dayjs';
1212
import { ButtonComponent } from '../../../button/button.component';
1313
import { I18nPipe } from '../../../i18n/i18n.pipe';
1414
import { IconComponent } from '../../../icon/icon.component';
15-
import { buildBem } from '../../../utils';
15+
import { buildBem } from '../../../internal/utils';
1616
import {
1717
CalendarHeaderRange,
1818
DateNavRange,

src/date-picker/calendar/panel/picker-panel.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import isBetween from 'dayjs/plugin/isBetween';
1414

1515
import { ButtonComponent } from '../../../button/button.component';
1616
import { I18nPipe } from '../../../i18n/i18n.pipe';
17-
import { buildBem } from '../../../utils';
17+
import { buildBem } from '../../../internal/utils';
1818
import { DateNavRange } from '../../date-picker.type';
1919
import {
2020
DAY,

src/date-picker/calendar/range-picker-panel/component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import dayjs, { Dayjs } from 'dayjs';
1313

1414
import { CommonFormControl } from '../../../form/common-form';
1515
import { I18nPipe } from '../../../i18n/i18n.pipe';
16+
import { buildBem } from '../../../internal/utils';
1617
import { TimePickerComponent } from '../../../time-picker/component';
1718
import { TimePickerModel } from '../../../time-picker/time-picker.type';
18-
import { buildBem } from '../../../utils';
1919
import { DateNavRange, DisabledTimeFn, Side } from '../../date-picker.type';
2020
import { DatePickerType, MONTH, YEAR } from '../constant';
2121
import { CalendarFooterComponent } from '../footer/component';

src/date-picker/date-picker/date-picker.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
1313
import dayjs, { ConfigType, Dayjs } from 'dayjs';
1414

1515
import { CommonFormControl } from '../../form/common-form';
16+
import { ComponentSize } from '../../internal/types';
1617
import { TooltipDirective } from '../../tooltip/tooltip.directive';
17-
import { ComponentSize } from '../../types';
1818
import { DatePickerType } from '../calendar/constant';
1919
import { DatePickerPanelComponent } from '../calendar/date-picker-panel/component';
2020
import { DateNavRange, DisabledTimeFn } from '../date-picker.type';

src/date-picker/range-picker/range-picker.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
1111
import dayjs, { ConfigType, Dayjs } from 'dayjs';
1212

1313
import { CommonFormControl } from '../../form';
14+
import { ComponentSize } from '../../internal/types';
1415
import { TooltipDirective } from '../../tooltip/tooltip.directive';
15-
import { ComponentSize } from '../../types';
1616
import { DateRangePickerPanelComponent } from '../calendar/range-picker-panel/component';
1717
import { DisabledDateFn, DisabledTimeFn } from '../date-picker.type';
1818
import { DatePickerTriggerComponent } from '../trigger/trigger.component';

src/date-picker/trigger/trigger.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { Dayjs } from 'dayjs';
1313
import { I18nPipe } from '../../i18n/i18n.pipe';
1414
import { IconComponent } from '../../icon/icon.component';
1515
import { InputComponent } from '../../input/input.component';
16-
import { ComponentSize } from '../../types';
17-
import { buildBem } from '../../utils';
16+
import { ComponentSize } from '../../internal/types';
17+
import { buildBem } from '../../internal/utils';
1818

1919
const bem = buildBem('aui-date-picker-trigger');
2020

src/dialog/confirm-dialog/confirm-dialog.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { firstValueFrom, Observable } from 'rxjs';
1414

1515
import { ButtonComponent } from '../../button/button.component';
1616
import { IconComponent } from '../../icon/icon.component';
17-
import { Bem, buildBem, isString, isTemplateRef } from '../../utils';
17+
import { Bem, buildBem, isString, isTemplateRef } from '../../internal/utils';
1818
import { DialogRef } from '../dialog-ref';
1919
import {
2020
BeforeAction,

src/dialog/dialog-animations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@angular/animations';
1010

1111
import { AnimationDuration } from '../core/animation/animation-consts';
12-
import { getAnimationQueryMetadatas } from '../utils/animations';
12+
import { getAnimationQueryMetadatas } from '../internal/utils/animations';
1313

1414
export const ZOOM_CLASS_NAME_MAP = {
1515
enter: 'aui-zoom-enter',

src/dialog/dialog-content/dialog-content.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
ViewEncapsulation,
99
} from '@angular/core';
1010

11-
import { Bem, buildBem } from '../../utils';
11+
import { Bem, buildBem } from '../../internal/utils';
1212

1313
@Component({
1414
selector: 'aui-dialog-content',

src/dialog/dialog-content/dialog-footer.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
ViewEncapsulation,
55
} from '@angular/core';
66

7-
import { Bem, buildBem } from '../../utils';
7+
import { Bem, buildBem } from '../../internal/utils';
88

99
@Component({
1010
selector: 'aui-dialog-footer',

src/dialog/dialog-content/dialog-header.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@angular/core';
1111

1212
import { IconComponent } from '../../icon/icon.component';
13-
import { Bem, buildBem } from '../../utils';
13+
import { Bem, buildBem } from '../../internal/utils';
1414
import { DialogRef } from '../dialog-ref';
1515
import { DialogService } from '../dialog.service';
1616
import { getClosestDialog } from '../utils';

src/dialog/dialog.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
2222
import { debounceTime, filter, fromEvent } from 'rxjs';
2323

24-
import { Bem, buildBem, getElementOffset } from '../utils';
24+
import { Bem, buildBem, getElementOffset } from '../internal/utils';
2525

2626
import {
2727
dialogAnimations,

src/drawer/component/internal/internal.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { BehaviorSubject, Subject } from 'rxjs';
3333

3434
import { TimingFunction } from '../../../core/animation/animation-consts';
3535
import { IconComponent } from '../../../icon/icon.component';
36-
import { handlePixel, isTemplateRef } from '../../../utils';
36+
import { handlePixel, isTemplateRef } from '../../../internal/utils';
3737
import { DrawerOptions, DrawerSize } from '../../types';
3838

3939
export const DATA = new InjectionToken('drawer-data');

src/drawer/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ComponentType } from '@angular/cdk/portal';
22
import { TemplateRef } from '@angular/core';
33

4-
import { ValueOf } from '../types';
4+
import { ValueOf } from '../internal/types';
55

66
export const DrawerSize = {
77
Small: 'small',

src/dropdown/dropdown-button/dropdown-button.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import { Observable, map, startWith } from 'rxjs';
1515
import { ButtonType } from '../../button';
1616
import { ButtonComponent } from '../../button/button.component';
1717
import { IconComponent } from '../../icon/icon.component';
18-
import { ComponentSize } from '../../types';
19-
import { Bem, buildBem, coerceAttrBoolean } from '../../utils';
18+
import { ComponentSize } from '../../internal/types';
19+
import { Bem, buildBem, coerceAttrBoolean } from '../../internal/utils';
2020
import { DropdownDirective } from '../dropdown.directive';
2121
import { MenuItemComponent } from '../menu-item/menu-item.component';
2222

src/dropdown/dropdown.types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValueOf } from '../types';
1+
import { ValueOf } from '../internal/types';
22

33
export const MenuItemType = {
44
Default: 'default',

src/dropdown/menu-item/menu-item.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
ViewEncapsulation,
66
} from '@angular/core';
77

8-
import { Bem, buildBem } from '../../utils';
8+
import { Bem, buildBem } from '../../internal/utils';
99
import { MenuItemType } from '../dropdown.types';
1010

1111
@Component({

src/dropdown/menu/menu.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
ViewEncapsulation,
66
} from '@angular/core';
77

8-
import { ComponentSize } from '../../types';
9-
import { Bem, buildBem } from '../../utils';
8+
import { ComponentSize } from '../../internal/types';
9+
import { Bem, buildBem } from '../../internal/utils';
1010

1111
@Component({
1212
selector: 'aui-menu',

src/dropdown/submenu/submenu.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import {
88
} from '@angular/core';
99

1010
import { IconComponent } from '../../icon/icon.component';
11+
import { ComponentSize } from '../../internal/types';
12+
import { Bem, buildBem } from '../../internal/utils';
1113
import { TooltipTrigger } from '../../tooltip';
1214
import { TooltipActiveDirective } from '../../tooltip/tooltip-active.directive';
1315
import { TooltipDirective } from '../../tooltip/tooltip.directive';
14-
import { ComponentSize } from '../../types';
15-
import { Bem, buildBem } from '../../utils';
1616
import { MenuComponent } from '../menu/menu.component';
1717
import { MenuItemComponent } from '../menu-item/menu-item.component';
1818

src/form/common-form.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { ControlValueAccessor } from '@angular/forms';
99
import { ReplaySubject } from 'rxjs';
1010

11-
import { coerceAttrBoolean } from '../utils';
11+
import { coerceAttrBoolean } from '../internal/utils';
1212

1313
/**
1414
* form control 内部不保持 value 属性,当不使用 ngModel 时可以通过 [(value)] 实现双向绑定;

src/form/form-item/form-item.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
takeUntil,
2525
} from 'rxjs';
2626

27-
import { Bem, buildBem, publishRef } from '../../utils';
27+
import { Bem, buildBem, publishRef } from '../../internal/utils';
2828
import { FormDirective } from '../form.directive';
2929
import { FormItemWidth, LabelPosition } from '../form.types';
3030
import {

src/form/form.types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValueOf } from '../types';
1+
import { ValueOf } from '../internal/types';
22

33
export const LabelPosition = {
44
Top: 'top',

src/form/helper-directives.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Directive, Input } from '@angular/core';
22

3-
import { coerceAttrBoolean } from '../utils';
3+
import { coerceAttrBoolean } from '../internal/utils';
44

55
@Directive({
66
selector: 'label[auiFormItemLabel]',

src/icon/icon.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
ViewEncapsulation,
77
} from '@angular/core';
88

9+
import { Bem, buildBem, handlePixel } from '../internal/utils';
910
import { ThemePickerPipe } from '../theme/theme.pipe';
10-
import { Bem, buildBem, handlePixel } from '../utils';
1111

1212
import { IconRegisterService } from './icon-register.service';
1313

src/index.ts

+13-11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ export * from './i18n';
1616
export * from './icon';
1717
export * from './inline-alert';
1818
export * from './input';
19+
export { ComponentSize } from './internal/types';
20+
export {
21+
AttrBoolean,
22+
Bem,
23+
buildBem,
24+
coerceAttrBoolean,
25+
coerceString,
26+
getCompatibleStylesRenderer,
27+
handlePixel,
28+
isTemplateRef,
29+
observeMutationOn,
30+
observeResizeOn,
31+
} from './internal/utils';
1932
export * from './message';
2033
export * from './notification';
2134
export * from './paginator';
@@ -34,14 +47,3 @@ export * from './theme';
3447
export * from './time-picker';
3548
export * from './tooltip';
3649
export * from './tree-select';
37-
export { ComponentSize } from './types';
38-
export {
39-
AttrBoolean,
40-
coerceAttrBoolean,
41-
coerceString,
42-
getCompatibleStylesRenderer,
43-
handlePixel,
44-
isTemplateRef,
45-
observeMutationOn,
46-
observeResizeOn,
47-
} from './utils';

src/inline-alert/inline-alert.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@angular/core';
1111

1212
import { IconComponent } from '../icon/icon.component';
13-
import { Bem, buildBem } from '../utils';
13+
import { Bem, buildBem } from '../internal/utils';
1414

1515
import { InlineAlertTitleDirective } from './helper-directives';
1616
import { InlineAlertType } from './inline-alert.types';

src/inline-alert/inline-alert.types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValueOf } from '../types';
1+
import { ValueOf } from '../internal/types';
22

33
export const InlineAlertType = {
44
Primary: 'primary',

src/input/input-group/input-group.component.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
44

55
import { IconComponent } from '../../icon';
6-
import { ComponentSize } from '../../types';
6+
import { ComponentSize } from '../../internal/types';
77
import { InputComponent } from '../input.component';
88

99
import { INPUT_GROUP_MODULE } from './input-group.component';

src/input/input-group/input-group.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@angular/core';
1111
import { Observable } from 'rxjs';
1212

13-
import { Bem, buildBem, watchContentExist } from '../../utils';
13+
import { Bem, buildBem, watchContentExist } from '../../internal/utils';
1414
import {
1515
InputAddonAfterDirective,
1616
InputAddonBeforeDirective,

src/input/input.component.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, DebugElement } from '@angular/core';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
44

5-
import { ComponentSize } from '../types';
5+
import { ComponentSize } from '../internal/types';
66

77
import { InputComponent } from './input.component';
88

0 commit comments

Comments
 (0)