@dilicorp/ui 0.0.27 → 0.0.30
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/page-list/page-list-get-filters.js +1 -1
- package/dist/components/page-show/page-show.d.ts.map +1 -1
- package/dist/components/page-show/page-show.js +1 -1
- package/dist/molecules/paginate.d.ts +1 -0
- package/dist/molecules/paginate.d.ts.map +1 -1
- package/dist/molecules/paginate.js +10 -5
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ export const PageListGetFilters = (props) => {
|
|
|
19
19
|
const filters = filterList === null || filterList === void 0 ? void 0 : filterList.props.children;
|
|
20
20
|
if (!filterList)
|
|
21
21
|
return null;
|
|
22
|
-
const visible = Array.isArray(filters) ? filters.slice(0, numFiltersVisible) : [filters];
|
|
22
|
+
const visible = Array.isArray(filters) ? filters.slice(0, numFiltersVisible) : [filters[0]];
|
|
23
23
|
const hidden = Array.isArray(filters) ? filters.slice(numFiltersVisible) : [];
|
|
24
24
|
const [showFilter, setShowFilter] = React.useState(false);
|
|
25
25
|
return (React.createElement(FilterForm, { search: search },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-show.d.ts","sourceRoot":"","sources":["../../../src/components/page-show/page-show.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAE1E,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,EAAE,MAAM,GAAC,KAAK,CAAC,SAAS,CAAA;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAClC,UAAU,CAAC,EAAE;QACX,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"page-show.d.ts","sourceRoot":"","sources":["../../../src/components/page-show/page-show.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAE1E,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,EAAE,MAAM,GAAC,KAAK,CAAC,SAAS,CAAA;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAClC,UAAU,CAAC,EAAE;QACX,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0C5C,CAAA"}
|
|
@@ -9,7 +9,7 @@ export const PageShow = (props) => {
|
|
|
9
9
|
React.createElement(Col, null,
|
|
10
10
|
React.createElement(Typography, { lineBottom: true, variant: "h4", tag: "h1" }, title)),
|
|
11
11
|
React.createElement(Col, { className: "ms-auto" },
|
|
12
|
-
Boolean(extraButtons.length) && (React.createElement(Dropdown, { color: "default", className: "me-2", label: React.createElement(Icon, { icon: "faEllipsisH" }), items: extraButtons })),
|
|
12
|
+
Boolean(extraButtons.length) && (React.createElement(Dropdown, { color: "default", className: "me-2", align: "right", label: React.createElement(Icon, { icon: "faEllipsisH" }), items: extraButtons })),
|
|
13
13
|
Boolean(backButton) && (React.createElement(Button, { tag: Link, href: backButton === null || backButton === void 0 ? void 0 : backButton.uri, color: "danger" },
|
|
14
14
|
React.createElement(Icon, { icon: "faAngleLeft", className: "me-1" }), backButton === null || backButton === void 0 ? void 0 :
|
|
15
15
|
backButton.label)))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginate.d.ts","sourceRoot":"","sources":["../../src/molecules/paginate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAuBzB,oBAAY,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"paginate.d.ts","sourceRoot":"","sources":["../../src/molecules/paginate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAuBzB,oBAAY,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsC5C,CAAA"}
|
|
@@ -17,15 +17,20 @@ const config = {
|
|
|
17
17
|
linkClassLast: 'arrow last'
|
|
18
18
|
};
|
|
19
19
|
export const Paginate = (props) => {
|
|
20
|
-
const { activePage, perPage, totalItems, currentCount, translate = '%1 out of %2 records' } = props;
|
|
20
|
+
const { activePage, perPage, totalItems, currentCount, translate = '%1 out of %2 records', onChange } = props;
|
|
21
21
|
const history = useLocation();
|
|
22
22
|
const navigate = useNavigate();
|
|
23
23
|
const search = uriHelper.parse(history.search);
|
|
24
24
|
const handleChange = (page) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
if (onChange) {
|
|
26
|
+
onChange(page);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
Object.assign(search, { page });
|
|
30
|
+
navigate({
|
|
31
|
+
search: uriHelper.stringify(search)
|
|
32
|
+
});
|
|
33
|
+
}
|
|
29
34
|
};
|
|
30
35
|
return (React.createElement("div", { className: "box-paginate" },
|
|
31
36
|
React.createElement(ReactPagination, Object.assign({}, config, { activePage: activePage, itemsCountPerPage: perPage, totalItemsCount: totalItems, onChange: handleChange })),
|