@carbon/ibmdotcom-web-components 2.50.0-rc.0 → 2.51.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.
Files changed (47) hide show
  1. package/dist/dotcom-shell.js +4 -4
  2. package/dist/dotcom-shell.min.js +4 -4
  3. package/dist/ibmdotcom-web-components-dotcom-shell.js +4 -4
  4. package/dist/ibmdotcom-web-components-dotcom-shell.min.js +4 -4
  5. package/dist/index-514478b8.js +4 -4
  6. package/dist/index-9732faeb.js +4 -4
  7. package/dist/left-nav-menu-2f5322ac.js +4 -4
  8. package/dist/left-nav-menu-746ad81a.js +4 -4
  9. package/dist/left-nav-menu-category-heading-0e98a8c6.js +4 -4
  10. package/dist/left-nav-menu-category-heading-22762753.js +4 -4
  11. package/dist/left-nav-menu-item-252b6d0e.js +4 -4
  12. package/dist/left-nav-menu-item-a08c2ca0.js +4 -4
  13. package/dist/left-nav-menu-section-40ae6c75.js +4 -4
  14. package/dist/left-nav-menu-section-a6f52f70.js +4 -4
  15. package/dist/left-nav-overlay-6f936f5f.js +4 -4
  16. package/dist/left-nav-overlay-dfce57ab.js +4 -4
  17. package/dist/megamenu-category-group-b63f1f2d.js +4 -4
  18. package/dist/megamenu-category-group-copy-1e261d94.js +4 -4
  19. package/dist/megamenu-category-group-copy-419d6ebe.js +4 -4
  20. package/dist/megamenu-category-group-fe150fbc.js +4 -4
  21. package/dist/megamenu-category-heading-46c39931.js +4 -4
  22. package/dist/megamenu-category-heading-9c2eccbf.js +4 -4
  23. package/dist/megamenu-category-link-7fa288d5.js +4 -4
  24. package/dist/megamenu-category-link-986b3de3.js +4 -4
  25. package/dist/megamenu-category-link-group-1392a46f.js +4 -4
  26. package/dist/megamenu-category-link-group-f76ba2ac.js +4 -4
  27. package/dist/megamenu-left-navigation-55ebdf48.js +4 -4
  28. package/dist/megamenu-left-navigation-eb44aef8.js +4 -4
  29. package/dist/megamenu-overlay-5c4848c7.js +4 -4
  30. package/dist/megamenu-overlay-c4637474.js +4 -4
  31. package/dist/megamenu-tab-b48fbb7c.js +4 -4
  32. package/dist/megamenu-tab-c2772b72.js +4 -4
  33. package/es/components/lightbox-media-viewer/lightbox-image-viewer.d.ts +3 -0
  34. package/es/components/lightbox-media-viewer/lightbox-image-viewer.js +28 -1
  35. package/es/components/lightbox-media-viewer/lightbox-image-viewer.js.map +1 -1
  36. package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.d.ts +1 -1
  37. package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js +3 -6
  38. package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js.map +1 -1
  39. package/es/components/lightbox-media-viewer/lightbox-media-viewer.d.ts +1 -0
  40. package/es/components/lightbox-media-viewer/lightbox-media-viewer.js +2 -1
  41. package/es/components/lightbox-media-viewer/lightbox-media-viewer.js.map +1 -1
  42. package/es/components/lightbox-media-viewer/lightbox-video-player.d.ts +2 -0
  43. package/es/components/lightbox-media-viewer/lightbox-video-player.js +10 -6
  44. package/es/components/lightbox-media-viewer/lightbox-video-player.js.map +1 -1
  45. package/es/components/notice-choice/notice-choice.js +2 -4
  46. package/es/components/notice-choice/notice-choice.js.map +1 -1
  47. package/package.json +5 -5
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -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-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -80,8 +80,8 @@
80
80
  * https://www.npmjs.com/package/redux
81
81
  * https://www.npmjs.com/package/lodash-es
82
82
  * https://www.npmjs.com/package/window-or-global
83
- * https://www.npmjs.com/package/redux-logger
84
83
  * https://www.npmjs.com/package/redux-thunk
84
+ * https://www.npmjs.com/package/redux-logger
85
85
  * https://www.npmjs.com/package/axios
86
86
  * https://www.npmjs.com/package/isomorphic-dompurify
87
87
  * https://www.npmjs.com/package/striptags
@@ -28,6 +28,7 @@ declare class C4DLightboxImageViewer extends C4DLightboxMediaViewerBody {
28
28
  _renderDescription(): import("lit-html").TemplateResult<1>;
29
29
  _renderMedia(): import("lit-html").TemplateResult<1>;
30
30
  _renderTitle(): import("lit-html").TemplateResult<1>;
31
+ _renderCTAs(): import("lit-html").TemplateResult<1>;
31
32
  /**
32
33
  * The alternate text.
33
34
  */
@@ -44,6 +45,8 @@ declare class C4DLightboxImageViewer extends C4DLightboxMediaViewerBody {
44
45
  * The media title.
45
46
  */
46
47
  title: string;
48
+ private _ctaContents?;
49
+ connectedCallback(): void;
47
50
  }
48
51
  export default C4DLightboxImageViewer;
49
52
 
@@ -1,8 +1,12 @@
1
1
  import _decorate from "@babel/runtime/helpers/esm/decorate";
2
+ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
3
+ import _get from "@babel/runtime/helpers/esm/get";
2
4
  let _ = t => t,
3
5
  _t,
4
6
  _t2,
5
- _t3;
7
+ _t3,
8
+ _t4;
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; }
6
10
  /**
7
11
  * @license
8
12
  *
@@ -85,6 +89,12 @@ let C4DLightboxImageViewer = _decorate([customElement(`${c4dPrefix}-lightbox-ima
85
89
  } = this;
86
90
  return html(_t3 || (_t3 = _` <slot name="title">${0}</slot> `), title);
87
91
  }
92
+ }, {
93
+ kind: "method",
94
+ key: "_renderCTAs",
95
+ value: function _renderCTAs() {
96
+ return html(_t4 || (_t4 = _` <slot name="cta">${0}</slot> `), this._ctaContents);
97
+ }
88
98
 
89
99
  /**
90
100
  * The alternate text.
@@ -119,6 +129,23 @@ let C4DLightboxImageViewer = _decorate([customElement(`${c4dPrefix}-lightbox-ima
119
129
  value() {
120
130
  return '';
121
131
  }
132
+ }, {
133
+ kind: "method",
134
+ key: "connectedCallback",
135
+ value:
136
+ /**
137
+ * The image source.
138
+ */
139
+ /**
140
+ * The media description.
141
+ */
142
+ /**
143
+ * The media title.
144
+ */
145
+ function connectedCallback() {
146
+ _superPropGet(C4DLightboxImageViewer, "connectedCallback", this, 3)([]);
147
+ this._ctaContents = this.querySelector('[slot="cta"]') || undefined;
148
+ }
122
149
  }]
123
150
  };
124
151
  }, C4DLightboxMediaViewerBody);
@@ -1 +1 @@
1
- {"version":3,"file":"lightbox-image-viewer.js","names":["html","property","ifDefined","settings","C4DLightboxMediaViewerBody","carbonElement","customElement","stablePrefix","c4dPrefix","C4DLightboxImageViewer","_decorate","_initialize","_C4DLightboxMediaView","constructor","args","F","d","kind","key","value","_renderDescription","description","_t","_","_renderMedia","alt","defaultSrc","_t2","_renderTitle","title","_t3","decorators","attribute"],"sources":["components/lightbox-media-viewer/lightbox-image-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 } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport C4DLightboxMediaViewerBody from './lightbox-media-viewer-body';\nimport '../expressive-modal/expressive-modal';\nimport '../expressive-modal/expressive-modal-close-button';\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-image-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 image - The image displayed in the lightbox image viewer. Usage: `c4d-lightbox-video-player::part(image)`\n */\n@customElement(`${c4dPrefix}-lightbox-image-viewer`)\nclass C4DLightboxImageViewer extends C4DLightboxMediaViewerBody {\n _renderDescription() {\n const { description } = this;\n return html` <slot name=\"description\">${description}</slot> `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _renderMedia() {\n const { alt, defaultSrc } = this;\n return html`\n <img\n class=\"${c4dPrefix}--image__img\"\n alt=\"${ifDefined(alt)}\"\n src=\"${ifDefined(defaultSrc)}\"\n loading=\"lazy\"\n part=\"image\" />\n `;\n }\n\n _renderTitle() {\n const { title } = this;\n return html` <slot name=\"title\">${title}</slot> `;\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\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DLightboxImageViewer;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,KAAK;AAC1B,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,SAAS,QAAQ,8BAA8B;AACxD,OAAOC,QAAQ,MAAM,+DAA+D;AACpF,OAAOC,0BAA0B,MAAM,iCAA8B;AACrE,OAAO,yCAAsC;AAC7C,OAAO,sDAAmD;AAC1D,SAASC,aAAa,IAAIC,aAAa,QAAQ,gEAAgE;AAE/G,MAAM;EAAEC,YAAY,EAAEC;AAAU,CAAC,GAAGL,QAAQ;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAgBMM,sBAAsB,GAAAC,SAAA,EAD3BJ,aAAa,CAAC,GAAGE,SAAS,wBAAwB,CAAC,aAAAG,WAAA,EAAAC,qBAAA;EAApD,MACMH,sBAAsB,SAAAG,qBAAA,CAAoC;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EA+ChE;EAAC;IAAAI,CAAA,EA/CKN,sBAAs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AAA;QAAA,OACH,EAAE;MAAA;IAAA;EAAA;AAAA,GA9CyBf,0BAA0B;AAiD/D;AACA,eAAeK,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"lightbox-image-viewer.js","names":["html","property","ifDefined","settings","C4DLightboxMediaViewerBody","carbonElement","customElement","stablePrefix","c4dPrefix","C4DLightboxImageViewer","_decorate","_initialize","_C4DLightboxMediaView","constructor","args","F","d","kind","key","value","_renderDescription","description","_t","_","_renderMedia","alt","defaultSrc","_t2","_renderTitle","title","_t3","_renderCTAs","_t4","_ctaContents","decorators","attribute","connectedCallback","_superPropGet","querySelector","undefined"],"sources":["components/lightbox-media-viewer/lightbox-image-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 } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport C4DLightboxMediaViewerBody from './lightbox-media-viewer-body';\nimport '../expressive-modal/expressive-modal';\nimport '../expressive-modal/expressive-modal-close-button';\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-image-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 image - The image displayed in the lightbox image viewer. Usage: `c4d-lightbox-video-player::part(image)`\n */\n@customElement(`${c4dPrefix}-lightbox-image-viewer`)\nclass C4DLightboxImageViewer extends C4DLightboxMediaViewerBody {\n _renderDescription() {\n const { description } = this;\n return html` <slot name=\"description\">${description}</slot> `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _renderMedia() {\n const { alt, defaultSrc } = this;\n return html`\n <img\n class=\"${c4dPrefix}--image__img\"\n alt=\"${ifDefined(alt)}\"\n src=\"${ifDefined(defaultSrc)}\"\n loading=\"lazy\"\n part=\"image\" />\n `;\n }\n\n _renderTitle() {\n const { title } = this;\n return html` <slot name=\"title\">${title}</slot> `;\n }\n\n _renderCTAs() {\n return html` <slot name=\"cta\">${this._ctaContents}</slot> `;\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 private _ctaContents?: HTMLElement;\n\n connectedCallback() {\n super.connectedCallback();\n this._ctaContents = this.querySelector('[slot=\"cta\"]') || undefined;\n }\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DLightboxImageViewer;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,KAAK;AAC1B,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,SAAS,QAAQ,8BAA8B;AACxD,OAAOC,QAAQ,MAAM,+DAA+D;AACpF,OAAOC,0BAA0B,MAAM,iCAA8B;AACrE,OAAO,yCAAsC;AAC7C,OAAO,sDAAmD;AAC1D,SAASC,aAAa,IAAIC,aAAa,QAAQ,gEAAgE;AAE/G,MAAM;EAAEC,YAAY,EAAEC;AAAU,CAAC,GAAGL,QA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A,GAAAT,CAAA,mCAAqB,IAAI,CAACU,YAAY;MACnD;;MAEA;AACF;AACA;IAFE;MAAAhB,IAAA;MAAAiB,UAAA,GAGCjC,QAAQ,CAAC,CAAC;MAAAiB,GAAA;MAAAC,MAAA;QAAA,OACL,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAiB,UAAA,GAKPjC,QAAQ,CAAC;QAAEkC,SAAS,EAAE;MAAc,CAAC,CAAC;MAAAjB,GAAA;MAAAC,MAAA;QAAA,OAC1B,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAiB,UAAA,GAKdjC,QAAQ,CAAC,CAAC;MAAAiB,GAAA;MAAAC,MAAA;QAAA,OACG,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAiB,UAAA,GAKfjC,QAAQ,CAAC,CAAC;MAAAiB,GAAA;MAAAC,MAAA;QAAA,OACH,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAC,GAAA;MAAAC,KAAA;MAhBV;AACF;AACA;MAIE;AACF;AACA;MAIE;AACF;AACA;MAME,SAAAiB,iBAAiBA,CAAA,EAAG;QAClBC,aAAA,CAvDE5B,sBAAsB;QAwDxB,IAAI,CAACwB,YAAY,GAAG,IAAI,CAACK,aAAa,CAAC,cAAc,CAAC,IAAIC,SAAS;MACrE;IAAC;EAAA;AAAA,GAzDkCnC,0BAA0B;AA4D/D;AACA,eAAeK,sBAAsB","ignoreList":[]}
@@ -355,7 +355,7 @@ declare abstract class C4DLightboxMediaViewerBody extends C4DLightboxMediaViewer
355
355
  /**
356
356
  * @returns The CTA content.
357
357
  */
358
- _renderCTAs(): TemplateResult | string | void;
358
+ abstract _renderCTAs(): TemplateResult | string | void;
359
359
  render(): TemplateResult<1>;
360
360
  static styles: any;
361
361
  }
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  let _ = t => t,
3
- _t,
4
- _t2;
3
+ _t;
5
4
  /**
6
5
  * @license
7
6
  *
@@ -38,11 +37,9 @@ class C4DLightboxMediaViewerBody extends FocusMixin(LitElement) {
38
37
  /**
39
38
  * @returns The CTA content.
40
39
  */
41
- _renderCTAs() {
42
- return html(_t || (_t = _`<slot name="cta"></slot>`));
43
- }
40
+
44
41
  render() {
45
- return html(_t2 || (_t2 = _`
42
+ return html(_t || (_t = _`
46
43
  <div
47
44
  class="${0}--lightbox-media-viewer__container"
48
45
  part="container">
@@ -1 +1 @@
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
+ {"version":3,"file":"lightbox-media-viewer-body.js","names":["html","LitElement","FocusMixin","settings","styles","stablePrefix","c4dPrefix","C4DLightboxMediaViewerBody","render","_t","_","_renderMedia","_renderTitle","_renderDescription","_renderCTAs","_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 abstract _renderCTAs(): TemplateResult | string | void;\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;;EAGEO,MAAMA,CAAA,EAAG;IACP,OAAOR,IAAI,CAAAS,EAAA,KAAAA,EAAA,GAAAC,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,CAACK,YAAY,CAAC,CAAC,EAGZL,SAAS,EAGPA,SAAS,EAIPA,SAAS,EACHA,SAAS,EACtB,IAAI,CAACM,YAAY,CAAC,CAAC,EAIZN,SAAS,EACHA,SAAS,EACtB,IAAI,CAACO,kBAAkB,CAAC,CAAC,EAIlBP,SAAS,EACHA,SAAS,EACtB,IAAI,CAACQ,WAAW,CAAC,CAAC;EAOlC;;EAEwB;AAC1B;;AAEA;AAAAC,eAAA,CAhEeR,0BAA0B,YA6DvBH,MAAM;AAIxB,eAAeG,0BAA0B","ignoreList":[]}
@@ -32,6 +32,7 @@ declare class C4DLightboxMediaViewer extends C4DLightboxMediaViewerBody {
32
32
  private _mediaWindow;
33
33
  private _containingCarousel?;
34
34
  private _containingModal?;
35
+ private _ctaContents?;
35
36
  private _handleSlotChange;
36
37
  private _intersectionObserver?;
37
38
  private _handleOutOfCarouselView;
@@ -86,7 +86,7 @@ let C4DLightboxMediaViewer = _decorate([customElement(`${c4dPrefix}-lightbox-med
86
86
  kind: "method",
87
87
  key: "_renderCTAs",
88
88
  value: function _renderCTAs() {
89
- return html(_t4 || (_t4 = _` <slot name="cta"></slot> `));
89
+ return html(_t4 || (_t4 = _` <slot name="cta">${0}</slot> `), this._ctaContents);
90
90
  }
91
91
  }, {
92
92
  kind: "field",
@@ -170,6 +170,7 @@ let C4DLightboxMediaViewer = _decorate([customElement(`${c4dPrefix}-lightbox-med
170
170
  key: "connectedCallback",
171
171
  value: function connectedCallback() {
172
172
  _superPropGet(C4DLightboxMediaViewer, "connectedCallback", this, 3)([]);
173
+ this._ctaContents = this.querySelector('[slot="cta"]') || undefined;
173
174
  this._containingCarousel = this.closest(`${c4dPrefix}-carousel`) || undefined;
174
175
  this._containingModal = this.closest(`${c4dPrefix}-expressive-modal`) || undefined;
175
176
  }
@@ -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-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 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,8CAA2C;AAE/E,OAAOC,kBAAkB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C,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","_ctaContents","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","querySelector","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\">${this._ctaContents}</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 _ctaContents?: HTMLElement;\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._ctaContents = this.querySelector('[slot=\"cta\"]') || undefined;\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 C4DLightboxMediaViewer;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,KAAK;A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A;MAAAF,IAAA;MAAAgB,UAAA,GAKflC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACH,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAgB,UAAA,GAETlC,QAAQ,CAAC;QAAEkF,SAAS,EAAE;MAAW,CAAC,CAAC;MAAA/D,GAAA;MAAAC,MAAA;QAAA,OAC1B,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAgB,UAAA,GAEXlC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACD,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAgB,UAAA,GAEXlC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACG,KAAK;MAAA;IAAA;MAAAF,IAAA;MAAAgB,UAAA,GAElBlC,QAAQ,CAAC,CAAC;MAAAmB,GAAA;MAAAC,MAAA;QAAA,OACC,EAAE;MAAA;IAAA;MAAAF,IAAA;MAAAiE,MAAA;MAAAhE,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,GAhMkCN,0BAA0B;AAmM/D;AACA,eAAeO,sBAAsB","ignoreList":[]}
@@ -27,9 +27,11 @@ import C4DLightboxMediaViewerBody from './lightbox-media-viewer-body';
27
27
  declare class C4DLightboxVideoPlayer extends C4DLightboxMediaViewerBody {
28
28
  _renderDescription(): import("lit-html").TemplateResult<1>;
29
29
  _renderMedia(): import("lit-html").TemplateResult<1>;
30
+ _renderCTAs(): import("lit-html").TemplateResult<1>;
30
31
  _renderTitle(): import("lit-html").TemplateResult<1>;
31
32
  updated(changedProperties: any): void;
32
33
  connectedCallback(): void;
34
+ private _ctaContents?;
33
35
  /**
34
36
  * The media description.
35
37
  */
@@ -4,7 +4,8 @@ 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
@@ -79,6 +80,12 @@ let C4DLightboxVideoPlayer = _decorate([customElement(`${c4dPrefix}-lightbox-vid
79
80
  </div>
80
81
  `), c4dPrefix, c4dPrefix);
81
82
  }
83
+ }, {
84
+ kind: "method",
85
+ key: "_renderCTAs",
86
+ value: function _renderCTAs() {
87
+ return html(_t3 || (_t3 = _` <slot name="cta">${0}</slot> `), this._ctaContents);
88
+ }
82
89
  }, {
83
90
  kind: "method",
84
91
  key: "_renderTitle",
@@ -102,7 +109,7 @@ let C4DLightboxVideoPlayer = _decorate([customElement(`${c4dPrefix}-lightbox-vid
102
109
  formattedDuration = `${minutes}:${String(seconds).padStart(2, '0')}`;
103
110
  }
104
111
  }
105
- return html(_t3 || (_t3 = _`
112
+ return html(_t4 || (_t4 = _`
106
113
  <slot name="title">
107
114
  <h2 style="all: inherit;" part="h2">
108
115
  ${0}
@@ -126,12 +133,9 @@ let C4DLightboxVideoPlayer = _decorate([customElement(`${c4dPrefix}-lightbox-vid
126
133
  key: "connectedCallback",
127
134
  value: function connectedCallback() {
128
135
  this.setAttribute('role', 'dialog');
136
+ this._ctaContents = this.querySelector('[slot="cta"]') || undefined;
129
137
  _superPropGet(C4DLightboxVideoPlayer, "connectedCallback", this, 3)([]);
130
138
  }
131
-
132
- /**
133
- * The media description.
134
- */
135
139
  }, {
136
140
  kind: "field",
137
141
  decorators: [property()],