@compill/admin 1.0.30 → 1.0.31

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 (81) hide show
  1. package/README.md +7 -0
  2. package/index.cjs.d.ts +1 -0
  3. package/index.cjs.js +11683 -0
  4. package/index.esm.d.ts +1 -0
  5. package/index.esm.js +11636 -0
  6. package/package.json +7 -3
  7. package/src/index.d.ts +44 -0
  8. package/{lib → src/lib}/SectionTitle.d.ts +2 -2
  9. package/{lib → src/lib}/breadcrumbs/BreadCrumbs.d.ts +2 -2
  10. package/{lib → src/lib}/buttons/DialogButton.d.ts +3 -4
  11. package/{lib → src/lib}/buttons/IconButton.d.ts +2 -2
  12. package/{lib → src/lib}/buttons/InvalidateButton.d.ts +2 -2
  13. package/{lib → src/lib}/buttons/NavigateButton.d.ts +2 -2
  14. package/{lib → src/lib}/buttons/PublishButton.d.ts +3 -3
  15. package/{lib → src/lib}/buttons/UpdateButton.d.ts +2 -2
  16. package/{lib → src/lib}/buttons/ViewButton.d.ts +2 -2
  17. package/{lib → src/lib}/json/DetailsView.d.ts +3 -3
  18. package/{lib → src/lib}/json/EditItemView.d.ts +2 -2
  19. package/{lib → src/lib}/json/MultiQueryWrapper.d.ts +3 -3
  20. package/{lib → src/lib}/json/QueryWrapper.d.ts +4 -4
  21. package/{lib → src/lib}/json/ScreenRenderer.d.ts +3 -3
  22. package/{lib → src/lib}/json/ScreenTopBar.d.ts +4 -4
  23. package/src/lib/json/TabbedView.d.ts +4 -0
  24. package/{lib → src/lib}/json/buttons/ActionButton.d.ts +3 -3
  25. package/{lib → src/lib}/json/buttons/ConfirmationActionButton.d.ts +3 -3
  26. package/{lib → src/lib}/json/dialog/DialogRenderer.d.ts +4 -4
  27. package/{lib → src/lib}/json/dialog/ItemDeleteDialog.d.ts +3 -3
  28. package/{lib → src/lib}/json/dialog/ItemEditDialog.d.ts +6 -7
  29. package/{lib → src/lib}/json/dialog/MultiQueryWrapperDialog.d.ts +2 -2
  30. package/{lib → src/lib}/json/dialog/QueryWrapperDialog.d.ts +4 -4
  31. package/{lib → src/lib}/json/table/TableRowActionsView.d.ts +3 -3
  32. package/{lib → src/lib/json}/table/TableRowPublishPostButton.d.ts +3 -3
  33. package/{lib → src/lib}/json/table/TableView.d.ts +3 -3
  34. package/{lib → src/lib}/json/table/TableViewContext.d.ts +4 -5
  35. package/src/lib/json/table/useTableProps.d.ts +3 -0
  36. package/{lib → src/lib}/json/types/DetailsView.d.ts +4 -4
  37. package/{lib → src/lib}/json/types/EditItemDialog.d.ts +1 -2
  38. package/{lib → src/lib}/json/types/MultiQueryWrapper.d.ts +4 -5
  39. package/{lib → src/lib}/json/types/MultiQueryWrapperDialog.d.ts +2 -3
  40. package/{lib → src/lib}/json/types/QueryWrapper.d.ts +4 -5
  41. package/{lib → src/lib}/json/types/QueryWrapperDialog.d.ts +2 -3
  42. package/src/lib/json/types/ScreenConfig.d.ts +8 -0
  43. package/{lib → src/lib}/json/types/TabbedView.d.ts +7 -7
  44. package/{lib → src/lib}/json/types/TableView.d.ts +10 -10
  45. package/{lib → src/lib}/modal/AttachDialog.d.ts +4 -4
  46. package/{lib → src/lib}/modal/FormActionDialog.d.ts +6 -7
  47. package/{lib → src/lib}/modal/ItemEditDialog.d.ts +5 -6
  48. package/{lib → src/lib}/page/PageContainer.d.ts +2 -2
  49. package/{lib → src/lib}/page/PageContentEditor.d.ts +2 -2
  50. package/{lib → src/lib}/page/PageMain.d.ts +2 -2
  51. package/{lib → src/lib}/page/PageQueryStateContainer.d.ts +3 -4
  52. package/{lib → src/lib}/page/PageSectionTitle.d.ts +2 -2
  53. package/{lib → src/lib}/page/PageSidebar.d.ts +2 -2
  54. package/{lib → src/lib}/page/PageSidebarSection.d.ts +2 -2
  55. package/{lib → src/lib}/page/PageStateContainer.d.ts +2 -3
  56. package/{lib → src/lib}/page/PageSubSectionTitle.d.ts +2 -2
  57. package/{lib → src/lib}/page/PageTitle.d.ts +2 -2
  58. package/{lib → src/lib}/page/PageTopBar.d.ts +3 -4
  59. package/{lib → src/lib}/status/StatusBadge.d.ts +2 -2
  60. package/{lib → src/lib}/table/TableContainer.d.ts +3 -3
  61. package/{lib → src/lib}/table/TableContainerContext.d.ts +2 -3
  62. package/{lib → src/lib}/table/TableCreateButton.d.ts +2 -2
  63. package/{lib → src/lib}/table/TableFilterButton.d.ts +2 -2
  64. package/{lib → src/lib}/table/TableFilters.d.ts +2 -2
  65. package/{lib → src/lib}/table/TableMassActions.d.ts +2 -2
  66. package/{lib → src/lib}/table/TableRowActionBar.d.ts +2 -2
  67. package/{lib → src/lib}/table/TableRowDeleteButton.d.ts +2 -2
  68. package/{lib → src/lib}/table/TableRowEditButton.d.ts +2 -2
  69. package/{lib → src/lib}/table/TableRowNavigateButton.d.ts +2 -2
  70. package/{lib/json → src/lib}/table/TableRowPublishPostButton.d.ts +3 -3
  71. package/{lib → src/lib}/table/TableRowViewButton.d.ts +2 -2
  72. package/{lib → src/lib}/table/TableTopBar.d.ts +2 -2
  73. package/index.d.ts +0 -44
  74. package/index.js +0 -18
  75. package/index.mjs +0 -5140
  76. package/index.umd.js +0 -18
  77. package/lib/json/TabbedView.d.ts +0 -4
  78. package/lib/json/table/useTableProps.d.ts +0 -4
  79. package/lib/json/types/ScreenConfig.d.ts +0 -9
  80. /package/{lib → src/lib}/cells/OrderCell.d.ts +0 -0
  81. /package/{lib → src/lib}/table/TableColumnButton.d.ts +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@compill/admin",
3
- "version": "1.0.30",
4
- "main": "./index.js",
3
+ "version": "1.0.31",
4
+ "main": "./index.cjs.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
7
7
  ".": {
@@ -9,5 +9,9 @@
9
9
  "require": "./index.js"
10
10
  }
11
11
  },
12
- "sideEffects": false
12
+ "sideEffects": false,
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "module": "./index.esm.js"
13
17
  }
package/src/index.d.ts ADDED
@@ -0,0 +1,44 @@
1
+ export * from "./lib/SectionTitle";
2
+ export * from "./lib/breadcrumbs/BreadCrumbs";
3
+ export * from "./lib/buttons/DialogButton";
4
+ export * from "./lib/buttons/IconButton";
5
+ export * from "./lib/buttons/InvalidateButton";
6
+ export * from "./lib/buttons/NavigateButton";
7
+ export * from "./lib/buttons/PublishButton";
8
+ export * from "./lib/buttons/UpdateButton";
9
+ export * from "./lib/buttons/ViewButton";
10
+ export * from "./lib/cells/OrderCell";
11
+ export * from "./lib/json/types/ScreenConfig";
12
+ export * from "./lib/json/types/EditItemDialog";
13
+ export * from "./lib/json/types/TableView";
14
+ export * from "./lib/json/types/TabbedView";
15
+ export * from "./lib/json/types/DetailsView";
16
+ export * from "./lib/json/types/QueryWrapper";
17
+ export * from "./lib/json/types/QueryWrapperDialog";
18
+ export * from "./lib/json/types/MultiQueryWrapper";
19
+ export * from "./lib/json/ScreenRenderer";
20
+ export * from "./lib/modal/AttachDialog";
21
+ export * from "./lib/modal/FormActionDialog";
22
+ export * from "./lib/modal/ItemEditDialog";
23
+ export * from "./lib/page/PageContainer";
24
+ export * from "./lib/page/PageContentEditor";
25
+ export * from "./lib/page/PageMain";
26
+ export * from "./lib/page/PageQueryStateContainer";
27
+ export * from "./lib/page/PageSectionTitle";
28
+ export * from "./lib/page/PageSidebar";
29
+ export * from "./lib/page/PageSidebarSection";
30
+ export * from "./lib/page/PageStateContainer";
31
+ export * from "./lib/page/PageSubSectionTitle";
32
+ export * from "./lib/page/PageTitle";
33
+ export * from "./lib/page/PageTopBar";
34
+ export * from "./lib/status/StatusBadge";
35
+ export * from "./lib/table/TableContainer";
36
+ export * from "./lib/table/TableCreateButton";
37
+ export * from "./lib/table/TableFilterButton";
38
+ export * from "./lib/table/TableRowActionBar";
39
+ export * from "./lib/table/TableRowDeleteButton";
40
+ export * from "./lib/table/TableRowEditButton";
41
+ export * from "./lib/table/TableRowNavigateButton";
42
+ export * from "./lib/table/TableRowPublishPostButton";
43
+ export * from "./lib/table/TableRowViewButton";
44
+ export * from "./lib/table/TableTopBar";
@@ -1,3 +1,3 @@
1
- import { ParentComponent, SoperioComponent } from '@soperio/react';
2
-
1
+ /// <reference types="react" />
2
+ import { ParentComponent, SoperioComponent } from "@soperio/react";
3
3
  export declare function SectionTitle({ children, ...props }: SoperioComponent & ParentComponent): JSX.Element;
@@ -1,5 +1,5 @@
1
- import { SoperioComponent } from '@soperio/react';
2
-
1
+ /// <reference types="react" />
2
+ import { SoperioComponent } from "@soperio/react";
3
3
  export interface Breadcrumb {
4
4
  label: string;
5
5
  path?: string;
@@ -1,7 +1,6 @@
1
- import { default as React } from 'react';
2
- import { ButtonProps } from '@valerya/ui';
3
- import { ParentComponent, SoperioComponent } from '@soperio/react';
4
-
1
+ import { ParentComponent, SoperioComponent } from "@soperio/react";
2
+ import { ButtonProps } from "@valerya/ui";
3
+ import React from "react";
5
4
  export interface DialogButtonProps extends SoperioComponent, ParentComponent, ButtonProps {
6
5
  buildDialog: (onClose: () => void) => React.ReactNode;
7
6
  }
@@ -1,5 +1,5 @@
1
- import { ButtonProps } from '@valerya/ui';
2
-
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from "@valerya/ui";
3
3
  export declare function IconButton({ icon, ...props }: {
4
4
  icon: string;
5
5
  } & ButtonProps): JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ButtonProps } from '@valerya/ui';
2
-
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from "@valerya/ui";
3
3
  interface InvalidateButtonProps extends ButtonProps {
4
4
  pathOrPermalink: string;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { ButtonProps } from '@valerya/ui';
2
-
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from "@valerya/ui";
3
3
  export declare function NavigateButton({ path, ...props }: {
4
4
  path: string;
5
5
  } & ButtonProps): JSX.Element;
@@ -1,6 +1,6 @@
1
- import { ButtonProps } from '@valerya/ui';
2
- import { API } from '../../../../admin-api/src/index.ts';
3
-
1
+ /// <reference types="react" />
2
+ import { API } from "@compill/admin-api";
3
+ import { ButtonProps } from "@valerya/ui";
4
4
  interface PublishButtonProps extends ButtonProps {
5
5
  status: string;
6
6
  queryId: string;
@@ -1,3 +1,3 @@
1
- import { ButtonProps } from '@valerya/ui';
2
-
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from "@valerya/ui";
3
3
  export declare function UpdateButton({ ...props }: ButtonProps): JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ButtonProps } from '@valerya/ui';
2
-
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from "@valerya/ui";
3
3
  export declare function ViewButton({ path, icon, ...props }: {
4
4
  path: string;
5
5
  icon?: string;
@@ -1,6 +1,6 @@
1
- import { DetailsViewConfig } from './types/DetailsView';
2
- import { SoperioComponent } from '@soperio/react';
3
-
1
+ /// <reference types="react" />
2
+ import { SoperioComponent } from "@soperio/react";
3
+ import { DetailsViewConfig } from "./types/DetailsView";
4
4
  export declare function DetailsView({ queryField, api, processInput, screen, tabbed, ...props }: DetailsViewConfig & {
5
5
  tabbed?: boolean;
6
6
  } & SoperioComponent): JSX.Element;
@@ -1,3 +1,3 @@
1
- import { ItemEditDialogProps } from './dialog/ItemEditDialog';
2
-
1
+ /// <reference types="react" />
2
+ import { ItemEditDialogProps } from "./dialog/ItemEditDialog";
3
3
  export declare function EditItemView({ initialValues, ...props }: Omit<ItemEditDialogProps, "show">): JSX.Element;
@@ -1,6 +1,6 @@
1
- import { SoperioComponent } from '@soperio/react';
2
- import { MultiQueryWrapperConfig } from './types/MultiQueryWrapper';
3
-
1
+ /// <reference types="react" />
2
+ import { MultiQueryWrapperConfig } from "./types/MultiQueryWrapper";
3
+ import { SoperioComponent } from "@soperio/react";
4
4
  export declare function MultiQueryWrapper({ queries, config, tabbed, ...props }: Omit<MultiQueryWrapperConfig, "type"> & {
5
5
  tabbed?: boolean;
6
6
  } & SoperioComponent): JSX.Element;
@@ -1,7 +1,7 @@
1
- import { CRUD_MODEL } from '../../../../api/src/index.ts';
2
- import { SoperioComponent } from '@soperio/react';
3
- import { QueryWrapperConfig } from './types/QueryWrapper';
4
-
1
+ /// <reference types="react" />
2
+ import { QueryWrapperConfig } from "./types/QueryWrapper";
3
+ import { SoperioComponent } from "@soperio/react";
4
+ import { CRUD_MODEL } from "@compill/api";
5
5
  export declare function QueryWrapper<T extends CRUD_MODEL, U>({ api, queryField, fn, transformFn, config, tabbed, ...props }: Omit<QueryWrapperConfig<T, U>, "type"> & {
6
6
  tabbed?: boolean;
7
7
  } & SoperioComponent): JSX.Element | null;
@@ -1,6 +1,6 @@
1
- import { SoperioComponent } from '@soperio/react';
2
- import { ScreenConfig } from './types/ScreenConfig';
3
-
1
+ /// <reference types="react" />
2
+ import { ScreenConfig } from "./types/ScreenConfig";
3
+ import { SoperioComponent } from "@soperio/react";
4
4
  export declare function ScreenRenderer({ config, tabbed, ...props }: {
5
5
  config: ScreenConfig;
6
6
  tabbed?: boolean;
@@ -1,7 +1,7 @@
1
- import { DetailViewButton } from './types/DetailsView';
2
- import { Breadcrumb } from '../breadcrumbs/BreadCrumbs';
3
- import { API } from '../../../../admin-api/src/index.ts';
4
-
1
+ /// <reference types="react" />
2
+ import { API } from "@compill/admin-api";
3
+ import { Breadcrumb } from "../breadcrumbs/BreadCrumbs";
4
+ import { DetailViewButton } from "./types/DetailsView";
5
5
  interface ScreenTopBarProps {
6
6
  tabbed?: boolean;
7
7
  breadcrumbs?: Breadcrumb[];
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TabbedViewConfig } from "./types/TabbedView";
3
+ import { SoperioComponent } from "@soperio/react";
4
+ export declare function TabbedView({ queryField, api, screen, ...props }: TabbedViewConfig & SoperioComponent): JSX.Element;
@@ -1,6 +1,6 @@
1
- import { ButtonProps } from '@valerya/ui';
2
- import { MutationQueryFn, MutationQueryKey } from '../../../../../api/src/index.ts';
3
-
1
+ /// <reference types="react" />
2
+ import { MutationQueryFn, MutationQueryKey } from "@compill/api";
3
+ import { ButtonProps } from "@valerya/ui";
4
4
  interface ActionButtonProps {
5
5
  label: string;
6
6
  buttonProps?: ButtonProps;
@@ -1,6 +1,6 @@
1
- import { ButtonProps, ModalProps } from '@valerya/ui';
2
- import { MutationQueryFn, MutationQueryKey } from '../../../../../api/src/index.ts';
3
-
1
+ /// <reference types="react" />
2
+ import { MutationQueryFn, MutationQueryKey } from "@compill/api";
3
+ import { ButtonProps, ModalProps } from "@valerya/ui";
4
4
  interface ConfirmationActionButtonProps {
5
5
  label: string;
6
6
  buttonProps?: ButtonProps;
@@ -1,7 +1,7 @@
1
- import { MultiQueryWrapperDialogConfig } from '../types/MultiQueryWrapperDialog';
2
- import { QueryWrapperDialogConfig } from '../types/QueryWrapperDialog';
3
- import { EditItemDialogConfig } from '../types/EditItemDialog';
4
-
1
+ /// <reference types="react" />
2
+ import { EditItemDialogConfig } from "../types/EditItemDialog";
3
+ import { QueryWrapperDialogConfig } from "../types/QueryWrapperDialog";
4
+ import { MultiQueryWrapperDialogConfig } from "../types/MultiQueryWrapperDialog";
5
5
  interface DialogRendererProps {
6
6
  config: EditItemDialogConfig | QueryWrapperDialogConfig<any> | MultiQueryWrapperDialogConfig;
7
7
  onClose: () => void;
@@ -1,6 +1,6 @@
1
- import { ModalProps } from '@valerya/ui';
2
- import { CRUDAPI } from '../../../../../api/src/index.ts';
3
-
1
+ /// <reference types="react" />
2
+ import { CRUDAPI } from "@compill/api";
3
+ import { ModalProps } from "@valerya/ui";
4
4
  export interface ItemDeleteDialogProps extends ModalProps {
5
5
  itemLabel: string;
6
6
  queryId: string;
@@ -1,10 +1,9 @@
1
- import { default as React } from 'react';
2
- import { FormikConfig } from 'formik';
3
- import { ModalProps } from '@valerya/ui';
4
- import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
5
- import { FormRendererConfig } from '../../../../../form/src/index.ts';
6
- import { CRUDAPI } from '../../../../../api/src/index.ts';
7
-
1
+ import { CRUDAPI } from "@compill/api";
2
+ import { FormRendererConfig } from "@compill/form";
3
+ import { UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
4
+ import { ModalProps } from "@valerya/ui";
5
+ import { FormikConfig } from "formik";
6
+ import React from "react";
8
7
  export interface ItemEditDialogProps<TFormData extends {} = any, TResultData extends {} = any> extends Omit<ModalProps, "id" | "children" | "title" | "position"> {
9
8
  itemLabel?: string;
10
9
  queryId?: string;
@@ -1,5 +1,5 @@
1
- import { MultiQueryWrapperDialogConfig } from '../types/MultiQueryWrapperDialog';
2
-
1
+ /// <reference types="react" />
2
+ import { MultiQueryWrapperDialogConfig } from "../types/MultiQueryWrapperDialog";
3
3
  export type MultiQueryWrapperDialogProps = Omit<MultiQueryWrapperDialogConfig, "type"> & {
4
4
  queryId?: string;
5
5
  onClose: () => void;
@@ -1,7 +1,7 @@
1
- import { EditItemDialogConfig } from '../types/EditItemDialog';
2
- import { QueryWrapperDialogConfig } from '../types/QueryWrapperDialog';
3
- import { CRUDAPI, CRUD_MODEL } from '../../../../../api/src/index.ts';
4
-
1
+ /// <reference types="react" />
2
+ import { CRUDAPI, CRUD_MODEL } from "@compill/api";
3
+ import { QueryWrapperDialogConfig } from "../types/QueryWrapperDialog";
4
+ import { EditItemDialogConfig } from "../types/EditItemDialog";
5
5
  export type QueryWrapperDialogProps<T extends CRUD_MODEL, U> = Omit<QueryWrapperDialogConfig<T, U>, "type"> & {
6
6
  api: CRUDAPI<any>;
7
7
  fn: "get" | "getTransformed" | "getAll" | "getAllTransformed";
@@ -1,6 +1,6 @@
1
- import { API } from '../../../../../admin-api/src/index.ts';
2
- import { TableRowAction } from '../types/TableView';
3
-
1
+ /// <reference types="react" />
2
+ import { TableRowAction } from "../types/TableView";
3
+ import { API } from "@compill/admin-api";
4
4
  interface TableRowActionViewProps {
5
5
  row: any;
6
6
  onAction: (action: TableRowAction, item: any) => void;
@@ -1,6 +1,6 @@
1
- import { API } from '../../../../admin-api/src/index.ts';
2
- import { ButtonProps } from '@valerya/ui';
3
-
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from "@valerya/ui";
3
+ import { API } from "@compill/admin-api";
4
4
  export declare function TableRowPublishPostButton({ id, api, status, invalidateQueryKey, ...props }: {
5
5
  id: string;
6
6
  api: API<any>;
@@ -1,4 +1,4 @@
1
- import { TableViewConfig } from '../types/TableView';
2
- import { SoperioComponent } from '@soperio/react';
3
-
1
+ /// <reference types="react" />
2
+ import { SoperioComponent } from "@soperio/react";
3
+ import { TableViewConfig } from "../types/TableView";
4
4
  export declare function TableView({ queryField, title, subtitle, screen, ...props }: Omit<TableViewConfig, "type"> & SoperioComponent): JSX.Element;
@@ -1,8 +1,7 @@
1
- import { QueryWrapperDialogConfig } from '../types/QueryWrapperDialog';
2
- import { EditItemDialogConfig } from '../types/EditItemDialog';
3
- import { CustomDialog, TableRowAction, TableViewDeleteItem } from '../types/TableView';
4
- import { default as React } from 'react';
5
-
1
+ import React from "react";
2
+ import { CustomDialog, TableRowAction, TableViewDeleteItem } from "../types/TableView";
3
+ import { EditItemDialogConfig } from "../types/EditItemDialog";
4
+ import { QueryWrapperDialogConfig } from "../types/QueryWrapperDialog";
6
5
  type TableViewContextProps = {
7
6
  onAction: (action: TableRowAction, item: any) => void;
8
7
  dialog?: React.ReactNode;
@@ -0,0 +1,3 @@
1
+ import { TableRowAction, TableViewTable } from "../types/TableView";
2
+ import { API } from "@compill/admin-api";
3
+ export declare function useTableProps(api: API<any>, table: TableViewTable, rowActions?: TableRowAction[]): any;
@@ -1,8 +1,8 @@
1
- import { FormRendererConfig } from '../../../../../form/src/index.ts';
2
- import { Breadcrumb } from '../../breadcrumbs/BreadCrumbs';
3
- import { API } from '../../../../../admin-api/src/index.ts';
4
-
1
+ /// <reference types="react" />
2
+ import { API } from "@compill/admin-api";
5
3
  import * as Yup from "yup";
4
+ import { Breadcrumb } from "../../breadcrumbs/BreadCrumbs";
5
+ import { FormRendererConfig } from "@compill/form";
6
6
  export type DetailsViewConfig<T = any> = {
7
7
  type: "details";
8
8
  api: API<T>;
@@ -1,5 +1,4 @@
1
- import { ItemEditDialogProps } from '../dialog/ItemEditDialog';
2
-
1
+ import { ItemEditDialogProps } from "../dialog/ItemEditDialog";
3
2
  export type EditItemDialogConfig = Omit<ItemEditDialogProps, "show" | "onClose"> & {
4
3
  type: "dialog";
5
4
  };
@@ -1,8 +1,7 @@
1
- import { TableViewConfig } from './TableView';
2
- import { TabbedViewConfig } from './TabbedView';
3
- import { DetailsViewConfig } from './DetailsView';
4
- import { CRUDAPI } from '../../../../../api/src/index.ts';
5
-
1
+ import { CRUDAPI } from "@compill/api";
2
+ import { DetailsViewConfig } from "./DetailsView";
3
+ import { TabbedViewConfig } from "./TabbedView";
4
+ import { TableViewConfig } from "./TableView";
6
5
  type SubScreen = TableViewConfig | DetailsViewConfig | TabbedViewConfig;
7
6
  export type QueryDef = {
8
7
  api: CRUDAPI<any> | ((id: string) => CRUDAPI<any>);
@@ -1,6 +1,5 @@
1
- import { EditItemDialogConfig } from './EditItemDialog';
2
- import { CRUDAPI } from '../../../../../api/src/index.ts';
3
-
1
+ import { CRUDAPI } from "@compill/api";
2
+ import { EditItemDialogConfig } from "./EditItemDialog";
4
3
  export type QueryDef = {
5
4
  api: CRUDAPI<any>;
6
5
  fn: "get" | "getAll";
@@ -1,8 +1,7 @@
1
- import { TableViewConfig } from './TableView';
2
- import { TabbedViewConfig } from './TabbedView';
3
- import { DetailsViewConfig } from './DetailsView';
4
- import { CRUDAPI, CRUD_MODEL } from '../../../../../api/src/index.ts';
5
-
1
+ import { CRUDAPI, CRUD_MODEL } from "@compill/api";
2
+ import { DetailsViewConfig } from "./DetailsView";
3
+ import { TabbedViewConfig } from "./TabbedView";
4
+ import { TableViewConfig } from "./TableView";
6
5
  type SubScreen<T extends CRUD_MODEL, U> = TableViewConfig | DetailsViewConfig | TabbedViewConfig | QueryWrapperConfig<T, U>;
7
6
  export type QueryWrapperConfig<T extends CRUD_MODEL, U = T> = {
8
7
  type: "query";
@@ -1,6 +1,5 @@
1
- import { EditItemDialogConfig } from './EditItemDialog';
2
- import { CRUDAPI, CRUD_MODEL } from '../../../../../api/src/index.ts';
3
-
1
+ import { CRUDAPI, CRUD_MODEL } from "@compill/api";
2
+ import { EditItemDialogConfig } from "./EditItemDialog";
4
3
  export type QueryWrapperDialogConfig<T extends CRUD_MODEL, U = T> = {
5
4
  type: "query";
6
5
  api: CRUDAPI<any>;
@@ -0,0 +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";
7
+ export type ScreenConfig = TableViewConfig | DetailsViewConfig | TabbedViewConfig | QueryWrapperConfig<any, any> | MultiQueryWrapperConfig;
8
+ export type TableViewEditItem = Omit<ItemEditDialogProps, "show" | "onClose">;
@@ -1,10 +1,10 @@
1
- import { MultiQueryWrapperConfig } from './MultiQueryWrapper';
2
- import { TableViewConfig } from './TableView';
3
- import { QueryWrapperConfig } from './QueryWrapper';
4
- import { DetailsViewConfig } from './DetailsView';
5
- import { Breadcrumb } from '../../breadcrumbs/BreadCrumbs';
6
- import { CRUDAPI } from '../../../../../api/src/index.ts';
7
-
1
+ /// <reference types="react" />
2
+ import { CRUDAPI } from "@compill/api";
3
+ import { Breadcrumb } from "../../breadcrumbs/BreadCrumbs";
4
+ import { DetailsViewConfig } from "./DetailsView";
5
+ import { QueryWrapperConfig } from "./QueryWrapper";
6
+ import { TableViewConfig } from "./TableView";
7
+ import { MultiQueryWrapperConfig } from "./MultiQueryWrapper";
8
8
  export type TabbedViewConfig<T extends any = any> = {
9
9
  type: "tabbed";
10
10
  queryField: string;
@@ -1,14 +1,14 @@
1
- import { MutationQueryFn, MutationQueryKey } from '../../../../../api/src/index.ts';
2
- import { QueryWrapperDialogConfig } from './QueryWrapperDialog';
3
- import { EditItemDialogConfig } from './EditItemDialog';
4
- import { ItemDeleteDialogProps } from '../dialog/ItemDeleteDialog';
5
- import { Breadcrumb } from '../../breadcrumbs/BreadCrumbs';
6
- import { ButtonProps, ModalProps } from '@valerya/ui';
7
- import { TableProps } from '../../../../../table/src/index.ts';
8
- import { FormRendererConfig } from '../../../../../form/src/index.ts';
9
- import { API } from '../../../../../admin-api/src/index.ts';
10
-
1
+ /// <reference types="react" />
2
+ import { API } from "@compill/admin-api";
3
+ import { FormRendererConfig } from "@compill/form";
4
+ import { TableProps } from "@compill/table";
5
+ import { ButtonProps, ModalProps } from "@valerya/ui";
6
+ import { Breadcrumb } from "../../breadcrumbs/BreadCrumbs";
7
+ import { ItemDeleteDialogProps } from "../dialog/ItemDeleteDialog";
8
+ import { EditItemDialogConfig } from "./EditItemDialog";
9
+ import { QueryWrapperDialogConfig } from "./QueryWrapperDialog";
11
10
  import * as Yup from "yup";
11
+ import { MutationQueryFn, MutationQueryKey } from "@compill/api";
12
12
  export type TableViewScreen = {
13
13
  api: API<any>;
14
14
  breadcrumbs?: Breadcrumb[];
@@ -1,7 +1,7 @@
1
- import { FormikConfig } from 'formik';
2
- import { ModalProps } from '@valerya/ui';
3
- import { QueryFunctionContext } from '@tanstack/react-query';
4
-
1
+ /// <reference types="react" />
2
+ import { QueryFunctionContext } from "@tanstack/react-query";
3
+ import { ModalProps } from "@valerya/ui";
4
+ import { FormikConfig } from "formik";
5
5
  interface AttachDialogProps<T> extends Omit<ModalProps, "id" | "children" | "title" | "position"> {
6
6
  queryId?: string;
7
7
  queryKey: string[];
@@ -1,10 +1,9 @@
1
- import { default as React } from 'react';
2
- import { FormikConfig } from 'formik';
3
- import { ModalProps } from '@valerya/ui';
4
- import { UseMutationOptions } from '@tanstack/react-query';
5
- import { FormRendererConfig } from '../../../../form/src/index.ts';
6
- import { UseMutateOptions } from '../../../../api/src/index.ts';
7
-
1
+ import { UseMutateOptions } from "@compill/api";
2
+ import { FormRendererConfig } from "@compill/form";
3
+ import { UseMutationOptions } from "@tanstack/react-query";
4
+ import { ModalProps } from "@valerya/ui";
5
+ import { FormikConfig } from "formik";
6
+ import React from "react";
8
7
  export interface FormActionDialogProps<TFormData extends {} = any, TResultData extends {} = any> extends Omit<ModalProps, "id" | "children" | "title" | "position" | "onError">, UseMutateOptions<TResultData, TFormData> {
9
8
  itemLabel?: string;
10
9
  queryId?: string;
@@ -1,9 +1,8 @@
1
- import { default as React } from 'react';
2
- import { FormikConfig } from 'formik';
3
- import { ModalProps } from '@valerya/ui';
4
- import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
5
- import { FormRendererConfig } from '../../../../form/src/index.ts';
6
-
1
+ import { FormRendererConfig } from "@compill/form";
2
+ import { UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
3
+ import { ModalProps } from "@valerya/ui";
4
+ import { FormikConfig } from "formik";
5
+ import React from "react";
7
6
  export interface ItemEditDialogProps<TFormData extends {} = any, TResultData extends {} = any> extends Omit<ModalProps, "id" | "children" | "title" | "position"> {
8
7
  itemLabel?: string;
9
8
  queryId?: string;
@@ -1,3 +1,3 @@
1
- import { ContainerProps } from '@valerya/ui';
2
-
1
+ /// <reference types="react" />
2
+ import { ContainerProps } from "@valerya/ui";
3
3
  export declare function PageContainer({ children, ...props }: ContainerProps): JSX.Element;
@@ -1,5 +1,5 @@
1
- import { SoperioComponent } from '@soperio/react';
2
-
1
+ /// <reference types="react" />
2
+ import { SoperioComponent } from "@soperio/react";
3
3
  export declare function PageContentEditor({ name, ...props }: {
4
4
  name: string;
5
5
  } & SoperioComponent): JSX.Element;
@@ -1,3 +1,3 @@
1
- import { ParentComponent, SoperioComponent } from '@soperio/react';
2
-
1
+ /// <reference types="react" />
2
+ import { ParentComponent, SoperioComponent } from "@soperio/react";
3
3
  export declare function PageMain({ children, ...props }: SoperioComponent & ParentComponent): JSX.Element;
@@ -1,7 +1,6 @@
1
- import { default as React } from 'react';
2
- import { ContainerProps } from '@valerya/ui';
3
- import { CRUDAPI, CRUD_MODEL } from '../../../../api/src/index.ts';
4
-
1
+ import { CRUDAPI, CRUD_MODEL } from "@compill/api";
2
+ import { ContainerProps } from "@valerya/ui";
3
+ import React from "react";
5
4
  interface PageQueryContainerProps<T extends CRUD_MODEL> extends Omit<ContainerProps, "children"> {
6
5
  queryId?: string;
7
6
  api: CRUDAPI<T>;
@@ -1,3 +1,3 @@
1
- import { ParentComponent, SoperioComponent } from '@soperio/react';
2
-
1
+ /// <reference types="react" />
2
+ import { ParentComponent, SoperioComponent } from "@soperio/react";
3
3
  export declare function PageSectionTitle({ children, ...props }: SoperioComponent & ParentComponent): JSX.Element;
@@ -1,3 +1,3 @@
1
- import { ParentComponent, SoperioComponent } from '@soperio/react';
2
-
1
+ /// <reference types="react" />
2
+ import { ParentComponent, SoperioComponent } from "@soperio/react";
3
3
  export declare function PageSidebar({ children, ...props }: SoperioComponent & ParentComponent): JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ParentComponent, SoperioComponent } from '@soperio/react';
2
-
1
+ /// <reference types="react" />
2
+ import { ParentComponent, SoperioComponent } from "@soperio/react";
3
3
  export declare function PageSidebarSection({ title, children, ...props }: {
4
4
  title?: string;
5
5
  } & SoperioComponent & ParentComponent): JSX.Element;