@compill/admin 1.0.30 → 1.0.32
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/README.md +7 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.js +11683 -0
- package/index.esm.d.ts +1 -0
- package/index.esm.js +11636 -0
- package/package.json +3 -10
- package/src/index.d.ts +44 -0
- package/{lib → src/lib}/SectionTitle.d.ts +2 -2
- package/{lib → src/lib}/breadcrumbs/BreadCrumbs.d.ts +2 -2
- package/{lib → src/lib}/buttons/DialogButton.d.ts +3 -4
- package/{lib → src/lib}/buttons/IconButton.d.ts +2 -2
- package/{lib → src/lib}/buttons/InvalidateButton.d.ts +2 -2
- package/{lib → src/lib}/buttons/NavigateButton.d.ts +2 -2
- package/{lib → src/lib}/buttons/PublishButton.d.ts +3 -3
- package/{lib → src/lib}/buttons/UpdateButton.d.ts +2 -2
- package/{lib → src/lib}/buttons/ViewButton.d.ts +2 -2
- package/{lib → src/lib}/json/DetailsView.d.ts +3 -3
- package/{lib → src/lib}/json/EditItemView.d.ts +2 -2
- package/{lib → src/lib}/json/MultiQueryWrapper.d.ts +3 -3
- package/{lib → src/lib}/json/QueryWrapper.d.ts +4 -4
- package/{lib → src/lib}/json/ScreenRenderer.d.ts +3 -3
- package/{lib → src/lib}/json/ScreenTopBar.d.ts +4 -4
- package/src/lib/json/TabbedView.d.ts +4 -0
- package/{lib → src/lib}/json/buttons/ActionButton.d.ts +3 -3
- package/{lib → src/lib}/json/buttons/ConfirmationActionButton.d.ts +3 -3
- package/{lib → src/lib}/json/dialog/DialogRenderer.d.ts +4 -4
- package/{lib → src/lib}/json/dialog/ItemDeleteDialog.d.ts +3 -3
- package/{lib → src/lib}/json/dialog/ItemEditDialog.d.ts +6 -7
- package/{lib → src/lib}/json/dialog/MultiQueryWrapperDialog.d.ts +2 -2
- package/{lib → src/lib}/json/dialog/QueryWrapperDialog.d.ts +4 -4
- package/{lib → src/lib}/json/table/TableRowActionsView.d.ts +3 -3
- package/{lib → src/lib/json}/table/TableRowPublishPostButton.d.ts +3 -3
- package/{lib → src/lib}/json/table/TableView.d.ts +3 -3
- package/{lib → src/lib}/json/table/TableViewContext.d.ts +4 -5
- package/src/lib/json/table/useTableProps.d.ts +3 -0
- package/{lib → src/lib}/json/types/DetailsView.d.ts +4 -4
- package/{lib → src/lib}/json/types/EditItemDialog.d.ts +1 -2
- package/{lib → src/lib}/json/types/MultiQueryWrapper.d.ts +4 -5
- package/{lib → src/lib}/json/types/MultiQueryWrapperDialog.d.ts +2 -3
- package/{lib → src/lib}/json/types/QueryWrapper.d.ts +4 -5
- package/{lib → src/lib}/json/types/QueryWrapperDialog.d.ts +2 -3
- package/src/lib/json/types/ScreenConfig.d.ts +8 -0
- package/{lib → src/lib}/json/types/TabbedView.d.ts +7 -7
- package/{lib → src/lib}/json/types/TableView.d.ts +10 -10
- package/{lib → src/lib}/modal/AttachDialog.d.ts +4 -4
- package/{lib → src/lib}/modal/FormActionDialog.d.ts +6 -7
- package/{lib → src/lib}/modal/ItemEditDialog.d.ts +5 -6
- package/{lib → src/lib}/page/PageContainer.d.ts +2 -2
- package/{lib → src/lib}/page/PageContentEditor.d.ts +2 -2
- package/{lib → src/lib}/page/PageMain.d.ts +2 -2
- package/{lib → src/lib}/page/PageQueryStateContainer.d.ts +3 -4
- package/{lib → src/lib}/page/PageSectionTitle.d.ts +2 -2
- package/{lib → src/lib}/page/PageSidebar.d.ts +2 -2
- package/{lib → src/lib}/page/PageSidebarSection.d.ts +2 -2
- package/{lib → src/lib}/page/PageStateContainer.d.ts +2 -3
- package/{lib → src/lib}/page/PageSubSectionTitle.d.ts +2 -2
- package/{lib → src/lib}/page/PageTitle.d.ts +2 -2
- package/{lib → src/lib}/page/PageTopBar.d.ts +3 -4
- package/{lib → src/lib}/status/StatusBadge.d.ts +2 -2
- package/{lib → src/lib}/table/TableContainer.d.ts +3 -3
- package/{lib → src/lib}/table/TableContainerContext.d.ts +2 -3
- package/{lib → src/lib}/table/TableCreateButton.d.ts +2 -2
- package/{lib → src/lib}/table/TableFilterButton.d.ts +2 -2
- package/{lib → src/lib}/table/TableFilters.d.ts +2 -2
- package/{lib → src/lib}/table/TableMassActions.d.ts +2 -2
- package/{lib → src/lib}/table/TableRowActionBar.d.ts +2 -2
- package/{lib → src/lib}/table/TableRowDeleteButton.d.ts +2 -2
- package/{lib → src/lib}/table/TableRowEditButton.d.ts +2 -2
- package/{lib → src/lib}/table/TableRowNavigateButton.d.ts +2 -2
- package/{lib/json → src/lib}/table/TableRowPublishPostButton.d.ts +3 -3
- package/{lib → src/lib}/table/TableRowViewButton.d.ts +2 -2
- package/{lib → src/lib}/table/TableTopBar.d.ts +2 -2
- package/index.d.ts +0 -44
- package/index.js +0 -18
- package/index.mjs +0 -5140
- package/index.umd.js +0 -18
- package/lib/json/TabbedView.d.ts +0 -4
- package/lib/json/table/useTableProps.d.ts +0 -4
- package/lib/json/types/ScreenConfig.d.ts +0 -9
- /package/{lib → src/lib}/cells/OrderCell.d.ts +0 -0
- /package/{lib → src/lib}/table/TableColumnButton.d.ts +0 -0
package/package.json
CHANGED
@@ -1,13 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@compill/admin",
|
3
|
-
"version": "1.0.
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"exports": {
|
7
|
-
".": {
|
8
|
-
"import": "./index.mjs",
|
9
|
-
"require": "./index.js"
|
10
|
-
}
|
11
|
-
},
|
12
|
-
"sideEffects": false
|
3
|
+
"version": "1.0.32",
|
4
|
+
"module": "./index.esm.js",
|
5
|
+
"main": "./index.cjs.js"
|
13
6
|
}
|
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
|
-
|
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,7 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import { ButtonProps } from
|
3
|
-
import
|
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,6 +1,6 @@
|
|
1
|
-
|
2
|
-
import { API } from
|
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
|
-
|
2
|
-
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ButtonProps } from "@valerya/ui";
|
3
3
|
export declare function UpdateButton({ ...props }: ButtonProps): JSX.Element;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
import { SoperioComponent } from
|
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
|
-
|
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
|
-
|
2
|
-
import { MultiQueryWrapperConfig } from
|
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
|
-
|
2
|
-
import {
|
3
|
-
import {
|
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
|
-
|
2
|
-
import { ScreenConfig } from
|
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
|
-
|
2
|
-
import {
|
3
|
-
import {
|
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[];
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
import { MutationQueryFn, MutationQueryKey } from
|
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
|
-
|
2
|
-
import { MutationQueryFn, MutationQueryKey } from
|
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
|
-
|
2
|
-
import {
|
3
|
-
import {
|
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
|
-
|
2
|
-
import { CRUDAPI } from
|
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 {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import
|
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
|
-
|
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
|
-
|
2
|
-
import {
|
3
|
-
import {
|
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
|
-
|
2
|
-
import { TableRowAction } from
|
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
|
-
|
2
|
-
import { ButtonProps } from
|
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
|
-
|
2
|
-
import { SoperioComponent } from
|
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
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
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;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
import {
|
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,8 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
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 {
|
2
|
-
import {
|
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 {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
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 {
|
2
|
-
import {
|
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
|
-
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { DetailsViewConfig } from
|
5
|
-
import {
|
6
|
-
import {
|
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
|
-
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
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
|
-
|
2
|
-
import {
|
3
|
-
import {
|
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 {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import
|
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 {
|
2
|
-
import {
|
3
|
-
import { ModalProps } from
|
4
|
-
import {
|
5
|
-
import
|
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
|
-
|
2
|
-
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ContainerProps } from "@valerya/ui";
|
3
3
|
export declare function PageContainer({ children, ...props }: ContainerProps): JSX.Element;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
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 {
|
2
|
-
import { ContainerProps } from
|
3
|
-
import
|
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
|
-
|
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
|
-
|
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
|
-
|
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;
|