Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 9f32c7b

Browse files
CaerusKaruThomasBurleson
authored andcommitted
chore(api): remove deprecated fxLayoutWrap
Closes #521, #565. Fixes #564.
1 parent 703add0 commit 9f32c7b

File tree

9 files changed

+9
-173
lines changed

9 files changed

+9
-173
lines changed

src/demo-app/app/docs-layout/flexOtherValues.demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {Component} from '@angular/core';
2323
</div>
2424
</mat-card-content>
2525
<mat-card-footer>
26-
<div class="hint">&lt;div fxLayout="row" fxLayoutWrap &gt;</div>
26+
<div class="hint">&lt;div fxLayout="row wrap" &gt;</div>
2727
</mat-card-footer>
2828
</mat-card>
2929
`

src/demo-app/app/docs-layout/flexRowFillWrap.demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {Component} from '@angular/core';
1010
</mat-card-subtitle>
1111
<mat-card-content>
1212
<div class="containerX">
13-
<div [fxLayout]="direction" fxLayoutWrap class="colored wrapped box"
13+
<div [fxLayout]="direction + ' wrap'" class="colored wrapped box"
1414
(click)="toggleDirection()" style="cursor: pointer;">
1515
1616
<div fxFlex="30"> fxFlex="30"</div>

src/demo-app/app/github-issues/issue.9897.demo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {Component} from '@angular/core';
1414
<mat-card-subtitle>Safari bug with layout-wrap and flex % values</mat-card-subtitle>
1515
<mat-card-content>
1616
<div class="containerX">
17-
<div fxLayout="row" [fxLayoutWrap]="wrapDirection" class="colored wrapped box">
17+
<div [fxLayout]="'row ' + wrapDirection" class="colored wrapped box">
1818
1919
<div fxFlex="30"> fxFlex="30"</div>
2020
<div fxFlex="45"> fxFlex="45"</div>
@@ -28,7 +28,7 @@ import {Component} from '@angular/core';
2828
</div>
2929
</mat-card-content>
3030
<mat-card-footer>
31-
<div class="hint">&lt;div fxLayout="row" fxLayoutWrap="{{ wrapDirection }}" &gt;</div>
31+
<div class="hint">&lt;div [fxLayout]="'row ' + wrapDirection" &gt;</div>
3232
</mat-card-footer>
3333
</mat-card>
3434
`

src/demo-app/app/stack-overflow/columnOrder.demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {Component} from '@angular/core';
1414
<mat-card-subtitle>Complex column ordering to wrap items to align to items above
1515
</mat-card-subtitle>
1616
<mat-card-content>
17-
<div class="containerX" (click)="toggleDirection()" [fxLayout]="direction" fxLayoutWrap
17+
<div class="containerX" (click)="toggleDirection()" [fxLayout]="direction + ' wrap'"
1818
style="cursor: pointer;">
1919
<div class="one flexitem "> 1
2020
<div class="markup">&lt;div fxFlexOrder="1"&gt;</div>

src/lib/api/flexbox/flex.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {MediaChange} from '../../media-query/media-change';
2727
import {MediaMonitor} from '../../media-query/media-monitor';
2828

2929
import {LayoutDirective} from './layout';
30-
import {LayoutWrapDirective} from './layout-wrap';
3130
import {validateBasis} from '../../utils/basis-validator';
3231
import {isFlowHorizontal} from '../../utils/layout-validator';
3332

@@ -82,13 +81,12 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
8281
@Input('fxFlex.lt-xl') set flexLtXl(val) { this._cacheInput('flexLtXl', val); };
8382
/* tslint:enable */
8483

85-
// Note: Explicitly @SkipSelf on LayoutDirective and LayoutWrapDirective because we are looking
84+
// Note: Explicitly @SkipSelf on LayoutDirective because we are looking
8685
// for the parent flex container for this flex item.
8786
constructor(monitor: MediaMonitor,
8887
elRef: ElementRef,
8988
renderer: Renderer2,
9089
@Optional() @SkipSelf() protected _container: LayoutDirective,
91-
@Optional() @SkipSelf() protected _wrap: LayoutWrapDirective,
9290
@Inject(PLATFORM_ID) platformId: Object) {
9391

9492
super(monitor, elRef, renderer, platformId);
@@ -233,14 +231,10 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
233231
basis = '0%';
234232
}
235233

236-
// Set max-width = basis if using layout-wrap
237-
// tslint:disable-next-line:max-line-length
238-
// @see https://github.com/philipwalton/flexbugs#11-min-and-max-size-declarations-are-ignored-when-wrapping-flex-items
239-
240234
css = extendObject(clearStyles, { // fix issue #5345
241235
'flex-grow' : `${grow}`,
242236
'flex-shrink' : `${shrink}`,
243-
'flex-basis' : (isValue || this._wrap) ? `${basis}` : '100%'
237+
'flex-basis' : isValue ? `${basis}` : '100%'
244238
});
245239
break;
246240
}

src/lib/api/flexbox/layout-gap.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,8 @@ describe('layout-gap directive', () => {
247247
let styles = ['.col1 { display:none !important;'];
248248
let template = `
249249
<div class='container'
250-
[fxLayout]='direction'
251-
[fxLayoutGap]='gap'
252-
fxLayoutWrap>
250+
[fxLayout]='direction + " wrap"'
251+
[fxLayoutGap]='gap'>
253252
<div fxFlex class='col1'>Div 1</div>
254253
<div fxFlex class='col2'>Div 2</div>
255254
<div fxFlex class='col3'>Div 2</div>

src/lib/api/flexbox/layout-wrap.ts

Lines changed: 0 additions & 154 deletions
This file was deleted.

src/lib/api/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export * from './core/responsive-activation';
1212
export * from './flexbox/layout';
1313
export * from './flexbox/layout-align';
1414
export * from './flexbox/layout-gap';
15-
export * from './flexbox/layout-wrap';
1615

1716
export * from './flexbox/flex';
1817
export * from './flexbox/flex-align';

src/lib/module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {FlexFillDirective} from './api/flexbox/flex-fill';
2525
import {FlexOffsetDirective} from './api/flexbox/flex-offset';
2626
import {FlexOrderDirective} from './api/flexbox/flex-order';
2727
import {LayoutAlignDirective} from './api/flexbox/layout-align';
28-
import {LayoutWrapDirective} from './api/flexbox/layout-wrap';
2928
import {LayoutGapDirective} from './api/flexbox/layout-gap';
3029

3130
import {ShowHideDirective} from './api/ext/show-hide';
@@ -43,7 +42,6 @@ import {ImgSrcDirective} from './api/ext/img-src';
4342

4443
const ALL_DIRECTIVES = [
4544
LayoutDirective,
46-
LayoutWrapDirective,
4745
LayoutGapDirective,
4846
LayoutAlignDirective,
4947
FlexDirective,

0 commit comments

Comments
 (0)