@team-monolith/cds 1.100.6 → 1.100.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
3
3
|
import { useLexicalNodeSelection } from "@lexical/react/useLexicalNodeSelection";
|
|
4
4
|
import { mergeRegister } from "@lexical/utils";
|
|
@@ -14,6 +14,7 @@ import { ImageNotAvailable } from "./ImageNotAvailable";
|
|
|
14
14
|
import { ImageResizer } from "./ImageResizer";
|
|
15
15
|
import { css } from "@emotion/react";
|
|
16
16
|
import { RESET_BUTTON } from "../../../../utils/reset";
|
|
17
|
+
import { VISUALLY_HIDDEN } from "../../../../utils/visuallyHidden";
|
|
17
18
|
const imageCache = new Set();
|
|
18
19
|
export const RIGHT_CLICK_IMAGE_COMMAND = createCommand("RIGHT_CLICK_IMAGE_COMMAND");
|
|
19
20
|
function useSuspenseImage(src) {
|
|
@@ -35,7 +36,7 @@ function useSuspenseImage(src) {
|
|
|
35
36
|
* 접근성과 관련한 이슈로 onClick이 가능할 땐 button 으로 그립니다.
|
|
36
37
|
*/
|
|
37
38
|
function LazyImage(props) {
|
|
38
|
-
const { altText, className, imageRef, src, width, height, maxWidth: _maxWidth, onError, title, buttonProps, } = props;
|
|
39
|
+
const { altText, className, imageRef, src, width, height, maxWidth: _maxWidth, onError, title, buttonProps, openInNewWindow, } = props;
|
|
39
40
|
useSuspenseImage(src);
|
|
40
41
|
const img = (_jsx("img", { className: className || undefined, src: src, alt: altText, ref: imageRef, style: {
|
|
41
42
|
height,
|
|
@@ -47,7 +48,7 @@ function LazyImage(props) {
|
|
|
47
48
|
width,
|
|
48
49
|
}, title: title, onError: onError, draggable: "false" }));
|
|
49
50
|
if (buttonProps) {
|
|
50
|
-
return (
|
|
51
|
+
return (_jsxs("button", Object.assign({ type: "button", css: RESET_BUTTON }, buttonProps, { children: [img, openInNewWindow && _jsx("span", Object.assign({ css: VISUALLY_HIDDEN }, { children: "(\uC0C8 \uCC3D)" }))] })));
|
|
51
52
|
}
|
|
52
53
|
return img;
|
|
53
54
|
}
|
|
@@ -195,8 +196,7 @@ export function ImageComponent({ src, altText, nodeKey, width, height, maxWidth,
|
|
|
195
196
|
cursor: pointer;
|
|
196
197
|
`, src: src, altText: altText, imageRef: imageRef, width: width, height: height, maxWidth: maxWidth, onError: () => setIsLoadError(true), buttonProps: {
|
|
197
198
|
onClick: () => window.open(src, "_blank"),
|
|
198
|
-
|
|
199
|
-
}, title: "\uD074\uB9AD\uD574\uC11C \uC6D0\uBCF8 \uC774\uBBF8\uC9C0 \uBCF4\uAE30." })) })) })));
|
|
199
|
+
}, title: "\uD074\uB9AD\uD574\uC11C \uC6D0\uBCF8 \uC774\uBBF8\uC9C0 \uBCF4\uAE30.", openInNewWindow: true })) })) })));
|
|
200
200
|
}
|
|
201
201
|
return (_jsxs(_Fragment, { children: [_jsxs(EditContainer, { children: [_jsx(Suspense, Object.assign({ fallback: null }, { children: _jsx("div", Object.assign({ draggable: draggable, css: css `
|
|
202
202
|
// ImageResizer를 위한 relative 설정입니다.
|
|
@@ -153,7 +153,7 @@ export function FloatingLinkEditor(props) {
|
|
|
153
153
|
} }, { children: _jsx(CloseFillIcon, {}) })), _jsx(Button, Object.assign({ tabIndex: 0, onClick: (event) => {
|
|
154
154
|
event.preventDefault();
|
|
155
155
|
handleLinkSubmission();
|
|
156
|
-
} }, { children: _jsx(CheckLineIcon, {}) }))] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Link, Object.assign({ href: sanitizeUrl(linkUrl), target: "_blank", rel: "noopener noreferrer" }, { children: [linkUrl, _jsx("
|
|
156
|
+
} }, { children: _jsx(CheckLineIcon, {}) }))] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Link, Object.assign({ href: sanitizeUrl(linkUrl), target: "_blank", rel: "noopener noreferrer" }, { children: [linkUrl, _jsx("span", Object.assign({ css: VISUALLY_HIDDEN }, { children: "(\uC0C8 \uCC3D)" }))] })), _jsxs(Buttons, { children: [_jsx(Button, Object.assign({ tabIndex: 0, onClick: (event) => {
|
|
157
157
|
event.preventDefault();
|
|
158
158
|
setEditedLinkUrl(linkUrl);
|
|
159
159
|
setIsLinkEditMode(true);
|