Skip to content

Commit 382635a

Browse files
kdinevCopilotdamyanpetevrkaraivanov
authored
fix(*): moving the IgxOverlayOutletDirective and some renamed exports and fixing migration (#16506)
--------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: damyanpetev <[email protected]> Co-authored-by: Radoslav Karaivanov <[email protected]>
1 parent 18587fd commit 382635a

File tree

66 files changed

+1359
-1031
lines changed

Some content is hidden

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

66 files changed

+1359
-1031
lines changed

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
"projects/igniteui-angular/test.css"
197197
],
198198
"assets": [
199-
"projects/igniteui-angular/src/assets"
199+
"projects/igniteui-angular/test-utils/assets"
200200
],
201201
"stylePreprocessorOptions": {
202202
"includePaths": [

package-lock.json

Lines changed: 401 additions & 263 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/igniteui-angular/accordion/src/accordion/public_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export * from './accordion.component';
55
/* Imports that cannot be resolved from IGX_EXPANSION_PANEL_DIRECTIVES spread
66
NOTE: Do not remove! Issue: https://github.com/IgniteUI/igniteui-angular/issues/13310
77
*/
8-
import {
8+
import {
99
IgxExpansionPanelComponent,
1010
IgxExpansionPanelHeaderComponent,
1111
IgxExpansionPanelBodyComponent,

projects/igniteui-angular/carousel/src/carousel/carousel.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
import { HammerGestureConfig, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
2828
import { merge, Subject } from 'rxjs';
2929
import { takeUntil } from 'rxjs/operators';
30-
import { CarouselResourceStringsEN, ICarouselResourceStrings } from 'igniteui-angular/core';
30+
import { CarouselResourceStringsEN, ICarouselResourceStrings, ɵIgxDirectionality } from 'igniteui-angular/core';
3131
import { first, IBaseEventArgs, last, PlatformUtil } from 'igniteui-angular/core';
3232
import { IgxAngularAnimationService } from 'igniteui-angular/core';
3333
import { AnimationService } from 'igniteui-angular/core';
@@ -39,7 +39,6 @@ import { IgxButtonDirective } from 'igniteui-angular/directives';
3939
import { getCurrentResourceStrings } from 'igniteui-angular/core';
4040
import { HammerGesturesManager } from 'igniteui-angular/core';
4141
import { CarouselAnimationType, CarouselIndicatorsOrientation } from './enums';
42-
import { ɵIgxDirectionality } from 'igniteui-angular/core';
4342

4443
let NEXT_ID = 0;
4544

projects/igniteui-angular/core/src/services/overlay/overlay.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ import {
1212
import { fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing';
1313
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
1414
import { first } from 'rxjs/operators';
15-
import { IgxAvatarComponent } from '../../../../avatar/src/avatar/avatar.component';
16-
import { IgxCalendarComponent } from '../../../../calendar/src/public_api';
17-
import { IgxCalendarContainerComponent } from '../../../../date-picker/src/date-picker/calendar-container/calendar-container.component';
1815
import { UIInteractions } from '../../../../test-utils/ui-interactions.spec';
1916
import { IgxAngularAnimationService } from '../animation/angular-animation-service';
2017
import { AnimationService } from '../animation/animation';
21-
import { IgxOverlayOutletDirective, IgxToggleDirective } from '../../../../directives/src/directives/toggle/toggle.directive';
2218
import { IgxOverlayService } from './overlay';
2319
import { ContainerPositionStrategy } from './position';
2420
import { AutoPositionStrategy } from './position/auto-position-strategy';
@@ -33,6 +29,7 @@ import { CloseScrollStrategy } from './scroll/close-scroll-strategy';
3329
import { NoOpScrollStrategy } from './scroll/NoOpScrollStrategy';
3430
import {
3531
HorizontalAlignment,
32+
IgxOverlayOutletDirective,
3633
OffsetMode,
3734
OverlayCancelableEventArgs,
3835
OverlayEventArgs,
@@ -42,6 +39,10 @@ import {
4239
VerticalAlignment
4340
} from './utilities';
4441
import { scaleInVerTop, scaleOutVerTop } from 'igniteui-angular/animations';
42+
import { IgxCalendarContainerComponent } from 'igniteui-angular/date-picker';
43+
import { IgxAvatarComponent } from 'igniteui-angular/avatar';
44+
import { IgxCalendarComponent } from 'igniteui-angular/calendar';
45+
import { IgxToggleDirective } from 'igniteui-angular/directives';
4546

4647
const CLASS_OVERLAY_CONTENT = 'igx-overlay__content';
4748
const CLASS_OVERLAY_CONTENT_MODAL = 'igx-overlay__content--modal';

projects/igniteui-angular/core/src/services/overlay/utilities.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
import { AnimationReferenceMetadata } from '@angular/animations';
2-
import { ComponentRef, ElementRef, Injector, NgZone } from '@angular/core';
2+
import { ComponentRef, Directive, ElementRef, Injector, NgZone } from '@angular/core';
33
import { CancelableBrowserEventArgs, CancelableEventArgs, cloneValue, IBaseEventArgs } from '../../core/utils';
44
import { AnimationPlayer } from '../animation/animation';
55
import { IPositionStrategy } from './position/IPositionStrategy';
66
import { IScrollStrategy } from './scroll';
77

88
/**
9-
* Interface representing an overlay outlet directive.
10-
* The actual implementation is in igniteui-angular/directives.
9+
* Mark an element as an igxOverlay outlet container.
10+
* Directive instance is exported as `overlay-outlet` to be assigned to templates variables:
11+
* ```html
12+
* <div igxOverlayOutlet #outlet="overlay-outlet"></div>
13+
* ```
1114
*/
12-
export interface IgxOverlayOutletDirective {
13-
element: ElementRef;
14-
readonly nativeElement: HTMLElement;
15+
@Directive({
16+
exportAs: 'overlay-outlet',
17+
selector: '[igxOverlayOutlet]',
18+
standalone: true
19+
})
20+
export class IgxOverlayOutletDirective {
21+
constructor(public element: ElementRef<HTMLElement>) { }
22+
23+
/** @hidden */
24+
public get nativeElement() {
25+
return this.element.nativeElement;
26+
}
1527
}
1628

1729
/* blazorAlternateName: GridHorizontalAlignment */

projects/igniteui-angular/core/src/services/public_api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export * from './overlay/position';
1515
export * from './overlay/scroll';
1616
export {
1717
AbsolutePosition, ConnectedFit, HorizontalAlignment, OffsetMode, OverlayAnimationEventArgs, OverlayCancelableEventArgs, OverlayClosingEventArgs,
18-
OverlayCreateSettings, OverlayEventArgs, OverlaySettings, Point, PositionSettings, RelativePosition, RelativePositionStrategy, Size, VerticalAlignment, Util
18+
OverlayCreateSettings, OverlayEventArgs, OverlaySettings, Point, PositionSettings, RelativePosition, RelativePositionStrategy, Size, VerticalAlignment, Util,
19+
IgxOverlayOutletDirective
1920
} from './overlay/utilities';
2021
export * from './transaction/base-transaction';
2122
export * from './transaction/hierarchical-transaction';

projects/igniteui-angular/date-picker/src/date-picker/date-picker.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { IFormattingViews, IgxCalendarComponent, IgxCalendarHeaderTemplateDirect
99
import { IgxCalendarContainerComponent } from './calendar-container/calendar-container.component';
1010
import { IgxDatePickerComponent } from './date-picker.component';
1111
import {
12+
IgxOverlayOutletDirective,
1213
IgxOverlayService,
1314
OverlayCancelableEventArgs, OverlayClosingEventArgs, OverlayEventArgs, OverlaySettings,
1415
WEEKDAYS
@@ -18,7 +19,6 @@ import { By } from '@angular/platform-browser';
1819
import { PickerCalendarOrientation, PickerHeaderOrientation, PickerInteractionMode } from '../../../core/src/date-common/types';
1920
import { DatePart } from '../../../core/src/date-common/public_api';
2021
import { DateRangeDescriptor, DateRangeType } from 'igniteui-angular/core';
21-
import { IgxOverlayOutletDirective } from '../../../directives/src/directives/toggle/toggle.directive';
2222
import { IgxPickerClearComponent, IgxPickerToggleComponent } from '../../../core/src/date-common/public_api';
2323
import { DateTimeUtil } from '../../../core/src/date-common/util/date-time.util';
2424
import { registerLocaleData } from "@angular/common";

projects/igniteui-angular/date-picker/src/date-picker/date-picker.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {
4343
import { fromEvent, Subscription, noop, MonoTypeOperatorFunction } from 'rxjs';
4444
import { filter, takeUntil } from 'rxjs/operators';
4545

46-
import { IgxDateTimeEditorDirective, IgxOverlayOutletDirective, IgxTextSelectionDirective } from 'igniteui-angular/directives';
46+
import { IgxDateTimeEditorDirective, IgxTextSelectionDirective } from 'igniteui-angular/directives';
4747
import {
4848
AbsoluteScrollStrategy,
4949
AutoPositionStrategy,
@@ -64,7 +64,8 @@ import {
6464
DateTimeUtil,
6565
DatePartDeltas,
6666
DatePart,
67-
isDateInRanges
67+
isDateInRanges,
68+
IgxOverlayOutletDirective
6869
} from 'igniteui-angular/core';
6970
import { IDatePickerValidationFailedEventArgs } from './date-picker.common';
7071
import { IgxIconComponent } from 'igniteui-angular/icon';

projects/igniteui-angular/date-picker/src/date-picker/picker-base.directive.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { getLocaleFirstDayOfWeek } from "@angular/common";
88
import { merge, Subject } from 'rxjs';
99
import { takeUntil } from 'rxjs/operators';
1010
import { IGX_INPUT_GROUP_TYPE, IgxInputGroupComponent, IgxInputGroupType, IgxPrefixDirective, IgxSuffixDirective } from 'igniteui-angular/input-group';
11-
import { DateRange, EditorProvider, IBaseCancelableBrowserEventArgs, IBaseEventArgs, IgxPickerClearComponent, IgxPickerToggleComponent, IToggleView, OverlaySettings, PickerHeaderOrientation, PickerInteractionMode, WEEKDAYS } from 'igniteui-angular/core';
12-
import { IgxOverlayOutletDirective } from 'igniteui-angular/directives';
11+
import { DateRange, EditorProvider, IBaseCancelableBrowserEventArgs, IBaseEventArgs, IgxOverlayOutletDirective, IgxPickerClearComponent, IgxPickerToggleComponent, IToggleView, OverlaySettings, PickerHeaderOrientation, PickerInteractionMode, WEEKDAYS } from 'igniteui-angular/core';
1312

1413
@Directive()
1514
export abstract class PickerBaseDirective implements IToggleView, EditorProvider, AfterViewInit, AfterContentChecked, OnDestroy {

0 commit comments

Comments
 (0)