@carto/meridian-ds 1.4.3-alpha-codemirror.6 → 1.4.3-alpha-tag.2

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/{Alert-CpgfD3bq.js → Alert--QYebQp3.js} +1 -1
  3. package/dist/{Alert-ChcvNOU6.cjs → Alert-DFaAeTZf.cjs} +3 -3
  4. package/dist/{palette-CD5ph5A-.cjs → TablePaginationActions-BG2gWq0M.cjs} +3 -232
  5. package/dist/{palette-DI1CmQ2J.js → TablePaginationActions-Dit3VW-A.js} +5 -234
  6. package/dist/components/index.cjs +236 -1098
  7. package/dist/components/index.js +202 -1064
  8. package/dist/custom-icons/index.cjs +390 -339
  9. package/dist/custom-icons/index.js +390 -339
  10. package/dist/paletteUtils-B9ybmwiI.cjs +304 -0
  11. package/dist/paletteUtils-BHqJlHm9.js +288 -0
  12. package/dist/theme/index.cjs +103 -103
  13. package/dist/theme/index.js +4 -3
  14. package/dist/types/components/molecules/Tag.d.ts +20 -0
  15. package/dist/types/components/molecules/Tag.d.ts.map +1 -0
  16. package/dist/types/components/molecules/index.d.ts +2 -0
  17. package/dist/types/components/molecules/index.d.ts.map +1 -1
  18. package/dist/types/components/organisms/index.d.ts +0 -2
  19. package/dist/types/components/organisms/index.d.ts.map +1 -1
  20. package/dist/types/localization/en.d.ts +0 -6
  21. package/dist/types/localization/en.d.ts.map +1 -1
  22. package/dist/types/localization/es.d.ts +0 -6
  23. package/dist/types/localization/es.d.ts.map +1 -1
  24. package/dist/types/localization/id.d.ts +0 -6
  25. package/dist/types/localization/id.d.ts.map +1 -1
  26. package/dist/types/localization/index.d.ts +0 -18
  27. package/dist/types/localization/index.d.ts.map +1 -1
  28. package/dist/widgets/index.cjs +136 -136
  29. package/dist/widgets/index.js +3 -3
  30. package/package.json +1 -6
  31. package/dist/OpenDiagonallyRight-5HZXh46V.js +0 -59
  32. package/dist/OpenDiagonallyRight-BrRyCV4Q.cjs +0 -58
  33. package/dist/paletteUtils-DEHchy2r.cjs +0 -93
  34. package/dist/paletteUtils-DTaXyq2Z.js +0 -77
  35. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts +0 -16
  36. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts.map +0 -1
  37. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts +0 -16
  38. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts.map +0 -1
  39. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts +0 -10
  40. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts.map +0 -1
  41. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts +0 -8
  42. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts.map +0 -1
  43. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts +0 -4
  44. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts.map +0 -1
  45. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts +0 -12
  46. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts.map +0 -1
  47. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts +0 -9
  48. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts.map +0 -1
  49. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts +0 -26
  50. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts.map +0 -1
  51. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts +0 -7
  52. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts.map +0 -1
  53. package/dist/types/components/organisms/CodeArea/index.d.ts +0 -9
  54. package/dist/types/components/organisms/CodeArea/index.d.ts.map +0 -1
  55. package/dist/types/components/organisms/CodeArea/types.d.ts +0 -38
  56. package/dist/types/components/organisms/CodeArea/types.d.ts.map +0 -1
  57. package/dist/types/components/organisms/CodeArea/utils.d.ts +0 -5
  58. package/dist/types/components/organisms/CodeArea/utils.d.ts.map +0 -1
@@ -3,10 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const material = require("@mui/material");
6
- const palette = require("../palette-CD5ph5A-.cjs");
6
+ const TablePaginationActions = require("../TablePaginationActions-BG2gWq0M.cjs");
7
7
  const reactIntl = require("react-intl");
8
8
  const iconsMaterial = require("@mui/icons-material");
9
- const Alert$1 = require("../Alert-ChcvNOU6.cjs");
9
+ const Alert$1 = require("../Alert-DFaAeTZf.cjs");
10
10
  require("cartocolor");
11
11
  const MenuItem = require("../MenuItem-Br2jY2lt.cjs");
12
12
  const ArrowDown = require("../ArrowDown-8fLj23Ge.cjs");
@@ -14,31 +14,6 @@ const DatePicker$1 = require("@mui/x-date-pickers/DatePicker");
14
14
  const xDatePickers = require("@mui/x-date-pickers");
15
15
  const TimePicker$1 = require("@mui/x-date-pickers/TimePicker");
16
16
  const DateTimePicker$1 = require("@mui/x-date-pickers/DateTimePicker");
17
- const OpenDiagonallyRight = require("../OpenDiagonallyRight-BrRyCV4Q.cjs");
18
- const reactCodemirror2 = require("react-codemirror2");
19
- const colors = require("@mui/material/colors");
20
- require("codemirror/lib/codemirror.css");
21
- require("codemirror/lib/codemirror.js");
22
- require("codemirror/mode/sql/sql.js");
23
- require("codemirror/mode/javascript/javascript.js");
24
- require("codemirror/mode/htmlmixed/htmlmixed.js");
25
- require("codemirror/mode/markdown/markdown.js");
26
- require("codemirror/mode/shell/shell.js");
27
- require("codemirror/mode/python/python.js");
28
- require("codemirror/addon/display/placeholder");
29
- require("codemirror/addon/hint/sql-hint.js");
30
- require("codemirror/addon/hint/show-hint.css");
31
- require("codemirror/addon/hint/show-hint.js");
32
- require("codemirror/addon/selection/active-line.js");
33
- require("codemirror/addon/edit/matchbrackets.js");
34
- require("codemirror/addon/fold/foldcode.js");
35
- require("codemirror/addon/fold/foldgutter.js");
36
- require("codemirror/addon/fold/foldgutter.css");
37
- require("codemirror/addon/fold/brace-fold.js");
38
- require("codemirror/addon/fold/xml-fold.js");
39
- require("codemirror/addon/fold/indent-fold.js");
40
- require("codemirror/addon/fold/markdown-fold.js");
41
- require("codemirror/addon/fold/comment-fold.js");
42
17
  const ClickAwayListener = require("@mui/material/ClickAwayListener");
43
18
  const IndicatorIcon = material.styled(material.Box)({
44
19
  position: "absolute",
@@ -95,17 +70,17 @@ function _Button({
95
70
  ...otherProps,
96
71
  role: otherProps.href ? "link" : "button",
97
72
  ref,
98
- children: /* @__PURE__ */ jsxRuntime.jsx(palette.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
73
+ children: /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
99
74
  }
100
75
  );
101
76
  }
102
77
  const Button = React.forwardRef(_Button);
103
- const Root$5 = material.styled(material.Box)(({ theme }) => ({
78
+ const Root$4 = material.styled(material.Box)(({ theme }) => ({
104
79
  display: "flex",
105
80
  alignItems: "center",
106
81
  gap: theme.spacing(0.5)
107
82
  }));
108
- const Indicator = material.styled(palette.Typography)(({ theme }) => ({
83
+ const Indicator = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
109
84
  ".Mui-disabled &": {
110
85
  color: theme.palette.text.disabled
111
86
  }
@@ -113,9 +88,9 @@ const Indicator = material.styled(palette.Typography)(({ theme }) => ({
113
88
  const Icon = material.styled(material.Box)(({ theme }) => ({
114
89
  display: "flex",
115
90
  svg: {
116
- width: palette.ICON_SIZE_SMALL,
117
- height: palette.ICON_SIZE_SMALL,
118
- fontSize: palette.ICON_SIZE_SMALL,
91
+ width: TablePaginationActions.ICON_SIZE_SMALL,
92
+ height: TablePaginationActions.ICON_SIZE_SMALL,
93
+ fontSize: TablePaginationActions.ICON_SIZE_SMALL,
119
94
  path: {
120
95
  fill: theme.palette.text.secondary,
121
96
  ".Mui-disabled &": {
@@ -130,7 +105,7 @@ function LabelWithIndicator({
130
105
  icon,
131
106
  inheritSize
132
107
  }) {
133
- return /* @__PURE__ */ jsxRuntime.jsxs(Root$5, { children: [
108
+ return /* @__PURE__ */ jsxRuntime.jsxs(Root$4, { children: [
134
109
  label,
135
110
  type && /* @__PURE__ */ jsxRuntime.jsx(
136
111
  Indicator,
@@ -147,7 +122,7 @@ function LabelWithIndicator({
147
122
  }
148
123
  function _PasswordField({ InputProps, size = "small", ...otherProps }, ref) {
149
124
  const intl = reactIntl.useIntl();
150
- const intlConfig = palette.useImperativeIntl(intl);
125
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
151
126
  const [showPassword, setShowPassword] = React.useState(false);
152
127
  const handleClickShowPassword = () => setShowPassword(!showPassword);
153
128
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -273,7 +248,7 @@ function _SelectField({
273
248
  },
274
249
  children: [
275
250
  placeholder && /* @__PURE__ */ jsxRuntime.jsx(PlaceholderItem, { disabled: true, value: "", children: /* @__PURE__ */ jsxRuntime.jsx(
276
- palette.Typography,
251
+ TablePaginationActions.Typography,
277
252
  {
278
253
  variant: isSmall ? "body2" : "body1",
279
254
  color: "text.hint",
@@ -542,7 +517,7 @@ function _MenuItemFilter({
542
517
  "data-testid": dataTestId
543
518
  }, ref) {
544
519
  const intl = reactIntl.useIntl();
545
- const intlConfig = palette.useImperativeIntl(intl);
520
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
546
521
  return /* @__PURE__ */ jsxRuntime.jsx(
547
522
  StyledMenuItem$1,
548
523
  {
@@ -683,14 +658,14 @@ function _MultipleSelectField({
683
658
  const isSmall = size === "small";
684
659
  const paddingSize = isSmall || variant === "standard" ? 0 : 2;
685
660
  const intl = reactIntl.useIntl();
686
- const intlConfig = palette.useImperativeIntl(intl);
661
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
687
662
  const counterText = `${currentOptions.length} ${intlConfig.formatMessage({
688
663
  id: "c4r.form.selected"
689
664
  })}`;
690
665
  const renderValue = React.useMemo(() => {
691
666
  if (areAllSelected) {
692
667
  return /* @__PURE__ */ jsxRuntime.jsx(
693
- palette.Typography,
668
+ TablePaginationActions.Typography,
694
669
  {
695
670
  component: "span",
696
671
  variant: isSmall ? "body2" : "body1",
@@ -702,7 +677,7 @@ function _MultipleSelectField({
702
677
  }
703
678
  if (areAnySelected) {
704
679
  return /* @__PURE__ */ jsxRuntime.jsx(
705
- palette.Typography,
680
+ TablePaginationActions.Typography,
706
681
  {
707
682
  component: "span",
708
683
  variant: isSmall ? "body2" : "body1",
@@ -713,7 +688,7 @@ function _MultipleSelectField({
713
688
  );
714
689
  }
715
690
  return /* @__PURE__ */ jsxRuntime.jsx(
716
- palette.Typography,
691
+ TablePaginationActions.Typography,
717
692
  {
718
693
  component: "span",
719
694
  variant: isSmall ? "body2" : "body1",
@@ -920,7 +895,7 @@ function useFileUpload({
920
895
  uploadInputRef
921
896
  }) {
922
897
  const intl = reactIntl.useIntl();
923
- const intlConfig = palette.useImperativeIntl(intl);
898
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
924
899
  const [filesText, setFilesText] = React.useState("");
925
900
  const [dragOver, setDragOver] = React.useState(false);
926
901
  React.useEffect(() => {
@@ -1157,7 +1132,7 @@ function useAutocompleteRenderOption() {
1157
1132
  title
1158
1133
  ),
1159
1134
  secondaryText && /* @__PURE__ */ jsxRuntime.jsx(
1160
- palette.Typography,
1135
+ TablePaginationActions.Typography,
1161
1136
  {
1162
1137
  component: "p",
1163
1138
  variant: "caption",
@@ -1181,7 +1156,7 @@ function useCreatableAutocomplete({
1181
1156
  multiple
1182
1157
  }) {
1183
1158
  const intl = reactIntl.useIntl();
1184
- const intlConfig = palette.useImperativeIntl(intl);
1159
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1185
1160
  const filter = material.createFilterOptions();
1186
1161
  const { renderOption: autocompleteRenderOption } = useAutocompleteRenderOption();
1187
1162
  const creatableFilterOptions = (options, params) => {
@@ -1452,7 +1427,7 @@ const _CopiableComponent = ({
1452
1427
  ...props
1453
1428
  }, ref) => {
1454
1429
  const intl = reactIntl.useIntl();
1455
- const intlConfig = palette.useImperativeIntl(intl);
1430
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1456
1431
  const [open, setOpen] = React.useState(false);
1457
1432
  const { copy } = useCopyValue(copyText, copiedText);
1458
1433
  const handleClick = (e) => {
@@ -1585,8 +1560,8 @@ const StyledAvatar = material.styled(material.Avatar, {
1585
1560
  ...theme.typography.caption,
1586
1561
  fontWeight: 500,
1587
1562
  svg: {
1588
- width: palette.ICON_SIZE_SMALL,
1589
- height: palette.ICON_SIZE_SMALL
1563
+ width: TablePaginationActions.ICON_SIZE_SMALL,
1564
+ height: TablePaginationActions.ICON_SIZE_SMALL
1590
1565
  }
1591
1566
  },
1592
1567
  ...disabled && {
@@ -1609,7 +1584,7 @@ const SnackbarRoot = material.styled(material.Snackbar)(({ theme }) => ({
1609
1584
  maxWidth: `${MAX_WIDTH}px`
1610
1585
  }
1611
1586
  }));
1612
- const Content$4 = material.styled(material.Box, {
1587
+ const Content$3 = material.styled(material.Box, {
1613
1588
  shouldForwardProp: (prop) => prop !== "autoWidth"
1614
1589
  })(({ autoWidth, theme }) => ({
1615
1590
  minWidth: "100%",
@@ -1691,7 +1666,7 @@ const CloseButtonWrapper = material.styled(material.Box)(({ theme }) => ({
1691
1666
  }));
1692
1667
  function Snackbar({
1693
1668
  severity = "neutral",
1694
- autoHideDuration = palette.NOTIFICATION_DURATION_IN_MS,
1669
+ autoHideDuration = TablePaginationActions.NOTIFICATION_DURATION_IN_MS,
1695
1670
  closeable = true,
1696
1671
  children,
1697
1672
  title,
@@ -1703,11 +1678,11 @@ function Snackbar({
1703
1678
  ...rest
1704
1679
  }) {
1705
1680
  const intl = reactIntl.useIntl();
1706
- const intlConfig = palette.useImperativeIntl(intl);
1681
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1707
1682
  const isNeutral = severity === "neutral";
1708
1683
  const disabledIcon = icon === false || isNeutral && !icon;
1709
1684
  const disabledAutoHide = autoHideDuration === null;
1710
- const duration = disabledAutoHide ? null : autoHideDuration || palette.NOTIFICATION_DURATION_IN_MS;
1685
+ const duration = disabledAutoHide ? null : autoHideDuration || TablePaginationActions.NOTIFICATION_DURATION_IN_MS;
1711
1686
  return /* @__PURE__ */ jsxRuntime.jsx(material.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1712
1687
  SnackbarRoot,
1713
1688
  {
@@ -1718,7 +1693,7 @@ function Snackbar({
1718
1693
  TransitionComponent: autoWidth ? material.Fade : material.Slide,
1719
1694
  "data-auto-width": autoWidth,
1720
1695
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1721
- Content$4,
1696
+ Content$3,
1722
1697
  {
1723
1698
  sx: {
1724
1699
  position: "relative"
@@ -1755,10 +1730,192 @@ function Snackbar({
1755
1730
  }
1756
1731
  ) });
1757
1732
  }
1733
+ function colorProps(color, variant, theme, disabled) {
1734
+ if (disabled) {
1735
+ if (variant === "outlined") {
1736
+ return {
1737
+ color: theme.palette.text.disabled,
1738
+ backgroundColor: theme.palette.black[4],
1739
+ borderColor: theme.palette.action.focus
1740
+ };
1741
+ }
1742
+ return {
1743
+ color: theme.palette.text.disabled,
1744
+ backgroundColor: theme.palette.action.disabledBackground,
1745
+ borderColor: "transparent"
1746
+ };
1747
+ }
1748
+ switch (color) {
1749
+ case "default":
1750
+ if (variant === "outlined") {
1751
+ return {
1752
+ color: theme.palette.text.secondary,
1753
+ backgroundColor: theme.palette.black["4"],
1754
+ borderColor: theme.palette.divider
1755
+ };
1756
+ }
1757
+ return {
1758
+ color: theme.palette.text.primary,
1759
+ backgroundColor: theme.palette.default.main,
1760
+ borderColor: "transparent"
1761
+ };
1762
+ case "primary":
1763
+ if (variant === "outlined") {
1764
+ return {
1765
+ color: theme.palette.primary.main,
1766
+ backgroundColor: theme.palette.primary.relatedLight,
1767
+ borderColor: theme.palette.primary.main
1768
+ };
1769
+ }
1770
+ return {
1771
+ color: theme.palette.primary.contrastText,
1772
+ backgroundColor: theme.palette.primary.main,
1773
+ borderColor: "transparent"
1774
+ };
1775
+ case "secondary":
1776
+ if (variant === "outlined") {
1777
+ return {
1778
+ color: theme.palette.secondary.main,
1779
+ backgroundColor: theme.palette.secondary.relatedLight,
1780
+ borderColor: theme.palette.secondary.main
1781
+ };
1782
+ }
1783
+ return {
1784
+ color: theme.palette.text.primary,
1785
+ backgroundColor: theme.palette.secondary.main,
1786
+ borderColor: "transparent"
1787
+ };
1788
+ case "success":
1789
+ if (variant === "outlined") {
1790
+ return {
1791
+ color: theme.palette.success.main,
1792
+ backgroundColor: theme.palette.success.relatedLight,
1793
+ borderColor: theme.palette.success.main
1794
+ };
1795
+ }
1796
+ return {
1797
+ color: theme.palette.success.main,
1798
+ backgroundColor: theme.palette.success.relatedLight,
1799
+ borderColor: "transparent"
1800
+ };
1801
+ case "warning":
1802
+ if (variant === "outlined") {
1803
+ return {
1804
+ color: theme.palette.warning.main,
1805
+ backgroundColor: theme.palette.warning.relatedLight,
1806
+ borderColor: theme.palette.warning.main
1807
+ };
1808
+ }
1809
+ return {
1810
+ color: theme.palette.text.primary,
1811
+ backgroundColor: theme.palette.warning.main,
1812
+ borderColor: "transparent"
1813
+ };
1814
+ case "error":
1815
+ if (variant === "outlined") {
1816
+ return {
1817
+ color: theme.palette.error.main,
1818
+ backgroundColor: theme.palette.error.relatedLight,
1819
+ borderColor: theme.palette.error.main
1820
+ };
1821
+ }
1822
+ return {
1823
+ color: theme.palette.primary.contrastText,
1824
+ backgroundColor: theme.palette.error.main,
1825
+ borderColor: "transparent"
1826
+ };
1827
+ }
1828
+ }
1829
+ const TagRoot = material.styled("div", {
1830
+ shouldForwardProp: (prop) => !["color", "variant", "disabled"].includes(prop)
1831
+ })(({
1832
+ color,
1833
+ variant,
1834
+ disabled,
1835
+ theme
1836
+ }) => {
1837
+ return {
1838
+ display: "inline-flex",
1839
+ flexDirection: "row",
1840
+ flexWrap: "nowrap",
1841
+ alignItems: "center",
1842
+ padding: theme.spacing(0, 0.5),
1843
+ borderRadius: theme.spacing(0.25),
1844
+ gap: theme.spacing(0.5),
1845
+ height: theme.spacing(2),
1846
+ borderWidth: "1px",
1847
+ borderStyle: "solid",
1848
+ ...colorProps(color ?? "primary", variant ?? "filled", theme, disabled)
1849
+ };
1850
+ });
1851
+ const TagIcon = material.styled("div")(({ theme }) => ({
1852
+ display: "flex",
1853
+ justifyContent: "center",
1854
+ alignItems: "center",
1855
+ "& svg": {
1856
+ width: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
1857
+ height: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
1858
+ "& g": {
1859
+ fill: "currentColor"
1860
+ }
1861
+ }
1862
+ }));
1863
+ const TagLabel = material.styled("span", {
1864
+ shouldForwardProp: (prop) => !["type", "icon"].includes(prop)
1865
+ })(({ type, icon, theme }) => ({
1866
+ display: "flex",
1867
+ alignItems: "center",
1868
+ paddingTop: type === "code" || icon ? theme.spacing(0.25) : void 0
1869
+ }));
1870
+ function _Tag({
1871
+ label,
1872
+ color = "primary",
1873
+ variant = "filled",
1874
+ icon,
1875
+ type = "default",
1876
+ typographyProps,
1877
+ noWrap = true,
1878
+ disabled,
1879
+ ...otherProps
1880
+ }, ref) {
1881
+ const typeCode = type === "code";
1882
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1883
+ TagRoot,
1884
+ {
1885
+ ref,
1886
+ className: "CartoTag-root",
1887
+ color,
1888
+ variant,
1889
+ disabled,
1890
+ "aria-disabled": disabled,
1891
+ "data-color": color,
1892
+ "data-variant": variant,
1893
+ "data-type": type,
1894
+ "data-name": "tag",
1895
+ ...otherProps,
1896
+ children: [
1897
+ icon && /* @__PURE__ */ jsxRuntime.jsx(TagIcon, { children: icon }),
1898
+ /* @__PURE__ */ jsxRuntime.jsx(TagLabel, { icon: !!icon, type, children: /* @__PURE__ */ jsxRuntime.jsx(
1899
+ TablePaginationActions.Typography,
1900
+ {
1901
+ component: "span",
1902
+ color: "inherit",
1903
+ variant: typeCode ? "code3" : "caption",
1904
+ weight: typeCode ? "strong" : "medium",
1905
+ noWrap,
1906
+ ...typographyProps,
1907
+ children: label
1908
+ }
1909
+ ) })
1910
+ ]
1911
+ }
1912
+ );
1913
+ }
1914
+ const Tag = React.forwardRef(_Tag);
1758
1915
  const Menu = material.styled("div")(({ theme }) => ({
1759
1916
  display: "flex",
1760
1917
  alignItems: "center",
1761
- height: palette.APPBAR_SIZE,
1918
+ height: TablePaginationActions.APPBAR_SIZE,
1762
1919
  marginRight: theme.spacing(1.5)
1763
1920
  }));
1764
1921
  const MenuButton = material.styled(material.IconButton)(({ theme }) => ({
@@ -1804,7 +1961,7 @@ const Logo = material.styled("div")(({ theme }) => ({
1804
1961
  function BrandLogo({ logo }) {
1805
1962
  return /* @__PURE__ */ jsxRuntime.jsx(Logo, { children: logo });
1806
1963
  }
1807
- const Text$1 = material.styled(palette.Typography)({
1964
+ const Text$1 = material.styled(TablePaginationActions.Typography)({
1808
1965
  display: "flex",
1809
1966
  alignItems: "center",
1810
1967
  whiteSpace: "nowrap"
@@ -1821,7 +1978,7 @@ function BrandText({ text }) {
1821
1978
  }
1822
1979
  );
1823
1980
  }
1824
- const Text = material.styled(palette.Typography)(({ theme }) => ({
1981
+ const Text = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
1825
1982
  display: "flex",
1826
1983
  alignItems: "center",
1827
1984
  "&::before": {
@@ -1844,7 +2001,7 @@ function SecondaryText({ text }) {
1844
2001
  }
1845
2002
  );
1846
2003
  }
1847
- const Root$4 = material.styled(material.AppBar)(({ theme }) => ({
2004
+ const Root$3 = material.styled(material.AppBar)(({ theme }) => ({
1848
2005
  backgroundColor: theme.palette.brand.appBarMain,
1849
2006
  "& .MuiTypography-root": {
1850
2007
  color: theme.palette.brand.appBarContrastText
@@ -1862,7 +2019,7 @@ const BrandElements = material.styled("div")(({ theme }) => ({
1862
2019
  minWidth: "192px"
1863
2020
  }
1864
2021
  }));
1865
- const Content$3 = material.styled("div")(({ theme }) => ({
2022
+ const Content$2 = material.styled("div")(({ theme }) => ({
1866
2023
  display: "flex",
1867
2024
  alignItems: "center",
1868
2025
  justifyContent: "space-between",
@@ -1878,14 +2035,14 @@ function AppBar({
1878
2035
  onClickMenu,
1879
2036
  ...otherProps
1880
2037
  }) {
1881
- return /* @__PURE__ */ jsxRuntime.jsx(Root$4, { ...otherProps, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Toolbar, { children: [
2038
+ return /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...otherProps, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Toolbar, { children: [
1882
2039
  /* @__PURE__ */ jsxRuntime.jsxs(BrandElements, { children: [
1883
2040
  showBurgerMenu && /* @__PURE__ */ jsxRuntime.jsx(BurgerMenu, { onClickMenu }),
1884
2041
  brandLogo && /* @__PURE__ */ jsxRuntime.jsx(BrandLogo, { logo: brandLogo }),
1885
2042
  brandText && /* @__PURE__ */ jsxRuntime.jsx(BrandText, { text: brandText }),
1886
2043
  secondaryText && /* @__PURE__ */ jsxRuntime.jsx(SecondaryText, { text: secondaryText })
1887
2044
  ] }),
1888
- /* @__PURE__ */ jsxRuntime.jsx(Content$3, { children })
2045
+ /* @__PURE__ */ jsxRuntime.jsx(Content$2, { children })
1889
2046
  ] }) });
1890
2047
  }
1891
2048
  const Container = material.styled(material.Box, {
@@ -1911,7 +2068,7 @@ function ClearButton({
1911
2068
  ...props
1912
2069
  }) {
1913
2070
  const intl = reactIntl.useIntl();
1914
- const intlConfig = palette.useImperativeIntl(intl);
2071
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1915
2072
  return /* @__PURE__ */ jsxRuntime.jsx(Container, { size, variant, children: /* @__PURE__ */ jsxRuntime.jsx(
1916
2073
  material.IconButton,
1917
2074
  {
@@ -1923,7 +2080,7 @@ function ClearButton({
1923
2080
  }
1924
2081
  ) });
1925
2082
  }
1926
- const Root$3 = material.styled(material.Box, {
2083
+ const Root$2 = material.styled(material.Box, {
1927
2084
  shouldForwardProp: (prop) => !["size", "variant", "readOnly"].includes(prop)
1928
2085
  })(({ size, variant, readOnly, theme }) => ({
1929
2086
  // There is no specific slot to change TextField styles at DatePicker level, so we need to wrap our component to isolate this override. https://mui.com/x/react-date-pickers/date-picker/#customization
@@ -1963,7 +2120,7 @@ function DateFieldContainer({
1963
2120
  readOnly,
1964
2121
  ...props
1965
2122
  }) {
1966
- return /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...props, size, variant, readOnly, children });
2123
+ return /* @__PURE__ */ jsxRuntime.jsx(Root$2, { ...props, size, variant, readOnly, children });
1967
2124
  }
1968
2125
  function DatePicker({
1969
2126
  handleClear,
@@ -1984,7 +2141,7 @@ function DatePicker({
1984
2141
  ...props
1985
2142
  }) {
1986
2143
  const intl = reactIntl.useIntl();
1987
- const intlConfig = palette.useImperativeIntl(intl);
2144
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1988
2145
  return (
1989
2146
  // Don't remove className, it's used for styling
1990
2147
  /* @__PURE__ */ jsxRuntime.jsx(material.Box, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2272,7 +2429,7 @@ function DateRangePicker({
2272
2429
  ...props
2273
2430
  }) {
2274
2431
  const intl = reactIntl.useIntl();
2275
- const intlConfig = palette.useImperativeIntl(intl);
2432
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
2276
2433
  const [isEndDateOpen, setIsEndDateOpen] = React.useState(false);
2277
2434
  const [isStartDateOpen, setIsStartDateOpen] = React.useState(false);
2278
2435
  const [startDate, setStartDate] = React.useState(
@@ -2460,7 +2617,7 @@ function TimePicker({
2460
2617
  ...props
2461
2618
  }) {
2462
2619
  const intl = reactIntl.useIntl();
2463
- const intlConfig = palette.useImperativeIntl(intl);
2620
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
2464
2621
  const inputRef = React.useRef(null);
2465
2622
  const [inputWidth, setInputWidth] = React.useState(0);
2466
2623
  React.useEffect(() => {
@@ -2571,7 +2728,7 @@ function DateTimePicker({
2571
2728
  ...props
2572
2729
  }) {
2573
2730
  const intl = reactIntl.useIntl();
2574
- const intlConfig = palette.useImperativeIntl(intl);
2731
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
2575
2732
  return /* @__PURE__ */ jsxRuntime.jsx(
2576
2733
  DateFieldContainer,
2577
2734
  {
@@ -2636,7 +2793,7 @@ function DateTimePicker({
2636
2793
  );
2637
2794
  }
2638
2795
  const DEFAULT_ITEMS = [{ outlinedBullet: false, value: "" }];
2639
- const Content$2 = material.styled("ul")(({ theme }) => ({
2796
+ const Content$1 = material.styled("ul")(({ theme }) => ({
2640
2797
  listStyle: "none",
2641
2798
  paddingLeft: 0,
2642
2799
  margin: theme.spacing(0.5, 0, 0, 0)
@@ -2657,7 +2814,7 @@ const Bullet = material.styled("span")(({ theme }) => ({
2657
2814
  borderRadius: "50%",
2658
2815
  backgroundColor: theme.palette.qualitative.bold[1]
2659
2816
  }));
2660
- const Category = material.styled(palette.Typography)(({ theme }) => ({
2817
+ const Category = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
2661
2818
  minWidth: theme.spacing(10),
2662
2819
  marginRight: theme.spacing(1.5)
2663
2820
  }));
@@ -2666,8 +2823,8 @@ function TooltipData({
2666
2823
  title
2667
2824
  }) {
2668
2825
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2669
- title && /* @__PURE__ */ jsxRuntime.jsx(palette.Typography, { color: "inherit", variant: "caption", weight: "medium", children: title }),
2670
- /* @__PURE__ */ jsxRuntime.jsx(Content$2, { children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(Entry, { children: [
2826
+ title && /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { color: "inherit", variant: "caption", weight: "medium", children: title }),
2827
+ /* @__PURE__ */ jsxRuntime.jsx(Content$1, { children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(Entry, { children: [
2671
2828
  /* @__PURE__ */ jsxRuntime.jsx(
2672
2829
  Bullet,
2673
2830
  {
@@ -2678,869 +2835,10 @@ function TooltipData({
2678
2835
  }
2679
2836
  ),
2680
2837
  item.category && /* @__PURE__ */ jsxRuntime.jsx(Category, { color: "inherit", variant: "caption", children: item.category }),
2681
- /* @__PURE__ */ jsxRuntime.jsx(palette.Typography, { color: "inherit", variant: "caption", weight: "medium", children: item.value })
2838
+ /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { color: "inherit", variant: "caption", weight: "medium", children: item.value })
2682
2839
  ] }, index)) })
2683
2840
  ] });
2684
2841
  }
2685
- const Footer = material.styled(material.Box, {
2686
- shouldForwardProp: (prop) => !["withGutter", "disabled"].includes(prop)
2687
- })(
2688
- ({ withGutter, disabled, theme }) => ({
2689
- display: "flex",
2690
- alignItems: "center",
2691
- justifyContent: "flex-end",
2692
- gap: theme.spacing(1),
2693
- ...withGutter && {
2694
- height: theme.spacing(4),
2695
- padding: theme.spacing(0, 0.5),
2696
- borderTop: `1px solid ${theme.palette.divider}`,
2697
- borderBottom: "1px solid transparent"
2698
- },
2699
- ...disabled && {
2700
- backgroundColor: theme.palette.default.background
2701
- }
2702
- })
2703
- );
2704
- function CodeAreaFooter({
2705
- onClickFooter,
2706
- labelIdButtonFooter,
2707
- disabledButtonFooter,
2708
- withGutter = true,
2709
- showSnackbar,
2710
- onCloseSnackbar,
2711
- loading,
2712
- disabled,
2713
- ...props
2714
- }) {
2715
- const intl = reactIntl.useIntl();
2716
- const intlConfig = palette.useImperativeIntl(intl);
2717
- if (!onClickFooter) return null;
2718
- return /* @__PURE__ */ jsxRuntime.jsxs(
2719
- Footer,
2720
- {
2721
- withGutter,
2722
- disabled,
2723
- "data-name": "code-area-footer",
2724
- "data-gutter": withGutter,
2725
- children: [
2726
- /* @__PURE__ */ jsxRuntime.jsx(
2727
- Button,
2728
- {
2729
- variant: "text",
2730
- ...props,
2731
- loading,
2732
- onClick: onClickFooter,
2733
- disabled: disabled || disabledButtonFooter,
2734
- children: intlConfig.formatMessage({
2735
- id: labelIdButtonFooter || "c4r.button.save"
2736
- })
2737
- }
2738
- ),
2739
- /* @__PURE__ */ jsxRuntime.jsx(
2740
- Snackbar,
2741
- {
2742
- open: showSnackbar,
2743
- autoWidth: true,
2744
- closeable: false,
2745
- autoHideDuration: 4e3,
2746
- onClose: onCloseSnackbar,
2747
- children: intlConfig.formatMessage({
2748
- id: "c4r.notifications.changesSaved"
2749
- })
2750
- }
2751
- )
2752
- ]
2753
- }
2754
- );
2755
- }
2756
- const Header = material.styled(material.Box, { shouldForwardProp: (prop) => prop !== "size" })(({ size, theme }) => ({
2757
- position: "absolute",
2758
- top: 0,
2759
- right: theme.spacing(0.5),
2760
- zIndex: 1,
2761
- display: "flex",
2762
- justifyContent: "flex-end",
2763
- gap: theme.spacing(1),
2764
- padding: size === "small" ? theme.spacing(0.5) : theme.spacing(1, 2, 2),
2765
- paddingRight: size === "small" ? 0 : theme.spacing(1.5)
2766
- }));
2767
- function CodeAreaHeader({
2768
- disabled,
2769
- copyValue,
2770
- onClickExpand,
2771
- size
2772
- }) {
2773
- const intl = reactIntl.useIntl();
2774
- const intlConfig = palette.useImperativeIntl(intl);
2775
- const showExpandButton = !!onClickExpand;
2776
- const showCopyButton = copyValue !== void 0;
2777
- const showMenu = showExpandButton && showCopyButton;
2778
- const { copy } = useCopyValue();
2779
- const [openSnackbar, setOpenSnackbar] = React.useState(false);
2780
- const [anchorEl, setAnchorEl] = React.useState(null);
2781
- const open = Boolean(anchorEl);
2782
- const openDropdown = (event) => {
2783
- setAnchorEl(event.currentTarget);
2784
- };
2785
- const closeDropdown = () => {
2786
- setAnchorEl(null);
2787
- };
2788
- const handleCopy = (e) => {
2789
- e.preventDefault();
2790
- if (copyValue) {
2791
- copy(copyValue).then(() => {
2792
- setOpenSnackbar(true);
2793
- }).catch(console.error);
2794
- }
2795
- };
2796
- if (!showExpandButton && !showCopyButton) {
2797
- return null;
2798
- }
2799
- if (showMenu) {
2800
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2801
- /* @__PURE__ */ jsxRuntime.jsxs(Header, { size, "data-size": size, "data-name": "code-area-header", children: [
2802
- /* @__PURE__ */ jsxRuntime.jsx(
2803
- IconButton,
2804
- {
2805
- color: "default",
2806
- size,
2807
- icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.MoreVertOutlined, {}),
2808
- disabled,
2809
- tooltip: intlConfig.formatMessage({ id: `c4r.button.showOptions` }),
2810
- tooltipPlacement: "top",
2811
- "aria-controls": open ? "basic-menu" : void 0,
2812
- "aria-haspopup": "true",
2813
- "aria-expanded": open ? "true" : void 0,
2814
- onClick: openDropdown
2815
- }
2816
- ),
2817
- /* @__PURE__ */ jsxRuntime.jsxs(
2818
- Menu$1,
2819
- {
2820
- anchorEl,
2821
- open,
2822
- onClose: closeDropdown,
2823
- id: "menu",
2824
- MenuListProps: { "aria-labelledby": "menu-button" },
2825
- "aria-label": "Code area actions",
2826
- transformOrigin: { vertical: "top", horizontal: "right" },
2827
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
2828
- children: [
2829
- /* @__PURE__ */ jsxRuntime.jsxs(MenuItem.MenuItem, { onClick: handleCopy, disabled, id: "copy", children: [
2830
- /* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ContentCopyOutlined, {}) }),
2831
- /* @__PURE__ */ jsxRuntime.jsx(material.ListItemText, { children: intlConfig.formatMessage({ id: `c4r.button.copy` }) })
2832
- ] }),
2833
- /* @__PURE__ */ jsxRuntime.jsxs(MenuItem.MenuItem, { onClick: onClickExpand, disabled, id: "expand", children: [
2834
- /* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.OpenDiagonallyRight, {}) }),
2835
- /* @__PURE__ */ jsxRuntime.jsx(material.ListItemText, { children: intlConfig.formatMessage({ id: `c4r.button.expand` }) })
2836
- ] })
2837
- ]
2838
- }
2839
- )
2840
- ] }),
2841
- /* @__PURE__ */ jsxRuntime.jsx(
2842
- Snackbar,
2843
- {
2844
- open: openSnackbar,
2845
- autoWidth: true,
2846
- closeable: false,
2847
- autoHideDuration: 4e3,
2848
- onClose: () => setOpenSnackbar(false),
2849
- children: intlConfig.formatMessage({
2850
- id: "c4r.notifications.copiedToClipboard"
2851
- })
2852
- }
2853
- )
2854
- ] });
2855
- }
2856
- return /* @__PURE__ */ jsxRuntime.jsxs(Header, { size, "data-size": size, "data-name": "code-area-header", children: [
2857
- showCopyButton && /* @__PURE__ */ jsxRuntime.jsx(
2858
- CopiableComponent,
2859
- {
2860
- disabled,
2861
- value: copyValue,
2862
- button: true,
2863
- buttonProps: { size }
2864
- }
2865
- ),
2866
- showExpandButton && /* @__PURE__ */ jsxRuntime.jsx(
2867
- IconButton,
2868
- {
2869
- color: "default",
2870
- size,
2871
- onClick: onClickExpand,
2872
- icon: /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.OpenDiagonallyRight, {}),
2873
- disabled,
2874
- tooltip: intlConfig.formatMessage({ id: `c4r.button.expand` }),
2875
- tooltipPlacement: "top"
2876
- }
2877
- )
2878
- ] });
2879
- }
2880
- const CodeAreaTheme = material.styled(material.Box, {
2881
- shouldForwardProp: (prop) => !["size", "height"].includes(prop)
2882
- })(({ size, height, theme }) => ({
2883
- position: "relative",
2884
- flex: 1,
2885
- display: "flex",
2886
- cursor: "text",
2887
- ":focus-within &, .error &": {
2888
- marginBottom: 0
2889
- },
2890
- "& .react-codemirror2": {
2891
- width: "100%",
2892
- height: "100% !important",
2893
- position: "relative"
2894
- },
2895
- "& .CodeMirror": {
2896
- position: "absolute",
2897
- top: 0,
2898
- bottom: 0,
2899
- left: 0,
2900
- right: 0,
2901
- zIndex: 1,
2902
- height: "100% !important",
2903
- backgroundColor: theme.palette.background.default
2904
- },
2905
- "& .CodeMirror-code": {
2906
- "&> div:first-of-type .CodeMirror-line": {
2907
- marginTop: theme.spacing(-0.25)
2908
- }
2909
- },
2910
- "& .CodeMirror-scroll": {
2911
- paddingLeft: theme.spacing(1),
2912
- paddingRight: theme.spacing(1),
2913
- backgroundColor: "transparent"
2914
- },
2915
- "& .CodeMirror-lines": {
2916
- padding: theme.spacing(1, 0)
2917
- },
2918
- "& .CodeMirror pre.CodeMirror-line, & .CodeMirror pre.CodeMirror-line-like": {
2919
- boxSizing: "border-box",
2920
- paddingLeft: 0,
2921
- paddingTop: theme.spacing(0.25),
2922
- lineHeight: 1.2
2923
- },
2924
- "& .CodeMirror-linenumbers": {
2925
- width: `${theme.spacing(4.5)} !important`
2926
- },
2927
- "& .CodeMirror-linenumber": {
2928
- width: `${theme.spacing(4.5)} !important`,
2929
- height: theme.spacing(2),
2930
- marginBottom: `${theme.spacing(-0.25)} !important`,
2931
- paddingTop: theme.spacing(0.25),
2932
- paddingRight: theme.spacing(1.25),
2933
- boxSizing: "border-box !important",
2934
- color: theme.palette.text.secondary
2935
- },
2936
- // Active line addon
2937
- "& .CodeMirror-activeline-background, & .CodeMirror-activeline-gutter": {
2938
- backgroundColor: "transparent"
2939
- },
2940
- "& .CodeMirror-gutter-background": {
2941
- width: `${theme.spacing(6.25)} !important`
2942
- // Hack needed to simulate active line background
2943
- },
2944
- "& .CodeMirror-sizer": {
2945
- paddingTop: theme.spacing(0.25),
2946
- marginLeft: `${theme.spacing(5.25)} !important`,
2947
- borderRightWidth: `${theme.spacing(4)} !important`
2948
- // Hack needed to simulate active line background
2949
- },
2950
- "& .CodeMirror-matchingbracket": {
2951
- color: `${colors.lime[900]} !important`,
2952
- backgroundColor: theme.palette.black[4],
2953
- boxShadow: `0 0 0 1px ${theme.palette.text.hint}`
2954
- },
2955
- // Selected line
2956
- "& .CodeMirror-selected, & .CodeMirror-focused .CodeMirror-selected, & .CodeMirror-line::selection, & .CodeMirror-line > span::selection, & .CodeMirror-line > span > span::selection": {
2957
- background: `${material.alpha(colors.blue[800], 0.2)} !important`
2958
- },
2959
- "& .CodeMirror-gutters": {
2960
- borderRight: 0,
2961
- color: theme.palette.text.secondary,
2962
- backgroundColor: theme.palette.default.background
2963
- },
2964
- "& .CodeMirror-gutter-elt": {
2965
- "& .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded": {
2966
- marginLeft: theme.spacing(-1),
2967
- "&:after": {
2968
- fontSize: theme.typography.caption.fontSize
2969
- }
2970
- }
2971
- },
2972
- "& .CodeMirror-placeholder": {
2973
- paddingTop: "0 !important",
2974
- marginLeft: `${theme.spacing(-0.5)} !important`,
2975
- marginBottom: `${theme.spacing(-0.25)} !important`,
2976
- color: `${theme.palette.text.hint} !important`
2977
- },
2978
- "& .MuiLinearProgress-root": {
2979
- height: "2px",
2980
- position: "absolute",
2981
- top: 0,
2982
- left: 0,
2983
- right: 0,
2984
- zIndex: 1
2985
- },
2986
- "& .pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like, & .cm-bracket": {
2987
- color: theme.palette.text.primary
2988
- },
2989
- "& .CodeMirror pre.CodeMirror-placeholder": {
2990
- color: theme.palette.text.hint
2991
- },
2992
- "& .CodeMirror-composing": {
2993
- border: 0
2994
- },
2995
- // Theme: light
2996
- "& .cm-keyword, & .cm-string, & .cm-string-2, & .cm-other": {
2997
- color: colors.purple[500]
2998
- },
2999
- "& .cm-operator, & .cm-tag, & .cm-attribute": {
3000
- color: colors.teal[700]
3001
- },
3002
- "& .cm-number, & .cm-property, & .cm-builtin": {
3003
- color: colors.red[700]
3004
- },
3005
- "& .cm-comment": {
3006
- color: theme.palette.text.secondary
3007
- },
3008
- "& .cm-variable": {
3009
- color: colors.lime[900]
3010
- },
3011
- "& .cm-variable-2": {
3012
- color: theme.palette.text.primary
3013
- },
3014
- "& .cm-punctuation, & .cm-def, ": {
3015
- color: colors.blue[800]
3016
- },
3017
- "& .cm-variable-3, & .cm-type": {
3018
- color: colors.indigo[800]
3019
- },
3020
- "& .CodeMirror-foldmarker": {
3021
- textShadow: "none",
3022
- color: theme.palette.primary.main
3023
- },
3024
- "& .cm-error": {
3025
- color: theme.palette.error.main
3026
- },
3027
- "& .CodeMirror-selected": {
3028
- background: colors.blue[800]
3029
- },
3030
- "& .cm-header-1": {
3031
- fontSize: theme.typography.h2.fontSize
3032
- },
3033
- "& .cm-header-2": {
3034
- fontSize: theme.typography.h3.fontSize
3035
- },
3036
- "& .cm-header-3": {
3037
- fontSize: theme.typography.h4.fontSize
3038
- },
3039
- "& .cm-header-4": {
3040
- fontSize: theme.typography.h5.fontSize
3041
- },
3042
- "& .cm-header-5": {
3043
- fontSize: theme.typography.h6.fontSize
3044
- },
3045
- ...size === "small" && {
3046
- "& .CodeMirror": {
3047
- height: height ? height : "auto",
3048
- minHeight: theme.spacing(9),
3049
- ...theme.typography.code3
3050
- }
3051
- }
3052
- }));
3053
- function findCodeAreaControlCodeOccurrences(content) {
3054
- const lines = content.split("\n");
3055
- const matches = [];
3056
- const beginStack = [];
3057
- lines.forEach((line, index) => {
3058
- const lineNumber = index + 1;
3059
- if (line.trim() === "-- BEGIN CONTROL CODE") {
3060
- beginStack.push(lineNumber);
3061
- } else if (line.trim() === "-- END CONTROL CODE" && beginStack.length > 0) {
3062
- const startLine = beginStack.pop();
3063
- matches.push({
3064
- from: startLine,
3065
- to: lineNumber
3066
- });
3067
- }
3068
- });
3069
- while (beginStack.length > 0) {
3070
- const startLine = beginStack.pop();
3071
- matches.push({
3072
- from: startLine,
3073
- to: lines.length
3074
- // Set end to last line for unmatched BEGIN
3075
- });
3076
- }
3077
- return matches;
3078
- }
3079
- function CodeAreaInput({
3080
- options,
3081
- value,
3082
- defaultValue,
3083
- id,
3084
- onEditorDidMount,
3085
- onChange,
3086
- onBlur,
3087
- onFocus,
3088
- placeholder,
3089
- disabled,
3090
- size = "small",
3091
- height,
3092
- "data-testid": dataTestId,
3093
- "aria-label": ariaLabel,
3094
- ...props
3095
- }) {
3096
- var _a;
3097
- const editorRef = React.useRef();
3098
- const codeMirrorOptions = {
3099
- mode: "sql",
3100
- theme: "light",
3101
- lineNumbers: true,
3102
- lineWrapping: true,
3103
- extraKeys: { "Ctrl-Space": "autocomplete" },
3104
- placeholder,
3105
- disabled,
3106
- gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
3107
- styleActiveLine: { nonEmpty: true },
3108
- styleActiveSelected: true,
3109
- matchBrackets: true,
3110
- foldOptions: {
3111
- minFoldSize: 1,
3112
- scanUp: false
3113
- },
3114
- ...options
3115
- };
3116
- const [editor, setEditor] = React.useState(null);
3117
- React.useEffect(() => {
3118
- return () => {
3119
- setEditor(null);
3120
- };
3121
- }, []);
3122
- const foldCode = React.useCallback(
3123
- ({ from, to }) => {
3124
- editor.foldCode(
3125
- 0,
3126
- {
3127
- rangeFinder: () => {
3128
- if (!to) return;
3129
- return {
3130
- from: { line: from - 1, ch: 0 },
3131
- to: { line: to - 1, ch: 0 }
3132
- };
3133
- }
3134
- },
3135
- "fold"
3136
- );
3137
- },
3138
- [editor]
3139
- );
3140
- React.useEffect(() => {
3141
- if (!value || !editor) return;
3142
- const numberOfBlocks = findCodeAreaControlCodeOccurrences(value);
3143
- if (!numberOfBlocks.length) return;
3144
- for (const line of numberOfBlocks) {
3145
- foldCode(line);
3146
- }
3147
- }, [value, foldCode, editor]);
3148
- return /* @__PURE__ */ jsxRuntime.jsxs(
3149
- CodeAreaTheme,
3150
- {
3151
- size,
3152
- height,
3153
- id,
3154
- "data-size": size,
3155
- "data-height": height,
3156
- "data-mode": typeof (options == null ? void 0 : options.mode) === "object" && ((_a = options.mode) == null ? void 0 : _a.name) ? options.mode.name : options == null ? void 0 : options.mode,
3157
- "data-fold-gutter": options == null ? void 0 : options.foldGutter,
3158
- "data-testid": dataTestId,
3159
- "aria-label": ariaLabel ?? "Code editor text area",
3160
- "data-name": "code-area-input",
3161
- children: [
3162
- value !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
3163
- reactCodemirror2.Controlled,
3164
- {
3165
- ...props,
3166
- value,
3167
- editorDidMount: (editor2) => {
3168
- editorRef.current = editor2;
3169
- setEditor(editor2);
3170
- onEditorDidMount == null ? void 0 : onEditorDidMount(editor2);
3171
- },
3172
- options: codeMirrorOptions,
3173
- onBeforeChange: (editor2, data, value2) => {
3174
- onChange == null ? void 0 : onChange(value2);
3175
- },
3176
- onBlur: (editor2) => {
3177
- onBlur == null ? void 0 : onBlur(editor2.getValue());
3178
- },
3179
- onFocus
3180
- }
3181
- ),
3182
- defaultValue !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
3183
- reactCodemirror2.UnControlled,
3184
- {
3185
- ...props,
3186
- value: defaultValue,
3187
- options: codeMirrorOptions,
3188
- onBlur: (editor2) => {
3189
- onBlur == null ? void 0 : onBlur(editor2.getValue());
3190
- },
3191
- onFocus
3192
- }
3193
- )
3194
- ]
3195
- }
3196
- );
3197
- }
3198
- const Root$2 = material.styled(material.FormControl)(() => ({
3199
- display: "flex",
3200
- flexDirection: "column",
3201
- flex: 1
3202
- }));
3203
- const CodeMirrorWrapper = material.styled(material.Box, {
3204
- shouldForwardProp: (prop) => ![
3205
- "variant",
3206
- "error",
3207
- "disabled",
3208
- "readOnly",
3209
- "lineNumbers",
3210
- "fullScreen"
3211
- ].includes(prop)
3212
- })(
3213
- ({ variant, error, disabled, readOnly, lineNumbers, fullScreen, theme }) => ({
3214
- position: "relative",
3215
- overflow: "auto",
3216
- display: "flex",
3217
- flexDirection: "column",
3218
- flex: 1,
3219
- width: "100%",
3220
- minHeight: 0,
3221
- background: theme.palette.background.paper,
3222
- // Active line addon
3223
- ".CodeMirror-focused .CodeMirror-activeline": {
3224
- "& .CodeMirror-activeline-background, & .CodeMirror-activeline-gutter": {
3225
- background: theme.palette.primary.background
3226
- }
3227
- },
3228
- ...fullScreen && {
3229
- maxWidth: "100%",
3230
- maxHeight: "100vh",
3231
- height: "100vh"
3232
- },
3233
- ...(variant === "filled" || variant === "outlined") && {
3234
- borderRadius: theme.spacing(0.5),
3235
- transition: theme.transitions.create("background-color", {
3236
- easing: theme.transitions.easing.easeInOut,
3237
- duration: theme.transitions.duration.shortest
3238
- }),
3239
- "&:after": {
3240
- content: '""',
3241
- position: "absolute",
3242
- top: 0,
3243
- left: 0,
3244
- right: 0,
3245
- bottom: 0,
3246
- pointerEvents: "none",
3247
- border: `1px solid ${theme.palette.default.outlinedBorder}`,
3248
- borderRadius: theme.spacing(0.5),
3249
- transition: theme.transitions.create("border-color", {
3250
- easing: theme.transitions.easing.easeInOut,
3251
- duration: theme.transitions.duration.shortest
3252
- })
3253
- },
3254
- "&:hover:after": {
3255
- borderColor: theme.palette.common.black
3256
- },
3257
- "&:focus-within": {
3258
- overflow: "hidden",
3259
- "&:after": {
3260
- borderWidth: "2px",
3261
- borderColor: theme.palette.primary.main
3262
- }
3263
- },
3264
- ...error && {
3265
- "&.MuiBox-root:after": {
3266
- borderWidth: "2px",
3267
- borderColor: theme.palette.error.main
3268
- }
3269
- }
3270
- },
3271
- ...variant === "filled" && {
3272
- backgroundColor: theme.palette.background.paper,
3273
- "&.codeArea-filled:after": {
3274
- borderColor: "transparent"
3275
- },
3276
- "&.codeArea-filled:hover:after": {
3277
- borderColor: theme.palette.common.black
3278
- },
3279
- "&.codeArea-filled:focus-within:after": {
3280
- borderWidth: "2px",
3281
- borderColor: theme.palette.primary.main
3282
- },
3283
- "& .CodeMirror": {
3284
- backgroundColor: theme.palette.default.background,
3285
- "&:focus-within": {
3286
- backgroundColor: theme.palette.background.paper
3287
- }
3288
- },
3289
- ...error && {
3290
- borderColor: theme.palette.error.main,
3291
- "& .CodeMirror": {
3292
- backgroundColor: theme.palette.default.background
3293
- },
3294
- "&:hover, &:focus-within, &.codeArea-filled:after, &.codeArea-filled:hover:after, &.codeArea-filled:focus-within:after": {
3295
- borderColor: theme.palette.error.main
3296
- },
3297
- "&:focus-within": {
3298
- "& .CodeMirror": {
3299
- backgroundColor: theme.palette.background.paper
3300
- }
3301
- }
3302
- }
3303
- },
3304
- ...readOnly && {
3305
- "& .CodeMirror": {
3306
- backgroundColor: theme.palette.default.background,
3307
- ".CodeMirror-cursors": {
3308
- visibility: "hidden !important"
3309
- }
3310
- },
3311
- ...variant === "filled" && {
3312
- backgroundColor: theme.palette.background.paper
3313
- }
3314
- },
3315
- ...disabled && {
3316
- pointerEvents: "none",
3317
- "& .CodeMirror": {
3318
- color: theme.palette.text.disabled,
3319
- backgroundColor: theme.palette.default.background,
3320
- "& span, .CodeMirror-linenumber, .CodeMirror-guttermarker-subtle": {
3321
- color: theme.palette.text.disabled
3322
- }
3323
- },
3324
- ...variant === "filled" && {
3325
- backgroundColor: theme.palette.background.paper
3326
- }
3327
- },
3328
- ...!lineNumbers && {
3329
- "& .CodeMirror-scroll .CodeMirror-sizer": {
3330
- marginLeft: `${theme.spacing(1)} !important`
3331
- },
3332
- "& .CodeMirror-gutter-background": {
3333
- width: `${theme.spacing(2)} !important`
3334
- }
3335
- }
3336
- })
3337
- );
3338
- const InputWrapper = material.styled(material.Box, {
3339
- shouldForwardProp: (prop) => prop !== "hasActions"
3340
- })(({ theme, hasActions }) => ({
3341
- flex: "1 1 auto",
3342
- overflowY: "auto",
3343
- display: "flex",
3344
- flexDirection: "column",
3345
- ...hasActions && {
3346
- ".CodeMirror-line": {
3347
- paddingRight: `${theme.spacing(4)} !important`
3348
- }
3349
- }
3350
- }));
3351
- const HelpIcon = material.styled(iconsMaterial.HelpOutline)(({ theme }) => ({
3352
- width: palette.ICON_SIZE_SMALL,
3353
- height: palette.ICON_SIZE_SMALL,
3354
- fill: theme.palette.text.secondary
3355
- }));
3356
- function CodeAreaField({
3357
- value,
3358
- defaultValue,
3359
- validate,
3360
- onChange,
3361
- onBlur,
3362
- onFocus,
3363
- label,
3364
- labelHelpTooltip,
3365
- placeholder,
3366
- type,
3367
- disabled,
3368
- copyValue,
3369
- helperText,
3370
- error,
3371
- size = "small",
3372
- variant = "outlined",
3373
- onClickExpand,
3374
- onClickFooter,
3375
- disabledButtonFooter,
3376
- labelIdButtonFooter,
3377
- options,
3378
- id = "code-area-field",
3379
- saveLoading,
3380
- showSaveSnackbar,
3381
- onCloseSaveSnackbar,
3382
- fullScreen,
3383
- isExpanded,
3384
- ...props
3385
- }) {
3386
- const [focused, setFocused] = React.useState(false);
3387
- const readOnly = (options == null ? void 0 : options.readOnly) ?? false;
3388
- const lineNumbers = (options == null ? void 0 : options.lineNumbers) ?? true;
3389
- return /* @__PURE__ */ jsxRuntime.jsxs(
3390
- Root$2,
3391
- {
3392
- size,
3393
- error,
3394
- disabled,
3395
- "aria-disabled": disabled,
3396
- "data-size": size,
3397
- "data-full-screen": fullScreen,
3398
- "data-variant": variant,
3399
- "data-name": "code-area-field",
3400
- children: [
3401
- label && /* @__PURE__ */ jsxRuntime.jsx(
3402
- material.InputLabel,
3403
- {
3404
- htmlFor: id,
3405
- disabled,
3406
- error,
3407
- focused,
3408
- shrink: true,
3409
- children: /* @__PURE__ */ jsxRuntime.jsx(
3410
- LabelWithIndicator,
3411
- {
3412
- label,
3413
- type,
3414
- icon: labelHelpTooltip ? /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: labelHelpTooltip, children: /* @__PURE__ */ jsxRuntime.jsx(
3415
- HelpIcon,
3416
- {
3417
- "aria-label": typeof labelHelpTooltip === "string" ? labelHelpTooltip : void 0
3418
- }
3419
- ) }) : void 0
3420
- }
3421
- )
3422
- }
3423
- ),
3424
- /* @__PURE__ */ jsxRuntime.jsxs(
3425
- CodeMirrorWrapper,
3426
- {
3427
- variant,
3428
- error: !!error,
3429
- disabled,
3430
- readOnly,
3431
- lineNumbers,
3432
- className: variant === "filled" ? "codeArea-filled" : "",
3433
- fullScreen,
3434
- children: [
3435
- /* @__PURE__ */ jsxRuntime.jsx(
3436
- CodeAreaHeader,
3437
- {
3438
- onClickExpand,
3439
- copyValue,
3440
- disabled,
3441
- size: isExpanded ? "medium" : "small"
3442
- }
3443
- ),
3444
- /* @__PURE__ */ jsxRuntime.jsx(InputWrapper, { hasActions: !!copyValue || !!onClickExpand, children: /* @__PURE__ */ jsxRuntime.jsx(
3445
- CodeAreaInput,
3446
- {
3447
- ...props,
3448
- id,
3449
- disabled,
3450
- value,
3451
- defaultValue,
3452
- placeholder,
3453
- onFocus: () => {
3454
- setFocused(true);
3455
- onFocus == null ? void 0 : onFocus();
3456
- },
3457
- onBlur: (value2) => {
3458
- if (onBlur) onBlur(value2);
3459
- if (onChange) onChange(value2);
3460
- if (validate) validate(value2);
3461
- setFocused(false);
3462
- },
3463
- onChange,
3464
- size,
3465
- options: {
3466
- ...readOnly && {
3467
- styleActiveLine: false,
3468
- matchBrackets: false
3469
- },
3470
- ...options
3471
- }
3472
- }
3473
- ) }),
3474
- /* @__PURE__ */ jsxRuntime.jsx(
3475
- CodeAreaFooter,
3476
- {
3477
- labelIdButtonFooter,
3478
- onClickFooter,
3479
- disabled,
3480
- disabledButtonFooter,
3481
- size: "small",
3482
- loading: !!saveLoading,
3483
- showSnackbar: showSaveSnackbar,
3484
- onCloseSnackbar: onCloseSaveSnackbar
3485
- }
3486
- )
3487
- ]
3488
- }
3489
- ),
3490
- helperText && /* @__PURE__ */ jsxRuntime.jsx(material.FormHelperText, { children: helperText })
3491
- ]
3492
- }
3493
- );
3494
- }
3495
- const ErrorWrapper = material.styled(material.Box)(({ theme }) => ({
3496
- position: "relative",
3497
- marginBottom: "1px",
3498
- padding: theme.spacing(1.5, 2, 1.5, 5.5),
3499
- "&:before": {
3500
- content: '""',
3501
- position: "absolute",
3502
- top: 0,
3503
- left: 0,
3504
- bottom: 0,
3505
- zIndex: 1,
3506
- width: theme.spacing(5),
3507
- background: theme.palette.background.default
3508
- },
3509
- "&:after": {
3510
- content: '""',
3511
- position: "absolute",
3512
- top: 0,
3513
- right: 0,
3514
- left: 0,
3515
- bottom: 0,
3516
- zIndex: 2,
3517
- background: `linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 40%)`
3518
- },
3519
- ".MuiFormHelperText-root": {
3520
- marginTop: 0
3521
- }
3522
- }));
3523
- const ErrorContent = material.styled(material.Box)(({ theme }) => ({
3524
- position: "relative",
3525
- zIndex: 3,
3526
- display: "flex",
3527
- alignItems: "center",
3528
- gap: theme.spacing(1)
3529
- }));
3530
- function CodeAreaDialogError({
3531
- children,
3532
- hasDivider
3533
- }) {
3534
- const theme = material.useTheme();
3535
- if (!children) return null;
3536
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3537
- /* @__PURE__ */ jsxRuntime.jsx(ErrorWrapper, { children: /* @__PURE__ */ jsxRuntime.jsxs(ErrorContent, { children: [
3538
- /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ErrorOutline, { htmlColor: theme.palette.error.main }),
3539
- /* @__PURE__ */ jsxRuntime.jsx(material.FormHelperText, { error: true, children })
3540
- ] }) }),
3541
- hasDivider && /* @__PURE__ */ jsxRuntime.jsx(material.Divider, {})
3542
- ] });
3543
- }
3544
2842
  const sizesHeight = {
3545
2843
  [
3546
2844
  "small"
@@ -3786,13 +3084,13 @@ function DialogHeader({
3786
3084
  ...otherProps
3787
3085
  }) {
3788
3086
  const intl = reactIntl.useIntl();
3789
- const intlConfig = palette.useImperativeIntl(intl);
3087
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
3790
3088
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3791
3089
  /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { component: "div", "data-name": "dialog-header", ...otherProps, children: [
3792
3090
  /* @__PURE__ */ jsxRuntime.jsxs(Main$1, { children: [
3793
3091
  /* @__PURE__ */ jsxRuntime.jsxs(ItemsWrapper$1, { flex: 1, maxWidth: 0.8, children: [
3794
3092
  /* @__PURE__ */ jsxRuntime.jsx(
3795
- palette.Typography,
3093
+ TablePaginationActions.Typography,
3796
3094
  {
3797
3095
  component: "h2",
3798
3096
  variant: "inherit",
@@ -3821,7 +3119,7 @@ function DialogHeader({
3821
3119
  children && /* @__PURE__ */ jsxRuntime.jsx(DividerBottom, {})
3822
3120
  ] });
3823
3121
  }
3824
- const Content$1 = material.styled(material.DialogContent, {
3122
+ const Content = material.styled(material.DialogContent, {
3825
3123
  shouldForwardProp: (prop) => !["scrollableContent", "withGutter", "withBottomGutter"].includes(prop)
3826
3124
  })(({ theme, scrollableContent, withGutter, withBottomGutter }) => ({
3827
3125
  display: "flex",
@@ -3898,7 +3196,7 @@ function _DialogContent({
3898
3196
  return () => resizeObserver.disconnect();
3899
3197
  }, [contentRef, updateBorders]);
3900
3198
  return /* @__PURE__ */ jsxRuntime.jsx(
3901
- Content$1,
3199
+ Content,
3902
3200
  {
3903
3201
  ref: setContentRef,
3904
3202
  onScroll: handleScroll,
@@ -4190,168 +3488,15 @@ function DialogStepper({
4190
3488
  "data-state": isCompleted ? "completed" : isCurrent ? "current" : "uncompleted",
4191
3489
  children: [
4192
3490
  /* @__PURE__ */ jsxRuntime.jsx(StepNumber, { completed: isCompleted, current: isCurrent, children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Check, { fontSize: "small", "aria-label": "Completed step" }) : step }),
4193
- /* @__PURE__ */ jsxRuntime.jsx(palette.Typography, { variant: "caption", component: "div", color: labelColor, children: stepLabel })
3491
+ /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "caption", component: "div", color: labelColor, children: stepLabel })
4194
3492
  ]
4195
3493
  },
4196
3494
  idx
4197
3495
  );
4198
3496
  }) }) });
4199
3497
  }
4200
- const Content = material.styled(DialogContent, {
4201
- shouldForwardProp: (prop) => !["error", "withBorder"].includes(prop)
4202
- })(
4203
- ({ error, withBorder, theme }) => ({
4204
- gap: 0,
4205
- border: withBorder ? `1px solid ${theme.palette.divider} !important` : void 0,
4206
- borderBottom: error ? "none !important" : void 0,
4207
- ".react-codemirror2": {
4208
- display: "flex",
4209
- flexDirection: "column",
4210
- minHeight: "100%"
4211
- },
4212
- ".CodeMirror-wrap": {
4213
- display: "flex",
4214
- flexDirection: "column",
4215
- flex: 1
4216
- },
4217
- "& + .MuiDivider-root": {
4218
- display: "none"
4219
- }
4220
- })
4221
- );
4222
- function CodeAreaDialogContent({
4223
- children,
4224
- error,
4225
- withBorder = true,
4226
- withGutter = false
4227
- }) {
4228
- if (!children) return null;
4229
- return /* @__PURE__ */ jsxRuntime.jsx(Content, { withGutter, error, withBorder, children });
4230
- }
4231
- function CodeAreaDialogConfirmation({
4232
- onClose,
4233
- onCancel,
4234
- cancelLabelId,
4235
- cancelButton,
4236
- closeButton,
4237
- contentLabelId,
4238
- titleLabelId,
4239
- severity = "warning",
4240
- content
4241
- }) {
4242
- const intl = reactIntl.useIntl();
4243
- const intlConfig = palette.useImperativeIntl(intl);
4244
- if (!onClose || !onCancel) {
4245
- return null;
4246
- }
4247
- return /* @__PURE__ */ jsxRuntime.jsx(
4248
- DialogConfirmation,
4249
- {
4250
- opened: true,
4251
- severity,
4252
- title: intlConfig.formatMessage({
4253
- id: titleLabelId || "c4r.dialog.confirmation.title"
4254
- }),
4255
- actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4256
- onCancel && (cancelButton ? cancelButton : /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onCancel, children: intlConfig.formatMessage({
4257
- id: cancelLabelId || "c4r.button.cancel"
4258
- }) })),
4259
- onClose && (closeButton ? closeButton : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "contained", onClick: onClose, children: intlConfig.formatMessage({
4260
- id: "c4r.button.leave"
4261
- }) }))
4262
- ] }),
4263
- children: content ? content : intlConfig.formatMessage({
4264
- id: contentLabelId || "c4r.dialog.confirmation.content"
4265
- })
4266
- }
4267
- );
4268
- }
4269
- function CodeAreaDialog({
4270
- open,
4271
- onClose,
4272
- title,
4273
- error,
4274
- helperText,
4275
- onClickFooter,
4276
- disabledButtonFooter,
4277
- labelIdButtonFooter,
4278
- disabled,
4279
- showConfirmation,
4280
- onCancelConfirm,
4281
- onCloseConfirm,
4282
- footerProps,
4283
- saveLoading,
4284
- showSaveSnackbar,
4285
- onCloseSaveSnackbar,
4286
- "data-testid": dataTestId,
4287
- "aria-label": ariaLabel,
4288
- ...props
4289
- }) {
4290
- const showFooter = error || !!onClickFooter || !!footerProps;
4291
- if (!open) return null;
4292
- return /* @__PURE__ */ jsxRuntime.jsxs(
4293
- Dialog,
4294
- {
4295
- open,
4296
- fullScreen: true,
4297
- onClose,
4298
- "data-testid": dataTestId,
4299
- "aria-label": ariaLabel,
4300
- "data-name": "code-area-dialog",
4301
- children: [
4302
- /* @__PURE__ */ jsxRuntime.jsx(
4303
- DialogHeader,
4304
- {
4305
- title,
4306
- onClose,
4307
- closeIcon: !onClickFooter && /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.CloseDiagonallyRight, {})
4308
- }
4309
- ),
4310
- /* @__PURE__ */ jsxRuntime.jsx(CodeAreaDialogContent, { error, children: /* @__PURE__ */ jsxRuntime.jsx(
4311
- CodeAreaField,
4312
- {
4313
- ...props,
4314
- disabled,
4315
- variant: null,
4316
- isExpanded: true
4317
- }
4318
- ) }),
4319
- showFooter && /* @__PURE__ */ jsxRuntime.jsx(
4320
- DialogFooter,
4321
- {
4322
- ...footerProps,
4323
- topContent: error && /* @__PURE__ */ jsxRuntime.jsx(CodeAreaDialogError, { hasDivider: !!onClickFooter, children: helperText }),
4324
- children: !!onClickFooter && /* @__PURE__ */ jsxRuntime.jsx(
4325
- CodeAreaFooter,
4326
- {
4327
- onClickFooter,
4328
- labelIdButtonFooter,
4329
- disabled,
4330
- disabledButtonFooter,
4331
- withGutter: false,
4332
- variant: "contained",
4333
- size: "medium",
4334
- loading: !!saveLoading,
4335
- showSnackbar: showSaveSnackbar,
4336
- onCloseSnackbar: onCloseSaveSnackbar
4337
- }
4338
- )
4339
- }
4340
- ),
4341
- showConfirmation && /* @__PURE__ */ jsxRuntime.jsx(
4342
- CodeAreaDialogConfirmation,
4343
- {
4344
- onClose: onCloseConfirm ?? onClose,
4345
- onCancel: onCancelConfirm,
4346
- cancelLabelId: "c4r.button.keepEditing"
4347
- }
4348
- )
4349
- ]
4350
- }
4351
- );
4352
- }
4353
- exports.TablePaginationActions = palette.TablePaginationActions;
4354
- exports.Typography = palette.Typography;
3498
+ exports.TablePaginationActions = TablePaginationActions.TablePaginationActions;
3499
+ exports.Typography = TablePaginationActions.Typography;
4355
3500
  exports.Alert = Alert$1.Alert;
4356
3501
  exports.MenuItem = MenuItem.MenuItem;
4357
3502
  exports.AccordionGroup = AccordionGroup;
@@ -4359,14 +3504,6 @@ exports.AppBar = AppBar;
4359
3504
  exports.Autocomplete = Autocomplete;
4360
3505
  exports.Avatar = Avatar;
4361
3506
  exports.Button = Button;
4362
- exports.CodeAreaDialog = CodeAreaDialog;
4363
- exports.CodeAreaDialogConfirmation = CodeAreaDialogConfirmation;
4364
- exports.CodeAreaDialogContent = CodeAreaDialogContent;
4365
- exports.CodeAreaDialogError = CodeAreaDialogError;
4366
- exports.CodeAreaField = CodeAreaField;
4367
- exports.CodeAreaFooter = CodeAreaFooter;
4368
- exports.CodeAreaHeader = CodeAreaHeader;
4369
- exports.CodeAreaInput = CodeAreaInput;
4370
3507
  exports.CopiableComponent = CopiableComponent;
4371
3508
  exports.CreatableAutocomplete = CreatableAutocomplete;
4372
3509
  exports.DatePicker = DatePicker;
@@ -4392,6 +3529,7 @@ exports.MultipleSelectField = MultipleSelectField;
4392
3529
  exports.PasswordField = PasswordField;
4393
3530
  exports.SelectField = SelectField;
4394
3531
  exports.Snackbar = Snackbar;
3532
+ exports.Tag = Tag;
4395
3533
  exports.TimePicker = TimePicker;
4396
3534
  exports.ToggleButtonGroup = ToggleButtonGroup;
4397
3535
  exports.TooltipData = TooltipData;