@telia-ace/knowledge-widget-adapters 1.0.30-next.5 → 1.0.30-next.6

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,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { ContactMethodProps } from '../ui';
3
3
  declare const EmailFormComponent: React.FC<ContactMethodProps>;
4
4
  export default EmailFormComponent;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { ContactMethodProps } from '../ui';
3
3
  declare const FreeTextComponent: React.FC<ContactMethodProps>;
4
4
  export default FreeTextComponent;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare type Props = {
3
3
  html: string;
4
4
  };
@@ -1,7 +1,10 @@
1
+ import { Theme } from '@emotion/react';
1
2
  import { DispatchAction } from '@telia-ace/knowledge-widget-ui';
2
3
  import React, { ReactNode } from 'react';
3
4
  import { ContactMethodType } from './contact-method';
4
- export declare const contactItemList: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
5
+ export declare const contactItemList: (p: {
6
+ theme: Theme;
7
+ }) => import("@emotion/utils").SerializedStyles;
5
8
  declare type Props = {
6
9
  contactMethods: ContactMethodType[];
7
10
  header?: string;
@@ -1,3 +1,4 @@
1
+ import { Theme } from '@emotion/react';
1
2
  import { Symbol } from '@telia-ace/knowledge-widget-core';
2
3
  import { DispatchAction, HtmlParseInstruction } from '@telia-ace/knowledge-widget-ui';
3
4
  import React from 'react';
@@ -34,6 +35,7 @@ export declare type Props = Merge<ContactMethodType, {
34
35
  }>;
35
36
  declare const ContactMethod: React.FC<Props>;
36
37
  export default ContactMethod;
37
- export declare const contactLink: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
38
- description?: string | undefined;
39
- }, any>>;
38
+ export declare const contactLink: (p: {
39
+ theme: Theme;
40
+ description?: string;
41
+ }) => import("@emotion/utils").SerializedStyles;
@@ -1,2 +1,5 @@
1
- declare const _default: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
1
+ /// <reference types="react" />
2
+ declare const _default: import("@emotion/styled").StyledComponent<any, {}, {
3
+ ref?: import("react").Ref<any> | undefined;
4
+ }>;
2
5
  export default _default;
@@ -0,0 +1,59 @@
1
+ var h = Object.defineProperty, u = Object.defineProperties;
2
+ var p = Object.getOwnPropertyDescriptors;
3
+ var r = Object.getOwnPropertySymbols;
4
+ var y = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
5
+ var a = (m, t, e) => t in m ? h(m, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[t] = e, n = (m, t) => {
6
+ for (var e in t || (t = {}))
7
+ y.call(t, e) && a(m, e, t[e]);
8
+ if (r)
9
+ for (var e of r(t))
10
+ E.call(t, e) && a(m, e, t[e]);
11
+ return m;
12
+ }, i = (m, t) => u(m, p(t));
13
+ import { css as N } from "@emotion/react";
14
+ import g from "@emotion/styled";
15
+ import { Html as F, genericHtml as H, headingElement as $ } from "@telia-ace/knowledge-widget-ui";
16
+ import { appendClassNames as l } from "@telia-ace/widget-utilities";
17
+ import s from "react";
18
+ import { F as b } from "./index.9dafde18.js";
19
+ import "@telia-ace/widget-forms";
20
+ import "@telia-ace/knowledge-widget-core";
21
+ const C = g(F)`
22
+ ${H}
23
+
24
+ ${(m) => {
25
+ var t;
26
+ return $(m)(
27
+ "h1",
28
+ N`
29
+ font-weight: normal;
30
+ font-size: ${(t = m.theme.fonts) == null ? void 0 : t.medium};
31
+ `
32
+ );
33
+ }}
34
+ `, k = (m) => {
35
+ const {
36
+ className: t,
37
+ renderDefault: e = () => {
38
+ },
39
+ body: { form: c },
40
+ confirmation: o,
41
+ htmlParseInstruction: f,
42
+ disabled: d
43
+ } = m;
44
+ return o ? /* @__PURE__ */ s.createElement(C, {
45
+ className: l(
46
+ t,
47
+ "humany-contact-method-confirmation",
48
+ "humany-contact-method-email"
49
+ ),
50
+ html: o,
51
+ htmlParseInstruction: f
52
+ }) : c && !d ? /* @__PURE__ */ s.createElement(b, i(n({}, m), {
53
+ className: l(t, "humany-contact-method-email")
54
+ })) : e();
55
+ };
56
+ export {
57
+ k as default
58
+ };
59
+ //# sourceMappingURL=email-form-component.2e371b74.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-form-component.2e371b74.js","sources":["../src/contact-methods/email/email-form-component.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport { genericHtml, headingElement, Html } from '@telia-ace/knowledge-widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport { ContactMethodProps, Form } from '../ui';\n\nconst StyledHtml = styled(Html)`\n ${genericHtml}\n\n ${(p) =>\n headingElement(p)(\n 'h1',\n css`\n font-weight: normal;\n font-size: ${p.theme.fonts?.medium};\n `\n )}\n`;\n\nconst EmailFormComponent: React.FC<ContactMethodProps> = (props) => {\n const {\n className,\n renderDefault = () => {},\n body: { form },\n confirmation,\n htmlParseInstruction,\n disabled,\n } = props;\n\n if (confirmation) {\n return (\n <StyledHtml\n className={appendClassNames(\n className,\n 'humany-contact-method-confirmation',\n 'humany-contact-method-email'\n )}\n html={confirmation}\n htmlParseInstruction={htmlParseInstruction}\n />\n );\n }\n\n if (form && !disabled) {\n return (\n <Form\n {...props}\n className={appendClassNames(className, 'humany-contact-method-email')}\n />\n );\n }\n\n return renderDefault();\n};\n\nexport default EmailFormComponent;\n"],"names":["StyledHtml","styled","Html","genericHtml","p","headingElement","css","_a","EmailFormComponent","props","className","renderDefault","form","confirmation","htmlParseInstruction","disabled","React","appendClassNames","Form","__spreadProps","__spreadValues"],"mappings":";;;;;;;;;;;;;;;;;;;;AAOA,MAAMA,IAAaC,EAAOC,CAAI;AAAA,MACxBC;AAAA;AAAA,MAEA,CAACC;;AACC,SAAAC,EAAeD,CAAC;AAAA,IACZ;AAAA,IACAE;AAAA;AAAA,8BAEiBC,IAAAH,EAAE,MAAM,UAAR,gBAAAG,EAAe;AAAA;AAAA,EAEpC;AAAA;AAAA,GAGFC,IAAmD,CAACC,MAAU;AAC1D,QAAA;AAAA,IACF,WAAAC;AAAA,IACA,eAAAC,IAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,MAAM,EAAE,MAAAC,EAAK;AAAA,IACb,cAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,UAAAC;AAAA,EACA,IAAAN;AAEJ,SAAII,IAEK,gBAAAG,EAAA,cAAAhB,GAAA;AAAA,IACG,WAAWiB;AAAA,MACPP;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,IACA,MAAMG;AAAA,IACN,sBAAAC;AAAA,EAAA,CACJ,IAIJF,KAAQ,CAACG,IAEJ,gBAAAC,EAAA,cAAAE,GAAAC,EAAAC,EAAA,IACOX,IADP;AAAA,IAEG,WAAWQ,EAAiBP,GAAW,6BAA6B;AAAA,EAAA,EACxE,IAIDC,EAAc;AACzB;"}
@@ -0,0 +1,28 @@
1
+ import l from "@emotion/styled";
2
+ import { Html as a, genericHtml as n } from "@telia-ace/knowledge-widget-ui";
3
+ import { appendClassNames as p } from "@telia-ace/widget-utilities";
4
+ import t from "react";
5
+ import { D as i } from "./index.9dafde18.js";
6
+ import "@telia-ace/widget-forms";
7
+ import "@telia-ace/knowledge-widget-core";
8
+ import "@emotion/react";
9
+ const x = ({
10
+ className: o,
11
+ description: e,
12
+ body: { freetext: m },
13
+ htmlParseInstruction: r
14
+ }) => m ? /* @__PURE__ */ t.createElement("div", {
15
+ className: p(o, "humany-contact-method-free-text")
16
+ }, /* @__PURE__ */ t.createElement(c, {
17
+ html: m,
18
+ htmlParseInstruction: r
19
+ }), e && /* @__PURE__ */ t.createElement(i, {
20
+ html: e,
21
+ htmlParseInstruction: r
22
+ })) : null, c = l(a)`
23
+ ${n};
24
+ `;
25
+ export {
26
+ x as default
27
+ };
28
+ //# sourceMappingURL=free-text-component.90a22252.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"free-text-component.90a22252.js","sources":["../src/contact-methods/free-text/free-text-component.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { genericHtml, Html } from '@telia-ace/knowledge-widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport { ContactMethodProps, Description } from '../ui';\n\nconst FreeTextComponent: React.FC<ContactMethodProps> = ({\n className,\n description,\n body: { freetext },\n htmlParseInstruction,\n}) => {\n if (!freetext) {\n return null;\n }\n return (\n <div className={appendClassNames(className, 'humany-contact-method-free-text')}>\n <StyledHtml html={freetext} htmlParseInstruction={htmlParseInstruction} />\n {description && (\n <Description html={description} htmlParseInstruction={htmlParseInstruction} />\n )}\n </div>\n );\n};\n\nexport default FreeTextComponent;\n\nconst StyledHtml = styled(Html)`\n ${genericHtml};\n`;\n"],"names":["FreeTextComponent","className","description","freetext","htmlParseInstruction","React","appendClassNames","StyledHtml","Description","styled","Html","genericHtml"],"mappings":";;;;;;;;AAMA,MAAMA,IAAkD,CAAC;AAAA,EACrD,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAM,EAAE,UAAAC,EAAS;AAAA,EACjB,sBAAAC;AACJ,MACSD,IAIA,gBAAAE,EAAA,cAAA,OAAA;AAAA,EAAI,WAAWC,EAAiBL,GAAW,iCAAiC;AAAA,GACxE,gBAAAI,EAAA,cAAAE,GAAA;AAAA,EAAW,MAAMJ;AAAA,EAAU,sBAAAC;AAA4C,CAAA,GACvEF,KACI,gBAAAG,EAAA,cAAAG,GAAA;AAAA,EAAY,MAAMN;AAAA,EAAa,sBAAAE;AAA4C,CAAA,CAEpF,IARO,MAcTG,IAAaE,EAAOC,CAAI;AAAA,MACxBC;AAAA;"}