Skip to content

Commit

Permalink
feature: upgrade to material-components-web 0.26.0
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
* Upgrade to material-components-web 0.26.0
* Rename directive mdcTextFieldHelptext to mdcTextFieldHelperText
(follows upstream name change in @material/textfield)
* Rename mdcTextField property helptext to helperText (follows upstream
name change in @material/textfield)
* Rename mdcTextField property isValid to valid
* Rename mdcTextField property boxed to box
* Rename mdcTextFieldHelperText exportAs mdcHelptext to mdcHelperText
* Rename mdcTextFieldHelperText property isValidation to validation
* Rename mdcTextFieldHelperText property isPersistent to persistent
  • Loading branch information
gjdev committed Dec 4, 2017
1 parent d2284a2 commit 9d4859b
Show file tree
Hide file tree
Showing 13 changed files with 1,839 additions and 1,186 deletions.
1,271 changes: 910 additions & 361 deletions bundle/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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.25.0"
"material-components-web": "^0.26.0"
},
"peerDependencies": {
"@angular/common": ">=4.0.0",
Expand Down
45 changes: 31 additions & 14 deletions bundle/src/components/text-field/mdc.text-field.adapter.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
import { MDCTextFieldBottomLineFoundation } from '@material/textfield/bottom-line';
import { MDCTextFieldHelperTextFoundation } from '@material/textfield/helper-text';

/** @docs-private */
export interface MdcTextFieldHelperTextAdapter {
addClass: (className: string) => void,
removeClass: (className: string) => void,
hasClass: (className: string) => void,
setAttr: (name: string, value: string) => void,
removeAttr: (name: string) => void,
setContent: (content: string) => void
}

/** @docs-private */
export interface MdcTextFieldBottomLineAdapter {
addClass: (className: string) => void,
removeClass: (className: string) => void,
setAttr: (name: string, value: string) => void,
registerEventHandler: (evtType: string, handler: EventListener) => void,
deregisterEventHandler: (evtType: string, handler: EventListener) => void,
notifyAnimationEnd: () => void
}

/** @docs-private */
export interface MdcTextFieldAdapter {
addClass: (className: string) => void;
removeClass: (className: string) => void;
addClassToLabel: (className: string) => void;
removeClassFromLabel: (className: string) => void;
addClass: (className: string) => void,
removeClass: (className: string) => void,
addClassToLabel: (className: string) => void,
removeClassFromLabel: (className: string) => void,
setIconAttr: (name: string, value: string) => void,
eventTargetHasClass: (target: HTMLElement, className: string) => void,
registerTextFieldInteractionHandler: (evtType: string, handler: EventListener) => void,
deregisterTextFieldInteractionHandler: (evtType: string, handler: EventListener) => void,
notifyIconAction: () => void,
addClassToBottomLine: (className: string) => void;
removeClassFromBottomLine: (className: string) => void;
addClassToHelptext: (className: string) => void;
removeClassFromHelptext: (className: string) => void;
helptextHasClass: (className: string) => boolean;
registerInputInteractionHandler: (evtType: string, handler: EventListener) => void,
deregisterInputInteractionHandler: (evtType: string, handler: EventListener) => void,
registerTransitionEndHandler: (handler: EventListener) => void,
deregisterTransitionEndHandler: (handler: EventListener) => void,
setBottomLineAttr: (attr: string, value: string) => void,
setHelptextAttr: (name: string, value: string) => void,
removeHelptextAttr: (name: string) => void,
registerBottomLineEventHandler: (evtType: string, handler: EventListener) => void,
deregisterBottomLineEventHandler: (evtType: string, handler: EventListener) => void,
getNativeInput: () => {value: string, disabled: boolean, badInput: boolean, checkValidity: () => boolean}
getBottomLineFoundation: () => MDCTextFieldBottomLineFoundation,
getHelperTextFoundation: () => MDCTextFieldHelperTextFoundation
}
Loading

0 comments on commit 9d4859b

Please sign in to comment.