@proximus/lavender-banner 2.0.0-alpha.56 → 2.0.0-alpha.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Banner.d.ts +2 -0
- package/dist/index.es.js +9 -1
- package/package.json +1 -1
package/dist/Banner.d.ts
CHANGED
|
@@ -5,11 +5,13 @@ import '@proximus/lavender-grid';
|
|
|
5
5
|
import { VerticallyExtendedElement } from '@proximus/lavender-common';
|
|
6
6
|
export declare class Banner extends VerticallyExtendedElement<HTMLDivElement> {
|
|
7
7
|
static nativeName: string;
|
|
8
|
+
observer: MutationObserver;
|
|
8
9
|
private template;
|
|
9
10
|
constructor();
|
|
10
11
|
static get observedAttributes(): string[];
|
|
11
12
|
connectedCallback(): void;
|
|
12
13
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
13
15
|
createGridTemplateAreas(): void;
|
|
14
16
|
createGridding(value?: string): void;
|
|
15
17
|
get $grid(): Grid;
|
package/dist/index.es.js
CHANGED
|
@@ -361,7 +361,12 @@ const l = class l extends f {
|
|
|
361
361
|
}
|
|
362
362
|
connectedCallback() {
|
|
363
363
|
var t;
|
|
364
|
-
(t = super.connectedCallback) == null || t.call(this), this.reduced ? this.$container.setAttribute("padding", "m") : this.$container.setAttribute("padding", "l"), this.createGridTemplateAreas(), this.createGridding()
|
|
364
|
+
(t = super.connectedCallback) == null || t.call(this), this.reduced ? this.$container.setAttribute("padding", "m") : this.$container.setAttribute("padding", "l"), this.createGridTemplateAreas(), this.createGridding(), this.observer = new MutationObserver(() => {
|
|
365
|
+
this.createGridTemplateAreas(), this.createGridding();
|
|
366
|
+
}), this.observer.observe(this, {
|
|
367
|
+
childList: !0,
|
|
368
|
+
subtree: !0
|
|
369
|
+
});
|
|
365
370
|
}
|
|
366
371
|
attributeChangedCallback(t, i, e) {
|
|
367
372
|
if (i !== e)
|
|
@@ -409,6 +414,9 @@ const l = class l extends f {
|
|
|
409
414
|
break;
|
|
410
415
|
}
|
|
411
416
|
}
|
|
417
|
+
disconnectedCallback() {
|
|
418
|
+
this.observer.disconnect();
|
|
419
|
+
}
|
|
412
420
|
createGridTemplateAreas() {
|
|
413
421
|
const t = this.shadowRoot.querySelector(
|
|
414
422
|
".banner-content"
|