@compill/admin 1.0.103 → 1.0.104

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 (84) hide show
  1. package/dist/index.d.ts +50 -50
  2. package/dist/index.js +50 -50
  3. package/dist/lib/buttons/InvalidateButton.d.ts +1 -1
  4. package/dist/lib/buttons/InvalidateButton.js +1 -1
  5. package/dist/lib/buttons/PublishButton.js +1 -1
  6. package/dist/lib/buttons/UpdateButton.js +1 -1
  7. package/dist/lib/buttons/ViewButton.d.ts +1 -1
  8. package/dist/lib/buttons/ViewButton.js +1 -1
  9. package/dist/lib/json/DetailsView.d.ts +1 -1
  10. package/dist/lib/json/DetailsView.js +6 -6
  11. package/dist/lib/json/EditItemView.d.ts +1 -1
  12. package/dist/lib/json/EditItemView.js +1 -1
  13. package/dist/lib/json/MultiQueryWrapper.d.ts +1 -1
  14. package/dist/lib/json/MultiQueryWrapper.js +1 -1
  15. package/dist/lib/json/QueryWrapper.d.ts +1 -1
  16. package/dist/lib/json/QueryWrapper.js +1 -1
  17. package/dist/lib/json/ScreenRenderer.d.ts +1 -1
  18. package/dist/lib/json/ScreenRenderer.js +5 -5
  19. package/dist/lib/json/ScreenTopBar.d.ts +2 -2
  20. package/dist/lib/json/ScreenTopBar.js +6 -6
  21. package/dist/lib/json/TabbedView.d.ts +1 -1
  22. package/dist/lib/json/TabbedView.js +3 -3
  23. package/dist/lib/json/dialog/DialogRenderer.d.ts +3 -3
  24. package/dist/lib/json/dialog/DialogRenderer.js +3 -3
  25. package/dist/lib/json/dialog/MultiQueryWrapperDialog.d.ts +1 -1
  26. package/dist/lib/json/dialog/MultiQueryWrapperDialog.js +1 -1
  27. package/dist/lib/json/dialog/QueryWrapperDialog.d.ts +2 -2
  28. package/dist/lib/json/dialog/QueryWrapperDialog.js +1 -1
  29. package/dist/lib/json/table/RefreshButton.js +1 -1
  30. package/dist/lib/json/table/TableRowActionsView.d.ts +1 -1
  31. package/dist/lib/json/table/TableRowActionsView.js +1 -1
  32. package/dist/lib/json/table/TableView.d.ts +1 -1
  33. package/dist/lib/json/table/TableView.js +13 -13
  34. package/dist/lib/json/table/TableViewContext.d.ts +1 -1
  35. package/dist/lib/json/table/TableViewContext.js +2 -2
  36. package/dist/lib/json/table/useTableProps.d.ts +1 -1
  37. package/dist/lib/json/table/useTableProps.js +2 -2
  38. package/dist/lib/json/types/DetailsView.d.ts +1 -1
  39. package/dist/lib/json/types/EditItemDialog.d.ts +1 -1
  40. package/dist/lib/json/types/MultiQueryWrapper.d.ts +3 -3
  41. package/dist/lib/json/types/MultiQueryWrapperDialog.d.ts +1 -1
  42. package/dist/lib/json/types/QueryWrapper.d.ts +3 -3
  43. package/dist/lib/json/types/QueryWrapperDialog.d.ts +1 -1
  44. package/dist/lib/json/types/ScreenConfig.d.ts +6 -6
  45. package/dist/lib/json/types/TabbedView.d.ts +5 -5
  46. package/dist/lib/json/types/TableView.d.ts +4 -4
  47. package/dist/lib/layout/AdminLayout.d.ts +1 -1
  48. package/dist/lib/layout/AdminLayout.js +2 -2
  49. package/dist/lib/layout/ButtonBar.d.ts +1 -1
  50. package/dist/lib/layout/ButtonBar.js +1 -1
  51. package/dist/lib/layout/Sidebar.d.ts +1 -1
  52. package/dist/lib/layout/Sidebar.js +2 -2
  53. package/dist/lib/layout/menu/Menu.d.ts +1 -1
  54. package/dist/lib/layout/menu/Menu.js +2 -2
  55. package/dist/lib/layout/menu/MenuItem.d.ts +1 -1
  56. package/dist/lib/layout/menu/MenuItem.js +2 -2
  57. package/dist/lib/layout/menu/NextMenuItem.d.ts +1 -1
  58. package/dist/lib/layout/menu/NextMenuItem.js +2 -2
  59. package/dist/lib/layout/menu/UserBlock.d.ts +1 -1
  60. package/dist/lib/page/PageContentEditor.js +1 -1
  61. package/dist/lib/page/PageQueryStateContainer.js +1 -1
  62. package/dist/lib/page/PageSidebarSection.js +1 -1
  63. package/dist/lib/page/PageTopBar.d.ts +1 -1
  64. package/dist/lib/page/PageTopBar.js +2 -2
  65. package/dist/lib/table/TableColumnButton.js +1 -1
  66. package/dist/lib/table/TableContainer.js +1 -1
  67. package/dist/lib/table/TableCreateButton.d.ts +1 -1
  68. package/dist/lib/table/TableCreateButton.js +1 -1
  69. package/dist/lib/table/TableFilters.js +1 -1
  70. package/dist/lib/table/TableMassActions.d.ts +1 -1
  71. package/dist/lib/table/TableMassActions.js +1 -1
  72. package/dist/lib/table/TableRowActionBar.js +4 -4
  73. package/dist/lib/table/TableRowActionDialogButton.d.ts +1 -1
  74. package/dist/lib/table/TableRowActionDialogButton.js +1 -1
  75. package/dist/lib/table/TableRowDeleteButton.d.ts +1 -1
  76. package/dist/lib/table/TableRowDeleteButton.js +1 -1
  77. package/dist/lib/table/TableRowEditButton.d.ts +1 -1
  78. package/dist/lib/table/TableRowEditButton.js +1 -1
  79. package/dist/lib/table/TableRowNavigateButton.js +1 -1
  80. package/dist/lib/table/TableRowPublishPostButton.js +1 -1
  81. package/dist/lib/table/TableRowViewButton.js +1 -1
  82. package/dist/lib/table/TableTopBar.d.ts +1 -1
  83. package/dist/lib/table/TableTopBar.js +1 -1
  84. package/package.json +17 -17
@@ -1,7 +1,7 @@
1
1
  import { CRUDAPI } from "@compill/api";
2
- import { DetailsViewConfig } from "./DetailsView";
3
- import { TabbedViewConfig } from "./TabbedView";
4
- import { TableViewConfig } from "./TableView";
2
+ import { DetailsViewConfig } from "./DetailsView.js";
3
+ import { TabbedViewConfig } from "./TabbedView.js";
4
+ import { TableViewConfig } from "./TableView.js";
5
5
  type SubScreen = TableViewConfig | DetailsViewConfig | TabbedViewConfig;
6
6
  export type QueryDef = {
7
7
  api: CRUDAPI<any> | ((id: string) => CRUDAPI<any>);
@@ -1,5 +1,5 @@
1
1
  import { CRUDAPI } from "@compill/api";
2
- import { EditItemDialogConfig } from "./EditItemDialog";
2
+ import { EditItemDialogConfig } from "./EditItemDialog.js";
3
3
  export type QueryDef = {
4
4
  api: CRUDAPI<any>;
5
5
  fn: "get" | "getAll";
@@ -1,7 +1,7 @@
1
1
  import { CRUDAPI, CRUD_MODEL } from "@compill/api";
2
- import { DetailsViewConfig } from "./DetailsView";
3
- import { TabbedViewConfig } from "./TabbedView";
4
- import { TableViewConfig } from "./TableView";
2
+ import { DetailsViewConfig } from "./DetailsView.js";
3
+ import { TabbedViewConfig } from "./TabbedView.js";
4
+ import { TableViewConfig } from "./TableView.js";
5
5
  type SubScreen<T extends CRUD_MODEL, U> = TableViewConfig | DetailsViewConfig | TabbedViewConfig | QueryWrapperConfig<T, U>;
6
6
  export type QueryWrapperConfig<T extends CRUD_MODEL, U = T> = {
7
7
  type: "query";
@@ -1,5 +1,5 @@
1
1
  import { CRUDAPI, CRUD_MODEL } from "@compill/api";
2
- import { EditItemDialogConfig } from "./EditItemDialog";
2
+ import { EditItemDialogConfig } from "./EditItemDialog.js";
3
3
  export type QueryWrapperDialogConfig<T extends CRUD_MODEL, U = T> = {
4
4
  type: "query";
5
5
  api: CRUDAPI<any>;
@@ -1,8 +1,8 @@
1
- import { ItemEditDialogProps } from "../dialog/ItemEditDialog";
2
- import { DetailsViewConfig } from "./DetailsView";
3
- import { MultiQueryWrapperConfig } from "./MultiQueryWrapper";
4
- import { QueryWrapperConfig } from "./QueryWrapper";
5
- import { TabbedViewConfig } from "./TabbedView";
6
- import { TableViewConfig } from "./TableView";
1
+ import { ItemEditDialogProps } from "../dialog/ItemEditDialog.js";
2
+ import { DetailsViewConfig } from "./DetailsView.js";
3
+ import { MultiQueryWrapperConfig } from "./MultiQueryWrapper.js";
4
+ import { QueryWrapperConfig } from "./QueryWrapper.js";
5
+ import { TabbedViewConfig } from "./TabbedView.js";
6
+ import { TableViewConfig } from "./TableView.js";
7
7
  export type ScreenConfig = TableViewConfig | DetailsViewConfig | TabbedViewConfig | QueryWrapperConfig<any, any> | MultiQueryWrapperConfig;
8
8
  export type TableViewEditItem = Omit<ItemEditDialogProps, "show" | "onClose">;
@@ -1,9 +1,9 @@
1
1
  import { CRUDAPI } from "@compill/api";
2
- import { Breadcrumb } from "../../breadcrumbs/BreadCrumbs";
3
- import { DetailsViewConfig } from "./DetailsView";
4
- import { QueryWrapperConfig } from "./QueryWrapper";
5
- import { TableViewConfig } from "./TableView";
6
- import { MultiQueryWrapperConfig } from "./MultiQueryWrapper";
2
+ import { Breadcrumb } from "../../breadcrumbs/BreadCrumbs.js";
3
+ import { DetailsViewConfig } from "./DetailsView.js";
4
+ import { QueryWrapperConfig } from "./QueryWrapper.js";
5
+ import { TableViewConfig } from "./TableView.js";
6
+ import { MultiQueryWrapperConfig } from "./MultiQueryWrapper.js";
7
7
  export type TabbedViewConfig<T extends any = any> = {
8
8
  type: "tabbed";
9
9
  queryField: string;
@@ -2,10 +2,10 @@ import { API } from "@compill/admin-api";
2
2
  import { FormRendererConfig } from "@compill/form";
3
3
  import { TableProps } from "@compill/table";
4
4
  import { ButtonProps, ModalProps } from "@valerya/ui";
5
- import { Breadcrumb, QueryBreadcrumbs } from "../../breadcrumbs/BreadCrumbs";
6
- import { ItemDeleteDialogProps } from "../dialog/ItemDeleteDialog";
7
- import { EditItemDialogConfig } from "./EditItemDialog";
8
- import { QueryWrapperDialogConfig } from "./QueryWrapperDialog";
5
+ import { Breadcrumb, QueryBreadcrumbs } from "../../breadcrumbs/BreadCrumbs.js";
6
+ import { ItemDeleteDialogProps } from "../dialog/ItemDeleteDialog.js";
7
+ import { EditItemDialogConfig } from "./EditItemDialog.js";
8
+ import { QueryWrapperDialogConfig } from "./QueryWrapperDialog.js";
9
9
  import * as Yup from "yup";
10
10
  import { MutationQueryFn, MutationQueryKey } from "@compill/api";
11
11
  export type TableViewScreen = {
@@ -1,5 +1,5 @@
1
1
  import { Color, ParentComponent, SoperioComponent } from "@soperio/react";
2
- import { MenuConfig } from "./menu/MenuConfig";
2
+ import { MenuConfig } from "./menu/MenuConfig.js";
3
3
  interface LayoutProps extends SoperioComponent, ParentComponent {
4
4
  color: Color;
5
5
  darkMode?: boolean;
@@ -3,8 +3,8 @@ import { useBoolean } from "@compill/hooks";
3
3
  import { mdiArrowLeft } from "@mdi/js";
4
4
  import { IconButton } from "@valerya/ui";
5
5
  import { useHotkeys } from "react-hotkeys-hook";
6
- import Content from "./Content";
7
- import { Sidebar } from "./Sidebar";
6
+ import Content from "./Content.js";
7
+ import { Sidebar } from "./Sidebar.js";
8
8
  export function AdminLayout({ color, darkMode, logo, title, menuConfig, userMenuConfig, userSettingsPath, ...props }) {
9
9
  return (_jsxs("div", { w: "full", h: "screen", dflex: true, flexRow: true, bgColor: `${color}-${darkMode ? "900" : "100"}`, ...props, children: [_jsx(LeftPanel, { color: color, darkMode: darkMode, logo: logo, title: title, menuConfig: menuConfig, userMenuConfig: userMenuConfig, userSettingsPath: userSettingsPath }), _jsx("div", { w: "screen", py: "2", pe: "2", children: _jsx(Content, { bgColor: "white", rounded: "lg", shadow: true }) })] }));
10
10
  }
@@ -1,4 +1,4 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton";
1
+ import { DialogButtonProps } from "../buttons/DialogButton.js";
2
2
  import { ParentComponent, SoperioComponent } from "@soperio/react";
3
3
  import { ButtonProps } from "@valerya/ui";
4
4
  import React from "react";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
2
- import { DialogButton } from "../buttons/DialogButton";
2
+ import { DialogButton } from "../buttons/DialogButton.js";
3
3
  import { Button, Icon } from "@valerya/ui";
4
4
  import { useFormikContext } from "formik";
5
5
  import React from "react";
@@ -1,5 +1,5 @@
1
1
  import { Color, ParentComponent, SoperioComponent } from "@soperio/react";
2
- import { MenuConfig } from "./menu/MenuConfig";
2
+ import { MenuConfig } from "./menu/MenuConfig.js";
3
3
  interface SidebarProps extends SoperioComponent, ParentComponent {
4
4
  show?: boolean;
5
5
  color: Color;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
2
2
  import { FlexCenter } from "@compill/components";
3
- import { Menu } from "./menu/Menu";
3
+ import { Menu } from "./menu/Menu.js";
4
4
  import { AppEnv } from "@compill/env";
5
5
  import Image from "next/image";
6
- import { UserBlock } from "./menu/UserBlock";
6
+ import { UserBlock } from "./menu/UserBlock.js";
7
7
  export function Sidebar({ show, logo, title, menuConfig, userMenuConfig, userSettingsPath, color, darkMode, ...props }) {
8
8
  return (_jsxs("div", { dflex: true, flexCol: true, w: "full", md_w: "64", minH: "screen", p: "0", textColor: darkMode ? "white" : "slate-800", ...props, children: [_jsxs(FlexCenter, { placeContent: "start", p: "4", font: "title", gap: "3", borderB: "px", borderBColor: "slate-900", borderOpacity: "5", children: [logo ?? _jsx(Logo, { width: 40, height: 40, darkMode: darkMode }), _jsx("h1", { textSize: "md", children: title || AppEnv.appName() })] }), _jsx(Menu, { overflowY: "auto", flexGrow: "1", p: "4", darkMode: darkMode, config: menuConfig }), _jsx("div", { p: "2", children: _jsx(UserBlock, { darkMode: darkMode, color: color, menuConfig: userMenuConfig, path: userSettingsPath }) })] }));
9
9
  }
@@ -1,5 +1,5 @@
1
1
  import { ParentComponent, SoperioComponent } from "@soperio/react";
2
- import { MenuConfig } from "./MenuConfig";
2
+ import { MenuConfig } from "./MenuConfig.js";
3
3
  export interface MenuProps extends SoperioComponent, ParentComponent {
4
4
  darkMode?: boolean;
5
5
  config: MenuConfig;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "@soperio/jsx-runtime";
2
- import { MenuItem } from "./MenuItem";
3
- import { NextMenuItem } from "./NextMenuItem";
2
+ import { MenuItem } from "./MenuItem.js";
3
+ import { NextMenuItem } from "./NextMenuItem.js";
4
4
  /**
5
5
  *
6
6
  *
@@ -1,5 +1,5 @@
1
1
  import { ParentComponent, SoperioComponent } from "@soperio/react";
2
- import { Item } from "./MenuConfig";
2
+ import { Item } from "./MenuConfig.js";
3
3
  interface MenuItemProps extends SoperioComponent, ParentComponent {
4
4
  path: string;
5
5
  depth?: number;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@soperio/jsx-runtime";
2
- import { SelectedIndicator } from "./SelectedIndicator";
2
+ import { SelectedIndicator } from "./SelectedIndicator.js";
3
3
  import { Link, useLocation, useMatch } from "react-router-dom";
4
- import { MenuButton } from "./MenuButton";
4
+ import { MenuButton } from "./MenuButton.js";
5
5
  export function MenuItem({ icon, path, depth, darkMode, subMenu, ...props }) {
6
6
  const location = useLocation();
7
7
  const selected = path == "/" ? location.pathname == "/" : location.pathname.startsWith(path.startsWith("/") ? path : `/${path}`);
@@ -1,5 +1,5 @@
1
1
  import { ParentComponent, SoperioComponent } from "@soperio/react";
2
- import { Item } from "./MenuConfig";
2
+ import { Item } from "./MenuConfig.js";
3
3
  interface NextMenuItemProps extends SoperioComponent, ParentComponent {
4
4
  path: string;
5
5
  depth?: number;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@soperio/jsx-runtime";
2
- import { MenuButton } from "./MenuButton";
3
- import { SelectedIndicator } from "./SelectedIndicator";
2
+ import { MenuButton } from "./MenuButton.js";
3
+ import { SelectedIndicator } from "./SelectedIndicator.js";
4
4
  import Link from "next/link";
5
5
  import { useRouter } from "next/router";
6
6
  export function NextMenuItem({ icon, path, depth, darkMode, subMenu, ...props }) {
@@ -1,4 +1,4 @@
1
- import { MenuConfig } from "./MenuConfig";
1
+ import { MenuConfig } from "./MenuConfig.js";
2
2
  interface UserBlockProps {
3
3
  color: string;
4
4
  darkMode?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { FormEditor } from "@compill/form-editor";
3
- import { PageMain } from "./PageMain";
3
+ import { PageMain } from "./PageMain.js";
4
4
  import { ImageExtension } from "@compill/editor";
5
5
  export function PageContentEditor({ name, ...props }) {
6
6
  const extensions = [ImageExtension];
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { QueryLoadingState, RetryOnError } from "@compill/components";
3
3
  import { useApiQuery, useInvalidateQuery } from "@compill/api";
4
4
  import React from "react";
5
- import { PageContainer } from "./PageContainer";
5
+ import { PageContainer } from "./PageContainer.js";
6
6
  function PageQueryStateContainerInner({ queryId, api, apiFn, loadingStyles, errorStyles, children, ...props }) {
7
7
  // @ts-ignore
8
8
  const { data, isLoading, isError } = apiFn == "getAll" ? useApiQuery(api.queryKey, api.getAll, props.apiParams) : useApiQuery(api.queryKey, api.get, queryId);
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
2
- import { PageSectionTitle } from "./PageSectionTitle";
2
+ import { PageSectionTitle } from "./PageSectionTitle.js";
3
3
  export function PageSidebarSection({ title, children, ...props }) {
4
4
  return (_jsxs("div", { w: "full", ...props, children: [title && _jsx(PageSectionTitle, { children: title }), children] }));
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { ParentComponent, SoperioComponent } from "@soperio/react";
2
2
  import React from "react";
3
- import { Breadcrumb, QueryBreadcrumbs } from "../breadcrumbs/BreadCrumbs";
3
+ import { Breadcrumb, QueryBreadcrumbs } from "../breadcrumbs/BreadCrumbs.js";
4
4
  export interface PageTopBarProps extends SoperioComponent, ParentComponent {
5
5
  title?: string;
6
6
  breadcrumbs?: Breadcrumb[] | QueryBreadcrumbs;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@soperio/jsx-runtime";
2
2
  import { createContext } from "@soperio/react";
3
- import { PageTitle } from "./PageTitle";
3
+ import { PageTitle } from "./PageTitle.js";
4
4
  import React from "react";
5
5
  import { createPortal } from "react-dom";
6
6
  import { FlexCenter } from "@compill/components";
7
- import { Breadcrumbs } from "../breadcrumbs/BreadCrumbs";
7
+ import { Breadcrumbs } from "../breadcrumbs/BreadCrumbs.js";
8
8
  export function PageTopBar({ title, breadcrumbs, children, ...props }) {
9
9
  return (_jsxs(FlexCenter, { gap: "3", minH: "9", ...props, children: [title && _jsx(PageTitle, { children: title }), breadcrumbs && _jsx(Breadcrumbs, { breadcrumbs: breadcrumbs }), _jsx("div", { flexGrow: true }), children] }));
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // import { mdiViewColumn } from "@mdi/js";
2
- // import { useTableContainerContext } from "./TableContainerContext";
2
+ // import { useTableContainerContext } from "./TableContainerContext.js";
3
3
  // import { ColumnDef, ColumnDefResolved } from "@tanstack/react-table";
4
4
  // import { ButtonProps } from "@valerya/ui";
5
5
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { TableContextProvider } from "@compill/table";
3
- import { TableContainerContextProvider } from "./TableContainerContext";
3
+ import { TableContainerContextProvider } from "./TableContainerContext.js";
4
4
  export function TableContainer({ initialPageSize, initialVisibleColumns, columns, filtersMethod = "reactRouter", children, ...props }) {
5
5
  return (_jsx("div", { w: "full", dflex: true, flexCol: true, ...props, children: _jsx(TableContextProvider, { initialPageSize: initialPageSize, filtersMethod: filtersMethod, children: _jsx(TableContainerContextProvider, { columns: columns, initialVisibleColumns: initialVisibleColumns, children: children }) }) }));
6
6
  }
@@ -1,4 +1,4 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton";
1
+ import { DialogButtonProps } from "../buttons/DialogButton.js";
2
2
  export declare function TableCreateButton({ icon, children, ...props }: {
3
3
  icon?: string;
4
4
  } & DialogButtonProps): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
2
2
  import { mdiPlusThick } from "@mdi/js";
3
3
  import { Icon } from "@valerya/ui";
4
- import { ButtonBarDialogButton } from "../layout/ButtonBar";
4
+ import { ButtonBarDialogButton } from "../layout/ButtonBar.js";
5
5
  export function TableCreateButton({ icon, children, ...props }) {
6
6
  return (_jsxs(ButtonBarDialogButton, { ...props, children: [_jsx(Icon, { path: icon ?? mdiPlusThick }), children] }));
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
2
2
  import { useTableContext } from "@compill/table";
3
3
  import React from "react";
4
- import { useTableContainerContext } from "./TableContainerContext";
4
+ import { useTableContainerContext } from "./TableContainerContext.js";
5
5
  import { FieldLabel, FormProvider, FormRenderer, mergeInitialFormValues, SubmitButton } from "@compill/form";
6
6
  import { Button, Collapse } from "@valerya/ui";
7
7
  import { isEqual } from "es-toolkit";
@@ -1,4 +1,4 @@
1
- import { MassAction } from "../json/types/TableView";
1
+ import { MassAction } from "../json/types/TableView.js";
2
2
  interface TableMassActionsProps {
3
3
  actions: MassAction[];
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { useTableContext } from "@compill/table";
3
3
  import { Collapse } from "@valerya/ui";
4
- import { ActionButton } from "../json/buttons/ActionButton";
4
+ import { ActionButton } from "../json/buttons/ActionButton.js";
5
5
  export function TableMassActions({ actions }) {
6
6
  const { ids } = useTableContext();
7
7
  const showMassActions = ids && ids.length > 0;
@@ -1,8 +1,8 @@
1
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";
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
6
  export function TableRowActionBar({ publishId, viewPath, navigatePath, editDialog, deleteDialog, children, ...props }) {
7
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
8
  }
@@ -1,4 +1,4 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton";
1
+ import { DialogButtonProps } from "../buttons/DialogButton.js";
2
2
  export declare function TableRowActionDialogButton({ icon, children, ...props }: {
3
3
  icon?: string;
4
4
  } & DialogButtonProps): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
2
2
  import { Icon } from "@valerya/ui";
3
- import { DialogButton } from "../buttons/DialogButton";
3
+ import { DialogButton } from "../buttons/DialogButton.js";
4
4
  export function TableRowActionDialogButton({ icon, children, ...props }) {
5
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
6
  }
@@ -1,2 +1,2 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton";
1
+ import { DialogButtonProps } from "../buttons/DialogButton.js";
2
2
  export declare function TableRowDeleteButton({ children, ...props }: DialogButtonProps): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { mdiDelete } from "@mdi/js";
3
- import { TableRowActionDialogButton } from "./TableRowActionDialogButton";
3
+ import { TableRowActionDialogButton } from "./TableRowActionDialogButton.js";
4
4
  export function TableRowDeleteButton({ children, ...props }) {
5
5
  return _jsx(TableRowActionDialogButton, { icon: mdiDelete, ...props, children: children });
6
6
  }
@@ -1,2 +1,2 @@
1
- import { DialogButtonProps } from "../buttons/DialogButton";
1
+ import { DialogButtonProps } from "../buttons/DialogButton.js";
2
2
  export declare function TableRowEditButton({ children, ...props }: DialogButtonProps): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { mdiPencil } from "@mdi/js";
3
- import { TableRowActionDialogButton } from "./TableRowActionDialogButton";
3
+ import { TableRowActionDialogButton } from "./TableRowActionDialogButton.js";
4
4
  export function TableRowEditButton({ children, ...props }) {
5
5
  return (_jsx(TableRowActionDialogButton, { icon: mdiPencil, ...props, children: children }));
6
6
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { mdiEye } from "@mdi/js";
3
3
  import React from "react";
4
4
  import { useNavigate } from "react-router-dom";
5
- import { TableRowActionButton } from "./TableRowActionButton";
5
+ import { TableRowActionButton } from "./TableRowActionButton.js";
6
6
  export function TableRowNavigateButton({ path, ...props }) {
7
7
  const navigate = useNavigate();
8
8
  const handleClick = React.useCallback((event) => {
@@ -3,7 +3,7 @@ import { useInvalidateParentMutation } from "@compill/api";
3
3
  import { mdiPublish, mdiPublishOff } from "@mdi/js";
4
4
  import React from "react";
5
5
  import { toast } from "react-toastify";
6
- import { TableRowActionButton } from "./TableRowActionButton";
6
+ import { TableRowActionButton } from "./TableRowActionButton.js";
7
7
  export function TableRowPublishPostButton({ id, api, status, invalidateQueryKey, ...props }) {
8
8
  const isDraft = status == "draft";
9
9
  const mutation = useInvalidateParentMutation(isDraft ? api.publish : api.unpublish, invalidateQueryKey ?? api.queryKey, { networkMode: "always" });
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "@soperio/jsx-runtime";
2
2
  import { mdiOpenInNew } from "@mdi/js";
3
3
  import React from "react";
4
- import { TableRowActionButton } from "./TableRowActionButton";
4
+ import { TableRowActionButton } from "./TableRowActionButton.js";
5
5
  import { AppEnv } from "@compill/env";
6
6
  export function TableRowViewButton({ path, ...props }) {
7
7
  const openPage = React.useCallback((event) => {
@@ -1,5 +1,5 @@
1
1
  import { ParentComponent, SoperioComponent } from "@soperio/react";
2
- import { Breadcrumb, QueryBreadcrumbs } from "../breadcrumbs/BreadCrumbs";
2
+ import { Breadcrumb, QueryBreadcrumbs } from "../breadcrumbs/BreadCrumbs.js";
3
3
  interface TableTopBarProps extends SoperioComponent, ParentComponent {
4
4
  title?: string;
5
5
  breadcrumbs?: Breadcrumb[] | QueryBreadcrumbs;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
2
- import { Breadcrumbs } from "../breadcrumbs/BreadCrumbs";
2
+ import { Breadcrumbs } from "../breadcrumbs/BreadCrumbs.js";
3
3
  export function TableTopBar({ title, breadcrumbs, children, ...props }) {
4
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
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compill/admin",
3
- "version": "1.0.103",
3
+ "version": "1.0.104",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -15,8 +15,8 @@
15
15
  "typescript": "5.9.2",
16
16
  "@types/react": "^18.3.1",
17
17
  "@types/react-dom": "^18.3.1",
18
- "@repo/eslint-config": "0.0.0",
19
- "@repo/typescript-config": "0.0.0"
18
+ "@repo/typescript-config": "0.0.0",
19
+ "@repo/eslint-config": "0.0.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": "^18.3.1",
@@ -33,19 +33,19 @@
33
33
  "react-router-dom": "^6.11.2",
34
34
  "react-hotkeys-hook": "^5.0.1",
35
35
  "yup": "^1.1.0",
36
- "@soperio/react": "1.0.14",
37
- "@soperio/jsx-runtime": "1.0.14",
38
- "@valerya/ui": "1.0.11",
39
- "@compill/admin-api": "1.0.56",
40
- "@compill/api": "1.0.57",
41
- "@compill/auth": "1.0.78",
42
- "@compill/env": "1.0.19",
43
- "@compill/components": "1.0.51",
44
- "@compill/editor": "1.0.80",
45
- "@compill/form": "1.0.68",
46
- "@compill/hooks": "1.0.43",
47
- "@compill/form-editor": "1.0.20",
48
- "@compill/table": "1.0.81"
36
+ "@soperio/react": "1.0.16",
37
+ "@compill/admin-api": "1.0.57",
38
+ "@soperio/jsx-runtime": "1.0.16",
39
+ "@compill/api": "1.0.59",
40
+ "@compill/auth": "1.0.79",
41
+ "@valerya/ui": "1.0.17",
42
+ "@compill/env": "1.0.21",
43
+ "@compill/form": "1.0.69",
44
+ "@compill/form-editor": "1.0.21",
45
+ "@compill/hooks": "1.0.45",
46
+ "@compill/table": "1.0.82",
47
+ "@compill/components": "1.0.52",
48
+ "@compill/editor": "1.0.81"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
@@ -54,7 +54,7 @@
54
54
  "dist"
55
55
  ],
56
56
  "scripts": {
57
- "build": "tsc -p tsconfig.build.json",
57
+ "build": "tsc -p tsconfig.build.json && node ../../fix-imports.js",
58
58
  "dev": "tsup src/index.ts --format esm --dts --watch",
59
59
  "lint": "eslint . --max-warnings 0",
60
60
  "check-types": "tsc --noEmit"