@mtes-mct/monitor-ui 24.7.0 → 24.8.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 +12 -0
- package/index.js +5 -3
- package/package.json +1 -1
- package/tables/DataTable/index.d.ts +3 -1
- package/tables/DataTable/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [24.7.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.6.0...v24.7.0) (2024-11-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **global:** export fonts from assets ([d0c53da](https://github.com/MTES-MCT/monitor-ui/commit/d0c53da5beabce301e156bcff15f99addcea3397))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Buid System & Dependencies
|
|
10
|
+
|
|
11
|
+
* **dev-deps:** bump the all-non-major-dependencies group ([7522a2a](https://github.com/MTES-MCT/monitor-ui/commit/7522a2a0a8bdac49f44b4175f8c6fd2f0de98243))
|
|
12
|
+
|
|
1
13
|
## [24.6.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.5.0...v24.6.0) (2024-11-06)
|
|
2
14
|
|
|
3
15
|
|
package/index.js
CHANGED
|
@@ -73903,7 +73903,7 @@ function Th$1({ children, header }) {
|
|
|
73903
73903
|
}, header.id);
|
|
73904
73904
|
}
|
|
73905
73905
|
|
|
73906
|
-
function DataTable({ columns, data, initialSorting, tableOptions, withoutHead = false }) {
|
|
73906
|
+
function DataTable({ columns, data, emptyLabel, initialSorting, tableOptions, withoutHead = false }) {
|
|
73907
73907
|
const [sorting, setSorting] = useState(initialSorting);
|
|
73908
73908
|
const table = useReactTable({
|
|
73909
73909
|
columns,
|
|
@@ -73922,13 +73922,15 @@ function DataTable({ columns, data, initialSorting, tableOptions, withoutHead =
|
|
|
73922
73922
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
73923
73923
|
children: [
|
|
73924
73924
|
!data && /*#__PURE__*/ jsx("p", {
|
|
73925
|
+
className: "Table-DataTable--loadingLabel",
|
|
73925
73926
|
children: "Chargement en cours..."
|
|
73926
73927
|
}),
|
|
73927
73928
|
data && /*#__PURE__*/ jsxs(Fragment, {
|
|
73928
73929
|
children: [
|
|
73929
|
-
!data.length && /*#__PURE__*/ jsx("p", {
|
|
73930
|
+
!data.length && (emptyLabel ?? /*#__PURE__*/ jsx("p", {
|
|
73931
|
+
className: "Table-DataTable--emptyLabel",
|
|
73930
73932
|
children: "Aucune donnée."
|
|
73931
|
-
}),
|
|
73933
|
+
})),
|
|
73932
73934
|
data.length > 0 && /*#__PURE__*/ jsxs(SimpleTable.Table, {
|
|
73933
73935
|
children: [
|
|
73934
73936
|
!withoutHead && /*#__PURE__*/ jsx(SimpleTable.Head, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtes-mct/monitor-ui",
|
|
3
3
|
"description": "Common React components, hooks, utilities and CSS stylesheets for MonitorFish, MonitorEnv and RapportNav.",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.8.0",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type ColumnDef, type SortingState, type TableOptions } from '@tanstack/react-table';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
2
3
|
import type { AnyObject } from '../../types/definitions';
|
|
3
4
|
export type DataTableProps<T extends AnyObject> = {
|
|
4
5
|
columns: Array<ColumnDef<T>>;
|
|
5
6
|
data: T[] | undefined;
|
|
7
|
+
emptyLabel?: ReactNode;
|
|
6
8
|
initialSorting: SortingState;
|
|
7
9
|
tableOptions?: Partial<TableOptions<T>> | undefined;
|
|
8
10
|
withoutHead?: boolean | undefined;
|
|
9
11
|
};
|
|
10
|
-
export declare function DataTable<T extends AnyObject>({ columns, data, initialSorting, tableOptions, withoutHead }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function DataTable<T extends AnyObject>({ columns, data, emptyLabel, initialSorting, tableOptions, withoutHead }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tables/DataTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,YAAY,EAIlB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tables/DataTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,YAAY,EAIlB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAOhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI;IAChD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5B,IAAI,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;IACrB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,cAAc,EAAE,YAAY,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IACnD,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAClC,CAAA;AACD,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,EAC7C,OAAO,EACP,IAAI,EACJ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,WAAmB,EACpB,EAAE,cAAc,CAAC,CAAC,CAAC,2CAyDnB"}
|