@pie-lib/editable-html 11.0.9-next.14 → 11.0.9-next.16
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.
|
@@ -64,6 +64,9 @@ var AltDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
64
64
|
|
|
65
65
|
_this.closeDialog();
|
|
66
66
|
});
|
|
67
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleOverflow", function () {
|
|
68
|
+
document.body.style.removeProperty('overflow');
|
|
69
|
+
});
|
|
67
70
|
var alt = props.alt;
|
|
68
71
|
_this.state = {
|
|
69
72
|
value: alt
|
|
@@ -82,7 +85,9 @@ var AltDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
82
85
|
disablePortal: true,
|
|
83
86
|
onClose: this.closeDialog,
|
|
84
87
|
id: "text-dialog",
|
|
85
|
-
hideBackdrop: true
|
|
88
|
+
hideBackdrop: true,
|
|
89
|
+
disableScrollLock: true,
|
|
90
|
+
onEntered: this.handleOverflow
|
|
86
91
|
}, /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
92
|
style: {
|
|
88
93
|
display: 'flex'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugins/image/alt-dialog.jsx"],"names":["AltDialog","props","allDialogs","document","querySelectorAll","forEach","s","remove","onDone","value","state","closeDialog","alt","display","paddingTop","event","setState","target","
|
|
1
|
+
{"version":3,"sources":["../../../src/plugins/image/alt-dialog.jsx"],"names":["AltDialog","props","allDialogs","document","querySelectorAll","forEach","s","remove","onDone","value","state","closeDialog","body","style","removeProperty","alt","handleOverflow","display","paddingTop","event","setState","target","fontSize","React","Component","PropTypes","func","isRequired","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,S;;;;;AAMX,qBAAYC,KA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AAE,6CAFf;AAGE,QAAA,UAAU,EACR,0HAJJ;AAME,QAAA,KAAK,EAAET,KANT;AAOE,QAAA,QAAQ,EAAE,kBAACU,KAAD;AAAA,iBAAW,MAAI,CAACC,QAAL,CAAc;AAAEX,YAAAA,KAAK,EAAEU,KAAK,CAACE,MAAN,CAAaZ;AAAtB,WAAd,CAAX;AAAA,SAPZ;AAQE,QAAA,mBAAmB,EAAE;AAAEI,UAAAA,KAAK,EAAE;AAAES,YAAAA,QAAQ,EAAE;AAAZ;AAAT;AARvB,QAFF,CADF,CATF,eAwBE,gCAAC,yBAAD,qBACE,gCAAC,kBAAD;AAAQ,QAAA,OAAO,EAAE,KAAKd;AAAtB,gBADF,CAxBF,CADF;AA8BD;;;EArE4Be,kBAAMC,S;;;iCAAxBxB,S,eACQ;AACjBQ,EAAAA,MAAM,EAAEiB,sBAAUC,IAAV,CAAeC,UADN;AAEjBZ,EAAAA,GAAG,EAAEU,sBAAUG;AAFE,C;eAuEN5B,S","sourcesContent":["import React from 'react';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport ArrowBackIos from '@material-ui/icons/ArrowBackIos';\nimport TextField from '@material-ui/core/TextField';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport PropTypes from 'prop-types';\n\nexport class AltDialog extends React.Component {\n static propTypes = {\n onDone: PropTypes.func.isRequired,\n alt: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n\n const { alt } = props;\n\n this.state = {\n value: alt,\n };\n }\n\n closeDialog = () => {\n const allDialogs = document.querySelectorAll('#text-dialog');\n\n allDialogs.forEach(function(s) {\n return s.remove();\n });\n };\n\n onDone = () => {\n const { onDone } = this.props;\n const { value } = this.state;\n\n onDone(value);\n this.closeDialog();\n };\n\n handleOverflow = () => {\n document.body.style.removeProperty('overflow');\n };\n\n render() {\n const { value } = this.state;\n\n return (\n <Dialog\n open\n disablePortal\n onClose={this.closeDialog}\n id=\"text-dialog\"\n hideBackdrop\n disableScrollLock\n onEntered={this.handleOverflow}\n >\n <DialogContent>\n <div style={{ display: 'flex' }}>\n <ArrowBackIos style={{ paddingTop: '6px' }} />\n <TextField\n multiline\n placeholder={'Enter an Alt Text description of this image'}\n helperText={\n 'Users with visual limitations rely on Alt Text, since screen readers cannot otherwise describe the contents of an image.'\n }\n value={value}\n onChange={(event) => this.setState({ value: event.target.value })}\n FormHelperTextProps={{ style: { fontSize: 14 } }}\n />\n </div>\n </DialogContent>\n <DialogActions>\n <Button onClick={this.onDone}>Done</Button>\n </DialogActions>\n </Dialog>\n );\n }\n}\n\nexport default AltDialog;\n"],"file":"alt-dialog.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/editable-html",
|
|
3
|
-
"version": "11.0.9-next.
|
|
3
|
+
"version": "11.0.9-next.16+cdfc89f1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "cdfc89f1adbf80c0e61f3b7c4c3c8516d722f235",
|
|
51
51
|
"scripts": {}
|
|
52
52
|
}
|
|
@@ -39,11 +39,23 @@ export class AltDialog extends React.Component {
|
|
|
39
39
|
this.closeDialog();
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
handleOverflow = () => {
|
|
43
|
+
document.body.style.removeProperty('overflow');
|
|
44
|
+
};
|
|
45
|
+
|
|
42
46
|
render() {
|
|
43
47
|
const { value } = this.state;
|
|
44
48
|
|
|
45
49
|
return (
|
|
46
|
-
<Dialog
|
|
50
|
+
<Dialog
|
|
51
|
+
open
|
|
52
|
+
disablePortal
|
|
53
|
+
onClose={this.closeDialog}
|
|
54
|
+
id="text-dialog"
|
|
55
|
+
hideBackdrop
|
|
56
|
+
disableScrollLock
|
|
57
|
+
onEntered={this.handleOverflow}
|
|
58
|
+
>
|
|
47
59
|
<DialogContent>
|
|
48
60
|
<div style={{ display: 'flex' }}>
|
|
49
61
|
<ArrowBackIos style={{ paddingTop: '6px' }} />
|