@carbon/ibmdotcom-web-components 2.49.0 → 2.50.0-rc.0
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/custom-elements.json +15 -4
- package/dist/dotcom-shell.js +7 -7
- package/dist/dotcom-shell.min.js +7 -7
- package/dist/ibmdotcom-web-components-dotcom-shell.js +7 -7
- package/dist/ibmdotcom-web-components-dotcom-shell.min.js +7 -7
- package/dist/{index-b426f051.js → index-514478b8.js} +10 -15
- package/dist/{index-adfddc06.js → index-9732faeb.js} +8 -8
- package/dist/{left-nav-menu-5e27b743.js → left-nav-menu-2f5322ac.js} +7 -7
- package/dist/{left-nav-menu-285b2d09.js → left-nav-menu-746ad81a.js} +7 -7
- package/dist/{left-nav-menu-category-heading-30bfb070.js → left-nav-menu-category-heading-0e98a8c6.js} +7 -7
- package/dist/{left-nav-menu-category-heading-ec5617ac.js → left-nav-menu-category-heading-22762753.js} +7 -7
- package/dist/{left-nav-menu-item-eaaeb2a2.js → left-nav-menu-item-252b6d0e.js} +7 -7
- package/dist/{left-nav-menu-item-d1f39a4f.js → left-nav-menu-item-a08c2ca0.js} +7 -7
- package/dist/{left-nav-menu-section-6343cf51.js → left-nav-menu-section-40ae6c75.js} +7 -7
- package/dist/{left-nav-menu-section-40165248.js → left-nav-menu-section-a6f52f70.js} +7 -7
- package/dist/{left-nav-overlay-2ceeed16.js → left-nav-overlay-6f936f5f.js} +7 -7
- package/dist/{left-nav-overlay-c58ce474.js → left-nav-overlay-dfce57ab.js} +7 -7
- package/dist/{megamenu-category-group-f388d208.js → megamenu-category-group-b63f1f2d.js} +7 -7
- package/dist/{megamenu-category-group-copy-ac5247f8.js → megamenu-category-group-copy-1e261d94.js} +7 -7
- package/dist/{megamenu-category-group-copy-0d9fac6a.js → megamenu-category-group-copy-419d6ebe.js} +7 -7
- package/dist/{megamenu-category-group-acc5b32b.js → megamenu-category-group-fe150fbc.js} +7 -7
- package/dist/{megamenu-category-heading-8f657c8d.js → megamenu-category-heading-46c39931.js} +7 -7
- package/dist/{megamenu-category-heading-cd3d3fe7.js → megamenu-category-heading-9c2eccbf.js} +7 -7
- package/dist/{megamenu-category-link-b29c1a6a.js → megamenu-category-link-7fa288d5.js} +7 -7
- package/dist/{megamenu-category-link-592c66f0.js → megamenu-category-link-986b3de3.js} +7 -7
- package/dist/{megamenu-category-link-group-50b30323.js → megamenu-category-link-group-1392a46f.js} +7 -7
- package/dist/{megamenu-category-link-group-2448afd6.js → megamenu-category-link-group-f76ba2ac.js} +7 -7
- package/dist/{megamenu-left-navigation-fd6e97cc.js → megamenu-left-navigation-55ebdf48.js} +7 -7
- package/dist/{megamenu-left-navigation-93122184.js → megamenu-left-navigation-eb44aef8.js} +7 -7
- package/dist/{megamenu-overlay-bdf43cd6.js → megamenu-overlay-5c4848c7.js} +7 -7
- package/dist/{megamenu-overlay-daeba46c.js → megamenu-overlay-c4637474.js} +7 -7
- package/dist/{megamenu-tab-656e4007.js → megamenu-tab-b48fbb7c.js} +7 -7
- package/dist/{megamenu-tab-90a388cf.js → megamenu-tab-c2772b72.js} +7 -7
- package/es/components/background-media/background-media.d.ts +1 -1
- package/es/components/background-media/background-media.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.js +3 -3
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.d.ts +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js +2 -2
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.d.ts +3 -3
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.js +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.js.map +1 -1
- package/es/components/notice-choice/notice-choice.d.ts +1 -0
- package/es/components/notice-choice/notice-choice.js +31 -10
- package/es/components/notice-choice/notice-choice.js.map +1 -1
- package/es/components/notice-choice/utils.js +2 -1
- package/es/components/notice-choice/utils.js.map +1 -1
- package/package.json +8 -8
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import { C as C4DMegaMenuRightNavigation, s as styles, c as carbonElement, a as settings } from './index-
|
|
91
|
+
import { C as C4DMegaMenuRightNavigation, s as styles, c as carbonElement, a as settings } from './index-514478b8.js';
|
|
92
92
|
|
|
93
93
|
function _decorate(e, r, t, i) { var o = _getDecoratorsApi(); if (i) for (var n = 0; n < i.length; n++) o = i[n](o); var s = r(function (e) { o.initializeInstanceElements(e, a.elements); }, t), a = o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)), e); return o.initializeClassElements(s.F, a.elements), o.runClassFinishers(s.F, a.finishers); }
|
|
94
94
|
function _getDecoratorsApi() { _getDecoratorsApi = function () { return e; }; var e = { elementsDefinitionOrder: [["method"], ["field"]], initializeInstanceElements: function (e, r) { ["method", "field"].forEach(function (t) { r.forEach(function (r) { r.kind === t && "own" === r.placement && this.defineClassElement(e, r); }, this); }, this); }, initializeClassElements: function (e, r) { var t = e.prototype; ["method", "field"].forEach(function (i) { r.forEach(function (r) { var o = r.placement; if (r.kind === i && ("static" === o || "prototype" === o)) { var n = "static" === o ? e : t; this.defineClassElement(n, r); } }, this); }, this); }, defineClassElement: function (e, r) { var t = r.descriptor; if ("field" === r.kind) { var i = r.initializer; t = { enumerable: t.enumerable, writable: t.writable, configurable: t.configurable, value: void 0 === i ? void 0 : i.call(e) }; } Object.defineProperty(e, r.key, t); }, decorateClass: function (e, r) { var t = [], i = [], o = { static: [], prototype: [], own: [] }; if (e.forEach(function (e) { this.addElementPlacement(e, o); }, this), e.forEach(function (e) { if (!_hasDecorators(e)) return t.push(e); var r = this.decorateElement(e, o); t.push(r.element), t.push.apply(t, r.extras), i.push.apply(i, r.finishers); }, this), !r) return { elements: t, finishers: i }; var n = this.decorateConstructor(t, r); return i.push.apply(i, n.finishers), n.finishers = i, n; }, addElementPlacement: function (e, r, t) { var i = r[e.placement]; if (!t && -1 !== i.indexOf(e.key)) throw new TypeError("Duplicated element (" + e.key + ")"); i.push(e.key); }, decorateElement: function (e, r) { for (var t = [], i = [], o = e.decorators, n = o.length - 1; n >= 0; n--) { var s = r[e.placement]; s.splice(s.indexOf(e.key), 1); var a = this.fromElementDescriptor(e), l = this.toElementFinisherExtras((0, o[n])(a) || a); e = l.element, this.addElementPlacement(e, r), l.finisher && i.push(l.finisher); var c = l.extras; if (c) { for (var p = 0; p < c.length; p++) this.addElementPlacement(c[p], r); t.push.apply(t, c); } } return { element: e, finishers: i, extras: t }; }, decorateConstructor: function (e, r) { for (var t = [], i = r.length - 1; i >= 0; i--) { var o = this.fromClassDescriptor(e), n = this.toClassDescriptor((0, r[i])(o) || o); if (void 0 !== n.finisher && t.push(n.finisher), void 0 !== n.elements) { e = n.elements; for (var s = 0; s < e.length - 1; s++) for (var a = s + 1; a < e.length; a++) if (e[s].key === e[a].key && e[s].placement === e[a].placement) throw new TypeError("Duplicated element (" + e[s].key + ")"); } } return { elements: e, finishers: t }; }, fromElementDescriptor: function (e) { var r = { kind: e.kind, key: e.key, placement: e.placement, descriptor: e.descriptor }; return Object.defineProperty(r, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), "field" === e.kind && (r.initializer = e.initializer), r; }, toElementDescriptors: function (e) { if (void 0 !== e) return _toArray(e).map(function (e) { var r = this.toElementDescriptor(e); return this.disallowProperty(e, "finisher", "An element descriptor"), this.disallowProperty(e, "extras", "An element descriptor"), r; }, this); }, toElementDescriptor: function (e) { var r = e.kind + ""; if ("method" !== r && "field" !== r) throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "' + r + '"'); var t = _toPropertyKey(e.key), i = e.placement + ""; if ("static" !== i && "prototype" !== i && "own" !== i) throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "' + i + '"'); var o = e.descriptor; this.disallowProperty(e, "elements", "An element descriptor"); var n = { kind: r, key: t, placement: i, descriptor: Object.assign({}, o) }; return "field" !== r ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), n.initializer = e.initializer), n; }, toElementFinisherExtras: function (e) { return { element: this.toElementDescriptor(e), finisher: _optionalCallableProperty(e, "finisher"), extras: this.toElementDescriptors(e.extras) }; }, fromClassDescriptor: function (e) { var r = { kind: "class", elements: e.map(this.fromElementDescriptor, this) }; return Object.defineProperty(r, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), r; }, toClassDescriptor: function (e) { var r = e.kind + ""; if ("class" !== r) throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "' + r + '"'); this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor"); var t = _optionalCallableProperty(e, "finisher"); return { elements: this.toElementDescriptors(e.elements), finisher: t }; }, runClassFinishers: function (e, r) { for (var t = 0; t < r.length; t++) { var i = (0, r[t])(e); if (void 0 !== i) { if ("function" != typeof i) throw new TypeError("Finishers must return a constructor."); e = i; } } return e; }, disallowProperty: function (e, r, t) { if (void 0 !== e[r]) throw new TypeError(t + " can't have a ." + r + " property."); } }; return e; }
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import{C as e,s as t,c as r,a as i}from"./index-
|
|
90
|
+
import{C as e,s as t,c as r,a as i}from"./index-9732faeb.js";function n(){n=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!a(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(a)||a);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var d=0;d<c.length;d++)this.addElementPlacement(c[d],t);r.push.apply(r,c)}}return{element:e,finishers:i,extras:r}},decorateConstructor:function(e,t){for(var r=[],i=t.length-1;i>=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw new TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=d(e.key),i=e.placement+"";if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:i,descriptor:Object.assign({},n)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:c(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=c(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var i=(0,t[r])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function o(e){var t,r=d(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}function s(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function a(e){return e.decorators&&e.decorators.length}function l(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function c(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function d(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}const{stablePrefix:p}=i;let u=function(e,t,r,i){var c=n();if(i)for(var d=0;d<i.length;d++)c=i[d](c);var f=t((function(e){c.initializeInstanceElements(e,p.elements)}),r),p=c.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},i=0;i<e.length;i++){var n,o=e[i];if("method"===o.kind&&(n=t.find(r)))if(l(o.descriptor)||l(n.descriptor)){if(a(o)||a(n))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");n.descriptor=o.descriptor}else{if(a(o)){if(a(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");n.decorators=o.decorators}s(o,n)}else t.push(o)}return t}(f.d.map(o)),e);return c.initializeClassElements(f.F,p.elements),c.runClassFinishers(f.F,p.finishers)}([r(`${p}-megamenu-left-navigation`)],(function(e,r){return{F:class extends r{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>t},{kind:"get",static:!0,key:"onlyChildClassName",value:function(){return""}},{kind:"get",static:!0,key:"stableSelector",value:function(){return`${p}--masthead__megamenu-left-navigation`}}]}}),e);export{u as default};
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import { g as s, n, x, s as styles, c as carbonElement, a as settings } from './index-
|
|
91
|
+
import { g as s, n, x, s as styles, c as carbonElement, a as settings } from './index-514478b8.js';
|
|
92
92
|
|
|
93
93
|
let _ = t => t,
|
|
94
94
|
_t;
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import{g as e,n as r,x as t,s as i,c as n,a as o}from"./index-
|
|
90
|
+
import{g as e,n as r,x as t,s as i,c as n,a as o}from"./index-9732faeb.js";let s,a=e=>e;function l(){l=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,r){["method","field"].forEach((function(t){r.forEach((function(r){r.kind===t&&"own"===r.placement&&this.defineClassElement(e,r)}),this)}),this)},initializeClassElements:function(e,r){var t=e.prototype;["method","field"].forEach((function(i){r.forEach((function(r){var n=r.placement;if(r.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:t;this.defineClassElement(o,r)}}),this)}),this)},defineClassElement:function(e,r){var t=r.descriptor;if("field"===r.kind){var i=r.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,r.key,t)},decorateClass:function(e,r){var t=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!f(e))return t.push(e);var r=this.decorateElement(e,n);t.push(r.element),t.push.apply(t,r.extras),i.push.apply(i,r.finishers)}),this),!r)return{elements:t,finishers:i};var o=this.decorateConstructor(t,r);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,r,t){var i=r[e.placement];if(!t&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,r){for(var t=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=r[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(a)||a);e=l.element,this.addElementPlacement(e,r),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var d=0;d<c.length;d++)this.addElementPlacement(c[d],r);t.push.apply(t,c)}}return{element:e,finishers:i,extras:t}},decorateConstructor:function(e,r){for(var t=[],i=r.length-1;i>=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,r[i])(n)||n);if(void 0!==o.finisher&&t.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw new TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:t}},fromElementDescriptor:function(e){var r={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(r.initializer=e.initializer),r},toElementDescriptors:function(e){if(void 0!==e)return(r=e,function(e){if(Array.isArray(e))return e}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,r){if(e){if("string"==typeof e)return h(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,r):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var r=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),r}),this);var r},toElementDescriptor:function(e){var r=e.kind+"";if("method"!==r&&"field"!==r)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+r+'"');var t=m(e.key),i=e.placement+"";if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:r,key:t,placement:i,descriptor:Object.assign({},n)};return"field"!==r?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:u(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var r={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),r},toClassDescriptor:function(e){var r=e.kind+"";if("class"!==r)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+r+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var t=u(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,r){for(var t=0;t<r.length;t++){var i=(0,r[t])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,r,t){if(void 0!==e[r])throw new TypeError(t+" can't have a ."+r+" property.")}};return e}function c(e){var r,t=m(e.key);"method"===e.kind?r={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?r={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?r={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(r={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:r};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}function d(e,r){void 0!==e.descriptor.get?r.descriptor.get=e.descriptor.get:r.descriptor.set=e.descriptor.set}function f(e){return e.decorators&&e.decorators.length}function p(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function u(e,r){var t=e[r];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+r+"' to be a function");return t}function m(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}function h(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,i=Array(r);t<r;t++)i[t]=e[t];return i}const{stablePrefix:y}=o;let v=function(e,r,t,i){var n=l();if(i)for(var o=0;o<i.length;o++)n=i[o](n);var s=r((function(e){n.initializeInstanceElements(e,a.elements)}),t),a=n.decorateClass(function(e){for(var r=[],t=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},i=0;i<e.length;i++){var n,o=e[i];if("method"===o.kind&&(n=r.find(t)))if(p(o.descriptor)||p(n.descriptor)){if(f(o)||f(n))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");n.descriptor=o.descriptor}else{if(f(o)){if(f(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");n.decorators=o.decorators}d(o,n)}else r.push(o)}return r}(s.d.map(c)),e);return n.initializeClassElements(s.F,a.elements),n.runClassFinishers(s.F,a.finishers)}([n(`${y}-megamenu-overlay`)],(function(e,n){return{F:class extends n{constructor(...r){super(...r),e(this)}},d:[{kind:"field",decorators:[r({type:Boolean,reflect:!0})],key:"active",value:()=>!1},{kind:"method",key:"render",value:function(){return t(s||(s=a` <slot></slot> `))}},{kind:"field",static:!0,key:"styles",value:()=>i}]}}),e);export{v as default};
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import{_ as e,F as t,g as r,n as i,p as n,x as o,l as a,m as s,c as l,o as c,q as d,T as u,r as f,t as p,u as h,s as y,a as m}from"./index-
|
|
90
|
+
import{_ as e,F as t,g as r,n as i,p as n,x as o,l as a,m as s,c as l,o as c,q as d,T as u,r as f,t as p,u as h,s as y,a as m}from"./index-9732faeb.js";let v,k,b,g,w=e=>e,E=e([l(`${n}-content-switcher-item`)],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean,reflect:!0,attribute:"hide-divider"})],key:"hideDivider",value:()=>!1},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"selected",value:()=>!1},{kind:"field",decorators:[i()],key:"target",value:void 0},{kind:"field",decorators:[i()],key:"value",value:()=>""},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"icon",value:()=>!1},{kind:"field",decorators:[i({reflect:!0,type:String})],key:"align",value:()=>"top"},{kind:"field",decorators:[i({attribute:"close-on-activation",reflect:!0,type:Boolean})],key:"closeOnActivation",value:()=>!0},{kind:"field",key:"enterDelayMs",value:()=>100},{kind:"field",key:"leaveDelayMs",value:()=>100},{kind:"method",key:"updated",value:function(e){var t;e&&(null===(t=this.shadowRoot)||void 0===t||null===(t=t.querySelector(`${n}-tooltip`))||void 0===t||null===(t=t.shadowRoot)||void 0===t||null===(t=t.querySelector(`.${n}--tooltip`))||void 0===t||t.classList.add(`${n}--icon-tooltip`))}},{kind:"method",key:"_renderTooltipContent",value:function(){return o(v||(v=w`
|
|
91
91
|
<cds-tooltip-content>
|
|
92
92
|
<slot name="tooltip-content"></slot>
|
|
93
93
|
</cds-tooltip-content>
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import { _ as _decorate$1, F as FocusMixin, g as s, n, p as prefix$1, x, l as _objectSpread2, m as styles, c as carbonElement, o as l, q as o, T as TABS_TYPE, r as styles$1, t as _get$1, u as _getPrototypeOf$1, s as styles$2, a as settings } from './index-
|
|
91
|
+
import { _ as _decorate$1, F as FocusMixin, g as s, n, p as prefix$1, x, l as _objectSpread2, m as styles, c as carbonElement, o as l, q as o, T as TABS_TYPE, r as styles$1, t as _get$1, u as _getPrototypeOf$1, s as styles$2, a as settings } from './index-514478b8.js';
|
|
92
92
|
|
|
93
93
|
let _$2 = t => t,
|
|
94
94
|
_t$2,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { GRADIENT_DIRECTION, MOBILE_POSITION } from './defs';
|
|
10
10
|
import C4DImage from '../image/image';
|
|
11
|
-
import C4DVideoPlayerContainer from '../video-player/video-player-container';
|
|
11
|
+
import C4DVideoPlayerContainer from '../video-player-v7/video-player-container';
|
|
12
12
|
/**
|
|
13
13
|
* Background media.
|
|
14
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background-media.js","names":["html","property","classMap","pauseIcon","playIcon","settings","styles","GRADIENT_DIRECTION","MOBILE_POSITION","C4DImage","C4DLeadSpace","carbonElement","customElement","prefix","stablePrefix","c4dPrefix","C4DBackgroundMedia","_decorate","_initialize","_C4DImage","constructor","args","F","d","kind","key","value","_getGradientClass","gradientDirection","_getMobilePositionClass","videoPlayerContainer","video","mobilePosition","decorators","attribute","reflect","LEFT_TO_RIGHT","type","Boolean","BOTTOM","querySelector","_handleBackgroundMedia","event","_event$target","assignedElements","target","assignedImages","filter","el","tagName","toUpperCase","assignedVideos","length","containsOnlyImages","toggleVideoState","isPlaying","pauseAllVideos","playAllVideos","requestUpdate","renderVideoControls","_t","_","renderGradient","_t2","_getMediaOpacity","backgroundOpacity","_handleIsRTL","isRTL","dir","getComputedStyle","direction","RIGHT_TO_LEFT","console","log","updated","TOP","_this$parentElement","parentElement","shadowRoot","prepend","gradientHidden","hasAttribute","firstUpdated","render","_t3","_superPropGet","static"],"sources":["components/background-media/background-media.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport pauseIcon from '@carbon/web-components/es/icons/pause--outline--filled/32.js';\nimport playIcon from '@carbon/web-components/es/icons/play--filled/32.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport styles from './background-media.scss';\nimport { GRADIENT_DIRECTION, MOBILE_POSITION } from './defs';\nimport C4DImage from '../image/image';\nimport C4DVideoPlayerContainer from '../video-player/video-player-container';\nimport C4DLeadSpace from '../leadspace/leadspace';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\nconst { prefix, stablePrefix: c4dPrefix } = settings;\n\n/**\n * Background media.\n *\n * @element c4d-background-media\n * @csspart controls - The video player controls. Usage: `c4d-background-media::part(controls)`\n * @csspart gradient - The gradient covering the image. Usage: `c4d-background-media::part(gradient)`\n * @csspart container - The component's container. Usage: `c4d-background-media::part(container)`\n * @csspart item - The image container. Usage: `c4d-background-media::part(item)`\n */\n\n@customElement(`${c4dPrefix}-background-media`)\nclass C4DBackgroundMedia extends C4DImage {\n /**\n * Returns a class-name based on the Gradient Direction type\n */\n protected _getGradientClass() {\n return classMap({\n [`${prefix}--background-media--gradient`]: true,\n [`${prefix}--background-media--gradient--${this.gradientDirection}`]:\n this.gradientDirection,\n });\n }\n\n /**\n * Returns a class-name based on the Mobile Position type\n */\n protected _getMobilePositionClass() {\n const { videoPlayerContainer: video } = this;\n return classMap({\n [`${prefix}--background-media--container`]: true,\n [`${prefix}--background-media--mobile-position`]: true,\n [`${prefix}--background-media--mobile-position--${this.mobilePosition}`]:\n this.mobilePosition,\n [`${prefix}--background-media--image`]: video === null,\n [`${prefix}--background-media--video`]: video !== null,\n });\n }\n\n /**\n * The opacity of the background image or video. 100 is fully visible, 0 is fully transparent.\n */\n @property({ attribute: 'opacity', reflect: true })\n backgroundOpacity = 100;\n\n /**\n * Set to true in _handleBackgroundMedia if all children are `c4d-image-item`\n */\n @property()\n containsOnlyImages = false;\n\n /**\n * Gradient Direction (left-to-right (default) | top-to-bottom)\n */\n @property({ attribute: 'gradient-direction', reflect: true })\n gradientDirection = GRADIENT_DIRECTION.LEFT_TO_RIGHT;\n\n /**\n * Option to hide gradient. Automatically set to yes if parent is c4d-leadspace\n */\n @property()\n gradientHidden = false;\n\n /**\n * Determines if the direction is right-to-left\n */\n @property({ type: Boolean })\n isRTL = false;\n\n /**\n * @deprecated\n *\n * Mobile Position (bottom (default) | top)\n */\n @property({ attribute: 'mobile-position', reflect: true })\n mobilePosition = MOBILE_POSITION.BOTTOM;\n\n /**\n * Query selector to get the child video player container\n */\n protected get videoPlayerContainer() {\n return this.querySelector(\n `${c4dPrefix}-video-player-container`\n ) as C4DVideoPlayerContainer | null;\n }\n\n /**\n * Conditionally runs super.render() if all children are `c4d-image-item`\n */\n private _handleBackgroundMedia(event: Event) {\n const assignedElements = (\n event.target as HTMLSlotElement\n )?.assignedElements();\n const assignedImages = assignedElements.filter(\n (el) => el.tagName === `${c4dPrefix}-image-item`.toUpperCase()\n );\n const assignedVideos = assignedElements.filter(\n (el) => el.tagName === `${c4dPrefix}-video-player-container`.toUpperCase()\n ) as C4DVideoPlayerContainer[];\n\n if (assignedImages.length && !assignedVideos.length) {\n this.containsOnlyImages = true;\n }\n }\n\n toggleVideoState() {\n const { videoPlayerContainer: video } = this;\n\n if (video?.isPlaying) {\n video.pauseAllVideos();\n } else {\n video?.playAllVideos();\n }\n\n this.requestUpdate();\n }\n\n renderVideoControls() {\n const { toggleVideoState, videoPlayerContainer } = this;\n const { isPlaying } = videoPlayerContainer ?? {};\n\n return html`\n <button\n part=\"controls\"\n @click=${toggleVideoState}\n class=\"${prefix}--video-player__controls\"\n aria-pressed=\"${!isPlaying}\"\n aria-label=\"${isPlaying ? 'Pause the video' : 'Play the video'}\"\n hasTooltip>\n ${isPlaying ? pauseIcon() : playIcon()}\n </button>\n `;\n }\n\n renderGradient() {\n return html`\n <div part=\"gradient\" class=\"${this._getGradientClass()}\"></div>\n `;\n }\n\n _getMediaOpacity() {\n if (this.backgroundOpacity <= 100 && this.backgroundOpacity >= 0) {\n return `opacity:${this.backgroundOpacity / 100}`;\n }\n return '';\n }\n\n _handleIsRTL() {\n this.isRTL =\n this.dir === 'rtl' || getComputedStyle(this).direction === 'rtl';\n\n if (this.isRTL) {\n this.gradientDirection = GRADIENT_DIRECTION.RIGHT_TO_LEFT;\n }\n\n console.log(this.isRTL);\n }\n\n /**\n * Append the c4d-background-media to the parent element where this component is being used.\n */\n updated() {\n // mobilePosition attribute deprecated\n if (this.mobilePosition === MOBILE_POSITION.TOP) {\n this.parentElement?.shadowRoot?.prepend(this);\n }\n\n if (this.parentElement instanceof C4DLeadSpace) {\n this.gradientHidden = true;\n }\n\n if (this.hasAttribute('default-src') && !this.videoPlayerContainer) {\n this.containsOnlyImages = true;\n }\n }\n\n firstUpdated(): void {\n this._handleIsRTL();\n }\n\n render() {\n return html`\n <div part=\"container\" class=\"${this._getMobilePositionClass()}\">\n ${this.gradientHidden ? '' : this.renderGradient()}\n <div\n part=\"item\"\n class=\"${prefix}--background-media--item\"\n style=\"${this._getMediaOpacity()}\">\n ${this.containsOnlyImages ? super.render() : ''}\n <slot @slotchange=\"${this._handleBackgroundMedia}\"></slot>\n </div>\n </div>\n ${this.videoPlayerContainer ? this.renderVideoControls() : ''}\n `;\n }\n\n static get stableSelector() {\n return `${c4dPrefix}--background-media`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DBackgroundMedia;\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,KAAK;AAC1B,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,QAAQ,QAAQ,6BAA6B;AACtD,OAAOC,SAAS,MAAM,8DAA8D;AACpF,OAAOC,QAAQ,MAAM,oDAAoD;AACzE,OAAOC,QAAQ,MAAM,+DAA+D;AACpF,OAAOC,MAAM,MAAM,6BAAyB;AAC5C,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,WAAQ;AAC5D,OAAOC,QAAQ,MAAM,mBAAgB;AAErC,OAAOC,YAAY,MAAM,2BAAwB;AACjD,SAASC,aAAa,IAAIC,aAAa,QAAQ,gEAAgE;AAE/G,MAAM;EAAEC,MAAM;EAAEC,YAAY,EAAEC;AAAU,CAAC,GAAGV,QAAQ;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAWMW,kBAAkB,GAAAC,SAAA,EADvBL,aAAa,CAAC,GAAGG,SAAS,mBAAmB,CAAC,aAAAG,WAAA,EAAAC,SAAA;EAA/C,MACMH,kBAAkB,SAAAG,SAAA,CAAkB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EA6L1C;EAAC;IAAAI,CAAA,EA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,kBAAkB,GAAG,IAAI;QAChC;MACF;IAAC;MAAA7B,IAAA;MAAAC,GAAA;MAAAC,KAAA,EAED,SAAAwD,YAAYA,CAAA,EAAS;QACnB,IAAI,CAAChB,YAAY,CAAC,CAAC;MACrB;IAAC;MAAA1C,IAAA;MAAAC,GAAA;MAAAC,KAAA,EAED,SAAAyD,MAAMA,CAAA,EAAG;QACP,OAAOnF,IAAI,CAAAoF,GAAA,KAAAA,GAAA,GAAAvB,CAAA;AACf,qCADe;AACf,UADe;AACf;AACA;AACA,mBAHe;AACf,mBADe;AACf,YADe;AACf,+BADe;AACf;AACA;AACA,QAHe;AACf,KADe,GACsB,IAAI,CAAChC,uBAAuB,CAAC,CAAC,EACzD,IAAI,CAACmD,cAAc,GAAG,EAAE,GAAG,IAAI,CAAClB,cAAc,CAAC,CAAC,EAGvCjD,MAAM,EACN,IAAI,CAACmD,gBAAgB,CAAC,CAAC,EAC9B,IAAI,CAACX,kBAAkB,GAAAgC,aAAA,CAhL7BrE,kBAAkB,2BAgL+B,EAAE,EAC1B,IAAI,CAACyB,sBAAsB,EAGlD,IAAI,CAACX,oBAAoB,GAAG,IAAI,CAAC6B,mBAAmB,CAAC,CAAC,GAAG,EAAE;MAEjE;IAAC;MAAAnC,IAAA;MAAA8D,MAAA;MAAA7D,GAAA;MAAAC,KAAA,EAED,SAAAA,CAAA,EAA4B;QAC1B,OAAO,GAAGX,SAAS,oBAAoB;MACzC;IAAC;MAAAS,IAAA;MAAA8D,MAAA;MAAA7D,GAAA;MAAAC,MAAA;QAAA,OAEepB,MAAM;MAAA;IAAA;EAAA;AAAA,GA5LSG,QAAQ;AA+LzC;AACA,eAAeO,kBAAkB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"background-media.js","names":["html","property","classMap","pauseIcon","playIcon","settings","styles","GRADIENT_DIRECTION","MOBILE_POSITION","C4DImage","C4DLeadSpace","carbonElement","customElement","prefix","stablePrefix","c4dPrefix","C4DBackgroundMedia","_decorate","_initialize","_C4DImage","constructor","args","F","d","kind","key","value","_getGradientClass","gradientDirection","_getMobilePositionClass","videoPlayerContainer","video","mobilePosition","decorators","attribute","reflect","LEFT_TO_RIGHT","type","Boolean","BOTTOM","querySelector","_handleBackgroundMedia","event","_event$target","assignedElements","target","assignedImages","filter","el","tagName","toUpperCase","assignedVideos","length","containsOnlyImages","toggleVideoState","isPlaying","pauseAllVideos","playAllVideos","requestUpdate","renderVideoControls","_t","_","renderGradient","_t2","_getMediaOpacity","backgroundOpacity","_handleIsRTL","isRTL","dir","getComputedStyle","direction","RIGHT_TO_LEFT","console","log","updated","TOP","_this$parentElement","parentElement","shadowRoot","prepend","gradientHidden","hasAttribute","firstUpdated","render","_t3","_superPropGet","static"],"sources":["components/background-media/background-media.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport pauseIcon from '@carbon/web-components/es/icons/pause--outline--filled/32.js';\nimport playIcon from '@carbon/web-components/es/icons/play--filled/32.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport styles from './background-media.scss';\nimport { GRADIENT_DIRECTION, MOBILE_POSITION } from './defs';\nimport C4DImage from '../image/image';\nimport C4DVideoPlayerContainer from '../video-player-v7/video-player-container';\nimport C4DLeadSpace from '../leadspace/leadspace';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\nconst { prefix, stablePrefix: c4dPrefix } = settings;\n\n/**\n * Background media.\n *\n * @element c4d-background-media\n * @csspart controls - The video player controls. Usage: `c4d-background-media::part(controls)`\n * @csspart gradient - The gradient covering the image. Usage: `c4d-background-media::part(gradient)`\n * @csspart container - The component's container. Usage: `c4d-background-media::part(container)`\n * @csspart item - The image container. Usage: `c4d-background-media::part(item)`\n */\n\n@customElement(`${c4dPrefix}-background-media`)\nclass C4DBackgroundMedia extends C4DImage {\n /**\n * Returns a class-name based on the Gradient Direction type\n */\n protected _getGradientClass() {\n return classMap({\n [`${prefix}--background-media--gradient`]: true,\n [`${prefix}--background-media--gradient--${this.gradientDirection}`]:\n this.gradientDirection,\n });\n }\n\n /**\n * Returns a class-name based on the Mobile Position type\n */\n protected _getMobilePositionClass() {\n const { videoPlayerContainer: video } = this;\n return classMap({\n [`${prefix}--background-media--container`]: true,\n [`${prefix}--background-media--mobile-position`]: true,\n [`${prefix}--background-media--mobile-position--${this.mobilePosition}`]:\n this.mobilePosition,\n [`${prefix}--background-media--image`]: video === null,\n [`${prefix}--background-media--video`]: video !== null,\n });\n }\n\n /**\n * The opacity of the background image or video. 100 is fully visible, 0 is fully transparent.\n */\n @property({ attribute: 'opacity', reflect: true })\n backgroundOpacity = 100;\n\n /**\n * Set to true in _handleBackgroundMedia if all children are `c4d-image-item`\n */\n @property()\n containsOnlyImages = false;\n\n /**\n * Gradient Direction (left-to-right (default) | top-to-bottom)\n */\n @property({ attribute: 'gradient-direction', reflect: true })\n gradientDirection = GRADIENT_DIRECTION.LEFT_TO_RIGHT;\n\n /**\n * Option to hide gradient. Automatically set to yes if parent is c4d-leadspace\n */\n @property()\n gradientHidden = false;\n\n /**\n * Determines if the direction is right-to-left\n */\n @property({ type: Boolean })\n isRTL = false;\n\n /**\n * @deprecated\n *\n * Mobile Position (bottom (default) | top)\n */\n @property({ attribute: 'mobile-position', reflect: true })\n mobilePosition = MOBILE_POSITION.BOTTOM;\n\n /**\n * Query selector to get the child video player container\n */\n protected get videoPlayerContainer() {\n return this.querySelector(\n `${c4dPrefix}-video-player-container`\n ) as C4DVideoPlayerContainer | null;\n }\n\n /**\n * Conditionally runs super.render() if all children are `c4d-image-item`\n */\n private _handleBackgroundMedia(event: Event) {\n const assignedElements = (\n event.target as HTMLSlotElement\n )?.assignedElements();\n const assignedImages = assignedElements.filter(\n (el) => el.tagName === `${c4dPrefix}-image-item`.toUpperCase()\n );\n const assignedVideos = assignedElements.filter(\n (el) => el.tagName === `${c4dPrefix}-video-player-container`.toUpperCase()\n ) as C4DVideoPlayerContainer[];\n\n if (assignedImages.length && !assignedVideos.length) {\n this.containsOnlyImages = true;\n }\n }\n\n toggleVideoState() {\n const { videoPlayerContainer: video } = this;\n\n if (video?.isPlaying) {\n video.pauseAllVideos();\n } else {\n video?.playAllVideos();\n }\n\n this.requestUpdate();\n }\n\n renderVideoControls() {\n const { toggleVideoState, videoPlayerContainer } = this;\n const { isPlaying } = videoPlayerContainer ?? {};\n\n return html`\n <button\n part=\"controls\"\n @click=${toggleVideoState}\n class=\"${prefix}--video-player__controls\"\n aria-pressed=\"${!isPlaying}\"\n aria-label=\"${isPlaying ? 'Pause the video' : 'Play the video'}\"\n hasTooltip>\n ${isPlaying ? pauseIcon() : playIcon()}\n </button>\n `;\n }\n\n renderGradient() {\n return html`\n <div part=\"gradient\" class=\"${this._getGradientClass()}\"></div>\n `;\n }\n\n _getMediaOpacity() {\n if (this.backgroundOpacity <= 100 && this.backgroundOpacity >= 0) {\n return `opacity:${this.backgroundOpacity / 100}`;\n }\n return '';\n }\n\n _handleIsRTL() {\n this.isRTL =\n this.dir === 'rtl' || getComputedStyle(this).direction === 'rtl';\n\n if (this.isRTL) {\n this.gradientDirection = GRADIENT_DIRECTION.RIGHT_TO_LEFT;\n }\n\n console.log(this.isRTL);\n }\n\n /**\n * Append the c4d-background-media to the parent element where this component is being used.\n */\n updated() {\n // mobilePosition attribute deprecated\n if (this.mobilePosition === MOBILE_POSITION.TOP) {\n this.parentElement?.shadowRoot?.prepend(this);\n }\n\n if (this.parentElement instanceof C4DLeadSpace) {\n this.gradientHidden = true;\n }\n\n if (this.hasAttribute('default-src') && !this.videoPlayerContainer) {\n this.containsOnlyImages = true;\n }\n }\n\n firstUpdated(): void {\n this._handleIsRTL();\n }\n\n render() {\n return html`\n <div part=\"container\" class=\"${this._getMobilePositionClass()}\">\n ${this.gradientHidden ? '' : this.renderGradient()}\n <div\n part=\"item\"\n class=\"${prefix}--background-media--item\"\n style=\"${this._getMediaOpacity()}\">\n ${this.containsOnlyImages ? super.render() : ''}\n <slot @slotchange=\"${this._handleBackgroundMedia}\"></slot>\n </div>\n </div>\n ${this.videoPlayerContainer ? this.renderVideoControls() : ''}\n `;\n }\n\n static get stableSelector() {\n return `${c4dPrefix}--background-media`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DBackgroundMedia;\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,KAAK;AAC1B,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,QAAQ,QAAQ,6BAA6B;AACtD,OAAOC,SAAS,MAAM,8DAA8D;AACpF,OAAOC,QAAQ,MAAM,oDAAoD;AACzE,OAAOC,QAAQ,MAAM,+DAA+D;AACpF,OAAOC,MAAM,MAAM,6BAAyB;AAC5C,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,WAAQ;AAC5D,OAAOC,QAAQ,MAAM,mBAAgB;AAErC,OAAOC,YAAY,MAAM,2BAAwB;AACjD,SAASC,aAAa,IAAIC,aAAa,QAAQ,gEAAgE;AAE/G,MAAM;EAAEC,MAAM;EAAEC,YAAY,EAAEC;AAAU,CAAC,GAAGV,QAAQ;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAWMW,kBAAkB,GAAAC,SAAA,EADvBL,aAAa,CAAC,GAAGG,SAAS,mBAAmB,CAAC,aAAAG,WAAA,EAAAC,SAAA;EAA/C,MACMH,kBAAkB,SAAAG,SAAA,CAAkB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EA6L1C;EAAC;IAAAI,CAAA,EA7LKN,kBAAkB;IAAAO,CAAA;MAAAC,IA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;MAAA7B,IAAA;MAAAC,GAAA;MAAAC,KAAA,EAED,SAAAwD,YAAYA,CAAA,EAAS;QACnB,IAAI,CAAChB,YAAY,CAAC,CAAC;MACrB;IAAC;MAAA1C,IAAA;MAAAC,GAAA;MAAAC,KAAA,EAED,SAAAyD,MAAMA,CAAA,EAAG;QACP,OAAOnF,IAAI,CAAAoF,GAAA,KAAAA,GAAA,GAAAvB,CAAA;AACf,qCADe;AACf,UADe;AACf;AACA;AACA,mBAHe;AACf,mBADe;AACf,YADe;AACf,+BADe;AACf;AACA;AACA,QAHe;AACf,KADe,GACsB,IAAI,CAAChC,uBAAuB,CAAC,CAAC,EACzD,IAAI,CAACmD,cAAc,GAAG,EAAE,GAAG,IAAI,CAAClB,cAAc,CAAC,CAAC,EAGvCjD,MAAM,EACN,IAAI,CAACmD,gBAAgB,CAAC,CAAC,EAC9B,IAAI,CAACX,kBAAkB,GAAAgC,aAAA,CAhL7BrE,kBAAkB,2BAgL+B,EAAE,EAC1B,IAAI,CAACyB,sBAAsB,EAGlD,IAAI,CAACX,oBAAoB,GAAG,IAAI,CAAC6B,mBAAmB,CAAC,CAAC,GAAG,EAAE;MAEjE;IAAC;MAAAnC,IAAA;MAAA8D,MAAA;MAAA7D,GAAA;MAAAC,KAAA,EAED,SAAAA,CAAA,EAA4B;QAC1B,OAAO,GAAGX,SAAS,oBAAoB;MACzC;IAAC;MAAAS,IAAA;MAAA8D,MAAA;MAAA7D,GAAA;MAAAC,MAAA;QAAA,OAEepB,MAAM;MAAA;IAAA;EAAA;AAAA,GA5LSG,QAAQ;AA+LzC;AACA,eAAeO,kBAAkB","ignoreList":[]}
|
|
@@ -20,7 +20,7 @@ import { html } from 'lit';
|
|
|
20
20
|
import { property, query } from 'lit/decorators.js';
|
|
21
21
|
import settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
|
|
22
22
|
import C4DLightboxMediaViewerBody from "./lightbox-media-viewer-body.js";
|
|
23
|
-
import C4DVideoPlayerContainer from "../video-player/video-player-container.js";
|
|
23
|
+
import C4DVideoPlayerContainer from "../video-player-v7/video-player-container.js";
|
|
24
24
|
import C4DExpressiveModal from "../expressive-modal/expressive-modal.js";
|
|
25
25
|
import { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
|
26
26
|
const {
|
|
@@ -185,14 +185,14 @@ let C4DLightboxMediaViewer = _decorate([customElement(`${c4dPrefix}-lightbox-med
|
|
|
185
185
|
thumbnail
|
|
186
186
|
} = this;
|
|
187
187
|
this.innerHTML = `
|
|
188
|
-
<c4d-video-player-container
|
|
188
|
+
<c4d-video-player-container-v7
|
|
189
189
|
playing-mode="inline"
|
|
190
190
|
video-id="${videoId}"
|
|
191
191
|
caption="${caption}"
|
|
192
192
|
?hide-caption="${hideCaption}"
|
|
193
193
|
thumbnail="${thumbnail}"
|
|
194
194
|
slot="media"
|
|
195
|
-
></c4d-video-player-container>
|
|
195
|
+
></c4d-video-player-container-v7>
|
|
196
196
|
`;
|
|
197
197
|
} else {
|
|
198
198
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightbox-media-viewer.js","names":["html","property","query","settings","C4DLightboxMediaViewerBody","C4DVideoPlayerContainer","C4DExpressiveModal","carbonElement","customElement","stablePrefix","c4dPrefix","C4DLightboxMediaViewer","_decorate","_initialize","_C4DLightboxMediaView","constructor","args","F","d","kind","key","value","_renderDescription","description","_t","_","_renderMedia","_t2","_handleSlotChange","_renderTitle","title","_t3","_renderCTAs","_t4","decorators","event","_containingModal","containingModal","media","target","assignedNodes","_mediaItem","_intersectionObserver","IntersectionObserver","disconnect","undefined","_boundModalClosedHandler","removeEventListener","eventBeforeClose","_mediaWindow","mediaWindow","_containingCarousel","containingCarousel","callback","_handleOutOfCarouselView","bind","root","rootMargin","threshold","observe","_handleModalClosed","addEventListener","entries","forEach","entry","intersectionRatio","_pauseVideo","mediaItem","pauseAllVideos","connectedCallback","_superPropGet","closest","update","changedProperties","videoId","caption","hideCaption","thumbnail","innerHTML","alt","defaultSrc","attribute","static"],"sources":["components/lightbox-media-viewer/lightbox-media-viewer.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport C4DLightboxMediaViewerBody from './lightbox-media-viewer-body';\nimport C4DVideoPlayerContainer from '../video-player/video-player-container';\nimport C4DCarousel from '../carousel/carousel';\nimport C4DExpressiveModal from '../expressive-modal/expressive-modal';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\nconst { stablePrefix: c4dPrefix } = settings;\n\n/**\n * The image content of lightbox media viewer.\n *\n * @element c4d-lightbox-media-viewer\n * @slot title - The title content.\n * @slot description - The description content.\n * @slot cta - The CTA content.\n * @csspart container - The wrapper around the lightbox media. Usage: `c4d-lightbox-video-player::part(container)`\n * @csspart row - The wrapper around the row. Usage: `c4d-lightbox-video-player::part(row)`\n * @csspart media - The wrapper around media. Usage: `c4d-lightbox-video-player::part(media)`\n * @csspart content-wrapper - The wrapper around content. Usage: `c4d-lightbox-video-player::part(content-wrapper)`\n * @csspart content - The inner wrapper around content. Usage: `c4d-lightbox-video-player::part(content)`\n * @csspart title - The title of the media. Usage: `c4d-lightbox-video-player::part(title)`\n * @csspart description - The description of the media. Usage: `c4d-lightbox-video-player::part(description)`\n * @csspart h2 - The h2 element that holds the title. Usage: `c4d-lightbox-video-player::part(h2)`\n */\n@customElement(`${c4dPrefix}-lightbox-media-viewer`)\nclass C4DLightboxMediaViewer extends C4DLightboxMediaViewerBody {\n _renderDescription() {\n const { description } = this;\n return html` <slot name=\"description\">${description}</slot> `;\n }\n\n _renderMedia() {\n return html`\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n `;\n }\n\n _renderTitle() {\n const { title } = this;\n return html`\n <slot name=\"title\"\n ><h2 part=\"h2\" style=\"all: inherit;\">${title}</h2></slot\n >\n `;\n }\n\n _renderCTAs() {\n return html` <slot name=\"cta\"></slot> `;\n }\n\n private _mediaItem?: HTMLElement;\n\n @query(`.${c4dPrefix}--lightbox-media-viewer__media`)\n private _mediaWindow!: HTMLDivElement;\n\n private _containingCarousel?: C4DCarousel;\n\n private _containingModal?: C4DExpressiveModal;\n\n private _handleSlotChange(event: Event) {\n const { _containingModal: containingModal } = this;\n const [media] = (event.target as HTMLSlotElement).assignedNodes();\n this._mediaItem = media as HTMLImageElement | C4DVideoPlayerContainer;\n\n // Disconnect & delete intersection observer\n if (this._intersectionObserver instanceof IntersectionObserver) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n }\n\n // Remove modal closed listeners from the containing modal\n if (containingModal && this._boundModalClosedHandler) {\n containingModal.removeEventListener(\n C4DExpressiveModal.eventBeforeClose,\n this._boundModalClosedHandler\n );\n this._boundModalClosedHandler = undefined;\n }\n\n if (media instanceof C4DVideoPlayerContainer) {\n const {\n _mediaWindow: mediaWindow,\n _containingCarousel: containingCarousel,\n } = this;\n\n // Watch for out-of-view if we're in a carousel\n if (mediaWindow && containingCarousel) {\n const callback = this._handleOutOfCarouselView.bind(this);\n this._intersectionObserver = new IntersectionObserver(callback, {\n root: containingCarousel,\n rootMargin: '999px 0px 999px 0px',\n threshold: 1,\n });\n\n this._intersectionObserver.observe(mediaWindow);\n }\n\n // Watch for modal close\n if (containingModal) {\n this._boundModalClosedHandler = this._handleModalClosed.bind(this);\n\n containingModal.addEventListener(\n C4DExpressiveModal.eventBeforeClose,\n this._boundModalClosedHandler\n );\n }\n }\n }\n\n private _intersectionObserver?: IntersectionObserver;\n\n private _handleOutOfCarouselView(entries) {\n entries.forEach((entry) => {\n if (entry.intersectionRatio < 1) {\n this._pauseVideo();\n }\n });\n }\n\n private _handleModalClosed() {\n this._pauseVideo();\n }\n\n private _pauseVideo() {\n const { _mediaItem: mediaItem } = this;\n\n if (mediaItem instanceof C4DVideoPlayerContainer) {\n mediaItem.pauseAllVideos();\n }\n }\n\n _boundModalClosedHandler?: EventListenerOrEventListenerObject;\n\n connectedCallback() {\n super.connectedCallback();\n\n this._containingCarousel =\n (this.closest(`${c4dPrefix}-carousel`) as C4DCarousel) || undefined;\n this._containingModal =\n (this.closest(`${c4dPrefix}-expressive-modal`) as C4DExpressiveModal) ||\n undefined;\n }\n\n update(changedProperties) {\n if (this.videoId) {\n const { videoId, caption, hideCaption, thumbnail } = this;\n this.innerHTML = `\n <c4d-video-player-container\n playing-mode=\"inline\"\n video-id=\"${videoId}\"\n caption=\"${caption}\"\n ?hide-caption=\"${hideCaption}\"\n thumbnail=\"${thumbnail}\"\n slot=\"media\"\n ></c4d-video-player-container>\n `;\n } else {\n const { alt, defaultSrc } = this;\n this.innerHTML = `\n <img\n class=\"${c4dPrefix}--image__img\"\n alt=\"${alt}\"\n src=\"${defaultSrc}\"\n loading=\"lazy\"\n slot=\"media\"\n style=\"max-width:100%;max-height:100%\"\n />\n `;\n }\n super.update(changedProperties);\n }\n\n /**\n * The alternate text.\n */\n @property()\n alt = '';\n\n /**\n * The image source.\n */\n @property({ attribute: 'default-src' })\n defaultSrc = '';\n\n /**\n * The media description.\n */\n @property()\n description = '';\n\n /**\n * The media title.\n */\n @property()\n title = '';\n\n @property({ attribute: 'video-id' })\n videoId = '';\n\n @property()\n caption = '';\n\n @property()\n hideCaption = false;\n\n @property()\n thumbnail = '';\n\n /**\n * The name of the custom event fired before this modal is being closed upon a user gesture.\n * Cancellation of this event stops the user-initiated action of closing this modal.\n */\n static get eventBeforeModalClose() {\n return `${c4dPrefix}-expressive-modal-beingclosed`;\n }\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DLightboxMediaViewer;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,KAA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AA;MAAAF,IAAA;MAAAe,UAAA,GAETjC,QAAQ,CAAC;QAAEgF,SAAS,EAAE;MAAW,CAAC,CAAC;MAAA7D,GAAA;MAAAC,MAAA;QAAA,OAC1B,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAe,UAAA,GAEXjC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACD,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAe,UAAA,GAEXjC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACG,KAAK;MAAA;IAAA;MAAAF,IAAA;MAAAe,UAAA,GAElBjC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACC,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAA+D,MAAA;MAAA9D,GAAA;MAAAC,KAAA;MA5Bd;AACF;AACA;MAIE;AACF;AACA;MAIE;AACF;AACA;MAgBE;AACF;AACA;AACA;MACE,SAAAA,CAAA,EAAmC;QACjC,OAAO,GAAGX,SAAS,+BAA+B;MACpD;IAAC;EAAA;AAAA,GA7LkCN,0BAA0B;AAgM/D;AACA,eAAeO,sBAAsB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"lightbox-media-viewer.js","names":["html","property","query","settings","C4DLightboxMediaViewerBody","C4DVideoPlayerContainer","C4DExpressiveModal","carbonElement","customElement","stablePrefix","c4dPrefix","C4DLightboxMediaViewer","_decorate","_initialize","_C4DLightboxMediaView","constructor","args","F","d","kind","key","value","_renderDescription","description","_t","_","_renderMedia","_t2","_handleSlotChange","_renderTitle","title","_t3","_renderCTAs","_t4","decorators","event","_containingModal","containingModal","media","target","assignedNodes","_mediaItem","_intersectionObserver","IntersectionObserver","disconnect","undefined","_boundModalClosedHandler","removeEventListener","eventBeforeClose","_mediaWindow","mediaWindow","_containingCarousel","containingCarousel","callback","_handleOutOfCarouselView","bind","root","rootMargin","threshold","observe","_handleModalClosed","addEventListener","entries","forEach","entry","intersectionRatio","_pauseVideo","mediaItem","pauseAllVideos","connectedCallback","_superPropGet","closest","update","changedProperties","videoId","caption","hideCaption","thumbnail","innerHTML","alt","defaultSrc","attribute","static"],"sources":["components/lightbox-media-viewer/lightbox-media-viewer.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport C4DLightboxMediaViewerBody from './lightbox-media-viewer-body';\nimport C4DVideoPlayerContainer from '../video-player-v7/video-player-container';\nimport C4DCarousel from '../carousel/carousel';\nimport C4DExpressiveModal from '../expressive-modal/expressive-modal';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\nconst { stablePrefix: c4dPrefix } = settings;\n\n/**\n * The image content of lightbox media viewer.\n *\n * @element c4d-lightbox-media-viewer\n * @slot title - The title content.\n * @slot description - The description content.\n * @slot cta - The CTA content.\n * @csspart container - The wrapper around the lightbox media. Usage: `c4d-lightbox-video-player::part(container)`\n * @csspart row - The wrapper around the row. Usage: `c4d-lightbox-video-player::part(row)`\n * @csspart media - The wrapper around media. Usage: `c4d-lightbox-video-player::part(media)`\n * @csspart content-wrapper - The wrapper around content. Usage: `c4d-lightbox-video-player::part(content-wrapper)`\n * @csspart content - The inner wrapper around content. Usage: `c4d-lightbox-video-player::part(content)`\n * @csspart title - The title of the media. Usage: `c4d-lightbox-video-player::part(title)`\n * @csspart description - The description of the media. Usage: `c4d-lightbox-video-player::part(description)`\n * @csspart h2 - The h2 element that holds the title. Usage: `c4d-lightbox-video-player::part(h2)`\n */\n@customElement(`${c4dPrefix}-lightbox-media-viewer`)\nclass C4DLightboxMediaViewer extends C4DLightboxMediaViewerBody {\n _renderDescription() {\n const { description } = this;\n return html` <slot name=\"description\">${description}</slot> `;\n }\n\n _renderMedia() {\n return html`\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n `;\n }\n\n _renderTitle() {\n const { title } = this;\n return html`\n <slot name=\"title\"\n ><h2 part=\"h2\" style=\"all: inherit;\">${title}</h2></slot\n >\n `;\n }\n\n _renderCTAs() {\n return html` <slot name=\"cta\"></slot> `;\n }\n\n private _mediaItem?: HTMLElement;\n\n @query(`.${c4dPrefix}--lightbox-media-viewer__media`)\n private _mediaWindow!: HTMLDivElement;\n\n private _containingCarousel?: C4DCarousel;\n\n private _containingModal?: C4DExpressiveModal;\n\n private _handleSlotChange(event: Event) {\n const { _containingModal: containingModal } = this;\n const [media] = (event.target as HTMLSlotElement).assignedNodes();\n this._mediaItem = media as HTMLImageElement | C4DVideoPlayerContainer;\n\n // Disconnect & delete intersection observer\n if (this._intersectionObserver instanceof IntersectionObserver) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n }\n\n // Remove modal closed listeners from the containing modal\n if (containingModal && this._boundModalClosedHandler) {\n containingModal.removeEventListener(\n C4DExpressiveModal.eventBeforeClose,\n this._boundModalClosedHandler\n );\n this._boundModalClosedHandler = undefined;\n }\n\n if (media instanceof C4DVideoPlayerContainer) {\n const {\n _mediaWindow: mediaWindow,\n _containingCarousel: containingCarousel,\n } = this;\n\n // Watch for out-of-view if we're in a carousel\n if (mediaWindow && containingCarousel) {\n const callback = this._handleOutOfCarouselView.bind(this);\n this._intersectionObserver = new IntersectionObserver(callback, {\n root: containingCarousel,\n rootMargin: '999px 0px 999px 0px',\n threshold: 1,\n });\n\n this._intersectionObserver.observe(mediaWindow);\n }\n\n // Watch for modal close\n if (containingModal) {\n this._boundModalClosedHandler = this._handleModalClosed.bind(this);\n\n containingModal.addEventListener(\n C4DExpressiveModal.eventBeforeClose,\n this._boundModalClosedHandler\n );\n }\n }\n }\n\n private _intersectionObserver?: IntersectionObserver;\n\n private _handleOutOfCarouselView(entries) {\n entries.forEach((entry) => {\n if (entry.intersectionRatio < 1) {\n this._pauseVideo();\n }\n });\n }\n\n private _handleModalClosed() {\n this._pauseVideo();\n }\n\n private _pauseVideo() {\n const { _mediaItem: mediaItem } = this;\n\n if (mediaItem instanceof C4DVideoPlayerContainer) {\n mediaItem.pauseAllVideos();\n }\n }\n\n _boundModalClosedHandler?: EventListenerOrEventListenerObject;\n\n connectedCallback() {\n super.connectedCallback();\n\n this._containingCarousel =\n (this.closest(`${c4dPrefix}-carousel`) as C4DCarousel) || undefined;\n this._containingModal =\n (this.closest(`${c4dPrefix}-expressive-modal`) as C4DExpressiveModal) ||\n undefined;\n }\n\n update(changedProperties) {\n if (this.videoId) {\n const { videoId, caption, hideCaption, thumbnail } = this;\n this.innerHTML = `\n <c4d-video-player-container-v7\n playing-mode=\"inline\"\n video-id=\"${videoId}\"\n caption=\"${caption}\"\n ?hide-caption=\"${hideCaption}\"\n thumbnail=\"${thumbnail}\"\n slot=\"media\"\n ></c4d-video-player-container-v7>\n `;\n } else {\n const { alt, defaultSrc } = this;\n this.innerHTML = `\n <img\n class=\"${c4dPrefix}--image__img\"\n alt=\"${alt}\"\n src=\"${defaultSrc}\"\n loading=\"lazy\"\n slot=\"media\"\n style=\"max-width:100%;max-height:100%\"\n />\n `;\n }\n super.update(changedProperties);\n }\n\n /**\n * The alternate text.\n */\n @property()\n alt = '';\n\n /**\n * The image source.\n */\n @property({ attribute: 'default-src' })\n defaultSrc = '';\n\n /**\n * The media description.\n */\n @property()\n description = '';\n\n /**\n * The media title.\n */\n @property()\n title = '';\n\n @property({ attribute: 'video-id' })\n videoId = '';\n\n @property()\n caption = '';\n\n @property()\n hideCaption = false;\n\n @property()\n thumbnail = '';\n\n /**\n * The name of the custom event fired before this modal is being closed upon a user gesture.\n * Cancellation of this event stops the user-initiated action of closing this modal.\n */\n static get eventBeforeModalClose() {\n return `${c4dPrefix}-expressive-modal-beingclosed`;\n }\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DLightboxMediaView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MAAAe,UAAA,GAKfjC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACH,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAe,UAAA,GAETjC,QAAQ,CAAC;QAAEgF,SAAS,EAAE;MAAW,CAAC,CAAC;MAAA7D,GAAA;MAAAC,MAAA;QAAA,OAC1B,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAe,UAAA,GAEXjC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACD,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAe,UAAA,GAEXjC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACG,KAAK;MAAA;IAAA;MAAAF,IAAA;MAAAe,UAAA,GAElBjC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACC,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAA+D,MAAA;MAAA9D,GAAA;MAAAC,KAAA;MA5Bd;AACF;AACA;MAIE;AACF;AACA;MAIE;AACF;AACA;MAgBE;AACF;AACA;AACA;MACE,SAAAA,CAAA,EAAmC;QACjC,OAAO,GAAGX,SAAS,+BAA+B;MACpD;IAAC;EAAA;AAAA,GA7LkCN,0BAA0B;AAgM/D;AACA,eAAeO,sBAAsB","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import C4DVideoPlayerComposite from '../video-player/video-player-composite';
|
|
9
|
+
import C4DVideoPlayerComposite from '../video-player-v7/video-player-composite';
|
|
10
10
|
import '../expressive-modal/expressive-modal';
|
|
11
11
|
import '../expressive-modal/expressive-modal-close-button';
|
|
12
12
|
import './lightbox-video-player';
|
|
@@ -21,10 +21,10 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
21
21
|
import HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';
|
|
22
22
|
import settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
|
|
23
23
|
import ModalRenderMixin from "../../globals/mixins/modal-render.js";
|
|
24
|
-
import C4DVideoPlayerComposite from "../video-player/video-player-composite.js";
|
|
24
|
+
import C4DVideoPlayerComposite from "../video-player-v7/video-player-composite.js";
|
|
25
25
|
import "../expressive-modal/expressive-modal.js";
|
|
26
26
|
import "../expressive-modal/expressive-modal-close-button.js";
|
|
27
|
-
import { VIDEO_PLAYER_CONTENT_STATE, VIDEO_PLAYER_PLAYING_MODE } from "../video-player/video-player.js";
|
|
27
|
+
import { VIDEO_PLAYER_CONTENT_STATE, VIDEO_PLAYER_PLAYING_MODE } from "../video-player-v7/video-player.js";
|
|
28
28
|
import "./lightbox-video-player.js";
|
|
29
29
|
import styles from "././lightbox-media-viewer.css.js";
|
|
30
30
|
import { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|