@dilicorp/ui 0.2.42 → 0.2.44

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.
@@ -27,7 +27,7 @@ export const MultiStep = ({ steps, headerNavigationIsDisabled }) => {
27
27
  ${currentStep > step.id ? 'complete-item' : null}
28
28
  ${!headerNavigationIsDisabled ? 'clickable' : null}
29
29
  `, onClick: () => {
30
- if (!headerNavigationIsDisabled) {
30
+ if (!headerNavigationIsDisabled && currentStep > step.id) {
31
31
  handleGoToStep(step.id);
32
32
  }
33
33
  } }, typeof step.header === 'string'
@@ -18,6 +18,7 @@ declare type HeaderArgs = {
18
18
  title: string;
19
19
  allowOrder?: boolean;
20
20
  onOrderClick?: () => void;
21
+ component?: React.ReactElement;
21
22
  attributes?: {
22
23
  th?: ThAttributes;
23
24
  };
@@ -39,6 +40,7 @@ export interface TableBasicProps {
39
40
  title: string;
40
41
  allowOrder?: boolean;
41
42
  onOrderClick?: () => void;
43
+ component?: React.ReactElement;
42
44
  }[];
43
45
  headerArgs?: HeaderArgs;
44
46
  body?: {
@@ -60,6 +62,7 @@ export interface TableColumnManagementProps extends Omit<TableBasicProps, 'heade
60
62
  title: string;
61
63
  allowOrder?: boolean;
62
64
  onOrderClick?: () => void;
65
+ component?: React.ReactElement;
63
66
  }[];
64
67
  columnManagement: {
65
68
  columnsOrder: string[];
@@ -44,9 +44,11 @@ export const Table = (props) => {
44
44
  !!header && (React.createElement("thead", null,
45
45
  React.createElement("tr", null, headers.map((head, index) => {
46
46
  var _a, _b, _c, _d;
47
- return (React.createElement("th", { key: `th-${index}`, scope: "col", ...{ ...(_a = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _a === void 0 ? void 0 : _a.th, ...(_b = head.attributes) === null || _b === void 0 ? void 0 : _b.th }, className: handleClass((_c = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _c === void 0 ? void 0 : _c.th, (_d = head.attributes) === null || _d === void 0 ? void 0 : _d.th) }, head.allowOrder
48
- ? React.createElement(ColumnOrder, { id: head.id, label: head.title, active: orderId === head.id, order: orderId === head.id ? orderType : 'desc', onChange: callbackChangeOrder, disabled: disabled || false, onOrderClick: head.onOrderClick })
49
- : head.title));
47
+ return (React.createElement("th", { key: `th-${index}`, scope: "col", ...{ ...(_a = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _a === void 0 ? void 0 : _a.th, ...(_b = head.attributes) === null || _b === void 0 ? void 0 : _b.th }, className: handleClass((_c = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _c === void 0 ? void 0 : _c.th, (_d = head.attributes) === null || _d === void 0 ? void 0 : _d.th) },
48
+ head.allowOrder
49
+ ? React.createElement(ColumnOrder, { id: head.id, label: head.title, active: orderId === head.id, order: orderId === head.id ? orderType : 'desc', onChange: callbackChangeOrder, disabled: disabled || false, onOrderClick: head.onOrderClick })
50
+ : head.title,
51
+ head.component && head.component));
50
52
  })))),
51
53
  !!body && !children && (React.createElement("tbody", null, body.map(({ attributes: attrs = null, ...item }, index) => (React.createElement("tr", { key: `tr-${index}` }, Object.keys(item).map((key, idx) => {
52
54
  var _a, _b, _c, _d, _e, _f;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dilicorp/ui",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "description": "A simple UI design for Dilicorp",
5
5
  "repository": {
6
6
  "type": "git",