react-crud-mui 0.0.1-beta.51 → 0.0.1-beta.53
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/dist/components/detail-page/components/DetailPageModalLayout.d.ts +3 -0
- package/dist/components/detail-page/hooks/useDetailPageModal.d.ts +1 -0
- package/dist/components/detail-page/pages/DetailPageModal.d.ts +4 -0
- package/dist/components/hooks/index.d.ts +1 -0
- package/dist/components/hooks/useSpinDelay.d.ts +31 -0
- package/dist/components/i18n/resources/en.json.d.ts +1 -0
- package/dist/components/i18n/resources/tr.json.d.ts +1 -0
- package/dist/components/page/Page.d.ts +3 -1
- package/dist/components/progress/Progress.d.ts +9 -0
- package/dist/components/theme/components/accordion.d.ts +2 -6
- package/dist/coreui.js +3811 -3710
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PageLayoutProps } from '../../page/components/DefaultLayout';
|
|
2
|
+
declare function DetailPageModalLayout({ options, content, alertsContent, footerContent, moreContent, pageHeader, panelsContent, progressContent, tabsContent, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default DetailPageModalLayout;
|
|
@@ -426,6 +426,7 @@ declare function useDetailPageModal<TModel extends FieldValues>({ models, unique
|
|
|
426
426
|
readonly showHeader?: boolean;
|
|
427
427
|
readonly showCommands?: boolean;
|
|
428
428
|
readonly morePanelProps?: import('../../more-panel/MorePanel').MorePanelProps;
|
|
429
|
+
readonly loadingOptions?: import('../../hooks/useSpinDelay').SpinDelayOptions;
|
|
429
430
|
readonly disableShortCuts?: boolean;
|
|
430
431
|
readonly tabsPosition?: import('../../page/Page').TabsPosition;
|
|
431
432
|
readonly selectedTabIndex?: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
2
|
import { ModalProps } from '../../modal/Modal';
|
|
3
|
+
import { default as DetailPageModalLayout } from '../components/DetailPageModalLayout';
|
|
3
4
|
import { UseFormPromptProps } from '../hooks/useFormPrompt';
|
|
4
5
|
import { DetailPageProps } from './DetailPage';
|
|
5
6
|
export interface DetailPageModalProps<TModel extends FieldValues> extends DetailPageProps<TModel> {
|
|
@@ -17,4 +18,7 @@ export interface DetailPageModalProps<TModel extends FieldValues> extends Detail
|
|
|
17
18
|
promptOptions?: UseFormPromptProps;
|
|
18
19
|
}
|
|
19
20
|
declare function DetailPageModal<TModel extends FieldValues>({ modalProps, onClose, open, enableClose, promptOptions, ...rest }: DetailPageModalProps<TModel>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare namespace DetailPageModal {
|
|
22
|
+
var Layout: typeof DetailPageModalLayout;
|
|
23
|
+
}
|
|
20
24
|
export default DetailPageModal;
|
|
@@ -11,3 +11,4 @@ export { default as useMountEffect } from './useMountEffect';
|
|
|
11
11
|
export { default as useTemplate } from '../combobox/hooks/useComboboxTemplate';
|
|
12
12
|
export { default as useUpdateEffect } from './useUpdateEffect';
|
|
13
13
|
export { default as useZodRefine } from './useZodRefine';
|
|
14
|
+
export { useSpinDelay } from './useSpinDelay';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface SpinDelayOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The delay in milliseconds before the spinner is displayed.
|
|
4
|
+
* @default 500
|
|
5
|
+
*/
|
|
6
|
+
delay?: number;
|
|
7
|
+
/**
|
|
8
|
+
* The minimum duration in milliseconds the spinner is displayed.
|
|
9
|
+
* @default 200
|
|
10
|
+
*/
|
|
11
|
+
minDuration?: number;
|
|
12
|
+
maxDuration?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to enable the spinner on the server side. If true, `delay` will be
|
|
15
|
+
* ignored, and the spinner will be shown immediately if `loading` is true.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
ssr?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type State = 'IDLE' | 'DELAY' | 'DISPLAY' | 'EXPIRE' | 'TOO_LONG';
|
|
21
|
+
export declare const defaultOptions: {
|
|
22
|
+
delay: number;
|
|
23
|
+
minDuration: number;
|
|
24
|
+
maxDuration: number;
|
|
25
|
+
ssr: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare function useSpinDelay(loading: boolean, options?: SpinDelayOptions): {
|
|
28
|
+
readonly isLoading: boolean;
|
|
29
|
+
readonly state: State;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -137,6 +137,7 @@ declare const _default: {
|
|
|
137
137
|
"no": "No",
|
|
138
138
|
"nodatafound": "No item found to display",
|
|
139
139
|
"pleasewait": "Please wait",
|
|
140
|
+
"takingtoolong": "We’re working on it,please hold on",
|
|
140
141
|
"prevpage": "Previous record",
|
|
141
142
|
"prevstep": "Previous Step",
|
|
142
143
|
"promptunsavedchanges": "Unsaved changes detected, continue ?",
|
|
@@ -136,6 +136,7 @@ declare const _default: {
|
|
|
136
136
|
"no": "Hayır",
|
|
137
137
|
"nodatafound": "Gösterilecek kayıt bulunamadı",
|
|
138
138
|
"pleasewait": "Lütfen bekleyiniz",
|
|
139
|
+
"takingtoolong": "İşlem biraz zaman aliyor.Lütfen bekleyiniz",
|
|
139
140
|
"prevpage": "Önceki kayıt",
|
|
140
141
|
"prevstep": "Önceki Adım",
|
|
141
142
|
"promptunsavedchanges": "Kayıt edilmemiş değişiklikleriniz var! Devam etmek istiyormusunuz ?",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { HeaderProps } from '../header/Header';
|
|
3
|
+
import { SpinDelayOptions } from '../hooks/useSpinDelay';
|
|
3
4
|
import { MorePanelProps } from '../more-panel/MorePanel';
|
|
4
5
|
import { default as DefaultLayout, PageLayoutProps } from './components/DefaultLayout';
|
|
5
6
|
import { PanelPane } from './components/DefaultPanels';
|
|
@@ -27,6 +28,7 @@ export interface PageProps extends HeaderProps {
|
|
|
27
28
|
size?: PaddingSize;
|
|
28
29
|
disabled?: boolean;
|
|
29
30
|
loading?: boolean;
|
|
31
|
+
loadingOptions?: SpinDelayOptions;
|
|
30
32
|
disableShortCuts?: boolean;
|
|
31
33
|
tabs?: TabPane[];
|
|
32
34
|
tabsPosition?: TabsPosition;
|
|
@@ -37,7 +39,7 @@ export interface PageProps extends HeaderProps {
|
|
|
37
39
|
panels?: PanelPane[];
|
|
38
40
|
}
|
|
39
41
|
export declare const PagePadding: Record<PaddingSize, number>;
|
|
40
|
-
declare function Page({ alertsContent, bordered, children, commandsContent, commandsPosition,
|
|
42
|
+
declare function Page({ alertsContent, bordered, centerContent, children, commandsContent, commandsPosition, disabled, footerContent, loading, loadingOptions, moreContent, morePanelProps, onHeader, onLayout, onTabChanged, onTabs, panels, rightContent, selectedTabIndex, showCommands, showHeader, size, style, sx, tabs, tabsPosition, ...headerProps }: PageProps): import("react/jsx-runtime").JSX.Element;
|
|
41
43
|
declare namespace Page {
|
|
42
44
|
var Content: typeof PageContent;
|
|
43
45
|
var Divider: typeof PageDivider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LinearProgressProps } from '@mui/material';
|
|
2
|
+
import { SpinDelayOptions } from '../hooks/useSpinDelay';
|
|
3
|
+
export type ProgressProps = SpinDelayOptions & LinearProgressProps & {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
showTooLongNotification?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function Progress({ loading, visible, delay, minDuration, maxDuration, ssr, showTooLongNotification, ...rest }: ProgressProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default Progress;
|
|
@@ -5,10 +5,8 @@ export declare const AccordionDetails: (theme: Theme) => {
|
|
|
5
5
|
styleOverrides: {
|
|
6
6
|
root: {
|
|
7
7
|
fontSize: number;
|
|
8
|
-
paddingTop: number;
|
|
9
8
|
fontWeight: number;
|
|
10
|
-
|
|
11
|
-
paddingBottom: number;
|
|
9
|
+
padding: number;
|
|
12
10
|
color: string;
|
|
13
11
|
};
|
|
14
12
|
};
|
|
@@ -25,9 +23,7 @@ export declare const AccordionSummery: (theme: Theme) => {
|
|
|
25
23
|
color: string;
|
|
26
24
|
};
|
|
27
25
|
};
|
|
28
|
-
content: {
|
|
29
|
-
alignItems: string;
|
|
30
|
-
};
|
|
26
|
+
content: {};
|
|
31
27
|
expandIconWrapper: {
|
|
32
28
|
color: string;
|
|
33
29
|
};
|