@bigbinary/neeto-molecules 4.0.48 → 4.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chevron-DbcAxB4V.js → Chevron-DX-gOKBh.js} +2 -2
- package/dist/{Chevron-DbcAxB4V.js.map → Chevron-DX-gOKBh.js.map} +1 -1
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/KeyboardShortcuts.js +1 -1
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/Sidebar.js +23 -9
- package/dist/Sidebar.js.map +1 -1
- package/dist/cjs/{Chevron-D0wHw6Zg.js → Chevron-BF749Dye.js} +2 -2
- package/dist/cjs/{Chevron-D0wHw6Zg.js.map → Chevron-BF749Dye.js.map} +1 -1
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/KeyboardShortcuts.js +1 -1
- package/dist/cjs/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/Sidebar.js +22 -8
- package/dist/cjs/Sidebar.js.map +1 -1
- package/package.json +1 -1
|
@@ -242,7 +242,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
242
242
|
});
|
|
243
243
|
};
|
|
244
244
|
|
|
245
|
-
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}";
|
|
245
|
+
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--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-icon--rotate{opacity:1;transform:rotate(90deg)}.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]{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: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}";
|
|
246
246
|
n(css,{});
|
|
247
247
|
|
|
248
248
|
var Chevron = function Chevron(_ref) {
|
|
@@ -260,4 +260,4 @@ var Chevron = function Chevron(_ref) {
|
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
export { Chevron as C, DEFAULT_HOME_PATH as D, MIN_SIDEBAR_WIDTH as M, PINNED_MORE_NAV_LINKS_KEY as P, SelectedLink as S, _Items as _, CheckPointNavLinks as a, SELECTED_NAV_LINK_ROUTE_STORAGE_KEY as b, SIDEBAR_WIDTH_KEY as c, DEFAULT_SIDEBAR_WIDTH as d, enableDraggingStyles as e, filterByPermissions as f, getSidebarStateLocalStorageKey as g, disableDraggingStyles as h, getActiveConfigurePageLink as i, MAX_SIDEBAR_WIDTH as j };
|
|
263
|
-
//# sourceMappingURL=Chevron-
|
|
263
|
+
//# sourceMappingURL=Chevron-DX-gOKBh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron-DbcAxB4V.js","sources":["../src/components/Sidebar/constants.js","../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../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":["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 { 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","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 { DEFAULT_HOME_PATH } from \"components/Sidebar/constants\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, DEFAULT_HOME_PATH, 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":["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","CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","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","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE;AACZ,CAAC;AAEM,IAAMC,mCAAmC,GAAG;AAE5C,IAAMC,iBAAiB,GAAG;AAE1B,IAAMC,iBAAiB,GAAG;AAC1B,IAAMC,iBAAiB,GAAG,IAAI,GAAG;AACjC,IAAMC,iBAAiB,GAAG,EAAE,GAAG;AAC/B,IAAMC,qBAAqB,GAAG,EAAE,GAAG;AAEnC,IAAMC,yBAAyB,GAAG;;;;;ACXzC,IAAMC,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,CAA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DA,IAAM+B,OAAO,GAAG,SAAVA,OAAOA,CAAA1I,IAAA,EAAA;AAAA,EAAA,IAAMwE,KAAK,GAAAxE,IAAA,CAALwE,KAAK;AAAA,EAAA,oBACtBxD,GAAA,CAAA,KAAA,EAAA;AAAWwD,IAAAA,KAAK,EAALA,KAAK;AAAImE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAzI,IAAAA,QAAA,eAC5DY,GAAA,CAAA,MAAA,EAAA;AACE8H,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC;KACN;AAAC,GACC,CAAC;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"Chevron-DX-gOKBh.js","sources":["../src/components/Sidebar/constants.js","../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../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":["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 { 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","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 { DEFAULT_HOME_PATH } from \"components/Sidebar/constants\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, DEFAULT_HOME_PATH, 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":["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","CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","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","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE;AACZ,CAAC;AAEM,IAAMC,mCAAmC,GAAG;AAE5C,IAAMC,iBAAiB,GAAG;AAE1B,IAAMC,iBAAiB,GAAG;AAC1B,IAAMC,iBAAiB,GAAG,IAAI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AAC,MAAM;AAChB/B,QAAAA,KAAK,EAAC,OAAO;AACb6B,QAAAA,SAAS,EAAEmC,UAAU,CAAC,qCAAqC,EAAAC,eAAA,CAAA;AACzD,UAAA,gDAAgD,EAC9CxE;AAAkB,SAAA,EACnB,MAAM,EAAG0D,kBAAkB,CAC7B,CAAE;AAAAvH,QAAAA,QAAA,EAEF2E;AAAK,OACI,CAAC;AAAA,KAAA,CACV,CAAC,EACL0B,KAAK,iBAAIzF,GAAA,CAACwF,MAAK,EAAA;AAAOC,MAAAA,KAAK,EAALA,KAAK;MAAIE,eAAe,EAAA;AAAA,KAAE,CAAC;AAAA,GAC/C,CAAC;AAEV;;;;;AC9DA,IAAM+B,OAAO,GAAG,SAAVA,OAAOA,CAAA1I,IAAA,EAAA;AAAA,EAAA,IAAMwE,KAAK,GAAAxE,IAAA,CAALwE,KAAK;AAAA,EAAA,oBACtBxD,GAAA,CAAA,KAAA,EAAA;AAAWwD,IAAAA,KAAK,EAALA,KAAK;AAAImE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAzI,IAAAA,QAAA,eAC5DY,GAAA,CAAA,MAAA,EAAA;AACE8H,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC;KACN;AAAC,GACC,CAAC;AAAA;;;;"}
|
|
@@ -5,7 +5,7 @@ import Button from '@bigbinary/neetoui/Button';
|
|
|
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-
|
|
8
|
+
import { S as SelectedLink, C as Chevron } from './Chevron-DX-gOKBh.js';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
import '@babel/runtime/helpers/defineProperty';
|
|
11
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardShortcuts.js","sources":["../src/components/KeyboardShortcuts/Pane/constants.js","../src/components/KeyboardShortcuts/Pane/utils.js","../src/components/KeyboardShortcuts/Pane/HotKey.jsx","../src/components/KeyboardShortcuts/Pane/HotKeyList.jsx","../src/components/KeyboardShortcuts/Pane/index.jsx","../src/components/KeyboardShortcuts/index.js"],"sourcesContent":["export const KEY_SHORTFORM_MAP = {\n command: \"⌘\",\n escape: \"esc\",\n control: \"ctrl\",\n option: \"opt\",\n return: \"enter\",\n};\n\nexport const MAC_TO_WINDOWS_KEYS_MAP = {\n option: \"alt\",\n command: \"ctrl\",\n return: \"enter\",\n delete: \"backspace\",\n};\n\nexport const OS = { mac: \"OS X\", windows: \"Windows\" };\n\nexport const FULL_SHORTCUTS_LINK_PROP_NAME = \"fullShortcutsLink\";\n\nexport const TOOLTIP_CONTENT = {\n \"⌘\": \"command\",\n esc: \"escape\",\n ctrl: \"control\",\n opt: \"option\",\n backspace: \"delete\",\n};\n","import i18next from \"i18next\";\nimport { toPairs } from \"ramda\";\nimport { UAParser } from \"ua-parser-js\";\n\nimport {\n KEY_SHORTFORM_MAP,\n MAC_TO_WINDOWS_KEYS_MAP,\n OS,\n TOOLTIP_CONTENT,\n} from \"./constants\";\n\nconst isMultipleHotkey = hotkey => Array.isArray(hotkey);\n\nconst replaceKeys = (hotkey, keyName, replaceWith) =>\n isMultipleHotkey(hotkey)\n ? hotkey.map(item => item.replaceAll(keyName, replaceWith))\n : hotkey.replaceAll(keyName, replaceWith);\n\nconst convertHotKeyToWindows = hotkey => {\n toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(([macKey, windowsKey]) => {\n hotkey = replaceKeys(hotkey, macKey, windowsKey);\n });\n\n return hotkey;\n};\n\nexport const convertHotkeyToUsersPlatform = hotkey => {\n const parser = new UAParser(navigator.userAgent);\n const result = parser.getResult();\n const isOSX = result.os.name?.includes(OS.mac);\n if (isOSX) return hotkey;\n\n return convertHotKeyToWindows(hotkey);\n};\n\nexport const shortenHotKey = hotkey => {\n let result = hotkey;\n Object.entries(KEY_SHORTFORM_MAP).forEach(([longform, shortform]) => {\n result = result.replaceAll(longform, shortform);\n });\n\n return result;\n};\n\nexport const getGlobalShortcuts = () => ({\n [i18next.t(\"neetoMolecules.keyboardShortcuts.global.categoryName\")]: {\n openKeyboardShortcutsPane: {\n sequence: \"command+/\",\n description: i18next.t(\n \"neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane\"\n ),\n },\n close: {\n sequence: \"esc\",\n description: i18next.t(\"neetoMolecules.keyboardShortcuts.global.close\"),\n },\n submitForm: {\n sequence: \"command+return\",\n description: i18next.t(\n \"neetoMolecules.keyboardShortcuts.global.submitForm\"\n ),\n },\n openProductSwitcher: {\n sequence: \"command+e\",\n description: i18next.t(\n \"neetoMolecules.keyboardShortcuts.global.openProductSwitcher\"\n ),\n },\n },\n});\n\nexport const getTooltipProps = key => {\n if (TOOLTIP_CONTENT[key]) {\n return {\n position: \"top\",\n content: TOOLTIP_CONTENT[key],\n followCursor: \"horizontal\",\n };\n }\n\n return null;\n};\n","import { memo, Fragment } from \"react\";\n\n// eslint-disable-next-line @bigbinary/neeto/use-webpack-alias\nimport { Kbd, Typography } from \"@bigbinary/neetoui\";\n\nimport {\n convertHotkeyToUsersPlatform,\n shortenHotKey,\n getTooltipProps,\n} from \"./utils\";\n\nconst HotKey = ({ description, sequence }) => {\n const hotkey = shortenHotKey(convertHotkeyToUsersPlatform(sequence));\n const isSequentialHotkey = hotkey.includes(\" \");\n const isSimultaneousHotkey = hotkey.includes(\"+\");\n const isSingleKeyHotkey = !isSequentialHotkey && !isSimultaneousHotkey;\n let sequences = [];\n\n if (isSingleKeyHotkey) {\n sequences = [hotkey];\n } else if (isSequentialHotkey) {\n sequences = hotkey.split(\" \");\n } else if (isSimultaneousHotkey) {\n sequences = hotkey.split(\"+\");\n }\n\n return (\n <div className=\"my-3 w-full\">\n <div\n className=\"flex items-center justify-between gap-3\"\n data-cy=\"hotkey-item\"\n data-testid=\"hotkey-item\"\n >\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n <div className=\"flex flex-shrink-0 items-center gap-1\">\n {sequences.map((keyName, idx) => (\n <Fragment key={idx}>\n <Kbd {...{ keyName }} tooltipProps={getTooltipProps(keyName)} />\n {isSequentialHotkey && idx + 1 !== sequences.length && (\n <Kbd keyName=\"then\" />\n )}\n </Fragment>\n ))}\n </div>\n </div>\n </div>\n );\n};\n\nexport default memo(HotKey);\n","import { memo } from \"react\";\n\n// eslint-disable-next-line @bigbinary/neeto/use-webpack-alias\nimport { Button, Typography } from \"@bigbinary/neetoui\";\nimport { withT } from \"neetocommons/react-utils\";\n\nimport { FULL_SHORTCUTS_LINK_PROP_NAME } from \"./constants\";\nimport HotKey from \"./HotKey\";\n\nconst HotKeyList = withT(({ t, hotkeys }) =>\n Object.keys(hotkeys).map(categoryName => {\n const categoryValues = hotkeys[categoryName];\n const fullShortcutsLink = categoryValues[FULL_SHORTCUTS_LINK_PROP_NAME];\n\n return (\n <div className=\"mt-4 px-4\" key={categoryName}>\n <Typography style=\"h6\" textTransform=\"uppercase\" weight=\"bold\">\n {categoryName}\n </Typography>\n {Object.entries(categoryValues).map(\n ([, { sequence, description }]) =>\n sequence && <HotKey {...{ description, sequence }} key={sequence} />\n )}\n {fullShortcutsLink && (\n <Button\n className=\"mb-3\"\n href={fullShortcutsLink}\n style=\"link\"\n target=\"_blank\"\n label={t(\n \"neetoMolecules.keyboardShortcuts.viewFullListOfShortcuts\"\n )}\n />\n )}\n </div>\n );\n })\n);\n\nexport default memo(HotKeyList);\n","/* eslint-disable @bigbinary/neeto/use-webpack-alias */\nimport { Close } from \"@bigbinary/neeto-icons\";\nimport { Typography, Button } from \"@bigbinary/neetoui\";\nimport { manager } from \"@bigbinary/neetoui/managers\";\nimport classnames from \"classnames\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport HotKeyList from \"./HotKeyList\";\nimport \"./keyboard-shortcuts.scss\";\nimport { getGlobalShortcuts } from \"./utils\";\n\nimport useKeyboardShortcutsPaneState from \"../hooks/useKeyboardShortcutsPaneState\";\n\nconst KeyboardShortcutsPane = ({ productShortcuts = {} }) => {\n const [isOpen, setIsOpen] = useKeyboardShortcutsPaneState();\n const hasOverlays = manager.hasOverlays();\n // eslint-disable-next-line @bigbinary/neeto/no-dangling-constants\n const GLOBAL_SHORTCUTS = getGlobalShortcuts();\n const { t } = useTranslation();\n\n const shortcuts =\n GLOBAL_SHORTCUTS[t(\"neetoMolecules.keyboardShortcuts.global.categoryName\")];\n\n useHotkeys(\n shortcuts.openKeyboardShortcutsPane.sequence,\n () => setIsOpen(prevIsOpen => !prevIsOpen),\n { mode: \"global\" }\n );\n\n useHotkeys(shortcuts.close.sequence, () => setIsOpen(false), {\n mode: \"global\",\n enabled: isOpen,\n });\n\n return (\n <div\n data-cy=\"keyboard-shortcuts-pane\"\n className={classnames(\n \"neeto-molecules-keyboard-shortcuts-pane neeto-ui-border-gray-300 transition-width neeto-ui-bg-white ml-auto h-dvh overflow-hidden border-l duration-300 ease-in-out\",\n {\n \"w-80\": isOpen,\n \"w-0\": !isOpen,\n absolute: hasOverlays,\n \"right-0\": hasOverlays,\n }\n )}\n >\n <div className=\"h-full w-80 overflow-y-auto\">\n <div className=\"neeto-ui-border-gray-300 my-2 flex items-center justify-between border-b px-4 pb-2\">\n <Typography data-cy=\"keyboard-shortcuts-pane-title\" style=\"h4\">\n {t(\"neetoMolecules.keyboardShortcuts.title\")}\n </Typography>\n <Button\n data-cy=\"keyboard-shortcuts-pane-close-button\"\n icon={Close}\n style=\"text\"\n onClick={() => setIsOpen(false)}\n />\n </div>\n <HotKeyList hotkeys={GLOBAL_SHORTCUTS} />\n <HotKeyList hotkeys={productShortcuts} />\n </div>\n </div>\n );\n};\n\nKeyboardShortcutsPane.propTypes = {\n /**\n * Used to pass in the product specific keyboard shortcuts.\n */\n productShortcuts: PropTypes.object,\n};\n\nexport default KeyboardShortcutsPane;\n","import useKeyboardShortcutsPaneState from \"./hooks/useKeyboardShortcutsPaneState\";\nimport KeyboardShortcutsPane from \"./Pane\";\nimport { getGlobalShortcuts } from \"./Pane/utils\";\n\nconst KeyboardShortcuts = {\n Pane: KeyboardShortcutsPane,\n usePaneState: useKeyboardShortcutsPaneState,\n GLOBAL_SHORTCUTS: getGlobalShortcuts(),\n};\n\nexport default KeyboardShortcuts;\n"],"names":["KEY_SHORTFORM_MAP","command","escape","control","option","MAC_TO_WINDOWS_KEYS_MAP","OS","mac","FULL_SHORTCUTS_LINK_PROP_NAME","TOOLTIP_CONTENT","esc","ctrl","opt","backspace","isMultipleHotkey","hotkey","Array","isArray","replaceKeys","keyName","replaceWith","map","item","replaceAll","convertHotKeyToWindows","toPairs","forEach","_ref","_ref2","_slicedToArray","macKey","windowsKey","convertHotkeyToUsersPlatform","_result$os$name","parser","UAParser","navigator","userAgent","result","getResult","isOSX","os","name","includes","shortenHotKey","Object","entries","_ref3","_ref4","longform","shortform","getGlobalShortcuts","_defineProperty","i18next","t","openKeyboardShortcutsPane","sequence","description","close","submitForm","openProductSwitcher","getTooltipProps","key","position","content","followCursor","HotKey","isSequentialHotkey","isSimultaneousHotkey","isSingleKeyHotkey","sequences","split","_jsx","className","children","_jsxs","Typography","lineHeight","style","idx","Fragment","Kbd","tooltipProps","length","memo","HotKeyList","withT","hotkeys","keys","categoryName","categoryValues","fullShortcutsLink","textTransform","weight","_ref3$","_createElement","Button","href","target","label","KeyboardShortcutsPane","_ref$productShortcuts","productShortcuts","_useKeyboardShortcuts","useKeyboardShortcutsPaneState","_useKeyboardShortcuts2","isOpen","setIsOpen","hasOverlays","manager","GLOBAL_SHORTCUTS","_useTranslation","useTranslation","shortcuts","useHotkeys","prevIsOpen","mode","enabled","classnames","absolute","icon","Close","onCl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,CAAC,eACbkB,GAAA,CAACwB,MAAM,EAAA;AACL,UAAA,SAAA,EAAQ,sCAAsC;AAC9CwB,UAAAA,IAAI,EAAEC,KAAM;AACZ3C,UAAAA,KAAK,EAAC,MAAM;UACZ4C,OAAO,EAAE,SAATA,OAAOA,GAAA;YAAA,OAAQf,SAAS,CAAC,KAAK,CAAC;AAAA,UAAA;AAAC,SACjC,CAAC;AAAA,OACC,CAAC,eACNnC,GAAA,CAACa,YAAU,EAAA;AAACE,QAAAA,OAAO,EAAEuB;AAAiB,OAAE,CAAC,eACzCtC,GAAA,CAACa,YAAU,EAAA;AAACE,QAAAA,OAAO,EAAEe;AAAiB,OAAE,CAAC;KACtC;AAAC,GACH,CAAC;AAEV,CAAC;;AC9DD,IAAMqB,iBAAiB,GAAG;AACxBC,EAAAA,IAAI,EAAExB,qBAAqB;AAC3ByB,EAAAA,YAAY,EAAErB,6BAA6B;EAC3CM,gBAAgB,EAAE3D,kBAAkB;AACtC;;;;"}
|
|
1
|
+
{"version":3,"file":"KeyboardShortcuts.js","sources":["../src/components/KeyboardShortcuts/Pane/constants.js","../src/components/KeyboardShortcuts/Pane/utils.js","../src/components/KeyboardShortcuts/Pane/HotKey.jsx","../src/components/KeyboardShortcuts/Pane/HotKeyList.jsx","../src/components/KeyboardShortcuts/Pane/index.jsx","../src/components/KeyboardShortcuts/index.js"],"sourcesContent":["export const KEY_SHORTFORM_MAP = {\n command: \"⌘\",\n escape: \"esc\",\n control: \"ctrl\",\n option: \"opt\",\n return: \"enter\",\n};\n\nexport const MAC_TO_WINDOWS_KEYS_MAP = {\n option: \"alt\",\n command: \"ctrl\",\n return: \"enter\",\n delete: \"backspace\",\n};\n\nexport const OS = { mac: \"macOS\", windows: \"Windows\" };\n\nexport const FULL_SHORTCUTS_LINK_PROP_NAME = \"fullShortcutsLink\";\n\nexport const TOOLTIP_CONTENT = {\n \"⌘\": \"command\",\n esc: \"escape\",\n ctrl: \"control\",\n opt: \"option\",\n backspace: \"delete\",\n};\n","import i18next from \"i18next\";\nimport { toPairs } from \"ramda\";\nimport { UAParser } from \"ua-parser-js\";\n\nimport {\n KEY_SHORTFORM_MAP,\n MAC_TO_WINDOWS_KEYS_MAP,\n OS,\n TOOLTIP_CONTENT,\n} from \"./constants\";\n\nconst isMultipleHotkey = hotkey => Array.isArray(hotkey);\n\nconst replaceKeys = (hotkey, keyName, replaceWith) =>\n isMultipleHotkey(hotkey)\n ? hotkey.map(item => item.replaceAll(keyName, replaceWith))\n : hotkey.replaceAll(keyName, replaceWith);\n\nconst convertHotKeyToWindows = hotkey => {\n toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(([macKey, windowsKey]) => {\n hotkey = replaceKeys(hotkey, macKey, windowsKey);\n });\n\n return hotkey;\n};\n\nexport const convertHotkeyToUsersPlatform = hotkey => {\n const parser = new UAParser(navigator.userAgent);\n const result = parser.getResult();\n const isOSX = result.os.name?.includes(OS.mac);\n if (isOSX) return hotkey;\n\n return convertHotKeyToWindows(hotkey);\n};\n\nexport const shortenHotKey = hotkey => {\n let result = hotkey;\n Object.entries(KEY_SHORTFORM_MAP).forEach(([longform, shortform]) => {\n result = result.replaceAll(longform, shortform);\n });\n\n return result;\n};\n\nexport const getGlobalShortcuts = () => ({\n [i18next.t(\"neetoMolecules.keyboardShortcuts.global.categoryName\")]: {\n openKeyboardShortcutsPane: {\n sequence: \"command+/\",\n description: i18next.t(\n \"neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane\"\n ),\n },\n close: {\n sequence: \"esc\",\n description: i18next.t(\"neetoMolecules.keyboardShortcuts.global.close\"),\n },\n submitForm: {\n sequence: \"command+return\",\n description: i18next.t(\n \"neetoMolecules.keyboardShortcuts.global.submitForm\"\n ),\n },\n openProductSwitcher: {\n sequence: \"command+e\",\n description: i18next.t(\n \"neetoMolecules.keyboardShortcuts.global.openProductSwitcher\"\n ),\n },\n },\n});\n\nexport const getTooltipProps = key => {\n if (TOOLTIP_CONTENT[key]) {\n return {\n position: \"top\",\n content: TOOLTIP_CONTENT[key],\n followCursor: \"horizontal\",\n };\n }\n\n return null;\n};\n","import { memo, Fragment } from \"react\";\n\n// eslint-disable-next-line @bigbinary/neeto/use-webpack-alias\nimport { Kbd, Typography } from \"@bigbinary/neetoui\";\n\nimport {\n convertHotkeyToUsersPlatform,\n shortenHotKey,\n getTooltipProps,\n} from \"./utils\";\n\nconst HotKey = ({ description, sequence }) => {\n const hotkey = shortenHotKey(convertHotkeyToUsersPlatform(sequence));\n const isSequentialHotkey = hotkey.includes(\" \");\n const isSimultaneousHotkey = hotkey.includes(\"+\");\n const isSingleKeyHotkey = !isSequentialHotkey && !isSimultaneousHotkey;\n let sequences = [];\n\n if (isSingleKeyHotkey) {\n sequences = [hotkey];\n } else if (isSequentialHotkey) {\n sequences = hotkey.split(\" \");\n } else if (isSimultaneousHotkey) {\n sequences = hotkey.split(\"+\");\n }\n\n return (\n <div className=\"my-3 w-full\">\n <div\n className=\"flex items-center justify-between gap-3\"\n data-cy=\"hotkey-item\"\n data-testid=\"hotkey-item\"\n >\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n <div className=\"flex flex-shrink-0 items-center gap-1\">\n {sequences.map((keyName, idx) => (\n <Fragment key={idx}>\n <Kbd {...{ keyName }} tooltipProps={getTooltipProps(keyName)} />\n {isSequentialHotkey && idx + 1 !== sequences.length && (\n <Kbd keyName=\"then\" />\n )}\n </Fragment>\n ))}\n </div>\n </div>\n </div>\n );\n};\n\nexport default memo(HotKey);\n","import { memo } from \"react\";\n\n// eslint-disable-next-line @bigbinary/neeto/use-webpack-alias\nimport { Button, Typography } from \"@bigbinary/neetoui\";\nimport { withT } from \"neetocommons/react-utils\";\n\nimport { FULL_SHORTCUTS_LINK_PROP_NAME } from \"./constants\";\nimport HotKey from \"./HotKey\";\n\nconst HotKeyList = withT(({ t, hotkeys }) =>\n Object.keys(hotkeys).map(categoryName => {\n const categoryValues = hotkeys[categoryName];\n const fullShortcutsLink = categoryValues[FULL_SHORTCUTS_LINK_PROP_NAME];\n\n return (\n <div className=\"mt-4 px-4\" key={categoryName}>\n <Typography style=\"h6\" textTransform=\"uppercase\" weight=\"bold\">\n {categoryName}\n </Typography>\n {Object.entries(categoryValues).map(\n ([, { sequence, description }]) =>\n sequence && <HotKey {...{ description, sequence }} key={sequence} />\n )}\n {fullShortcutsLink && (\n <Button\n className=\"mb-3\"\n href={fullShortcutsLink}\n style=\"link\"\n target=\"_blank\"\n label={t(\n \"neetoMolecules.keyboardShortcuts.viewFullListOfShortcuts\"\n )}\n />\n )}\n </div>\n );\n })\n);\n\nexport default memo(HotKeyList);\n","/* eslint-disable @bigbinary/neeto/use-webpack-alias */\nimport { Close } from \"@bigbinary/neeto-icons\";\nimport { Typography, Button } from \"@bigbinary/neetoui\";\nimport { manager } from \"@bigbinary/neetoui/managers\";\nimport classnames from \"classnames\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport HotKeyList from \"./HotKeyList\";\nimport \"./keyboard-shortcuts.scss\";\nimport { getGlobalShortcuts } from \"./utils\";\n\nimport useKeyboardShortcutsPaneState from \"../hooks/useKeyboardShortcutsPaneState\";\n\nconst KeyboardShortcutsPane = ({ productShortcuts = {} }) => {\n const [isOpen, setIsOpen] = useKeyboardShortcutsPaneState();\n const hasOverlays = manager.hasOverlays();\n // eslint-disable-next-line @bigbinary/neeto/no-dangling-constants\n const GLOBAL_SHORTCUTS = getGlobalShortcuts();\n const { t } = useTranslation();\n\n const shortcuts =\n GLOBAL_SHORTCUTS[t(\"neetoMolecules.keyboardShortcuts.global.categoryName\")];\n\n useHotkeys(\n shortcuts.openKeyboardShortcutsPane.sequence,\n () => setIsOpen(prevIsOpen => !prevIsOpen),\n { mode: \"global\" }\n );\n\n useHotkeys(shortcuts.close.sequence, () => setIsOpen(false), {\n mode: \"global\",\n enabled: isOpen,\n });\n\n return (\n <div\n data-cy=\"keyboard-shortcuts-pane\"\n className={classnames(\n \"neeto-molecules-keyboard-shortcuts-pane neeto-ui-border-gray-300 transition-width neeto-ui-bg-white ml-auto h-dvh overflow-hidden border-l duration-300 ease-in-out\",\n {\n \"w-80\": isOpen,\n \"w-0\": !isOpen,\n absolute: hasOverlays,\n \"right-0\": hasOverlays,\n }\n )}\n >\n <div className=\"h-full w-80 overflow-y-auto\">\n <div className=\"neeto-ui-border-gray-300 my-2 flex items-center justify-between border-b px-4 pb-2\">\n <Typography data-cy=\"keyboard-shortcuts-pane-title\" style=\"h4\">\n {t(\"neetoMolecules.keyboardShortcuts.title\")}\n </Typography>\n <Button\n data-cy=\"keyboard-shortcuts-pane-close-button\"\n icon={Close}\n style=\"text\"\n onClick={() => setIsOpen(false)}\n />\n </div>\n <HotKeyList hotkeys={GLOBAL_SHORTCUTS} />\n <HotKeyList hotkeys={productShortcuts} />\n </div>\n </div>\n );\n};\n\nKeyboardShortcutsPane.propTypes = {\n /**\n * Used to pass in the product specific keyboard shortcuts.\n */\n productShortcuts: PropTypes.object,\n};\n\nexport default KeyboardShortcutsPane;\n","import useKeyboardShortcutsPaneState from \"./hooks/useKeyboardShortcutsPaneState\";\nimport KeyboardShortcutsPane from \"./Pane\";\nimport { getGlobalShortcuts } from \"./Pane/utils\";\n\nconst KeyboardShortcuts = {\n Pane: KeyboardShortcutsPane,\n usePaneState: useKeyboardShortcutsPaneState,\n GLOBAL_SHORTCUTS: getGlobalShortcuts(),\n};\n\nexport default KeyboardShortcuts;\n"],"names":["KEY_SHORTFORM_MAP","command","escape","control","option","MAC_TO_WINDOWS_KEYS_MAP","OS","mac","FULL_SHORTCUTS_LINK_PROP_NAME","TOOLTIP_CONTENT","esc","ctrl","opt","backspace","isMultipleHotkey","hotkey","Array","isArray","replaceKeys","keyName","replaceWith","map","item","replaceAll","convertHotKeyToWindows","toPairs","forEach","_ref","_ref2","_slicedToArray","macKey","windowsKey","convertHotkeyToUsersPlatform","_result$os$name","parser","UAParser","navigator","userAgent","result","getResult","isOSX","os","name","includes","shortenHotKey","Object","entries","_ref3","_ref4","longform","shortform","getGlobalShortcuts","_defineProperty","i18next","t","openKeyboardShortcutsPane","sequence","description","close","submitForm","openProductSwitcher","getTooltipProps","key","position","content","followCursor","HotKey","isSequentialHotkey","isSimultaneousHotkey","isSingleKeyHotkey","sequences","split","_jsx","className","children","_jsxs","Typography","lineHeight","style","idx","Fragment","Kbd","tooltipProps","length","memo","HotKeyList","withT","hotkeys","keys","categoryName","categoryValues","fullShortcutsLink","textTransform","weight","_ref3$","_createElement","Button","href","target","label","KeyboardShortcutsPane","_ref$productShortcuts","productShortcuts","_useKeyboardShortcuts","useKeyboardShortcutsPaneState","_useKeyboardShortcuts2","isOpen","setIsOpen","hasOverlays","manager","GLOBAL_SHORTCUTS","_useTranslation","useTranslation","shortcuts","useHotkeys","prevIsOpen","mode","enabled","classnames","absolute","icon","Close","onClick","KeyboardShortcuts","Pane","usePaneState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,iBAAiB,GAAG;AAC/BC,EAAAA,OAAO,EAAE,GAAG;AACZC,EAAAA,MAAM,EAAE,KAAK;AACbC,EAAAA,OAAO,EAAE,MAAM;AACfC,EAAAA,MAAM,EAAE,KAAK;EACb,QAAA,EAAQ;AACV,CAAC;AAEM,IAAMC,uBAAuB,GAAG;AACrCD,EAAAA,MAAM,EAAE,KAAK;AACbH,EAAAA,OAAO,EAAE,MAAM;AACf,EAAA,QAAA,EAAQ,OAAO;EACf,QAAA,EAAQ;AACV,CAAC;AAEM,IAAMK,EAAE,GAAG;AAAEC,EAAAA,GAAG,EAAE,OAA4B,CAAC;AAE/C,IAAMC,6BAA6B,GAAG,mBAAmB;AAEzD,IAAMC,eAAe,GAAG;AAC7B,EAAA,GAAG,EAAE,SAAS;AACdC,EAAAA,GAAG,EAAE,QAAQ;AACbC,EAAAA,IAAI,EAAE,SAAS;AACfC,EAAAA,GAAG,E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 -6,10 +6,10 @@ import useLocalStorage from '@bigbinary/neeto-commons-frontend/react-utils/useLo
|
|
|
6
6
|
import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
7
7
|
import Button from '@bigbinary/neetoui/Button';
|
|
8
8
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
9
|
-
import { is, not, findLast } from 'ramda';
|
|
9
|
+
import { is, append, not, findLast } from 'ramda';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
11
|
import { Link, useLocation, useHistory } from 'react-router-dom';
|
|
12
|
-
import { D as DEFAULT_HOME_PATH, f as filterByPermissions, a as CheckPointNavLinks, P as PINNED_MORE_NAV_LINKS_KEY, _ as _Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, c as SIDEBAR_WIDTH_KEY, d as DEFAULT_SIDEBAR_WIDTH, S as SelectedLink, C as Chevron, e as enableDraggingStyles, h as disableDraggingStyles, i as getActiveConfigurePageLink, M as MIN_SIDEBAR_WIDTH, j as MAX_SIDEBAR_WIDTH } from './Chevron-
|
|
12
|
+
import { D as DEFAULT_HOME_PATH, f as filterByPermissions, a as CheckPointNavLinks, P as PINNED_MORE_NAV_LINKS_KEY, _ as _Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, c as SIDEBAR_WIDTH_KEY, d as DEFAULT_SIDEBAR_WIDTH, S as SelectedLink, C as Chevron, e as enableDraggingStyles, h as disableDraggingStyles, i as getActiveConfigurePageLink, M as MIN_SIDEBAR_WIDTH, j as MAX_SIDEBAR_WIDTH } from './Chevron-DX-gOKBh.js';
|
|
13
13
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
14
14
|
import Neeto from '@bigbinary/neeto-icons/typeface-logos/Neeto';
|
|
15
15
|
import * as AppIcons from '@bigbinary/neeto-icons/typeface-logos';
|
|
@@ -256,10 +256,10 @@ var Links = function Links(_ref) {
|
|
|
256
256
|
isCountsLoadingDeprecated = _ref.isCountsLoading,
|
|
257
257
|
setSelectedNavLinkRoute = _ref.setSelectedNavLinkRoute;
|
|
258
258
|
var location = useLocation();
|
|
259
|
-
var _useState = useState(
|
|
259
|
+
var _useState = useState([]),
|
|
260
260
|
_useState2 = _slicedToArray(_useState, 2),
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
expandedNavLinkKeys = _useState2[0],
|
|
262
|
+
setExpandedNavLinkKeys = _useState2[1];
|
|
263
263
|
var _useLocalStorage = useLocalStorage(PINNED_MORE_NAV_LINKS_KEY, []),
|
|
264
264
|
_useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
|
|
265
265
|
pinnedNavLinks = _useLocalStorage2[0],
|
|
@@ -269,16 +269,21 @@ var Links = function Links(_ref) {
|
|
|
269
269
|
isActive = _ref2.isActive,
|
|
270
270
|
navLink = _ref2.navLink;
|
|
271
271
|
var isExpandable = isPresent(navLink.items) || isPresent(navLink.component);
|
|
272
|
-
if (!isExpandable)
|
|
272
|
+
if (!isExpandable) {
|
|
273
|
+
setExpandedNavLinkKeys([]);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
273
276
|
if (navLink.isConfigureNavLink && isNotEmpty(navLink.items)) {
|
|
274
277
|
setSelectedNavLinkRoute(navLink.to);
|
|
275
278
|
}
|
|
279
|
+
var navLinkKey = navLink.key || navLink.to;
|
|
276
280
|
if (isActive()) {
|
|
277
|
-
|
|
281
|
+
var isExpanded = expandedNavLinkKeys.includes(navLinkKey);
|
|
282
|
+
setExpandedNavLinkKeys(isExpanded ? [] : [navLinkKey]);
|
|
278
283
|
navLink.resetPath !== true && event.preventDefault();
|
|
279
284
|
return;
|
|
280
285
|
}
|
|
281
|
-
|
|
286
|
+
setExpandedNavLinkKeys([navLinkKey]);
|
|
282
287
|
};
|
|
283
288
|
var handleTogglePin = function handleTogglePin(navLink, event) {
|
|
284
289
|
event.preventDefault();
|
|
@@ -328,7 +333,15 @@ var Links = function Links(_ref) {
|
|
|
328
333
|
return is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
|
|
329
334
|
};
|
|
330
335
|
var isExpandable = items || Component;
|
|
331
|
-
var
|
|
336
|
+
var navLinkKey = navLink.key || navLink.to;
|
|
337
|
+
var isMenuExpanded = expandedNavLinkKeys.includes(navLinkKey) && !isCountsLoadingDeprecated;
|
|
338
|
+
var handleCaretClick = function handleCaretClick(event) {
|
|
339
|
+
event.preventDefault();
|
|
340
|
+
event.stopPropagation();
|
|
341
|
+
setExpandedNavLinkKeys(function (keys) {
|
|
342
|
+
return keys.includes(navLinkKey) ? keys.filter(isNot(navLinkKey)) : append(navLinkKey, keys);
|
|
343
|
+
});
|
|
344
|
+
};
|
|
332
345
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
333
346
|
children: [/*#__PURE__*/jsxs(CheckPointNavLinks, _objectSpread(_objectSpread({
|
|
334
347
|
activeClassName: "active",
|
|
@@ -364,6 +377,7 @@ var Links = function Links(_ref) {
|
|
|
364
377
|
className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
|
|
365
378
|
"neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
|
|
366
379
|
}),
|
|
380
|
+
onClick: handleCaretClick,
|
|
367
381
|
children: /*#__PURE__*/jsx(Right, {
|
|
368
382
|
size: 16
|
|
369
383
|
})
|