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

chore: remove deprecated fxLayoutWrap #521

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/demo-app/app/docs-layout/flexOtherValues.demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {Component} from '@angular/core';
</div>
</mat-card-content>
<mat-card-footer>
<div class="hint">&lt;div fxLayout="row" fxLayoutWrap &gt;</div>
<div class="hint">&lt;div fxLayout="row wrap" &gt;</div>
</mat-card-footer>
</mat-card>
`
Expand Down
2 changes: 1 addition & 1 deletion src/demo-app/app/docs-layout/flexRowFillWrap.demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Component} from '@angular/core';
</mat-card-subtitle>
<mat-card-content>
<div class="containerX">
<div [fxLayout]="direction" fxLayoutWrap class="colored wrapped box"
<div [fxLayout]="direction + ' wrap'" class="colored wrapped box"
(click)="toggleDirection()" style="cursor: pointer;">

<div fxFlex="30"> fxFlex="30"</div>
Expand Down
4 changes: 2 additions & 2 deletions src/demo-app/app/github-issues/issue.9897.demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {Component} from '@angular/core';
<mat-card-subtitle>Safari bug with layout-wrap and flex % values</mat-card-subtitle>
<mat-card-content>
<div class="containerX">
<div fxLayout="row" [fxLayoutWrap]="wrapDirection" class="colored wrapped box">
<div [fxLayout]="'row ' + wrapDirection" class="colored wrapped box">

<div fxFlex="30"> fxFlex="30"</div>
<div fxFlex="45"> fxFlex="45"</div>
Expand All @@ -28,7 +28,7 @@ import {Component} from '@angular/core';
</div>
</mat-card-content>
<mat-card-footer>
<div class="hint">&lt;div fxLayout="row" fxLayoutWrap="{{ wrapDirection }}" &gt;</div>
<div class="hint">&lt;div [fxLayout]="'row ' + wrapDirection" &gt;</div>
</mat-card-footer>
</mat-card>
`
Expand Down
2 changes: 1 addition & 1 deletion src/demo-app/app/stack-overflow/columnOrder.demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {Component} from '@angular/core';
<mat-card-subtitle>Complex column ordering to wrap items to align to items above
</mat-card-subtitle>
<mat-card-content>
<div class="containerX" (click)="toggleDirection()" [fxLayout]="direction" fxLayoutWrap
<div class="containerX" (click)="toggleDirection()" [fxLayout]="direction + ' wrap'"
style="cursor: pointer;">
<div class="one flexitem "> 1
<div class="markup">&lt;div fxFlexOrder="1"&gt;</div>
Expand Down
12 changes: 3 additions & 9 deletions src/lib/api/flexbox/flex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {MediaChange} from '../../media-query/media-change';
import {MediaMonitor} from '../../media-query/media-monitor';

import {LayoutDirective} from './layout';
import {LayoutWrapDirective} from './layout-wrap';
import {validateBasis} from '../../utils/basis-validator';
import {isFlowHorizontal} from '../../utils/layout-validator';

Expand Down Expand Up @@ -80,13 +79,12 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
@Input('fxFlex.lt-xl') set flexLtXl(val) { this._cacheInput('flexLtXl', val); };
/* tslint:enable */

// Note: Explicitly @SkipSelf on LayoutDirective and LayoutWrapDirective because we are looking
// Note: Explicitly @SkipSelf on LayoutDirective because we are looking
// for the parent flex container for this flex item.
constructor(monitor: MediaMonitor,
elRef: ElementRef,
renderer: Renderer2,
@Optional() @SkipSelf() protected _container: LayoutDirective,
@Optional() @SkipSelf() protected _wrap: LayoutWrapDirective) {
@Optional() @SkipSelf() protected _container: LayoutDirective) {

super(monitor, elRef, renderer);

Expand Down Expand Up @@ -230,14 +228,10 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
basis = '0%';
}

// Set max-width = basis if using layout-wrap
// tslint:disable-next-line:max-line-length
// @see https://github.com/philipwalton/flexbugs#11-min-and-max-size-declarations-are-ignored-when-wrapping-flex-items

css = extendObject(clearStyles, { // fix issue #5345
'flex-grow' : `${grow}`,
'flex-shrink' : `${shrink}`,
'flex-basis' : (isValue || this._wrap) ? `${basis}` : '100%'
'flex-basis' : isValue ? `${basis}` : '100%'
});
break;
}
Expand Down
5 changes: 2 additions & 3 deletions src/lib/api/flexbox/layout-gap.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ describe('layout-gap directive', () => {
let styles = ['.col1 { display:none !important;'];
let template = `
<div class='container'
[fxLayout]='direction'
[fxLayoutGap]='gap'
fxLayoutWrap>
[fxLayout]='direction + " wrap"'
[fxLayoutGap]='gap'>
<div fxFlex class='col1'>Div 1</div>
<div fxFlex class='col2'>Div 2</div>
<div fxFlex class='col3'>Div 2</div>
Expand Down
149 changes: 0 additions & 149 deletions src/lib/api/flexbox/layout-wrap.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/lib/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export * from './core/responsive-activation';
export * from './flexbox/layout';
export * from './flexbox/layout-align';
export * from './flexbox/layout-gap';
export * from './flexbox/layout-wrap';

export * from './flexbox/flex';
export * from './flexbox/flex-align';
Expand Down
2 changes: 0 additions & 2 deletions src/lib/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {FlexFillDirective} from './api/flexbox/flex-fill';
import {FlexOffsetDirective} from './api/flexbox/flex-offset';
import {FlexOrderDirective} from './api/flexbox/flex-order';
import {LayoutAlignDirective} from './api/flexbox/layout-align';
import {LayoutWrapDirective} from './api/flexbox/layout-wrap';
import {LayoutGapDirective} from './api/flexbox/layout-gap';

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

const ALL_DIRECTIVES = [
LayoutDirective,
LayoutWrapDirective,
LayoutGapDirective,
LayoutAlignDirective,
FlexDirective,
Expand Down