@telia-ace/knowledge-widget-adapters 1.1.1-rc.2 → 1.1.1-rc.3

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.
@@ -0,0 +1,97 @@
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
+ `)}}
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
+ }
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`
18
+ display: flex;
19
+ padding: ${(e=t.theme.sizes)==null?void 0:e.large};
20
+ ${t.description?"":"align-items: center;"}
21
+ text-decoration: none;
22
+ span {
23
+ display: inline-block;
24
+ color: ${(n=t.theme.colors)==null?void 0:n.text};
25
+ }
26
+ i {
27
+ font-size: ${(r=t.theme.fonts)==null?void 0:r.large};
28
+ margin: 0 ${(o=t.theme.sizes)==null?void 0:o.large} 0 0;
29
+ min-height: ${(c=t.theme.fonts)==null?void 0:c.large};
30
+ min-width: ${(i=t.theme.fonts)==null?void 0:i.large};
31
+ line-height: ${(s=t.theme.fonts)==null?void 0:s.large};
32
+ display: inline-block;
33
+ vertical-align: bottom;
34
+ color: ${(a=t.theme.colors)==null?void 0:a.text};
35
+ }
36
+ `},T=p(m.StyledText)`
37
+ line-height: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.large}};
38
+ `,ee=p(m.Link)`
39
+ ${t=>U(t)}
40
+
41
+ &:focus-visible {
42
+ ${m.borderTabStyle};
43
+ }
44
+ `,te=p.div`
45
+ text-align: center;
46
+ display: block;
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
+ `,W=t=>{var e,n,r;return w.css`
49
+ ${m.itemList(t)}
50
+
51
+ > div {
52
+ padding: ${(e=t.theme.sizes)==null?void 0:e.large};
53
+
54
+ ${m.headingElement(t)("h1",w.css`
55
+ margin: 0;
56
+ `)}
57
+ }
58
+
59
+ > ul {
60
+ &:not(:first-child) {
61
+ border-top: ${t.theme.border};
62
+ }
63
+
64
+ > li {
65
+ margin: 0;
66
+ white-space: normal;
67
+
68
+ > a {
69
+ overflow: hidden;
70
+ }
71
+
72
+ &:first-child > a {
73
+ border-radius: ${`${t.theme.borderRadius} ${t.theme.borderRadius} 0 0`};
74
+ }
75
+
76
+ &:last-child:not(:first-child) > a {
77
+ border-radius: ${`0 0 ${t.theme.borderRadius} ${t.theme.borderRadius}`};
78
+ }
79
+
80
+ &:not(:last-child) {
81
+ border-bottom: ${t.theme.border};
82
+ }
83
+
84
+ > div {
85
+ padding: ${(n=t.theme.sizes)==null?void 0:n.large};
86
+ }
87
+ }
88
+ }
89
+
90
+ @media (hover: hover) {
91
+ a:hover {
92
+ background-color: ${(r=t.theme.colors)==null?void 0:r.accent};
93
+ }
94
+ }
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;
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-ef2f6a78.js");require("react/jsx-runtime");require("@emotion/styled");require("@emotion/react");require("react");require("react-transition-group");require("react-dom");require("react-router-dom");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-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;
package/index.mjs CHANGED
@@ -1,29 +1,30 @@
1
- import { c as m, C as r, e as p, f as c, o as d, F as P, k as f, l as C, m as g, p as h, w as b, b as F, d as L, n as M, i as k, j as v, s as S, v as x, u as D } from "./index-36ce2709.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-42994c22.mjs";
2
+ import "@telia-ace/widget-forms";
3
+ import "@telia-ace/knowledge-widget-core";
4
+ import "@telia-ace/widget-utilities";
5
+ import "react";
2
6
  import "react/jsx-runtime";
3
- import "@emotion/styled";
4
7
  import "@emotion/react";
5
- import "react";
6
- import "react-transition-group";
7
- import "react-dom";
8
- import "react-router-dom";
8
+ import "@emotion/styled";
9
+ import "@telia-ace/knowledge-widget-ui";
9
10
  export {
10
- m as ChatPopupPlugin,
11
- r as ContactList,
12
- p as ContactMethod,
13
- c as ContactMethodPlatform,
14
- d as DefaultContactMethodsPlugin,
15
- P as DefaultForm,
16
- f as EmailFormPlugin,
11
+ r as ChatPopupPlugin,
12
+ p as ContactList,
13
+ c as ContactMethod,
14
+ d as ContactMethodPlatform,
15
+ P as DefaultContactMethodsPlugin,
16
+ f as DefaultForm,
17
+ g as EmailFormPlugin,
17
18
  C as FreeTextPlugin,
18
- g as LinkPlugin,
19
- h as PhonePlugin,
20
- b as WebServicePlugin,
21
- F as contactItemList,
22
- L as contactLink,
23
- M as createSubmitAdapter,
24
- k as defaultComplete,
25
- v as defaultEvaluate,
26
- S as defaultSubmit,
27
- x as defaultValidate,
28
- D as useContactMethod
19
+ h as LinkPlugin,
20
+ b as PhonePlugin,
21
+ F as WebServicePlugin,
22
+ L as contactItemList,
23
+ M as contactLink,
24
+ k as createSubmitAdapter,
25
+ v as defaultComplete,
26
+ S as defaultEvaluate,
27
+ x as defaultSubmit,
28
+ D as defaultValidate,
29
+ E as useContactMethod
29
30
  };
@@ -0,0 +1,17 @@
1
+ import { appendClassNames as s } from "@telia-ace/widget-utilities";
2
+ const c = ({
3
+ className: t,
4
+ body: o,
5
+ renderDefault: a = () => {
6
+ }
7
+ }) => {
8
+ const { uri: e, target: n, protocol: r } = o;
9
+ return a({
10
+ target: n,
11
+ className: s(t, "humany-contact-method-link"),
12
+ href: `${r}${e}`
13
+ });
14
+ };
15
+ export {
16
+ c as default
17
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@telia-ace/widget-utilities"),s=({className:t,body:e,renderDefault:o=()=>{}})=>{const{uri:n,target:r,protocol:a}=e;return o({target:r,className:i.appendClassNames(t,"humany-contact-method-link"),href:`${a}${n}`})};exports.default=s;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-adapters",
3
- "version": "1.1.1-rc.2",
3
+ "version": "1.1.1-rc.3",
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.1-rc.2",
15
- "@telia-ace/knowledge-widget-ui": "^1.1.1-rc.2",
16
- "@telia-ace/widget-forms": "^1.1.1-rc.2",
17
- "@telia-ace/widget-routing": "^1.1.1-rc.2",
18
- "@telia-ace/widget-utilities": "^1.1.1-rc.2",
14
+ "@telia-ace/knowledge-widget-core": "^1.1.1-rc.3",
15
+ "@telia-ace/knowledge-widget-ui": "^1.1.1-rc.3",
16
+ "@telia-ace/widget-forms": "^1.1.1-rc.3",
17
+ "@telia-ace/widget-routing": "^1.1.1-rc.3",
18
+ "@telia-ace/widget-utilities": "^1.1.1-rc.3",
19
19
  "@webprovisions/platform": "^1.1.4"
20
20
  },
21
21
  "peerDependencies": {
@@ -0,0 +1,14 @@
1
+ import { appendClassNames as a } from "@telia-ace/widget-utilities";
2
+ const s = ({
3
+ className: e,
4
+ body: { phoneNumber: t },
5
+ renderDefault: o = () => {
6
+ }
7
+ }) => o({
8
+ title: t,
9
+ className: a(e, "humany-contact-method-phone"),
10
+ href: `tel: ${t}`
11
+ });
12
+ export {
13
+ s as default
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@telia-ace/widget-utilities"),a=({className:t,body:{phoneNumber:e},renderDefault:o=()=>{}})=>o({title:e,className:n.appendClassNames(t,"humany-contact-method-phone"),href:`tel: ${e}`});exports.default=a;
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("@emotion/react"),l=require("@emotion/styled"),e=require("./index-ef2f6a78.js");require("react");require("react-dom");require("react-transition-group");require("react-router-dom");const u=l(e.Html)`
2
- ${e.genericHtml}
3
-
4
- ${t=>{var n;return e.headingElement(t)("h1",c.css`
5
- font-weight: normal;
6
- font-size: ${(n=t.theme.fonts)==null?void 0:n.medium};
7
- `)}}
8
- `,d=t=>{const{className:n,renderDefault:m=()=>{},body:{form:o},confirmation:r,htmlParseInstruction:s,disabled:i}=t;return r?a.jsx(u,{className:e.appendClassNames(n,"humany-contact-method-confirmation","humany-contact-method-email"),html:r,htmlParseInstruction:s}):o&&!i?a.jsx(e.Form,{...t,className:e.appendClassNames(n,"humany-contact-method-email")}):m()};exports.default=d;
@@ -1,53 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { css as l } from "@emotion/react";
3
- import c from "@emotion/styled";
4
- import { H as f, g as d, h, a as e, F as u } from "./index-36ce2709.mjs";
5
- import "react";
6
- import "react-dom";
7
- import "react-transition-group";
8
- import "react-router-dom";
9
- const p = c(f)`
10
- ${d}
11
-
12
- ${(t) => {
13
- var m;
14
- return h(t)(
15
- "h1",
16
- l`
17
- font-weight: normal;
18
- font-size: ${(m = t.theme.fonts) == null ? void 0 : m.medium};
19
- `
20
- );
21
- }}
22
- `, C = (t) => {
23
- const {
24
- className: m,
25
- renderDefault: n = () => {
26
- },
27
- body: { form: r },
28
- confirmation: o,
29
- htmlParseInstruction: s,
30
- disabled: i
31
- } = t;
32
- return o ? /* @__PURE__ */ a(
33
- p,
34
- {
35
- className: e(
36
- m,
37
- "humany-contact-method-confirmation",
38
- "humany-contact-method-email"
39
- ),
40
- html: o,
41
- htmlParseInstruction: s
42
- }
43
- ) : r && !i ? /* @__PURE__ */ a(
44
- u,
45
- {
46
- ...t,
47
- className: e(m, "humany-contact-method-email")
48
- }
49
- ) : n();
50
- };
51
- export {
52
- C as default
53
- };
@@ -1,3 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("@emotion/styled");require("@emotion/react");const e=require("./index-ef2f6a78.js");require("react");require("react-dom");require("react-transition-group");require("react-router-dom");const l=({className:s,description:t,body:{freetext:n},htmlParseInstruction:i})=>n?r.jsxs("div",{className:e.appendClassNames(s,"humany-contact-method-free-text"),children:[r.jsx(o,{html:n,htmlParseInstruction:i}),t&&r.jsx(e.Description,{html:t,htmlParseInstruction:i})]}):null,o=u(e.Html)`
2
- ${e.genericHtml};
3
- `;exports.default=l;
@@ -1,22 +0,0 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import a from "@emotion/styled";
3
- import "@emotion/react";
4
- import { a as l, D as p, H as i, g as n } from "./index-36ce2709.mjs";
5
- import "react";
6
- import "react-dom";
7
- import "react-transition-group";
8
- import "react-router-dom";
9
- const j = ({
10
- className: e,
11
- description: t,
12
- body: { freetext: m },
13
- htmlParseInstruction: o
14
- }) => m ? /* @__PURE__ */ s("div", { className: l(e, "humany-contact-method-free-text"), children: [
15
- /* @__PURE__ */ r(d, { html: m, htmlParseInstruction: o }),
16
- t && /* @__PURE__ */ r(p, { html: t, htmlParseInstruction: o })
17
- ] }) : null, d = a(i)`
18
- ${n};
19
- `;
20
- export {
21
- j as default
22
- };