@bigbinary/neeto-molecules 1.15.59 → 1.15.61

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.
@@ -16,11 +16,11 @@ import SubHeader from './SubHeader.js';
16
16
  import { t } from 'i18next';
17
17
  import { Left, Down, Right } from '@bigbinary/neeto-icons';
18
18
  import 'classnames';
19
- import './Columns-2bdb8579.js';
19
+ import './useColumns-d17d1f72.js';
20
20
  import './inject-css-c86de496.js';
21
- import '@bigbinary/neeto-commons-frontend/utils/general';
22
21
  import 'zustand';
23
22
  import 'zustand/middleware';
23
+ import '@bigbinary/neeto-commons-frontend/utils/general';
24
24
  import '@bigbinary/neeto-filters-frontend';
25
25
 
26
26
  var WEEKLY_VIEW = t("neetoMolecules.calendarView.weekly");
@@ -168,7 +168,7 @@ var SelectedLink = function SelectedLink(_ref) {
168
168
  }));
169
169
  };
170
170
 
171
- var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page-header{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;border-top:1px solid rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0!important;padding-bottom:8px!important;padding-top:8px!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;margin-bottom:4px;padding:4px 4px 4px 30px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active:before{background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded);content:\"\";height:100%;left:-1px;position:absolute;top:0;width:3px}";
171
+ var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page-header{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:36px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;border-top:1px solid rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0!important;padding-bottom:8px!important;padding-top:8px!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;margin-bottom:4px;padding:4px 4px 4px 30px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active:before{background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded);content:\"\";height:100%;left:-1px;position:absolute;top:0;width:3px}";
172
172
  n(css,{});
173
173
 
174
174
  var Chevron = function Chevron(_ref) {
@@ -185,4 +185,4 @@ var Chevron = function Chevron(_ref) {
185
185
  };
186
186
 
187
187
  export { Chevron as C, Items as I, SelectedLink as S, CheckPointNavLinks as a, SELECTED_NAV_LINK_ROUTE_STORAGE_KEY as b, filterByPermissions as f, getSidebarStateLocalStorageKey as g };
188
- //# sourceMappingURL=Chevron-29ec3757.js.map
188
+ //# sourceMappingURL=Chevron-8e923abc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chevron-29ec3757.js","sources":["../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../src/components/Sidebar/constants.js","../src/components/Sidebar/utils.js","../src/components/Sidebar/Components/Links/SubLink.jsx","../src/components/Sidebar/Components/Links/Items.jsx","../src/components/Sidebar/Components/Links/SelectedLink.jsx","../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <Items {...{ isSettingsItems }} items={subItem.items} />\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wBAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,GAAAF,qBAAA,CAA1BN,aAAa,CAAA,CAAA;AAGtB,EAAA,oBACES,cAAA,CAAAC,aAAA,CAACC,OAAO,EAAAC,QAAA,CAAA;IAACX,EAAE,EAAEO,UAAU,IAAIP,EAAAA;AAAG,GAAA,EAAKE,MAAM,EAAA;AAAEU,IAAAA,GAAG,EAAEZ,EAAAA;AAAG,GAAA,CAAA,EAChDC,QACM,CAAC,CAAA;AAEd;;ACdO,IAAMY,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,IAAMC,mCAAmC,GAAG;;ACF5C,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,QAAQ,EAAEC,QAAQ,EAAK;EACtD,IAAMC,iBAAiB,GAAG,IAAI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AAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEmG,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"Chevron-8e923abc.js","sources":["../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../src/components/Sidebar/constants.js","../src/components/Sidebar/utils.js","../src/components/Sidebar/Components/Links/SubLink.jsx","../src/components/Sidebar/Components/Links/Items.jsx","../src/components/Sidebar/Components/Links/SelectedLink.jsx","../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <Items {...{ isSettingsItems }} items={subItem.items} />\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wBAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,GAAAF,qBAAA,CAA1BN,aAAa,CAAA,CAAA;AAGtB,EAAA,oBACES,cAAA,CAAAC,aAAA,CAACC,OAAO,EAAAC,QAAA,CAAA;IAACX,EAAE,EAAEO,UAAU,IAAIP,EAAAA;AAAG,GAAA,EAAKE,MAAM,EAAA;AAAEU,IAAAA,GAAG,EAAEZ,EAAAA;AAAG,GAAA,CAAA,EAChDC,QACM,CAAC,CAAA;AAEd;;ACdO,IAAMY,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,IAAMC,mCAAmC,GAAG;;ACF5C,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,Q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AAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAA;GACxDnG,eAAAA,cAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEmG,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA;;;;"}
package/dist/Columns.js CHANGED
@@ -1,4 +1,4 @@
1
- export { H as HIDDEN_COLUMNS_STORAGE_KEY, C as default, a as useHiddenColumnStore, u as useHiddenColumns } from './Columns-2bdb8579.js';
1
+ export { b as COLUMNS_ORDER_STORAGE_KEY, H as HIDDEN_COLUMNS_STORAGE_KEY, C as default, d as useColumnOrderStore, c as useColumns, a as useHiddenColumnStore, u as useHiddenColumns } from './useColumns-d17d1f72.js';
2
2
  import './extends-093996c9.js';
3
3
  import './slicedToArray-b4278ecd.js';
4
4
  import './objectWithoutProperties-a0edb288.js';
@@ -11,7 +11,7 @@ import 'ramda';
11
11
  import 'react-i18next';
12
12
  import './inject-css-c86de496.js';
13
13
  import './defineProperty-549061a7.js';
14
- import '@bigbinary/neeto-commons-frontend/utils/general';
15
14
  import 'zustand';
16
15
  import 'zustand/middleware';
16
+ import '@bigbinary/neeto-commons-frontend/utils/general';
17
17
  //# sourceMappingURL=Columns.js.map
@@ -5,7 +5,7 @@ import { Button } from '@bigbinary/neetoui';
5
5
  import { not } from 'ramda';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { useHistory } from 'react-router-dom';
8
- import { S as SelectedLink, C as Chevron } from './Chevron-29ec3757.js';
8
+ import { S as SelectedLink, C as Chevron } from './Chevron-8e923abc.js';
9
9
  import './extends-093996c9.js';
10
10
  import './defineProperty-549061a7.js';
11
11
  import './objectWithoutProperties-a0edb288.js';
@@ -20,7 +20,7 @@ import './objectWithoutProperties-a0edb288.js';
20
20
  import 'ramda';
21
21
  import './defineProperty-549061a7.js';
22
22
  import '@bigbinary/neeto-icons';
23
- import './Columns-2bdb8579.js';
23
+ import './useColumns-d17d1f72.js';
24
24
  import 'i18next';
25
25
  import 'zustand';
26
26
  import 'zustand/middleware';
package/dist/Sidebar.js CHANGED
@@ -9,7 +9,7 @@ import { Typography, Button } from '@bigbinary/neetoui';
9
9
  import { not, is, findLast } from 'ramda';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import { Link, useLocation, useHistory } from 'react-router-dom';
12
- import { f as filterByPermissions, a as CheckPointNavLinks, I as Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, S as SelectedLink, C as Chevron } from './Chevron-29ec3757.js';
12
+ import { f as filterByPermissions, a as CheckPointNavLinks, I as Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, S as SelectedLink, C as Chevron } from './Chevron-8e923abc.js';
13
13
  import useFetchNeetoApps from '@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps';
14
14
  import * as ProductTypefaceLogos from '@bigbinary/neeto-icons/typeface-logos';
15
15
  import { Neeto } from '@bigbinary/neeto-icons/typeface-logos';
package/dist/SubHeader.js CHANGED
@@ -8,14 +8,14 @@ import { _ as _objectWithoutProperties } from './objectWithoutProperties-a0edb28
8
8
  import { Column, Download, Filter } from '@bigbinary/neeto-icons';
9
9
  import { Button } from '@bigbinary/neetoui';
10
10
  import { useTranslation } from 'react-i18next';
11
- import { u as useHiddenColumns, C as Columns$1 } from './Columns-2bdb8579.js';
11
+ import { u as useHiddenColumns, C as Columns$1 } from './useColumns-d17d1f72.js';
12
12
  import { Filters } from '@bigbinary/neeto-filters-frontend';
13
13
  import { n } from './inject-css-c86de496.js';
14
14
  import './slicedToArray-b4278ecd.js';
15
15
  import 'i18next';
16
- import '@bigbinary/neeto-commons-frontend/utils/general';
17
16
  import 'zustand';
18
17
  import 'zustand/middleware';
18
+ import '@bigbinary/neeto-commons-frontend/utils/general';
19
19
 
20
20
  var _excluded$1 = ["buttonProps", "columnData", "localStorageKey", "fixedColumns"];
21
21
  function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
package/dist/Taxonomy.js CHANGED
@@ -33,7 +33,7 @@ import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
33
33
  import '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
34
34
  import '@bigbinary/neeto-icons';
35
35
  import '@bigbinary/neeto-commons-frontend/utils';
36
- import './Columns-2bdb8579.js';
36
+ import './useColumns-d17d1f72.js';
37
37
  import 'zustand';
38
38
  import 'zustand/middleware';
39
39
  import '@bigbinary/neeto-filters-frontend';
@@ -18,11 +18,11 @@ var SubHeader = require('./SubHeader.js');
18
18
  var i18next = require('i18next');
19
19
  var neetoIcons = require('@bigbinary/neeto-icons');
20
20
  require('classnames');
21
- require('./Columns-6b710238.js');
21
+ require('./useColumns-a1c3668f.js');
22
22
  require('./inject-css-80a5faa3.js');
23
- require('@bigbinary/neeto-commons-frontend/utils/general');
24
23
  require('zustand');
25
24
  require('zustand/middleware');
25
+ require('@bigbinary/neeto-commons-frontend/utils/general');
26
26
  require('@bigbinary/neeto-filters-frontend');
27
27
 
28
28
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -175,7 +175,7 @@ var SelectedLink = function SelectedLink(_ref) {
175
175
  }));
176
176
  };
177
177
 
178
- var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page-header{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;border-top:1px solid rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0!important;padding-bottom:8px!important;padding-top:8px!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;margin-bottom:4px;padding:4px 4px 4px 30px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active:before{background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded);content:\"\";height:100%;left:-1px;position:absolute;top:0;width:3px}";
178
+ var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page-header{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:36px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;border-top:1px solid rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0!important;padding-bottom:8px!important;padding-top:8px!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;margin-bottom:4px;padding:4px 4px 4px 30px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active:before{background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded);content:\"\";height:100%;left:-1px;position:absolute;top:0;width:3px}";
179
179
  injectCss.n(css,{});
180
180
 
181
181
  var Chevron = function Chevron(_ref) {
@@ -198,4 +198,4 @@ exports.SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = SELECTED_NAV_LINK_ROUTE_STORAGE_KE
198
198
  exports.SelectedLink = SelectedLink;
199
199
  exports.filterByPermissions = filterByPermissions;
200
200
  exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
201
- //# sourceMappingURL=Chevron-fc653f2a.js.map
201
+ //# sourceMappingURL=Chevron-265965c2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chevron-fc653f2a.js","sources":["../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/constants.js","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <Items {...{ isSettingsItems }} items={subItem.items} />\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,gDAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,GAAAF,qBAAA,CAA1BN,aAAa,CAAA,CAAA;AAGtB,EAAA,oBACES,yBAAA,CAAAC,aAAA,CAACC,sBAAO,EAAAC,iBAAA,CAAA;IAACX,EA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mE,KAAK,EAAA;AAAOC,IAAAA,KAAK,EAALA,KAAK;IAAIE,eAAe,EAAA,IAAA;AAAA,GAAE,CAC9C,CAAC,CAAA;AAEV;;;;;AClDA,IAAMyB,OAAO,GAAG,SAAVA,OAAOA,CAAA1G,IAAA,EAAA;AAAA,EAAA,IAAM6E,KAAK,GAAA7E,IAAA,CAAL6E,KAAK,CAAA;EAAA,oBACtBnE,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAWkE,IAAAA,KAAK,EAALA,KAAK;AAAI8B,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAA;GACxDnG,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEmG,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"Chevron-265965c2.js","sources":["../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/constants.js","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <Items {...{ isSettingsItems }} items={subItem.items} />\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,gDAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,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ACD,EAAA,MAAM,EAAGE,kBAAkB,CAC7B,CAAA;GAEAzC,EAAAA,KACS,CACT,CAAC,EACLuB,KAAK,iBAAIrE,yBAAA,CAAAC,aAAA,CAACmE,KAAK,EAAA;AAAOC,IAAAA,KAAK,EAALA,KAAK;IAAIE,eAAe,EAAA,IAAA;AAAA,GAAE,CAC9C,CAAC,CAAA;AAEV;;;;;AClDA,IAAMyB,OAAO,GAAG,SAAVA,OAAOA,CAAA1G,IAAA,EAAA;AAAA,EAAA,IAAM6E,KAAK,GAAA7E,IAAA,CAAL6E,KAAK,CAAA;EAAA,oBACtBnE,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAWkE,IAAAA,KAAK,EAALA,KAAK;AAAI8B,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAA;GACxDnG,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEmG,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA;;;;;;;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Columns = require('./Columns-6b710238.js');
5
+ var useColumns = require('./useColumns-a1c3668f.js');
6
6
  require('./extends-1b35a664.js');
7
7
  require('./slicedToArray-f320d9e7.js');
8
8
  require('./objectWithoutProperties-2fed2d7d.js');
@@ -15,14 +15,17 @@ require('ramda');
15
15
  require('react-i18next');
16
16
  require('./inject-css-80a5faa3.js');
17
17
  require('./defineProperty-886ed289.js');
18
- require('@bigbinary/neeto-commons-frontend/utils/general');
19
18
  require('zustand');
20
19
  require('zustand/middleware');
20
+ require('@bigbinary/neeto-commons-frontend/utils/general');
21
21
 
22
22
 
23
23
 
24
- exports.HIDDEN_COLUMNS_STORAGE_KEY = Columns.HIDDEN_COLUMNS_STORAGE_KEY;
25
- exports["default"] = Columns.Columns;
26
- exports.useHiddenColumnStore = Columns.useHiddenColumnStore;
27
- exports.useHiddenColumns = Columns.useHiddenColumns;
24
+ exports.COLUMNS_ORDER_STORAGE_KEY = useColumns.COLUMNS_ORDER_STORAGE_KEY;
25
+ exports.HIDDEN_COLUMNS_STORAGE_KEY = useColumns.HIDDEN_COLUMNS_STORAGE_KEY;
26
+ exports["default"] = useColumns.Columns;
27
+ exports.useColumnOrderStore = useColumns.useColumnOrderStore;
28
+ exports.useColumns = useColumns.useColumns;
29
+ exports.useHiddenColumnStore = useColumns.useHiddenColumnStore;
30
+ exports.useHiddenColumns = useColumns.useHiddenColumns;
28
31
  //# sourceMappingURL=Columns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -7,7 +7,7 @@ var neetoui = require('@bigbinary/neetoui');
7
7
  var ramda = require('ramda');
8
8
  var reactI18next = require('react-i18next');
9
9
  var reactRouterDom = require('react-router-dom');
10
- var Chevron = require('./Chevron-fc653f2a.js');
10
+ var Chevron = require('./Chevron-265965c2.js');
11
11
  require('./extends-1b35a664.js');
12
12
  require('./defineProperty-886ed289.js');
13
13
  require('./objectWithoutProperties-2fed2d7d.js');
@@ -22,7 +22,7 @@ require('./objectWithoutProperties-2fed2d7d.js');
22
22
  require('ramda');
23
23
  require('./defineProperty-886ed289.js');
24
24
  require('@bigbinary/neeto-icons');
25
- require('./Columns-6b710238.js');
25
+ require('./useColumns-a1c3668f.js');
26
26
  require('i18next');
27
27
  require('zustand');
28
28
  require('zustand/middleware');
@@ -11,7 +11,7 @@ var neetoui = require('@bigbinary/neetoui');
11
11
  var ramda = require('ramda');
12
12
  var reactI18next = require('react-i18next');
13
13
  var reactRouterDom = require('react-router-dom');
14
- var Chevron = require('./Chevron-fc653f2a.js');
14
+ var Chevron = require('./Chevron-265965c2.js');
15
15
  var useFetchNeetoApps = require('@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps');
16
16
  var ProductTypefaceLogos = require('@bigbinary/neeto-icons/typeface-logos');
17
17
  var _extends = require('./extends-1b35a664.js');
@@ -10,14 +10,14 @@ var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
10
10
  var neetoIcons = require('@bigbinary/neeto-icons');
11
11
  var neetoui = require('@bigbinary/neetoui');
12
12
  var reactI18next = require('react-i18next');
13
- var Columns$1 = require('./Columns-6b710238.js');
13
+ var useColumns = require('./useColumns-a1c3668f.js');
14
14
  var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
15
15
  var injectCss = require('./inject-css-80a5faa3.js');
16
16
  require('./slicedToArray-f320d9e7.js');
17
17
  require('i18next');
18
- require('@bigbinary/neeto-commons-frontend/utils/general');
19
18
  require('zustand');
20
19
  require('zustand/middleware');
20
+ require('@bigbinary/neeto-commons-frontend/utils/general');
21
21
 
22
22
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
23
23
 
@@ -41,12 +41,12 @@ var Columns = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
41
41
  return !(fixedColumns !== null && fixedColumns !== void 0 && fixedColumns.includes(column.dataIndex));
42
42
  }));
43
43
  }, [columnData, fixedColumns]);
44
- var _useHiddenColumns = Columns$1.useHiddenColumns(localStorageKey),
44
+ var _useHiddenColumns = useColumns.useHiddenColumns(localStorageKey),
45
45
  hideColumn = _useHiddenColumns.hideColumn,
46
46
  showColumn = _useHiddenColumns.showColumn;
47
47
  return /*#__PURE__*/React__default["default"].createElement("div", {
48
48
  className: "neeto-molecules-subheader__columns"
49
- }, /*#__PURE__*/React__default["default"].createElement(Columns$1.Columns, _extends._extends({
49
+ }, /*#__PURE__*/React__default["default"].createElement(useColumns.Columns, _extends._extends({
50
50
  isSearchable: true,
51
51
  className: "neeto-ui-dropdown--manage-columns",
52
52
  actionBlock: /*#__PURE__*/React__default["default"].createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"SubHeader.js","sources":["../../src/components/SubHeader/RightBlock/Columns.jsx","../../src/components/SubHeader/RightBlock/Download.jsx","../../src/components/SubHeader/RightBlock/Filter.jsx","../../src/components/SubHeader/RightBlock/index.jsx","../../src/components/SubHeader/index.jsx"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\n\nimport { Column } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns, { useHiddenColumns } from \"components/Columns\";\n\nconst Columns = forwardRef(\n (\n { buttonProps = {}, columnData, localStorageKey, fixedColumns, ...props },\n ref\n ) => {\n const { t } = useTranslation();\n\n const columnDataIndex = useMemo(\n () =>\n pluck(\n \"dataIndex\",\n (columnData || []).filter(\n column => !fixedColumns?.includes(column.dataIndex)\n )\n ),\n [columnData, fixedColumns]\n );\n\n const { hideColumn, showColumn } = useHiddenColumns(localStorageKey);\n\n return (\n <div className=\"neeto-molecules-subheader__columns\">\n <ManageColumns\n isSearchable\n className=\"neeto-ui-dropdown--manage-columns\"\n actionBlock={\n <div className=\"grid grid-cols-2 gap-2 px-4 py-3\">\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Hide all\"\n style=\"secondary\"\n onClick={() => hideColumn(columnDataIndex)}\n />\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Show all\"\n style=\"secondary\"\n onClick={() => showColumn(columnDataIndex)}\n />\n </div>\n }\n buttonProps={{\n icon: Column,\n label: null,\n tooltipProps: {\n content: t(\"neetoMolecules.columns.columns\"),\n position: \"bottom\",\n },\n \"data-testid\": \"columns-button\",\n \"data-cy\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{ columnData, localStorageKey, ...props, ref }}\n />\n </div>\n );\n }\n);\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import React from \"react\";\n\nimport { Download } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-cy\": dataCy = \"download-button\",\n}) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__download\">\n <Button\n data-cy={dataCy}\n data-testid=\"download-button\"\n icon={Download}\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.download\"),\n position: \"bottom\",\n }}\n onClick={onClick}\n />\n {count && (\n <span className=\"neeto-molecules-subheader__download-count\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import React from \"react\";\n\nimport { Filters as NeetoFilters } from \"neetofilters\";\nimport { Filter } from \"neetoicons\";\nimport { useTranslation } from \"react-i18next\";\n\nconst FilterButton = ({ buttonProps, ...props }) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__filter\">\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n );\n};\n\nexport default FilterButton;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\"neeto-molecules-subheader__right-actions\", {\n hidden: not(showIcons),\n })}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n onChange: PropTypes.func,\n actionBlock: PropTypes.node,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n localStorageKey: PropTypes.string,\n initialValue: PropTypes.array,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\nimport \"./subheader.scss\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-cy\": dataCy = \"subheader\",\n}) => (\n <div\n className={classnames([\"neeto-molecules-subheader\", className])}\n data-cy={dataCy}\n data-testid=\"subheader\"\n >\n <div\n className=\"neeto-molecules-subheader__left-wrapper\"\n data-cy=\"subheader-left-wrapper\"\n >\n {leftActionBlock && (\n <div\n className=\"neeto-molecules-subheader__left\"\n data-cy=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"neeto-molecules-subheader__right\"\n data-cy=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n);\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["Columns","forwardRef","_ref","ref","_ref$buttonProps","buttonProps","columnData","localStorageKey","fixedColumns","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","columnDataIndex","useMemo","pluck","filter","column","includes","dataIndex","_useHiddenColumns","useHiddenColumns","hideColumn","showColumn","React","createElement","className","ManageColumns","_extends","isSearchable","actionBlock","Button","label","style","onClick","_objectSpread","icon","Column","tooltipProps","content","position","displayName","DownloadButton","count","_ref$dataCy","dataCy","Download","FilterButton","NeetoFilters","Filter","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,OAAO,gBAAGC,gBAAU,CACxB,UAAAC,IAAA,EAEEC,GAAG,EACA;AAAA,EAAA,IAAAC,gBAAA,GAAAF,IAAA,CAFDG,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,gBAAA;IAAEE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IAAEC,eAAe,GAAAL,IAAA,CAAfK,eAAe;IAAEC,YAAY,GAAAN,IAAA,CAAZM,YAAY;AAAKC,IAAAA,KAAK,GAAAC,gDAAA,CAAAR,IAAA,EAAAS,WAAA,CAAA,CAAA;AAGvE,EA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AA,GAAA9D,IAAA,CACb0B,SAAS;AAATA,IAAAA,SAAS,GAAAoC,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdC,eAAe,GAAA/D,IAAA,CAAf+D,eAAe;IACfC,gBAAgB,GAAAhE,IAAA,CAAhBgE,gBAAgB;IAAApB,WAAA,GAAA5C,IAAA,CAChB,SAAS,CAAA;AAAE6C,IAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,WAAW,GAAAA,WAAA,CAAA;EAAA,oBAE/BpB,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;IACEC,SAAS,EAAEgC,8BAAU,CAAC,CAAC,2BAA2B,EAAEhC,SAAS,CAAC,CAAE;AAChE,IAAA,SAAA,EAASmB,MAAO;IAChB,aAAY,EAAA,WAAA;GAEZrB,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,yCAAyC;IACnD,SAAQ,EAAA,wBAAA;AAAwB,GAAA,EAE/BqC,eAAe,iBACdvC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,iCAAiC;IAC3C,SAAQ,EAAA,gBAAA;GAEPqC,EAAAA,eACE,CAEJ,CAAC,EACLC,gBAAgB,iBACfxC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kCAAkC;IAC5C,SAAQ,EAAA,iBAAA;GAEPsC,EAAAA,gBACE,CAEJ,CAAC,CAAA;AAAA,EACP;AAEDH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;"}
1
+ {"version":3,"file":"SubHeader.js","sources":["../../src/components/SubHeader/RightBlock/Columns.jsx","../../src/components/SubHeader/RightBlock/Download.jsx","../../src/components/SubHeader/RightBlock/Filter.jsx","../../src/components/SubHeader/RightBlock/index.jsx","../../src/components/SubHeader/index.jsx"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\n\nimport { Column } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns, { useHiddenColumns } from \"components/Columns\";\n\nconst Columns = forwardRef(\n (\n { buttonProps = {}, columnData, localStorageKey, fixedColumns, ...props },\n ref\n ) => {\n const { t } = useTranslation();\n\n const columnDataIndex = useMemo(\n () =>\n pluck(\n \"dataIndex\",\n (columnData || []).filter(\n column => !fixedColumns?.includes(column.dataIndex)\n )\n ),\n [columnData, fixedColumns]\n );\n\n const { hideColumn, showColumn } = useHiddenColumns(localStorageKey);\n\n return (\n <div className=\"neeto-molecules-subheader__columns\">\n <ManageColumns\n isSearchable\n className=\"neeto-ui-dropdown--manage-columns\"\n actionBlock={\n <div className=\"grid grid-cols-2 gap-2 px-4 py-3\">\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Hide all\"\n style=\"secondary\"\n onClick={() => hideColumn(columnDataIndex)}\n />\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Show all\"\n style=\"secondary\"\n onClick={() => showColumn(columnDataIndex)}\n />\n </div>\n }\n buttonProps={{\n icon: Column,\n label: null,\n tooltipProps: {\n content: t(\"neetoMolecules.columns.columns\"),\n position: \"bottom\",\n },\n \"data-testid\": \"columns-button\",\n \"data-cy\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{ columnData, localStorageKey, ...props, ref }}\n />\n </div>\n );\n }\n);\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import React from \"react\";\n\nimport { Download } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-cy\": dataCy = \"download-button\",\n}) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__download\">\n <Button\n data-cy={dataCy}\n data-testid=\"download-button\"\n icon={Download}\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.download\"),\n position: \"bottom\",\n }}\n onClick={onClick}\n />\n {count && (\n <span className=\"neeto-molecules-subheader__download-count\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import React from \"react\";\n\nimport { Filters as NeetoFilters } from \"neetofilters\";\nimport { Filter } from \"neetoicons\";\nimport { useTranslation } from \"react-i18next\";\n\nconst FilterButton = ({ buttonProps, ...props }) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__filter\">\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n );\n};\n\nexport default FilterButton;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\"neeto-molecules-subheader__right-actions\", {\n hidden: not(showIcons),\n })}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n onChange: PropTypes.func,\n actionBlock: PropTypes.node,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n localStorageKey: PropTypes.string,\n initialValue: PropTypes.array,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\nimport \"./subheader.scss\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-cy\": dataCy = \"subheader\",\n}) => (\n <div\n className={classnames([\"neeto-molecules-subheader\", className])}\n data-cy={dataCy}\n data-testid=\"subheader\"\n >\n <div\n className=\"neeto-molecules-subheader__left-wrapper\"\n data-cy=\"subheader-left-wrapper\"\n >\n {leftActionBlock && (\n <div\n className=\"neeto-molecules-subheader__left\"\n data-cy=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"neeto-molecules-subheader__right\"\n data-cy=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n);\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["Columns","forwardRef","_ref","ref","_ref$buttonProps","buttonProps","columnData","localStorageKey","fixedColumns","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","columnDataIndex","useMemo","pluck","filter","column","includes","dataIndex","_useHiddenColumns","useHiddenColumns","hideColumn","showColumn","React","createElement","className","ManageColumns","_extends","isSearchable","actionBlock","Button","label","style","onClick","_objectSpread","icon","Column","tooltipProps","content","position","displayName","DownloadButton","count","_ref$dataCy","dataCy","Download","FilterButton","NeetoFilters","Filter","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,OAAO,gBAAGC,gBAAU,CACxB,UAAAC,IAAA,EAEEC,GAAG,EACA;AAAA,EAAA,IAAAC,gBAAA,GAAAF,IAAA,CAFDG,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,gBAAA;IAAEE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IAAEC,eAAe,GAAAL,IAAA,CAAfK,eAAe;IAAEC,YAAY,GAAAN,IAAA,CAAZM,YAAY;AAAKC,IAAAA,KAAK,GAAAC,gDAAA,CAAAR,IAAA,EAAAS,WAAA,CAAA,CAAA;AAGvE,EAAA,IAAAC,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;EAET,IAAMC,eAAe,GAAGC,aAAO,CAC7B,YAAA;AAAA,IAAA,OACEC,WAAK,CACH,WAAW,EACX,CAACX,UAAU,IAAI,EAAE,EAAEY,MAAM,CACvB,UAAAC,MAAM,EAAA;AAAA,MAAA,OAAI,EAACX,YAAY,KAAZA,IAAAA,IAAAA,YAAY,KAAZA,KAAAA,CAAAA,IAAA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WAAA,CAAA;EAAA,oBAE/BpB,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;IACEC,SAAS,EAAEgC,8BAAU,CAAC,CAAC,2BAA2B,EAAEhC,SAAS,CAAC,CAAE;AAChE,IAAA,SAAA,EAASmB,MAAO;IAChB,aAAY,EAAA,WAAA;GAEZrB,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,yCAAyC;IACnD,SAAQ,EAAA,wBAAA;AAAwB,GAAA,EAE/BqC,eAAe,iBACdvC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,iCAAiC;IAC3C,SAAQ,EAAA,gBAAA;GAEPqC,EAAAA,eACE,CAEJ,CAAC,EACLC,gBAAgB,iBACfxC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kCAAkC;IAC5C,SAAQ,EAAA,iBAAA;GAEPsC,EAAAA,gBACE,CAEJ,CAAC,CAAA;AAAA,EACP;AAEDH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;"}
@@ -35,7 +35,7 @@ require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
35
35
  require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
36
36
  require('@bigbinary/neeto-icons');
37
37
  require('@bigbinary/neeto-commons-frontend/utils');
38
- require('./Columns-6b710238.js');
38
+ require('./useColumns-a1c3668f.js');
39
39
  require('zustand');
40
40
  require('zustand/middleware');
41
41
  require('@bigbinary/neeto-filters-frontend');
@@ -12,9 +12,9 @@ var ramda = require('ramda');
12
12
  var reactI18next = require('react-i18next');
13
13
  var injectCss = require('./inject-css-80a5faa3.js');
14
14
  var defineProperty = require('./defineProperty-886ed289.js');
15
- var general = require('@bigbinary/neeto-commons-frontend/utils/general');
16
15
  var zustand = require('zustand');
17
16
  var middleware = require('zustand/middleware');
17
+ var general = require('@bigbinary/neeto-commons-frontend/utils/general');
18
18
 
19
19
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
20
 
@@ -25,6 +25,7 @@ var css = ":root{--neeto-molecules-columns-menu-max-width:500px}.neeto-molecules
25
25
  injectCss.n(css,{});
26
26
 
27
27
  var HIDDEN_COLUMNS_STORAGE_KEY = "neeto-molecules-hidden-columns";
28
+ var COLUMNS_ORDER_STORAGE_KEY = "neeto-molecules-columns-order";
28
29
 
29
30
  var getHidableColumns = function getHidableColumns(columnData) {
30
31
  return neetoCist.removeBy({
@@ -97,7 +98,7 @@ var useHiddenColumns = function useHiddenColumns(localStorageKey) {
97
98
  };
98
99
  };
99
100
 
100
- var _excluded = ["actionBlock", "checkboxProps", "columnData", "isSearchable", "localStorageKey", "initialValue", "noColumnMessage", "onChange", "searchProps"];
101
+ var _excluded$1 = ["actionBlock", "checkboxProps", "columnData", "isSearchable", "localStorageKey", "initialValue", "noColumnMessage", "onChange", "searchProps"];
101
102
  var Columns = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
102
103
  var actionBlock = _ref.actionBlock,
103
104
  _ref$checkboxProps = _ref.checkboxProps,
@@ -116,7 +117,7 @@ var Columns = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
116
117
  onChange = _ref$onChange === void 0 ? ramda.identity : _ref$onChange,
117
118
  _ref$searchProps = _ref.searchProps,
118
119
  searchProps = _ref$searchProps === void 0 ? {} : _ref$searchProps,
119
- dropdownProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
120
+ dropdownProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded$1);
120
121
  var Divider = neetoui.Dropdown.Divider,
121
122
  Menu = neetoui.Dropdown.Menu,
122
123
  MenuItem = neetoui.Dropdown.MenuItem;
@@ -209,8 +210,62 @@ var Columns = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
209
210
  });
210
211
  Columns.displayName = "Columns";
211
212
 
213
+ var _excluded = ["hiddenColumns", "getVisibleColumnData"];
214
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
215
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
216
+
217
+ /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
218
+ var useColumnOrderStore = zustand.create(middleware.persist(function () {
219
+ return {};
220
+ }, {
221
+ name: COLUMNS_ORDER_STORAGE_KEY
222
+ }));
223
+ var useColumns = function useColumns(_ref) {
224
+ var localStorageKey = _ref.localStorageKey,
225
+ initialHiddenColumns = _ref.initialHiddenColumns,
226
+ _ref$initialOrder = _ref.initialOrder,
227
+ initialOrder = _ref$initialOrder === void 0 ? [] : _ref$initialOrder;
228
+ var columnOrder = useColumnOrderStore(function (state) {
229
+ return state[localStorageKey];
230
+ }) || initialOrder;
231
+ var setColumnOrder = function setColumnOrder(columns) {
232
+ return useColumnOrderStore.setState(defineProperty._defineProperty({}, localStorageKey, columns));
233
+ };
234
+ var _useHiddenColumns = useHiddenColumns(localStorageKey, initialHiddenColumns),
235
+ hiddenColumns = _useHiddenColumns.hiddenColumns,
236
+ getVisibleColumnData = _useHiddenColumns.getVisibleColumnData,
237
+ hiddenColumnHelpers = objectWithoutProperties._objectWithoutProperties(_useHiddenColumns, _excluded);
238
+ var orderColumns = function orderColumns(columnData) {
239
+ if (ramda.isEmpty(columnOrder)) return columnData;
240
+ return columnData.sort(function (a, b) {
241
+ if (!columnOrder.includes(a.dataIndex) || !columnOrder.includes(b.dataIndex)) {
242
+ return 0;
243
+ }
244
+ return columnOrder.indexOf(a.dataIndex) - columnOrder.indexOf(b.dataIndex);
245
+ });
246
+ };
247
+ var getColumnData = function getColumnData(_ref2) {
248
+ var columnData = _ref2.columnData,
249
+ _ref2$isHidable = _ref2.isHidable,
250
+ isHidable = _ref2$isHidable === void 0 ? true : _ref2$isHidable,
251
+ _ref2$isReOrderable = _ref2.isReOrderable,
252
+ isReOrderable = _ref2$isReOrderable === void 0 ? false : _ref2$isReOrderable;
253
+ return ramda.pipe(isHidable ? getVisibleColumnData : ramda.identity, isReOrderable ? orderColumns : ramda.identity)(columnData);
254
+ };
255
+ return _objectSpread(_objectSpread({}, hiddenColumnHelpers), {}, {
256
+ hiddenColumns: hiddenColumns,
257
+ columnOrder: columnOrder,
258
+ getVisibleColumnData: getVisibleColumnData,
259
+ setColumnOrder: setColumnOrder,
260
+ getColumnData: getColumnData
261
+ });
262
+ };
263
+
264
+ exports.COLUMNS_ORDER_STORAGE_KEY = COLUMNS_ORDER_STORAGE_KEY;
212
265
  exports.Columns = Columns;
213
266
  exports.HIDDEN_COLUMNS_STORAGE_KEY = HIDDEN_COLUMNS_STORAGE_KEY;
267
+ exports.useColumnOrderStore = useColumnOrderStore;
268
+ exports.useColumns = useColumns;
214
269
  exports.useHiddenColumnStore = useHiddenColumnStore;
215
270
  exports.useHiddenColumns = useHiddenColumns;
216
- //# sourceMappingURL=Columns-6b710238.js.map
271
+ //# sourceMappingURL=useColumns-a1c3668f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColumns-a1c3668f.js","sources":["../../src/components/Columns/constants.js","../../src/components/Columns/utils.js","../../src/components/Columns/useHiddenColumns.js","../../src/components/Columns/Columns.jsx","../../src/components/Columns/useColumns.js"],"sourcesContent":["export const HIDDEN_COLUMNS_STORAGE_KEY = \"neeto-molecules-hidden-columns\";\nexport const COLUMNS_ORDER_STORAGE_KEY = \"neeto-molecules-columns-order\";\n","import { existsBy, removeBy } from \"neetocist\";\nimport { filter, includes, toLower, trim } from \"ramda\";\n\nexport const getHidableColumns = columnData =>\n removeBy({ isHidable: false }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n\nexport const removeDeletedColumns = (hiddenColumns, columnData) =>\n hiddenColumns.filter(hiddenColumn =>\n existsBy({ dataIndex: hiddenColumn }, columnData)\n );\n","import { useEffect } from \"react\";\n\nimport { removeBy } from \"neetocist\";\nimport {\n getFromLocalStorage,\n removeFromLocalStorage,\n} from \"neetocommons/utils/general\";\nimport { __, without, includes, isEmpty, equals, union } from \"ramda\";\nimport { create } from \"zustand\";\nimport { persist } from \"zustand/middleware\";\n\nimport { HIDDEN_COLUMNS_STORAGE_KEY } from \"./constants\";\nimport { removeDeletedColumns } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useHiddenColumnStore = create(\n persist(() => ({}), { name: HIDDEN_COLUMNS_STORAGE_KEY })\n);\n\nconst useHiddenColumns = (localStorageKey, initialValue = []) => {\n const hiddenColumns = useHiddenColumnStore(state => state[localStorageKey]);\n const setHiddenColumns = columns =>\n useHiddenColumnStore.setState({ [localStorageKey]: columns });\n\n // Migrates values from old location to new zustand location.\n useEffect(() => {\n const oldValue = getFromLocalStorage(localStorageKey);\n if (oldValue) {\n setHiddenColumns(oldValue);\n removeFromLocalStorage(localStorageKey);\n } else if (!hiddenColumns) {\n setHiddenColumns(initialValue);\n }\n }, [localStorageKey]);\n\n const hideColumn = columns =>\n setHiddenColumns(\n union(hiddenColumns, Array.isArray(columns) ? columns : [columns])\n );\n\n const showColumn = columns =>\n setHiddenColumns(\n without(Array.isArray(columns) ? columns : [columns], hiddenColumns)\n );\n\n const getVisibleColumnData = columnData =>\n removeBy({ dataIndex: includes(__, hiddenColumns || []) }, columnData);\n\n const onColumnDataChange = columnData => {\n if (isEmpty(columnData) || !hiddenColumns) return;\n const newHiddenColumns = removeDeletedColumns(hiddenColumns, columnData);\n if (!equals(newHiddenColumns, hiddenColumns)) {\n setHiddenColumns(newHiddenColumns);\n }\n };\n\n return {\n hiddenColumns,\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n };\n};\n\nexport { useHiddenColumns, useHiddenColumnStore };\n","import React, {\n useState,\n useImperativeHandle,\n forwardRef,\n useEffect,\n} from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty } from \"neetocist\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { identity } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport \"./columns.scss\";\nimport { useHiddenColumns } from \"./useHiddenColumns\";\nimport { filterBySearchTerm, getHidableColumns } from \"./utils\";\n\nconst Columns = forwardRef(\n (\n {\n actionBlock,\n checkboxProps = {},\n columnData = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n ...dropdownProps\n },\n ref\n ) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [searchTerm, setSearchTerm] = useState(\"\");\n const { t } = useTranslation();\n\n const {\n hiddenColumns = [],\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n } = useHiddenColumns(localStorageKey, initialValue);\n\n useEffect(() => {\n onChange(getVisibleColumnData(columnData), hiddenColumns);\n }, [hiddenColumns]);\n\n useEffect(() => {\n onColumnDataChange(columnData);\n }, [columnData]);\n\n /**\n * @deprecated Use showColumn|hideColumn from useHiddenColumns\n */\n useImperativeHandle(ref, () => ({ hideColumn, showColumn }), []);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) => {\n if (checked) showColumn(dataIndex);\n else hideColumn(dataIndex);\n };\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n const columns = getHidableColumns(columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n return (\n <Dropdown\n appendTo={document.body}\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div className=\"neeto-molecules-columns__container\">\n {isSearchable && (\n <Input\n className=\"px-4 py-2\"\n data-cy=\"neeto-ui-columns-search\"\n data-testid=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n <Typography\n className=\"neeto-ui-text-gray-600 px-4 py-2\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {t(\"neetoMolecules.columns.columns\")}\n </Typography>\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer px-4 py-2\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n }\n);\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import { identity, isEmpty, pipe } from \"ramda\";\nimport { create } from \"zustand\";\nimport { persist } from \"zustand/middleware\";\n\nimport { COLUMNS_ORDER_STORAGE_KEY } from \"./constants\";\nimport { useHiddenColumns } from \"./useHiddenColumns\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useColumnOrderStore = create(\n persist(() => ({}), { name: COLUMNS_ORDER_STORAGE_KEY })\n);\n\nconst useColumns = ({\n localStorageKey,\n initialHiddenColumns,\n initialOrder = [],\n}) => {\n const columnOrder =\n useColumnOrderStore(state => state[localStorageKey]) || initialOrder;\n\n const setColumnOrder = columns =>\n useColumnOrderStore.setState({ [localStorageKey]: columns });\n\n const { hiddenColumns, getVisibleColumnData, ...hiddenColumnHelpers } =\n useHiddenColumns(localStorageKey, initialHiddenColumns);\n\n const orderColumns = columnData => {\n if (isEmpty(columnOrder)) return columnData;\n\n return columnData.sort((a, b) => {\n if (\n !columnOrder.includes(a.dataIndex) ||\n !columnOrder.includes(b.dataIndex)\n ) {\n return 0;\n }\n\n return (\n columnOrder.indexOf(a.dataIndex) - columnOrder.indexOf(b.dataIndex)\n );\n });\n };\n\n const getColumnData = ({\n columnData,\n isHidable = true,\n isReOrderable = false,\n }) =>\n pipe(\n isHidable ? getVisibleColumnData : identity,\n isReOrderable ? orderColumns : identity\n )(columnData);\n\n return {\n ...hiddenColumnHelpers,\n hiddenColumns,\n columnOrder,\n getVisibleColumnData,\n setColumnOrder,\n getColumnData,\n };\n};\n\nexport { useColumns, useColumnOrderStore };\n"],"names":["HIDDEN_COLUMNS_STORAGE_KEY","COLUMNS_ORDER_STORAGE_KEY","getHidableColumns","columnData","removeBy","isHidable","filterBySearchTerm","searchTerm","columns","filter","_ref","title","includes","trim","toLower","removeDeletedColumns","hiddenColumns","hiddenColumn","existsBy","dataIndex","useHiddenColumnStore","create","persist","name","useHiddenColumns","localStorageKey","initialValue","arguments","length","undefined","state","setHiddenColumns","setState","_defineProperty","useEffect","oldValue","getFromLocalStorage","removeFromLocalStorage","hideColumn","union","Array","isArray","showColumn","without","getVisibleColumnData","__","onColumnDataChange","isEmpty","newHiddenColumns","equals","Columns","forwardRef","ref","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$isSearchable","isSearchable","_ref$localStorageKey","_ref$initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useState","useState","_useState2","_slicedToArray","setSearchTerm","_useTranslation","useTranslation","_useHiddenColumns","_useHiddenColumns$hid","useImperativeHandle","handleChange","_ref2","_ref2$target","target","checked","handleSearch","_ref3","value","filteredColumns","React","createElement","_extends","appendTo","document","body","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","className","Input","placeholder","prefix","Search","type","Typography","style","weight","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment","displayName","useColumnOrderStore","useColumns","initialHiddenColumns","_ref$initialOrder","initialOrder","columnOrder","setColumnOrder","hiddenColumnHelpers","orderColumns","sort","a","b","indexOf","getColumnData","_ref2$isHidable","_ref2$isReOrderable","isReOrderable","pipe","_objectSpread"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,0BAA0B,GAAG,iCAAgC;AACnE,IAAMC,yBAAyB,GAAG;;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BAAmB,CAAA,EAAA,EAAA,EAAA;AACtBtH,IAAAA,aAAa,EAAbA,aAAa;AACboH,IAAAA,WAAW,EAAXA,WAAW;AACXxF,IAAAA,oBAAoB,EAApBA,oBAAoB;AACpByF,IAAAA,cAAc,EAAdA,cAAc;AACdO,IAAAA,aAAa,EAAbA,aAAAA;AAAa,GAAA,CAAA,CAAA;AAEjB;;;;;;;;;;"}
@@ -6,18 +6,19 @@ import i18next from 'i18next';
6
6
  import { removeBy, existsBy, isNotEmpty } from '@bigbinary/neeto-cist';
7
7
  import { Search } from '@bigbinary/neeto-icons';
8
8
  import { Dropdown, Input, Typography, Label, Checkbox } from '@bigbinary/neetoui';
9
- import { filter, includes, trim, toLower, union, without, __, isEmpty, equals, identity } from 'ramda';
9
+ import { filter, includes, trim, toLower, union, without, __, isEmpty, equals, identity, pipe } from 'ramda';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import { n } from './inject-css-c86de496.js';
12
12
  import { _ as _defineProperty } from './defineProperty-549061a7.js';
13
- import { getFromLocalStorage, removeFromLocalStorage } from '@bigbinary/neeto-commons-frontend/utils/general';
14
13
  import { create } from 'zustand';
15
14
  import { persist } from 'zustand/middleware';
15
+ import { getFromLocalStorage, removeFromLocalStorage } from '@bigbinary/neeto-commons-frontend/utils/general';
16
16
 
17
17
  var css = ":root{--neeto-molecules-columns-menu-max-width:500px}.neeto-molecules-columns__container{max-width:500px;max-width:var(--neeto-molecules-columns-menu-max-width)}";
18
18
  n(css,{});
19
19
 
20
20
  var HIDDEN_COLUMNS_STORAGE_KEY = "neeto-molecules-hidden-columns";
21
+ var COLUMNS_ORDER_STORAGE_KEY = "neeto-molecules-columns-order";
21
22
 
22
23
  var getHidableColumns = function getHidableColumns(columnData) {
23
24
  return removeBy({
@@ -90,7 +91,7 @@ var useHiddenColumns = function useHiddenColumns(localStorageKey) {
90
91
  };
91
92
  };
92
93
 
93
- var _excluded = ["actionBlock", "checkboxProps", "columnData", "isSearchable", "localStorageKey", "initialValue", "noColumnMessage", "onChange", "searchProps"];
94
+ var _excluded$1 = ["actionBlock", "checkboxProps", "columnData", "isSearchable", "localStorageKey", "initialValue", "noColumnMessage", "onChange", "searchProps"];
94
95
  var Columns = /*#__PURE__*/forwardRef(function (_ref, ref) {
95
96
  var actionBlock = _ref.actionBlock,
96
97
  _ref$checkboxProps = _ref.checkboxProps,
@@ -109,7 +110,7 @@ var Columns = /*#__PURE__*/forwardRef(function (_ref, ref) {
109
110
  onChange = _ref$onChange === void 0 ? identity : _ref$onChange,
110
111
  _ref$searchProps = _ref.searchProps,
111
112
  searchProps = _ref$searchProps === void 0 ? {} : _ref$searchProps,
112
- dropdownProps = _objectWithoutProperties(_ref, _excluded);
113
+ dropdownProps = _objectWithoutProperties(_ref, _excluded$1);
113
114
  var Divider = Dropdown.Divider,
114
115
  Menu = Dropdown.Menu,
115
116
  MenuItem = Dropdown.MenuItem;
@@ -202,5 +203,56 @@ var Columns = /*#__PURE__*/forwardRef(function (_ref, ref) {
202
203
  });
203
204
  Columns.displayName = "Columns";
204
205
 
205
- export { Columns as C, HIDDEN_COLUMNS_STORAGE_KEY as H, useHiddenColumnStore as a, useHiddenColumns as u };
206
- //# sourceMappingURL=Columns-2bdb8579.js.map
206
+ var _excluded = ["hiddenColumns", "getVisibleColumnData"];
207
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
208
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
209
+
210
+ /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
211
+ var useColumnOrderStore = create(persist(function () {
212
+ return {};
213
+ }, {
214
+ name: COLUMNS_ORDER_STORAGE_KEY
215
+ }));
216
+ var useColumns = function useColumns(_ref) {
217
+ var localStorageKey = _ref.localStorageKey,
218
+ initialHiddenColumns = _ref.initialHiddenColumns,
219
+ _ref$initialOrder = _ref.initialOrder,
220
+ initialOrder = _ref$initialOrder === void 0 ? [] : _ref$initialOrder;
221
+ var columnOrder = useColumnOrderStore(function (state) {
222
+ return state[localStorageKey];
223
+ }) || initialOrder;
224
+ var setColumnOrder = function setColumnOrder(columns) {
225
+ return useColumnOrderStore.setState(_defineProperty({}, localStorageKey, columns));
226
+ };
227
+ var _useHiddenColumns = useHiddenColumns(localStorageKey, initialHiddenColumns),
228
+ hiddenColumns = _useHiddenColumns.hiddenColumns,
229
+ getVisibleColumnData = _useHiddenColumns.getVisibleColumnData,
230
+ hiddenColumnHelpers = _objectWithoutProperties(_useHiddenColumns, _excluded);
231
+ var orderColumns = function orderColumns(columnData) {
232
+ if (isEmpty(columnOrder)) return columnData;
233
+ return columnData.sort(function (a, b) {
234
+ if (!columnOrder.includes(a.dataIndex) || !columnOrder.includes(b.dataIndex)) {
235
+ return 0;
236
+ }
237
+ return columnOrder.indexOf(a.dataIndex) - columnOrder.indexOf(b.dataIndex);
238
+ });
239
+ };
240
+ var getColumnData = function getColumnData(_ref2) {
241
+ var columnData = _ref2.columnData,
242
+ _ref2$isHidable = _ref2.isHidable,
243
+ isHidable = _ref2$isHidable === void 0 ? true : _ref2$isHidable,
244
+ _ref2$isReOrderable = _ref2.isReOrderable,
245
+ isReOrderable = _ref2$isReOrderable === void 0 ? false : _ref2$isReOrderable;
246
+ return pipe(isHidable ? getVisibleColumnData : identity, isReOrderable ? orderColumns : identity)(columnData);
247
+ };
248
+ return _objectSpread(_objectSpread({}, hiddenColumnHelpers), {}, {
249
+ hiddenColumns: hiddenColumns,
250
+ columnOrder: columnOrder,
251
+ getVisibleColumnData: getVisibleColumnData,
252
+ setColumnOrder: setColumnOrder,
253
+ getColumnData: getColumnData
254
+ });
255
+ };
256
+
257
+ export { Columns as C, HIDDEN_COLUMNS_STORAGE_KEY as H, useHiddenColumnStore as a, COLUMNS_ORDER_STORAGE_KEY as b, useColumns as c, useColumnOrderStore as d, useHiddenColumns as u };
258
+ //# sourceMappingURL=useColumns-d17d1f72.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColumns-d17d1f72.js","sources":["../src/components/Columns/constants.js","../src/components/Columns/utils.js","../src/components/Columns/useHiddenColumns.js","../src/components/Columns/Columns.jsx","../src/components/Columns/useColumns.js"],"sourcesContent":["export const HIDDEN_COLUMNS_STORAGE_KEY = \"neeto-molecules-hidden-columns\";\nexport const COLUMNS_ORDER_STORAGE_KEY = \"neeto-molecules-columns-order\";\n","import { existsBy, removeBy } from \"neetocist\";\nimport { filter, includes, toLower, trim } from \"ramda\";\n\nexport const getHidableColumns = columnData =>\n removeBy({ isHidable: false }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n\nexport const removeDeletedColumns = (hiddenColumns, columnData) =>\n hiddenColumns.filter(hiddenColumn =>\n existsBy({ dataIndex: hiddenColumn }, columnData)\n );\n","import { useEffect } from \"react\";\n\nimport { removeBy } from \"neetocist\";\nimport {\n getFromLocalStorage,\n removeFromLocalStorage,\n} from \"neetocommons/utils/general\";\nimport { __, without, includes, isEmpty, equals, union } from \"ramda\";\nimport { create } from \"zustand\";\nimport { persist } from \"zustand/middleware\";\n\nimport { HIDDEN_COLUMNS_STORAGE_KEY } from \"./constants\";\nimport { removeDeletedColumns } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useHiddenColumnStore = create(\n persist(() => ({}), { name: HIDDEN_COLUMNS_STORAGE_KEY })\n);\n\nconst useHiddenColumns = (localStorageKey, initialValue = []) => {\n const hiddenColumns = useHiddenColumnStore(state => state[localStorageKey]);\n const setHiddenColumns = columns =>\n useHiddenColumnStore.setState({ [localStorageKey]: columns });\n\n // Migrates values from old location to new zustand location.\n useEffect(() => {\n const oldValue = getFromLocalStorage(localStorageKey);\n if (oldValue) {\n setHiddenColumns(oldValue);\n removeFromLocalStorage(localStorageKey);\n } else if (!hiddenColumns) {\n setHiddenColumns(initialValue);\n }\n }, [localStorageKey]);\n\n const hideColumn = columns =>\n setHiddenColumns(\n union(hiddenColumns, Array.isArray(columns) ? columns : [columns])\n );\n\n const showColumn = columns =>\n setHiddenColumns(\n without(Array.isArray(columns) ? columns : [columns], hiddenColumns)\n );\n\n const getVisibleColumnData = columnData =>\n removeBy({ dataIndex: includes(__, hiddenColumns || []) }, columnData);\n\n const onColumnDataChange = columnData => {\n if (isEmpty(columnData) || !hiddenColumns) return;\n const newHiddenColumns = removeDeletedColumns(hiddenColumns, columnData);\n if (!equals(newHiddenColumns, hiddenColumns)) {\n setHiddenColumns(newHiddenColumns);\n }\n };\n\n return {\n hiddenColumns,\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n };\n};\n\nexport { useHiddenColumns, useHiddenColumnStore };\n","import React, {\n useState,\n useImperativeHandle,\n forwardRef,\n useEffect,\n} from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty } from \"neetocist\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { identity } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport \"./columns.scss\";\nimport { useHiddenColumns } from \"./useHiddenColumns\";\nimport { filterBySearchTerm, getHidableColumns } from \"./utils\";\n\nconst Columns = forwardRef(\n (\n {\n actionBlock,\n checkboxProps = {},\n columnData = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n ...dropdownProps\n },\n ref\n ) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [searchTerm, setSearchTerm] = useState(\"\");\n const { t } = useTranslation();\n\n const {\n hiddenColumns = [],\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n } = useHiddenColumns(localStorageKey, initialValue);\n\n useEffect(() => {\n onChange(getVisibleColumnData(columnData), hiddenColumns);\n }, [hiddenColumns]);\n\n useEffect(() => {\n onColumnDataChange(columnData);\n }, [columnData]);\n\n /**\n * @deprecated Use showColumn|hideColumn from useHiddenColumns\n */\n useImperativeHandle(ref, () => ({ hideColumn, showColumn }), []);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) => {\n if (checked) showColumn(dataIndex);\n else hideColumn(dataIndex);\n };\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n const columns = getHidableColumns(columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n return (\n <Dropdown\n appendTo={document.body}\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div className=\"neeto-molecules-columns__container\">\n {isSearchable && (\n <Input\n className=\"px-4 py-2\"\n data-cy=\"neeto-ui-columns-search\"\n data-testid=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n <Typography\n className=\"neeto-ui-text-gray-600 px-4 py-2\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {t(\"neetoMolecules.columns.columns\")}\n </Typography>\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer px-4 py-2\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n }\n);\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import { identity, isEmpty, pipe } from \"ramda\";\nimport { create } from \"zustand\";\nimport { persist } from \"zustand/middleware\";\n\nimport { COLUMNS_ORDER_STORAGE_KEY } from \"./constants\";\nimport { useHiddenColumns } from \"./useHiddenColumns\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useColumnOrderStore = create(\n persist(() => ({}), { name: COLUMNS_ORDER_STORAGE_KEY })\n);\n\nconst useColumns = ({\n localStorageKey,\n initialHiddenColumns,\n initialOrder = [],\n}) => {\n const columnOrder =\n useColumnOrderStore(state => state[localStorageKey]) || initialOrder;\n\n const setColumnOrder = columns =>\n useColumnOrderStore.setState({ [localStorageKey]: columns });\n\n const { hiddenColumns, getVisibleColumnData, ...hiddenColumnHelpers } =\n useHiddenColumns(localStorageKey, initialHiddenColumns);\n\n const orderColumns = columnData => {\n if (isEmpty(columnOrder)) return columnData;\n\n return columnData.sort((a, b) => {\n if (\n !columnOrder.includes(a.dataIndex) ||\n !columnOrder.includes(b.dataIndex)\n ) {\n return 0;\n }\n\n return (\n columnOrder.indexOf(a.dataIndex) - columnOrder.indexOf(b.dataIndex)\n );\n });\n };\n\n const getColumnData = ({\n columnData,\n isHidable = true,\n isReOrderable = false,\n }) =>\n pipe(\n isHidable ? getVisibleColumnData : identity,\n isReOrderable ? orderColumns : identity\n )(columnData);\n\n return {\n ...hiddenColumnHelpers,\n hiddenColumns,\n columnOrder,\n getVisibleColumnData,\n setColumnOrder,\n getColumnData,\n };\n};\n\nexport { useColumns, useColumnOrderStore };\n"],"names":["HIDDEN_COLUMNS_STORAGE_KEY","COLUMNS_ORDER_STORAGE_KEY","getHidableColumns","columnData","removeBy","isHidable","filterBySearchTerm","searchTerm","columns","filter","_ref","title","includes","trim","toLower","removeDeletedColumns","hiddenColumns","hiddenColumn","existsBy","dataIndex","useHiddenColumnStore","create","persist","name","useHiddenColumns","localStorageKey","initialValue","arguments","length","undefined","state","setHiddenColumns","setState","_defineProperty","useEffect","oldValue","getFromLocalStorage","removeFromLocalStorage","hideColumn","union","Array","isArray","showColumn","without","getVisibleColumnData","__","onColumnDataChange","isEmpty","newHiddenColumns","equals","Columns","forwardRef","ref","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$isSearchable","isSearchable","_ref$localStorageKey","_ref$initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useState","useState","_useState2","_slicedToArray","setSearchTerm","_useTranslation","useTranslation","_useHiddenColumns","_useHiddenColumns$hid","useImperativeHandle","handleChange","_ref2","_ref2$target","target","checked","handleSearch","_ref3","value","filteredColumns","React","createElement","_extends","appendTo","document","body","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","className","Input","placeholder","prefix","Search","type","Typography","style","weight","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment","displayName","useColumnOrderStore","useColumns","initialHiddenColumns","_ref$initialOrder","initialOrder","columnOrder","setColumnOrder","hiddenColumnHelpers","orderColumns","sort","a","b","indexOf","getColumnData","_ref2$isHidable","_ref2$isReOrderable","isReOrderable","pipe","_objectSpread"],"mappings":";;;;;;;;;;;;;;;;;;;AAAO,IAAMA,0BAA0B,GAAG,iCAAgC;AACnE,IAAMC,yBAAyB,GAAG;;ACElC,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAGC,UAAU,EAAA;AAAA,EAAA,OACzCC,QAAQ,CAAC;AAAEC,IAAAA,SAAS,EAAE,KAAA;GAAO,EAAEF,UAAU,CAAC,CAAA;AAAA,CAAA,CAAA;AAErC,IAAMG,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,UAAU,EAAEC,OAAO,EAAA;EAAA,OACpDC,MAAM,CACJ,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;AAAA,IAAA,OAAOC,QAAQ,CAACC,IAAI,CAACC,OAAO,CAACP,UAAU,CAAC,CAAC,EAAEM,IAAI,CAACC,OAAO,CAACH,KAAK,CAAC,CAAC,CAAC,CAAA;AAAA,GAAA,EACxEH,OACF,CAAC,CAAA;AAAA,CAAA,CAAA;AAEI,IAAMO,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIC,aAAa,EAAEb,UAAU,EAAA;AAAA,EAAA,OAC5Da,aAAa,CAACP,MAAM,CAAC,UAAAQ,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,IACjBrF,UAAU,GAAAqF,KAAA,CAAVrF,UAAU;MAAA0I,eAAA,GAAArD,KAAA,CACVnF,SAAS;AAATA,MAAAA,SAAS,GAAAwI,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;MAAAC,mBAAA,GAAAtD,KAAA,CAChBuD,aAAa;AAAbA,MAAAA,aAAa,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,mBAAA,CAAA;AAAA,IAAA,OAErBE,IAAI,CACF3I,SAAS,GAAGuC,oBAAoB,GAAGuB,QAAQ,EAC3C4E,aAAa,GAAGR,YAAY,GAAGpE,QACjC,CAAC,CAAChE,UAAU,CAAC,CAAA;AAAA,GAAA,CAAA;AAEf,EAAA,OAAA8I,aAAA,CAAAA,aAAA,CAAA,EAAA,EACKX,mBAAmB,CAAA,EAAA,EAAA,EAAA;AACtBtH,IAAAA,aAAa,EAAbA,aAAa;AACboH,IAAAA,WAAW,EAAXA,WAAW;AACXxF,IAAAA,oBAAoB,EAApBA,oBAAoB;AACpByF,IAAAA,cAAc,EAAdA,cAAc;AACdO,IAAAA,aAAa,EAAbA,aAAAA;AAAa,GAAA,CAAA,CAAA;AAEjB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "1.15.59",
3
+ "version": "1.15.61",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -6,6 +6,16 @@ type Column = {
6
6
  key: string;
7
7
  [key: string]: any;
8
8
  };
9
+ type getColumnDataType = {
10
+ columnData: any[];
11
+ isHidable?: boolean;
12
+ isReOrderable?: boolean;
13
+ };
14
+ type useColumnsType = {
15
+ localStorageKey: string;
16
+ initialHiddenColumns?: string[];
17
+ initialOrder?: string[];
18
+ };
9
19
  /**
10
20
  *
11
21
  * It is a helper component that can be used along with the table component to hide
@@ -58,6 +68,59 @@ type Column = {
58
68
  * );
59
69
  * };
60
70
  * @endexample
71
+ * It's a helper hook used alongside Columns component. It allows you to to
72
+ *
73
+ * interact with the underlying zustand store to hide/show columns and store the column order.
74
+ *
75
+ * @example
76
+ *
77
+ * import React, { useState } from "react";
78
+ *
79
+ * import { Table } from "@bigbinary/neetoui";
80
+ * import Columns, { useColumns } from "@bigbinary/neeto-molecules/Columns";
81
+ *
82
+ * import { DEFAULT_ROW_DATA } from "./constants";
83
+ *
84
+ * const App = () => {
85
+ * const localStorageKey = "NEETO_APP_FEATURE_HIDDEN_COLUMNS";
86
+ * const { hideColumn, getColumnData } = useColumns({
87
+ * localStorageKey,
88
+ * initialHiddenColumns,
89
+ * initialOrder,
90
+ * });
91
+ * const [columns, setColumns] = useState([]);
92
+ * const DEFAULT_COLUMNS_DATA = [
93
+ * { title: "Id", dataIndex: "id", key: "id", isHidable: false },
94
+ * { title: "Name", dataIndex: "name", key: "name", isHidable: false },
95
+ * {
96
+ * title: () => (
97
+ * <>
98
+ * <span>Email</span>
99
+ * <Button onClick={() => hideColumn("email")}>Hide</Button>
100
+ * </>
101
+ * ),
102
+ * dataIndex: "email",
103
+ * key: "email",
104
+ * },
105
+ * ];
106
+ *
107
+ * const handleColumnReorder = columns => {
108
+ * setColumnOrder(pluck("dataIndex", columns).filter(isNotEmpty));
109
+ * };
110
+ *
111
+ * const columnData = getColumnData({
112
+ * columnData: columns,
113
+ * isReOrderable: true,
114
+ * isHidable: true,
115
+ * });
116
+ *
117
+ * return (
118
+ * <div>
119
+ * <Table rowData={DEFAULT_ROW_DATA} {...{ columnData }} onColumnUpdate={handleColumnReorder} />
120
+ * </div>
121
+ * );
122
+ * };
123
+ * @endexample
61
124
  */
62
125
  const Columns: React.FC<{
63
126
  actionBlock?: React.ReactNode;
@@ -76,4 +139,22 @@ export function useHiddenColumns(localStorageKey: string, initialValue?: string[
76
139
  getVisibleColumnData: (columnData: any[]) => any[];
77
140
  onColumnDataChange: (columnData: any[]) => void;
78
141
  };
142
+ export function useColumns({
143
+ localStorageKey,
144
+ initialHiddenColumns,
145
+ initialOrder
146
+ }: useColumnsType): {
147
+ hiddenColumns: string[];
148
+ columnOrder: string[];
149
+ hideColumn: (dataIndex: string) => void;
150
+ showColumn: (dataIndex: string) => void;
151
+ getVisibleColumnData: (columnData: any[]) => any[];
152
+ onColumnDataChange: (columnData: any[]) => void;
153
+ getColumnData: ({
154
+ columnData,
155
+ isHidable,
156
+ isReOrderable
157
+ }: getColumnDataType) => any[];
158
+ setColumnOrder: (columns: string[]) => void;
159
+ };
79
160
  export default Columns;
@@ -1 +0,0 @@
1
- {"version":3,"file":"Columns-2bdb8579.js","sources":["../src/components/Columns/constants.js","../src/components/Columns/utils.js","../src/components/Columns/useHiddenColumns.js","../src/components/Columns/Columns.jsx"],"sourcesContent":["export const HIDDEN_COLUMNS_STORAGE_KEY = \"neeto-molecules-hidden-columns\";\n","import { existsBy, removeBy } from \"neetocist\";\nimport { filter, includes, toLower, trim } from \"ramda\";\n\nexport const getHidableColumns = columnData =>\n removeBy({ isHidable: false }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n\nexport const removeDeletedColumns = (hiddenColumns, columnData) =>\n hiddenColumns.filter(hiddenColumn =>\n existsBy({ dataIndex: hiddenColumn }, columnData)\n );\n","import { useEffect } from \"react\";\n\nimport { removeBy } from \"neetocist\";\nimport {\n getFromLocalStorage,\n removeFromLocalStorage,\n} from \"neetocommons/utils/general\";\nimport { __, without, includes, isEmpty, equals, union } from \"ramda\";\nimport { create } from \"zustand\";\nimport { persist } from \"zustand/middleware\";\n\nimport { HIDDEN_COLUMNS_STORAGE_KEY } from \"./constants\";\nimport { removeDeletedColumns } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useHiddenColumnStore = create(\n persist(() => ({}), { name: HIDDEN_COLUMNS_STORAGE_KEY })\n);\n\nconst useHiddenColumns = (localStorageKey, initialValue = []) => {\n const hiddenColumns = useHiddenColumnStore(state => state[localStorageKey]);\n const setHiddenColumns = columns =>\n useHiddenColumnStore.setState({ [localStorageKey]: columns });\n\n // Migrates values from old location to new zustand location.\n useEffect(() => {\n const oldValue = getFromLocalStorage(localStorageKey);\n if (oldValue) {\n setHiddenColumns(oldValue);\n removeFromLocalStorage(localStorageKey);\n } else if (!hiddenColumns) {\n setHiddenColumns(initialValue);\n }\n }, [localStorageKey]);\n\n const hideColumn = columns =>\n setHiddenColumns(\n union(hiddenColumns, Array.isArray(columns) ? columns : [columns])\n );\n\n const showColumn = columns =>\n setHiddenColumns(\n without(Array.isArray(columns) ? columns : [columns], hiddenColumns)\n );\n\n const getVisibleColumnData = columnData =>\n removeBy({ dataIndex: includes(__, hiddenColumns || []) }, columnData);\n\n const onColumnDataChange = columnData => {\n if (isEmpty(columnData) || !hiddenColumns) return;\n const newHiddenColumns = removeDeletedColumns(hiddenColumns, columnData);\n if (!equals(newHiddenColumns, hiddenColumns)) {\n setHiddenColumns(newHiddenColumns);\n }\n };\n\n return {\n hiddenColumns,\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n };\n};\n\nexport { useHiddenColumns, useHiddenColumnStore };\n","import React, {\n useState,\n useImperativeHandle,\n forwardRef,\n useEffect,\n} from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty } from \"neetocist\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { identity } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport \"./columns.scss\";\nimport { useHiddenColumns } from \"./useHiddenColumns\";\nimport { filterBySearchTerm, getHidableColumns } from \"./utils\";\n\nconst Columns = forwardRef(\n (\n {\n actionBlock,\n checkboxProps = {},\n columnData = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n ...dropdownProps\n },\n ref\n ) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [searchTerm, setSearchTerm] = useState(\"\");\n const { t } = useTranslation();\n\n const {\n hiddenColumns = [],\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n } = useHiddenColumns(localStorageKey, initialValue);\n\n useEffect(() => {\n onChange(getVisibleColumnData(columnData), hiddenColumns);\n }, [hiddenColumns]);\n\n useEffect(() => {\n onColumnDataChange(columnData);\n }, [columnData]);\n\n /**\n * @deprecated Use showColumn|hideColumn from useHiddenColumns\n */\n useImperativeHandle(ref, () => ({ hideColumn, showColumn }), []);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) => {\n if (checked) showColumn(dataIndex);\n else hideColumn(dataIndex);\n };\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n const columns = getHidableColumns(columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n return (\n <Dropdown\n appendTo={document.body}\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div className=\"neeto-molecules-columns__container\">\n {isSearchable && (\n <Input\n className=\"px-4 py-2\"\n data-cy=\"neeto-ui-columns-search\"\n data-testid=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n <Typography\n className=\"neeto-ui-text-gray-600 px-4 py-2\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {t(\"neetoMolecules.columns.columns\")}\n </Typography>\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer px-4 py-2\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n }\n);\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n"],"names":["HIDDEN_COLUMNS_STORAGE_KEY","getHidableColumns","columnData","removeBy","isHidable","filterBySearchTerm","searchTerm","columns","filter","_ref","title","includes","trim","toLower","removeDeletedColumns","hiddenColumns","hiddenColumn","existsBy","dataIndex","useHiddenColumnStore","create","persist","name","useHiddenColumns","localStorageKey","initialValue","arguments","length","undefined","state","setHiddenColumns","setState","_defineProperty","useEffect","oldValue","getFromLocalStorage","removeFromLocalStorage","hideColumn","union","Array","isArray","showColumn","without","getVisibleColumnData","__","onColumnDataChange","isEmpty","newHiddenColumns","equals","Columns","forwardRef","ref","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$isSearchable","isSearchable","_ref$localStorageKey","_ref$initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useState","useState","_useState2","_slicedToArray","setSearchTerm","_useTranslation","useTranslation","_useHiddenColumns","_useHiddenColumns$hid","useImperativeHandle","handleChange","_ref2","_ref2$target","target","checked","handleSearch","_ref3","value","filteredColumns","React","createElement","_extends","appendTo","document","body","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","className","Input","placeholder","prefix","Search","type","Typography","style","weight","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;AAAO,IAAMA,0BAA0B,GAAG;;ACGnC,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAGC,UAAU,EAAA;AAAA,EAAA,OACzCC,QAAQ,CAAC;AAAEC,IAAAA,SAAS,EAAE,KAAA;GAAO,EAAEF,UAAU,CAAC,CAAA;AAAA,CAAA,CAAA;AAErC,IAAMG,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,UAAU,EAAEC,OAAO,EAAA;EAAA,OACpDC,MAAM,CACJ,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;AAAA,IAAA,OAAOC,QAAQ,CAACC,IAAI,CAACC,OAAO,CAACP,UAAU,CAAC,CAAC,EAAEM,IAAI,CAACC,OAAO,CAACH,KAAK,CAAC,CAAC,CAAC,CAAA;AAAA,GAAA,EACxEH,OACF,CAAC,CAAA;AAAA,CAAA,CAAA;A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A,GAAAA;AAAI,KAAA,eACjBxB,cAAA,CAAAC,aAAA,CAACwB,KAAK,EAAA;AACJb,MAAAA,SAAS,EAAC,4FAA4F;AACtGc,MAAAA,OAAO,EAAEvG,SAAAA;AAAU,KAAA,eAEnB6E,cAAA,CAAAC,aAAA,CAAC0B,QAAQ,EAAAzB,QAAA,CAAA;AACPP,MAAAA,OAAO,EAAE,CAAC3E,aAAa,CAACJ,QAAQ,CAACO,SAAS,CAAE;AAC5C,MAAA,SAAA,EAAQ,2BAA2B;AACnCyG,MAAAA,EAAE,EAAEzG,SAAU;AACdsF,MAAAA,KAAK,EAAE9F,KAAM;AACbY,MAAAA,IAAI,EAAEJ,SAAU;AAChB+C,MAAAA,QAAQ,EAAEqB,YAAAA;AAAa,KAAA,EACnBhC,aAAa,CAClB,CACI,CACC,CAAC,CAAA;AAAA,GACZ,CAAC,gBAEFyC,cAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMW,IAAAA,SAAS,EAAC,oEAAA;GACb9C,EAAAA,eACG,CACP,EACA,CAAC,CAACT,WAAW,iBACZ2C,cAAA,CAAAC,aAAA,CAAAD,cAAA,CAAA6B,QAAA,EAAA,IAAA,eACE7B,cAAA,CAAAC,aAAA,CAACxB,OAAO,EAAA,IAAE,CAAC,EACVpB,WACD,CAED,CACD,CACE,CAAC,CAAA;AAEf,CACF,EAAC;AAyCDH,OAAO,CAAC4E,WAAW,GAAG,SAAS;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Columns-6b710238.js","sources":["../../src/components/Columns/constants.js","../../src/components/Columns/utils.js","../../src/components/Columns/useHiddenColumns.js","../../src/components/Columns/Columns.jsx"],"sourcesContent":["export const HIDDEN_COLUMNS_STORAGE_KEY = \"neeto-molecules-hidden-columns\";\n","import { existsBy, removeBy } from \"neetocist\";\nimport { filter, includes, toLower, trim } from \"ramda\";\n\nexport const getHidableColumns = columnData =>\n removeBy({ isHidable: false }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n\nexport const removeDeletedColumns = (hiddenColumns, columnData) =>\n hiddenColumns.filter(hiddenColumn =>\n existsBy({ dataIndex: hiddenColumn }, columnData)\n );\n","import { useEffect } from \"react\";\n\nimport { removeBy } from \"neetocist\";\nimport {\n getFromLocalStorage,\n removeFromLocalStorage,\n} from \"neetocommons/utils/general\";\nimport { __, without, includes, isEmpty, equals, union } from \"ramda\";\nimport { create } from \"zustand\";\nimport { persist } from \"zustand/middleware\";\n\nimport { HIDDEN_COLUMNS_STORAGE_KEY } from \"./constants\";\nimport { removeDeletedColumns } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useHiddenColumnStore = create(\n persist(() => ({}), { name: HIDDEN_COLUMNS_STORAGE_KEY })\n);\n\nconst useHiddenColumns = (localStorageKey, initialValue = []) => {\n const hiddenColumns = useHiddenColumnStore(state => state[localStorageKey]);\n const setHiddenColumns = columns =>\n useHiddenColumnStore.setState({ [localStorageKey]: columns });\n\n // Migrates values from old location to new zustand location.\n useEffect(() => {\n const oldValue = getFromLocalStorage(localStorageKey);\n if (oldValue) {\n setHiddenColumns(oldValue);\n removeFromLocalStorage(localStorageKey);\n } else if (!hiddenColumns) {\n setHiddenColumns(initialValue);\n }\n }, [localStorageKey]);\n\n const hideColumn = columns =>\n setHiddenColumns(\n union(hiddenColumns, Array.isArray(columns) ? columns : [columns])\n );\n\n const showColumn = columns =>\n setHiddenColumns(\n without(Array.isArray(columns) ? columns : [columns], hiddenColumns)\n );\n\n const getVisibleColumnData = columnData =>\n removeBy({ dataIndex: includes(__, hiddenColumns || []) }, columnData);\n\n const onColumnDataChange = columnData => {\n if (isEmpty(columnData) || !hiddenColumns) return;\n const newHiddenColumns = removeDeletedColumns(hiddenColumns, columnData);\n if (!equals(newHiddenColumns, hiddenColumns)) {\n setHiddenColumns(newHiddenColumns);\n }\n };\n\n return {\n hiddenColumns,\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n };\n};\n\nexport { useHiddenColumns, useHiddenColumnStore };\n","import React, {\n useState,\n useImperativeHandle,\n forwardRef,\n useEffect,\n} from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty } from \"neetocist\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { identity } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport \"./columns.scss\";\nimport { useHiddenColumns } from \"./useHiddenColumns\";\nimport { filterBySearchTerm, getHidableColumns } from \"./utils\";\n\nconst Columns = forwardRef(\n (\n {\n actionBlock,\n checkboxProps = {},\n columnData = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n ...dropdownProps\n },\n ref\n ) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [searchTerm, setSearchTerm] = useState(\"\");\n const { t } = useTranslation();\n\n const {\n hiddenColumns = [],\n hideColumn,\n showColumn,\n getVisibleColumnData,\n onColumnDataChange,\n } = useHiddenColumns(localStorageKey, initialValue);\n\n useEffect(() => {\n onChange(getVisibleColumnData(columnData), hiddenColumns);\n }, [hiddenColumns]);\n\n useEffect(() => {\n onColumnDataChange(columnData);\n }, [columnData]);\n\n /**\n * @deprecated Use showColumn|hideColumn from useHiddenColumns\n */\n useImperativeHandle(ref, () => ({ hideColumn, showColumn }), []);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) => {\n if (checked) showColumn(dataIndex);\n else hideColumn(dataIndex);\n };\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n const columns = getHidableColumns(columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n return (\n <Dropdown\n appendTo={document.body}\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div className=\"neeto-molecules-columns__container\">\n {isSearchable && (\n <Input\n className=\"px-4 py-2\"\n data-cy=\"neeto-ui-columns-search\"\n data-testid=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n <Typography\n className=\"neeto-ui-text-gray-600 px-4 py-2\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {t(\"neetoMolecules.columns.columns\")}\n </Typography>\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer px-4 py-2\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n }\n);\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n"],"names":["HIDDEN_COLUMNS_STORAGE_KEY","getHidableColumns","columnData","removeBy","isHidable","filterBySearchTerm","searchTerm","columns","filter","_ref","title","includes","trim","toLower","removeDeletedColumns","hiddenColumns","hiddenColumn","existsBy","dataIndex","useHiddenColumnStore","create","persist","name","useHiddenColumns","localStorageKey","initialValue","arguments","length","undefined","state","setHiddenColumns","setState","_defineProperty","useEffect","oldValue","getFromLocalStorage","removeFromLocalStorage","hideColumn","union","Array","isArray","showColumn","without","getVisibleColumnData","__","onColumnDataChange","isEmpty","newHiddenColumns","equals","Columns","forwardRef","ref","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$isSearchable","isSearchable","_ref$localStorageKey","_ref$initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useState","useState","_useState2","_slicedToArray","setSearchTerm","_useTranslation","useTranslation","_useHiddenColumns","_useHiddenColumns$hid","useImperativeHandle","handleChange","_ref2","_ref2$target","target","checked","handleSearch","_ref3","value","filteredColumns","React","createElement","_extends","appendTo","document","body","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","className","Input","placeholder","prefix","Search","type","Typography","style","weight","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,0BAA0B,GAAG;;ACGnC,IAAMC,iBAAiB,GAAG,SAApBA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