@equinor/echo-framework 0.11.1 → 0.11.2
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.
|
@@ -10,7 +10,9 @@ export interface SidebarButtonListType {
|
|
|
10
10
|
export declare enum PanelNames {
|
|
11
11
|
echoCoreSearch = "echoCoreSearch",
|
|
12
12
|
pdfTagList = "pdfTagList",
|
|
13
|
-
highlightedPanel = "highlightedPanel"
|
|
13
|
+
highlightedPanel = "highlightedPanel",
|
|
14
|
+
XLDsearchPanel = "XLDsearchPanel",
|
|
15
|
+
XLDcommentPanel = "XLDcommentPanel"
|
|
14
16
|
}
|
|
15
17
|
export declare const EchoToolBar: () => JSX.Element;
|
|
16
18
|
declare const _default: React.MemoExoticComponent<() => JSX.Element>;
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
Licensed under the MIT License (MIT), see
|
|
32
32
|
http://jedwatson.github.io/classnames
|
|
33
33
|
*/
|
|
34
|
-
!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var i=n.apply(null,r);i&&e.push(i)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var c in r)t.call(r,c)&&r[c]&&e.push(c)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(pn);var gn=pn.exports,_n=function(e){var t=e.className;return u.default.createElement("svg",{width:"25",height:"22",viewBox:"0 0 25 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.71 0.96C9.71 0.32 8.56 0 7.26 0C5.94 0 4.72 0.31 3.6 0.929999C2.5 1.55 1.62 2.44 0.96 3.6C0.32 4.76 0 6.11 0 7.65C0 9.09 0.3 10.38 0.9 11.52C1.5 12.64 2.36 13.52 3.48 14.16C4.62 14.8 5.95 15.12 7.47 15.12C8.59 15.12 9.67 14.92 10.71 14.52C11.1338 14.357 11.5343 14.1658 11.9115 13.9464C11.9105 14.0053 11.91 14.0645 11.91 14.124C11.91 15.468 12.19 16.672 12.75 17.736C13.31 18.7813 14.1127 19.6027 15.158 20.2C16.222 20.7973 17.4633 21.096 18.882 21.096C19.9273 21.096 20.9353 20.9093 21.906 20.536C22.8767 20.1627 23.7167 19.6307 24.426 18.94C24.5007 18.8653 24.538 18.7907 24.538 18.716C24.538 18.6227 24.51 18.548 24.454 18.492L23.866 17.68C23.81 17.5867 23.7353 17.54 23.642 17.54C23.6047 17.54 23.53 17.5773 23.418 17.652C22.7833 18.212 22.074 18.6507 21.29 18.968C20.5247 19.2667 19.7407 19.416 18.938 19.416C17.874 19.416 16.95 19.192 16.166 18.744C15.4007 18.2773 14.8033 17.6707 14.374 16.924C13.9447 16.1587 13.702 15.328 13.646 14.432H24.482C24.706 14.432 24.818 14.3293 24.818 14.124V13.368C24.818 12.2293 24.566 11.1747 24.062 10.204C23.558 9.23333 22.8393 8.45867 21.906 7.88C20.9727 7.28267 19.8993 6.984 18.686 6.984C17.454 6.984 16.3153 7.27333 15.27 7.852C14.2433 8.43067 13.422 9.26133 12.806 10.344C12.6155 10.6892 12.4554 11.0525 12.3257 11.4338C11.6468 12.032 10.8882 12.5007 10.05 12.84C9.23 13.16 8.39 13.32 7.53 13.32C6.39 13.32 5.4 13.08 4.56 12.6C3.74 12.1 3.1 11.45 2.64 10.65C2.18 9.83 1.92 8.94 1.86 7.98H13.47C13.71 7.98 13.83 7.87 13.83 7.65V6.84C13.83 5.62 13.56 4.49 13.02 3.45C12.48 2.41 11.71 1.58 10.71 0.96ZM10.53 3.06C11.35 3.9 11.81 4.97 11.91 6.27H1.98C2.22 4.95 2.79 3.88 3.69 3.06C4.61 2.22 5.79 1.8 7.23 1.8C8.61 1.8 9.71 2.22 10.53 3.06ZM21.738 9.84C22.5033 10.624 22.9327 11.6227 23.026 12.836H13.758C13.982 11.604 14.514 10.6053 15.354 9.84C16.2127 9.056 17.314 8.664 18.658 8.664C19.946 8.664 20.9727 9.056 21.738 9.84Z",fill:"#FF1243"}))},zn="EchoContent-module_spinningIcon__am10d";v(".EchoContent-module_barButtons__F8xrV{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.EchoContent-module_barButtons__F8xrV>button>span{grid-gap:0;display:flex;flex-direction:column}.EchoContent-module_barButtons__F8xrV>button>span>svg{display:inline-flex;margin-bottom:.2rem}.EchoContent-module_barButtons__F8xrV>button>span>span{color:var(--echoText);display:inline-flex;font-size:.65625rem;line-height:.75rem}.EchoContent-module_activeBottomBarButton__MQAdf{background-color:var(--equiGreen3);border-top:2px solid var(--equiGreen1)}.EchoContent-module_activeBottomBarButton__MQAdf>button:focus{outline:none!important}.EchoContent-module_activeBottomBarButton__MQAdf>button:focus-visible{outline:1px dashed #004f55!important;outline-offset:2px!important}@media screen and (max-width:927px) and (orientation:landscape){.EchoContent-module_activeBottomBarButton__MQAdf{border-right:2px solid var(--equiGreen1);border-top:0}.EchoContent-module_barButtons__F8xrV{max-height:96px;width:56px}}@keyframes EchoContent-module_spinAnimation__gNXNq{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.EchoContent-module_spinningIcon__am10d{animation:EchoContent-module_spinAnimation__gNXNq 1.5s linear infinite reverse}.EchoContent-module_headerDetails__iaaMw{justify-self:end}.EchoContent-module_headerIcons__Lw1b4>svg{margin:0 8px}");var wn=function(a){var o=a.isBottomBarVisible,c=a.activeAppMenuItem,l=a.updateActiveAppMenuItem,s=y((0,m.default.Hooks.useStateSafe)(!1),2),h=s[0],d=s[1],v=e.usePanels(),f=v.setActivePanel,p=v.activePanel,g=e.usePlantSettings().instCode,_=n.useHistory(),z=e.useInternalLink();t.useEffect((function(){var e=r.eventHub.subscribe("isSyncing",(function(e){d(e)}));return function(){e()}}));var w=function(t){if(f(""),t===c)l(""),"menu"===t||"search"===t?f(""):z("/");else switch(l(t),t){case"home":return _.push("/?instCode=".concat(g));case"search":return f(e.ECHO_CORE_SEARCH);case"camera":return z("newcamera");case"menu":return f(e.ECHO_CORE_MAIN);default:return null}l("")},x=_n;return o?u.default.createElement(i.EchoBottomBar,{style:{zIndex:"var( --echo-framework-z-level-bottom-bar)"}},u.default.createElement(i.SidebarButton,{active:"home"===c,onClick:function(){return w("home")},text:"Home",buttonPosition:"bottom"},u.default.createElement(x,null)),u.default.createElement(i.SidebarButton,{active:"search"===c&&"echoCoreSearch"===p,onClick:function(){return w("search")},text:"Search",buttonPosition:"bottom"},u.default.createElement(i.Icon,{name:"search",color:i.themeConst.echoText})),u.default.createElement(i.SidebarButton,{active:"camera"===c,onClick:function(){return w("camera")},text:"Scan",buttonPosition:"bottom"},u.default.createElement(i.Icon,{name:"camera",color:i.themeConst.echoText})),u.default.createElement(i.SidebarButton,{active:"menu"===c&&"echoCoreMain"===p,onClick:function(){return w("menu")},text:"Menu",buttonPosition:"bottom"},u.default.createElement(i.Icon,{name:h?"sync":"menu",className:h?zn:"",color:i.themeConst.echoText}))):null},xn=t.memo(wn),En="EchoMenu-module_echoTopBar__LRmAW",bn="EchoMenu-module_topBarItems__o1lI-",Cn="EchoMenu-module_topBarItem__gFYpe",yn="EchoMenu-module_echoToolMenu__ypzoU",Mn="EchoMenu-module_eeLogo__0c6s2",An="EchoMenu-module_headerTitleArea__z9aGX",Hn="EchoMenu-module_headerIcons__g37BI";v(".EchoMenu-module_echoTopBar__LRmAW{border-bottom:1px solid var(--default)!important;padding-left:12px!important;padding-right:var(--small)!important;width:100%!important}.EchoMenu-module_topBarItems__o1lI-{align-items:center;display:flex}.EchoMenu-module_topBarItem__gFYpe{padding:0 .25em}.EchoMenu-module_echoToolMenu__ypzoU{background:#fff;border-right:1px solid var(--default);display:flex;flex-direction:column;height:100%;width:64px;z-index:var(--echo-framework-z-level-panel-left)}.EchoMenu-module_headerDetails__udub4{justify-self:end}@media screen and (min-width:768px){.EchoMenu-module_headerDetails__udub4{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65px}}@media screen and (min-width:1024px){.EchoMenu-module_headerDetails__udub4{overflow:auto;text-overflow:clip;white-space:normal;width:auto}}.EchoMenu-module_eeLogo__0c6s2 svg{height:24px!important;width:24px!important}.EchoMenu-module_headerDetails__udub4,.EchoMenu-module_headerTitleArea__z9aGX{align-items:center;display:flex;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.EchoMenu-module_plantName__SrPpr{overflow:hidden;text-align:right;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;width:100%}.EchoMenu-module_headerIcons__g37BI>svg{margin:0 8px}.EchoMenu-module_popoverContent__BKEhG>div{width:300px}.EchoMenu-module_popoverTitle__5AeDj{display:flex;height:24px;justify-content:space-between;margin:0;width:100%}");var Pn,kn=ct((function(e){return{activeAppMenuItem:"",isLegendActive:void 0,activeTopMenuItem:"",activeTopMenuComponents:[],moduleName:"",showPlantNameContent:!0,updateActiveAppMenuItem:function(t){e({activeAppMenuItem:t})},updateIsLegendActive:function(t){e({isLegendActive:t})},updateActiveTopMenuItem:function(t){e({activeTopMenuItem:t})},updateActiveTopMenuComponents:function(t){e({activeTopMenuComponents:t})},updateModuleName:function(t){e({moduleName:t})},updateShowPlantNameContent:function(t){e({showPlantNameContent:t})}}})),Dn=Object.assign(kn);exports.PanelNames=void 0,(Pn=exports.PanelNames||(exports.PanelNames={})).echoCoreSearch="echoCoreSearch",Pn.pdfTagList="pdfTagList",Pn.highlightedPanel="highlightedPanel";var Ln=function(){var a=e.usePanels(),r=a.setActivePanel,o=a.activePanel,c=y(t.useState(""),2),l=c[0],s=c[1],h=n.useHistory(),d=kn(),m=d.activeAppMenuItem,v=d.updateActiveAppMenuItem;t.useEffect((function(){s(h.location.pathname)}),[h.location.pathname]);var f=function(e){if(r(""),e===m)v(""),e!==exports.PanelNames.echoCoreSearch&&e!==exports.PanelNames.pdfTagList&&e!==exports.PanelNames.highlightedPanel||r("");else switch(v(e),e){case exports.PanelNames.echoCoreSearch:return r(exports.PanelNames.echoCoreSearch);case exports.PanelNames.pdfTagList:return r(exports.PanelNames.pdfTagList);case exports.PanelNames.highlightedPanel:return r(exports.PanelNames.highlightedPanel);default:return null}},p="/viewer"===l||"/pdf "===l,g="/echo3d"===l,_={buttonTitle:"Search",onClick:function(){return f(exports.PanelNames.echoCoreSearch)},iconName:"search",iconColor:i.themeConst.echoText,isVisible:!0,active:m===exports.PanelNames.echoCoreSearch&&o===exports.PanelNames.echoCoreSearch},z={buttonTitle:"Selection",onClick:function(){return f(exports.PanelNames.highlightedPanel)},iconName:"playlist_added",iconColor:i.themeConst.echoText,isVisible:g,active:m===exports.PanelNames.highlightedPanel&&o===exports.PanelNames.highlightedPanel},w={buttonTitle:"PDF Tags",onClick:function(){return f(exports.PanelNames.pdfTagList)},iconName:"tag",iconColor:i.themeConst.echoText,isVisible:p,active:m===exports.PanelNames.pdfTagList&&o===exports.PanelNames.pdfTagList},x=[];return x.push(_),p&&x.push(w),g&&x.push(z),u.default.createElement("div",{className:yn},x.map((function(e,t){return u.default.createElement(i.SidebarButton,{key:e.iconName+"-"+t,text:e.buttonTitle,onClick:e.onClick,active:e.active,buttonPosition:"left"},u.default.createElement(i.Icon,{name:e.iconName,color:e.iconColor}))})))},In=t.memo(Ln),Vn={exports:{}};
|
|
34
|
+
!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var i=n.apply(null,r);i&&e.push(i)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var c in r)t.call(r,c)&&r[c]&&e.push(c)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(pn);var gn=pn.exports,_n=function(e){var t=e.className;return u.default.createElement("svg",{width:"25",height:"22",viewBox:"0 0 25 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.71 0.96C9.71 0.32 8.56 0 7.26 0C5.94 0 4.72 0.31 3.6 0.929999C2.5 1.55 1.62 2.44 0.96 3.6C0.32 4.76 0 6.11 0 7.65C0 9.09 0.3 10.38 0.9 11.52C1.5 12.64 2.36 13.52 3.48 14.16C4.62 14.8 5.95 15.12 7.47 15.12C8.59 15.12 9.67 14.92 10.71 14.52C11.1338 14.357 11.5343 14.1658 11.9115 13.9464C11.9105 14.0053 11.91 14.0645 11.91 14.124C11.91 15.468 12.19 16.672 12.75 17.736C13.31 18.7813 14.1127 19.6027 15.158 20.2C16.222 20.7973 17.4633 21.096 18.882 21.096C19.9273 21.096 20.9353 20.9093 21.906 20.536C22.8767 20.1627 23.7167 19.6307 24.426 18.94C24.5007 18.8653 24.538 18.7907 24.538 18.716C24.538 18.6227 24.51 18.548 24.454 18.492L23.866 17.68C23.81 17.5867 23.7353 17.54 23.642 17.54C23.6047 17.54 23.53 17.5773 23.418 17.652C22.7833 18.212 22.074 18.6507 21.29 18.968C20.5247 19.2667 19.7407 19.416 18.938 19.416C17.874 19.416 16.95 19.192 16.166 18.744C15.4007 18.2773 14.8033 17.6707 14.374 16.924C13.9447 16.1587 13.702 15.328 13.646 14.432H24.482C24.706 14.432 24.818 14.3293 24.818 14.124V13.368C24.818 12.2293 24.566 11.1747 24.062 10.204C23.558 9.23333 22.8393 8.45867 21.906 7.88C20.9727 7.28267 19.8993 6.984 18.686 6.984C17.454 6.984 16.3153 7.27333 15.27 7.852C14.2433 8.43067 13.422 9.26133 12.806 10.344C12.6155 10.6892 12.4554 11.0525 12.3257 11.4338C11.6468 12.032 10.8882 12.5007 10.05 12.84C9.23 13.16 8.39 13.32 7.53 13.32C6.39 13.32 5.4 13.08 4.56 12.6C3.74 12.1 3.1 11.45 2.64 10.65C2.18 9.83 1.92 8.94 1.86 7.98H13.47C13.71 7.98 13.83 7.87 13.83 7.65V6.84C13.83 5.62 13.56 4.49 13.02 3.45C12.48 2.41 11.71 1.58 10.71 0.96ZM10.53 3.06C11.35 3.9 11.81 4.97 11.91 6.27H1.98C2.22 4.95 2.79 3.88 3.69 3.06C4.61 2.22 5.79 1.8 7.23 1.8C8.61 1.8 9.71 2.22 10.53 3.06ZM21.738 9.84C22.5033 10.624 22.9327 11.6227 23.026 12.836H13.758C13.982 11.604 14.514 10.6053 15.354 9.84C16.2127 9.056 17.314 8.664 18.658 8.664C19.946 8.664 20.9727 9.056 21.738 9.84Z",fill:"#FF1243"}))},zn="EchoContent-module_spinningIcon__am10d";v(".EchoContent-module_barButtons__F8xrV{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.EchoContent-module_barButtons__F8xrV>button>span{grid-gap:0;display:flex;flex-direction:column}.EchoContent-module_barButtons__F8xrV>button>span>svg{display:inline-flex;margin-bottom:.2rem}.EchoContent-module_barButtons__F8xrV>button>span>span{color:var(--echoText);display:inline-flex;font-size:.65625rem;line-height:.75rem}.EchoContent-module_activeBottomBarButton__MQAdf{background-color:var(--equiGreen3);border-top:2px solid var(--equiGreen1)}.EchoContent-module_activeBottomBarButton__MQAdf>button:focus{outline:none!important}.EchoContent-module_activeBottomBarButton__MQAdf>button:focus-visible{outline:1px dashed #004f55!important;outline-offset:2px!important}@media screen and (max-width:927px) and (orientation:landscape){.EchoContent-module_activeBottomBarButton__MQAdf{border-right:2px solid var(--equiGreen1);border-top:0}.EchoContent-module_barButtons__F8xrV{max-height:96px;width:56px}}@keyframes EchoContent-module_spinAnimation__gNXNq{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.EchoContent-module_spinningIcon__am10d{animation:EchoContent-module_spinAnimation__gNXNq 1.5s linear infinite reverse}.EchoContent-module_headerDetails__iaaMw{justify-self:end}.EchoContent-module_headerIcons__Lw1b4>svg{margin:0 8px}");var wn=function(a){var o=a.isBottomBarVisible,c=a.activeAppMenuItem,l=a.updateActiveAppMenuItem,s=y((0,m.default.Hooks.useStateSafe)(!1),2),h=s[0],d=s[1],v=e.usePanels(),f=v.setActivePanel,p=v.activePanel,g=e.usePlantSettings().instCode,_=n.useHistory(),z=e.useInternalLink();t.useEffect((function(){var e=r.eventHub.subscribe("isSyncing",(function(e){d(e)}));return function(){e()}}));var w=function(t){if(f(""),t===c)l(""),"menu"===t||"search"===t?f(""):z("/");else switch(l(t),t){case"home":return _.push("/?instCode=".concat(g));case"search":return f(e.ECHO_CORE_SEARCH);case"camera":return z("newcamera");case"menu":return f(e.ECHO_CORE_MAIN);default:return null}l("")},x=_n;return o?u.default.createElement(i.EchoBottomBar,{style:{zIndex:"var( --echo-framework-z-level-bottom-bar)"}},u.default.createElement(i.SidebarButton,{active:"home"===c,onClick:function(){return w("home")},text:"Home",buttonPosition:"bottom"},u.default.createElement(x,null)),u.default.createElement(i.SidebarButton,{active:"search"===c&&"echoCoreSearch"===p,onClick:function(){return w("search")},text:"Search",buttonPosition:"bottom"},u.default.createElement(i.Icon,{name:"search",color:i.themeConst.echoText})),u.default.createElement(i.SidebarButton,{active:"camera"===c,onClick:function(){return w("camera")},text:"Scan",buttonPosition:"bottom"},u.default.createElement(i.Icon,{name:"camera",color:i.themeConst.echoText})),u.default.createElement(i.SidebarButton,{active:"menu"===c&&"echoCoreMain"===p,onClick:function(){return w("menu")},text:"Menu",buttonPosition:"bottom"},u.default.createElement(i.Icon,{name:h?"sync":"menu",className:h?zn:"",color:i.themeConst.echoText}))):null},xn=t.memo(wn),En="EchoMenu-module_echoTopBar__LRmAW",bn="EchoMenu-module_topBarItems__o1lI-",Cn="EchoMenu-module_topBarItem__gFYpe",yn="EchoMenu-module_echoToolMenu__ypzoU",Mn="EchoMenu-module_eeLogo__0c6s2",An="EchoMenu-module_headerTitleArea__z9aGX",Hn="EchoMenu-module_headerIcons__g37BI";v(".EchoMenu-module_echoTopBar__LRmAW{border-bottom:1px solid var(--default)!important;padding-left:12px!important;padding-right:var(--small)!important;width:100%!important}.EchoMenu-module_topBarItems__o1lI-{align-items:center;display:flex}.EchoMenu-module_topBarItem__gFYpe{padding:0 .25em}.EchoMenu-module_echoToolMenu__ypzoU{background:#fff;border-right:1px solid var(--default);display:flex;flex-direction:column;height:100%;width:64px;z-index:var(--echo-framework-z-level-panel-left)}.EchoMenu-module_headerDetails__udub4{justify-self:end}@media screen and (min-width:768px){.EchoMenu-module_headerDetails__udub4{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65px}}@media screen and (min-width:1024px){.EchoMenu-module_headerDetails__udub4{overflow:auto;text-overflow:clip;white-space:normal;width:auto}}.EchoMenu-module_eeLogo__0c6s2 svg{height:24px!important;width:24px!important}.EchoMenu-module_headerDetails__udub4,.EchoMenu-module_headerTitleArea__z9aGX{align-items:center;display:flex;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.EchoMenu-module_plantName__SrPpr{overflow:hidden;text-align:right;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;width:100%}.EchoMenu-module_headerIcons__g37BI>svg{margin:0 8px}.EchoMenu-module_popoverContent__BKEhG>div{width:300px}.EchoMenu-module_popoverTitle__5AeDj{display:flex;height:24px;justify-content:space-between;margin:0;width:100%}");var Pn,kn=ct((function(e){return{activeAppMenuItem:"",isLegendActive:void 0,activeTopMenuItem:"",activeTopMenuComponents:[],moduleName:"",showPlantNameContent:!0,updateActiveAppMenuItem:function(t){e({activeAppMenuItem:t})},updateIsLegendActive:function(t){e({isLegendActive:t})},updateActiveTopMenuItem:function(t){e({activeTopMenuItem:t})},updateActiveTopMenuComponents:function(t){e({activeTopMenuComponents:t})},updateModuleName:function(t){e({moduleName:t})},updateShowPlantNameContent:function(t){e({showPlantNameContent:t})}}})),Dn=Object.assign(kn);exports.PanelNames=void 0,(Pn=exports.PanelNames||(exports.PanelNames={})).echoCoreSearch="echoCoreSearch",Pn.pdfTagList="pdfTagList",Pn.highlightedPanel="highlightedPanel",Pn.XLDsearchPanel="XLDsearchPanel",Pn.XLDcommentPanel="XLDcommentPanel";var Ln=function(){var a=e.usePanels(),r=a.setActivePanel,o=a.activePanel,c=y(t.useState(""),2),l=c[0],s=c[1],h=n.useHistory(),d=kn(),m=d.activeAppMenuItem,v=d.updateActiveAppMenuItem;t.useEffect((function(){s(h.location.pathname)}),[h.location.pathname]);var f=function(e){if(r(""),e===m)v(""),e!==exports.PanelNames.echoCoreSearch&&e!==exports.PanelNames.pdfTagList&&e!==exports.PanelNames.highlightedPanel&&e!==exports.PanelNames.XLDsearchPanel&&e!==exports.PanelNames.XLDcommentPanel||r("");else switch(v(e),e){case exports.PanelNames.echoCoreSearch:return r(exports.PanelNames.echoCoreSearch);case exports.PanelNames.pdfTagList:return r(exports.PanelNames.pdfTagList);case exports.PanelNames.highlightedPanel:return r(exports.PanelNames.highlightedPanel);case exports.PanelNames.XLDsearchPanel:return r(exports.PanelNames.XLDsearchPanel);case exports.PanelNames.XLDcommentPanel:return r(exports.PanelNames.XLDcommentPanel);default:return null}},p={buttonTitle:"Search",onClick:function(){return f(exports.PanelNames.echoCoreSearch)},iconName:"search",iconColor:i.themeConst.echoText,isVisible:!0,active:m===exports.PanelNames.echoCoreSearch&&o===exports.PanelNames.echoCoreSearch},g={buttonTitle:"Selection",onClick:function(){return f(exports.PanelNames.highlightedPanel)},iconName:"playlist_added",iconColor:i.themeConst.echoText,isVisible:"/echo3d"===l,active:m===exports.PanelNames.highlightedPanel&&o===exports.PanelNames.highlightedPanel},_={buttonTitle:"PDF Tags",onClick:function(){return f(exports.PanelNames.pdfTagList)},iconName:"tag",iconColor:i.themeConst.echoText,isVisible:"/viewer"===l||"/pdf "===l,active:m===exports.PanelNames.pdfTagList&&o===exports.PanelNames.pdfTagList},z={buttonTitle:"XLD Search",onClick:function(){return f(exports.PanelNames.XLDsearchPanel)},iconName:"format_list_bulleted",iconColor:i.themeConst.echoText,isVisible:l.includes("xld"),active:m===exports.PanelNames.XLDsearchPanel&&o===exports.PanelNames.XLDsearchPanel},w={buttonTitle:"Sticky Notes",onClick:function(){return f(exports.PanelNames.XLDcommentPanel)},iconName:"comment",iconColor:i.themeConst.echoText,isVisible:l.includes("xld"),active:m===exports.PanelNames.XLDcommentPanel&&o===exports.PanelNames.XLDcommentPanel},x=[];return x.push(p),_.isVisible&&x.push(_),g.isVisible&&x.push(g),z.isVisible&&(x.push(z),x.push(w)),u.default.createElement("div",{className:yn},x.map((function(e,t){return u.default.createElement(i.SidebarButton,{key:e.iconName+"-"+t,text:e.buttonTitle,onClick:e.onClick,active:e.active,buttonPosition:"left"},u.default.createElement(i.Icon,{name:e.iconName,color:e.iconColor}))})))},In=t.memo(Ln),Vn={exports:{}};
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Lodash <https://lodash.com/>
|