@carto/meridian-ds 1.4.7 → 1.4.8-alpha-external-link.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/CHANGELOG.md +12 -2
- package/dist/{Alert-CywtIMOj.js → Alert-2L0Hy8lT.js} +74 -3
- package/dist/{Alert-BiOR9aar.cjs → Alert-CmDToT57.cjs} +72 -1
- package/dist/{OpenDiagonallyRight-BrRyCV4Q.cjs → OpenDiagonallyRight-CM1tojUq.cjs} +27 -0
- package/dist/{OpenDiagonallyRight-5HZXh46V.js → OpenDiagonallyRight-CSm5GYYJ.js} +27 -0
- package/dist/{TablePaginationActions-CFGXm44W.cjs → TablePaginationActions-CAmwcyTy.cjs} +6 -3
- package/dist/{TablePaginationActions-KpTvhN4Y.js → TablePaginationActions-b5wP_uRE.js} +6 -3
- package/dist/components/index.cjs +239 -21
- package/dist/components/index.js +246 -27
- package/dist/custom-icons/index.cjs +29 -55
- package/dist/custom-icons/index.js +29 -55
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +2 -2
- package/dist/types/components/atoms/Button.d.ts +11 -0
- package/dist/types/components/atoms/Button.d.ts.map +1 -1
- package/dist/types/components/atoms/Link.d.ts +14 -0
- package/dist/types/components/atoms/Link.d.ts.map +1 -0
- package/dist/types/components/atoms/SplitButton.d.ts +17 -0
- package/dist/types/components/atoms/SplitButton.d.ts.map +1 -0
- package/dist/types/components/atoms/index.d.ts +4 -0
- package/dist/types/components/atoms/index.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/index.d.ts +1 -0
- package/dist/types/components/organisms/CodeArea/index.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/types.d.ts +4 -0
- package/dist/types/components/organisms/CodeArea/types.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/utils.d.ts +34 -0
- package/dist/types/components/organisms/CodeArea/utils.d.ts.map +1 -1
- package/dist/types/localization/en.d.ts +1 -0
- package/dist/types/localization/en.d.ts.map +1 -1
- package/dist/types/localization/es.d.ts +1 -0
- package/dist/types/localization/es.d.ts.map +1 -1
- package/dist/types/localization/id.d.ts +1 -0
- package/dist/types/localization/id.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts +3 -0
- package/dist/types/localization/index.d.ts.map +1 -1
- package/dist/types/theme/types.d.ts +6 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts.map +1 -1
- package/dist/types/widgets/ChartLegend.d.ts +2 -1
- package/dist/types/widgets/ChartLegend.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +1 -1
- package/dist/widgets/index.cjs +14 -13
- package/dist/widgets/index.js +15 -14
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useState, useEffect, useMemo,
|
|
3
|
-
import { styled, Box, Button as Button$1, CircularProgress, TextField, InputAdornment, IconButton, Tooltip, Select, MenuItem, FormControl, InputLabel, FormHelperText, ToggleButtonGroup as ToggleButtonGroup$1, Menu as Menu$2, MenuList as MenuList$1, Link, Checkbox, ListItemText, Autocomplete as Autocomplete$1, Divider, ListItemIcon, createFilterOptions, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Snackbar as Snackbar$1, Portal, Fade, Slide, alpha, useTheme, Toolbar, AppBar as AppBar$1, Paper, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip, DialogContent as DialogContent$1, DialogActions as DialogActions$1 } from "@mui/material";
|
|
4
|
-
import { T as Typography, c as ICON_SIZE_SMALL, u as useImperativeIntl, N as NOTIFICATION_DURATION_IN_MS, A as APPBAR_SIZE } from "../TablePaginationActions-KpTvhN4Y.js";
|
|
5
|
-
import { a } from "../TablePaginationActions-KpTvhN4Y.js";
|
|
2
|
+
import { forwardRef, useState, useRef, useEffect, useMemo, Fragment as Fragment$1, useImperativeHandle, useCallback } from "react";
|
|
6
3
|
import { useIntl } from "react-intl";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { styled, Box, Button as Button$1, CircularProgress, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment, IconButton, Tooltip, Select, FormControl, InputLabel, FormHelperText, ToggleButtonGroup as ToggleButtonGroup$1, Menu as Menu$2, Link, Checkbox, ListItemText, Autocomplete as Autocomplete$1, Divider, ListItemIcon, createFilterOptions, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Snackbar as Snackbar$1, Portal, Fade, Slide, alpha, useTheme, Toolbar, AppBar as AppBar$1, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip, DialogContent as DialogContent$1, DialogActions as DialogActions$1 } from "@mui/material";
|
|
5
|
+
import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, AddCircleOutlineOutlined, ContentCopyOutlined, CloseOutlined, MenuOutlined, HelpOutline, TodayOutlined, MoreVertOutlined, ErrorOutline, Check } from "@mui/icons-material";
|
|
6
|
+
import { u as useImperativeIntl, T as Typography, c as ICON_SIZE_SMALL, N as NOTIFICATION_DURATION_IN_MS, A as APPBAR_SIZE } from "../TablePaginationActions-b5wP_uRE.js";
|
|
7
|
+
import { a } from "../TablePaginationActions-b5wP_uRE.js";
|
|
8
|
+
import { A as ArrowDown } from "../ArrowDown-CY_wMVJT.js";
|
|
9
|
+
import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CSm5GYYJ.js";
|
|
10
|
+
import { I as IconButton$1, A as Alert$1 } from "../Alert-2L0Hy8lT.js";
|
|
11
|
+
import { L } from "../Alert-2L0Hy8lT.js";
|
|
9
12
|
import "cartocolor";
|
|
10
13
|
import { M as MenuItem$1 } from "../MenuItem-CXnnE5lK.js";
|
|
11
|
-
import { A as ArrowDown } from "../ArrowDown-CY_wMVJT.js";
|
|
12
14
|
import { DatePicker as DatePicker$1 } from "@mui/x-date-pickers/DatePicker";
|
|
13
15
|
import { PickersDay as PickersDay$1 } from "@mui/x-date-pickers";
|
|
14
16
|
import { TimePicker as TimePicker$1 } from "@mui/x-date-pickers/TimePicker";
|
|
15
17
|
import { DateTimePicker as DateTimePicker$1 } from "@mui/x-date-pickers/DateTimePicker";
|
|
16
|
-
import { O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-5HZXh46V.js";
|
|
17
18
|
import { Controlled, UnControlled } from "react-codemirror2";
|
|
18
|
-
import { lime, blue, purple, teal, red, indigo } from "@mui/material/colors";
|
|
19
|
+
import { lime, blue, purple, teal, red, green, indigo } from "@mui/material/colors";
|
|
19
20
|
import "codemirror/lib/codemirror.css";
|
|
20
21
|
import "codemirror/lib/codemirror.js";
|
|
21
22
|
import "codemirror/mode/sql/sql.js";
|
|
@@ -38,7 +39,7 @@ import "codemirror/addon/fold/xml-fold.js";
|
|
|
38
39
|
import "codemirror/addon/fold/indent-fold.js";
|
|
39
40
|
import "codemirror/addon/fold/markdown-fold.js";
|
|
40
41
|
import "codemirror/addon/fold/comment-fold.js";
|
|
41
|
-
import ClickAwayListener from "@mui/material/ClickAwayListener";
|
|
42
|
+
import ClickAwayListener$1 from "@mui/material/ClickAwayListener";
|
|
42
43
|
const IndicatorIcon = styled(Box)({
|
|
43
44
|
position: "absolute",
|
|
44
45
|
top: 0,
|
|
@@ -60,8 +61,13 @@ function _Button({
|
|
|
60
61
|
startIcon,
|
|
61
62
|
endIcon,
|
|
62
63
|
loadingPosition,
|
|
64
|
+
external,
|
|
65
|
+
showExternalIcon = true,
|
|
66
|
+
"aria-label": ariaLabel,
|
|
63
67
|
...otherProps
|
|
64
68
|
}, ref) {
|
|
69
|
+
const intl = useIntl();
|
|
70
|
+
const intlConfig = useImperativeIntl(intl);
|
|
65
71
|
const defaultIconLoader = /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" });
|
|
66
72
|
const isDefaultLoading = loading && loadingPosition === void 0;
|
|
67
73
|
const renderContent = () => {
|
|
@@ -83,7 +89,11 @@ function _Button({
|
|
|
83
89
|
}
|
|
84
90
|
return void 0;
|
|
85
91
|
}
|
|
86
|
-
|
|
92
|
+
if (position === "start") {
|
|
93
|
+
return startIcon;
|
|
94
|
+
} else {
|
|
95
|
+
return endIcon || (external && showExternalIcon && otherProps.href ? /* @__PURE__ */ jsx(OpenInNewOutlined, {}) : void 0);
|
|
96
|
+
}
|
|
87
97
|
};
|
|
88
98
|
return /* @__PURE__ */ jsx(
|
|
89
99
|
Button$1,
|
|
@@ -93,12 +103,103 @@ function _Button({
|
|
|
93
103
|
endIcon: getIconForPosition("end"),
|
|
94
104
|
...otherProps,
|
|
95
105
|
role: otherProps.href ? "link" : "button",
|
|
106
|
+
...otherProps.href && external && {
|
|
107
|
+
target: "_blank",
|
|
108
|
+
rel: "noopener noreferrer"
|
|
109
|
+
},
|
|
110
|
+
"aria-label": ariaLabel || (external && otherProps.href ? `${children == null ? void 0 : children.toString()} (${intlConfig.formatMessage({
|
|
111
|
+
id: "c4r.button.opensInNewTab"
|
|
112
|
+
})})` : void 0),
|
|
96
113
|
ref,
|
|
97
114
|
children: /* @__PURE__ */ jsx(Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
|
|
98
115
|
}
|
|
99
116
|
);
|
|
100
117
|
}
|
|
101
118
|
const Button = forwardRef(_Button);
|
|
119
|
+
const ButtonGroup = styled(ButtonGroup$1)(({ theme, size }) => ({
|
|
120
|
+
"& .MuiButton-root:last-child": {
|
|
121
|
+
padding: 0,
|
|
122
|
+
minWidth: size === "small" ? theme.spacing(3) : size === "large" ? theme.spacing(6) : theme.spacing(4)
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
function SplitButton({
|
|
126
|
+
options,
|
|
127
|
+
onClick,
|
|
128
|
+
variant,
|
|
129
|
+
size,
|
|
130
|
+
color,
|
|
131
|
+
...otherProps
|
|
132
|
+
}) {
|
|
133
|
+
var _a;
|
|
134
|
+
const [open, setOpen] = useState(false);
|
|
135
|
+
const anchorRef = useRef(null);
|
|
136
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
137
|
+
const handleClick = () => {
|
|
138
|
+
onClick(options[selectedIndex]);
|
|
139
|
+
};
|
|
140
|
+
const handleMenuItemClick = (_, index) => {
|
|
141
|
+
setSelectedIndex(index);
|
|
142
|
+
setOpen(false);
|
|
143
|
+
};
|
|
144
|
+
const handleToggle = () => {
|
|
145
|
+
setOpen((prevOpen) => !prevOpen);
|
|
146
|
+
};
|
|
147
|
+
const handleClose = (event) => {
|
|
148
|
+
var _a2;
|
|
149
|
+
if ((_a2 = anchorRef.current) == null ? void 0 : _a2.contains(event.target)) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
setOpen(false);
|
|
153
|
+
};
|
|
154
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
155
|
+
/* @__PURE__ */ jsxs(
|
|
156
|
+
ButtonGroup,
|
|
157
|
+
{
|
|
158
|
+
"data-name": "split-button",
|
|
159
|
+
ref: anchorRef,
|
|
160
|
+
variant,
|
|
161
|
+
size,
|
|
162
|
+
color,
|
|
163
|
+
...otherProps,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ jsx(Button$1, { onClick: handleClick, children: (_a = options[selectedIndex]) == null ? void 0 : _a.label }),
|
|
166
|
+
/* @__PURE__ */ jsx(Button$1, { onClick: handleToggle, children: open ? /* @__PURE__ */ jsx(ArrowUp, {}) : /* @__PURE__ */ jsx(ArrowDown, {}) })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ jsx(
|
|
171
|
+
Popper,
|
|
172
|
+
{
|
|
173
|
+
sx: { zIndex: 1 },
|
|
174
|
+
open,
|
|
175
|
+
anchorEl: anchorRef.current,
|
|
176
|
+
role: void 0,
|
|
177
|
+
transition: true,
|
|
178
|
+
disablePortal: true,
|
|
179
|
+
placement: "bottom-end",
|
|
180
|
+
children: ({ TransitionProps, placement }) => /* @__PURE__ */ jsx(
|
|
181
|
+
Grow,
|
|
182
|
+
{
|
|
183
|
+
...TransitionProps,
|
|
184
|
+
style: {
|
|
185
|
+
transformOrigin: placement === "bottom" ? "center top" : "center bottom"
|
|
186
|
+
},
|
|
187
|
+
children: /* @__PURE__ */ jsx(Paper, { elevation: 8, children: /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsx(MenuList$1, { autoFocusItem: true, sx: { paddingY: 1 }, children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
188
|
+
MenuItem,
|
|
189
|
+
{
|
|
190
|
+
disabled: option.disabled,
|
|
191
|
+
selected: index === selectedIndex,
|
|
192
|
+
onClick: (event) => handleMenuItemClick(event, index),
|
|
193
|
+
children: option.label
|
|
194
|
+
},
|
|
195
|
+
option.label
|
|
196
|
+
)) }) }) })
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
] });
|
|
202
|
+
}
|
|
102
203
|
const Root$5 = styled(Box)(({ theme }) => ({
|
|
103
204
|
display: "flex",
|
|
104
205
|
alignItems: "center",
|
|
@@ -3113,8 +3214,9 @@ const CodeAreaTheme = styled(Box, {
|
|
|
3113
3214
|
right: 0,
|
|
3114
3215
|
zIndex: 1
|
|
3115
3216
|
},
|
|
3116
|
-
"
|
|
3117
|
-
color: theme.palette.text.primary
|
|
3217
|
+
".CodeMirror pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like, & .cm-bracket": {
|
|
3218
|
+
color: theme.palette.text.primary,
|
|
3219
|
+
fontVariantLigatures: "no-common-ligatures"
|
|
3118
3220
|
},
|
|
3119
3221
|
"& .CodeMirror pre.CodeMirror-placeholder": {
|
|
3120
3222
|
color: theme.palette.text.hint
|
|
@@ -3132,7 +3234,7 @@ const CodeAreaTheme = styled(Box, {
|
|
|
3132
3234
|
"& .cm-number, & .cm-property, & .cm-builtin": {
|
|
3133
3235
|
color: red[700]
|
|
3134
3236
|
},
|
|
3135
|
-
"& .cm-comment": {
|
|
3237
|
+
"& .cm-comment, & .cm-quote": {
|
|
3136
3238
|
color: theme.palette.text.secondary
|
|
3137
3239
|
},
|
|
3138
3240
|
"& .cm-variable": {
|
|
@@ -3141,9 +3243,18 @@ const CodeAreaTheme = styled(Box, {
|
|
|
3141
3243
|
"& .cm-variable-2": {
|
|
3142
3244
|
color: theme.palette.text.primary
|
|
3143
3245
|
},
|
|
3144
|
-
"& .cm-punctuation, & .cm-def
|
|
3246
|
+
"& .cm-punctuation, & .cm-def": {
|
|
3145
3247
|
color: blue[800]
|
|
3146
3248
|
},
|
|
3249
|
+
"& .cm-image-alt-text, & .cm-link": {
|
|
3250
|
+
color: green[800],
|
|
3251
|
+
textDecoration: "none"
|
|
3252
|
+
},
|
|
3253
|
+
// Custom inline link styling .cm-inline-url
|
|
3254
|
+
"& .cm-url, & .cm-inline-url": {
|
|
3255
|
+
color: blue[800],
|
|
3256
|
+
textDecoration: "none"
|
|
3257
|
+
},
|
|
3147
3258
|
"& .cm-variable-3, & .cm-type": {
|
|
3148
3259
|
color: indigo[800]
|
|
3149
3260
|
},
|
|
@@ -3157,20 +3268,23 @@ const CodeAreaTheme = styled(Box, {
|
|
|
3157
3268
|
"& .CodeMirror-selected": {
|
|
3158
3269
|
background: blue[800]
|
|
3159
3270
|
},
|
|
3160
|
-
"& .cm-header
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
fontSize: theme.typography.h3.fontSize
|
|
3271
|
+
"& .cm-header": {
|
|
3272
|
+
color: red[700],
|
|
3273
|
+
...theme.typography.code3,
|
|
3274
|
+
fontWeight: theme.typography.fontWeightBold
|
|
3165
3275
|
},
|
|
3166
|
-
"& .cm-header-
|
|
3167
|
-
|
|
3276
|
+
"& .cm-header-4, & .cm-header-5, & .cm-header-6": {
|
|
3277
|
+
fontWeight: theme.typography.fontWeightRegular
|
|
3168
3278
|
},
|
|
3169
|
-
|
|
3170
|
-
|
|
3279
|
+
// Custom inline code styling
|
|
3280
|
+
"& .cm-inline-code": {
|
|
3281
|
+
backgroundColor: theme.palette.black[4],
|
|
3282
|
+
color: purple[500]
|
|
3171
3283
|
},
|
|
3172
|
-
|
|
3173
|
-
|
|
3284
|
+
// Custom code block styling
|
|
3285
|
+
"& .cm-code-block": {
|
|
3286
|
+
backgroundColor: theme.palette.black[4],
|
|
3287
|
+
marginRight: theme.spacing(2)
|
|
3174
3288
|
},
|
|
3175
3289
|
...size === "small" && {
|
|
3176
3290
|
"& .CodeMirror": {
|
|
@@ -3206,6 +3320,100 @@ function findCodeAreaControlCodeOccurrences(content) {
|
|
|
3206
3320
|
}
|
|
3207
3321
|
return matches;
|
|
3208
3322
|
}
|
|
3323
|
+
const editorMarkers = /* @__PURE__ */ new WeakMap();
|
|
3324
|
+
function clearMarkersForClass(editor, className) {
|
|
3325
|
+
var _a, _b;
|
|
3326
|
+
const markers = (_a = editorMarkers.get(editor)) == null ? void 0 : _a.get(className);
|
|
3327
|
+
if (!markers) return;
|
|
3328
|
+
markers.forEach((marker) => {
|
|
3329
|
+
if (marker.find()) {
|
|
3330
|
+
marker.clear();
|
|
3331
|
+
}
|
|
3332
|
+
});
|
|
3333
|
+
(_b = editorMarkers.get(editor)) == null ? void 0 : _b.delete(className);
|
|
3334
|
+
}
|
|
3335
|
+
function storeMarkersForClass(editor, className, markers) {
|
|
3336
|
+
if (!editorMarkers.has(editor)) {
|
|
3337
|
+
editorMarkers.set(editor, /* @__PURE__ */ new Map());
|
|
3338
|
+
}
|
|
3339
|
+
const editorMap = editorMarkers.get(editor);
|
|
3340
|
+
if (editorMap) {
|
|
3341
|
+
editorMap.set(className, markers);
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
function CodeAreaMarkTextPattern(editor, pattern, options, excludePatterns) {
|
|
3345
|
+
const { className } = options;
|
|
3346
|
+
clearMarkersForClass(editor, className);
|
|
3347
|
+
const doc = editor.getDoc();
|
|
3348
|
+
const content = doc.getValue();
|
|
3349
|
+
const excludeRanges = (excludePatterns == null ? void 0 : excludePatterns.flatMap(
|
|
3350
|
+
(excludePattern) => Array.from(content.matchAll(excludePattern), (match) => ({
|
|
3351
|
+
start: match.index,
|
|
3352
|
+
end: match.index + match[0].length
|
|
3353
|
+
}))
|
|
3354
|
+
)) ?? [];
|
|
3355
|
+
const markers = Array.from(content.matchAll(pattern)).filter((match) => {
|
|
3356
|
+
if (excludeRanges.some(
|
|
3357
|
+
(range) => match.index >= range.start && match.index < range.end
|
|
3358
|
+
)) {
|
|
3359
|
+
return false;
|
|
3360
|
+
}
|
|
3361
|
+
return !match[1] || match[1].trim().length > 0;
|
|
3362
|
+
}).map((match) => {
|
|
3363
|
+
const startPos = doc.posFromIndex(match.index);
|
|
3364
|
+
const endPos = doc.posFromIndex(match.index + match[0].length);
|
|
3365
|
+
return editor.markText(startPos, endPos, {
|
|
3366
|
+
atomic: false,
|
|
3367
|
+
clearOnEnter: false,
|
|
3368
|
+
...options
|
|
3369
|
+
});
|
|
3370
|
+
});
|
|
3371
|
+
if (markers.length > 0) {
|
|
3372
|
+
storeMarkersForClass(editor, className, markers);
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3375
|
+
function markInlineCode(editor, className = "cm-inline-code") {
|
|
3376
|
+
const inlineCodePattern = /`([^`\n\r]+)`/g;
|
|
3377
|
+
const codeBlockPattern = /```[\s\S]*?```/g;
|
|
3378
|
+
CodeAreaMarkTextPattern(
|
|
3379
|
+
editor,
|
|
3380
|
+
inlineCodePattern,
|
|
3381
|
+
{
|
|
3382
|
+
className
|
|
3383
|
+
},
|
|
3384
|
+
[codeBlockPattern]
|
|
3385
|
+
);
|
|
3386
|
+
}
|
|
3387
|
+
function markInlineLinks(editor, className = "cm-inline-url") {
|
|
3388
|
+
const inlineLinkPattern = /<((?:https?:\/\/[^\s<>]+)|(?:[^\s<>@]+@[^\s<>@]+\.[^\s<>@]+))>/g;
|
|
3389
|
+
const codeBlockPattern = /```[\s\S]*?```/g;
|
|
3390
|
+
CodeAreaMarkTextPattern(
|
|
3391
|
+
editor,
|
|
3392
|
+
inlineLinkPattern,
|
|
3393
|
+
{
|
|
3394
|
+
className
|
|
3395
|
+
},
|
|
3396
|
+
[codeBlockPattern]
|
|
3397
|
+
);
|
|
3398
|
+
}
|
|
3399
|
+
function markCodeBlocks(editor, className = "cm-code-block") {
|
|
3400
|
+
const doc = editor.getDoc();
|
|
3401
|
+
const content = doc.getValue();
|
|
3402
|
+
const lineCount = content.split("\n").length;
|
|
3403
|
+
for (let i = 0; i < lineCount; i++) {
|
|
3404
|
+
["background", "wrap", "text"].forEach(
|
|
3405
|
+
(where) => editor.removeLineClass(i, where, className)
|
|
3406
|
+
);
|
|
3407
|
+
}
|
|
3408
|
+
const codeBlockPattern = /```[\s\S]*?(?:```|$)/g;
|
|
3409
|
+
Array.from(content.matchAll(codeBlockPattern)).forEach((match) => {
|
|
3410
|
+
const startPos = doc.posFromIndex(match.index);
|
|
3411
|
+
const endPos = doc.posFromIndex(match.index + match[0].length);
|
|
3412
|
+
for (let lineNum = startPos.line; lineNum <= endPos.line; lineNum++) {
|
|
3413
|
+
editor.addLineClass(lineNum, "wrap", className);
|
|
3414
|
+
}
|
|
3415
|
+
});
|
|
3416
|
+
}
|
|
3209
3417
|
function foldCode(editor, { from, to }) {
|
|
3210
3418
|
editor.foldCode(
|
|
3211
3419
|
0,
|
|
@@ -3246,6 +3454,7 @@ function CodeAreaInput({
|
|
|
3246
3454
|
const codeMirrorOptions = {
|
|
3247
3455
|
mode: "sql",
|
|
3248
3456
|
theme: "light",
|
|
3457
|
+
addModeClass: true,
|
|
3249
3458
|
lineNumbers: true,
|
|
3250
3459
|
lineWrapping: true,
|
|
3251
3460
|
extraKeys: { "Ctrl-Space": "autocomplete" },
|
|
@@ -3276,6 +3485,13 @@ function CodeAreaInput({
|
|
|
3276
3485
|
}
|
|
3277
3486
|
initialFoldingDoneRef.current = true;
|
|
3278
3487
|
}, [value, editor, autoFoldControlBlocks]);
|
|
3488
|
+
useEffect(() => {
|
|
3489
|
+
const mode = typeof (options == null ? void 0 : options.mode) === "object" && options.mode !== null ? options.mode.name : options == null ? void 0 : options.mode;
|
|
3490
|
+
if (mode !== "markdown" || !editor || !value) return;
|
|
3491
|
+
markInlineCode(editor);
|
|
3492
|
+
markInlineLinks(editor);
|
|
3493
|
+
markCodeBlocks(editor);
|
|
3494
|
+
}, [editor, value, options == null ? void 0 : options.mode]);
|
|
3279
3495
|
return /* @__PURE__ */ jsxs(
|
|
3280
3496
|
CodeAreaTheme,
|
|
3281
3497
|
{
|
|
@@ -4210,7 +4426,7 @@ function DialogConfirmation({
|
|
|
4210
4426
|
"aria-label": ariaLabel,
|
|
4211
4427
|
role: "presentation",
|
|
4212
4428
|
"data-name": "dialog-confirmation",
|
|
4213
|
-
children: /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway: handleClickAway, children: /* @__PURE__ */ jsx(
|
|
4429
|
+
children: /* @__PURE__ */ jsx(ClickAwayListener$1, { onClickAway: handleClickAway, children: /* @__PURE__ */ jsx(
|
|
4214
4430
|
Slide,
|
|
4215
4431
|
{
|
|
4216
4432
|
direction: "up",
|
|
@@ -4496,6 +4712,7 @@ export {
|
|
|
4496
4712
|
CodeAreaFooter,
|
|
4497
4713
|
CodeAreaHeader,
|
|
4498
4714
|
CodeAreaInput,
|
|
4715
|
+
CodeAreaMarkTextPattern,
|
|
4499
4716
|
CopiableComponent,
|
|
4500
4717
|
CreatableAutocomplete,
|
|
4501
4718
|
DatePicker,
|
|
@@ -4513,6 +4730,7 @@ export {
|
|
|
4513
4730
|
DialogStepper,
|
|
4514
4731
|
IconButton$1 as IconButton,
|
|
4515
4732
|
LabelWithIndicator,
|
|
4733
|
+
L as Link,
|
|
4516
4734
|
Menu$1 as Menu,
|
|
4517
4735
|
MenuItem$1 as MenuItem,
|
|
4518
4736
|
MenuItemFilter,
|
|
@@ -4522,6 +4740,7 @@ export {
|
|
|
4522
4740
|
PasswordField,
|
|
4523
4741
|
SelectField,
|
|
4524
4742
|
Snackbar,
|
|
4743
|
+
SplitButton,
|
|
4525
4744
|
a as TablePaginationActions,
|
|
4526
4745
|
Tag,
|
|
4527
4746
|
TimePicker,
|
|
@@ -4,9 +4,9 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const utils = require("@mui/material/utils");
|
|
6
6
|
const ArrowDown = require("../ArrowDown-8fLj23Ge.cjs");
|
|
7
|
-
const OpenDiagonallyRight = require("../OpenDiagonallyRight-
|
|
7
|
+
const OpenDiagonallyRight = require("../OpenDiagonallyRight-CM1tojUq.cjs");
|
|
8
8
|
const SwatchSquare = require("../SwatchSquare-benaO55C.cjs");
|
|
9
|
-
const Icon$
|
|
9
|
+
const Icon$2$ = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
"path",
|
|
11
11
|
{
|
|
12
12
|
fill: "currentColor",
|
|
@@ -15,10 +15,10 @@ const Icon$30 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www
|
|
|
15
15
|
clipRule: "evenodd"
|
|
16
16
|
}
|
|
17
17
|
) });
|
|
18
|
-
const BaseSvgIcon$
|
|
18
|
+
const BaseSvgIcon$2$ = utils.createSvgIcon(Icon$2$(), "AccessIn");
|
|
19
19
|
function AccessIn({ width, height, sx, ...props }, ref) {
|
|
20
20
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
-
BaseSvgIcon$
|
|
21
|
+
BaseSvgIcon$2$,
|
|
22
22
|
{
|
|
23
23
|
ref,
|
|
24
24
|
viewBox: "0 0 24 24",
|
|
@@ -32,17 +32,17 @@ function AccessIn({ width, height, sx, ...props }, ref) {
|
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
const AccessIn$1 = React.forwardRef(AccessIn);
|
|
35
|
-
const Icon$
|
|
35
|
+
const Icon$2_ = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36
36
|
"path",
|
|
37
37
|
{
|
|
38
38
|
fill: "currentColor",
|
|
39
39
|
d: "M4 8h4V4H4zM10 20h4v-4h-4zM8 20H4v-4h4zM4 14h4v-4H4zM14 14h-4v-4h4zM14 8h-4V4h4zM16 14h4v-4h-4zM20 20h-4v-4h4zM21 0h-2v3h-3v2h3v3h2V5h3V3h-3z"
|
|
40
40
|
}
|
|
41
41
|
) });
|
|
42
|
-
const BaseSvgIcon$
|
|
42
|
+
const BaseSvgIcon$2_ = utils.createSvgIcon(Icon$2_(), "AddApp");
|
|
43
43
|
function AddApp({ width, height, sx, ...props }, ref) {
|
|
44
44
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
-
BaseSvgIcon$
|
|
45
|
+
BaseSvgIcon$2_,
|
|
46
46
|
{
|
|
47
47
|
ref,
|
|
48
48
|
viewBox: "0 0 24 24",
|
|
@@ -56,7 +56,7 @@ function AddApp({ width, height, sx, ...props }, ref) {
|
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
const AddApp$1 = React.forwardRef(AddApp);
|
|
59
|
-
const Icon$
|
|
59
|
+
const Icon$2Z = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
60
|
"path",
|
|
61
61
|
{
|
|
62
62
|
fill: "currentColor",
|
|
@@ -65,10 +65,10 @@ const Icon$2_ = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www
|
|
|
65
65
|
clipRule: "evenodd"
|
|
66
66
|
}
|
|
67
67
|
) });
|
|
68
|
-
const BaseSvgIcon$
|
|
68
|
+
const BaseSvgIcon$2Z = utils.createSvgIcon(Icon$2Z(), "AddSection");
|
|
69
69
|
function AddSection({ width, height, sx, ...props }, ref) {
|
|
70
70
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
-
BaseSvgIcon$
|
|
71
|
+
BaseSvgIcon$2Z,
|
|
72
72
|
{
|
|
73
73
|
ref,
|
|
74
74
|
viewBox: "0 0 24 24",
|
|
@@ -82,17 +82,17 @@ function AddSection({ width, height, sx, ...props }, ref) {
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
const AddSection$1 = React.forwardRef(AddSection);
|
|
85
|
-
const Icon$
|
|
85
|
+
const Icon$2Y = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
86
86
|
"path",
|
|
87
87
|
{
|
|
88
88
|
fill: "currentColor",
|
|
89
89
|
d: "M3 7v2h10V7zm4 6v2H3v2h4v2h2v-6zm14 4v-2H11v2zm-6-6h2V9h4V7h-4V5h-2z"
|
|
90
90
|
}
|
|
91
91
|
) });
|
|
92
|
-
const BaseSvgIcon$
|
|
92
|
+
const BaseSvgIcon$2Y = utils.createSvgIcon(Icon$2Y(), "AdvancedSettings");
|
|
93
93
|
function AdvancedSettings({ width, height, sx, ...props }, ref) {
|
|
94
94
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
95
|
-
BaseSvgIcon$
|
|
95
|
+
BaseSvgIcon$2Y,
|
|
96
96
|
{
|
|
97
97
|
ref,
|
|
98
98
|
viewBox: "0 0 24 24",
|
|
@@ -106,7 +106,7 @@ function AdvancedSettings({ width, height, sx, ...props }, ref) {
|
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
const AdvancedSettings$1 = React.forwardRef(AdvancedSettings);
|
|
109
|
-
const Icon$
|
|
109
|
+
const Icon$2X = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: [
|
|
110
110
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
111
111
|
"path",
|
|
112
112
|
{
|
|
@@ -147,10 +147,10 @@ const Icon$2Y = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://ww
|
|
|
147
147
|
}
|
|
148
148
|
)
|
|
149
149
|
] });
|
|
150
|
-
const BaseSvgIcon$
|
|
150
|
+
const BaseSvgIcon$2X = utils.createSvgIcon(Icon$2X(), "AiTool");
|
|
151
151
|
function AiTool({ width, height, sx, ...props }, ref) {
|
|
152
152
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
-
BaseSvgIcon$
|
|
153
|
+
BaseSvgIcon$2X,
|
|
154
154
|
{
|
|
155
155
|
ref,
|
|
156
156
|
viewBox: "0 0 24 24",
|
|
@@ -164,7 +164,7 @@ function AiTool({ width, height, sx, ...props }, ref) {
|
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
const AiTool$1 = React.forwardRef(AiTool);
|
|
167
|
-
const Icon$
|
|
167
|
+
const Icon$2W = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: [
|
|
168
168
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
169
169
|
"path",
|
|
170
170
|
{
|
|
@@ -184,10 +184,10 @@ const Icon$2X = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://ww
|
|
|
184
184
|
}
|
|
185
185
|
)
|
|
186
186
|
] });
|
|
187
|
-
const BaseSvgIcon$
|
|
187
|
+
const BaseSvgIcon$2W = utils.createSvgIcon(Icon$2W(), "Annotation");
|
|
188
188
|
function Annotation({ width, height, sx, ...props }, ref) {
|
|
189
189
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
190
|
-
BaseSvgIcon$
|
|
190
|
+
BaseSvgIcon$2W,
|
|
191
191
|
{
|
|
192
192
|
ref,
|
|
193
193
|
viewBox: "0 0 24 24",
|
|
@@ -201,7 +201,7 @@ function Annotation({ width, height, sx, ...props }, ref) {
|
|
|
201
201
|
);
|
|
202
202
|
}
|
|
203
203
|
const Annotation$1 = React.forwardRef(Annotation);
|
|
204
|
-
const Icon$
|
|
204
|
+
const Icon$2V = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: [
|
|
205
205
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
206
206
|
"path",
|
|
207
207
|
{
|
|
@@ -226,10 +226,10 @@ const Icon$2W = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://ww
|
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] });
|
|
229
|
-
const BaseSvgIcon$
|
|
229
|
+
const BaseSvgIcon$2V = utils.createSvgIcon(Icon$2V(), "ApiCall");
|
|
230
230
|
function ApiCall({ width, height, sx, ...props }, ref) {
|
|
231
231
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
232
|
-
BaseSvgIcon$
|
|
232
|
+
BaseSvgIcon$2V,
|
|
233
233
|
{
|
|
234
234
|
ref,
|
|
235
235
|
viewBox: "0 0 24 24",
|
|
@@ -243,7 +243,7 @@ function ApiCall({ width, height, sx, ...props }, ref) {
|
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
245
|
const ApiCall$1 = React.forwardRef(ApiCall);
|
|
246
|
-
const Icon$
|
|
246
|
+
const Icon$2U = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
247
|
"path",
|
|
248
248
|
{
|
|
249
249
|
fill: "currentColor",
|
|
@@ -252,10 +252,10 @@ const Icon$2V = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www
|
|
|
252
252
|
clipRule: "evenodd"
|
|
253
253
|
}
|
|
254
254
|
) });
|
|
255
|
-
const BaseSvgIcon$
|
|
255
|
+
const BaseSvgIcon$2U = utils.createSvgIcon(Icon$2U(), "ArrowLeft");
|
|
256
256
|
function ArrowLeft({ width, height, sx, ...props }, ref) {
|
|
257
257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
258
|
-
BaseSvgIcon$
|
|
258
|
+
BaseSvgIcon$2U,
|
|
259
259
|
{
|
|
260
260
|
ref,
|
|
261
261
|
viewBox: "0 0 24 24",
|
|
@@ -269,7 +269,7 @@ function ArrowLeft({ width, height, sx, ...props }, ref) {
|
|
|
269
269
|
);
|
|
270
270
|
}
|
|
271
271
|
const ArrowLeft$1 = React.forwardRef(ArrowLeft);
|
|
272
|
-
const Icon$
|
|
272
|
+
const Icon$2T = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
273
273
|
"path",
|
|
274
274
|
{
|
|
275
275
|
fill: "currentColor",
|
|
@@ -278,34 +278,8 @@ const Icon$2U = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www
|
|
|
278
278
|
clipRule: "evenodd"
|
|
279
279
|
}
|
|
280
280
|
) });
|
|
281
|
-
const BaseSvgIcon$
|
|
281
|
+
const BaseSvgIcon$2T = utils.createSvgIcon(Icon$2T(), "ArrowRight");
|
|
282
282
|
function ArrowRight({ width, height, sx, ...props }, ref) {
|
|
283
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
284
|
-
BaseSvgIcon$2U,
|
|
285
|
-
{
|
|
286
|
-
ref,
|
|
287
|
-
viewBox: "0 0 24 24",
|
|
288
|
-
sx: {
|
|
289
|
-
width,
|
|
290
|
-
height: height || width,
|
|
291
|
-
...sx
|
|
292
|
-
},
|
|
293
|
-
...props
|
|
294
|
-
}
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
const ArrowRight$1 = React.forwardRef(ArrowRight);
|
|
298
|
-
const Icon$2T = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
299
|
-
"path",
|
|
300
|
-
{
|
|
301
|
-
fill: "currentColor",
|
|
302
|
-
fillRule: "evenodd",
|
|
303
|
-
d: "M12.01 11.83 15.18 15l1.41-1.41L12.01 9l-4.59 4.59L8.84 15z",
|
|
304
|
-
clipRule: "evenodd"
|
|
305
|
-
}
|
|
306
|
-
) });
|
|
307
|
-
const BaseSvgIcon$2T = utils.createSvgIcon(Icon$2T(), "ArrowUp");
|
|
308
|
-
function ArrowUp({ width, height, sx, ...props }, ref) {
|
|
309
283
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
284
|
BaseSvgIcon$2T,
|
|
311
285
|
{
|
|
@@ -320,7 +294,7 @@ function ArrowUp({ width, height, sx, ...props }, ref) {
|
|
|
320
294
|
}
|
|
321
295
|
);
|
|
322
296
|
}
|
|
323
|
-
const
|
|
297
|
+
const ArrowRight$1 = React.forwardRef(ArrowRight);
|
|
324
298
|
const Icon$2S = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: [
|
|
325
299
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
326
300
|
"path",
|
|
@@ -5796,6 +5770,7 @@ function WorkflowTemp({ width, height, sx, ...props }, ref) {
|
|
|
5796
5770
|
}
|
|
5797
5771
|
const WorkflowTemp$1 = React.forwardRef(WorkflowTemp);
|
|
5798
5772
|
exports.ArrowDown = ArrowDown.ArrowDown;
|
|
5773
|
+
exports.ArrowUp = OpenDiagonallyRight.ArrowUp;
|
|
5799
5774
|
exports.CloseDiagonallyRight = OpenDiagonallyRight.CloseDiagonallyRight;
|
|
5800
5775
|
exports.OpenDiagonallyRight = OpenDiagonallyRight.OpenDiagonallyRight;
|
|
5801
5776
|
exports.Search = SwatchSquare.Search;
|
|
@@ -5809,7 +5784,6 @@ exports.Annotation = Annotation$1;
|
|
|
5809
5784
|
exports.ApiCall = ApiCall$1;
|
|
5810
5785
|
exports.ArrowLeft = ArrowLeft$1;
|
|
5811
5786
|
exports.ArrowRight = ArrowRight$1;
|
|
5812
|
-
exports.ArrowUp = ArrowUp$1;
|
|
5813
5787
|
exports.AsynchronousWait = AsynchronousWait$1;
|
|
5814
5788
|
exports.Autostyle = Autostyle$1;
|
|
5815
5789
|
exports.Avg = Avg$1;
|