@content-blocks/js 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/content-accordion.cjs.entry.js +1 -1
- package/dist/cjs/content-blocks.cjs.js +2 -2
- package/dist/cjs/content-blocks.cjs.js.map +1 -1
- package/dist/cjs/content-button_10.cjs.entry.js +1 -1
- package/dist/cjs/content-button_10.cjs.entry.js.map +1 -1
- package/dist/cjs/{content-carousel-c8e0a9a9.js → content-carousel-d866cb77.js} +27 -22
- package/dist/cjs/content-carousel-d866cb77.js.map +1 -0
- package/dist/cjs/content-carousel.cjs.entry.js +2 -2
- package/dist/cjs/content-navigation-block.cjs.entry.js +4 -6
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -1
- package/dist/cjs/content-split-block.cjs.entry.js +1 -1
- package/dist/cjs/content-split-block.cjs.entry.js.map +1 -1
- package/dist/cjs/content-tabs.cjs.entry.js +1 -1
- package/dist/cjs/{index-e93f381a.js → index-239b1c46.js} +232 -102
- package/dist/cjs/index-239b1c46.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{swiper-d0296c76.js → swiper-2fe1b80b.js} +421 -149
- package/dist/cjs/swiper-2fe1b80b.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +1 -1
- package/dist/collection/blocks/content-split-block/content-split-block.js.map +1 -1
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/content-carousel/content-carousel.css +3 -3
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +3 -5
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -1
- package/dist/collection/elements/content-button/content-button.js.map +1 -1
- package/dist/collection/elements/content-line/content-line.js.map +1 -1
- package/dist/collection/elements/content-video/content-video.js.map +1 -1
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -1
- package/dist/components/content-button.js.map +1 -1
- package/dist/components/content-carousel.js +24 -20
- package/dist/components/content-carousel.js.map +1 -1
- package/dist/components/content-grid-formatter2.js.map +1 -1
- package/dist/components/content-hero-block.js.map +1 -1
- package/dist/components/content-line.js.map +1 -1
- package/dist/components/content-navigation-block.js +3 -5
- package/dist/components/content-navigation-block.js.map +1 -1
- package/dist/components/content-split-block.js.map +1 -1
- package/dist/components/content-text-block.js.map +1 -1
- package/dist/components/content-video.js.map +1 -1
- package/dist/components/swiper.js +419 -147
- package/dist/components/swiper.js.map +1 -1
- package/dist/content-blocks/content-blocks.esm.js +1 -1
- package/dist/content-blocks/content-blocks.esm.js.map +1 -1
- package/dist/content-blocks/p-08143d3f.js +2 -0
- package/dist/content-blocks/p-08143d3f.js.map +1 -0
- package/dist/content-blocks/{p-057c0e4d.entry.js → p-14dd6549.entry.js} +2 -2
- package/dist/content-blocks/p-14dd6549.entry.js.map +1 -0
- package/dist/content-blocks/{p-b1300b9a.entry.js → p-1947500c.entry.js} +2 -2
- package/dist/content-blocks/p-1947500c.entry.js.map +1 -0
- package/dist/content-blocks/p-26ff44fc.js +6 -6
- package/dist/content-blocks/{p-01952c81.entry.js → p-3732482d.entry.js} +2 -2
- package/dist/content-blocks/p-3732482d.entry.js.map +1 -0
- package/dist/content-blocks/p-3b4be54b.js +2 -0
- package/dist/content-blocks/p-3b4be54b.js.map +1 -0
- package/dist/content-blocks/{p-914e3550.entry.js → p-8d44f285.entry.js} +2 -2
- package/dist/content-blocks/p-a802c984.entry.js +2 -0
- package/dist/content-blocks/{p-2ec7fda2.entry.js → p-b27f84ad.entry.js} +2 -2
- package/dist/content-blocks/p-dc53dda7.js +3 -0
- package/dist/content-blocks/p-dc53dda7.js.map +1 -0
- package/dist/esm/content-accordion.entry.js +1 -1
- package/dist/esm/content-blocks.js +3 -3
- package/dist/esm/content-blocks.js.map +1 -1
- package/dist/esm/content-button_10.entry.js +1 -1
- package/dist/esm/content-button_10.entry.js.map +1 -1
- package/dist/esm/{content-carousel-f971cfcd.js → content-carousel-af580def.js} +27 -23
- package/dist/esm/content-carousel-af580def.js.map +1 -0
- package/dist/esm/content-carousel.entry.js +2 -2
- package/dist/esm/content-navigation-block.entry.js +4 -6
- package/dist/esm/content-navigation-block.entry.js.map +1 -1
- package/dist/esm/content-split-block.entry.js +1 -1
- package/dist/esm/content-split-block.entry.js.map +1 -1
- package/dist/esm/content-tabs.entry.js +1 -1
- package/dist/esm/{index-9501de67.js → index-6e48707b.js} +232 -102
- package/dist/esm/index-6e48707b.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{swiper-7d87458d.js → swiper-3d1a80cc.js} +421 -149
- package/dist/esm/swiper-3d1a80cc.js.map +1 -0
- package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +0 -2
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +0 -2
- package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +0 -2
- package/dist/types/components.d.ts +11 -0
- package/dist/types/elements/content-button/content-button.d.ts +0 -2
- package/dist/types/elements/content-line/content-line.d.ts +0 -2
- package/dist/types/elements/content-video/content-video.d.ts +0 -2
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +0 -2
- package/dist/types/stencil-public-runtime.d.ts +21 -0
- package/package.json +13 -13
- package/dist/cjs/content-carousel-c8e0a9a9.js.map +0 -1
- package/dist/cjs/index-e93f381a.js.map +0 -1
- package/dist/cjs/swiper-d0296c76.js.map +0 -1
- package/dist/content-blocks/p-01952c81.entry.js.map +0 -1
- package/dist/content-blocks/p-057c0e4d.entry.js.map +0 -1
- package/dist/content-blocks/p-3f3a30b1.entry.js +0 -2
- package/dist/content-blocks/p-8a8f13fb.js +0 -2
- package/dist/content-blocks/p-8a8f13fb.js.map +0 -1
- package/dist/content-blocks/p-b1300b9a.entry.js.map +0 -1
- package/dist/content-blocks/p-cd3c0fce.js +0 -3
- package/dist/content-blocks/p-cd3c0fce.js.map +0 -1
- package/dist/content-blocks/p-d8dc8d1e.js +0 -2
- package/dist/content-blocks/p-d8dc8d1e.js.map +0 -1
- package/dist/esm/content-carousel-f971cfcd.js.map +0 -1
- package/dist/esm/index-9501de67.js.map +0 -1
- package/dist/esm/swiper-7d87458d.js.map +0 -1
- /package/dist/content-blocks/{p-914e3550.entry.js.map → p-8d44f285.entry.js.map} +0 -0
- /package/dist/content-blocks/{p-3f3a30b1.entry.js.map → p-a802c984.entry.js.map} +0 -0
- /package/dist/content-blocks/{p-2ec7fda2.entry.js.map → p-b27f84ad.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-hero-block.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,y2BAAy2B;;
|
|
1
|
+
{"file":"content-hero-block.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,y2BAAy2B;;MCgBx3BA,kBAAgB;;;;;2BAa0C,aAAa;;;+BAQ1C,KAAK;;EAG7C,iBAAiB;IACf,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC7E,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;IACtF,OAAO,OAAO,CAAC,UAAU,CAAC;MACxB,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,eAAe,GAAG,QAAkB,CAAC;MACvH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC;KAC5G,CAAC,CAAA;GACH;EAGD,6BAA6B,CAAC,KAA+B;IAC3D,IAAG,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,MAAM,EAAE;MACpC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;KACpD;GACF;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,IACzB,IAAI,CAAC,aAAa;MACpB,WAAK,KAAK,EAAC,gCAAgC,IACzC,YAAM,IAAI,EAAC,YAAY,GAAQ,CAC3B,EAEN,WAAK,KAAK,EAAC,6BAA6B,IACtC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentHeroBlock"],"sources":["src/blocks/content-hero-block/content-hero-block.scss?tag=content-hero-block","src/blocks/content-hero-block/content-hero-block.tsx"],"sourcesContent":["content-hero-block {\n position: relative;\n visibility: hidden;\n &.hydrated {\n visibility: inherit;\n }\n \n &[content-position=\"above\"] {\n display: grid;\n grid-template-columns: 1fr;\n .content-hero-block__background,\n .content-hero-block__content {\n grid-row-start: 1;\n grid-column-start: 1;\n }\n .content-hero-block__background {\n height: 100%;\n overflow: hidden;\n }\n .content-hero-block__content {\n display: flex;\n // position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n grid-row-start: 1;\n grid-column-start: 1;\n \n > * {\n // display: block;\n width: 100%;\n }\n }\n .content-hero-block__content {\n position: relative;\n z-index: 1;\n }\n }\n &[content-position=\"below\"] {\n display: block;\n }\n}","import { Component, h, Host, Prop } from '@stencil/core';\nimport { Element, HTMLStencilElement, Listen, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\nimport { getHydratedClassString } from '../../utils/utils';\nexport type HeroContentPlacementOptions = 'above' | 'below';\n/**\n * @slot background - This slot is usually either a video or image component.\n * @slot content - This slot will usually serve a text block.\n * @slot - Default slot, same as content slot\n */\n@Component({\n tag: 'content-hero-block',\n styleUrl: 'content-hero-block.scss',\n shadow: false,\n})\nexport class ContentHeroBlock {\n @Element() hostElement: HTMLStencilElement;\n @State() hasBackground: boolean;\n /**\n * Pipe separated HeroContentPlacementOptions that will determine whether the content sits below the media slot or overlapped above.\n * @type Select\n * @options below\n * @options above\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) contentPosition: ResponsiveString | HeroContentPlacementOptions = 'below|above';\n\n /**\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n @State() revealHiddenContent: boolean = false;\n hasHiddenContent: boolean;\n\n componentWillLoad() {\n this.hasBackground = !!this.hostElement.querySelector('[slot=\"background\"]');\n this.hasHiddenContent = !!this.hostElement.querySelector('[slot=\"activatedContent\"]');\n return Promise.allSettled([\n WindowResizeService.registerProp(this.contentPosition).subscribe(newValue => this.contentPosition = newValue as string),\n WindowResizeService.registerProp(this.classes).subscribe(newValue => this.classString = newValue as string)\n ])\n }\n \n @Listen('contentBlockActivated', {target: 'window'})\n contentBlockActivationHandler(event: CustomEvent<HTMLElement>) {\n if(this.hostElement === event.detail) {\n this.hostElement.setAttribute('activated', 'true');\n }\n }\n \n render() {\n return (\n <Host class={this.classString}>\n { this.hasBackground && \n <div class=\"content-hero-block__background\">\n <slot name=\"background\"></slot>\n </div>\n }\n <div class=\"content-hero-block__content\">\n <slot name=\"content\"></slot>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-line.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,wRAAwR;;
|
|
1
|
+
{"file":"content-line.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,wRAAwR;;MCclS,gBAAgB;;;;eAgBU,KAAK;qBAcqB,SAAS;;;oBAenC,MAAM;uBACK,EAAE;;EAElD,mBAAmB;GAClB;EAED,iBAAiB;IACf,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,GAAG,QAAkB,CAAC,CAAC,CAAC;IAC3H,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,QAAyB;QAChG,IAAI,CAAC,WAAW,GAAG;UACjB,WAAW,EAAE,KAAK,CAAC,QAAkB,CAAC,GAAG,QAAkB,GAAG,QAAQ,GAAG,GAAG;SAC7E,CAAC;OACH,CAAC,CAAC,CAAC;KACL;IACD,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ;MAC7E,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAA;KACtC,CAAC,CAAC,CAAC;IACJ,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;;;;;;;;;;;;;GAarC;EAED,gBAAgB;;;GAGf;EAED,MAAM;;;;;;;;IAQJ,MAAM,gBAAgB,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvC,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,gBAAc,IAAI,CAAC,SAAS,IACvD,EAAC,gBAAgB,IAAC,KAAK,EAAC,qBAAqB,EAAC,KAAK,EAAE,IAAI,CAAC,WAAW,IACnE,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,eAAa,CACI,CACd,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/elements/content-line/content-line.scss?tag=content-line","src/elements/content-line/content-line.tsx"],"sourcesContent":["content-line {\n display: block;\n word-break: break-word;\n white-space: normal;\n .content-line__inner {\n display: inline-block;\n width: auto;\n }\n &[text-align=\"left\"] {\n text-align: left;\n }\n &[text-align=\"center\"] {\n text-align: center;\n }\n &[text-align=\"right\"] {\n text-align: right;\n }\n}","import { Component, Prop, h, State, Host } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveNumber, ResponsiveString } from '../../typings';\nexport type ContentLineTagOptions = 'div' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'section' | 'article';\nexport type ContentLineTextAlignOptions = 'default' | 'left' | 'center' | 'right';\n/**\n * @slot content - Inner contents of the line, usually plaintext.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-line',\n styleUrl: 'content-line.scss',\n shadow: false\n})\nexport class ContentBlockLine {\n /**\n * The element tag to use.\n * @type Select\n * @options div\n * @options p\n * @options h1\n * @options h2\n * @options h3\n * @options h4\n * @options h5\n * @options h6\n * @options span\n * @options section\n * @options article\n */\n @Prop() tag: ContentLineTagOptions = 'div';\n\n /**\n * Pipe separated list of ContentLineTextAlignOptions for text alignment.\n * @type Select\n * @options default\n * @options left\n * @options center\n * @options right\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n }) textAlign: ContentLineTextAlignOptions | ResponsiveString = 'default';\n\n /**\n * The font class for the line.\n * @type String\n * @responsive\n */\n @Prop() classes;\n @State() classString;\n\n /**\n * Pipe separated list of max width numbers. You can also use units such as \"px\" and \"vw\". If no unit is provided, defaults to percentage.\n * @type String\n * @responsive\n */\n @Prop() maxWidth: ResponsiveNumber = '100%';\n @State() inlineStyle: {[key: string]: string} = {};\n\n componentWillRender() {\n }\n \n componentWillLoad() {\n let promises = [];\n promises.push(WindowResizeService.registerProp(this.textAlign).subscribe(newValue => this.textAlign = newValue as string));\n if (this.maxWidth) {\n promises.push(WindowResizeService.registerProp(this.maxWidth).subscribe((newValue: string | number) => {\n this.inlineStyle = {\n 'max-width': isNaN(newValue as number) ? newValue as string : newValue + '%',\n };\n }));\n }\n promises.push(WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string\n }));\n return Promise.allSettled(promises);\n // this.class = 'shahruk';\n // let promises = [];\n // promises.push(WindowResizeService.registerProp(this.textAlign).subscribe(newValue => this.textAlign = newValue as string));\n // if (this.maxWidth) {\n // promises.push(WindowResizeService.registerProp(this.maxWidth).subscribe((newValue: string | number) => {\n // this.inlineStyle = {\n // 'max-width': isNaN(newValue as number) ? newValue as string : newValue + '%',\n // };\n // }));\n // }\n // // promises.push(WindowResizeService.registerProp(this.class).subscribe(newValue => this.class = newValue as string));\n // return Promise.allSettled(promises);\n }\n\n componentDidLoad() {\n // console.log('ive been loaded');\n // return WindowResizeService.registerProp(this.class).subscribe(newValue => setTimeout(() => this.class = getHydratedClassString(newValue as string), 100));\n }\n\n render() {\n // if (!this.classSubscription$) {\n // this.classSubscription$ = WindowResizeService.registerProp(this.class);\n // this.classSubscription$.subscribe(newValue => {\n // this.class = getHydratedClassString(newValue as string);\n // });\n // }\n // The capital case in this JSX variable is important\n const ElementTagParsed = `${this.tag}`;\n return (\n <Host class={this.classString} text-align={this.textAlign}>\n <ElementTagParsed class=\"content-line__inner\" style={this.inlineStyle}>\n <slot name=\"content\"></slot>\n <slot></slot>\n </ElementTagParsed>\n </Host>\n );\n }\n}"],"version":3}
|
|
@@ -15,11 +15,9 @@ const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentN
|
|
|
15
15
|
}
|
|
16
16
|
componentWillLoad() {
|
|
17
17
|
let promises = [];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
18
|
+
promises.push(WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
19
|
+
this.classString = newValue;
|
|
20
|
+
}));
|
|
23
21
|
promises.push(WindowResizeService.registerProp(this.hamburger).subscribe(newValue => {
|
|
24
22
|
this.hamburger = newValue;
|
|
25
23
|
this.bodyToggle = this.hamburger === 'fixed';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-navigation-block.js","mappings":";;;AAAA,MAAM,yBAAyB,GAAG,i0DAAi0D;;
|
|
1
|
+
{"file":"content-navigation-block.js","mappings":";;;AAAA,M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EAAE;QACjC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;OACjE;WAAM,IAAI,IAAI,CAAC,UAAU,EAAE;QAC1B,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;OAC9D;MACD,UAAU,CAAC,MAAM,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;KAC1C,CAAC;IACF,WAAW,CAAC,OAAO,GAAG;MACpB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;MAC5B,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;MACvC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;MAChE,UAAU,CAAC,MAAM,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;KACzC,CAAC;GACH;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,mBAAiB,IAAI,CAAC,YAAY,IAC3D,eAAa,EACb,YAAM,IAAI,EAAC,YAAY,GAAQ,EAC/B,YAAM,IAAI,EAAC,aAAa,GAAQ,EAClC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentNavigationBlock"],"sources":["src/components/content-navigation-block/content-navigation-block.scss?tag=content-navigation-block","src/components/content-navigation-block/content-navigation-block.tsx"],"sourcesContent":["body.content-navigation-block-open {\n overflow: hidden;\n}\ncontent-navigation-block {\n visibility: hidden;\n &.hydrated {\n visibility: inherit;\n }\n \n &[hamburger=\"fixed\"],\n &[hamburger=\"absolute\"],\n &[hamburger=\"static\"] {\n display: inline-block;\n &[aria-expanded=\"false\"] {\n [slot=\"closeButton\"] {\n display: none;\n }\n }\n [slot=\"openButton\"],\n [slot=\"closeButton\"] {\n cursor: pointer;\n }\n \n [slot=\"content\"] {\n display: none;\n background: white;\n &[hidden=\"false\"] {\n display: block;\n }\n }\n }\n\n &[hamburger=\"fixed\"] {\n [slot=\"content\"] {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100%;\n z-index: 100;\n }\n }\n &[hamburger=\"absolute\"] {\n [slot=\"content\"] {\n position: absolute;\n z-index: 100;\n }\n }\n &[hamburger=\"static\"] {\n [slot=\"content\"] {\n position: static;\n }\n }\n \n &[hamburger=\"none\"] {\n display: block;\n [slot=\"openButton\"],\n [slot=\"closeButton\"] {\n display: none;\n }\n }\n}","import { Component, Prop, Host, h, State, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\n\n/**\n * @slot openButton - This slot will expand the navigation when clicked.\n * @slot closeButton - This slot will close the navigation when clicked.\n * @slot content - Default slot\n */\n@Component({\n tag: 'content-navigation-block',\n styleUrl: 'content-navigation-block.scss',\n shadow: false,\n})\nexport class ContentNavigationBlock {\n /**\n * @type Select\n * @responsive\n * @options fixed\n * @options absolute\n * @options static\n * @options none\n */\n @Prop({\n mutable: true,\n reflect: true\n }) hamburger: ResponsiveString = 'fixed|none';\n\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) classes: ResponsiveString;\n @State() classString;\n @Element() hostElement: HTMLStencilElement;\n @State() ariaExpanded: string = 'false';\n @State() bodyToggle: boolean = false;\n\n componentWillLoad() {\n let promises = [];\n promises.push(WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n }));\n promises.push(WindowResizeService.registerProp(this.hamburger).subscribe(newValue => {\n this.hamburger = newValue as string;\n this.bodyToggle = this.hamburger === 'fixed';\n document.body.classList.remove('content-navigation-block-open');\n }));\n return Promise.allSettled(promises);\n }\n componentDidLoad() {\n let openButton = this.hostElement.querySelector('[slot=\"openButton\"]') as HTMLElement;\n let closeButton = this.hostElement.querySelector('[slot=\"closeButton\"]') as HTMLElement;\n let content = this.hostElement.querySelector('[slot=\"content\"]') as HTMLElement;\n\n openButton.onclick = () => {\n this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';\n content.setAttribute('hidden', this.ariaExpanded === 'false' ? 'true' : 'false');\n if (this.ariaExpanded === 'false') {\n document.body.classList.remove('content-navigation-block-open');\n } else if (this.bodyToggle) {\n document.body.classList.add('content-navigation-block-open');\n }\n setTimeout(() => closeButton.focus(), 1);\n };\n closeButton.onclick = () => {\n this.ariaExpanded = 'false';\n content.setAttribute('hidden', 'true');\n document.body.classList.remove('content-navigation-block-open');\n setTimeout(() => openButton.focus(), 1);\n };\n }\n \n render() {\n return (\n <Host class={this.classString} aria-expanded={this.ariaExpanded}>\n <slot></slot>\n <slot name=\"openButton\"></slot>\n <slot name=\"closeButton\"></slot>\n <slot name=\"content\"></slot>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-split-block.js","mappings":";;;;AAAA,MAAM,oBAAoB,GAAG,8eAA8e;;
|
|
1
|
+
{"file":"content-split-block.js","mappings":";;;;AAAA,MAAM,oBAAoB,GAAG,8eAA8e;;MCY9fA,mBAAiB;;;;mBAQc,KAAK;mBAKrB,KAAK;;;;EAW/B,iBAAiB;IACf,OAAO,OAAO,CAAC,UAAU,CAAC;MACxB,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,GAAG,QAAkB,CAAC;MACvG,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC;KAC5G,CAAC,CAAA;GACH;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IAClD,8BAAwB,IAAI,EAAC,MAAM,eAAW,MAAM,iBAAa,MAAM,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,IAC3F,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,YAAM,IAAI,EAAC,SAAS,GAAQ,CACL,CACpB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentSplitBlock"],"sources":["src/blocks/content-split-block/content-split-block.scss?tag=content-split-block","src/blocks/content-split-block/content-split-block.tsx"],"sourcesContent":["content-split-block {\n display: block;\n visibility: hidden;\n &.hydrated {\n visibility: inherit;\n }\n \n * {\n box-sizing: border-box;\n }\n &[reverse=\"true\"] {\n content-grid-formatter[type=\"flex\"] [slot=\"column1\"],\n content-grid-formatter[type=\"grid\"] [slot=\"column1\"] {\n order: 2;\n }\n\n content-grid-formatter[type=\"flex\"] [slot=\"column2\"],\n content-grid-formatter[type=\"grid\"] [slot=\"column2\"] {\n order: 1;\n }\n }\n}","import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveString } from '../../typings';\n/**\n * @slot column1 - This will be column 1.\n * @slot column2 - This will be column 2.\n */\n@Component({\n tag: 'content-split-block',\n styleUrl: 'content-split-block.scss',\n shadow: false,\n})\nexport class ContentSplitBlock {\n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) reverse: ResponsiveBoolean | boolean = false;\n /**\n * @type Number\n * @responsive\n */\n @Prop() columns: string = '1|2';\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) classes: ResponsiveString;\n @State() classString;\n\n componentWillLoad() {\n return Promise.allSettled([\n WindowResizeService.registerProp(this.reverse).subscribe(newValue => this.reverse = newValue as string),\n WindowResizeService.registerProp(this.classes).subscribe(newValue => this.classString = newValue as string)\n ])\n }\n \n render() {\n return (\n <Host class={this.classString} reverse={this.reverse}>\n <content-grid-formatter type=\"flex\" flex-grow=\"true\" flex-shrink=\"true\" columns={this.columns}>\n <slot name=\"column1\"></slot>\n <slot name=\"column2\"></slot>\n </content-grid-formatter>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-text-block.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,u9BAAu9B;;
|
|
1
|
+
{"file":"content-text-block.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,u9BAAu9B;;MCet+BA,kBAAgB;;;;;;;6BA8B2C,KAAK;sBASzC,OAAO;uBAEU,EAAE;;EAErD,iBAAiB;IACf,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE;MACvD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;KACjD;IACD,OAAO,OAAO,CAAC,UAAU,CAAC;MACxB,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ;QACjE,IAAI,CAAC,WAAW,mCAAQ,IAAI,CAAC,WAAW,KAAE,YAAY,EAAE,KAAK,CAAC,QAAe,CAAC,GAAG,QAAkB,GAAG,QAAQ,GAAG,IAAI,GAAE,CAAC;OACzH,CAAC;MACF,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,GAAG,QAAkB,CAAC;MAC7G,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,iBAAiB,GAAG,QAAkB,CAAC;MAC3H,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC;KAC5G,CAAC,CAAA;GACH;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,wBAAsB,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,IAChG,WAAK,KAAK,EAAC,6BAA6B,IACtC,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,eAAa,CACT,EACN,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACtB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentTextBlock"],"sources":["src/blocks/content-text-block/content-text-block.scss?tag=content-text-block","src/blocks/content-text-block/content-text-block.tsx"],"sourcesContent":["content-text-block {\n display: block;\n width: 100%;\n // height: 100%; // for content-block-tout mediaContent button positioning\n text-align: initial;\n // content-hero-block &,\n // content-grid-formatter & {\n // height: auto;\n // &[vertical-alignment=\"bottom\"],\n // &[vertical-alignment=\"center\"] {\n // height: 100%;\n // }\n // }\n visibility: hidden;\n &.hydrated {\n visibility: inherit;\n }\n \n &[full-height=\"true\"] {\n height: 100%;\n }\n > *[slot=\"footer\"] {\n margin-top: auto;\n margin-bottom: 0;\n width: 100%;\n padding-top: 1rem;\n height: auto;\n // @media #{$tablet-landscape-up} {\n // margin-top: auto;\n // margin-bottom: 0;\n // width: 100%;\n // }\n }\n &[vertical-alignment=\"bottom\"] > [slot=\"footer\"] {\n position: static;\n height: auto;\n }\n &[vertical-alignment] {\n display: flex;\n flex-direction: column;\n }\n\n &[vertical-alignment=\"top\"] {\n justify-content: flex-start;\n }\n &[vertical-alignment=\"center\"] {\n justify-content: center;\n &[footer=\"true\"] {\n .content-text-block__content {\n margin-top: auto;\n margin-bottom: 0;\n }\n }\n }\n &[vertical-alignment=\"bottom\"] {\n justify-content: flex-end;\n &[footer=\"true\"] {\n .content-text-block__content {\n margin-top: auto;\n margin-bottom: 0;\n }\n > [slot=\"footer\"] {\n margin-top: 0;\n }\n }\n }\n}","import { Component, h, Host, Element, State } from '@stencil/core';\nimport { HTMLStencilElement, Prop } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ContentVerticalAlignments, ResponsiveString } from '../../typings';\n\n/**\n * @slot content - This slot will usually serve a text block.\n * @slot footer - This slot is placed below the content slot\n * @slot - Default slot, same as content slot\n */\n@Component({\n tag: 'content-text-block',\n styleUrl: 'content-text-block.scss',\n shadow: false,\n})\nexport class ContentTextBlock {\n /**\n * This is a pipe separated string representing the style class.\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n\n /**\n * This is a pipe separated string representing the minimum height. Units without values default to pixels.\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) minHeight: ResponsiveString;\n \n /**\n * Pipe separated list of ContentVerticalAlignments for text box placement.\n * @type Select\n * @options top\n * @options center\n * @options bottom\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) verticalAlignment: ContentVerticalAlignments | ResponsiveString = 'top';\n \n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) fullHeight: ResponsiveString = 'false';\n @Element() hostElement: HTMLStencilElement;\n @State() inlineStyle?: { [key: string]: string } = {};\n\n componentWillLoad() {\n if (!!this.hostElement.querySelector('[slot=\"footer\"]')) {\n this.hostElement.setAttribute('footer', 'true');\n }\n return Promise.allSettled([\n WindowResizeService.registerProp(this.minHeight).subscribe(newValue => {\n this.inlineStyle = { ...this.inlineStyle, 'min-height': isNaN(newValue as any) ? newValue as string : newValue + 'px' };\n }),\n WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => this.fullHeight = newValue as string),\n WindowResizeService.registerProp(this.verticalAlignment).subscribe(newValue => this.verticalAlignment = newValue as string),\n WindowResizeService.registerProp(this.classes).subscribe(newValue => this.classString = newValue as string)\n ])\n }\n\n render() { \n return (\n <Host class={this.classString} vertical-alignment={this.verticalAlignment} style={this.inlineStyle}>\n <div class=\"content-text-block__content\">\n <slot name=\"content\"></slot>\n <sl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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentVideo"],"sources":["src/elements/content-video/content-video.scss?tag=content-video","src/elements/content-video/content-video.tsx"],"sourcesContent":["@import \"'~video.js/dist/video-js.min.css\";\ncontent-video {\n display: block;\n width: 100%;\n position: relative;\n visibility: hidden;\n &.hydrated {\n visibility: inherit;\n height: 100%;\n &.content-video--fit-container {\n .video-js.vjs-fluid {\n height: 100%;\n padding: 0; // remove padding aspect ratio hack\n }\n }\n }\n &[fit-container=\"true\"] {\n height: 100%;\n }\n\n .content-video__content {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .content-video__poster {\n position: relative;\n }\n .content-video__play {\n cursor: pointer;\n appearance: none;\n border: none;\n background: transparent;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n\n &:before {\n content: '\\25BA';\n font-size: 100px;\n }\n }\n \n .vjs-content-block-theme {\n &.video-js {\n width: 100%;\n height: 100%;\n\n video.vjs-tech {\n position: static;\n }\n }\n &.vjs-ended,\n &.vjs-waiting {\n .vjs-loading-spinner { \n display: none;\n }\n }\n &:hover,\n &:focus {\n &:not(:focus-visible) {\n // background: transparent;\n }\n .vjs-big-play-button {\n background-color: transparent;\n }\n }\n .vjs-big-play-button {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: none;\n background: transparent;\n .vjs-icon-placeholder {\n display: block;\n width: 100%;\n height: 100%;\n &:before {\n display: none;\n }\n }\n }\n }\n\n .vjs-poster {\n display: none;\n }\n}","import { Component, h, Host } from '@stencil/core';\nimport { Element, HTMLStencilElement, Prop, State } from '@stencil/core/internal';\nimport { Observable } from 'rxjs';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\nimport { getCurrentValue, getHydratedClassString } from '../../utils/utils';\nexport type SupportedVideoMethods = 'html5' | 'youtube';\n\n/**\n * @slot poster - Poster shown before video is played.\n * @slot playButton - Play button contents.\n * @slot no-js-message - Contents of no JS message.\n * @slot content - Adjacent to no-js message for video. Usually not needed.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-video',\n styleUrls: [\n 'content-video.scss',\n ],\n shadow: false,\n})\nexport class ContentVideo {\n public player: any;\n videoElement!: HTMLVideoElement;\n @Element() hostElement: HTMLStencilElement;\n /**\n * @type Select\n * @options youtube\n * @options html5\n */\n @Prop() method: SupportedVideoMethods = 'youtube';\n /** \n * If you're using this inside a content-overlay for example, you may want the video to play immediately on launch.\n * @type Boolean\n */\n @Prop() autoplay: boolean = false;\n /** \n * Supports YouTube and self hosted URLs.\n * @type String\n */\n @Prop() src: string = '';\n /**\n * @type Number\n */\n @Prop() width: number = 16;\n /**\n * @type Number\n */\n @Prop() height: number = 9;\n /**\n * @type String\n */\n @Prop() type: string = 'video/mp4';\n /**\n * @type String\n */\n @Prop() playButtonAriaLabel: string = 'Play';\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) classes: ResponsiveString;\n @State() classString;\n /**\n * @type Boolean\n */\n @Prop() controls: boolean = true;\n /**\n * @type String\n */\n @Prop() preload: string = 'metadata';\n /**\n * Fit the container this video is placed in. When the video is used in an overlay or another place where the video will takeover the existing height, it is recommended to enable this option.\n * @responsive\n * @type String\n */\n @Prop({\n mutable: true,\n reflect: true\n }) fitContainer: ResponsiveString = 'false';\n @State() isLoaded: boolean = false;\n @State() hasPoster: boolean = false;\n @State() isPlayed: boolean = false;\n\n classSubscription$: Observable<string | number | boolean>;\n\n computedVideoConfig() {\n let videoConfig = {};\n videoConfig = {\n \"fill\": getCurrentValue(this.fitContainer) === 'true',\n \"fluid\": getCurrentValue(this.fitContainer) === 'false',\n 'autoplay': this.autoplay === true ? 'muted' : false,\n \"techOrder\": [\"youtube\"],\n \"src\": this.src,\n \"sources\": [{ \n \"type\": \"video/youtube\",\n \"src\": this.src,\n }],\n \"youtube\": {\n \"showinfo\": 0,\n \"rel\": 0,\n \"modestbranding\": 1,\n }\n };\n return videoConfig;\n }\n\n initVideo() {\n this.isLoaded = true;\n }\n\n componentWillLoad() {\n return Promise.allSettled([\n WindowResizeService.registerProp(this.classes).subscribe(newValue => this.classString = newValue)\n ])\n }\n componentDidLoad() {\n let self = this;\n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1\n }\n \n let observer = new IntersectionObserver((entries) => {\n let videojs;\n entries.forEach(async entry => {\n if (entry.isIntersecting) {\n if (!videojs) {\n videojs = await import('video.js');\n await import('videojs-youtube/dist/Youtube.js');\n }\n this.hasPoster = !!this.hostElement.querySelector('[slot=\"poster\"]');\n if (this.videoElement && !this.player) {\n this.player = videojs.default(this.videoElement, this.computedVideoConfig(), function onPlayerReady() {\n self.initVideo();\n if (self.hasPoster || self.autoplay) {\n self.isPlayed = true;\n setTimeout(() => this.play(), 1);\n }\n }); \n }\n }\n });\n }, options);\n observer.observe(this.hostElement);\n }\n\n onClickHandler(event: MouseEvent) {\n event.preventDefault();\n if (!this.isLoaded) {\n return false;\n }\n this.initVideo();\n this.isPlayed = true;\n this.player.play();\n if (this.method === 'html5') {\n this.videoElement.play();\n }\n }\n\n render() {\n let showPlayButton = !this.autoplay && ((this.hasPoster && !this.isPlayed) || !this.isPlayed);\n return (\n <Host class={this.classString}>\n\n { (this.hasPoster && !this.isLoaded) && \n <div class=\"content-video__poster\">\n <slot name=\"poster\"></slot>\n </div>\n }\n { showPlayButton && \n <button class=\"content-video__play\" aria-label={ this.playButtonAriaLabel } onClick={ev => this.onClickHandler(ev)}>\n <slot name=\"playButton\"></slot> \n </button>\n }\n <div class=\"content-video__content\">\n {(!this.hasPoster || this.isLoaded) && \n <video ref={ element => this.videoElement = element }\n class=\"video-js vjs-content-block-theme\"\n controls={this.controls}\n preload={this.preload}\n width={this.width}\n height={this.height}\n crossorigin=\"anonymous\"\n data-setup={this.computedVideoConfig()}\n >\n <slot name=\"no-js-message\"></slot>\n <slot name=\"content\"></slot>\n <slot></sl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;","names":["ContentVideo"],"sources":["src/elements/content-video/content-video.scss?tag=content-video","src/elements/content-video/content-video.tsx"],"sourcesContent":["@import \"'~video.js/dist/video-js.min.css\";\ncontent-video {\n display: block;\n width: 100%;\n position: relative;\n visibility: hidden;\n &.hydrated {\n visibility: inherit;\n height: 100%;\n &.content-video--fit-container {\n .video-js.vjs-fluid {\n height: 100%;\n padding: 0; // remove padding aspect ratio hack\n }\n }\n }\n &[fit-container=\"true\"] {\n height: 100%;\n }\n\n .content-video__content {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .content-video__poster {\n position: relative;\n }\n .content-video__play {\n cursor: pointer;\n appearance: none;\n border: none;\n background: transparent;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n\n &:before {\n content: '\\25BA';\n font-size: 100px;\n }\n }\n \n .vjs-content-block-theme {\n &.video-js {\n width: 100%;\n height: 100%;\n\n video.vjs-tech {\n position: static;\n }\n }\n &.vjs-ended,\n &.vjs-waiting {\n .vjs-loading-spinner { \n display: none;\n }\n }\n &:hover,\n &:focus {\n &:not(:focus-visible) {\n // background: transparent;\n }\n .vjs-big-play-button {\n background-color: transparent;\n }\n }\n .vjs-big-play-button {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: none;\n background: transparent;\n .vjs-icon-placeholder {\n display: block;\n width: 100%;\n height: 100%;\n &:before {\n display: none;\n }\n }\n }\n }\n\n .vjs-poster {\n display: none;\n }\n}","import { Component, h, Host } from '@stencil/core';\nimport { Element, HTMLStencilElement, Prop, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\nimport { getCurrentValue, getHydratedClassString } from '../../utils/utils';\nexport type SupportedVideoMethods = 'html5' | 'youtube';\n\n/**\n * @slot poster - Poster shown before video is played.\n * @slot playButton - Play button contents.\n * @slot no-js-message - Contents of no JS message.\n * @slot content - Adjacent to no-js message for video. Usually not needed.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-video',\n styleUrls: [\n 'content-video.scss',\n ],\n shadow: false,\n})\nexport class ContentVideo {\n public player: any;\n videoElement!: HTMLVideoElement;\n @Element() hostElement: HTMLStencilElement;\n /**\n * @type Select\n * @options youtube\n * @options html5\n */\n @Prop() method: SupportedVideoMethods = 'youtube';\n /** \n * If you're using this inside a content-overlay for example, you may want the video to play immediately on launch.\n * @type Boolean\n */\n @Prop() autoplay: boolean = false;\n /** \n * Supports YouTube and self hosted URLs.\n * @type String\n */\n @Prop() src: string = '';\n /**\n * @type Number\n */\n @Prop() width: number = 16;\n /**\n * @type Number\n */\n @Prop() height: number = 9;\n /**\n * @type String\n */\n @Prop() type: string = 'video/mp4';\n /**\n * @type String\n */\n @Prop() playButtonAriaLabel: string = 'Play';\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) classes: ResponsiveString;\n @State() classString;\n /**\n * @type Boolean\n */\n @Prop() controls: boolean = true;\n /**\n * @type String\n */\n @Prop() preload: string = 'metadata';\n /**\n * Fit the container this video is placed in. When the video is used in an overlay or another place where the video will takeover the existing height, it is recommended to enable this option.\n * @responsive\n * @type String\n */\n @Prop({\n mutable: true,\n reflect: true\n }) fitContainer: ResponsiveString = 'false';\n @State() isLoaded: boolean = false;\n @State() hasPoster: boolean = false;\n @State() isPlayed: boolean = false;\n\n computedVideoConfig() {\n let videoConfig = {};\n videoConfig = {\n \"fill\": getCurrentValue(this.fitContainer) === 'true',\n \"fluid\": getCurrentValue(this.fitContainer) === 'false',\n 'autoplay': this.autoplay === true ? 'muted' : false,\n \"techOrder\": [\"youtube\"],\n \"src\": this.src,\n \"sources\": [{ \n \"type\": \"video/youtube\",\n \"src\": this.src,\n }],\n \"youtube\": {\n \"showinfo\": 0,\n \"rel\": 0,\n \"modestbranding\": 1,\n }\n };\n return videoConfig;\n }\n\n initVideo() {\n this.isLoaded = true;\n }\n\n componentWillLoad() {\n return Promise.allSettled([\n WindowResizeService.registerProp(this.classes).subscribe(newValue => this.classString = newValue)\n ])\n }\n componentDidLoad() {\n let self = this;\n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1\n }\n \n let observer = new IntersectionObserver((entries) => {\n let videojs;\n entries.forEach(async entry => {\n if (entry.isIntersecting) {\n if (!videojs) {\n videojs = await import('video.js');\n await import('videojs-youtube/dist/Youtube.js');\n }\n this.hasPoster = !!this.hostElement.querySelector('[slot=\"poster\"]');\n if (this.videoElement && !this.player) {\n this.player = videojs.default(this.videoElement, this.computedVideoConfig(), function onPlayerReady() {\n self.initVideo();\n if (self.hasPoster || self.autoplay) {\n self.isPlayed = true;\n setTimeout(() => this.play(), 1);\n }\n }); \n }\n }\n });\n }, options);\n observer.observe(this.hostElement);\n }\n\n onClickHandler(event: MouseEvent) {\n event.preventDefault();\n if (!this.isLoaded) {\n return false;\n }\n this.initVideo();\n this.isPlayed = true;\n this.player.play();\n if (this.method === 'html5') {\n this.videoElement.play();\n }\n }\n\n render() {\n let showPlayButton = !this.autoplay && ((this.hasPoster && !this.isPlayed) || !this.isPlayed);\n return (\n <Host class={this.classString}>\n\n { (this.hasPoster && !this.isLoaded) && \n <div class=\"content-video__poster\">\n <slot name=\"poster\"></slot>\n </div>\n }\n { showPlayButton && \n <button class=\"content-video__play\" aria-label={ this.playButtonAriaLabel } onClick={ev => this.onClickHandler(ev)}>\n <slot name=\"playButton\"></slot> \n </button>\n }\n <div class=\"content-video__content\">\n {(!this.hasPoster || this.isLoaded) && \n <video ref={ element => this.videoElement = element }\n class=\"video-js vjs-content-block-theme\"\n controls={this.controls}\n preload={this.preload}\n width={this.width}\n height={this.height}\n crossorigin=\"anonymous\"\n data-setup={this.computedVideoConfig()}\n >\n <slot name=\"no-js-message\"></slot>\n <slot name=\"content\"></slot>\n <slot></slot>\n </video>\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|