react-admin-base-bootstrap 0.8.13 → 0.8.15
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/lib/esm/Components/BootstrapDataTable.d.ts +7 -7
- package/lib/esm/Components/BootstrapDataTable.js +9 -5
- package/lib/esm/Components/BootstrapModal.d.ts +2 -1
- package/lib/esm/Components/BootstrapOptions.d.ts +2 -2
- package/lib/esm/Components/BootstrapPagination.d.ts +2 -1
- package/lib/esm/Components/CRUD.d.ts +3 -3
- package/lib/esm/Components/CheckBox.d.ts +1 -1
- package/lib/esm/Components/DefaultValidatorOptions.d.ts +1 -1
- package/lib/esm/Components/DragAndDropArrow.d.ts +2 -1
- package/lib/esm/Components/EntityEditor.d.ts +1 -1
- package/lib/esm/Components/ErrorBoundary.d.ts +1 -1
- package/lib/esm/Components/ExcelExportButton.d.ts +2 -1
- package/lib/esm/Components/ExternalLoginButton.d.ts +2 -1
- package/lib/esm/Components/FilePickerCore.d.ts +2 -2
- package/lib/esm/Components/GoToTop.d.ts +1 -1
- package/lib/esm/Components/ImagePicker.d.ts +2 -1
- package/lib/esm/Components/LanguageProvider.d.ts +2 -2
- package/lib/esm/Components/LoadingButton.d.ts +2 -1
- package/lib/esm/Components/MultiFilePicker.d.ts +1 -1
- package/lib/esm/Components/PasswordInput.d.ts +2 -1
- package/lib/esm/Components/SingleFilePicker.d.ts +1 -1
- package/lib/esm/Components/StepList.d.ts +2 -2
- package/lib/esm/Components/ThemeProvider.d.ts +2 -1
- package/lib/esm/Components/TitleOrTranslate.d.ts +2 -1
- package/lib/esm/Components/Validator.d.ts +4 -3
- package/lib/esm/i18n/de.json +2 -1
- package/lib/esm/i18n/en.json +2 -1
- package/lib/esm/i18n/tr.json +2 -1
- package/package.json +13 -13
- package/src/Components/BootstrapDataTable.tsx +20 -9
- package/src/i18n/de.json +2 -1
- package/src/i18n/en.json +2 -1
- package/src/i18n/tr.json +2 -1
- package/tsconfig.json +0 -1
|
@@ -8,10 +8,10 @@ type ActionsProp = {
|
|
|
8
8
|
rowSpan?: number | undefined;
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export declare function Actions({ edit, del, rowSpan, children }: ActionsProp): JSX.Element;
|
|
12
|
-
export declare function IdColumn(): JSX.Element;
|
|
13
|
-
export declare function ActionsColumn(): JSX.Element;
|
|
14
|
-
export declare function Column(props: any): JSX.Element;
|
|
11
|
+
export declare function Actions({ edit, del, rowSpan, children }: ActionsProp): React.JSX.Element;
|
|
12
|
+
export declare function IdColumn(): React.JSX.Element;
|
|
13
|
+
export declare function ActionsColumn(): React.JSX.Element;
|
|
14
|
+
export declare function Column(props: any): React.JSX.Element;
|
|
15
15
|
export interface BootstrapTableProps {
|
|
16
16
|
url: string;
|
|
17
17
|
bordered?: boolean;
|
|
@@ -25,7 +25,7 @@ export interface BootstrapTableProps {
|
|
|
25
25
|
interface RowRendererProps<Row = any> {
|
|
26
26
|
render: (row: Row) => React.ReactNode;
|
|
27
27
|
}
|
|
28
|
-
export declare function RowRenderer<Row = any>({ render }: RowRendererProps<Row>): JSX.Element;
|
|
29
|
-
export declare function CustomRenderer<Row = any>({ render }: RowRendererProps<Row>): JSX.Element;
|
|
30
|
-
export default function BootstrapTable({ url, bordered, noStrip, defaultParams, add, children, innerRef, body }: BootstrapTableProps): JSX.Element;
|
|
28
|
+
export declare function RowRenderer<Row = any>({ render }: RowRendererProps<Row>): React.JSX.Element;
|
|
29
|
+
export declare function CustomRenderer<Row = any>({ render }: RowRendererProps<Row>): React.JSX.Element;
|
|
30
|
+
export default function BootstrapTable({ url, bordered, noStrip, defaultParams, add, children, innerRef, body }: BootstrapTableProps): React.JSX.Element;
|
|
31
31
|
export {};
|
|
@@ -93,7 +93,7 @@ export function CustomRenderer({ render }) {
|
|
|
93
93
|
export default function BootstrapTable({ url, bordered, noStrip, defaultParams, add, children, innerRef, body }) {
|
|
94
94
|
const state = useState(Object.assign({ sort: 'id' }, defaultParams));
|
|
95
95
|
const [params, setParams] = state;
|
|
96
|
-
const [page, lastPage, setPage, data, itemPerPage, setItemPerPage, update] = useDataTable(url, params, body);
|
|
96
|
+
const [page, lastPage, setPage, data, itemPerPage, setItemPerPage, update, count] = useDataTable(url, params, body);
|
|
97
97
|
const intl = useIntl();
|
|
98
98
|
const [api] = useAuth();
|
|
99
99
|
const ref = useRef(defaultParams);
|
|
@@ -142,7 +142,8 @@ export default function BootstrapTable({ url, bordered, noStrip, defaultParams,
|
|
|
142
142
|
React.createElement("option", { value: "-1" }, intl.formatMessage({ id: "ALL" })))),
|
|
143
143
|
children[2],
|
|
144
144
|
React.createElement(Col, { md: "3", className: "ms-auto" },
|
|
145
|
-
React.createElement(Input, { placeholder: intl.formatMessage({ id: "SEARCH" }), type: "text", value: params.query || '', onChange: e => setParams(Object.assign(Object.assign({}, params), { query: e.currentTarget.value })) })))
|
|
145
|
+
React.createElement(Input, { placeholder: intl.formatMessage({ id: "SEARCH" }), type: "text", value: params.query || '', onChange: e => setParams(Object.assign(Object.assign({}, params), { query: e.currentTarget.value })) }))),
|
|
146
|
+
children[3]),
|
|
146
147
|
data === null ? React.createElement(Alert, { className: "text-center mb-0 mx-3 ", color: "warning" },
|
|
147
148
|
React.createElement("i", { className: "fas fa-spinner fa-spin" })) : !data.length ? React.createElement(Alert, { className: "text-center mx-3", color: "danger" },
|
|
148
149
|
React.createElement("i", { className: "far fa-times-circle" }),
|
|
@@ -150,7 +151,10 @@ export default function BootstrapTable({ url, bordered, noStrip, defaultParams,
|
|
|
150
151
|
React.createElement(FormattedMessage, { id: "NO_DATA_IS_AVAILABLE" })) : React.createElement(Table, { hover: true, bordered: bordered, striped: !noStrip, responsive: true, size: "md", className: "mb-0 dataTable" },
|
|
151
152
|
children[0],
|
|
152
153
|
children[1].type === "tbody" ? React.createElement("tbody", null, data && data.map(children[1].props.children)) : children[1]),
|
|
153
|
-
lastPage > 1 && React.createElement(CardFooter, null,
|
|
154
|
-
React.createElement("
|
|
155
|
-
React.createElement(
|
|
154
|
+
(lastPage > 1 || count > 0) && React.createElement(CardFooter, null,
|
|
155
|
+
React.createElement(Row, { className: "justify-content-between" },
|
|
156
|
+
React.createElement(Col, null, lastPage > 1 && React.createElement("nav", null,
|
|
157
|
+
React.createElement(BootstrapPagination, { currentPage: page, pageCount: lastPage, onPageChange: index => setPage(index) }))),
|
|
158
|
+
count > 0 && React.createElement(Col, { className: "col-auto align-self-center" },
|
|
159
|
+
React.createElement(FormattedMessage, { id: "RECORDS", values: { count } })))))))));
|
|
156
160
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import BootstrapOptions from "./BootstrapOptions";
|
|
3
3
|
interface BootstrapOptions {
|
|
4
4
|
noCloseModal: boolean;
|
|
@@ -7,5 +7,5 @@ interface BootstrapOptionsProviderProps extends BootstrapOptions {
|
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export declare function useBootstrapOptions(): BootstrapOptions;
|
|
10
|
-
export default function BootstrapOptionsProvider({ children, noCloseModal }: BootstrapOptionsProviderProps): JSX.Element;
|
|
10
|
+
export default function BootstrapOptionsProvider({ children, noCloseModal }: BootstrapOptionsProviderProps): React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
type BootstrapPaginationProps = {
|
|
2
3
|
className?: string;
|
|
3
4
|
currentPage: number;
|
|
4
5
|
pageCount: number;
|
|
5
6
|
onPageChange: (page: number) => void;
|
|
6
7
|
};
|
|
7
|
-
export default function BootstrapPagination({ className, currentPage, pageCount, onPageChange }: BootstrapPaginationProps): JSX.Element | null;
|
|
8
|
+
export default function BootstrapPagination({ className, currentPage, pageCount, onPageChange }: BootstrapPaginationProps): React.JSX.Element | null;
|
|
8
9
|
export {};
|
|
@@ -9,18 +9,18 @@ type ModalEntityEditorParams = {
|
|
|
9
9
|
disabled?: Boolean;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
};
|
|
12
|
-
export declare function ModalEntityEditor({ entity, title, size, url, onReload, disabled, children }: ModalEntityEditorParams): JSX.Element;
|
|
12
|
+
export declare function ModalEntityEditor({ entity, title, size, url, onReload, disabled, children }: ModalEntityEditorParams): React.JSX.Element;
|
|
13
13
|
type CrudActionProps = {
|
|
14
14
|
id: any;
|
|
15
15
|
edit?: Boolean;
|
|
16
16
|
del: string;
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
};
|
|
19
|
-
export declare function CRUDActions({ id, edit, del, children }: CrudActionProps): JSX.Element;
|
|
19
|
+
export declare function CRUDActions({ id, edit, del, children }: CrudActionProps): React.JSX.Element;
|
|
20
20
|
interface CRUDProps extends BootstrapTableProps {
|
|
21
21
|
apiUrl?: string;
|
|
22
22
|
Component: any;
|
|
23
23
|
noAdd?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export default function CRUD(props: CRUDProps): JSX.Element;
|
|
25
|
+
export default function CRUD(props: CRUDProps): React.JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -2,5 +2,5 @@ import React from "react";
|
|
|
2
2
|
type DefaultValidatorOptionsProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export default function DefaultValidatorOptions({ children }: DefaultValidatorOptionsProps): JSX.Element;
|
|
5
|
+
export default function DefaultValidatorOptions({ children }: DefaultValidatorOptionsProps): React.JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -7,5 +7,5 @@ type EntityEditorParams = {
|
|
|
7
7
|
disabled?: Boolean;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
};
|
|
10
|
-
export default function EntityEditor({ entity, disabled, children, onSave, saveButtonClassName, saveButtonText }: EntityEditorParams): JSX.Element;
|
|
10
|
+
export default function EntityEditor({ entity, disabled, children, onSave, saveButtonClassName, saveButtonText }: EntityEditorParams): React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -10,5 +10,5 @@ export default class ErrorBoundary extends React.Component<{
|
|
|
10
10
|
hasError: boolean;
|
|
11
11
|
error: any;
|
|
12
12
|
};
|
|
13
|
-
render(): string | number | boolean | JSX.Element | React.
|
|
13
|
+
render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
14
14
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export default function ExcelExportButton({ name, header, params, size, map, extra }: {
|
|
2
3
|
name: any;
|
|
3
4
|
header: any;
|
|
@@ -5,4 +6,4 @@ export default function ExcelExportButton({ name, header, params, size, map, ext
|
|
|
5
6
|
size: any;
|
|
6
7
|
map: any;
|
|
7
8
|
extra: any;
|
|
8
|
-
}): JSX.Element;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type ExternalLoginButtonProps = {
|
|
2
3
|
id: string;
|
|
3
4
|
icon?: string;
|
|
4
5
|
name: string;
|
|
5
6
|
url: string;
|
|
6
7
|
};
|
|
7
|
-
export default function ExternalLoginButton({ id, icon, name, url }: ExternalLoginButtonProps): JSX.Element;
|
|
8
|
+
export default function ExternalLoginButton({ id, icon, name, url }: ExternalLoginButtonProps): React.JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -5,7 +5,7 @@ type RelativeProps = {
|
|
|
5
5
|
export declare function Relative({ children }: RelativeProps): React.FunctionComponentElement<any> | null;
|
|
6
6
|
export declare function Preview({ value }: {
|
|
7
7
|
value: any;
|
|
8
|
-
}): JSX.Element | null;
|
|
8
|
+
}): React.JSX.Element | null;
|
|
9
9
|
export default function FilePickerCore({ disabled, index, move, className, accepts, value, onNotify, children, transform }: {
|
|
10
10
|
disabled?: any;
|
|
11
11
|
index?: number;
|
|
@@ -16,5 +16,5 @@ export default function FilePickerCore({ disabled, index, move, className, accep
|
|
|
16
16
|
onNotify?: any;
|
|
17
17
|
children?: any;
|
|
18
18
|
transform?: any;
|
|
19
|
-
}): JSX.Element | null;
|
|
19
|
+
}): React.JSX.Element | null;
|
|
20
20
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SingleFilePickerProps } from './SingleFilePicker';
|
|
2
3
|
interface ImagePickerProps extends SingleFilePickerProps {
|
|
3
4
|
width: number;
|
|
@@ -5,5 +6,5 @@ interface ImagePickerProps extends SingleFilePickerProps {
|
|
|
5
6
|
type: string;
|
|
6
7
|
exact?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export default function ImagePicker(props: ImagePickerProps): JSX.Element;
|
|
9
|
+
export default function ImagePicker(props: ImagePickerProps): React.JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -6,6 +6,6 @@ type LanguageProviderProps = {
|
|
|
6
6
|
loader?: (language: any) => any;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export default function LanguageProvider({ defaultLanguage, languages, loader, children }: LanguageProviderProps): JSX.Element | null;
|
|
10
|
-
export declare function LanguageSwitcher(): JSX.Element | null;
|
|
9
|
+
export default function LanguageProvider({ defaultLanguage, languages, loader, children }: LanguageProviderProps): React.JSX.Element | null;
|
|
10
|
+
export declare function LanguageSwitcher(): React.JSX.Element | null;
|
|
11
11
|
export {};
|
|
@@ -8,5 +8,5 @@ type MultiFilePickerProps = {
|
|
|
8
8
|
noMove?: boolean;
|
|
9
9
|
children?: (value: any) => React.ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export default function MultiFilePicker({ disabled, className, noMove, accepts, value, onChange, children }: MultiFilePickerProps): JSX.Element;
|
|
11
|
+
export default function MultiFilePicker({ disabled, className, noMove, accepts, value, onChange, children }: MultiFilePickerProps): React.JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
interface PasswordInputParams {
|
|
2
3
|
value?: string;
|
|
3
4
|
onChange: (str: string) => any;
|
|
@@ -7,5 +8,5 @@ interface PasswordInputParams {
|
|
|
7
8
|
required?: boolean;
|
|
8
9
|
placeholder?: string;
|
|
9
10
|
}
|
|
10
|
-
export default function PasswordInput({ value, onChange, className, disabled, icon, required, placeholder }: PasswordInputParams): JSX.Element;
|
|
11
|
+
export default function PasswordInput({ value, onChange, className, disabled, icon, required, placeholder }: PasswordInputParams): React.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -8,4 +8,4 @@ export interface SingleFilePickerProps {
|
|
|
8
8
|
children?: (value: any) => React.ReactNode;
|
|
9
9
|
transform?: any;
|
|
10
10
|
}
|
|
11
|
-
export default function SingleFilePicker({ disabled, className, accepts, value, onChange, transform, children }: SingleFilePickerProps): JSX.Element;
|
|
11
|
+
export default function SingleFilePicker({ disabled, className, accepts, value, onChange, transform, children }: SingleFilePickerProps): React.JSX.Element;
|
|
@@ -4,11 +4,11 @@ type StepListProps = {
|
|
|
4
4
|
setActive: (active: number) => {};
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
export default function StepList({ active, setActive, children }: StepListProps): JSX.Element;
|
|
7
|
+
export default function StepList({ active, setActive, children }: StepListProps): React.JSX.Element;
|
|
8
8
|
type StepItemProps = {
|
|
9
9
|
title?: string;
|
|
10
10
|
translate?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare function StepItem({ title, translate, disabled }: StepItemProps): JSX.Element;
|
|
13
|
+
export declare function StepItem({ title, translate, disabled }: StepItemProps): React.JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export declare function useTheme(): any;
|
|
2
3
|
export declare function useAllThemes(): any;
|
|
3
4
|
export default function ThemeProvider({ themes, defaultTheme, children }: {
|
|
4
5
|
themes: any;
|
|
5
6
|
defaultTheme: any;
|
|
6
7
|
children: any;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
+
}): React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export interface TitleOrTranslateProps {
|
|
2
3
|
title?: string;
|
|
3
4
|
translate?: string;
|
|
4
5
|
values?: Record<string, any>;
|
|
5
6
|
}
|
|
6
|
-
export default function TitleOrTranslate({ title, translate, values }: TitleOrTranslateProps): JSX.Element;
|
|
7
|
+
export default function TitleOrTranslate({ title, translate, values }: TitleOrTranslateProps): React.JSX.Element;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type ValidatorProps = {
|
|
2
3
|
name: string;
|
|
3
4
|
type: any;
|
|
4
5
|
children: JSX.Element;
|
|
5
6
|
};
|
|
6
|
-
export declare function Validator({ name, type, children }: ValidatorProps): JSX.Element;
|
|
7
|
+
export declare function Validator({ name, type, children }: ValidatorProps): React.JSX.Element;
|
|
7
8
|
type ValueValidatorProps = {
|
|
8
9
|
name: string;
|
|
9
10
|
type: any;
|
|
10
11
|
value: any;
|
|
11
12
|
children: any;
|
|
12
13
|
};
|
|
13
|
-
export declare function ValueValidator({ name, value, type, children }: ValueValidatorProps): JSX.Element;
|
|
14
|
-
export declare function ValidationErrors(): JSX.Element | null;
|
|
14
|
+
export declare function ValueValidator({ name, value, type, children }: ValueValidatorProps): React.JSX.Element;
|
|
15
|
+
export declare function ValidationErrors(): React.JSX.Element | null;
|
|
15
16
|
export {};
|
package/lib/esm/i18n/de.json
CHANGED
|
@@ -37,5 +37,6 @@
|
|
|
37
37
|
"ACTIONS.DELETE.TEXT": "Diese Aktion ist nicht umkehrbar!",
|
|
38
38
|
"ACTIONS.DELETE.CONFIRM": "Ja, löschen!",
|
|
39
39
|
"PLEASE_WAIT": "Warten Sie mal.",
|
|
40
|
-
"AUTHORIZATION_CODE": "Zugangscode"
|
|
40
|
+
"AUTHORIZATION_CODE": "Zugangscode",
|
|
41
|
+
"RECORDS": "{count, plural, =0 {kein eintrag} one {# datensatz} other {# datensätze}}"
|
|
41
42
|
}
|
package/lib/esm/i18n/en.json
CHANGED
|
@@ -39,5 +39,6 @@
|
|
|
39
39
|
"ACTIONS.DELETE.TEXT": "You won't be able to revert this!",
|
|
40
40
|
"ACTIONS.DELETE.CONFIRM": "Yes, delete it!",
|
|
41
41
|
"PLEASE_WAIT": "Please wait.",
|
|
42
|
-
"AUTHORIZATION_CODE": "Authorization Code"
|
|
42
|
+
"AUTHORIZATION_CODE": "Authorization Code",
|
|
43
|
+
"RECORDS": "{count, plural, =0 {no records} one {# record} other {# records}}"
|
|
43
44
|
}
|
package/lib/esm/i18n/tr.json
CHANGED
|
@@ -38,5 +38,6 @@
|
|
|
38
38
|
"ACTIONS.DELETE.TEXT": "Bu işlem geri alınamaz!",
|
|
39
39
|
"ACTIONS.DELETE.CONFIRM": "Evet, sil!",
|
|
40
40
|
"PLEASE_WAIT": "Lütfen bekleyiniz.",
|
|
41
|
-
"AUTHORIZATION_CODE": "Yetki Kodu"
|
|
41
|
+
"AUTHORIZATION_CODE": "Yetki Kodu",
|
|
42
|
+
"RECORDS": "{count, plural, =0 {Kayıt yok} one {# kayıt} other {# kayıt}}"
|
|
42
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-admin-base-bootstrap",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -28,31 +28,31 @@
|
|
|
28
28
|
"react": "^18.2.0",
|
|
29
29
|
"react-dom": "^18.2.0",
|
|
30
30
|
"react-intl": "^6.2.10",
|
|
31
|
-
"react-router-dom": "^6.
|
|
31
|
+
"react-router-dom": "^6.13.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@emotion/react": "^11.
|
|
35
|
-
"@fortawesome/fontawesome-free": "^6.
|
|
36
|
-
"bootstrap": "^5.
|
|
34
|
+
"@emotion/react": "^11.11.1",
|
|
35
|
+
"@fortawesome/fontawesome-free": "^6.4.0",
|
|
36
|
+
"bootstrap": "^5.3.0",
|
|
37
37
|
"file-dialog": "^0.0.8",
|
|
38
38
|
"modal-cropper": "^1.2.3",
|
|
39
39
|
"nprogress": "^0.2.0",
|
|
40
40
|
"prettysize": "^2.0.0",
|
|
41
|
-
"react-admin-base": "^0.8.
|
|
41
|
+
"react-admin-base": "^0.8.8",
|
|
42
42
|
"react-dnd": "^16.0.1",
|
|
43
43
|
"react-dnd-html5-backend": "^16.0.1",
|
|
44
44
|
"react-password-strength-bar": "^0.4.1",
|
|
45
45
|
"react-responsive": "^9.0.2",
|
|
46
|
-
"react-select": "^5.7.
|
|
47
|
-
"reactstrap": "^9.
|
|
46
|
+
"react-select": "^5.7.3",
|
|
47
|
+
"reactstrap": "^9.2.0",
|
|
48
48
|
"rewire": "^6.0.0",
|
|
49
|
-
"sweetalert2": "^11.7.
|
|
49
|
+
"sweetalert2": "^11.7.12"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/react": "^18.
|
|
52
|
+
"@types/react": "^18.2.12",
|
|
53
53
|
"cross-env": "^7.0.3",
|
|
54
|
-
"nodemon": "^2.0.
|
|
55
|
-
"react-intl": "^6.
|
|
56
|
-
"typescript": "^
|
|
54
|
+
"nodemon": "^2.0.22",
|
|
55
|
+
"react-intl": "^6.4.4",
|
|
56
|
+
"typescript": "^5.1.3"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -126,7 +126,7 @@ export function CustomRenderer<Row = any>({render}: RowRendererProps<Row>) {
|
|
|
126
126
|
export default function BootstrapTable({url, bordered, noStrip, defaultParams, add, children, innerRef, body}: BootstrapTableProps) {
|
|
127
127
|
const state = useState({sort: 'id', ...defaultParams});
|
|
128
128
|
const [params, setParams] = state;
|
|
129
|
-
const [page, lastPage, setPage, data, itemPerPage, setItemPerPage, update] = useDataTable(url, params, body);
|
|
129
|
+
const [page, lastPage, setPage, data, itemPerPage, setItemPerPage, update, count] = useDataTable(url, params, body);
|
|
130
130
|
const intl = useIntl();
|
|
131
131
|
const [ api ] = useAuth();
|
|
132
132
|
|
|
@@ -186,6 +186,7 @@ export default function BootstrapTable({url, bordered, noStrip, defaultParams, a
|
|
|
186
186
|
/>
|
|
187
187
|
</Col>
|
|
188
188
|
</Row>
|
|
189
|
+
{children[3]}
|
|
189
190
|
</CardHeader>
|
|
190
191
|
{data === null ? <Alert className="text-center mb-0 mx-3 " color="warning"><i className="fas fa-spinner fa-spin"></i></Alert> : !data.length ? <Alert className="text-center mx-3" color="danger">
|
|
191
192
|
<i className="far fa-times-circle"></i> <FormattedMessage id="NO_DATA_IS_AVAILABLE"/>
|
|
@@ -195,14 +196,24 @@ export default function BootstrapTable({url, bordered, noStrip, defaultParams, a
|
|
|
195
196
|
{data && data.map(children[1].props.children)}
|
|
196
197
|
</tbody> : children[1]}
|
|
197
198
|
</Table>}
|
|
198
|
-
{ lastPage > 1 && <CardFooter>
|
|
199
|
-
<
|
|
200
|
-
<
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
{ (lastPage > 1 || count > 0) && <CardFooter>
|
|
200
|
+
<Row className="justify-content-between">
|
|
201
|
+
<Col>
|
|
202
|
+
{ lastPage > 1 && <nav>
|
|
203
|
+
<BootstrapPagination
|
|
204
|
+
currentPage={page}
|
|
205
|
+
pageCount={lastPage}
|
|
206
|
+
onPageChange={index => setPage(index)}
|
|
207
|
+
/>
|
|
208
|
+
</nav> }
|
|
209
|
+
</Col>
|
|
210
|
+
{ count > 0 && <Col className="col-auto align-self-center">
|
|
211
|
+
<FormattedMessage
|
|
212
|
+
id="RECORDS"
|
|
213
|
+
values={{ count }}
|
|
214
|
+
/>
|
|
215
|
+
</Col> }
|
|
216
|
+
</Row>
|
|
206
217
|
</CardFooter> }
|
|
207
218
|
</RowDatasContext.Provider>
|
|
208
219
|
</RefreshScope>
|
package/src/i18n/de.json
CHANGED
|
@@ -37,5 +37,6 @@
|
|
|
37
37
|
"ACTIONS.DELETE.TEXT": "Diese Aktion ist nicht umkehrbar!",
|
|
38
38
|
"ACTIONS.DELETE.CONFIRM": "Ja, löschen!",
|
|
39
39
|
"PLEASE_WAIT": "Warten Sie mal.",
|
|
40
|
-
"AUTHORIZATION_CODE": "Zugangscode"
|
|
40
|
+
"AUTHORIZATION_CODE": "Zugangscode",
|
|
41
|
+
"RECORDS": "{count, plural, =0 {kein eintrag} one {# datensatz} other {# datensätze}}"
|
|
41
42
|
}
|
package/src/i18n/en.json
CHANGED
|
@@ -39,5 +39,6 @@
|
|
|
39
39
|
"ACTIONS.DELETE.TEXT": "You won't be able to revert this!",
|
|
40
40
|
"ACTIONS.DELETE.CONFIRM": "Yes, delete it!",
|
|
41
41
|
"PLEASE_WAIT": "Please wait.",
|
|
42
|
-
"AUTHORIZATION_CODE": "Authorization Code"
|
|
42
|
+
"AUTHORIZATION_CODE": "Authorization Code",
|
|
43
|
+
"RECORDS": "{count, plural, =0 {no records} one {# record} other {# records}}"
|
|
43
44
|
}
|
package/src/i18n/tr.json
CHANGED
|
@@ -38,5 +38,6 @@
|
|
|
38
38
|
"ACTIONS.DELETE.TEXT": "Bu işlem geri alınamaz!",
|
|
39
39
|
"ACTIONS.DELETE.CONFIRM": "Evet, sil!",
|
|
40
40
|
"PLEASE_WAIT": "Lütfen bekleyiniz.",
|
|
41
|
-
"AUTHORIZATION_CODE": "Yetki Kodu"
|
|
41
|
+
"AUTHORIZATION_CODE": "Yetki Kodu",
|
|
42
|
+
"RECORDS": "{count, plural, =0 {Kayıt yok} one {# kayıt} other {# kayıt}}"
|
|
42
43
|
}
|