@kajoo-ai/sitecore-react 0.0.1 → 0.0.2

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/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import { FC } from 'react';
2
3
  import { Link as Link$1 } from '@sitecore-jss/sitecore-jss-react';
4
+ import { JsonObject } from 'type-fest';
3
5
 
4
6
  declare type ISitecoreLink = Parameters<typeof Link$1>[0];
5
7
  declare type ITextField$1 = {
@@ -23,10 +25,11 @@ interface IButton {
23
25
  }
24
26
  declare const Button: FC<IButton>;
25
27
 
26
- interface IProps$8 {
28
+ interface IProps$9 {
27
29
  className: string;
30
+ [key: string]: unknown;
28
31
  }
29
- declare const CheckBox: FC<IProps$8>;
32
+ declare const CheckBox: FC<IProps$9>;
30
33
 
31
34
  declare const Container: FC<any>;
32
35
 
@@ -43,41 +46,41 @@ interface ImageField {
43
46
  value?: ImageFieldValue;
44
47
  editable?: string;
45
48
  }
46
- interface IProps$7 {
49
+ interface IProps$8 {
47
50
  src: ImageField | ImageFieldValue;
48
- alt?: any;
51
+ alt?: string;
49
52
  }
50
- declare const Image: FC<IProps$7>;
53
+ declare const Image: FC<IProps$8>;
51
54
 
52
55
  declare const Label: FC<any>;
53
56
 
54
- declare type IProps$6 = JSX.IntrinsicElements["hr"];
55
- declare const Linebreak: FC<IProps$6>;
57
+ declare type IProps$7 = JSX.IntrinsicElements["hr"];
58
+ declare const Linebreak: FC<IProps$7>;
56
59
 
57
60
  declare const List: FC<any>;
58
61
 
59
62
  declare const Paragraph: FC<any>;
60
63
 
61
- interface IProps$5 {
64
+ interface IProps$6 {
62
65
  className: string;
63
66
  }
64
- declare const ProgressBar: FC<IProps$5>;
67
+ declare const ProgressBar: FC<IProps$6>;
65
68
 
66
- interface IProps$4 {
69
+ interface IProps$5 {
67
70
  className: string;
68
71
  }
69
- declare const Radiobutton: FC<IProps$4>;
72
+ declare const Radiobutton: FC<IProps$5>;
70
73
 
71
- interface IProps$3 {
74
+ interface IProps$4 {
72
75
  className: string;
73
76
  }
74
- declare const Slider: FC<IProps$3>;
77
+ declare const Slider: FC<IProps$4>;
75
78
 
76
- declare type IProps$2 = JSX.IntrinsicElements["textarea"];
77
- declare const Textarea: FC<IProps$2>;
79
+ declare type IProps$3 = JSX.IntrinsicElements["textarea"];
80
+ declare const Textarea: FC<IProps$3>;
78
81
 
79
- declare type IProps$1 = Omit<JSX.IntrinsicElements["input"], "type">;
80
- declare const Textinput: FC<IProps$1>;
82
+ declare type IProps$2 = Omit<JSX.IntrinsicElements["input"], "type">;
83
+ declare const Textinput: FC<IProps$2>;
81
84
 
82
85
  declare const Toggle: FC<any>;
83
86
 
@@ -85,7 +88,7 @@ declare const TypeForm: FC<any>;
85
88
 
86
89
  declare const Video: FC<any>;
87
90
 
88
- interface IProps {
91
+ interface IProps$1 {
89
92
  text?: {
90
93
  value?: string | number;
91
94
  editable?: string;
@@ -93,10 +96,40 @@ interface IProps {
93
96
  tag?: keyof JSX.IntrinsicElements;
94
97
  [key: string]: any;
95
98
  }
96
- declare const Text: FC<IProps>;
99
+ declare const Text: FC<IProps$1>;
97
100
 
98
101
  declare const RichText: FC<any>;
99
102
 
100
103
  declare const Repeater: FC<any>;
101
104
 
102
- export { Button, CheckBox as Checkbox, IProps$8 as CheckboxProps, Container, Dropdown, Header, Image, Label, Linebreak, IProps$6 as LinebreakProps, Link, List, Paragraph, ProgressBar, Radiobutton, IProps$4 as RadiobuttonProps, Repeater, RichText, Slider, IProps$3 as SliderProps, Text, Textarea, IProps$2 as TextareaProps, Textinput, IProps$1 as TextinputProps, Toggle, TypeForm, Video };
105
+ interface IProps {
106
+ component: ({ fields }: {
107
+ fields: JsonObject;
108
+ }) => JSX.Element;
109
+ datasource: IConsciaIntegration | IContentstackIntegration;
110
+ loadingComponent?: JSX.Element;
111
+ errorComponent?: JSX.Element;
112
+ emptyComponent?: JSX.Element;
113
+ }
114
+ interface IContentstackIntegration {
115
+ provider: "contentstack";
116
+ hostUrl?: string;
117
+ apiKey: string;
118
+ deliveryToken: string;
119
+ language?: string;
120
+ branch?: string;
121
+ environment: string;
122
+ contentTypeUid: string;
123
+ entryUid: string;
124
+ }
125
+ interface IConsciaIntegration {
126
+ provider: "conscia.ai";
127
+ hostUrl: string;
128
+ customerCode: string;
129
+ apiToken: string;
130
+ environment: string;
131
+ componentCode: string;
132
+ }
133
+ declare const KajooComponent: (props: IProps) => JSX.Element;
134
+
135
+ export { Button, CheckBox as Checkbox, IProps$9 as CheckboxProps, Container, Dropdown, Header, Image, KajooComponent, IProps as KajooComponentProps, Label, Linebreak, IProps$7 as LinebreakProps, Link, List, Paragraph, ProgressBar, Radiobutton, IProps$5 as RadiobuttonProps, Repeater, RichText, Slider, IProps$4 as SliderProps, Text, Textarea, IProps$3 as TextareaProps, Textinput, IProps$2 as TextinputProps, Toggle, TypeForm, Video };