Skip to content

Commit

Permalink
fix(build): move orientation to separate file to exclude cycle import
Browse files Browse the repository at this point in the history
  • Loading branch information
dhutaryan committed Aug 21, 2023
1 parent 74cea0b commit d38d307
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion projects/mat-timepicker/src/lib/clock-dials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { TimeAdapter } from './adapter';
import { MatTimeFaceBase } from './time-face-base';
import { withZeroPrefixMeridiem } from './time-input-base';
import { MatTimepickerIntl } from './timepicker-intl';
import { TimepickerOrientation } from './timepicker-base';
import { TimepickerOrientation } from './orientation';

export type MatDialView = 'hours' | 'minutes';

Expand Down
2 changes: 2 additions & 0 deletions projects/mat-timepicker/src/lib/orientation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** Possible options for the timepicker orientation (dial mode only). */
export type TimepickerOrientation = 'horizontal' | 'vertical';
4 changes: 1 addition & 3 deletions projects/mat-timepicker/src/lib/timepicker-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import {
MatTimeSelectionModel,
} from './time-selection-model';
import { MAT_DEFAULT_ACITONS } from './timepicker-actions-default';
import { TimepickerOrientation } from './orientation';

/** Possible options for the timepicker to open. */
export type TimepickerOpenAs = 'dialog' | 'popup';
Expand All @@ -66,9 +67,6 @@ export type TimepickerMode = 'input' | 'dial';
/** Possible options for the timepicker period format. */
export type TimepickerFormat = '12h' | '24h';

/** Possible options for the timepicker orientation (dial mode only). */
export type TimepickerOrientation = 'horizontal' | 'vertical';

/** Form control that can be associated with a timepicker. */
export interface MatTimepickerControl<T> {
disabled: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ViewEncapsulation,
} from '@angular/core';

import { TimepickerOrientation } from './timepicker-base';
import { TimepickerOrientation } from './orientation';

@Component({
selector: 'mat-timepicker-content-layout',
Expand Down
7 changes: 2 additions & 5 deletions projects/mat-timepicker/src/lib/timepicker-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ import {
MatTimeSelectionModel,
} from './time-selection-model';
import { matTimepickerAnimations } from './timepicker-animations';
import {
MatTimepickerBase,
TimepickerMode,
TimepickerOrientation,
} from './timepicker-base';
import { MatTimepickerBase, TimepickerMode } from './timepicker-base';
import { MatTimepickerIntl } from './timepicker-intl';
import { MatClockDials } from './clock-dials';
import { MatTimeInputs } from './time-inputs';
import { TimepickerOrientation } from './orientation';

// Boilerplate for applying mixins to MatTimepickerContent.
const _MatTimepickerContentBase = mixinColor(
Expand Down
2 changes: 1 addition & 1 deletion projects/mat-timepicker/src/lib/timepicker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { MatTimepicker } from './timepicker';
import {
MAT_TIMEPICKER_DEFAULT_OPTIONS,
TimepickerOpenAs,
TimepickerOrientation,
} from './timepicker-base';
import { MatTimepickerInput } from './timepicker-input';
import { MAT_TIMEPICKER_SCROLL_STRATEGY } from './timepicker-scroll-strategy';
Expand All @@ -40,6 +39,7 @@ import {
getDialCell,
getMinuteCellIndex,
} from './clock-dials.spec';
import { TimepickerOrientation } from './orientation';

describe('MatTimepicker', () => {
const SUPPORTS_INTL = typeof Intl != 'undefined';
Expand Down
1 change: 1 addition & 0 deletions projects/mat-timepicker/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ export * from './lib/timepicker-actions-default';
export * from './lib/adapter';
export * from './lib/timepicker-scroll-strategy';
export * from './lib/timepicker-intl';
export * from './lib/orientation';

0 comments on commit d38d307

Please sign in to comment.