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

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 (127) hide show
  1. package/LICENSE.txt +5 -5
  2. package/README.md +3 -3
  3. package/{lib-esm → dist}/contact-methods/chat-popup/chat-popup-plugin.d.ts +2 -2
  4. package/{lib → dist}/contact-methods/chat-popup/index.d.ts +1 -1
  5. package/{lib-esm → dist}/contact-methods/email/email-form-component.d.ts +4 -4
  6. package/{lib-esm → dist}/contact-methods/email/email-plugin.d.ts +16 -16
  7. package/{lib-esm → dist}/contact-methods/email/index.d.ts +1 -1
  8. package/{lib → dist}/contact-methods/free-text/free-text-component.d.ts +4 -4
  9. package/{lib → dist}/contact-methods/free-text/free-text-plugin.d.ts +2 -2
  10. package/{lib → dist}/contact-methods/free-text/index.d.ts +1 -1
  11. package/{lib → dist}/contact-methods/index.d.ts +10 -10
  12. package/{lib-esm → dist}/contact-methods/link/index.d.ts +1 -1
  13. package/{lib → dist}/contact-methods/link/link-component.d.ts +4 -4
  14. package/{lib → dist}/contact-methods/link/link-plugin.d.ts +2 -2
  15. package/{lib-esm → dist}/contact-methods/phone/index.d.ts +1 -1
  16. package/{lib → dist}/contact-methods/phone/phone-component.d.ts +4 -4
  17. package/{lib → dist}/contact-methods/phone/phone-plugin.d.ts +2 -2
  18. package/{lib-esm → dist}/contact-methods/platform.d.ts +50 -50
  19. package/{lib-esm → dist}/contact-methods/ui/confirmation.d.ts +6 -6
  20. package/{lib → dist}/contact-methods/ui/contact-list.d.ts +15 -15
  21. package/{lib → dist}/contact-methods/ui/contact-method.d.ts +39 -39
  22. package/{lib-esm → dist}/contact-methods/ui/description.d.ts +3 -2
  23. package/{lib-esm → dist}/contact-methods/ui/form.d.ts +4 -4
  24. package/{lib-esm → dist}/contact-methods/ui/index.d.ts +7 -7
  25. package/{lib-esm → dist}/contact-methods/ui/use-contact-method.d.ts +2 -2
  26. package/{lib-esm → dist}/contact-methods/web-service/index.d.ts +1 -1
  27. package/{lib-esm → dist}/contact-methods/web-service/web-service-plugin.d.ts +2 -2
  28. package/{lib-esm → dist}/create-adapter.d.ts +7 -7
  29. package/{lib-esm → dist}/default-contact-methods-plugin.d.ts +8 -8
  30. package/dist/email-form-component.js +63 -0
  31. package/dist/email-form-component.js.map +1 -0
  32. package/dist/free-text-component.js +31 -0
  33. package/dist/free-text-component.js.map +1 -0
  34. package/{lib-esm → dist}/index.d.ts +5 -5
  35. package/dist/index.js +8 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/index2.js +699 -0
  38. package/dist/index2.js.map +1 -0
  39. package/dist/link-component.js +16 -0
  40. package/dist/link-component.js.map +1 -0
  41. package/dist/phone-component.js +15 -0
  42. package/dist/phone-component.js.map +1 -0
  43. package/package.json +14 -15
  44. package/lib/contact-methods/chat-popup/chat-popup-plugin.d.ts +0 -2
  45. package/lib/contact-methods/chat-popup/chat-popup-plugin.js +0 -79
  46. package/lib/contact-methods/chat-popup/index.js +0 -8
  47. package/lib/contact-methods/email/email-form-component.d.ts +0 -4
  48. package/lib/contact-methods/email/email-form-component.js +0 -58
  49. package/lib/contact-methods/email/email-plugin.d.ts +0 -16
  50. package/lib/contact-methods/email/email-plugin.js +0 -83
  51. package/lib/contact-methods/email/index.d.ts +0 -1
  52. package/lib/contact-methods/email/index.js +0 -12
  53. package/lib/contact-methods/free-text/free-text-component.js +0 -49
  54. package/lib/contact-methods/free-text/free-text-plugin.js +0 -34
  55. package/lib/contact-methods/free-text/index.js +0 -8
  56. package/lib/contact-methods/index.js +0 -31
  57. package/lib/contact-methods/link/index.d.ts +0 -1
  58. package/lib/contact-methods/link/index.js +0 -8
  59. package/lib/contact-methods/link/link-component.js +0 -13
  60. package/lib/contact-methods/link/link-plugin.js +0 -34
  61. package/lib/contact-methods/phone/index.d.ts +0 -1
  62. package/lib/contact-methods/phone/index.js +0 -8
  63. package/lib/contact-methods/phone/phone-component.js +0 -12
  64. package/lib/contact-methods/phone/phone-plugin.js +0 -34
  65. package/lib/contact-methods/platform.d.ts +0 -50
  66. package/lib/contact-methods/platform.js +0 -273
  67. package/lib/contact-methods/ui/confirmation.d.ts +0 -6
  68. package/lib/contact-methods/ui/confirmation.js +0 -47
  69. package/lib/contact-methods/ui/contact-list.js +0 -61
  70. package/lib/contact-methods/ui/contact-method.js +0 -110
  71. package/lib/contact-methods/ui/description.d.ts +0 -2
  72. package/lib/contact-methods/ui/description.js +0 -13
  73. package/lib/contact-methods/ui/form.d.ts +0 -4
  74. package/lib/contact-methods/ui/form.js +0 -54
  75. package/lib/contact-methods/ui/index.d.ts +0 -7
  76. package/lib/contact-methods/ui/index.js +0 -20
  77. package/lib/contact-methods/ui/use-contact-method.d.ts +0 -2
  78. package/lib/contact-methods/ui/use-contact-method.js +0 -39
  79. package/lib/contact-methods/web-service/index.d.ts +0 -1
  80. package/lib/contact-methods/web-service/index.js +0 -8
  81. package/lib/contact-methods/web-service/web-service-plugin.d.ts +0 -2
  82. package/lib/contact-methods/web-service/web-service-plugin.js +0 -30
  83. package/lib/create-adapter.d.ts +0 -7
  84. package/lib/create-adapter.js +0 -43
  85. package/lib/default-contact-methods-plugin.d.ts +0 -8
  86. package/lib/default-contact-methods-plugin.js +0 -42
  87. package/lib/index.d.ts +0 -5
  88. package/lib/index.js +0 -25
  89. package/lib-esm/contact-methods/chat-popup/chat-popup-plugin.js +0 -76
  90. package/lib-esm/contact-methods/chat-popup/index.d.ts +0 -1
  91. package/lib-esm/contact-methods/chat-popup/index.js +0 -1
  92. package/lib-esm/contact-methods/email/email-form-component.js +0 -33
  93. package/lib-esm/contact-methods/email/email-plugin.js +0 -52
  94. package/lib-esm/contact-methods/email/index.js +0 -1
  95. package/lib-esm/contact-methods/free-text/free-text-component.d.ts +0 -4
  96. package/lib-esm/contact-methods/free-text/free-text-component.js +0 -21
  97. package/lib-esm/contact-methods/free-text/free-text-plugin.d.ts +0 -2
  98. package/lib-esm/contact-methods/free-text/free-text-plugin.js +0 -8
  99. package/lib-esm/contact-methods/free-text/index.d.ts +0 -1
  100. package/lib-esm/contact-methods/free-text/index.js +0 -1
  101. package/lib-esm/contact-methods/index.d.ts +0 -10
  102. package/lib-esm/contact-methods/index.js +0 -8
  103. package/lib-esm/contact-methods/link/index.js +0 -1
  104. package/lib-esm/contact-methods/link/link-component.d.ts +0 -4
  105. package/lib-esm/contact-methods/link/link-component.js +0 -11
  106. package/lib-esm/contact-methods/link/link-plugin.d.ts +0 -2
  107. package/lib-esm/contact-methods/link/link-plugin.js +0 -8
  108. package/lib-esm/contact-methods/phone/index.js +0 -1
  109. package/lib-esm/contact-methods/phone/phone-component.d.ts +0 -4
  110. package/lib-esm/contact-methods/phone/phone-component.js +0 -10
  111. package/lib-esm/contact-methods/phone/phone-plugin.d.ts +0 -2
  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.d.ts +0 -15
  116. package/lib-esm/contact-methods/ui/contact-list.js +0 -32
  117. package/lib-esm/contact-methods/ui/contact-method.d.ts +0 -39
  118. package/lib-esm/contact-methods/ui/contact-method.js +0 -81
  119. package/lib-esm/contact-methods/ui/description.js +0 -8
  120. package/lib-esm/contact-methods/ui/form.js +0 -49
  121. package/lib-esm/contact-methods/ui/index.js +0 -6
  122. package/lib-esm/contact-methods/ui/use-contact-method.js +0 -37
  123. package/lib-esm/contact-methods/web-service/index.js +0 -1
  124. package/lib-esm/contact-methods/web-service/web-service-plugin.js +0 -27
  125. package/lib-esm/create-adapter.js +0 -39
  126. package/lib-esm/default-contact-methods-plugin.js +0 -39
  127. package/lib-esm/index.js +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index2.js","sources":["../src/contact-methods/email/email-plugin.ts","../src/contact-methods/chat-popup/chat-popup-plugin.ts","../src/contact-methods/free-text/free-text-plugin.ts","../src/contact-methods/link/link-plugin.tsx","../src/contact-methods/phone/phone-plugin.ts","../src/contact-methods/platform.ts","../src/contact-methods/ui/confirmation.tsx","../src/contact-methods/ui/description.tsx","../src/contact-methods/ui/contact-method.tsx","../src/contact-methods/ui/contact-list.tsx","../src/contact-methods/ui/form.tsx","../src/contact-methods/ui/use-contact-method.ts","../src/contact-methods/web-service/web-service-plugin.ts","../src/create-adapter.ts","../src/default-contact-methods-plugin.ts"],"sourcesContent":["import {\n ContactMethodApiResponse,\n ServiceClient,\n SubmissionApiResult,\n} from '@telia-ace/knowledge-serviceclient';\nimport { FormBuilder, FormReader } from '@telia-ace/widget-forms';\nimport { RoutingService } from '@telia-ace/widget-routing';\nimport { Container } from '@webprovisions/platform';\nimport ContactMethodPlatform from '../platform';\nimport { ContactMethodType } from '../ui';\n\ntype Services = {\n matchingClient: ServiceClient;\n router: RoutingService;\n};\n\nconst post = (container: Container, contactMethod: ContactMethodType, validate = false) =>\n container.getManyAsync('matchingClient', 'router').then((services) => {\n const { formData } = new FormReader(contactMethod.body.form).export(validate);\n const { router, matchingClient } = services as Services;\n const { params } = router.getRouteData();\n\n return matchingClient.customRequest(\n `contactmethods/${contactMethod.id}${validate ? '/validatedwithpayload' : ''}`,\n 'POST',\n {\n body: formData,\n configuration: {\n guideId: contactMethod.body.guideId || params.guideId,\n },\n }\n );\n });\n\nexport const submit = (\n container: Container,\n contactMethod: ContactMethodType,\n transform?: (response: any) => SubmissionApiResult\n) =>\n post(container, contactMethod)\n .then((response) => (transform ? transform(response) : response))\n .then(({ ConfirmationText }: SubmissionApiResult) => ConfirmationText);\n\nexport const validate = (container: Container, contactMethod: ContactMethodType) =>\n post(container, contactMethod, true).then((result: ContactMethodApiResponse) => ({\n valid: result.Validation.IsValid,\n errors: result.Validation.Errors,\n errorTypes: result.Validation.ErrorTypes,\n }));\n\nexport const evaluate = (container: Container, contactMethod: ContactMethodType) =>\n post(container, contactMethod, true).then((result: ContactMethodApiResponse) =>\n FormBuilder.fromLegacyForm(contactMethod.id, result.ContactMethod.Form).get()\n );\n\nexport const complete = (container: Container, contactMethod: ContactMethodType) =>\n container.getAsync('matchingClient').then((matchingClient) => {\n matchingClient.completeContactMethod(contactMethod.id);\n });\n\nexport default function emailPlugin(container: Container) {\n container.getAsync('contactMethods').then((platform: ContactMethodPlatform) => {\n platform.create({\n clientName: 'email.form',\n render: import('./email-form-component'),\n onEvaluate: (contactMethod) => evaluate(container, contactMethod),\n onValidate: (contactMethod) => validate(container, contactMethod),\n onSubmit: (contactMethod) => submit(container, contactMethod),\n onComplete: (contactMethod) => complete(container, contactMethod),\n });\n });\n}\n","import { FormReader } from '@telia-ace/widget-forms';\nimport { Container } from '@webprovisions/platform';\nimport { ContactMethodPlatform, defaultValidate } from '..';\nimport { defaultComplete } from '../email';\n\nconst popup = (\n title: string,\n settings: { [key: string]: any },\n formValues?: { [key: string]: any }\n) => {\n const { url, width, height } = settings;\n\n const queries: { [key: string]: any } = formValues ? formValues : {};\n\n const link = document.createElement('a');\n link.href = url;\n\n link.search\n .replace('?', '')\n .split('&')\n .forEach((part) => {\n const [key, value] = part.split('=');\n typeof value !== 'undefined' && (queries[key] = value);\n });\n\n link.search = Object.keys(queries)\n .map((key) => `${key}=${queries[key]}`)\n .join('&');\n\n window.open(link.href, title, `width=${width},height=${height}`);\n return '';\n};\n\nexport default function chatPopupPlugin(container: Container) {\n container.getAsync('contactMethods').then((platform: ContactMethodPlatform) => {\n platform.create({\n clientName: 'chat.popup',\n render: 'email.form',\n handleClick: (contactMethod) => {\n const { title, body } = contactMethod;\n const { form, guideId, confirmationFallback, ...rest } = body;\n\n if (!form) {\n return (e) => {\n e.preventDefault();\n popup(title, rest);\n };\n }\n\n return () => {};\n },\n onValidate: (contactMethod) => defaultValidate(container, contactMethod),\n onComplete: (contactMethod) => defaultComplete(container, contactMethod),\n onSubmit: (contactMethod) => {\n const { title, body } = contactMethod;\n const { form, guideId, confirmationFallback, ...rest } = body;\n\n const formValues = new FormReader(form).export().values;\n\n popup(title, rest, formValues);\n\n return confirmationFallback;\n },\n });\n });\n}\n","import { Container } from '@webprovisions/platform';\nimport ContactMethodPlatform from '../platform';\n\nexport default function freeTextPlugin(container: Container) {\n container.getAsync('contactMethods').then((platform: ContactMethodPlatform) => {\n platform.create({\n clientName: 'custom.freetext',\n render: import('./free-text-component'),\n });\n });\n}\n","import { Container } from '@webprovisions/platform';\nimport ContactMethodPlatform from '../platform';\n\nexport default function linkPlugin(container: Container) {\n container.getAsync('contactMethods').then((platform: ContactMethodPlatform) => {\n platform.create({\n clientName: 'custom.link',\n render: import('./link-component'),\n });\n });\n}\n","import { Container } from '@webprovisions/platform';\nimport ContactMethodPlatform from '../platform';\n\nexport default function phonePlugin(container: Container) {\n container.getAsync('contactMethods').then((platform: ContactMethodPlatform) => {\n platform.create({\n clientName: 'phone.text',\n render: import('./phone-component'),\n });\n });\n}\n","import { ComponentPlatform, ComponentResolver } from '@telia-ace/knowledge-widget-core';\nimport { Form } from '@telia-ace/widget-forms';\nimport { lock } from '@telia-ace/widget-utilities';\nimport { Container, EventSubscriptionCancellation, Widget } from '@webprovisions/platform';\nimport React, { lazy } from 'react';\nimport { defaultComplete, defaultEvaluate, defaultValidate } from './email';\nimport { ContactMethodProps } from './ui';\n\nexport type ReactComponentImport = Promise<{ default: React.FunctionComponent<any> }>;\n\nexport type Click = (e: React.MouseEvent, cm: ContactMethodProps) => void;\n\nexport type AdapterSettings = {\n clientName: string;\n render: string | ReactComponentImport;\n handleDescription?: (cm: ContactMethodProps) => Promise<string> | string;\n handleDisabled?: (cm: ContactMethodProps) => Promise<boolean> | boolean;\n handleClick?: (cm: ContactMethodProps) => Promise<Click> | Click;\n onEvaluate?: (cm: ContactMethodProps) => Promise<Form> | Form;\n onValidate?: (cm: ContactMethodProps) => Promise<ValidationResult> | ValidationResult;\n onSubmit?: (cm: ContactMethodProps) => Promise<string> | string;\n onComplete?: (cm: ContactMethodProps) => Promise<void> | void;\n};\n\nexport type ValidationResult = {\n errors?: { [key: string]: string };\n errorTypes?: { [key: string]: string };\n valid: boolean;\n};\n\nexport enum ContactMethodTrackTypes {\n ContactMethodValidate = 'contact-method-validate',\n ContactMethodComplete = 'contact-method-complete',\n}\n\nconst handleContactMethod = async (\n adapters: Map<string, AdapterSettings>,\n contactMethod: ContactMethodProps\n): Promise<ContactMethodProps> => {\n const adapter = adapters.get(contactMethod.clientName);\n let { description, disabled, onClick } = contactMethod;\n\n if (adapter) {\n const { handleClick, handleDescription, handleDisabled } = adapter;\n if (typeof handleClick === 'function') {\n onClick = await Promise.resolve(handleClick(contactMethod));\n }\n\n if (typeof handleDescription === 'function') {\n description = await Promise.resolve(handleDescription(contactMethod));\n }\n\n if (typeof handleDisabled === 'function') {\n disabled = await Promise.resolve(handleDisabled(contactMethod));\n }\n }\n\n return Promise.resolve({\n ...contactMethod,\n description,\n disabled,\n onClick,\n });\n};\n\nclass ContactMethodPlatform {\n private adapters: Map<string, AdapterSettings> = new Map();\n private subs: EventSubscriptionCancellation[] = [];\n\n static create(container: Container): Promise<ContactMethodPlatform> {\n return ComponentPlatform.getInstance(container).then((platform) => {\n return new ContactMethodPlatform(container, platform);\n });\n }\n\n constructor(private container: Container, private componentPlatform: ComponentPlatform) {\n if (componentPlatform) {\n const contactListComponent = componentPlatform\n .components()\n .ofType('contact-list')\n .select();\n contactListComponent.actions.watch('contact-list.fetched', async (input, next) => {\n const { contactMethods } = input;\n\n if (contactMethods) {\n const promises = Promise.all(\n contactMethods.map((cm: ContactMethodProps) =>\n handleContactMethod(this.adapters, cm)\n )\n );\n\n await Promise.resolve(promises).then((contactMethods) => {\n input.contactMethods = contactMethods;\n });\n }\n\n return next(input);\n });\n\n const guideComponent = componentPlatform.components().ofType('guide').select();\n guideComponent.actions.watch('guide.fetched', async (input, next) => {\n const { contactMethods } = input;\n\n if (contactMethods) {\n const promises = Promise.all(\n contactMethods.map((cm: ContactMethodProps) =>\n handleContactMethod(this.adapters, cm)\n )\n );\n\n await Promise.resolve(promises).then((contactMethods) => {\n input.contactMethods = contactMethods;\n });\n }\n\n return next(input);\n });\n guideComponent.actions.watch('guide.handover', async (input, next) => {\n const { handoverContactMethods } = input;\n\n if (handoverContactMethods) {\n const promises = Promise.all(\n handoverContactMethods.map((cm: ContactMethodProps) =>\n handleContactMethod(this.adapters, cm)\n )\n );\n\n await Promise.resolve(promises).then((handoverContactMethods) => {\n input.handoverContactMethods = handoverContactMethods;\n });\n }\n\n return next(input);\n });\n\n const contactMethodComponent = componentPlatform\n .components()\n .ofType('contact-method')\n .select();\n contactMethodComponent.actions.watch('contact-method.fetched', async (input, next) => {\n const { contactMethod } = input;\n\n if (contactMethod) {\n return handleContactMethod(this.adapters, contactMethod).then(\n (contactMethod) => {\n return next({ ...input, contactMethod });\n }\n );\n }\n\n return next(input);\n });\n }\n }\n\n static getInstance(\n container: Container,\n key: string = 'contactMethods'\n ): Promise<ContactMethodPlatform> {\n return lock(container)(() => {\n return container.getAsync(key).then((value: ContactMethodPlatform) => {\n let contactMethodPlatform = value;\n if (!contactMethodPlatform) {\n return ComponentPlatform.getInstance(container).then((components) => {\n contactMethodPlatform = new ContactMethodPlatform(container, components);\n container.registerAsync(key, () => contactMethodPlatform);\n return contactMethodPlatform;\n });\n }\n return contactMethodPlatform;\n });\n });\n }\n\n private track(data: any = {}, type: ContactMethodTrackTypes) {\n const { events } = this.container.get('$widget');\n events.dispatch('tracking:service-client-response', {\n type,\n data,\n });\n }\n\n complete(contactMethod: ContactMethodProps) {\n const { id, title, clientName, expanded, body } = contactMethod;\n this.track(\n { contactMethod: { id, title, expanded, type: clientName }, hasGuide: !!body.guideId },\n ContactMethodTrackTypes.ContactMethodComplete\n );\n\n const adapter = this.adapters.get(clientName);\n if (adapter && adapter.onComplete) {\n return adapter.onComplete(contactMethod);\n }\n }\n\n evaluate(contactMethod: ContactMethodProps): Promise<Form> {\n const { clientName } = contactMethod;\n const adapter = this.adapters.get(clientName);\n\n if (adapter && adapter.onEvaluate) {\n return Promise.resolve(adapter.onEvaluate(contactMethod));\n }\n\n return Promise.resolve(contactMethod.body.form);\n }\n\n validate(contactMethod: ContactMethodProps): Promise<ValidationResult> {\n const { id, title, clientName } = contactMethod;\n const adapter = this.adapters.get(clientName);\n\n if (adapter && adapter.onValidate) {\n return Promise.resolve(adapter.onValidate(contactMethod)).then((result) => {\n this.track(\n { contactMethod: { id, title, type: clientName }, isValid: result.valid },\n ContactMethodTrackTypes.ContactMethodValidate\n );\n const { events } = this.container.get('$widget') as Widget;\n events.dispatch('form:validated', { isValid: result.valid });\n return result;\n });\n }\n\n return Promise.resolve({ valid: true });\n }\n\n submit(contactMethod: ContactMethodProps): Promise<string> {\n const { clientName } = contactMethod;\n const adapter = this.adapters.get(clientName);\n\n if (adapter && adapter.onSubmit) {\n return Promise.resolve(adapter.onSubmit(contactMethod)).then((result) => {\n this.complete(contactMethod);\n return result;\n });\n }\n\n return Promise.resolve('');\n }\n\n create(settings: AdapterSettings) {\n const { clientName, render } = settings;\n this.adapters.set(clientName, {\n onValidate: (cm) => defaultValidate(this.container, cm),\n onEvaluate: (cm) => defaultEvaluate(this.container, cm),\n onComplete: (cm) => defaultComplete(this.container, cm),\n ...settings,\n });\n return this.container.getAsync('componentResolver').then((resolver: ComponentResolver) => {\n if (typeof render === 'string') {\n this.subs.push(resolver.registerAlias(clientName, render));\n } else {\n this.subs.push(\n resolver.registerComponent(\n clientName,\n lazy(() => render)\n )\n );\n }\n });\n }\n\n dispose() {\n this.subs.forEach((s) => s());\n }\n}\n\nexport default ContactMethodPlatform;\n","import { headingElement, Paragraph } from '@telia-ace/knowledge-widget-ui';\nimport * as React from 'react';\nimport styled, { css } from 'styled-components';\n\nexport type Props = { html: string };\n\nconst Confirmation: React.SFC<Props> = (props: Props) => (\n <StyledParagraph {...props} className=\"humany-confirmation\" />\n);\n\nexport default Confirmation;\n\nconst StyledParagraph = styled(Paragraph)`\n ${headingElement(\n 'h1',\n css`\n font-weight: normal;\n font-size: ${(p) => p.theme.fonts?.medium};\n `\n )}\n`;\n","import { borderTabStyle, genericHtml, Html, linkTabStyle } from '@telia-ace/knowledge-widget-ui';\nimport styled from 'styled-components';\n\nexport default styled(Html)`\n ${genericHtml}\n font-weight: 300;\n line-height: 1.5em;\n button:focus {\n ${(p) => p.theme.accessibility?.isTabbing && borderTabStyle};\n }\n\n a:focus {\n ${(p) => p.theme.accessibility?.isTabbing && linkTabStyle};\n }\n`;\n","import { Symbol } from '@telia-ace/knowledge-widget-core';\nimport {\n borderTabStyle,\n DispatchAction,\n HtmlParseInstruction,\n Link,\n StyledText,\n SymbolBadge,\n Typography,\n useComponent,\n useRouteData,\n} from '@telia-ace/knowledge-widget-ui';\nimport { createParams, formatUrl } from '@telia-ace/widget-utilities';\nimport React, { Suspense } from 'react';\nimport styled, { css } from 'styled-components';\nimport Description from './description';\n\nexport type ContactMethodType = {\n id: string;\n title: string;\n symbol?: Symbol;\n clientName: string;\n expanded: boolean;\n inline: boolean;\n body: { [key: string]: any };\n description?: string;\n confirmation?: string;\n disabled?: boolean;\n guideId?: string;\n};\n\nexport type Props = Merge<\n ContactMethodType,\n {\n className?: string;\n onClick?: (event: React.MouseEvent, properties: Props) => void;\n renderDefault?: (extraProps?: Partial<Props>) => any;\n htmlParseInstruction?: HtmlParseInstruction;\n href?: string;\n target?: string;\n disabled?: boolean;\n action?: (action: string, value: any) => void;\n dispatch?: DispatchAction;\n symbol?: Symbol;\n description?: string;\n confirmation?: string;\n guideId?: string;\n autoFocus?: boolean;\n }\n>;\n\nconst ContactMethod: React.FC<Props> = (props) => {\n const ResolvedComponent = useComponent(props.clientName);\n const {\n params: { contactCategory, guideCategory, phrase },\n } = useRouteData();\n\n if (typeof ResolvedComponent === 'undefined') {\n return null;\n }\n\n if (ResolvedComponent === null) {\n if (process.env.NODE_ENV !== 'production') {\n return (\n <NonResolvedContactMethodWrapper\n title={`client-name: ${props.clientName}, id: ${props.id}`}\n className=\"humany-non-resolved-contact-method\"\n >\n <Typography variant=\"h5\">Non resolved Contact Method type</Typography>\n </NonResolvedContactMethodWrapper>\n );\n }\n return null;\n }\n\n const renderLink = (extraProps: Partial<Props> = {}) => {\n const enhancedProps = { ...props, ...extraProps };\n const {\n id,\n title,\n clientName,\n symbol,\n inline,\n onClick = () => {},\n description,\n htmlParseInstruction,\n className,\n disabled,\n guideId,\n dispatch = () => {},\n expanded,\n } = enhancedProps;\n\n const linkProps = inline\n ? {\n onKeyDown: (event: React.KeyboardEvent) => {\n if (event.key && event.key === 'Enter') {\n onClick(event as any, enhancedProps);\n if (!event.defaultPrevented) {\n !expanded && dispatch('expand', id);\n }\n }\n },\n onClick: (event: React.MouseEvent) => {\n onClick(event, enhancedProps);\n if (!event.defaultPrevented) {\n !expanded && dispatch('expand', id);\n }\n },\n }\n : {\n onClick: (event: React.MouseEvent) => onClick(event, enhancedProps),\n routeName: 'contact-method',\n params: createParams({\n contactCategory,\n guideId,\n guideCategory,\n phrase,\n contactMethod: id,\n uriName: formatUrl(title),\n }),\n };\n\n return (\n <StyledLink\n title={title}\n aria-label={title}\n className={className}\n disabled={disabled}\n description={description}\n data-client-name={clientName}\n {...extraProps}\n {...linkProps}\n >\n {symbol && <SymbolBadge symbol={symbol} />}\n {description ? (\n <div className=\"humany-contact-link-rich-content\">\n {<StyledTitle>{title}</StyledTitle>}\n {\n <Description\n html={description}\n htmlParseInstruction={htmlParseInstruction}\n />\n }\n </div>\n ) : (\n <StyledTitle>{title}</StyledTitle>\n )}\n </StyledLink>\n );\n };\n\n return props.expanded ? (\n <Suspense fallback={null}>\n <ResolvedComponent {...props} renderDefault={renderLink} />\n </Suspense>\n ) : (\n renderLink()\n );\n};\n\nexport default ContactMethod;\n\nexport const contactLink = css<{ description?: string }>`\n display: flex;\n padding: ${(p) => p.theme.sizes?.large};\n ${(p) => (!!p.description ? '' : 'align-items: center;')}\n text-decoration: none;\n span {\n display: inline-block;\n color: ${(p) => p.theme.colors?.text};\n }\n i {\n font-size: ${(p) => p.theme.fonts?.large};\n margin: 0 ${(p) => p.theme.sizes?.large} 0 0;\n min-height: ${(p) => p.theme.fonts?.large};\n min-width: ${(p) => p.theme.fonts?.large};\n line-height: ${(p) => p.theme.fonts?.large};\n display: inline-block;\n vertical-align: bottom;\n color: ${(p) => p.theme.colors?.text};\n }\n`;\n\nconst StyledTitle = styled(StyledText)`\n line-height: ${(p) => p.theme.fonts?.large};\n`;\n\nconst StyledLink = styled(Link)<any>`\n ${contactLink}\n\n &:focus {\n ${(p) => p.theme.accessibility?.isTabbing && borderTabStyle};\n }\n`;\n\nconst NonResolvedContactMethodWrapper = styled.div`\n text-align: center;\n display: block;\n ${(p) => typeof p.theme.colors?.warning !== 'undefined' && `color: ${p.theme.colors?.warning};`}\n`;\n","import { DispatchAction, headingElement, ItemList, itemList } from '@telia-ace/knowledge-widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React, { ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\nimport ContactMethod, { ContactMethodType } from './contact-method';\n\nexport const contactItemList = css`\n ${itemList}\n\n > div {\n padding: ${(p) => p.theme.sizes?.large};\n\n ${headingElement(\n 'h1',\n css`\n margin: 0;\n `\n )}\n }\n > ul {\n &:not(:first-child) {\n border-top: ${(p) => p.theme.border};\n }\n\n > li {\n margin: 0;\n white-space: normal;\n\n > a {\n overflow: hidden;\n }\n\n &:first-child > a {\n border-radius: ${(p) => `${p.theme.borderRadius} ${p.theme.borderRadius} 0 0`};\n }\n\n &:last-child:not(:first-child) > a {\n border-radius: ${(p) => `0 0 ${p.theme.borderRadius} ${p.theme.borderRadius}`};\n }\n\n &:not(:last-child) {\n border-bottom: ${(p) => p.theme.border};\n }\n\n > div {\n padding: ${(p) => p.theme.sizes?.large};\n }\n }\n }\n\n @media (hover: hover) {\n a:hover {\n background-color: ${(p) => p.theme.colors?.accent};\n }\n }\n`;\n\nconst StyledItemList = styled(ItemList)<any>`\n ${contactItemList}\n`;\n\ntype Props = {\n contactMethods: ContactMethodType[];\n header?: string;\n className?: string;\n action?: (action: string, value?: any) => void;\n dispatch?: DispatchAction;\n children?: ReactNode;\n guideId?: string;\n};\n\nconst ContactList: React.SFC<Props> = ({\n contactMethods,\n children,\n guideId,\n dispatch,\n className = '',\n action = () => {},\n header = '',\n}) => {\n if (!contactMethods.length) {\n return null;\n }\n\n return (\n <StyledItemList\n header={header}\n className={appendClassNames(className, 'humany-contact-list')}\n items={contactMethods}\n renderItem={(cm: any) => (\n <li key={cm.id} data-contact-method={cm.id}>\n <ContactMethod {...cm} action={action} dispatch={dispatch} guideId={guideId} />\n </li>\n )}\n >\n {children}\n </StyledItemList>\n );\n};\n\nexport default ContactList;\n","import { FormComponent } from '@telia-ace/widget-forms';\nimport React from 'react';\nimport { ContactMethodProps } from '.';\n\n/**\n * Recursively find form component in schema\n * @param node Form schema\n * @param id actionKey of component to find\n */\nconst lookupComponent = (node: any, id: string): any => {\n if (node.actionKey === id) {\n return node;\n }\n\n if (!node.properties) {\n return null;\n }\n\n const keys = Object.keys(node.properties);\n\n let result;\n // tslint:disable-next-line:no-increment-decrement\n for (let i = 0; i < keys.length; i++) {\n result = lookupComponent(node.properties[keys[i]], id);\n\n if (result) {\n return result;\n }\n }\n\n return false;\n};\n\nconst Form: React.SFC<ContactMethodProps> = ({\n className,\n body: { form },\n id,\n action,\n dispatch,\n disabled,\n autoFocus,\n}) => {\n if (form && !disabled) {\n const { schema, layout, data } = form;\n const trigger = dispatch || action || (() => {});\n return (\n <FormComponent\n className={className}\n schema={schema}\n layout={layout}\n data={data}\n autoFocus={autoFocus}\n onChange={(event: any, data: any) => {\n const form = { schema, layout, data };\n if (event.toString() === 'submit') {\n trigger('submit', { id, form });\n } else {\n const formComponent = lookupComponent(schema, event);\n if (formComponent.evaluate) {\n trigger('evaluate', { id, form });\n } else {\n trigger('validate', { id, form });\n }\n }\n }}\n />\n );\n }\n\n return null;\n};\n\nexport default Form;\n","import { ComponentResolver } from '@telia-ace/knowledge-widget-core';\nimport { useContainer } from '@telia-ace/knowledge-widget-ui';\nimport { EventSubscriptionCancellation } from '@webprovisions/platform';\nimport { useEffect, useState } from 'react';\n\nconst useContactMethod = (clientName: string): any | null => {\n const [component, setComponent] = useState<any | null>(null);\n const container = useContainer();\n\n useEffect(() => {\n let unsubscribe: EventSubscriptionCancellation;\n container.getAsync('componentResolver').then((resolver: ComponentResolver) => {\n unsubscribe = resolver.registerResolver(clientName, (component) =>\n setComponent(component)\n );\n });\n\n return () => {\n if (unsubscribe) {\n unsubscribe();\n }\n };\n }, [clientName]);\n\n return component;\n};\n\nexport default useContactMethod;\n","import { Container } from '@webprovisions/platform';\nimport { ContactMethodPlatform, defaultComplete, defaultSubmit, defaultValidate } from '..';\n\nexport default function webServicePlugin(container: Container) {\n container.getAsync('contactMethods').then((platform: ContactMethodPlatform) => {\n platform.create({\n clientName: 'custom.webservice',\n render: 'email.form',\n onValidate: (contactMethod) => defaultValidate(container, contactMethod),\n onComplete: (contactMethod) => defaultComplete(container, contactMethod),\n onSubmit: (contactMethod) =>\n defaultSubmit(container, contactMethod, (response) => {\n return {\n ...response,\n ConfirmationText: response.ResponseHtml,\n };\n }),\n });\n });\n}\n","import { FormReader } from '@telia-ace/widget-forms';\nimport { Container } from '@webprovisions/platform';\nimport { ContactMethodPlatform, defaultComplete, defaultValidate } from './contact-methods';\n\nexport type Callback = (\n settings: {\n [key: string]: any;\n },\n data?: {\n [key: string]: any;\n }\n) => Promise<string | void> | (string | void);\n\nexport const createSubmitAdapter = (\n container: Container,\n clientName: string,\n fn: Callback\n): Promise<void> => {\n return container.getAsync('contactMethods').then((platform: ContactMethodPlatform) => {\n platform.create({\n clientName,\n render: 'email.form',\n handleClick: () => {\n return (e, cm) => {\n const {\n body: { form, guideId, confirmationFallback, ...rest },\n } = cm;\n if (!form) {\n e.preventDefault();\n fn(rest);\n }\n };\n },\n onValidate: (cm) => defaultValidate(container, cm),\n onComplete: (cm) => defaultComplete(container, cm),\n onSubmit: (cm) => {\n const {\n body: { form, guideId, confirmationFallback, ...rest },\n } = cm;\n const { values } = new FormReader(form).export();\n\n return Promise.resolve(fn(rest, values)).then((confirmation) => {\n return confirmation || confirmationFallback;\n });\n },\n });\n });\n};\n","import { Plugin } from '@telia-ace/knowledge-widget-core';\nimport { Container } from '@webprovisions/platform';\nimport {\n ChatPopupPlugin,\n EmailFormPlugin,\n FreeTextPlugin,\n LinkPlugin,\n PhonePlugin,\n WebServicePlugin,\n} from '.';\n\n/**\n * Registers default Humany contact methods.\n */\nexport class DefaultContactMethodsPlugin extends Plugin {\n constructor(container: Container, settings: any) {\n super(container, settings);\n const implementation = this.widget.implementation;\n implementation.configure((config) => {\n config\n .plugin(EmailFormPlugin)\n .plugin(ChatPopupPlugin)\n .plugin(FreeTextPlugin)\n .plugin(PhonePlugin)\n .plugin(WebServicePlugin)\n .plugin(LinkPlugin);\n });\n }\n}\n"],"names":["defaultValidate","defaultComplete","defaultEvaluate","React","defaultSubmit","EmailFormPlugin","ChatPopupPlugin","FreeTextPlugin","PhonePlugin","WebServicePlugin","LinkPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAM,OAAO,CAAC,WAAsB,eAAkC,YAAW,UAC7E,UAAU,aAAa,kBAAkB,QAAQ,EAAE,KAAK,CAAC,aAAa;AAC5D,QAAA,EAAE,aAAa,IAAI,WAAW,cAAc,KAAK,IAAI,EAAE,OAAO,SAAQ;AACtE,QAAA,EAAE,QAAQ,mBAAmB;AAC7B,QAAA,EAAE,WAAW,OAAO,aAAa;AAEhC,SAAA,eAAe,cAClB,kBAAkB,cAAc,KAAK,YAAW,0BAA0B,MAC1E,QACA;AAAA,IACI,MAAM;AAAA,IACN,eAAe;AAAA,MACX,SAAS,cAAc,KAAK,WAAW,OAAO;AAAA,IAClD;AAAA,EAAA,CAER;AACJ,CAAC;AAEQ,MAAA,SAAS,CAClB,WACA,eACA,cAEA,KAAK,WAAW,aAAa,EACxB,KAAK,CAAC,aAAc,YAAY,UAAU,QAAQ,IAA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YACN,IADM,SAAE,QAAM,SAAS,yBAAjB,IAA0C,iBAA1C,IAA0C,CAAxC,QAAM,WAAS;AAE3B,cAAM,EAAE,WAAW,IAAI,WAAW,IAAI,EAAE;AAEjC,eAAA,QAAQ,QAAQ,GAAG,MAAM,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB;AAC5D,iBAAO,gBAAgB;AAAA,QAAA,CAC1B;AAAA,MACL;AAAA,IAAA,CACH;AAAA,EAAA,CACJ;AACL;ACjCO,MAAM,oCAAoC,OAAO;AAAA,EACpD,YAAY,WAAsB,UAAe;AAC7C,UAAM,WAAW,QAAQ;AACnB,UAAA,iBAAiB,KAAK,OAAO;AACpB,mBAAA,UAAU,CAAC,WAAW;AACjC,aACK,OAAOI,WAAe,EACtB,OAAOC,eAAe,EACtB,OAAOC,cAAc,EACrB,OAAOC,WAAW,EAClB,OAAOC,gBAAgB,EACvB,OAAOC,UAAU;AAAA,IAAA,CACzB;AAAA,EACL;AACJ;;"}
@@ -0,0 +1,16 @@
1
+ import { appendClassNames } from "@telia-ace/widget-utilities";
2
+ const LinkComponent = ({
3
+ className,
4
+ body,
5
+ renderDefault = () => {
6
+ }
7
+ }) => {
8
+ const { uri, target, protocol } = body;
9
+ return renderDefault({
10
+ target,
11
+ className: appendClassNames(className, "humany-contact-method-link"),
12
+ href: `${protocol}${uri}`
13
+ });
14
+ };
15
+ export { LinkComponent as default };
16
+ //# sourceMappingURL=link-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-component.js","sources":["../src/contact-methods/link/link-component.tsx"],"sourcesContent":["import { appendClassNames } from '@telia-ace/widget-utilities';\nimport * as React from 'react';\nimport { ContactMethodProps } from '../ui';\n\nconst LinkComponent: React.SFC<ContactMethodProps> = ({\n className,\n body,\n renderDefault = () => {},\n}) => {\n const { uri, target, protocol } = body;\n\n return renderDefault({\n target,\n className: appendClassNames(className, 'humany-contact-method-link'),\n href: `${protocol}${uri}`,\n });\n};\n\nexport default LinkComponent;\n"],"names":[],"mappings":";AAIA,MAAM,gBAA+C,CAAC;AAAA,EAClD;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AAAA,EAAC;AAAA,MACrB;AACI,QAAA,EAAE,KAAK,QAAQ,aAAa;AAElC,SAAO,cAAc;AAAA,IACjB;AAAA,IACA,WAAW,iBAAiB,WAAW,4BAA4B;AAAA,IACnE,MAAM,GAAG,WAAW;AAAA,EAAA,CACvB;AACL;;"}
@@ -0,0 +1,15 @@
1
+ import { appendClassNames } from "@telia-ace/widget-utilities";
2
+ const PhoneComponent = ({
3
+ className,
4
+ body: { phoneNumber },
5
+ renderDefault = () => {
6
+ }
7
+ }) => {
8
+ return renderDefault({
9
+ title: phoneNumber,
10
+ className: appendClassNames(className, "humany-contact-method-phone"),
11
+ href: `tel: ${phoneNumber}`
12
+ });
13
+ };
14
+ export { PhoneComponent as default };
15
+ //# sourceMappingURL=phone-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-component.js","sources":["../src/contact-methods/phone/phone-component.tsx"],"sourcesContent":["import { appendClassNames } from '@telia-ace/widget-utilities';\nimport * as React from 'react';\nimport { ContactMethodProps } from '../ui';\n\nconst PhoneComponent: React.SFC<ContactMethodProps> = ({\n className,\n body: { phoneNumber },\n renderDefault = () => {},\n}) => {\n return renderDefault({\n title: phoneNumber,\n className: appendClassNames(className, 'humany-contact-method-phone'),\n href: `tel: ${phoneNumber}`,\n });\n};\n\nexport default PhoneComponent;\n"],"names":[],"mappings":";AAIA,MAAM,iBAAgD,CAAC;AAAA,EACnD;AAAA,EACA,MAAM,EAAE;AAAA,EACR,gBAAgB,MAAM;AAAA,EAAC;AAAA,MACrB;AACF,SAAO,cAAc;AAAA,IACjB,OAAO;AAAA,IACP,WAAW,iBAAiB,WAAW,6BAA6B;AAAA,IACpE,MAAM,QAAQ;AAAA,EAAA,CACjB;AACL;;"}
package/package.json CHANGED
@@ -1,36 +1,35 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-adapters",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "description": "ACE knowledge adapters for ACE widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
7
7
  "keywords": [
8
8
  "telia"
9
9
  ],
10
- "main": "lib/index.js",
11
- "module": "lib-esm/index.js",
10
+ "module": "dist/index.js",
11
+ "types": "dist/index.d.ts",
12
12
  "files": [
13
13
  "LICENSE.txt",
14
14
  "README.md",
15
- "lib/",
16
- "lib-esm/"
15
+ "dist/"
17
16
  ],
18
17
  "publishConfig": {
19
18
  "access": "public"
20
19
  },
21
20
  "scripts": {
22
- "clean": "cleandir lib && cleandir lib-esm",
23
- "compile": "tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json"
21
+ "clean": "rimraf ./dist",
22
+ "precompile": "tsc -emitDeclarationOnly",
23
+ "compile": "vite build"
24
24
  },
25
25
  "sideEffects": false,
26
- "typings": "lib/index.d.ts",
27
26
  "dependencies": {
28
- "@telia-ace/knowledge-serviceclient": "^1.0.3",
29
- "@telia-ace/knowledge-widget-core": "^1.0.6",
30
- "@telia-ace/knowledge-widget-ui": "^1.0.10",
31
- "@telia-ace/widget-forms": "^1.0.8",
32
- "@telia-ace/widget-routing": "^1.0.5",
33
- "@telia-ace/widget-utilities": "^1.0.1",
27
+ "@telia-ace/knowledge-serviceclient": "^1.0.4",
28
+ "@telia-ace/knowledge-widget-core": "^1.0.9",
29
+ "@telia-ace/knowledge-widget-ui": "^1.0.13",
30
+ "@telia-ace/widget-forms": "^1.0.11",
31
+ "@telia-ace/widget-routing": "^1.0.8",
32
+ "@telia-ace/widget-utilities": "^1.0.2",
34
33
  "@webprovisions/platform": "^1.1.2"
35
34
  },
36
35
  "peerDependencies": {
@@ -41,5 +40,5 @@
41
40
  "@types/react": "^16.8.0",
42
41
  "@types/styled-components": "^5.1.7"
43
42
  },
44
- "gitHead": "753397b5908ad6653fff863de21e741d50b238d5"
43
+ "gitHead": "a8bf8e5c1ca56a4749cd8ec47f756b13431394b4"
45
44
  }
@@ -1,2 +0,0 @@
1
- import { Container } from '@webprovisions/platform';
2
- export default function chatPopupPlugin(container: Container): void;
@@ -1,79 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- var __read = (this && this.__read) || function (o, n) {
14
- var m = typeof Symbol === "function" && o[Symbol.iterator];
15
- if (!m) return o;
16
- var i = m.call(o), r, ar = [], e;
17
- try {
18
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
- }
20
- catch (error) { e = { error: error }; }
21
- finally {
22
- try {
23
- if (r && !r.done && (m = i["return"])) m.call(i);
24
- }
25
- finally { if (e) throw e.error; }
26
- }
27
- return ar;
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- var widget_forms_1 = require("@telia-ace/widget-forms");
31
- var __1 = require("..");
32
- var email_1 = require("../email");
33
- var popup = function (title, settings, formValues) {
34
- var url = settings.url, width = settings.width, height = settings.height;
35
- var queries = formValues ? formValues : {};
36
- var link = document.createElement('a');
37
- link.href = url;
38
- link.search
39
- .replace('?', '')
40
- .split('&')
41
- .forEach(function (part) {
42
- var _a = __read(part.split('='), 2), key = _a[0], value = _a[1];
43
- typeof value !== 'undefined' && (queries[key] = value);
44
- });
45
- link.search = Object.keys(queries)
46
- .map(function (key) { return "".concat(key, "=").concat(queries[key]); })
47
- .join('&');
48
- window.open(link.href, title, "width=".concat(width, ",height=").concat(height));
49
- return '';
50
- };
51
- function chatPopupPlugin(container) {
52
- container.getAsync('contactMethods').then(function (platform) {
53
- platform.create({
54
- clientName: 'chat.popup',
55
- render: 'email.form',
56
- handleClick: function (contactMethod) {
57
- var title = contactMethod.title, body = contactMethod.body;
58
- var form = body.form, guideId = body.guideId, confirmationFallback = body.confirmationFallback, rest = __rest(body, ["form", "guideId", "confirmationFallback"]);
59
- if (!form) {
60
- return function (e) {
61
- e.preventDefault();
62
- popup(title, rest);
63
- };
64
- }
65
- return function () { };
66
- },
67
- onValidate: function (contactMethod) { return (0, __1.defaultValidate)(container, contactMethod); },
68
- onComplete: function (contactMethod) { return (0, email_1.defaultComplete)(container, contactMethod); },
69
- onSubmit: function (contactMethod) {
70
- var title = contactMethod.title, body = contactMethod.body;
71
- var form = body.form, guideId = body.guideId, confirmationFallback = body.confirmationFallback, rest = __rest(body, ["form", "guideId", "confirmationFallback"]);
72
- var formValues = new widget_forms_1.FormReader(form).export().values;
73
- popup(title, rest, formValues);
74
- return confirmationFallback;
75
- },
76
- });
77
- });
78
- }
79
- exports.default = chatPopupPlugin;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ChatPopupPlugin = void 0;
7
- var chat_popup_plugin_1 = require("./chat-popup-plugin");
8
- Object.defineProperty(exports, "ChatPopupPlugin", { enumerable: true, get: function () { return __importDefault(chat_popup_plugin_1).default; } });
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { ContactMethodProps } from '../ui';
3
- declare const EmailFormComponent: React.FC<ContactMethodProps>;
4
- export default EmailFormComponent;
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- var knowledge_widget_ui_1 = require("@telia-ace/knowledge-widget-ui");
42
- var widget_utilities_1 = require("@telia-ace/widget-utilities");
43
- var React = __importStar(require("react"));
44
- var styled_components_1 = __importStar(require("styled-components"));
45
- var ui_1 = require("../ui");
46
- var StyledHtml = (0, styled_components_1.default)(knowledge_widget_ui_1.Html)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), knowledge_widget_ui_1.genericHtml, (0, knowledge_widget_ui_1.headingElement)('h1', (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-weight: normal;\n font-size: ", ";\n "], ["\n font-weight: normal;\n font-size: ", ";\n "])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.medium; })));
47
- var EmailFormComponent = function (props) {
48
- var className = props.className, _a = props.renderDefault, renderDefault = _a === void 0 ? function () { } : _a, form = props.body.form, confirmation = props.confirmation, htmlParseInstruction = props.htmlParseInstruction, disabled = props.disabled;
49
- if (confirmation) {
50
- return (React.createElement(StyledHtml, { className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-method-confirmation', 'humany-contact-method-email'), html: confirmation, htmlParseInstruction: htmlParseInstruction }));
51
- }
52
- if (form && !disabled) {
53
- return (React.createElement(ui_1.Form, __assign({}, props, { className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-method-email') })));
54
- }
55
- return renderDefault();
56
- };
57
- exports.default = EmailFormComponent;
58
- var templateObject_1, templateObject_2;
@@ -1,16 +0,0 @@
1
- import { SubmissionApiResult } from '@telia-ace/knowledge-serviceclient';
2
- import { Container } from '@webprovisions/platform';
3
- import { ContactMethodType } from '../ui';
4
- export declare const submit: (container: Container, contactMethod: ContactMethodType, transform?: ((response: any) => SubmissionApiResult) | undefined) => Promise<string>;
5
- export declare const validate: (container: Container, contactMethod: ContactMethodType) => Promise<{
6
- valid: boolean;
7
- errors: {
8
- [key: string]: string;
9
- };
10
- errorTypes: {
11
- [key: string]: string;
12
- };
13
- }>;
14
- export declare const evaluate: (container: Container, contactMethod: ContactMethodType) => Promise<import("@telia-ace/widget-forms").Form>;
15
- export declare const complete: (container: Container, contactMethod: ContactMethodType) => Promise<void>;
16
- export default function emailPlugin(container: Container): void;
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.complete = exports.evaluate = exports.validate = exports.submit = void 0;
27
- var widget_forms_1 = require("@telia-ace/widget-forms");
28
- var post = function (container, contactMethod, validate) {
29
- if (validate === void 0) { validate = false; }
30
- return container.getManyAsync('matchingClient', 'router').then(function (services) {
31
- var formData = new widget_forms_1.FormReader(contactMethod.body.form).export(validate).formData;
32
- var _a = services, router = _a.router, matchingClient = _a.matchingClient;
33
- var params = router.getRouteData().params;
34
- return matchingClient.customRequest("contactmethods/".concat(contactMethod.id).concat(validate ? '/validatedwithpayload' : ''), 'POST', {
35
- body: formData,
36
- configuration: {
37
- guideId: contactMethod.body.guideId || params.guideId,
38
- },
39
- });
40
- });
41
- };
42
- var submit = function (container, contactMethod, transform) {
43
- return post(container, contactMethod)
44
- .then(function (response) { return (transform ? transform(response) : response); })
45
- .then(function (_a) {
46
- var ConfirmationText = _a.ConfirmationText;
47
- return ConfirmationText;
48
- });
49
- };
50
- exports.submit = submit;
51
- var validate = function (container, contactMethod) {
52
- return post(container, contactMethod, true).then(function (result) { return ({
53
- valid: result.Validation.IsValid,
54
- errors: result.Validation.Errors,
55
- errorTypes: result.Validation.ErrorTypes,
56
- }); });
57
- };
58
- exports.validate = validate;
59
- var evaluate = function (container, contactMethod) {
60
- return post(container, contactMethod, true).then(function (result) {
61
- return widget_forms_1.FormBuilder.fromLegacyForm(contactMethod.id, result.ContactMethod.Form).get();
62
- });
63
- };
64
- exports.evaluate = evaluate;
65
- var complete = function (container, contactMethod) {
66
- return container.getAsync('matchingClient').then(function (matchingClient) {
67
- matchingClient.completeContactMethod(contactMethod.id);
68
- });
69
- };
70
- exports.complete = complete;
71
- function emailPlugin(container) {
72
- container.getAsync('contactMethods').then(function (platform) {
73
- platform.create({
74
- clientName: 'email.form',
75
- render: Promise.resolve().then(function () { return __importStar(require('./email-form-component')); }),
76
- onEvaluate: function (contactMethod) { return (0, exports.evaluate)(container, contactMethod); },
77
- onValidate: function (contactMethod) { return (0, exports.validate)(container, contactMethod); },
78
- onSubmit: function (contactMethod) { return (0, exports.submit)(container, contactMethod); },
79
- onComplete: function (contactMethod) { return (0, exports.complete)(container, contactMethod); },
80
- });
81
- });
82
- }
83
- exports.default = emailPlugin;
@@ -1 +0,0 @@
1
- export { complete as defaultComplete, default as EmailPlugin, evaluate as defaultEvaluate, submit as defaultSubmit, validate as defaultValidate, } from './email-plugin';
@@ -1,12 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.defaultValidate = exports.defaultSubmit = exports.defaultEvaluate = exports.EmailPlugin = exports.defaultComplete = void 0;
7
- var email_plugin_1 = require("./email-plugin");
8
- Object.defineProperty(exports, "defaultComplete", { enumerable: true, get: function () { return email_plugin_1.complete; } });
9
- Object.defineProperty(exports, "EmailPlugin", { enumerable: true, get: function () { return __importDefault(email_plugin_1).default; } });
10
- Object.defineProperty(exports, "defaultEvaluate", { enumerable: true, get: function () { return email_plugin_1.evaluate; } });
11
- Object.defineProperty(exports, "defaultSubmit", { enumerable: true, get: function () { return email_plugin_1.submit; } });
12
- Object.defineProperty(exports, "defaultValidate", { enumerable: true, get: function () { return email_plugin_1.validate; } });
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
- __setModuleDefault(result, mod);
27
- return result;
28
- };
29
- var __importDefault = (this && this.__importDefault) || function (mod) {
30
- return (mod && mod.__esModule) ? mod : { "default": mod };
31
- };
32
- Object.defineProperty(exports, "__esModule", { value: true });
33
- var knowledge_widget_ui_1 = require("@telia-ace/knowledge-widget-ui");
34
- var widget_utilities_1 = require("@telia-ace/widget-utilities");
35
- var React = __importStar(require("react"));
36
- var styled_components_1 = __importDefault(require("styled-components"));
37
- var ui_1 = require("../ui");
38
- var FreeTextComponent = function (_a) {
39
- var className = _a.className, description = _a.description, freetext = _a.body.freetext, htmlParseInstruction = _a.htmlParseInstruction;
40
- if (!freetext) {
41
- return null;
42
- }
43
- return (React.createElement("div", { className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-method-free-text') },
44
- React.createElement(StyledHtml, { html: freetext, htmlParseInstruction: htmlParseInstruction }),
45
- description && (React.createElement(ui_1.Description, { html: description, htmlParseInstruction: htmlParseInstruction }))));
46
- };
47
- exports.default = FreeTextComponent;
48
- var StyledHtml = (0, styled_components_1.default)(knowledge_widget_ui_1.Html)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), knowledge_widget_ui_1.genericHtml);
49
- var templateObject_1;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- function freeTextPlugin(container) {
27
- container.getAsync('contactMethods').then(function (platform) {
28
- platform.create({
29
- clientName: 'custom.freetext',
30
- render: Promise.resolve().then(function () { return __importStar(require('./free-text-component')); }),
31
- });
32
- });
33
- }
34
- exports.default = freeTextPlugin;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FreeTextPlugin = void 0;
7
- var free_text_plugin_1 = require("./free-text-plugin");
8
- Object.defineProperty(exports, "FreeTextPlugin", { enumerable: true, get: function () { return __importDefault(free_text_plugin_1).default; } });
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.WebServicePlugin = exports.useContactMethod = exports.DefaultForm = exports.ContactMethod = exports.ContactList = exports.contactLink = exports.contactItemList = exports.ContactMethodPlatform = exports.PhonePlugin = exports.LinkPlugin = exports.FreeTextPlugin = exports.EmailPlugin = exports.defaultValidate = exports.defaultSubmit = exports.defaultEvaluate = exports.defaultComplete = exports.ChatPopupPlugin = void 0;
7
- var chat_popup_1 = require("./chat-popup");
8
- Object.defineProperty(exports, "ChatPopupPlugin", { enumerable: true, get: function () { return chat_popup_1.ChatPopupPlugin; } });
9
- var email_1 = require("./email");
10
- Object.defineProperty(exports, "defaultComplete", { enumerable: true, get: function () { return email_1.defaultComplete; } });
11
- Object.defineProperty(exports, "defaultEvaluate", { enumerable: true, get: function () { return email_1.defaultEvaluate; } });
12
- Object.defineProperty(exports, "defaultSubmit", { enumerable: true, get: function () { return email_1.defaultSubmit; } });
13
- Object.defineProperty(exports, "defaultValidate", { enumerable: true, get: function () { return email_1.defaultValidate; } });
14
- Object.defineProperty(exports, "EmailPlugin", { enumerable: true, get: function () { return email_1.EmailPlugin; } });
15
- var free_text_1 = require("./free-text");
16
- Object.defineProperty(exports, "FreeTextPlugin", { enumerable: true, get: function () { return free_text_1.FreeTextPlugin; } });
17
- var link_1 = require("./link");
18
- Object.defineProperty(exports, "LinkPlugin", { enumerable: true, get: function () { return link_1.LinkPlugin; } });
19
- var phone_1 = require("./phone");
20
- Object.defineProperty(exports, "PhonePlugin", { enumerable: true, get: function () { return phone_1.PhonePlugin; } });
21
- var platform_1 = require("./platform");
22
- Object.defineProperty(exports, "ContactMethodPlatform", { enumerable: true, get: function () { return __importDefault(platform_1).default; } });
23
- var ui_1 = require("./ui");
24
- Object.defineProperty(exports, "contactItemList", { enumerable: true, get: function () { return ui_1.contactItemList; } });
25
- Object.defineProperty(exports, "contactLink", { enumerable: true, get: function () { return ui_1.contactLink; } });
26
- Object.defineProperty(exports, "ContactList", { enumerable: true, get: function () { return ui_1.ContactList; } });
27
- Object.defineProperty(exports, "ContactMethod", { enumerable: true, get: function () { return ui_1.ContactMethod; } });
28
- Object.defineProperty(exports, "DefaultForm", { enumerable: true, get: function () { return ui_1.Form; } });
29
- Object.defineProperty(exports, "useContactMethod", { enumerable: true, get: function () { return ui_1.useContactMethod; } });
30
- var web_service_1 = require("./web-service");
31
- Object.defineProperty(exports, "WebServicePlugin", { enumerable: true, get: function () { return web_service_1.WebServicePlugin; } });
@@ -1 +0,0 @@
1
- export { default as LinkPlugin } from './link-plugin';