@compill/admin 1.0.103 → 1.0.105
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.cjs +2054 -0
- package/dist/index.d.cts +565 -0
- package/dist/index.d.ts +565 -50
- package/dist/index.js +2000 -50
- package/package.json +19 -18
- package/dist/lib/SectionTitle.d.ts +0 -2
- package/dist/lib/SectionTitle.js +0 -4
- package/dist/lib/breadcrumbs/BreadCrumbs.d.ts +0 -15
- package/dist/lib/breadcrumbs/BreadCrumbs.js +0 -29
- package/dist/lib/buttons/DialogButton.d.ts +0 -7
- package/dist/lib/buttons/DialogButton.js +0 -15
- package/dist/lib/buttons/InvalidateButton.d.ts +0 -6
- package/dist/lib/buttons/InvalidateButton.js +0 -11
- package/dist/lib/buttons/NavigateButton.d.ts +0 -4
- package/dist/lib/buttons/NavigateButton.js +0 -12
- package/dist/lib/buttons/PublishButton.d.ts +0 -9
- package/dist/lib/buttons/PublishButton.js +0 -17
- package/dist/lib/buttons/UpdateButton.d.ts +0 -2
- package/dist/lib/buttons/UpdateButton.js +0 -11
- package/dist/lib/buttons/ViewButton.d.ts +0 -5
- package/dist/lib/buttons/ViewButton.js +0 -13
- package/dist/lib/cells/OrderCell.d.ts +0 -11
- package/dist/lib/cells/OrderCell.js +0 -26
- package/dist/lib/json/DetailsView.d.ts +0 -5
- package/dist/lib/json/DetailsView.js +0 -69
- package/dist/lib/json/EditItemView.d.ts +0 -2
- package/dist/lib/json/EditItemView.js +0 -6
- package/dist/lib/json/MultiQueryWrapper.d.ts +0 -5
- package/dist/lib/json/MultiQueryWrapper.js +0 -61
- package/dist/lib/json/QueryWrapper.d.ts +0 -6
- package/dist/lib/json/QueryWrapper.js +0 -29
- package/dist/lib/json/ScreenRenderer.d.ts +0 -6
- package/dist/lib/json/ScreenRenderer.js +0 -19
- package/dist/lib/json/ScreenTopBar.d.ts +0 -15
- package/dist/lib/json/ScreenTopBar.js +0 -18
- package/dist/lib/json/TabbedView.d.ts +0 -3
- package/dist/lib/json/TabbedView.js +0 -21
- package/dist/lib/json/buttons/ActionButton.d.ts +0 -14
- package/dist/lib/json/buttons/ActionButton.js +0 -11
- package/dist/lib/json/buttons/ConfirmationActionButton.d.ts +0 -26
- package/dist/lib/json/buttons/ConfirmationActionButton.js +0 -20
- package/dist/lib/json/dialog/DialogRenderer.d.ts +0 -11
- package/dist/lib/json/dialog/DialogRenderer.js +0 -14
- package/dist/lib/json/dialog/ItemDeleteDialog.d.ts +0 -17
- package/dist/lib/json/dialog/ItemDeleteDialog.js +0 -14
- package/dist/lib/json/dialog/ItemEditDialog.d.ts +0 -32
- package/dist/lib/json/dialog/ItemEditDialog.js +0 -77
- package/dist/lib/json/dialog/MultiQueryWrapperDialog.d.ts +0 -7
- package/dist/lib/json/dialog/MultiQueryWrapperDialog.js +0 -23
- package/dist/lib/json/dialog/QueryWrapperDialog.d.ts +0 -13
- package/dist/lib/json/dialog/QueryWrapperDialog.js +0 -20
- package/dist/lib/json/table/RefreshButton.d.ts +0 -3
- package/dist/lib/json/table/RefreshButton.js +0 -11
- package/dist/lib/json/table/TableRowActionsView.d.ts +0 -11
- package/dist/lib/json/table/TableRowActionsView.js +0 -36
- package/dist/lib/json/table/TableRowPublishPostButton.d.ts +0 -8
- package/dist/lib/json/table/TableRowPublishPostButton.js +0 -20
- package/dist/lib/json/table/TableView.d.ts +0 -3
- package/dist/lib/json/table/TableView.js +0 -65
- package/dist/lib/json/table/TableViewContext.d.ts +0 -14
- package/dist/lib/json/table/TableViewContext.js +0 -58
- package/dist/lib/json/table/useTableProps.d.ts +0 -3
- package/dist/lib/json/table/useTableProps.js +0 -57
- package/dist/lib/json/types/DetailsView.d.ts +0 -57
- package/dist/lib/json/types/DetailsView.js +0 -1
- package/dist/lib/json/types/EditItemDialog.d.ts +0 -4
- package/dist/lib/json/types/EditItemDialog.js +0 -1
- package/dist/lib/json/types/MultiQueryWrapper.d.ts +0 -18
- package/dist/lib/json/types/MultiQueryWrapper.js +0 -1
- package/dist/lib/json/types/MultiQueryWrapperDialog.d.ts +0 -13
- package/dist/lib/json/types/MultiQueryWrapperDialog.js +0 -1
- package/dist/lib/json/types/QueryWrapper.d.ts +0 -27
- package/dist/lib/json/types/QueryWrapper.js +0 -1
- package/dist/lib/json/types/QueryWrapperDialog.d.ts +0 -22
- package/dist/lib/json/types/QueryWrapperDialog.js +0 -1
- package/dist/lib/json/types/ScreenConfig.d.ts +0 -8
- package/dist/lib/json/types/ScreenConfig.js +0 -1
- package/dist/lib/json/types/TabbedView.d.ts +0 -22
- package/dist/lib/json/types/TabbedView.js +0 -1
- package/dist/lib/json/types/TableView.d.ts +0 -117
- package/dist/lib/json/types/TableView.js +0 -1
- package/dist/lib/layout/AdminLayout.d.ts +0 -13
- package/dist/lib/layout/AdminLayout.js +0 -15
- package/dist/lib/layout/ButtonBar.d.ts +0 -19
- package/dist/lib/layout/ButtonBar.js +0 -19
- package/dist/lib/layout/Content.d.ts +0 -9
- package/dist/lib/layout/Content.js +0 -9
- package/dist/lib/layout/PageTitleBar.d.ts +0 -6
- package/dist/lib/layout/PageTitleBar.js +0 -4
- package/dist/lib/layout/Sidebar.d.ts +0 -20
- package/dist/lib/layout/Sidebar.js +0 -12
- package/dist/lib/layout/menu/Menu.d.ts +0 -12
- package/dist/lib/layout/menu/Menu.js +0 -23
- package/dist/lib/layout/menu/MenuButton.d.ts +0 -6
- package/dist/lib/layout/menu/MenuButton.js +0 -5
- package/dist/lib/layout/menu/MenuConfig.d.ts +0 -13
- package/dist/lib/layout/menu/MenuConfig.js +0 -1
- package/dist/lib/layout/menu/MenuItem.d.ts +0 -11
- package/dist/lib/layout/menu/MenuItem.js +0 -11
- package/dist/lib/layout/menu/NextMenuItem.d.ts +0 -11
- package/dist/lib/layout/menu/NextMenuItem.js +0 -11
- package/dist/lib/layout/menu/SelectedIndicator.d.ts +0 -3
- package/dist/lib/layout/menu/SelectedIndicator.js +0 -4
- package/dist/lib/layout/menu/UserBlock.d.ts +0 -9
- package/dist/lib/layout/menu/UserBlock.js +0 -34
- package/dist/lib/modal/AttachDialog.d.ts +0 -30
- package/dist/lib/modal/AttachDialog.js +0 -73
- package/dist/lib/modal/FormActionDialog.d.ts +0 -23
- package/dist/lib/modal/FormActionDialog.js +0 -20
- package/dist/lib/page/PageContainer.d.ts +0 -2
- package/dist/lib/page/PageContainer.js +0 -5
- package/dist/lib/page/PageContentEditor.d.ts +0 -4
- package/dist/lib/page/PageContentEditor.js +0 -10
- package/dist/lib/page/PageMain.d.ts +0 -2
- package/dist/lib/page/PageMain.js +0 -5
- package/dist/lib/page/PageQueryStateContainer.d.ts +0 -21
- package/dist/lib/page/PageQueryStateContainer.js +0 -16
- package/dist/lib/page/PageSectionTitle.d.ts +0 -2
- package/dist/lib/page/PageSectionTitle.js +0 -4
- package/dist/lib/page/PageSidebar.d.ts +0 -2
- package/dist/lib/page/PageSidebar.js +0 -4
- package/dist/lib/page/PageSidebarSection.d.ts +0 -4
- package/dist/lib/page/PageSidebarSection.js +0 -5
- package/dist/lib/page/PageStateContainer.d.ts +0 -7
- package/dist/lib/page/PageStateContainer.js +0 -7
- package/dist/lib/page/PageSubSectionTitle.d.ts +0 -2
- package/dist/lib/page/PageSubSectionTitle.js +0 -4
- package/dist/lib/page/PageTitle.d.ts +0 -2
- package/dist/lib/page/PageTitle.js +0 -4
- package/dist/lib/page/PageTopBar.d.ts +0 -13
- package/dist/lib/page/PageTopBar.js +0 -78
- package/dist/lib/status/StatusBadge.d.ts +0 -4
- package/dist/lib/status/StatusBadge.js +0 -21
- package/dist/lib/table/TableColumnButton.d.ts +0 -1
- package/dist/lib/table/TableColumnButton.js +0 -53
- package/dist/lib/table/TableContainer.d.ts +0 -10
- package/dist/lib/table/TableContainer.js +0 -6
- package/dist/lib/table/TableContainerContext.d.ts +0 -18
- package/dist/lib/table/TableContainerContext.js +0 -40
- package/dist/lib/table/TableCreateButton.d.ts +0 -4
- package/dist/lib/table/TableCreateButton.js +0 -7
- package/dist/lib/table/TableFilterButton.d.ts +0 -2
- package/dist/lib/table/TableFilterButton.js +0 -8
- package/dist/lib/table/TableFilters.d.ts +0 -9
- package/dist/lib/table/TableFilters.js +0 -27
- package/dist/lib/table/TableMassActions.d.ts +0 -6
- package/dist/lib/table/TableMassActions.js +0 -9
- package/dist/lib/table/TableRowActionBar.d.ts +0 -10
- package/dist/lib/table/TableRowActionBar.js +0 -8
- package/dist/lib/table/TableRowActionButton.d.ts +0 -4
- package/dist/lib/table/TableRowActionButton.js +0 -5
- package/dist/lib/table/TableRowActionDialogButton.d.ts +0 -4
- package/dist/lib/table/TableRowActionDialogButton.js +0 -6
- package/dist/lib/table/TableRowDeleteButton.d.ts +0 -2
- package/dist/lib/table/TableRowDeleteButton.js +0 -6
- package/dist/lib/table/TableRowEditButton.d.ts +0 -2
- package/dist/lib/table/TableRowEditButton.js +0 -6
- package/dist/lib/table/TableRowNavigateButton.d.ts +0 -4
- package/dist/lib/table/TableRowNavigateButton.js +0 -14
- package/dist/lib/table/TableRowPublishPostButton.d.ts +0 -8
- package/dist/lib/table/TableRowPublishPostButton.js +0 -19
- package/dist/lib/table/TableRowViewButton.d.ts +0 -4
- package/dist/lib/table/TableRowViewButton.js +0 -13
- package/dist/lib/table/TableTopBar.d.ts +0 -8
- package/dist/lib/table/TableTopBar.js +0 -5
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
|
-
import { Icon } from "@valerya/ui";
|
|
3
|
-
import { Button, Popover } from "@valerya/ui";
|
|
4
|
-
import { mdiFilter } from "@mdi/js";
|
|
5
|
-
export function TableFilterButton({ ...props }) {
|
|
6
|
-
// return <Button scheme="secondary" {...props}><Icon path={mdiFilter} /></Button>
|
|
7
|
-
return (_jsxs(Popover, { side: "bottom-end", modal: true, children: [_jsx(Button, { scheme: "dark", size: "sm", aspectRatio: "square", variant: "borderless", corners: "square", ...props, children: _jsx(Icon, { path: mdiFilter }) }), _jsxs("div", { bgColor: "white", rounded: true, shadow: true, children: [_jsx("div", { py: "3", hover_bgColor: "#ff0000", px: "5", hover_textColor: "white", children: "First Item" }), _jsx("div", { py: "3", hover_bgColor: "#ff0000", px: "5", hover_textColor: "white", children: "Second Item" }), _jsx("div", { py: "3", hover_bgColor: "#ff0000", px: "5", hover_textColor: "white", children: "Third Item" })] })] }));
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormRendererConfig } from "@compill/form";
|
|
2
|
-
interface TableFiltersProps {
|
|
3
|
-
form: FormRendererConfig;
|
|
4
|
-
initialValues: any;
|
|
5
|
-
schema?: any;
|
|
6
|
-
processInput?: (input: any) => any;
|
|
7
|
-
}
|
|
8
|
-
export declare function TableFilters({ form, initialValues, schema, processInput }: TableFiltersProps): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
|
-
import { useTableContext } from "@compill/table";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { useTableContainerContext } from "./TableContainerContext";
|
|
5
|
-
import { FieldLabel, FormProvider, FormRenderer, mergeInitialFormValues, SubmitButton } from "@compill/form";
|
|
6
|
-
import { Button, Collapse } from "@valerya/ui";
|
|
7
|
-
import { isEqual } from "es-toolkit";
|
|
8
|
-
export function TableFilters({ form, initialValues, schema, processInput }) {
|
|
9
|
-
const { showFilters } = useTableContainerContext();
|
|
10
|
-
const { getFilters, setFilters } = useTableContext();
|
|
11
|
-
const handleSubmit = React.useCallback((values, actions) => {
|
|
12
|
-
const params = processInput?.(values) ?? values;
|
|
13
|
-
if (!isEqual(params, getFilters()))
|
|
14
|
-
setFilters(params);
|
|
15
|
-
// setFilters(processInput?.(values) ?? values)
|
|
16
|
-
actions.setSubmitting(false);
|
|
17
|
-
}, [setFilters, processInput]);
|
|
18
|
-
const handleReset = React.useCallback((resetForm) => {
|
|
19
|
-
setFilters(initialValues);
|
|
20
|
-
resetForm();
|
|
21
|
-
}, [setFilters, initialValues]);
|
|
22
|
-
React.useEffect(() => setFilters(initialValues), []);
|
|
23
|
-
return (_jsx(Collapse, { in: showFilters, style: { overflow: showFilters ? "initial" : "hidden" }, children: _jsx("div", { p: "8", borderT: "px", borderB: "px", borderColor: "slate-100", children: _jsx(FormProvider, { initialValues: mergeInitialFormValues(getFilters(), initialValues), onSubmit: handleSubmit, validationSchema: schema, enableReinitialize: true, children: (props) => (_jsxs("div", { dflex: true, gap: "3", placeContent: "start", children: [_jsx(FormRenderer, { flexRow: true, w: "auto", form: form }), _jsx(Buttons, { handleReset: () => handleReset(props.resetForm) })] })) }) }) }));
|
|
24
|
-
}
|
|
25
|
-
function Buttons({ handleReset }) {
|
|
26
|
-
return (_jsxs("div", { dflex: true, gap: "3", children: [_jsxs("div", { dflex: true, flexCol: true, children: [_jsx(FieldLabel, { name: "", label: "\u00A0" }), _jsx(SubmitButton, { children: "Filter" })] }), _jsxs("div", { dflex: true, flexCol: true, children: [_jsx(FieldLabel, { name: "", label: "\u00A0" }), _jsx(Button, { scheme: "neutral", onClick: handleReset, children: "Reset" })] })] }));
|
|
27
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
|
-
import { useTableContext } from "@compill/table";
|
|
3
|
-
import { Collapse } from "@valerya/ui";
|
|
4
|
-
import { ActionButton } from "../json/buttons/ActionButton";
|
|
5
|
-
export function TableMassActions({ actions }) {
|
|
6
|
-
const { ids } = useTableContext();
|
|
7
|
-
const showMassActions = ids && ids.length > 0;
|
|
8
|
-
return (_jsx(Collapse, { in: showMassActions, style: { overflow: showMassActions ? "initial" : "hidden" }, children: _jsx("div", { dflex: true, gap: "3", flexWrap: true, alignItems: "center", px: "8", pt: "5", children: actions.map((action, index) => (_jsx("div", { children: action.type == "button" && !action.showConfirmationDialog && (_jsx(ActionButton, { label: action.label, queryFn: action.queryFn, queryKey: action.queryKey, buttonProps: action.buttonProps })) }, index))) }) }));
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ParentComponent, SoperioComponent } from "@soperio/react";
|
|
2
|
-
interface TableRowActionBarProps extends SoperioComponent, ParentComponent {
|
|
3
|
-
publishId?: string;
|
|
4
|
-
viewPath?: string;
|
|
5
|
-
navigatePath?: string;
|
|
6
|
-
editDialog?: (onClose: () => void) => React.ReactNode;
|
|
7
|
-
deleteDialog?: (onClose: () => void) => React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare function TableRowActionBar({ publishId, viewPath, navigatePath, editDialog, deleteDialog, children, ...props }: TableRowActionBarProps): JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
|
-
import { TableRowViewButton } from "./TableRowViewButton";
|
|
3
|
-
import { TableRowNavigateButton } from "./TableRowNavigateButton";
|
|
4
|
-
import { TableRowEditButton } from "./TableRowEditButton";
|
|
5
|
-
import { TableRowDeleteButton } from "./TableRowDeleteButton";
|
|
6
|
-
export function TableRowActionBar({ publishId, viewPath, navigatePath, editDialog, deleteDialog, children, ...props }) {
|
|
7
|
-
return (_jsxs("div", { dflex: true, spaceX: "1", placeContent: "end", ...props, children: [viewPath && _jsx(TableRowViewButton, { path: viewPath }), navigatePath && _jsx(TableRowNavigateButton, { path: navigatePath }), editDialog && _jsx(TableRowEditButton, { buildDialog: editDialog }), deleteDialog && _jsx(TableRowDeleteButton, { buildDialog: deleteDialog }), children] }));
|
|
8
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
|
-
import { Button, Icon } from "@valerya/ui";
|
|
3
|
-
export function TableRowActionButton({ icon, children, ...props }) {
|
|
4
|
-
return (_jsxs(Button, { dflex: true, alignContent: "center", placeContent: "center", py: "2.5", px: "3", h: "full", size: "lg", variant: "borderless", corners: "square", gap: "2", ...props, children: [icon && _jsx(Icon, { path: icon, size: "sm" }), children] }));
|
|
5
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
|
-
import { Icon } from "@valerya/ui";
|
|
3
|
-
import { DialogButton } from "../buttons/DialogButton";
|
|
4
|
-
export function TableRowActionDialogButton({ icon, children, ...props }) {
|
|
5
|
-
return (_jsxs(DialogButton, { dflex: true, alignContent: "center", placeContent: "center", py: "2.5", px: "3", h: "full", size: "lg", variant: "borderless", corners: "square", gap: "2", ...props, children: [icon && _jsx(Icon, { path: icon, size: "sm" }), children] }));
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
|
-
import { mdiDelete } from "@mdi/js";
|
|
3
|
-
import { TableRowActionDialogButton } from "./TableRowActionDialogButton";
|
|
4
|
-
export function TableRowDeleteButton({ children, ...props }) {
|
|
5
|
-
return _jsx(TableRowActionDialogButton, { icon: mdiDelete, ...props, children: children });
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
|
-
import { mdiPencil } from "@mdi/js";
|
|
3
|
-
import { TableRowActionDialogButton } from "./TableRowActionDialogButton";
|
|
4
|
-
export function TableRowEditButton({ children, ...props }) {
|
|
5
|
-
return (_jsx(TableRowActionDialogButton, { icon: mdiPencil, ...props, children: children }));
|
|
6
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
|
-
import { mdiEye } from "@mdi/js";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { useNavigate } from "react-router-dom";
|
|
5
|
-
import { TableRowActionButton } from "./TableRowActionButton";
|
|
6
|
-
export function TableRowNavigateButton({ path, ...props }) {
|
|
7
|
-
const navigate = useNavigate();
|
|
8
|
-
const handleClick = React.useCallback((event) => {
|
|
9
|
-
event?.preventDefault();
|
|
10
|
-
event?.stopPropagation();
|
|
11
|
-
navigate(`${path}`);
|
|
12
|
-
}, [navigate, path]);
|
|
13
|
-
return _jsx(TableRowActionButton, { icon: mdiEye, onClick: handleClick, ...props });
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { API } from "@compill/admin-api";
|
|
2
|
-
import { ButtonProps } from "@valerya/ui";
|
|
3
|
-
export declare function TableRowPublishPostButton({ id, api, status, invalidateQueryKey, ...props }: {
|
|
4
|
-
id: string;
|
|
5
|
-
api: API<any>;
|
|
6
|
-
status: "draft" | "published";
|
|
7
|
-
invalidateQueryKey?: string[];
|
|
8
|
-
} & ButtonProps): JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
|
-
import { useInvalidateParentMutation } from "@compill/api";
|
|
3
|
-
import { mdiPublish, mdiPublishOff } from "@mdi/js";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { toast } from "react-toastify";
|
|
6
|
-
import { TableRowActionButton } from "./TableRowActionButton";
|
|
7
|
-
export function TableRowPublishPostButton({ id, api, status, invalidateQueryKey, ...props }) {
|
|
8
|
-
const isDraft = status == "draft";
|
|
9
|
-
const mutation = useInvalidateParentMutation(isDraft ? api.publish : api.unpublish, invalidateQueryKey ?? api.queryKey, { networkMode: "always" });
|
|
10
|
-
const publish = React.useCallback((event) => {
|
|
11
|
-
event?.preventDefault();
|
|
12
|
-
event?.stopPropagation();
|
|
13
|
-
mutation.reset();
|
|
14
|
-
mutation.mutateAsync(id)
|
|
15
|
-
.then(() => toast.success(isDraft ? "Published!" : "Unpublished!"))
|
|
16
|
-
.catch(error => toast.error(`Error: ${error}`));
|
|
17
|
-
}, [mutation, id]);
|
|
18
|
-
return (_jsx(TableRowActionButton, { icon: isDraft ? mdiPublish : mdiPublishOff, onClick: publish, ...props }));
|
|
19
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
|
-
import { mdiOpenInNew } from "@mdi/js";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { TableRowActionButton } from "./TableRowActionButton";
|
|
5
|
-
import { AppEnv } from "@compill/env";
|
|
6
|
-
export function TableRowViewButton({ path, ...props }) {
|
|
7
|
-
const openPage = React.useCallback((event) => {
|
|
8
|
-
event?.preventDefault();
|
|
9
|
-
event?.stopPropagation();
|
|
10
|
-
window.open(`${AppEnv.websiteUrl()}/${path}`, '_blank');
|
|
11
|
-
}, [path]);
|
|
12
|
-
return _jsx(TableRowActionButton, { icon: mdiOpenInNew, onClick: openPage, ...props });
|
|
13
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ParentComponent, SoperioComponent } from "@soperio/react";
|
|
2
|
-
import { Breadcrumb, QueryBreadcrumbs } from "../breadcrumbs/BreadCrumbs";
|
|
3
|
-
interface TableTopBarProps extends SoperioComponent, ParentComponent {
|
|
4
|
-
title?: string;
|
|
5
|
-
breadcrumbs?: Breadcrumb[] | QueryBreadcrumbs;
|
|
6
|
-
}
|
|
7
|
-
export declare function TableTopBar({ title, breadcrumbs, children, ...props }: TableTopBarProps): JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
|
-
import { Breadcrumbs } from "../breadcrumbs/BreadCrumbs";
|
|
3
|
-
export function TableTopBar({ title, breadcrumbs, children, ...props }) {
|
|
4
|
-
return (_jsxs("div", { dflex: true, flexRow: true, alignItems: "center", gap: "3", p: "8", ...props, children: [_jsxs("div", { children: [title && _jsx("h2", { textSize: "x2", fontWeight: "600", textColor: "#3f4254", textTransform: "capitalize", children: title }), breadcrumbs && _jsx(Breadcrumbs, { breadcrumbs: breadcrumbs })] }), _jsx("div", { flexGrow: true, children: "\u00A0" }), children] }));
|
|
5
|
-
}
|