@carbon/ibmdotcom-web-components 2.32.0 → 2.33.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 +5 -0
- package/dist/dotcom-shell.js +3 -3
- package/dist/dotcom-shell.min.js +2 -2
- package/dist/ibmdotcom-web-components-dotcom-shell.js +3 -3
- package/dist/ibmdotcom-web-components-dotcom-shell.min.js +2 -2
- package/dist/{index-b074cd59.js → index-d5b1c513.js} +4 -4
- package/dist/{index-34e0f247.js → index-ee4fa215.js} +6 -6
- package/dist/{left-nav-menu-bcbc0330.js → left-nav-menu-7e57b959.js} +3 -3
- package/dist/{left-nav-menu-01066f18.js → left-nav-menu-a6759e33.js} +2 -2
- package/dist/{left-nav-menu-category-heading-0dfb02cf.js → left-nav-menu-category-heading-59a1c2ae.js} +3 -3
- package/dist/{left-nav-menu-category-heading-cc2abd53.js → left-nav-menu-category-heading-6d2a00de.js} +2 -2
- package/dist/{left-nav-menu-item-e69c103b.js → left-nav-menu-item-2683ebca.js} +2 -2
- package/dist/{left-nav-menu-item-bbc39404.js → left-nav-menu-item-6aed006b.js} +3 -3
- package/dist/{left-nav-menu-section-6c32295d.js → left-nav-menu-section-30507b08.js} +3 -3
- package/dist/{left-nav-menu-section-1aabd4ca.js → left-nav-menu-section-6611bcf2.js} +2 -2
- package/dist/{left-nav-overlay-6b0aaea8.js → left-nav-overlay-8c4ba0f8.js} +3 -3
- package/dist/{left-nav-overlay-f796104e.js → left-nav-overlay-eb277be1.js} +2 -2
- package/dist/{megamenu-category-group-c7cdba1b.js → megamenu-category-group-a621f9bd.js} +2 -2
- package/dist/{megamenu-category-group-copy-d8dcca06.js → megamenu-category-group-copy-1a98db9a.js} +2 -2
- package/dist/{megamenu-category-group-copy-4626f75e.js → megamenu-category-group-copy-d4e9176a.js} +3 -3
- package/dist/{megamenu-category-group-973395bb.js → megamenu-category-group-e3490a6e.js} +3 -3
- package/dist/{megamenu-category-heading-c74bab78.js → megamenu-category-heading-f04b33e9.js} +3 -3
- package/dist/{megamenu-category-heading-2aa128db.js → megamenu-category-heading-f41c5e40.js} +2 -2
- package/dist/{megamenu-category-link-4be5ba05.js → megamenu-category-link-0d5f86db.js} +2 -2
- package/dist/{megamenu-category-link-cb453456.js → megamenu-category-link-ab6a3568.js} +3 -3
- package/dist/{megamenu-category-link-group-51f207c0.js → megamenu-category-link-group-ae28380b.js} +2 -2
- package/dist/{megamenu-category-link-group-fab7d32b.js → megamenu-category-link-group-ba0e35de.js} +3 -3
- package/dist/{megamenu-left-navigation-3261efc4.js → megamenu-left-navigation-ca3577da.js} +2 -2
- package/dist/{megamenu-left-navigation-aa21b272.js → megamenu-left-navigation-ca387aa1.js} +3 -3
- package/dist/{megamenu-overlay-f36f4113.js → megamenu-overlay-5f9ddd17.js} +2 -2
- package/dist/{megamenu-overlay-b94c501b.js → megamenu-overlay-e1a16b6a.js} +3 -3
- package/dist/{megamenu-tab-21e4c36e.js → megamenu-tab-73e6670b.js} +2 -2
- package/dist/{megamenu-tab-6fd6b915.js → megamenu-tab-84b775e8.js} +3 -3
- package/es/components/card-group/card-group.css.js +1 -1
- package/es/components/carousel/carousel.css.js +1 -1
- package/es/components/content-block/content-block.css.js +1 -1
- package/es/components/content-block-cards/content-block-cards.d.ts +348 -1
- package/es/components/content-block-cards/content-block-cards.js +56 -3
- package/es/components/content-block-cards/content-block-cards.js.map +1 -1
- package/es/components/cta/video-cta-container.d.ts +2 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.d.ts +2 -1
- package/es/components/notice-choice/notice-choice.d.ts +1 -0
- package/es/components/notice-choice/notice-choice.js +18 -4
- package/es/components/notice-choice/notice-choice.js.map +1 -1
- package/es/components/notice-choice/utils.d.ts +0 -1
- package/es/components/notice-choice/utils.js +0 -42
- package/es/components/notice-choice/utils.js.map +1 -1
- package/es/components/pricing-table/pricing-table.css.js +1 -1
- package/es/components/structured-list/structured-list.css.js +1 -1
- package/es/components/video-player/video-player-container.d.ts +16 -2
- package/es/components/video-player/video-player-container.js +30 -2
- package/es/components/video-player/video-player-container.js.map +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
- package/lib/component-mixins/callout/defs.js +16 -16
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
- package/package.json +6 -6
|
@@ -8,7 +8,351 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Part } from 'lit';
|
|
10
10
|
import C4DContentBlock from '../content-block/content-block';
|
|
11
|
-
|
|
11
|
+
import { MQDirs } from '../../component-mixins/media-query/media-query';
|
|
12
|
+
declare const C4DContentBlockCards_base: (abstract new (...args: any[]) => {
|
|
13
|
+
_mqConfig: {
|
|
14
|
+
sm?: MQDirs | undefined;
|
|
15
|
+
md?: MQDirs | undefined;
|
|
16
|
+
lg?: MQDirs | undefined;
|
|
17
|
+
xlg?: MQDirs | undefined;
|
|
18
|
+
max?: MQDirs | undefined;
|
|
19
|
+
};
|
|
20
|
+
_generateMediaQueriesByBreakpoint(): {
|
|
21
|
+
[index: string]: MediaQueryList;
|
|
22
|
+
};
|
|
23
|
+
carbonBreakpoints: {
|
|
24
|
+
[index: string]: MediaQueryList;
|
|
25
|
+
};
|
|
26
|
+
_attachMediaQueryEventListeners(): void;
|
|
27
|
+
firstUpdated(): void;
|
|
28
|
+
accessKey: string;
|
|
29
|
+
readonly accessKeyLabel: string;
|
|
30
|
+
autocapitalize: string;
|
|
31
|
+
dir: string;
|
|
32
|
+
draggable: boolean;
|
|
33
|
+
hidden: boolean;
|
|
34
|
+
inert: boolean;
|
|
35
|
+
innerText: string;
|
|
36
|
+
lang: string;
|
|
37
|
+
readonly offsetHeight: number;
|
|
38
|
+
readonly offsetLeft: number;
|
|
39
|
+
readonly offsetParent: Element | null;
|
|
40
|
+
readonly offsetTop: number;
|
|
41
|
+
readonly offsetWidth: number;
|
|
42
|
+
outerText: string;
|
|
43
|
+
popover: string | null;
|
|
44
|
+
spellcheck: boolean;
|
|
45
|
+
title: string;
|
|
46
|
+
translate: boolean;
|
|
47
|
+
attachInternals(): ElementInternals;
|
|
48
|
+
click(): void;
|
|
49
|
+
hidePopover(): void;
|
|
50
|
+
showPopover(): void;
|
|
51
|
+
togglePopover(force?: boolean): boolean;
|
|
52
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
53
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
54
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
55
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
56
|
+
readonly attributes: NamedNodeMap;
|
|
57
|
+
readonly classList: DOMTokenList;
|
|
58
|
+
className: string;
|
|
59
|
+
readonly clientHeight: number;
|
|
60
|
+
readonly clientLeft: number;
|
|
61
|
+
readonly clientTop: number;
|
|
62
|
+
readonly clientWidth: number;
|
|
63
|
+
id: string;
|
|
64
|
+
readonly localName: string;
|
|
65
|
+
readonly namespaceURI: string | null;
|
|
66
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
67
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
68
|
+
outerHTML: string;
|
|
69
|
+
readonly ownerDocument: Document;
|
|
70
|
+
readonly part: DOMTokenList;
|
|
71
|
+
readonly prefix: string | null;
|
|
72
|
+
readonly scrollHeight: number;
|
|
73
|
+
scrollLeft: number;
|
|
74
|
+
scrollTop: number;
|
|
75
|
+
readonly scrollWidth: number;
|
|
76
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
77
|
+
slot: string;
|
|
78
|
+
readonly tagName: string;
|
|
79
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
80
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
81
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
82
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
83
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
84
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
85
|
+
computedStyleMap(): StylePropertyMapReadOnly;
|
|
86
|
+
getAttribute(qualifiedName: string): string | null;
|
|
87
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
88
|
+
getAttributeNames(): string[];
|
|
89
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
90
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
91
|
+
getBoundingClientRect(): DOMRect;
|
|
92
|
+
getClientRects(): DOMRectList;
|
|
93
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
94
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
95
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
96
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
97
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
98
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
99
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
100
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
101
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
102
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
103
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
104
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
105
|
+
hasAttributes(): boolean;
|
|
106
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
107
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
108
|
+
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
109
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
110
|
+
matches(selectors: string): boolean;
|
|
111
|
+
releasePointerCapture(pointerId: number): void;
|
|
112
|
+
removeAttribute(qualifiedName: string): void;
|
|
113
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
114
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
115
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
116
|
+
requestPointerLock(): void;
|
|
117
|
+
scroll(options?: ScrollToOptions): void;
|
|
118
|
+
scroll(x: number, y: number): void;
|
|
119
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
120
|
+
scrollBy(x: number, y: number): void;
|
|
121
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
122
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
123
|
+
scrollTo(x: number, y: number): void;
|
|
124
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
125
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
126
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
127
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
128
|
+
setHTMLUnsafe(html: string): void;
|
|
129
|
+
setPointerCapture(pointerId: number): void;
|
|
130
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
131
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
132
|
+
readonly baseURI: string;
|
|
133
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
134
|
+
readonly firstChild: ChildNode | null;
|
|
135
|
+
readonly isConnected: boolean;
|
|
136
|
+
readonly lastChild: ChildNode | null;
|
|
137
|
+
readonly nextSibling: ChildNode | null;
|
|
138
|
+
readonly nodeName: string;
|
|
139
|
+
readonly nodeType: number;
|
|
140
|
+
nodeValue: string | null;
|
|
141
|
+
readonly parentElement: HTMLElement | null;
|
|
142
|
+
readonly parentNode: ParentNode | null;
|
|
143
|
+
readonly previousSibling: ChildNode | null;
|
|
144
|
+
textContent: string | null;
|
|
145
|
+
appendChild<T extends Node>(node: T): T;
|
|
146
|
+
cloneNode(deep?: boolean): Node;
|
|
147
|
+
compareDocumentPosition(other: Node): number;
|
|
148
|
+
contains(other: Node | null): boolean;
|
|
149
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
150
|
+
hasChildNodes(): boolean;
|
|
151
|
+
insertBefore<T extends Node>(node: T, child: Node | null): T;
|
|
152
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
153
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
154
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
155
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
156
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
157
|
+
normalize(): void;
|
|
158
|
+
removeChild<T extends Node>(child: T): T;
|
|
159
|
+
replaceChild<T extends Node>(node: Node, child: T): T;
|
|
160
|
+
readonly ELEMENT_NODE: 1;
|
|
161
|
+
readonly ATTRIBUTE_NODE: 2;
|
|
162
|
+
readonly TEXT_NODE: 3;
|
|
163
|
+
readonly CDATA_SECTION_NODE: 4;
|
|
164
|
+
readonly ENTITY_REFERENCE_NODE: 5;
|
|
165
|
+
readonly ENTITY_NODE: 6;
|
|
166
|
+
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
167
|
+
readonly COMMENT_NODE: 8;
|
|
168
|
+
readonly DOCUMENT_NODE: 9;
|
|
169
|
+
readonly DOCUMENT_TYPE_NODE: 10;
|
|
170
|
+
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
171
|
+
readonly NOTATION_NODE: 12;
|
|
172
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
173
|
+
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
174
|
+
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
175
|
+
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
176
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
177
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
178
|
+
dispatchEvent(event: Event): boolean;
|
|
179
|
+
ariaAtomic: string | null;
|
|
180
|
+
ariaAutoComplete: string | null;
|
|
181
|
+
ariaBrailleLabel: string | null;
|
|
182
|
+
ariaBrailleRoleDescription: string | null;
|
|
183
|
+
ariaBusy: string | null;
|
|
184
|
+
ariaChecked: string | null;
|
|
185
|
+
ariaColCount: string | null;
|
|
186
|
+
ariaColIndex: string | null;
|
|
187
|
+
ariaColSpan: string | null;
|
|
188
|
+
ariaCurrent: string | null;
|
|
189
|
+
ariaDescription: string | null;
|
|
190
|
+
ariaDisabled: string | null;
|
|
191
|
+
ariaExpanded: string | null;
|
|
192
|
+
ariaHasPopup: string | null;
|
|
193
|
+
ariaHidden: string | null;
|
|
194
|
+
ariaInvalid: string | null;
|
|
195
|
+
ariaKeyShortcuts: string | null;
|
|
196
|
+
ariaLabel: string | null;
|
|
197
|
+
ariaLevel: string | null;
|
|
198
|
+
ariaLive: string | null;
|
|
199
|
+
ariaModal: string | null;
|
|
200
|
+
ariaMultiLine: string | null;
|
|
201
|
+
ariaMultiSelectable: string | null;
|
|
202
|
+
ariaOrientation: string | null;
|
|
203
|
+
ariaPlaceholder: string | null;
|
|
204
|
+
ariaPosInSet: string | null;
|
|
205
|
+
ariaPressed: string | null;
|
|
206
|
+
ariaReadOnly: string | null;
|
|
207
|
+
ariaRequired: string | null;
|
|
208
|
+
ariaRoleDescription: string | null;
|
|
209
|
+
ariaRowCount: string | null;
|
|
210
|
+
ariaRowIndex: string | null;
|
|
211
|
+
ariaRowSpan: string | null;
|
|
212
|
+
ariaSelected: string | null;
|
|
213
|
+
ariaSetSize: string | null;
|
|
214
|
+
ariaSort: string | null;
|
|
215
|
+
ariaValueMax: string | null;
|
|
216
|
+
ariaValueMin: string | null;
|
|
217
|
+
ariaValueNow: string | null;
|
|
218
|
+
ariaValueText: string | null;
|
|
219
|
+
role: string | null;
|
|
220
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
221
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
222
|
+
after(...nodes: (Node | string)[]): void;
|
|
223
|
+
before(...nodes: (Node | string)[]): void;
|
|
224
|
+
remove(): void;
|
|
225
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
226
|
+
innerHTML: string;
|
|
227
|
+
readonly nextElementSibling: Element | null;
|
|
228
|
+
readonly previousElementSibling: Element | null;
|
|
229
|
+
readonly childElementCount: number;
|
|
230
|
+
readonly children: HTMLCollection;
|
|
231
|
+
readonly firstElementChild: Element | null;
|
|
232
|
+
readonly lastElementChild: Element | null;
|
|
233
|
+
append(...nodes: (Node | string)[]): void;
|
|
234
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
235
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
236
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
237
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
238
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
239
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
240
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
241
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
242
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
243
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
244
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
245
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
246
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
247
|
+
readonly attributeStyleMap: StylePropertyMap;
|
|
248
|
+
readonly style: CSSStyleDeclaration;
|
|
249
|
+
contentEditable: string;
|
|
250
|
+
enterKeyHint: string;
|
|
251
|
+
inputMode: string;
|
|
252
|
+
readonly isContentEditable: boolean;
|
|
253
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
254
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
255
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
256
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
257
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
258
|
+
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
259
|
+
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
260
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
261
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
262
|
+
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
263
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
264
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
265
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
266
|
+
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
267
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
269
|
+
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
270
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
|
+
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
272
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
273
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
274
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
275
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
276
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
277
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
278
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
279
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
280
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
281
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
282
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
283
|
+
onerror: OnErrorEventHandler;
|
|
284
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
285
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
286
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
287
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
288
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
289
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
290
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
291
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
292
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
293
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
294
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
297
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
298
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
299
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
300
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
301
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
302
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
303
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
304
|
+
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
305
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
306
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
307
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
308
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
309
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
310
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
311
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
312
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
313
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
314
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
315
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
316
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
317
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
318
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
319
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
320
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
321
|
+
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
322
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
323
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
324
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
325
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
326
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
327
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
328
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
329
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
330
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
331
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
332
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
|
+
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
334
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
335
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
336
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
337
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
338
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
339
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
340
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
341
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
342
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
343
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
344
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
345
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
346
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
347
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
348
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
349
|
+
autofocus: boolean;
|
|
350
|
+
readonly dataset: DOMStringMap;
|
|
351
|
+
nonce?: string;
|
|
352
|
+
tabIndex: number;
|
|
353
|
+
blur(): void;
|
|
354
|
+
focus(options?: FocusOptions): void;
|
|
355
|
+
}) & {
|
|
12
356
|
new (...args: any[]): {
|
|
13
357
|
linkNode: any;
|
|
14
358
|
altAttributes: any;
|
|
@@ -355,11 +699,14 @@ declare const C4DContentBlockCards_base: {
|
|
|
355
699
|
* @element c4d-content-block-cards
|
|
356
700
|
*/
|
|
357
701
|
declare class C4DContentBlockCards extends C4DContentBlockCards_base {
|
|
702
|
+
private _isMobileOrMedium;
|
|
358
703
|
/**
|
|
359
704
|
* The CSS class list for the container (grid) node.
|
|
360
705
|
*/
|
|
361
706
|
protected _getContainerClasses(): string | ((part: Part) => void);
|
|
362
707
|
static get stableSelector(): string;
|
|
708
|
+
protected setSameHeightOnMobile(): void;
|
|
709
|
+
firstUpdated(): void;
|
|
363
710
|
connectedCallback(): void;
|
|
364
711
|
static get styles(): import("lit").CSSResult;
|
|
365
712
|
}
|
|
@@ -14,11 +14,13 @@ function _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prot
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { css } from 'lit';
|
|
17
|
+
import { state } from 'lit/decorators.js';
|
|
17
18
|
import settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
|
|
18
19
|
import StableSelectorMixin from "../../globals/mixins/stable-selector.js";
|
|
19
20
|
import C4DContentBlock from "../content-block/content-block.js";
|
|
20
21
|
import styles from "././content-block-cards.css.js";
|
|
21
22
|
import { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
|
23
|
+
import MediaQueryMixin, { MQBreakpoints, MQDirs } from "../../component-mixins/media-query/media-query.js";
|
|
22
24
|
const {
|
|
23
25
|
prefix,
|
|
24
26
|
stablePrefix: c4dPrefix
|
|
@@ -29,8 +31,8 @@ const {
|
|
|
29
31
|
*
|
|
30
32
|
* @element c4d-content-block-cards
|
|
31
33
|
*/
|
|
32
|
-
let C4DContentBlockCards = _decorate([customElement(`${c4dPrefix}-content-block-cards`)], function (_initialize,
|
|
33
|
-
class C4DContentBlockCards extends
|
|
34
|
+
let C4DContentBlockCards = _decorate([customElement(`${c4dPrefix}-content-block-cards`)], function (_initialize, _MediaQueryMixin) {
|
|
35
|
+
class C4DContentBlockCards extends _MediaQueryMixin {
|
|
34
36
|
constructor(...args) {
|
|
35
37
|
super(...args);
|
|
36
38
|
_initialize(this);
|
|
@@ -39,6 +41,13 @@ let C4DContentBlockCards = _decorate([customElement(`${c4dPrefix}-content-block-
|
|
|
39
41
|
return {
|
|
40
42
|
F: C4DContentBlockCards,
|
|
41
43
|
d: [{
|
|
44
|
+
kind: "field",
|
|
45
|
+
decorators: [state()],
|
|
46
|
+
key: "_isMobileOrMedium",
|
|
47
|
+
value() {
|
|
48
|
+
return this.carbonBreakpoints.md.matches;
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
42
51
|
kind: "method",
|
|
43
52
|
key: "_getContainerClasses",
|
|
44
53
|
value:
|
|
@@ -56,6 +65,48 @@ let C4DContentBlockCards = _decorate([customElement(`${c4dPrefix}-content-block-
|
|
|
56
65
|
value: function () {
|
|
57
66
|
return `${c4dPrefix}--content-block-cards`;
|
|
58
67
|
}
|
|
68
|
+
}, {
|
|
69
|
+
kind: "method",
|
|
70
|
+
key: "setSameHeightOnMobile",
|
|
71
|
+
value: function setSameHeightOnMobile() {
|
|
72
|
+
requestAnimationFrame(() => {
|
|
73
|
+
let maxHeightHeading = 0;
|
|
74
|
+
let maxHeightParagraph = 0;
|
|
75
|
+
const blockCards = this.querySelectorAll(`${c4dPrefix}-card-group-item`);
|
|
76
|
+
blockCards.forEach(card => {
|
|
77
|
+
var _card$shadowRoot;
|
|
78
|
+
const heading = card.querySelector('c4d-card-heading');
|
|
79
|
+
const para = card.querySelector('p') || (card === null || card === void 0 || (_card$shadowRoot = card.shadowRoot) === null || _card$shadowRoot === void 0 ? void 0 : _card$shadowRoot.querySelector('div.cds--card__copy'));
|
|
80
|
+
let headingHeight = 0;
|
|
81
|
+
let paraHeight = 0;
|
|
82
|
+
if (heading && para) {
|
|
83
|
+
headingHeight = heading === null || heading === void 0 ? void 0 : heading.getBoundingClientRect().height;
|
|
84
|
+
paraHeight = para === null || para === void 0 ? void 0 : para.getBoundingClientRect().height;
|
|
85
|
+
}
|
|
86
|
+
maxHeightHeading = maxHeightHeading > headingHeight ? maxHeightHeading : headingHeight;
|
|
87
|
+
maxHeightParagraph = maxHeightParagraph > paraHeight ? maxHeightParagraph : paraHeight;
|
|
88
|
+
});
|
|
89
|
+
for (const card of blockCards) {
|
|
90
|
+
var _card$shadowRoot2;
|
|
91
|
+
const heading = card.querySelector('c4d-card-heading');
|
|
92
|
+
const para = card.querySelector('p') || (card === null || card === void 0 || (_card$shadowRoot2 = card.shadowRoot) === null || _card$shadowRoot2 === void 0 ? void 0 : _card$shadowRoot2.querySelector('div.cds--card__copy'));
|
|
93
|
+
if (heading && para) {
|
|
94
|
+
heading.setAttribute('style', `height: ${maxHeightHeading}px; display: block;`);
|
|
95
|
+
para.setAttribute('style', `height: ${maxHeightParagraph}px; display: block;`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
kind: "method",
|
|
102
|
+
key: "firstUpdated",
|
|
103
|
+
value: function firstUpdated() {
|
|
104
|
+
window.addEventListener('load', () => {
|
|
105
|
+
if (this._isMobileOrMedium) {
|
|
106
|
+
this.setSameHeightOnMobile();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
59
110
|
}, {
|
|
60
111
|
kind: "method",
|
|
61
112
|
key: "connectedCallback",
|
|
@@ -85,7 +136,9 @@ let C4DContentBlockCards = _decorate([customElement(`${c4dPrefix}-content-block-
|
|
|
85
136
|
}
|
|
86
137
|
}]
|
|
87
138
|
};
|
|
88
|
-
}, StableSelectorMixin(C4DContentBlock)
|
|
139
|
+
}, MediaQueryMixin(StableSelectorMixin(C4DContentBlock), {
|
|
140
|
+
[MQBreakpoints.MD]: MQDirs.MAX
|
|
141
|
+
}));
|
|
89
142
|
console.warn('The content-block-cards component has been deprecated in favor of the content-section/block and card-group component. ' + 'See content-section/block and card-group documentation for more information.');
|
|
90
143
|
|
|
91
144
|
/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-block-cards.js","names":["css","settings","StableSelectorMixin","C4DContentBlock","styles","carbonElement","customElement","prefix","stablePrefix","c4dPrefix","C4DContentBlockCards","_decorate","_initialize","
|
|
1
|
+
{"version":3,"file":"content-block-cards.js","names":["css","state","settings","StableSelectorMixin","C4DContentBlock","styles","carbonElement","customElement","MediaQueryMixin","MQBreakpoints","MQDirs","prefix","stablePrefix","c4dPrefix","C4DContentBlockCards","_decorate","_initialize","_MediaQueryMixin","constructor","args","F","d","kind","decorators","key","value","carbonBreakpoints","md","matches","_getContainerClasses","static","setSameHeightOnMobile","requestAnimationFrame","maxHeightHeading","maxHeightParagraph","blockCards","querySelectorAll","forEach","card","_card$shadowRoot","heading","querySelector","para","shadowRoot","headingHeight","paraHeight","getBoundingClientRect","height","_card$shadowRoot2","setAttribute","firstUpdated","window","addEventListener","_isMobileOrMedium","connectedCallback","_superPropGet","onload","_this$shadowRoot","hasLogoClass","classList","contains","slot","assignedElements","element","add","_t","_","MD","MAX","console","warn"],"sources":["components/content-block-cards/content-block-cards.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css, Part } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport C4DContentBlock from '../content-block/content-block';\nimport styles from './content-block-cards.scss';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport MediaQueryMixin, {\n MQBreakpoints,\n MQDirs,\n} from '../../component-mixins/media-query/media-query';\n\nconst { prefix, stablePrefix: c4dPrefix } = settings;\n\n/**\n * Content block cards.\n *\n * @element c4d-content-block-cards\n */\n@customElement(`${c4dPrefix}-content-block-cards`)\nclass C4DContentBlockCards extends MediaQueryMixin(\n StableSelectorMixin(C4DContentBlock),\n {\n [MQBreakpoints.MD]: MQDirs.MAX,\n }\n) {\n @state()\n private _isMobileOrMedium = this.carbonBreakpoints.md.matches;\n\n /**\n * The CSS class list for the container (grid) node.\n */\n // eslint-disable-next-line class-methods-use-this\n protected _getContainerClasses(): string | ((part: Part) => void) {\n return `${prefix}--content-layout ${prefix}--content-layout--card-group`;\n }\n\n static get stableSelector() {\n return `${c4dPrefix}--content-block-cards`;\n }\n\n protected setSameHeightOnMobile() {\n requestAnimationFrame(() => {\n let maxHeightHeading = 0;\n let maxHeightParagraph = 0;\n\n const blockCards = this.querySelectorAll(`${c4dPrefix}-card-group-item`);\n\n blockCards.forEach((card) => {\n const heading = card.querySelector('c4d-card-heading') as HTMLElement;\n const para =\n card.querySelector('p') ||\n card?.shadowRoot?.querySelector('div.cds--card__copy');\n\n let headingHeight = 0;\n let paraHeight = 0;\n\n if (heading && para) {\n headingHeight = heading?.getBoundingClientRect().height;\n paraHeight = para?.getBoundingClientRect().height;\n }\n\n maxHeightHeading =\n maxHeightHeading > headingHeight ? maxHeightHeading : headingHeight;\n\n maxHeightParagraph =\n maxHeightParagraph > paraHeight ? maxHeightParagraph : paraHeight;\n });\n\n for (const card of blockCards) {\n const heading = card.querySelector('c4d-card-heading');\n const para =\n card.querySelector('p') ||\n card?.shadowRoot?.querySelector('div.cds--card__copy');\n if (heading && para) {\n heading.setAttribute(\n 'style',\n `height: ${maxHeightHeading}px; display: block;`\n );\n para.setAttribute(\n 'style',\n `height: ${maxHeightParagraph}px; display: block;`\n );\n }\n }\n });\n }\n\n firstUpdated() {\n window.addEventListener('load', () => {\n if (this._isMobileOrMedium) {\n this.setSameHeightOnMobile();\n }\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n window.onload = () => {\n const hasLogoClass = this.classList.contains('media-type__logo');\n const slot = this.shadowRoot?.querySelector('slot:not([name])');\n\n if (slot && hasLogoClass) {\n (slot as HTMLSlotElement)?.assignedElements().forEach((element) => {\n element.classList.add('media-type-block-cards__logo');\n });\n }\n };\n }\n\n // `styles` here is a `CSSResult` generated by custom WebPack loader\n static get styles() {\n return css`\n ${super.styles}${styles}\n `;\n }\n}\n\nconsole.warn(\n 'The content-block-cards component has been deprecated in favor of the content-section/block and card-group component. ' +\n 'See content-section/block and card-group documentation for more information.'\n);\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DContentBlockCards;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -376,6 +376,7 @@ declare const C4DVideoCTAContainer_base: {
|
|
|
376
376
|
[videoId: string]: Promise<any>;
|
|
377
377
|
};
|
|
378
378
|
customVideoName: string;
|
|
379
|
+
lc: string;
|
|
379
380
|
_setRequestEmbedVideoInProgress(videoId: string, request: Promise<any>): void;
|
|
380
381
|
_setErrorRequestEmbedVideo(videoId: string, error: Error): void;
|
|
381
382
|
_setEmbeddedVideo(videoId: string, kWidget: any): void;
|
|
@@ -384,7 +385,7 @@ declare const C4DVideoCTAContainer_base: {
|
|
|
384
385
|
_getPlayerOptions(): {};
|
|
385
386
|
_embedVideoImpl(videoId: string): Promise<any>;
|
|
386
387
|
_embedMedia: (videoId: string) => Promise<any>;
|
|
387
|
-
firstUpdated(): void
|
|
388
|
+
firstUpdated(): Promise<void>;
|
|
388
389
|
prefersAutoplayStorageKey: string;
|
|
389
390
|
linkNode: any;
|
|
390
391
|
altAttributes: any;
|
|
@@ -351,6 +351,7 @@ declare const C4DLightboxVideoPlayerContainer_base: {
|
|
|
351
351
|
[videoId: string]: Promise<any>;
|
|
352
352
|
};
|
|
353
353
|
customVideoName: string;
|
|
354
|
+
lc: string;
|
|
354
355
|
_setRequestEmbedVideoInProgress(videoId: string, request: Promise<any>): void;
|
|
355
356
|
_setErrorRequestEmbedVideo(videoId: string, error: Error): void;
|
|
356
357
|
_setEmbeddedVideo(videoId: string, kWidget: any): void;
|
|
@@ -359,7 +360,7 @@ declare const C4DLightboxVideoPlayerContainer_base: {
|
|
|
359
360
|
_getPlayerOptions(): {};
|
|
360
361
|
_embedVideoImpl(videoId: string): Promise<any>;
|
|
361
362
|
_embedMedia: (videoId: string) => Promise<any>;
|
|
362
|
-
firstUpdated(): void
|
|
363
|
+
firstUpdated(): Promise<void>;
|
|
363
364
|
prefersAutoplayStorageKey: string;
|
|
364
365
|
linkNode: any;
|
|
365
366
|
altAttributes: any;
|
|
@@ -38,7 +38,7 @@ function _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prot
|
|
|
38
38
|
import { loadContent, loadSettings, checkEmailStatus } from "./services.js";
|
|
39
39
|
import { html, LitElement } from 'lit';
|
|
40
40
|
import { property } from 'lit/decorators.js';
|
|
41
|
-
import { pwsValueMap, resetToWorldWideContent
|
|
41
|
+
import { pwsValueMap, resetToWorldWideContent } from "./utils.js";
|
|
42
42
|
import settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
|
|
43
43
|
import StableSelectorMixin from "../../globals/mixins/stable-selector.js";
|
|
44
44
|
import styles from "././notice-choice.css.js";
|
|
@@ -390,6 +390,16 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
390
390
|
value() {
|
|
391
391
|
return '';
|
|
392
392
|
}
|
|
393
|
+
}, {
|
|
394
|
+
kind: "field",
|
|
395
|
+
decorators: [property({
|
|
396
|
+
type: Object,
|
|
397
|
+
attribute: false
|
|
398
|
+
})],
|
|
399
|
+
key: "supportedLanguages",
|
|
400
|
+
value() {
|
|
401
|
+
return {};
|
|
402
|
+
}
|
|
393
403
|
}, {
|
|
394
404
|
kind: "method",
|
|
395
405
|
key: "connectedCallback",
|
|
@@ -448,17 +458,19 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
448
458
|
case 'language':
|
|
449
459
|
case 'environment':
|
|
450
460
|
{
|
|
451
|
-
var _this$language;
|
|
461
|
+
var _this$language, _this$language2;
|
|
452
462
|
if (['stage', 'prod'].includes(value)) {
|
|
453
463
|
this.environment = value;
|
|
454
464
|
} else {
|
|
455
465
|
this.language = value;
|
|
456
466
|
}
|
|
457
467
|
const langPart = (_this$language = this.language) === null || _this$language === void 0 ? void 0 : _this$language.split(/[-_]/)[0];
|
|
458
|
-
const supportedLang = supportedLanguages(this.language) || supportedLanguages(
|
|
468
|
+
const supportedLang = this.language && this.supportedLanguages[(_this$language2 = this.language) === null || _this$language2 === void 0 ? void 0 : _this$language2.toLowerCase()] || langPart && this.supportedLanguages[langPart === null || langPart === void 0 ? void 0 : langPart.toLowerCase()] || 'en';
|
|
459
469
|
this.isLoading = true;
|
|
460
470
|
loadSettings(this.environment, settings => {
|
|
461
471
|
this.countrySettings = settings.preferences;
|
|
472
|
+
this.noticeOnly = settings.noticeOnly || ['us'];
|
|
473
|
+
this.supportedLanguages = settings.supportedLanguages || {};
|
|
462
474
|
}, err => console.error('error loading settings', err));
|
|
463
475
|
loadContent(supportedLang, this.environment, ncData => {
|
|
464
476
|
this.isLoading = false;
|
|
@@ -563,10 +575,11 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
563
575
|
key: "_initSettingsAndContent",
|
|
564
576
|
value: function _initSettingsAndContent(language) {
|
|
565
577
|
const [lang] = language.split(/[-_]/);
|
|
566
|
-
const defaultLang = supportedLanguages(
|
|
578
|
+
const defaultLang = this.supportedLanguages[language === null || language === void 0 ? void 0 : language.toLocaleLowerCase()] || this.supportedLanguages[lang === null || lang === void 0 ? void 0 : lang.toLocaleLowerCase()] || 'en';
|
|
567
579
|
loadSettings(this.environment, settings => {
|
|
568
580
|
this.countrySettings = settings.preferences;
|
|
569
581
|
this.noticeOnly = settings.noticeOnly || ['us'];
|
|
582
|
+
this.supportedLanguages = settings.supportedLanguages || {};
|
|
570
583
|
}, () => this.defaultLoadSettings());
|
|
571
584
|
loadContent(defaultLang, this.environment, ncData => {
|
|
572
585
|
this.ncData = ncData;
|
|
@@ -722,6 +735,7 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
722
735
|
loadSettings(this.environment, countryPreferencesSettings => {
|
|
723
736
|
this.countrySettings = countryPreferencesSettings.preferences;
|
|
724
737
|
this.noticeOnly = countryPreferencesSettings.noticeOnly || ['us'];
|
|
738
|
+
this.supportedLanguages = settings.supportedLanguages || {};
|
|
725
739
|
}, error => {
|
|
726
740
|
console.error('error loading content', error);
|
|
727
741
|
});
|