From b2aeac3eb03d631deea59164b69094300bbdaad7 Mon Sep 17 00:00:00 2001 From: Keshav Varadachari Date: Tue, 11 Jan 2022 11:29:43 -0500 Subject: [PATCH] update dependencies, rename BentoVideoBaseElement --- build-system/test-configs/dep-check-config.js | 3 ++- extensions/amp-brightcove/1.0/base-element.js | 4 ++-- extensions/amp-jwplayer/1.0/base-element.js | 4 ++-- .../amp-video-iframe/1.0/base-element.js | 4 ++-- extensions/amp-video/1.0/base-element.js | 18 ++++++++++-------- extensions/amp-video/1.0/video-base-element.js | 4 ++-- extensions/amp-vimeo/1.0/base-element.js | 4 ++-- extensions/amp-youtube/1.0/base-element.js | 4 ++-- 8 files changed, 24 insertions(+), 21 deletions(-) diff --git a/build-system/test-configs/dep-check-config.js b/build-system/test-configs/dep-check-config.js index 98f738ec202c8..e2af6facf73fa 100644 --- a/build-system/test-configs/dep-check-config.js +++ b/build-system/test-configs/dep-check-config.js @@ -223,8 +223,9 @@ exports.rules = [ 'extensions/amp-facebook-page/0.1/amp-facebook-page.js->extensions/amp-facebook/0.1/facebook-loader.js', 'extensions/amp-facebook-comments/0.1/amp-facebook-comments.js->extensions/amp-facebook/0.1/facebook-loader.js', - // VideoBaseElement, VideoIframe and VideoWrapper are meant to be shared. + // AmpVideoBaseElement, BentoVideoBaseElement, VideoIframe and VideoWrapper are meant to be shared. 'extensions/**->extensions/amp-video/1.0/video-base-element.js', + 'extensions/**->extensions/amp-video/1.0/base-element.js', 'extensions/**->extensions/amp-video/1.0/video-iframe.js', // versions share this message API definition. diff --git a/extensions/amp-brightcove/1.0/base-element.js b/extensions/amp-brightcove/1.0/base-element.js index e12a395921114..6737a84334baf 100644 --- a/extensions/amp-brightcove/1.0/base-element.js +++ b/extensions/amp-brightcove/1.0/base-element.js @@ -1,8 +1,8 @@ import {BentoBrightcove} from './component'; -import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element'; +import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element'; import {createParseAttrsWithPrefix} from '#preact/parse-props'; -export class BaseElement extends BentoVideo {} +export class BaseElement extends BentoVideoBaseElement {} /** @override */ BaseElement['Component'] = BentoBrightcove; diff --git a/extensions/amp-jwplayer/1.0/base-element.js b/extensions/amp-jwplayer/1.0/base-element.js index 3b40375012528..8254249265a30 100644 --- a/extensions/amp-jwplayer/1.0/base-element.js +++ b/extensions/amp-jwplayer/1.0/base-element.js @@ -5,9 +5,9 @@ import {createParseAttrsWithPrefix} from '#preact/parse-props'; import {BentoJwplayer} from './component'; -import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element'; +import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element'; -export class BaseElement extends BentoVideo { +export class BaseElement extends BentoVideoBaseElement { /** @override */ init() { super.init(); diff --git a/extensions/amp-video-iframe/1.0/base-element.js b/extensions/amp-video-iframe/1.0/base-element.js index c13576fa1839c..53c399853431e 100644 --- a/extensions/amp-video-iframe/1.0/base-element.js +++ b/extensions/amp-video-iframe/1.0/base-element.js @@ -1,8 +1,8 @@ import {BentoVideoIframe} from './component'; -import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element'; +import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element'; -export class BaseElement extends BentoVideo {} +export class BaseElement extends BentoVideoBaseElement {} /** @override */ BaseElement['Component'] = BentoVideoIframe; diff --git a/extensions/amp-video/1.0/base-element.js b/extensions/amp-video/1.0/base-element.js index 2dfe75b8d2b39..57747ef6e1a6c 100644 --- a/extensions/amp-video/1.0/base-element.js +++ b/extensions/amp-video/1.0/base-element.js @@ -3,16 +3,18 @@ import {CSS as CSS_AUTOPLAY} from './autoplay.jss'; import {PreactBaseElement} from '#preact/base-element'; import {BentoVideo} from './component'; -export class BaseElement extends PreactBaseElement {} +export class BentoVideoBaseElement extends PreactBaseElement {} +// export with alias for bento builds +export {BentoVideoBaseElement as BaseElement}; /** @override */ -BaseElement['Component'] = BentoVideo; +BentoVideoBaseElement['Component'] = BentoVideo; /** @override */ -BaseElement['loadable'] = true; +BentoVideoBaseElement['loadable'] = true; /** @override */ -BaseElement['layoutSizeDefined'] = true; +BentoVideoBaseElement['layoutSizeDefined'] = true; /** * Defaults to `{component: 'video'}` from `BentoVideo` component. @@ -24,10 +26,10 @@ BaseElement['layoutSizeDefined'] = true; * ``` * @override */ -BaseElement['staticProps']; +BentoVideoBaseElement['staticProps']; /** @override */ -BaseElement['props'] = { +BentoVideoBaseElement['props'] = { 'album': {attr: 'album'}, 'alt': {attr: 'alt'}, 'artist': {attr: 'artist'}, @@ -59,7 +61,7 @@ BaseElement['props'] = { }; /** @override */ -BaseElement['shadowCss'] = CSS + CSS_AUTOPLAY; +BentoVideoBaseElement['shadowCss'] = CSS + CSS_AUTOPLAY; /** @override */ -BaseElement['usesShadowDom'] = true; +BentoVideoBaseElement['usesShadowDom'] = true; diff --git a/extensions/amp-video/1.0/video-base-element.js b/extensions/amp-video/1.0/video-base-element.js index 7d960db4f6aec..148df278f0ce5 100644 --- a/extensions/amp-video/1.0/video-base-element.js +++ b/extensions/amp-video/1.0/video-base-element.js @@ -1,10 +1,10 @@ import {ActionTrust_Enum} from '#core/constants/action-constants'; import {AmpPreactBaseElement, setSuperClass} from '#preact/amp-base-element'; -import {BaseElement as BentoVideo} from './base-element'; +import {BentoVideoBaseElement} from './base-element'; /** @extends {PreactBaseElement} */ export class AmpVideoBaseElement extends setSuperClass( - BentoVideo, + BentoVideoBaseElement, AmpPreactBaseElement ) { /** @override */ diff --git a/extensions/amp-vimeo/1.0/base-element.js b/extensions/amp-vimeo/1.0/base-element.js index 1f0b8dd88488c..734064e735364 100644 --- a/extensions/amp-vimeo/1.0/base-element.js +++ b/extensions/amp-vimeo/1.0/base-element.js @@ -1,8 +1,8 @@ import {BentoVimeo} from './component'; -import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element'; +import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element'; -export class BaseElement extends BentoVideo {} +export class BaseElement extends BentoVideoBaseElement {} /** @override */ BaseElement['Component'] = BentoVimeo; diff --git a/extensions/amp-youtube/1.0/base-element.js b/extensions/amp-youtube/1.0/base-element.js index 96e7708b497c9..15261c2774cc5 100644 --- a/extensions/amp-youtube/1.0/base-element.js +++ b/extensions/amp-youtube/1.0/base-element.js @@ -2,9 +2,9 @@ import {createParseAttrsWithPrefix} from '#preact/parse-props'; import {BentoYoutube} from './component'; -import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element'; +import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element'; -export class BaseElement extends BentoVideo {} +export class BaseElement extends BentoVideoBaseElement {} /** @override */ BaseElement['Component'] = BentoYoutube;