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