@kajoo-ai/sitecore-react 20.0.3 → 20.0.5

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 -12
  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 -12
  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 -138
  73. package/dist/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +51 -56
package/dist/index.d.ts CHANGED
@@ -1,163 +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
- children?: React.ReactNode;
14
- }
15
- declare const Button: FC<IButton>;
16
-
17
- interface IProps$a {
18
- className: string;
19
- [key: string]: unknown;
20
- }
21
- declare const CheckBox: FC<IProps$a>;
22
-
23
- interface IProps$9 {
24
- bgImage?: {
25
- value: {
26
- src: string;
27
- };
28
- };
29
- tag?: keyof JSX.IntrinsicElements;
30
- [key: string]: any;
31
- children: ReactNode | ReactNode[];
32
- }
33
- 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;
34
20
 
35
21
  declare const Dropdown: FC<any>;
36
22
 
37
- declare const Header: FC<any>;
38
-
39
- interface ImageFieldValue {
40
- [attributeName: string]: unknown;
41
- src?: string;
42
- alt?: string;
43
- }
44
- interface ImageField {
45
- value?: ImageFieldValue;
46
- editable?: string;
47
- }
48
- interface IProps$8 {
49
- src: ImageField | ImageFieldValue;
50
- alt?: string;
51
- srcSet?: string | any[];
52
- }
53
- declare const Image: FC<IProps$8>;
54
-
55
- declare const Label: FC<any>;
56
-
57
- type IProps$7 = JSX.IntrinsicElements["hr"];
58
- declare const Linebreak: FC<IProps$7>;
59
-
60
- type ISitecoreLink = Parameters<typeof Link$1>[0];
61
- type ITextField = {
62
- value?: string | number;
63
- editable?: string;
64
- };
65
- interface ILink extends Omit<ISitecoreLink, "field" | "href"> {
66
- text?: ITextField | string;
67
- href: ISitecoreLink["field"] | string;
68
- }
69
- 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;
70
53
 
71
54
  declare const List: FC<any>;
72
55
 
73
- 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;
74
61
 
75
- interface IProps$6 {
76
- className: string;
77
- }
78
- 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;
79
66
 
80
- interface IProps$5 {
81
- className: string;
82
- }
83
- 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;
84
69
 
85
- interface IProps$4 {
86
- className: string;
87
- }
88
- 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;
89
74
 
90
- type IProps$3 = JSX.IntrinsicElements["textarea"];
91
- 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;
92
77
 
93
- type IProps$2 = Omit<JSX.IntrinsicElements["input"], "type">;
94
- 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;
95
80
 
96
- 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;
97
85
 
98
86
  declare const TypeForm: FC<any>;
99
87
 
100
- 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;
101
93
 
102
- interface IProps$1 {
103
- text?: {
104
- value?: string | number;
105
- editable?: string;
106
- } | string;
107
- tag?: keyof JSX.IntrinsicElements;
108
- [key: string]: any;
109
- }
110
- 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;
111
100
 
112
- 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;
113
106
 
114
107
  declare const Repeater: FC<any>;
115
108
 
116
- interface IProps {
117
- component: ({ fields, children }: React.PropsWithChildren<{
118
- fields: JsonObject;
119
- }>) => JSX.Element;
120
- datasource: IConsciaIntegration | IContentstackIntegration | IKontentAiIntegration;
121
- loadingComponent?: JSX.Element;
122
- errorComponent?: JSX.Element;
123
- emptyComponent?: JSX.Element;
124
- children?: JSX.Element[];
125
- }
126
- interface IContentstackIntegration {
127
- provider: 'contentstack';
128
- hostUrl?: string;
129
- apiKey: string;
130
- deliveryToken: string;
131
- language?: string;
132
- branch?: string;
133
- environment: string;
134
- contentTypeUid: string;
135
- entryUid: string;
136
- }
137
- interface IConsciaIntegration {
138
- provider: 'conscia.ai';
139
- hostUrl: string;
140
- customerCode: string;
141
- apiToken: string;
142
- environment: string;
143
- componentCode: string;
144
- }
145
- interface IKontentAiIntegration {
146
- provider: "kontent.ai";
147
- environmentId: string;
148
- deliveryApiToken: string;
149
- contentItemCodename: string;
150
- }
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
+ }
151
152
  declare const KajooComponent: (props: IProps) => react_jsx_runtime.JSX.Element;
152
153
 
153
- interface ILayoutProps extends RouteData {
154
- layoutData: LayoutServiceData;
155
- }
156
- type ILayout = React.FC<ILayoutProps>;
157
- declare class KajooLayoutFactory {
158
- private static readonly layoutsByName;
159
- static getLayout: (route: RouteData) => ILayout;
160
- 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;
161
162
  }
162
163
 
163
- 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 };