@compill/admin 1.0.104 → 1.0.106

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 (165) hide show
  1. package/dist/index.cjs +2054 -0
  2. package/dist/index.d.cts +565 -0
  3. package/dist/index.d.ts +565 -50
  4. package/dist/index.js +2000 -50
  5. package/package.json +20 -16
  6. package/dist/lib/SectionTitle.d.ts +0 -2
  7. package/dist/lib/SectionTitle.js +0 -4
  8. package/dist/lib/breadcrumbs/BreadCrumbs.d.ts +0 -15
  9. package/dist/lib/breadcrumbs/BreadCrumbs.js +0 -29
  10. package/dist/lib/buttons/DialogButton.d.ts +0 -7
  11. package/dist/lib/buttons/DialogButton.js +0 -15
  12. package/dist/lib/buttons/InvalidateButton.d.ts +0 -6
  13. package/dist/lib/buttons/InvalidateButton.js +0 -11
  14. package/dist/lib/buttons/NavigateButton.d.ts +0 -4
  15. package/dist/lib/buttons/NavigateButton.js +0 -12
  16. package/dist/lib/buttons/PublishButton.d.ts +0 -9
  17. package/dist/lib/buttons/PublishButton.js +0 -17
  18. package/dist/lib/buttons/UpdateButton.d.ts +0 -2
  19. package/dist/lib/buttons/UpdateButton.js +0 -11
  20. package/dist/lib/buttons/ViewButton.d.ts +0 -5
  21. package/dist/lib/buttons/ViewButton.js +0 -13
  22. package/dist/lib/cells/OrderCell.d.ts +0 -11
  23. package/dist/lib/cells/OrderCell.js +0 -26
  24. package/dist/lib/json/DetailsView.d.ts +0 -5
  25. package/dist/lib/json/DetailsView.js +0 -69
  26. package/dist/lib/json/EditItemView.d.ts +0 -2
  27. package/dist/lib/json/EditItemView.js +0 -6
  28. package/dist/lib/json/MultiQueryWrapper.d.ts +0 -5
  29. package/dist/lib/json/MultiQueryWrapper.js +0 -61
  30. package/dist/lib/json/QueryWrapper.d.ts +0 -6
  31. package/dist/lib/json/QueryWrapper.js +0 -29
  32. package/dist/lib/json/ScreenRenderer.d.ts +0 -6
  33. package/dist/lib/json/ScreenRenderer.js +0 -19
  34. package/dist/lib/json/ScreenTopBar.d.ts +0 -15
  35. package/dist/lib/json/ScreenTopBar.js +0 -18
  36. package/dist/lib/json/TabbedView.d.ts +0 -3
  37. package/dist/lib/json/TabbedView.js +0 -21
  38. package/dist/lib/json/buttons/ActionButton.d.ts +0 -14
  39. package/dist/lib/json/buttons/ActionButton.js +0 -11
  40. package/dist/lib/json/buttons/ConfirmationActionButton.d.ts +0 -26
  41. package/dist/lib/json/buttons/ConfirmationActionButton.js +0 -20
  42. package/dist/lib/json/dialog/DialogRenderer.d.ts +0 -11
  43. package/dist/lib/json/dialog/DialogRenderer.js +0 -14
  44. package/dist/lib/json/dialog/ItemDeleteDialog.d.ts +0 -17
  45. package/dist/lib/json/dialog/ItemDeleteDialog.js +0 -14
  46. package/dist/lib/json/dialog/ItemEditDialog.d.ts +0 -32
  47. package/dist/lib/json/dialog/ItemEditDialog.js +0 -77
  48. package/dist/lib/json/dialog/MultiQueryWrapperDialog.d.ts +0 -7
  49. package/dist/lib/json/dialog/MultiQueryWrapperDialog.js +0 -23
  50. package/dist/lib/json/dialog/QueryWrapperDialog.d.ts +0 -13
  51. package/dist/lib/json/dialog/QueryWrapperDialog.js +0 -20
  52. package/dist/lib/json/table/RefreshButton.d.ts +0 -3
  53. package/dist/lib/json/table/RefreshButton.js +0 -11
  54. package/dist/lib/json/table/TableRowActionsView.d.ts +0 -11
  55. package/dist/lib/json/table/TableRowActionsView.js +0 -36
  56. package/dist/lib/json/table/TableRowPublishPostButton.d.ts +0 -8
  57. package/dist/lib/json/table/TableRowPublishPostButton.js +0 -20
  58. package/dist/lib/json/table/TableView.d.ts +0 -3
  59. package/dist/lib/json/table/TableView.js +0 -65
  60. package/dist/lib/json/table/TableViewContext.d.ts +0 -14
  61. package/dist/lib/json/table/TableViewContext.js +0 -58
  62. package/dist/lib/json/table/useTableProps.d.ts +0 -3
  63. package/dist/lib/json/table/useTableProps.js +0 -57
  64. package/dist/lib/json/types/DetailsView.d.ts +0 -57
  65. package/dist/lib/json/types/DetailsView.js +0 -1
  66. package/dist/lib/json/types/EditItemDialog.d.ts +0 -4
  67. package/dist/lib/json/types/EditItemDialog.js +0 -1
  68. package/dist/lib/json/types/MultiQueryWrapper.d.ts +0 -18
  69. package/dist/lib/json/types/MultiQueryWrapper.js +0 -1
  70. package/dist/lib/json/types/MultiQueryWrapperDialog.d.ts +0 -13
  71. package/dist/lib/json/types/MultiQueryWrapperDialog.js +0 -1
  72. package/dist/lib/json/types/QueryWrapper.d.ts +0 -27
  73. package/dist/lib/json/types/QueryWrapper.js +0 -1
  74. package/dist/lib/json/types/QueryWrapperDialog.d.ts +0 -22
  75. package/dist/lib/json/types/QueryWrapperDialog.js +0 -1
  76. package/dist/lib/json/types/ScreenConfig.d.ts +0 -8
  77. package/dist/lib/json/types/ScreenConfig.js +0 -1
  78. package/dist/lib/json/types/TabbedView.d.ts +0 -22
  79. package/dist/lib/json/types/TabbedView.js +0 -1
  80. package/dist/lib/json/types/TableView.d.ts +0 -117
  81. package/dist/lib/json/types/TableView.js +0 -1
  82. package/dist/lib/layout/AdminLayout.d.ts +0 -13
  83. package/dist/lib/layout/AdminLayout.js +0 -15
  84. package/dist/lib/layout/ButtonBar.d.ts +0 -19
  85. package/dist/lib/layout/ButtonBar.js +0 -19
  86. package/dist/lib/layout/Content.d.ts +0 -9
  87. package/dist/lib/layout/Content.js +0 -9
  88. package/dist/lib/layout/PageTitleBar.d.ts +0 -6
  89. package/dist/lib/layout/PageTitleBar.js +0 -4
  90. package/dist/lib/layout/Sidebar.d.ts +0 -20
  91. package/dist/lib/layout/Sidebar.js +0 -12
  92. package/dist/lib/layout/menu/Menu.d.ts +0 -12
  93. package/dist/lib/layout/menu/Menu.js +0 -23
  94. package/dist/lib/layout/menu/MenuButton.d.ts +0 -6
  95. package/dist/lib/layout/menu/MenuButton.js +0 -5
  96. package/dist/lib/layout/menu/MenuConfig.d.ts +0 -13
  97. package/dist/lib/layout/menu/MenuConfig.js +0 -1
  98. package/dist/lib/layout/menu/MenuItem.d.ts +0 -11
  99. package/dist/lib/layout/menu/MenuItem.js +0 -11
  100. package/dist/lib/layout/menu/NextMenuItem.d.ts +0 -11
  101. package/dist/lib/layout/menu/NextMenuItem.js +0 -11
  102. package/dist/lib/layout/menu/SelectedIndicator.d.ts +0 -3
  103. package/dist/lib/layout/menu/SelectedIndicator.js +0 -4
  104. package/dist/lib/layout/menu/UserBlock.d.ts +0 -9
  105. package/dist/lib/layout/menu/UserBlock.js +0 -34
  106. package/dist/lib/modal/AttachDialog.d.ts +0 -30
  107. package/dist/lib/modal/AttachDialog.js +0 -73
  108. package/dist/lib/modal/FormActionDialog.d.ts +0 -23
  109. package/dist/lib/modal/FormActionDialog.js +0 -20
  110. package/dist/lib/page/PageContainer.d.ts +0 -2
  111. package/dist/lib/page/PageContainer.js +0 -5
  112. package/dist/lib/page/PageContentEditor.d.ts +0 -4
  113. package/dist/lib/page/PageContentEditor.js +0 -10
  114. package/dist/lib/page/PageMain.d.ts +0 -2
  115. package/dist/lib/page/PageMain.js +0 -5
  116. package/dist/lib/page/PageQueryStateContainer.d.ts +0 -21
  117. package/dist/lib/page/PageQueryStateContainer.js +0 -16
  118. package/dist/lib/page/PageSectionTitle.d.ts +0 -2
  119. package/dist/lib/page/PageSectionTitle.js +0 -4
  120. package/dist/lib/page/PageSidebar.d.ts +0 -2
  121. package/dist/lib/page/PageSidebar.js +0 -4
  122. package/dist/lib/page/PageSidebarSection.d.ts +0 -4
  123. package/dist/lib/page/PageSidebarSection.js +0 -5
  124. package/dist/lib/page/PageStateContainer.d.ts +0 -7
  125. package/dist/lib/page/PageStateContainer.js +0 -7
  126. package/dist/lib/page/PageSubSectionTitle.d.ts +0 -2
  127. package/dist/lib/page/PageSubSectionTitle.js +0 -4
  128. package/dist/lib/page/PageTitle.d.ts +0 -2
  129. package/dist/lib/page/PageTitle.js +0 -4
  130. package/dist/lib/page/PageTopBar.d.ts +0 -13
  131. package/dist/lib/page/PageTopBar.js +0 -78
  132. package/dist/lib/status/StatusBadge.d.ts +0 -4
  133. package/dist/lib/status/StatusBadge.js +0 -21
  134. package/dist/lib/table/TableColumnButton.d.ts +0 -1
  135. package/dist/lib/table/TableColumnButton.js +0 -53
  136. package/dist/lib/table/TableContainer.d.ts +0 -10
  137. package/dist/lib/table/TableContainer.js +0 -6
  138. package/dist/lib/table/TableContainerContext.d.ts +0 -18
  139. package/dist/lib/table/TableContainerContext.js +0 -40
  140. package/dist/lib/table/TableCreateButton.d.ts +0 -4
  141. package/dist/lib/table/TableCreateButton.js +0 -7
  142. package/dist/lib/table/TableFilterButton.d.ts +0 -2
  143. package/dist/lib/table/TableFilterButton.js +0 -8
  144. package/dist/lib/table/TableFilters.d.ts +0 -9
  145. package/dist/lib/table/TableFilters.js +0 -27
  146. package/dist/lib/table/TableMassActions.d.ts +0 -6
  147. package/dist/lib/table/TableMassActions.js +0 -9
  148. package/dist/lib/table/TableRowActionBar.d.ts +0 -10
  149. package/dist/lib/table/TableRowActionBar.js +0 -8
  150. package/dist/lib/table/TableRowActionButton.d.ts +0 -4
  151. package/dist/lib/table/TableRowActionButton.js +0 -5
  152. package/dist/lib/table/TableRowActionDialogButton.d.ts +0 -4
  153. package/dist/lib/table/TableRowActionDialogButton.js +0 -6
  154. package/dist/lib/table/TableRowDeleteButton.d.ts +0 -2
  155. package/dist/lib/table/TableRowDeleteButton.js +0 -6
  156. package/dist/lib/table/TableRowEditButton.d.ts +0 -2
  157. package/dist/lib/table/TableRowEditButton.js +0 -6
  158. package/dist/lib/table/TableRowNavigateButton.d.ts +0 -4
  159. package/dist/lib/table/TableRowNavigateButton.js +0 -14
  160. package/dist/lib/table/TableRowPublishPostButton.d.ts +0 -8
  161. package/dist/lib/table/TableRowPublishPostButton.js +0 -19
  162. package/dist/lib/table/TableRowViewButton.d.ts +0 -4
  163. package/dist/lib/table/TableRowViewButton.js +0 -13
  164. package/dist/lib/table/TableTopBar.d.ts +0 -8
  165. 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.js";
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,6 +0,0 @@
1
- import { MassAction } from "../json/types/TableView.js";
2
- interface TableMassActionsProps {
3
- actions: MassAction[];
4
- }
5
- export declare function TableMassActions({ actions }: TableMassActionsProps): JSX.Element;
6
- export {};
@@ -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.js";
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.js";
3
- import { TableRowNavigateButton } from "./TableRowNavigateButton.js";
4
- import { TableRowEditButton } from "./TableRowEditButton.js";
5
- import { TableRowDeleteButton } from "./TableRowDeleteButton.js";
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,4 +0,0 @@
1
- import { ButtonProps } from "@valerya/ui";
2
- export declare function TableRowActionButton({ icon, children, ...props }: {
3
- icon?: string;
4
- } & ButtonProps): JSX.Element;
@@ -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,4 +0,0 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton.js";
2
- export declare function TableRowActionDialogButton({ icon, children, ...props }: {
3
- icon?: string;
4
- } & DialogButtonProps): JSX.Element;
@@ -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.js";
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,2 +0,0 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton.js";
2
- export declare function TableRowDeleteButton({ children, ...props }: DialogButtonProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "@soperio/jsx-runtime";
2
- import { mdiDelete } from "@mdi/js";
3
- import { TableRowActionDialogButton } from "./TableRowActionDialogButton.js";
4
- export function TableRowDeleteButton({ children, ...props }) {
5
- return _jsx(TableRowActionDialogButton, { icon: mdiDelete, ...props, children: children });
6
- }
@@ -1,2 +0,0 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton.js";
2
- export declare function TableRowEditButton({ children, ...props }: DialogButtonProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "@soperio/jsx-runtime";
2
- import { mdiPencil } from "@mdi/js";
3
- import { TableRowActionDialogButton } from "./TableRowActionDialogButton.js";
4
- export function TableRowEditButton({ children, ...props }) {
5
- return (_jsx(TableRowActionDialogButton, { icon: mdiPencil, ...props, children: children }));
6
- }
@@ -1,4 +0,0 @@
1
- import { ButtonProps } from "@valerya/ui";
2
- export declare function TableRowNavigateButton({ path, ...props }: {
3
- path: string;
4
- } & ButtonProps): JSX.Element;
@@ -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.js";
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.js";
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,4 +0,0 @@
1
- import { ButtonProps } from "@valerya/ui";
2
- export declare function TableRowViewButton({ path, ...props }: {
3
- path: string;
4
- } & ButtonProps): JSX.Element;
@@ -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.js";
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.js";
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.js";
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
- }