@dakataa/crud-react 2.0.0 → 2.1.0
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/CHANGELOG.md +25 -0
- package/README.md +43 -0
- package/dist/Crud.d.ts +2 -2
- package/dist/component/BaseButtonContent.d.ts +2 -2
- package/dist/component/Button.d.ts +2 -2
- package/dist/component/Dropdown.d.ts +4 -4
- package/dist/component/Empty.d.ts +2 -2
- package/dist/component/Link.d.ts +1 -1
- package/dist/component/LottieAnimation.d.ts +1 -1
- package/dist/component/Modal.d.ts +3 -3
- package/dist/component/Money.d.ts +1 -1
- package/dist/component/Preloader.d.ts +4 -4
- package/dist/component/crud/ActionLink.d.ts +1 -1
- package/dist/component/crud/CrudLoader.d.ts +3 -3
- package/dist/component/crud/DynamicView.d.ts +1 -1
- package/dist/component/crud/FiltersView.d.ts +2 -1
- package/dist/component/crud/GridView.d.ts +2 -2
- package/dist/component/crud/IsListItemActionGranted.d.ts +1 -1
- package/dist/component/crud/ItemAction.d.ts +2 -2
- package/dist/component/crud/ItemActions.d.ts +2 -1
- package/dist/component/crud/ItemLabel.d.ts +2 -1
- package/dist/component/crud/ItemValue.d.ts +2 -1
- package/dist/component/crud/ListItem.d.ts +2 -1
- package/dist/component/crud/ListView.d.ts +2 -2
- package/dist/component/crud/Modify.d.ts +1 -1
- package/dist/component/crud/Paginator.d.ts +2 -1
- package/dist/component/crud/ViewLoader.d.ts +2 -1
- package/dist/component/crud/batch/BatchActionSelector.d.ts +2 -1
- package/dist/component/crud/batch/BatchActionsContext.d.ts +2 -2
- package/dist/component/crud/batch/BatchItemSelector.d.ts +2 -1
- package/dist/component/crud/form/Form.d.ts +1 -1
- package/dist/component/crud/form/FormError.d.ts +1 -1
- package/dist/component/crud/form/FormField.d.ts +1 -1
- package/dist/component/crud/form/FormGroup.d.ts +3 -3
- package/dist/component/crud/form/FormGroupViewLoader.d.ts +1 -1
- package/dist/component/crud/form/FormLabel.d.ts +1 -1
- package/dist/component/crud/form/FormRest.d.ts +1 -1
- package/dist/component/crud/form/FormRestError.d.ts +1 -1
- package/dist/component/error/ErrorBoundary.d.ts +2 -2
- package/dist/component/form/Choice.d.ts +4 -4
- package/dist/component/form/Collection.d.ts +2 -2
- package/dist/component/form/Form.d.ts +1 -1
- package/dist/component/form/FormAlert.d.ts +1 -1
- package/dist/component/form/FormFieldError.d.ts +1 -1
- package/dist/component/form/FormGroup.d.ts +1 -1
- package/dist/component/form/FormSetting.d.ts +2 -2
- package/dist/component/router/Route.d.ts +2 -1
- package/dist/component/templating/Template.d.ts +2 -2
- package/dist/component/templating/TemplateBlock.d.ts +1 -1
- package/dist/component/templating/TemplateParentBlock.d.ts +2 -2
- package/dist/context/ActionContext.d.ts +2 -2
- package/dist/context/AlertContext.d.ts +2 -2
- package/dist/context/ConfigContext.d.ts +2 -2
- package/dist/context/CrudProvider.d.ts +2 -2
- package/dist/context/GetData.d.ts +2 -2
- package/dist/context/ListContext.d.ts +2 -2
- package/dist/context/ListItemContext.d.ts +2 -2
- package/dist/context/LoaderContext.d.ts +2 -2
- package/dist/context/ModalContext.d.ts +2 -2
- package/dist/context/ModalScopeContext.d.ts +5 -0
- package/dist/context/NamespaceContext.d.ts +2 -2
- package/dist/crud-react.js +1159 -1170
- package/dist/layout/default/Base.d.ts +1 -1
- package/dist/layout/default/Error.d.ts +1 -1
- package/dist/layout/default/Main.d.ts +2 -1
- package/dist/main.d.ts +1 -0
- package/dist/type/ViewType.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/{denied-Emsz18Y8.js → denied-Cg2igDWh.js} +0 -0
- /package/dist/{info-C897Uj_w.js → info-Dfyx45FU.js} +0 -0
- /package/dist/{success-YbPKEx5j.js → success-B5xn1-UX.js} +0 -0
- /package/dist/{warning-DJITKJj5.js → warning-BaaC-X6i.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
declare const TemplateParentBlock: ({ children }: {
|
|
3
3
|
children?: ReactNode | undefined;
|
|
4
|
-
}) =>
|
|
4
|
+
}) => React.JSX.Element;
|
|
5
5
|
export default TemplateParentBlock;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, FC, PropsWithChildren } from 'react';
|
|
1
|
+
import { default as React, ComponentType, FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { ActionType } from '../type/ActionType.tsx';
|
|
3
3
|
import { ActionRequestType } from '../type/ActionRequestType.tsx';
|
|
4
4
|
import { RouteType } from '../type/RouteType.tsx';
|
|
@@ -42,5 +42,5 @@ export declare function UseActions(safe?: boolean): {
|
|
|
42
42
|
internalToExternalPath: (path: string) => string;
|
|
43
43
|
externalToInternalPath: (path: string) => string;
|
|
44
44
|
};
|
|
45
|
-
export declare function ActionProvider(props: PropsWithChildren):
|
|
45
|
+
export declare function ActionProvider(props: PropsWithChildren): React.JSX.Element;
|
|
46
46
|
export declare function WithActionProviderContext<P extends {}>(Component: ComponentType<P>): FC<P>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, FC, PropsWithChildren } from 'react';
|
|
1
|
+
import { ComponentType, FC, PropsWithChildren, default as React } from 'react';
|
|
2
2
|
type AlertConfigOptionalType = {
|
|
3
3
|
[K in keyof AlertConfigType]?: AlertConfigType[K];
|
|
4
4
|
};
|
|
@@ -47,6 +47,6 @@ export type Result = {
|
|
|
47
47
|
isDenied: boolean;
|
|
48
48
|
};
|
|
49
49
|
export declare function UseAlert(): AlertContextType;
|
|
50
|
-
export declare function AlertProvider({ children }: PropsWithChildren):
|
|
50
|
+
export declare function AlertProvider({ children }: PropsWithChildren): React.JSX.Element;
|
|
51
51
|
export declare function WithAlertProvider<P extends object>(Component: ComponentType<P>): FC<P>;
|
|
52
52
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
1
|
+
import { default as React, HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
import { TranslationFunction } from '../component/Translation.tsx';
|
|
3
3
|
export declare enum Environment {
|
|
4
4
|
PROD = "prod",
|
|
@@ -31,4 +31,4 @@ export type Config = {
|
|
|
31
31
|
export declare function UseConfig(): Config;
|
|
32
32
|
export declare function ConfigProvider({ config, ...props }: {
|
|
33
33
|
config: Config;
|
|
34
|
-
} & PropsWithChildren):
|
|
34
|
+
} & PropsWithChildren): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { Config } from './ConfigContext.tsx';
|
|
3
3
|
declare const CrudProvider: ({ children, config }: {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
config: Config;
|
|
6
|
-
}) =>
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
7
|
export default CrudProvider;
|
|
@@ -34,10 +34,10 @@ declare const GetDataByAction: ({ actionRequest, loadOnInit, onError, throwOnErr
|
|
|
34
34
|
declare const DataProvider: ({ suspense, children }: {
|
|
35
35
|
children: ReactNode;
|
|
36
36
|
suspense?: ReactNode;
|
|
37
|
-
}) => string | number | bigint | boolean |
|
|
37
|
+
}) => string | number | bigint | boolean | React.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
38
38
|
declare const DataContextProvider: ({ data, children }: {
|
|
39
39
|
data: GetDataType | null;
|
|
40
40
|
children: ReactNode;
|
|
41
|
-
}) =>
|
|
41
|
+
}) => React.JSX.Element;
|
|
42
42
|
declare function WithDataProvider<P extends object>(Component: ComponentType<P>): FC<P>;
|
|
43
43
|
export { DataProvider, DataContextProvider, WithDataProvider, GetData, GetDataByAction };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren, SyntheticEvent } from 'react';
|
|
1
|
+
import { PropsWithChildren, SyntheticEvent, default as React } from 'react';
|
|
2
2
|
import { ActionRequestType } from '../type/ActionRequestType.tsx';
|
|
3
3
|
import { ActionType, ActionVisibility } from '../type/ActionType.tsx';
|
|
4
4
|
import { FormViewType } from '../type/FormViewType.tsx';
|
|
@@ -65,5 +65,5 @@ export declare function UseList<Item extends object = ListItemRow>(safe?: boolea
|
|
|
65
65
|
formView: FormViewType;
|
|
66
66
|
}[];
|
|
67
67
|
};
|
|
68
|
-
export declare function ListProvider({ embedded, onClick, children }: ListContextPropsType & PropsWithChildren):
|
|
68
|
+
export declare function ListProvider({ embedded, onClick, children }: ListContextPropsType & PropsWithChildren): React.JSX.Element;
|
|
69
69
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
export type ListItemContextType<TData = Record<string, any>> = {
|
|
3
3
|
index: number;
|
|
4
4
|
id?: string | number;
|
|
5
5
|
data: TData;
|
|
6
6
|
};
|
|
7
7
|
export declare function UseListItem<TData = Record<string, any>>(): ListItemContextType<TData>;
|
|
8
|
-
export declare function ListItemProvider({ children, ...props }: ListItemContextType & PropsWithChildren):
|
|
8
|
+
export declare function ListItemProvider({ children, ...props }: ListItemContextType & PropsWithChildren): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
export declare function UseDataLoaderIndicator(url?: string): {
|
|
3
3
|
isLoading: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare function DataLoaderIndicatorProvider({ ...props }: PropsWithChildren):
|
|
5
|
+
export declare function DataLoaderIndicatorProvider({ ...props }: PropsWithChildren): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, default as React } from 'react';
|
|
2
2
|
import { ActionRequestType } from '../type/ActionRequestType.tsx';
|
|
3
3
|
import { ModalType } from '../component/Modal.tsx';
|
|
4
4
|
export type ModalActionType = {
|
|
@@ -15,4 +15,4 @@ export declare function UseModal(): {
|
|
|
15
15
|
openModal: (modal: ModalActionType) => void;
|
|
16
16
|
closeModal: () => void;
|
|
17
17
|
};
|
|
18
|
-
export declare function ModalProvider(props: PropsWithChildren):
|
|
18
|
+
export declare function ModalProvider(props: PropsWithChildren): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
/** Whether this component belongs to a modal view, rather than the page behind it. */
|
|
3
|
+
export declare const useIsModal: () => boolean;
|
|
4
|
+
/** @internal Establishes the scope for a modal view and its descendants. */
|
|
5
|
+
export declare const ModalScopeProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
export declare function UseNamespace(): string;
|
|
3
3
|
export declare function NamespaceProvider({ namespace, ...props }: {
|
|
4
4
|
namespace: string;
|
|
5
|
-
} & PropsWithChildren):
|
|
5
|
+
} & PropsWithChildren): React.JSX.Element;
|