Skip to content

Commit

Permalink
feat: upgrade to material-web-components 0.27.0
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
* mdcSelect has been removed for now, will be readded when
  upgrading to material-web-components 0.34.0
* mdcListItemTextSecondary was renamed to mdcListItemSecondaryText
* MdcListItemTextSecondaryDirective was renamed to
  MdcListItemSecondaryTextDirective
  • Loading branch information
gjdev committed May 11, 2018
1 parent 6142d1c commit b4e40c1
Show file tree
Hide file tree
Showing 27 changed files with 371 additions and 1,151 deletions.
547 changes: 164 additions & 383 deletions bundle/package-lock.json

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"build": "npm run clean && npm run ngc && npm run bundle && npm run copy-types && npm run copy-metadata && npm run apidocs"
},
"dependencies": {
"material-components-web": "^0.26.0"
"material-components-web": "^0.27.0"
},
"peerDependencies": {
"@angular/common": ">=4.0.0",
Expand All @@ -43,8 +43,8 @@
"@angular/forms": "^5.2.10",
"@angular/router": "^5.2.10",
"@types/glob": "^5.0.35",
"@types/jasmine": "^2.8.6",
"@types/node": "^10.0.2",
"@types/jasmine": "^2.8.7",
"@types/node": "^10.0.3",
"@types/rollup": "^0.54.0",
"@types/selenium-webdriver": "^3.0.8",
"codelyzer": "^4.3.0",
Expand All @@ -57,12 +57,11 @@
"jasmine-spec-reporter": "^4.2.1",
"karma": "^2.0.2",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.1",
"karma-coverage": "^1.1.2",
"karma-jasmine": "^1.1.2",
"karma-mocha-reporter": "^2.2.4",
"karma-remap-istanbul": "0.6.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^3.0.0",
"remap-istanbul": "^0.11.1",
"rimraf": "^2.6.2",
"rollup": "^0.58.2",
Expand All @@ -73,7 +72,7 @@
"source-map-explorer": "^1.4.0",
"ts-helpers": "^1.1.2",
"ts-node": "^3.3.0",
"tslint": "^5.9.1",
"tslint": "^5.10.0",
"typedoc": "^0.11.1",
"typescript": "2.4.2",
"zone.js": "^0.8.26"
Expand Down
6 changes: 6 additions & 0 deletions bundle/src/components/drawer/mdc.drawer.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ export class MdcDrawerContainerDirective implements AfterContentInit, OnDestroy
updateCssVariable: (value: string) => {
if (util.supportsCssCustomProperties())
this._elm.nativeElement.style.setProperty(MDCTemporaryDrawerFoundation.strings.OPACITY_VAR_NAME, value);
},
eventTargetHasClass: (target: HTMLElement, className: string) => {
if (target === this._elm.nativeElement && this.type === 'temporary' && className === 'mdc-temporary-drawer')
// make sure this returns true even if class HostBinding is not effectuated yet:
return true;
return target.classList.contains(className);
}
};
this.mdcAdapter = adapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export interface MdcTemporaryDrawerAdapter extends MdcSlidableDrawerAdapter {
addBodyClass: (className: string) => void;
removeBodyClass: (className: string) => void;
updateCssVariable: (value: string) => void;
eventTargetHasClass: (target: HTMLElement, className: string) => boolean;
}
6 changes: 3 additions & 3 deletions bundle/src/components/list/mdc.list.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ export class MdcListItemTextDirective {
* Directive for the secondary text of an item with "two line list" styling.
*/
@Directive({
selector: '[mdcListItemTextSecondary]',
selector: '[mdcListItemSecondaryText]',
})
export class MdcListItemTextSecondaryDirective {
@HostBinding('class.mdc-list-item__text__secondary') _cls = true;
export class MdcListItemSecondaryTextDirective {
@HostBinding('class.mdc-list-item__secondary-text') _cls = true;

constructor() {}
}
Expand Down
1 change: 1 addition & 0 deletions bundle/src/components/menu/mdc.simple.menu.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface MdcSimpleMenuAdapter {
hasClass: (className: string) => boolean,
hasNecessaryDom: () => boolean,
getAttributeForEventTarget: (target: Element, attrName: string) => string,
eventTargetHasClass: (target: HTMLElement, className: string) => boolean;
getInnerDimensions: () => {width: number, height: number},
hasAnchor: () => boolean,
getAnchorDimensions: () => {width: number, height: number, top: number, right: number, bottom: number, left: number},
Expand Down
1 change: 1 addition & 0 deletions bundle/src/components/menu/mdc.simple.menu.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export class MdcSimpleMenuDirective implements AfterContentInit, OnDestroy {
},
hasNecessaryDom: () => this._listQuery.length != 0,
getAttributeForEventTarget: (target: Element, attrName: string) => target.getAttribute(attrName),
eventTargetHasClass: (target: HTMLElement, className: string) => target.classList.contains(className),
getInnerDimensions: () => {
let elm = this._list._elm.nativeElement;
return {width: elm.offsetWidth, height: elm.offsetHeight};
Expand Down
33 changes: 0 additions & 33 deletions bundle/src/components/select/mdc.select.adapter.ts

This file was deleted.

Loading

0 comments on commit b4e40c1

Please sign in to comment.