Skip to content

Commit 2dcff44

Browse files
committed
feat(overlay): remove outlet from picker-base
1 parent 3e0818d commit 2dcff44

12 files changed

Lines changed: 7 additions & 102 deletions

File tree

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { IFormattingViews, IgxCalendarComponent, IgxCalendarHeaderTemplateDirect
99
import { IgxCalendarContainerComponent } from './calendar-container/calendar-container.component';
1010
import { IgxDatePickerComponent } from './date-picker.component';
1111
import {
12-
IgxOverlayOutletDirective,
1312
IgxOverlayService,
1413
OverlayCancelableEventArgs, OverlayClosingEventArgs, OverlayEventArgs, OverlaySettings,
1514
WEEKDAYS,
@@ -1064,7 +1063,6 @@ describe('IgxDatePicker', () => {
10641063
expect(datePicker.isDropdown).toEqual(true);
10651064
expect(datePicker.minValue).toEqual(undefined);
10661065
expect(datePicker.maxValue).toEqual(undefined);
1067-
expect(datePicker.outlet).toEqual(undefined);
10681066
expect(datePicker.specialDates).toEqual(null);
10691067
expect(datePicker.spinDelta).toEqual(undefined);
10701068
expect(datePicker.spinLoop).toEqual(true);
@@ -1152,15 +1150,6 @@ describe('IgxDatePicker', () => {
11521150
expect(datePicker.maxValue).toEqual(today);
11531151
datePicker.maxValue = '12/12/1998';
11541152
expect(datePicker.maxValue).toEqual('12/12/1998');
1155-
datePicker.outlet = null;
1156-
expect(datePicker.outlet).toEqual(null);
1157-
const mockEl: ElementRef = jasmine.createSpyObj<ElementRef>('mockEl', ['nativeElement']);
1158-
datePicker.outlet = mockEl;
1159-
expect(datePicker.outlet).toEqual(mockEl);
1160-
const mockOverlayDirective: IgxOverlayOutletDirective =
1161-
jasmine.createSpyObj<IgxOverlayOutletDirective>('mockEl', ['nativeElement']);
1162-
datePicker.outlet = mockOverlayDirective;
1163-
expect(datePicker.outlet).toEqual(mockOverlayDirective);
11641153
const specialDates: DateRangeDescriptor[] = [{ type: DateRangeType.Weekdays },
11651154
{ type: DateRangeType.Before, dateRange: [today] }];
11661155
datePicker.specialDates = specialDates;
@@ -1286,21 +1275,18 @@ describe('IgxDatePicker', () => {
12861275
datePicker.open();
12871276
expect(overlay.attach).toHaveBeenCalledWith(IgxCalendarContainerComponent, viewsContainerRef, baseDropdownSettings);
12881277
expect(overlay.show).toHaveBeenCalledWith(mockOverlayId);
1289-
const mockOutlet = {} as any;
1290-
datePicker.outlet = mockOutlet;
12911278
datePicker.open();
12921279
expect(overlay.attach).toHaveBeenCalledWith(
12931280
IgxCalendarContainerComponent,
12941281
viewsContainerRef,
1295-
Object.assign({}, baseDropdownSettings, { outlet: mockOutlet }),
1282+
Object.assign({}, baseDropdownSettings),
12961283
);
12971284
expect(overlay.show).toHaveBeenCalledWith(mockOverlayId);
12981285
let mockSettings: OverlaySettings = {
12991286
closeOnEscape: true,
13001287
closeOnOutsideClick: true,
13011288
modal: false
13021289
};
1303-
datePicker.outlet = null;
13041290
datePicker.open(mockSettings);
13051291
expect(overlay.attach).toHaveBeenCalledWith(
13061292
IgxCalendarContainerComponent,

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ import {
6363
DatePartDeltas,
6464
DatePart,
6565
isDateInRanges,
66-
IgxOverlayOutletDirective,
6766
I18N_FORMATTER
6867
} from 'igniteui-angular/core';
6968
import { IDatePickerValidationFailedEventArgs } from './date-picker.common';
@@ -243,26 +242,6 @@ export class IgxDatePickerComponent extends PickerBaseDirective implements Contr
243242
@Input()
244243
public spinDelta: Pick<DatePartDeltas, 'date' | 'month' | 'year'>;
245244

246-
/**
247-
* @deprecated Still supported and used by the overlay service when provided but will
248-
* be removed in a future version. Avoid using this property in new code and prefer
249-
* the default in-place rendering with the HTML Popover API.
250-
*
251-
* Gets/Sets the container used for the popup element.
252-
*
253-
* @remarks
254-
* `outlet` is an instance of `IgxOverlayOutletDirective` or an `ElementRef`.
255-
* @example
256-
* ```html
257-
* <div igxOverlayOutlet #outlet="overlay-outlet"></div>
258-
* //..
259-
* <igx-date-picker [outlet]="outlet"></igx-date-picker>
260-
* //..
261-
* ```
262-
*/
263-
@Input()
264-
public override outlet: IgxOverlayOutletDirective | ElementRef;
265-
266245
/**
267246
* Gets/Sets the value of `id` attribute.
268247
*
@@ -601,9 +580,6 @@ export class IgxDatePickerComponent extends PickerBaseDirective implements Contr
601580
if (this.isDropdown && this.inputGroupElement) {
602581
overlaySettings.target = this.inputGroupElement;
603582
}
604-
if (this.outlet) {
605-
overlaySettings.outlet = this.outlet;
606-
}
607583
this._overlayId = this._overlayService
608584
.attach(IgxCalendarContainerComponent, this.viewContainerRef, overlaySettings);
609585
this._overlayService.show(this._overlayId);

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
EditorProvider,
1313
IBaseCancelableBrowserEventArgs,
1414
IBaseEventArgs,
15-
IgxOverlayOutletDirective,
1615
IgxPickerClearComponent,
1716
IgxPickerToggleComponent,
1817
IToggleView,
@@ -185,24 +184,6 @@ export abstract class PickerBaseDirective implements IToggleView, EditorProvider
185184
this._weekStart = value;
186185
}
187186

188-
/**
189-
* @deprecated Still supported and used by the overlay service when provided but will
190-
* be removed in a future version. Avoid using this property in new code and prefer
191-
* the default in-place rendering with the HTML Popover API.
192-
*
193-
* The container used for the pop-up element.
194-
*
195-
* @example
196-
* ```html
197-
* <div igxOverlayOutlet #outlet="overlay-outlet"></div>
198-
* <!-- ... -->
199-
* <igx-date-picker [outlet]="outlet"></igx-date-picker>
200-
* <!-- ... -->
201-
* ```
202-
*/
203-
@Input()
204-
public outlet: IgxOverlayOutletDirective | ElementRef;
205-
206187
/**
207188
* Determines how the picker's input will be styled.
208189
*

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import {
3838
IgxPickerActionsDirective,
3939
isDateInRanges,
4040
PickerCalendarOrientation,
41-
IgxOverlayOutletDirective
4241
} from 'igniteui-angular/core';
4342
import { IgxCalendarContainerComponent } from '../date-picker/calendar-container/calendar-container.component';
4443
import { PickerBaseDirective } from '../date-picker/picker-base.directive';
@@ -366,26 +365,6 @@ export class IgxDateRangePickerComponent extends PickerBaseDirective
366365
@Input()
367366
public override placeholder = '';
368367

369-
/**
370-
* @deprecated Still supported and used by the overlay service when provided but will
371-
* be removed in a future version. Avoid using this property in new code and prefer
372-
* the default in-place rendering with the HTML Popover API.
373-
*
374-
* Gets/Sets the container used for the popup element.
375-
*
376-
* @remarks
377-
* `outlet` is an instance of `IgxOverlayOutletDirective` or an `ElementRef`.
378-
* @example
379-
* ```html
380-
* <div igxOverlayOutlet #outlet="overlay-outlet"></div>
381-
* //..
382-
* <igx-date-range-picker [outlet]="outlet"></igx-date-range-picker>
383-
* //..
384-
* ```
385-
*/
386-
@Input()
387-
public override outlet: IgxOverlayOutletDirective | ElementRef<any>;
388-
389368
/**
390369
* Show/hide week numbers
391370
*

projects/igniteui-angular/grids/core/src/cell.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
<ng-container [formGroup]="formGroup">
126126
<igx-date-picker
127127
[style.width.%]="100"
128-
[outlet]="grid.outlet"
129128
mode="dropdown"
130129
[locale]="grid.locale"
131130
[weekStart]="column.pipeArgs.weekStart"
@@ -142,7 +141,6 @@
142141
<ng-container [formGroup]="formGroup">
143142
<igx-time-picker
144143
[style.width.%]="100"
145-
[outlet]="grid.outlet"
146144
mode="dropdown"
147145
[locale]="grid.locale"
148146
[inputFormat]="column.editorOptions?.dateTimeFormat"

projects/igniteui-angular/grids/core/src/filtering/base/grid-filtering-row.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
<ng-template #defaultDateUI>
6161
<igx-date-picker #picker
6262
[(value)]="value"
63-
[outlet]="filteringService.grid.outlet"
6463
[locale]="filteringService.grid.locale"
6564
(click)="expression.condition.isUnary ? null : picker.open()"
6665
type="box"
@@ -109,7 +108,6 @@
109108
[displayFormat]="column.pipeArgs.format"
110109
[locale]="filteringService.grid.locale"
111110
[formatter]="column.formatter"
112-
[outlet]="filteringService.grid.outlet"
113111
type="box"
114112
[style.--ig-size]="filteringElementsSize"
115113
[placeholder]="placeholder"

projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-date-expression.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
[weekStart]="column.pipeArgs.weekStart ?? weekStart"
2525
[(ngModel)]="searchVal"
2626
[locale]="grid.locale"
27-
[outlet]="grid.outlet"
2827
(click)="picker.open()"
2928
[placeholder]="inputDatePlaceholder"
3029
[formatter]="column.formatter"
@@ -41,7 +40,6 @@
4140
<igx-time-picker #picker
4241
[(ngModel)]="searchVal"
4342
[locale]="grid.locale"
44-
[outlet]="grid.outlet"
4543
(click)="picker.open()"
4644
[placeholder]="inputTimePlaceholder"
4745
[displayFormat]="column.pipeArgs.format"

projects/igniteui-angular/grids/grid/src/expandable-cell.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
<ng-container [formGroup]="formGroup">
109109
<igx-date-picker
110110
[style.width.%]="100"
111-
[outlet]="grid.outlet"
112111
mode="dropdown"
113112
[locale]="grid.locale"
114113
[weekStart]="column.pipeArgs.weekStart"
@@ -125,7 +124,6 @@
125124
<ng-container [formGroup]="formGroup">
126125
<igx-time-picker
127126
[style.width.%]="100"
128-
[outlet]="grid.outlet"
129127
mode="dropdown"
130128
[locale]="grid.locale"
131129
[(value)]="editValue"

projects/igniteui-angular/grids/grid/src/grid-filtering-ui.spec.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,7 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
12981298
tick();
12991299
fix.detectChanges();
13001300

1301-
const outlet = document.getElementsByClassName('igx-grid__outlet')[0];
1302-
const calendar = outlet.getElementsByClassName('igx-calendar')[0];
1301+
const calendar = document.getElementsByClassName('igx-calendar')[0];
13031302

13041303
const sundayLabel = calendar.querySelectorAll('.igx-days-view__label')[0].textContent;
13051304

@@ -2104,8 +2103,7 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
21042103
fix.detectChanges();
21052104

21062105
// Click the today date.
2107-
const outlet = document.getElementsByClassName('igx-grid__outlet')[0];
2108-
let calendar = outlet.getElementsByClassName('igx-calendar')[0];
2106+
let calendar = document.getElementsByClassName('igx-calendar')[0];
21092107
const todayDayItem: HTMLElement = calendar.querySelector('.igx-days-view__date--current');
21102108
UIInteractions.simulateClickAndSelectEvent(todayDayItem.firstChild);
21112109
grid.filteringRow.onInputGroupFocusout();
@@ -2136,7 +2134,7 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
21362134
tick(100);
21372135
fix.detectChanges();
21382136

2139-
calendar = outlet.getElementsByClassName('igx-calendar')[0];
2137+
calendar = document.getElementsByClassName('igx-calendar')[0];
21402138

21412139
// View years
21422140
const yearView: HTMLElement = calendar.querySelectorAll('.igx-calendar-picker__date')[1] as HTMLElement;
@@ -2986,8 +2984,7 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
29862984
tick();
29872985
fix.detectChanges();
29882986

2989-
const outlet = document.getElementsByClassName('igx-grid__outlet')[0];
2990-
const calendar = outlet.getElementsByClassName('igx-calendar')[0];
2987+
const calendar = document.getElementsByClassName('igx-calendar')[0];
29912988

29922989
const currentDay = calendar.querySelector('.igx-days-view__date--current');
29932990

projects/igniteui-angular/grids/tree-grid/src/tree-cell.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
<ng-container [formGroup]="formGroup">
123123
<igx-date-picker
124124
[style.width.%]="100"
125-
[outlet]="grid.outlet"
126125
mode="dropdown"
127126
[locale]="grid.locale"
128127
[weekStart]="column.pipeArgs.weekStart"
@@ -139,7 +138,6 @@
139138
<ng-container [formGroup]="formGroup">
140139
<igx-time-picker
141140
[style.width.%]="100"
142-
[outlet]="grid.outlet"
143141
mode="dropdown"
144142
[locale]="grid.locale"
145143
[(value)]="editValue"

0 commit comments

Comments
 (0)