@compill/admin 1.0.102 → 1.0.103
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/lib/SectionTitle.js +4 -0
- package/dist/lib/breadcrumbs/BreadCrumbs.js +29 -0
- package/dist/lib/buttons/{DialogButton.jsx → DialogButton.js} +2 -4
- package/dist/lib/buttons/{InvalidateButton.jsx → InvalidateButton.js} +2 -1
- package/dist/lib/buttons/{NavigateButton.jsx → NavigateButton.js} +2 -3
- package/dist/lib/buttons/{PublishButton.jsx → PublishButton.js} +2 -3
- package/dist/lib/buttons/{UpdateButton.jsx → UpdateButton.js} +2 -3
- package/dist/lib/buttons/{ViewButton.jsx → ViewButton.js} +2 -3
- package/dist/lib/cells/{OrderCell.jsx → OrderCell.js} +2 -11
- package/dist/lib/json/{DetailsView.jsx → DetailsView.js} +9 -36
- package/dist/lib/json/{EditItemView.jsx → EditItemView.js} +2 -1
- package/dist/lib/json/{MultiQueryWrapper.jsx → MultiQueryWrapper.js} +4 -3
- package/dist/lib/json/{QueryWrapper.jsx → QueryWrapper.js} +2 -1
- package/dist/lib/json/{ScreenRenderer.jsx → ScreenRenderer.js} +7 -6
- package/dist/lib/json/ScreenTopBar.js +18 -0
- package/dist/lib/json/{TabbedView.jsx → TabbedView.js} +5 -12
- package/dist/lib/json/buttons/{ActionButton.jsx → ActionButton.js} +2 -4
- package/dist/lib/json/buttons/{ConfirmationActionButton.jsx → ConfirmationActionButton.js} +3 -20
- package/dist/lib/json/dialog/DialogRenderer.js +14 -0
- package/dist/lib/json/dialog/ItemDeleteDialog.js +14 -0
- package/dist/lib/json/dialog/ItemEditDialog.js +77 -0
- package/dist/lib/json/dialog/{MultiQueryWrapperDialog.jsx → MultiQueryWrapperDialog.js} +2 -1
- package/dist/lib/json/dialog/{QueryWrapperDialog.jsx → QueryWrapperDialog.js} +2 -1
- package/dist/lib/json/table/{RefreshButton.jsx → RefreshButton.js} +2 -3
- package/dist/lib/json/table/{TableRowActionsView.jsx → TableRowActionsView.js} +4 -13
- package/dist/lib/json/table/{TableRowPublishPostButton.jsx → TableRowPublishPostButton.js} +2 -3
- package/dist/lib/json/table/TableView.js +65 -0
- package/dist/lib/json/table/{TableViewContext.jsx → TableViewContext.js} +4 -3
- package/dist/lib/json/table/{useTableProps.jsx → useTableProps.js} +2 -1
- package/dist/lib/layout/AdminLayout.js +15 -0
- package/dist/lib/layout/ButtonBar.js +19 -0
- package/dist/lib/layout/Content.js +9 -0
- package/dist/lib/layout/PageTitleBar.js +4 -0
- package/dist/lib/layout/Sidebar.js +12 -0
- package/dist/lib/layout/menu/Menu.js +23 -0
- package/dist/lib/layout/menu/MenuButton.js +5 -0
- package/dist/lib/layout/menu/MenuItem.js +11 -0
- package/dist/lib/layout/menu/NextMenuItem.js +11 -0
- package/dist/lib/layout/menu/SelectedIndicator.js +4 -0
- package/dist/lib/layout/menu/UserBlock.js +34 -0
- package/dist/lib/modal/{AttachDialog.jsx → AttachDialog.js} +4 -40
- package/dist/lib/modal/FormActionDialog.js +20 -0
- package/dist/lib/page/PageContainer.js +5 -0
- package/dist/lib/page/PageContentEditor.js +10 -0
- package/dist/lib/page/PageMain.js +5 -0
- package/dist/lib/page/{PageQueryStateContainer.jsx → PageQueryStateContainer.js} +4 -3
- package/dist/lib/page/PageSectionTitle.js +4 -0
- package/dist/lib/page/PageSidebar.js +4 -0
- package/dist/lib/page/PageSidebarSection.js +5 -0
- package/dist/lib/page/PageStateContainer.js +7 -0
- package/dist/lib/page/PageSubSectionTitle.js +4 -0
- package/dist/lib/page/PageTitle.js +4 -0
- package/dist/lib/page/{PageTopBar.jsx → PageTopBar.js} +4 -18
- package/dist/lib/status/{StatusBadge.jsx → StatusBadge.js} +2 -1
- package/dist/lib/table/TableContainer.js +6 -0
- package/dist/lib/table/{TableContainerContext.jsx → TableContainerContext.js} +2 -1
- package/dist/lib/table/{TableCreateButton.jsx → TableCreateButton.js} +2 -4
- package/dist/lib/table/TableFilterButton.js +8 -0
- package/dist/lib/table/{TableFilters.jsx → TableFilters.js} +3 -22
- package/dist/lib/table/TableMassActions.js +9 -0
- package/dist/lib/table/TableRowActionBar.js +8 -0
- package/dist/lib/table/TableRowActionButton.js +5 -0
- package/dist/lib/table/TableRowActionDialogButton.js +6 -0
- package/dist/lib/table/{TableRowDeleteButton.jsx → TableRowDeleteButton.js} +2 -1
- package/dist/lib/table/{TableRowEditButton.jsx → TableRowEditButton.js} +2 -3
- package/dist/lib/table/{TableRowNavigateButton.jsx → TableRowNavigateButton.js} +2 -1
- package/dist/lib/table/{TableRowPublishPostButton.jsx → TableRowPublishPostButton.js} +2 -1
- package/dist/lib/table/{TableRowViewButton.jsx → TableRowViewButton.js} +2 -1
- package/dist/lib/table/TableTopBar.js +5 -0
- package/package.json +9 -9
- package/dist/lib/SectionTitle.jsx +0 -3
- package/dist/lib/breadcrumbs/BreadCrumbs.jsx +0 -43
- package/dist/lib/json/ScreenTopBar.jsx +0 -39
- package/dist/lib/json/dialog/DialogRenderer.jsx +0 -13
- package/dist/lib/json/dialog/ItemDeleteDialog.jsx +0 -36
- package/dist/lib/json/dialog/ItemEditDialog.jsx +0 -124
- package/dist/lib/json/table/TableView.jsx +0 -100
- package/dist/lib/layout/AdminLayout.jsx +0 -24
- package/dist/lib/layout/ButtonBar.jsx +0 -29
- package/dist/lib/layout/Content.jsx +0 -10
- package/dist/lib/layout/PageTitleBar.jsx +0 -12
- package/dist/lib/layout/Sidebar.jsx +0 -24
- package/dist/lib/layout/menu/Menu.jsx +0 -30
- package/dist/lib/layout/menu/MenuButton.jsx +0 -7
- package/dist/lib/layout/menu/MenuItem.jsx +0 -20
- package/dist/lib/layout/menu/NextMenuItem.jsx +0 -20
- package/dist/lib/layout/menu/SelectedIndicator.jsx +0 -3
- package/dist/lib/layout/menu/UserBlock.jsx +0 -55
- package/dist/lib/modal/FormActionDialog.jsx +0 -46
- package/dist/lib/page/PageContainer.jsx +0 -4
- package/dist/lib/page/PageContentEditor.jsx +0 -11
- package/dist/lib/page/PageMain.jsx +0 -4
- package/dist/lib/page/PageSectionTitle.jsx +0 -3
- package/dist/lib/page/PageSidebar.jsx +0 -3
- package/dist/lib/page/PageSidebarSection.jsx +0 -7
- package/dist/lib/page/PageStateContainer.jsx +0 -9
- package/dist/lib/page/PageSubSectionTitle.jsx +0 -3
- package/dist/lib/page/PageTitle.jsx +0 -3
- package/dist/lib/table/TableContainer.jsx +0 -11
- package/dist/lib/table/TableFilterButton.jsx +0 -16
- package/dist/lib/table/TableMassActions.jsx +0 -15
- package/dist/lib/table/TableRowActionBar.jsx +0 -14
- package/dist/lib/table/TableRowActionButton.jsx +0 -7
- package/dist/lib/table/TableRowActionDialogButton.jsx +0 -8
- package/dist/lib/table/TableTopBar.jsx +0 -17
- /package/dist/lib/table/{TableColumnButton.jsx → TableColumnButton.js} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Button, Icon } from "@valerya/ui";
|
|
2
|
-
export function MenuButton({ depth, darkMode, icon, selected, children, ...props }) {
|
|
3
|
-
return (<Button as="li" minH="8" ms={`${(depth ?? 0) * 2}`} p="2" font="title" textColor={darkMode ? "white" : "black"} fontWeight="600" rounded="lg" textSize="sm" variant="borderless" hover_bgColor={darkMode ? "white" : "black"} hover_bgOpacity="10" hover_textColor={darkMode ? "white" : "zinc-800"} cursor="pointer" dflex alignItems="center" gap="3" {...props}>
|
|
4
|
-
{icon && <Icon path={icon} opacity={selected ? "100" : "60"}/>}
|
|
5
|
-
{children}
|
|
6
|
-
</Button>);
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SelectedIndicator } from "./SelectedIndicator";
|
|
2
|
-
import { Link, useLocation, useMatch } from "react-router-dom";
|
|
3
|
-
import { MenuButton } from "./MenuButton";
|
|
4
|
-
export function MenuItem({ icon, path, depth, darkMode, subMenu, ...props }) {
|
|
5
|
-
const location = useLocation();
|
|
6
|
-
const selected = path == "/" ? location.pathname == "/" : location.pathname.startsWith(path.startsWith("/") ? path : `/${path}`);
|
|
7
|
-
const match = useMatch("/" + path) != null;
|
|
8
|
-
// const selected = match != null
|
|
9
|
-
return (<>
|
|
10
|
-
<Link to={path} style={{ position: "relative" }}>
|
|
11
|
-
<MenuButton depth={depth} darkMode={darkMode} icon={icon} selected={selected} {...props}/>
|
|
12
|
-
|
|
13
|
-
{match && <SelectedIndicator darkMode={darkMode}/>}
|
|
14
|
-
</Link>
|
|
15
|
-
|
|
16
|
-
{subMenu?.map((item, index) => (<MenuItem key={index} icon={item.icon} path={item.path} depth={(depth ?? 0) + 1} darkMode={darkMode} subMenu={item.children}>
|
|
17
|
-
{item.label}
|
|
18
|
-
</MenuItem>))}
|
|
19
|
-
</>);
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { MenuButton } from "./MenuButton";
|
|
2
|
-
import { SelectedIndicator } from "./SelectedIndicator";
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
import { useRouter } from "next/router";
|
|
5
|
-
export function NextMenuItem({ icon, path, depth, darkMode, subMenu, ...props }) {
|
|
6
|
-
const { pathname } = useRouter();
|
|
7
|
-
const selected = path == "/" ? pathname == "/" : pathname.startsWith(path.startsWith("/") ? path : `/${path}`);
|
|
8
|
-
const match = path == "/" ? pathname == "/" : pathname == (path.startsWith("/") ? path : `/${path}`);
|
|
9
|
-
return (<>
|
|
10
|
-
<Link href={path} style={{ position: "relative" }}>
|
|
11
|
-
<MenuButton depth={depth} darkMode={darkMode} icon={icon} selected={selected} {...props}/>
|
|
12
|
-
|
|
13
|
-
{match && <SelectedIndicator darkMode={darkMode}/>}
|
|
14
|
-
</Link>
|
|
15
|
-
|
|
16
|
-
{subMenu?.map((item, index) => (<NextMenuItem key={index} icon={item.icon} path={item.path} depth={(depth ?? 0) + 1} darkMode={darkMode} subMenu={item.children}>
|
|
17
|
-
{item.label}
|
|
18
|
-
</NextMenuItem>))}
|
|
19
|
-
</>);
|
|
20
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { useSessionLogout, useSessionUser } from "@compill/auth";
|
|
2
|
-
import { mdiCog, mdiDotsVertical, mdiLogout } from "@mdi/js";
|
|
3
|
-
import { Avatar, Button, Icon, IconButton, Popup } from "@valerya/ui";
|
|
4
|
-
import { capitalize } from "es-toolkit";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { useNavigate } from "react-router-dom";
|
|
7
|
-
export function UserBlock({ color, darkMode, menuConfig, path }) {
|
|
8
|
-
const { isLoading, user } = useSessionUser();
|
|
9
|
-
const navigate = useNavigate();
|
|
10
|
-
const handleClick = React.useCallback(() => navigate(path), [navigate, path]);
|
|
11
|
-
if (isLoading)
|
|
12
|
-
return null;
|
|
13
|
-
return (<div dflex alignItems="center" border="0.5" borderColor={`${color}-${darkMode ? "800" : "200"}`} ps="3" py="1.5" textSize="md" rounded="lg" hover_bgColor={`${color}-${darkMode ? "800" : "200"}`} cursor="pointer" textColor={darkMode ? "white" : "slate-800"} onClick={handleClick}>
|
|
14
|
-
<Avatar size="sm" src={user?.media?.url ?? ""} name={`${user?.firstname} ${user?.lastname}`}/>
|
|
15
|
-
|
|
16
|
-
<span flexGrow ms="2">{`${capitalize(user?.firstname || user?.lastname || "")}`}</span>
|
|
17
|
-
|
|
18
|
-
<IconButton variant="borderless" corners="pill" scheme="dark" textColor={darkMode ? "white" : "slate-800"} hover_textColor={darkMode ? "white" : "slate-800"} hover_bgColor={`${color}-${darkMode ? "900" : "200"}`} icon={mdiCog} onClick={handleClick}/>
|
|
19
|
-
|
|
20
|
-
<OverflowMenu color={color} darkMode={darkMode} menuConfig={menuConfig}/>
|
|
21
|
-
</div>);
|
|
22
|
-
}
|
|
23
|
-
function OverflowMenu({ color, darkMode, menuConfig }) {
|
|
24
|
-
const [showPopup, setShowPopup] = React.useState(false);
|
|
25
|
-
const navigate = useNavigate();
|
|
26
|
-
const logout = useSessionLogout(false);
|
|
27
|
-
return (<>
|
|
28
|
-
<Popup show={showPopup} position="relative" side="bottom-end" onClick={(e) => { e.preventDefault(); e.stopPropagation(); setShowPopup((show) => !show); }} onHide={() => setShowPopup(false)}>
|
|
29
|
-
<IconButton icon={mdiDotsVertical} variant="borderless" corners="pill" scheme="dark" textColor={darkMode ? "white" : "slate-800"} hover_textColor={darkMode ? "white" : "slate-800"} hover_bgColor={`${color}-${darkMode ? "900" : "200"}`}/>
|
|
30
|
-
|
|
31
|
-
<div bgColor="white" rounded="sm" overflow="hidden" shadow mt="1" border="px" borderColor="gray-200" divideColor="gray-200" divideY="px" minW="40">
|
|
32
|
-
{menuConfig && menuConfig.length > 0 && menuConfig.map((item, index) => {
|
|
33
|
-
if (item.type == "item") {
|
|
34
|
-
return (<MenuItem key={index} icon={item.icon} onClick={() => navigate(item.path)}>
|
|
35
|
-
{item.label}
|
|
36
|
-
</MenuItem>);
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
})}
|
|
40
|
-
<MenuItem icon={mdiLogout} onClick={logout}>Logout</MenuItem>
|
|
41
|
-
</div>
|
|
42
|
-
</Popup>
|
|
43
|
-
</>);
|
|
44
|
-
}
|
|
45
|
-
function MenuItem({ icon, onClick, children, ...props }) {
|
|
46
|
-
const handleClick = React.useCallback((e) => {
|
|
47
|
-
e.preventDefault();
|
|
48
|
-
e.stopPropagation();
|
|
49
|
-
onClick?.(e);
|
|
50
|
-
}, []);
|
|
51
|
-
return (<Button variant="borderless" scheme="dark" size="sm" alignItems="center" dflex gap="2" px="2" py="1.5" w="full" onClick={handleClick} textColor="slate-700" {...props}>
|
|
52
|
-
{icon && <Icon path={icon} size="md"/>}
|
|
53
|
-
{children}
|
|
54
|
-
</Button>);
|
|
55
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { useMutate } from "@compill/api";
|
|
2
|
-
import { ModalLoadingOverlay } from "@compill/components";
|
|
3
|
-
import { SubmitButton, FormRenderer, FormProvider } from "@compill/form";
|
|
4
|
-
import { useApiMutation, useInvalidateParentMutation } from "@compill/api";
|
|
5
|
-
import { Button, Modal } from "@valerya/ui";
|
|
6
|
-
import React from "react";
|
|
7
|
-
export function FormActionDialog({ initialValues, itemLabel, queryId = "", queryKey, queryFn, queryOptions, onSuccess, successMsg, showSuccessMsg, onError, errorMsg, showErrorMsg, processInput, invalidateQueriesOnSuccess = true, cancelLabel = "Cancel", saveLabel = "Send", size = "lg", title, form, show, onClose, formikProps, ...props }) {
|
|
8
|
-
const mutation = invalidateQueriesOnSuccess ? useInvalidateParentMutation(queryFn, queryKey, queryOptions) : useApiMutation(queryFn, queryKey, queryId, queryOptions);
|
|
9
|
-
const mutate = useMutate(mutation, {
|
|
10
|
-
onSuccess,
|
|
11
|
-
successMsg,
|
|
12
|
-
showSuccessMsg,
|
|
13
|
-
onError,
|
|
14
|
-
errorMsg,
|
|
15
|
-
showErrorMsg,
|
|
16
|
-
processInput,
|
|
17
|
-
});
|
|
18
|
-
return (<Modal size={size} show={show} onClose={onClose} scheme="light" transition
|
|
19
|
-
// closeOnMaskClick={false}
|
|
20
|
-
{...props}>
|
|
21
|
-
<Modal.Header>
|
|
22
|
-
{title}
|
|
23
|
-
</Modal.Header>
|
|
24
|
-
|
|
25
|
-
{/* @ts-ignore */}
|
|
26
|
-
<FormProvider initialValues={initialValues ?? {}} onSubmit={mutate} {...formikProps}>
|
|
27
|
-
<Modal.Body pb="6">
|
|
28
|
-
{React.isValidElement(form) && form}
|
|
29
|
-
|
|
30
|
-
{Array.isArray(form) && <FormRenderer form={form}/>}
|
|
31
|
-
</Modal.Body>
|
|
32
|
-
|
|
33
|
-
<Modal.Footer dflex placeContent="end" spaceX="3">
|
|
34
|
-
<Button disabled={mutation.isLoading} onClick={onClose} variant="borderless" me="2">
|
|
35
|
-
{cancelLabel}
|
|
36
|
-
</Button>
|
|
37
|
-
|
|
38
|
-
<SubmitButton disabled={mutation.isLoading}>
|
|
39
|
-
{saveLabel}
|
|
40
|
-
</SubmitButton>
|
|
41
|
-
</Modal.Footer>
|
|
42
|
-
</FormProvider>
|
|
43
|
-
|
|
44
|
-
{mutation.isLoading && <ModalLoadingOverlay />}
|
|
45
|
-
</Modal>);
|
|
46
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FormEditor } from "@compill/form-editor";
|
|
2
|
-
import { PageMain } from "./PageMain";
|
|
3
|
-
import { ImageExtension } from "@compill/editor";
|
|
4
|
-
export function PageContentEditor({ name, ...props }) {
|
|
5
|
-
const extensions = [ImageExtension];
|
|
6
|
-
return (<PageMain h="min" {...props}>
|
|
7
|
-
<FormEditor minH="128" minW="144" maxW={props.maxW}
|
|
8
|
-
// w={props.w}
|
|
9
|
-
name={name} placeHolder="Write here..." extensions={extensions}/>
|
|
10
|
-
</PageMain>);
|
|
11
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { QueryLoadingState } from "@compill/components";
|
|
2
|
-
import { Container } from "@valerya/ui";
|
|
3
|
-
import React from "react";
|
|
4
|
-
export const PageStateContainer = React.forwardRef(({ loading = false, children, ...props }, ref) => {
|
|
5
|
-
return (<>
|
|
6
|
-
{loading && <QueryLoadingState w="full" h="100%"/>}
|
|
7
|
-
{!loading && <Container ref={ref} center size="x2" dflex flexCol gap="8" {...props}>{children}</Container>}
|
|
8
|
-
</>);
|
|
9
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TableContextProvider } from "@compill/table";
|
|
2
|
-
import { TableContainerContextProvider } from "./TableContainerContext";
|
|
3
|
-
export function TableContainer({ initialPageSize, initialVisibleColumns, columns, filtersMethod = "reactRouter", children, ...props }) {
|
|
4
|
-
return (<div w="full" dflex flexCol {...props}>
|
|
5
|
-
<TableContextProvider initialPageSize={initialPageSize} filtersMethod={filtersMethod}>
|
|
6
|
-
<TableContainerContextProvider columns={columns} initialVisibleColumns={initialVisibleColumns}>
|
|
7
|
-
{children}
|
|
8
|
-
</TableContainerContextProvider>
|
|
9
|
-
</TableContextProvider>
|
|
10
|
-
</div>);
|
|
11
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@valerya/ui";
|
|
2
|
-
import { Button, Popover } from "@valerya/ui";
|
|
3
|
-
import { mdiFilter } from "@mdi/js";
|
|
4
|
-
export function TableFilterButton({ ...props }) {
|
|
5
|
-
// return <Button scheme="secondary" {...props}><Icon path={mdiFilter} /></Button>
|
|
6
|
-
return (<Popover side="bottom-end" modal>
|
|
7
|
-
<Button scheme="dark" size="sm" aspectRatio="square" variant="borderless" corners="square" {...props}>
|
|
8
|
-
<Icon path={mdiFilter}/>
|
|
9
|
-
</Button>
|
|
10
|
-
<div bgColor="white" rounded shadow>
|
|
11
|
-
<div py="3" hover_bgColor="#ff0000" px="5" hover_textColor="white">First Item</div>
|
|
12
|
-
<div py="3" hover_bgColor="#ff0000" px="5" hover_textColor="white">Second Item</div>
|
|
13
|
-
<div py="3" hover_bgColor="#ff0000" px="5" hover_textColor="white">Third Item</div>
|
|
14
|
-
</div>
|
|
15
|
-
</Popover>);
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useTableContext } from "@compill/table";
|
|
2
|
-
import { Collapse } from "@valerya/ui";
|
|
3
|
-
import { ActionButton } from "../json/buttons/ActionButton";
|
|
4
|
-
export function TableMassActions({ actions }) {
|
|
5
|
-
const { ids } = useTableContext();
|
|
6
|
-
const showMassActions = ids && ids.length > 0;
|
|
7
|
-
return (<Collapse in={showMassActions} style={{ overflow: showMassActions ? "initial" : "hidden" }}>
|
|
8
|
-
<div dflex gap="3" flexWrap alignItems="center" px="8" pt="5">
|
|
9
|
-
{actions.map((action, index) => (<div key={index}>
|
|
10
|
-
{/* {action.type == "custom" && action.render(rows)} */}
|
|
11
|
-
{action.type == "button" && !action.showConfirmationDialog && (<ActionButton label={action.label} queryFn={action.queryFn} queryKey={action.queryKey} buttonProps={action.buttonProps}/>)}
|
|
12
|
-
</div>))}
|
|
13
|
-
</div>
|
|
14
|
-
</Collapse>);
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TableRowViewButton } from "./TableRowViewButton";
|
|
2
|
-
import { TableRowNavigateButton } from "./TableRowNavigateButton";
|
|
3
|
-
import { TableRowEditButton } from "./TableRowEditButton";
|
|
4
|
-
import { TableRowDeleteButton } from "./TableRowDeleteButton";
|
|
5
|
-
export function TableRowActionBar({ publishId, viewPath, navigatePath, editDialog, deleteDialog, children, ...props }) {
|
|
6
|
-
return (<div dflex spaceX="1" placeContent="end" {...props}>
|
|
7
|
-
{viewPath && <TableRowViewButton path={viewPath}/>}
|
|
8
|
-
{navigatePath && <TableRowNavigateButton path={navigatePath}/>}
|
|
9
|
-
{editDialog && <TableRowEditButton buildDialog={editDialog}/>}
|
|
10
|
-
{deleteDialog && <TableRowDeleteButton buildDialog={deleteDialog}/>}
|
|
11
|
-
|
|
12
|
-
{children}
|
|
13
|
-
</div>);
|
|
14
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Button, Icon } from "@valerya/ui";
|
|
2
|
-
export function TableRowActionButton({ icon, children, ...props }) {
|
|
3
|
-
return (<Button dflex alignContent="center" placeContent="center" py="2.5" px="3" h="full" size="lg" variant="borderless" corners="square" gap="2" {...props}>
|
|
4
|
-
{icon && <Icon path={icon} size="sm"/>}
|
|
5
|
-
{children}
|
|
6
|
-
</Button>);
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@valerya/ui";
|
|
2
|
-
import { DialogButton } from "../buttons/DialogButton";
|
|
3
|
-
export function TableRowActionDialogButton({ icon, children, ...props }) {
|
|
4
|
-
return (<DialogButton dflex alignContent="center" placeContent="center" py="2.5" px="3" h="full" size="lg" variant="borderless" corners="square" gap="2" {...props}>
|
|
5
|
-
{icon && <Icon path={icon} size="sm"/>}
|
|
6
|
-
{children}
|
|
7
|
-
</DialogButton>);
|
|
8
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Breadcrumbs } from "../breadcrumbs/BreadCrumbs";
|
|
2
|
-
export function TableTopBar({ title, breadcrumbs, children, ...props }) {
|
|
3
|
-
return (<div dflex flexRow alignItems="center" gap="3" p="8"
|
|
4
|
-
// borderB="0.5"
|
|
5
|
-
// borderBColor="--bg-2"
|
|
6
|
-
{...props}>
|
|
7
|
-
<div>
|
|
8
|
-
|
|
9
|
-
{title && <h2 textSize="x2" fontWeight="600" textColor="#3f4254" textTransform="capitalize">{title}</h2>}
|
|
10
|
-
{breadcrumbs && <Breadcrumbs breadcrumbs={breadcrumbs}/>}
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div flexGrow> </div>
|
|
14
|
-
|
|
15
|
-
{children}
|
|
16
|
-
</div>);
|
|
17
|
-
}
|
|
File without changes
|