@mgonza02/goal-image-gallery 1.0.7 → 1.0.8
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.
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to the GoalImageGallery project will be documented in this f
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.8] - 2025-07-14
|
|
9
|
+
|
|
10
|
+
### 🧹 Bug Fixes
|
|
11
|
+
- Fixed an issue with the `use-image-gallery` hook where the `imageCodes` prop was not being correctly split into an array.
|
|
12
|
+
- Updated the `GoalImageGallery` component to ensure the `currentCompany` prop can accept both string and number types for better flexibility.
|
|
13
|
+
- Removed unused `clipboardSupport` prop from the `GoalImageGallery` component to avoid confusion.
|
|
14
|
+
- Ensured consistent handling of `currentCompany` across all components.
|
|
15
|
+
|
|
16
|
+
|
|
8
17
|
## [1.0.7] - 2025-07-14
|
|
9
18
|
### 🧹 Bug fix
|
|
10
19
|
- Fixed an issue with clipboard support detection in the `use-image-gallery` hook.
|
package/lib/GoalImageGallery.js
CHANGED
|
@@ -231,7 +231,7 @@ const GoalImageGallery = _ref => {
|
|
|
231
231
|
noImageUrl = "/images/no-image.png",
|
|
232
232
|
showError = message => console.error(message),
|
|
233
233
|
hasPermission = () => true,
|
|
234
|
-
currentCompany =
|
|
234
|
+
currentCompany = 0,
|
|
235
235
|
slot = {},
|
|
236
236
|
slotProps = {}
|
|
237
237
|
} = _ref;
|
|
@@ -415,7 +415,7 @@ GoalImageGallery.propTypes = {
|
|
|
415
415
|
noImageUrl: PropTypes.string,
|
|
416
416
|
showError: PropTypes.func,
|
|
417
417
|
hasPermission: PropTypes.func,
|
|
418
|
-
currentCompany: PropTypes.string,
|
|
418
|
+
currentCompany: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
419
419
|
slot: PropTypes.object,
|
|
420
420
|
slotProps: PropTypes.object
|
|
421
421
|
};
|
|
@@ -26,7 +26,7 @@ export const useImageGallery = _ref => {
|
|
|
26
26
|
|
|
27
27
|
// Process image codes into image list
|
|
28
28
|
useEffect(() => {
|
|
29
|
-
const splitedImages = Array.isArray(imageCodes) ? imageCodes : imageCodes?.split(/[\s,]+/);
|
|
29
|
+
const splitedImages = Array.isArray(imageCodes) ? imageCodes : (imageCodes || '')?.split(/[\s,]+/);
|
|
30
30
|
let newList = [];
|
|
31
31
|
if (splitedImages) {
|
|
32
32
|
const list = splitedImages.map((image_code, index) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgonza02/goal-image-gallery",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Advanced, accessible, and highly customizable React image gallery component with multi-method upload, responsive design, and extensive TypeScript support",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|