@dilicorp/ui 0.0.57 → 0.0.58
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/atoms/button.js +2 -2
- package/dist/atoms/checkbox.js +2 -2
- package/dist/atoms/col.js +2 -2
- package/dist/atoms/container.js +2 -2
- package/dist/atoms/icon.js +2 -2
- package/dist/atoms/image.js +2 -2
- package/dist/atoms/input-datepicker.js +2 -3
- package/dist/atoms/input.js +2 -2
- package/dist/atoms/label.js +2 -2
- package/dist/atoms/link.js +3 -3
- package/dist/atoms/radio.js +2 -2
- package/dist/atoms/row.js +2 -2
- package/dist/atoms/separator.js +2 -2
- package/dist/atoms/spinner.js +2 -2
- package/dist/atoms/typography.js +2 -2
- package/dist/components/accordion/accordion-body.js +3 -2
- package/dist/components/accordion/accordion-header.js +4 -2
- package/dist/components/accordion/accordion-item.js +2 -2
- package/dist/components/accordion/accordion.js +7 -5
- package/dist/components/alert-template/alert-provider.js +2 -2
- package/dist/components/alert-template/alert-template.js +6 -2
- package/dist/components/form-builder/_partials/form-group.js +8 -3
- package/dist/components/form-builder/components/button.js +5 -4
- package/dist/components/form-builder/components/checkbox.js +4 -2
- package/dist/components/form-builder/components/datepicker.js +2 -2
- package/dist/components/form-builder/components/dropzone.js +19 -4
- package/dist/components/form-builder/components/input-currency.js +2 -2
- package/dist/components/form-builder/components/input-mask.js +2 -2
- package/dist/components/form-builder/components/input-prefix-suffix.js +11 -8
- package/dist/components/form-builder/components/input.js +6 -6
- package/dist/components/form-builder/components/password.js +3 -2
- package/dist/components/form-builder/components/radio.js +4 -2
- package/dist/components/form-builder/components/select.js +2 -3
- package/dist/components/form-builder/form-builder-element.js +3 -2
- package/dist/components/form-builder/form-builder.js +12 -7
- package/dist/components/navbar/navbar.js +8 -4
- package/dist/components/page-create/page-create.js +12 -2
- package/dist/components/page-list/column-management-components/button-config.js +3 -3
- package/dist/components/page-list/column-management-components/container-drag-drop.js +2 -3
- package/dist/components/page-list/column-management-components/item-drag-drop.js +4 -2
- package/dist/components/page-list/column-management-components/modal-config.js +34 -5
- package/dist/components/page-list/filter-components/button-filter-clear.js +3 -2
- package/dist/components/page-list/filter-components/button-filter.js +4 -2
- package/dist/components/page-list/filter-components/button-filters.js +4 -2
- package/dist/components/page-list/filter-components/filter-form.js +3 -3
- package/dist/components/page-list/filters/filter-datepicker.js +6 -2
- package/dist/components/page-list/filters/filter-input.js +11 -3
- package/dist/components/page-list/filters/filter-select.js +5 -2
- package/dist/components/page-list/page-list-filters.js +2 -2
- package/dist/components/page-list/page-list-get-filters.js +22 -3
- package/dist/components/page-list/page-list.js +16 -3
- package/dist/components/page-show/page-show.js +13 -3
- package/dist/components/side-navigation-bar/side-navigation-bar-item.js +8 -3
- package/dist/components/side-navigation-bar/side-navigation-bar.js +15 -8
- package/dist/components/tabs/tab-list.js +2 -2
- package/dist/components/tabs/tab-panel.js +2 -2
- package/dist/components/tabs/tab.js +2 -2
- package/dist/components/tabs/tabs.js +10 -8
- package/dist/molecules/alert.js +8 -4
- package/dist/molecules/breadcrumb.js +6 -4
- package/dist/molecules/card.js +7 -2
- package/dist/molecules/dropdown/dropdown-item.js +4 -4
- package/dist/molecules/dropdown/dropdown.js +13 -12
- package/dist/molecules/field.js +4 -2
- package/dist/molecules/paginate.js +4 -2
- package/dist/molecules/table.js +16 -13
- package/package.json +1 -1
- package/tsconfig.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { DropdownItem } from './dropdown-item';
|
|
@@ -29,15 +28,17 @@ export const Dropdown = (props) => {
|
|
|
29
28
|
};
|
|
30
29
|
}, [toggle]);
|
|
31
30
|
const classesDropdown = classNames('dropdown-menu', align, toggle && 'show');
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
return (React.createElement("div", { ref: ref, className: "dropdown" },
|
|
32
|
+
React.createElement(Tag, { className: classes, onClick: handleClick }, label),
|
|
33
|
+
React.createElement("div", { className: classesDropdown }, items.map((item, index) => {
|
|
34
|
+
const _item = Object.assign(Object.assign({}, item), { onClick: 'onClick' in item
|
|
35
|
+
? () => {
|
|
36
|
+
setToggle(false);
|
|
37
|
+
item.onClick();
|
|
38
|
+
}
|
|
39
|
+
: () => {
|
|
40
|
+
setToggle(false);
|
|
41
|
+
} });
|
|
42
|
+
return (React.createElement(DropdownItem, Object.assign({ key: `dropdown-item-${index}` }, _item)));
|
|
43
|
+
}))));
|
|
43
44
|
};
|
package/dist/molecules/field.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export const Field = ({ value, label }) => {
|
|
3
|
-
return (
|
|
3
|
+
return (React.createElement("div", { className: "form-group" },
|
|
4
|
+
React.createElement("div", { className: "form-label bold" }, label),
|
|
5
|
+
Boolean(value) && React.createElement("div", { className: "mb-3" }, value)));
|
|
4
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import ReactPagination from 'react-js-pagination';
|
|
3
3
|
import uriHelper from '../utils/uri-helper';
|
|
4
4
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
@@ -32,5 +32,7 @@ export const Paginate = (props) => {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
return (
|
|
35
|
+
return (React.createElement("div", { className: "box-paginate" },
|
|
36
|
+
React.createElement(ReactPagination, Object.assign({}, config, { activePage: activePage, itemsCountPerPage: perPage, totalItemsCount: totalItems, onChange: handleChange })),
|
|
37
|
+
React.createElement("div", { className: "extra-paginate-info" }, translate.replace(/%(\d+)/g, (_, n) => [`${String(from)} - ${String(to)}`, String(totalItems)][+n - 1]))));
|
|
36
38
|
};
|
package/dist/molecules/table.js
CHANGED
|
@@ -9,7 +9,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
import React from 'react';
|
|
14
13
|
import classNames from 'classnames';
|
|
15
14
|
export const Table = (props) => {
|
|
@@ -80,16 +79,20 @@ export const Table = (props) => {
|
|
|
80
79
|
return child;
|
|
81
80
|
});
|
|
82
81
|
const headersFiltered = headers.filter(filterHeader);
|
|
83
|
-
return (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
return (React.createElement("table", { className: classesNames },
|
|
83
|
+
!!header && (React.createElement("thead", null,
|
|
84
|
+
React.createElement("tr", null, headersFiltered.sort(sortHeader).map((head, index) => {
|
|
85
|
+
var _a, _b, _c, _d;
|
|
86
|
+
return (React.createElement("th", Object.assign({ key: `th-${index}`, scope: "col" }, Object.assign(Object.assign({}, (_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.title));
|
|
87
|
+
})))),
|
|
88
|
+
!!body && !childrenFiltered && (React.createElement("tbody", null, body.map((_a, index) => {
|
|
89
|
+
var { attributes: attrs = null } = _a, item = __rest(_a, ["attributes"]);
|
|
90
|
+
return (React.createElement("tr", { key: `tr-${index}` }, Object.keys(item)
|
|
91
|
+
.filter(filterBody)
|
|
92
|
+
.sort(sortBody).map((key, idx) => {
|
|
93
|
+
var _a, _b, _c, _d, _e, _f;
|
|
94
|
+
return (React.createElement("td", Object.assign({ key: `td-${index}-${idx}`, scope: "row" }, Object.assign(Object.assign(Object.assign({}, (_a = attributes === null || attributes === void 0 ? void 0 : attributes.tbody) === null || _a === void 0 ? void 0 : _a.td), attrs === null || attrs === void 0 ? void 0 : attrs.td), (_c = (_b = item[key]) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.td), { className: handleClass((_d = attributes === null || attributes === void 0 ? void 0 : attributes.tbody) === null || _d === void 0 ? void 0 : _d.td, attrs === null || attrs === void 0 ? void 0 : attrs.td, (_f = (_e = item[key]) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.td) }), render(item[key])));
|
|
95
|
+
})));
|
|
96
|
+
}))),
|
|
97
|
+
childrenFiltered && !body && (React.createElement("tbody", null, childrenFiltered))));
|
|
95
98
|
};
|
package/package.json
CHANGED