@telia-ace/knowledge-widget-adapters 1.1.2-rc.0 → 1.1.2-rc.2

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.
@@ -4,7 +4,7 @@ export { FreeTextPlugin } from './free-text';
4
4
  export { LinkPlugin } from './link';
5
5
  export { PhonePlugin } from './phone';
6
6
  export { default as ContactMethodPlatform } from './platform';
7
- export type { Click as ContactMethodClick, ReactComponentImport } from './platform';
7
+ export type { Click as ContactMethodClick, ReactComponentImport, } from './platform';
8
8
  export { contactItemList, contactLink, ContactList, ContactMethod, Form as DefaultForm, useContactMethod, } from './ui';
9
9
  export type { ContactMethodType } from './ui';
10
10
  export { WebServicePlugin } from './web-service';
@@ -1,7 +1,7 @@
1
1
  export { default as Confirmation } from './confirmation';
2
2
  export { contactItemList, default as ContactList } from './contact-list';
3
3
  export { contactLink, default as ContactMethod } from './contact-method';
4
- export type { ContactMethodType, Props as ContactMethodProps } from './contact-method';
4
+ export type { ContactMethodType, Props as ContactMethodProps, } from './contact-method';
5
5
  export { default as Description } from './description';
6
6
  export { default as Form } from './form';
7
7
  export { default as useContactMethod } from './use-contact-method';
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=require("@emotion/react"),u=require("@emotion/styled"),n=require("@telia-ace/knowledge-widget-ui"),o=require("@telia-ace/widget-utilities"),d=require("./index-e5030373.js");require("react");require("@telia-ace/widget-forms");require("@telia-ace/knowledge-widget-core");const h=u(n.Html)`
2
- ${n.genericHtml}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=require("@emotion/react"),u=require("@emotion/styled"),n=require("@telia-ace/knowledge-widget-ui"),o=require("@telia-ace/widget-utilities"),d=require("./index-dd63627f.js");require("react");require("@telia-ace/widget-forms");require("@telia-ace/knowledge-widget-core");const h=u(n.Html)`
2
+ ${n.genericHtml}
3
3
 
4
- ${e=>{var t;return n.headingElement(e)("h1",l.css`
5
- font-weight: normal;
6
- font-size: ${(t=e.theme.fonts)==null?void 0:t.medium};
7
- `)}}
4
+ ${e=>{var t;return n.headingElement(e)("h1",l.css`
5
+ font-weight: normal;
6
+ font-size: ${(t=e.theme.fonts)==null?void 0:t.medium};
7
+ `)}}
8
8
  `,f=e=>{const{className:t,renderDefault:s=()=>{},body:{form:a},confirmation:r,htmlParseInstruction:m,disabled:c}=e;return r?i.jsx(h,{className:o.appendClassNames(t,"humany-contact-method-confirmation","humany-contact-method-email"),html:r,htmlParseInstruction:m}):a&&!c?i.jsx(d.Form,{...e,className:o.appendClassNames(t,"humany-contact-method-email")}):s()};exports.default=f;
@@ -3,21 +3,21 @@ import { css as l } from "@emotion/react";
3
3
  import c from "@emotion/styled";
4
4
  import { Html as f, genericHtml as d, headingElement as h } from "@telia-ace/knowledge-widget-ui";
5
5
  import { appendClassNames as r } from "@telia-ace/widget-utilities";
6
- import { F as p } from "./index-42994c22.mjs";
6
+ import { F as p } from "./index-d3757267.mjs";
7
7
  import "react";
8
8
  import "@telia-ace/widget-forms";
9
9
  import "@telia-ace/knowledge-widget-core";
10
10
  const u = c(f)`
11
- ${d}
11
+ ${d}
12
12
 
13
- ${(t) => {
13
+ ${(t) => {
14
14
  var m;
15
15
  return h(t)(
16
16
  "h1",
17
17
  l`
18
- font-weight: normal;
19
- font-size: ${(m = t.theme.fonts) == null ? void 0 : m.medium};
20
- `
18
+ font-weight: normal;
19
+ font-size: ${(m = t.theme.fonts) == null ? void 0 : m.medium};
20
+ `
21
21
  );
22
22
  }}
23
23
  `, E = (t) => {
@@ -2,7 +2,7 @@ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
2
  import i from "@emotion/styled";
3
3
  import { Html as l, genericHtml as s } from "@telia-ace/knowledge-widget-ui";
4
4
  import { appendClassNames as n } from "@telia-ace/widget-utilities";
5
- import { D as a } from "./index-42994c22.mjs";
5
+ import { D as a } from "./index-d3757267.mjs";
6
6
  import "@telia-ace/widget-forms";
7
7
  import "react";
8
8
  import "@telia-ace/knowledge-widget-core";
@@ -12,11 +12,23 @@ const D = ({
12
12
  description: t,
13
13
  body: { freetext: m },
14
14
  htmlParseInstruction: o
15
- }) => m ? /* @__PURE__ */ p("div", { className: n(e, "humany-contact-method-free-text"), children: [
16
- /* @__PURE__ */ r(d, { html: m, htmlParseInstruction: o }),
17
- t && /* @__PURE__ */ r(a, { html: t, htmlParseInstruction: o })
18
- ] }) : null, d = i(l)`
19
- ${s};
15
+ }) => m ? /* @__PURE__ */ p(
16
+ "div",
17
+ {
18
+ className: n(e, "humany-contact-method-free-text"),
19
+ children: [
20
+ /* @__PURE__ */ r(d, { html: m, htmlParseInstruction: o }),
21
+ t && /* @__PURE__ */ r(
22
+ a,
23
+ {
24
+ html: t,
25
+ htmlParseInstruction: o
26
+ }
27
+ )
28
+ ]
29
+ }
30
+ ) : null, d = i(l)`
31
+ ${s};
20
32
  `;
21
33
  export {
22
34
  D as default
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@emotion/styled"),n=require("@telia-ace/knowledge-widget-ui"),u=require("@telia-ace/widget-utilities"),o=require("./index-e5030373.js");require("@telia-ace/widget-forms");require("react");require("@telia-ace/knowledge-widget-core");require("@emotion/react");const c=({className:s,description:t,body:{freetext:r},htmlParseInstruction:i})=>r?e.jsxs("div",{className:u.appendClassNames(s,"humany-contact-method-free-text"),children:[e.jsx(d,{html:r,htmlParseInstruction:i}),t&&e.jsx(o.Description,{html:t,htmlParseInstruction:i})]}):null,d=l(n.Html)`
2
- ${n.genericHtml};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@emotion/styled"),n=require("@telia-ace/knowledge-widget-ui"),u=require("@telia-ace/widget-utilities"),o=require("./index-dd63627f.js");require("@telia-ace/widget-forms");require("react");require("@telia-ace/knowledge-widget-core");require("@emotion/react");const c=({className:s,description:t,body:{freetext:r},htmlParseInstruction:i})=>r?e.jsxs("div",{className:u.appendClassNames(s,"humany-contact-method-free-text"),children:[e.jsx(d,{html:r,htmlParseInstruction:i}),t&&e.jsx(o.Description,{html:t,htmlParseInstruction:i})]}):null,d=l(n.Html)`
2
+ ${n.genericHtml};
3
3
  `;exports.default=c;
@@ -10,7 +10,9 @@ import { css as C } from "@emotion/react";
10
10
  import f from "@emotion/styled";
11
11
  import { Paragraph as ee, headingElement as V, Html as te, genericHtml as ne, borderTabStyle as D, linkTabStyle as oe, StyledText as re, Link as ie, useComponent as ae, useRouteData as se, Typography as ce, SymbolBadge as le, ItemList as de, itemList as me, useContainer as he } from "@telia-ace/knowledge-widget-ui";
12
12
  const P = (t, e, n = !1) => t.getManyAsync("matchingClient", "router").then((r) => {
13
- const { formData: o } = new w(e.body.form).export(n), { router: c, matchingClient: i } = r, { params: a } = c.getRouteData();
13
+ const { formData: o } = new w(e.body.form).export(
14
+ n
15
+ ), { router: c, matchingClient: i } = r, { params: a } = c.getRouteData();
14
16
  return i.customRequest(
15
17
  `contactmethods/${e.id}${n ? "/validatedwithpayload" : ""}`,
16
18
  "POST",
@@ -21,12 +23,17 @@ const P = (t, e, n = !1) => t.getManyAsync("matchingClient", "router").then((r)
21
23
  }
22
24
  }
23
25
  );
24
- }), R = (t, e, n) => P(t, e).then((r) => n ? n(r) : r).then(({ ConfirmationText: r }) => r), y = (t, e) => P(t, e, !0).then((n) => ({
25
- valid: n.Validation.IsValid,
26
- errors: n.Validation.Errors,
27
- errorTypes: n.Validation.ErrorTypes
28
- })), T = (t, e) => P(t, e, !0).then(
29
- (n) => B.fromLegacyForm(e.id, n.ContactMethod.Form).get()
26
+ }), R = (t, e, n) => P(t, e).then((r) => n ? n(r) : r).then(({ ConfirmationText: r }) => r), y = (t, e) => P(t, e, !0).then(
27
+ (n) => ({
28
+ valid: n.Validation.IsValid,
29
+ errors: n.Validation.Errors,
30
+ errorTypes: n.Validation.ErrorTypes
31
+ })
32
+ ), T = (t, e) => P(t, e, !0).then(
33
+ (n) => B.fromLegacyForm(
34
+ e.id,
35
+ n.ContactMethod.Form
36
+ ).get()
30
37
  ), b = (t, e) => t.getAsync("matchingClient").then((n) => {
31
38
  n.completeContactMethod(e.id);
32
39
  });
@@ -34,7 +41,7 @@ function ue(t) {
34
41
  t.getAsync("contactMethods").then((e) => {
35
42
  e.create({
36
43
  clientName: "email.form",
37
- render: import("./email-form-component-ed964e9d.mjs"),
44
+ render: import("./email-form-component-b8869d13.mjs"),
38
45
  onEvaluate: (n) => T(t, n),
39
46
  onValidate: (n) => y(t, n),
40
47
  onSubmit: (n) => R(t, n),
@@ -42,7 +49,7 @@ function ue(t) {
42
49
  });
43
50
  });
44
51
  }
45
- const M = (t, e, n) => {
52
+ const E = (t, e, n) => {
46
53
  const { url: r, width: o, height: c } = e, i = n || {}, a = document.createElement("a");
47
54
  return a.href = r, a.search.replace("?", "").split("&").forEach((s) => {
48
55
  const [l, d] = s.split("=");
@@ -58,14 +65,14 @@ function pe(t) {
58
65
  const { title: r, body: o } = n, { form: c, guideId: i, confirmationFallback: a, ...s } = o;
59
66
  return c ? () => {
60
67
  } : (l) => {
61
- l.preventDefault(), M(r, s);
68
+ l.preventDefault(), E(r, s);
62
69
  };
63
70
  },
64
71
  onValidate: (n) => y(t, n),
65
72
  onComplete: (n) => b(t, n),
66
73
  onSubmit: (n) => {
67
74
  const { title: r, body: o } = n, { form: c, guideId: i, confirmationFallback: a, ...s } = o, l = new w(c).export().values;
68
- return M(r, s, l), a;
75
+ return E(r, s, l), a;
69
76
  }
70
77
  });
71
78
  });
@@ -74,7 +81,7 @@ function fe(t) {
74
81
  t.getAsync("contactMethods").then((e) => {
75
82
  e.create({
76
83
  clientName: "custom.freetext",
77
- render: import("./free-text-component-7b456d3b.mjs")
84
+ render: import("./free-text-component-35d4babb.mjs")
78
85
  });
79
86
  });
80
87
  }
@@ -248,28 +255,28 @@ class k {
248
255
  }
249
256
  }
250
257
  f(ee)`
251
- ${(t) => {
258
+ ${(t) => {
252
259
  var e;
253
260
  return V(t)(
254
261
  "h1",
255
262
  C`
256
- font-weight: normal;
257
- font-size: ${(e = t.theme.fonts) == null ? void 0 : e.medium};
258
- `
263
+ font-weight: normal;
264
+ font-size: ${(e = t.theme.fonts) == null ? void 0 : e.medium};
265
+ `
259
266
  );
260
267
  }}
261
268
  `;
262
269
  const ve = f(te)`
263
- ${ne}
264
- font-weight: 300;
265
- line-height: 1.5em;
266
- button:focus-visible {
267
- ${D};
268
- }
270
+ ${ne}
271
+ font-weight: 300;
272
+ line-height: 1.5em;
273
+ button:focus-visible {
274
+ ${D};
275
+ }
269
276
 
270
- a:focus-visible {
271
- ${oe};
272
- }
277
+ a:focus-visible {
278
+ ${oe};
279
+ }
273
280
  `, Ce = (t) => {
274
281
  const e = ae(t.clientName), {
275
282
  params: { contactCategory: n, guideCategory: r, phrase: o }
@@ -335,7 +342,7 @@ const ve = f(te)`
335
342
  children: [
336
343
  p && /* @__PURE__ */ m(le, { symbol: p }),
337
344
  u ? /* @__PURE__ */ I("div", { className: "humany-contact-link-rich-content", children: [
338
- /* @__PURE__ */ m(E, { children: l }),
345
+ /* @__PURE__ */ m(M, { children: l }),
339
346
  /* @__PURE__ */ m(
340
347
  ve,
341
348
  {
@@ -343,7 +350,7 @@ const ve = f(te)`
343
350
  htmlParseInstruction: N
344
351
  }
345
352
  )
346
- ] }) : /* @__PURE__ */ m(E, { children: l })
353
+ ] }) : /* @__PURE__ */ m(M, { children: l })
347
354
  ]
348
355
  }
349
356
  );
@@ -371,7 +378,7 @@ const ve = f(te)`
371
378
  color: ${(s = t.theme.colors) == null ? void 0 : s.text};
372
379
  }
373
380
  `;
374
- }, E = f(re)`
381
+ }, M = f(re)`
375
382
  line-height: ${(t) => {
376
383
  var e;
377
384
  return (e = t.theme.fonts) == null ? void 0 : e.large;
@@ -392,58 +399,58 @@ const ve = f(te)`
392
399
  `, Pe = (t) => {
393
400
  var e, n, r;
394
401
  return C`
395
- ${me(t)}
402
+ ${me(t)}
396
403
 
397
- > div {
398
- padding: ${(e = t.theme.sizes) == null ? void 0 : e.large};
404
+ > div {
405
+ padding: ${(e = t.theme.sizes) == null ? void 0 : e.large};
399
406
 
400
- ${V(t)(
407
+ ${V(t)(
401
408
  "h1",
402
409
  C`
403
- margin: 0;
404
- `
410
+ margin: 0;
411
+ `
405
412
  )}
406
- }
413
+ }
407
414
 
408
- > ul {
409
- &:not(:first-child) {
410
- border-top: ${t.theme.border};
411
- }
415
+ > ul {
416
+ &:not(:first-child) {
417
+ border-top: ${t.theme.border};
418
+ }
412
419
 
413
- > li {
414
- margin: 0;
415
- white-space: normal;
420
+ > li {
421
+ margin: 0;
422
+ white-space: normal;
416
423
 
417
- > a {
418
- overflow: hidden;
419
- }
424
+ > a {
425
+ overflow: hidden;
426
+ }
420
427
 
421
- &:first-child > a {
422
- border-radius: ${`${t.theme.borderRadius} ${t.theme.borderRadius} 0 0`};
423
- }
428
+ &:first-child > a {
429
+ border-radius: ${`${t.theme.borderRadius} ${t.theme.borderRadius} 0 0`};
430
+ }
424
431
 
425
- &:last-child:not(:first-child) > a {
426
- border-radius: ${`0 0 ${t.theme.borderRadius} ${t.theme.borderRadius}`};
427
- }
432
+ &:last-child:not(:first-child) > a {
433
+ border-radius: ${`0 0 ${t.theme.borderRadius} ${t.theme.borderRadius}`};
434
+ }
428
435
 
429
- &:not(:last-child) {
430
- border-bottom: ${t.theme.border};
431
- }
436
+ &:not(:last-child) {
437
+ border-bottom: ${t.theme.border};
438
+ }
432
439
 
433
- > div {
434
- padding: ${(n = t.theme.sizes) == null ? void 0 : n.large};
435
- }
436
- }
440
+ > div {
441
+ padding: ${(n = t.theme.sizes) == null ? void 0 : n.large};
442
+ }
437
443
  }
444
+ }
438
445
 
439
- @media (hover: hover) {
440
- a:hover {
441
- background-color: ${(r = t.theme.colors) == null ? void 0 : r.accent};
442
- }
446
+ @media (hover: hover) {
447
+ a:hover {
448
+ background-color: ${(r = t.theme.colors) == null ? void 0 : r.accent};
443
449
  }
450
+ }
444
451
  `;
445
452
  }, Ne = f(de)`
446
- ${(t) => Pe(t)}
453
+ ${(t) => Pe(t)}
447
454
  `, Le = ({
448
455
  contactMethods: t,
449
456
  children: e,
@@ -460,15 +467,31 @@ const ve = f(te)`
460
467
  header: a,
461
468
  className: Q(o, "humany-contact-list"),
462
469
  items: t,
463
- renderItem: c ? (s) => /* @__PURE__ */ m("li", { "data-contact-method": s.id, children: c(s, { action: i, dispatch: r, guideId: n }) }, s.id) : (s) => /* @__PURE__ */ m("li", { "data-contact-method": s.id, children: /* @__PURE__ */ m(
464
- Ce,
470
+ renderItem: c ? (s) => /* @__PURE__ */ m(
471
+ "li",
465
472
  {
466
- ...s,
467
- action: i,
468
- dispatch: r,
469
- guideId: n
470
- }
471
- ) }, s.id),
473
+ role: t.length === 1 ? "none" : void 0,
474
+ "data-contact-method": s.id,
475
+ children: c(s, { action: i, dispatch: r, guideId: n })
476
+ },
477
+ s.id
478
+ ) : (s) => /* @__PURE__ */ m(
479
+ "li",
480
+ {
481
+ role: t.length === 1 ? "none" : void 0,
482
+ "data-contact-method": s.id,
483
+ children: /* @__PURE__ */ m(
484
+ Ce,
485
+ {
486
+ ...s,
487
+ action: i,
488
+ dispatch: r,
489
+ guideId: n
490
+ }
491
+ )
492
+ },
493
+ s.id
494
+ ),
472
495
  children: e
473
496
  }
474
497
  ) : null, L = (t, e) => {
@@ -1,20 +1,20 @@
1
- "use strict";var Y=Object.defineProperty;var Z=(t,e,n)=>e in t?Y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var N=(t,e,n)=>(Z(t,typeof e!="symbol"?e+"":e,n),n);const C=require("@telia-ace/widget-forms"),S=require("@telia-ace/knowledge-widget-core"),$=require("@telia-ace/widget-utilities"),k=require("react"),u=require("react/jsx-runtime"),w=require("@emotion/react"),p=require("@emotion/styled"),m=require("@telia-ace/knowledge-widget-ui"),A=(t,e,n=!1)=>t.getManyAsync("matchingClient","router").then(r=>{const{formData:o}=new C.FormReader(e.body.form).export(n),{router:c,matchingClient:i}=r,{params:s}=c.getRouteData();return i.customRequest(`contactmethods/${e.id}${n?"/validatedwithpayload":""}`,"POST",{body:o,configuration:{guideId:e.body.guideId||s.guideId}})}),M=(t,e,n)=>A(t,e).then(r=>n?n(r):r).then(({ConfirmationText:r})=>r),y=(t,e)=>A(t,e,!0).then(n=>({valid:n.Validation.IsValid,errors:n.Validation.Errors,errorTypes:n.Validation.ErrorTypes})),j=(t,e)=>A(t,e,!0).then(n=>C.FormBuilder.fromLegacyForm(e.id,n.ContactMethod.Form).get()),b=(t,e)=>t.getAsync("matchingClient").then(n=>{n.completeContactMethod(e.id)});function q(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"email.form",render:Promise.resolve().then(()=>require("./email-form-component-c6fab51f.js")),onEvaluate:n=>j(t,n),onValidate:n=>y(t,n),onSubmit:n=>M(t,n),onComplete:n=>b(t,n)})})}const L=(t,e,n)=>{const{url:r,width:o,height:c}=e,i=n||{},s=document.createElement("a");return s.href=r,s.search.replace("?","").split("&").forEach(a=>{const[l,d]=a.split("=");typeof d<"u"&&(i[l]=d)}),s.search=Object.keys(i).map(a=>`${a}=${i[a]}`).join("&"),window.open(s.href,t,`width=${o},height=${c}`),""};function D(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"chat.popup",render:"email.form",handleClick:n=>{const{title:r,body:o}=n,{form:c,guideId:i,confirmationFallback:s,...a}=o;return c?()=>{}:l=>{l.preventDefault(),L(r,a)}},onValidate:n=>y(t,n),onComplete:n=>b(t,n),onSubmit:n=>{const{title:r,body:o}=n,{form:c,guideId:i,confirmationFallback:s,...a}=o,l=new C.FormReader(c).export().values;return L(r,a,l),s}})})}function F(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.freetext",render:Promise.resolve().then(()=>require("./free-text-component-91478595.js"))})})}function V(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.link",render:Promise.resolve().then(()=>require("./link-component-6fbdc8fb.js"))})})}function z(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"phone.text",render:Promise.resolve().then(()=>require("./phone-component-ebf50e0d.js"))})})}const _=async(t,e)=>{const n=t.get(e.clientName);let{description:r,disabled:o,onClick:c}=e;if(n){const{handleClick:i,handleDescription:s,handleDisabled:a}=n;typeof i=="function"&&(c=await Promise.resolve(i(e))),typeof s=="function"&&(r=await Promise.resolve(s(e))),typeof a=="function"&&(o=await Promise.resolve(a(e)))}return Promise.resolve({...e,description:r,disabled:o,onClick:c})};class x{constructor(e,n){N(this,"adapters",new Map);N(this,"subs",[]);if(this.container=e,this.componentPlatform=n,n){n.components().ofType("contact-list").select().actions.watch("contact-list.fetched",async(i,s)=>{const{contactMethods:a}=i;if(a){const l=Promise.all(a.map(d=>this.handleAdapters(d)));await Promise.resolve(l).then(d=>{i.contactMethods=d})}return s(i)});const o=n.components().ofType("guide").select();o.actions.watch("guide.fetched",async(i,s)=>{const{contactMethods:a}=i;if(a){const l=Promise.all(a.map(d=>this.handleAdapters(d)));await Promise.resolve(l).then(d=>{i.contactMethods=d})}return s(i)}),o.actions.watch("guide.handover",async(i,s)=>{const{handoverContactMethods:a}=i;if(a){const l=Promise.all(a.map(d=>this.handleAdapters(d)));await Promise.resolve(l).then(d=>{i.handoverContactMethods=d})}return s(i)}),n.components().ofType("contact-method").select().actions.watch("contact-method.fetched",async(i,s)=>{const{contactMethod:a}=i;return a?this.handleAdapters(a).then(l=>s({...i,contactMethod:l})):s(i)})}}static create(e){return S.ComponentPlatform.getInstance(e).then(n=>new x(e,n))}handleAdapters(e){return _(this.adapters,e)}static getInstance(e,n="contactMethods"){return $.lock(e)(()=>e.getAsync(n).then(r=>{let o=r;return o||S.ComponentPlatform.getInstance(e).then(c=>(o=new x(e,c),e.registerAsync(n,()=>o),o))}))}track(e={},n){const{events:r}=this.container.get("$widget");r.dispatch("tracking:service-client-response",{type:n,data:e})}complete(e){const{id:n,title:r,clientName:o,expanded:c,body:i}=e;this.track({contactMethod:{id:n,title:r,expanded:c,type:o},hasGuide:!!i.guideId},"contact-method-complete");const s=this.adapters.get(o);if(s&&s.onComplete)return s.onComplete(e)}evaluate(e){const{clientName:n}=e,r=this.adapters.get(n);return r&&r.onEvaluate?Promise.resolve(r.onEvaluate(e)):Promise.resolve(e.body.form)}validate(e){const{id:n,title:r,clientName:o}=e,c=this.adapters.get(o);return c&&c.onValidate?Promise.resolve(c.onValidate(e)).then(i=>{this.track({contactMethod:{id:n,title:r,type:o},isValid:i.valid},"contact-method-validate");const{events:s}=this.container.get("$widget");return s.dispatch("form:validated",{isValid:i.valid}),i}):Promise.resolve({valid:!0})}submit(e){const{clientName:n}=e,r=this.adapters.get(n);return r&&r.onSubmit?Promise.resolve(r.onSubmit(e)).then(o=>(this.complete(e),o)):Promise.resolve("")}create(e){const{clientName:n,render:r}=e;return this.adapters.set(n,{onValidate:o=>y(this.container,o),onEvaluate:o=>j(this.container,o),onComplete:o=>b(this.container,o),...e}),this.container.getAsync("componentResolver").then(o=>{typeof r=="string"?this.subs.push(o.registerAlias(n,r)):this.subs.push(o.registerComponent(n,k.lazy(()=>r)))})}dispose(){this.subs.forEach(e=>e())}}p(m.Paragraph)`
2
- ${t=>{var e;return m.headingElement(t)("h1",w.css`
3
- font-weight: normal;
4
- font-size: ${(e=t.theme.fonts)==null?void 0:e.medium};
5
- `)}}
1
+ "use strict";var Y=Object.defineProperty;var Z=(t,e,n)=>e in t?Y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var N=(t,e,n)=>(Z(t,typeof e!="symbol"?e+"":e,n),n);const C=require("@telia-ace/widget-forms"),S=require("@telia-ace/knowledge-widget-core"),$=require("@telia-ace/widget-utilities"),k=require("react"),u=require("react/jsx-runtime"),w=require("@emotion/react"),p=require("@emotion/styled"),m=require("@telia-ace/knowledge-widget-ui"),A=(t,e,n=!1)=>t.getManyAsync("matchingClient","router").then(r=>{const{formData:o}=new C.FormReader(e.body.form).export(n),{router:c,matchingClient:i}=r,{params:s}=c.getRouteData();return i.customRequest(`contactmethods/${e.id}${n?"/validatedwithpayload":""}`,"POST",{body:o,configuration:{guideId:e.body.guideId||s.guideId}})}),j=(t,e,n)=>A(t,e).then(r=>n?n(r):r).then(({ConfirmationText:r})=>r),y=(t,e)=>A(t,e,!0).then(n=>({valid:n.Validation.IsValid,errors:n.Validation.Errors,errorTypes:n.Validation.ErrorTypes})),I=(t,e)=>A(t,e,!0).then(n=>C.FormBuilder.fromLegacyForm(e.id,n.ContactMethod.Form).get()),b=(t,e)=>t.getAsync("matchingClient").then(n=>{n.completeContactMethod(e.id)});function q(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"email.form",render:Promise.resolve().then(()=>require("./email-form-component-2894c6fc.js")),onEvaluate:n=>I(t,n),onValidate:n=>y(t,n),onSubmit:n=>j(t,n),onComplete:n=>b(t,n)})})}const L=(t,e,n)=>{const{url:r,width:o,height:c}=e,i=n||{},s=document.createElement("a");return s.href=r,s.search.replace("?","").split("&").forEach(a=>{const[l,d]=a.split("=");typeof d<"u"&&(i[l]=d)}),s.search=Object.keys(i).map(a=>`${a}=${i[a]}`).join("&"),window.open(s.href,t,`width=${o},height=${c}`),""};function D(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"chat.popup",render:"email.form",handleClick:n=>{const{title:r,body:o}=n,{form:c,guideId:i,confirmationFallback:s,...a}=o;return c?()=>{}:l=>{l.preventDefault(),L(r,a)}},onValidate:n=>y(t,n),onComplete:n=>b(t,n),onSubmit:n=>{const{title:r,body:o}=n,{form:c,guideId:i,confirmationFallback:s,...a}=o,l=new C.FormReader(c).export().values;return L(r,a,l),s}})})}function F(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.freetext",render:Promise.resolve().then(()=>require("./free-text-component-4177eff1.js"))})})}function V(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.link",render:Promise.resolve().then(()=>require("./link-component-6fbdc8fb.js"))})})}function z(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"phone.text",render:Promise.resolve().then(()=>require("./phone-component-ebf50e0d.js"))})})}const _=async(t,e)=>{const n=t.get(e.clientName);let{description:r,disabled:o,onClick:c}=e;if(n){const{handleClick:i,handleDescription:s,handleDisabled:a}=n;typeof i=="function"&&(c=await Promise.resolve(i(e))),typeof s=="function"&&(r=await Promise.resolve(s(e))),typeof a=="function"&&(o=await Promise.resolve(a(e)))}return Promise.resolve({...e,description:r,disabled:o,onClick:c})};class x{constructor(e,n){N(this,"adapters",new Map);N(this,"subs",[]);if(this.container=e,this.componentPlatform=n,n){n.components().ofType("contact-list").select().actions.watch("contact-list.fetched",async(i,s)=>{const{contactMethods:a}=i;if(a){const l=Promise.all(a.map(d=>this.handleAdapters(d)));await Promise.resolve(l).then(d=>{i.contactMethods=d})}return s(i)});const o=n.components().ofType("guide").select();o.actions.watch("guide.fetched",async(i,s)=>{const{contactMethods:a}=i;if(a){const l=Promise.all(a.map(d=>this.handleAdapters(d)));await Promise.resolve(l).then(d=>{i.contactMethods=d})}return s(i)}),o.actions.watch("guide.handover",async(i,s)=>{const{handoverContactMethods:a}=i;if(a){const l=Promise.all(a.map(d=>this.handleAdapters(d)));await Promise.resolve(l).then(d=>{i.handoverContactMethods=d})}return s(i)}),n.components().ofType("contact-method").select().actions.watch("contact-method.fetched",async(i,s)=>{const{contactMethod:a}=i;return a?this.handleAdapters(a).then(l=>s({...i,contactMethod:l})):s(i)})}}static create(e){return S.ComponentPlatform.getInstance(e).then(n=>new x(e,n))}handleAdapters(e){return _(this.adapters,e)}static getInstance(e,n="contactMethods"){return $.lock(e)(()=>e.getAsync(n).then(r=>{let o=r;return o||S.ComponentPlatform.getInstance(e).then(c=>(o=new x(e,c),e.registerAsync(n,()=>o),o))}))}track(e={},n){const{events:r}=this.container.get("$widget");r.dispatch("tracking:service-client-response",{type:n,data:e})}complete(e){const{id:n,title:r,clientName:o,expanded:c,body:i}=e;this.track({contactMethod:{id:n,title:r,expanded:c,type:o},hasGuide:!!i.guideId},"contact-method-complete");const s=this.adapters.get(o);if(s&&s.onComplete)return s.onComplete(e)}evaluate(e){const{clientName:n}=e,r=this.adapters.get(n);return r&&r.onEvaluate?Promise.resolve(r.onEvaluate(e)):Promise.resolve(e.body.form)}validate(e){const{id:n,title:r,clientName:o}=e,c=this.adapters.get(o);return c&&c.onValidate?Promise.resolve(c.onValidate(e)).then(i=>{this.track({contactMethod:{id:n,title:r,type:o},isValid:i.valid},"contact-method-validate");const{events:s}=this.container.get("$widget");return s.dispatch("form:validated",{isValid:i.valid}),i}):Promise.resolve({valid:!0})}submit(e){const{clientName:n}=e,r=this.adapters.get(n);return r&&r.onSubmit?Promise.resolve(r.onSubmit(e)).then(o=>(this.complete(e),o)):Promise.resolve("")}create(e){const{clientName:n,render:r}=e;return this.adapters.set(n,{onValidate:o=>y(this.container,o),onEvaluate:o=>I(this.container,o),onComplete:o=>b(this.container,o),...e}),this.container.getAsync("componentResolver").then(o=>{typeof r=="string"?this.subs.push(o.registerAlias(n,r)):this.subs.push(o.registerComponent(n,k.lazy(()=>r)))})}dispose(){this.subs.forEach(e=>e())}}p(m.Paragraph)`
2
+ ${t=>{var e;return m.headingElement(t)("h1",w.css`
3
+ font-weight: normal;
4
+ font-size: ${(e=t.theme.fonts)==null?void 0:e.medium};
5
+ `)}}
6
6
  `;const O=p(m.Html)`
7
- ${m.genericHtml}
8
- font-weight: 300;
9
- line-height: 1.5em;
10
- button:focus-visible {
11
- ${m.borderTabStyle};
12
- }
7
+ ${m.genericHtml}
8
+ font-weight: 300;
9
+ line-height: 1.5em;
10
+ button:focus-visible {
11
+ ${m.borderTabStyle};
12
+ }
13
13
 
14
- a:focus-visible {
15
- ${m.linkTabStyle};
16
- }
17
- `,H=t=>{const e=m.useComponent(t.clientName),{params:{contactCategory:n,guideCategory:r,phrase:o}}=m.useRouteData();if(typeof e>"u")return null;if(e===null)return process.env.NODE_ENV!=="production"?u.jsx(te,{title:`client-name: ${t.clientName}, id: ${t.id}`,className:"humany-non-resolved-contact-method",children:u.jsx(m.Typography,{variant:"h5",children:"Non resolved Contact Method type"})}):null;const c=(i={})=>{const s={...t,...i},{id:a,title:l,clientName:d,symbol:f,inline:P,onClick:v=()=>{},description:g,htmlParseInstruction:I,className:G,disabled:J,guideId:Q,dispatch:R=()=>{},expanded:E}=s,X=P?{onKeyDown:h=>{h.key&&h.key==="Enter"&&(v(h,s),h.defaultPrevented||!E&&R("expand",a))},onClick:h=>{v(h,s),h.defaultPrevented||!E&&R("expand",a)}}:{onClick:h=>v(h,s),routeName:"contact-method",params:$.createParams({contactCategory:n,guideId:Q,guideCategory:r,phrase:o,contactMethod:a,uriName:$.formatUrl(l)})};return u.jsxs(ee,{title:l,"aria-label":l,className:G,disabled:J,description:g,"data-client-name":d,...i,...X,children:[f&&u.jsx(m.SymbolBadge,{symbol:f}),g?u.jsxs("div",{className:"humany-contact-link-rich-content",children:[u.jsx(T,{children:l}),u.jsx(O,{html:g,htmlParseInstruction:I})]}):u.jsx(T,{children:l})]})};return t.expanded?u.jsx(k.Suspense,{fallback:null,children:u.jsx(e,{...t,renderDefault:c})}):c()},U=t=>{var e,n,r,o,c,i,s,a;return w.css`
14
+ a:focus-visible {
15
+ ${m.linkTabStyle};
16
+ }
17
+ `,H=t=>{const e=m.useComponent(t.clientName),{params:{contactCategory:n,guideCategory:r,phrase:o}}=m.useRouteData();if(typeof e>"u")return null;if(e===null)return process.env.NODE_ENV!=="production"?u.jsx(te,{title:`client-name: ${t.clientName}, id: ${t.id}`,className:"humany-non-resolved-contact-method",children:u.jsx(m.Typography,{variant:"h5",children:"Non resolved Contact Method type"})}):null;const c=(i={})=>{const s={...t,...i},{id:a,title:l,clientName:d,symbol:f,inline:P,onClick:v=()=>{},description:g,htmlParseInstruction:M,className:G,disabled:J,guideId:Q,dispatch:R=()=>{},expanded:E}=s,X=P?{onKeyDown:h=>{h.key&&h.key==="Enter"&&(v(h,s),h.defaultPrevented||!E&&R("expand",a))},onClick:h=>{v(h,s),h.defaultPrevented||!E&&R("expand",a)}}:{onClick:h=>v(h,s),routeName:"contact-method",params:$.createParams({contactCategory:n,guideId:Q,guideCategory:r,phrase:o,contactMethod:a,uriName:$.formatUrl(l)})};return u.jsxs(ee,{title:l,"aria-label":l,className:G,disabled:J,description:g,"data-client-name":d,...i,...X,children:[f&&u.jsx(m.SymbolBadge,{symbol:f}),g?u.jsxs("div",{className:"humany-contact-link-rich-content",children:[u.jsx(T,{children:l}),u.jsx(O,{html:g,htmlParseInstruction:M})]}):u.jsx(T,{children:l})]})};return t.expanded?u.jsx(k.Suspense,{fallback:null,children:u.jsx(e,{...t,renderDefault:c})}):c()},U=t=>{var e,n,r,o,c,i,s,a;return w.css`
18
18
  display: flex;
19
19
  padding: ${(e=t.theme.sizes)==null?void 0:e.large};
20
20
  ${t.description?"":"align-items: center;"}
@@ -46,52 +46,52 @@
46
46
  display: block;
47
47
  ${t=>{var e,n;return typeof((e=t.theme.colors)==null?void 0:e.warning)<"u"&&`color: ${(n=t.theme.colors)==null?void 0:n.warning};`}}
48
48
  `,W=t=>{var e,n,r;return w.css`
49
- ${m.itemList(t)}
49
+ ${m.itemList(t)}
50
50
 
51
- > div {
52
- padding: ${(e=t.theme.sizes)==null?void 0:e.large};
51
+ > div {
52
+ padding: ${(e=t.theme.sizes)==null?void 0:e.large};
53
53
 
54
- ${m.headingElement(t)("h1",w.css`
55
- margin: 0;
56
- `)}
57
- }
54
+ ${m.headingElement(t)("h1",w.css`
55
+ margin: 0;
56
+ `)}
57
+ }
58
58
 
59
- > ul {
60
- &:not(:first-child) {
61
- border-top: ${t.theme.border};
62
- }
59
+ > ul {
60
+ &:not(:first-child) {
61
+ border-top: ${t.theme.border};
62
+ }
63
63
 
64
- > li {
65
- margin: 0;
66
- white-space: normal;
64
+ > li {
65
+ margin: 0;
66
+ white-space: normal;
67
67
 
68
- > a {
69
- overflow: hidden;
70
- }
68
+ > a {
69
+ overflow: hidden;
70
+ }
71
71
 
72
- &:first-child > a {
73
- border-radius: ${`${t.theme.borderRadius} ${t.theme.borderRadius} 0 0`};
74
- }
72
+ &:first-child > a {
73
+ border-radius: ${`${t.theme.borderRadius} ${t.theme.borderRadius} 0 0`};
74
+ }
75
75
 
76
- &:last-child:not(:first-child) > a {
77
- border-radius: ${`0 0 ${t.theme.borderRadius} ${t.theme.borderRadius}`};
78
- }
76
+ &:last-child:not(:first-child) > a {
77
+ border-radius: ${`0 0 ${t.theme.borderRadius} ${t.theme.borderRadius}`};
78
+ }
79
79
 
80
- &:not(:last-child) {
81
- border-bottom: ${t.theme.border};
82
- }
80
+ &:not(:last-child) {
81
+ border-bottom: ${t.theme.border};
82
+ }
83
83
 
84
- > div {
85
- padding: ${(n=t.theme.sizes)==null?void 0:n.large};
86
- }
87
- }
84
+ > div {
85
+ padding: ${(n=t.theme.sizes)==null?void 0:n.large};
86
+ }
88
87
  }
88
+ }
89
89
 
90
- @media (hover: hover) {
91
- a:hover {
92
- background-color: ${(r=t.theme.colors)==null?void 0:r.accent};
93
- }
90
+ @media (hover: hover) {
91
+ a:hover {
92
+ background-color: ${(r=t.theme.colors)==null?void 0:r.accent};
94
93
  }
94
+ }
95
95
  `},ne=p(m.ItemList)`
96
- ${t=>W(t)}
97
- `,oe=({contactMethods:t,children:e,guideId:n,dispatch:r,className:o="",itemRenderer:c,action:i=()=>{},header:s=""})=>t.length?u.jsx(ne,{header:s,className:$.appendClassNames(o,"humany-contact-list"),items:t,renderItem:c?a=>u.jsx("li",{"data-contact-method":a.id,children:c(a,{action:i,dispatch:r,guideId:n})},a.id):a=>u.jsx("li",{"data-contact-method":a.id,children:u.jsx(H,{...a,action:i,dispatch:r,guideId:n})},a.id),children:e}):null,B=(t,e)=>{if(t.actionKey===e)return t;if(!t.properties)return null;const n=Object.keys(t.properties);let r;for(let o=0;o<n.length;o++)if(r=B(t.properties[n[o]],e),r)return r;return!1},re=({className:t,body:{form:e},id:n,action:r,dispatch:o,disabled:c,autoFocus:i})=>{if(e&&!c){const{schema:s,layout:a,data:l,meta:d}=e,f=o||r||(()=>{});return u.jsx(C.FormComponent,{className:t,schema:s,layout:a,data:l,autoFocus:i,onChange:(P,v)=>{const g={schema:s,layout:a,data:v,meta:d};P.toString()==="submit"?f("submit",{id:n,form:g}):B(s,P).evaluate?f("evaluate",{id:n,form:g}):f("validate",{id:n,form:g})}})}return null},ie=t=>{const[e,n]=k.useState(null),r=m.useContainer();return k.useEffect(()=>{let o;return r.getAsync("componentResolver").then(c=>{o=c.registerResolver(t,i=>n(i))}),()=>{o&&o()}},[t]),e};function K(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.webservice",render:"email.form",onValidate:n=>y(t,n),onComplete:n=>b(t,n),onSubmit:n=>M(t,n,r=>({...r,ConfirmationText:r.ResponseHtml}))})})}const se=(t,e,n)=>t.getAsync("contactMethods").then(r=>{r.create({clientName:e,render:"email.form",handleClick:()=>(o,c)=>{const{body:{form:i,guideId:s,confirmationFallback:a,...l}}=c;i||(o.preventDefault(),n(l))},onValidate:o=>y(t,o),onComplete:o=>b(t,o),onSubmit:o=>{const{body:{form:c,guideId:i,confirmationFallback:s,...a}}=o,{values:l}=new C.FormReader(c).export();return Promise.resolve(n(a,l)).then(d=>d||s)}})});class ae extends S.Plugin{constructor(e,n){super(e,n),this.widget.implementation.configure(o=>{o.plugin(q).plugin(D).plugin(F).plugin(z).plugin(K).plugin(V)})}}exports.ContactList=oe;exports.ContactMethod=H;exports.ContactMethodPlatform=x;exports.DefaultContactMethodsPlugin=ae;exports.Description=O;exports.Form=re;exports.chatPopupPlugin=D;exports.complete=b;exports.contactItemList=W;exports.contactLink=U;exports.createSubmitAdapter=se;exports.emailPlugin=q;exports.evaluate=j;exports.freeTextPlugin=F;exports.linkPlugin=V;exports.phonePlugin=z;exports.submit=M;exports.useContactMethod=ie;exports.validate=y;exports.webServicePlugin=K;
96
+ ${t=>W(t)}
97
+ `,oe=({contactMethods:t,children:e,guideId:n,dispatch:r,className:o="",itemRenderer:c,action:i=()=>{},header:s=""})=>t.length?u.jsx(ne,{header:s,className:$.appendClassNames(o,"humany-contact-list"),items:t,renderItem:c?a=>u.jsx("li",{role:t.length===1?"none":void 0,"data-contact-method":a.id,children:c(a,{action:i,dispatch:r,guideId:n})},a.id):a=>u.jsx("li",{role:t.length===1?"none":void 0,"data-contact-method":a.id,children:u.jsx(H,{...a,action:i,dispatch:r,guideId:n})},a.id),children:e}):null,B=(t,e)=>{if(t.actionKey===e)return t;if(!t.properties)return null;const n=Object.keys(t.properties);let r;for(let o=0;o<n.length;o++)if(r=B(t.properties[n[o]],e),r)return r;return!1},re=({className:t,body:{form:e},id:n,action:r,dispatch:o,disabled:c,autoFocus:i})=>{if(e&&!c){const{schema:s,layout:a,data:l,meta:d}=e,f=o||r||(()=>{});return u.jsx(C.FormComponent,{className:t,schema:s,layout:a,data:l,autoFocus:i,onChange:(P,v)=>{const g={schema:s,layout:a,data:v,meta:d};P.toString()==="submit"?f("submit",{id:n,form:g}):B(s,P).evaluate?f("evaluate",{id:n,form:g}):f("validate",{id:n,form:g})}})}return null},ie=t=>{const[e,n]=k.useState(null),r=m.useContainer();return k.useEffect(()=>{let o;return r.getAsync("componentResolver").then(c=>{o=c.registerResolver(t,i=>n(i))}),()=>{o&&o()}},[t]),e};function K(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.webservice",render:"email.form",onValidate:n=>y(t,n),onComplete:n=>b(t,n),onSubmit:n=>j(t,n,r=>({...r,ConfirmationText:r.ResponseHtml}))})})}const se=(t,e,n)=>t.getAsync("contactMethods").then(r=>{r.create({clientName:e,render:"email.form",handleClick:()=>(o,c)=>{const{body:{form:i,guideId:s,confirmationFallback:a,...l}}=c;i||(o.preventDefault(),n(l))},onValidate:o=>y(t,o),onComplete:o=>b(t,o),onSubmit:o=>{const{body:{form:c,guideId:i,confirmationFallback:s,...a}}=o,{values:l}=new C.FormReader(c).export();return Promise.resolve(n(a,l)).then(d=>d||s)}})});class ae extends S.Plugin{constructor(e,n){super(e,n),this.widget.implementation.configure(o=>{o.plugin(q).plugin(D).plugin(F).plugin(z).plugin(K).plugin(V)})}}exports.ContactList=oe;exports.ContactMethod=H;exports.ContactMethodPlatform=x;exports.DefaultContactMethodsPlugin=ae;exports.Description=O;exports.Form=re;exports.chatPopupPlugin=D;exports.complete=b;exports.contactItemList=W;exports.contactLink=U;exports.createSubmitAdapter=se;exports.emailPlugin=q;exports.evaluate=I;exports.freeTextPlugin=F;exports.linkPlugin=V;exports.phonePlugin=z;exports.submit=j;exports.useContactMethod=ie;exports.validate=y;exports.webServicePlugin=K;
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-e5030373.js");require("@telia-ace/widget-forms");require("@telia-ace/knowledge-widget-core");require("@telia-ace/widget-utilities");require("react");require("react/jsx-runtime");require("@emotion/react");require("@emotion/styled");require("@telia-ace/knowledge-widget-ui");exports.ChatPopupPlugin=t.chatPopupPlugin;exports.ContactList=t.ContactList;exports.ContactMethod=t.ContactMethod;exports.ContactMethodPlatform=t.ContactMethodPlatform;exports.DefaultContactMethodsPlugin=t.DefaultContactMethodsPlugin;exports.DefaultForm=t.Form;exports.EmailFormPlugin=t.emailPlugin;exports.FreeTextPlugin=t.freeTextPlugin;exports.LinkPlugin=t.linkPlugin;exports.PhonePlugin=t.phonePlugin;exports.WebServicePlugin=t.webServicePlugin;exports.contactItemList=t.contactItemList;exports.contactLink=t.contactLink;exports.createSubmitAdapter=t.createSubmitAdapter;exports.defaultComplete=t.complete;exports.defaultEvaluate=t.evaluate;exports.defaultSubmit=t.submit;exports.defaultValidate=t.validate;exports.useContactMethod=t.useContactMethod;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-dd63627f.js");require("@telia-ace/widget-forms");require("@telia-ace/knowledge-widget-core");require("@telia-ace/widget-utilities");require("react");require("react/jsx-runtime");require("@emotion/react");require("@emotion/styled");require("@telia-ace/knowledge-widget-ui");exports.ChatPopupPlugin=t.chatPopupPlugin;exports.ContactList=t.ContactList;exports.ContactMethod=t.ContactMethod;exports.ContactMethodPlatform=t.ContactMethodPlatform;exports.DefaultContactMethodsPlugin=t.DefaultContactMethodsPlugin;exports.DefaultForm=t.Form;exports.EmailFormPlugin=t.emailPlugin;exports.FreeTextPlugin=t.freeTextPlugin;exports.LinkPlugin=t.linkPlugin;exports.PhonePlugin=t.phonePlugin;exports.WebServicePlugin=t.webServicePlugin;exports.contactItemList=t.contactItemList;exports.contactLink=t.contactLink;exports.createSubmitAdapter=t.createSubmitAdapter;exports.defaultComplete=t.complete;exports.defaultEvaluate=t.evaluate;exports.defaultSubmit=t.submit;exports.defaultValidate=t.validate;exports.useContactMethod=t.useContactMethod;
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as r, C as p, d as c, e as d, k as P, F as f, h as g, i as C, l as h, p as b, w as F, a as L, b as M, j as k, f as v, g as S, s as x, v as D, u as E } from "./index-42994c22.mjs";
1
+ import { c as r, C as p, d as c, e as d, k as P, F as f, h as g, i as C, l as h, p as b, w as F, a as L, b as M, j as k, f as v, g as S, s as x, v as D, u as E } from "./index-d3757267.mjs";
2
2
  import "@telia-ace/widget-forms";
3
3
  import "@telia-ace/knowledge-widget-core";
4
4
  import "@telia-ace/widget-utilities";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-adapters",
3
- "version": "1.1.2-rc.0",
3
+ "version": "1.1.2-rc.2",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -11,11 +11,11 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@telia-ace/knowledge-serviceclient": "^1.0.31",
14
- "@telia-ace/knowledge-widget-core": "^1.1.2-rc.0",
15
- "@telia-ace/knowledge-widget-ui": "^1.1.2-rc.0",
16
- "@telia-ace/widget-forms": "^1.1.2-rc.0",
17
- "@telia-ace/widget-routing": "^1.1.2-rc.0",
18
- "@telia-ace/widget-utilities": "^1.1.2-rc.0",
14
+ "@telia-ace/knowledge-widget-core": "^1.1.2-rc.2",
15
+ "@telia-ace/knowledge-widget-ui": "^1.1.2-rc.2",
16
+ "@telia-ace/widget-forms": "^1.1.2-rc.2",
17
+ "@telia-ace/widget-routing": "^1.1.2-rc.2",
18
+ "@telia-ace/widget-utilities": "^1.1.2-rc.2",
19
19
  "@webprovisions/platform": "^1.1.4"
20
20
  },
21
21
  "peerDependencies": {