@telia-ace/knowledge-widget-adapters 1.3.31-rc.0 → 1.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,3 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  export default function chatPopupPlugin(container: Container): void;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { ContactMethodProps } from '../ui';
3
+
3
4
  declare const EmailFormComponent: React.FC<ContactMethodProps>;
4
5
  export default EmailFormComponent;
@@ -1,6 +1,7 @@
1
1
  import { SubmissionApiResult } from '@telia-ace/knowledge-serviceclient';
2
2
  import { Container } from '@webprovisions/platform';
3
3
  import { ContactMethodType } from '../ui';
4
+
4
5
  export declare const submit: (container: Container, contactMethod: ContactMethodType, transform?: ((response: any) => SubmissionApiResult) | undefined) => Promise<string>;
5
6
  export declare const validate: (container: Container, contactMethod: ContactMethodType) => Promise<{
6
7
  valid: boolean;
@@ -11,6 +12,6 @@ export declare const validate: (container: Container, contactMethod: ContactMeth
11
12
  [key: string]: string;
12
13
  };
13
14
  }>;
14
- export declare const evaluate: (container: Container, contactMethod: ContactMethodType) => Promise<import("@telia-ace/widget-forms").Form>;
15
+ export declare const evaluate: (container: Container, contactMethod: ContactMethodType) => Promise<import('../../../../../forms/src/index.ts').Form>;
15
16
  export declare const complete: (container: Container, contactMethod: ContactMethodType) => Promise<void>;
16
17
  export default function emailPlugin(container: Container): void;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { ContactMethodProps } from '../ui';
3
+
3
4
  declare const FreeTextComponent: React.FC<ContactMethodProps>;
4
5
  export default FreeTextComponent;
@@ -1,2 +1,3 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  export default function freeTextPlugin(container: Container): void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
2
1
  import { ContactMethodProps } from '../ui';
2
+ import * as React from 'react';
3
3
  declare const LinkComponent: React.FC<ContactMethodProps>;
4
4
  export default LinkComponent;
@@ -1,2 +1,3 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  export default function linkPlugin(container: Container): void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
2
1
  import { ContactMethodProps } from '../ui';
2
+ import * as React from 'react';
3
3
  declare const PhoneComponent: React.FC<ContactMethodProps>;
4
4
  export default PhoneComponent;
@@ -1,2 +1,3 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  export default function phonePlugin(container: Container): void;
@@ -1,8 +1,9 @@
1
- import { ComponentPlatform } from '@telia-ace/knowledge-widget-core';
2
- import { Form } from '@telia-ace/widget-forms';
1
+ import { ComponentPlatform } from '../../../core/src/index.ts';
2
+ import { Form } from '../../../../forms/src/index.ts';
3
3
  import { Container } from '@webprovisions/platform';
4
- import React from 'react';
4
+ import { default as React } from 'react';
5
5
  import { ContactMethodProps } from './ui';
6
+
6
7
  export type ReactComponentImport = Promise<{
7
8
  default: React.FunctionComponent<any>;
8
9
  }>;
@@ -37,7 +38,22 @@ declare class ContactMethodPlatform {
37
38
  private adapters;
38
39
  private subs;
39
40
  static create(container: Container): Promise<ContactMethodPlatform>;
40
- handleAdapters(cm: ContactMethodProps): Promise<ContactMethodProps>;
41
+ handleAdapters(cm: ContactMethodProps): Promise<Merge<import('./ui').ContactMethodType, {
42
+ className?: string | undefined;
43
+ onClick?: ((event: React.MouseEvent<Element, MouseEvent>, properties: Merge<import('./ui').ContactMethodType, any>) => void) | undefined;
44
+ renderDefault?: ((extraProps?: any) => any) | undefined;
45
+ htmlParseInstruction?: import('../../../../ui/src/index.ts').HtmlParseInstruction | undefined;
46
+ href?: string | undefined;
47
+ target?: string | undefined;
48
+ disabled?: boolean | undefined;
49
+ action?: ((action: string, value: any) => void) | undefined;
50
+ dispatch?: import('../../../../ui/src/index.ts').DispatchAction | undefined;
51
+ symbol?: import('../../../core/src/index.ts').Symbol | undefined;
52
+ description?: string | undefined;
53
+ confirmation?: string | undefined;
54
+ guideId?: string | undefined;
55
+ autoFocus?: boolean | undefined;
56
+ }>>;
41
57
  constructor(container: Container, componentPlatform: ComponentPlatform);
42
58
  static getInstance(container: Container, key?: string): Promise<ContactMethodPlatform>;
43
59
  private track;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = {
3
4
  html: string;
4
5
  };
@@ -1,10 +1,11 @@
1
1
  import { Theme } from '@emotion/react';
2
- import { DispatchAction } from '@telia-ace/knowledge-widget-ui';
3
- import React, { ReactNode } from 'react';
2
+ import { DispatchAction } from '../../../../ui/src/index.ts';
3
+ import { default as React, ReactNode } from 'react';
4
4
  import { ContactMethodType } from './contact-method';
5
+
5
6
  export declare const contactItemList: (p: {
6
7
  theme: Theme;
7
- }) => import("@emotion/react").SerializedStyles;
8
+ }) => import('@emotion/react').SerializedStyles;
8
9
  type Props = {
9
10
  contactMethods: ContactMethodType[];
10
11
  header?: string;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- declare const _default: import("@emotion/styled").StyledComponent<any, {}, {
3
- ref?: import("react").Ref<any> | undefined;
1
+ declare const _default: import('@emotion/styled').StyledComponent<any, {}, {
2
+ ref?: import('react').Ref<any> | undefined;
4
3
  }>;
5
4
  export default _default;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { ContactMethodProps } from '.';
3
+
3
4
  declare const Form: React.FC<ContactMethodProps>;
4
5
  export default Form;
@@ -1,2 +1,3 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  export default function webServicePlugin(container: Container): void;
@@ -1,4 +1,5 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  export type Callback = (settings: {
3
4
  [key: string]: any;
4
5
  }, data?: {
@@ -1,5 +1,6 @@
1
- import { Plugin } from '@telia-ace/knowledge-widget-core';
1
+ import { Plugin } from '../../core/src/index.ts';
2
2
  import { Container } from '@webprovisions/platform';
3
+
3
4
  /**
4
5
  * Registers default Humany contact methods.
5
6
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-adapters",
3
- "version": "1.3.31-rc.0",
3
+ "version": "1.3.32",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -11,11 +11,11 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@telia-ace/knowledge-serviceclient": "^1.0.31",
14
- "@telia-ace/knowledge-widget-core": "^1.3.31-rc.0",
15
- "@telia-ace/knowledge-widget-ui": "^1.3.31-rc.0",
16
- "@telia-ace/widget-forms": "^1.3.31-rc.0",
17
- "@telia-ace/widget-routing": "^1.3.31-rc.0",
18
- "@telia-ace/widget-utilities": "^1.3.31-rc.0",
14
+ "@telia-ace/knowledge-widget-core": "^1.3.32",
15
+ "@telia-ace/knowledge-widget-ui": "^1.3.32",
16
+ "@telia-ace/widget-forms": "^1.3.32",
17
+ "@telia-ace/widget-routing": "^1.3.32",
18
+ "@telia-ace/widget-utilities": "^1.3.32",
19
19
  "@webprovisions/platform": "^1.1.4"
20
20
  },
21
21
  "peerDependencies": {
@@ -1,41 +0,0 @@
1
- import { Theme } from '@emotion/react';
2
- import { Symbol } from '@telia-ace/knowledge-widget-core';
3
- import { DispatchAction, HtmlParseInstruction } from '@telia-ace/knowledge-widget-ui';
4
- import React from 'react';
5
- export type ContactMethodType = {
6
- id: string;
7
- title: string;
8
- symbol?: Symbol;
9
- clientName: string;
10
- expanded: boolean;
11
- inline: boolean;
12
- body: {
13
- [key: string]: any;
14
- };
15
- description?: string;
16
- confirmation?: string;
17
- disabled?: boolean;
18
- guideId?: string;
19
- };
20
- export type Props = Merge<ContactMethodType, {
21
- className?: string;
22
- onClick?: (event: React.MouseEvent, properties: Props) => void;
23
- renderDefault?: (extraProps?: Partial<Props>) => any;
24
- htmlParseInstruction?: HtmlParseInstruction;
25
- href?: string;
26
- target?: string;
27
- disabled?: boolean;
28
- action?: (action: string, value: any) => void;
29
- dispatch?: DispatchAction;
30
- symbol?: Symbol;
31
- description?: string;
32
- confirmation?: string;
33
- guideId?: string;
34
- autoFocus?: boolean;
35
- }>;
36
- declare const ContactMethod: React.FC<Props>;
37
- export default ContactMethod;
38
- export declare const contactLink: (p: {
39
- theme: Theme;
40
- description?: string;
41
- }) => import("@emotion/react").SerializedStyles;