Skip to content

Commit 12edc0b

Browse files
authored
chore: update to latest version of MDC (#18343)
1 parent 4231d5b commit 12edc0b

File tree

5 files changed

+522
-513
lines changed

5 files changed

+522
-513
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@types/youtube": "^0.0.38",
5656
"@webcomponents/custom-elements": "^1.1.0",
5757
"core-js": "^2.6.9",
58-
"material-components-web": "5.0.0-canary.80a4d326f.0",
58+
"material-components-web": "5.0.0-canary.29b89dbc1.0",
5959
"rxjs": "^6.5.3",
6060
"systemjs": "0.19.43",
6161
"tslib": "^1.10.0",
@@ -128,7 +128,6 @@
128128
"minimatch": "^3.0.4",
129129
"minimist": "^1.2.0",
130130
"moment": "^2.18.1",
131-
"sass": "^1.24.4",
132131
"parse5": "^5.0.0",
133132
"protractor": "^5.4.2",
134133
"requirejs": "^2.3.6",
@@ -138,6 +137,7 @@
138137
"rollup-plugin-node-resolve": "^5.2.0",
139138
"rollup-plugin-sourcemaps": "^0.4.2",
140139
"run-sequence": "^1.2.2",
140+
"sass": "^1.24.4",
141141
"scss-bundle": "^3.0.2",
142142
"selenium-webdriver": "^3.6.0",
143143
"semver": "^6.3.0",

src/material-experimental/mdc-chips/chip-listbox.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,11 @@ export class MatChipListbox extends MatChipSet implements AfterContentInit, Cont
528528
private _listenToChipsSelection(): void {
529529
this._chipSelectionSubscription = this.chipSelectionChanges.subscribe(
530530
(chipSelectionChange: MatChipSelectionChange) => {
531-
this._chipSetFoundation.handleChipSelection(
532-
chipSelectionChange.source.id, chipSelectionChange.selected, false);
531+
this._chipSetFoundation.handleChipSelection({
532+
chipId: chipSelectionChange.source.id,
533+
selected: chipSelectionChange.selected,
534+
shouldIgnore: false
535+
});
533536
if (chipSelectionChange.isUserInput) {
534537
this._propagateChanges();
535538
}
@@ -558,4 +561,3 @@ export class MatChipListbox extends MatChipSet implements AfterContentInit, Cont
558561
static ngAcceptInputType_selectable: BooleanInput;
559562
static ngAcceptInputType_required: BooleanInput;
560563
}
561-

src/material-experimental/mdc-chips/chip-set.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export class MatChipSet extends _MatChipSetMixinBase implements AfterContentInit
103103
removeFocusFromChipAtIndex: () => {},
104104
isRTL: () => !!this._dir && this._dir.value === 'rtl',
105105
getChipListCount: () => this._chips.length,
106+
// TODO(mmalerba): Implement using LiveAnnouncer.
107+
announceMessage: () => {},
106108
};
107109

108110
/** The aria-describedby attribute on the chip list for improved a11y. */
@@ -232,7 +234,11 @@ export class MatChipSet extends _MatChipSetMixinBase implements AfterContentInit
232234
/** Subscribes to chip removal events. */
233235
private _listenToChipsRemove() {
234236
this._chipRemoveSubscription = this.chipRemoveChanges.subscribe((event: MatChipEvent) => {
235-
this._chipSetFoundation.handleChipRemoval(event.chip.id);
237+
this._chipSetFoundation.handleChipRemoval({
238+
chipId: event.chip.id,
239+
// TODO(mmalerba): Add removal message.
240+
removedAnnouncement: null,
241+
});
236242
});
237243
}
238244

@@ -254,7 +260,7 @@ export class MatChipSet extends _MatChipSetMixinBase implements AfterContentInit
254260
/** Subscribes to chip interaction events. */
255261
private _listenToChipsInteraction() {
256262
this._chipInteractionSubscription = this.chipInteractionChanges.subscribe((id: string) => {
257-
this._chipSetFoundation.handleChipInteraction(id);
263+
this._chipSetFoundation.handleChipInteraction({chipId: id});
258264
});
259265
}
260266

@@ -307,4 +313,3 @@ export class MatChipSet extends _MatChipSetMixinBase implements AfterContentInit
307313

308314
static ngAcceptInputType_disabled: BooleanInput;
309315
}
310-

src/material-experimental/mdc-chips/chip.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ export class MatChip extends _MatChipMixinBase implements AfterContentInit, Afte
309309
// so they will never be called
310310
getRootBoundingClientRect: () => this._elementRef.nativeElement.getBoundingClientRect(),
311311
getCheckmarkBoundingClientRect: () => null,
312+
getAttribute: (attr) => this._elementRef.nativeElement.getAttribute(attr),
312313
};
313314

314315
constructor(

0 commit comments

Comments
 (0)