@bigbinary/neeto-molecules 4.0.12 → 4.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/AuditLogs.js +1 -3
  2. package/dist/AuditLogs.js.map +1 -1
  3. package/dist/CalendarView.js +1 -4
  4. package/dist/CalendarView.js.map +1 -1
  5. package/dist/{Chevron-4o5U32u5.js → Chevron-DEQtNhrI.js} +4 -3
  6. package/dist/Chevron-DEQtNhrI.js.map +1 -0
  7. package/dist/{useColumns-BPD5xfeZ.js → Columns-CwbG5wLv.js} +55 -159
  8. package/dist/Columns-CwbG5wLv.js.map +1 -0
  9. package/dist/Columns.js +1 -4
  10. package/dist/Columns.js.map +1 -1
  11. package/dist/ConfigurePageSidebar.js +1 -1
  12. package/dist/Sidebar.js +198 -6
  13. package/dist/Sidebar.js.map +1 -1
  14. package/dist/SubHeader.js +1 -4
  15. package/dist/SubHeader.js.map +1 -1
  16. package/dist/Taxonomy.js +1 -3
  17. package/dist/Taxonomy.js.map +1 -1
  18. package/dist/cjs/AuditLogs.js +1 -3
  19. package/dist/cjs/AuditLogs.js.map +1 -1
  20. package/dist/cjs/CalendarView.js +1 -4
  21. package/dist/cjs/CalendarView.js.map +1 -1
  22. package/dist/cjs/{Chevron-DprQPqED.js → Chevron-u-rD2gAf.js} +4 -2
  23. package/dist/cjs/Chevron-u-rD2gAf.js.map +1 -0
  24. package/dist/cjs/{useColumns-CK2J7GSt.js → Columns-CZDLxh70.js} +52 -160
  25. package/dist/cjs/Columns-CZDLxh70.js.map +1 -0
  26. package/dist/cjs/Columns.js +6 -13
  27. package/dist/cjs/Columns.js.map +1 -1
  28. package/dist/cjs/ConfigurePageSidebar.js +1 -1
  29. package/dist/cjs/Sidebar.js +196 -4
  30. package/dist/cjs/Sidebar.js.map +1 -1
  31. package/dist/cjs/SubHeader.js +2 -5
  32. package/dist/cjs/SubHeader.js.map +1 -1
  33. package/dist/cjs/Taxonomy.js +1 -3
  34. package/dist/cjs/Taxonomy.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/translations/en.json +3 -0
  37. package/src/translations/fi.json +205 -1
  38. package/src/translations/hr.json +3 -1
  39. package/types/Columns.d.ts +1 -139
  40. package/types/Sidebar.d.ts +1 -0
  41. package/dist/Chevron-4o5U32u5.js.map +0 -1
  42. package/dist/cjs/Chevron-DprQPqED.js.map +0 -1
  43. package/dist/cjs/useColumns-CK2J7GSt.js.map +0 -1
  44. package/dist/useColumns-BPD5xfeZ.js.map +0 -1
@@ -52,6 +52,7 @@ var SIDEBAR_WIDTH_KEY = "neeto-molecules-sidebar-width";
52
52
  var MIN_SIDEBAR_WIDTH = 12.5 * 16;
53
53
  var MAX_SIDEBAR_WIDTH = 20 * 16;
54
54
  var DEFAULT_SIDEBAR_WIDTH = 15 * 16;
55
+ var PINNED_MORE_NAV_LINKS_KEY = "pinnedMoreNavLinks";
55
56
 
56
57
  var isSubRouteActive = function isSubRouteActive(subRoute, location) {
57
58
  var currentBrowserUrl = new URL(location.pathname + location.search + location.hash, window.location.origin);
@@ -244,7 +245,7 @@ var SelectedLink = function SelectedLink(_ref) {
244
245
  });
245
246
  };
246
247
 
247
- var css = ":root{--neeto-molecules-sidebar-width:15rem;--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-engage-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:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;width:15rem;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:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:.5rem;right:auto;top:.5rem}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-15rem;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;height:100dvh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode){height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;position:absolute!important;right:.5rem;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:12.625rem;left:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);right:auto;transition:none}}.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 - 8.5rem)!important;height:calc(100dvh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important;height:calc(100dvh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:.5rem 0 2rem;padding:0 1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding:.75rem 1.5rem;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:rotate(90deg)}.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{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:left}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));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-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.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-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding:.25rem 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-bottom:0;padding:.5rem 1.5rem .5rem 3.625rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));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-black));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-accent-800));font-weight:500;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:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-bottom:.5rem;margin-left:auto;margin-right:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-bottom:.25rem}.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;min-width:15rem}.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:.25rem 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:2.5rem;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:.5rem}.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:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);height:calc(100dvh - 1rem);margin-bottom:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!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:3.625rem}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:.25rem 1.5rem .25rem 3.625rem}.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:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);height:calc(100dvh - 10rem);margin-bottom:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin:0 0 .625rem!important;min-height:0;overflow-y:auto;padding:0 0 .625rem!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding:.75rem .25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0;padding-bottom:.625rem;padding-top:.625rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-left:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding:.5rem .75rem .5rem 1.5rem;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-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;justify-content:center;min-width:1rem;padding-left:.25rem;padding-right:.25rem;position:absolute;right:-4px;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-bottom:1.5rem;padding:.5rem 1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;position:absolute;right:0;top:0;width:3px;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__resize-handle:before{background-color:rgb(var(--neeto-ui-gray-200));bottom:0;content:\"\";left:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:0}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-400));width:2px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:2px}.neeto-molecules-sidebar__wrapper:not(.neeto-molecules-sidebar__wrapper--collapsed)+.neeto-molecules-sidebar__resize-handle{display:block}.neeto-molecules-sidebar__wrapper+.neeto-molecules-sidebar__resize-handle{display:none;left:15rem;left:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed+.neeto-molecules-sidebar__resize-handle{display:none}body.dragging-sidebar,body.dragging-sidebar *{cursor:col-resize!important}body.dragging-sidebar *{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}";
248
+ var css = ":root{--neeto-molecules-sidebar-width:15rem;--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-engage-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:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;width:15rem;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:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:.5rem;right:auto;top:.5rem}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-15rem;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;height:100dvh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode){height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;position:absolute!important;right:.5rem;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:12.625rem;left:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);right:auto;transition:none}}.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 - 8.5rem)!important;height:calc(100dvh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important;height:calc(100dvh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:.5rem 0 2rem;padding:0 1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding:.75rem 1.5rem;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:rotate(90deg)}.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{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:left}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));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--hover-active{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.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-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding:.25rem 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-bottom:0;padding:.5rem 1.5rem .5rem 3.625rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));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-black));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-accent-800));font-weight:500;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:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-bottom:.5rem;margin-left:auto;margin-right:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-bottom:.25rem}.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;min-width:15rem}.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:.25rem 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:2.5rem;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:.5rem}.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:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);height:calc(100dvh - 1rem);margin-bottom:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!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:3.625rem}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:.25rem 1.5rem .25rem 3.625rem}.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:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);height:calc(100dvh - 10rem);margin-bottom:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin:0 0 .625rem!important;min-height:0;overflow-y:auto;padding:0 0 .625rem!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding:.75rem .25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:0;padding-bottom:.625rem;padding-top:.625rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-left:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding:.5rem .75rem .5rem 1.5rem;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-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;justify-content:center;min-width:1rem;padding-left:.25rem;padding-right:.25rem;position:absolute;right:-4px;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-bottom:1.5rem;padding:.5rem 1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;position:absolute;right:0;top:0;width:3px;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__resize-handle:before{background-color:rgb(var(--neeto-ui-gray-200));bottom:0;content:\"\";left:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:0}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-400));width:2px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:2px}.neeto-molecules-sidebar__wrapper:not(.neeto-molecules-sidebar__wrapper--collapsed)+.neeto-molecules-sidebar__resize-handle{display:block}.neeto-molecules-sidebar__wrapper+.neeto-molecules-sidebar__resize-handle{display:none;left:15rem;left:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed+.neeto-molecules-sidebar__resize-handle{display:none}body.dragging-sidebar,body.dragging-sidebar *{cursor:col-resize!important}body.dragging-sidebar *{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}";
248
249
  injectCss.n(css,{});
249
250
 
250
251
  var Chevron = function Chevron(_ref) {
@@ -267,6 +268,7 @@ exports.DEFAULT_HOME_PATH = DEFAULT_HOME_PATH;
267
268
  exports.DEFAULT_SIDEBAR_WIDTH = DEFAULT_SIDEBAR_WIDTH;
268
269
  exports.MAX_SIDEBAR_WIDTH = MAX_SIDEBAR_WIDTH;
269
270
  exports.MIN_SIDEBAR_WIDTH = MIN_SIDEBAR_WIDTH;
271
+ exports.PINNED_MORE_NAV_LINKS_KEY = PINNED_MORE_NAV_LINKS_KEY;
270
272
  exports.SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = SELECTED_NAV_LINK_ROUTE_STORAGE_KEY;
271
273
  exports.SIDEBAR_WIDTH_KEY = SIDEBAR_WIDTH_KEY;
272
274
  exports.SelectedLink = SelectedLink;
@@ -276,4 +278,4 @@ exports.enableDraggingStyles = enableDraggingStyles;
276
278
  exports.filterByPermissions = filterByPermissions;
277
279
  exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
278
280
  exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
279
- //# sourceMappingURL=Chevron-DprQPqED.js.map
281
+ //# sourceMappingURL=Chevron-u-rD2gAf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chevron-u-rD2gAf.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 { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\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\nexport const DEFAULT_HOME_PATH = \"/admin\";\n\nexport const SIDEBAR_WIDTH_KEY = \"neeto-molecules-sidebar-width\";\nexport const MIN_SIDEBAR_WIDTH = 12.5 * 16;\nexport const MAX_SIDEBAR_WIDTH = 20 * 16;\nexport const DEFAULT_SIDEBAR_WIDTH = 15 * 16;\n\nexport const PINNED_MORE_NAV_LINKS_KEY = \"pinnedMoreNavLinks\";\n","import { isPresent, 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\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n\nexport const enableDraggingStyles = () => {\n document.body.classList.add(\"dragging-sidebar\");\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n};\n\nexport const disableDraggingStyles = () => {\n document.body.classList.remove(\"dragging-sidebar\");\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n};\n","import { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n onClick,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, onClick, 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={isSubLinkActive}\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 { Fragment } 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 <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n href={subItem.href}\n isActive={subItem.isActive}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n onClick={subItem.onClick}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n {items.length - 1 !== subIndex && (\n <hr className=\"neeto-molecules-sidebar__separator neeto-ui-border-gray-200\" />\n )}\n </>\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n homePath,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, homePath, e);\n };\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-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-3\">\n <Button\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-home-button`}\n icon={Home}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n <span className=\"px-1 text-xs\">/</span>\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const 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","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","SIDEBAR_WIDTH_KEY","MIN_SIDEBAR_WIDTH","MAX_SIDEBAR_WIDTH","DEFAULT_SIDEBAR_WIDTH","PINNED_MORE_NAV_LINKS_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","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","enableDraggingStyles","document","body","classList","add","style","cursor","userSelect","disableDraggingStyles","remove","SubLink","onClick","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","className","Typography","component","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Fragment","_Items","length","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","homePath","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AACLC,IAAAA,MAAM,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,WAAA,CAAA,CAAA;AAET,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACR,aAAa,CAAC;IADhBS,UAAU,GAAAF,qBAAA,CAA1BP,aAAa,CAAA,CAAA;AAGtB,EAAA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AAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC,cAAA;KACN,CAAA;AAAC,GACC,CAAC,CAAA;AAAA;;;;;;;;;;;;;;;;;;;"}
@@ -23,9 +23,6 @@ var jsxRuntime = require('react/jsx-runtime');
23
23
  var reactQuery = require('@tanstack/react-query');
24
24
  var useMutationWithInvalidation = require('@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation');
25
25
  var axios = require('axios');
26
- var zustand = require('zustand');
27
- var middleware = require('zustand/middleware');
28
- var general = require('@bigbinary/neeto-commons-frontend/utils/general');
29
26
 
30
27
  var css = ":root{--neeto-molecules-columns-menu-max-width:31.25rem}.neeto-molecules-columns__container{max-width:31.25rem;max-width:var(--neeto-molecules-columns-menu-max-width)}.neeto-molecules-columns__sortable-item .neeto-ui-cursor-grab{cursor:grab}.neeto-molecules-columns__sortable-item .neeto-ui-cursor-grab:active{cursor:grabbing}.neeto-molecules-columns__sortable-item:hover .neeto-ui-text-gray-400{color:#6b7280}";
31
28
  injectCss.n(css,{});
@@ -82,8 +79,8 @@ const CSS = /*#__PURE__*/Object.freeze({
82
79
  }
83
80
  });
84
81
 
85
- function ownKeys$4(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; }
86
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
82
+ function ownKeys$3(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; }
83
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
87
84
  var Item = function Item(_ref) {
88
85
  var column = _ref.column,
89
86
  hiddenColumns = _ref.hiddenColumns,
@@ -112,13 +109,13 @@ var Item = function Item(_ref) {
112
109
  children: /*#__PURE__*/jsxRuntime.jsxs(Label, {
113
110
  className: "neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer neeto-ui-items-center px-4 py-2",
114
111
  htmlFor: key,
115
- children: [/*#__PURE__*/jsxRuntime.jsx("div", _objectSpread$4(_objectSpread$4(_objectSpread$4({}, attributes), listeners), {}, {
112
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", _objectSpread$3(_objectSpread$3(_objectSpread$3({}, attributes), listeners), {}, {
116
113
  className: "neeto-ui-mr-2 neeto-ui-cursor-grab neeto-ui-flex neeto-ui-items-center",
117
114
  children: /*#__PURE__*/jsxRuntime.jsx(Drag, {
118
115
  className: "neeto-ui-text-gray-400",
119
116
  size: 16
120
117
  })
121
- })), /*#__PURE__*/jsxRuntime.jsx(Checkbox, _objectSpread$4({
118
+ })), /*#__PURE__*/jsxRuntime.jsx(Checkbox, _objectSpread$3({
122
119
  checked: !hiddenColumns.includes(key),
123
120
  "data-cy": "neeto-ui-columns-checkbox",
124
121
  id: key,
@@ -160,13 +157,13 @@ var HIDDEN_COLUMNS_STORAGE_KEY = "neeto-molecules-hidden-columns";
160
157
  var COLUMNS_ORDER_STORAGE_KEY = "neeto-molecules-columns-order";
161
158
  var TABLE_CONFIGURATION_QUERY_KEY = "table-configuration";
162
159
 
163
- function ownKeys$3(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; }
164
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
160
+ function ownKeys$2(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; }
161
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
165
162
  var useFetchTableConfiguration = function useFetchTableConfiguration(_ref) {
166
163
  var tableKey = _ref.tableKey,
167
164
  _ref$options = _ref.options,
168
165
  options = _ref$options === void 0 ? {} : _ref$options;
169
- return reactQuery.useQuery(_objectSpread$3({
166
+ return reactQuery.useQuery(_objectSpread$2({
170
167
  queryKey: [TABLE_CONFIGURATION_QUERY_KEY, tableKey],
171
168
  enabled: !!tableKey,
172
169
  queryFn: function queryFn() {
@@ -176,22 +173,23 @@ var useFetchTableConfiguration = function useFetchTableConfiguration(_ref) {
176
173
  };
177
174
  var useUpdateTableConfiguration = function useUpdateTableConfiguration(tableKey) {
178
175
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
179
- return useMutationWithInvalidation(tableConfigurationApi.update, _objectSpread$3({
176
+ return useMutationWithInvalidation(tableConfigurationApi.update, _objectSpread$2({
180
177
  keysToInvalidate: [[TABLE_CONFIGURATION_QUERY_KEY, tableKey]]
181
178
  }, options));
182
179
  };
183
180
  var useDestroyTableConfiguration = function useDestroyTableConfiguration(tableKey) {
184
181
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
185
- return useMutationWithInvalidation(tableConfigurationApi.destroy, _objectSpread$3({
182
+ return useMutationWithInvalidation(tableConfigurationApi.destroy, _objectSpread$2({
186
183
  keysToInvalidate: [[TABLE_CONFIGURATION_QUERY_KEY, tableKey]]
187
184
  }, options));
188
185
  };
189
186
 
190
- function ownKeys$2(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; }
191
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
187
+ 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; }
188
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
192
189
  var useTableConfigurations = function useTableConfigurations(tableKey, columnData) {
193
190
  var onMutationSuccess = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : neetoCist.noop;
194
191
  var allowConfigurationResetOnUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
192
+ var defaultHiddenColumns = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
195
193
  var _useFetchTableConfigu = useFetchTableConfiguration({
196
194
  tableKey: tableKey
197
195
  }),
@@ -247,15 +245,6 @@ var useTableConfigurations = function useTableConfigurations(tableKey, columnDat
247
245
  }
248
246
  return columnData || [];
249
247
  }, [isLoading, tableConfiguration === null || tableConfiguration === void 0 ? void 0 : tableConfiguration.columns, hasAdditionalColumns, columnData, processColumnsWithConfiguration]);
250
- var customizedColumns = React.useMemo(function () {
251
- if (shouldApplyTableConfiguration) {
252
- var visibleColumnKeys = ramda.pluck("key", tableConfiguration.columns.filter(ramda.prop("isShown")));
253
- return allProcessedColumns.filter(function (column) {
254
- return visibleColumnKeys.includes(column.key);
255
- });
256
- }
257
- return columnData || [];
258
- }, [allProcessedColumns, columnData, tableConfiguration === null || tableConfiguration === void 0 ? void 0 : tableConfiguration.columns, shouldApplyTableConfiguration]);
259
248
  var existingColumnConfiguration = React.useMemo(function () {
260
249
  if (shouldApplyTableConfiguration) {
261
250
  return tableConfiguration.columns;
@@ -266,10 +255,17 @@ var useTableConfigurations = function useTableConfigurations(tableKey, columnDat
266
255
  return columnData.map(function (column) {
267
256
  return {
268
257
  key: column.key,
269
- isShown: true
258
+ isShown: !defaultHiddenColumns.includes(column.key)
270
259
  };
271
260
  });
272
- }, [shouldApplyTableConfiguration, columnData, tableConfiguration === null || tableConfiguration === void 0 ? void 0 : tableConfiguration.columns]);
261
+ }, [shouldApplyTableConfiguration, columnData, tableConfiguration === null || tableConfiguration === void 0 ? void 0 : tableConfiguration.columns, defaultHiddenColumns]);
262
+ var customizedColumns = React.useMemo(function () {
263
+ var visibleColumnsConfig = existingColumnConfiguration.filter(ramda.prop("isShown"));
264
+ var visibleColumnKeys = ramda.pluck("key", visibleColumnsConfig);
265
+ return allProcessedColumns.filter(function (column) {
266
+ return visibleColumnKeys.includes(column.key);
267
+ });
268
+ }, [allProcessedColumns, existingColumnConfiguration]);
273
269
  var updateColumns = function updateColumns(updatedColumns) {
274
270
  updateConfiguration({
275
271
  tableKey: tableKey,
@@ -281,21 +277,18 @@ var useTableConfigurations = function useTableConfigurations(tableKey, columnDat
281
277
  };
282
278
  var hideColumn = function hideColumn(columnKey) {
283
279
  updateColumns(existingColumnConfiguration.map(function (column) {
284
- return column.key === columnKey ? _objectSpread$2(_objectSpread$2({}, column), {}, {
280
+ return column.key === columnKey ? _objectSpread$1(_objectSpread$1({}, column), {}, {
285
281
  isShown: false
286
282
  }) : column;
287
283
  }));
288
284
  };
289
285
  var showColumn = function showColumn(columnKey) {
290
286
  updateColumns(existingColumnConfiguration.map(function (column) {
291
- return column.key === columnKey ? _objectSpread$2(_objectSpread$2({}, column), {}, {
287
+ return column.key === columnKey ? _objectSpread$1(_objectSpread$1({}, column), {}, {
292
288
  isShown: true
293
289
  }) : column;
294
290
  }));
295
291
  };
296
- var reorderColumns = function reorderColumns(newOrder) {
297
- updateColumns(newOrder);
298
- };
299
292
  return {
300
293
  customizedColumns: customizedColumns,
301
294
  // Only visible columns (for displaying the columns in the table)
@@ -305,7 +298,7 @@ var useTableConfigurations = function useTableConfigurations(tableKey, columnDat
305
298
  existingColumnConfiguration: existingColumnConfiguration,
306
299
  hideColumn: hideColumn,
307
300
  showColumn: showColumn,
308
- reorderColumns: reorderColumns,
301
+ updateColumns: updateColumns,
309
302
  destroyConfiguration: destroyConfiguration
310
303
  };
311
304
  };
@@ -321,17 +314,10 @@ var filterBySearchTerm = function filterBySearchTerm(searchTerm, columns) {
321
314
  return ramda.includes(ramda.trim(ramda.toLower(searchTerm)), ramda.trim(ramda.toLower(title)));
322
315
  }, columns);
323
316
  };
324
- var removeDeletedColumns = function removeDeletedColumns(hiddenColumns, columnData) {
325
- return hiddenColumns.filter(function (hiddenColumn) {
326
- return neetoCist.existsBy({
327
- dataIndex: hiddenColumn
328
- }, columnData);
329
- });
330
- };
331
317
 
332
- var _excluded$1 = ["actionBlock", "checkboxProps", "columnData", "isSearchable", "tableKey", "noColumnMessage", "searchProps", "allowConfigurationResetOnUpdate", "onMutationSuccess"];
333
- 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; }
334
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
318
+ var _excluded = ["actionBlock", "checkboxProps", "columnData", "isSearchable", "tableKey", "noColumnMessage", "searchProps", "allowConfigurationResetOnUpdate", "onMutationSuccess", "defaultHiddenColumns"];
319
+ 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; }
320
+ 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; }
335
321
  var Columns = function Columns(_ref) {
336
322
  var actionBlock = _ref.actionBlock,
337
323
  _ref$checkboxProps = _ref.checkboxProps,
@@ -350,7 +336,9 @@ var Columns = function Columns(_ref) {
350
336
  allowConfigurationResetOnUpdate = _ref$allowConfigurati === void 0 ? true : _ref$allowConfigurati,
351
337
  _ref$onMutationSucces = _ref.onMutationSuccess,
352
338
  onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces,
353
- dropdownProps = _objectWithoutProperties(_ref, _excluded$1);
339
+ _ref$defaultHiddenCol = _ref.defaultHiddenColumns,
340
+ defaultHiddenColumns = _ref$defaultHiddenCol === void 0 ? [] : _ref$defaultHiddenCol,
341
+ dropdownProps = _objectWithoutProperties(_ref, _excluded);
354
342
  var Divider = Dropdown.Divider,
355
343
  Menu = Dropdown.Menu,
356
344
  MenuItem = Dropdown.MenuItem;
@@ -360,12 +348,12 @@ var Columns = function Columns(_ref) {
360
348
  setSearchTerm = _useState2[1];
361
349
  var _useTranslation = reactI18next.useTranslation(),
362
350
  t = _useTranslation.t;
363
- var _useTableConfiguratio = useTableConfigurations(tableKey, columnData, onMutationSuccess, allowConfigurationResetOnUpdate),
351
+ var _useTableConfiguratio = useTableConfigurations(tableKey, columnData, onMutationSuccess, allowConfigurationResetOnUpdate, defaultHiddenColumns),
364
352
  allProcessedColumns = _useTableConfiguratio.allProcessedColumns,
365
353
  existingColumnConfiguration = _useTableConfiguratio.existingColumnConfiguration,
366
354
  hideColumn = _useTableConfiguratio.hideColumn,
367
355
  showColumn = _useTableConfiguratio.showColumn,
368
- reorderColumns = _useTableConfiguratio.reorderColumns,
356
+ updateColumns = _useTableConfiguratio.updateColumns,
369
357
  destroyConfiguration = _useTableConfiguratio.destroyConfiguration;
370
358
  var hiddenColumns = ramda.pluck("key", existingColumnConfiguration.filter(function (column) {
371
359
  return !column.isShown;
@@ -386,10 +374,16 @@ var Columns = function Columns(_ref) {
386
374
  _newOrder$splice2 = _slicedToArray(_newOrder$splice, 1),
387
375
  movedItem = _newOrder$splice2[0];
388
376
  newOrder.splice(newIndex, 0, movedItem);
389
- reorderColumns(newOrder);
377
+ updateColumns(newOrder);
390
378
  };
391
379
  var columns = getHidableColumns(allProcessedColumns);
392
380
  var filteredColumns = filterBySearchTerm(searchTerm, columns);
381
+ var handleHideAllColumns = function handleHideAllColumns() {
382
+ var columnsToHideKeys = ramda.pluck("key", columns);
383
+ updateColumns(existingColumnConfiguration.map(function (column) {
384
+ return ramda.includes(column.key, columnsToHideKeys) ? ramda.assoc("isShown", false, column) : column;
385
+ }));
386
+ };
393
387
  var handleChange = function handleChange(_ref2) {
394
388
  var _ref2$target = _ref2.target,
395
389
  dataIndex = _ref2$target.name,
@@ -400,7 +394,7 @@ var Columns = function Columns(_ref) {
400
394
  var value = _ref3.target.value;
401
395
  return setSearchTerm(value);
402
396
  };
403
- return /*#__PURE__*/jsxRuntime.jsx(Dropdown, _objectSpread$1(_objectSpread$1({
397
+ return /*#__PURE__*/jsxRuntime.jsx(Dropdown, _objectSpread(_objectSpread({
404
398
  appendTo: document.body,
405
399
  buttonSize: "medium",
406
400
  buttonStyle: "text",
@@ -414,7 +408,7 @@ var Columns = function Columns(_ref) {
414
408
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
415
409
  className: "neeto-molecules-columns__container",
416
410
  "data-cy": "customize-columns-dropdown-container",
417
- children: [isSearchable && /*#__PURE__*/jsxRuntime.jsx(Input, _objectSpread$1({
411
+ children: [isSearchable && /*#__PURE__*/jsxRuntime.jsx(Input, _objectSpread({
418
412
  className: "px-4 py-2",
419
413
  "data-cy": "neeto-ui-columns-search",
420
414
  "data-testid": "neeto-ui-columns-search",
@@ -447,7 +441,7 @@ var Columns = function Columns(_ref) {
447
441
  children: /*#__PURE__*/jsxRuntime.jsx(Label, {
448
442
  className: "neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer px-4 py-2",
449
443
  htmlFor: key,
450
- children: /*#__PURE__*/jsxRuntime.jsx(Checkbox, _objectSpread$1({
444
+ children: /*#__PURE__*/jsxRuntime.jsx(Checkbox, _objectSpread({
451
445
  checked: !hiddenColumns.includes(key),
452
446
  "data-cy": "neeto-ui-columns-checkbox",
453
447
  id: key,
@@ -459,16 +453,21 @@ var Columns = function Columns(_ref) {
459
453
  }, key);
460
454
  }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), !!actionBlock && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
461
455
  children: [actionBlock, /*#__PURE__*/jsxRuntime.jsx(Divider, {})]
462
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
463
- className: "flex justify-end p-1 pr-3",
464
- children: /*#__PURE__*/jsxRuntime.jsx(Button, {
456
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
457
+ className: "flex justify-end gap-2 p-1 pr-3",
458
+ children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
459
+ "data-cy": "column-visibility-hide-all-button",
460
+ label: t("neetoMolecules.columns.hideAll"),
461
+ style: "tertiary",
462
+ onClick: handleHideAllColumns
463
+ }), /*#__PURE__*/jsxRuntime.jsx(Button, {
465
464
  "data-cy": "column-visibility-reset-button",
466
465
  label: t("neetoMolecules.columns.reset"),
467
466
  style: "secondary",
468
467
  onClick: function onClick() {
469
468
  return destroyConfiguration(tableKey);
470
469
  }
471
- })
470
+ })]
472
471
  })]
473
472
  })
474
473
  })
@@ -476,116 +475,9 @@ var Columns = function Columns(_ref) {
476
475
  };
477
476
  Columns.displayName = "Columns";
478
477
 
479
- /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
480
- var useHiddenColumnStore = zustand.create(middleware.persist(function () {
481
- return {};
482
- }, {
483
- name: HIDDEN_COLUMNS_STORAGE_KEY
484
- }));
485
- var useHiddenColumns = function useHiddenColumns(localStorageKey) {
486
- var initialValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
487
- var hiddenColumns = useHiddenColumnStore(function (state) {
488
- return state[localStorageKey];
489
- });
490
- var setHiddenColumns = function setHiddenColumns(columns) {
491
- return useHiddenColumnStore.setState(_defineProperty({}, localStorageKey, columns));
492
- };
493
-
494
- // Migrates values from old location to new zustand location.
495
- React.useEffect(function () {
496
- var oldValue = general.getFromLocalStorage(localStorageKey);
497
- if (oldValue) {
498
- setHiddenColumns(oldValue);
499
- general.removeFromLocalStorage(localStorageKey);
500
- } else if (!hiddenColumns) {
501
- setHiddenColumns(initialValue);
502
- }
503
- }, [localStorageKey]);
504
- var hideColumn = function hideColumn(columns) {
505
- return setHiddenColumns(ramda.union(hiddenColumns, Array.isArray(columns) ? columns : [columns]));
506
- };
507
- var showColumn = function showColumn(columns) {
508
- return setHiddenColumns(ramda.without(Array.isArray(columns) ? columns : [columns], hiddenColumns));
509
- };
510
- var getVisibleColumnData = function getVisibleColumnData(columnData) {
511
- return neetoCist.removeBy({
512
- dataIndex: ramda.includes(ramda.__, hiddenColumns || [])
513
- }, columnData);
514
- };
515
- var onColumnDataChange = function onColumnDataChange(columnData) {
516
- if (ramda.isEmpty(columnData) || !hiddenColumns) return;
517
- var newHiddenColumns = removeDeletedColumns(hiddenColumns, columnData);
518
- if (!ramda.equals(newHiddenColumns, hiddenColumns)) {
519
- setHiddenColumns(newHiddenColumns);
520
- }
521
- };
522
- return {
523
- hiddenColumns: hiddenColumns,
524
- hideColumn: hideColumn,
525
- showColumn: showColumn,
526
- getVisibleColumnData: getVisibleColumnData,
527
- onColumnDataChange: onColumnDataChange
528
- };
529
- };
530
-
531
- var _excluded = ["hiddenColumns", "getVisibleColumnData"];
532
- 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; }
533
- 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; }
534
-
535
- /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
536
- var useColumnOrderStore = zustand.create(middleware.persist(function () {
537
- return {};
538
- }, {
539
- name: COLUMNS_ORDER_STORAGE_KEY
540
- }));
541
- var useColumns = function useColumns(_ref) {
542
- var localStorageKey = _ref.localStorageKey,
543
- initialHiddenColumns = _ref.initialHiddenColumns,
544
- _ref$initialOrder = _ref.initialOrder,
545
- initialOrder = _ref$initialOrder === void 0 ? [] : _ref$initialOrder;
546
- var columnOrder = useColumnOrderStore(function (state) {
547
- return state[localStorageKey];
548
- }) || initialOrder;
549
- var setColumnOrder = function setColumnOrder(columns) {
550
- return useColumnOrderStore.setState(_defineProperty({}, localStorageKey, columns));
551
- };
552
- var _useHiddenColumns = useHiddenColumns(localStorageKey, initialHiddenColumns),
553
- hiddenColumns = _useHiddenColumns.hiddenColumns,
554
- getVisibleColumnData = _useHiddenColumns.getVisibleColumnData,
555
- hiddenColumnHelpers = _objectWithoutProperties(_useHiddenColumns, _excluded);
556
- var orderColumns = function orderColumns(columnData) {
557
- if (ramda.isEmpty(columnOrder)) return columnData;
558
- return columnData.sort(function (a, b) {
559
- if (!columnOrder.includes(a.dataIndex) || !columnOrder.includes(b.dataIndex)) {
560
- return 0;
561
- }
562
- return columnOrder.indexOf(a.dataIndex) - columnOrder.indexOf(b.dataIndex);
563
- });
564
- };
565
- var getColumnData = function getColumnData(_ref2) {
566
- var columnData = _ref2.columnData,
567
- _ref2$isHidable = _ref2.isHidable,
568
- isHidable = _ref2$isHidable === void 0 ? true : _ref2$isHidable,
569
- _ref2$isReOrderable = _ref2.isReOrderable,
570
- isReOrderable = _ref2$isReOrderable === void 0 ? false : _ref2$isReOrderable;
571
- return ramda.pipe(isHidable ? getVisibleColumnData : ramda.identity, isReOrderable ? orderColumns : ramda.identity)(columnData);
572
- };
573
- return _objectSpread(_objectSpread({}, hiddenColumnHelpers), {}, {
574
- hiddenColumns: hiddenColumns,
575
- columnOrder: columnOrder,
576
- getVisibleColumnData: getVisibleColumnData,
577
- setColumnOrder: setColumnOrder,
578
- getColumnData: getColumnData
579
- });
580
- };
581
-
582
478
  exports.COLUMNS_ORDER_STORAGE_KEY = COLUMNS_ORDER_STORAGE_KEY;
583
479
  exports.Columns = Columns;
584
480
  exports.HIDDEN_COLUMNS_STORAGE_KEY = HIDDEN_COLUMNS_STORAGE_KEY;
585
481
  exports.TABLE_CONFIGURATION_QUERY_KEY = TABLE_CONFIGURATION_QUERY_KEY;
586
- exports.useColumnOrderStore = useColumnOrderStore;
587
- exports.useColumns = useColumns;
588
- exports.useHiddenColumnStore = useHiddenColumnStore;
589
- exports.useHiddenColumns = useHiddenColumns;
590
482
  exports.useTableConfigurations = useTableConfigurations;
591
- //# sourceMappingURL=useColumns-CK2J7GSt.js.map
483
+ //# sourceMappingURL=Columns-CZDLxh70.js.map