@dilicorp/ui 0.2.31 → 0.2.33

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.
Files changed (82) hide show
  1. package/dist/atoms/icon.d.ts +2 -1
  2. package/dist/atoms/icon.js +15 -3
  3. package/dist/atoms/input-datepicker.d.ts +1 -0
  4. package/dist/atoms/input-datepicker.js +2 -2
  5. package/dist/atoms/pluxee-icon/base-icon.js +1 -7
  6. package/dist/atoms/pluxee-icon/icon-card-slashed.d.ts +6 -0
  7. package/dist/atoms/pluxee-icon/icon-card-slashed.js +12 -0
  8. package/dist/atoms/pluxee-icon/icon-circle.d.ts +6 -0
  9. package/dist/atoms/pluxee-icon/icon-circle.js +6 -0
  10. package/dist/atoms/pluxee-icon/icon-clock.d.ts +6 -0
  11. package/dist/atoms/pluxee-icon/icon-clock.js +7 -0
  12. package/dist/atoms/pluxee-icon/icon-download.js +2 -2
  13. package/dist/atoms/pluxee-icon/icon-eye-closed-outline.d.ts +6 -0
  14. package/dist/atoms/pluxee-icon/icon-eye-closed-outline.js +10 -0
  15. package/dist/atoms/pluxee-icon/icon-identification.d.ts +6 -0
  16. package/dist/atoms/pluxee-icon/icon-identification.js +10 -0
  17. package/dist/atoms/pluxee-icon/icon-negotiation.d.ts +6 -0
  18. package/dist/atoms/pluxee-icon/icon-negotiation.js +6 -0
  19. package/dist/atoms/pluxee-icon/icon-play.d.ts +6 -0
  20. package/dist/atoms/pluxee-icon/icon-play.js +6 -0
  21. package/dist/atoms/pluxee-icon/icon-qrcode.d.ts +6 -0
  22. package/dist/atoms/pluxee-icon/icon-qrcode.js +17 -0
  23. package/dist/atoms/pluxee-icon/icon-update-limit.d.ts +6 -0
  24. package/dist/atoms/pluxee-icon/icon-update-limit.js +8 -0
  25. package/dist/atoms/pluxee-icon/icon-user-group.d.ts +6 -0
  26. package/dist/atoms/pluxee-icon/icon-user-group.js +6 -0
  27. package/dist/atoms/pluxee-icon/pluxee-icon.d.ts +8 -1
  28. package/dist/atoms/pluxee-icon/pluxee-icon.js +24 -3
  29. package/dist/components/alert-template/alert-provider.js +1 -1
  30. package/dist/components/form-builder/components/button.d.ts +1 -1
  31. package/dist/components/form-builder/components/button.js +2 -1
  32. package/dist/components/form-builder/components/checkbox.d.ts +1 -0
  33. package/dist/components/form-builder/components/checkbox.js +4 -3
  34. package/dist/components/form-builder/components/input-currency.js +15 -2
  35. package/dist/components/form-builder/components/input-mask.js +15 -2
  36. package/dist/components/form-builder/components/input-prefix-suffix.js +15 -2
  37. package/dist/components/form-builder/components/input.d.ts +1 -0
  38. package/dist/components/form-builder/components/input.js +6 -4
  39. package/dist/components/form-builder/components/radio.d.ts +1 -0
  40. package/dist/components/form-builder/components/radio.js +4 -3
  41. package/dist/components/layout/authenticated-layout/authenticated-layout.d.ts +4 -0
  42. package/dist/components/layout/authenticated-layout/authenticated-layout.js +6 -6
  43. package/dist/components/layout/layout.d.ts +4 -0
  44. package/dist/components/layout/pluxee-logo/pluxee-logo-card.d.ts +8 -0
  45. package/dist/components/layout/pluxee-logo/pluxee-logo-card.js +14 -0
  46. package/dist/components/page-create/page-create.d.ts +1 -1
  47. package/dist/components/page-create/page-create.js +1 -1
  48. package/dist/components/page-list/page-list.js +6 -2
  49. package/dist/components/side-navigation-bar/side-navigation-bar-item.d.ts +1 -0
  50. package/dist/components/side-navigation-bar/side-navigation-bar-item.js +38 -13
  51. package/dist/components/side-navigation-bar/side-navigation-bar.js +2 -2
  52. package/dist/css/style.min.css +2 -2
  53. package/dist/index.d.ts +5 -2
  54. package/dist/index.js +5 -2
  55. package/dist/molecules/card-summary/card-summary-body.d.ts +12 -0
  56. package/dist/molecules/card-summary/card-summary-body.js +9 -0
  57. package/dist/molecules/card-summary/card-summary-container.d.ts +14 -0
  58. package/dist/molecules/card-summary/card-summary-container.js +19 -0
  59. package/dist/molecules/card-summary/card-summary-footer.d.ts +15 -0
  60. package/dist/molecules/card-summary/card-summary-footer.js +11 -0
  61. package/dist/molecules/card-summary/card-summary-header.d.ts +12 -0
  62. package/dist/molecules/card-summary/card-summary-header.js +11 -0
  63. package/dist/molecules/card-summary/card-summary.d.ts +40 -0
  64. package/dist/molecules/card-summary/card-summary.js +10 -0
  65. package/dist/molecules/modal/modal.d.ts +11 -0
  66. package/dist/molecules/modal/modal.js +15 -0
  67. package/dist/molecules/panel/panel-container.d.ts +12 -0
  68. package/dist/molecules/panel/panel-container.js +9 -0
  69. package/dist/molecules/panel/panel-field.d.ts +12 -0
  70. package/dist/molecules/panel/panel-field.js +12 -0
  71. package/dist/molecules/panel/panel-group.d.ts +14 -0
  72. package/dist/molecules/panel/panel-group.js +9 -0
  73. package/dist/molecules/panel/panel.d.ts +31 -0
  74. package/dist/molecules/panel/panel.js +8 -0
  75. package/dist/molecules/player-video/modal-video.d.ts +24 -0
  76. package/dist/molecules/player-video/modal-video.js +18 -0
  77. package/dist/molecules/player-video/player-video.d.ts +31 -0
  78. package/dist/molecules/player-video/player-video.js +8 -0
  79. package/dist/molecules/player-video/thumb-video.d.ts +12 -0
  80. package/dist/molecules/player-video/thumb-video.js +11 -0
  81. package/dist/molecules/table-column-management.js +6 -2
  82. package/package.json +1 -1
@@ -2,7 +2,10 @@ import React from 'react';
2
2
  import { SideNavigationBar } from '../../side-navigation-bar/side-navigation-bar';
3
3
  import { Navbar } from '../../navbar/navbar';
4
4
  import { PluxeeLogo } from '../pluxee-logo/pluxee-logo';
5
- export const AuthenticatedLayout = ({ children, menuItems, navItems, dropdown }) => {
5
+ export const AuthenticatedLayout = ({ children, menuItems, navItems, dropdown, logout = {
6
+ label: 'logout',
7
+ href: '/logout'
8
+ } }) => {
6
9
  return (React.createElement("div", { className: "hv-md-100" },
7
10
  React.createElement("header", { className: "main-header" },
8
11
  React.createElement("div", { className: "logo-container" },
@@ -17,11 +20,8 @@ export const AuthenticatedLayout = ({ children, menuItems, navItems, dropdown })
17
20
  React.createElement("div", { className: "nav-container" },
18
21
  React.createElement(Navbar, { showUserIcon: false, dropdown: dropdown, items: navItems }))),
19
22
  React.createElement("main", { className: "d-flex" },
20
- React.createElement("div", null,
21
- React.createElement(SideNavigationBar, { active: false, items: menuItems, logout: {
22
- label: 'logout',
23
- href: '/logout'
24
- } })),
23
+ React.createElement("div", { style: { minHeight: '100%' } },
24
+ React.createElement(SideNavigationBar, { active: false, items: menuItems, logout: logout })),
25
25
  React.createElement("div", { className: "w-100 overflow-y-auto" }, children))));
26
26
  };
27
27
  AuthenticatedLayout.displayName = 'AuthenticatedLayout';
@@ -5,6 +5,10 @@ export declare const Layout: {
5
5
  menuItems: import("../side-navigation-bar/side-navigation-bar-item").SideNavigationBarItemProps[];
6
6
  navItems?: import("react").ReactNode[] | undefined;
7
7
  dropdown: import("../..").DropdownProps;
8
+ logout?: {
9
+ href: string;
10
+ label: string;
11
+ } | undefined;
8
12
  }>;
9
13
  Content: {
10
14
  ({ children }: {
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type PluxeeLogoCardProps = {
3
+ width?: number;
4
+ height?: number;
5
+ };
6
+ export declare const PluxeeLogoCard: ({ width, height }: PluxeeLogoCardProps) => JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=pluxee-logo-card.d.ts.map
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export const PluxeeLogoCard = ({ width = 172, height = 48 }) => {
3
+ return (React.createElement("svg", { width: width, height: height, viewBox: "0 0 172 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
+ React.createElement("g", { clipPath: "url(#clip0_17957_81019)" },
5
+ React.createElement("path", { d: "M157.187 16.4385C161.107 16.4385 162.689 19.1251 162.689 20.9716H151.686C151.686 19.1032 153.285 16.4385 157.187 16.4385ZM161.803 29.2628C161.071 30.6645 159.394 31.6128 157.228 31.6128C153.138 31.6128 151.521 28.7401 151.477 26.1813H171.795C171.852 25.821 172.001 24.7979 172.001 23.9999C172.001 14.9633 165.688 9.86133 157.156 9.86133C148.162 9.86133 141.872 14.9633 141.872 23.9999C141.872 33.1034 148.161 38.1387 157.209 38.1387C166.105 38.1387 170.285 33.3133 171.401 29.2628H161.803Z", fill: "#221C46" }),
6
+ React.createElement("path", { d: "M15.624 30.0179C11.9753 30.0179 9.38446 27.442 9.38446 24.022C9.38446 20.7614 11.8177 18.0262 15.624 18.0262C19.431 18.0262 21.8628 20.7773 21.8628 24.022C21.8628 27.3177 19.3978 30.0179 15.624 30.0179ZM18.3541 10.1328C14.351 10.1328 10.9168 11.8721 9.14561 13.9163L9.13974 10.6659H0V47.9994H9.42205V34.6326C11.6321 36.9761 14.7101 37.8662 17.8223 37.8662C27.1561 37.8662 31.4857 30.9182 31.4857 23.9992C31.4857 15.4604 25.9245 10.1328 18.3541 10.1328Z", fill: "#221C46" }),
7
+ React.createElement("path", { d: "M44.0499 0H34.5894V37.3333H44.0499V0Z", fill: "#221C46" }),
8
+ React.createElement("path", { d: "M66.8777 10.666V24.5329C66.8777 26.6348 66.584 27.656 65.7098 28.6748C64.865 29.6593 63.5398 30.1235 62.0706 30.1235C60.6024 30.1235 59.2749 29.6593 58.4297 28.6748C57.5556 27.656 57.2635 26.6348 57.2635 24.5329V10.666H47.8384L47.8396 25.3569C47.8396 29.487 48.4808 32.1826 50.4937 34.4736C52.6229 36.8967 55.8749 37.8602 59.0589 37.8602C62.7884 37.8602 65.3717 36.4799 67.1572 34.4477L67.1632 37.3328H76.3028V10.666H66.8777Z", fill: "#221C46" }),
9
+ React.createElement("path", { d: "M107.03 10.666H100.589L93.4917 17.7815L86.394 10.666H79.9536V17.0092L87.1784 23.9994L79.9538 30.9897V37.3329H86.3942L93.4917 30.2175L100.589 37.3329H107.03V30.9897L99.8051 23.9994L107.03 17.0092V10.666Z", fill: "#221C46" }),
10
+ React.createElement("path", { d: "M124.436 16.4385C128.355 16.4385 129.937 19.1251 129.937 20.9716H118.934C118.934 19.1032 120.534 16.4385 124.436 16.4385ZM129.051 29.2628C128.319 30.6645 126.642 31.6128 124.476 31.6128C120.386 31.6128 118.769 28.7401 118.726 26.1813H139.043C139.1 25.821 139.25 24.7979 139.25 23.9999C139.25 14.9633 132.937 9.86133 124.404 9.86133C115.41 9.86133 109.12 14.9633 109.12 23.9999C109.12 33.1034 115.41 38.1387 124.457 38.1387C133.354 38.1387 137.533 33.3133 138.649 29.2628H129.051Z", fill: "#221C46" })),
11
+ React.createElement("defs", null,
12
+ React.createElement("clipPath", { id: "clip0_17957_81019" },
13
+ React.createElement("rect", { width: "172", height: "48", fill: "white" })))));
14
+ };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FormBuilderGroup } from '../form-builder/form-builder.types';
3
3
  import { DropdownItemProps } from '../../molecules/dropdown/dropdown-item';
4
- import { ModalProps } from '../modal/modal';
4
+ import { ModalProps } from '../../molecules/modal/modal';
5
5
  import { FormikHelpers } from 'formik';
6
6
  declare type ExtraButtons = {
7
7
  label: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Modal } from '../modal/modal';
2
+ import { Modal } from '../../molecules/modal/modal';
3
3
  import { Button, Col, Dropdown, FormBuilder, Icon, Link, Row, Typography } from '../../';
4
4
  export const PageCreate = (props) => {
5
5
  const { title, extraButtons = [], cancelButton, onSubmit, data, modal } = props;
@@ -23,8 +23,12 @@ export const PageList = (props) => {
23
23
  return (React.createElement("div", { className: "my-5" },
24
24
  React.createElement(Spinner, null)));
25
25
  }
26
+ const showTitleContainer = Boolean(title) ||
27
+ Boolean(extraButtonsInline.length) ||
28
+ Boolean(addButton) ||
29
+ Boolean((Array.isArray(extraButtons) ? extraButtons : extraButtons.items).length);
26
30
  return (React.createElement(React.Fragment, null,
27
- React.createElement(Row, { className: "page-title-container mb-3" },
31
+ showTitleContainer && (React.createElement(Row, { className: "page-title-container mb-3" },
28
32
  title && (React.createElement(Col, { className: "d-flex align-items-center" },
29
33
  React.createElement(Typography, { className: "mb-0", variant: "h4", tag: "h1" }, title))),
30
34
  React.createElement(Col, { className: "ms-auto" },
@@ -36,7 +40,7 @@ export const PageList = (props) => {
36
40
  Boolean(addButton) && (React.createElement(Button, { tag: Link, href: addButton === null || addButton === void 0 ? void 0 : addButton.uri }, addButton === null || addButton === void 0 ? void 0 :
37
41
  addButton.label,
38
42
  React.createElement(Icon, { icon: "fa-plus", pluxee: true, className: "ms-1" }))),
39
- Boolean((Array.isArray(extraButtons) ? extraButtons : extraButtons.items).length) && (React.createElement(Dropdown, { outline: true, color: "primary", align: "right", label: Array.isArray(extraButtons) ? React.createElement(Icon, { icon: "faEllipsisH" }) : extraButtons.label, items: Array.isArray(extraButtons) ? extraButtons : extraButtons.items }))))),
43
+ Boolean((Array.isArray(extraButtons) ? extraButtons : extraButtons.items).length) && (React.createElement(Dropdown, { outline: true, color: "primary", align: "right", label: Array.isArray(extraButtons) ? React.createElement(Icon, { icon: "faEllipsisH" }) : extraButtons.label, items: Array.isArray(extraButtons) ? extraButtons : extraButtons.items })))))),
40
44
  !!customizeFilter && customizeFilter,
41
45
  !customizeFilter && filterList && (React.createElement(PageListGetFilters, { filterList: filterList, search: search, filter: filter, key: JSON.stringify(history) }, configList)),
42
46
  React.createElement("div", null, restList),
@@ -8,6 +8,7 @@ export declare type SideNavigationBarItemProps = LinkProps & {
8
8
  items?: SideNavigationBarItemProps[];
9
9
  dataLink?: boolean;
10
10
  pathname?: string;
11
+ iconSize?: 'lg' | 'md' | 'sm';
11
12
  };
12
13
  export declare const SideNavigationBarItem: React.FC<SideNavigationBarItemProps>;
13
14
  //# sourceMappingURL=side-navigation-bar-item.d.ts.map
@@ -12,27 +12,52 @@ 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, pluxee, label, dataLink }) => {
15
+ const InnerItem = ({ icon, iconSize = 'md', pluxee, label, dataLink }) => {
16
16
  return (React.createElement(React.Fragment, null,
17
- icon && React.createElement(Icon, { icon: icon, pluxee: pluxee }),
18
- React.createElement("span", { className: "link-name", "data-link": `${dataLink ? 'link' : 'container'}` }, label)));
17
+ icon && React.createElement(Icon, { title: label, icon: icon, pluxee: pluxee, size: iconSize }),
18
+ React.createElement("span", { title: label, style: Object.assign({}, (iconSize === 'sm' && { fontSize: 12 })), 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);
22
23
  const { className = '', items, index, pathname = '' } = props, attrs = __rest(props, ["className", "items", "index", "pathname"]);
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
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] : '/').split('/')[1];
25
+ const sanitizedPath = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')[1];
26
+ const isHomePage = ((attrs === null || attrs === void 0 ? void 0 : attrs.href) === '/' && pathname === '/');
27
+ const isPathActive = sanitizedHref && (sanitizedPath === null || sanitizedPath === void 0 ? void 0 : sanitizedPath.includes(sanitizedHref));
28
+ const activeClass = (isHomePage || isPathActive) ? ' active' : '';
29
+ const itemclass = items && items.length > 0 ? ' submenu-li' : ' link-li';
30
+ const submenuActive = items && items.some(item => {
31
+ var _a, _b;
32
+ const linkpath = ((item === null || item === void 0 ? void 0 : item.href) ? (_a = item === null || item === void 0 ? void 0 : item.href) === null || _a === void 0 ? void 0 : _a.split('?')[0] : '/').split('/').slice(-1)[0];
33
+ return (_b = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')) === null || _b === void 0 ? void 0 : _b.some(sub => sub === linkpath);
34
+ })
35
+ ? ' active'
36
+ : '';
37
+ const handleSubmenuClick = () => {
38
+ const sidebar = document.querySelector('.sidebar');
39
+ if (!sidebar.className.includes('active') && !sidebar.className.includes('mobile')) {
40
+ const btn = document.querySelector('.btn-sidebar');
41
+ btn === null || btn === void 0 ? void 0 : btn.click();
42
+ setSubmenuOpen(true);
43
+ return;
44
+ }
45
+ setSubmenuOpen(prev => !prev);
46
+ };
47
+ return (React.createElement("li", { className: `${className}${activeClass}${itemclass}${submenuActive}` }, items
29
48
  ? React.createElement("div", { className: "sub-menu-container" },
30
- React.createElement("div", { className: "sub-menu", onClick: () => setActive(prev => !prev) },
49
+ React.createElement("div", { onClick: handleSubmenuClick, className: `sub-menu${submenuOpen ? ' open' : ''}` },
31
50
  React.createElement("div", null,
32
51
  React.createElement(InnerItem, Object.assign({}, props))),
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 }))))))))
52
+ React.createElement(Icon, { pluxee: true, icon: "fa-chevron-down" })),
53
+ items && React.createElement(React.Fragment, null,
54
+ React.createElement("ul", { className: "sub-menu-list" }, items.map((item, i) => {
55
+ var _a, _b;
56
+ const lastpath = (_a = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1)[0];
57
+ 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];
58
+ const itemclass = lastpath === linkpath ? 'active' : '';
59
+ 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 })));
60
+ }))))
36
61
  : React.createElement(Link, Object.assign({}, attrs),
37
62
  React.createElement(InnerItem, Object.assign({}, props, { dataLink: true })))));
38
63
  };
@@ -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();
10
12
  const activeStorage = storageHelper.get(STORAGE_NAME);
11
13
  const showActive = activeStorage ? activeStorage === '1' : active;
12
14
  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');