npm @angular/youtube-player 9.0.0
tungsten-hombre

latest releases: 18.0.0-next.6, 17.3.6, 18.0.0-next.5...
4 years ago

Highlights

New @angular/cdk/testing infrastructure and Angular Material test harnesses

Testing components has historically relied on using implementation details such as CSS selectors to
find components and to trigger events. This meant that whenever a component library changed its
implementation, all of the tests relying on those components would need to be updated.

In version 9, we are introducing component harnesses, which offer an alternative way to test
components. By abstracting away the implementation details, you can make sure your unit tests are
correctly scoped and less brittle.

Most of Angular Material's components can now be tested via harnesses, and we are making harnesses
available to any component author as part of the Component Dev Kit (CDK).

Here's an example test before harnesses:

 it('should switch to bug report template', async () => {
    expect(fixture.debugElement.query('bug-report-form')).toBeNull();
    const selectTrigger = fixture.debugElement.query(By.css('.mat-select-trigger'));
    selectTrigger.triggerEventHandler('click', {});
    fixture.detectChanges();
    await fixture.whenStable();
    const options = document.querySelectorAll('.mat-select-panel mat-option');
    options[1].click(); // Click the second option, "Bug".
    fixture.detectChanges();
    await fixture.whenStable();
    expect(fixture.debugElement.query('bug-report-form')).not.toBeNull();
  });

And the same test with harnesses:

 it('should switch to bug report template', async () => {
    expect(fixture.debugElement.query('bug-report-form')).toBeNull();
    const select = await loader.getHarness(MatSelect);
    await select.clickOptions({text: 'Bug'});
    expect(fixture.debugElement.query('bug-report-form')).not.toBeNull();
  });

Learn more about Angular Material's component harnesses or building your own with the CDK.

New @angular/google-maps package!

Earlier this year, we changed the name of this repo to "angular/components" to emphasize our goal
to provide more than Material Design components. The 9.0.0 release includes one of the next new
features in that regard- a new package that wraps the Google Maps JavaScript API in an easy-to-use Angular component.

You can see the documentation on GitHub for the time being.

Big thanks to @mbehrlich for contributing this!

New cdk/clipboard subpackage containing helpers for working with the clipboard.

This new capability for @angular/cdk provides some convenient helpers for dealing with
the clipboard. See the documentation for more information.

Big thanks to @xkxx for contributing this!

Breaking changes

We no longer have a direct depedency on tslib. Instead it is now listed a peerDependency.
This matches Angular framework.

Users not using the Angular CLI will need to manually install tslib via;

yarn add tslib
# or
npm install tslib --save

material

Deprecations:

  • checkbox: MAT_CHECKBOX_CLICK_ACTION is deprecated, use MAT_CHECKBOX_DEFAULT_OPTIONS
bug fix autocomplete: not picking up indirect descendant option g… (#17510) (f0df308)
bug fix drag-drop: coerce drop list autoScrollDisabled input (#17480) (e2de5e6), closes #17475
bug fix grid-list: not picking up indirect descendant lines (#17530) (044a360)
bug fix list: Do not rely on input binding order (#17501) (4301fb0), closes #17500
bug fix list: selection list option not picking up indirect desce… (#17514) (ee863b2)
bug fix stepper: not picking up indirect descendant elements (#17529) (5f0f2dc)
bug fix tree: not picking up indirect descendant node definitions (#17522) (7f1c2ca)
feature checkbox: add options defaults config (#17473) (3fdab10)
bug fix button-toggle: indirect descendant buttons not picked up… (#17451) (67b009f)
bug fix chips: don't set aria-required when element doesn't have… (#17425) (939c18d), closes #17397
bug fix dialog: don't move focus if it was moved during close ani… (#17300) (3476f51), closes #17296
bug fix drag-drop: global resize subscription not cleared (#17257) (f10b222), closes #17255
bug fix drag-drop: not picking up indirect descendant items (#17226) (ef92091), closes #17047
bug fix drag-drop: only call enterPredicate when pointer is inside drop list (#17310) (9fe32c0), closes #17266
bug fix drag-drop: unable to drop into connected list inside shad… (#17424) (593a06c), closes #16899 #17422
bug fix form-field: annotate base class with Directive for Ivy (#17457) (4663d8f), closes #17022
bug fix form-field: ensure that descendants are picked up in Ivy (#17439) (1d40ec9)
bug fix form-field: outline gap no calculated in shadow dom (#17303) (1b94295), closes #17262
bug fix menu: trigger should aria-controls panel (#17365) (405f5d0)
bug fix schematics: secondary entry point migration not working against v9 (#17452) (5e10833), closes #17433
bug fix select: not picking up indirect descendant option groups (#17458) (d773cce)
bug fix sidenav: container not picking up indirect descendant sid… (#17453) (9933479)
bug fix snack-bar: handle large numbers passed in as duration (#17239) (86a8fee), closes #17234
bug fix tabs: no longer use OnPush (#16529) (35b3226), closes #15440
bug fix tabs: not picking up indirect descendant tabs in ivy (#17346) (ed0067e), closes #17336
bug fix toolbar: not picking up indirect descendant rows (#17469) (646d47f)
feature autocomplete/testing: polish harness API (#17350) (7a748fc)
feature drag-drop: allow drag start delay to be configured based… (#17301) (43c7a7d), closes #17260
feature drag-drop: allow for custom class to be set on preview (#17304) (34e848f), closes #17089
feature menu/testing: finish implementing harness (#17379) (aa2cbf7)
feature ng-update: add migration for hammerjs in version 9 (#17369) (f065977)
feature radio/testing: polish harness API (#17414) (36d34a6)
feature sidenav/testing: polish harness API (#17415) (9e79940)
feature slide-toggle/testing: polish harness API (#17416) (db999ff)
feature tabs: add input to opt out of pagination (#17409) (bb9a3a8), closes #17317
feature tabs/testing: polish harness API (#17417) (05600a2)
feature change tslib from direct dependency to peerDependency (#17393) (41166b7)
feature expand input types with coercion to work with ngtsc input type checking (#17528) (8da64f4)
performance tooltip: avoid triggering change detection for all keydown events (#17331) (493c32d)
bug fix chips: handle ripple color in theme using CSS variables (#17649) (1923f7f)
bug fix clipboard: namespace copied output name (#17598) (1a2befa)
bug fix overlay: maxWidth and maxHeight not applied when using exact dimensions (#17586) (969d5c2), closes #17582
bug fix popover-edit: incorrect spacing for form field inside popover (#17600) (790b53e)
bug fix select: select active item when tabbing away (#17592) (93fdb00), closes #17442
bug fix sidenav: not destroying custom QueryList (#17619) (39c0074)
bug fix slider: handle touchcancel event (#17520) (320f387)
bug fix slider: some potentially broken styles when using css variables (#17580) (584ad3f)
bug fix slider: track fill not rendering on ios safari when slider starts at 0 (#17583) (fa18ce1)
bug fix stepper: not rendering correctly in some cases when step is inside ngIf (#17555) (cd7d8c8)
bug fix tabs: custom QueryList not being cleaned up (#17548) (b7b7bd0)
bug fix tree: fix typo in CSS class name (#17538) (52918ea)
feature clipboard: add the ability to specify number of attempts in clipboard directive (#17547) (a67cef6)
feature portal: add new portal that projects DOM nodes (#16101) (d3d8859), closes #14430
feature schematics: add prompt to add global typography class (#17602) (c08050d)
bug fix checkbox: unknown property warning with Ivy during server-side rendering (#17485) (227c490)
bug fix ng-update: migrations not running for release candidate versions (#17704) (bfa88fd)
bug fix ng-update: do not copy gesture config if only standard HammerJS events are used (#17753) (b53e092)
bug fix ng-update: hammer v9 migration should not unnecessarily set up gestures (#17713) (4794c60)
bug fix ng-update: imports to MatProgressSpinnerModule not migrated (#17717) (3acd6c1), closes #17715
bug fix bottom-sheet: don't move focus if it was moved during close animation (#17725) (b622d11), closes #17300
bug fix card: add missing card content selectors (#17488) (9b19e6a), closes #17487
bug fix dialog: use view container from config when attaching content (#17819) (656c681), closes #17731
bug fix drag-drop: disabled state not synced on data binding changes (#17330) (ec77513), closes #17325
bug fix drag-drop: position reset if viewport is resized while boundary is invisible (#17777) (f800900), closes #17750
bug fix expansion: accordion picking up headers from descendant accordion during keyboard navigation (#17481) (6c4122c)
bug fix form-field: incorrect assumptions about page direction (#17395) (a6f235d), closes #15415 #17390 #15415 #17390
bug fix input: avoid multiple autosize input listeners with ivy (#17817) (fe151e6)
bug fix list: don't handle selection keys while using typeahead in selection list (#17826) (ad42a1b), closes #17785
bug fix menu: cap maximum elevation for nested menus (#17687) (987c85d)
bug fix menu: internal focus state out of sync if item is focused programmatically (#17762) (af6c13f), closes #17761
bug fix menu: keyboard controls not working if all items are disabled inside lazy content (#17407) (017728a), closes #16572 #17400
bug fix portal: better handling when dom portal content can't be restored (#17851) (2e6045c)
bug fix portal: content not rendered inside outlet when view container is provided (#17731) (6d08240), closes #17650
bug fix select: don't handle open key presses while the user is typing (#17785) (2f17450), closes #17774
bug fix slider: stop dragging if page loses focus (#17849) (3b3c2ca)
bug fix tooltip: theming can affect the tooltip color (#17643) (924494d)
feature badge: add test harness (#17661) (f96e820)
feature bottom-sheet: add test harness (#17618) (a7c3ab0)
feature expansion: add test harness (#17691) (acfa174)
feature list: add test harnesses for list components (#17859) (49b6dbd)
feature sort: add test harness (#17802) (81294f7)
bug fix menu: forward aria attribute to menu panel (#17957) (3299d8c), closes #17952
bug fix chips: fix ripple element opacity when using CSS variable theming (#17576) (e7508ad)
bug fix form-field: deprecate legacy and standard appearances (#17961) (527f1b5)
bug fix chips: clear user agent styles when set on button (#17871) (26e73ac)
bug fix sort: no focus indication for active header (#17735) (191357a), closes #17716
bug fix text-field: correctly check _initialHeight (#17900) (a3e953e)
feature button-toggle: add test harness (#17996) (9a6be0d)
feature core: add test harnesses for mat-option and mat-optgroup (#17940) (0ec499d)
feature paginator: add test harness (#17969) (5a6cdaf)
feature select,input,form-field: move test harnesses out of experimental (#17874) (1c1af58)
bug fix chips: avoid accidental form submits when pressing remove button (#18095) (3b4e496)
bug fix datepicker: not respecting form control updateOn: blur for invalid values (#18063) (61029c8), closes #16461
bug fix datepicker: re-render calendar when locale changes (#18094) (be17c25), closes #18087
bug fix form-field: delete top border from focus animation (#17885) (09dc459), closes #17884
bug fix form-field: error when focusing outline form field angular elements on IE/Edge (#18062) (f573072), closes #16095
bug fix mdc-chips: Set aria-required on input instead of grid (#18049) (22d7f77)
bug fix scrolling: update virtual scroll viewport size on resize (#18058) (c36466c), closes #16802
bug fix sidenav: move focus into sidenav in side mode if autoFocus enabled explicitly (#17995) (c9856ee), closes #17967
bug fix slide-toggle: fix and simplify high contrast styles (#18104) (2fd862d)
feature grid-list: add test harness (#18001) (5e9ca28)
feature table: add test harness (#17799) (a30094b)
bug fix form-field: undeprecated legacy and standard appearances (#18144) (9ea5694)
bug fix reduce amount of generated high contrast styles (#18332) (b119472)
bug fix checkbox: outline not visible when checked in high contrast mode (#18048) (75a7681)
bug fix chips: set aria-required on chip input (#18098) (05d072a), closes #18049
bug fix datepicker: able to focus disabled datepicker toggle while disabled via click (#18231) (9086a4b)
bug fix drag-drop: error if next sibling is removed after drag sequence has started (#18230) (7a167a2), closes #18205
bug fix drag-drop: not picking up initial disabled state of handle (#16643) (3b28d33), closes #16642
bug fix drag-drop: prevent dragging selected text with the mouse (#18103) (fbbac37)
bug fix expansion: unable to toggle disabled panel via methods (#18181) (796db4d), closes #18171
bug fix input: input harness not matching matNativeControl (#18221) (f0d3a6b)
bug fix overlay: don't reset global overlay alignment when width is 100% and there's a maxWidth (#17842) (37d0191), closes #17841
bug fix overlay: only clear duplicate containers from different platform (#17006) (67d27fd), closes #16851
bug fix schematics: global typography class always being added (#18315) (2b83a0a), closes #17602 #16776
bug fix tabs: better high contrast indication on supported browsers (#18160) (01b31de)
bug fix tabs: don't start auto-scroll when right clicking on buttons (#18033) (ca9b204)
bug fix form-field: fix underline jank in fill variant (#18406) (351d0c4)
bug fix ng-add: do not overwrite version range specified in ng add (#18365) (06b7378)
bug fix ng-add: support "navigation" in additon to "nav" for navigation schematic (#18364) (06b7378)
bug fix schematics: do not depend on external dependency for colors (#17788) (e02bb82)

cdk

bug fix scrolling: expand type for "cdkVirtualForOf" input to allow null (#17421) (3e5e9db), closes #17411
feature testing: add method to wait for async tasks outside the angular zone (#17408) (c50aa21)
feature clipboard: new clipboard module (#17272) (473d4c6)
feature change tslib from direct dependency to peerDependency (#17393) (41166b7)
feature a11y: add high-contrast mode detection (#17378) (6b7f091)
feature testing: support querying for multiple TestHarness / ComponentHarness at once in locatorFor (#17658) (15a5171)
bug fix overlay: add missing transform origin directive input (#17489) (c69a727)
bug fix virtual-scroll: run changeDetection after computing transform (#17727) (d908c9f)
feature overlay: accept PositionStrategy in cdkConnectedOverlay (#16374) (73d1ceb)
bug fix a11y: make cdk-high-contrast work w/ emulated view encapsulation (#18152) (aff21e8)

youtube-player

bug fix avoid clobbering api loaded callback (#17850) (7defaa6)
bug fix clean up internal observables (#17835) (ab0f30d)
performance triggering change detection for unused events (#17665) (61b423a)
bug fix avoid setInterval change detection when player is created (#17894) (27fae29)
bug fix google-maps and youtube-player package missing tslib dependency (#17939) (2a2d837)
bug fix memory leak if player is destroyed before it is done initializing (#18046) (6b3a271)
bug fix not picking up static startSeconds and endSeconds (#18214) (8ea430f), closes #18212
bug fix handle API interactions before API has loaded (#18368) (98fac6c), closes #18279

google-maps

bug fix avoid event listener leaks if inputs change (#17664) (b2ea4c8)
bug fix error during server-side rendering (#17744) (0b0e98c)
bug fix handle trying to access the map before it has been initialized (#17805) (d990243)
bug fix unable to subscribe to events after initialization (#17845) (22fecb3)
feature Add MapPolyline component (#17512) (0c10828)
bug fix google-maps and youtube-player package missing tslib dependency (#17939) (2a2d837)
bug fix incorrect event name (#18027) (f2cbc06), closes #17845 #18026
bug fix sub-components throwing during server-side rendering (#18059) (a7f7e9b)

material-experimental

bug fix mdc-button: elevate z-index of content (#17349) (230403e)
bug fix mdc-slide-toggle: missing focus indication in high contrast mode (#17471) (3de0b08)
bug fix mdc-slider: remove theme import from all-theme (#17348) (40665e9)
bug fix mdc-tabs: add .mdc-tab__ripple container (#17498) (409e656)
bug fix mdc-progress-bar: server-side rendering error (#17359) (b30aedd)
feature mdc-tabs: add option to fit ink bar to content (#17507) (77d51ca)
bug fix mdc-button: rename state class (#17575) (9f9b017)
bug fix mdc-chips: chip set not picking up indirect descendant chips (#17568) (e7aeee4)
feature mdc-slider: add test harness for mdc-slider (#16978) (7cd314c)
feature mdc-checkbox: add default options (#17578) (4cc69d2)
feature mdc-tabs: add default fitInkBarToContent option (#17556) (2f84389)
feature mdc-snackbar: add skeleton (#17161) (6bda718)
bug fix mdc-chips: add checkmark container (#17694) (25c79cd)
bug fix mdc-chips: use ripple target for state interactions (#17681) (7aa522a)
bug fix mdc-tabs: markForCheck on ink bar content input setter (#17561) (71165f1)
bug fix mdc-menu: menu item should not inherit parent classname (#17953) (af7aa86)
bug fix mdc-progress-bar: update to latest canary to include adapter changes (#17938) (0753f9e)
feature mdc-list: Add scaffolding for MDC--based list (#17906) (45d34ad)
feature mdc-snackbar: Add demo. (#17895) (3ca7c5a)
feature mdc-table: add MDC styles/classes (#18000) (bb68c7b)
feature mdc-table: add skeleton (#17992) (4169c6f)
feature mdc-table: add tests (#18003) (8796d7c)
bug fix mdc-switch: updated to latest DOM structure guidance (#17905) (5da2ae1)
bug fix mdc-chips: avoid potential server-side rendering errors (#18044) (17a7bcb)
bug fix mdc-chips: checkmark not visible in high contrast black-on-white mode (#18061) (99af8e9)
bug fix mdc-chips: error on IE and Edge due to unsupported classList (#18074) (5fccd24)
bug fix mdc-chips: prevent default space and enter (#18084) (7b7e633)
bug fix mdc-chips: remove aria-hidden from focusable element (#18054) (55ee988)
bug fix mdc-chips: removed chip still focusable (#18083) (403377d)
bug fix mdc-slide-toggle: fix extra border in latest canary version (#18035) (b989701)
bug fix mdc-slide-toggle: initial checked and disabled state not reflected visually (#17991) (e746895)
bug fix mdc-slide-toggle: update adapter to match new interface (#18124) (636ae5c)
bug fix mdc-tabs: incorrect tab text color in dark theme (#18068) (86a4ba7)
feature mdc-form-field initial prototype of mdc-form-field (#17903) (697c3a0)
bug fix errors with latest MDC canary version (#18173) (5d13491)
bug fix mdc-theming and mdc-typography files not published (#18251) (77a25eb)

cdk-experimental

bug fix dialog: don't move focus if it was moved during close animation (#17320) (442ec30), closes #17300

Don't miss a new youtube-player release

NewReleases is sending notifications on new releases.