@local-civics/mgmt-ui 0.1.161 → 0.1.162
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/dist/index.d.ts +1 -0
- package/dist/index.js +38 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea, Modal, Loader, Container, Button, Title, UnstyledButton, Card, SimpleGrid, Tabs as Tabs$1, Menu, ActionIcon, Grid, Table as Table$k, Stack as Stack$4, LoadingOverlay, Select, Autocomplete, Drawer, Divider, TextInput, Tooltip, Paper, Overlay, Anchor, Checkbox, createEmotionCache, MantineProvider, AppShell } from '@mantine/core';
|
|
4
4
|
import { IconChevronRight, IconChevronLeft, IconVideo, IconSwitchHorizontal, IconLogout, IconHome2, IconGauge, IconCategory2, IconRoute, IconAlbum, IconLambda, IconBuilding, IconBatteryEco, IconBooks, IconBackpack, IconChevronDown, IconClipboardCopy, IconTableExport, IconArrowLeft, IconPlaylistAdd, IconCheck, IconTrash, IconDownload, IconX, IconCloudUpload, IconInfoCircle, IconColorSwatch, IconPointer, IconScribble, IconSchool, IconPodium, IconBriefcase, IconPresentation, IconNews, IconTools, IconBrandInstagram, IconBrandLinkedin, IconBrandFacebook } from '@tabler/icons';
|
|
5
5
|
import { Link } from 'react-router-dom';
|
|
6
|
-
import { NotificationsProvider } from '@mantine/notifications';
|
|
6
|
+
import { showNotification, NotificationsProvider } from '@mantine/notifications';
|
|
7
7
|
export { showNotification, updateNotification } from '@mantine/notifications';
|
|
8
8
|
import { DataTable } from 'mantine-datatable';
|
|
9
9
|
import { Dropzone, MIME_TYPES } from '@mantine/dropzone';
|
|
@@ -1627,6 +1627,10 @@ const useStyles$f = createStyles((theme) => ({
|
|
|
1627
1627
|
description: {
|
|
1628
1628
|
color: theme.white,
|
|
1629
1629
|
maxWidth: 220
|
|
1630
|
+
},
|
|
1631
|
+
code: {
|
|
1632
|
+
color: theme.white,
|
|
1633
|
+
maxWidth: 220
|
|
1630
1634
|
}
|
|
1631
1635
|
}));
|
|
1632
1636
|
const TenantBanner = (_a) => {
|
|
@@ -1635,15 +1639,31 @@ const TenantBanner = (_a) => {
|
|
|
1635
1639
|
description,
|
|
1636
1640
|
image,
|
|
1637
1641
|
style,
|
|
1638
|
-
className
|
|
1642
|
+
className,
|
|
1643
|
+
code
|
|
1639
1644
|
} = _b, others = __objRest$1(_b, [
|
|
1640
1645
|
"title",
|
|
1641
1646
|
"description",
|
|
1642
1647
|
"image",
|
|
1643
1648
|
"style",
|
|
1644
|
-
"className"
|
|
1649
|
+
"className",
|
|
1650
|
+
"code"
|
|
1645
1651
|
]);
|
|
1646
1652
|
const { classes, cx, theme } = useStyles$f();
|
|
1653
|
+
const handleCopy = async () => {
|
|
1654
|
+
if (!code)
|
|
1655
|
+
return;
|
|
1656
|
+
try {
|
|
1657
|
+
await navigator.clipboard.writeText(code);
|
|
1658
|
+
showNotification({
|
|
1659
|
+
title: "Copied!",
|
|
1660
|
+
message: "Community code copied to clipboard.",
|
|
1661
|
+
autoClose: 3e3
|
|
1662
|
+
});
|
|
1663
|
+
} catch (err) {
|
|
1664
|
+
console.error("Failed to copy code", err);
|
|
1665
|
+
}
|
|
1666
|
+
};
|
|
1647
1667
|
return /* @__PURE__ */ React.createElement(
|
|
1648
1668
|
Card,
|
|
1649
1669
|
__spreadValues$5({
|
|
@@ -1659,7 +1679,20 @@ const TenantBanner = (_a) => {
|
|
|
1659
1679
|
zIndex: 0
|
|
1660
1680
|
}
|
|
1661
1681
|
),
|
|
1662
|
-
/* @__PURE__ */ React.createElement("div", { className: classes.content }, /* @__PURE__ */ React.createElement(Text, { size: "lg", weight: 700, className: classes.title }, title), /* @__PURE__ */ React.createElement(Text, { size: "sm", className: classes.description }, description))
|
|
1682
|
+
/* @__PURE__ */ React.createElement("div", { className: classes.content }, /* @__PURE__ */ React.createElement(Text, { size: "lg", weight: 700, className: classes.title }, title), /* @__PURE__ */ React.createElement(Text, { size: "sm", className: classes.description }, description), /* @__PURE__ */ React.createElement(Group, { mt: "sm", spacing: "xs" }, /* @__PURE__ */ React.createElement(Text, { size: "sm", className: classes.code }, "Community Code: ", code || "\u2014"), code && /* @__PURE__ */ React.createElement(
|
|
1683
|
+
Button,
|
|
1684
|
+
{
|
|
1685
|
+
size: "xs",
|
|
1686
|
+
variant: "white",
|
|
1687
|
+
onClick: handleCopy,
|
|
1688
|
+
styles: {
|
|
1689
|
+
root: {
|
|
1690
|
+
backgroundColor: "rgba(255,255,255,0.9)"
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
"Copy"
|
|
1695
|
+
)))
|
|
1663
1696
|
);
|
|
1664
1697
|
};
|
|
1665
1698
|
|
|
@@ -1676,7 +1709,8 @@ const Home = (props) => {
|
|
|
1676
1709
|
{
|
|
1677
1710
|
title: props.organization.name,
|
|
1678
1711
|
description: props.organization.description,
|
|
1679
|
-
image: props.organization.image
|
|
1712
|
+
image: props.organization.image,
|
|
1713
|
+
code: props.organization.accessCode
|
|
1680
1714
|
}
|
|
1681
1715
|
))), /* @__PURE__ */ React.createElement(Grid, { gutter: "md" }, /* @__PURE__ */ React.createElement(Grid.Col, null, /* @__PURE__ */ React.createElement(
|
|
1682
1716
|
CardGradient,
|