@dilicorp/ui 0.0.26 → 0.0.29

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/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v16.6.1
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # ui-dilicorp
2
+
@@ -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,CAyC5C,CAAA"}
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)))),
@@ -5,6 +5,7 @@ export declare type PaginateProps = {
5
5
  perPage: number;
6
6
  currentCount: number;
7
7
  translate?: string;
8
+ onChange?: (page: number) => void;
8
9
  };
9
10
  export declare const Paginate: React.FC<PaginateProps>;
10
11
  //# sourceMappingURL=paginate.d.ts.map
@@ -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;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiC5C,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
- Object.assign(search, { page });
26
- navigate({
27
- search: uriHelper.stringify(search)
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 })),
@@ -36,7 +36,7 @@ class DateHelper {
36
36
  if (!date)
37
37
  return null;
38
38
  try {
39
- return date.toLocaleString();
39
+ return date.toLocaleString('pt-br');
40
40
  }
41
41
  catch (e) {
42
42
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dilicorp/ui",
3
- "version": "0.0.26",
3
+ "version": "0.0.29",
4
4
  "description": "A simple UI design for Dilicorp",
5
5
  "repository": {
6
6
  "type": "git",