@bindu-dashing/dam-solution-v2 5.9.254 → 5.9.256

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.
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- import { Button, Modal } from "antd";
12
+ import { Button } from "antd";
13
13
  import { GoArrowLeft } from "react-icons/go";
14
14
  import { PiFloppyDisk } from "react-icons/pi";
15
15
  import TuiImageEditor from "./TuiImageEditor";
@@ -140,10 +140,37 @@ const ImageEditorComponent = ({ file, handleClose, }) => {
140
140
  });
141
141
  const openConfirm = () => setState((prev) => (Object.assign(Object.assign({}, prev), { confirmOpen: true })));
142
142
  const closeConfirm = () => setState((prev) => (Object.assign(Object.assign({}, prev), { confirmOpen: false })));
143
- return (_jsxs("div", { className: "md-lib-flex md-lib-flex-col md-lib-h-screen", children: [_jsxs("div", { className: "md-lib-shrink-0 md-lib-bg-darkPrimaryBg md-lib-py-3 md-lib-px-5 md-lib-flex md-lib-justify-between md-lib-items-center md-lib-relative md-lib-z-[100]", children: [_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-5", children: [_jsx(GoArrowLeftIcon, { className: "md-lib-text-darkTextColor md-lib-cursor-pointer", size: 24, onClick: handleClose }), _jsx("h4", { className: "md-lib-font-semibold md-lib-text-darkTextColor md-lib-text-base md-lib-truncate md-lib-w-96", title: get(file, "name", "N/A"), children: get(file, "name", "N/A") })] }), _jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-4", children: [_jsx(CustomButton, { size: "large", onClick: handleClose, label: "Cancel", type: "default", className: "md-lib-bg-secondaryColor md-lib-hover:bg-secondaryHoverColor md-lib-border-none" }), _jsx(CustomButton, { size: "large", type: "primary", icon: _jsx(PiFloppyDiskIcon, { size: 24 }), onClick: openConfirm, label: "Save", loading: loading })] })] }), _jsx("div", { className: "md-lib-flex-1 md-lib-overflow-hidden md-lib-relative", children: _jsx(TuiImageEditor, { ref: editorRef, file: file, path: get(file, "s3Path") }) }), _jsx(Modal, { open: confirmOpen, onCancel: closeConfirm, title: "Save edited image", maskClosable: !loading, closable: !loading, zIndex: 2000, footer: [
144
- _jsx(Button, { onClick: closeConfirm, disabled: loading, children: "Cancel" }, "cancel"),
145
- _jsx(Button, { onClick: handleOverwrite, disabled: loading, children: "Overwrite" }, "overwrite"),
146
- _jsx(Button, { type: "primary", onClick: handleSaveAsNew, loading: loading, children: "Save as new" }, "new"),
147
- ], children: _jsx("p", { children: "Do you want to replace the original file, or save your edits as a new file in this folder?" }) })] }));
143
+ return (_jsxs("div", { className: "md-lib-flex md-lib-flex-col md-lib-h-screen", children: [_jsxs("div", { className: "md-lib-shrink-0 md-lib-bg-darkPrimaryBg md-lib-py-3 md-lib-px-5 md-lib-flex md-lib-justify-between md-lib-items-center md-lib-relative md-lib-z-[100]", children: [_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-5", children: [_jsx(GoArrowLeftIcon, { className: "md-lib-text-darkTextColor md-lib-cursor-pointer", size: 24, onClick: handleClose }), _jsx("h4", { className: "md-lib-font-semibold md-lib-text-darkTextColor md-lib-text-base md-lib-truncate md-lib-w-96", title: get(file, "name", "N/A"), children: get(file, "name", "N/A") })] }), _jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-4", children: [_jsx(CustomButton, { size: "large", onClick: handleClose, label: "Cancel", type: "default", className: "md-lib-bg-secondaryColor md-lib-hover:bg-secondaryHoverColor md-lib-border-none" }), _jsx(CustomButton, { size: "large", type: "primary", icon: _jsx(PiFloppyDiskIcon, { size: 24 }), onClick: openConfirm, label: "Save", loading: loading })] })] }), _jsx("div", { className: "md-lib-flex-1 md-lib-overflow-hidden md-lib-relative", children: _jsx(TuiImageEditor, { ref: editorRef, file: file, path: get(file, "s3Path") }) }), confirmOpen && (_jsx("div", { style: {
144
+ position: "fixed",
145
+ inset: 0,
146
+ zIndex: 2000,
147
+ background: "rgba(0,0,0,0.55)",
148
+ display: "flex",
149
+ alignItems: "center",
150
+ justifyContent: "center",
151
+ }, onClick: () => {
152
+ if (!loading)
153
+ closeConfirm();
154
+ }, children: _jsxs("div", { style: {
155
+ background: "#fff",
156
+ borderRadius: 8,
157
+ boxShadow: "0 10px 30px rgba(0,0,0,0.25)",
158
+ padding: 24,
159
+ minWidth: 420,
160
+ maxWidth: 520,
161
+ color: "#1f2937",
162
+ }, onClick: (e) => e.stopPropagation(), children: [_jsx("div", { style: {
163
+ fontSize: 18,
164
+ fontWeight: 600,
165
+ marginBottom: 12,
166
+ }, children: "Save edited image" }), _jsx("div", { style: {
167
+ fontSize: 14,
168
+ color: "#4b5563",
169
+ marginBottom: 24,
170
+ }, children: "Do you want to replace the original file, or save your edits as a new file in this folder?" }), _jsxs("div", { style: {
171
+ display: "flex",
172
+ justifyContent: "flex-end",
173
+ gap: 8,
174
+ }, children: [_jsx(Button, { onClick: closeConfirm, disabled: loading, children: "Cancel" }), _jsx(Button, { onClick: handleOverwrite, disabled: loading, children: "Overwrite" }), _jsx(Button, { type: "primary", onClick: handleSaveAsNew, loading: loading, children: "Save as new" })] })] }) }))] }));
148
175
  };
149
176
  export default ImageEditorComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.9.254",
3
+ "version": "5.9.256",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",