From 8749cc3733741f07847bc98933606b88ea088ac1 Mon Sep 17 00:00:00 2001 From: Dubjay18 Date: Thu, 23 Sep 2021 14:20:06 -1200 Subject: [PATCH 01/10] fix:image cropper first fix --- .../components/Image crop/Cropping.module.css | 596 ++++++++++-------- .../src/components/Image crop/ImageCropper.js | 41 +- frontend/src/components/Image crop/index.js | 8 +- frontend/src/components/Image crop/reveal.js | 9 +- frontend/src/components/ImagePreview/index.js | 28 +- frontend/yarn.lock | 522 +-------------- root-config/dist/zuri-root-config.js.map | 2 +- 7 files changed, 410 insertions(+), 796 deletions(-) diff --git a/frontend/src/components/Image crop/Cropping.module.css b/frontend/src/components/Image crop/Cropping.module.css index d021e801..40c57118 100644 --- a/frontend/src/components/Image crop/Cropping.module.css +++ b/frontend/src/components/Image crop/Cropping.module.css @@ -1,270 +1,368 @@ - .container { - position: relative; - width: 53%; - height: 680px; - background: #000000; - display: flex; - justify-content: space-between; - padding: 20px 60px 20px 10px; - } - - .preview { - width: 100%; - height: 100%; - bottom: 49.8%; - left: 9%; - background: #C4C4C4; - border-radius: 10px; - z-index: 1; - } - - .first { - display: flex; - flex-direction: column; - justify-content: space-around; - align-items: center; - width: 55.5%; - } - - .second { - display: flex; - flex-direction: column; - justify-content: space-between; - padding: 40px 10px 10px 10px; - width: 80%; - } - - .imagetobecropped { - position: relative; - width: 83%; - height: 467px; - background: rgba(0, 0, 0, 0.31); - border-radius: 10px; - border: 10px solid #161616; - padding-right: 10px; - padding-bottom: 10px; - margin-left: 70px; - } - - .cropper-canvas { - flex: 1; - width: 500px; - height: 100%; - resize: contain; - } - - .cropbg { - position: fixed; - width: 100%; - height: 100vh; - left: 0; - top: 0; - background: rgba(0, 0, 0, 0.6); - display: flex; - justify-content: center; - align-items: center; - } - - .cropbtn { - width: 50%; - height: 42px; - margin-left: 63px; - margin-top: 64px; - background: rgba(48, 46, 46, 0.99); - border-radius: 5px; - font-family: Lato; - font-style: normal; - font-weight: 600; - font-size: 18px; - line-height: 19px; - color: #fff; - } - - .cropbtn:active { - background-color: #FFFFFF; - color: Black; - animation: ease-in-out .3s; - } - - .cropbtn:hover { - background-color: #FFFFFF; - color: Black; - animation: ease-in-out .3s; - } - - .rotatebtn { - width: 50%; - height: 42px; - margin-left: 63px; - margin-top: 41px; - background: rgba(48, 46, 46, 0.99); - border-radius: 5px; - font-family: Lato; - font-style: normal; - font-weight: 600; - font-size: 18px; - line-height: 19px; - color: #FFFFFF; - } - - .rotatebtn:active { - animation: shake .3s; - } - - @keyframes shake { - 0% { - transform: translate(1px, 1px) rotate(0deg); - } - 10% { - transform: translate(-1px, -2px) rotate(-1deg); - } - } - - .savebtn { - position: relative; - width: 30%; - height: 48px; - background: #00B87C; - border-radius: 3px; - font-family: Lato; - font-style: normal; - font-weight: 600; - font-size: 18px; - line-height: 24px; - color: #FFFFFF; - margin-left: 66%; - } - - .image { - position: relative; - width: 286px; - height: 445px; - left: 288px; - top: 49px; - background: rgba(0, 0, 0, 0.31); - border-radius: 10px; - border: 4px solid #161616; - width: 506px; - height: 445px; - } - - img .image { - flex: 1; - width: 150%; - height: 100%; - resize: contain; - } - - .previewcontainer { - z-index: 0; - width: 62%; - bottom: 49.8%; - margin-left: 21%; - margin-top: 18.6%; - height: 258px; - text-align: center; - color: #C4C4C4; - border: 1px solid #C4C4C4; - box-sizing: border-box; - border-radius: 10px; - font-size: 19px; - } - - .crop { - background-color: Black; - border-radius: 10px; - color: white; - padding: 10px; - } - - .close { - position: absolute; - left: 80%; - bottom: 80%; - color: white; - background-color: white; - z-index: 1; - } - - .cancel { - width: 48px; - height: 19px; - margin-left: 10%; - margin-top: 77px; - font-family: Lato; - font-style: normal; - font-weight: 900; - font-size: 18px; - line-height: 19px; - color: #C4C4C4; - } - - .text { - z-index: 10; - color: white; - position: absolute; - top: 20%; - left: 14%; - width: 17%; - text-align: center; - z-index: 0; - } - - @media screen and (max-width:1200px) { .container { - width: 320px; - top: 60px; - flex-direction: column-reverse; - height: 70%; + position: relative; + width: 53%; + height: 680px; + background: #000000; + display: flex; + justify-content: space-between; + padding: 20px 60px 20px 10px; } + .preview { - display: none; - } - .previewcontainer { - display: none; - } - .cancel { - display: none; + width: 100%; + height: 100%; + bottom: 49.8%; + left: 9%; + background: #C4C4C4; + border-radius: 10px; + z-index: 1; } + .first { - flex-direction: row; - justify-content: space-between; - width: 100%; - height: 20%; - margin-left: 10% + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + width: 55.5%; } + .second { + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 40px 10px 10px 10px; + width: 80%; + } + + .imagetobecropped { + position: relative; + width: 83%; + height: 467px; + background: rgba(0, 0, 0, 0.31); + border-radius: 10px; + border: 10px solid #161616; + padding-right: 10px; + padding-bottom: 10px; + margin-left: 70px; + } + + .cropper-canvas { + flex: 1; + width: 500px; + height: 100%; + resize: contain; + } + + .cropbg { + position: fixed; width: 100%; - margin-left: 10%; - height: 60%; + height: 100vh; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.6); + display: flex; + justify-content: center; + align-items: center; } + .cropbtn { - margin: 0; - padding: 1px; - width: 100px; - font-size: 15px; + width: 50%; + height: 42px; + margin-left: 63px; + margin-top: 64px; + background: rgba(48, 46, 46, 0.99); + border-radius: 5px; + font-family: Lato; + font-style: normal; + font-weight: 600; + font-size: 18px; + line-height: 19px; + color: #fff; + } + + .cropbtn:active { + background-color: #FFFFFF; + color: Black; + animation: ease-in-out .3s; + } + + .cropbtn:hover { + background-color: #FFFFFF; + color: Black; + animation: ease-in-out .3s; } + .rotatebtn { - margin: 0; - padding: 1px; - width: 100px; - font-size: 15px; + width: 50%; + height: 42px; + margin-left: 63px; + margin-top: 41px; + margin-bottom: 77px; + background: rgba(48, 46, 46, 0.99); + border-radius: 5px; + font-family: Lato; + font-style: normal; + font-weight: 600; + font-size: 18px; + line-height: 19px; + color: #FFFFFF; } - .imagetobecropped { - width: 100%; - margin: 0; - height: 100%; + + .rotatebtn:active { + animation: shake .3s; + } + + @keyframes shake { + 0% { + transform: translate(1px, 1px) rotate(0deg); + } + 10% { + transform: translate(-1px, -2px) rotate(-1deg); + } } + .savebtn { - display: none; + position: relative; + width: 30%; + height: 48px; + background: #00B87C; + border-radius: 3px; + font-family: Lato; + font-style: normal; + font-weight: 600; + font-size: 18px; + line-height: 24px; + color: #FFFFFF; + margin-left: 66%; } + + .image { + position: relative; + width: 286px; + height: 445px; + left: 288px; + top: 49px; + background: rgba(0, 0, 0, 0.31); + border-radius: 10px; + border: 4px solid #161616; + width: 506px; + height: 445px; + } + + img .image { + flex: 1; + width: 150%; + height: 100%; + resize: contain; + } + + .previewcontainer { + z-index: 0; + width: 62%; + bottom: 49.8%; + margin-left: 21%; + margin-top: 18.6%; + height: 258px; + text-align: center; + color: #C4C4C4; + border: 1px solid #C4C4C4; + box-sizing: border-box; + border-radius: 10px; + font-size: 19px; + } + + .crop { + background-color: Black; + border-radius: 10px; + color: white; + padding: 10px; + } + .close { - left: 17%; - padding: 0; - bottom: 70%; - background-color: transparent; + position: fixed; + left: 33%; + bottom: 9.6%; + color: #C4C4C4; + background-color: Black; + font-family: Lato; + font-style: normal; + font-weight: 900; + font-size: 18px; + line-height: 19px; + color: #C4C4C4; + z-index: 10; + width: 48px; + height: 19px; } + + .cancel { + width: 48px; + height: 19px; + margin-left: 10%; + margin-top: 77px; + font-family: Lato; + font-style: normal; + font-weight: 900; + font-size: 18px; + line-height: 19px; + color: #C4C4C4; + } + .text { + z-index: 10; + color: white; + position: absolute; + top: 20%; + left: 14%; + width: 17%; + text-align: center; + z-index: 0; + } + + .times { display: none; + position: fixed; + left: 33%; + bottom: 9.6%; + color: #C4C4C4; + background-color: Black; + font-family: Lato; + font-style: normal; + font-weight: 900; + font-size: 18px; + line-height: 19px; + color: #C4C4C4; + z-index: 10; + width: 58px; + height: 29px; + } + + @media(max-width:1200px) { + .container { + width: 320px; + top: 60px; + flex-direction: column-reverse; + height: 70%; + } + .preview { + display: none; + } + .previewcontainer { + display: none; + } + .cancel { + display: none; + } + .first { + flex-direction: row; + justify-content: space-between; + width: 100%; + height: 20%; + margin-left: 10% + } + .second { + width: 100%; + margin-left: 10%; + height: 60%; + } + .cropbtn { + margin: 0; + padding: 1px; + width: 100px; + font-size: 15px; + } + .rotatebtn { + margin: 0; + padding: 1px; + width: 100px; + font-size: 15px; + } + .imagetobecropped { + width: 100%; + margin: 0; + height: 100%; + } + .savebtn { + display: none; + } + .close { + display: none; + } + .text { + display: none; + } + .times { + display: block; + left: 34%; + padding: 0; + bottom: 70%; + background-color: transparent; + } } - } \ No newline at end of file + + @media(max-width:800px) { + .container { + width: 320px; + top: 60px; + flex-direction: column-reverse; + height: 70%; + } + .preview { + display: none; + } + .previewcontainer { + display: none; + } + .cancel { + display: none; + } + .first { + flex-direction: row; + justify-content: space-between; + width: 100%; + height: 20%; + margin-left: 10% + } + .second { + width: 100%; + margin-left: 10%; + height: 60%; + } + .cropbtn { + margin: 0; + padding: 1px; + width: 100px; + font-size: 15px; + } + .rotatebtn { + margin: 0; + padding: 1px; + width: 100px; + font-size: 15px; + } + .imagetobecropped { + width: 100%; + margin: 0; + height: 100%; + } + .savebtn { + display: none; + } + .close { + left: 17%; + padding: 0; + bottom: 70%; + background-color: transparent; + display: none; + } + .text { + display: none; + } + .times { + display: block; + left: 33%; + padding: 0; + bottom: 70%; + background-color: transparent + } + } \ No newline at end of file diff --git a/frontend/src/components/Image crop/ImageCropper.js b/frontend/src/components/Image crop/ImageCropper.js index 3a2f155a..db45eebc 100644 --- a/frontend/src/components/Image crop/ImageCropper.js +++ b/frontend/src/components/Image crop/ImageCropper.js @@ -1,24 +1,27 @@ -import React, {useState} from 'react'; +// import React, {useState} from 'react'; -import Preview from "./reveal"; -import CroppingCSS from "./Cropping.module.css"; -import Crop from "./index" +// import Preview from "./reveal"; +// import CroppingCSS from "./Cropping.module.css"; +// import Crop from "./index" -function ImageCropper(file) { - const [showPreview, setShowPreview] = useState(false); +// function ImageCropper(file) { +// const [showPreview, setShowPreview] = useState(false); - return( -
- - +// return( +//
+// +// -
- -
- -
-
- ) -} +// {['flow'].map((path) => { +// return( +//
+// +//
+// ) +// })} +//
+//
+// ) +// } -export default ImageCropper; \ No newline at end of file +// export default ImageCropper; \ No newline at end of file diff --git a/frontend/src/components/Image crop/index.js b/frontend/src/components/Image crop/index.js index c2fdb60a..cea8ce87 100644 --- a/frontend/src/components/Image crop/index.js +++ b/frontend/src/components/Image crop/index.js @@ -6,6 +6,7 @@ import "cropperjs/dist/cropper.min.css"; + class Crop extends React.Component{ constructor() { @@ -51,7 +52,7 @@ cancel(){ aspectRatio: 1, crop: () => { const canvas =cropper.getCroppedCanvas(); - this.setState({ imageDestination: canvas.toDataURL("image/jpeg")}); + this.setState({ imageDestination: canvas.toDataURL("image/jpg")}); } @@ -60,7 +61,9 @@ cancel(){ }; + render(){ + return(
@@ -75,8 +78,9 @@ cancel(){
+ - +
diff --git a/frontend/src/components/Image crop/reveal.js b/frontend/src/components/Image crop/reveal.js index dd363478..feb1702e 100644 --- a/frontend/src/components/Image crop/reveal.js +++ b/frontend/src/components/Image crop/reveal.js @@ -1,6 +1,7 @@ import React,{useState} from "react"; import CroppingCSS from "./Cropping.module.css"; +import Times from "../../../public/Icons/x/active.svg" @@ -10,11 +11,11 @@ function Preview(props){ return (props.trigger) ? (
- + props.setTrigger(false)} /> + + {props.children}
diff --git a/frontend/src/components/ImagePreview/index.js b/frontend/src/components/ImagePreview/index.js index fc851590..71ac2594 100644 --- a/frontend/src/components/ImagePreview/index.js +++ b/frontend/src/components/ImagePreview/index.js @@ -1,18 +1,23 @@ -import React from "react"; + import Nav from "../Subcomponents/nav"; import LeftArrow from "../../../public/Icons/arrow-left/active.svg"; import RightArrow from "../../../public/Icons/arrow-right/active.svg"; import ZoomIn from "../../../public/Icons/zoom-in/active.svg"; import ZoomOut from "../../../public/Icons/zoom-out/active.svg"; import ImageCropper from "../Image crop/ImageCropper"; +import React, {useState} from 'react'; + +import Preview from "../Image crop/reveal"; +import CroppingCSS from "../Image crop/Cropping.module.css"; +import Crop from "../Image crop/index" + function index({ file, setOpenStatus }) { + const [showPreview, setShowPreview] = useState(false); return (
diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 98797388..daa79e60 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -9,7 +9,7 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@7.12.11", "@babel/code-frame@^7.0.0": +"@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz" integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== @@ -4497,7 +4497,7 @@ css-what@^5.0.0: resolved "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz" integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== -css.escape@1.5.1, css.escape@^1.5.1: +css.escape@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz" integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s= @@ -4890,11 +4890,6 @@ damerau-levenshtein@^1.0.6: resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz" integrity sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw== -data-uri-to-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz" - integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== - data-urls@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz" @@ -5452,7 +5447,7 @@ error-stack-parser@^2.0.6: dependencies: stackframe "^1.1.1" -es-abstract@^1.17.2, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2, es-abstract@^1.18.5: +es-abstract@^1.17.2, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: version "1.18.6" resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.6.tgz" integrity sha512-kAeIT4cku5eNLNuUKhlmtuk1/TRZvQoYccn6TO0cSVdf1kzB0T7+dYuVK9MWM7l+/53W2Q8M7N2c6MQvhXFcUQ== @@ -5508,11 +5503,6 @@ es6-iterator@2.0.3, es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz" - integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= - es6-symbol@^3.1.1, es6-symbol@~3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz" @@ -6111,11 +6101,6 @@ file-loader@6.1.1: loader-utils "^2.0.0" schema-utils "^3.0.0" -file-saver@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-2.0.5.tgz#d61cfe2ce059f414d899e9dd6d4107ee25670c38" - integrity sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA== - file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" @@ -7435,7 +7420,7 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: - has-symbols "^1.0.2" + isobject "^3.0.1" is-potential-custom-element-name@^1.0.1: version "1.0.1" @@ -7447,7 +7432,6 @@ is-regex@^1.0.4, is-regex@^1.1.4: resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: - available-typed-arrays "^1.0.5" call-bind "^1.0.2" has-tostringtag "^1.0.0" @@ -9480,14 +9464,6 @@ object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0 define-properties "^1.1.3" es-abstract "^1.18.0-next.2" -object.hasown@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.0.0.tgz#bdbade33cfacfb25d7f26ae2b6cb870bf99905c2" - integrity sha512-qYMF2CLIjxxLGleeM0jrcB4kiv3loGVAjKQKvH8pSU/i2VcRRvUNmxbD+nEMmrXRfORhuVJuH8OtSYCZoue3zA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.1" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -12110,13 +12086,6 @@ source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, sourc resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@0.8.0-beta.0: - version "0.8.0-beta.0" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz" - integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== - dependencies: - whatwg-url "^7.0.0" - source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" @@ -12229,13 +12198,6 @@ stackframe@^1.1.1: resolved "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz" integrity sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA== -stacktrace-parser@0.1.10: - version "0.1.10" - resolved "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz" - integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== - dependencies: - type-fest "^0.7.1" - standalone-single-spa-webpack-plugin@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/standalone-single-spa-webpack-plugin/-/standalone-single-spa-webpack-plugin-3.0.0.tgz" @@ -12631,480 +12593,6 @@ tempy@^0.3.0: type-fest "^0.3.1" unique-string "^1.0.0" -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - -terser-webpack-plugin@4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz" - integrity sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ== - dependencies: - cacache "^15.0.5" - find-cache-dir "^3.3.1" - jest-worker "^26.5.0" - p-limit "^3.0.2" - schema-utils "^3.0.0" - serialize-javascript "^5.0.1" - source-map "^0.6.1" - terser "^5.3.4" - webpack-sources "^1.4.3" - -terser-webpack-plugin@^1.4.3: - version "1.4.5" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz" - integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== - dependencies: - cacache "^12.0.2" - find-cache-dir "^2.1.0" - is-wsl "^1.1.0" - schema-utils "^1.0.0" - serialize-javascript "^4.0.0" - source-map "^0.6.1" - terser "^4.1.2" - webpack-sources "^1.4.0" - worker-farm "^1.7.0" - -terser-webpack-plugin@^5.1.3: - version "5.2.4" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.4.tgz" - integrity sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA== - dependencies: - jest-worker "^27.0.6" - p-limit "^3.1.0" - schema-utils "^3.1.1" - serialize-javascript "^6.0.0" - source-map "^0.6.1" - terser "^5.7.2" - -terser@^4.1.2, terser@^4.6.2, terser@^4.6.3: - version "4.8.0" - resolved "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -terser@^5.3.4, terser@^5.7.2: - version "5.8.0" - resolved "https://registry.npmjs.org/terser/-/terser-5.8.0.tgz" - integrity sha512-f0JH+6yMpneYcRJN314lZrSwu9eKkUFEHLN/kNy8ceh8gaRiLgFPJqrB9HsXjhEGdv4e/ekjTOFxIlL6xlma8A== - dependencies: - commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.20" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@0.2.0, text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -throat@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz" - integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== - -throat@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz" - integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== - -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - -timers-browserify@^2.0.4: - version "2.0.12" - resolved "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - dependencies: - setimmediate "^1.0.4" - -timsort@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz" - integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= - -tiny-invariant@^1.0.2: - version "1.1.0" - resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz" - integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== - -tiny-warning@^1.0.0, tiny-warning@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - -tmp@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" - -tmpl@1.0.x: - version "1.0.5" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== - -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - -tree-kill@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - -tryer@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz" - integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== - -ts-pnp@1.2.0, ts-pnp@^1.1.6: - version "1.2.0" - resolved "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz" - integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== - -tsconfig-paths@^3.11.0: - version "3.11.0" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz" - integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - -tslib@^1.8.1, tslib@^1.9.0: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.0.3: - version "2.3.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - -tsutils@^3.17.1, tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== - -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.7.1: - version "0.7.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz" - integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/type/-/type-2.5.0.tgz" - integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -unbox-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== - dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" - which-boxed-primitive "^1.0.2" - -unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - -unicode-match-property-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz" - integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - dependencies: - unicode-canonical-property-names-ecmascript "^2.0.0" - unicode-property-aliases-ecmascript "^2.0.0" - -unicode-match-property-value-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz" - integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== - -unicode-property-aliases-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz" - integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz" - integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= - dependencies: - crypto-random-string "^1.0.0" - -universalify@^0.1.0, universalify@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unquote@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz" - integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -unused-files-webpack-plugin@^3.4.0: - version "3.4.0" - resolved "https://registry.npmjs.org/unused-files-webpack-plugin/-/unused-files-webpack-plugin-3.4.0.tgz" - integrity sha512-cmukKOBdIqaM1pqThY0+jp+mYgCVyzrD8uRbKEucQwIGZcLIRn+gSRiQ7uLjcDd3Zba9NUxVGyYa7lWM4UCGeg== - dependencies: - babel-runtime "^7.0.0-beta.3" - glob-all "^3.1.0" - semver "^5.5.0" - util.promisify "^1.0.0" - warning "^3.0.0" - -upath@^1.1.1, upath@^1.1.2, upath@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-loader@4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz" - integrity sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA== - dependencies: - temp-dir "^1.0.0" - type-fest "^0.3.1" - unique-string "^1.0.0" - terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -14468,4 +13956,4 @@ yargs@^16.0.3, yargs@^16.2.0: yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== \ No newline at end of file + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/root-config/dist/zuri-root-config.js.map b/root-config/dist/zuri-root-config.js.map index 8ddc6721..c7afd3a1 100644 --- a/root-config/dist/zuri-root-config.js.map +++ b/root-config/dist/zuri-root-config.js.map @@ -1 +1 @@ -{"version":3,"file":"zuri-root-config.js","mappings":"iMAAA,MAAMA,EAAmB,SAEzBC,EAAQ,EAAiB,SAAwBC,GAY7C,GAXGA,IACHA,EAAe,IAUV,IAAmBC,OAAS,IAAmBA,KAAKC,IAEvD,MADAC,QAAQC,MAAM,qBAAsB,KAC9BC,MACJ,uHAIJ,IAA0BP,EACxB,IAAmBG,KAAKC,IACxBF,K,cCuDND,EAAQ,EAlCR,SAA0BO,EAAWC,GAKnC,IAAIC,EAAIC,SAASC,cAAc,KAC/BF,EAAEG,KAAOL,EAKT,IAHA,IAAIM,EAA6B,MAAlBJ,EAAEI,SAAS,GAAaJ,EAAEI,SAAW,IAAMJ,EAAEI,SACxDC,EAAmB,EACrBC,EAAQF,EAASG,OACZF,IAAqBN,GAAsBO,GAAS,GAE5C,MADFF,IAAWE,IAEpBD,IAIJ,GAAIA,IAAqBN,EACvB,MAAMF,MACJ,iDACEE,EACA,gDACAM,EACA,qBACAP,GAIN,IAAIU,EAAYJ,EAASK,MAAM,EAAGH,EAAQ,GAE1C,OAAON,EAAEU,SAAW,KAAOV,EAAEW,KAAOH,GAOpCI,OAAOC,W,qBClFTC,EAAOvB,QAAUwB,ICCbC,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa5B,QAGrB,IAAIuB,EAASE,EAAyBE,GAAY,CAGjD3B,QAAS,IAOV,OAHA8B,EAAoBH,GAAUJ,EAAQA,EAAOvB,QAAS0B,GAG/CH,EAAOvB,QCrBf0B,EAAoBK,EAAIC,ECCxBN,EAAoBO,EAAKjC,IACH,oBAAXkC,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAerC,EAASkC,OAAOC,YAAa,CAAEG,MAAO,WAE7DF,OAAOC,eAAerC,EAAS,aAAc,CAAEsC,OAAO,KCLvDZ,EAAoBa,EAAI,G,gBCExBC,EAFuB,UAER,G,wCCAfC,EAAAA,EAAAA,qBAAoB,CAClBC,KAAM,kCACNC,IAAK,kBAAMC,OAAM,OAAQ,oCACzBC,WAAY,CAAC,QAGfC,EAAAA,EAAAA,OACE,CAAEC,gBAAgB,K","sources":["webpack://root-config/./node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://root-config/./node_modules/systemjs-webpack-interop/public-path.js","webpack://root-config/external system \"single-spa\"","webpack://root-config/webpack/bootstrap","webpack://root-config/webpack/runtime/__system_context__","webpack://root-config/webpack/runtime/make namespace object","webpack://root-config/webpack/runtime/publicPath","webpack://root-config/./node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://root-config/./src/zuri-root-config.js"],"sourcesContent":["const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","module.exports = __WEBPACK_EXTERNAL_MODULE__645__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","import { registerApplication, start } from \"single-spa\";\n\nregisterApplication({\n name: '@zuri/zuri-plugin-company-files',\n app: () => System.import(\"@zuri/zuri-plugin-company-files\"),\n activeWhen: [\"/\"]\n})\n\nstart(\n { urlRerouteOnly: true }\n);\n"],"names":["resolveDirectory","exports","rootDirLevel","meta","url","console","error","Error","urlString","rootDirectoryLevel","a","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","module","__WEBPACK_EXTERNAL_MODULE__645__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","y","__system_context__","r","Symbol","toStringTag","Object","defineProperty","value","p","autoPublicPath","registerApplication","name","app","System","activeWhen","start","urlRerouteOnly"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"zuri-root-config.js","mappings":"iMAAA,MAAMA,EAAmB,SAEzBC,EAAQ,EAAiB,SAAwBC,GAY7C,GAXGA,IACHA,EAAe,IAUV,IAAmBC,OAAS,IAAmBA,KAAKC,IAEvD,MADAC,QAAQC,MAAM,qBAAsB,KAC9BC,MACJ,uHAIJ,IAA0BP,EACxB,IAAmBG,KAAKC,IACxBF,K,cCuDND,EAAQ,EAlCR,SAA0BO,EAAWC,GAKnC,IAAIC,EAAIC,SAASC,cAAc,KAC/BF,EAAEG,KAAOL,EAKT,IAHA,IAAIM,EAA6B,MAAlBJ,EAAEI,SAAS,GAAaJ,EAAEI,SAAW,IAAMJ,EAAEI,SACxDC,EAAmB,EACrBC,EAAQF,EAASG,OACZF,IAAqBN,GAAsBO,GAAS,GAE5C,MADFF,IAAWE,IAEpBD,IAIJ,GAAIA,IAAqBN,EACvB,MAAMF,MACJ,iDACEE,EACA,gDACAM,EACA,qBACAP,GAIN,IAAIU,EAAYJ,EAASK,MAAM,EAAGH,EAAQ,GAE1C,OAAON,EAAEU,SAAW,KAAOV,EAAEW,KAAOH,GAOpCI,OAAOC,W,qBClFTC,EAAOvB,QAAUwB,ICCbC,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa5B,QAGrB,IAAIuB,EAASE,EAAyBE,GAAY,CAGjD3B,QAAS,IAOV,OAHA8B,EAAoBH,GAAUJ,EAAQA,EAAOvB,QAAS0B,GAG/CH,EAAOvB,QCrBf0B,EAAoBK,EAAIC,ECCxBN,EAAoBO,EAAKjC,IACH,oBAAXkC,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAerC,EAASkC,OAAOC,YAAa,CAAEG,MAAO,WAE7DF,OAAOC,eAAerC,EAAS,aAAc,CAAEsC,OAAO,KCLvDZ,EAAoBa,EAAI,G,gBCExBC,EAFuB,UAER,G,wCCAfC,EAAAA,EAAAA,qBAAoB,CAClBC,KAAM,kCACNC,IAAK,kBAAMC,OAAM,OAAQ,oCACzBC,WAAY,CAAC,QAGfC,EAAAA,EAAAA,OACE,CAAEC,gBAAgB,K","sources":["webpack://root-config/./node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://root-config/./node_modules/systemjs-webpack-interop/public-path.js","webpack://root-config/external system \"single-spa\"","webpack://root-config/webpack/bootstrap","webpack://root-config/webpack/runtime/__system_context__","webpack://root-config/webpack/runtime/make namespace object","webpack://root-config/webpack/runtime/publicPath","webpack://root-config/./node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://root-config/./src/zuri-root-config.js"],"sourcesContent":["const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","module.exports = __WEBPACK_EXTERNAL_MODULE__645__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","import { registerApplication, start } from \"single-spa\";\r\n\r\nregisterApplication({\r\n name: '@zuri/zuri-plugin-company-files',\r\n app: () => System.import(\"@zuri/zuri-plugin-company-files\"),\r\n activeWhen: [\"/\"]\r\n})\r\n\r\nstart(\r\n { urlRerouteOnly: true }\r\n);\r\n"],"names":["resolveDirectory","exports","rootDirLevel","meta","url","console","error","Error","urlString","rootDirectoryLevel","a","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","module","__WEBPACK_EXTERNAL_MODULE__645__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","y","__system_context__","r","Symbol","toStringTag","Object","defineProperty","value","p","autoPublicPath","registerApplication","name","app","System","activeWhen","start","urlRerouteOnly"],"sourceRoot":""} \ No newline at end of file From 1aad9d2deef983bc7a5eb020134aeece46af4c28 Mon Sep 17 00:00:00 2001 From: PaDeHsKi Date: Thu, 23 Sep 2021 19:08:25 +0100 Subject: [PATCH 02/10] feat: create and save .docx documents --- .../components/AddNewTextDoc/AddNewTextDoc.js | 227 ++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 frontend/src/components/AddNewTextDoc/AddNewTextDoc.js diff --git a/frontend/src/components/AddNewTextDoc/AddNewTextDoc.js b/frontend/src/components/AddNewTextDoc/AddNewTextDoc.js new file mode 100644 index 00000000..0324a757 --- /dev/null +++ b/frontend/src/components/AddNewTextDoc/AddNewTextDoc.js @@ -0,0 +1,227 @@ +import React, {useState,} from 'react'; +//import { stat } from 'react-native-fetch-blob' +import { Document, Packer, Paragraph, TextRun } from "docx" +//import { saveAs } from "file-saver"; +import { Fragment } from 'react'; +import { Menu, Transition } from '@headlessui/react'; +import Box from '@material-ui/core/Box'; +import Button from '@material-ui/core/Button'; +import Modal from '@material-ui/core/Modal'; +import Slider from '@material-ui/core/Slider'; +import axios from 'axios' + +function AddNewTextDoc () { + const [open, setOpen] = React.useState(false); + const handleOpen = () => setOpen(true); + const [title, setTitle] = useState(''); + const [content, setContent] = useState (''); + const handleChange = e => { + setContent(e.target.value) + }; + + const createDocument = () => { + if (!title || /^\s*$/.test(title)) return; + }; + + const handleSubmit = async (e) => { + e.preventDefault(); + const newDoc = new Document({ + sections: [{ + children: [ + new Paragraph({ + children: [new TextRun(`${content}`)], + }), + ], + }] + }); + Packer.toBlob(newDoc).then(blob => { + console.log(blob); + //saveAs(blob, `${title}.docx`); + console.log("Document created successfully"); + }); + + const resp = await axios.post("https://companyfiles.zuri.chat/api/v1/files/uploadRequest", { fileName: `${title}.docx`, file:{Blob} }) + .then(res => res.json()) + .then(data => this.setState({fileId: data.id})); + }; + + const styling = { + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + width: 400, + bgcolor: 'background.paper', + border: '1px solid #ACFFE6', + boxShadow: 24, + p: 4, + }; + + const modal = ( + + + setTitle(e.target.value)} + type="text" + className="outline-none w-full" + placeholder="Enter Document title..." + onKeyDown={(e) => e.key === "Enter" && createDocument()} + /> + + + + + + ); + function classNames(...classes) { + return classes.filter(Boolean).join(' ') + }; + + return ( +
+ +
+ + + +
+ +
+ + File + +
+ + + +
+ + {({ active }) => ( + + New + + )} + + + {({ active }) => ( + + Open + + )} + +
+
+ + {({ active }) => ( + + Save + + )} + + + {({ active }) => ( + + Save as + + )} + +
+
+
+
+ + +
+ + {modal} +
+ {/**/} +
+
+ */} -
- -