@carbon/ibmdotcom-web-components 2.48.0 → 2.49.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 +4 -6
- package/dist/dotcom-shell.js +1 -1
- package/dist/dotcom-shell.min.js +1 -1
- package/dist/ibmdotcom-web-components-dotcom-shell.js +1 -1
- package/dist/ibmdotcom-web-components-dotcom-shell.min.js +1 -1
- package/dist/{index-7073ec78.js → index-adfddc06.js} +4 -4
- package/dist/{index-b819eefc.js → index-b426f051.js} +17 -74
- package/dist/{left-nav-menu-e9108438.js → left-nav-menu-285b2d09.js} +1 -1
- package/dist/{left-nav-menu-0ddb90d7.js → left-nav-menu-5e27b743.js} +1 -1
- package/dist/{left-nav-menu-category-heading-08d18557.js → left-nav-menu-category-heading-30bfb070.js} +1 -1
- package/dist/{left-nav-menu-category-heading-e2592d0d.js → left-nav-menu-category-heading-ec5617ac.js} +1 -1
- package/dist/{left-nav-menu-item-dcdac62f.js → left-nav-menu-item-d1f39a4f.js} +1 -1
- package/dist/{left-nav-menu-item-a604b8db.js → left-nav-menu-item-eaaeb2a2.js} +1 -1
- package/dist/{left-nav-menu-section-763d7ada.js → left-nav-menu-section-40165248.js} +1 -1
- package/dist/{left-nav-menu-section-3a22d6a2.js → left-nav-menu-section-6343cf51.js} +1 -1
- package/dist/{left-nav-overlay-53202cdc.js → left-nav-overlay-2ceeed16.js} +1 -1
- package/dist/{left-nav-overlay-f079f5bd.js → left-nav-overlay-c58ce474.js} +1 -1
- package/dist/{megamenu-category-group-7334a77c.js → megamenu-category-group-acc5b32b.js} +1 -1
- package/dist/{megamenu-category-group-copy-af2a7de6.js → megamenu-category-group-copy-0d9fac6a.js} +1 -1
- package/dist/{megamenu-category-group-copy-ee79d5dc.js → megamenu-category-group-copy-ac5247f8.js} +1 -1
- package/dist/{megamenu-category-group-916e8a0d.js → megamenu-category-group-f388d208.js} +1 -1
- package/dist/{megamenu-category-heading-53b9be81.js → megamenu-category-heading-8f657c8d.js} +1 -1
- package/dist/{megamenu-category-heading-c102de05.js → megamenu-category-heading-cd3d3fe7.js} +1 -1
- package/dist/{megamenu-category-link-defb1bd6.js → megamenu-category-link-592c66f0.js} +1 -1
- package/dist/{megamenu-category-link-800dad5a.js → megamenu-category-link-b29c1a6a.js} +1 -1
- package/dist/{megamenu-category-link-group-d67bfe11.js → megamenu-category-link-group-2448afd6.js} +1 -1
- package/dist/{megamenu-category-link-group-1cce18e8.js → megamenu-category-link-group-50b30323.js} +1 -1
- package/dist/{megamenu-left-navigation-e98850ab.js → megamenu-left-navigation-93122184.js} +1 -1
- package/dist/{megamenu-left-navigation-a328f9e5.js → megamenu-left-navigation-fd6e97cc.js} +1 -1
- package/dist/{megamenu-overlay-406f9d65.js → megamenu-overlay-bdf43cd6.js} +1 -1
- package/dist/{megamenu-overlay-613423d7.js → megamenu-overlay-daeba46c.js} +1 -1
- package/dist/{megamenu-tab-e2c7e080.js → megamenu-tab-656e4007.js} +1 -1
- package/dist/{megamenu-tab-0b6918ac.js → megamenu-tab-90a388cf.js} +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.d.ts +5 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js +17 -4
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.d.ts +3 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.js +10 -2
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player.d.ts +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player.js +16 -5
- package/es/components/lightbox-media-viewer/lightbox-video-player.js.map +1 -1
- package/es/components/masthead/masthead-cart.d.ts +0 -13
- package/es/components/masthead/masthead-cart.js +15 -72
- package/es/components/masthead/masthead-cart.js.map +1 -1
- package/es/components-react/lightbox-media-viewer/lightbox-media-viewer.d.ts +1 -0
- package/package.json +2 -2
package/dist/{megamenu-category-heading-c102de05.js → megamenu-category-heading-cd3d3fe7.js}
RENAMED
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import{h as e,j as r,k as t,n as i,s as n,c as o,a as s}from"./index-
|
|
90
|
+
import{h as e,j as r,k as t,n as i,s as n,c as o,a as s}from"./index-adfddc06.js";function a(){a=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(!d(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=u(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:p(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=p(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 l(e){var r,t=u(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 c(e,r){void 0!==e.descriptor.get?r.descriptor.get=e.descriptor.get:r.descriptor.set=e.descriptor.set}function d(e){return e.decorators&&e.decorators.length}function f(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function p(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 u(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:m}=s;let y=function(e,r,t,i){var n=a();if(i)for(var o=0;o<i.length;o++)n=i[o](n);var s=r((function(e){n.initializeInstanceElements(e,p.elements)}),t),p=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(f(o.descriptor)||f(n.descriptor)){if(d(o)||d(n))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");n.descriptor=o.descriptor}else{if(d(o)){if(d(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");n.decorators=o.decorators}c(o,n)}else r.push(o)}return r}(s.d.map(l)),e);return n.initializeClassElements(s.F,p.elements),n.runClassFinishers(s.F,p.finishers)}([o(`${m}-megamenu-category-heading`)],(function(e,o){return{F:class extends o{constructor(...r){super(...r),e(this)}},d:[{kind:"get",key:"_arrowIcon",value:function(){return"rtl"===document.dir.toLowerCase()?r({part:"l0-arrow-cat-heading"}):t({part:"l0-arrow-cat-heading"})}},{kind:"field",decorators:[i({reflect:!0,type:Number,attribute:"heading-level"})],key:"headingLevel",value:()=>3},{kind:"field",static:!0,key:"styles",value:()=>n}]}}),e);export{y as default};
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import{b as e,d as t,e as r,n as i,x as n,i as o,f as a,s,c as l,a as c}from"./index-
|
|
90
|
+
import{b as e,d as t,e as r,n as i,x as n,i as o,f as a,s,c as l,a as c}from"./index-adfddc06.js";
|
|
91
91
|
/**
|
|
92
92
|
* @license
|
|
93
93
|
*
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import { b, d as spread, e as CDSLink, n, x, i as ifNonEmpty, f as C4DMegaMenu, s as styles, c as carbonElement, a as settings } from './index-
|
|
91
|
+
import { b, d as spread, e as CDSLink, n, x, i as ifNonEmpty, f as C4DMegaMenu, s as styles, c as carbonElement, a as settings } from './index-b426f051.js';
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
package/dist/{megamenu-category-link-group-d67bfe11.js → megamenu-category-link-group-2448afd6.js}
RENAMED
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import{g as e,x as r,s as t,c as i,a as n}from"./index-
|
|
90
|
+
import{g as e,x as r,s as t,c as i,a as n}from"./index-adfddc06.js";let o,s=e=>e;function a(){a=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(!d(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 m(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)?m(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=u(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:p(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=p(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 l(e){var r,t=u(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 c(e,r){void 0!==e.descriptor.get?r.descriptor.get=e.descriptor.get:r.descriptor.set=e.descriptor.set}function d(e){return e.decorators&&e.decorators.length}function f(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function p(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 u(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 m(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:h}=n;let y=function(e,r,t,i){var n=a();if(i)for(var o=0;o<i.length;o++)n=i[o](n);var s=r((function(e){n.initializeInstanceElements(e,p.elements)}),t),p=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(f(o.descriptor)||f(n.descriptor)){if(d(o)||d(n))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");n.descriptor=o.descriptor}else{if(d(o)){if(d(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");n.decorators=o.decorators}c(o,n)}else r.push(o)}return r}(s.d.map(l)),e);return n.initializeClassElements(s.F,p.elements),n.runClassFinishers(s.F,p.finishers)}([i(`${h}-megamenu-category-link-group`)],(function(e,i){return{F:class extends i{constructor(...r){super(...r),e(this)}},d:[{kind:"method",key:"render",value:function(){return r(o||(o=s` <slot></slot> `))}},{kind:"field",static:!0,key:"styles",value:()=>t}]}}),e);export{y as default};
|
package/dist/{megamenu-category-link-group-1cce18e8.js → megamenu-category-link-group-50b30323.js}
RENAMED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import { g as s, x, s as styles, c as carbonElement, a as settings } from './index-
|
|
91
|
+
import { g as s, x, s as styles, c as carbonElement, a as settings } from './index-b426f051.js';
|
|
92
92
|
|
|
93
93
|
let _ = t => t,
|
|
94
94
|
_t;
|
|
@@ -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-adfddc06.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};
|
|
@@ -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-b426f051.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; }
|
|
@@ -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-b426f051.js';
|
|
92
92
|
|
|
93
93
|
let _ = t => t,
|
|
94
94
|
_t;
|
|
@@ -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-adfddc06.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};
|
|
@@ -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-adfddc06.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>
|
|
@@ -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-b426f051.js';
|
|
92
92
|
|
|
93
93
|
let _$2 = t => t,
|
|
94
94
|
_t$2,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2020,
|
|
4
|
+
* Copyright IBM Corp. 2020, 2026
|
|
5
5
|
*
|
|
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.
|
|
@@ -352,6 +352,10 @@ declare abstract class C4DLightboxMediaViewerBody extends C4DLightboxMediaViewer
|
|
|
352
352
|
* @returns The title content.
|
|
353
353
|
*/
|
|
354
354
|
abstract _renderTitle(): TemplateResult | string | void;
|
|
355
|
+
/**
|
|
356
|
+
* @returns The CTA content.
|
|
357
|
+
*/
|
|
358
|
+
_renderCTAs(): TemplateResult | string | void;
|
|
355
359
|
render(): TemplateResult<1>;
|
|
356
360
|
static styles: any;
|
|
357
361
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
let _ = t => t,
|
|
3
|
-
_t
|
|
3
|
+
_t,
|
|
4
|
+
_t2;
|
|
4
5
|
/**
|
|
5
6
|
* @license
|
|
6
7
|
*
|
|
7
|
-
* Copyright IBM Corp. 2020,
|
|
8
|
+
* Copyright IBM Corp. 2020, 2026
|
|
8
9
|
*
|
|
9
10
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
10
11
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -34,8 +35,14 @@ class C4DLightboxMediaViewerBody extends FocusMixin(LitElement) {
|
|
|
34
35
|
* @returns The title content.
|
|
35
36
|
*/
|
|
36
37
|
|
|
38
|
+
/**
|
|
39
|
+
* @returns The CTA content.
|
|
40
|
+
*/
|
|
41
|
+
_renderCTAs() {
|
|
42
|
+
return html(_t || (_t = _`<slot name="cta"></slot>`));
|
|
43
|
+
}
|
|
37
44
|
render() {
|
|
38
|
-
return html(
|
|
45
|
+
return html(_t2 || (_t2 = _`
|
|
39
46
|
<div
|
|
40
47
|
class="${0}--lightbox-media-viewer__container"
|
|
41
48
|
part="container">
|
|
@@ -61,11 +68,17 @@ class C4DLightboxMediaViewerBody extends FocusMixin(LitElement) {
|
|
|
61
68
|
data-autoid="${0}--lightbox-media-viewer__content__desc">
|
|
62
69
|
${0}
|
|
63
70
|
</div>
|
|
71
|
+
<div
|
|
72
|
+
part="cta"
|
|
73
|
+
class="${0}--lightbox-media-viewer__content__cta"
|
|
74
|
+
data-autoid="${0}--lightbox-media-viewer__content__cta">
|
|
75
|
+
${0}
|
|
76
|
+
</div>
|
|
64
77
|
</div>
|
|
65
78
|
</div>
|
|
66
79
|
</div>
|
|
67
80
|
</div>
|
|
68
|
-
`), c4dPrefix, c4dPrefix, c4dPrefix, this._renderMedia(), c4dPrefix, c4dPrefix, c4dPrefix, c4dPrefix, this._renderTitle(), c4dPrefix, c4dPrefix, this._renderDescription());
|
|
81
|
+
`), c4dPrefix, c4dPrefix, c4dPrefix, this._renderMedia(), c4dPrefix, c4dPrefix, c4dPrefix, c4dPrefix, this._renderTitle(), c4dPrefix, c4dPrefix, this._renderDescription(), c4dPrefix, c4dPrefix, this._renderCTAs());
|
|
69
82
|
}
|
|
70
83
|
|
|
71
84
|
// `styles` here is a `CSSResult` generated by custom WebPack loader
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightbox-media-viewer-body.js","names":["html","LitElement","FocusMixin","settings","styles","stablePrefix","c4dPrefix","C4DLightboxMediaViewerBody","
|
|
1
|
+
{"version":3,"file":"lightbox-media-viewer-body.js","names":["html","LitElement","FocusMixin","settings","styles","stablePrefix","c4dPrefix","C4DLightboxMediaViewerBody","_renderCTAs","_t","_","render","_t2","_renderMedia","_renderTitle","_renderDescription","_defineProperty"],"sources":["components/lightbox-media-viewer/lightbox-media-viewer-body.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, LitElement, TemplateResult } from 'lit';\nimport FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport styles from './lightbox-media-viewer.scss';\n\nconst { stablePrefix: c4dPrefix } = settings;\n\n/**\n * Media viewer modal body.\n */\nabstract class C4DLightboxMediaViewerBody extends FocusMixin(LitElement) {\n /**\n * @returns The description content.\n */\n abstract _renderDescription(): TemplateResult | string | void;\n\n /**\n * @returns The media content.\n */\n abstract _renderMedia(): TemplateResult | string | void;\n\n /**\n * @returns The title content.\n */\n abstract _renderTitle(): TemplateResult | string | void;\n\n /**\n * @returns The CTA content.\n */\n _renderCTAs(): TemplateResult | string | void {\n return html`<slot name=\"cta\"></slot>`;\n }\n\n render() {\n return html`\n <div\n class=\"${c4dPrefix}--lightbox-media-viewer__container\"\n part=\"container\">\n <div class=\"${c4dPrefix}--lightbox-media-viewer__row\" part=\"row\">\n <div class=\"${c4dPrefix}--lightbox-media-viewer__media\" part=\"media\">\n ${this._renderMedia()}\n </div>\n <div\n class=\"${c4dPrefix}--lightbox-media-viewer__media-description\"\n part=\"content-wrapper\">\n <div\n class=\"${c4dPrefix}--lightbox-media-viewer__content\"\n part=\"content\">\n <div\n part=\"title\"\n class=\"${c4dPrefix}--lightbox-media-viewer__content__title\"\n data-autoid=\"${c4dPrefix}--lightbox-media-viewer__content__title\">\n ${this._renderTitle()}\n </div>\n <div\n part=\"description\"\n class=\"${c4dPrefix}--lightbox-media-viewer__content__desc\"\n data-autoid=\"${c4dPrefix}--lightbox-media-viewer__content__desc\">\n ${this._renderDescription()}\n </div>\n <div\n part=\"cta\"\n class=\"${c4dPrefix}--lightbox-media-viewer__content__cta\"\n data-autoid=\"${c4dPrefix}--lightbox-media-viewer__content__cta\">\n ${this._renderCTAs()}\n </div>\n </div>\n </div>\n </div>\n </div>\n `;\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 C4DLightboxMediaViewerBody;\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAwB,KAAK;AACtD,OAAOC,UAAU,MAAM,mDAAmD;AAC1E,OAAOC,QAAQ,MAAM,+DAA+D;AACpF,OAAOC,MAAM,MAAM,kCAA8B;AAEjD,MAAM;EAAEC,YAAY,EAAEC;AAAU,CAAC,GAAGH,QAAQ;;AAE5C;AACA;AACA;AACA,MAAeI,0BAA0B,SAASL,UAAU,CAACD,UAAU,CAAC,CAAC;EACvE;AACF;AACA;;EAGE;AACF;AACA;;EAGE;AACF;AACA;;EAGE;AACF;AACA;EACEO,WAAWA,CAAA,EAAmC;IAC5C,OAAOR,IAAI,CAAAS,EAAA,KAAAA,EAAA,GAAAC,CAAA;EACb;EAEAC,MAAMA,CAAA,EAAG;IACP,OAAOX,IAAI,CAAAY,GAAA,KAAAA,GAAA,GAAAF,CAAA;AACf;AACA,iBAFe;AACf;AACA,sBAFe;AACf,wBADe;AACf,cADe;AACf;AACA;AACA,qBAHe;AACf;AACA;AACA,uBAHe;AACf;AACA;AACA;AACA,yBAJe;AACf,+BADe;AACf,kBADe;AACf;AACA;AACA;AACA,yBAJe;AACf,+BADe;AACf,kBADe;AACf;AACA;AACA;AACA,yBAJe;AACf,+BADe;AACf,kBADe;AACf;AACA;AACA;AACA;AACA;AACA,KANe,GAEEJ,SAAS,EAEJA,SAAS,EACPA,SAAS,EACnB,IAAI,CAACO,YAAY,CAAC,CAAC,EAGZP,SAAS,EAGPA,SAAS,EAIPA,SAAS,EACHA,SAAS,EACtB,IAAI,CAACQ,YAAY,CAAC,CAAC,EAIZR,SAAS,EACHA,SAAS,EACtB,IAAI,CAACS,kBAAkB,CAAC,CAAC,EAIlBT,SAAS,EACHA,SAAS,EACtB,IAAI,CAACE,WAAW,CAAC,CAAC;EAOlC;;EAEwB;AAC1B;;AAEA;AAAAQ,eAAA,CAlEeT,0BAA0B,YA+DvBH,MAAM;AAIxB,eAAeG,0BAA0B","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2020,
|
|
4
|
+
* Copyright IBM Corp. 2020, 2026
|
|
5
5
|
*
|
|
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.
|
|
@@ -13,6 +13,7 @@ import C4DLightboxMediaViewerBody from './lightbox-media-viewer-body';
|
|
|
13
13
|
* @element c4d-lightbox-media-viewer
|
|
14
14
|
* @slot title - The title content.
|
|
15
15
|
* @slot description - The description content.
|
|
16
|
+
* @slot cta - The CTA content.
|
|
16
17
|
* @csspart container - The wrapper around the lightbox media. Usage: `c4d-lightbox-video-player::part(container)`
|
|
17
18
|
* @csspart row - The wrapper around the row. Usage: `c4d-lightbox-video-player::part(row)`
|
|
18
19
|
* @csspart media - The wrapper around media. Usage: `c4d-lightbox-video-player::part(media)`
|
|
@@ -26,6 +27,7 @@ declare class C4DLightboxMediaViewer extends C4DLightboxMediaViewerBody {
|
|
|
26
27
|
_renderDescription(): import("lit-html").TemplateResult<1>;
|
|
27
28
|
_renderMedia(): import("lit-html").TemplateResult<1>;
|
|
28
29
|
_renderTitle(): import("lit-html").TemplateResult<1>;
|
|
30
|
+
_renderCTAs(): import("lit-html").TemplateResult<1>;
|
|
29
31
|
private _mediaItem?;
|
|
30
32
|
private _mediaWindow;
|
|
31
33
|
private _containingCarousel?;
|
|
@@ -4,12 +4,13 @@ import _get from "@babel/runtime/helpers/esm/get";
|
|
|
4
4
|
let _ = t => t,
|
|
5
5
|
_t,
|
|
6
6
|
_t2,
|
|
7
|
-
_t3
|
|
7
|
+
_t3,
|
|
8
|
+
_t4;
|
|
8
9
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
9
10
|
/**
|
|
10
11
|
* @license
|
|
11
12
|
*
|
|
12
|
-
* Copyright IBM Corp. 2020,
|
|
13
|
+
* Copyright IBM Corp. 2020, 2026
|
|
13
14
|
*
|
|
14
15
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
15
16
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -32,6 +33,7 @@ const {
|
|
|
32
33
|
* @element c4d-lightbox-media-viewer
|
|
33
34
|
* @slot title - The title content.
|
|
34
35
|
* @slot description - The description content.
|
|
36
|
+
* @slot cta - The CTA content.
|
|
35
37
|
* @csspart container - The wrapper around the lightbox media. Usage: `c4d-lightbox-video-player::part(container)`
|
|
36
38
|
* @csspart row - The wrapper around the row. Usage: `c4d-lightbox-video-player::part(row)`
|
|
37
39
|
* @csspart media - The wrapper around media. Usage: `c4d-lightbox-video-player::part(media)`
|
|
@@ -80,6 +82,12 @@ let C4DLightboxMediaViewer = _decorate([customElement(`${c4dPrefix}-lightbox-med
|
|
|
80
82
|
>
|
|
81
83
|
`), title);
|
|
82
84
|
}
|
|
85
|
+
}, {
|
|
86
|
+
kind: "method",
|
|
87
|
+
key: "_renderCTAs",
|
|
88
|
+
value: function _renderCTAs() {
|
|
89
|
+
return html(_t4 || (_t4 = _` <slot name="cta"></slot> `));
|
|
90
|
+
}
|
|
83
91
|
}, {
|
|
84
92
|
kind: "field",
|
|
85
93
|
decorators: [query(`.${c4dPrefix}--lightbox-media-viewer__media`)],
|
|
@@ -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","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, 2024\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 * @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 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,KAAK;AAC1B,SAASC,QAAQ,EAAEC,KAAK,QAAQ,mBAAmB;AACnD,OAAOC,QAAQ,MAAM,+DAA+D;AACpF,OAAOC,0BAA0B,MAAM,iCAA8B;AACrE,OAAOC,uBAAuB,MAAM,2CAAwC;AAE5E,OAAOC,kBAAkB,MAAM,yCAAsC;AACrE,SAASC,aAAa,IAAIC,aAAa,QAAQ,gEAAgE;AAE/G,MAAM;EAAEC,YAAY,EAAEC;AAAU,CAAC,GAAGP,QAAQ;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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A;MAAA5D,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,GAzLkCN,0BAA0B;AA4L/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/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,KAAK;AAC1B,SAASC,QAAQ,EAAEC,KAAK,QAAQ,mBAAmB;AACnD,OAAOC,QAAQ,MAAM,+DAA+D;AACpF,OAAOC,0BAA0B,MAAM,iCAA8B;AACrE,OAAOC,uBAAuB,MAAM,2CAAwC;AAE5E,OAAOC,kBAAkB,MAAM,yCAAsC;AACrE,SAASC,aAAa,IAAIC,aAAa,QAAQ,gEAAgE;AAE/G,MAAM;EAAEC,YAAY,EAAEC;AAAU,CAAC,GAAGP,QAAQ;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,IAiBMQ,sBAAsB,GAAAC,SAAA,E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;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":[]}
|
|
@@ -9,7 +9,7 @@ function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prot
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
11
11
|
*
|
|
12
|
-
* Copyright IBM Corp. 2020,
|
|
12
|
+
* Copyright IBM Corp. 2020, 2026
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -86,9 +86,22 @@ let C4DLightboxVideoPlayer = _decorate([customElement(`${c4dPrefix}-lightbox-vid
|
|
|
86
86
|
const {
|
|
87
87
|
duration,
|
|
88
88
|
formatCaption,
|
|
89
|
-
formatDuration,
|
|
90
89
|
name
|
|
91
90
|
} = this;
|
|
91
|
+
let formattedDuration = '';
|
|
92
|
+
if (duration != null) {
|
|
93
|
+
const totalSeconds = Math.floor(duration);
|
|
94
|
+
const hours = Math.floor(totalSeconds / 3600);
|
|
95
|
+
const minutes = Math.floor(totalSeconds % 3600 / 60);
|
|
96
|
+
const seconds = totalSeconds % 60;
|
|
97
|
+
if (hours > 0) {
|
|
98
|
+
// format as HH:MM:SS
|
|
99
|
+
formattedDuration = `${hours}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
|
|
100
|
+
} else {
|
|
101
|
+
// formatt as MM:SS
|
|
102
|
+
formattedDuration = `${minutes}:${String(seconds).padStart(2, '0')}`;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
92
105
|
return html(_t3 || (_t3 = _`
|
|
93
106
|
<slot name="title">
|
|
94
107
|
<h2 style="all: inherit;" part="h2">
|
|
@@ -96,9 +109,7 @@ let C4DLightboxVideoPlayer = _decorate([customElement(`${c4dPrefix}-lightbox-vid
|
|
|
96
109
|
</h2>
|
|
97
110
|
</slot>
|
|
98
111
|
`), formatCaption({
|
|
99
|
-
duration:
|
|
100
|
-
duration: !duration ? duration : duration * 1000
|
|
101
|
-
}),
|
|
112
|
+
duration: formattedDuration,
|
|
102
113
|
name
|
|
103
114
|
}));
|
|
104
115
|
}
|