@telia-ace/knowledge-widget-adapters 1.0.53 → 1.1.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/email-form-component-3389b2c8.js +8 -0
- package/email-form-component-9233b137.mjs +49 -0
- package/free-text-component-6a548f76.mjs +18 -0
- package/free-text-component-e504bf4d.js +3 -0
- package/index-1b0852e7.js +1854 -0
- package/index-9e0ae87d.mjs +12349 -0
- package/index.js +1 -0
- package/index.mjs +25 -0
- package/link-component-5818d79c.mjs +20 -0
- package/link-component-61f754b0.js +1 -0
- package/package.json +17 -38
- package/phone-component-687b4122.mjs +17 -0
- package/phone-component-6b11e8d6.js +1 -0
- package/LICENSE.txt +0 -6
- package/README.md +0 -3
- package/dist/email-form-component.fa2f8d54.js +0 -65
- package/dist/email-form-component.fa2f8d54.js.map +0 -1
- package/dist/free-text-component.692c762b.js +0 -20
- package/dist/free-text-component.692c762b.js.map +0 -1
- package/dist/index.5fee08c6.js +0 -578
- package/dist/index.5fee08c6.js.map +0 -1
- package/dist/index.js +0 -30
- package/dist/index.js.map +0 -1
- package/dist/link-component.484bbcf2.js +0 -18
- package/dist/link-component.484bbcf2.js.map +0 -1
- package/dist/phone-component.0c878514.js +0 -15
- package/dist/phone-component.0c878514.js.map +0 -1
- /package/{dist/contact-methods → contact-methods}/chat-popup/chat-popup-plugin.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/chat-popup/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/email/email-form-component.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/email/email-plugin.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/email/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/free-text/free-text-component.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/free-text/free-text-plugin.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/free-text/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/link/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/link/link-component.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/link/link-plugin.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/phone/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/phone/phone-component.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/phone/phone-plugin.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/platform.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/ui/confirmation.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/ui/contact-list.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/ui/contact-method.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/ui/description.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/ui/form.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/ui/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/ui/use-contact-method.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/web-service/index.d.ts +0 -0
- /package/{dist/contact-methods → contact-methods}/web-service/web-service-plugin.d.ts +0 -0
- /package/{dist/create-adapter.d.ts → create-adapter.d.ts} +0 -0
- /package/{dist/default-contact-methods-plugin.d.ts → default-contact-methods-plugin.d.ts} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-1b0852e7.js");require("react/jsx-runtime");require("react");require("react-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;
|
package/index.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { b as i, C as l, f as u, i as n, r as m, F as r, l as c, m as d, o as P, p as f, w as p, d as C, e as g, q as h, j as b, k as F, s as L, v as M, u as k } from "./index-9e0ae87d.mjs";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
export {
|
|
6
|
+
i as ChatPopupPlugin,
|
|
7
|
+
l as ContactList,
|
|
8
|
+
u as ContactMethod,
|
|
9
|
+
n as ContactMethodPlatform,
|
|
10
|
+
m as DefaultContactMethodsPlugin,
|
|
11
|
+
r as DefaultForm,
|
|
12
|
+
c as EmailFormPlugin,
|
|
13
|
+
d as FreeTextPlugin,
|
|
14
|
+
P as LinkPlugin,
|
|
15
|
+
f as PhonePlugin,
|
|
16
|
+
p as WebServicePlugin,
|
|
17
|
+
C as contactItemList,
|
|
18
|
+
g as contactLink,
|
|
19
|
+
h as createSubmitAdapter,
|
|
20
|
+
b as defaultComplete,
|
|
21
|
+
F as defaultEvaluate,
|
|
22
|
+
L as defaultSubmit,
|
|
23
|
+
M as defaultValidate,
|
|
24
|
+
k as useContactMethod
|
|
25
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { a as n } from "./index-9e0ae87d.mjs";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const l = ({
|
|
6
|
+
className: t,
|
|
7
|
+
body: o,
|
|
8
|
+
renderDefault: a = () => {
|
|
9
|
+
}
|
|
10
|
+
}) => {
|
|
11
|
+
const { uri: r, target: e, protocol: m } = o;
|
|
12
|
+
return a({
|
|
13
|
+
target: e,
|
|
14
|
+
className: n(t, "humany-contact-method-link"),
|
|
15
|
+
href: `${m}${r}`
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
l as default
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-1b0852e7.js");require("react/jsx-runtime");require("react");require("react-dom");const u=({className:e,body:r,renderDefault:t=()=>{}})=>{const{uri:n,target:o,protocol:a}=r;return t({target:o,className:i.appendClassNames(e,"humany-contact-method-link"),href:`${a}${n}`})};exports.default=u;
|
package/package.json
CHANGED
|
@@ -1,47 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-adapters",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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"
|
|
3
|
+
"version": "1.1.1-rc.1",
|
|
4
|
+
"main": "./index.js",
|
|
5
|
+
"types": "./index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./index.mjs",
|
|
9
|
+
"require": "./index.js"
|
|
10
|
+
}
|
|
21
11
|
},
|
|
22
|
-
"sideEffects": false,
|
|
23
12
|
"dependencies": {
|
|
24
|
-
"@telia-ace/knowledge-serviceclient": "1.0.
|
|
25
|
-
"@telia-ace/knowledge-widget-core": "1.
|
|
26
|
-
"@telia-ace/knowledge-widget-ui": "1.
|
|
27
|
-
"@telia-ace/widget-forms": "^1.
|
|
28
|
-
"@telia-ace/widget-routing": "^1.
|
|
29
|
-
"@telia-ace/widget-utilities": "^1.
|
|
13
|
+
"@telia-ace/knowledge-serviceclient": "^1.0.31",
|
|
14
|
+
"@telia-ace/knowledge-widget-core": "^1.1.1-rc.1",
|
|
15
|
+
"@telia-ace/knowledge-widget-ui": "^1.1.1-rc.1",
|
|
16
|
+
"@telia-ace/widget-forms": "^1.1.1-rc.1",
|
|
17
|
+
"@telia-ace/widget-routing": "^1.1.1-rc.1",
|
|
18
|
+
"@telia-ace/widget-utilities": "^1.1.1-rc.1",
|
|
30
19
|
"@webprovisions/platform": "^1.1.4"
|
|
31
20
|
},
|
|
32
21
|
"peerDependencies": {
|
|
33
|
-
"@emotion/react": "
|
|
34
|
-
"@emotion/styled": "
|
|
35
|
-
"react": "
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@emotion/react": "^11.11.1",
|
|
39
|
-
"@emotion/styled": "^11.11.0",
|
|
40
|
-
"@types/react": "^18.2.22",
|
|
41
|
-
"react": "^18.2.0"
|
|
42
|
-
},
|
|
43
|
-
"scripts": {
|
|
44
|
-
"clean": "rimraf ./dist",
|
|
45
|
-
"build": "rimraf ./dist && tsc -emitDeclarationOnly && vite build"
|
|
22
|
+
"@emotion/react": "11.11.1",
|
|
23
|
+
"@emotion/styled": "11.11.0",
|
|
24
|
+
"react": "18.2.0"
|
|
46
25
|
}
|
|
47
26
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { a as e } from "./index-9e0ae87d.mjs";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const s = ({
|
|
6
|
+
className: o,
|
|
7
|
+
body: { phoneNumber: t },
|
|
8
|
+
renderDefault: a = () => {
|
|
9
|
+
}
|
|
10
|
+
}) => a({
|
|
11
|
+
title: t,
|
|
12
|
+
className: e(o, "humany-contact-method-phone"),
|
|
13
|
+
href: `tel: ${t}`
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
s as default
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-1b0852e7.js");require("react/jsx-runtime");require("react");require("react-dom");const o=({className:t,body:{phoneNumber:e},renderDefault:r=()=>{}})=>r({title:e,className:n.appendClassNames(t,"humany-contact-method-phone"),href:`tel: ${e}`});exports.default=o;
|
package/LICENSE.txt
DELETED
package/README.md
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
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.5fee08c6.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(
|
|
45
|
-
C,
|
|
46
|
-
{
|
|
47
|
-
className: l(
|
|
48
|
-
t,
|
|
49
|
-
"humany-contact-method-confirmation",
|
|
50
|
-
"humany-contact-method-email"
|
|
51
|
-
),
|
|
52
|
-
html: o,
|
|
53
|
-
htmlParseInstruction: f
|
|
54
|
-
}
|
|
55
|
-
) : c && !d ? /* @__PURE__ */ s.createElement(
|
|
56
|
-
b,
|
|
57
|
-
i(n({}, m), {
|
|
58
|
-
className: l(t, "humany-contact-method-email")
|
|
59
|
-
})
|
|
60
|
-
) : e();
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
k as default
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=email-form-component.fa2f8d54.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email-form-component.fa2f8d54.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,IAEI,gBAAAG,EAAA;AAAA,IAAChB;AAAA,IAAA;AAAA,MACG,WAAWiB;AAAA,QACPP;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA,MACA,MAAMG;AAAA,MACN,sBAAAC;AAAA,IAAA;AAAA,EAAA,IAKRF,KAAQ,CAACG,IAEL,gBAAAC,EAAA;AAAA,IAACE;AAAA,IAAAC,EAAAC,EAAA,IACOX,IADP;AAAA,MAEG,WAAWQ,EAAiBP,GAAW,6BAA6B;AAAA,IAAA;AAAA,EAAA,IAKzEC,EAAc;AACzB;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
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.5fee08c6.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", { className: p(o, "humany-contact-method-free-text") }, /* @__PURE__ */ t.createElement(c, { html: m, htmlParseInstruction: r }), e && /* @__PURE__ */ t.createElement(i, { html: e, htmlParseInstruction: r })) : null, c = l(a)`
|
|
15
|
-
${n};
|
|
16
|
-
`;
|
|
17
|
-
export {
|
|
18
|
-
x as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=free-text-component.692c762b.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"free-text-component.692c762b.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","appendClassNames","React","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,oCAIA,OAAI,EAAA,WAAWE,EAAiBJ,GAAW,iCAAiC,KACxE,gBAAAK,EAAA,cAAAC,GAAA,EAAW,MAAMJ,GAAU,sBAAAC,EAAA,CAA4C,GACvEF,KACG,gBAAAI,EAAA,cAACE,KAAY,MAAMN,GAAa,sBAAAE,GAA4C,CAEpF,IARO,MAcTG,IAAaE,EAAOC,CAAI;AAAA,MACxBC;AAAA;"}
|