@kajoo-ai/sitecore-react 0.0.12 → 15.0.0

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