@ndla/image-search 11.0.65-alpha.0 → 11.0.67-alpha.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "0.46.0",
2
+ "schemaVersion": "0.48.0",
3
3
  "styles": {
4
4
  "atomic": [
5
5
  "display]___[value:flex",
package/es/ImageSearch.js CHANGED
@@ -89,7 +89,7 @@ const ImageSearch = _ref => {
89
89
  fetchImage(Number.parseInt(image.id)).then(result => {
90
90
  setSelectedImage(result);
91
91
  }).catch(err => {
92
- onError(err);
92
+ onError?.(err);
93
93
  });
94
94
  }
95
95
  };
@@ -112,7 +112,7 @@ const ImageSearch = _ref => {
112
112
  setSearchResult(result);
113
113
  setSearching(false);
114
114
  }).catch(err => {
115
- onError(err);
115
+ onError?.(err);
116
116
  setSearching(false);
117
117
  });
118
118
  };
@@ -30,7 +30,7 @@ interface Props {
30
30
  onImageSelect: (image: IImageMetaInformationV3) => void;
31
31
  searchImages: (query: string | undefined, page: number | undefined) => Promise<ISearchResultV3>;
32
32
  fetchImage: (id: number) => Promise<IImageMetaInformationV3>;
33
- onError: (err: any) => void;
33
+ onError?: (err: any) => void;
34
34
  locale: string;
35
35
  noResults?: ReactNode;
36
36
  checkboxAction?: (image: IImageMetaInformationV3) => void;
@@ -96,7 +96,7 @@ const ImageSearch = _ref => {
96
96
  fetchImage(Number.parseInt(image.id)).then(result => {
97
97
  setSelectedImage(result);
98
98
  }).catch(err => {
99
- onError(err);
99
+ onError?.(err);
100
100
  });
101
101
  }
102
102
  };
@@ -119,7 +119,7 @@ const ImageSearch = _ref => {
119
119
  setSearchResult(result);
120
120
  setSearching(false);
121
121
  }).catch(err => {
122
- onError(err);
122
+ onError?.(err);
123
123
  setSearching(false);
124
124
  });
125
125
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/image-search",
3
- "version": "11.0.65-alpha.0",
3
+ "version": "11.0.67-alpha.0",
4
4
  "description": "A simple library for searching images from NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -26,16 +26,16 @@
26
26
  "es"
27
27
  ],
28
28
  "dependencies": {
29
- "@ndla/icons": "^8.0.44-alpha.0",
29
+ "@ndla/icons": "^8.0.46-alpha.0",
30
30
  "@ndla/licenses": "^8.0.4-alpha.0",
31
- "@ndla/primitives": "^1.0.57-alpha.0",
32
- "@ndla/styled-system": "^0.0.27",
31
+ "@ndla/primitives": "^1.0.59-alpha.0",
32
+ "@ndla/styled-system": "^0.0.29",
33
33
  "pretty-bytes": "^5.6.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@ndla/preset-panda": "^0.0.45",
36
+ "@ndla/preset-panda": "^0.0.47",
37
37
  "@ndla/types-backend": "^0.2.86",
38
- "@pandacss/dev": "^0.46.0"
38
+ "@pandacss/dev": "^0.48.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">= 18",
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "3f2d720f26b163be90b396f40f3c1fad746b3cf9"
47
+ "gitHead": "8929fb445477b02e740a9a21fd2d3ef08287d99c"
48
48
  }