@telia-ace/widget-components-widget-header-flamingo 1.0.13 → 1.0.44

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.
@@ -1,3 +1,2 @@
1
1
  import WidgetHeaderComponent from './widget-header-component';
2
2
  export default WidgetHeaderComponent;
3
- //# sourceMappingURL=index.d.ts.map
package/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./index-18d19996.js");module.exports=e.WidgetHeaderComponent;
package/index.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import { W as f } from "./index-0ac5d882.mjs";
2
+ export {
3
+ f as default
4
+ };
package/package.json CHANGED
@@ -1,45 +1,12 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-widget-header-flamingo",
3
- "version": "1.0.13",
4
- "description": "Type definition for Grid widget.",
5
- "license": "SEE LICENSE IN LICENSE.txt",
6
- "author": "Telia Company AB",
7
- "keywords": [
8
- "telia"
9
- ],
10
- "main": "dist/index.js",
11
- "sourceMain": "src/index.ts",
12
- "type": "module",
13
- "types": "dist/index.d.ts",
14
- "files": [
15
- "LICENSE.txt",
16
- "README.md",
17
- "dist/"
18
- ],
19
- "publishConfig": {
20
- "access": "public"
21
- },
22
- "sideEffects": true,
3
+ "version": "1.0.44",
23
4
  "dependencies": {
24
- "@lit-labs/context": "^0.4.0",
25
- "@telia-ace/widget-core": "^1.0.27",
26
- "@teliads/components": "^22.1.1",
27
- "@teliads/icons": "^8.4.0",
5
+ "@telia-ace/widget-runtime-flamingo": "^1.0.44",
28
6
  "@webprovisions/platform": "^1.1.3",
29
- "lit": "^2.8.0",
30
- "lit-html": "^2.8.0",
31
- "sass": "^1.66.1",
32
- "@telia-ace/widget-runtime-flamingo": "1.0.15"
33
- },
34
- "devDependencies": {
35
- "@types/node": "^20.5.4",
36
- "rimraf": "^5.0.1",
37
- "tslib": "^2.6.0",
38
- "typescript": "^5.1.6",
39
- "vite": "^4.4.9"
7
+ "lit": "^2.8.0"
40
8
  },
41
- "scripts": {
42
- "clean": "rimraf ./dist",
43
- "build": "rimraf ./dist && tsc -emitDeclarationOnly && vite build"
44
- }
9
+ "main": "./index.js",
10
+ "module": "./index.mjs",
11
+ "typings": "./index.d.ts"
45
12
  }
@@ -0,0 +1,347 @@
1
+ import { p as _, P, h as w, i as m, n as x, t as p, E as f, m as L, x as y, A as O, s as $ } from "./index-0ac5d882.mjs";
2
+ /**
3
+ * @license
4
+ * Copyright 2017 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const E = (n) => (t) => typeof t == "function" ? ((i, e) => (customElements.define(i, e), e))(n, t) : ((i, e) => {
8
+ const { kind: s, elements: o } = e;
9
+ return { kind: s, elements: o, finisher(r) {
10
+ customElements.define(i, r);
11
+ } };
12
+ })(n, t);
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ const k = ({ finisher: n, descriptor: t }) => (i, e) => {
19
+ var s;
20
+ if (e === void 0) {
21
+ const o = (s = i.originalKey) !== null && s !== void 0 ? s : i.key, r = t != null ? { kind: "method", placement: "prototype", key: o, descriptor: t(i.key) } : { ...i, key: o };
22
+ return n != null && (r.finisher = function(c) {
23
+ n(c, o);
24
+ }), r;
25
+ }
26
+ {
27
+ const o = i.constructor;
28
+ t !== void 0 && Object.defineProperty(i, e, t(e)), n == null || n(o, e);
29
+ }
30
+ };
31
+ /**
32
+ * @license
33
+ * Copyright 2021 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */
36
+ let g = class extends Event {
37
+ constructor(t, i, e) {
38
+ super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = i, this.subscribe = e != null && e;
39
+ }
40
+ };
41
+ /**
42
+ * @license
43
+ * Copyright 2021 Google LLC
44
+ * SPDX-License-Identifier: BSD-3-Clause
45
+ */
46
+ /**
47
+ * @license
48
+ * Copyright 2021 Google LLC
49
+ * SPDX-License-Identifier: BSD-3-Clause
50
+ */
51
+ let R = class {
52
+ constructor(t, i, e, s) {
53
+ var o;
54
+ if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (r, c) => {
55
+ this.unsubscribe && (this.unsubscribe !== c && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = r, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(r, c)), this.unsubscribe = c;
56
+ }, this.host = t, i.context !== void 0) {
57
+ const r = i;
58
+ this.context = r.context, this.callback = r.callback, this.subscribe = (o = r.subscribe) !== null && o !== void 0 && o;
59
+ } else
60
+ this.context = i, this.callback = e, this.subscribe = s != null && s;
61
+ this.host.addController(this);
62
+ }
63
+ hostConnected() {
64
+ this.dispatchRequest();
65
+ }
66
+ hostDisconnected() {
67
+ this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
68
+ }
69
+ dispatchRequest() {
70
+ this.host.dispatchEvent(new g(this.context, this.t, this.subscribe));
71
+ }
72
+ };
73
+ /**
74
+ * @license
75
+ * Copyright 2021 Google LLC
76
+ * SPDX-License-Identifier: BSD-3-Clause
77
+ */
78
+ class q {
79
+ constructor(t) {
80
+ this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
81
+ for (const [i, { disposer: e }] of this.subscriptions)
82
+ i(this.o, e);
83
+ }, t !== void 0 && (this.value = t);
84
+ }
85
+ get value() {
86
+ return this.o;
87
+ }
88
+ set value(t) {
89
+ this.setValue(t);
90
+ }
91
+ setValue(t, i = !1) {
92
+ const e = i || !Object.is(t, this.o);
93
+ this.o = t, e && this.updateObservers();
94
+ }
95
+ addCallback(t, i, e) {
96
+ if (!e)
97
+ return void t(this.value);
98
+ this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
99
+ this.subscriptions.delete(t);
100
+ }, consumerHost: i });
101
+ const { disposer: s } = this.subscriptions.get(t);
102
+ t(this.value, s);
103
+ }
104
+ clearCallbacks() {
105
+ this.subscriptions.clear();
106
+ }
107
+ }
108
+ /**
109
+ * @license
110
+ * Copyright 2021 Google LLC
111
+ * SPDX-License-Identifier: BSD-3-Clause
112
+ */
113
+ class D extends Event {
114
+ constructor(t) {
115
+ super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
116
+ }
117
+ }
118
+ class l extends q {
119
+ constructor(t, i, e) {
120
+ super(i.context !== void 0 ? i.initialValue : e), this.onContextRequest = (s) => {
121
+ const o = s.composedPath()[0];
122
+ s.context === this.context && o !== this.host && (s.stopPropagation(), this.addCallback(s.callback, o, s.subscribe));
123
+ }, this.onProviderRequest = (s) => {
124
+ const o = s.composedPath()[0];
125
+ if (s.context !== this.context || o === this.host)
126
+ return;
127
+ const r = /* @__PURE__ */ new Set();
128
+ for (const [c, { consumerHost: b }] of this.subscriptions)
129
+ r.has(c) || (r.add(c), b.dispatchEvent(new g(this.context, c, !0)));
130
+ s.stopPropagation();
131
+ }, this.host = t, i.context !== void 0 ? this.context = i.context : this.context = i, this.attachListeners(), this.host.addController(this);
132
+ }
133
+ attachListeners() {
134
+ this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
135
+ }
136
+ hostConnected() {
137
+ this.host.dispatchEvent(new D(this.context));
138
+ }
139
+ }
140
+ /**
141
+ * @license
142
+ * Copyright 2022 Google LLC
143
+ * SPDX-License-Identifier: BSD-3-Clause
144
+ */
145
+ function j({ context: n, subscribe: t }) {
146
+ return k({ finisher: (i, e) => {
147
+ i.addInitializer((s) => {
148
+ new R(s, { context: n, callback: (o) => {
149
+ s[e] = o;
150
+ }, subscribe: t });
151
+ });
152
+ } });
153
+ }
154
+ const V = "children", z = "descriptor", W = "container", H = "context", I = "layout", N = "properties";
155
+ class A {
156
+ constructor(t) {
157
+ (this.host = t).addController(this);
158
+ }
159
+ hostConnected() {
160
+ }
161
+ hostDisconnected() {
162
+ }
163
+ setDescriptor(t) {
164
+ this._descriptor = t;
165
+ }
166
+ setContainer(t) {
167
+ this._container = t;
168
+ }
169
+ async dispatch(t, i) {
170
+ if (!this._container || !this._descriptor)
171
+ return;
172
+ const e = await _.getInstance(
173
+ this._container
174
+ ), s = new P(e).withId(
175
+ this._descriptor.id
176
+ );
177
+ await e.actions(
178
+ s,
179
+ this._descriptor.type || w()
180
+ ).dispatch(t, i);
181
+ }
182
+ }
183
+ const S = (n) => {
184
+ const t = {};
185
+ return Object.keys(n).forEach((i) => {
186
+ i.indexOf("css-") > -1 && (t[i] = n[i]);
187
+ }), t;
188
+ }, B = (n, t) => {
189
+ const i = S(t);
190
+ Object.entries(i).forEach(([e, s]) => {
191
+ n.style.setProperty(e.replace("css-", ""), s);
192
+ });
193
+ };
194
+ var F = Object.defineProperty, K = Object.getOwnPropertyDescriptor, a = (n, t, i, e) => {
195
+ for (var s = e > 1 ? void 0 : e ? K(t, i) : t, o = n.length - 1, r; o >= 0; o--)
196
+ (r = n[o]) && (s = (e ? r(t, i, s) : r(s)) || s);
197
+ return e && s && F(t, i, s), s;
198
+ };
199
+ const M = (n) => {
200
+ class t extends n {
201
+ constructor() {
202
+ super(...arguments), this.entry = "", this._descriptorProvider = new l(
203
+ this,
204
+ z,
205
+ void 0
206
+ ), this._childrenProvider = new l(this, V, []), this._propertiesProvider = new l(this, N, {}), this._contextProvider = new l(this, H, {}), this._layoutProvider = new l(this, I, {}), this.actions = new A(this), this.context = {}, this.layout = {}, this.properties = {};
207
+ }
208
+ connectedCallback() {
209
+ super.connectedCallback(), this.container && (this.actions.setContainer(this.container), _.getInstance(this.container).then(
210
+ async (e) => {
211
+ var o;
212
+ const s = e.nodes.get(this.entry);
213
+ if (s) {
214
+ this._propertyChangeListener = e.events.subscribe(
215
+ "components:properties-changed",
216
+ (d, h) => {
217
+ s.id === h.node.id && this._setProperties(h.node.attributes.properties);
218
+ }
219
+ ), this._contextChangeListener = e.events.subscribe(
220
+ "components:context-changed",
221
+ (d, h) => {
222
+ s.id === h.node.id && this._setContext(h.node.attributes.context);
223
+ }
224
+ ), this._layoutChangeListener = e.events.subscribe(
225
+ "components:layout-changed",
226
+ (d, h) => {
227
+ s.id === h.node.id && this._setLayout(h.node.attributes.layout);
228
+ }
229
+ );
230
+ const r = "default";
231
+ this._unmountNode = s.mount(this.container), this._setDescriptor(f(s, r)), this._setProperties(s.attributes.properties), this._setContext(s.attributes.context), this._setLayout(this.layout);
232
+ const c = s.getChildren(r).map((d) => f(d));
233
+ this._childrenProvider.setValue(c);
234
+ const v = (await this.container.getAsync("componentResolver")).getComponent(
235
+ ((o = this.descriptor) == null ? void 0 : o.type) || ""
236
+ );
237
+ v.then && v.then((d) => {
238
+ this.component = d.default;
239
+ });
240
+ }
241
+ }
242
+ ));
243
+ }
244
+ disconnectedCallback() {
245
+ super.disconnectedCallback(), this._propertyChangeListener && this._propertyChangeListener(), this._contextChangeListener && this._contextChangeListener(), this._layoutChangeListener && this._layoutChangeListener(), this._unmountNode && this._unmountNode();
246
+ }
247
+ updated() {
248
+ this.container && this.actions.setContainer(this.container), L(this.context, this.renderRoot.host), this.renderRoot.host.style.setProperty(
249
+ "--width",
250
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
251
+ ), B(this.renderRoot.host, this.properties);
252
+ }
253
+ _setProperties(e) {
254
+ this._propertiesProvider.setValue(e), this.properties = e;
255
+ }
256
+ _setContext(e) {
257
+ this._contextProvider.setValue(e), this.context = e;
258
+ }
259
+ _setLayout(e) {
260
+ this._layoutProvider.setValue(e), this.layout = e;
261
+ }
262
+ _setDescriptor(e) {
263
+ this.descriptor = e, this._descriptorProvider.setValue(e), this.actions.setDescriptor(e);
264
+ }
265
+ }
266
+ return t.styles = [
267
+ n.styles ?? [],
268
+ m`
269
+ :host {
270
+ font-family: var(--font-family);
271
+ grid-column: span var(--width);
272
+ max-width: 100%;
273
+ overflow: hidden;
274
+ box-sizing: border-box;
275
+ display: block;
276
+ }
277
+ * {
278
+ box-sizing: border-box;
279
+ }
280
+ `
281
+ ], a([
282
+ j({ context: W }),
283
+ x({ attribute: !1 })
284
+ ], t.prototype, "container", 2), a([
285
+ x()
286
+ ], t.prototype, "entry", 2), a([
287
+ p()
288
+ ], t.prototype, "descriptor", 2), a([
289
+ p()
290
+ ], t.prototype, "component", 2), a([
291
+ p()
292
+ ], t.prototype, "context", 2), a([
293
+ p()
294
+ ], t.prototype, "layout", 2), a([
295
+ p()
296
+ ], t.prototype, "properties", 2), t;
297
+ };
298
+ var U = Object.defineProperty, G = Object.getOwnPropertyDescriptor, J = (n, t, i, e) => {
299
+ for (var s = e > 1 ? void 0 : e ? G(t, i) : t, o = n.length - 1, r; o >= 0; o--)
300
+ (r = n[o]) && (s = (e ? r(t, i, s) : r(s)) || s);
301
+ return e && s && U(t, i, s), s;
302
+ };
303
+ const C = M($);
304
+ let u = class extends C {
305
+ render() {
306
+ return y` <div class="widget-header">
307
+ <div>
308
+ <h1>${this.properties.header}</h1>
309
+
310
+ ${this.properties.tagline ? y`<p>${this.properties.tagline}</p>` : O}
311
+ </div>
312
+ </div>`;
313
+ }
314
+ };
315
+ u.styles = [
316
+ C.styles || [],
317
+ m`
318
+ .widget-header {
319
+ background-color: var(--primary-color);
320
+ color: #fff;
321
+ height: 85px;
322
+ display: flex;
323
+ flex-direction: row;
324
+ align-items: center;
325
+ border-radius: var(--spacing-sm) var(--spacing-sm) 0px 0px;
326
+ padding: 0 var(--spacing-md);
327
+ }
328
+
329
+ h1 {
330
+ font-size: 1.2rem;
331
+ }
332
+
333
+ h1,
334
+ p {
335
+ margin: 0;
336
+ padding: 0;
337
+ }
338
+ `
339
+ ];
340
+ u = J([
341
+ E("ace-widget-header")
342
+ ], u);
343
+ const Y = u;
344
+ export {
345
+ u as WidgetHeaderComponent,
346
+ Y as default
347
+ };
@@ -0,0 +1,72 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-18d19996.js");/**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const f=o=>t=>typeof t=="function"?((i,e)=>(customElements.define(i,e),e))(o,t):((i,e)=>{const{kind:s,elements:n}=e;return{kind:s,elements:n,finisher(r){customElements.define(i,r)}}})(o,t);/**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const y=({finisher:o,descriptor:t})=>(i,e)=>{var s;if(e===void 0){const n=(s=i.originalKey)!==null&&s!==void 0?s:i.key,r=t!=null?{kind:"method",placement:"prototype",key:n,descriptor:t(i.key)}:{...i,key:n};return o!=null&&(r.finisher=function(h){o(h,n)}),r}{const n=i.constructor;t!==void 0&&Object.defineProperty(i,e,t(e)),o==null||o(n,e)}};/**
10
+ * @license
11
+ * Copyright 2021 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */let v=class extends Event{constructor(t,i,e){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=i,this.subscribe=e!=null&&e}};/**
14
+ * @license
15
+ * Copyright 2021 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ *//**
18
+ * @license
19
+ * Copyright 2021 Google LLC
20
+ * SPDX-License-Identifier: BSD-3-Clause
21
+ */let _=class{constructor(t,i,e,s){var n;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(r,h)=>{this.unsubscribe&&(this.unsubscribe!==h&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=r,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(r,h)),this.unsubscribe=h},this.host=t,i.context!==void 0){const r=i;this.context=r.context,this.callback=r.callback,this.subscribe=(n=r.subscribe)!==null&&n!==void 0&&n}else this.context=i,this.callback=e,this.subscribe=s!=null&&s;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new v(this.context,this.t,this.subscribe))}};/**
22
+ * @license
23
+ * Copyright 2021 Google LLC
24
+ * SPDX-License-Identifier: BSD-3-Clause
25
+ */class g{constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[i,{disposer:e}]of this.subscriptions)i(this.o,e)},t!==void 0&&(this.value=t)}get value(){return this.o}set value(t){this.setValue(t)}setValue(t,i=!1){const e=i||!Object.is(t,this.o);this.o=t,e&&this.updateObservers()}addCallback(t,i,e){if(!e)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:i});const{disposer:s}=this.subscriptions.get(t);t(this.value,s)}clearCallbacks(){this.subscriptions.clear()}}/**
26
+ * @license
27
+ * Copyright 2021 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */class m extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}}class l extends g{constructor(t,i,e){super(i.context!==void 0?i.initialValue:e),this.onContextRequest=s=>{const n=s.composedPath()[0];s.context===this.context&&n!==this.host&&(s.stopPropagation(),this.addCallback(s.callback,n,s.subscribe))},this.onProviderRequest=s=>{const n=s.composedPath()[0];if(s.context!==this.context||n===this.host)return;const r=new Set;for(const[h,{consumerHost:u}]of this.subscriptions)r.has(h)||(r.add(h),u.dispatchEvent(new v(this.context,h,!0)));s.stopPropagation()},this.host=t,i.context!==void 0?this.context=i.context:this.context=i,this.attachListeners(),this.host.addController(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new m(this.context))}}/**
30
+ * @license
31
+ * Copyright 2022 Google LLC
32
+ * SPDX-License-Identifier: BSD-3-Clause
33
+ */function C({context:o,subscribe:t}){return y({finisher:(i,e)=>{i.addInitializer(s=>{new _(s,{context:o,callback:n=>{s[e]=n},subscribe:t})})}})}const P="children",w="descriptor",L="container",O="context",E="layout",k="properties";class q{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,i){if(!this._container||!this._descriptor)return;const e=await c.pt.getInstance(this._container),s=new c.P(e).withId(this._descriptor.id);await e.actions(s,this._descriptor.type||c.ht()).dispatch(t,i)}}const R=o=>{const t={};return Object.keys(o).forEach(i=>{i.indexOf("css-")>-1&&(t[i]=o[i])}),t},D=(o,t)=>{const i=R(t);Object.entries(i).forEach(([e,s])=>{o.style.setProperty(e.replace("css-",""),s)})};var W=Object.defineProperty,$=Object.getOwnPropertyDescriptor,d=(o,t,i,e)=>{for(var s=e>1?void 0:e?$(t,i):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(s=(e?r(t,i,s):r(s))||s);return e&&s&&W(t,i,s),s};const j=o=>{class t extends o{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new l(this,w,void 0),this._childrenProvider=new l(this,P,[]),this._propertiesProvider=new l(this,k,{}),this._contextProvider=new l(this,O,{}),this._layoutProvider=new l(this,E,{}),this.actions=new q(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),c.pt.getInstance(this.container).then(async e=>{var n;const s=e.nodes.get(this.entry);if(s){this._propertyChangeListener=e.events.subscribe("components:properties-changed",(p,a)=>{s.id===a.node.id&&this._setProperties(a.node.attributes.properties)}),this._contextChangeListener=e.events.subscribe("components:context-changed",(p,a)=>{s.id===a.node.id&&this._setContext(a.node.attributes.context)}),this._layoutChangeListener=e.events.subscribe("components:layout-changed",(p,a)=>{s.id===a.node.id&&this._setLayout(a.node.attributes.layout)});const r="default";this._unmountNode=s.mount(this.container),this._setDescriptor(c.Et(s,r)),this._setProperties(s.attributes.properties),this._setContext(s.attributes.context),this._setLayout(this.layout);const h=s.getChildren(r).map(p=>c.Et(p));this._childrenProvider.setValue(h);const b=(await this.container.getAsync("componentResolver")).getComponent(((n=this.descriptor)==null?void 0:n.type)||"");b.then&&b.then(p=>{this.component=p.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),c.mapBranding(this.context,this.renderRoot.host),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),D(this.renderRoot.host,this.properties)}_setProperties(e){this._propertiesProvider.setValue(e),this.properties=e}_setContext(e){this._contextProvider.setValue(e),this.context=e}_setLayout(e){this._layoutProvider.setValue(e),this.layout=e}_setDescriptor(e){this.descriptor=e,this._descriptorProvider.setValue(e),this.actions.setDescriptor(e)}}return t.styles=[o.styles??[],c.i`
34
+ :host {
35
+ font-family: var(--font-family);
36
+ grid-column: span var(--width);
37
+ max-width: 100%;
38
+ overflow: hidden;
39
+ box-sizing: border-box;
40
+ display: block;
41
+ }
42
+ * {
43
+ box-sizing: border-box;
44
+ }
45
+ `],d([C({context:L}),c.n({attribute:!1})],t.prototype,"container",2),d([c.n()],t.prototype,"entry",2),d([c.t()],t.prototype,"descriptor",2),d([c.t()],t.prototype,"component",2),d([c.t()],t.prototype,"context",2),d([c.t()],t.prototype,"layout",2),d([c.t()],t.prototype,"properties",2),t};var H=Object.defineProperty,V=Object.getOwnPropertyDescriptor,z=(o,t,i,e)=>{for(var s=e>1?void 0:e?V(t,i):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(s=(e?r(t,i,s):r(s))||s);return e&&s&&H(t,i,s),s};const x=j(c.s);exports.WidgetHeaderComponent=class extends x{render(){return c.x` <div class="widget-header">
46
+ <div>
47
+ <h1>${this.properties.header}</h1>
48
+
49
+ ${this.properties.tagline?c.x`<p>${this.properties.tagline}</p>`:c.A}
50
+ </div>
51
+ </div>`}};exports.WidgetHeaderComponent.styles=[x.styles||[],c.i`
52
+ .widget-header {
53
+ background-color: var(--primary-color);
54
+ color: #fff;
55
+ height: 85px;
56
+ display: flex;
57
+ flex-direction: row;
58
+ align-items: center;
59
+ border-radius: var(--spacing-sm) var(--spacing-sm) 0px 0px;
60
+ padding: 0 var(--spacing-md);
61
+ }
62
+
63
+ h1 {
64
+ font-size: 1.2rem;
65
+ }
66
+
67
+ h1,
68
+ p {
69
+ margin: 0;
70
+ padding: 0;
71
+ }
72
+ `];exports.WidgetHeaderComponent=z([f("ace-widget-header")],exports.WidgetHeaderComponent);const I=exports.WidgetHeaderComponent;exports.default=I;
@@ -1,4 +1,3 @@
1
1
  import { Container } from '@webprovisions/platform';
2
2
  export declare const WidgetHeaderComponent: (container: Container) => Promise<void>;
3
3
  export default WidgetHeaderComponent;
4
- //# sourceMappingURL=widget-header-component.d.ts.map
@@ -1,8 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
- declare const WidgetElement: (new (...args: any[]) => import("@telia-ace/widget-runtime-flamingo/dist/mixins/widget-component.mixin").WidgetComponentInterface) & typeof LitElement;
2
+ declare const WidgetElement: (new (...args: any[]) => import("libs/runtime/src/mixins/widget-component.mixin").WidgetComponentInterface) & typeof LitElement;
3
3
  export declare class WidgetHeaderComponent extends WidgetElement {
4
4
  static styles: import("lit").CSSResultGroup[];
5
5
  render(): import("lit").TemplateResult<1>;
6
6
  }
7
7
  export default WidgetHeaderComponent;
8
- //# sourceMappingURL=widget-header.d.ts.map