datasync-blob 1.1.4 → 1.1.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.
- package/dist/DsBlob.js +6 -32
- package/dist/types/DsBlob.d.ts +1 -0
- package/package.json +1 -1
package/dist/DsBlob.js
CHANGED
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { Component } from "react";
|
|
12
|
+
import "./DsBlob.css";
|
|
12
13
|
export class DsBlob extends Component {
|
|
13
14
|
constructor(props) {
|
|
14
15
|
super(props);
|
|
@@ -131,39 +132,12 @@ export class DsBlob extends Component {
|
|
|
131
132
|
this.debugging = false;
|
|
132
133
|
}
|
|
133
134
|
render() {
|
|
134
|
-
|
|
135
|
-
cursor: "pointer"
|
|
136
|
-
};
|
|
137
|
-
const upload_picture_label_input = {
|
|
138
|
-
opacity: "0",
|
|
139
|
-
width: "0px",
|
|
140
|
-
height: "0px"
|
|
141
|
-
};
|
|
142
|
-
const div_show_image_hover = {
|
|
143
|
-
position: "relative",
|
|
144
|
-
margin: "0px",
|
|
145
|
-
opacity: "0.5"
|
|
146
|
-
};
|
|
147
|
-
const div_show_image = {
|
|
148
|
-
position: "relative",
|
|
149
|
-
margin: "0px"
|
|
150
|
-
};
|
|
151
|
-
const div_show_image_hover_input = {
|
|
152
|
-
display: "block",
|
|
153
|
-
top: "0px",
|
|
154
|
-
left: "0px",
|
|
155
|
-
position: "absolute"
|
|
156
|
-
};
|
|
157
|
-
const div_show_image_input = {
|
|
158
|
-
position: "absolute",
|
|
159
|
-
display: "none",
|
|
160
|
-
cursor: "pointer"
|
|
161
|
-
};
|
|
135
|
+
// Styles moved to external CSS file: DsBlob.css
|
|
162
136
|
return (_jsxs("div", { children: [(!this.props.data) &&
|
|
163
|
-
_jsxs("label", { id: "upload-picture-label", className: this.props.buttonStyle
|
|
164
|
-
_jsxs("div", { className: "show-image",
|
|
137
|
+
_jsxs("label", { id: "upload-picture-label", className: `upload-picture-label ${this.props.buttonStyle}`, children: [this.props.Caption, _jsx("input", { className: "upload-picture-label-input", id: "nested-input", type: "file", accept: "image/*", onChange: this.onInputChange, multiple: true })] }), (this.props.data && this.props.data.length > 0) &&
|
|
138
|
+
_jsxs("div", { className: "show-image", onMouseOver: () => { this.setState({ hover_input: true, hover_image: true }, () => { if (this.debugging)
|
|
165
139
|
console.log("onMouseOver"); }); }, onMouseLeave: () => { this.setState({ hover_input: false, hover_image: false }, () => { if (this.debugging)
|
|
166
|
-
console.log("onMouseLeave"); }); }, children: [_jsx("img", {
|
|
167
|
-
_jsx("input", {
|
|
140
|
+
console.log("onMouseLeave"); }); }, children: [_jsx("img", { className: `${this.state.hover_image ? "div-show-image-hover" : "div-show-image"} ${this.props.pictureStyle}`, src: (this.props.removebase64) ? "data:image/png;base64" : "" + this.props.data, alt: this.props.Caption || "uploaded image" }), !this.props.readOnly &&
|
|
141
|
+
_jsx("input", { className: `btn btn-primary delete ${this.state.hover_input ? "div-show-image-hover-input" : "div-show-image-input"}`, type: "button", value: "Effacer", onClick: this.resetUpload })] })] }));
|
|
168
142
|
}
|
|
169
143
|
}
|
package/dist/types/DsBlob.d.ts
CHANGED