@bigbinary/neeto-molecules 3.16.78 → 3.16.80
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-MfiQ_stB.js → Chevron-C0Ijo0nT.js} +2 -2
- package/dist/{Chevron-MfiQ_stB.js.map → Chevron-C0Ijo0nT.js.map} +1 -1
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/DocumentEditor.js +2 -2
- package/dist/DocumentEditor.js.map +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/cjs/{Chevron-hPBuO9HZ.js → Chevron-BLr84pgG.js} +2 -2
- package/dist/cjs/{Chevron-hPBuO9HZ.js.map → Chevron-BLr84pgG.js.map} +1 -1
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/DocumentEditor.js +2 -2
- package/dist/cjs/DocumentEditor.js.map +1 -1
- package/dist/cjs/Sidebar.js +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}.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-300));bottom:0;content:\"\";left:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:1px}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-500));width:3px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:3px}.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}.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}";
|
|
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_SIDEBAR_WIDTH as D, MIN_SIDEBAR_WIDTH as M, SelectedLink as S, _Items as _, CheckPointNavLinks as a, SELECTED_NAV_LINK_ROUTE_STORAGE_KEY as b, SIDEBAR_WIDTH_KEY as c, DEFAULT_HOME_PATH 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-C0Ijo0nT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron-MfiQ_stB.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","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","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,wBAAwB,CAACR,aAAa,CAAC;IADhBS,UAAU,GAAAF,qBAAA,CAA1BP,aAAa,CAAA,CAAA;AAGtB,EAAA,IAAMU,WAAW,GAAGR,IAAI,GAAG,GAAG,GAAGS,OAAO,CAAA;AACxC,EAAA,IAAMC,SAAS,GAAGV,IAAI,GAAAW,eAAA,CAAA;AAChBX,IAAAA,IAAI,EAAJA,IAAI;AAAEY,IAAAA,GAAG,EAAEZ,IAAAA;GAASE,EAAAA,MAAM,IAAAS,eAAA,CAAA;IAC1BZ,EAAE,EAAEQ,UAAU,IAAIR,EAAE;AAAEa,IAAAA,GAAG,EAAEb,EAAAA;AAAE,GAAA,EAAKG,MAAM,CAAE,CAAA;EAEhD,oBAAOW,GAAA,CAACL,WAAW,EAAAG,eAAA,CAAAA,eAAA,KAAKD,SAAS,CAAA,EAAA,EA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AAS,EAAEoC,UAAU,CAAC,qCAAqC,EAAAC,eAAA,CAAA;AACzD,UAAA,gDAAgD,EAC9CzE,kBAAAA;AAAkB,SAAA,EACnB,MAAM,EAAG0D,kBAAkB,CAC7B,CAAE;AAAAhI,QAAAA,QAAA,EAEFoF,KAAAA;AAAK,OACI,CAAC,CAAA;AAAA,KAAA,CACV,CAAC,EACL0B,KAAK,iBAAIlG,GAAA,CAACiG,MAAK,EAAA;AAAOC,MAAAA,KAAK,EAALA,KAAK;MAAIE,eAAe,EAAA,IAAA;AAAA,KAAE,CAAC,CAAA;AAAA,GAC/C,CAAC,CAAA;AAEV;;;;;AC7DA,IAAMgC,OAAO,GAAG,SAAVA,OAAOA,CAAApJ,IAAA,EAAA;AAAA,EAAA,IAAMiF,KAAK,GAAAjF,IAAA,CAALiF,KAAK,CAAA;AAAA,EAAA,oBACtBjE,GAAA,CAAA,KAAA,EAAA;AAAWiE,IAAAA,KAAK,EAALA,KAAK;AAAIoE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAnJ,IAAAA,QAAA,eAC5DY,GAAA,CAAA,MAAA,EAAA;AACEwI,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC,cAAA;KACN,CAAA;AAAC,GACC,CAAC,CAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"Chevron-C0Ijo0nT.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","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","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","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AA,KAAK,EAALA,KAAK;MAAIE,eAAe,EAAA,IAAA;AAAA,KAAE,CAAC,CAAA;AAAA,GAC/C,CAAC,CAAA;AAEV;;;;;AC7DA,IAAMgC,OAAO,GAAG,SAAVA,OAAOA,CAAApJ,IAAA,EAAA;AAAA,EAAA,IAAMiF,KAAK,GAAAjF,IAAA,CAALiF,KAAK,CAAA;AAAA,EAAA,oBACtBjE,GAAA,CAAA,KAAA,EAAA;AAAWiE,IAAAA,KAAK,EAALA,KAAK;AAAIoE,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAnJ,IAAAA,QAAA,eAC5DY,GAAA,CAAA,MAAA,EAAA;AACEwI,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC,cAAA;KACN,CAAA;AAAC,GACC,CAAC,CAAA;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-C0Ijo0nT.js';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
import '@babel/runtime/helpers/defineProperty';
|
|
11
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
package/dist/DocumentEditor.js
CHANGED
|
@@ -36,7 +36,7 @@ var IMAGE_UPLOAD_CONFIG = {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:
|
|
39
|
+
var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:1024px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:2rem;line-height:1.25}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:.75rem auto}.neeto-molecules-document__wrapper .ProseMirror{flex-grow:1;height:auto;max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-left:none;border-right:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:.375rem}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:46.875rem;padding-left:0!important;padding-right:0!important}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper button.neeto-editor-fixed-menu__item{flex-shrink:0}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:.75rem 1.5rem 2rem!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:.75rem auto 0;max-width:48rem!important;padding-left:1rem;padding-right:1rem}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:48rem!important;padding-left:1rem;padding-right:1rem}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.neeto-molecules-document__wrapper ins{background-color:#c1f4cb!important;text-decoration:none!important}.neeto-molecules-document__wrapper del{background-color:#faa!important}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image{border-radius:5px;overflow:hidden;padding-bottom:56.25%;position:relative;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image img{height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%}@media screen and (max-width:767px){.ne-media-uploader-modal{width:95vw!important}}";
|
|
40
40
|
n(css,{});
|
|
41
41
|
|
|
42
42
|
var useEditor = function useEditor(_ref) {
|
|
@@ -249,7 +249,7 @@ var Editor = function Editor(_ref) {
|
|
|
249
249
|
onChange: handleContentChange,
|
|
250
250
|
onChangeAttachments: handleAttachmentChange,
|
|
251
251
|
children: [children, /*#__PURE__*/jsxs("div", {
|
|
252
|
-
className: "neeto-molecules-document__container px-
|
|
252
|
+
className: "neeto-molecules-document__container px-6",
|
|
253
253
|
children: [/*#__PURE__*/jsx(Textarea, _objectSpread({
|
|
254
254
|
nakedTextarea: true,
|
|
255
255
|
className: "neeto-molecules-document__title",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentEditor.js","sources":["../src/components/DocumentEditor/constants.js","../src/components/DocumentEditor/hooks/useEditor.js","../src/components/DocumentEditor/MediaUploader.jsx","../src/components/DocumentEditor/utils.js","../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isCharacterCountActive: true,\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-4\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute right-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ml-0 pl-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isCharacterCountActive","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,CACV,CAAA;AAEM,IAAMC,oBAAoB,GAAG;AAClCC,EAAAA,sBAAsB,EAAE,IAAI;AAC5BC,EAAAA,iBAAiB,EAAE,IAAI;AACvBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,IAAI,EAAE,QAAA;AACR,CAAC,CAAA;AAEM,IAAMC,mBAAmB,GAAG;AACjCC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,iBAAiB,EAAE;AACjB,IAAA,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,MAAM,CAAA;AACtB,GAAA;AACF,CAAC;;;;;ACxBD,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQT;AAAA,EAAA,IAPJC,eAAe,GAAAD,IAAA,CAAfC,eAAe;IACfC,sBAAsB,GAAAF,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CAAC,eACfV,GAAA,CAACZ,aAAa,EAAA;AAAOC,QAAAA,4BAA4B,EAA5BA,4BAAAA;AAA4B,OAAK,CAAC,CAAA;AAAA,KAClD,CAAC,CAAA;AAAA,GACL,CAAC,CAAA;AAEV,CAAC,CAAA;AAiED0B,MAAM,CAACiF,WAAW,GAAG,gBAAgB,CAAA;AAErC,YAAeC,aAAAA,IAAI,CAAClF,MAAM,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"DocumentEditor.js","sources":["../src/components/DocumentEditor/constants.js","../src/components/DocumentEditor/hooks/useEditor.js","../src/components/DocumentEditor/MediaUploader.jsx","../src/components/DocumentEditor/utils.js","../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isCharacterCountActive: true,\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-6\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute right-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ml-0 pl-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isCharacterCountActive","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,CACV,CAAA;AAEM,IAAMC,oBAAoB,GAAG;AAClCC,EAAAA,sBAAsB,EAAE,IAAI;AAC5BC,EAAAA,iBAAiB,EAAE,IAAI;AACvBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,IAAI,EAAE,QAAA;AACR,CAAC,CAAA;AAEM,IAAMC,mBAAmB,GAAG;AACjCC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,iBAAiB,EAAE;AACjB,IAAA,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,MAAM,CAAA;AACtB,GAAA;AACF,CAAC;;;;;ACxBD,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQT;AAAA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xD,QAAA,EACnBrB,CAAC,CAAC,oDAAoD,CAAA;SAC7C,CAAA;AAAC,OACD,CAAC,eACfV,GAAA,CAACZ,aAAa,EAAA;AAAOC,QAAAA,4BAA4B,EAA5BA,4BAAAA;AAA4B,OAAK,CAAC,CAAA;AAAA,KAClD,CAAC,CAAA;AAAA,GACL,CAAC,CAAA;AAEV,CAAC,CAAA;AAiED0B,MAAM,CAACiF,WAAW,GAAG,gBAAgB,CAAA;AAErC,YAAeC,aAAAA,IAAI,CAAClF,MAAM,CAAC;;;;"}
|
package/dist/Sidebar.js
CHANGED
|
@@ -10,7 +10,7 @@ import Typography from '@bigbinary/neetoui/Typography';
|
|
|
10
10
|
import { not, is, findLast } from 'ramda';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import { Link, useLocation, useHistory } from 'react-router-dom';
|
|
13
|
-
import { f as filterByPermissions, a as CheckPointNavLinks, _ as _Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, c as SIDEBAR_WIDTH_KEY, D as DEFAULT_SIDEBAR_WIDTH, d as DEFAULT_HOME_PATH, 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-
|
|
13
|
+
import { f as filterByPermissions, a as CheckPointNavLinks, _ as _Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, c as SIDEBAR_WIDTH_KEY, D as DEFAULT_SIDEBAR_WIDTH, d as DEFAULT_HOME_PATH, 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-C0Ijo0nT.js';
|
|
14
14
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
15
15
|
import Neeto from '@bigbinary/neeto-icons/typeface-logos/Neeto';
|
|
16
16
|
import * as AppIcons from '@bigbinary/neeto-icons/typeface-logos';
|
|
@@ -244,7 +244,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
244
244
|
});
|
|
245
245
|
};
|
|
246
246
|
|
|
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}.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-300));bottom:0;content:\"\";left:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:1px}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-500));width:3px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:3px}.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}";
|
|
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}.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
248
|
injectCss.n(css,{});
|
|
249
249
|
|
|
250
250
|
var Chevron = function Chevron(_ref) {
|
|
@@ -276,4 +276,4 @@ exports.enableDraggingStyles = enableDraggingStyles;
|
|
|
276
276
|
exports.filterByPermissions = filterByPermissions;
|
|
277
277
|
exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
|
|
278
278
|
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
279
|
-
//# sourceMappingURL=Chevron-
|
|
279
|
+
//# sourceMappingURL=Chevron-BLr84pgG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron-hPBuO9HZ.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","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","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,CA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AACC,IAAAA,KAAK,EAAC,IAAI;AAAAnJ,IAAAA,QAAA,eAC5DY,cAAA,CAAA,MAAA,EAAA;AACEwI,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC,cAAA;KACN,CAAA;AAAC,GACC,CAAC,CAAA;AAAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Chevron-BLr84pgG.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","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","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,IAAMU,WAAW,GAAGR,IAAI,GAAG,GAAG,GAAGS,sBAAO,CAAA;AACxC,EAAA,IAAMC,SAAS,GAAGV,IAAI,GAAAW,eAAA,CAAA;AAChBX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@bigbinary/neetoui/Button');
|
|
|
7
7
|
var ramda = require('ramda');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var reactRouterDom = require('react-router-dom');
|
|
10
|
-
var Chevron = require('./Chevron-
|
|
10
|
+
var Chevron = require('./Chevron-BLr84pgG.js');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
require('@babel/runtime/helpers/defineProperty');
|
|
13
13
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -38,7 +38,7 @@ var IMAGE_UPLOAD_CONFIG = {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:
|
|
41
|
+
var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:1024px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:2rem;line-height:1.25}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:.75rem auto}.neeto-molecules-document__wrapper .ProseMirror{flex-grow:1;height:auto;max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-left:none;border-right:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:.375rem}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:46.875rem;padding-left:0!important;padding-right:0!important}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper button.neeto-editor-fixed-menu__item{flex-shrink:0}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:.75rem 1.5rem 2rem!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:.75rem auto 0;max-width:48rem!important;padding-left:1rem;padding-right:1rem}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:48rem!important;padding-left:1rem;padding-right:1rem}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.neeto-molecules-document__wrapper ins{background-color:#c1f4cb!important;text-decoration:none!important}.neeto-molecules-document__wrapper del{background-color:#faa!important}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image{border-radius:5px;overflow:hidden;padding-bottom:56.25%;position:relative;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image img{height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%}@media screen and (max-width:767px){.ne-media-uploader-modal{width:95vw!important}}";
|
|
42
42
|
injectCss.n(css,{});
|
|
43
43
|
|
|
44
44
|
var useEditor = function useEditor(_ref) {
|
|
@@ -251,7 +251,7 @@ var Editor = function Editor(_ref) {
|
|
|
251
251
|
onChange: handleContentChange,
|
|
252
252
|
onChangeAttachments: handleAttachmentChange,
|
|
253
253
|
children: [children, /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
254
|
-
className: "neeto-molecules-document__container px-
|
|
254
|
+
className: "neeto-molecules-document__container px-6",
|
|
255
255
|
children: [/*#__PURE__*/jsxRuntime.jsx(Textarea, _objectSpread({
|
|
256
256
|
nakedTextarea: true,
|
|
257
257
|
className: "neeto-molecules-document__title",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentEditor.js","sources":["../../src/components/DocumentEditor/constants.js","../../src/components/DocumentEditor/hooks/useEditor.js","../../src/components/DocumentEditor/MediaUploader.jsx","../../src/components/DocumentEditor/utils.js","../../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isCharacterCountActive: true,\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-4\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute right-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ml-0 pl-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isCharacterCountActive","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,MAAM,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AAA,EAEZ3E,MAAM,CAACT,sBAAsB,CAAA;AAAC,SACrB,CACb,CAAA;AAAA,OACE,CAAC,CAAA;AAAA,KAAA,CACM,CAAC,eACf+G,eAAA,CAACkC,KAAK,EAAA;AACJzF,MAAAA,SAAS,EAAC,+BAA+B;AACzC,MAAA,aAAA,EAAY,uBAAuB;AACnC0F,MAAAA,MAAM,EAAEnD,yBAA0B;AAClCoD,MAAAA,OAAO,EAAE,SAATA,OAAOA,GAAQ;QACbzG,4BAA4B,CAAC,KAAK,CAAC,CAAA;OACnC;AAAA0C,MAAAA,QAAA,EAEF/B,cAAAA,cAAA,CAAC4F,KAAK,CAACG,MAAM,EAAA;AAAC5F,QAAAA,SAAS,EAAC,WAAW;QAAA4B,QAAA,eACjC/B,cAAA,CAAC2F,UAAU,EAAA;AAACJ,UAAAA,KAAK,EAAC,IAAI;UAAAxD,QAAA,EACnBrB,CAAC,CAAC,oDAAoD,CAAA;SAC7C,CAAA;AAAC,OACD,CAAC,eACfV,cAAA,CAACZ,aAAa,EAAA;AAAOC,QAAAA,4BAA4B,EAA5BA,4BAAAA;AAA4B,OAAK,CAAC,CAAA;AAAA,KAClD,CAAC,CAAA;AAAA,GACL,CAAC,CAAA;AAEV,CAAC,CAAA;AAiED0B,MAAM,CAACiF,WAAW,GAAG,gBAAgB,CAAA;AAErC,YAAeC,aAAAA,UAAI,CAAClF,MAAM,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"DocumentEditor.js","sources":["../../src/components/DocumentEditor/constants.js","../../src/components/DocumentEditor/hooks/useEditor.js","../../src/components/DocumentEditor/MediaUploader.jsx","../../src/components/DocumentEditor/utils.js","../../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isCharacterCountActive: true,\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-6\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute right-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ml-0 pl-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isCharacterCountActive","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,c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6DAA6D;AACvE,UAAA,SAAA,EAAQ,8BAA8B;AACtCoF,UAAAA,KAAK,EAAC,OAAO;UAAAxD,QAAA,EAEZ3E,MAAM,CAACT,sBAAsB,CAAA;AAAC,SACrB,CACb,CAAA;AAAA,OACE,CAAC,CAAA;AAAA,KAAA,CACM,CAAC,eACf+G,eAAA,CAACkC,KAAK,EAAA;AACJzF,MAAAA,SAAS,EAAC,+BAA+B;AACzC,MAAA,aAAA,EAAY,uBAAuB;AACnC0F,MAAAA,MAAM,EAAEnD,yBAA0B;AAClCoD,MAAAA,OAAO,EAAE,SAATA,OAAOA,GAAQ;QACbzG,4BAA4B,CAAC,KAAK,CAAC,CAAA;OACnC;AAAA0C,MAAAA,QAAA,EAEF/B,cAAAA,cAAA,CAAC4F,KAAK,CAACG,MAAM,EAAA;AAAC5F,QAAAA,SAAS,EAAC,WAAW;QAAA4B,QAAA,eACjC/B,cAAA,CAAC2F,UAAU,EAAA;AAACJ,UAAAA,KAAK,EAAC,IAAI;UAAAxD,QAAA,EACnBrB,CAAC,CAAC,oDAAoD,CAAA;SAC7C,CAAA;AAAC,OACD,CAAC,eACfV,cAAA,CAACZ,aAAa,EAAA;AAAOC,QAAAA,4BAA4B,EAA5BA,4BAAAA;AAA4B,OAAK,CAAC,CAAA;AAAA,KAClD,CAAC,CAAA;AAAA,GACL,CAAC,CAAA;AAEV,CAAC,CAAA;AAiED0B,MAAM,CAACiF,WAAW,GAAG,gBAAgB,CAAA;AAErC,YAAeC,aAAAA,UAAI,CAAClF,MAAM,CAAC;;;;"}
|
package/dist/cjs/Sidebar.js
CHANGED
|
@@ -12,7 +12,7 @@ var Typography = require('@bigbinary/neetoui/Typography');
|
|
|
12
12
|
var ramda = require('ramda');
|
|
13
13
|
var reactI18next = require('react-i18next');
|
|
14
14
|
var reactRouterDom = require('react-router-dom');
|
|
15
|
-
var Chevron = require('./Chevron-
|
|
15
|
+
var Chevron = require('./Chevron-BLr84pgG.js');
|
|
16
16
|
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
17
17
|
var Neeto = require('@bigbinary/neeto-icons/typeface-logos/Neeto');
|
|
18
18
|
var AppIcons = require('@bigbinary/neeto-icons/typeface-logos');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.80",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|