@telia-ace/knowledge-widget-adapters 1.0.13 → 1.0.14

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.
Files changed (125) hide show
  1. package/{lib-esm → dist}/contact-methods/chat-popup/chat-popup-plugin.d.ts +0 -0
  2. package/{lib-esm → dist}/contact-methods/chat-popup/index.d.ts +0 -0
  3. package/{lib-esm → dist}/contact-methods/email/email-form-component.d.ts +0 -0
  4. package/{lib-esm → dist}/contact-methods/email/email-plugin.d.ts +0 -0
  5. package/{lib-esm → dist}/contact-methods/email/index.d.ts +0 -0
  6. package/{lib-esm → dist}/contact-methods/free-text/free-text-component.d.ts +0 -0
  7. package/{lib-esm → dist}/contact-methods/free-text/free-text-plugin.d.ts +0 -0
  8. package/{lib-esm → dist}/contact-methods/free-text/index.d.ts +0 -0
  9. package/{lib-esm → dist}/contact-methods/index.d.ts +0 -0
  10. package/{lib-esm → dist}/contact-methods/link/index.d.ts +0 -0
  11. package/{lib-esm → dist}/contact-methods/link/link-component.d.ts +0 -0
  12. package/{lib-esm → dist}/contact-methods/link/link-plugin.d.ts +0 -0
  13. package/{lib-esm → dist}/contact-methods/phone/index.d.ts +0 -0
  14. package/{lib-esm → dist}/contact-methods/phone/phone-component.d.ts +0 -0
  15. package/{lib-esm → dist}/contact-methods/phone/phone-plugin.d.ts +0 -0
  16. package/{lib-esm → dist}/contact-methods/platform.d.ts +0 -0
  17. package/{lib-esm → dist}/contact-methods/ui/confirmation.d.ts +0 -0
  18. package/{lib-esm → dist}/contact-methods/ui/contact-list.d.ts +0 -0
  19. package/{lib-esm → dist}/contact-methods/ui/contact-method.d.ts +0 -0
  20. package/{lib-esm → dist}/contact-methods/ui/description.d.ts +0 -0
  21. package/{lib-esm → dist}/contact-methods/ui/form.d.ts +0 -0
  22. package/{lib-esm → dist}/contact-methods/ui/index.d.ts +0 -0
  23. package/{lib-esm → dist}/contact-methods/ui/use-contact-method.d.ts +0 -0
  24. package/{lib-esm → dist}/contact-methods/web-service/index.d.ts +0 -0
  25. package/{lib-esm → dist}/contact-methods/web-service/web-service-plugin.d.ts +0 -0
  26. package/{lib-esm → dist}/create-adapter.d.ts +0 -0
  27. package/{lib-esm → dist}/default-contact-methods-plugin.d.ts +0 -0
  28. package/dist/email-form-component.js +63 -0
  29. package/dist/email-form-component.js.map +1 -0
  30. package/dist/free-text-component.js +31 -0
  31. package/dist/free-text-component.js.map +1 -0
  32. package/{lib-esm → dist}/index.d.ts +0 -0
  33. package/dist/index.js +8 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/index2.js +699 -0
  36. package/dist/index2.js.map +1 -0
  37. package/dist/link-component.js +16 -0
  38. package/dist/link-component.js.map +1 -0
  39. package/dist/phone-component.js +15 -0
  40. package/dist/phone-component.js.map +1 -0
  41. package/package.json +12 -13
  42. package/lib/contact-methods/chat-popup/chat-popup-plugin.d.ts +0 -2
  43. package/lib/contact-methods/chat-popup/chat-popup-plugin.js +0 -79
  44. package/lib/contact-methods/chat-popup/index.d.ts +0 -1
  45. package/lib/contact-methods/chat-popup/index.js +0 -8
  46. package/lib/contact-methods/email/email-form-component.d.ts +0 -4
  47. package/lib/contact-methods/email/email-form-component.js +0 -58
  48. package/lib/contact-methods/email/email-plugin.d.ts +0 -16
  49. package/lib/contact-methods/email/email-plugin.js +0 -83
  50. package/lib/contact-methods/email/index.d.ts +0 -1
  51. package/lib/contact-methods/email/index.js +0 -12
  52. package/lib/contact-methods/free-text/free-text-component.d.ts +0 -4
  53. package/lib/contact-methods/free-text/free-text-component.js +0 -49
  54. package/lib/contact-methods/free-text/free-text-plugin.d.ts +0 -2
  55. package/lib/contact-methods/free-text/free-text-plugin.js +0 -34
  56. package/lib/contact-methods/free-text/index.d.ts +0 -1
  57. package/lib/contact-methods/free-text/index.js +0 -8
  58. package/lib/contact-methods/index.d.ts +0 -10
  59. package/lib/contact-methods/index.js +0 -31
  60. package/lib/contact-methods/link/index.d.ts +0 -1
  61. package/lib/contact-methods/link/index.js +0 -8
  62. package/lib/contact-methods/link/link-component.d.ts +0 -4
  63. package/lib/contact-methods/link/link-component.js +0 -13
  64. package/lib/contact-methods/link/link-plugin.d.ts +0 -2
  65. package/lib/contact-methods/link/link-plugin.js +0 -34
  66. package/lib/contact-methods/phone/index.d.ts +0 -1
  67. package/lib/contact-methods/phone/index.js +0 -8
  68. package/lib/contact-methods/phone/phone-component.d.ts +0 -4
  69. package/lib/contact-methods/phone/phone-component.js +0 -12
  70. package/lib/contact-methods/phone/phone-plugin.d.ts +0 -2
  71. package/lib/contact-methods/phone/phone-plugin.js +0 -34
  72. package/lib/contact-methods/platform.d.ts +0 -50
  73. package/lib/contact-methods/platform.js +0 -273
  74. package/lib/contact-methods/ui/confirmation.d.ts +0 -6
  75. package/lib/contact-methods/ui/confirmation.js +0 -47
  76. package/lib/contact-methods/ui/contact-list.d.ts +0 -15
  77. package/lib/contact-methods/ui/contact-list.js +0 -61
  78. package/lib/contact-methods/ui/contact-method.d.ts +0 -39
  79. package/lib/contact-methods/ui/contact-method.js +0 -110
  80. package/lib/contact-methods/ui/description.d.ts +0 -2
  81. package/lib/contact-methods/ui/description.js +0 -13
  82. package/lib/contact-methods/ui/form.d.ts +0 -4
  83. package/lib/contact-methods/ui/form.js +0 -54
  84. package/lib/contact-methods/ui/index.d.ts +0 -7
  85. package/lib/contact-methods/ui/index.js +0 -20
  86. package/lib/contact-methods/ui/use-contact-method.d.ts +0 -2
  87. package/lib/contact-methods/ui/use-contact-method.js +0 -39
  88. package/lib/contact-methods/web-service/index.d.ts +0 -1
  89. package/lib/contact-methods/web-service/index.js +0 -8
  90. package/lib/contact-methods/web-service/web-service-plugin.d.ts +0 -2
  91. package/lib/contact-methods/web-service/web-service-plugin.js +0 -30
  92. package/lib/create-adapter.d.ts +0 -7
  93. package/lib/create-adapter.js +0 -43
  94. package/lib/default-contact-methods-plugin.d.ts +0 -8
  95. package/lib/default-contact-methods-plugin.js +0 -42
  96. package/lib/index.d.ts +0 -5
  97. package/lib/index.js +0 -25
  98. package/lib-esm/contact-methods/chat-popup/chat-popup-plugin.js +0 -76
  99. package/lib-esm/contact-methods/chat-popup/index.js +0 -1
  100. package/lib-esm/contact-methods/email/email-form-component.js +0 -33
  101. package/lib-esm/contact-methods/email/email-plugin.js +0 -52
  102. package/lib-esm/contact-methods/email/index.js +0 -1
  103. package/lib-esm/contact-methods/free-text/free-text-component.js +0 -21
  104. package/lib-esm/contact-methods/free-text/free-text-plugin.js +0 -8
  105. package/lib-esm/contact-methods/free-text/index.js +0 -1
  106. package/lib-esm/contact-methods/index.js +0 -8
  107. package/lib-esm/contact-methods/link/index.js +0 -1
  108. package/lib-esm/contact-methods/link/link-component.js +0 -11
  109. package/lib-esm/contact-methods/link/link-plugin.js +0 -8
  110. package/lib-esm/contact-methods/phone/index.js +0 -1
  111. package/lib-esm/contact-methods/phone/phone-component.js +0 -10
  112. package/lib-esm/contact-methods/phone/phone-plugin.js +0 -8
  113. package/lib-esm/contact-methods/platform.js +0 -270
  114. package/lib-esm/contact-methods/ui/confirmation.js +0 -22
  115. package/lib-esm/contact-methods/ui/contact-list.js +0 -32
  116. package/lib-esm/contact-methods/ui/contact-method.js +0 -81
  117. package/lib-esm/contact-methods/ui/description.js +0 -8
  118. package/lib-esm/contact-methods/ui/form.js +0 -49
  119. package/lib-esm/contact-methods/ui/index.js +0 -6
  120. package/lib-esm/contact-methods/ui/use-contact-method.js +0 -37
  121. package/lib-esm/contact-methods/web-service/index.js +0 -1
  122. package/lib-esm/contact-methods/web-service/web-service-plugin.js +0 -27
  123. package/lib-esm/create-adapter.js +0 -39
  124. package/lib-esm/default-contact-methods-plugin.js +0 -39
  125. package/lib-esm/index.js +0 -3
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,63 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { Html, genericHtml, headingElement } from "@telia-ace/knowledge-widget-ui";
21
+ import { appendClassNames } from "@telia-ace/widget-utilities";
22
+ import * as React from "react";
23
+ import styled, { css } from "styled-components";
24
+ import { F as Form } from "./index2.js";
25
+ import "@telia-ace/widget-forms";
26
+ import "@telia-ace/knowledge-widget-core";
27
+ const StyledHtml = styled(Html)`
28
+ ${genericHtml}
29
+
30
+ ${headingElement("h1", css`
31
+ font-weight: normal;
32
+ font-size: ${(p) => {
33
+ var _a;
34
+ return (_a = p.theme.fonts) == null ? void 0 : _a.medium;
35
+ }};
36
+ `)}
37
+ `;
38
+ const EmailFormComponent = (props) => {
39
+ const {
40
+ className,
41
+ renderDefault = () => {
42
+ },
43
+ body: { form },
44
+ confirmation,
45
+ htmlParseInstruction,
46
+ disabled
47
+ } = props;
48
+ if (confirmation) {
49
+ return /* @__PURE__ */ React.createElement(StyledHtml, {
50
+ className: appendClassNames(className, "humany-contact-method-confirmation", "humany-contact-method-email"),
51
+ html: confirmation,
52
+ htmlParseInstruction
53
+ });
54
+ }
55
+ if (form && !disabled) {
56
+ return /* @__PURE__ */ React.createElement(Form, __spreadProps(__spreadValues({}, props), {
57
+ className: appendClassNames(className, "humany-contact-method-email")
58
+ }));
59
+ }
60
+ return renderDefault();
61
+ };
62
+ export { EmailFormComponent as default };
63
+ //# sourceMappingURL=email-form-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-form-component.js","sources":["../src/contact-methods/email/email-form-component.tsx"],"sourcesContent":["import { genericHtml, headingElement, Html } from '@telia-ace/knowledge-widget-ui';\r\nimport { appendClassNames } from '@telia-ace/widget-utilities';\r\nimport * as React from 'react';\r\nimport styled, { css } from 'styled-components';\r\nimport { ContactMethodProps, Form } from '../ui';\r\n\r\nconst StyledHtml = styled(Html)`\r\n ${genericHtml}\r\n\r\n ${headingElement(\r\n 'h1',\r\n css`\r\n font-weight: normal;\r\n font-size: ${(p) => p.theme.fonts?.medium};\r\n `\r\n )}\r\n`;\r\n\r\nconst EmailFormComponent: React.FC<ContactMethodProps> = (props) => {\r\n const {\r\n className,\r\n renderDefault = () => {},\r\n body: { form },\r\n confirmation,\r\n htmlParseInstruction,\r\n disabled,\r\n } = props;\r\n\r\n if (confirmation) {\r\n return (\r\n <StyledHtml\r\n className={appendClassNames(\r\n className,\r\n 'humany-contact-method-confirmation',\r\n 'humany-contact-method-email'\r\n )}\r\n html={confirmation}\r\n htmlParseInstruction={htmlParseInstruction}\r\n />\r\n );\r\n }\r\n\r\n if (form && !disabled) {\r\n return (\r\n <Form\r\n {...props}\r\n className={appendClassNames(className, 'humany-contact-method-email')}\r\n />\r\n );\r\n }\r\n\r\n return renderDefault();\r\n};\r\n\r\nexport default EmailFormComponent;\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,aAAa,OAAO,IAAI;AAAA,MACxB;AAAA;AAAA,MAEA,eACE,MACA;AAAA;AAAA,yBAEiB,CAAC,MAAM;;AAAA,iBAAE,MAAM,UAAR,mBAAe;AAAA;AAAA,SAE3C;AAAA;AAGE,MAAA,qBAAmD,CAAC,UAAU;AAC1D,QAAA;AAAA,IACF;AAAA,IACA,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,MAAM,EAAE;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,MACA;AAEJ,MAAI,cAAc;AACd,WACK,sBAAA,cAAA,YAAA;AAAA,MACG,WAAW,iBACP,WACA,sCACA,6BACJ;AAAA,MACA,MAAM;AAAA,MACN;AAAA,IAAA,CACJ;AAAA,EAER;AAEI,MAAA,QAAQ,CAAC,UAAU;AACnB,WACK,sBAAA,cAAA,MAAA,iCACO,QADP;AAAA,MAEG,WAAW,iBAAiB,WAAW,6BAA6B;AAAA,IAAA,EACxE;AAAA,EAER;AAEA,SAAO,cAAc;AACzB;;"}
@@ -0,0 +1,31 @@
1
+ import { Html, genericHtml } from "@telia-ace/knowledge-widget-ui";
2
+ import { appendClassNames } from "@telia-ace/widget-utilities";
3
+ import * as React from "react";
4
+ import styled from "styled-components";
5
+ import { D as Description } from "./index2.js";
6
+ import "@telia-ace/widget-forms";
7
+ import "@telia-ace/knowledge-widget-core";
8
+ const FreeTextComponent = ({
9
+ className,
10
+ description,
11
+ body: { freetext },
12
+ htmlParseInstruction
13
+ }) => {
14
+ if (!freetext) {
15
+ return null;
16
+ }
17
+ return /* @__PURE__ */ React.createElement("div", {
18
+ className: appendClassNames(className, "humany-contact-method-free-text")
19
+ }, /* @__PURE__ */ React.createElement(StyledHtml, {
20
+ html: freetext,
21
+ htmlParseInstruction
22
+ }), description && /* @__PURE__ */ React.createElement(Description, {
23
+ html: description,
24
+ htmlParseInstruction
25
+ }));
26
+ };
27
+ const StyledHtml = styled(Html)`
28
+ ${genericHtml};
29
+ `;
30
+ export { FreeTextComponent as default };
31
+ //# sourceMappingURL=free-text-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"free-text-component.js","sources":["../src/contact-methods/free-text/free-text-component.tsx"],"sourcesContent":["import { genericHtml, Html } from '@telia-ace/knowledge-widget-ui';\r\nimport { appendClassNames } from '@telia-ace/widget-utilities';\r\nimport * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport { ContactMethodProps, Description } from '../ui';\r\n\r\nconst FreeTextComponent: React.SFC<ContactMethodProps> = ({\r\n className,\r\n description,\r\n body: { freetext },\r\n htmlParseInstruction,\r\n}) => {\r\n if (!freetext) {\r\n return null;\r\n }\r\n return (\r\n <div className={appendClassNames(className, 'humany-contact-method-free-text')}>\r\n <StyledHtml html={freetext} htmlParseInstruction={htmlParseInstruction} />\r\n {description && (\r\n <Description html={description} htmlParseInstruction={htmlParseInstruction} />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default FreeTextComponent;\r\n\r\nconst StyledHtml = styled(Html)`\r\n ${genericHtml};\r\n`;\r\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,oBAAmD,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA,MAAM,EAAE;AAAA,EACR;AAAA,MACE;AACF,MAAI,CAAC,UAAU;AACJ,WAAA;AAAA,EACX;AACA,SACK,sBAAA,cAAA,OAAA;AAAA,IAAI,WAAW,iBAAiB,WAAW,iCAAiC;AAAA,EAAA,GACxE,sBAAA,cAAA,YAAA;AAAA,IAAW,MAAM;AAAA,IAAU;AAAA,EAA4C,CAAA,GACvE,eACI,sBAAA,cAAA,aAAA;AAAA,IAAY,MAAM;AAAA,IAAa;AAAA,EAA4C,CAAA,CAEpF;AAER;AAIA,MAAM,aAAa,OAAO,IAAI;AAAA,MACxB;AAAA;;"}
File without changes
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export { c as ChatPopupPlugin, C as ContactList, d as ContactMethod, e as ContactMethodPlatform, k as DefaultContactMethodsPlugin, F as DefaultForm, h as EmailFormPlugin, i as FreeTextPlugin, l as LinkPlugin, p as PhonePlugin, w as WebServicePlugin, a as contactItemList, b as contactLink, j as createSubmitAdapter, f as defaultComplete, g as defaultEvaluate, s as defaultSubmit, v as defaultValidate, u as useContactMethod } from "./index2.js";
2
+ import "@telia-ace/widget-forms";
3
+ import "@telia-ace/knowledge-widget-core";
4
+ import "@telia-ace/widget-utilities";
5
+ import "react";
6
+ import "@telia-ace/knowledge-widget-ui";
7
+ import "styled-components";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}