@kajoo-ai/sitecore-react 18.0.2 → 18.0.4

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 (74) hide show
  1. package/README.md +33 -33
  2. package/dist/cjs/components/button.d.ts +7 -11
  3. package/dist/cjs/components/check-box.d.ts +3 -7
  4. package/dist/cjs/components/container.d.ts +10 -13
  5. package/dist/cjs/components/drop-down/drop-down.d.ts +3 -3
  6. package/dist/cjs/components/drop-down/index.d.ts +1 -1
  7. package/dist/cjs/components/header.d.ts +8 -3
  8. package/dist/cjs/components/image.d.ts +10 -17
  9. package/dist/cjs/components/kajoo-component/index.d.ts +1 -1
  10. package/dist/cjs/components/kajoo-component/kajoo-component.d.ts +46 -39
  11. package/dist/cjs/components/kajoo-component/services.d.ts +8 -8
  12. package/dist/cjs/components/label.d.ts +8 -3
  13. package/dist/cjs/components/linebreak.d.ts +3 -4
  14. package/dist/cjs/components/link.d.ts +9 -13
  15. package/dist/cjs/components/list.d.ts +3 -3
  16. package/dist/cjs/components/paragraph.d.ts +8 -3
  17. package/dist/cjs/components/progress-bar.d.ts +5 -6
  18. package/dist/cjs/components/radio-button.d.ts +3 -6
  19. package/dist/cjs/components/repeater.d.ts +3 -3
  20. package/dist/cjs/components/rich-text.d.ts +8 -3
  21. package/dist/cjs/components/slider.d.ts +5 -6
  22. package/dist/cjs/components/text-area.d.ts +3 -4
  23. package/dist/cjs/components/text-input.d.ts +3 -4
  24. package/dist/cjs/components/text.d.ts +9 -11
  25. package/dist/cjs/components/toggle/index.d.ts +1 -1
  26. package/dist/cjs/components/toggle/toggle.d.ts +5 -3
  27. package/dist/cjs/components/type-form/index.d.ts +1 -1
  28. package/dist/cjs/components/type-form/type-form.d.ts +3 -3
  29. package/dist/cjs/components/video.d.ts +8 -3
  30. package/dist/cjs/factories/KajooLayoutFactory.d.ts +12 -12
  31. package/dist/cjs/index.d.ts +37 -37
  32. package/dist/cjs/index.js +1 -1
  33. package/dist/cjs/index.js.map +1 -1
  34. package/dist/cjs/toObject.d.ts +2 -2
  35. package/dist/cjs/types.d.ts +3 -3
  36. package/dist/cjs/utils.d.ts +6 -6
  37. package/dist/esm/components/button.d.ts +7 -11
  38. package/dist/esm/components/check-box.d.ts +3 -7
  39. package/dist/esm/components/container.d.ts +10 -13
  40. package/dist/esm/components/drop-down/drop-down.d.ts +3 -3
  41. package/dist/esm/components/drop-down/index.d.ts +1 -1
  42. package/dist/esm/components/header.d.ts +8 -3
  43. package/dist/esm/components/image.d.ts +10 -17
  44. package/dist/esm/components/kajoo-component/index.d.ts +1 -1
  45. package/dist/esm/components/kajoo-component/kajoo-component.d.ts +46 -39
  46. package/dist/esm/components/kajoo-component/services.d.ts +8 -8
  47. package/dist/esm/components/label.d.ts +8 -3
  48. package/dist/esm/components/linebreak.d.ts +3 -4
  49. package/dist/esm/components/link.d.ts +9 -13
  50. package/dist/esm/components/list.d.ts +3 -3
  51. package/dist/esm/components/paragraph.d.ts +8 -3
  52. package/dist/esm/components/progress-bar.d.ts +5 -6
  53. package/dist/esm/components/radio-button.d.ts +3 -6
  54. package/dist/esm/components/repeater.d.ts +3 -3
  55. package/dist/esm/components/rich-text.d.ts +8 -3
  56. package/dist/esm/components/slider.d.ts +5 -6
  57. package/dist/esm/components/text-area.d.ts +3 -4
  58. package/dist/esm/components/text-input.d.ts +3 -4
  59. package/dist/esm/components/text.d.ts +9 -11
  60. package/dist/esm/components/toggle/index.d.ts +1 -1
  61. package/dist/esm/components/toggle/toggle.d.ts +5 -3
  62. package/dist/esm/components/type-form/index.d.ts +1 -1
  63. package/dist/esm/components/type-form/type-form.d.ts +3 -3
  64. package/dist/esm/components/video.d.ts +8 -3
  65. package/dist/esm/factories/KajooLayoutFactory.d.ts +12 -12
  66. package/dist/esm/index.d.ts +37 -37
  67. package/dist/esm/index.js +1 -1
  68. package/dist/esm/index.js.map +1 -1
  69. package/dist/esm/toObject.d.ts +2 -2
  70. package/dist/esm/types.d.ts +3 -3
  71. package/dist/esm/utils.d.ts +6 -6
  72. package/dist/index.d.ts +139 -137
  73. package/dist/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +51 -56
package/dist/index.d.ts CHANGED
@@ -1,162 +1,164 @@
1
- import React, { FC, ReactNode } from 'react';
2
- import { Link as Link$1, RouteData, LayoutServiceData } from '@sitecore-jss/sitecore-jss-react';
3
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { JsonObject } from 'type-fest';
5
-
6
- type ITextField$1 = {
7
- value?: string | number;
8
- editable?: string;
9
- };
10
- interface IButton {
11
- text: ITextField$1 | string;
12
- [key: string]: unknown;
13
- }
14
- declare const Button: FC<IButton>;
15
-
16
- interface IProps$a {
17
- className: string;
18
- [key: string]: unknown;
19
- }
20
- declare const CheckBox: FC<IProps$a>;
21
-
22
- interface IProps$9 {
23
- bgImage?: {
24
- value: {
25
- src: string;
26
- };
27
- };
28
- tag?: keyof JSX.IntrinsicElements;
29
- [key: string]: any;
30
- children: ReactNode | ReactNode[];
31
- }
32
- declare const Container: FC<IProps$9>;
2
+ import React, { ReactNode, FC, ComponentProps, VideoHTMLAttributes } from 'react';
3
+ import { Field, ImageField, Text as Text$1, ImageSizeParameters, Image as Image$1, Link as Link$1, RichText as RichText$1, RouteData, LayoutServiceData } from '@sitecore-jss/sitecore-jss-react';
4
+
5
+ interface IButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6
+ text: Field<string> | string;
7
+ }
8
+ declare const Button: ({ text, children, ...rest }: IButton) => react_jsx_runtime.JSX.Element;
9
+
10
+ type IProps$g = Omit<JSX.IntrinsicElements["input"], "type">;
11
+ declare const CheckBox: (props: IProps$g) => react_jsx_runtime.JSX.Element;
12
+
13
+ interface IProps$f {
14
+ bgImage?: ImageField | ImageField['value'] | string;
15
+ tag?: keyof JSX.IntrinsicElements;
16
+ [key: string]: any;
17
+ children?: ReactNode | ReactNode[];
18
+ }
19
+ declare const Container: ({ bgImage, style, tag, children, ...rest }: IProps$f) => react_jsx_runtime.JSX.Element;
33
20
 
34
21
  declare const Dropdown: FC<any>;
35
22
 
36
- declare const Header: FC<any>;
37
-
38
- interface ImageFieldValue {
39
- [attributeName: string]: unknown;
40
- src?: string;
41
- alt?: string;
42
- }
43
- interface ImageField {
44
- value?: ImageFieldValue;
45
- editable?: string;
46
- }
47
- interface IProps$8 {
48
- src: ImageField | ImageFieldValue;
49
- alt?: string;
50
- srcSet?: string | any[];
51
- }
52
- declare const Image: FC<IProps$8>;
53
-
54
- declare const Label: FC<any>;
55
-
56
- type IProps$7 = JSX.IntrinsicElements["hr"];
57
- declare const Linebreak: FC<IProps$7>;
58
-
59
- type ISitecoreLink = Parameters<typeof Link$1>[0];
60
- type ITextField = {
61
- value?: string | number;
62
- editable?: string;
63
- };
64
- interface ILink extends Omit<ISitecoreLink, "field" | "href"> {
65
- text?: ITextField | string;
66
- href: ISitecoreLink["field"] | string;
67
- }
68
- declare const Link: FC<ILink>;
23
+ type IScText$2 = ComponentProps<typeof Text$1>;
24
+ interface IProps$e extends Omit<IScText$2, 'field'> {
25
+ text?: Field<string> | string;
26
+ }
27
+ declare const Header: ({ text, ...rest }: IProps$e) => react_jsx_runtime.JSX.Element;
28
+
29
+ type ISitecoreImage = ComponentProps<typeof Image$1>;
30
+ interface IProps$d extends Omit<ISitecoreImage, "field" | "src" | 'srcSet' | 'alt'> {
31
+ src: ISitecoreImage['field'] | string;
32
+ alt?: string;
33
+ srcSet?: string | ImageSizeParameters[];
34
+ }
35
+ declare const Image: ({ src, alt, srcSet: htmlSrcSet, ...rest }: IProps$d) => react_jsx_runtime.JSX.Element;
36
+
37
+ type IScText$1 = ComponentProps<typeof Text$1>;
38
+ interface IProps$c extends Omit<IScText$1, 'field'> {
39
+ text?: Field<string> | string;
40
+ }
41
+ declare const Label: ({ text, ...rest }: IProps$c) => react_jsx_runtime.JSX.Element;
42
+
43
+ type IProps$b = JSX.IntrinsicElements["hr"];
44
+ declare const Linebreak: (props: IProps$b) => react_jsx_runtime.JSX.Element;
45
+
46
+ type ISitecoreLink = Parameters<typeof Link$1>[0];
47
+ interface ILink extends Omit<ISitecoreLink, "field" | "href"> {
48
+ text?: Field<string> | string;
49
+ href: ISitecoreLink["field"] | string;
50
+ [key: string]: any;
51
+ }
52
+ declare const Link: (props: ILink) => react_jsx_runtime.JSX.Element;
69
53
 
70
54
  declare const List: FC<any>;
71
55
 
72
- declare const Paragraph: FC<any>;
56
+ type IScRichText = ComponentProps<typeof RichText$1>;
57
+ interface IProps$a extends Omit<IScRichText, 'field'> {
58
+ text?: Field<string> | string;
59
+ }
60
+ declare const Paragraph: ({ tag, text, ...rest }: IProps$a) => react_jsx_runtime.JSX.Element;
73
61
 
74
- interface IProps$6 {
75
- className: string;
76
- }
77
- declare const ProgressBar: FC<IProps$6>;
62
+ interface IProps$9 {
63
+ className: string;
64
+ }
65
+ declare const ProgressBar: (props: IProps$9) => react_jsx_runtime.JSX.Element;
78
66
 
79
- interface IProps$5 {
80
- className: string;
81
- }
82
- declare const Radiobutton: FC<IProps$5>;
67
+ type IProps$8 = Omit<JSX.IntrinsicElements["input"], "type" | 'name'>;
68
+ declare const Radiobutton: (props: IProps$8) => react_jsx_runtime.JSX.Element;
83
69
 
84
- interface IProps$4 {
85
- className: string;
86
- }
87
- declare const Slider: FC<IProps$4>;
70
+ interface IProps$7 {
71
+ className: string;
72
+ }
73
+ declare const Slider: (props: IProps$7) => react_jsx_runtime.JSX.Element;
88
74
 
89
- type IProps$3 = JSX.IntrinsicElements["textarea"];
90
- declare const Textarea: FC<IProps$3>;
75
+ type IProps$6 = JSX.IntrinsicElements["textarea"];
76
+ declare const Textarea: (props: IProps$6) => react_jsx_runtime.JSX.Element;
91
77
 
92
- type IProps$2 = Omit<JSX.IntrinsicElements["input"], "type">;
93
- declare const Textinput: FC<IProps$2>;
78
+ type IProps$5 = Omit<JSX.IntrinsicElements["input"], "type">;
79
+ declare const Textinput: (props: IProps$5) => react_jsx_runtime.JSX.Element;
94
80
 
95
- declare const Toggle: FC<any>;
81
+ interface IProps$4 extends Omit<JSX.IntrinsicElements["input"], "type"> {
82
+ slider?: string;
83
+ }
84
+ declare const Toggle: (props: IProps$4) => react_jsx_runtime.JSX.Element;
96
85
 
97
86
  declare const TypeForm: FC<any>;
98
87
 
99
- declare const Video: FC<any>;
88
+ interface IProps$3 extends Omit<VideoHTMLAttributes<HTMLVideoElement>, 'src' | 'muted'> {
89
+ src?: Field<string> | string;
90
+ muted?: boolean | string;
91
+ }
92
+ declare const Video: ({ src, ...rest }: IProps$3) => react_jsx_runtime.JSX.Element;
100
93
 
101
- interface IProps$1 {
102
- text?: {
103
- value?: string | number;
104
- editable?: string;
105
- } | string;
106
- tag?: keyof JSX.IntrinsicElements;
107
- [key: string]: any;
108
- }
109
- declare const Text: FC<IProps$1>;
94
+ type IScText = ComponentProps<typeof Text$1>;
95
+ interface IProps$2 extends Omit<IScText, 'field' | 'tag'> {
96
+ text?: Field<string> | string;
97
+ tag?: keyof JSX.IntrinsicElements;
98
+ }
99
+ declare const Text: ({ text, children, tag, ...rest }: IProps$2) => react_jsx_runtime.JSX.Element;
110
100
 
111
- declare const RichText: FC<any>;
101
+ type ScRichTextProps = ComponentProps<typeof RichText$1>;
102
+ interface IProps$1 extends Omit<ScRichTextProps, 'field'> {
103
+ value?: Field<string> | string;
104
+ }
105
+ declare const RichText: ({ value, tag, ...rest }: IProps$1) => react_jsx_runtime.JSX.Element;
112
106
 
113
107
  declare const Repeater: FC<any>;
114
108
 
115
- interface IProps {
116
- component: ({ fields, children }: React.PropsWithChildren<{
117
- fields: JsonObject;
118
- }>) => JSX.Element;
119
- datasource: IConsciaIntegration | IContentstackIntegration | IKontentAiIntegration;
120
- loadingComponent?: JSX.Element;
121
- errorComponent?: JSX.Element;
122
- emptyComponent?: JSX.Element;
123
- children?: JSX.Element[];
124
- }
125
- interface IContentstackIntegration {
126
- provider: 'contentstack';
127
- hostUrl?: string;
128
- apiKey: string;
129
- deliveryToken: string;
130
- language?: string;
131
- branch?: string;
132
- environment: string;
133
- contentTypeUid: string;
134
- entryUid: string;
135
- }
136
- interface IConsciaIntegration {
137
- provider: 'conscia.ai';
138
- hostUrl: string;
139
- customerCode: string;
140
- apiToken: string;
141
- environment: string;
142
- componentCode: string;
143
- }
144
- interface IKontentAiIntegration {
145
- provider: "kontent.ai";
146
- environmentId: string;
147
- deliveryApiToken: string;
148
- contentItemCodename: string;
149
- }
109
+ interface ICompProps {
110
+ fields: any;
111
+ children?: JSX.Element[];
112
+ params?: {
113
+ styles: string;
114
+ [key: string]: any;
115
+ };
116
+ rootClassName?: string;
117
+ }
118
+ interface IProps {
119
+ component: ({ fields, children, params, rootClassName }: React.PropsWithChildren<ICompProps>) => JSX.Element;
120
+ datasource: IConsciaIntegration | IContentstackIntegration | IKontentAiIntegration;
121
+ loadingComponent?: JSX.Element;
122
+ errorComponent?: JSX.Element;
123
+ emptyComponent?: JSX.Element;
124
+ children?: JSX.Element[];
125
+ rootClassName?: string;
126
+ }
127
+ interface IContentstackIntegration {
128
+ provider: "contentstack";
129
+ hostUrl?: string;
130
+ apiKey: string;
131
+ deliveryToken: string;
132
+ language?: string;
133
+ branch?: string;
134
+ environment: string;
135
+ contentTypeUid: string;
136
+ entryUid: string;
137
+ }
138
+ interface IConsciaIntegration {
139
+ provider: "conscia.ai";
140
+ hostUrl: string;
141
+ customerCode: string;
142
+ apiToken: string;
143
+ environment: string;
144
+ componentCode: string;
145
+ }
146
+ interface IKontentAiIntegration {
147
+ provider: "kontent.ai";
148
+ environmentId: string;
149
+ deliveryApiToken: string;
150
+ contentItemCodename: string;
151
+ }
150
152
  declare const KajooComponent: (props: IProps) => react_jsx_runtime.JSX.Element;
151
153
 
152
- interface ILayoutProps extends RouteData {
153
- layoutData: LayoutServiceData;
154
- }
155
- type ILayout = React.FC<ILayoutProps>;
156
- declare class KajooLayoutFactory {
157
- private static readonly layoutsByName;
158
- static getLayout: (route: RouteData) => ILayout;
159
- static registerLayout: (name: string, layout: ILayout) => void;
154
+ interface ILayoutProps extends RouteData {
155
+ layoutData: LayoutServiceData;
156
+ }
157
+ type ILayout = React.FC<ILayoutProps>;
158
+ declare class KajooLayoutFactory {
159
+ private static readonly layoutsByName;
160
+ static getLayout: (route: RouteData) => ILayout;
161
+ static registerLayout: (name: string, layout: ILayout) => void;
160
162
  }
161
163
 
162
- export { Button, CheckBox as Checkbox, IProps$a as CheckboxProps, Container, Dropdown, Header, Image, KajooComponent, IProps as KajooComponentProps, KajooLayoutFactory, 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 };
164
+ export { Button, CheckBox as Checkbox, IProps$g as CheckboxProps, Container, Dropdown, Header, Image, KajooComponent, IProps as KajooComponentProps, KajooLayoutFactory, Label, Linebreak, IProps$b as LinebreakProps, Link, List, Paragraph, ProgressBar, Radiobutton, IProps$8 as RadiobuttonProps, Repeater, RichText, Slider, IProps$7 as SliderProps, Text, Textarea, IProps$6 as TextareaProps, Textinput, IProps$5 as TextinputProps, Toggle, TypeForm, Video };