oolib 2.101.5 → 2.101.7
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.
|
@@ -46,7 +46,7 @@ var FileUploadShell_1 = require("../../../../../FileUploadWrapper/comps/FileUplo
|
|
|
46
46
|
var Plus = icons_1.icons.Plus;
|
|
47
47
|
var GalleryThumbnails = function (_a) {
|
|
48
48
|
var activeIdx = _a.activeIdx, setActiveIdx = _a.setActiveIdx;
|
|
49
|
-
var _b = (0, ImageInputContext_1.useImageInputContext)(), value = _b.value, isLoading = _b.isLoading, noOfImagesUploading = _b.noOfImagesUploading, readOnly = _b.readOnly, invert = _b.invert, aspectRatio = _b.aspectRatio;
|
|
49
|
+
var _b = (0, ImageInputContext_1.useImageInputContext)(), value = _b.value, isLoading = _b.isLoading, noOfImagesUploading = _b.noOfImagesUploading, readOnly = _b.readOnly, invert = _b.invert, aspectRatio = _b.aspectRatio, handleUpload = _b.handleUpload, onChange = _b.onChange, id = _b.id;
|
|
50
50
|
var _c = (0, react_1.useState)(0), placeholderThumbsToRender = _c[0], setPlaceholderThumbsToRender = _c[1];
|
|
51
51
|
var totThumbsSpaceRef = (0, react_1.useRef)(null);
|
|
52
52
|
var addMoreThumbnailRef = (0, react_1.useRef)(null);
|
|
@@ -69,7 +69,7 @@ var GalleryThumbnails = function (_a) {
|
|
|
69
69
|
var imageThumbnailsData = __spreadArray(__spreadArray([], ((0, makeArrayFromLength_1.makeArrayFromLength)(noOfImagesUploading).map(function (d) { return undefined; })), true), (value || []), true);
|
|
70
70
|
return (react_1.default.createElement("div", { ref: totThumbsSpaceRef, style: { display: 'flex', gap: '1rem' } },
|
|
71
71
|
!readOnly && (react_1.default.createElement(styled_1.StyledAddMoreThumbnail, { ref: addMoreThumbnailRef, disabled: isLoading, noBorder: true, invert: invert },
|
|
72
|
-
react_1.default.createElement(FileUploadShell_1.FileUploadShell, { disabled: isLoading, multiple: true },
|
|
72
|
+
react_1.default.createElement(FileUploadShell_1.FileUploadShell, { disabled: isLoading, multiple: true, handleUpload: handleUpload, onChange: onChange, value: value, id: id },
|
|
73
73
|
react_1.default.createElement("div", { style: {
|
|
74
74
|
display: "grid",
|
|
75
75
|
placeItems: "center",
|
|
@@ -51,8 +51,9 @@ var SliderShell = function (_a) {
|
|
|
51
51
|
});
|
|
52
52
|
},
|
|
53
53
|
}).handleDragStart;
|
|
54
|
-
return (react_1.default.createElement(styled_1.StyledFlexWrapper, { ref: wrapperRef
|
|
55
|
-
value.map(function (v, idx) { return (react_1.default.createElement(styled_1.StyledFlexItem, { key: (v === null || v === void 0 ? void 0 : v.publicUrl) || idx, marginLeft: idx === 0 && activeIdx * -100 + "%" },
|
|
54
|
+
return (react_1.default.createElement(styled_1.StyledFlexWrapper, { ref: wrapperRef },
|
|
55
|
+
value.map(function (v, idx) { return (react_1.default.createElement(styled_1.StyledFlexItem, { key: (v === null || v === void 0 ? void 0 : v.publicUrl) || idx, marginLeft: idx === 0 && activeIdx * -100 + "%" },
|
|
56
|
+
react_1.default.createElement("div", { onTouchStart: handleDragStart, onMouseDown: handleDragStart }, render(v, idx) /* explicitly called, cuz we want an error to throw if render prop aint passed thru */))); }),
|
|
56
57
|
!isLoading && value.length > 1 && !imageUnderEdit && react_1.default.createElement(react_1.Fragment, null,
|
|
57
58
|
react_1.default.createElement(styled_1.StyledCaretLeft, { onClick: function () {
|
|
58
59
|
return setActiveIdx(activeIdx > 0 ? activeIdx - 1 : value.length - 1);
|