@dilicorp/ui 0.2.29 → 0.2.31
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/icon.d.ts +1 -2
- package/dist/atoms/icon.js +3 -15
- package/dist/atoms/input-datepicker.d.ts +0 -1
- package/dist/atoms/input-datepicker.js +2 -2
- package/dist/atoms/pluxee-icon/base-icon.js +7 -1
- package/dist/atoms/pluxee-icon/icon-download.js +2 -2
- package/dist/atoms/pluxee-icon/pluxee-icon.d.ts +1 -8
- package/dist/atoms/pluxee-icon/pluxee-icon.js +3 -24
- package/dist/components/alert-template/alert-provider.js +1 -1
- package/dist/components/form-builder/components/button.d.ts +1 -1
- package/dist/components/form-builder/components/button.js +1 -2
- package/dist/components/form-builder/components/checkbox.d.ts +0 -1
- package/dist/components/form-builder/components/checkbox.js +3 -4
- package/dist/components/form-builder/components/input-currency.js +2 -15
- package/dist/components/form-builder/components/input-mask.js +2 -15
- package/dist/components/form-builder/components/input-prefix-suffix.js +2 -15
- package/dist/components/form-builder/components/input.d.ts +0 -1
- package/dist/components/form-builder/components/input.js +4 -6
- package/dist/components/form-builder/components/radio.d.ts +0 -1
- package/dist/components/form-builder/components/radio.js +3 -4
- package/dist/components/layout/authenticated-layout/authenticated-layout.d.ts +0 -4
- package/dist/components/layout/authenticated-layout/authenticated-layout.js +6 -6
- package/dist/components/layout/layout.d.ts +0 -4
- package/dist/components/page-create/page-create.d.ts +1 -1
- package/dist/components/page-create/page-create.js +1 -1
- package/dist/components/page-list/filters/filter-async-select.d.ts +25 -0
- package/dist/components/page-list/filters/filter-async-select.js +49 -0
- package/dist/components/page-list/filters/index.d.ts +1 -0
- package/dist/components/page-list/filters/index.js +1 -0
- package/dist/components/page-list/page-list.js +2 -6
- package/dist/components/side-navigation-bar/side-navigation-bar-item.d.ts +0 -1
- package/dist/components/side-navigation-bar/side-navigation-bar-item.js +13 -39
- package/dist/components/side-navigation-bar/side-navigation-bar.js +2 -2
- package/dist/css/style.min.css +2 -2
- package/dist/index.d.ts +2 -5
- package/dist/index.js +2 -5
- package/dist/molecules/table-column-management.js +4 -8
- package/dist/molecules/table.d.ts +2 -0
- package/dist/molecules/table.js +3 -3
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -7
- package/.vscode/settings.json +0 -38
- package/dist/atoms/pluxee-icon/icon-card-slashed.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-card-slashed.js +0 -12
- package/dist/atoms/pluxee-icon/icon-circle.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-circle.js +0 -6
- package/dist/atoms/pluxee-icon/icon-clock.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-clock.js +0 -7
- package/dist/atoms/pluxee-icon/icon-eye-closed-outline.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-eye-closed-outline.js +0 -10
- package/dist/atoms/pluxee-icon/icon-identification.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-identification.js +0 -10
- package/dist/atoms/pluxee-icon/icon-negotiation.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-negotiation.js +0 -6
- package/dist/atoms/pluxee-icon/icon-play.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-play.js +0 -6
- package/dist/atoms/pluxee-icon/icon-qrcode.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-qrcode.js +0 -17
- package/dist/atoms/pluxee-icon/icon-update-limit.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-update-limit.js +0 -8
- package/dist/atoms/pluxee-icon/icon-user-group.d.ts +0 -6
- package/dist/atoms/pluxee-icon/icon-user-group.js +0 -6
- package/dist/components/layout/pluxee-logo/pluxee-logo-card.d.ts +0 -8
- package/dist/components/layout/pluxee-logo/pluxee-logo-card.js +0 -14
- package/dist/molecules/card-summary/card-summary-body.d.ts +0 -12
- package/dist/molecules/card-summary/card-summary-body.js +0 -9
- package/dist/molecules/card-summary/card-summary-container.d.ts +0 -14
- package/dist/molecules/card-summary/card-summary-container.js +0 -19
- package/dist/molecules/card-summary/card-summary-footer.d.ts +0 -15
- package/dist/molecules/card-summary/card-summary-footer.js +0 -11
- package/dist/molecules/card-summary/card-summary-header.d.ts +0 -12
- package/dist/molecules/card-summary/card-summary-header.js +0 -11
- package/dist/molecules/card-summary/card-summary.d.ts +0 -40
- package/dist/molecules/card-summary/card-summary.js +0 -10
- package/dist/molecules/modal/modal.d.ts +0 -11
- package/dist/molecules/modal/modal.js +0 -15
- package/dist/molecules/panel/panel-container.d.ts +0 -12
- package/dist/molecules/panel/panel-container.js +0 -9
- package/dist/molecules/panel/panel-field.d.ts +0 -12
- package/dist/molecules/panel/panel-field.js +0 -12
- package/dist/molecules/panel/panel-group.d.ts +0 -14
- package/dist/molecules/panel/panel-group.js +0 -9
- package/dist/molecules/panel/panel.d.ts +0 -31
- package/dist/molecules/panel/panel.js +0 -8
- package/dist/molecules/player-video/modal-video.d.ts +0 -24
- package/dist/molecules/player-video/modal-video.js +0 -18
- package/dist/molecules/player-video/player-video.d.ts +0 -31
- package/dist/molecules/player-video/player-video.js +0 -8
- package/dist/molecules/player-video/thumb-video.d.ts +0 -12
- package/dist/molecules/player-video/thumb-video.js +0 -11
|
@@ -12,53 +12,27 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React, { useState } from 'react';
|
|
13
13
|
import { Icon } from '../../atoms/icon';
|
|
14
14
|
import { Link } from '../../index';
|
|
15
|
-
const InnerItem = ({ icon,
|
|
15
|
+
const InnerItem = ({ icon, pluxee, label, dataLink }) => {
|
|
16
16
|
return (React.createElement(React.Fragment, null,
|
|
17
|
-
icon && React.createElement(Icon, {
|
|
18
|
-
React.createElement("span", {
|
|
17
|
+
icon && React.createElement(Icon, { icon: icon, pluxee: pluxee }),
|
|
18
|
+
React.createElement("span", { className: "link-name", "data-link": `${dataLink ? 'link' : 'container'}` }, label)));
|
|
19
19
|
};
|
|
20
20
|
export const SideNavigationBarItem = (props) => {
|
|
21
21
|
var _a;
|
|
22
|
-
const [submenuOpen, setSubmenuOpen] = useState(false);
|
|
23
22
|
const { className = '', items, index, pathname = '' } = props, attrs = __rest(props, ["className", "items", "index", "pathname"]);
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const isHomePage = (
|
|
27
|
-
const isPathActive = sanitizedHref &&
|
|
28
|
-
const activeClass =
|
|
29
|
-
|
|
30
|
-
const submenuActive = items && items.some(item => {
|
|
31
|
-
var _a, _b;
|
|
32
|
-
const lastpath = (_a = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1)[0];
|
|
33
|
-
const linkpath = ((item === null || item === void 0 ? void 0 : item.href) ? (_b = item === null || item === void 0 ? void 0 : item.href) === null || _b === void 0 ? void 0 : _b.split('?')[0] : '/').split('/').slice(-1)[0];
|
|
34
|
-
return lastpath === linkpath;
|
|
35
|
-
})
|
|
36
|
-
? ' active'
|
|
37
|
-
: '';
|
|
38
|
-
const handleSubmenuClick = () => {
|
|
39
|
-
const sidebar = document.querySelector('.sidebar');
|
|
40
|
-
if (!sidebar.className.includes('active') && !sidebar.className.includes('mobile')) {
|
|
41
|
-
const btn = document.querySelector('.btn-sidebar');
|
|
42
|
-
btn === null || btn === void 0 ? void 0 : btn.click();
|
|
43
|
-
setSubmenuOpen(true);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
setSubmenuOpen(prev => !prev);
|
|
47
|
-
};
|
|
48
|
-
return (React.createElement("li", { className: `${className}${activeClass}${itemclass}${submenuActive}` }, items
|
|
23
|
+
const [active, setActive] = useState(false);
|
|
24
|
+
const sanitizedHref = (attrs === null || attrs === void 0 ? void 0 : attrs.href) ? (_a = attrs === null || attrs === void 0 ? void 0 : attrs.href) === null || _a === void 0 ? void 0 : _a.split('?')[0] : '';
|
|
25
|
+
const isHomePage = (sanitizedHref === '/' && pathname === '/');
|
|
26
|
+
const isPathActive = sanitizedHref && sanitizedHref !== '/' && pathname.includes(sanitizedHref);
|
|
27
|
+
const activeClass = isHomePage || isPathActive ? ' active' : '';
|
|
28
|
+
return (React.createElement("li", { className: `${className}${activeClass}` }, items
|
|
49
29
|
? React.createElement("div", { className: "sub-menu-container" },
|
|
50
|
-
React.createElement("div", {
|
|
30
|
+
React.createElement("div", { className: "sub-menu", onClick: () => setActive(prev => !prev) },
|
|
51
31
|
React.createElement("div", null,
|
|
52
32
|
React.createElement(InnerItem, Object.assign({}, props))),
|
|
53
|
-
React.createElement(Icon, {
|
|
54
|
-
|
|
55
|
-
React.createElement("ul", { className: "sub-menu-list" }, items.map((item, i) => {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
const lastpath = (_a = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1)[0];
|
|
58
|
-
const linkpath = ((item === null || item === void 0 ? void 0 : item.href) ? (_b = item === null || item === void 0 ? void 0 : item.href) === null || _b === void 0 ? void 0 : _b.split('?')[0] : '/').split('/').slice(-1)[0];
|
|
59
|
-
const itemclass = lastpath === linkpath ? 'active' : '';
|
|
60
|
-
return (React.createElement(SideNavigationBarItem, Object.assign({ key: `side-navigation-bar-item-${index}-${i}`, iconSize: "sm", pathname: pathname, className: itemclass }, Object.assign(Object.assign({}, item), { index: i }), { icon: "fa-circle", pluxee: true })));
|
|
61
|
-
}))))
|
|
33
|
+
React.createElement(Icon, { icon: "fa-angle-down" })),
|
|
34
|
+
active && React.createElement("div", null,
|
|
35
|
+
React.createElement("ul", { className: "sub-menu-list" }, items.map((item, i) => (React.createElement(SideNavigationBarItem, Object.assign({ key: `side-navigation-bar-item-${index}-${i}` }, Object.assign(Object.assign({}, item), { index: i }))))))))
|
|
62
36
|
: React.createElement(Link, Object.assign({}, attrs),
|
|
63
37
|
React.createElement(InnerItem, Object.assign({}, props, { dataLink: true })))));
|
|
64
38
|
};
|
|
@@ -7,11 +7,11 @@ import { useLocation } from 'react-router-dom';
|
|
|
7
7
|
const STORAGE_NAME = 'SIDEBAR_ACTIVE';
|
|
8
8
|
export const SideNavigationBar = memo((props) => {
|
|
9
9
|
const { logout, items = [], active = true, menuLabel = 'Menu' } = props;
|
|
10
|
-
const navlist = useRef(null);
|
|
11
|
-
const { pathname, search } = useLocation();
|
|
12
10
|
const activeStorage = storageHelper.get(STORAGE_NAME);
|
|
13
11
|
const showActive = activeStorage ? activeStorage === '1' : active;
|
|
14
12
|
storageHelper.set(STORAGE_NAME, showActive ? '1' : '0');
|
|
13
|
+
const navlist = useRef(null);
|
|
14
|
+
const { pathname, search } = useLocation();
|
|
15
15
|
const uri = `${pathname}${search}`;
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
const btnMobile = document.querySelector('.btn-sidebar-mobile');
|