@amateescu/portal-ui-components 0.0.9 → 0.0.10-beta0

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.
@@ -0,0 +1 @@
1
+ export declare function CustomFooter({ total, columnsDefinitions, isRtl }: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsxs as h, Fragment as l, jsx as r } from "react/jsx-runtime";
2
+ import * as t from "react";
3
+ import { CustomPagination as w } from "../CustomPagination/CustomPagination.js";
4
+ import { TotalDataGrid as p } from "../TotalDataGrid/TotalDataGrid.js";
5
+ import { useGridApiContext as m, useGridSelector as i, gridFilteredTopLevelRowCountSelector as v, useGridRootProps as u, gridPageSizeSelector as L, GridFooterContainer as k } from "@mui/x-data-grid";
6
+ const f = (e) => /* @__PURE__ */ t.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("g", { id: "arrow/chevron/</default-first" }, /* @__PURE__ */ t.createElement("path", { id: "vector", d: "M17.5 5L10.5 12L17.5 19M7.5 5L7.5 19", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }))), x = (e) => /* @__PURE__ */ t.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("g", { id: "arrow/chevron/>/end" }, /* @__PURE__ */ t.createElement("path", { id: "vector", d: "M7.5 4.99998L14.5 12L7.5 19M17.5 4.99998L17.5 19", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }))), E = (e) => /* @__PURE__ */ t.createElement("svg", { width: 10, height: 16, viewBox: "0 0 10 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { d: "M1.5 1L8.5 8L1.5 15", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), C = (e) => /* @__PURE__ */ t.createElement("svg", { width: 10, height: 16, viewBox: "0 0 10 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { d: "M8.5 15L1.5 8L8.5 1", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), S = (e, o) => o > 0 && e > 0 ? Math.ceil(e / o) : 0;
7
+ function G({ total: e, columnsDefinitions: o, isRtl: s }) {
8
+ const n = m(), c = i(n, v), d = u(), a = i(n, L), g = S(d.rowCount ?? c, a);
9
+ return /* @__PURE__ */ h(l, { children: [
10
+ /* @__PURE__ */ r("div", { style: { paddingTop: "10px", height: "7%" }, children: (e == null ? void 0 : e.length) > 0 && /* @__PURE__ */ r(
11
+ p,
12
+ {
13
+ rows: e,
14
+ isFetching: !1,
15
+ columnsDefinitions: o
16
+ }
17
+ ) }),
18
+ /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(
19
+ w,
20
+ {
21
+ isRtl: s,
22
+ pageCount: g,
23
+ arrowFirstIcon: f,
24
+ arrowLastIcon: x,
25
+ nextIcon: E,
26
+ previousIcon: C
27
+ }
28
+ ) })
29
+ ] });
30
+ }
31
+ export {
32
+ G as CustomFooter
33
+ };
@@ -0,0 +1,2 @@
1
+ import { default as TotalDataGridProps } from './TotalDataGrid.types';
2
+ export declare const TotalDataGrid: React.FC<TotalDataGridProps>;
package/dist/main.d.ts CHANGED
@@ -6,4 +6,4 @@ export { InfoModal } from './components/InfoModal';
6
6
  export { KpiCard } from './components/KpiCard';
7
7
  export { KpiWrapper } from './components/KpiWrapper';
8
8
  export { LoadingAnimation } from './components/LoadingAnimation';
9
- export { TotalDataGrid } from './components/TotalDataGrid';
9
+ export { TotalDataGrid } from './components/TotalDataGrid/TotalDataGrid';
package/dist/main.js CHANGED
@@ -6,7 +6,7 @@ import { InfoModal as x } from "./components/InfoModal/index.js";
6
6
  import { KpiCard as l } from "./components/KpiCard/index.js";
7
7
  import { KpiWrapper as u } from "./components/KpiWrapper/index.js";
8
8
  import { LoadingAnimation as g } from "./components/LoadingAnimation/index.js";
9
- import { TotalDataGrid as K } from "./components/TotalDataGrid/index.js";
9
+ import { TotalDataGrid as K } from "./components/TotalDataGrid/TotalDataGrid.js";
10
10
  export {
11
11
  t as ConfirmationModal,
12
12
  m as CustomButton,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@amateescu/portal-ui-components",
3
3
  "main": "dist/main.js",
4
4
  "types": "dist/main.d.ts",
5
- "version": "0.0.9",
5
+ "version": "0.0.10-beta0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"
@@ -1,2 +0,0 @@
1
- import { default as TotalDataGridProps } from './types';
2
- export declare const TotalDataGrid: React.FC<TotalDataGridProps>;