@livetiles/reach-components-react 0.3.97 → 0.3.100
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/common/{Hero.d.ts → hero/Hero.d.ts} +3 -2
- package/common/hero/HeroPaging.d.ts +10 -0
- package/common/hero/HeroSlide.d.ts +14 -0
- package/de.async.esm.esm.js +32 -19
- package/es.async.esm.esm.js +36 -23
- package/fr.async.esm.esm.js +36 -23
- package/index.esm2.js +400 -224
- package/index.umd.js +668 -388
- package/it.async.esm.esm.js +36 -23
- package/ja.async.esm.esm.js +32 -19
- package/package.json +1 -1
- package/tr.async.esm.esm.js +32 -19
- package/zh-CN.async.esm.esm.js +32 -19
- package/zh-TW.async.esm.esm.js +32 -19
package/index.esm2.js
CHANGED
|
@@ -77676,7 +77676,7 @@ var splitter=new C(SUPPORTS_Y$1?rx:'^(?:'+rx.source+')',flags);var lim=limit===u
|
|
|
77676
77676
|
var src=browserInfo.name==='safari'?url+"#t=0.1":url;return jsxs("div",{children:[jsx$1(AttachedMediaDownloadLink,{fileName:fileName,url:url},void 0),jsxs("video",__assign$1({preload:"metadata",controls:true,title:fileName,width:"auto",height:"auto"},{children:[jsx$1("source",{src:src,type:"video/mp4"},void 0),jsx$1(FormattedMessage$1,{id:"Generic.videoReplayError",tagName:"p"},void 0)]}),void 0)]},void 0);};function isVideoFile(fileName){var _a;var os=env.deviceInfo.operatingSystem;var isApple=os==='mac';var fileType=(_a=lite.getType(fileName))===null||_a===void 0?void 0:_a.toString();if(!fileType){return false;}if(fileType.startsWith(VideoMimeTypes.mp4)){return true;}return isApple?fileType.startsWith(VideoMimeTypes.quicktime):fileType.startsWith(VideoMimeTypes.webm);}var CardBorderInline=function CardBorderInline(xRadius,yRadius){var xShadow=xRadius/2;var yShadow=yRadius/2;var radius=Math.abs(xRadius)+Math.abs(yRadius);return "\n box-shadow: "+xShadow+"px "+yShadow+"px "+radius+"px grey;\n ";};var InputPlaceholder=function InputPlaceholder(content){return "\n &:-moz-placeholder {\n "+content+";\n }\n &::-moz-placeholder {\n "+content+";\n }\n &:-ms-input-placeholder {\n "+content+";\n }\n &::-webkit-input-placeholder {\n "+content+";\n }\n ";};var LineClamp=function LineClamp(lines,fontSize,lineHeight){return css$2(templateObject_1$T$1||(templateObject_1$T$1=__makeTemplateObject$1(["\n display: block;\n display: -webkit-box;\n max-height: ","px;\n font-size: ","px;\n line-height: ",";\n -webkit-line-clamp: ",";\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n "],["\n display: block;\n display: -webkit-box;\n max-height: ","px;\n font-size: ","px;\n line-height: ",";\n -webkit-line-clamp: ",";\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n "])),fontSize*lineHeight*lines,fontSize,lineHeight,lines);};function getImageSize(url){var image=new Image();var promise=new Promise(function(resolve){image.onload=function(e){var i=e.currentTarget;resolve({width:i.width,height:i.height});};});image.src=url;return promise;}function getFileIcon(filename){if(isAudioFile(filename)){return 'MusicInCollectionFill';}if(isVideoFile(filename)){return 'Video';}var extension=filename===null||filename===void 0?void 0:filename.split('.').pop().toLowerCase();return getFileIconByExtension(extension);}function getIconColor(fileIcon){switch(fileIcon){case'WordDocument':return '#1C5FC0';case'ExcelDocument':return '#138147';case'PowerPointDocument':return '#CA4B27';case'VisioDocument':return '#1C5FBF';case'PDF':return '#CF1700';default:return '#000';}}function getFileIconByExtension(extension){switch(extension===null||extension===void 0?void 0:extension.toLowerCase()){case'vsdx':return 'VisioDocument';case'rar':case'zip':case'7z':return 'ZipFolder';case'pdf':return 'PDF';case'doc':case'docx':return 'WordDocument';case'xls':case'xlsx':case'csv':return 'ExcelDocument';case'ppt':case'pptx':case'potx':case'ppsx':return 'PowerPointDocument';case'mp4':case'webm':case'mpeg':case'avi':case'ogv':return 'Video';case'aac':case'mp3':case'oga':case'opus':case'wav':case'weba':return 'MusicInCollectionFill';case'bmp':case'gif':case'ico':case'jpeg':case'jpg':case'png':case'svg':case'tif':case'webp':return 'FileImage';default:return 'Page';}}var templateObject_1$T$1;function useFileAccessTokenApi(){var api=useApi();var _a=useApiFactory(),createApiUrl=_a.createApiUrl,fetchFromApi=_a.fetchFromApi;var identifier=useContext(SubscriptionIdContext).identifier;var env=useEnvironmentConfig();var subscriptionId=identifier===null||identifier===void 0?void 0:identifier.id;return useMemo(function(){return {exchangeShortLivedToken:exchangeShortLivedToken,getPublishableItemShortLivedToken:getPublishableItemShortLivedToken,createDownloadClickHandler:createDownloadClickHandler};// Creates a click handler that is safe to be used on iOS.
|
|
77677
77677
|
// iOS does not allow async onClick handler that open a new window
|
|
77678
77678
|
// with `window.open(url, '_blank')`
|
|
77679
|
-
function createDownloadClickHandler(target,getUrl){var _this=this;return function(){return __awaiter$1(_this,void 0,void 0,function(){var url;return __generator$1(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getUrl()];case 1:url=_a.sent();window.open(url,env.deviceInfo.operatingSystem==='ios'?'_self':target);return [2/*return*/];}});});};}function getPublishableItemShortLivedToken(basePath,itemId){return api.custom(basePath+"/"+itemId+"/file_access_token/types/short_lived").get().then(function(r){return r.body().data();});}function exchangeShortLivedToken(fileAccessToken){return __awaiter$1(this,void 0,void 0,function(){var config,response;return __generator$1(this,function(_a){switch(_a.label){case 0:if(!fileAccessToken){return [2/*return*/,null];}config={method:'POST',headers:{authorization:'Bearer '+fileAccessToken,'subscription-id':subscriptionId}};return [4/*yield*/,fetchFromApi("/file_access_token/types/short_lived",config)];case 1:response=_a.sent();return [2/*return*/,response.status!==200?null:response.text()];}});});}},[subscriptionId,fetchFromApi,createApiUrl,api]);}var FileAttachmentList=function FileAttachmentList(_a){var files=_a.files,onDeleteClick=_a.onDeleteClick,getFileUrl=_a.getFileUrl,fileAccessToken=_a.fileAccessToken,disabled=_a.disabled,className=_a.className;if(!files||files.length===0){return null;}var audioFiles=files.filter(function(f){return getFileUrl&&isAudioFile(f.filename);});var videoFiles=files.filter(function(f){return getFileUrl&&isVideoFile(f.filename);});var otherFiles=files.filter(function(f){return !audioFiles.includes(f)&&!videoFiles.includes(f);});return jsxs(Fragment,{children:[videoFiles.length>0&&jsx$1(VideoFilesListHost,__assign$1({className:className,"data-preload-video":browserInfo.name==='safari'},{children:videoFiles.map(function(f){return jsx$1(VideoFileItem,{children:jsx$1(VideoFile,{fileName:f.filename,url:getFileUrl(f.id)},void 0)},f.id);})}),void 0),audioFiles.length>0&&jsx$1(FilesListHost,__assign$1({className:className},{children:audioFiles.map(function(f){return jsx$1(FileItem,{children:jsx$1(AudioFile,{fileName:f.filename,url:getFileUrl(f.id)},void 0)},f.id);})}),void 0),otherFiles.length>0&&jsx$1(FilesListHost,__assign$1({className:className},{children:otherFiles.map(function(f){return jsx$1(FileItem,{children:jsx$1(FileAttachmentPreview,{attachment:f,disabled:disabled,getFileUrl:getFileUrl,fileAccessToken:fileAccessToken,onDeleteClick:onDeleteClick},void 0)},f.id);})}),void 0)]},void 0);};var FilesListHost=_styled.ul.withConfig({displayName:"FileAttachmentList__FilesListHost",componentId:"sc-lwztxx-0"})(templateObject_1$S$1||(templateObject_1$S$1=__makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n\n audio {\n width: 100%;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n\n audio {\n width: 100%;\n }\n"])));var VideoFilesListHost=_styled.ul.withConfig({displayName:"FileAttachmentList__VideoFilesListHost",componentId:"sc-lwztxx-1"})(templateObject_2$B$1||(templateObject_2$B$1=__makeTemplateObject$1(["\n margin: 0;\n padding: 0;\n list-style: none;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"],["\n margin: 0;\n padding: 0;\n list-style: none;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"])),videoAttachmentRoundedCornerSize);var VideoFileItem=_styled.li.withConfig({displayName:"FileAttachmentList__VideoFileItem",componentId:"sc-lwztxx-2"})(templateObject_3$r$1||(templateObject_3$r$1=__makeTemplateObject$1(["\n &:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n &:not(:first-child) {\n margin-top: ","px;\n }\n"])),spacingS);var FileItem=_styled.li.withConfig({displayName:"FileAttachmentList__FileItem",componentId:"sc-lwztxx-3"})(templateObject_4$h$1||(templateObject_4$h$1=__makeTemplateObject$1(["\n width: 100%;\n &:not(:first-child) {\n margin-top: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n &:nth-child(2) {\n margin-top: 0;\n }\n }\n"],["\n width: 100%;\n &:not(:first-child) {\n margin-top: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n &:nth-child(2) {\n margin-top: 0;\n }\n }\n"])),spacingS,minScreenSize.small,spacingS-5);var FileAttachmentPreview=function FileAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,getFileUrl=_a.getFileUrl,fileAccessToken=_a.fileAccessToken,disabled=_a.disabled;var formatMessage=useIntl().formatMessage;var showDeleteButton=!disabled&&onDeleteClick;var _b=useFileAccessTokenApi(),exchangeShortLivedToken=_b.exchangeShortLivedToken,createDownloadClickHandler=_b.createDownloadClickHandler;return jsxs(Host$o$1,{children:[attachment.isUploadInProgress&&jsx$1(AttachmentOverlay$1,{children:jsx$1(CenteredSpinner$1,{size:SpinnerSize.medium},void 0)},void 0),jsx$1(Inner$1$1,__assign$1({takeFullWidth:!showDeleteButton},{children:renderInnerTileContent()}),void 0),showDeleteButton&&jsx$1(DeleteButton,{iconProps:{iconName:'Delete'},onClick:function(){return onDeleteClick(attachment);},disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)]},void 0);function renderInnerTileContent(){var _this=this;if(attachment.hasError){return jsxs(FileNameContainer,{children:[jsx$1(WarningIcon$1,{iconName:"Warning"},void 0),jsx$1(FileName,__assign$1({title:attachment.filename},{children:attachment.filename}),void 0)]},void 0);}var iconName=getFileIcon(attachment.filename);if(getFileUrl){return jsxs(DownloadButton$4,__assign$1({title:attachment.filename,onClick:createDownloadClickHandler('_blank',function(){return __awaiter$1(_this,void 0,void 0,function(){var token;return __generator$1(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(fileAccessToken)];case 1:token=_a.sent();return [2/*return*/,getFileUrl(attachment.id,token)];}});});})},{children:[jsx$1(FileIcon$2,{iconName:iconName},void 0),jsx$1(FileName,{children:attachment.filename},void 0)]}),void 0);}return jsxs(FileNameContainer,{children:[jsx$1(FileIcon$2,{iconName:iconName},void 0),jsx$1(FileName,__assign$1({title:attachment.filename},{children:attachment.filename}),void 0)]},void 0);}};var Host$o$1=_styled.div.withConfig({displayName:"FileAttachmentList__Host",componentId:"sc-lwztxx-4"})(templateObject_5$c$1||(templateObject_5$c$1=__makeTemplateObject$1(["\n position: relative;\n display: flex;\n border: 1px solid #95989a;\n border-radius: 2px;\n background-color: ",";\n"],["\n position: relative;\n display: flex;\n border: 1px solid #95989a;\n border-radius: 2px;\n background-color: ",";\n"])),function(p){return p.theme.palette.white;});var DownloadButton$4=_styled(DefaultButton).withConfig({displayName:"FileAttachmentList__DownloadButton",componentId:"sc-lwztxx-5"})(templateObject_6$9$2||(templateObject_6$9$2=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n width: 100%;\n color: ",";\n box-sizing: border-box;\n padding: ","px;\n border: 0;\n height: auto;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n & > span {\n max-width: 100%;\n }\n\n // make the entire tile clickable\n button::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 0;\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n color: ",";\n box-sizing: border-box;\n padding: ","px;\n border: 0;\n height: auto;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n & > span {\n max-width: 100%;\n }\n\n // make the entire tile clickable\n button::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 0;\n }\n"])),function(p){return p.theme.textColors.default;},spacingS,function(p){return p.theme.textColors.default;});var Inner$1$1=_styled.span.withConfig({displayName:"FileAttachmentList__Inner",componentId:"sc-lwztxx-6"})(templateObject_9$4$2||(templateObject_9$4$2=__makeTemplateObject$1(["\n display: inline-flex;\n\n ","\n"],["\n display: inline-flex;\n\n ","\n"])),function(p){return p.takeFullWidth?css$2(templateObject_7$5$2||(templateObject_7$5$2=__makeTemplateObject$1(["\n width: 100%;\n "],["\n width: 100%;\n "]))):css$2(templateObject_8$5$2||(templateObject_8$5$2=__makeTemplateObject$1(["\n width: calc(100% - 34px); // delete button size;\n "],["\n width: calc(100% - 34px); // delete button size;\n "])));});var FileNameContainer=_styled.span.withConfig({displayName:"FileAttachmentList__FileNameContainer",componentId:"sc-lwztxx-7"})(templateObject_10$2$2||(templateObject_10$2$2=__makeTemplateObject$1(["\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: ","px;\n"],["\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: ","px;\n"])),spacingS);var FileIcon$2=_styled(Icon).withConfig({displayName:"FileAttachmentList__FileIcon",componentId:"sc-lwztxx-8"})(templateObject_11$2$2||(templateObject_11$2$2=__makeTemplateObject$1(["\n margin-right: ","px;\n font-size: 18px;\n"],["\n margin-right: ","px;\n font-size: 18px;\n"])),spacingS);var DeleteButton=_styled(IconButton$1).withConfig({displayName:"FileAttachmentList__DeleteButton",componentId:"sc-lwztxx-9"})(templateObject_12$1$2||(templateObject_12$1$2=__makeTemplateObject$1(["\n margin: 0 auto;\n height: auto;\n width: auto;\n padding: 0 8px;\n\n && {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 18px;\n margin: 0;\n }\n"],["\n margin: 0 auto;\n height: auto;\n width: auto;\n padding: 0 8px;\n\n && {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 18px;\n margin: 0;\n }\n"])),function(p){return p.theme.textColors.default;});var FileName=_styled.span.withConfig({displayName:"FileAttachmentList__FileName",componentId:"sc-lwztxx-10"})(templateObject_13$7||(templateObject_13$7=__makeTemplateObject$1(["\n font-size: 14px;\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n"],["\n font-size: 14px;\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n"])));var AttachmentOverlay$1=_styled.div.withConfig({displayName:"FileAttachmentList__AttachmentOverlay",componentId:"sc-lwztxx-11"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject$1(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 100;\n\n display: flex;\n align-items: center;\n justify-content: center;\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 100;\n\n display: flex;\n align-items: center;\n justify-content: center;\n"])));var CenteredSpinner$1=_styled(Spinner).withConfig({displayName:"FileAttachmentList__CenteredSpinner",componentId:"sc-lwztxx-12"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject$1(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon$1=_styled(Icon).withConfig({displayName:"FileAttachmentList__WarningIcon",componentId:"sc-lwztxx-13"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject$1(["\n font-size: 20px;\n color: ",";\n"],["\n font-size: 20px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var templateObject_1$S$1,templateObject_2$B$1,templateObject_3$r$1,templateObject_4$h$1,templateObject_5$c$1,templateObject_6$9$2,templateObject_7$5$2,templateObject_8$5$2,templateObject_9$4$2,templateObject_10$2$2,templateObject_11$2$2,templateObject_12$1$2,templateObject_13$7,templateObject_14$6,templateObject_15$6,templateObject_16$6;var MobileFullHeightDialog=function MobileFullHeightDialog(_a){var _b;var children=_a.children,props=__rest$1(_a,["children"]);return jsxs(Fragment,{children:[jsx$1(Styles$2,{},void 0),jsx$1(Dialog,__assign$1({},props,{modalProps:__assign$1(__assign$1({},props.modalProps||{}),{className:classNames({'lt-reach-dialog-mobile-full-height':env.isAnyMobileApp},(_b=props.modalProps)===null||_b===void 0?void 0:_b.className)})},{children:children}),void 0)]},void 0);};var Styles$2=createGlobalStyle(templateObject_1$R$1||(templateObject_1$R$1=__makeTemplateObject$1(["\n /**\n Mobile overrides\n */\n .lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n height: calc(100vh - 32px);\n }\n }\n }\n\n .browser-name-ios-webview.lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n // 8 more pixels, because if you open the app from within another app (e.g. Testflight)\n // it has an additional \"backbar\" there which takes up space\n height: calc(100vh - 32px - env(safe-area-inset-top) - 8px);\n }\n }\n }\n"],["\n /**\n Mobile overrides\n */\n .lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n height: calc(100vh - 32px);\n }\n }\n }\n\n .browser-name-ios-webview.lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n // 8 more pixels, because if you open the app from within another app (e.g. Testflight)\n // it has an additional \"backbar\" there which takes up space\n height: calc(100vh - 32px - env(safe-area-inset-top) - 8px);\n }\n }\n }\n"])));var templateObject_1$R$1;var FabNavigationPosition;(function(FabNavigationPosition){FabNavigationPosition[FabNavigationPosition["Top"]=0]="Top";FabNavigationPosition[FabNavigationPosition["Bottom"]=1]="Bottom";})(FabNavigationPosition||(FabNavigationPosition={}));_styled.nav.withConfig({displayName:"FloatingActionButton__Navigation",componentId:"sc-1spkihm-0"})(templateObject_3$q$1||(templateObject_3$q$1=__makeTemplateObject$1(["\n position: fixed;\n margin: 0 10px;\n right: 20px;\n z-index: 11;\n\n ","\n"],["\n position: fixed;\n margin: 0 10px;\n right: 20px;\n z-index: 11;\n\n ","\n"])),function(p){return p.positionBottomOnMobile?css$2(templateObject_1$Q$1||(templateObject_1$Q$1=__makeTemplateObject$1(["\n bottom: 20px;\n @media (min-width: ","px) {\n bottom: unset;\n top: ","px;\n }\n "],["\n bottom: 20px;\n @media (min-width: ","px) {\n bottom: unset;\n top: ","px;\n }\n "])),minScreenSize.medium,p.offsetTop+20):css$2(templateObject_2$A$1||(templateObject_2$A$1=__makeTemplateObject$1(["\n top: ","px;\n "],["\n top: ","px;\n "])),p.offsetTop+20);});var FabButtonStyle=function FabButtonStyle(useSecondaryBgColor){return css$2(templateObject_6$8$2||(templateObject_6$8$2=__makeTemplateObject$1(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ","\n "],["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ","\n "])),useSecondaryBgColor?css$2(templateObject_4$g$1||(templateObject_4$g$1=__makeTemplateObject$1(["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.themeSecondary;},function(p){return p.theme.textColors.onSecondary;},function(p){return p.theme.palette.themeTertiary;}):css$2(templateObject_5$b$2||(templateObject_5$b$2=__makeTemplateObject$1(["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralTertiary;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralTertiaryAlt;}));};createGlobalStyle(templateObject_7$4$2||(templateObject_7$4$2=__makeTemplateObject$1(["\n ","\n"],["\n ","\n"])),function(p){return applyFocusStyle("\n [data-fab] button:focus::after,\n button[data-fab]:focus::after {\n outline-color: "+p.theme.palette.themePrimary+";\n outline-offset: 5px;\n border-radius: 50%;\n }\n ");});_styled(IconButton$1).withConfig({displayName:"FloatingActionButton__StyledFabIconButton",componentId:"sc-1spkihm-1"})(templateObject_8$4$2||(templateObject_8$4$2=__makeTemplateObject$1(["\n &&& {\n ","\n }\n"],["\n &&& {\n ","\n }\n"])),function(p){return FabButtonStyle(p.useSecondaryBgColor);});_styled(Tooltip).withConfig({displayName:"FloatingActionButton__StyledTooltip",componentId:"sc-1spkihm-2"})(templateObject_9$3$2||(templateObject_9$3$2=__makeTemplateObject$1(["\n a,\n a:visited {\n ","\n }\n"],["\n a,\n a:visited {\n ","\n }\n"])),function(p){return FabButtonStyle(p.useSecondaryBgColor);});_styled.div.withConfig({displayName:"FloatingActionButton__CalloutHost",componentId:"sc-1spkihm-3"})(templateObject_10$1$2||(templateObject_10$1$2=__makeTemplateObject$1(["\n display: flex;\n flex-direction: column;\n padding: ","px;\n"],["\n display: flex;\n flex-direction: column;\n padding: ","px;\n"])),spacingM);_styled(DefaultButton).withConfig({displayName:"FloatingActionButton__CalloutCloseButton",componentId:"sc-1spkihm-4"})(templateObject_11$1$2||(templateObject_11$1$2=__makeTemplateObject$1(["\n && {\n margin-left: auto;\n }\n"],["\n && {\n margin-left: auto;\n }\n"])));createGlobalStyle(templateObject_12$9||(templateObject_12$9=__makeTemplateObject$1(["\n .dialog-mobile-full-height {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-title {\n padding-bottom: 0;\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-mobile-full-height {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-title {\n padding-bottom: 0;\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var templateObject_1$Q$1,templateObject_2$A$1,templateObject_3$q$1,templateObject_4$g$1,templateObject_5$b$2,templateObject_6$8$2,templateObject_7$4$2,templateObject_8$4$2,templateObject_9$3$2,templateObject_10$1$2,templateObject_11$1$2,templateObject_12$9;var FormattedMessageWithStyle=function FormattedMessageWithStyle(_a){var _b=_a.tagName,tagName=_b===void 0?'div':_b,id=_a.id,values=_a.values,className=_a.className;return/*#__PURE__*/createElement$a(tagName,{className:className},jsx$1(FormattedMessage$1,{id:id,values:values},void 0));};_styled.div(templateObject_1$P$1||(templateObject_1$P$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n\n > *:first-child {\n margin-right: ","px;\n }\n\n i {\n font-size: 24px;\n }\n\n > span {\n font-size: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n\n > *:first-child {\n margin-right: ","px;\n }\n\n i {\n font-size: 24px;\n }\n\n > span {\n font-size: ","px;\n }\n"])),spacingXs,fontSizeSmall);var templateObject_1$P$1;var itemStatisticsCache={};var onStatisticsUpdated=new Subject();function repack(){queue$.next();}var queue$=new Subject();/**
|
|
77679
|
+
function createDownloadClickHandler(target,getUrl){var _this=this;return function(){return __awaiter$1(_this,void 0,void 0,function(){var url;return __generator$1(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getUrl()];case 1:url=_a.sent();window.open(url,env.deviceInfo.operatingSystem==='ios'?'_self':target);return [2/*return*/];}});});};}function getPublishableItemShortLivedToken(basePath,itemId){return api.custom(basePath+"/"+itemId+"/file_access_token/types/short_lived").get().then(function(r){return r.body().data();});}function exchangeShortLivedToken(fileAccessToken){return __awaiter$1(this,void 0,void 0,function(){var config,response;return __generator$1(this,function(_a){switch(_a.label){case 0:if(!fileAccessToken){return [2/*return*/,null];}config={method:'POST',headers:{authorization:'Bearer '+fileAccessToken,'subscription-id':subscriptionId}};return [4/*yield*/,fetchFromApi("/file_access_token/types/short_lived",config)];case 1:response=_a.sent();return [2/*return*/,response.status!==200?null:response.text()];}});});}},[subscriptionId,fetchFromApi,createApiUrl,api]);}var FileAttachmentList=function FileAttachmentList(_a){var files=_a.files,onDeleteClick=_a.onDeleteClick,getFileUrl=_a.getFileUrl,fileAccessToken=_a.fileAccessToken,disabled=_a.disabled,className=_a.className;if(!files||files.length===0){return null;}var audioFiles=files.filter(function(f){return getFileUrl&&isAudioFile(f.filename);});var videoFiles=files.filter(function(f){return getFileUrl&&isVideoFile(f.filename);});var otherFiles=files.filter(function(f){return !audioFiles.includes(f)&&!videoFiles.includes(f);});return jsxs(Fragment,{children:[videoFiles.length>0&&jsx$1(VideoFilesListHost,__assign$1({className:className,"data-preload-video":browserInfo.name==='safari'},{children:videoFiles.map(function(f){return jsx$1(VideoFileItem,{children:jsx$1(VideoFile,{fileName:f.filename,url:getFileUrl(f.id)},void 0)},f.id);})}),void 0),audioFiles.length>0&&jsx$1(FilesListHost,__assign$1({className:className},{children:audioFiles.map(function(f){return jsx$1(FileItem,{children:jsx$1(AudioFile,{fileName:f.filename,url:getFileUrl(f.id)},void 0)},f.id);})}),void 0),otherFiles.length>0&&jsx$1(FilesListHost,__assign$1({className:className},{children:otherFiles.map(function(f){return jsx$1(FileItem,{children:jsx$1(FileAttachmentPreview,{attachment:f,disabled:disabled,getFileUrl:getFileUrl,fileAccessToken:fileAccessToken,onDeleteClick:onDeleteClick},void 0)},f.id);})}),void 0)]},void 0);};var FilesListHost=_styled.ul.withConfig({displayName:"FileAttachmentList__FilesListHost",componentId:"sc-lwztxx-0"})(templateObject_1$S$1||(templateObject_1$S$1=__makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n\n audio {\n width: 100%;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n\n audio {\n width: 100%;\n }\n"])));var VideoFilesListHost=_styled.ul.withConfig({displayName:"FileAttachmentList__VideoFilesListHost",componentId:"sc-lwztxx-1"})(templateObject_2$B$1||(templateObject_2$B$1=__makeTemplateObject$1(["\n margin: 0;\n padding: 0;\n list-style: none;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"],["\n margin: 0;\n padding: 0;\n list-style: none;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"])),videoAttachmentRoundedCornerSize);var VideoFileItem=_styled.li.withConfig({displayName:"FileAttachmentList__VideoFileItem",componentId:"sc-lwztxx-2"})(templateObject_3$r$1||(templateObject_3$r$1=__makeTemplateObject$1(["\n &:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n &:not(:first-child) {\n margin-top: ","px;\n }\n"])),spacingS);var FileItem=_styled.li.withConfig({displayName:"FileAttachmentList__FileItem",componentId:"sc-lwztxx-3"})(templateObject_4$h$1||(templateObject_4$h$1=__makeTemplateObject$1(["\n width: 100%;\n &:not(:first-child) {\n margin-top: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n &:nth-child(2) {\n margin-top: 0;\n }\n }\n"],["\n width: 100%;\n &:not(:first-child) {\n margin-top: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n &:nth-child(2) {\n margin-top: 0;\n }\n }\n"])),spacingS,minScreenSize.small,spacingS-5);var FileAttachmentPreview=function FileAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,getFileUrl=_a.getFileUrl,fileAccessToken=_a.fileAccessToken,disabled=_a.disabled;var formatMessage=useIntl().formatMessage;var showDeleteButton=!disabled&&onDeleteClick;var _b=useFileAccessTokenApi(),exchangeShortLivedToken=_b.exchangeShortLivedToken,createDownloadClickHandler=_b.createDownloadClickHandler;return jsxs(Host$o$1,{children:[attachment.isUploadInProgress&&jsx$1(AttachmentOverlay$1,{children:jsx$1(CenteredSpinner$1,{size:SpinnerSize.medium},void 0)},void 0),jsx$1(Inner$1$1,__assign$1({takeFullWidth:!showDeleteButton},{children:renderInnerTileContent()}),void 0),showDeleteButton&&jsx$1(DeleteButton,{iconProps:{iconName:'Delete'},onClick:function(){return onDeleteClick(attachment);},disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)]},void 0);function renderInnerTileContent(){var _this=this;if(attachment.hasError){return jsxs(FileNameContainer,{children:[jsx$1(WarningIcon$1,{iconName:"Warning"},void 0),jsx$1(FileName,__assign$1({title:attachment.filename},{children:attachment.filename}),void 0)]},void 0);}var iconName=getFileIcon(attachment.filename);if(getFileUrl){return jsxs(DownloadButton$4,__assign$1({title:attachment.filename,onClick:createDownloadClickHandler('_blank',function(){return __awaiter$1(_this,void 0,void 0,function(){var token;return __generator$1(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(fileAccessToken)];case 1:token=_a.sent();return [2/*return*/,getFileUrl(attachment.id,token)];}});});})},{children:[jsx$1(FileIcon$2,{iconName:iconName},void 0),jsx$1(FileName,{children:attachment.filename},void 0)]}),void 0);}return jsxs(FileNameContainer,{children:[jsx$1(FileIcon$2,{iconName:iconName},void 0),jsx$1(FileName,__assign$1({title:attachment.filename},{children:attachment.filename}),void 0)]},void 0);}};var Host$o$1=_styled.div.withConfig({displayName:"FileAttachmentList__Host",componentId:"sc-lwztxx-4"})(templateObject_5$c$2||(templateObject_5$c$2=__makeTemplateObject$1(["\n position: relative;\n display: flex;\n border: 1px solid #95989a;\n border-radius: 2px;\n background-color: ",";\n"],["\n position: relative;\n display: flex;\n border: 1px solid #95989a;\n border-radius: 2px;\n background-color: ",";\n"])),function(p){return p.theme.palette.white;});var DownloadButton$4=_styled(DefaultButton).withConfig({displayName:"FileAttachmentList__DownloadButton",componentId:"sc-lwztxx-5"})(templateObject_6$9$2||(templateObject_6$9$2=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n width: 100%;\n color: ",";\n box-sizing: border-box;\n padding: ","px;\n border: 0;\n height: auto;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n & > span {\n max-width: 100%;\n }\n\n // make the entire tile clickable\n button::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 0;\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n color: ",";\n box-sizing: border-box;\n padding: ","px;\n border: 0;\n height: auto;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n & > span {\n max-width: 100%;\n }\n\n // make the entire tile clickable\n button::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 0;\n }\n"])),function(p){return p.theme.textColors.default;},spacingS,function(p){return p.theme.textColors.default;});var Inner$1$1=_styled.span.withConfig({displayName:"FileAttachmentList__Inner",componentId:"sc-lwztxx-6"})(templateObject_9$4$2||(templateObject_9$4$2=__makeTemplateObject$1(["\n display: inline-flex;\n\n ","\n"],["\n display: inline-flex;\n\n ","\n"])),function(p){return p.takeFullWidth?css$2(templateObject_7$5$2||(templateObject_7$5$2=__makeTemplateObject$1(["\n width: 100%;\n "],["\n width: 100%;\n "]))):css$2(templateObject_8$5$2||(templateObject_8$5$2=__makeTemplateObject$1(["\n width: calc(100% - 34px); // delete button size;\n "],["\n width: calc(100% - 34px); // delete button size;\n "])));});var FileNameContainer=_styled.span.withConfig({displayName:"FileAttachmentList__FileNameContainer",componentId:"sc-lwztxx-7"})(templateObject_10$2$2||(templateObject_10$2$2=__makeTemplateObject$1(["\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: ","px;\n"],["\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: ","px;\n"])),spacingS);var FileIcon$2=_styled(Icon).withConfig({displayName:"FileAttachmentList__FileIcon",componentId:"sc-lwztxx-8"})(templateObject_11$2$2||(templateObject_11$2$2=__makeTemplateObject$1(["\n margin-right: ","px;\n font-size: 18px;\n"],["\n margin-right: ","px;\n font-size: 18px;\n"])),spacingS);var DeleteButton=_styled(IconButton$1).withConfig({displayName:"FileAttachmentList__DeleteButton",componentId:"sc-lwztxx-9"})(templateObject_12$1$2||(templateObject_12$1$2=__makeTemplateObject$1(["\n margin: 0 auto;\n height: auto;\n width: auto;\n padding: 0 8px;\n\n && {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 18px;\n margin: 0;\n }\n"],["\n margin: 0 auto;\n height: auto;\n width: auto;\n padding: 0 8px;\n\n && {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 18px;\n margin: 0;\n }\n"])),function(p){return p.theme.textColors.default;});var FileName=_styled.span.withConfig({displayName:"FileAttachmentList__FileName",componentId:"sc-lwztxx-10"})(templateObject_13$7||(templateObject_13$7=__makeTemplateObject$1(["\n font-size: 14px;\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n"],["\n font-size: 14px;\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n"])));var AttachmentOverlay$1=_styled.div.withConfig({displayName:"FileAttachmentList__AttachmentOverlay",componentId:"sc-lwztxx-11"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject$1(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 100;\n\n display: flex;\n align-items: center;\n justify-content: center;\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 100;\n\n display: flex;\n align-items: center;\n justify-content: center;\n"])));var CenteredSpinner$1=_styled(Spinner).withConfig({displayName:"FileAttachmentList__CenteredSpinner",componentId:"sc-lwztxx-12"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject$1(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon$1=_styled(Icon).withConfig({displayName:"FileAttachmentList__WarningIcon",componentId:"sc-lwztxx-13"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject$1(["\n font-size: 20px;\n color: ",";\n"],["\n font-size: 20px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var templateObject_1$S$1,templateObject_2$B$1,templateObject_3$r$1,templateObject_4$h$1,templateObject_5$c$2,templateObject_6$9$2,templateObject_7$5$2,templateObject_8$5$2,templateObject_9$4$2,templateObject_10$2$2,templateObject_11$2$2,templateObject_12$1$2,templateObject_13$7,templateObject_14$6,templateObject_15$6,templateObject_16$6;var MobileFullHeightDialog=function MobileFullHeightDialog(_a){var _b;var children=_a.children,props=__rest$1(_a,["children"]);return jsxs(Fragment,{children:[jsx$1(Styles$2,{},void 0),jsx$1(Dialog,__assign$1({},props,{modalProps:__assign$1(__assign$1({},props.modalProps||{}),{className:classNames({'lt-reach-dialog-mobile-full-height':env.isAnyMobileApp},(_b=props.modalProps)===null||_b===void 0?void 0:_b.className)})},{children:children}),void 0)]},void 0);};var Styles$2=createGlobalStyle(templateObject_1$R$1||(templateObject_1$R$1=__makeTemplateObject$1(["\n /**\n Mobile overrides\n */\n .lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n height: calc(100vh - 32px);\n }\n }\n }\n\n .browser-name-ios-webview.lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n // 8 more pixels, because if you open the app from within another app (e.g. Testflight)\n // it has an additional \"backbar\" there which takes up space\n height: calc(100vh - 32px - env(safe-area-inset-top) - 8px);\n }\n }\n }\n"],["\n /**\n Mobile overrides\n */\n .lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n height: calc(100vh - 32px);\n }\n }\n }\n\n .browser-name-ios-webview.lt-reach-dialog-mobile-full-height {\n .ms-Dialog-main {\n .ms-Modal-scrollableContent {\n // 8 more pixels, because if you open the app from within another app (e.g. Testflight)\n // it has an additional \"backbar\" there which takes up space\n height: calc(100vh - 32px - env(safe-area-inset-top) - 8px);\n }\n }\n }\n"])));var templateObject_1$R$1;var FabNavigationPosition;(function(FabNavigationPosition){FabNavigationPosition[FabNavigationPosition["Top"]=0]="Top";FabNavigationPosition[FabNavigationPosition["Bottom"]=1]="Bottom";})(FabNavigationPosition||(FabNavigationPosition={}));_styled.nav.withConfig({displayName:"FloatingActionButton__Navigation",componentId:"sc-1spkihm-0"})(templateObject_3$q$1||(templateObject_3$q$1=__makeTemplateObject$1(["\n position: fixed;\n margin: 0 10px;\n right: 20px;\n z-index: 11;\n\n ","\n"],["\n position: fixed;\n margin: 0 10px;\n right: 20px;\n z-index: 11;\n\n ","\n"])),function(p){return p.positionBottomOnMobile?css$2(templateObject_1$Q$1||(templateObject_1$Q$1=__makeTemplateObject$1(["\n bottom: 20px;\n @media (min-width: ","px) {\n bottom: unset;\n top: ","px;\n }\n "],["\n bottom: 20px;\n @media (min-width: ","px) {\n bottom: unset;\n top: ","px;\n }\n "])),minScreenSize.medium,p.offsetTop+20):css$2(templateObject_2$A$1||(templateObject_2$A$1=__makeTemplateObject$1(["\n top: ","px;\n "],["\n top: ","px;\n "])),p.offsetTop+20);});var FabButtonStyle=function FabButtonStyle(useSecondaryBgColor){return css$2(templateObject_6$8$2||(templateObject_6$8$2=__makeTemplateObject$1(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ","\n "],["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ","\n "])),useSecondaryBgColor?css$2(templateObject_4$g$1||(templateObject_4$g$1=__makeTemplateObject$1(["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.themeSecondary;},function(p){return p.theme.textColors.onSecondary;},function(p){return p.theme.palette.themeTertiary;}):css$2(templateObject_5$b$2||(templateObject_5$b$2=__makeTemplateObject$1(["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralTertiary;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralTertiaryAlt;}));};createGlobalStyle(templateObject_7$4$2||(templateObject_7$4$2=__makeTemplateObject$1(["\n ","\n"],["\n ","\n"])),function(p){return applyFocusStyle("\n [data-fab] button:focus::after,\n button[data-fab]:focus::after {\n outline-color: "+p.theme.palette.themePrimary+";\n outline-offset: 5px;\n border-radius: 50%;\n }\n ");});_styled(IconButton$1).withConfig({displayName:"FloatingActionButton__StyledFabIconButton",componentId:"sc-1spkihm-1"})(templateObject_8$4$2||(templateObject_8$4$2=__makeTemplateObject$1(["\n &&& {\n ","\n }\n"],["\n &&& {\n ","\n }\n"])),function(p){return FabButtonStyle(p.useSecondaryBgColor);});_styled(Tooltip).withConfig({displayName:"FloatingActionButton__StyledTooltip",componentId:"sc-1spkihm-2"})(templateObject_9$3$2||(templateObject_9$3$2=__makeTemplateObject$1(["\n a,\n a:visited {\n ","\n }\n"],["\n a,\n a:visited {\n ","\n }\n"])),function(p){return FabButtonStyle(p.useSecondaryBgColor);});_styled.div.withConfig({displayName:"FloatingActionButton__CalloutHost",componentId:"sc-1spkihm-3"})(templateObject_10$1$2||(templateObject_10$1$2=__makeTemplateObject$1(["\n display: flex;\n flex-direction: column;\n padding: ","px;\n"],["\n display: flex;\n flex-direction: column;\n padding: ","px;\n"])),spacingM);_styled(DefaultButton).withConfig({displayName:"FloatingActionButton__CalloutCloseButton",componentId:"sc-1spkihm-4"})(templateObject_11$1$2||(templateObject_11$1$2=__makeTemplateObject$1(["\n && {\n margin-left: auto;\n }\n"],["\n && {\n margin-left: auto;\n }\n"])));createGlobalStyle(templateObject_12$9||(templateObject_12$9=__makeTemplateObject$1(["\n .dialog-mobile-full-height {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-title {\n padding-bottom: 0;\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-mobile-full-height {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-title {\n padding-bottom: 0;\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var templateObject_1$Q$1,templateObject_2$A$1,templateObject_3$q$1,templateObject_4$g$1,templateObject_5$b$2,templateObject_6$8$2,templateObject_7$4$2,templateObject_8$4$2,templateObject_9$3$2,templateObject_10$1$2,templateObject_11$1$2,templateObject_12$9;var FormattedMessageWithStyle=function FormattedMessageWithStyle(_a){var _b=_a.tagName,tagName=_b===void 0?'div':_b,id=_a.id,values=_a.values,className=_a.className;return/*#__PURE__*/createElement$a(tagName,{className:className},jsx$1(FormattedMessage$1,{id:id,values:values},void 0));};_styled.div(templateObject_1$P$1||(templateObject_1$P$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n\n > *:first-child {\n margin-right: ","px;\n }\n\n i {\n font-size: 24px;\n }\n\n > span {\n font-size: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n\n > *:first-child {\n margin-right: ","px;\n }\n\n i {\n font-size: 24px;\n }\n\n > span {\n font-size: ","px;\n }\n"])),spacingXs,fontSizeSmall);var templateObject_1$P$1;var itemStatisticsCache={};var onStatisticsUpdated=new Subject();function repack(){queue$.next();}var queue$=new Subject();/**
|
|
77680
77680
|
* Repacks the grid layout when a given dependency changes
|
|
77681
77681
|
* It does not repack the grid on the very first run
|
|
77682
77682
|
* @param deps
|
|
@@ -77687,7 +77687,7 @@ function createDownloadClickHandler(target,getUrl){var _this=this;return functio
|
|
|
77687
77687
|
// (mobile app even has to be restarted) and one image just freezes and
|
|
77688
77688
|
// on the console we have errors like this: Uncaught TypeError: Cannot read property 'mouseUsed' of null
|
|
77689
77689
|
var gallery;clearTimeout(initializeGalleryHandle.current);initializeGalleryHandle.current=setTimeout(function(){return gallery=initializeGallery();},200);return function(){return gallery===null||gallery===void 0?void 0:gallery.close();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77690
|
-
},[hidden,selectedIndex]);return jsxs(Fragment,{children:[jsx$1(GeneralFixes,{enforceArrowVisibility:!env.isNativeMobileApp},void 0),jsxs("div",__assign$1({ref:host,className:"pswp",tabIndex:-1,role:"dialog","aria-hidden":"true"},{children:[jsx$1("div",{className:"pswp__bg"},void 0),jsxs("div",__assign$1({className:"pswp__scroll-wrap"},{children:[jsxs("div",__assign$1({className:"pswp__container"},{children:[jsx$1("div",{className:"pswp__item"},void 0),jsx$1("div",{className:"pswp__item"},void 0),jsx$1("div",{className:"pswp__item"},void 0)]}),void 0),jsxs("div",__assign$1({className:"pswp__ui pswp__ui--hidden"},{children:[jsxs("div",__assign$1({className:"pswp__top-bar"},{children:[jsx$1("div",{className:"pswp__counter"},void 0),jsx$1("button",{className:"pswp__button pswp__button--close",title:formatMessage({id:'ImageViewer.closeCaption'})},void 0),jsx$1("button",{className:"pswp__button pswp__button--fs",title:formatMessage({id:'ImageViewer.toggleFullscreenCaption'})},void 0),jsx$1("div",__assign$1({className:"pswp__preloader"},{children:jsx$1("div",__assign$1({className:"pswp__preloader__icn"},{children:jsx$1("div",__assign$1({className:"pswp__preloader__cut"},{children:jsx$1("div",{className:"pswp__preloader__donut"},void 0)}),void 0)}),void 0)}),void 0)]}),void 0),jsx$1("div",__assign$1({className:"pswp__share-modal pswp__share-modal--hidden pswp__single-tap"},{children:jsx$1("div",{className:"pswp__share-tooltip"},void 0)}),void 0),jsx$1("button",{className:"pswp__button pswp__button--arrow--left",title:formatMessage({id:'ImageView.previousCaption'})},void 0),jsx$1("button",{className:"pswp__button pswp__button--arrow--right",title:formatMessage({id:'ImageView.nextCaption'})},void 0),jsx$1("div",__assign$1({className:"pswp__caption"},{children:jsx$1("div",{className:"pswp__caption__center"},void 0)}),void 0)]}),void 0)]}),void 0)]}),void 0)]},void 0);function initializeGallery(){var gallery=new PhotoSwipe(host.current,PhotoSwipeUiDefault,images.map(function(i){return {src:i.large,msrc:i.thumbnail,w:i.width,h:i.height,title:i.caption};}),{index:selectedIndex});gallery.listen('close',onClose);gallery.init();return gallery;}};var GeneralFixes=createGlobalStyle(templateObject_2$y$1||(templateObject_2$y$1=__makeTemplateObject$1(["\n.browser-name-ios-webview {\n .pswp__top-bar {\n padding-top: calc(env(safe-area-inset-top));\n height: calc(initial + env(safe-area-inset-top));\n\n .pswp__counter {\n padding-top: env(safe-area-inset-top);\n }\n }\n}\n\n.pswp__caption__center {\n && {\n text-align: center;\n }\n}\n\n","\n"],["\n.browser-name-ios-webview {\n .pswp__top-bar {\n padding-top: calc(env(safe-area-inset-top));\n height: calc(initial + env(safe-area-inset-top));\n\n .pswp__counter {\n padding-top: env(safe-area-inset-top);\n }\n }\n}\n\n.pswp__caption__center {\n && {\n text-align: center;\n }\n}\n\n","\n"])),function(p){return p.enforceArrowVisibility&&css$2(templateObject_1$M$1||(templateObject_1$M$1=__makeTemplateObject$1(["\n .pswp--touch .pswp__button--arrow--left,\n .pswp--touch .pswp__button--arrow--right {\n visibility: visible !important;\n }\n "],["\n .pswp--touch .pswp__button--arrow--left,\n .pswp--touch .pswp__button--arrow--right {\n visibility: visible !important;\n }\n "])));});var templateObject_1$M$1,templateObject_2$y$1;var PhotoGrid=function PhotoGrid(_a){var images=_a.images,imageUrlResolver=_a.imageUrlResolver,disableRoundedCorners=_a.disableRoundedCorners,gridBackgroundColor=_a.gridBackgroundColor,className=_a.className;var formatMessage=useIntl().formatMessage;var _b=useState$2(null),fullScreenItemIndex=_b[0],setFullScreenItemIndex=_b[1];var palette=useContext(ThemeContext$1).theme.palette;if(!images||images.length===0){return null;}var showMoreImagesIndicator=images.length>4;var hasMultiImages=images.length>1;var firstImage=images[0];return jsxs(Host$l$1,__assign$1({"data-multi-images":hasMultiImages,className:className,singleImageHeight:firstImage.height,singleImageWidth:firstImage.width},{children:[jsx$1("div",__assign$1({"data-gallery-wrapper":true},{children:hasMultiImages?jsxs(Fragment,{children:[jsx$1(Gallery,__assign$1({backgroundColor:gridBackgroundColor!==null&&gridBackgroundColor!==void 0?gridBackgroundColor:palette.neutralLight,applyRoundedCorners:!disableRoundedCorners},{children:images.slice(0,4).map(function(image,index){return jsx$1(ImageItem,__assign$1({href:image.previewUrl,onClick:function(e){e.stopPropagation();e.preventDefault();handleOpenFullScreen(index);},"aria-label":formatMessage({id:'AriaLabel.viewImageGallery'}),"data-clickable-overlay":true},{children:jsx$1(StyledImage$1,{src:image.previewUrl,imageFit:ImageFit.centerCover,alt:image.imageTitle||''},void 0)}),index);})}),void 0),showMoreImagesIndicator&&jsxs(MoreIndicator,__assign$1({onClick:function(){return handleOpenFullScreen(4);}},{children:["+",images.length-4]}),void 0)]},void 0):jsx$1(SingleImagePreview,{image:firstImage,onClick:function(){return handleOpenFullScreen(0);},disableRoundedCorners:disableRoundedCorners},void 0)}),void 0),jsx$1(FullScreenImageViewer,{images:images,selectedIndex:fullScreenItemIndex,hidden:fullScreenItemIndex==null,onClose:handleCloseFullScreen,imageUrlResolver:imageUrlResolver},void 0)]}),void 0);function handleOpenFullScreen(index){setFullScreenItemIndex(index);}function handleCloseFullScreen(){setFullScreenItemIndex(null);}};var SingleImagePreview=function SingleImagePreview(_a){var image=_a.image,onClick=_a.onClick,disableRoundedCorners=_a.disableRoundedCorners;var formatMessage=useIntl().formatMessage;return jsx$1(SingleImageHost,__assign$1({href:image.previewUrl,onClick:function(e){e.stopPropagation();e.preventDefault();onClick();},applyRoundedCorners:!disableRoundedCorners,"aria-label":formatMessage({id:'AriaLabel.viewImage'}),"data-clickable-overlay":true},{children:jsx$1("img",{src:image.previewUrl,alt:""},void 0)}),void 0);};var Host$l$1=_styled.div.withConfig({displayName:"PhotoGrid__Host",componentId:"sc-flk193-0"})(templateObject_2$x$1||(templateObject_2$x$1=__makeTemplateObject$1(["\n overflow: hidden;\n width: 100%;\n\n position: relative;\n\n &:after {\n content: '';\n display: block;\n font-size: 0;\n }\n\n > [data-gallery-wrapper] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-multi-images='false'] {\n [data-gallery-wrapper] {\n display: flex;\n }\n\n ","\n }\n\n &[data-multi-images='true'] {\n &:after {\n padding-bottom: calc(2 / 3 * 100%); // fixed image area aspect ratio 3:2\n }\n }\n"],["\n overflow: hidden;\n width: 100%;\n\n position: relative;\n\n &:after {\n content: '';\n display: block;\n font-size: 0;\n }\n\n > [data-gallery-wrapper] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-multi-images='false'] {\n [data-gallery-wrapper] {\n display: flex;\n }\n\n ","\n }\n\n &[data-multi-images='true'] {\n &:after {\n padding-bottom: calc(2 / 3 * 100%); // fixed image area aspect ratio 3:2\n }\n }\n"])),function(p){return p.singleImageWidth&&p.singleImageHeight&&css$2(templateObject_1$L$1||(templateObject_1$L$1=__makeTemplateObject$1(["\n &:after {\n // fallback for old browsers - that do not suport min function\n // the image aspect ratio is maintained\n padding-bottom: calc(\n ","* 100%\n );\n\n // the image can have any aspect ratio from a 1:1 aspect ratio to any wider aspect ratio,\n // but it cannot get \"taller\" than 1:1\n @supports (padding-bottom: min(100%, ","px)) {\n padding-bottom: min(\n min(100%, ","px, ","px),\n calc(\n ","*\n min(100%, ","px)\n )\n );\n }\n }\n "],["\n &:after {\n // fallback for old browsers - that do not suport min function\n // the image aspect ratio is maintained\n padding-bottom: calc(\n ","* 100%\n );\n\n // the image can have any aspect ratio from a 1:1 aspect ratio to any wider aspect ratio,\n // but it cannot get \"taller\" than 1:1\n @supports (padding-bottom: min(100%, ","px)) {\n padding-bottom: min(\n min(100%, ","px, ","px),\n calc(\n ","*\n min(100%, ","px)\n )\n );\n }\n }\n "])),p.singleImageHeight/p.singleImageWidth,p.singleImageWidth,p.singleImageHeight,p.singleImageWidth,p.singleImageHeight/p.singleImageWidth,p.singleImageWidth);});var SingleImageHost=_styled.a.withConfig({displayName:"PhotoGrid__SingleImageHost",componentId:"sc-flk193-1"})(templateObject_4$f$1||(templateObject_4$f$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: auto;\n\n max-height: 100%;\n\n overflow: hidden;\n\n // fallback for old browsers\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n width: auto;\n }\n\n img {\n max-width: 100%;\n height: 100%;\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n height: auto;\n width: auto;\n }\n }\n\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: auto;\n\n max-height: 100%;\n\n overflow: hidden;\n\n // fallback for old browsers\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n width: auto;\n }\n\n img {\n max-width: 100%;\n height: 100%;\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n height: auto;\n width: auto;\n }\n }\n\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n\n ","\n"])),function(p){return p.applyRoundedCorners&&css$2(templateObject_3$o$1||(templateObject_3$o$1=__makeTemplateObject$1(["\n border-radius: 10px;\n "],["\n border-radius: 10px;\n "])));});var Gallery=_styled.div.withConfig({displayName:"PhotoGrid__Gallery",componentId:"sc-flk193-2"})(templateObject_6$7$2||(templateObject_6$7$2=__makeTemplateObject$1(["\n width: 100%;\n height: 100%;\n overflow: hidden;\n\n background-color: ",";\n\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: repeat(2, 1fr);\n\n // case: gallery with 3 images\n // the first image will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(3) {\n grid-row: auto / span 2;\n }\n\n // case: gallery with 2 images\n // the images will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(2),\n > a:nth-child(2):last-child {\n grid-row: auto / span 2;\n }\n\n ","\n"],["\n width: 100%;\n height: 100%;\n overflow: hidden;\n\n background-color: ",";\n\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: repeat(2, 1fr);\n\n // case: gallery with 3 images\n // the first image will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(3) {\n grid-row: auto / span 2;\n }\n\n // case: gallery with 2 images\n // the images will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(2),\n > a:nth-child(2):last-child {\n grid-row: auto / span 2;\n }\n\n ","\n"])),function(p){return p.backgroundColor;},function(p){return p.applyRoundedCorners&&css$2(templateObject_5$a$2||(templateObject_5$a$2=__makeTemplateObject$1(["\n border-radius: 10px;\n "],["\n border-radius: 10px;\n "])));});var ImageItem=_styled.a.withConfig({displayName:"PhotoGrid__ImageItem",componentId:"sc-flk193-3"})(templateObject_7$3$2||(templateObject_7$3$2=__makeTemplateObject$1(["\n display: block;\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n"],["\n display: block;\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n"])));var StyledImage$1=_styled(Image$1).withConfig({displayName:"PhotoGrid__StyledImage",componentId:"sc-flk193-4"})(templateObject_8$3$2||(templateObject_8$3$2=__makeTemplateObject$1(["\n height: 100%;\n"],["\n height: 100%;\n"])));var MoreIndicator=_styled(DefaultButton).withConfig({displayName:"PhotoGrid__MoreIndicator",componentId:"sc-flk193-5"})(templateObject_9$2$2||(templateObject_9$2$2=__makeTemplateObject$1(["\n && {\n margin: 0;\n padding: 0;\n border: 0;\n width: auto;\n height: auto;\n color: white;\n background: transparent;\n\n &:hover {\n background: transparent;\n }\n }\n\n position: absolute;\n bottom: 15px;\n right: 15px;\n\n font-size: ","px;\n @media (min-width: ","px) {\n font-size: ","px;\n }\n\n @supports (filter: drop-shadow(0 1px 2px #000000cc)) {\n filter: drop-shadow(0 1px 2px #000000cc);\n }\n\n @supports not (filter: drop-shadow(0 1px 2px #000000cc)) {\n text-shadow: 0 1px 2px #000000cc;\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n border: 0;\n width: auto;\n height: auto;\n color: white;\n background: transparent;\n\n &:hover {\n background: transparent;\n }\n }\n\n position: absolute;\n bottom: 15px;\n right: 15px;\n\n font-size: ","px;\n @media (min-width: ","px) {\n font-size: ","px;\n }\n\n @supports (filter: drop-shadow(0 1px 2px #000000cc)) {\n filter: drop-shadow(0 1px 2px #000000cc);\n }\n\n @supports not (filter: drop-shadow(0 1px 2px #000000cc)) {\n text-shadow: 0 1px 2px #000000cc;\n }\n"])),fontSizeMedium,minScreenSize.small,fontSizeLarge+3);var templateObject_1$L$1,templateObject_2$x$1,templateObject_3$o$1,templateObject_4$f$1,templateObject_5$a$2,templateObject_6$7$2,templateObject_7$3$2,templateObject_8$3$2,templateObject_9$2$2;function showPhoto(url,title){{return;}}var IconHeaderButton=function IconHeaderButton(_a){var icon=_a.icon,isActive=_a.isActive,disabled=_a.disabled,tooltipResourceKey=_a.tooltipResourceKey,onClick=_a.onClick,link=_a.link,className=_a.className,rest=__rest$1(_a,["icon","isActive","disabled","tooltipResourceKey","onClick","link","className"]);var formatMessage=useIntl().formatMessage;if(!link&&!onClick){return null;}var allClassNames=classNames('header-button',className);var IconElement=!link?jsx$1(Button$1,__assign$1({className:allClassNames,disabled:disabled,onClick:function(e){return onClick(e.currentTarget);},iconProps:{iconName:icon},ariaLabel:formatMessage({id:tooltipResourceKey}),"data-button-type":"header-btn",isActive:isActive},rest),void 0):jsx$1(StyledLink$2,__assign$1({className:allClassNames,to:link},rest,{children:jsx$1(Icon,{iconName:icon},void 0)}),void 0);return jsx$1(Host$k$1,__assign$1({className:"tooltip-container"},{children:jsx$1(Tooltip,__assign$1({resourceKey:tooltipResourceKey},{children:IconElement}),void 0)}),void 0);};var Host$k$1=_styled.div.withConfig({displayName:"IconHeaderButton__Host",componentId:"sc-1p61ffo-0"})(templateObject_1$K$1||(templateObject_1$K$1=__makeTemplateObject$1(["\n height: 100%;\n"],["\n height: 100%;\n"])));var Button$1=_styled(IconButton$1).withConfig({displayName:"IconHeaderButton__Button",componentId:"sc-1p61ffo-1"})(templateObject_4$e$2||(templateObject_4$e$2=__makeTemplateObject$1(["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ",";\n ","\n }\n"],["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ",";\n ","\n }\n"])),function(p){return !p.isActive&&css$2(templateObject_2$w$1||(templateObject_2$w$1=__makeTemplateObject$1(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.textColors.onPrimary);},function(p){return p.isActive&&css$2(templateObject_3$n$1||(templateObject_3$n$1=__makeTemplateObject$1(["\n background-color: ",";\n color: ",";\n\n &&:hover {\n background-color: ",";\n color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &&:hover {\n background-color: ",";\n color: ",";\n }\n "])),p.theme.palette.themeSecondary,p.theme.textColors.onSecondary,p.theme.palette.themeSecondary,p.theme.textColors.onSecondary);});var StyledLink$2=_styled(Link$4).withConfig({displayName:"IconHeaderButton__StyledLink",componentId:"sc-1p61ffo-2"})(templateObject_6$6$2||(templateObject_6$6$2=__makeTemplateObject$1(["\n && {\n height: 100%;\n ",";\n }\n"],["\n && {\n height: 100%;\n ",";\n }\n"])),function(p){return css$2(templateObject_5$9$2||(templateObject_5$9$2=__makeTemplateObject$1(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.textColors.onPrimary);});var templateObject_1$K$1,templateObject_2$w$1,templateObject_3$n$1,templateObject_4$e$2,templateObject_5$9$2,templateObject_6$6$2;// a string of all valid unicode whitespaces
|
|
77690
|
+
},[hidden,selectedIndex]);return jsxs(Fragment,{children:[jsx$1(GeneralFixes,{enforceArrowVisibility:!env.isNativeMobileApp},void 0),jsxs("div",__assign$1({ref:host,className:"pswp",tabIndex:-1,role:"dialog","aria-hidden":"true"},{children:[jsx$1("div",{className:"pswp__bg"},void 0),jsxs("div",__assign$1({className:"pswp__scroll-wrap"},{children:[jsxs("div",__assign$1({className:"pswp__container"},{children:[jsx$1("div",{className:"pswp__item"},void 0),jsx$1("div",{className:"pswp__item"},void 0),jsx$1("div",{className:"pswp__item"},void 0)]}),void 0),jsxs("div",__assign$1({className:"pswp__ui pswp__ui--hidden"},{children:[jsxs("div",__assign$1({className:"pswp__top-bar"},{children:[jsx$1("div",{className:"pswp__counter"},void 0),jsx$1("button",{className:"pswp__button pswp__button--close",title:formatMessage({id:'ImageViewer.closeCaption'})},void 0),jsx$1("button",{className:"pswp__button pswp__button--fs",title:formatMessage({id:'ImageViewer.toggleFullscreenCaption'})},void 0),jsx$1("div",__assign$1({className:"pswp__preloader"},{children:jsx$1("div",__assign$1({className:"pswp__preloader__icn"},{children:jsx$1("div",__assign$1({className:"pswp__preloader__cut"},{children:jsx$1("div",{className:"pswp__preloader__donut"},void 0)}),void 0)}),void 0)}),void 0)]}),void 0),jsx$1("div",__assign$1({className:"pswp__share-modal pswp__share-modal--hidden pswp__single-tap"},{children:jsx$1("div",{className:"pswp__share-tooltip"},void 0)}),void 0),jsx$1("button",{className:"pswp__button pswp__button--arrow--left",title:formatMessage({id:'ImageView.previousCaption'})},void 0),jsx$1("button",{className:"pswp__button pswp__button--arrow--right",title:formatMessage({id:'ImageView.nextCaption'})},void 0),jsx$1("div",__assign$1({className:"pswp__caption"},{children:jsx$1("div",{className:"pswp__caption__center"},void 0)}),void 0)]}),void 0)]}),void 0)]}),void 0)]},void 0);function initializeGallery(){var gallery=new PhotoSwipe(host.current,PhotoSwipeUiDefault,images.map(function(i){return {src:i.large,msrc:i.thumbnail,w:i.width,h:i.height,title:i.caption};}),{index:selectedIndex});gallery.listen('close',onClose);gallery.init();return gallery;}};var GeneralFixes=createGlobalStyle(templateObject_2$y$1||(templateObject_2$y$1=__makeTemplateObject$1(["\n.browser-name-ios-webview {\n .pswp__top-bar {\n padding-top: calc(env(safe-area-inset-top));\n height: calc(initial + env(safe-area-inset-top));\n\n .pswp__counter {\n padding-top: env(safe-area-inset-top);\n }\n }\n}\n\n.pswp__caption__center {\n && {\n text-align: center;\n }\n}\n\n","\n"],["\n.browser-name-ios-webview {\n .pswp__top-bar {\n padding-top: calc(env(safe-area-inset-top));\n height: calc(initial + env(safe-area-inset-top));\n\n .pswp__counter {\n padding-top: env(safe-area-inset-top);\n }\n }\n}\n\n.pswp__caption__center {\n && {\n text-align: center;\n }\n}\n\n","\n"])),function(p){return p.enforceArrowVisibility&&css$2(templateObject_1$M$1||(templateObject_1$M$1=__makeTemplateObject$1(["\n .pswp--touch .pswp__button--arrow--left,\n .pswp--touch .pswp__button--arrow--right {\n visibility: visible !important;\n }\n "],["\n .pswp--touch .pswp__button--arrow--left,\n .pswp--touch .pswp__button--arrow--right {\n visibility: visible !important;\n }\n "])));});var templateObject_1$M$1,templateObject_2$y$1;var PhotoGrid=function PhotoGrid(_a){var images=_a.images,imageUrlResolver=_a.imageUrlResolver,disableRoundedCorners=_a.disableRoundedCorners,gridBackgroundColor=_a.gridBackgroundColor,className=_a.className;var formatMessage=useIntl().formatMessage;var _b=useState$2(null),fullScreenItemIndex=_b[0],setFullScreenItemIndex=_b[1];var palette=useContext(ThemeContext$1).theme.palette;if(!images||images.length===0){return null;}var showMoreImagesIndicator=images.length>4;var hasMultiImages=images.length>1;var firstImage=images[0];return jsxs(Host$l$1,__assign$1({"data-multi-images":hasMultiImages,className:className,singleImageHeight:firstImage.height,singleImageWidth:firstImage.width},{children:[jsx$1("div",__assign$1({"data-gallery-wrapper":true},{children:hasMultiImages?jsxs(Fragment,{children:[jsx$1(Gallery,__assign$1({backgroundColor:gridBackgroundColor!==null&&gridBackgroundColor!==void 0?gridBackgroundColor:palette.neutralLight,applyRoundedCorners:!disableRoundedCorners},{children:images.slice(0,4).map(function(image,index){return jsx$1(ImageItem,__assign$1({href:image.previewUrl,onClick:function(e){e.stopPropagation();e.preventDefault();handleOpenFullScreen(index);},"aria-label":formatMessage({id:'AriaLabel.viewImageGallery'}),"data-clickable-overlay":true},{children:jsx$1(StyledImage$1,{src:image.previewUrl,imageFit:ImageFit.centerCover,alt:image.imageTitle||''},void 0)}),index);})}),void 0),showMoreImagesIndicator&&jsxs(MoreIndicator,__assign$1({onClick:function(){return handleOpenFullScreen(4);}},{children:["+",images.length-4]}),void 0)]},void 0):jsx$1(SingleImagePreview,{image:firstImage,onClick:function(){return handleOpenFullScreen(0);},disableRoundedCorners:disableRoundedCorners},void 0)}),void 0),jsx$1(FullScreenImageViewer,{images:images,selectedIndex:fullScreenItemIndex,hidden:fullScreenItemIndex==null,onClose:handleCloseFullScreen,imageUrlResolver:imageUrlResolver},void 0)]}),void 0);function handleOpenFullScreen(index){setFullScreenItemIndex(index);}function handleCloseFullScreen(){setFullScreenItemIndex(null);}};var SingleImagePreview=function SingleImagePreview(_a){var image=_a.image,onClick=_a.onClick,disableRoundedCorners=_a.disableRoundedCorners;var formatMessage=useIntl().formatMessage;return jsx$1(SingleImageHost,__assign$1({href:image.previewUrl,onClick:function(e){e.stopPropagation();e.preventDefault();onClick();},applyRoundedCorners:!disableRoundedCorners,"aria-label":formatMessage({id:'AriaLabel.viewImage'}),"data-clickable-overlay":true},{children:jsx$1("img",{src:image.previewUrl,alt:""},void 0)}),void 0);};var Host$l$1=_styled.div.withConfig({displayName:"PhotoGrid__Host",componentId:"sc-flk193-0"})(templateObject_2$x$1||(templateObject_2$x$1=__makeTemplateObject$1(["\n overflow: hidden;\n width: 100%;\n\n position: relative;\n\n &:after {\n content: '';\n display: block;\n font-size: 0;\n }\n\n > [data-gallery-wrapper] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-multi-images='false'] {\n [data-gallery-wrapper] {\n display: flex;\n }\n\n ","\n }\n\n &[data-multi-images='true'] {\n &:after {\n padding-bottom: calc(2 / 3 * 100%); // fixed image area aspect ratio 3:2\n }\n }\n"],["\n overflow: hidden;\n width: 100%;\n\n position: relative;\n\n &:after {\n content: '';\n display: block;\n font-size: 0;\n }\n\n > [data-gallery-wrapper] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-multi-images='false'] {\n [data-gallery-wrapper] {\n display: flex;\n }\n\n ","\n }\n\n &[data-multi-images='true'] {\n &:after {\n padding-bottom: calc(2 / 3 * 100%); // fixed image area aspect ratio 3:2\n }\n }\n"])),function(p){return p.singleImageWidth&&p.singleImageHeight&&css$2(templateObject_1$L$1||(templateObject_1$L$1=__makeTemplateObject$1(["\n &:after {\n // fallback for old browsers - that do not suport min function\n // the image aspect ratio is maintained\n padding-bottom: calc(\n ","* 100%\n );\n\n // the image can have any aspect ratio from a 1:1 aspect ratio to any wider aspect ratio,\n // but it cannot get \"taller\" than 1:1\n @supports (padding-bottom: min(100%, ","px)) {\n padding-bottom: min(\n min(100%, ","px, ","px),\n calc(\n ","*\n min(100%, ","px)\n )\n );\n }\n }\n "],["\n &:after {\n // fallback for old browsers - that do not suport min function\n // the image aspect ratio is maintained\n padding-bottom: calc(\n ","* 100%\n );\n\n // the image can have any aspect ratio from a 1:1 aspect ratio to any wider aspect ratio,\n // but it cannot get \"taller\" than 1:1\n @supports (padding-bottom: min(100%, ","px)) {\n padding-bottom: min(\n min(100%, ","px, ","px),\n calc(\n ","*\n min(100%, ","px)\n )\n );\n }\n }\n "])),p.singleImageHeight/p.singleImageWidth,p.singleImageWidth,p.singleImageHeight,p.singleImageWidth,p.singleImageHeight/p.singleImageWidth,p.singleImageWidth);});var SingleImageHost=_styled.a.withConfig({displayName:"PhotoGrid__SingleImageHost",componentId:"sc-flk193-1"})(templateObject_4$f$2||(templateObject_4$f$2=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: auto;\n\n max-height: 100%;\n\n overflow: hidden;\n\n // fallback for old browsers\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n width: auto;\n }\n\n img {\n max-width: 100%;\n height: 100%;\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n height: auto;\n width: auto;\n }\n }\n\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: auto;\n\n max-height: 100%;\n\n overflow: hidden;\n\n // fallback for old browsers\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n width: auto;\n }\n\n img {\n max-width: 100%;\n height: 100%;\n width: 100%;\n\n @supports (height: min(100%, 0px)) {\n height: auto;\n width: auto;\n }\n }\n\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n\n ","\n"])),function(p){return p.applyRoundedCorners&&css$2(templateObject_3$o$1||(templateObject_3$o$1=__makeTemplateObject$1(["\n border-radius: 10px;\n "],["\n border-radius: 10px;\n "])));});var Gallery=_styled.div.withConfig({displayName:"PhotoGrid__Gallery",componentId:"sc-flk193-2"})(templateObject_6$7$2||(templateObject_6$7$2=__makeTemplateObject$1(["\n width: 100%;\n height: 100%;\n overflow: hidden;\n\n background-color: ",";\n\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: repeat(2, 1fr);\n\n // case: gallery with 3 images\n // the first image will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(3) {\n grid-row: auto / span 2;\n }\n\n // case: gallery with 2 images\n // the images will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(2),\n > a:nth-child(2):last-child {\n grid-row: auto / span 2;\n }\n\n ","\n"],["\n width: 100%;\n height: 100%;\n overflow: hidden;\n\n background-color: ",";\n\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: repeat(2, 1fr);\n\n // case: gallery with 3 images\n // the first image will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(3) {\n grid-row: auto / span 2;\n }\n\n // case: gallery with 2 images\n // the images will span across the 2 grid tracks (2 rows)\n > a:first-child:nth-last-child(2),\n > a:nth-child(2):last-child {\n grid-row: auto / span 2;\n }\n\n ","\n"])),function(p){return p.backgroundColor;},function(p){return p.applyRoundedCorners&&css$2(templateObject_5$a$2||(templateObject_5$a$2=__makeTemplateObject$1(["\n border-radius: 10px;\n "],["\n border-radius: 10px;\n "])));});var ImageItem=_styled.a.withConfig({displayName:"PhotoGrid__ImageItem",componentId:"sc-flk193-3"})(templateObject_7$3$2||(templateObject_7$3$2=__makeTemplateObject$1(["\n display: block;\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n"],["\n display: block;\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n &:focus {\n &::before {\n outline-offset: -10px !important;\n }\n\n img {\n opacity: 0.6;\n }\n }\n"])));var StyledImage$1=_styled(Image$1).withConfig({displayName:"PhotoGrid__StyledImage",componentId:"sc-flk193-4"})(templateObject_8$3$2||(templateObject_8$3$2=__makeTemplateObject$1(["\n height: 100%;\n"],["\n height: 100%;\n"])));var MoreIndicator=_styled(DefaultButton).withConfig({displayName:"PhotoGrid__MoreIndicator",componentId:"sc-flk193-5"})(templateObject_9$2$2||(templateObject_9$2$2=__makeTemplateObject$1(["\n && {\n margin: 0;\n padding: 0;\n border: 0;\n width: auto;\n height: auto;\n color: white;\n background: transparent;\n\n &:hover {\n background: transparent;\n }\n }\n\n position: absolute;\n bottom: 15px;\n right: 15px;\n\n font-size: ","px;\n @media (min-width: ","px) {\n font-size: ","px;\n }\n\n @supports (filter: drop-shadow(0 1px 2px #000000cc)) {\n filter: drop-shadow(0 1px 2px #000000cc);\n }\n\n @supports not (filter: drop-shadow(0 1px 2px #000000cc)) {\n text-shadow: 0 1px 2px #000000cc;\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n border: 0;\n width: auto;\n height: auto;\n color: white;\n background: transparent;\n\n &:hover {\n background: transparent;\n }\n }\n\n position: absolute;\n bottom: 15px;\n right: 15px;\n\n font-size: ","px;\n @media (min-width: ","px) {\n font-size: ","px;\n }\n\n @supports (filter: drop-shadow(0 1px 2px #000000cc)) {\n filter: drop-shadow(0 1px 2px #000000cc);\n }\n\n @supports not (filter: drop-shadow(0 1px 2px #000000cc)) {\n text-shadow: 0 1px 2px #000000cc;\n }\n"])),fontSizeMedium,minScreenSize.small,fontSizeLarge+3);var templateObject_1$L$1,templateObject_2$x$1,templateObject_3$o$1,templateObject_4$f$2,templateObject_5$a$2,templateObject_6$7$2,templateObject_7$3$2,templateObject_8$3$2,templateObject_9$2$2;function showPhoto(url,title){{return;}}var IconHeaderButton=function IconHeaderButton(_a){var icon=_a.icon,isActive=_a.isActive,disabled=_a.disabled,tooltipResourceKey=_a.tooltipResourceKey,onClick=_a.onClick,link=_a.link,className=_a.className,rest=__rest$1(_a,["icon","isActive","disabled","tooltipResourceKey","onClick","link","className"]);var formatMessage=useIntl().formatMessage;if(!link&&!onClick){return null;}var allClassNames=classNames('header-button',className);var IconElement=!link?jsx$1(Button$1,__assign$1({className:allClassNames,disabled:disabled,onClick:function(e){return onClick(e.currentTarget);},iconProps:{iconName:icon},ariaLabel:formatMessage({id:tooltipResourceKey}),"data-button-type":"header-btn",isActive:isActive},rest),void 0):jsx$1(StyledLink$2,__assign$1({className:allClassNames,to:link},rest,{children:jsx$1(Icon,{iconName:icon},void 0)}),void 0);return jsx$1(Host$k$1,__assign$1({className:"tooltip-container"},{children:jsx$1(Tooltip,__assign$1({resourceKey:tooltipResourceKey},{children:IconElement}),void 0)}),void 0);};var Host$k$1=_styled.div.withConfig({displayName:"IconHeaderButton__Host",componentId:"sc-1p61ffo-0"})(templateObject_1$K$1||(templateObject_1$K$1=__makeTemplateObject$1(["\n height: 100%;\n"],["\n height: 100%;\n"])));var Button$1=_styled(IconButton$1).withConfig({displayName:"IconHeaderButton__Button",componentId:"sc-1p61ffo-1"})(templateObject_4$e$2||(templateObject_4$e$2=__makeTemplateObject$1(["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ",";\n ","\n }\n"],["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ",";\n ","\n }\n"])),function(p){return !p.isActive&&css$2(templateObject_2$w$1||(templateObject_2$w$1=__makeTemplateObject$1(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.textColors.onPrimary);},function(p){return p.isActive&&css$2(templateObject_3$n$1||(templateObject_3$n$1=__makeTemplateObject$1(["\n background-color: ",";\n color: ",";\n\n &&:hover {\n background-color: ",";\n color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &&:hover {\n background-color: ",";\n color: ",";\n }\n "])),p.theme.palette.themeSecondary,p.theme.textColors.onSecondary,p.theme.palette.themeSecondary,p.theme.textColors.onSecondary);});var StyledLink$2=_styled(Link$4).withConfig({displayName:"IconHeaderButton__StyledLink",componentId:"sc-1p61ffo-2"})(templateObject_6$6$2||(templateObject_6$6$2=__makeTemplateObject$1(["\n && {\n height: 100%;\n ",";\n }\n"],["\n && {\n height: 100%;\n ",";\n }\n"])),function(p){return css$2(templateObject_5$9$2||(templateObject_5$9$2=__makeTemplateObject$1(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.textColors.onPrimary);});var templateObject_1$K$1,templateObject_2$w$1,templateObject_3$n$1,templateObject_4$e$2,templateObject_5$9$2,templateObject_6$6$2;// a string of all valid unicode whitespaces
|
|
77691
77691
|
// eslint-disable-next-line max-len
|
|
77692
77692
|
var whitespaces$2$2='\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';var requireObjectCoercible$e=requireObjectCoercible$9$1;var whitespaces$1$2=whitespaces$2$2;var whitespace$2='['+whitespaces$1$2+']';var ltrim$2=RegExp('^'+whitespace$2+whitespace$2+'*');var rtrim$2=RegExp(whitespace$2+whitespace$2+'*$');// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
77693
77693
|
var createMethod$5=function(TYPE){return function($this){var string=String(requireObjectCoercible$e($this));if(TYPE&1)string=string.replace(ltrim$2,'');if(TYPE&2)string=string.replace(rtrim$2,'');return string;};};var stringTrim$2={// `String.prototype.{ trimLeft, trimStart }` methods
|
|
@@ -77705,18 +77705,18 @@ $$1$2({target:'String',proto:true,forced:forcedStringTrimMethod$2('trim')},{trim
|
|
|
77705
77705
|
},[location.pathname]);return jsxs(Host$j$2,__assign$1({className:classNames('search-field',props.className),useLightTheme:props.useLightTheme},{children:[jsx$1(StyledTextField$2,{className:"search-input",useLightTheme:props.useLightTheme,default:true,value:searchText||props.searchText||'',onChange:function(_,value){return handleChange(value);},onKeyDown:handleKeyDown,autoComplete:"off",autoFocus:true,borderless:true,placeholder:props.placeholder||intl.formatMessage({id:'TopBar.search'}),componentRef:function(input){return searchInputRef.current=input;},ariaLabel:intl.formatMessage({id:'TopBar.search'}),"data-search-input":true},void 0),props.searching&&jsx$1(StyledSpinner$1$1,{className:"search-spinner"},void 0),jsx$1(CancelButton$1,{"data-cancel-search-button":true,iconProps:{iconName:'Cancel'},onClick:function(){var _a;setSearchText(null);(_a=props.onClear)===null||_a===void 0?void 0:_a.call(props);},color:!props.useLightTheme&&textColors.onPrimary},void 0)]}),void 0);function handleKeyDown(event){if(event.key==='Enter'&&props.onExecuteSearch){props.onExecuteSearch(searchText);}if(event.key==='Escape'){handleChange('');}}function handleChange(searchText){var _a;setSearchText(searchText);(_a=props.onChange)===null||_a===void 0?void 0:_a.call(props,searchText);}function handleBack(){if(searchText||props.searchText){handleChange('');return true;}return false;}};var StyledTextField$2=_styled(TextField).withConfig({displayName:"Search__StyledTextField",componentId:"sc-17f35gt-0"})(templateObject_3$l$1||(templateObject_3$l$1=__makeTemplateObject$1(["\n ","\n"],["\n ","\n"])),function(p){return p.useLightTheme?css$2(templateObject_1$I$1||(templateObject_1$I$1=__makeTemplateObject$1(["\n .ms-TextField-field {\n color: ",";\n ",";\n }\n "],["\n .ms-TextField-field {\n color: ",";\n ",";\n }\n "])),function(p){return p.theme.textColors.default;},InputPlaceholder("color: "+p.theme.textColors.default)):css$2(templateObject_2$u$1||(templateObject_2$u$1=__makeTemplateObject$1(["\n .ms-TextField-field {\n color: ",";\n ",";\n }\n "],["\n .ms-TextField-field {\n color: ",";\n ",";\n }\n "])),function(p){return p.theme.textColors.onPrimary;},InputPlaceholder("color: "+p.theme.textColors.onPrimary));});var StyledSpinner$1$1=_styled(Spinner$1).withConfig({displayName:"Search__StyledSpinner",componentId:"sc-17f35gt-1"})(templateObject_4$c$2||(templateObject_4$c$2=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n padding-right: 8px;\n\n color: ",";\n background-color: ",";\n"],["\n display: flex;\n align-items: center;\n padding-right: 8px;\n\n color: ",";\n background-color: ",";\n"])),function(p){return p.theme.textColors.onPrimary;},function(p){return p.theme.palette.themeDarker;});var Host$j$2=_styled.div.withConfig({displayName:"Search__Host",componentId:"sc-17f35gt-2"})(templateObject_7$2$2||(templateObject_7$2$2=__makeTemplateObject$1(["\n flex: 1 1 auto;\n height: 100%;\n\n display: flex;\n flex-flow: row nowrap;\n align-items: stretch;\n\n > .ms-TextField {\n flex: 1 1 auto;\n display: flex;\n flex-flow: row nowrap;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0;\n\n > .ms-TextField-wrapper {\n flex: 1 0 auto;\n\n .ms-TextField-fieldGroup {\n border: none;\n background: none;\n\n > input {\n border: 0;\n height: 100%;\n font-size: 18px;\n\n &::-ms-clear {\n display: none;\n }\n }\n }\n }\n }\n\n input {\n &.ms-TextField-field {\n min-width: 100%;\n width: 30px;\n }\n\n ",";\n }\n\n i {\n display: flex;\n justify-content: space-around;\n flex-flow: row nowrap;\n align-items: center;\n\n margin-right: 1em;\n margin-left: 0.5em;\n cursor: pointer;\n }\n\n button {\n height: 100%;\n margin: 0 4px;\n }\n\n ","\n"],["\n flex: 1 1 auto;\n height: 100%;\n\n display: flex;\n flex-flow: row nowrap;\n align-items: stretch;\n\n > .ms-TextField {\n flex: 1 1 auto;\n display: flex;\n flex-flow: row nowrap;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0;\n\n > .ms-TextField-wrapper {\n flex: 1 0 auto;\n\n .ms-TextField-fieldGroup {\n border: none;\n background: none;\n\n > input {\n border: 0;\n height: 100%;\n font-size: 18px;\n\n &::-ms-clear {\n display: none;\n }\n }\n }\n }\n }\n\n input {\n &.ms-TextField-field {\n min-width: 100%;\n width: 30px;\n }\n\n ",";\n }\n\n i {\n display: flex;\n justify-content: space-around;\n flex-flow: row nowrap;\n align-items: center;\n\n margin-right: 1em;\n margin-left: 0.5em;\n cursor: pointer;\n }\n\n button {\n height: 100%;\n margin: 0 4px;\n }\n\n ","\n"])),InputPlaceholder("\n font-size: inherit;\n opacity: 0.5;\n "),function(p){return p.useLightTheme?css$2(templateObject_5$7$2||(templateObject_5$7$2=__makeTemplateObject$1(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.neutralLighter;}):css$2(templateObject_6$4$2||(templateObject_6$4$2=__makeTemplateObject$1(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.themeDarker;});});var CancelButton$1=_styled(IconButton).withConfig({displayName:"Search__CancelButton",componentId:"sc-17f35gt-3"})(templateObject_8$2$2||(templateObject_8$2$2=__makeTemplateObject$1(["\n align-self: center;\n"],["\n align-self: center;\n"])));var SearchBox=function SearchBox(_a){var onSearchInputFieldVisibilityChanged=_a.onSearchInputFieldVisibilityChanged,isToolbarMode=_a.isToolbarMode,onExecuteSearch=_a.onExecuteSearch,onSearchTextChange=_a.onSearchTextChange,searchText=_a.searchText,showSearchBoxInput=_a.showSearchBoxInput,className=_a.className;var _b=useState$2(!!searchText),showSearchInputFieldState=_b[0],setShowSearchInputField=_b[1];var showSearchInputField=showSearchBoxInput||showSearchInputFieldState||!!searchText;// this use effect is required, if the state does not change via a manual toggle
|
|
77706
77706
|
// but instead via a property
|
|
77707
77707
|
useEffect$1(function(){onSearchInputFieldVisibilityChanged===null||onSearchInputFieldVisibilityChanged===void 0?void 0:onSearchInputFieldVisibilityChanged(showSearchInputField);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77708
|
-
},[showSearchInputField]);return jsxs(Fragment,{children:[showSearchInputField&&jsx$1(Search,{onChange:onSearchTextChange,onExecuteSearch:onExecuteSearch,searchText:searchText,onClear:function(){onSearchTextChange===null||onSearchTextChange===void 0?void 0:onSearchTextChange('');onToggle(false);},className:className,useLightTheme:isToolbarMode},void 0),!showSearchInputField&&(isToolbarMode?jsx$1(ToolbarIconButton,{iconName:"Search",onClick:function(){return onToggle(true);},tooltipResourceKey:"TopBar.search",ariaLabelResourceKey:"TopBar.search"},void 0):jsx$1(IconHeaderButton,{icon:"Search",onClick:function(){return onToggle(true);},tooltipResourceKey:"TopBar.search"},void 0))]},void 0);function onToggle(isVisible){setShowSearchInputField(isVisible);onSearchInputFieldVisibilityChanged===null||onSearchInputFieldVisibilityChanged===void 0?void 0:onSearchInputFieldVisibilityChanged(isVisible);}};var templateObject_1$I$1,templateObject_2$u$1,templateObject_3$l$1,templateObject_4$c$2,templateObject_5$7$2,templateObject_6$4$2,templateObject_7$2$2,templateObject_8$2$2;var TableSortOrder;(function(TableSortOrder){TableSortOrder["ASC"]="SortUp";TableSortOrder["DESC"]="SortDown";})(TableSortOrder||(TableSortOrder={}));_styled(Icon).withConfig({displayName:"SortableTable__Order",componentId:"sc-6tqdpa-0"})(templateObject_1$H$1||(templateObject_1$H$1=__makeTemplateObject$1(["\n position: absolute;\n right: 0;\n"],["\n position: absolute;\n right: 0;\n"])));_styled.span.withConfig({displayName:"SortableTable__Title",componentId:"sc-6tqdpa-1"})(templateObject_4$b$2||(templateObject_4$b$2=__makeTemplateObject$1(["\n position: relative;\n padding: 0 5px;\n ","\n"],["\n position: relative;\n padding: 0 5px;\n ","\n"])),function(p){return p.orderBy?css$2(templateObject_2$t$1||(templateObject_2$t$1=__makeTemplateObject$1(["\n padding-right: 18px;\n "],["\n padding-right: 18px;\n "]))):css$2(templateObject_3$k$1||(templateObject_3$k$1=__makeTemplateObject$1(["\n padding-left: 18px;\n "],["\n padding-left: 18px;\n "])));});_styled.th.withConfig({displayName:"SortableTable__ColumnHeader",componentId:"sc-6tqdpa-2"})(templateObject_5$6$2||(templateObject_5$6$2=__makeTemplateObject$1(["\n text-align: right;\n padding: 10px 5px;\n white-space: nowrap;\n\n :hover {\n cursor: ",";\n }\n\n :first-child {\n text-align: left;\n\n span {\n padding-left: 0;\n padding-right: 15px;\n }\n }\n"],["\n text-align: right;\n padding: 10px 5px;\n white-space: nowrap;\n\n :hover {\n cursor: ",";\n }\n\n :first-child {\n text-align: left;\n\n span {\n padding-left: 0;\n padding-right: 15px;\n }\n }\n"])),function(_a){var isLoading=_a.isLoading,disableSort=_a.disableSort;return isLoading?'wait':disableSort?'default':'pointer';});_styled.td.withConfig({displayName:"SortableTable__Cell",componentId:"sc-6tqdpa-3"})(templateObject_6$3$2||(templateObject_6$3$2=__makeTemplateObject$1(["\n text-align: right;\n padding: 2px 5px;\n white-space: ",";\n\n :first-child {\n text-align: left;\n }\n"],["\n text-align: right;\n padding: 2px 5px;\n white-space: ",";\n\n :first-child {\n text-align: left;\n }\n"])),function(props){return props.noWrap?'nowrap':'';});var Row$1=_styled.tr.withConfig({displayName:"SortableTable__Row",componentId:"sc-6tqdpa-4"})(templateObject_7$1$2||(templateObject_7$1$2=__makeTemplateObject$1(["\n :nth-child(odd) {\n background: ",";\n }\n"],["\n :nth-child(odd) {\n background: ",";\n }\n"])),function(p){return p.theme.palette.neutralLighterAlt;});_styled.table.withConfig({displayName:"SortableTable__Table",componentId:"sc-6tqdpa-5"})(templateObject_8$1$2||(templateObject_8$1$2=__makeTemplateObject$1(["\n width: 100%;\n border-collapse: collapse;\n\n :hover {\n cursor: ",";\n }\n\n "," {\n transition: opacity 0.1s linear;\n opacity: ",";\n }\n"],["\n width: 100%;\n border-collapse: collapse;\n\n :hover {\n cursor: ",";\n }\n\n "," {\n transition: opacity 0.1s linear;\n opacity: ",";\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?'wait':'default';},Row$1,function(_a){var isLoading=_a.isLoading;return isLoading?'0.6':'1';});_styled(Spinner).withConfig({displayName:"SortableTable__Loading",componentId:"sc-6tqdpa-6"})(templateObject_9$1$2||(templateObject_9$1$2=__makeTemplateObject$1(["\n margin: 80px 0 100px;\n"],["\n margin: 80px 0 100px;\n"])));var templateObject_1$H$1,templateObject_2$t$1,templateObject_3$k$1,templateObject_4$b$2,templateObject_5$6$2,templateObject_6$3$2,templateObject_7$1$2,templateObject_8$1$2,templateObject_9$1$2;var ToggleWithLabel=function ToggleWithLabel(props){return jsx$1(StyledToggle,__assign$1({},props,{"data-toggle-button":true}),void 0);};var StyledToggle=_styled(Toggle).withConfig({displayName:"ToggleWithLabel__StyledToggle",componentId:"sc-lcovfq-0"})(templateObject_1$G$1||(templateObject_1$G$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n\n > label {\n order: 1;\n margin-left: 15px;\n }\n\n &.is-checked.is-enabled {\n button:hover {\n background-color: ",";\n }\n }\n"],["\n display: flex;\n align-items: center;\n\n > label {\n order: 1;\n margin-left: 15px;\n }\n\n &.is-checked.is-enabled {\n button:hover {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.semanticColors.inputBackgroundCheckedHovered;});var templateObject_1$G$1;var unreadCommentHighlight=css$2(templateObject_1$F$1||(templateObject_1$F$1=__makeTemplateObject$1(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: 3px;\n left: 100%;\n display: block;\n width: 12px;\n height: 12px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n background-color: ",";\n }\n"],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: 3px;\n left: 100%;\n display: block;\n width: 12px;\n height: 12px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n background-color: ",";\n }\n"])),function(p){return p.theme.palette.accent;});var templateObject_1$F$1;function getGroupName(group,user,intl){return group.translations[user.preferredUiLanguage]||group.translations[getPreferredContentLanguage(user)]||group.name||intl.formatMessage({id:'Groups.defaultName'});}_styled.div.withConfig({displayName:"VerificationStatusIcon__Host",componentId:"sc-b3nb8-0"})(templateObject_2$s$1||(templateObject_2$s$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n\n ","\n"],["\n display: flex;\n align-items: center;\n\n ","\n"])),function(p){return p.isInvalid&&css$2(templateObject_1$E$1||(templateObject_1$E$1=__makeTemplateObject$1(["\n color: ",";\n "],["\n color: ",";\n "])),function(p){return p.theme.palette.redDark;});});_styled(Icon).withConfig({displayName:"VerificationStatusIcon__StatusIcon",componentId:"sc-b3nb8-1"})(templateObject_3$j$1||(templateObject_3$j$1=__makeTemplateObject$1(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingS);var templateObject_1$E$1,templateObject_2$s$1,templateObject_3$j$1;var OpacityAnimation=function OpacityAnimation(_a){var enterDuration=_a.enterDuration,leaveDuration=_a.leaveDuration,children=_a.children,style=_a.style,className=_a.className;var hasEnterDuration=!!enterDuration;var hasLeaveDuration=!!leaveDuration;var animationName="common-opacity-animation_"+enterDuration+"_"+leaveDuration;return jsxs(Fragment,{children:[jsx$1(AnimationStyle,{name:animationName,enterDuration:enterDuration,leaveDuration:leaveDuration},void 0),jsx$1(reactAddonsCssTransitionGroup,__assign$1({style:style,className:className,transitionName:animationName,transitionAppear:hasEnterDuration,transitionEnter:hasEnterDuration,transitionLeave:hasLeaveDuration,transitionLeaveTimeout:leaveDuration,transitionAppearTimeout:enterDuration,transitionEnterTimeout:enterDuration},{children:children}),void 0)]},void 0);};var AnimationStyle=createGlobalStyle(templateObject_1$D$1||(templateObject_1$D$1=__makeTemplateObject$1(["\n ."," {\n &-enter, &-apear {\n opacity: 0;\n &-active {\n opacity: 1;\n transition: opacity ","ms ease-in;\n }\n }\n &-leave {\n opacity: 1;\n &-active {\n opacity: 0;\n transition: opacity ","ms ease-in;\n }\n }\n }\n"],["\n ."," {\n &-enter, &-apear {\n opacity: 0;\n &-active {\n opacity: 1;\n transition: opacity ","ms ease-in;\n }\n }\n &-leave {\n opacity: 1;\n &-active {\n opacity: 0;\n transition: opacity ","ms ease-in;\n }\n }\n }\n"])),function(p){return p.name;},function(p){return p.enterDuration;},function(p){return p.leaveDuration;});var templateObject_1$D$1;var AutoTranslateButton=function AutoTranslateButton(_a){var contentLanguageCode=_a.contentLanguageCode,originalContent=_a.originalContent,content=_a.content,onTranslate=_a.onTranslate,onContentChange=_a.onContentChange,tooltipResourceKey=_a.tooltipResourceKey,showLabel=_a.showLabel;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=useState$2(null),autoTranslatedContent=_b[0],setAutoTranslatedContent=_b[1];var _c=useState$2(originalContent===content),isOriginalContent=_c[0],setIsOriginalContent=_c[1];var showError=useNotificationContext().showError;var preferredContentLanguageCode=getPreferredContentLanguage(user);useEffect$1(function(){return setAutoTranslatedContent(null);},[originalContent]);if(!features.automaticTranslation){return null;}var label=formatMessage({id:'Generic.translate'});var shouldShowTranslateButton=contentLanguageCode&&contentLanguageCode!==preferredContentLanguageCode&&allAvailableContentLanguages.includes(preferredContentLanguageCode)&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguageCode);if(!shouldShowTranslateButton){return null;}return jsx$1(Tooltip,__assign$1({resourceKey:isOriginalContent?'Generic.translateTo':tooltipResourceKey,values:{language:formatMessage({id:"Generic.languages."+preferredContentLanguageCode})}},{children:jsx$1(StyledActionButton$3,__assign$1({"aria-label":showLabel?null:label,"data-translate-content-button":true,className:"ms-fontColor-neutralSecondary",iconProps:{iconName:'World'},onClick:handleTranslate},{children:showLabel&&label}),void 0)}),void 0);function handleTranslate(){return __awaiter$1(this,void 0,void 0,function(){var translation;return __generator$1(this,function(_b){switch(_b.label){case 0:if(!isOriginalContent){onContentChange(originalContent);setIsOriginalContent(true);return [2/*return*/];}if(!autoTranslatedContent)return [3/*break*/,1];onContentChange(autoTranslatedContent);setIsOriginalContent(false);return [3/*break*/,4];case 1:_b.trys.push([1,3,,4]);return [4/*yield*/,onTranslate(preferredContentLanguageCode)];case 2:translation=_b.sent();onContentChange(translation);setAutoTranslatedContent(translation);setIsOriginalContent(false);return [3/*break*/,4];case 3:_b.sent();showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledActionButton$3=_styled(ActionButton)(templateObject_1$C$1||(templateObject_1$C$1=__makeTemplateObject$1(["\n &&& {\n i {\n color: ",";\n }\n }\n"],["\n &&& {\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$C$1;var ChoiceGroup=_styled(ChoiceGroup$1).withConfig({displayName:"ChoiceGroup",componentId:"sc-11bpj01-0"})(templateObject_1$B$1||(templateObject_1$B$1=__makeTemplateObject$1(["\n .ms-ChoiceField-field.is-checked {\n &:hover {\n &::before,\n &:after {\n border-color: ",";\n }\n }\n }\n"],["\n .ms-ChoiceField-field.is-checked {\n &:hover {\n &::before,\n &:after {\n border-color: ",";\n }\n }\n }\n"])),function(p){return p.theme.palette.accent;});var templateObject_1$B$1;var CommentActionMenu=function CommentActionMenu(_a){var comment=_a.comment,showEdit=_a.showEdit,showDelete=_a.showDelete,onDelete=_a.onDelete,isEditMode=_a.isEditMode,toggleEditMode=_a.toggleEditMode,originalContent=_a.originalContent,currentContent=_a.currentContent,setContent=_a.setContent,handleTranslate=_a.handleTranslate,showAutoTranslate=_a.showAutoTranslate,onReply=_a.onReply,disabled=_a.disabled;var formatMessage=useIntl().formatMessage;var _b=useState$2(false),showMenuButtons=_b[0],setShowMenuButtons=_b[1];var menuButton=useRef$1(null);return jsxs(Fragment,{children:[jsx$1("div",__assign$1({ref:menuButton},{children:jsx$1(MenuButton$1,{"data-menu-button":comment.id,iconProps:{iconName:'MoreVertical'},onClick:function(){return setShowMenuButtons(!showMenuButtons);},ariaLabel:formatMessage({id:'AriaLabel.contextMenuButton'}),disabled:disabled},void 0)}),void 0),showMenuButtons&&jsx$1(StyledCallout$4,__assign$1({"data-context-menu":true,target:menuButton.current,onDismiss:function(){return setShowMenuButtons(false);}},{children:jsxs(Buttons$5,{children:[jsx$1(Tooltip,__assign$1({resourceKey:'Comment.replyButton.tooltip',values:{name:comment.sender.displayName}},{children:jsx$1(StyledActionButton$2,{"data-reply-button":comment.id,iconProps:{iconName:'Reply'},onClick:handleReply,text:formatMessage({id:'Comment.replyButton'})},void 0)}),void 0),showAutoTranslate&&jsx$1(AutoTranslateButton,{"data-auto-translate-button":comment.id,originalContent:originalContent,onContentChange:function(content){setShowMenuButtons(false);setContent(content);},content:currentContent,tooltipResourceKey:"Comment.translate.showOriginal",onTranslate:handleTranslate,contentLanguageCode:comment.contentLanguageCode,showLabel:true},void 0),showEdit&&jsx$1(Tooltip,__assign$1({resourceKey:"Comment.edit.tooltip"},{children:jsx$1(StyledActionButton$2,{"data-edit-button":comment.id,iconProps:{iconName:'Edit'},onClick:function(){toggleEditMode(true);setShowMenuButtons(false);},text:formatMessage({id:'Generic.edit'}),disabled:!comment.id||isEditMode},void 0)}),void 0),showDelete&&jsx$1(Tooltip,__assign$1({resourceKey:"Comment.delete.tooltip"},{children:jsx$1(StyledActionButton$2,{"data-delete-button":comment.id,iconProps:{iconName:'Delete'},onClick:function(){onDelete(comment);setShowMenuButtons(false);},text:formatMessage({id:'Generic.Delete'}),disabled:!comment.id||isEditMode},void 0)}),void 0)]},void 0)}),void 0)]},void 0);function handleReply(){onReply===null||onReply===void 0?void 0:onReply(comment.id,comment.sender);setShowMenuButtons(false);}};var Buttons$5=_styled.div.withConfig({displayName:"CommentActionMenu__Buttons",componentId:"sc-qsk1nc-0"})(templateObject_1$A$1||(templateObject_1$A$1=__makeTemplateObject$1(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var MenuButton$1=_styled(IconButton).withConfig({displayName:"CommentActionMenu__MenuButton",componentId:"sc-qsk1nc-1"})(templateObject_2$r$1||(templateObject_2$r$1=__makeTemplateObject$1(["\n && {\n width: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n margin: 0;\n font-size: ","px;\n }\n }\n"],["\n && {\n width: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n margin: 0;\n font-size: ","px;\n }\n }\n"])),fontSizeMedium+2);var StyledActionButton$2=_styled(ActionButton).withConfig({displayName:"CommentActionMenu__StyledActionButton",componentId:"sc-qsk1nc-2"})(templateObject_3$i$1||(templateObject_3$i$1=__makeTemplateObject$1(["\n &&& {\n i {\n color: ",";\n }\n }\n"],["\n &&& {\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var StyledCallout$4=_styled(Callout).withConfig({displayName:"CommentActionMenu__StyledCallout",componentId:"sc-qsk1nc-3"})(templateObject_4$a$2||(templateObject_4$a$2=__makeTemplateObject$1(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingS);var templateObject_1$A$1,templateObject_2$r$1,templateObject_3$i$1,templateObject_4$a$2;var DeleteAttachmentButton=_styled(IconButton$1).withConfig({displayName:"DeleteAttachmentButton",componentId:"sc-d7hswf-0"})(templateObject_1$z$1||(templateObject_1$z$1=__makeTemplateObject$1(["\n && {\n padding: ","px;\n color: ",";\n\n &:hover {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 14px;\n }\n }\n"],["\n && {\n padding: ","px;\n color: ",";\n\n &:hover {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 14px;\n }\n }\n"])),spacingXs,function(p){return p.theme.textColors.default;},function(p){return p.theme.textColors.default;});var templateObject_1$z$1;var ToggleAllButtons=function ToggleAllButtons(_a){var toggleAll=_a.toggleAll,className=_a.className;var accent=useContext(ThemeContext$1).theme.palette.accent;return jsxs(Host$h$2,__assign$1({className:className},{children:[jsx$1(StyledButton$1$1,__assign$1({onClick:function(){return toggleAll(true);},"data-button-toggle":"selectAll",color:accent},{children:jsx$1(FormattedMessage$1,{id:"Generic.SelectAll"},void 0)}),void 0),jsx$1(StyledButton$1$1,__assign$1({onClick:function(){return toggleAll(false);},"data-button-toggle":"clearAll",color:accent},{children:jsx$1(FormattedMessage$1,{id:"Generic.ClearAll"},void 0)}),void 0)]}),void 0);};var Host$h$2=_styled.div.withConfig({displayName:"ToggleAllButtons__Host",componentId:"sc-kbn3b4-0"})(templateObject_1$y$1||(templateObject_1$y$1=__makeTemplateObject$1(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var StyledButton$1$1=_styled(ActionButton).withConfig({displayName:"ToggleAllButtons__StyledButton",componentId:"sc-kbn3b4-1"})(templateObject_2$q$1||(templateObject_2$q$1=__makeTemplateObject$1(["\n && {\n height: 20px;\n padding-left: 0;\n padding-right: 8px;\n font-size: 10pt;\n }\n"],["\n && {\n height: 20px;\n padding-left: 0;\n padding-right: 8px;\n font-size: 10pt;\n }\n"])));var templateObject_1$y$1,templateObject_2$q$1;var InternalTopActionButton=function InternalTopActionButton(props){var iconName=props.iconName,textKey=props.textKey,navLinkProps=__rest$1(props,["iconName","textKey"]);return jsxs(NavLink,__assign$1({},navLinkProps,{children:[iconName&&jsx$1(Icon,{iconName:iconName},void 0),jsx$1(FormattedMessage$1,{id:textKey},void 0)]}),void 0);};_styled(InternalTopActionButton).withConfig({displayName:"TopActionButton",componentId:"sc-1lam7c6-0"})(templateObject_1$x$1||(templateObject_1$x$1=__makeTemplateObject$1(["\n && {\n font-size: initial;\n font-weight: bold;\n margin: 0 0 ","px 0;\n\n display: flex;\n align-items: center;\n align-self: flex-start;\n\n color: ",";\n }\n\n > i {\n padding-right: 8px;\n }\n"],["\n && {\n font-size: initial;\n font-weight: bold;\n margin: 0 0 ","px 0;\n\n display: flex;\n align-items: center;\n align-self: flex-start;\n\n color: ",";\n }\n\n > i {\n padding-right: 8px;\n }\n"])),spacingS,function(p){return p.theme.palette.accent;});var templateObject_1$x$1;_styled(IconButton).withConfig({displayName:"HeaderMenuButton__MenuButton",componentId:"sc-170vvq2-0"})(templateObject_1$w$2||(templateObject_1$w$2=__makeTemplateObject$1([""],[""])));var templateObject_1$w$2;var ChannelTitle=function ChannelTitle(_a){var language=_a.language,channelOrName=_a.channel,role=_a.role,className=_a.className;var user=useCurrentUser();var channels=useContext(LazySubscriptionContext).channels;var displayValue=getChannelDisplayName(channels,channelOrName,user,language);return jsx$1(Host$g$2,__assign$1({title:displayValue,className:className,role:role},{children:displayValue}),void 0);};var Host$g$2=_styled.span.withConfig({displayName:"ChannelTitle__Host",componentId:"sc-1lqd4of-0"})(templateObject_1$v$2||(templateObject_1$v$2=__makeTemplateObject$1(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));var ChannelTitles=function ChannelTitles(_a){var channels=_a.channels,language=_a.language;return jsx$1(Fragment,{children:channels.map(function(c,index){var channelKey=isChannel$1(c)?c.id:c;return jsxs("span",{children:[index>0&&', ',jsx$1(ChannelTitle,{channel:c,language:language},void 0)]},channelKey);})},void 0);};function isChannel$1(value){return value.id!=null;}function getChannelDisplayName(allChannels,channelOrName,user,language){// Render the channel name if the channel details have not been loaded yet.
|
|
77708
|
+
},[showSearchInputField]);return jsxs(Fragment,{children:[showSearchInputField&&jsx$1(Search,{onChange:onSearchTextChange,onExecuteSearch:onExecuteSearch,searchText:searchText,onClear:function(){onSearchTextChange===null||onSearchTextChange===void 0?void 0:onSearchTextChange('');onToggle(false);},className:className,useLightTheme:isToolbarMode},void 0),!showSearchInputField&&(isToolbarMode?jsx$1(ToolbarIconButton,{iconName:"Search",onClick:function(){return onToggle(true);},tooltipResourceKey:"TopBar.search",ariaLabelResourceKey:"TopBar.search"},void 0):jsx$1(IconHeaderButton,{icon:"Search",onClick:function(){return onToggle(true);},tooltipResourceKey:"TopBar.search"},void 0))]},void 0);function onToggle(isVisible){setShowSearchInputField(isVisible);onSearchInputFieldVisibilityChanged===null||onSearchInputFieldVisibilityChanged===void 0?void 0:onSearchInputFieldVisibilityChanged(isVisible);}};var templateObject_1$I$1,templateObject_2$u$1,templateObject_3$l$1,templateObject_4$c$2,templateObject_5$7$2,templateObject_6$4$2,templateObject_7$2$2,templateObject_8$2$2;var TableSortOrder;(function(TableSortOrder){TableSortOrder["ASC"]="SortUp";TableSortOrder["DESC"]="SortDown";})(TableSortOrder||(TableSortOrder={}));_styled(Icon).withConfig({displayName:"SortableTable__Order",componentId:"sc-6tqdpa-0"})(templateObject_1$H$1||(templateObject_1$H$1=__makeTemplateObject$1(["\n position: absolute;\n right: 0;\n"],["\n position: absolute;\n right: 0;\n"])));_styled.span.withConfig({displayName:"SortableTable__Title",componentId:"sc-6tqdpa-1"})(templateObject_4$b$2||(templateObject_4$b$2=__makeTemplateObject$1(["\n position: relative;\n padding: 0 5px;\n ","\n"],["\n position: relative;\n padding: 0 5px;\n ","\n"])),function(p){return p.orderBy?css$2(templateObject_2$t$1||(templateObject_2$t$1=__makeTemplateObject$1(["\n padding-right: 18px;\n "],["\n padding-right: 18px;\n "]))):css$2(templateObject_3$k$1||(templateObject_3$k$1=__makeTemplateObject$1(["\n padding-left: 18px;\n "],["\n padding-left: 18px;\n "])));});_styled.th.withConfig({displayName:"SortableTable__ColumnHeader",componentId:"sc-6tqdpa-2"})(templateObject_5$6$2||(templateObject_5$6$2=__makeTemplateObject$1(["\n text-align: right;\n padding: 10px 5px;\n white-space: nowrap;\n\n :hover {\n cursor: ",";\n }\n\n :first-child {\n text-align: left;\n\n span {\n padding-left: 0;\n padding-right: 15px;\n }\n }\n"],["\n text-align: right;\n padding: 10px 5px;\n white-space: nowrap;\n\n :hover {\n cursor: ",";\n }\n\n :first-child {\n text-align: left;\n\n span {\n padding-left: 0;\n padding-right: 15px;\n }\n }\n"])),function(_a){var isLoading=_a.isLoading,disableSort=_a.disableSort;return isLoading?'wait':disableSort?'default':'pointer';});_styled.td.withConfig({displayName:"SortableTable__Cell",componentId:"sc-6tqdpa-3"})(templateObject_6$3$2||(templateObject_6$3$2=__makeTemplateObject$1(["\n text-align: right;\n padding: 2px 5px;\n white-space: ",";\n\n :first-child {\n text-align: left;\n }\n"],["\n text-align: right;\n padding: 2px 5px;\n white-space: ",";\n\n :first-child {\n text-align: left;\n }\n"])),function(props){return props.noWrap?'nowrap':'';});var Row$1=_styled.tr.withConfig({displayName:"SortableTable__Row",componentId:"sc-6tqdpa-4"})(templateObject_7$1$2||(templateObject_7$1$2=__makeTemplateObject$1(["\n :nth-child(odd) {\n background: ",";\n }\n"],["\n :nth-child(odd) {\n background: ",";\n }\n"])),function(p){return p.theme.palette.neutralLighterAlt;});_styled.table.withConfig({displayName:"SortableTable__Table",componentId:"sc-6tqdpa-5"})(templateObject_8$1$2||(templateObject_8$1$2=__makeTemplateObject$1(["\n width: 100%;\n border-collapse: collapse;\n\n :hover {\n cursor: ",";\n }\n\n "," {\n transition: opacity 0.1s linear;\n opacity: ",";\n }\n"],["\n width: 100%;\n border-collapse: collapse;\n\n :hover {\n cursor: ",";\n }\n\n "," {\n transition: opacity 0.1s linear;\n opacity: ",";\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?'wait':'default';},Row$1,function(_a){var isLoading=_a.isLoading;return isLoading?'0.6':'1';});_styled(Spinner).withConfig({displayName:"SortableTable__Loading",componentId:"sc-6tqdpa-6"})(templateObject_9$1$2||(templateObject_9$1$2=__makeTemplateObject$1(["\n margin: 80px 0 100px;\n"],["\n margin: 80px 0 100px;\n"])));var templateObject_1$H$1,templateObject_2$t$1,templateObject_3$k$1,templateObject_4$b$2,templateObject_5$6$2,templateObject_6$3$2,templateObject_7$1$2,templateObject_8$1$2,templateObject_9$1$2;var ToggleWithLabel=function ToggleWithLabel(props){return jsx$1(StyledToggle,__assign$1({},props,{"data-toggle-button":true}),void 0);};var StyledToggle=_styled(Toggle).withConfig({displayName:"ToggleWithLabel__StyledToggle",componentId:"sc-lcovfq-0"})(templateObject_1$G$1||(templateObject_1$G$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n\n > label {\n order: 1;\n margin-left: 15px;\n }\n\n &.is-checked.is-enabled {\n button:hover {\n background-color: ",";\n }\n }\n"],["\n display: flex;\n align-items: center;\n\n > label {\n order: 1;\n margin-left: 15px;\n }\n\n &.is-checked.is-enabled {\n button:hover {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.semanticColors.inputBackgroundCheckedHovered;});var templateObject_1$G$1;var unreadCommentHighlight=css$2(templateObject_1$F$1||(templateObject_1$F$1=__makeTemplateObject$1(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: 3px;\n left: 100%;\n display: block;\n width: 12px;\n height: 12px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n background-color: ",";\n }\n"],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: 3px;\n left: 100%;\n display: block;\n width: 12px;\n height: 12px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n background-color: ",";\n }\n"])),function(p){return p.theme.palette.accent;});var templateObject_1$F$1;function getGroupName(group,user,intl){return group.translations[user.preferredUiLanguage]||group.translations[getPreferredContentLanguage(user)]||group.name||intl.formatMessage({id:'Groups.defaultName'});}_styled.div.withConfig({displayName:"VerificationStatusIcon__Host",componentId:"sc-b3nb8-0"})(templateObject_2$s$1||(templateObject_2$s$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n\n ","\n"],["\n display: flex;\n align-items: center;\n\n ","\n"])),function(p){return p.isInvalid&&css$2(templateObject_1$E$1||(templateObject_1$E$1=__makeTemplateObject$1(["\n color: ",";\n "],["\n color: ",";\n "])),function(p){return p.theme.palette.redDark;});});_styled(Icon).withConfig({displayName:"VerificationStatusIcon__StatusIcon",componentId:"sc-b3nb8-1"})(templateObject_3$j$1||(templateObject_3$j$1=__makeTemplateObject$1(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingS);var templateObject_1$E$1,templateObject_2$s$1,templateObject_3$j$1;var OpacityAnimation=function OpacityAnimation(_a){var enterDuration=_a.enterDuration,leaveDuration=_a.leaveDuration,children=_a.children,style=_a.style,className=_a.className;var hasEnterDuration=!!enterDuration;var hasLeaveDuration=!!leaveDuration;var animationName="common-opacity-animation_"+enterDuration+"_"+leaveDuration;return jsxs(Fragment,{children:[jsx$1(AnimationStyle,{name:animationName,enterDuration:enterDuration,leaveDuration:leaveDuration},void 0),jsx$1(reactAddonsCssTransitionGroup,__assign$1({style:style,className:className,transitionName:animationName,transitionAppear:hasEnterDuration,transitionEnter:hasEnterDuration,transitionLeave:hasLeaveDuration,transitionLeaveTimeout:leaveDuration,transitionAppearTimeout:enterDuration,transitionEnterTimeout:enterDuration},{children:children}),void 0)]},void 0);};var AnimationStyle=createGlobalStyle(templateObject_1$D$1||(templateObject_1$D$1=__makeTemplateObject$1(["\n ."," {\n &-enter, &-apear {\n opacity: 0;\n &-active {\n opacity: 1;\n transition: opacity ","ms ease-in;\n }\n }\n &-leave {\n opacity: 1;\n &-active {\n opacity: 0;\n transition: opacity ","ms ease-in;\n }\n }\n }\n"],["\n ."," {\n &-enter, &-apear {\n opacity: 0;\n &-active {\n opacity: 1;\n transition: opacity ","ms ease-in;\n }\n }\n &-leave {\n opacity: 1;\n &-active {\n opacity: 0;\n transition: opacity ","ms ease-in;\n }\n }\n }\n"])),function(p){return p.name;},function(p){return p.enterDuration;},function(p){return p.leaveDuration;});var templateObject_1$D$1;var AutoTranslateButton=function AutoTranslateButton(_a){var contentLanguageCode=_a.contentLanguageCode,originalContent=_a.originalContent,content=_a.content,onTranslate=_a.onTranslate,onContentChange=_a.onContentChange,tooltipResourceKey=_a.tooltipResourceKey,showLabel=_a.showLabel;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=useState$2(null),autoTranslatedContent=_b[0],setAutoTranslatedContent=_b[1];var _c=useState$2(originalContent===content),isOriginalContent=_c[0],setIsOriginalContent=_c[1];var showError=useNotificationContext().showError;var preferredContentLanguageCode=getPreferredContentLanguage(user);useEffect$1(function(){return setAutoTranslatedContent(null);},[originalContent]);if(!features.automaticTranslation){return null;}var label=formatMessage({id:'Generic.translate'});var shouldShowTranslateButton=contentLanguageCode&&contentLanguageCode!==preferredContentLanguageCode&&allAvailableContentLanguages.includes(preferredContentLanguageCode)&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguageCode);if(!shouldShowTranslateButton){return null;}return jsx$1(Tooltip,__assign$1({resourceKey:isOriginalContent?'Generic.translateTo':tooltipResourceKey,values:{language:formatMessage({id:"Generic.languages."+preferredContentLanguageCode})}},{children:jsx$1(StyledActionButton$3,__assign$1({"aria-label":showLabel?null:label,"data-translate-content-button":true,className:"ms-fontColor-neutralSecondary",iconProps:{iconName:'World'},onClick:handleTranslate},{children:showLabel&&label}),void 0)}),void 0);function handleTranslate(){return __awaiter$1(this,void 0,void 0,function(){var translation;return __generator$1(this,function(_b){switch(_b.label){case 0:if(!isOriginalContent){onContentChange(originalContent);setIsOriginalContent(true);return [2/*return*/];}if(!autoTranslatedContent)return [3/*break*/,1];onContentChange(autoTranslatedContent);setIsOriginalContent(false);return [3/*break*/,4];case 1:_b.trys.push([1,3,,4]);return [4/*yield*/,onTranslate(preferredContentLanguageCode)];case 2:translation=_b.sent();onContentChange(translation);setAutoTranslatedContent(translation);setIsOriginalContent(false);return [3/*break*/,4];case 3:_b.sent();showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledActionButton$3=_styled(ActionButton)(templateObject_1$C$1||(templateObject_1$C$1=__makeTemplateObject$1(["\n &&& {\n i {\n color: ",";\n }\n }\n"],["\n &&& {\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$C$1;var ChoiceGroup=_styled(ChoiceGroup$1).withConfig({displayName:"ChoiceGroup",componentId:"sc-11bpj01-0"})(templateObject_1$B$1||(templateObject_1$B$1=__makeTemplateObject$1(["\n .ms-ChoiceField-field.is-checked {\n &:hover {\n &::before,\n &:after {\n border-color: ",";\n }\n }\n }\n"],["\n .ms-ChoiceField-field.is-checked {\n &:hover {\n &::before,\n &:after {\n border-color: ",";\n }\n }\n }\n"])),function(p){return p.theme.palette.accent;});var templateObject_1$B$1;var CommentActionMenu=function CommentActionMenu(_a){var comment=_a.comment,showEdit=_a.showEdit,showDelete=_a.showDelete,onDelete=_a.onDelete,isEditMode=_a.isEditMode,toggleEditMode=_a.toggleEditMode,originalContent=_a.originalContent,currentContent=_a.currentContent,setContent=_a.setContent,handleTranslate=_a.handleTranslate,showAutoTranslate=_a.showAutoTranslate,onReply=_a.onReply,disabled=_a.disabled;var formatMessage=useIntl().formatMessage;var _b=useState$2(false),showMenuButtons=_b[0],setShowMenuButtons=_b[1];var menuButton=useRef$1(null);return jsxs(Fragment,{children:[jsx$1("div",__assign$1({ref:menuButton},{children:jsx$1(MenuButton$1,{"data-menu-button":comment.id,iconProps:{iconName:'MoreVertical'},onClick:function(){return setShowMenuButtons(!showMenuButtons);},ariaLabel:formatMessage({id:'AriaLabel.contextMenuButton'}),disabled:disabled},void 0)}),void 0),showMenuButtons&&jsx$1(StyledCallout$4,__assign$1({"data-context-menu":true,target:menuButton.current,onDismiss:function(){return setShowMenuButtons(false);}},{children:jsxs(Buttons$5,{children:[jsx$1(Tooltip,__assign$1({resourceKey:'Comment.replyButton.tooltip',values:{name:comment.sender.displayName}},{children:jsx$1(StyledActionButton$2,{"data-reply-button":comment.id,iconProps:{iconName:'Reply'},onClick:handleReply,text:formatMessage({id:'Comment.replyButton'})},void 0)}),void 0),showAutoTranslate&&jsx$1(AutoTranslateButton,{"data-auto-translate-button":comment.id,originalContent:originalContent,onContentChange:function(content){setShowMenuButtons(false);setContent(content);},content:currentContent,tooltipResourceKey:"Comment.translate.showOriginal",onTranslate:handleTranslate,contentLanguageCode:comment.contentLanguageCode,showLabel:true},void 0),showEdit&&jsx$1(Tooltip,__assign$1({resourceKey:"Comment.edit.tooltip"},{children:jsx$1(StyledActionButton$2,{"data-edit-button":comment.id,iconProps:{iconName:'Edit'},onClick:function(){toggleEditMode(true);setShowMenuButtons(false);},text:formatMessage({id:'Generic.edit'}),disabled:!comment.id||isEditMode},void 0)}),void 0),showDelete&&jsx$1(Tooltip,__assign$1({resourceKey:"Comment.delete.tooltip"},{children:jsx$1(StyledActionButton$2,{"data-delete-button":comment.id,iconProps:{iconName:'Delete'},onClick:function(){onDelete(comment);setShowMenuButtons(false);},text:formatMessage({id:'Generic.Delete'}),disabled:!comment.id||isEditMode},void 0)}),void 0)]},void 0)}),void 0)]},void 0);function handleReply(){onReply===null||onReply===void 0?void 0:onReply(comment.id,comment.sender);setShowMenuButtons(false);}};var Buttons$5=_styled.div.withConfig({displayName:"CommentActionMenu__Buttons",componentId:"sc-qsk1nc-0"})(templateObject_1$A$1||(templateObject_1$A$1=__makeTemplateObject$1(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var MenuButton$1=_styled(IconButton).withConfig({displayName:"CommentActionMenu__MenuButton",componentId:"sc-qsk1nc-1"})(templateObject_2$r$1||(templateObject_2$r$1=__makeTemplateObject$1(["\n && {\n width: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n margin: 0;\n font-size: ","px;\n }\n }\n"],["\n && {\n width: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n margin: 0;\n font-size: ","px;\n }\n }\n"])),fontSizeMedium+2);var StyledActionButton$2=_styled(ActionButton).withConfig({displayName:"CommentActionMenu__StyledActionButton",componentId:"sc-qsk1nc-2"})(templateObject_3$i$1||(templateObject_3$i$1=__makeTemplateObject$1(["\n &&& {\n i {\n color: ",";\n }\n }\n"],["\n &&& {\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var StyledCallout$4=_styled(Callout).withConfig({displayName:"CommentActionMenu__StyledCallout",componentId:"sc-qsk1nc-3"})(templateObject_4$a$2||(templateObject_4$a$2=__makeTemplateObject$1(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingS);var templateObject_1$A$1,templateObject_2$r$1,templateObject_3$i$1,templateObject_4$a$2;var DeleteAttachmentButton=_styled(IconButton$1).withConfig({displayName:"DeleteAttachmentButton",componentId:"sc-d7hswf-0"})(templateObject_1$z$1||(templateObject_1$z$1=__makeTemplateObject$1(["\n && {\n padding: ","px;\n color: ",";\n\n &:hover {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 14px;\n }\n }\n"],["\n && {\n padding: ","px;\n color: ",";\n\n &:hover {\n color: ",";\n }\n\n &:disabled {\n background-color: transparent;\n }\n\n i {\n font-size: 14px;\n }\n }\n"])),spacingXs,function(p){return p.theme.textColors.default;},function(p){return p.theme.textColors.default;});var templateObject_1$z$1;var ToggleAllButtons=function ToggleAllButtons(_a){var toggleAll=_a.toggleAll,className=_a.className;var accent=useContext(ThemeContext$1).theme.palette.accent;return jsxs(Host$h$2,__assign$1({className:className},{children:[jsx$1(StyledButton$1$1,__assign$1({onClick:function(){return toggleAll(true);},"data-button-toggle":"selectAll",color:accent},{children:jsx$1(FormattedMessage$1,{id:"Generic.SelectAll"},void 0)}),void 0),jsx$1(StyledButton$1$1,__assign$1({onClick:function(){return toggleAll(false);},"data-button-toggle":"clearAll",color:accent},{children:jsx$1(FormattedMessage$1,{id:"Generic.ClearAll"},void 0)}),void 0)]}),void 0);};var Host$h$2=_styled.div.withConfig({displayName:"ToggleAllButtons__Host",componentId:"sc-kbn3b4-0"})(templateObject_1$y$2||(templateObject_1$y$2=__makeTemplateObject$1(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var StyledButton$1$1=_styled(ActionButton).withConfig({displayName:"ToggleAllButtons__StyledButton",componentId:"sc-kbn3b4-1"})(templateObject_2$q$1||(templateObject_2$q$1=__makeTemplateObject$1(["\n && {\n height: 20px;\n padding-left: 0;\n padding-right: 8px;\n font-size: 10pt;\n }\n"],["\n && {\n height: 20px;\n padding-left: 0;\n padding-right: 8px;\n font-size: 10pt;\n }\n"])));var templateObject_1$y$2,templateObject_2$q$1;var InternalTopActionButton=function InternalTopActionButton(props){var iconName=props.iconName,textKey=props.textKey,navLinkProps=__rest$1(props,["iconName","textKey"]);return jsxs(NavLink,__assign$1({},navLinkProps,{children:[iconName&&jsx$1(Icon,{iconName:iconName},void 0),jsx$1(FormattedMessage$1,{id:textKey},void 0)]}),void 0);};_styled(InternalTopActionButton).withConfig({displayName:"TopActionButton",componentId:"sc-1lam7c6-0"})(templateObject_1$x$2||(templateObject_1$x$2=__makeTemplateObject$1(["\n && {\n font-size: initial;\n font-weight: bold;\n margin: 0 0 ","px 0;\n\n display: flex;\n align-items: center;\n align-self: flex-start;\n\n color: ",";\n }\n\n > i {\n padding-right: 8px;\n }\n"],["\n && {\n font-size: initial;\n font-weight: bold;\n margin: 0 0 ","px 0;\n\n display: flex;\n align-items: center;\n align-self: flex-start;\n\n color: ",";\n }\n\n > i {\n padding-right: 8px;\n }\n"])),spacingS,function(p){return p.theme.palette.accent;});var templateObject_1$x$2;_styled(IconButton).withConfig({displayName:"HeaderMenuButton__MenuButton",componentId:"sc-170vvq2-0"})(templateObject_1$w$2||(templateObject_1$w$2=__makeTemplateObject$1([""],[""])));var templateObject_1$w$2;var ChannelTitle=function ChannelTitle(_a){var language=_a.language,channelOrName=_a.channel,role=_a.role,className=_a.className;var user=useCurrentUser();var channels=useContext(LazySubscriptionContext).channels;var displayValue=getChannelDisplayName(channels,channelOrName,user,language);return jsx$1(Host$g$2,__assign$1({title:displayValue,className:className,role:role},{children:displayValue}),void 0);};var Host$g$2=_styled.span.withConfig({displayName:"ChannelTitle__Host",componentId:"sc-1lqd4of-0"})(templateObject_1$v$2||(templateObject_1$v$2=__makeTemplateObject$1(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));var ChannelTitles=function ChannelTitles(_a){var channels=_a.channels,language=_a.language;return jsx$1(Fragment,{children:channels.map(function(c,index){var channelKey=isChannel$1(c)?c.id:c;return jsxs("span",{children:[index>0&&', ',jsx$1(ChannelTitle,{channel:c,language:language},void 0)]},channelKey);})},void 0);};function isChannel$1(value){return value.id!=null;}function getChannelDisplayName(allChannels,channelOrName,user,language){// Render the channel name if the channel details have not been loaded yet.
|
|
77709
77709
|
if(allChannels==null&&!isChannel$1(channelOrName)){return channelOrName;}var channel=isChannel$1(channelOrName)?channelOrName:allChannels.find(function(c){return c.name===channelOrName||c.id===channelOrName;})||{name:channelOrName};if(channel==null){return null;}if(!language){language=getPreferredContentLanguage(user);}var translations=channel.translations||allChannels!=null&&allChannels.filter(function(c){return c.id===channel.id;}).map(function(c){return c.translations;})[0]||{};return language&&translations[language]||translations[user.subscription.defaultLanguage]||channel.name;}var templateObject_1$v$2;_styled(ChannelTitle).withConfig({displayName:"ChannelItem__StyledChannelTitle",componentId:"sc-bumcwu-0"})(templateObject_1$u$2||(templateObject_1$u$2=__makeTemplateObject$1(["\n margin-left: ","px;\n flex: 1 1 auto;\n font-size: ",";\n font-weight: bold;\n"],["\n margin-left: ","px;\n flex: 1 1 auto;\n font-size: ",";\n font-weight: bold;\n"])),function(p){return p.applyMargin?'37':'0';},fontSizeLarge);_styled.div.withConfig({displayName:"ChannelItem__Host",componentId:"sc-bumcwu-1"})(templateObject_2$p$1||(templateObject_2$p$1=__makeTemplateObject$1(["\n display: flex;\n flex-direction: row;\n align-items: center;\n box-sizing: border-box;\n min-height: 62px;\n padding: ","px ","px;\n\n ","\n\n .channel-drag-source {\n display: flex;\n align-items: center;\n flex: 0 0 auto;\n margin-right: 12px;\n\n i {\n font-size: ","px;\n }\n }\n"],["\n display: flex;\n flex-direction: row;\n align-items: center;\n box-sizing: border-box;\n min-height: 62px;\n padding: ","px ","px;\n\n ","\n\n .channel-drag-source {\n display: flex;\n align-items: center;\n flex: 0 0 auto;\n margin-right: 12px;\n\n i {\n font-size: ","px;\n }\n }\n"])),spacingS,spacingS+5,CardBorderInline(2,2),fontSizeLarge);_styled(IconButton).withConfig({displayName:"ChannelItem__StyledIconButton",componentId:"sc-bumcwu-2"})(templateObject_3$h$1||(templateObject_3$h$1=__makeTemplateObject$1(["\n i {\n font-size: ","px;\n }\n"],["\n i {\n font-size: ","px;\n }\n"])),fontSizeLarge);var templateObject_1$u$2,templateObject_2$p$1,templateObject_3$h$1;var ChannelList$1=function ChannelList(_a){var channels=_a.channels,language=_a.language,channelStyleDefinition=_a.channelStyleDefinition,_b=_a.visibleChannelsCount,visibleChannelsCount=_b===void 0?3:_b,onChannelClick=_a.onChannelClick,className=_a.className;if(!channels||channels.length===0){return null;}var showMoreIndicator=channels.length>visibleChannelsCount;return jsxs(Host$e$2,__assign$1({className:className,"data-has-more-indicator":showMoreIndicator},{children:[jsx$1(DisplayedChannels,{channels:channels.slice(0,visibleChannelsCount),language:language,channelStyleDefinition:channelStyleDefinition,onChannelClick:onChannelClick},void 0),showMoreIndicator&&jsx$1(AdditionalChannelsIndicator,{channels:channels.slice(visibleChannelsCount),language:language,styleDefinition:channelStyleDefinition,onChannelClick:onChannelClick},void 0)]}),void 0);};var DisplayedChannels=function DisplayedChannels(_a){var channels=_a.channels,language=_a.language,channelStyleDefinition=_a.channelStyleDefinition,onChannelClick=_a.onChannelClick;return jsx$1(ChannelsHost,__assign$1({"data-channels":true},{children:channels.map(function(c){var Title=jsx$1(ChannelTitle,{channel:c,language:language},void 0);if(onChannelClick){return jsx$1(ClickableChannelTitle,__assign$1({bubbleCount:channels.length,backgroundColor:channelStyleDefinition===null||channelStyleDefinition===void 0?void 0:channelStyleDefinition.backgroundColor,color:channelStyleDefinition===null||channelStyleDefinition===void 0?void 0:channelStyleDefinition.color,onClick:function(){return onChannelClick(c);},"data-rounded-outline":true},{children:Title}),c);}return jsx$1(StyledChannelTitle$1,__assign$1({bubbleCount:channels.length,backgroundColor:channelStyleDefinition===null||channelStyleDefinition===void 0?void 0:channelStyleDefinition.backgroundColor,color:channelStyleDefinition===null||channelStyleDefinition===void 0?void 0:channelStyleDefinition.color},{children:Title}),c);})}),void 0);};var AdditionalChannelsIndicator=function AdditionalChannelsIndicator(_a){var channels=_a.channels,language=_a.language,styleDefinition=_a.styleDefinition,onChannelClick=_a.onChannelClick;var ref=useRef$1();var _b=useState$2(false),showCallout=_b[0],setShowCallout=_b[1];return jsxs(Fragment,{children:[jsx$1(IndicatorHost,__assign$1({ref:ref,backgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.backgroundColor,color:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.color},{children:jsx$1(Indicator,__assign$1({onClick:function(){return setShowCallout(true);}},{children:"+"+channels.length}),void 0)}),void 0),showCallout&&jsx$1(StyledCallout$3,__assign$1({target:ref.current,onDismiss:function(){return setShowCallout(false);}},{children:jsx$1(CalloutList,{children:channels.map(function(c){return jsx$1("li",{children:onChannelClick?jsx$1(ActionButton,__assign$1({onClick:function(){return onChannelClick(c);}},{children:jsx$1(ChannelTitle,{channel:c,language:language},void 0)}),void 0):jsx$1(ChannelTitle,{channel:c,language:language},void 0)},c);})},void 0)}),void 0)]},void 0);};var BubbleGap=spacingXs;var IndicatorWidth=50;// We calculate the space available to show the channel bubbles based on the following factors:
|
|
77710
77710
|
// The full width of the container => 100%
|
|
77711
77711
|
// Minus the indicator width which might not be there in the case we have 3 channels or less
|
|
77712
77712
|
var Host$e$2=_styled.div(templateObject_1$t$2||(templateObject_1$t$2=__makeTemplateObject$1(["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ","px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"],["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ","px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"])),IndicatorWidth+BubbleGap);var ChannelsHost=_styled.div(templateObject_2$o$1||(templateObject_2$o$1=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));// Max channel width: Divide the space by the number of bubbles we need to display minus bubble gap - 6px
|
|
77713
|
-
var ClickableChannelTitle=_styled(ActionButton)(templateObject_3$g$
|
|
77713
|
+
var ClickableChannelTitle=_styled(ActionButton)(templateObject_3$g$2||(templateObject_3$g$2=__makeTemplateObject$1(["\n z-index: 1;\n height: inherit;\n padding: 0;\n\n ","\n span {\n width: 100%;\n }\n"],["\n z-index: 1;\n height: inherit;\n padding: 0;\n\n ","\n span {\n width: 100%;\n }\n"])),function(p){return BubbleStyle(p.bubbleCount,p.backgroundColor,p.color);});var StyledChannelTitle$1=_styled.span(templateObject_4$9$2||(templateObject_4$9$2=__makeTemplateObject$1(["\n ","\n"],["\n ","\n"])),function(p){return BubbleStyle(p.bubbleCount,p.backgroundColor,p.color);});var BubbleStyle=function BubbleStyle(bubbleCount,backgroundColor,color){return css$2(templateObject_7$o||(templateObject_7$o=__makeTemplateObject$1(["\n ","\n\n ","\n\n ","\n "],["\n ","\n\n ","\n\n ","\n "])),bubbleCount&&css$2(templateObject_5$5$2||(templateObject_5$5$2=__makeTemplateObject$1(["\n max-width: calc(100% / "," - ","px);\n "],["\n max-width: calc(100% / "," - ","px);\n "])),bubbleCount,BubbleGap),bubbleCount&&bubbleCount>1&&css$2(templateObject_6$2$2||(templateObject_6$2$2=__makeTemplateObject$1(["\n margin-right: ","px;\n "],["\n margin-right: ","px;\n "])),BubbleGap),HighlightBubble({backgroundColor:backgroundColor,color:color}));};var IndicatorHost=_styled.div(templateObject_8$m||(templateObject_8$m=__makeTemplateObject$1(["\n z-index: 1;\n margin-left: ","px;\n\n ","\n"],["\n z-index: 1;\n margin-left: ","px;\n\n ","\n"])),BubbleGap,function(p){return HighlightBubble({backgroundColor:p.backgroundColor,color:p.color});});var Indicator=_styled(ActionButton)(templateObject_9$h||(templateObject_9$h=__makeTemplateObject$1(["\n &&& {\n height: auto;\n color: inherit;\n padding: 0;\n }\n"],["\n &&& {\n height: auto;\n color: inherit;\n padding: 0;\n }\n"])));var StyledCallout$3=_styled(Callout)(templateObject_10$f||(templateObject_10$f=__makeTemplateObject$1(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingXs);var CalloutList=_styled.ul(templateObject_11$a||(templateObject_11$a=__makeTemplateObject$1(["\n margin: 0;\n padding: 0;\n list-style: none;\n"],["\n margin: 0;\n padding: 0;\n list-style: none;\n"])));var templateObject_1$t$2,templateObject_2$o$1,templateObject_3$g$2,templateObject_4$9$2,templateObject_5$5$2,templateObject_6$2$2,templateObject_7$o,templateObject_8$m,templateObject_9$h,templateObject_10$f,templateObject_11$a;var ClickableChannelTitles=function ClickableChannelTitles(_a){var channels=_a.channels,buildChannelFilterUrl=_a.buildChannelFilterUrl,language=_a.language,channelBackgroundColor=_a.channelBackgroundColor,onClick=_a.onClick,className=_a.className;if(!(channels===null||channels===void 0?void 0:channels.length)){return null;}return jsx$1(Host$d$2,__assign$1({className:className,"data-channels":channels.join(',')},{children:channels.map(function(c){var channelKey=isChannel(c)?c.id:c;var title=jsx$1(ChannelBubble,__assign$1({backgroundColor:channelBackgroundColor},{children:jsx$1(ChannelTitle,{channel:c,language:language},void 0)}),void 0);return jsxs("li",{children:[buildChannelFilterUrl&&jsx$1(ChannelLink,__assign$1({"data-channel":true,to:buildChannelFilterUrl(isChannel(c)?c.name:c),"data-rounded-outline":true},{children:title}),void 0),onClick&&jsx$1(StyledActionButton$1,__assign$1({"data-rounded-outline":true,onClick:function(){return onClick(isChannel(c)?c.name:c);}},{children:title}),void 0),!onClick&&!buildChannelFilterUrl&&jsx$1(ChannelBubbleWrapper,{children:title},void 0)]},channelKey);})}),void 0);};function isChannel(value){return value.id!=null;}var Host$d$2=_styled.ul.withConfig({displayName:"ClickableChannelTitles__Host",componentId:"sc-1a7ny18-0"})(templateObject_1$s$2||(templateObject_1$s$2=__makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n\n li {\n margin: 0;\n span {\n white-space: break-spaces;\n }\n }\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n\n li {\n margin: 0;\n span {\n white-space: break-spaces;\n }\n }\n }\n"])),fontSizeSmall);var ChannelBubble=_styled.div.withConfig({displayName:"ClickableChannelTitles__ChannelBubble",componentId:"sc-1a7ny18-1"})(templateObject_2$n$1||(templateObject_2$n$1=__makeTemplateObject$1(["\n ","\n"],["\n ","\n"])),function(p){return p.backgroundColor?HighlightBubble({backgroundColor:p.backgroundColor}):HighlightBubble();});var ChannelLink=_styled(NavLink).withConfig({displayName:"ClickableChannelTitles__ChannelLink",componentId:"sc-1a7ny18-2"})(templateObject_3$f$2||(templateObject_3$f$2=__makeTemplateObject$1(["\n position: relative;\n z-index: 1;\n color: ",";\n display: inline-block;\n margin: 2px ","px 2px 0;\n"],["\n position: relative;\n z-index: 1;\n color: ",";\n display: inline-block;\n margin: 2px ","px 2px 0;\n"])),function(p){return p.theme.textColors.default;},spacingXs);var ChannelBubbleWrapper=_styled.span.withConfig({displayName:"ClickableChannelTitles__ChannelBubbleWrapper",componentId:"sc-1a7ny18-3"})(templateObject_4$8$2||(templateObject_4$8$2=__makeTemplateObject$1(["\n display: block;\n margin: 2px ","px 2px 0;\n"],["\n display: block;\n margin: 2px ","px 2px 0;\n"])),spacingXs);var StyledActionButton$1=_styled(ActionButton).withConfig({displayName:"ClickableChannelTitles__StyledActionButton",componentId:"sc-1a7ny18-4"})(templateObject_5$4$2||(templateObject_5$4$2=__makeTemplateObject$1(["\n && {\n height: auto;\n padding: 0;\n margin: 2px ","px 2px 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin: 2px ","px 2px 0;\n }\n"])),spacingXs);var templateObject_1$s$2,templateObject_2$n$1,templateObject_3$f$2,templateObject_4$8$2,templateObject_5$4$2;var ChannelSelector=function ChannelSelector(_a){var selectedChannelIds=_a.selectedChannelIds,selectedChannelNames=_a.selectedChannelNames,mandatoryChannelIds=_a.mandatoryChannelIds,availableChannels=_a.availableChannels,showOnlyUserChannels=_a.showOnlyUserChannels,onChannelsChanged=_a.onChannelsChanged,className=_a.className,showSelectionToggle=_a.showSelectionToggle,placeholder=_a.placeholder,inlineControls=_a.inlineControls,required=_a.required,id=_a.id;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var channels=useContext(LazySubscriptionContext).channels;var options=usePromise$2(function(){return __awaiter$1(void 0,void 0,void 0,function(){return __generator$1(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getOptions()];case 1:return [2/*return*/,_a.sent()];}});});},null,[channels,availableChannels,showOnlyUserChannels])[0];var responsiveMode=(options===null||options===void 0?void 0:options.length)>10&&env.isNativeMobileApp?ResponsiveMode.small:ResponsiveMode.large;if(!channels){return null;}var selectedIds=getSelectedIds()||[];return jsxs(Host$c$1,{children:[showSelectionToggle&&jsx$1(ToggleAllButtons,{toggleAll:handleToggleAll},void 0),jsx$1(StyledTooltip$4,__assign$1({directionalHint:DirectionalHint$1.bottomCenter,tooltipProps:{onRenderContent:function(){return jsxs(Fragment,{children:[jsx$1(TooltipTitle,{id:"Channels.callout.title",tagName:"h3"},void 0),jsx$1(Channels$3,{channels:getSelectedChannelNames()},void 0)]},void 0);}},hidden:selectedIds.length<2},{children:jsx$1(Dropdown,{ariaLabel:formatMessage({id:'AriaLabel.filter.filterByChannel'}),"data-channel-selector":true,placeholder:formatMessage({id:placeholder||'Channels.Placeholder'}),responsiveMode:responsiveMode,className:className,options:options||[],selectedKeys:selectedIds,multiSelect:true,onChange:handleChange,onRenderTitle:renderTitles,onRenderOption:function(option){return option.key==='Controls'?jsx$1(ToggleAllButtons,{toggleAll:handleToggleAll},void 0):jsx$1(ChannelTitle,{channel:option.data,language:user.preferredUiLanguage,role:"option"},option.key);},calloutProps:{className:'channels-dropdown-callout'},"aria-required":required,id:id},void 0)}),void 0)]},void 0);function getSelectedChannelNames(){var _a;return (_a=channels===null||channels===void 0?void 0:channels.filter(function(c){return selectedIds.includes(c.id);}))===null||_a===void 0?void 0:_a.map(function(c){return c.name;});}function renderTitles(value){var selectedOptions=isSingleOption(value)?[value]:value;selectedOptions=selectedOptions.filter(function(option){return option.key!=='Controls';});return jsx$1(ChannelTitles,{channels:selectedOptions.map(function(o){return o.data;}),language:user.preferredUiLanguage},void 0);}function isSingleOption(value){return value.key!=null;}function handleChange(_,option){var changedId=option.key;var currentSelection=selectedIds;var newSelection=currentSelection.indexOf(changedId)>=0?// handle remove
|
|
77714
77714
|
currentSelection.filter(function(id){return id!==option.key;}):// handle add
|
|
77715
|
-
currentSelection.concat([changedId]);onChannelsChanged(newSelection.map(function(id){return channels.find(function(c){return c.id===id;});}).filter(function(ch){return ch!=null;}));}function handleToggleAll(checkAll){return __awaiter$1(this,void 0,void 0,function(){var options;return __generator$1(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getOptions()];case 1:options=_a.sent().map(function(option){return channels.find(function(c){return c.id===option.key;});});onChannelsChanged(checkAll?options.filter(function(ch){return ch!=null;}):options.filter(function(ch){return ch!=null&&(mandatoryChannelIds===null||mandatoryChannelIds===void 0?void 0:mandatoryChannelIds.includes(ch.id));}));return [2/*return*/];}});});}function getSelectedIds(){if(selectedChannelNames!=null){var ids=selectedChannelNames.map(function(name){return channels.find(function(ch){return ch.name===name;});}).filter(function(ch){return ch!=null;}).map(function(ch){return ch.id;});ids=ids.concat(mandatoryChannelIds||[]);return Array.from(new Set(ids));}return Array.from(new Set((selectedChannelIds||[]).concat(mandatoryChannelIds||[])));}function getOptions(){return __awaiter$1(this,void 0,void 0,function(){var result;return __generator$1(this,function(_a){result=[];if(inlineControls){result.push({key:'Controls',text:'',itemType:DropdownMenuItemType.Header});}if(availableChannels){return [2/*return*/,__spreadArray$1(__spreadArray$1([],result),availableChannels.map(function(c){return getChannelOption(c);}))];}return [2/*return*/,__spreadArray$1(__spreadArray$1([],result),!showOnlyUserChannels?(channels===null||channels===void 0?void 0:channels.map(function(c){return getChannelOption(c);}))||[]:user.channels.map(function(c){return getChannelOption(c);}))];});});}function getChannelOption(channel){return {key:channel.id,text:channel.name,data:channel,disabled:mandatoryChannelIds===null||mandatoryChannelIds===void 0?void 0:mandatoryChannelIds.some(function(id){return id===channel.id;})};}};var Host$c$1=_styled.div.withConfig({displayName:"ChannelSelector__Host",componentId:"sc-2h27u4-0"})(templateObject_1$r$2||(templateObject_1$r$2=__makeTemplateObject$1(["\n width: 100%;\n"],["\n width: 100%;\n"])));var Channels$3=_styled(ClickableChannelTitles).withConfig({displayName:"ChannelSelector__Channels",componentId:"sc-2h27u4-1"})(templateObject_2$m$1||(templateObject_2$m$1=__makeTemplateObject$1(["\n &&& li {\n margin-top: ","px;\n }\n"],["\n &&& li {\n margin-top: ","px;\n }\n"])),spacingXs);var StyledTooltip$4=_styled(TooltipHost$1).withConfig({displayName:"ChannelSelector__StyledTooltip",componentId:"sc-2h27u4-2"})(templateObject_3$e$2||(templateObject_3$e$2=__makeTemplateObject$1(["\n max-width: 300px;\n padding: 0 ","px ","px;\n"],["\n max-width: 300px;\n padding: 0 ","px ","px;\n"])),spacingM,spacingM);var TooltipTitle=_styled(FormattedMessageWithStyle).withConfig({displayName:"ChannelSelector__TooltipTitle",componentId:"sc-2h27u4-3"})(templateObject_4$7$2||(templateObject_4$7$2=__makeTemplateObject$1(["\n font-size: ","px;\n // this needs to be 10px but the channels already have margin top of 6px\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n // this needs to be 10px but the channels already have margin top of 6px\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS-spacingXs);var templateObject_1$r$2,templateObject_2$m$1,templateObject_3$e$2,templateObject_4$7$2;var ToolbarSearch=function ToolbarSearch(_a){var searchText=_a.searchText,onSearchTextChange=_a.onSearchTextChange,onExecuteSearch=_a.onExecuteSearch,onSearchIconClick=_a.onSearchIconClick,onSearchInputFieldVisibilityChanged=_a.onSearchInputFieldVisibilityChanged;return jsxs(Fragment,{children:[jsx$1(SearchBoxLargeScreen,{children:jsx$1(SearchBox,{searchText:searchText,onSearchTextChange:onSearchTextChange,onExecuteSearch:onExecuteSearch,onSearchInputFieldVisibilityChanged:onSearchInputFieldVisibilityChanged,isToolbarMode:true},void 0)},void 0),jsx$1(SearchIconSmallScreen,{children:jsx$1(ToolbarIconButton,{iconName:"Search",onClick:onSearchIconClick,tooltipResourceKey:"TopBar.search",ariaLabelResourceKey:"TopBar.search"},void 0)},void 0)]},void 0);};var SearchBoxLargeScreen=_styled.div.withConfig({displayName:"ToolbarSearch__SearchBoxLargeScreen",componentId:"sc-1f480ry-0"})(templateObject_1$q$2||(templateObject_1$q$2=__makeTemplateObject$1(["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var SearchIconSmallScreen=_styled.div.withConfig({displayName:"ToolbarSearch__SearchIconSmallScreen",componentId:"sc-1f480ry-1"})(templateObject_2$l$
|
|
77715
|
+
currentSelection.concat([changedId]);onChannelsChanged(newSelection.map(function(id){return channels.find(function(c){return c.id===id;});}).filter(function(ch){return ch!=null;}));}function handleToggleAll(checkAll){return __awaiter$1(this,void 0,void 0,function(){var options;return __generator$1(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getOptions()];case 1:options=_a.sent().map(function(option){return channels.find(function(c){return c.id===option.key;});});onChannelsChanged(checkAll?options.filter(function(ch){return ch!=null;}):options.filter(function(ch){return ch!=null&&(mandatoryChannelIds===null||mandatoryChannelIds===void 0?void 0:mandatoryChannelIds.includes(ch.id));}));return [2/*return*/];}});});}function getSelectedIds(){if(selectedChannelNames!=null){var ids=selectedChannelNames.map(function(name){return channels.find(function(ch){return ch.name===name;});}).filter(function(ch){return ch!=null;}).map(function(ch){return ch.id;});ids=ids.concat(mandatoryChannelIds||[]);return Array.from(new Set(ids));}return Array.from(new Set((selectedChannelIds||[]).concat(mandatoryChannelIds||[])));}function getOptions(){return __awaiter$1(this,void 0,void 0,function(){var result;return __generator$1(this,function(_a){result=[];if(inlineControls){result.push({key:'Controls',text:'',itemType:DropdownMenuItemType.Header});}if(availableChannels){return [2/*return*/,__spreadArray$1(__spreadArray$1([],result),availableChannels.map(function(c){return getChannelOption(c);}))];}return [2/*return*/,__spreadArray$1(__spreadArray$1([],result),!showOnlyUserChannels?(channels===null||channels===void 0?void 0:channels.map(function(c){return getChannelOption(c);}))||[]:user.channels.map(function(c){return getChannelOption(c);}))];});});}function getChannelOption(channel){return {key:channel.id,text:channel.name,data:channel,disabled:mandatoryChannelIds===null||mandatoryChannelIds===void 0?void 0:mandatoryChannelIds.some(function(id){return id===channel.id;})};}};var Host$c$1=_styled.div.withConfig({displayName:"ChannelSelector__Host",componentId:"sc-2h27u4-0"})(templateObject_1$r$2||(templateObject_1$r$2=__makeTemplateObject$1(["\n width: 100%;\n"],["\n width: 100%;\n"])));var Channels$3=_styled(ClickableChannelTitles).withConfig({displayName:"ChannelSelector__Channels",componentId:"sc-2h27u4-1"})(templateObject_2$m$1||(templateObject_2$m$1=__makeTemplateObject$1(["\n &&& li {\n margin-top: ","px;\n }\n"],["\n &&& li {\n margin-top: ","px;\n }\n"])),spacingXs);var StyledTooltip$4=_styled(TooltipHost$1).withConfig({displayName:"ChannelSelector__StyledTooltip",componentId:"sc-2h27u4-2"})(templateObject_3$e$2||(templateObject_3$e$2=__makeTemplateObject$1(["\n max-width: 300px;\n padding: 0 ","px ","px;\n"],["\n max-width: 300px;\n padding: 0 ","px ","px;\n"])),spacingM,spacingM);var TooltipTitle=_styled(FormattedMessageWithStyle).withConfig({displayName:"ChannelSelector__TooltipTitle",componentId:"sc-2h27u4-3"})(templateObject_4$7$2||(templateObject_4$7$2=__makeTemplateObject$1(["\n font-size: ","px;\n // this needs to be 10px but the channels already have margin top of 6px\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n // this needs to be 10px but the channels already have margin top of 6px\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS-spacingXs);var templateObject_1$r$2,templateObject_2$m$1,templateObject_3$e$2,templateObject_4$7$2;var ToolbarSearch=function ToolbarSearch(_a){var searchText=_a.searchText,onSearchTextChange=_a.onSearchTextChange,onExecuteSearch=_a.onExecuteSearch,onSearchIconClick=_a.onSearchIconClick,onSearchInputFieldVisibilityChanged=_a.onSearchInputFieldVisibilityChanged;return jsxs(Fragment,{children:[jsx$1(SearchBoxLargeScreen,{children:jsx$1(SearchBox,{searchText:searchText,onSearchTextChange:onSearchTextChange,onExecuteSearch:onExecuteSearch,onSearchInputFieldVisibilityChanged:onSearchInputFieldVisibilityChanged,isToolbarMode:true},void 0)},void 0),jsx$1(SearchIconSmallScreen,{children:jsx$1(ToolbarIconButton,{iconName:"Search",onClick:onSearchIconClick,tooltipResourceKey:"TopBar.search",ariaLabelResourceKey:"TopBar.search"},void 0)},void 0)]},void 0);};var SearchBoxLargeScreen=_styled.div.withConfig({displayName:"ToolbarSearch__SearchBoxLargeScreen",componentId:"sc-1f480ry-0"})(templateObject_1$q$2||(templateObject_1$q$2=__makeTemplateObject$1(["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var SearchIconSmallScreen=_styled.div.withConfig({displayName:"ToolbarSearch__SearchIconSmallScreen",componentId:"sc-1f480ry-1"})(templateObject_2$l$2||(templateObject_2$l$2=__makeTemplateObject$1(["\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n @media (min-width: ","px) {\n display: none;\n }\n"])),minScreenSize.medium);var templateObject_1$q$2,templateObject_2$l$2;var Toolbar$1=function Toolbar(_a){var leftSide=_a.leftSide,hideLeftSide=_a.hideLeftSide,rightSide=_a.rightSide,hideRightSide=_a.hideRightSide,search=_a.search,className=_a.className,children=_a.children;var _b=useState$2(false),isSearchInputFieldVisible=_b[0],setIsSearchInputFieldVisible=_b[1];return jsxs(Host$b$2,__assign$1({className:className,"data-content-toolbar":true},{children:[jsxs(Row,{children:[leftSide&&!hideLeftSide&&jsx$1(LeftSide$1,{children:leftSide},void 0),(rightSide||search)&&!hideRightSide&&jsxs(RightSide$1,{children:[search&&jsx$1(ToolbarSearch,{searchText:search.searchText,onSearchTextChange:search.onSearchTextChange,onExecuteSearch:search.onExecuteSearch,onSearchIconClick:handleSearchIconClick,onSearchInputFieldVisibilityChanged:function(isVisible){return setIsSearchInputFieldVisible(isVisible);}},void 0),rightSide]},void 0)]},void 0),children,search&&isSearchInputFieldVisible&&jsx$1(SearchInputRow,{children:jsx$1(Search,{onClear:handleClearSearch,searchText:search.searchText,onChange:search.onSearchTextChange,onExecuteSearch:search.onExecuteSearch,useLightTheme:true},void 0)},void 0)]}),void 0);function handleSearchIconClick(){var shouldShowSearch=!isSearchInputFieldVisible;if(shouldShowSearch){setIsSearchInputFieldVisible(true);}else {handleClearSearch();}}function handleClearSearch(){var _a;(_a=search.onSearchTextChange)===null||_a===void 0?void 0:_a.call(search,'');setIsSearchInputFieldVisible(false);}};var Host$b$2=_styled.div.withConfig({displayName:"Toolbar__Host",componentId:"sc-16ftbxt-0"})(templateObject_1$p$2||(templateObject_1$p$2=__makeTemplateObject$1(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n justify-content: center;\n background-color: ",";\n box-shadow: 1px 1px 4px grey;\n padding: ","px;\n min-height: 36px;\n\n // min-width required if you want to use overflow:hidden or similar stuff on parent elements\n // see: https://stackoverflow.com/questions/43809612/prevent-a-child-element-from-overflowing-its-parent-in-flexbox\n min-width: 0;\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n justify-content: center;\n background-color: ",";\n box-shadow: 1px 1px 4px grey;\n padding: ","px;\n min-height: 36px;\n\n // min-width required if you want to use overflow:hidden or similar stuff on parent elements\n // see: https://stackoverflow.com/questions/43809612/prevent-a-child-element-from-overflowing-its-parent-in-flexbox\n min-width: 0;\n"])),function(p){return p.theme.palette.white;},spacingXxs);var LeftSide$1=_styled.div.withConfig({displayName:"Toolbar__LeftSide",componentId:"sc-16ftbxt-1"})(templateObject_2$k$2||(templateObject_2$k$2=__makeTemplateObject$1(["\n display: flex;\n\n flex-wrap: nowrap;\n flex: 1 1 auto;\n\n min-width: 0;\n"],["\n display: flex;\n\n flex-wrap: nowrap;\n flex: 1 1 auto;\n\n min-width: 0;\n"])));var RightSide$1=_styled.div.withConfig({displayName:"Toolbar__RightSide",componentId:"sc-16ftbxt-2"})(templateObject_3$d$2||(templateObject_3$d$2=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex: 1 1 auto;\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex: 1 1 auto;\n"])));var Row=_styled.div.withConfig({displayName:"Toolbar__Row",componentId:"sc-16ftbxt-3"})(templateObject_4$6$2||(templateObject_4$6$2=__makeTemplateObject$1(["\n display: flex;\n flex: 1 1 auto;\n\n min-width: 0;\n"],["\n display: flex;\n flex: 1 1 auto;\n\n min-width: 0;\n"])));var SearchInputRow=_styled.div.withConfig({displayName:"Toolbar__SearchInputRow",componentId:"sc-16ftbxt-4"})(templateObject_5$3$2||(templateObject_5$3$2=__makeTemplateObject$1(["\n display: flex;\n width: 100%;\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n width: 100%;\n @media (min-width: ","px) {\n display: none;\n }\n"])),minScreenSize.medium);var templateObject_1$p$2,templateObject_2$k$2,templateObject_3$d$2,templateObject_4$6$2,templateObject_5$3$2;_styled(Toolbar$1).withConfig({displayName:"ChromelessToolbar__StyledToolbar",componentId:"sc-1vovywb-0"})(templateObject_1$o$2||(templateObject_1$o$2=__makeTemplateObject$1(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);createGlobalStyle(templateObject_2$j$2||(templateObject_2$j$2=__makeTemplateObject$1(["\n [data-detail-page-container] {\n [data-content-toolbar] {\n @media (max-width: ","px) {\n margin-top: ","px;\n }\n }\n }\n"],["\n [data-detail-page-container] {\n [data-content-toolbar] {\n @media (max-width: ","px) {\n margin-top: ","px;\n }\n }\n }\n"])),minScreenSize.large,spacingM);var templateObject_1$o$2,templateObject_2$j$2;// todo: Apply this to all pages and make sure it works in IE
|
|
77716
77716
|
_styled.p.withConfig({displayName:"PageDescription",componentId:"sc-xcsmz7-0"})(templateObject_1$n$2||(templateObject_1$n$2=__makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n line-height: 1.5em;\n span {\n flex: 1 1 100%;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n line-height: 1.5em;\n span {\n flex: 1 1 100%;\n }\n"])));var templateObject_1$n$2;_styled.div.withConfig({displayName:"DragSource__Host",componentId:"sc-qzjyds-0"})(templateObject_1$m$2||(templateObject_1$m$2=__makeTemplateObject$1([""],[""])));var templateObject_1$m$2;var EmojiButton=function EmojiButton(_a){var onEmojiSelected=_a.onEmojiSelected,disabled=_a.disabled;var iconButton=useRef$1(null);var _b=useState$2(false),showCallout=_b[0],setShowCallout=_b[1];var formatMessage=useIntl().formatMessage;return jsxs(Fragment,{children:[jsx$1(ButtonWrapper,__assign$1({ref:iconButton},{children:jsx$1(IconButton,{"data-emoji-button":true,iconProps:{iconName:'Emoji2'},onClick:function(){return setShowCallout(true);},disabled:disabled,ariaLabel:formatMessage({id:'AriaLabel.emojiButton'})},void 0)}),void 0),showCallout&&jsx$1(StyledCallout$2,__assign$1({directionalHint:DirectionalHint.topCenter,target:iconButton.current,onDismiss:function(){return setShowCallout(false);},isBeakVisible:false,gapSpace:10,preventDismissOnScroll:true,styles:{calloutMain:{padding:spacingS-5}}},{children:jsx$1(EmojiPicker,{onSelect:handleSelect},void 0)}),void 0)]},void 0);function handleSelect(emoji){setShowCallout(false);onEmojiSelected(emoji.native);}};var ButtonWrapper=_styled.div.withConfig({displayName:"EmojiButton__ButtonWrapper",componentId:"sc-1eq2zlz-0"})(templateObject_1$l$2||(templateObject_1$l$2=__makeTemplateObject$1([""],[""])));var StyledCallout$2=_styled(Callout).withConfig({displayName:"EmojiButton__StyledCallout",componentId:"sc-1eq2zlz-1"})(templateObject_2$i$2||(templateObject_2$i$2=__makeTemplateObject$1(["\n border-radius: 10px;\n overflow: hidden;\n"],["\n border-radius: 10px;\n overflow: hidden;\n"])));var LazyEmojiPicker=/*#__PURE__*/lazy$1(function(){return import('./EmojiPicker.esm.esm.js');});var EmojiPicker=function EmojiPicker(_a){var onSelect=_a.onSelect;var windowSize=useWindowSize$2();return jsx$1(Suspense,__assign$1({fallback:jsx$1(EmojiPickerSuspenseHost,__assign$1({isSmaller:windowSize.width<minScreenSize.small},{children:jsx$1(Spinner,{},void 0)}),void 0)},{children:jsx$1(LazyEmojiPicker,{onSelect:onSelect},void 0)}),void 0);};var EmojiPickerSuspenseHost=_styled.div.withConfig({displayName:"EmojiButton__EmojiPickerSuspenseHost",componentId:"sc-1eq2zlz-2"})(templateObject_3$c$2||(templateObject_3$c$2=__makeTemplateObject$1(["\n // we set an initial width which is similar to what the emoji picker will be once it's loaded\n // we have to do this so the callout is rendered in the correct place\n width: ","px;\n height: 400px;\n"],["\n // we set an initial width which is similar to what the emoji picker will be once it's loaded\n // we have to do this so the callout is rendered in the correct place\n width: ","px;\n height: 400px;\n"])),function(p){return p.isSmaller?319:400;});var templateObject_1$l$2,templateObject_2$i$2,templateObject_3$c$2;var GiphyAttribution=function GiphyAttribution(){var env=useConfiguration();return jsx$1(AttributionHost,{children:jsx$1("a",__assign$1({href:"https://giphy.com",target:"_blank",rel:"noreferrer"},{children:jsx$1("img",{src:env.webAppUrl+"/assets/giphy/PoweredBy_200px-White_HorizText.png",alt:"Giphy Attribution"},void 0)}),void 0)},void 0);};var AttributionHost=_styled.div(templateObject_1$k$2||(templateObject_1$k$2=__makeTemplateObject$1(["\n text-align: right;\n margin-top: ","px;\n"],["\n text-align: right;\n margin-top: ","px;\n"])),spacingXs);var templateObject_1$k$2;var GifSelector=function GifSelector(_a){var _b,_c;var onGifClick=_a.onGifClick,className=_a.className;var clientConfig=useClientConfig();var formatMessage=useIntl().formatMessage;var gf=new dist$1.GiphyFetch(clientConfig.giphy.apiKey);var _d=useState$2(null),searchText=_d[0],setSearchText=_d[1];var debouncedSearchText=useDebounce(searchText,500)[0];var windowSize=useWindowSize$2();var _e=usePromise$2(getGifs,null,[debouncedSearchText]),gifs=_e[0],loading=_e[1];var gifSize=windowSize.width<550?80:100;return jsxs(Host$9$2,__assign$1({className:className},{children:[jsx$1(SearchBox$1,{placeholder:formatMessage({id:'Gif.searchPlaceHolder'}),iconProps:{iconName:'Search'},onChange:function(_,v){return setSearchText(v);},autoFocus:true},void 0),jsxs(GifContainer,__assign$1({columnWidth:gifSize},{children:[loading&&jsx$1(Spinner,{delay:300},void 0),((_b=gifs===null||gifs===void 0?void 0:gifs.data)===null||_b===void 0?void 0:_b.length)===0&&jsx$1(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0),(_c=gifs===null||gifs===void 0?void 0:gifs.data)===null||_c===void 0?void 0:_c.map(function(g){return jsx$1(ClickableGif,{gif:g,width:gifSize,height:gifSize,noLink:true,hideAttribution:true,onGifClick:onGifClick},g.id);})]}),void 0)]}),void 0);function getGifs(){if(!debouncedSearchText){return gf.trending({limit:21});}return gf.search(debouncedSearchText,{limit:21});}};var Host$9$2=_styled.div.withConfig({displayName:"GifSelector__Host",componentId:"sc-lame6k-0"})(templateObject_1$j$2||(templateObject_1$j$2=__makeTemplateObject$1(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingXs);var GifContainer=_styled.div.withConfig({displayName:"GifSelector__GifContainer",componentId:"sc-lame6k-1"})(templateObject_2$h$2||(templateObject_2$h$2=__makeTemplateObject$1(["\n margin-top: ","px;\n display: grid;\n grid-template-columns: repeat(auto-fit, ","px);\n grid-gap: ","px;\n justify-content: space-around;\n"],["\n margin-top: ","px;\n display: grid;\n grid-template-columns: repeat(auto-fit, ","px);\n grid-gap: ","px;\n justify-content: space-around;\n"])),spacingS,function(p){return p.columnWidth;},spacingXs);var ClickableGif=_styled(dist$4.Gif).withConfig({displayName:"GifSelector__ClickableGif",componentId:"sc-lame6k-2"})(templateObject_3$b$2||(templateObject_3$b$2=__makeTemplateObject$1(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));var templateObject_1$j$2,templateObject_2$h$2,templateObject_3$b$2;var GifSelectorCallout=function GifSelectorCallout(_a){var target=_a.target,onGifClick=_a.onGifClick,onDismiss=_a.onDismiss;return jsxs(StyledCallout$1$1,__assign$1({directionalHint:DirectionalHint.topCenter,target:target,onDismiss:onDismiss,isBeakVisible:false,gapSpace:10,preventDismissOnResize:true,preventDismissOnScroll:true,styles:{calloutMain:{padding:spacingS-5}}},{children:[jsx$1(StyledGifSelector,{onGifClick:onGifClick},void 0),jsx$1(GiphyAttribution,{},void 0)]}),void 0);};var StyledCallout$1$1=_styled(Callout)(templateObject_1$i$2||(templateObject_1$i$2=__makeTemplateObject$1(["\n border-radius: 10px;\n overflow: hidden;\n width: 360px;\n height: 450px;\n"],["\n border-radius: 10px;\n overflow: hidden;\n width: 360px;\n height: 450px;\n"])));var StyledGifSelector=_styled(GifSelector)(templateObject_2$g$2||(templateObject_2$g$2=__makeTemplateObject$1(["\n overflow-y: auto;\n height: 400px;\n"],["\n overflow-y: auto;\n height: 400px;\n"])));var templateObject_1$i$2,templateObject_2$g$2;createGlobalStyle(templateObject_1$h$2||(templateObject_1$h$2=__makeTemplateObject$1(["\n .lt-reach.dialog-gif-selector {\n .ms-Dialog-main {\n width: 400px !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n}\n"],["\n .lt-reach.dialog-gif-selector {\n .ms-Dialog-main {\n width: 400px !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n}\n"])),maxScreenSize.small);_styled(GifSelector).withConfig({displayName:"GifSelectorDialog__StyledDialogGifSelector",componentId:"sc-t6p48w-0"})(templateObject_2$f$2||(templateObject_2$f$2=__makeTemplateObject$1(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$h$2,templateObject_2$f$2;var GifButton=function GifButton(_a){var disabled=_a.disabled,onGifClick=_a.onGifClick;var features=useFeatures();var formatMessage=useIntl().formatMessage;var refGifButton=useRef$1();var _b=useState$2(false),showGifSelector=_b[0],setShowGifSelector=_b[1];if(!features.giphy){return null;}return jsxs("div",{children:[jsx$1("div",__assign$1({ref:refGifButton},{children:jsx$1(IconButton,{iconProps:{iconName:'Gif'},onClick:function(){return setShowGifSelector(true);},disabled:disabled,"data-button-type":"gif",ariaLabel:formatMessage({id:'AriaLabel.gifButton'})},void 0)}),void 0),showGifSelector&&jsx$1(Fragment,{children:jsx$1(GifSelectorCallout,{target:refGifButton.current,onGifClick:handleGifClick,onDismiss:function(){return setShowGifSelector(false);}},void 0)},void 0)]},void 0);function handleGifClick(gif){setShowGifSelector(false);onGifClick({id:gif.id.toString(),filename:gif.title,url:gif.embed_url,type:AttachmentType.Giphy});}};var GifView=function GifView(_a){var gifInfo=_a.gifInfo,className=_a.className;var clientConfig=useClientConfig();var _b=useState$2(),gif=_b[0],setGif=_b[1];useEffect$1(function(){var gf=new dist$1.GiphyFetch(clientConfig.giphy.apiKey);gf.gif(gifInfo.id).then(function(r){return setGif(r.data);});},[clientConfig.giphy.apiKey,gifInfo.id]);if(!gif){return null;}return jsx$1(Host$8$1,__assign$1({className:className},{children:jsx$1(StyledGif,{gif:gif,width:300,noLink:true,hideAttribution:true},void 0)}),void 0);};var Host$8$1=_styled.div(templateObject_1$g$2||(templateObject_1$g$2=__makeTemplateObject$1([""],[""])));var StyledGif=_styled(dist$4.Gif)(templateObject_2$e$2||(templateObject_2$e$2=__makeTemplateObject$1(["\n && {\n max-width: 100%;\n }\n\n @media (max-width: ","px) {\n /* because the style is inline set we need to overwrite it via !important */\n width: auto !important;\n height: auto !important;\n > div {\n width: auto !important;\n height: auto !important;\n\n img {\n max-width: 100%;\n height: auto;\n }\n }\n }\n"],["\n && {\n max-width: 100%;\n }\n\n @media (max-width: ","px) {\n /* because the style is inline set we need to overwrite it via !important */\n width: auto !important;\n height: auto !important;\n > div {\n width: auto !important;\n height: auto !important;\n\n img {\n max-width: 100%;\n height: auto;\n }\n }\n }\n"])),maxScreenSize.small);var templateObject_1$g$2,templateObject_2$e$2;var GifEditList=function GifEditList(_a){var attachments=_a.attachments,onDeleteClick=_a.onDeleteClick,className=_a.className;var formatMessage=useIntl().formatMessage;var gifs=attachments.filter(function(a){return a.type===AttachmentType.Giphy;});if(gifs.length===0){return null;}return jsx$1(Host$7$1,__assign$1({className:className,"data-gif-attachment-list":true},{children:gifs.map(function(gif){return jsx$1(StyledAttachmentHost$1,__assign$1({domIdentifier:"gif",deleteButton:jsx$1(DeleteAttachmentButton,{"data-remove-attachment-button":gif.id,iconProps:{iconName:'ChromeClose'},onClick:function(){return onDeleteClick(gif);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsx$1(GifView,{gifInfo:gif},void 0)}),gif.id);})}),void 0);};var Host$7$1=_styled.div.withConfig({displayName:"GifEditList__Host",componentId:"sc-95dldh-0"})(templateObject_1$f$2||(templateObject_1$f$2=__makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n"])));var StyledAttachmentHost$1=_styled(AttachmentHost).withConfig({displayName:"GifEditList__StyledAttachmentHost",componentId:"sc-95dldh-1"})(templateObject_2$d$2||(templateObject_2$d$2=__makeTemplateObject$1(["\n width: auto;\n"],["\n width: auto;\n"])));var templateObject_1$f$2,templateObject_2$d$2;var GifList=function GifList(_a){var attachments=_a.attachments,className=_a.className;var gifs=attachments.filter(function(a){return a.type===AttachmentType.Giphy;});if(gifs.length===0){return null;}return jsx$1(Host$6$2,__assign$1({className:className,"data-gif-url-preview":gifs[0].id},{children:jsx$1(StyledAttachmentHost,{children:jsx$1(GifView,{gifInfo:gifs[0]},void 0)},void 0)}),void 0);};var Host$6$2=_styled.div.withConfig({displayName:"GifList__Host",componentId:"sc-8gg7fj-0"})(templateObject_1$e$2||(templateObject_1$e$2=__makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n"])));var StyledAttachmentHost=_styled(AttachmentHost).withConfig({displayName:"GifList__StyledAttachmentHost",componentId:"sc-8gg7fj-1"})(templateObject_2$c$2||(templateObject_2$c$2=__makeTemplateObject$1(["\n width: auto;\n margin: ","px 0 0 0;\n"],["\n width: auto;\n margin: ","px 0 0 0;\n"])),spacingS);var templateObject_1$e$2,templateObject_2$c$2;var PageViewType;(function(PageViewType){PageViewType["PostsGroupView"]="PostsGroupView";})(PageViewType||(PageViewType={}));function usePageViewTracker(basePath,itemId,viewType){var _this=this;var user=useCurrentUser();var sendBeacon=useBeaconHandler();var onRequestToken=useContext(AuthenticationContext).onRequestToken;var performanceTimer=usePerformanceTimer();var viewEndCallback=useRef$1(function(){return null;});useBeforeUnload$2(trackViewEnd);useEffect$1(function(){(function(){return __awaiter$1(_this,void 0,void 0,function(){var currentToken;return __generator$1(this,function(_a){switch(_a.label){case 0:if(!itemId||!user){return [2/*return*/];}return [4/*yield*/,onRequestToken()];case 1:currentToken=_a.sent();viewEndCallback.current=trackPageView(basePath,user.subscription.id,itemId,viewType,currentToken);return [2/*return*/];}});});})();return function(){return trackViewEnd();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77717
77717
|
},[itemId,basePath,viewType]);function trackViewEnd(){if(viewEndCallback.current){viewEndCallback.current();}}function trackPageView(basePath,subscriptionId,itemId,viewType,accessToken){var sessionId=uuid_1$1.v4().toString();sendBeacon("/"+basePath+"/"+itemId+"/views/"+sessionId,accessToken,subscriptionId,{viewType:viewType});performanceTimer.start();var wasEndSessionExecuted=false;return function(){// only execute it once
|
|
77718
|
-
if(wasEndSessionExecuted){return;}wasEndSessionExecuted=true;var duration=performanceTimer.end();sendBeacon("/"+basePath+"/"+itemId+"/views/"+sessionId+"/duration",accessToken,subscriptionId,{duration:duration,viewType:viewType});};}}function useUserPropertyDefinitionsHandler(){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var defaultProperties={displayName:{},mobilePhone:{iconName:'cellPhone'},jobTitle:{iconName:'contactCard'},company:{iconName:'EMI'},address:{iconName:'MapPin'},notes:{iconName:'ContactInfo'}};return {getPropertyLabel:getLabel,getPropertyIcon:getIcon};function getLabel(definition){var language=getPreferredSupportedUiLanguage(user.preferredUiLanguage);var translations=definition.translations||{};var defaultPropertyNames=Object.keys(defaultProperties);return language&&translations[language]||translations[user.subscription.defaultLanguage]||definition.label||defaultPropertyNames.some(function(p){return p===definition.name;})&&formatMessage({id:"Generic."+definition.name})||definition.name;}function getIcon(definition){var _a,_b;return (_b=(_a=defaultProperties[definition.name])===null||_a===void 0?void 0:_a.iconName)!==null&&_b!==void 0?_b:'UserOptional';}}var IconWithCallout=function IconWithCallout(props){var _a;var _b;var iconRef=useRef$1(null);var _c=useState$2(false),showCallout=_c[0],setShowCallout=_c[1];return jsxs(Host$5$1,__assign$1({className:props.className},(_a={},_a[props.dataAttribute]=true,_a),{ref:iconRef},{children:[jsx$1(StyledIconButton$1,{"data-icon-with-callout":true,iconProps:{iconName:props.icon},onClick:handleIconClick,ariaLabel:props.ariaLabel,disabled:props.disabled},void 0),showCallout&&jsx$1(StyledCallout$5,__assign$1({className:"icon-with-callout-content",target:iconRef,directionalHint:// DirectionalHint.topLeftEdge has the value "0". Hence we cannot use the || operator...
|
|
77719
|
-
props.directionalHint==null?DirectionalHint.rightCenter:props.directionalHint,gapSpace:4,onDismiss:handleCalloutDismiss,calloutWidth:(_b=props.calloutWidth)!==null&&_b!==void 0?_b:0},{children:props.children}),void 0)]}),void 0);function handleIconClick(){return __awaiter$1(this,void 0,void 0,function(){var _a,_b;return __generator$1(this,function(_c){switch(_c.label){case 0:_a=props.disabled;if(_a)return [3/*break*/,3];_b=props.onIconClick;if(!_b)return [3/*break*/,2];return [4/*yield*/,props.onIconClick()];case 1:_b=_c.sent();_c.label=2;case 2:_a=_b;_c.label=3;case 3:if(_a){return [2/*return*/];}setShowCallout(!showCallout);return [2/*return*/];}});});}function handleCalloutDismiss(){var _a;setShowCallout(false);(_a=props.onCalloutDismissed)===null||_a===void 0?void 0:_a.call(props);}};var Host$5$1=_styled.div.withConfig({displayName:"IconWithCallout__Host",componentId:"sc-1jmscz2-0"})(templateObject_1$d$2||(templateObject_1$d$2=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIconButton$1=_styled(IconButton).withConfig({displayName:"IconWithCallout__StyledIconButton",componentId:"sc-1jmscz2-1"})(templateObject_2$b$2||(templateObject_2$b$2=__makeTemplateObject$1(["\n width: auto;\n height: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n"],["\n width: auto;\n height: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n"])));var StyledCallout$5=_styled(Callout).withConfig({displayName:"IconWithCallout__StyledCallout",componentId:"sc-1jmscz2-2"})(templateObject_3$a$2||(templateObject_3$a$2=__makeTemplateObject$1(["\n && {\n font-family: 'Roboto', sans-serif;\n padding: 10px;\n max-width: 700px !important;\n\n h2 {\n margin: 10px;\n }\n }\n"],["\n && {\n font-family: 'Roboto', sans-serif;\n padding: 10px;\n max-width: 700px !important;\n\n h2 {\n margin: 10px;\n }\n }\n"])));var templateObject_1$d$2,templateObject_2$b$2,templateObject_3$a$2;var inlineObjectsClassNames={file:'news-inline-file',image:'news-inline-image',video:'video-view-container',code:'news-inline-code',quote:'news-inline-quote'};function isNullOrWhitespace(s,isHtml){if(isHtml===void 0){isHtml=false;}return s==null||s.trim().length===0||isHtml&&isEmptyHtml(s);}// all inline objects are wrapped in a div
|
|
77718
|
+
if(wasEndSessionExecuted){return;}wasEndSessionExecuted=true;var duration=performanceTimer.end();sendBeacon("/"+basePath+"/"+itemId+"/views/"+sessionId+"/duration",accessToken,subscriptionId,{duration:duration,viewType:viewType});};}}function useUserPropertyDefinitionsHandler(){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var defaultProperties={displayName:{},mobilePhone:{iconName:'cellPhone'},jobTitle:{iconName:'contactCard'},company:{iconName:'EMI'},address:{iconName:'MapPin'},notes:{iconName:'ContactInfo'}};return {getPropertyLabel:getLabel,getPropertyIcon:getIcon};function getLabel(definition){var language=getPreferredSupportedUiLanguage(user.preferredUiLanguage);var translations=definition.translations||{};var defaultPropertyNames=Object.keys(defaultProperties);return language&&translations[language]||translations[user.subscription.defaultLanguage]||definition.label||defaultPropertyNames.some(function(p){return p===definition.name;})&&formatMessage({id:"Generic."+definition.name})||definition.name;}function getIcon(definition){var _a,_b;return (_b=(_a=defaultProperties[definition.name])===null||_a===void 0?void 0:_a.iconName)!==null&&_b!==void 0?_b:'UserOptional';}}var IconWithCallout=function IconWithCallout(props){var _a;var _b;var iconRef=useRef$1(null);var _c=useState$2(false),showCallout=_c[0],setShowCallout=_c[1];return jsxs(Host$5$1,__assign$1({className:props.className},(_a={},_a[props.dataAttribute]=true,_a),{ref:iconRef},{children:[jsx$1(StyledIconButton$1$1,{"data-icon-with-callout":true,iconProps:{iconName:props.icon},onClick:handleIconClick,ariaLabel:props.ariaLabel,disabled:props.disabled},void 0),showCallout&&jsx$1(StyledCallout$5,__assign$1({className:"icon-with-callout-content",target:iconRef,directionalHint:// DirectionalHint.topLeftEdge has the value "0". Hence we cannot use the || operator...
|
|
77719
|
+
props.directionalHint==null?DirectionalHint.rightCenter:props.directionalHint,gapSpace:4,onDismiss:handleCalloutDismiss,calloutWidth:(_b=props.calloutWidth)!==null&&_b!==void 0?_b:0},{children:props.children}),void 0)]}),void 0);function handleIconClick(){return __awaiter$1(this,void 0,void 0,function(){var _a,_b;return __generator$1(this,function(_c){switch(_c.label){case 0:_a=props.disabled;if(_a)return [3/*break*/,3];_b=props.onIconClick;if(!_b)return [3/*break*/,2];return [4/*yield*/,props.onIconClick()];case 1:_b=_c.sent();_c.label=2;case 2:_a=_b;_c.label=3;case 3:if(_a){return [2/*return*/];}setShowCallout(!showCallout);return [2/*return*/];}});});}function handleCalloutDismiss(){var _a;setShowCallout(false);(_a=props.onCalloutDismissed)===null||_a===void 0?void 0:_a.call(props);}};var Host$5$1=_styled.div.withConfig({displayName:"IconWithCallout__Host",componentId:"sc-1jmscz2-0"})(templateObject_1$d$2||(templateObject_1$d$2=__makeTemplateObject$1(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIconButton$1$1=_styled(IconButton).withConfig({displayName:"IconWithCallout__StyledIconButton",componentId:"sc-1jmscz2-1"})(templateObject_2$b$2||(templateObject_2$b$2=__makeTemplateObject$1(["\n width: auto;\n height: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n"],["\n width: auto;\n height: auto;\n padding: 0;\n\n &[disabled] {\n background: transparent;\n }\n"])));var StyledCallout$5=_styled(Callout).withConfig({displayName:"IconWithCallout__StyledCallout",componentId:"sc-1jmscz2-2"})(templateObject_3$a$2||(templateObject_3$a$2=__makeTemplateObject$1(["\n && {\n font-family: 'Roboto', sans-serif;\n padding: 10px;\n max-width: 700px !important;\n\n h2 {\n margin: 10px;\n }\n }\n"],["\n && {\n font-family: 'Roboto', sans-serif;\n padding: 10px;\n max-width: 700px !important;\n\n h2 {\n margin: 10px;\n }\n }\n"])));var templateObject_1$d$2,templateObject_2$b$2,templateObject_3$a$2;var inlineObjectsClassNames={file:'news-inline-file',image:'news-inline-image',video:'video-view-container',code:'news-inline-code',quote:'news-inline-quote'};function isNullOrWhitespace(s,isHtml){if(isHtml===void 0){isHtml=false;}return s==null||s.trim().length===0||isHtml&&isEmptyHtml(s);}// all inline objects are wrapped in a div
|
|
77720
77720
|
var inlineObjectsDomIdentifier='div';function isEmptyHtml(html){// Empty content is:
|
|
77721
77721
|
// HTML tags that contain no innerText - e.g. <h1><br></h1><p><br></p>
|
|
77722
77722
|
// and no div containers (meaning no inline objects)
|
|
@@ -77959,9 +77959,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
|
|
|
77959
77959
|
}), void 0);
|
|
77960
77960
|
};
|
|
77961
77961
|
|
|
77962
|
-
var version$1 = "0.3.
|
|
77963
|
-
var buildId = "
|
|
77964
|
-
var commitId = "
|
|
77962
|
+
var version$1 = "0.3.100";
|
|
77963
|
+
var buildId = "103075";
|
|
77964
|
+
var commitId = "c8f33937e4cac5c325977fb215959b39782cc13d";
|
|
77965
77965
|
var isCustomerBuild = false;
|
|
77966
77966
|
var buildInfo = {
|
|
77967
77967
|
version: version$1,
|
|
@@ -122282,7 +122282,7 @@ result.items.forEach(function(page){var _a;var node=convertToNavigationNode(page
|
|
|
122282
122282
|
var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===page.id){existingNode.isSearchMatch=true;}ensureChildren.apply(void 0,__spreadArray([existingNode],node.children||[]));break;}allNodesById[node.id]=node;if(!((_a=node.parent)===null||_a===void 0?void 0:_a.id)){break;}ensureChildren(node.parent,node);node=node.parent;}});onSearchResultChange(Object.values(allNodesById).filter(function(n){var _a;return !((_a=n.parent)===null||_a===void 0?void 0:_a.id);}));return [2/*return*/];}});});}function ensureChildren(parent){var _a;var children=[];for(var _i=1;_i<arguments.length;_i++){children[_i-1]=arguments[_i];}if(!parent.children){parent.children=[];}parent.children=parent.children.concat(children).sort(function(a,b){return a.position-b.position;});parent.firstChildId=(_a=parent.children[0])===null||_a===void 0?void 0:_a.id;}};var StyledSearchBox$1=_styled(SearchBox$1).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$1A||(templateObject_1$1A=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$1A;function filterChildren(page,activePage){if(!activePage){return true;}if(activePage.status===WorkflowStatus.deleted){return page.status===WorkflowStatus.deleted;}return page.status!==WorkflowStatus.deleted&&activePage.isUnlinked===page.isUnlinked;}var ExternalPagesLinkButton=function ExternalPagesLinkButton(_a){var item=_a.item,disabled=_a.disabled,onClick=_a.onClick,className=_a.className;var user=useCurrentUser();var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;if(!item.useExternalContent){return null;}var resourceKey="ExternalLinkButton.pages"+(!url?'.noUrl':'')+".navigateTo";return jsx$1(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsx$1(StyledIconButton$4,{iconProps:{iconName:'NavigateExternalInline',styles:{root:{fontSize:fontSizeMedium+4+"px",height:fontSizeMedium+4+"px"}}},onClick:handleClick,disabled:disabled,"aria-label":formatMessage({id:resourceKey},url?{url:url}:undefined)},void 0)}),void 0);function handleClick(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(onClick){onClick(e);return [2/*return*/];}createPageClickHandler(item)(e);return [2/*return*/];});});}};var StyledIconButton$4=_styled(IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$1z||(templateObject_1$1z=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$1z;var PageNode=function PageNode(_a){var node=_a.node,activePage=_a.activePage,navigationContext=_a.navigationContext,loadChildren=_a.loadChildren,basePath=_a.basePath,path=_a.path,className=_a.className,isRootNode=_a.isRootNode,hide=_a.hide,onPageSelected=_a.onPageSelected,selectedPageId=_a.selectedPageId;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var nodesContainNavigation=navigationContext==null;var _b=useState$2(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=useState$2(undefined),forceShowChildren=_c[0],setForceShowChildren=_c[1];var showChildren=forceShowChildren||children&&forceShowChildren!==false&&(nodesContainNavigation||path.some(function(p){return p===node.id;})||(activePage===null||activePage===void 0?void 0:activePage.id)===node.id);var title=getTitle(node,user,formatMessage);var isSelectedPageNode=(activePage===null||activePage===void 0?void 0:activePage.id)===node.id||selectedPageId===node.id;var iconName=getIconName();var isExpanded=iconName==='ChevronDown';var isHighlighted=isSelectedPageNode||path.some(function(p){return p===node.id;});var appBasePath=basePath?buildPath(basePath):null;var isSearchMatch=node.isSearchMatch?'true':null;var isDocument=node.pageType===PageType.Document;var detailViewUrl=""+NewsService.getNewsRoute(appBasePath,node.id,title)+(node.useExternalContent?"?"+queryString.stringify({noRedirect:true}):'');return jsxs(Fragment,{children:[jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsx$1(StyledIconButton$3,{iconProps:{iconName:iconName},onClick:function(){return __awaiter(void 0,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(!!(children===null||children===void 0?void 0:children.length))return [3/*break*/,2];_a=setLazyLoadedChildren;return [4/*yield*/,loadChildren(node.id)];case 1:_a.apply(void 0,[_b.sent()]);_b.label=2;case 2:setForceShowChildren(!showChildren);return [2/*return*/];}});});},isHighlighted:isHighlighted,isExpanded:isExpanded,ariaLabel:formatMessage({id:isExpanded?'AriaLabel.hideChildren':'AriaLabel.seeChildren'}),"data-toc-node-toggle-children":node.id},void 0):jsx$1(StyledIcon$3$1,{isHighlighted:isHighlighted},void 0),basePath?jsx$1(NodeTitleLink,__assign({onClick:createPageClickHandler(node,basePath,function(){return onPageSelected===null||onPageSelected===void 0?void 0:onPageSelected(node.id);},true),to:detailViewUrl,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):onPageSelected?jsx$1(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsx$1(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsx$1(StyledExternalLinkButton,{item:node},void 0),jsx$1(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsx$1(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsx$1("li",{children:jsx$1(PageNode,{hide:!showChildren,basePath:basePath,node:c,activePage:activePage,navigationContext:navigationContext,loadChildren:loadChildren,path:path,isRootNode:false,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id);})}),void 0)]},void 0);function getIconName(){var _a;if(!nodesContainNavigation&&!node.firstChildId||nodesContainNavigation&&!((_a=node.children)===null||_a===void 0?void 0:_a.length)){return null;}if(showChildren){return 'ChevronDown';}return 'ChevronRight';}function getChildren(nodeId){if(nodesContainNavigation){return node.children||[];}if((activePage===null||activePage===void 0?void 0:activePage.id)===nodeId){return navigationContext.children||[];}var result=navigationContext.parent;while(result!=null&&result.id!==nodeId){result=result.parent;}return result?result.children:[];}};var NodeWrapper=_styled.div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$B||(templateObject_3$B=__makeTemplateObject(["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"],["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"])),function(p){return p.hide&&'display: none;';},function(p){return !p.isFirstLevel&&css$2(templateObject_1$1y||(templateObject_1$1y=__makeTemplateObject(["\n padding-left: ","px;\n margin-top: ","px;\n "],["\n padding-left: ","px;\n margin-top: ","px;\n "])),spacingS,spacingS+5);},function(p){return p.isActive&&css$2(templateObject_2$U||(templateObject_2$U=__makeTemplateObject(["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralQuaternaryAlt;});},spacingXs,minScreenSize.small);var IconNormalSize=20;var IconLargeSize=26;var IconBubbleStyle=function IconBubbleStyle(isHighlighted){return css$2(templateObject_6$d||(templateObject_6$d=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?css$2(templateObject_4$o||(templateObject_4$o=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.white;}):css$2(templateObject_5$l||(templateObject_5$l=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.neutralQuaternary;},function(p){return p.theme.palette.black;}));};var StyledIconButton$3=_styled(IconButton$1).withConfig({displayName:"PageTocNode__StyledIconButton",componentId:"sc-1ftr1ym-1"})(templateObject_8$8||(templateObject_8$8=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"])),IconLargeSize,IconLargeSize,IconLargeSize,function(p){return p.isExpanded&&css$2(templateObject_7$9||(templateObject_7$9=__makeTemplateObject(["\n i {\n transform: translate(0, 1px);\n }\n "],["\n i {\n transform: translate(0, 1px);\n }\n "])));},function(p){return IconBubbleStyle(p.isHighlighted);},minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledIcon$3$1=_styled(Icon).withConfig({displayName:"PageTocNode__StyledIcon",componentId:"sc-1ftr1ym-2"})(templateObject_9$8||(templateObject_9$8=__makeTemplateObject(["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"],["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"])),IconLargeSize,IconLargeSize,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize,function(p){return IconBubbleStyle(p.isHighlighted);});var NodeTitleStyle=css$2(templateObject_11$3$1||(templateObject_11$3$1=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"],["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"])),spacingM,fontSizeNormal,function(p){return p.theme.textColors.default;},function(p){return p.bold&&css$2(templateObject_10$7||(templateObject_10$7=__makeTemplateObject(["\n font-weight: bold;\n "],["\n font-weight: bold;\n "])));},minScreenSize.small,fontSizeSmall);var NodeTitleLink=_styled(NavLink).withConfig({displayName:"PageTocNode__NodeTitleLink",componentId:"sc-1ftr1ym-3"})(templateObject_12$2$1||(templateObject_12$2$1=__makeTemplateObject(["\n ",";\n\n && {\n color: ",";\n }\n"],["\n ",";\n\n && {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.textColors.default;});var NodeTitleButton=_styled(ActionButton).withConfig({displayName:"PageTocNode__NodeTitleButton",componentId:"sc-1ftr1ym-4"})(templateObject_13$1$1||(templateObject_13$1$1=__makeTemplateObject(["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"],["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.palette.neutralQuaternary;});var NodeTitle=_styled.div.withConfig({displayName:"PageTocNode__NodeTitle",componentId:"sc-1ftr1ym-5"})(templateObject_14$1$1||(templateObject_14$1$1=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),NodeTitleStyle);var ChildrenList=_styled.ul.withConfig({displayName:"PageTocNode__ChildrenList",componentId:"sc-1ftr1ym-6"})(templateObject_15$1$1||(templateObject_15$1$1=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"])),function(p){return p.hide&&'display: none;';},spacingS);var StyledExternalLinkButton=_styled(ExternalPagesLinkButton).withConfig({displayName:"PageTocNode__StyledExternalLinkButton",componentId:"sc-1ftr1ym-7"})(templateObject_16$1||(templateObject_16$1=__makeTemplateObject(["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"])),spacingS,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledDocumentDownloadButton$1=_styled(DocumentDownloadButton).withConfig({displayName:"PageTocNode__StyledDocumentDownloadButton",componentId:"sc-1ftr1ym-8"})(templateObject_17$1||(templateObject_17$1=__makeTemplateObject(["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"])),IconLargeSize,spacingS-5,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var templateObject_1$1y,templateObject_2$U,templateObject_3$B,templateObject_4$o,templateObject_5$l,templateObject_6$d,templateObject_7$9,templateObject_8$8,templateObject_9$8,templateObject_10$7,templateObject_11$3$1,templateObject_12$2$1,templateObject_13$1$1,templateObject_14$1$1,templateObject_15$1$1,templateObject_16$1,templateObject_17$1;var PageTableOfContents$1=function PageTableOfContents(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onPageSelected=_a.onPageSelected,className=_a.className,selectedPageId=_a.selectedPageId,isLoading=_a.isLoading,disableScrollableList=_a.disableScrollableList;var user=useCurrentUser();var _b=getRootNodes(),rootNodes=_b.rootNodes,path=_b.path;var _c=useState$2(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsx$1(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsx$1(FormattedMessageWithStyle,{id:"ContentEditor.parentPage.emptyToc",tagName:"div",className:className},void 0);}var activePage=activePageId&&navigationContext.siblings.find(function(p){return p.id===activePageId;});var nodesToDisplay=sortPageNodesByGroupAndPosition(user.groups,(searchResult||rootNodes).filter(function(p){return filterChildren(p,activePage);}));return jsx$1(Fragment,{children:jsxs("div",__assign({className:className},{children:[jsx$1("div",__assign({"data-toc-search-container":true},{children:jsx$1(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsx$1(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsx$1(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsx$1(TocList,{children:nodesToDisplay.map(function(c){return jsx$1(ToCItem,{children:jsx$1(PageNode,{basePath:basePath,node:c,activePage:activePage,navigationContext:searchResult?null:navigationContext,loadChildren:loadChildren,path:path,isRootNode:true,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id+!!searchResult);})},void 0)}),void 0)]}),void 0)},void 0);function getRootNodes(){if(!(navigationContext===null||navigationContext===void 0?void 0:navigationContext.parent)){return {rootNodes:(navigationContext===null||navigationContext===void 0?void 0:navigationContext.siblings)||[],path:[]};}var path=[];var currentParent=navigationContext.parent;while(currentParent!=null&¤tParent.parent!=null){path.push(currentParent.id);currentParent=currentParent.parent;}return {rootNodes:(currentParent===null||currentParent===void 0?void 0:currentParent.children)||[],path:path};}};var TocEmptyList=_styled(EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$1x||(templateObject_1$1x=__makeTemplateObject(["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"],["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"])),fontSizeLarger+10);var TocListContainer=_styled.div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$A||(templateObject_3$A=__makeTemplateObject(["\n margin-top: ","px;\n\n ","\n"],["\n margin-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&css$2(templateObject_2$T||(templateObject_2$T=__makeTemplateObject(["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "],["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "])));});var TocList=_styled.ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$n||(templateObject_4$n=__makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));var ToCItem=_styled.li.withConfig({displayName:"PageTableOfContents__ToCItem",componentId:"sc-3llzkd-3"})(templateObject_5$k||(templateObject_5$k=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);_styled(PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$c||(templateObject_6$c=__makeTemplateObject(["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"],["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"])),spacingM,spacingM,spacingM);var templateObject_1$1x,templateObject_2$T,templateObject_3$A,templateObject_4$n,templateObject_5$k,templateObject_6$c;var PageTableOfContentsDialog=function PageTableOfContentsDialog(_a){var isOpen=_a.isOpen,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onDismiss=_a.onDismiss,basePath=_a.basePath;var formatMessage=useIntl().formatMessage;if(!navigationContext){return null;}return jsx$1(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsx$1(DialogGlobalStyle$2,{},void 0),jsx$1(PageTableOfContents$1,{basePath:basePath,activePageId:activePageId,navigationContext:navigationContext,loadChildren:loadChildren,onSearch:onSearch,onPageSelected:onDismiss,disableScrollableList:true},void 0)]}),void 0)}),void 0);};var DialogContent=_styled.div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$1w||(templateObject_1$1w=__makeTemplateObject(["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"],["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$2=createGlobalStyle(templateObject_2$S||(templateObject_2$S=__makeTemplateObject(["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"],["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1w,templateObject_2$S;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
122283
122283
|
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxs(Host$z,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsx$1(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsx$1(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$z=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$1v||(templateObject_1$1v=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxs(Link$2,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0),jsx$1(Content$4,__assign({},props,{isNextNode:isNextNode},{children:jsx$1("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link$2=_styled(NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$R||(templateObject_2$R=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled(Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$z||(templateObject_3$z=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$4=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$j||(templateObject_5$j=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&css$2(templateObject_4$m||(templateObject_4$m=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$1v,templateObject_2$R,templateObject_3$z,templateObject_4$m,templateObject_5$j;_styled(Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$1u||(templateObject_1$1u=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$Q||(templateObject_2$Q=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$y||(templateObject_3$y=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$1u,templateObject_2$Q,templateObject_3$y;function useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType){var _this=this;var searchPublishedPages=usePagesApi().searchPublishedPages;return function(pageSize,token){return __awaiter(_this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,searchPublishedPages({keywords:{items:keywords},token:token,pageSize:pageSize,pageType:showPagesAndDocuments?undefined:pageType})];case 1:result=_a.sent();return [2/*return*/,{items:result===null||result===void 0?void 0:result.items,paginationToken:result===null||result===void 0?void 0:result.paginationToken,hasNextPage:(result===null||result===void 0?void 0:result.nextItem)!==null}];}});});};}function useLoadPublishedItemsByPageId(pageId,showPagesAndDocuments,pageType){var _this=this;var getSubpages=usePagesApi().getSubpages;try{return function(pageSize,token){return __awaiter(_this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getSubpages(pageId,{pageType:showPagesAndDocuments?undefined:pageType,token:token,pageSize:pageSize})];case 1:result=_a.sent();return [2/*return*/,{items:result.items,paginationToken:result.paginationToken,hasNextPage:result.nextItem!==null}];}});});};}catch(error){logger.error(error);return null;}}var DateMode;(function(DateMode){DateMode[DateMode["Published"]=0]="Published";DateMode[DateMode["Modified"]=1]="Modified";})(DateMode||(DateMode={}));var DateInfo$1=function DateInfo(_a){var item=_a.item,dateMode=_a.dateMode,expiryDate=_a.expiryDate,className=_a.className;var features=useFeatures();return jsxs("span",__assign({className:className},{children:[dateMode===DateMode.Modified&&getModifiedInfo(),dateMode===DateMode.Published&&getPublishInfo(),expiryDate&&features.expiryDate&&getArchiveInfo()]}),void 0);function getPublishInfo(){var format=isSameDay(item.publishingDate)?'relative':'absolute';if(!item.publishingDate){if(item.status!==WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishWhenApproved"},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.published"},void 0);}var values={start:jsx$1(DateTime,{value:item.publishingDate},void 0)};if(new Date(item.publishingDate)>=new Date()){return jsx$1(FormattedMessage$1,{id:item.status!==WorkflowStatus.approved?"DateInfo.publishOnIfApproved."+format:"DateInfo.publishOn."+format,values:values},void 0);}if(item.status===WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedOn."+format,values:values},void 0);}if(!!item.publishedVersionId){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedWithPendingEdits."+format,values:values},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.missingApproval."+format,values:values},void 0);}function getArchiveInfo(){var format=isSameDay(expiryDate)?'relative':'absolute';var values={end:jsx$1(DateTime,{value:expiryDate},void 0)};if(new Date(expiryDate)<new Date()){// if already expired
|
|
122284
122284
|
return jsxs("span",{children:[",\u00A0",jsx$1(FormattedMessage$1,{id:"DateInfo.archivedOn."+format,values:values},void 0)]},void 0);}else {// not yet expired
|
|
122285
|
-
return jsxs("span",{children:[",",' ',jsx$1(FormattedMessage$1,{id:"DateInfo.archiveOn."+format,values:values},void 0)]},void 0);}}function getModifiedInfo(){var date=item.modified||item.created||new Date();var format=isSameDay(date)?'relative':'absolute';return jsx$1("span",{children:jsx$1(FormattedMessage$1,{id:"DateInfo.modifiedOn."+format,values:{modified:jsx$1(ModifiedDateTime,{value:date},void 0)}},void 0)},void 0);}};var ModifiedDateTime=_styled(DateTime).withConfig({displayName:"DateInfo__ModifiedDateTime",componentId:"sc-xnzpy3-0"})(templateObject_1$1t||(templateObject_1$1t=__makeTemplateObject(["\n &&& {\n text-decoration: none;\n }\n"],["\n &&& {\n text-decoration: none;\n }\n"])));var templateObject_1$1t;var getAuthor=function getAuthor(item){return item.onBehalfOf||item.owner||item.author||{};};var getRealAuthor=function getRealAuthor(item){return item.owner||item.author||{};};var ItemMetaInfo=function ItemMetaInfo(_a){var item=_a.item,className=_a.className,expiryDate=_a.expiryDate,showChannels=_a.showChannels,dateMode=_a.dateMode,channels=_a.channels,_b=_a.readOnly,readOnly=_b===void 0?true:_b,_c=_a.hideAvatar,hideAvatar=_c===void 0?false:_c,hideDisplayName=_a.hideDisplayName,language=_a.language,buildChannelFilterUrl=_a.buildChannelFilterUrl,_d=_a.clickableAvatar,clickableAvatar=_d===void 0?true:_d;var hasChannels=channels&&channels.length>0;var onBehalfAuthor=getAuthor(item);var realAuthor=getRealAuthor(item);return jsxs(Host$y,__assign({className:className,"data-item-metadata":true},{children:[!hideAvatar&&jsx$1(PersonaCard,__assign({upn:onBehalfAuthor.userPrincipalName,readOnly:!clickableAvatar,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:onBehalfAuthor.userPrincipalName,text:onBehalfAuthor.displayName,secondaryText:onBehalfAuthor.userPrincipalName,hidePersonaDetails:true,coinSize:55},void 0)}),void 0),jsxs(InfoDetailsHost,__assign({"data-meta-info-details":true},{children:[!hideDisplayName&&jsx$1(AuthorContainer,{children:jsx$1(AuthorName$1,{author:onBehalfAuthor,readOnly:readOnly},void 0)},void 0),jsxs(DateAndChannels,{children:[jsx$1(DateInfo$1,{item:item,dateMode:dateMode,expiryDate:expiryDate},void 0),"\u00A0",showChannels&&jsx$1(Fragment,{children:hasChannels?jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.channels",values:{channels:jsxs(Fragment,{children:["\u00A0",jsx$1(Channels$1,{channels:channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:buildChannelFilterUrl},void 0)]},void 0)}},void 0):jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.noChannels"},void 0)},void 0)]},void 0),!hideDisplayName&&realAuthor&&realAuthor.userPrincipalName!==onBehalfAuthor.userPrincipalName&&jsx$1(AuthorContainer,{children:jsx$1(FormattedMessage$1,{id:"MetaInfo.writtenBy",values:{author:jsx$1(AuthorName$1,{author:realAuthor,readOnly:readOnly},void 0)}},void 0)},void 0)]}),void 0)]}),void 0);};var Host$y=_styled.div.withConfig({displayName:"ItemMetaInfo__Host",componentId:"sc-1d6drj8-0"})(templateObject_1$1s||(templateObject_1$1s=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var InfoDetailsHost=_styled.div.withConfig({displayName:"ItemMetaInfo__InfoDetailsHost",componentId:"sc-1d6drj8-1"})(templateObject_2$P||(templateObject_2$P=__makeTemplateObject(["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"],["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"])));var AuthorContainer=_styled.div.withConfig({displayName:"ItemMetaInfo__AuthorContainer",componentId:"sc-1d6drj8-2"})(templateObject_3$x||(templateObject_3$x=__makeTemplateObject(["\n font-style: normal;\n display: inline-block;\n"],["\n font-style: normal;\n display: inline-block;\n"])));var DateAndChannels=_styled.div.withConfig({displayName:"ItemMetaInfo__DateAndChannels",componentId:"sc-1d6drj8-3"})(templateObject_4$l||(templateObject_4$l=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var AuthorName$1=function AuthorName(_a){var author=_a.author,readOnly=_a.readOnly;if(!readOnly){return jsx$1(Fragment,{children:author.displayName},void 0);}return jsx$1(PrimaryPersonaCard,__assign({upn:author.userPrincipalName},{children:author.displayName}),void 0);};var PrimaryPersonaCard=_styled(PersonaCard).withConfig({displayName:"ItemMetaInfo__PrimaryPersonaCard",componentId:"sc-1d6drj8-4"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n color: ",";\n text-decoration: underline;\n"],["\n color: ",";\n text-decoration: underline;\n"])),function(p){return p.theme.palette.accent;});var Channels$1=_styled(ClickableChannelTitles).withConfig({displayName:"ItemMetaInfo__Channels",componentId:"sc-1d6drj8-5"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$1s,templateObject_2$P,templateObject_3$x,templateObject_4$l,templateObject_5$i,templateObject_6$b;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$1r||(templateObject_1$1r=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$1r;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$1q||(templateObject_1$1q=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$O||(templateObject_2$O=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$w||(templateObject_3$w=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$k||(templateObject_4$k=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$1q,templateObject_2$O,templateObject_3$w,templateObject_4$k,templateObject_5$h;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$1p||(templateObject_1$1p=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$N||(templateObject_2$N=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$1p,templateObject_2$N;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$1o||(templateObject_1$1o=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$M||(templateObject_2$M=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$v||(templateObject_3$v=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$g||(templateObject_5$g=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$a$1||(templateObject_6$a$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$8$1||(templateObject_7$8$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$7$1||(templateObject_8$7$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$7||(templateObject_9$7=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$6||(templateObject_10$6=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$1o,templateObject_2$M,templateObject_3$v,templateObject_4$j,templateObject_5$g,templateObject_6$a$1,templateObject_7$8$1,templateObject_8$7$1,templateObject_9$7,templateObject_10$6;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var EventItemTile=function EventItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,onChannelClick=_a.onChannelClick,styleDefinition=_a.styleDefinition,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var userLanguage=getPreferredContentLanguage(user);var title=getTitle(item,user,intl.formatMessage,userLanguage);var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;return jsx$1(PublishableItemTileWrapper,{item:item,itemResourceType:ItemResourceTypes.Events,baseRoute:baseRoute,layoutMode:layoutMode,openTargetInNewWindow:openTargetInNewWindow,styleDefinition:styleDefinition,className:className,onClick:onClick,content:jsxs(Content$3$1,{children:[jsxs(ChannelsAndFeedback,{children:[jsx$1(StyledClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor,onClick:onChannelClick},void 0),jsx$1(FeedbackButtons$1,{children:buttons},void 0)]},void 0),jsx$1(Dates$2,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled},void 0),jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0),jsx$1(StyledTitle$3,{title:title,targetRoute:targetRoute,openTargetInNewWindow:openTargetInNewWindow,onClick:onClick},void 0),jsxs(Footer$3,{children:[jsxs(ContactAndLocation,{children:[jsx$1(EventLocationInfo,{locations:(_c=item.locations)===null||_c===void 0?void 0:_c.slice(0,1)},void 0),jsx$1(EventPeopleInfo,{item:item,hideAnnouncer:true,labelResourceKey:"Events.contactLabel",showFirstContactOnly:true},void 0)]},void 0),!isCancelled&&jsx$1(Registration$2,{item:item,showNoRegistrationRequired:true},void 0)]},void 0),jsx$1(CancelInfo$2,{item:item},void 0)]},void 0)},void 0);};var StyledTitle$3=_styled(Title$8).withConfig({displayName:"EventItemTile__StyledTitle",componentId:"sc-12wz8ra-0"})(templateObject_1$1n||(templateObject_1$1n=__makeTemplateObject(["\n &&& {\n margin-right: auto;\n display: inline-flex;\n }\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n &&& {\n margin-right: auto;\n display: inline-flex;\n }\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$3$1=_styled.div.withConfig({displayName:"EventItemTile__Content",componentId:"sc-12wz8ra-1"})(templateObject_2$L||(templateObject_2$L=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var ChannelsAndFeedback=_styled.div.withConfig({displayName:"EventItemTile__ChannelsAndFeedback",componentId:"sc-12wz8ra-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var Dates$2=_styled(DateTimeRange).withConfig({displayName:"EventItemTile__Dates",componentId:"sc-12wz8ra-3"})(templateObject_5$f||(templateObject_5$f=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n ","\n margin: ","px 0;\n"],["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n ","\n margin: ","px 0;\n"])),fontSizeMedium,function(p){return p.isCancelled&&css$2(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n text-decoration: line-through;\n "],["\n text-decoration: line-through;\n "])));},spacingM);var RecurrenceSeriesInfo$1=_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventItemTile__RecurrenceSeriesInfo",componentId:"sc-12wz8ra-4"})(templateObject_6$9$1||(templateObject_6$9$1=__makeTemplateObject(["\n z-index: 1;\n margin-bottom: ","px;\n"],["\n z-index: 1;\n margin-bottom: ","px;\n"])),spacingM);var FeedbackButtons$1=_styled.div.withConfig({displayName:"EventItemTile__FeedbackButtons",componentId:"sc-12wz8ra-5"})(templateObject_7$7$1||(templateObject_7$7$1=__makeTemplateObject(["\n z-index: 1;\n display: flex;\n align-items: center;\n margin-left: auto;\n\n > div:not(:first-child) {\n margin-left: ","px;\n }\n"],["\n z-index: 1;\n display: flex;\n align-items: center;\n margin-left: auto;\n\n > div:not(:first-child) {\n margin-left: ","px;\n }\n"])),spacingM);var ContactAndLocation=_styled.div.withConfig({displayName:"EventItemTile__ContactAndLocation",componentId:"sc-12wz8ra-6"})(templateObject_8$6$1||(templateObject_8$6$1=__makeTemplateObject(["\n z-index: 1;\n display: flex;\n flex-direction: column;\n\n > div {\n margin-top: ","px;\n }\n"],["\n z-index: 1;\n display: flex;\n flex-direction: column;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingS);var Footer$3=_styled.div.withConfig({displayName:"EventItemTile__Footer",componentId:"sc-12wz8ra-7"})(templateObject_9$6||(templateObject_9$6=__makeTemplateObject(["\n display: flex;\n > span {\n margin-left: auto;\n margin-top: ","px;\n font-size: ","px;\n }\n"],["\n display: flex;\n > span {\n margin-left: auto;\n margin-top: ","px;\n font-size: ","px;\n }\n"])),spacingS,fontSizeSmall);var Registration$2=_styled(EventCardUserRegistration).withConfig({displayName:"EventItemTile__Registration",componentId:"sc-12wz8ra-8"})(templateObject_10$5||(templateObject_10$5=__makeTemplateObject(["\n && {\n margin-left: auto;\n margin-top: ","px;\n button {\n z-index: 1;\n width: 100%;\n }\n }\n"],["\n && {\n margin-left: auto;\n margin-top: ","px;\n button {\n z-index: 1;\n width: 100%;\n }\n }\n"])),spacingS);var CancelInfo$2=_styled(EventCancelInformation).withConfig({displayName:"EventItemTile__CancelInfo",componentId:"sc-12wz8ra-9"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject(["\n margin: ","px -","px -","px;\n padding: ","px;\n\n p {\n padding-left: ","px;\n }\n"],["\n margin: ","px -","px -","px;\n padding: ","px;\n\n p {\n padding-left: ","px;\n }\n"])),spacingM,spacingM,spacingM,spacingS+5,spacingM+spacingXs);var StyledClickableChannelTitles=_styled(ClickableChannelTitles).withConfig({displayName:"EventItemTile__StyledClickableChannelTitles",componentId:"sc-12wz8ra-10"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var templateObject_1$1n,templateObject_2$L,templateObject_3$u,templateObject_4$i,templateObject_5$f,templateObject_6$9$1,templateObject_7$7$1,templateObject_8$6$1,templateObject_9$6,templateObject_10$5,templateObject_11$2$1,templateObject_12$1$1;var DetailViewContextProvider=function DetailViewContextProvider(_a){var itemId=_a.itemId,type=_a.type,loadItemFunc=_a.loadItemFunc,isEditorPreview=_a.isEditorPreview,children=_a.children;var user=useCurrentUserContext().user;var handleFatalError=useContext(ErrorContext).handleFatalError;var translateContents=useTranslateApi().translateContents;var _b=useState$2(),item=_b[0],setItem=_b[1];var _c=useState$2(),originalItem=_c[0],setOriginalItem=_c[1];var _d=useState$2(),selectedLanguage=_d[0],setSelectedLanguage=_d[1];var _e=useState$2(false),hasError=_e[0],setHasError=_e[1];var _f=useState$2(true),isLoading=_f[0],setIsLoading=_f[1];var _g=useState$2(false),showAccessDenied=_g[0],setShowAccessDenied=_g[1];var handleAccessDeniedError=useContext(ErrorContext).handleAccessDeniedError;var isValid=true;useEffect$1(function(){refreshItem();return function(){// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122285
|
+
return jsxs("span",{children:[",",' ',jsx$1(FormattedMessage$1,{id:"DateInfo.archiveOn."+format,values:values},void 0)]},void 0);}}function getModifiedInfo(){var date=item.modified||item.created||new Date();var format=isSameDay(date)?'relative':'absolute';return jsx$1("span",{children:jsx$1(FormattedMessage$1,{id:"DateInfo.modifiedOn."+format,values:{modified:jsx$1(ModifiedDateTime,{value:date},void 0)}},void 0)},void 0);}};var ModifiedDateTime=_styled(DateTime).withConfig({displayName:"DateInfo__ModifiedDateTime",componentId:"sc-xnzpy3-0"})(templateObject_1$1t||(templateObject_1$1t=__makeTemplateObject(["\n &&& {\n text-decoration: none;\n }\n"],["\n &&& {\n text-decoration: none;\n }\n"])));var templateObject_1$1t;var getAuthor=function getAuthor(item){return item.onBehalfOf||item.owner||item.author||{};};var getRealAuthor=function getRealAuthor(item){return item.owner||item.author||{};};var ItemMetaInfo=function ItemMetaInfo(_a){var item=_a.item,className=_a.className,expiryDate=_a.expiryDate,showChannels=_a.showChannels,dateMode=_a.dateMode,channels=_a.channels,_b=_a.readOnly,readOnly=_b===void 0?true:_b,_c=_a.hideAvatar,hideAvatar=_c===void 0?false:_c,hideDisplayName=_a.hideDisplayName,language=_a.language,buildChannelFilterUrl=_a.buildChannelFilterUrl,_d=_a.clickableAvatar,clickableAvatar=_d===void 0?true:_d;var hasChannels=channels&&channels.length>0;var onBehalfAuthor=getAuthor(item);var realAuthor=getRealAuthor(item);return jsxs(Host$y,__assign({className:className,"data-item-metadata":true},{children:[!hideAvatar&&jsx$1(PersonaCard,__assign({upn:onBehalfAuthor.userPrincipalName,readOnly:!clickableAvatar,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:onBehalfAuthor.userPrincipalName,text:onBehalfAuthor.displayName,secondaryText:onBehalfAuthor.userPrincipalName,hidePersonaDetails:true,coinSize:55},void 0)}),void 0),jsxs(InfoDetailsHost,__assign({"data-meta-info-details":true},{children:[!hideDisplayName&&jsx$1(AuthorContainer,{children:jsx$1(AuthorName$1,{author:onBehalfAuthor,readOnly:readOnly},void 0)},void 0),jsxs(DateAndChannels,{children:[jsx$1(DateInfo$1,{item:item,dateMode:dateMode,expiryDate:expiryDate},void 0),"\u00A0",showChannels&&jsx$1(Fragment,{children:hasChannels?jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.channels",values:{channels:jsxs(Fragment,{children:["\u00A0",jsx$1(Channels$1,{channels:channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:buildChannelFilterUrl},void 0)]},void 0)}},void 0):jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.noChannels"},void 0)},void 0)]},void 0),!hideDisplayName&&realAuthor&&realAuthor.userPrincipalName!==onBehalfAuthor.userPrincipalName&&jsx$1(AuthorContainer,{children:jsx$1(FormattedMessage$1,{id:"MetaInfo.writtenBy",values:{author:jsx$1(AuthorName$1,{author:realAuthor,readOnly:readOnly},void 0)}},void 0)},void 0)]}),void 0)]}),void 0);};var Host$y=_styled.div.withConfig({displayName:"ItemMetaInfo__Host",componentId:"sc-1d6drj8-0"})(templateObject_1$1s||(templateObject_1$1s=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var InfoDetailsHost=_styled.div.withConfig({displayName:"ItemMetaInfo__InfoDetailsHost",componentId:"sc-1d6drj8-1"})(templateObject_2$P||(templateObject_2$P=__makeTemplateObject(["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"],["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"])));var AuthorContainer=_styled.div.withConfig({displayName:"ItemMetaInfo__AuthorContainer",componentId:"sc-1d6drj8-2"})(templateObject_3$x||(templateObject_3$x=__makeTemplateObject(["\n font-style: normal;\n display: inline-block;\n"],["\n font-style: normal;\n display: inline-block;\n"])));var DateAndChannels=_styled.div.withConfig({displayName:"ItemMetaInfo__DateAndChannels",componentId:"sc-1d6drj8-3"})(templateObject_4$l||(templateObject_4$l=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var AuthorName$1=function AuthorName(_a){var author=_a.author,readOnly=_a.readOnly;if(!readOnly){return jsx$1(Fragment,{children:author.displayName},void 0);}return jsx$1(PrimaryPersonaCard,__assign({upn:author.userPrincipalName},{children:author.displayName}),void 0);};var PrimaryPersonaCard=_styled(PersonaCard).withConfig({displayName:"ItemMetaInfo__PrimaryPersonaCard",componentId:"sc-1d6drj8-4"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n color: ",";\n text-decoration: underline;\n"],["\n color: ",";\n text-decoration: underline;\n"])),function(p){return p.theme.palette.accent;});var Channels$1=_styled(ClickableChannelTitles).withConfig({displayName:"ItemMetaInfo__Channels",componentId:"sc-1d6drj8-5"})(templateObject_6$b$1||(templateObject_6$b$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$1s,templateObject_2$P,templateObject_3$x,templateObject_4$l,templateObject_5$i,templateObject_6$b$1;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$1r||(templateObject_1$1r=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$1r;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$1q||(templateObject_1$1q=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$O||(templateObject_2$O=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$w||(templateObject_3$w=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$k||(templateObject_4$k=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$1q,templateObject_2$O,templateObject_3$w,templateObject_4$k,templateObject_5$h;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$1p||(templateObject_1$1p=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$N||(templateObject_2$N=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$1p,templateObject_2$N;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$1o||(templateObject_1$1o=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$M||(templateObject_2$M=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$v||(templateObject_3$v=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$g||(templateObject_5$g=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$a$1||(templateObject_6$a$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$8$1||(templateObject_7$8$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$7$1||(templateObject_8$7$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$7||(templateObject_9$7=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$6||(templateObject_10$6=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$1o,templateObject_2$M,templateObject_3$v,templateObject_4$j,templateObject_5$g,templateObject_6$a$1,templateObject_7$8$1,templateObject_8$7$1,templateObject_9$7,templateObject_10$6;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var EventItemTile=function EventItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,onChannelClick=_a.onChannelClick,styleDefinition=_a.styleDefinition,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var userLanguage=getPreferredContentLanguage(user);var title=getTitle(item,user,intl.formatMessage,userLanguage);var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;return jsx$1(PublishableItemTileWrapper,{item:item,itemResourceType:ItemResourceTypes.Events,baseRoute:baseRoute,layoutMode:layoutMode,openTargetInNewWindow:openTargetInNewWindow,styleDefinition:styleDefinition,className:className,onClick:onClick,content:jsxs(Content$3$1,{children:[jsxs(ChannelsAndFeedback,{children:[jsx$1(StyledClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor,onClick:onChannelClick},void 0),jsx$1(FeedbackButtons$1,{children:buttons},void 0)]},void 0),jsx$1(Dates$2,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled},void 0),jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0),jsx$1(StyledTitle$3,{title:title,targetRoute:targetRoute,openTargetInNewWindow:openTargetInNewWindow,onClick:onClick},void 0),jsxs(Footer$3,{children:[jsxs(ContactAndLocation,{children:[jsx$1(EventLocationInfo,{locations:(_c=item.locations)===null||_c===void 0?void 0:_c.slice(0,1)},void 0),jsx$1(EventPeopleInfo,{item:item,hideAnnouncer:true,labelResourceKey:"Events.contactLabel",showFirstContactOnly:true},void 0)]},void 0),!isCancelled&&jsx$1(Registration$2,{item:item,showNoRegistrationRequired:true},void 0)]},void 0),jsx$1(CancelInfo$2,{item:item},void 0)]},void 0)},void 0);};var StyledTitle$3=_styled(Title$8).withConfig({displayName:"EventItemTile__StyledTitle",componentId:"sc-12wz8ra-0"})(templateObject_1$1n||(templateObject_1$1n=__makeTemplateObject(["\n &&& {\n margin-right: auto;\n display: inline-flex;\n }\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n &&& {\n margin-right: auto;\n display: inline-flex;\n }\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$3$1=_styled.div.withConfig({displayName:"EventItemTile__Content",componentId:"sc-12wz8ra-1"})(templateObject_2$L||(templateObject_2$L=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var ChannelsAndFeedback=_styled.div.withConfig({displayName:"EventItemTile__ChannelsAndFeedback",componentId:"sc-12wz8ra-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var Dates$2=_styled(DateTimeRange).withConfig({displayName:"EventItemTile__Dates",componentId:"sc-12wz8ra-3"})(templateObject_5$f||(templateObject_5$f=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n ","\n margin: ","px 0;\n"],["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n ","\n margin: ","px 0;\n"])),fontSizeMedium,function(p){return p.isCancelled&&css$2(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n text-decoration: line-through;\n "],["\n text-decoration: line-through;\n "])));},spacingM);var RecurrenceSeriesInfo$1=_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventItemTile__RecurrenceSeriesInfo",componentId:"sc-12wz8ra-4"})(templateObject_6$9$1||(templateObject_6$9$1=__makeTemplateObject(["\n z-index: 1;\n margin-bottom: ","px;\n"],["\n z-index: 1;\n margin-bottom: ","px;\n"])),spacingM);var FeedbackButtons$1=_styled.div.withConfig({displayName:"EventItemTile__FeedbackButtons",componentId:"sc-12wz8ra-5"})(templateObject_7$7$1||(templateObject_7$7$1=__makeTemplateObject(["\n z-index: 1;\n display: flex;\n align-items: center;\n margin-left: auto;\n\n > div:not(:first-child) {\n margin-left: ","px;\n }\n"],["\n z-index: 1;\n display: flex;\n align-items: center;\n margin-left: auto;\n\n > div:not(:first-child) {\n margin-left: ","px;\n }\n"])),spacingM);var ContactAndLocation=_styled.div.withConfig({displayName:"EventItemTile__ContactAndLocation",componentId:"sc-12wz8ra-6"})(templateObject_8$6$1||(templateObject_8$6$1=__makeTemplateObject(["\n z-index: 1;\n display: flex;\n flex-direction: column;\n\n > div {\n margin-top: ","px;\n }\n"],["\n z-index: 1;\n display: flex;\n flex-direction: column;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingS);var Footer$3=_styled.div.withConfig({displayName:"EventItemTile__Footer",componentId:"sc-12wz8ra-7"})(templateObject_9$6||(templateObject_9$6=__makeTemplateObject(["\n display: flex;\n > span {\n margin-left: auto;\n margin-top: ","px;\n font-size: ","px;\n }\n"],["\n display: flex;\n > span {\n margin-left: auto;\n margin-top: ","px;\n font-size: ","px;\n }\n"])),spacingS,fontSizeSmall);var Registration$2=_styled(EventCardUserRegistration).withConfig({displayName:"EventItemTile__Registration",componentId:"sc-12wz8ra-8"})(templateObject_10$5||(templateObject_10$5=__makeTemplateObject(["\n && {\n margin-left: auto;\n margin-top: ","px;\n button {\n z-index: 1;\n width: 100%;\n }\n }\n"],["\n && {\n margin-left: auto;\n margin-top: ","px;\n button {\n z-index: 1;\n width: 100%;\n }\n }\n"])),spacingS);var CancelInfo$2=_styled(EventCancelInformation).withConfig({displayName:"EventItemTile__CancelInfo",componentId:"sc-12wz8ra-9"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject(["\n margin: ","px -","px -","px;\n padding: ","px;\n\n p {\n padding-left: ","px;\n }\n"],["\n margin: ","px -","px -","px;\n padding: ","px;\n\n p {\n padding-left: ","px;\n }\n"])),spacingM,spacingM,spacingM,spacingS+5,spacingM+spacingXs);var StyledClickableChannelTitles=_styled(ClickableChannelTitles).withConfig({displayName:"EventItemTile__StyledClickableChannelTitles",componentId:"sc-12wz8ra-10"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var templateObject_1$1n,templateObject_2$L,templateObject_3$u,templateObject_4$i,templateObject_5$f,templateObject_6$9$1,templateObject_7$7$1,templateObject_8$6$1,templateObject_9$6,templateObject_10$5,templateObject_11$2$1,templateObject_12$1$1;var DetailViewContextProvider=function DetailViewContextProvider(_a){var itemId=_a.itemId,type=_a.type,loadItemFunc=_a.loadItemFunc,isEditorPreview=_a.isEditorPreview,children=_a.children;var user=useCurrentUserContext().user;var handleFatalError=useContext(ErrorContext).handleFatalError;var translateContents=useTranslateApi().translateContents;var _b=useState$2(),item=_b[0],setItem=_b[1];var _c=useState$2(),originalItem=_c[0],setOriginalItem=_c[1];var _d=useState$2(),selectedLanguage=_d[0],setSelectedLanguage=_d[1];var _e=useState$2(false),hasError=_e[0],setHasError=_e[1];var _f=useState$2(true),isLoading=_f[0],setIsLoading=_f[1];var _g=useState$2(false),showAccessDenied=_g[0],setShowAccessDenied=_g[1];var handleAccessDeniedError=useContext(ErrorContext).handleAccessDeniedError;var isValid=true;useEffect$1(function(){refreshItem();return function(){// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122286
122286
|
isValid=false;};},[itemId]);if(showAccessDenied){handleAccessDeniedError({});return null;}var activeLanguages=NewsService.getItemContentLanguages(originalItem,user.subscription.languages);return jsx$1(DetailViewContext.Provider,__assign({value:getContextValues()},{children:children}),void 0);function getContextValues(){return {isLoading:isLoading,hasError:hasError,resourceType:type,item:item,itemId:itemId,contentLanguage:selectedLanguage===null||selectedLanguage===void 0?void 0:selectedLanguage.lang,userPreferredLanguage:(selectedLanguage===null||selectedLanguage===void 0?void 0:selectedLanguage.isUserSet)?selectedLanguage.lang:getPreferredContentLanguage(user),activeLanguages:activeLanguages,content:item&&selectedLanguage?item.contents[selectedLanguage.lang]:null,updateSelectedLanguage:function(l){return setSelectedLanguage({lang:l,isUserSet:true});},handleRefresh:handleRefresh,handleLanguageChange:handleLanguageChange,isEditorPreview:isEditorPreview};}function handleRefresh(onFinished){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,refreshItem()];case 1:_a.sent();onFinished&&onFinished();return [2/*return*/];}});});}function refreshItem(){return __awaiter(this,void 0,void 0,function(){var p,selectedLanguage_1,err_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,3,4]);return [4/*yield*/,loadItemFunc(itemId)];case 1:p=_a.sent();selectedLanguage_1=NewsService.getLanguageForPublishableItem(p,user);if(isValid){setItem(p);setOriginalItem(p);setSelectedLanguage({isUserSet:false,lang:selectedLanguage_1});setHasError(false);}return [3/*break*/,4];case 2:err_1=_a.sent();if(err_1&&err_1.response&&err_1.response.statusCode===404){if(isValid){setItem(null);setSelectedLanguage(null);setHasError(true);}}else if(err_1&&err_1.response&&err_1.response.statusCode===403){setShowAccessDenied(true);}else {logger.error(err_1);handleFatalError({error:err_1,messageId:'Generic.error'});}return [3/*break*/,4];case 3:isValid&&setIsLoading(false);return [7/*endfinally*/];case 4:return [2/*return*/];}});});}function handleLanguageChange(language){return __awaiter(this,void 0,void 0,function(){var content;var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(item.contents[language]){setSelectedLanguage({isUserSet:true,lang:language});return [2/*return*/];}return [4/*yield*/,translateContents(type,itemId,language)];case 1:content=_b.sent();setItem(__assign(__assign({},item),{contents:__assign(__assign({},item.contents),(_a={},_a[language]=content,_a))}));setSelectedLanguage({isUserSet:true,lang:language});return [2/*return*/];}});});}};var EntityType;(function(EntityType){EntityType["Video"]="video";EntityType["Image"]="image";EntityType["File"]="file";EntityType["Quote"]="quote";EntityType["InlineCode"]="inline-code";EntityType["Gallery"]="gallery";EntityType["Table"]="table";EntityType["Contact"]="contact";EntityType["InlinePageList"]="inline-page-list";EntityType["UrlPreview"]="url-preview";EntityType["ActionButton"]="action-button";})(EntityType||(EntityType={}));var TextViewer=function TextViewer(_a){var html=_a.html,componentMappers=_a.componentMappers;var _b=useState$2(null),editorState=_b[0],setEditorState=_b[1];useEffect$1(function(){setEditorState(getInitialEditorState());// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122287
122287
|
},[html]);if(!editorState){return null;}var currentContent=editorState.getCurrentContent();return jsx$1(Draft$1.Editor,{readOnly:true,editorState:editorState,onChange:function(){return null;},blockRendererFn:blockRenderer,blockStyleFn:blockStyle,blockRenderMap:headingRenderMap},void 0);function blockStyle(block){var type=block.getType();if(type==='unstyled'){return 'paragraph';}return null;}function blockRenderer(block){if(block.getType()!=='atomic'){return null;}var entityKey=block.getEntityAt(0);if(entityKey==null){return null;}var entity=currentContent.getEntity(entityKey);var handler=componentMappers.find(function(h){return h.type===entity.getType();});if(handler!=null){return {component:handler.component,editable:false,props:__assign({},entity.getData())};}return null;}function getInitialEditorState(){var contentState=convertFromHTML$1({htmlToEntity:convertHtmlToEntity,htmlToBlock:createHtmlToBlockConverter(componentMappers)})(html||'');return Draft$1.EditorState.createWithContent(contentState,decorator);}function convertHtmlToEntity(nodeName,node,createEntity){for(var _i=0,componentMappers_1=componentMappers;_i<componentMappers_1.length;_i++){var handler=componentMappers_1[_i];var match=handler.getPropsFromHtml(nodeName,node);if(match){return createEntity(handler.type,'IMMUTABLE',match);}}if(nodeName==='a'){return createEntity('LINK','MUTABLE',{url:node.getAttribute('href')});}return null;}};var Link$1=function Link(_a){var contentState=_a.contentState,entityKey=_a.entityKey,children=_a.children;var url=contentState.getEntity(entityKey).getData().url;return jsx$1(TextLink,__assign({url:url},{children:children}),void 0);};function findLinkEntities(contentBlock,callback,contentState){contentBlock.findEntityRanges(function(character){var entityKey=character.getEntity();return entityKey!==null&&contentState.getEntity(entityKey).getType()==='LINK';},callback);}var decorator=new Draft$1.CompositeDecorator([{strategy:findLinkEntities,component:Link$1}]);function createHtmlToBlockConverter(componentMappers){var componentMapperParentNodes=[];return function(nodeName,node){// note (sl): draftJS does call this for all root elements AND
|
|
122288
122288
|
// their children. We only want to handle an element,
|
|
@@ -122312,14 +122312,14 @@ var showPagingDots=hasMoreImages&&images.length<=15;return jsxs(Fragment,{childr
|
|
|
122312
122312
|
if(pullToRefreshContext){pullToRefreshContext.setEnabled(false);}}function handleCloseFullScreen(){setIsFullScreenOpen(false);if(pullToRefreshContext){pullToRefreshContext.setEnabled(true);}}};var GalleryContainer=_styled.div.withConfig({displayName:"PhotoGallery__GalleryContainer",componentId:"sc-peu8jt-0"})(templateObject_1$1l||(templateObject_1$1l=__makeTemplateObject(["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"])),spacingS+5,function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.neutralTertiary;});var CarouselButton=_styled(IconButton).withConfig({displayName:"PhotoGallery__CarouselButton",componentId:"sc-peu8jt-1"})(templateObject_2$J||(templateObject_2$J=__makeTemplateObject(["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"],["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"])),spacingS);var Slide=_styled.div.withConfig({displayName:"PhotoGallery__Slide",componentId:"sc-peu8jt-2"})(templateObject_3$s||(templateObject_3$s=__makeTemplateObject(["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"],["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"])));_styled.div.withConfig({displayName:"PhotoGallery__SlideIndicator",componentId:"sc-peu8jt-3"})(templateObject_4$g||(templateObject_4$g=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"])));var Figure$1=_styled.figure.withConfig({displayName:"PhotoGallery__Figure",componentId:"sc-peu8jt-4"})(templateObject_7$6$1||(templateObject_7$6$1=__makeTemplateObject(["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"],["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"])),function(p){return p.height?css$2(templateObject_5$d||(templateObject_5$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height-100):'height: 300px;';},function(p){return p.theme.palette.neutralLighter;},minScreenSize.medium,function(p){return p.height?css$2(templateObject_6$8$1||(templateObject_6$8$1=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height):'height: 400px;';});var Caption=_styled.span.withConfig({displayName:"PhotoGallery__Caption",componentId:"sc-peu8jt-5"})(templateObject_8$5$1||(templateObject_8$5$1=__makeTemplateObject(["\n padding-top: 5px;\n text-align: center;\n ","\n"],["\n padding-top: 5px;\n text-align: center;\n ","\n"])),LineClamp(2,fontSizeSmall,1.2));var ImageWrapper=_styled.div.withConfig({displayName:"PhotoGallery__ImageWrapper",componentId:"sc-peu8jt-6"})(templateObject_9$5$1||(templateObject_9$5$1=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"])));_styled.a.withConfig({displayName:"PhotoGallery__ClickableImageWrapper",componentId:"sc-peu8jt-7"})(templateObject_10$4$1||(templateObject_10$4$1=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"])));var templateObject_1$1l,templateObject_2$J,templateObject_3$s,templateObject_4$g,templateObject_5$d,templateObject_6$8$1,templateObject_7$6$1,templateObject_8$5$1,templateObject_9$5$1,templateObject_10$4$1;var DetailViewContext=/*#__PURE__*/createContext(null);function useDetailViewContext(){return useContext(DetailViewContext);}var InlineGallery=function InlineGallery(_a){var galleryDetails=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType,isEditorPreview=_b.isEditorPreview;var user=useCurrentUser();var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var getImageEditorUrlWithToken=useImageEditorApi().getImageEditorUrlWithToken;return jsx$1(PhotoGallerySlider,{gallery:galleryDetails,imageUrlResolver:getImageUrl,showFullScreenButton:true},void 0);function getImageUrl(imageId,width,height){if(!item.fileAccessToken){return null;}var imageWidth=width!==null&&width!==void 0?width:getMaxImageWidth();if(isEditorPreview){return getImageEditorUrlWithToken(item.fileAccessToken,item.id,user.subscription.id,imageId,resourceType,imageWidth,height);}else {return getImageUrlWithToken(item.fileAccessToken,item.id,user.subscription.id,resourceType,imageId,imageWidth,height);}}};var InlineGalleryMapper={component:InlineGallery,type:EntityType.Gallery,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var galleryId=node.getAttribute('data-gallery-id');if(galleryId==null){return null;}return {galleryId:galleryId,images:Array.from(node.querySelectorAll('img')).map(function(imageNode){var _a,_b,_c,_d;var imageTitle=(_d=(_b=(_a=imageNode.nextSibling)===null||_a===void 0?void 0:_a.textContent)!==null&&_b!==void 0?_b:// @ts-ignore
|
|
122313
122313
|
(_c=imageNode.nextSibling)===null||_c===void 0?void 0:_c.innerText)!==null&&_d!==void 0?_d:imageNode.getAttribute('data-image-title');return {imageId:imageNode.getAttribute('data-image-id'),imageTitle:imageTitle,width:imageNode.getAttribute('width'),height:imageNode.getAttribute('height')};}).filter(function(image){return image.imageId!==null;})};}};var InlineImage=function InlineImage(_a){var image=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType,isEditorPreview=_b.isEditorPreview;var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var getImageEditorUrlWithToken=useImageEditorApi().getImageEditorUrlWithToken;var user=useCurrentUser();var imageWidth=getImageWidth(image);var imageUrl=getImageUrl();return jsx$1(Host$v,{children:jsxs(Figure,__assign({width:imageWidth,onClick:!isEditorPreview?function(){return showPhoto(getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,'default'));}:null},{children:[jsx$1("img",{src:imageUrl,alt:image.imageTitle||'',width:imageWidth},void 0),image.imageTitle&&jsx$1("figcaption",{children:image.imageTitle},void 0)]}),void 0)},void 0);function getImageUrl(){var _a;if(isEditorPreview){return getImageEditorUrlWithToken(item.fileAccessToken,item.id,user.subscription.id,image.imageId,resourceType,imageWidth);}else {return (_a=image.previewUrl)!==null&&_a!==void 0?_a:getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,imageWidth);}}};var Host$v=_styled.div.withConfig({displayName:"InlineImage__Host",componentId:"sc-14k2cj1-0"})(templateObject_1$1k||(templateObject_1$1k=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var Figure=_styled.figure.withConfig({displayName:"InlineImage__Figure",componentId:"sc-14k2cj1-1"})(templateObject_2$I||(templateObject_2$I=__makeTemplateObject(["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n max-width: 100%;\n }\n"],["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n max-width: 100%;\n }\n"])),function(p){return p.width;});var InlineImageMapper={component:InlineImage,type:EntityType.Image,getPropsFromHtml:function(nodeName,node){var _a,_b;if(nodeName!=='div'){return null;}var imageId=node.getAttribute('data-image-id');if(imageId==null){return null;}var imageTitle=(_b=(_a=node.querySelector('p[data-image-caption]'))===null||_a===void 0?void 0:_a.innerText)!==null&&_b!==void 0?_b:// use legacy attribute for old content
|
|
122314
122314
|
node.getAttribute('data-image-caption');return {imageId:imageId,imageTitle:imageTitle,width:getImageWidth(node.getAttribute('data-image-width')),height:node.getAttribute('data-image-height')};}};var templateObject_1$1k,templateObject_2$I;var InlineContactViewer=function InlineContactViewer(_a){var _b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;var contact=_a.contact;var user=useCurrentUser();var userInfo=usePromise$2(function(){return getContactInfo();},null,[contact])[0];var getUserInfo=useAccountApi().getUserInfo;var additionalPropertyKeys=['mail','company','mobilePhone','officePhone','address','additionalInfo'];var showMoreProperties=contact.properties&&Object.keys(contact.properties).filter(function(key){return additionalPropertyKeys.indexOf(key)>=0&&contact.properties[key].value!==null;}).length>0;return jsxs(Host$u,{children:[jsx$1(StyledAvatar$1,{upn:contact.upn,text:contact.properties.displayName.shouldAutoLoad&&userInfo?userInfo.displayName||contact.properties.displayName.value:contact.properties.displayName.value,secondaryText:((_b=contact.properties.department)===null||_b===void 0?void 0:_b.shouldAutoLoad)&&userInfo?((_c=userInfo.properties)===null||_c===void 0?void 0:_c.department)||((_d=contact.properties.department)===null||_d===void 0?void 0:_d.value):(_e=contact.properties.department)===null||_e===void 0?void 0:_e.value,tertiaryText:((_f=contact.properties.jobTitle)===null||_f===void 0?void 0:_f.shouldAutoLoad)&&userInfo?((_g=userInfo.properties)===null||_g===void 0?void 0:_g.jobTitle)||((_h=contact.properties.jobTitle)===null||_h===void 0?void 0:_h.value):(_j=contact.properties.jobTitle)===null||_j===void 0?void 0:_j.value},void 0),showMoreProperties&&jsx$1(PropertiesContainer,{children:jsxs("ul",{children:[((_k=contact.properties.company)===null||_k===void 0?void 0:_k.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"EMI",tooltipResourceKey:"Generic.company"},{children:contact.properties.company.shouldAutoLoad&&userInfo?((_l=userInfo.properties)===null||_l===void 0?void 0:_l.company)||contact.properties.company.value:contact.properties.company.value}),void 0)},void 0),((_m=contact.properties.mail)===null||_m===void 0?void 0:_m.value)&&jsx$1("li",{children:jsx$1(EmailProperty,{email:contact.properties.mail.shouldAutoLoad&&userInfo?userInfo.mail||contact.properties.mail.value:contact.properties.mail.value},void 0)},void 0),((_o=contact.properties.officePhone)===null||_o===void 0?void 0:_o.value)&&jsx$1("li",{children:jsx$1(OfficePhoneProperty,{value:contact.properties.officePhone.shouldAutoLoad&&userInfo?((_p=userInfo.properties)===null||_p===void 0?void 0:_p.businessPhones[0])||contact.properties.officePhone.value:contact.properties.officePhone.value},void 0)},void 0),((_q=contact.properties.mobilePhone)===null||_q===void 0?void 0:_q.value)&&jsx$1("li",{children:jsx$1(MobilePhoneProperty,{value:contact.properties.mobilePhone.shouldAutoLoad&&userInfo?((_r=userInfo.properties)===null||_r===void 0?void 0:_r.mobilePhone)||contact.properties.mobilePhone.value:contact.properties.mobilePhone.value},void 0)},void 0),((_s=contact.properties.address)===null||_s===void 0?void 0:_s.value)&&jsx$1("li",{children:jsx$1(LocationProperty,{value:contact.properties.address.shouldAutoLoad&&userInfo?((_u=(_t=userInfo.properties)===null||_t===void 0?void 0:_t.officeLocation)!==null&&_u!==void 0?_u:(_v=userInfo.properties)===null||_v===void 0?void 0:_v.address)||contact.properties.address.value:contact.properties.address.value,tooltipResourceKey:"Generic.address"},void 0)},void 0),((_w=contact.properties.additionalInfo)===null||_w===void 0?void 0:_w.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"ContactInfo",tooltipResourceKey:"Generic.additionalInfo"},{children:contact.properties.additionalInfo.shouldAutoLoad&&userInfo?((_x=userInfo.properties)===null||_x===void 0?void 0:_x.notes)||contact.properties.additionalInfo.value:contact.properties.additionalInfo.value}),void 0)},void 0)]},void 0)},void 0)]},void 0);function getContactInfo(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!contact.upn||user.isPublicUser){return [2/*return*/,null];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getUserInfo(contact.upn)];case 2:return [2/*return*/,_a.sent()];case 3:_a.sent();// no exception is thrown because the backup values will be set from the contact
|
|
122315
|
-
return [2/*return*/,null];case 4:return [2/*return*/];}});});}};var Host$u=_styled.div.withConfig({displayName:"InlineContactViewer__Host",componentId:"sc-1rvwltt-0"})(templateObject_1$1j||(templateObject_1$1j=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var PropertiesContainer=_styled.div.withConfig({displayName:"InlineContactViewer__PropertiesContainer",componentId:"sc-1rvwltt-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"],["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"])),spacingS,fontSizeSmall);var StyledAvatar$1=_styled(Avatar).withConfig({displayName:"InlineContactViewer__StyledAvatar",componentId:"sc-1rvwltt-2"})(templateObject_3$r||(templateObject_3$r=__makeTemplateObject(["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"],["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"])),fontSizeSmall);var templateObject_1$1j,templateObject_2$H,templateObject_3$r;var FileListHost=_styled.ul.withConfig({displayName:"InlineFileStyles__FileListHost",componentId:"sc-1qjkw11-0"})(templateObject_1$1i||(templateObject_1$1i=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"])));var FileListItem=_styled.li.withConfig({displayName:"InlineFileStyles__FileListItem",componentId:"sc-1qjkw11-1"})(templateObject_2$G||(templateObject_2$G=__makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"],["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"])),spacingM,minScreenSize.small,spacingS-5);var FileContainerStyle=css$2(templateObject_3$q||(templateObject_3$q=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"],["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"])),spacingS,spacingS+5,fontSizeSmall);var FileIconStyle=css$2(templateObject_4$f||(templateObject_4$f=__makeTemplateObject(["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"],["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"])),spacingS,fontSizeLarge-3);var templateObject_1$1i,templateObject_2$G,templateObject_3$q,templateObject_4$f;var InlineFileDownloadButton=function InlineFileDownloadButton(_a){var getFileUrl=_a.getFileUrl,fileName=_a.fileName,title=_a.title,fileAccessToken=_a.fileAccessToken,additionalContent=_a.additionalContent,className=_a.className;var _b=useFileAccessTokenApi(),exchangeShortLivedToken=_b.exchangeShortLivedToken,createDownloadClickHandler=_b.createDownloadClickHandler;var iconName=getFileIcon(fileName);if(!getFileUrl){return jsxs(FileHost,__assign({className:className,title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0);}return jsx$1(DownloadButton$3,__assign({className:className,onClick:createDownloadClickHandler('_blank',function(){return __awaiter(void 0,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(fileAccessToken)];case 1:token=_a.sent();return [2/*return*/,getFileUrl(token)];}});});})},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var FileHost=_styled.div.withConfig({displayName:"InlineFileDownloadButton__FileHost",componentId:"sc-1nadbt8-0"})(templateObject_1$1h||(templateObject_1$1h=__makeTemplateObject(["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"],["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])),FileContainerStyle,FileIconStyle);var DownloadButton$3=_styled(DefaultButton).withConfig({displayName:"InlineFileDownloadButton__DownloadButton",componentId:"sc-1nadbt8-1"})(templateObject_2$F||(templateObject_2$F=__makeTemplateObject(["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"],["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"])),function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var DownloadLink$1=_styled.a.withConfig({displayName:"InlineFileDownloadButton__DownloadLink",componentId:"sc-1nadbt8-2"})(templateObject_3$p||(templateObject_3$p=__makeTemplateObject(["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.palette.neutralPrimary;});var templateObject_1$1h,templateObject_2$F,templateObject_3$p;var InlinePageDocumentDownloadButton=function InlinePageDocumentDownloadButton(_a){var fileUrl=_a.fileUrl,fileName=_a.fileName,title=_a.title,fileIconName=_a.fileIconName,onClick=_a.onClick,className=_a.className;var iconName=fileIconName||getFileIcon(fileName);return jsx$1(DownloadLink$1,__assign({href:fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:onClick,className:className},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var InlineQuoteViewer=function InlineQuoteViewer(_a){var _b,_c;var quoteDetails=_a.quoteDetails,onClick=_a.onClick,className=_a.className;var upn=(_b=quoteDetails.author)===null||_b===void 0?void 0:_b.userPrincipalName;var displayName=(_c=quoteDetails.author)===null||_c===void 0?void 0:_c.displayName;var showAvatar=upn&"eDetails.showAvatar;return jsxs(Host$t,__assign({onClick:onClick,"data-inline-quote":true,className:className},{children:[jsx$1("blockquote",{children:quoteDetails.text},void 0),showAvatar&&jsx$1("figcaption",{children:jsx$1(PersonaCard,__assign({upn:upn},{children:jsx$1(Avatar,{upn:upn,text:displayName,secondaryText:upn},void 0)}),void 0)},void 0),!showAvatar&&displayName&&jsx$1("figcaption",{children:displayName},void 0)]}),void 0);};var Host$t=_styled.figure.withConfig({displayName:"InlineQuoteViewer__Host",componentId:"sc-1kb6gh1-0"})(templateObject_1$1g||(templateObject_1$1g=__makeTemplateObject(["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px ","px ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0 0 ","px;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"],["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px ","px ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0 0 ","px;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"])),function(p){return p.theme.palette.accent;},spacingM,2*spacingXl,spacingXl,spacingS+spacingXs,spacingXl,spacingS,fontSizeSmall,maxScreenSize.medium,spacingS+spacingXxs+1);var templateObject_1$1g;var InlineQuote=function InlineQuote(_a){var quoteDetails=_a.blockProps;return jsx$1(InlineQuoteViewer,{quoteDetails:quoteDetails},void 0);};var InlineQuoteMapper={component:InlineQuote,type:EntityType.Quote,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d,_e;if(nodeName!=='div'){return null;}var quoteId=node.getAttribute('data-quote-id');if(quoteId==null){return null;}var upn=node.getAttribute('data-quote-authorupn');var text=(_a=node.getAttribute('data-quote-text'))!==null&&_a!==void 0?_a:// use legacy attribute for old content
|
|
122315
|
+
return [2/*return*/,null];case 4:return [2/*return*/];}});});}};var Host$u=_styled.div.withConfig({displayName:"InlineContactViewer__Host",componentId:"sc-1rvwltt-0"})(templateObject_1$1j||(templateObject_1$1j=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var PropertiesContainer=_styled.div.withConfig({displayName:"InlineContactViewer__PropertiesContainer",componentId:"sc-1rvwltt-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"],["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"])),spacingS,fontSizeSmall);var StyledAvatar$1=_styled(Avatar).withConfig({displayName:"InlineContactViewer__StyledAvatar",componentId:"sc-1rvwltt-2"})(templateObject_3$r||(templateObject_3$r=__makeTemplateObject(["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"],["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"])),fontSizeSmall);var templateObject_1$1j,templateObject_2$H,templateObject_3$r;var FileListHost=_styled.ul.withConfig({displayName:"InlineFileStyles__FileListHost",componentId:"sc-1qjkw11-0"})(templateObject_1$1i||(templateObject_1$1i=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"])));var FileListItem=_styled.li.withConfig({displayName:"InlineFileStyles__FileListItem",componentId:"sc-1qjkw11-1"})(templateObject_2$G||(templateObject_2$G=__makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"],["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"])),spacingM,minScreenSize.small,spacingS-5);var FileContainerStyle=css$2(templateObject_3$q||(templateObject_3$q=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"],["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"])),spacingS,spacingS+5,fontSizeSmall);var FileIconStyle=css$2(templateObject_4$f$1||(templateObject_4$f$1=__makeTemplateObject(["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"],["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"])),spacingS,fontSizeLarge-3);var templateObject_1$1i,templateObject_2$G,templateObject_3$q,templateObject_4$f$1;var InlineFileDownloadButton=function InlineFileDownloadButton(_a){var getFileUrl=_a.getFileUrl,fileName=_a.fileName,title=_a.title,fileAccessToken=_a.fileAccessToken,additionalContent=_a.additionalContent,className=_a.className;var _b=useFileAccessTokenApi(),exchangeShortLivedToken=_b.exchangeShortLivedToken,createDownloadClickHandler=_b.createDownloadClickHandler;var iconName=getFileIcon(fileName);if(!getFileUrl){return jsxs(FileHost,__assign({className:className,title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0);}return jsx$1(DownloadButton$3,__assign({className:className,onClick:createDownloadClickHandler('_blank',function(){return __awaiter(void 0,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(fileAccessToken)];case 1:token=_a.sent();return [2/*return*/,getFileUrl(token)];}});});})},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var FileHost=_styled.div.withConfig({displayName:"InlineFileDownloadButton__FileHost",componentId:"sc-1nadbt8-0"})(templateObject_1$1h||(templateObject_1$1h=__makeTemplateObject(["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"],["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])),FileContainerStyle,FileIconStyle);var DownloadButton$3=_styled(DefaultButton).withConfig({displayName:"InlineFileDownloadButton__DownloadButton",componentId:"sc-1nadbt8-1"})(templateObject_2$F||(templateObject_2$F=__makeTemplateObject(["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"],["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"])),function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var DownloadLink$1=_styled.a.withConfig({displayName:"InlineFileDownloadButton__DownloadLink",componentId:"sc-1nadbt8-2"})(templateObject_3$p||(templateObject_3$p=__makeTemplateObject(["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.palette.neutralPrimary;});var templateObject_1$1h,templateObject_2$F,templateObject_3$p;var InlinePageDocumentDownloadButton=function InlinePageDocumentDownloadButton(_a){var fileUrl=_a.fileUrl,fileName=_a.fileName,title=_a.title,fileIconName=_a.fileIconName,onClick=_a.onClick,className=_a.className;var iconName=fileIconName||getFileIcon(fileName);return jsx$1(DownloadLink$1,__assign({href:fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:onClick,className:className},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var InlineQuoteViewer=function InlineQuoteViewer(_a){var _b,_c;var quoteDetails=_a.quoteDetails,onClick=_a.onClick,className=_a.className;var upn=(_b=quoteDetails.author)===null||_b===void 0?void 0:_b.userPrincipalName;var displayName=(_c=quoteDetails.author)===null||_c===void 0?void 0:_c.displayName;var showAvatar=upn&"eDetails.showAvatar;return jsxs(Host$t,__assign({onClick:onClick,"data-inline-quote":true,className:className},{children:[jsx$1("blockquote",{children:quoteDetails.text},void 0),showAvatar&&jsx$1("figcaption",{children:jsx$1(PersonaCard,__assign({upn:upn},{children:jsx$1(Avatar,{upn:upn,text:displayName,secondaryText:upn},void 0)}),void 0)},void 0),!showAvatar&&displayName&&jsx$1("figcaption",{children:displayName},void 0)]}),void 0);};var Host$t=_styled.figure.withConfig({displayName:"InlineQuoteViewer__Host",componentId:"sc-1kb6gh1-0"})(templateObject_1$1g||(templateObject_1$1g=__makeTemplateObject(["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px ","px ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0 0 ","px;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"],["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px ","px ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0 0 ","px;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"])),function(p){return p.theme.palette.accent;},spacingM,2*spacingXl,spacingXl,spacingS+spacingXs,spacingXl,spacingS,fontSizeSmall,maxScreenSize.medium,spacingS+spacingXxs+1);var templateObject_1$1g;var InlineQuote=function InlineQuote(_a){var quoteDetails=_a.blockProps;return jsx$1(InlineQuoteViewer,{quoteDetails:quoteDetails},void 0);};var InlineQuoteMapper={component:InlineQuote,type:EntityType.Quote,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d,_e;if(nodeName!=='div'){return null;}var quoteId=node.getAttribute('data-quote-id');if(quoteId==null){return null;}var upn=node.getAttribute('data-quote-authorupn');var text=(_a=node.getAttribute('data-quote-text'))!==null&&_a!==void 0?_a:// use legacy attribute for old content
|
|
122316
122316
|
(_b=node.querySelector('blockquote'))===null||_b===void 0?void 0:_b.innerText;var displayName=(_e=(_c=node.getAttribute('data-quote-author'))!==null&&_c!==void 0?_c:(_d=node.querySelector('figcaption'))===null||_d===void 0?void 0:_d.innerText)!==null&&_e!==void 0?_e:// use legacy attribute for old content
|
|
122317
122317
|
node.getAttribute('data-quote-authorname');var showAvatar=node.getAttribute('data-quote-showavatar')==='true';var hasAuthor=upn||displayName;return {id:quoteId,text:text,author:hasAuthor?{userPrincipalName:upn,displayName:displayName}:null,showAvatar:showAvatar};},prepareRootNode:function(node){// detect if we a have new (draftJS) content. If not remove innerHTML
|
|
122318
122318
|
// in order to ensure parsing old blocks
|
|
122319
122319
|
if(node.querySelector('blockquote[data-quote-text]')==null){node.innerHTML='';}}};var InlineVideo=function InlineVideo(_a){var _b=_a.blockProps,id=_b.id,source=_b.source,url=_b.url,isDirectUrl=_b.isDirectUrl;var user=useCurrentUser();var token=useCurrentToken();var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var isStreamVideo=source===VideoSource.MicrosoftStream;if(isStreamVideo&&env.isAnyMobileApp){return jsx$1(StreamButton,__assign({onClick:handleMicrosoftStreamClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.watchMicrosoftStream"},void 0)}),void 0);}return jsx$1(InlineVideoViewer,{videoInfo:{id:id,source:source,url:url,isDirectUrl:isDirectUrl},videoThumbnailUrl:isDirectUrl?getVideoThumbnailUrl(token,user.subscription.id,source,id):null},void 0);function handleMicrosoftStreamClick(){return __awaiter(this,void 0,void 0,function(){var url;return __generator(this,function(_a){switch(_a.label){case 0:url=getMicrosoftStreamVideoUrl(id);return [4/*yield*/,onOpenExternalLink(url,true)];case 1:_a.sent();return [2/*return*/];}});});}};var InlineVideoViewer=_styled(VideoWithThumbnailView).withConfig({displayName:"InlineVideo__InlineVideoViewer",componentId:"sc-12qdsy1-0"})(templateObject_1$1f||(templateObject_1$1f=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var StreamButton=_styled(PrimaryButton).withConfig({displayName:"InlineVideo__StreamButton",componentId:"sc-12qdsy1-1"})(templateObject_2$E||(templateObject_2$E=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var InlineVideoMapper={component:InlineVideo,type:EntityType.Video,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var videoId=node.getAttribute('data-video-id');if(videoId==null){return null;}var source=node.getAttribute('data-video-source');return {id:videoId,source:parseInt(source,10),url:node.getAttribute('data-video-url'),isDirectUrl:node.getAttribute('data-is-direct-video-url')==='true'};},prepareRootNode:function(node){if(node.childNodes.length>0){node.innerHTML='';}}};var templateObject_1$1f,templateObject_2$E;var InlinePageListViewer=function InlinePageListViewer(_a){var items=_a.items,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,isInitialLoading=_a.isInitialLoading;var theme=useTheme$2();if(!items||items.length===0){return null;}return jsx$1(PagesList,__assign({"data-inline-page-list":true},{children:items.map(function(item){var isPublished=!item.hasHiddenAncestor&&(item.isCurrentPublishedVersion||!!item.publishedVersionId);return jsx$1(StyledPageItemTile,{item:item,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,styleDefinition:{backgroundColor:theme.palette.neutralLighter,bannerDefaultWidth:70,height:70,applyRoundedCorners:true,titleFontSize:fontSizeSmall,titleMargin:'0',contentPadding:spacingS-2+"px "+(spacingM-5)+"px"},additionalContent:jsx$1(StyledDocumentDownloadButton,{page:item},void 0),showBannerPlaceholder:true,isVisible:isPublished||isInitialLoading},item.id);})}),void 0);};var PagesList=_styled.div.withConfig({displayName:"InlinePageListViewer__PagesList",componentId:"sc-qn2xdx-0"})(templateObject_1$1e||(templateObject_1$1e=__makeTemplateObject(["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},spacingS);var StyledPageItemTile=_styled(PageItemTile).withConfig({displayName:"InlinePageListViewer__StyledPageItemTile",componentId:"sc-qn2xdx-1"})(templateObject_2$D||(templateObject_2$D=__makeTemplateObject(["\n opacity: ",";\n"],["\n opacity: ",";\n"])),function(p){return p.isVisible?'1':'0.3';});var StyledDocumentDownloadButton=_styled(DocumentDownloadButton).withConfig({displayName:"InlinePageListViewer__StyledDocumentDownloadButton",componentId:"sc-qn2xdx-2"})(templateObject_3$o||(templateObject_3$o=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"])));var templateObject_1$1e,templateObject_2$D,templateObject_3$o;var InlinePageListWithPaging=function InlinePageListWithPaging(_a){var pages=_a.pages,baseRoute=_a.baseRoute,_b=_a.pagingProps,getNextPage=_b.getNextPage,getFirstPage=_b.getFirstPage,getPrevPage=_b.getPrevPage,isFirstPage=_b.isFirstPage,isInitialLoading=_b.isInitialLoading,isLoadingNextPage=_b.isLoadingNextPage,hideNextButton=_b.hideNextButton,filterBaseUrl=_a.filterBaseUrl;return jsxs(Fragment,{children:[jsx$1(InlinePageListViewer,{items:pages,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,isInitialLoading:isInitialLoading},void 0),jsx$1(HorizontalPager,{onNextClick:getNextPage,onPrevClick:getPrevPage,onFirstClick:getFirstPage,hidePrevButton:isFirstPage||isInitialLoading,hideNextButton:hideNextButton,isLoadingNextPage:isLoadingNextPage},void 0)]},void 0);};function useItemLoaderByCurrentPage(currentPageId,pageSize,navigationContext,settings,getAllItemsHandler,deps){var _a=useState$2(getAllItems()),allItems=_a[0],setAllItems=_a[1];var allItemIdsString=allItems===null||allItems===void 0?void 0:allItems.map(function(i){return i.id;}).join(',');var _b=useItemLoaderWithPreFetch(pageSize,loadNextItems,[allItemIdsString]),items=_b.items,pagingProps=__rest(_b,["items"]);useEffect$1(function(){setAllItems(getAllItems());},__spreadArray([],deps||[]));var skeletonItems=getNextItems();var pageItems=pagingProps.isInitialLoading?skeletonItems:items;var hideNextButton=pagingProps.isInitialLoading?allItems.length<=pageSize:pagingProps.isLastPage;return {pageItems:pageItems,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:hideNextButton})};function getAllItems(){var _a;var children=(_a=navigationContext===null||navigationContext===void 0?void 0:navigationContext.children)!==null&&_a!==void 0?_a:[];if(settings.showPages&&settings.showDocuments){return children;}var filteredChildren=children.filter(function(c){return c.pageType===(settings.showPages?PageType.Page:PageType.Document);});return filteredChildren;}function getNextItems(startIndex,paginationToken){if(startIndex===void 0){startIndex=0;}if(paginationToken===void 0){paginationToken=pageSize;}return allItems.slice(startIndex,paginationToken);}function loadNextItems(pageSize,paginationToken){return __awaiter(this,void 0,void 0,function(){var showSubpagesAndDocuments,pageType,result_1,fullAllItems,token,newPaginationToken;return __generator(this,function(_a){switch(_a.label){case 0:if(!!paginationToken)return [3/*break*/,2];showSubpagesAndDocuments=settings.showPages&&settings.showDocuments;pageType=settings.showPages?PageType.Page:PageType.Document;return [4/*yield*/,getAllItemsHandler(currentPageId,showSubpagesAndDocuments?undefined:pageType)];case 1:result_1=_a.sent();fullAllItems=allItems.map(function(i){return result_1.find(function(r){return r.id===i.id;});});setAllItems(fullAllItems);return [2/*return*/,{items:fullAllItems.slice(0,pageSize),paginationToken:pageSize,hasNextPage:!!fullAllItems[pageSize]}];case 2:token=parseInt(paginationToken);newPaginationToken=token+pageSize;return [2/*return*/,{items:getNextItems(token,newPaginationToken),paginationToken:newPaginationToken,hasNextPage:allItems[newPaginationToken]!==null}];}});});}}var InlinePageListSkeleton=function InlinePageListSkeleton(_a){var isDataLoaded=_a.isDataLoaded,_b=_a.pageSize,pageSize=_b===void 0?5:_b,children=_a.children;var items=Array.from(Array(pageSize).keys());var uniqueId=createId();var palette=useContext(ThemeContext$1).theme.palette;return jsx$1(Shimmer,__assign({isDataLoaded:isDataLoaded,shimmerColors:{shimmer:palette.neutralTertiaryAlt,shimmerWave:palette.neutralTertiary},customElementsGroup:jsx$1(Fragment,{children:items.map(function(i){return jsx$1(PageItemShimmer,{},uniqueId+"-"+i);})},void 0)},{children:children}),void 0);};var PageItemShimmer=function PageItemShimmer(){var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$s,{children:[jsxs(Inner$4,{children:[jsx$1(ShimmerElementsGroup,{styles:{root:{backgroundColor:palette.accent,borderRadius:5}},width:'70px',shimmerElements:[{type:ShimmerElementType.line,height:70,width:70}]},void 0),jsx$1(ShimmerElementsGroup,{backgroundColor:palette.neutralLighter,width:"calc(100% - 70px)",flexWrap:true,shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(20% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'80%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(100% - "+2*spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(40% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'60%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0);};var Host$s=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Host",componentId:"sc-13wpgyn-0"})(templateObject_1$1d||(templateObject_1$1d=__makeTemplateObject([""],[""])));var Inner$4=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Inner",componentId:"sc-13wpgyn-1"})(templateObject_2$C||(templateObject_2$C=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var templateObject_1$1d,templateObject_2$C;var InlineContact=function InlineContact(_a){var contact=__rest(_a.blockProps,[]);return jsx$1(InlineContactViewer,{contact:contact},void 0);};var InlineContactMapper={component:InlineContact,type:EntityType.Contact,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var contactId=node.getAttribute('data-contact-id');if(contactId==null){return null;}var properties={};Array.from(node.querySelectorAll('li')).forEach(function(childNode){var _a,_b;var propertyKey=childNode.getAttribute('data-contact-property');var shouldAutoLoad=(_a=childNode.getAttribute('data-auto-load'))!==null&&_a!==void 0?_a:childNode.getAttribute('data-from-directory');var propertyValue=(_b=childNode.getAttribute('data-contact-property-value'))!==null&&_b!==void 0?_b:childNode.innerText;properties[propertyKey]={value:propertyValue,shouldAutoLoad:shouldAutoLoad==='true'};});return {id:contactId,tenantId:node.getAttribute('data-contact-tenantid'),upn:node.getAttribute('data-contact-upn'),properties:properties};}};var InlineCodeViewer=function InlineCodeViewer(_a){var codeDetails=_a.codeDetails,showJsPlaceholder=_a.showJsPlaceholder,readOnly=_a.readOnly;var htmlContainerRef=useRef$1(null);var javascriptContainerRef=useRef$1(null);useEffect$1(function(){if(readOnly){return;}if(htmlContainerRef.current!=null){if(htmlContainerRef.current.innerHTML!==codeDetails.html){htmlContainerRef.current.innerHTML=codeDetails.html;refreshScripts(htmlContainerRef.current);}}if(javascriptContainerRef.current!=null){var oldScript=javascriptContainerRef.current.querySelector('script');var newScriptText=";\n (function() {\n try {\n "+codeDetails.javascript+";\n } catch (err) {\n console.error(err);\n }\n })();";if(!oldScript||oldScript.innerText!==newScriptText){oldScript===null||oldScript===void 0?void 0:oldScript.remove();var script=document.createElement('script');script.type='text/javascript';var scriptContent=document.createTextNode(newScriptText);script.appendChild(scriptContent);javascriptContainerRef.current.appendChild(script);}}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122320
122320
|
},[codeDetails.html,codeDetails.javascript]);if(readOnly){return jsxs(Host$r,{children:[jsx$1("div",{children:codeDetails.html&&JSON.stringify(codeDetails.html)},void 0),jsx$1("div",{children:codeDetails.javascript&&JSON.stringify(codeDetails.javascript)},void 0)]},void 0);}return jsxs(Host$r,{children:[codeDetails.html&&jsx$1("div",{ref:function(c){return htmlContainerRef.current=c;}},void 0),codeDetails.javascript&&jsx$1("div",__assign({ref:function(c){return javascriptContainerRef.current=c;}},{children:!codeDetails.html&&showJsPlaceholder&&jsx$1(JavascriptPlaceholder,{},void 0)}),void 0)]},void 0);};var Host$r=_styled.div.withConfig({displayName:"InlineCodeViewer__Host",componentId:"sc-q9v8du-0"})(templateObject_1$1c||(templateObject_1$1c=__makeTemplateObject(["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"],["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"])));var JavascriptPlaceholder=_styled.div.withConfig({displayName:"InlineCodeViewer__JavascriptPlaceholder",componentId:"sc-q9v8du-1"})(templateObject_2$B||(templateObject_2$B=__makeTemplateObject(["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"],["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"])));var templateObject_1$1c,templateObject_2$B;var InlineCode=function InlineCode(_a){var _b=_a.blockProps,id=_b.id,html=_b.html,javascript=_b.javascript;var features=useFeatures();if(!features.editorInlineMarkup){return null;}return jsx$1(InlineCodeViewer,{codeDetails:{id:id,html:html,javascript:javascript}},void 0);};var InlineCodeMapper={component:InlineCode,type:EntityType.InlineCode,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d;if(nodeName!=='div'){return null;}var codeId=node.getAttribute('data-code-id');if(codeId==null){return null;}var html=(_b=(_a=node.querySelector('[data-code-html]'))===null||_a===void 0?void 0:_a.innerHTML)!==null&&_b!==void 0?_b:node.getAttribute('data-code-html');var javascript=(_d=(_c=node.querySelector('script[type="text/javascript"][data-code-javascript]'))===null||_c===void 0?void 0:_c.innerHTML)!==null&&_d!==void 0?_d:node.getAttribute('data-code-javascript');return {id:codeId,html:html,javascript:javascript};},prepareRootNode:function(node){// detect if we a have new (draftJS) content. If not remove innerHTML
|
|
122321
122321
|
// in order to ensure parsing old blocks
|
|
122322
|
-
if(node.querySelector('[data-code-html]')==null){node.innerHTML='';}}};var HeaderFormat=css$2(templateObject_1$1b||(templateObject_1$1b=__makeTemplateObject(["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"],["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.palette.neutralSecondaryAlt;},function(p){return p.theme.palette.neutralLight;});var FooterFormat=css$2(templateObject_2$A||(templateObject_2$A=__makeTemplateObject(["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"],["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"])),function(p){return p.theme.palette.white;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var Grid$1=css$2(templateObject_3$n||(templateObject_3$n=__makeTemplateObject(["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"],["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;});var AlternateLines=css$2(templateObject_4$e$1||(templateObject_4$e$1=__makeTemplateObject(["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"],["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;});var Table=_styled.table.withConfig({displayName:"InlineTableStyles__Table",componentId:"sc-10dcamf-0"})(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"],["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"])),fontSizeNormal,fontSizeNormal,function(_a){var showGrid=_a.format.showGrid;return showGrid&&Grid$1;},function(_a){var alternateLines=_a.format.alternateLines;return alternateLines&&AlternateLines;},function(_a){var hasHeaderRow=_a.format.hasHeaderRow;return hasHeaderRow&&HeaderFormat;},function(_a){var hasFooterRow=_a.format.hasFooterRow;return hasFooterRow&&FooterFormat;});var templateObject_1$1b,templateObject_2$A,templateObject_3$n,templateObject_4$e$1,templateObject_5$c;var TableViewer=function TableViewer(_a){var tableDefinition=_a.blockProps.tableDefinition;var lastRowIndex=tableDefinition.rows.length-1;return jsx$1(Host$q,{children:jsx$1(Table,__assign({format:tableDefinition.format},{children:jsx$1("tbody",{children:tableDefinition.rows.map(function(r,rowIndex){return jsx$1("tr",{children:r.cells.map(function(c,index){var _a,_b,_c;return jsx$1("td",__assign({style:__assign(__assign({},cellStyleToCssProps(c.style,tableDefinition.format.alternateLines||tableDefinition.format.hasHeaderRow&&rowIndex===0||tableDefinition.format.hasFooterRow&&rowIndex===lastRowIndex)),rowIndex===0&&{width:(_b=(_a=tableDefinition.columns)===null||_a===void 0?void 0:_a[index])===null||_b===void 0?void 0:_b.width}),title:c.value,"data-multiline":c.isMultiline},{children:c.url?jsx$1(TextLink,__assign({url:c.url,style:{color:(_c=c.style.fontColor)!==null&&_c!==void 0?_c:null}},{children:c.value}),void 0):c.value}),index);})},rowIndex);})},void 0)}),void 0)},void 0);};function cssPropsToCellStyle(style,alternateLines,isHeaderRow){if(style==null){return {};}return {isBold:style.fontWeight==='bold',isItalic:style.fontStyle==='italic',textAlign:style.textAlign==='left'||style.textAlign==='right'||style.textAlign==='center'?style.textAlign:null,fontColor:style.color,backgroundColor:!alternateLines&&!isHeaderRow?style.backgroundColor:null};}function cellStyleToCssProps(cellStyle,disableCustomColors){if(cellStyle==null){return {};}return __assign(__assign(__assign(__assign(__assign({},cellStyle.isBold&&{fontWeight:'bold'}),cellStyle.isItalic&&{fontStyle:'italic'}),cellStyle.textAlign&&{textAlign:cellStyle.textAlign}),cellStyle.fontColor&&!disableCustomColors&&{color:cellStyle.fontColor}),cellStyle.backgroundColor&&!disableCustomColors&&{backgroundColor:cellStyle.backgroundColor});}var InlineTable={component:TableViewer,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var tableId=node.getAttribute('data-table-id');if(tableId==null){return null;}var table=node.querySelector('table');var body=table===null||table===void 0?void 0:table.querySelector('tbody');if(body==null){return null;}var firstRow=body.querySelector('tr:first-child');return {tableId:tableId,tableDefinition:{columns:Array.from(firstRow.querySelectorAll('td')).map(function(c){var _a,_b;return {width:(_b=(_a=c.style)===null||_a===void 0?void 0:_a.width)!==null&&_b!==void 0?_b:null};}),rows:Array.from(body.querySelectorAll('tr')).map(function(row){return {rowId:createId(),cells:Array.from(row.querySelectorAll('td')).map(function(cell){var _a,_b;return {cellId:createId(),value:cell.innerText,style:cssPropsToCellStyle(cell.style,table.classList.contains('condense-table--alternateLines'),table.classList.contains('condense-table--hasHeader')&&row.rowIndex===0),isMultiline:cell.innerText.includes('\n'),url:(_b=(_a=cell.querySelector('a'))===null||_a===void 0?void 0:_a.getAttribute('href'))!==null&&_b!==void 0?_b:null};})};}),format:{showGrid:table.classList.contains('condense-table--showGrid'),alternateLines:table.classList.contains('condense-table--alternateLines'),hasHeaderRow:table.classList.contains('condense-table--hasHeader'),hasFooterRow:table.classList.contains('condense-table--hasFooter')}}};},type:EntityType.Table};var Host$q=_styled.div.withConfig({displayName:"InlineTable__Host",componentId:"sc-8db5xf-0"})(templateObject_1$1a||(templateObject_1$1a=__makeTemplateObject(["\n width: 100%;\n overflow-x: auto;\n"],["\n width: 100%;\n overflow-x: auto;\n"])));var templateObject_1$1a;var ItemBodyWrapper=function ItemBodyWrapper(_a){var className=_a.className,children=_a.children;return jsx$1(Host$p,__assign({className:className,"data-body-wrapper":true},{children:children}),void 0);};var Host$p=_styled.div.withConfig({displayName:"ItemBodyWrapper__Host",componentId:"sc-6adwhw-0"})(templateObject_1$19||(templateObject_1$19=__makeTemplateObject(["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n figure[data-inline-quote='true'] {\n padding-left: 15px;\n }\n\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n\n ul {\n padding-left: 14px;\n }\n ol {\n padding-left: 20px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"],["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n figure[data-inline-quote='true'] {\n padding-left: 15px;\n }\n\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n\n ul {\n padding-left: 14px;\n }\n ol {\n padding-left: 20px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS,function(p){return p.theme.palette.accent;},maxScreenSize.medium,fontSizeLarge-3,fontSizeLarge-5,fontSizeMedium,fontSizeSmall,minScreenSize.small);var templateObject_1$19;var InlineFileList=function InlineFileList(_a){var fileBlock=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;var getFileUrlWithToken=useFileApi().getFileUrlWithToken;if(!fileBlock.files||fileBlock.files.length===0){return null;}var files=fileBlock.files.map(function(f){if(f.pageId){return __assign({},f);}var getFileUrl=function getFileUrl(token){var _a;return ((_a=f.getDownloadUrl)===null||_a===void 0?void 0:_a.call(f,token))||getFileUrlWithToken(token||item.fileAccessToken,item.id,undefined,f.fileId,f.fileName,resourceType);};return __assign(__assign({},f),{getDownloadUrl:getFileUrl,accessToken:item.fileAccessToken});});var audioFiles=files.filter(function(f){return isAudioFile(f.fileName);});var videoFiles=files.filter(function(f){return isVideoFile(f.fileName);});var otherFiles=files.filter(function(f){return !audioFiles.includes(f)&&!videoFiles.includes(f);});return jsxs(Fragment,{children:[videoFiles.length>0&&jsx$1(FileListHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:videoFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(VideoFileHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:jsx$1(VideoFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)}),void 0)},f.fileId);})}),void 0),audioFiles.length>0&&jsx$1(FileListHost,{children:audioFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(AudioFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)},f.fileId);})},void 0),otherFiles.length>0&&jsx$1(FileListHost,{children:otherFiles.map(function(f){return jsx$1(FileListItem,{children:f.pageId?jsx$1(InlinePageDocument,{file:f},void 0):jsx$1(InlineFileDownloadButton,{getFileUrl:f.getDownloadUrl,fileAccessToken:item.fileAccessToken,fileName:f.fileName,title:f.title},void 0)},f.fileId);})},void 0)]},void 0);};var InlinePageDocument=function InlinePageDocument(_a){var file=_a.file;var pageId=file.pageId;var loadPage=usePagesApi().loadPage;var page=usePromise$2(function(){return loadPage(pageId);},undefined,[pageId])[0];var _b=useInlinePageDocument(file,page),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsx$1(InlinePageDocumentDownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0);};var InlineFileMapper={component:InlineFileList,type:EntityType.File,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var blockId=node.getAttribute('data-file-block');if(!blockId){var fileId=node.getAttribute('data-file-id')||node.getAttribute('data-file-fileid');if(fileId==null){return null;}var title=node.getAttribute('data-file-title');var fileName=node.getAttribute('data-file-name');var pageId=node.getAttribute('data-inline-page-document-id');var extension=node.getAttribute('data-file-extension');return {blockId:createId(),files:[{fileId:fileId,title:title,fileName:fileName,pageId:pageId,extension:extension}]};}return {blockId:blockId,files:Array.from(node.querySelectorAll('[data-file-id], [data-file-fileid]')).map(function(fileNode){var _a;return {fileId:(_a=fileNode.getAttribute('data-file-id'))!==null&&_a!==void 0?_a:fileNode.getAttribute('data-file-fileid'),fileName:fileNode.getAttribute('data-file-name'),title:fileNode.getAttribute('data-file-title'),pageId:fileNode.getAttribute('data-inline-page-document-id'),extension:fileNode.getAttribute('data-file-extension')};})};}};var VideoFileHost=_styled.div.withConfig({displayName:"InlineFileList__VideoFileHost",componentId:"sc-16i3l51-0"})(templateObject_1$18||(templateObject_1$18=__makeTemplateObject(["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"],["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"])),videoAttachmentRoundedCornerSize);var templateObject_1$18;var InlineActionButton=_styled(TextLink).withConfig({displayName:"InlineActionButtonStyles__InlineActionButton",componentId:"sc-1m041aj-0"})(templateObject_2$z||(templateObject_2$z=__makeTemplateObject(["\n &&& {\n display: block;\n min-width: 200px;\n width: auto;\n height: ","px;\n line-height: ","px;\n padding: 0 15px;\n border: 1px solid;\n border-radius: 2px;\n box-shadow: 0px ","px ","px #00000033;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n\n ","\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n &&& {\n display: block;\n min-width: 200px;\n width: auto;\n height: ","px;\n line-height: ","px;\n padding: 0 15px;\n border: 1px solid;\n border-radius: 2px;\n box-shadow: 0px ","px ","px #00000033;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n\n ","\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingX,spacingX,spacingXs,spacingXs*2,function(p){return p.isPrimary&&css$2(templateObject_1$17||(templateObject_1$17=__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: ",";\n "],["\n background-color: ",";\n border-color: ",";\n color: ",";\n "])),p.theme.palette.themePrimary,p.theme.palette.themePrimary,p.theme.textColors.onPrimary);});var InlineActionButtonListItem=_styled.li.withConfig({displayName:"InlineActionButtonStyles__InlineActionButtonListItem",componentId:"sc-1m041aj-1"})(templateObject_3$m||(templateObject_3$m=__makeTemplateObject(["\n &&& {\n margin-bottom: 0;\n display: flex;\n flex-wrap: nowrap;\n max-width: 100%;\n }\n"],["\n &&& {\n margin-bottom: 0;\n display: flex;\n flex-wrap: nowrap;\n max-width: 100%;\n }\n"])));var InlineActionButtonsHost=_styled.ul.withConfig({displayName:"InlineActionButtonStyles__InlineActionButtonsHost",componentId:"sc-1m041aj-2"})(templateObject_4$d$1||(templateObject_4$d$1=__makeTemplateObject(["\n display: flex;\n gap: ","px;\n justify-content: center;\n flex-wrap: wrap;\n\n &&& {\n margin: 0 0 ","px;\n padding: 0;\n list-style: none;\n }\n"],["\n display: flex;\n gap: ","px;\n justify-content: center;\n flex-wrap: wrap;\n\n &&& {\n margin: 0 0 ","px;\n padding: 0;\n list-style: none;\n }\n"])),spacingM,spacingM);var templateObject_1$17,templateObject_2$z,templateObject_3$m,templateObject_4$d$1;var InlineActionButtonList=function InlineActionButtonList(_a){var blockProps=_a.blockProps;var actionButtons=(blockProps||{}).actionButtons;if(!actionButtons||actionButtons.length===0){return null;}return jsx$1(InlineActionButtonsHost,__assign({"data-inline-actionbuttons":true},{children:actionButtons.map(function(ab){return jsx$1(InlineActionButtonListItem,{children:jsx$1(InlineActionButton,__assign({url:ab.url,isPrimary:ab.isPrimary},{children:ab.label}),void 0)},ab.id);})}),void 0);};var InlineActionButtonMapper={component:InlineActionButtonList,type:EntityType.ActionButton,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var blockId=node.getAttribute('data-action-buttons');return {blockId:blockId,actionButtons:Array.from(node.querySelectorAll('[data-action-button]')).map(function(actionButtonNode){return {id:actionButtonNode.getAttribute('data-action-button'),isPrimary:actionButtonNode.getAttribute('data-is-primary'),url:actionButtonNode.getAttribute('data-url'),label:actionButtonNode.innerHTML};})};}};var EventDetailViewPeopleInfo=function EventDetailViewPeopleInfo(){var item=useDetailViewContext().item;return jsx$1(StyledEventPeopleInfo,{item:item},void 0);};var StyledEventPeopleInfo=_styled(EventPeopleInfo).withConfig({displayName:"EventDetailViewPeopleInfo__StyledEventPeopleInfo",componentId:"sc-1d42bpm-0"})(templateObject_1$16||(templateObject_1$16=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$16;var EventDetailViewLocationInfo=function EventDetailViewLocationInfo(){var item=useDetailViewContext().item;if(!item.locations||item.locations.length===0){return null;}return jsx$1(StyledEventLocationInfo,{locations:item.locations},void 0);};var StyledEventLocationInfo=_styled(EventLocationInfo).withConfig({displayName:"EventDetailViewLocationInfo__StyledEventLocationInfo",componentId:"sc-4kfe0w-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$15;var EventDetailViewMetaInfo=function EventDetailViewMetaInfo(_a){var allowFilterByChannels=_a.allowFilterByChannels;var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;return jsxs(Fragment,{children:[jsx$1(EventDetailViewLocationInfo,{},void 0),jsx$1(EventDetailViewPeopleInfo,{},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userPreferredLanguage,allowFilterByChannels:allowFilterByChannels},void 0)]},void 0);};var EventDetailViewDatesInfo=function EventDetailViewDatesInfo(_a){var className=_a.className;var item=useDetailViewContext().item;return jsx$1(Host$o,{children:jsx$1(DateTimeRange,{className:className,startDate:item.startDate,endDate:item.endDate},void 0)},void 0);};var Host$o=_styled.div.withConfig({displayName:"EventDetailViewDatesInfo__Host",componentId:"sc-3sblty-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"],["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"])),fontSizeSmall,spacingM);var templateObject_1$14;var PollUserContext=/*#__PURE__*/createContext(null);var DetailViewPollsSubmitButton=function DetailViewPollsSubmitButton(_a){var isReadOnly=_a.isReadOnly;var formatMessage=useIntl().formatMessage;var _b=useContext(PollUserContext),submitPoll=_b.submitPoll,hasMissingUnsavedAnswer=_b.hasMissingUnsavedAnswer,hasMissingAnswers=_b.hasMissingAnswers,answers=_b.answers,resourceType=_b.resourceType,item=_b.item;var updatePollAnswers=useFeedbackApi().updatePollAnswers;if(!hasMissingUnsavedAnswer){return null;}return jsx$1("div",{children:jsx$1(PrimaryButton,{"data-poll-submit-button":true,onClick:function(){return submitPoll(function(){return updatePollAnswers(resourceType,item.id,answers);});},text:formatMessage({id:'Polls.display.submitButtonCaption'}),disabled:hasMissingAnswers||isReadOnly},void 0)},void 0);};var DetailViewCsvExportButton=function DetailViewCsvExportButton(_a){var path=_a.path,stringResource=_a.stringResource,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;if(!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsx$1(Host$n,__assign({className:className},{children:jsxs(DownloadButton$2,__assign({onClick:startDownload},{children:[jsx$1(LeftAlignedIcon,{iconName:"Download"},void 0),jsx$1(FormattedMessage$1,{id:stringResource},void 0)]}),void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(itemId,fileDownloadToken){return createApiUrl("/"+resourceType+"/"+itemId+"/"+path,{access_token:fileDownloadToken});}};var Host$n=_styled.div.withConfig({displayName:"DetailViewCsvExportButton__Host",componentId:"sc-n02scx-0"})(templateObject_1$13||(templateObject_1$13=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var DownloadButton$2=_styled(DefaultButton).withConfig({displayName:"DetailViewCsvExportButton__DownloadButton",componentId:"sc-n02scx-1"})(templateObject_2$y||(templateObject_2$y=__makeTemplateObject(["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.theme.textColors.default;},maxScreenSize.medium,fontSizeSmall);var LeftAlignedIcon=_styled(Icon).withConfig({displayName:"DetailViewCsvExportButton__LeftAlignedIcon",componentId:"sc-n02scx-2"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"],["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$13,templateObject_2$y,templateObject_3$l;var DetailViewPollExportButton=function DetailViewPollExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.polls){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/poll/result/export",stringResource:"Polls.display.exportAsCsv"},void 0);};var PollTranslationContext=/*#__PURE__*/createContext(null);var PollTranslationContextProvider=function PollTranslationContextProvider(_a){var contents=_a.contents,language=_a.language,additionalTranslations=_a.additionalTranslations,children=_a.children;var user=useCurrentUser();var activeContents=Object.values(contents||{}).filter(function(c){return c.active;});var allLanguages=activeContents.map(function(c){return c.language;});var allTranslations=additionalTranslations||[];for(var _i=0,_b=activeContents.filter(function(c){return c.poll&&c.poll.questions;});_i<_b.length;_i++){var content=_b[_i];var language_1=content.language;for(var _c=0,_d=content.poll.questions;_c<_d.length;_c++){var question=_d[_c];allTranslations.push({language:language_1,id:question.questionId,text:question.text});for(var _e=0,_f=question.choices;_e<_f.length;_e++){var choice=_f[_e];allTranslations.push({language:language_1,id:choice.choiceId,text:choice.text});}}}return jsx$1(PollTranslationContext.Provider,__assign({value:{getAllTranslations:getAllTranslations,getTranslation:getTranslation}},{children:jsx$1(Fragment,{children:children},void 0)}),void 0);function getAllTranslations(id){return allTranslations.filter(function(t){return t.id===id&&t.text;});}function getTranslation(id){var preferredLanguage=NewsService.getUserPreferredLanguage(allLanguages,user);var translationItems=getAllTranslations(id);var translation=translationItems.find(function(t){return t.language===language;})||translationItems.find(function(t){return t.language===preferredLanguage;})||translationItems[0];return translation?translation.text:null;}};var PollUserInput=function PollUserInput(){var _a=useContext(PollUserContext),questions=_a.questions,getQuestionResult=_a.getQuestionResult,addAnswer=_a.addAnswer;return jsx$1("div",{children:questions.map(function(q){return jsx$1(QuestionInputItem,{question:q,onChange:function(choiceIds){return handleQuestionChange(q,choiceIds);},result:getQuestionResult(q.questionId)},q.questionId);})},void 0);function handleQuestionChange(question,choiceIds){addAnswer(question.questionId,choiceIds);}};var QuestionInput=function QuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var questionText=getTranslation(question.questionId);return jsxs("div",__assign({className:className,"data-question-id":question.questionId,"data-question-text":questionText},{children:[jsx$1(QuestionText,{children:questionText},void 0),question.isMultiChoice&&jsx$1(MultiChoiceQuestionInput,{question:question,onChange:onChange,result:result},void 0),!question.isMultiChoice&&jsx$1(SingleChoiceQuestionInput,{question:question,onChange:function(choiceId){return onChange([choiceId]);},result:result},void 0)]}),void 0);};var MultiChoiceQuestionInput=function MultiChoiceQuestionInput(_a){var question=_a.question,result=_a.result,onChange=_a.onChange;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1("div",{children:question.choices.map(function(c){return jsx$1(StyledCheckbox$2,{isResultMode:result.showResults,disabled:result.showResults||c.disabled,checked:result.userSelectedChoices.some(function(sc){return sc===c.choiceId;}),onChange:function(_,isChecked){return handleMultipleChoiceChange(c.choiceId,isChecked);},label:getTranslation(c.choiceId),onRenderLabel:function(_){return jsx$1(MultiChoiceLabel,{choice:c,result:result},void 0);}},c.choiceId);})},void 0);function handleMultipleChoiceChange(choiceId,isSelected){var choiceIds=result.userSelectedChoices.filter(function(c){return c!==choiceId;});if(isSelected){choiceIds.push(choiceId);}onChange(choiceIds);}};var SingleChoiceQuestionInput=function SingleChoiceQuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1(ChoiceInput,{isResultMode:result.showResults,selectedKey:result.userSelectedChoices[0],onChange:function(_,option){return onChange(option.key);},options:question.choices.map(function(c){return {key:c.choiceId,choiceId:c.choiceId,text:getTranslation(c.choiceId),disabled:result.showResults||c.disabled,onRenderLabel:function(_){return jsx$1(SingleChoiceLabel,{choice:c,result:result},void 0);}};})},void 0);};var ChoiceLabel=function ChoiceLabel(_a){var choice=_a.choice,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var choiceText=getTranslation(choice.choiceId);return jsxs(ChoiceLabelHost,__assign({isResultMode:result.showResults,className:className,"data-choice-id":choice.choiceId,"data-choice-text":choiceText},{children:[choiceText,choice.description&&jsx$1(ChoiceLabelSecondaryText,__assign({"data-choice-secondary-text":true},{children:choice.description}),void 0),result.showResults&&jsx$1(ChoiceResult,{result:result,choiceId:choice.choiceId},void 0)]}),void 0);};var ChoiceResult=function ChoiceResult(_a){var choiceId=_a.choiceId,result=_a.result;var numberResult=result.choiceResults[choiceId]||0;var percent=numberResult/result.totalFeedbackCount;var palette=useContext(ThemeContext$1).theme.palette;return jsxs(ChoiceResultHost,__assign({"data-choice-result":numberResult},{children:[jsx$1(Bar,{percentComplete:percent,barHeight:10,styles:{progressBar:{backgroundColor:palette.accent}}},void 0),jsx$1("span",{children:jsx$1(FormattedNumber,{value:numberResult},void 0)},void 0)]}),void 0);};var ChoiceResultHost=_styled.div.withConfig({displayName:"PollUserInput__ChoiceResultHost",componentId:"sc-eeg1mx-0"})(templateObject_1$12||(templateObject_1$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"],["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"])));var Bar=_styled(ProgressIndicator).withConfig({displayName:"PollUserInput__Bar",componentId:"sc-eeg1mx-1"})(templateObject_2$x||(templateObject_2$x=__makeTemplateObject(["\n flex: 1 0 auto;\n"],["\n flex: 1 0 auto;\n"])));var QuestionText=_styled.div.withConfig({displayName:"PollUserInput__QuestionText",componentId:"sc-eeg1mx-2"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var QuestionInputItem=_styled(QuestionInput).withConfig({displayName:"PollUserInput__QuestionInputItem",componentId:"sc-eeg1mx-3"})(templateObject_4$c$1||(templateObject_4$c$1=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingL);var ChoiceLabelHost=_styled.span.withConfig({displayName:"PollUserInput__ChoiceLabelHost",componentId:"sc-eeg1mx-4"})(templateObject_5$b$1||(templateObject_5$b$1=__makeTemplateObject(["\n display: inline-block;\n ","\n ","\n"],["\n display: inline-block;\n ","\n ","\n"])),function(p){return p.isResultMode&&'max-width: 400px;';},function(p){return p.isResultMode&&'width: 100%;';});var ChoiceLabelSecondaryText=_styled.div.withConfig({displayName:"PollUserInput__ChoiceLabelSecondaryText",componentId:"sc-eeg1mx-5"})(templateObject_6$7$1||(templateObject_6$7$1=__makeTemplateObject(["\n opacity: 0.75;\n"],["\n opacity: 0.75;\n"])));var SingleChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__SingleChoiceLabel",componentId:"sc-eeg1mx-6"})(templateObject_7$5$1||(templateObject_7$5$1=__makeTemplateObject(["\n padding-left: 30px;\n"],["\n padding-left: 30px;\n"])));var MultiChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__MultiChoiceLabel",componentId:"sc-eeg1mx-7"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n padding-left: 5px;\n"],["\n padding-left: 5px;\n"])));var ChoiceInput=_styled(ChoiceGroup).withConfig({displayName:"PollUserInput__ChoiceInput",componentId:"sc-eeg1mx-8"})(templateObject_9$4$1||(templateObject_9$4$1=__makeTemplateObject(["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"],["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"])));var StyledCheckbox$2=_styled(Checkbox).withConfig({displayName:"PollUserInput__StyledCheckbox",componentId:"sc-eeg1mx-9"})(templateObject_10$3$1||(templateObject_10$3$1=__makeTemplateObject(["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"],["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"])),function(p){return p.isResultMode?'flex-start':'center';});var templateObject_1$12,templateObject_2$x,templateObject_3$k,templateObject_4$c$1,templateObject_5$b$1,templateObject_6$7$1,templateObject_7$5$1,templateObject_8$4$1,templateObject_9$4$1,templateObject_10$3$1;var PollDisplay=function PollDisplay(_a){var children=_a.children,className=_a.className;var formatMessage=useIntl().formatMessage;return jsxs("section",__assign({className:className,"aria-label":formatMessage({id:'Polls.sectionLabel'}),"data-consumer-poll":true},{children:[jsx$1(PollUserInput,{},void 0),children]}),void 0);};var PollUserContextProvider=function PollUserContextProvider(_a){var _b;var item=_a.item,onBehalfOfUpn=_a.onBehalfOfUpn,resourceType=_a.resourceType,language=_a.language,getAdditionalQuestions=_a.getAdditionalQuestions,getAdditionalUserAnswers=_a.getAdditionalUserAnswers,getPollResults=_a.getPollResults,showResult=_a.showResult,children=_a.children;var poll=item.poll,itemId=item.id;var getFeedback=useFeedbackApi().getFeedback;var _c=useState$2(getAdditionalQuestions===null||getAdditionalQuestions===void 0?void 0:getAdditionalQuestions(null)),additionalQuestions=_c[0],setAdditionalQuestions=_c[1];var showError=useNotificationContext().showError;var questionDefinitions=(_b=poll===null||poll===void 0?void 0:poll.questions)!==null&&_b!==void 0?_b:[];var _d=usePromise$2(loadUserAnswers),userAnswers=_d[0],isLoading=_d[1],setUserAnswers=_d[3];var _e=useState$2([]),unsavedQuestionsIds=_e[0],setUnsavedQuestionsIds=_e[1];var _f=usePromise$2(function(){return getPollResults(itemId);},{answers:[]},[itemId]),pollResult=_f[0],isLoadingPollResult=_f[1],fetchPollResults=_f[5];useEffect$1(function(){var _a;if(isLoadingPollResult||!((_a=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_a===void 0?void 0:_a.length)){return;}getAdditionalQuestions&&setAdditionalQuestions(getAdditionalQuestions(pollResult));// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122322
|
+
if(node.querySelector('[data-code-html]')==null){node.innerHTML='';}}};var HeaderFormat=css$2(templateObject_1$1b||(templateObject_1$1b=__makeTemplateObject(["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"],["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.palette.neutralSecondaryAlt;},function(p){return p.theme.palette.neutralLight;});var FooterFormat=css$2(templateObject_2$A||(templateObject_2$A=__makeTemplateObject(["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"],["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"])),function(p){return p.theme.palette.white;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var Grid$1=css$2(templateObject_3$n||(templateObject_3$n=__makeTemplateObject(["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"],["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;});var AlternateLines=css$2(templateObject_4$e$1||(templateObject_4$e$1=__makeTemplateObject(["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"],["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;});var Table=_styled.table.withConfig({displayName:"InlineTableStyles__Table",componentId:"sc-10dcamf-0"})(templateObject_5$c$1||(templateObject_5$c$1=__makeTemplateObject(["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"],["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"])),fontSizeNormal,fontSizeNormal,function(_a){var showGrid=_a.format.showGrid;return showGrid&&Grid$1;},function(_a){var alternateLines=_a.format.alternateLines;return alternateLines&&AlternateLines;},function(_a){var hasHeaderRow=_a.format.hasHeaderRow;return hasHeaderRow&&HeaderFormat;},function(_a){var hasFooterRow=_a.format.hasFooterRow;return hasFooterRow&&FooterFormat;});var templateObject_1$1b,templateObject_2$A,templateObject_3$n,templateObject_4$e$1,templateObject_5$c$1;var TableViewer=function TableViewer(_a){var tableDefinition=_a.blockProps.tableDefinition;var lastRowIndex=tableDefinition.rows.length-1;return jsx$1(Host$q,{children:jsx$1(Table,__assign({format:tableDefinition.format},{children:jsx$1("tbody",{children:tableDefinition.rows.map(function(r,rowIndex){return jsx$1("tr",{children:r.cells.map(function(c,index){var _a,_b,_c;return jsx$1("td",__assign({style:__assign(__assign({},cellStyleToCssProps(c.style,tableDefinition.format.alternateLines||tableDefinition.format.hasHeaderRow&&rowIndex===0||tableDefinition.format.hasFooterRow&&rowIndex===lastRowIndex)),rowIndex===0&&{width:(_b=(_a=tableDefinition.columns)===null||_a===void 0?void 0:_a[index])===null||_b===void 0?void 0:_b.width}),title:c.value,"data-multiline":c.isMultiline},{children:c.url?jsx$1(TextLink,__assign({url:c.url,style:{color:(_c=c.style.fontColor)!==null&&_c!==void 0?_c:null}},{children:c.value}),void 0):c.value}),index);})},rowIndex);})},void 0)}),void 0)},void 0);};function cssPropsToCellStyle(style,alternateLines,isHeaderRow){if(style==null){return {};}return {isBold:style.fontWeight==='bold',isItalic:style.fontStyle==='italic',textAlign:style.textAlign==='left'||style.textAlign==='right'||style.textAlign==='center'?style.textAlign:null,fontColor:style.color,backgroundColor:!alternateLines&&!isHeaderRow?style.backgroundColor:null};}function cellStyleToCssProps(cellStyle,disableCustomColors){if(cellStyle==null){return {};}return __assign(__assign(__assign(__assign(__assign({},cellStyle.isBold&&{fontWeight:'bold'}),cellStyle.isItalic&&{fontStyle:'italic'}),cellStyle.textAlign&&{textAlign:cellStyle.textAlign}),cellStyle.fontColor&&!disableCustomColors&&{color:cellStyle.fontColor}),cellStyle.backgroundColor&&!disableCustomColors&&{backgroundColor:cellStyle.backgroundColor});}var InlineTable={component:TableViewer,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var tableId=node.getAttribute('data-table-id');if(tableId==null){return null;}var table=node.querySelector('table');var body=table===null||table===void 0?void 0:table.querySelector('tbody');if(body==null){return null;}var firstRow=body.querySelector('tr:first-child');return {tableId:tableId,tableDefinition:{columns:Array.from(firstRow.querySelectorAll('td')).map(function(c){var _a,_b;return {width:(_b=(_a=c.style)===null||_a===void 0?void 0:_a.width)!==null&&_b!==void 0?_b:null};}),rows:Array.from(body.querySelectorAll('tr')).map(function(row){return {rowId:createId(),cells:Array.from(row.querySelectorAll('td')).map(function(cell){var _a,_b;return {cellId:createId(),value:cell.innerText,style:cssPropsToCellStyle(cell.style,table.classList.contains('condense-table--alternateLines'),table.classList.contains('condense-table--hasHeader')&&row.rowIndex===0),isMultiline:cell.innerText.includes('\n'),url:(_b=(_a=cell.querySelector('a'))===null||_a===void 0?void 0:_a.getAttribute('href'))!==null&&_b!==void 0?_b:null};})};}),format:{showGrid:table.classList.contains('condense-table--showGrid'),alternateLines:table.classList.contains('condense-table--alternateLines'),hasHeaderRow:table.classList.contains('condense-table--hasHeader'),hasFooterRow:table.classList.contains('condense-table--hasFooter')}}};},type:EntityType.Table};var Host$q=_styled.div.withConfig({displayName:"InlineTable__Host",componentId:"sc-8db5xf-0"})(templateObject_1$1a||(templateObject_1$1a=__makeTemplateObject(["\n width: 100%;\n overflow-x: auto;\n"],["\n width: 100%;\n overflow-x: auto;\n"])));var templateObject_1$1a;var ItemBodyWrapper=function ItemBodyWrapper(_a){var className=_a.className,children=_a.children;return jsx$1(Host$p,__assign({className:className,"data-body-wrapper":true},{children:children}),void 0);};var Host$p=_styled.div.withConfig({displayName:"ItemBodyWrapper__Host",componentId:"sc-6adwhw-0"})(templateObject_1$19||(templateObject_1$19=__makeTemplateObject(["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n figure[data-inline-quote='true'] {\n padding-left: 15px;\n }\n\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n\n ul {\n padding-left: 14px;\n }\n ol {\n padding-left: 20px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"],["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n figure[data-inline-quote='true'] {\n padding-left: 15px;\n }\n\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n\n ul {\n padding-left: 14px;\n }\n ol {\n padding-left: 20px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS,function(p){return p.theme.palette.accent;},maxScreenSize.medium,fontSizeLarge-3,fontSizeLarge-5,fontSizeMedium,fontSizeSmall,minScreenSize.small);var templateObject_1$19;var InlineFileList=function InlineFileList(_a){var fileBlock=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;var getFileUrlWithToken=useFileApi().getFileUrlWithToken;if(!fileBlock.files||fileBlock.files.length===0){return null;}var files=fileBlock.files.map(function(f){if(f.pageId){return __assign({},f);}var getFileUrl=function getFileUrl(token){var _a;return ((_a=f.getDownloadUrl)===null||_a===void 0?void 0:_a.call(f,token))||getFileUrlWithToken(token||item.fileAccessToken,item.id,undefined,f.fileId,f.fileName,resourceType);};return __assign(__assign({},f),{getDownloadUrl:getFileUrl,accessToken:item.fileAccessToken});});var audioFiles=files.filter(function(f){return isAudioFile(f.fileName);});var videoFiles=files.filter(function(f){return isVideoFile(f.fileName);});var otherFiles=files.filter(function(f){return !audioFiles.includes(f)&&!videoFiles.includes(f);});return jsxs(Fragment,{children:[videoFiles.length>0&&jsx$1(FileListHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:videoFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(VideoFileHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:jsx$1(VideoFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)}),void 0)},f.fileId);})}),void 0),audioFiles.length>0&&jsx$1(FileListHost,{children:audioFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(AudioFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)},f.fileId);})},void 0),otherFiles.length>0&&jsx$1(FileListHost,{children:otherFiles.map(function(f){return jsx$1(FileListItem,{children:f.pageId?jsx$1(InlinePageDocument,{file:f},void 0):jsx$1(InlineFileDownloadButton,{getFileUrl:f.getDownloadUrl,fileAccessToken:item.fileAccessToken,fileName:f.fileName,title:f.title},void 0)},f.fileId);})},void 0)]},void 0);};var InlinePageDocument=function InlinePageDocument(_a){var file=_a.file;var pageId=file.pageId;var loadPage=usePagesApi().loadPage;var page=usePromise$2(function(){return loadPage(pageId);},undefined,[pageId])[0];var _b=useInlinePageDocument(file,page),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsx$1(InlinePageDocumentDownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0);};var InlineFileMapper={component:InlineFileList,type:EntityType.File,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var blockId=node.getAttribute('data-file-block');if(!blockId){var fileId=node.getAttribute('data-file-id')||node.getAttribute('data-file-fileid');if(fileId==null){return null;}var title=node.getAttribute('data-file-title');var fileName=node.getAttribute('data-file-name');var pageId=node.getAttribute('data-inline-page-document-id');var extension=node.getAttribute('data-file-extension');return {blockId:createId(),files:[{fileId:fileId,title:title,fileName:fileName,pageId:pageId,extension:extension}]};}return {blockId:blockId,files:Array.from(node.querySelectorAll('[data-file-id], [data-file-fileid]')).map(function(fileNode){var _a;return {fileId:(_a=fileNode.getAttribute('data-file-id'))!==null&&_a!==void 0?_a:fileNode.getAttribute('data-file-fileid'),fileName:fileNode.getAttribute('data-file-name'),title:fileNode.getAttribute('data-file-title'),pageId:fileNode.getAttribute('data-inline-page-document-id'),extension:fileNode.getAttribute('data-file-extension')};})};}};var VideoFileHost=_styled.div.withConfig({displayName:"InlineFileList__VideoFileHost",componentId:"sc-16i3l51-0"})(templateObject_1$18||(templateObject_1$18=__makeTemplateObject(["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"],["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"])),videoAttachmentRoundedCornerSize);var templateObject_1$18;var InlineActionButton=_styled(TextLink).withConfig({displayName:"InlineActionButtonStyles__InlineActionButton",componentId:"sc-1m041aj-0"})(templateObject_2$z||(templateObject_2$z=__makeTemplateObject(["\n &&& {\n display: block;\n min-width: 200px;\n width: auto;\n height: ","px;\n line-height: ","px;\n padding: 0 15px;\n border: 1px solid;\n border-radius: 2px;\n box-shadow: 0px ","px ","px #00000033;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n\n ","\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n &&& {\n display: block;\n min-width: 200px;\n width: auto;\n height: ","px;\n line-height: ","px;\n padding: 0 15px;\n border: 1px solid;\n border-radius: 2px;\n box-shadow: 0px ","px ","px #00000033;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n\n ","\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingX,spacingX,spacingXs,spacingXs*2,function(p){return p.isPrimary&&css$2(templateObject_1$17||(templateObject_1$17=__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: ",";\n "],["\n background-color: ",";\n border-color: ",";\n color: ",";\n "])),p.theme.palette.themePrimary,p.theme.palette.themePrimary,p.theme.textColors.onPrimary);});var InlineActionButtonListItem=_styled.li.withConfig({displayName:"InlineActionButtonStyles__InlineActionButtonListItem",componentId:"sc-1m041aj-1"})(templateObject_3$m||(templateObject_3$m=__makeTemplateObject(["\n &&& {\n margin-bottom: 0;\n display: flex;\n flex-wrap: nowrap;\n max-width: 100%;\n }\n"],["\n &&& {\n margin-bottom: 0;\n display: flex;\n flex-wrap: nowrap;\n max-width: 100%;\n }\n"])));var InlineActionButtonsHost=_styled.ul.withConfig({displayName:"InlineActionButtonStyles__InlineActionButtonsHost",componentId:"sc-1m041aj-2"})(templateObject_4$d$1||(templateObject_4$d$1=__makeTemplateObject(["\n display: flex;\n gap: ","px;\n justify-content: center;\n flex-wrap: wrap;\n\n &&& {\n margin: 0 0 ","px;\n padding: 0;\n list-style: none;\n }\n"],["\n display: flex;\n gap: ","px;\n justify-content: center;\n flex-wrap: wrap;\n\n &&& {\n margin: 0 0 ","px;\n padding: 0;\n list-style: none;\n }\n"])),spacingM,spacingM);var templateObject_1$17,templateObject_2$z,templateObject_3$m,templateObject_4$d$1;var InlineActionButtonList=function InlineActionButtonList(_a){var blockProps=_a.blockProps;var actionButtons=(blockProps||{}).actionButtons;if(!actionButtons||actionButtons.length===0){return null;}return jsx$1(InlineActionButtonsHost,__assign({"data-inline-actionbuttons":true},{children:actionButtons.map(function(ab){return jsx$1(InlineActionButtonListItem,{children:jsx$1(InlineActionButton,__assign({url:ab.url,isPrimary:ab.isPrimary},{children:ab.label}),void 0)},ab.id);})}),void 0);};var InlineActionButtonMapper={component:InlineActionButtonList,type:EntityType.ActionButton,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var blockId=node.getAttribute('data-action-buttons');return {blockId:blockId,actionButtons:Array.from(node.querySelectorAll('[data-action-button]')).map(function(actionButtonNode){return {id:actionButtonNode.getAttribute('data-action-button'),isPrimary:actionButtonNode.getAttribute('data-is-primary'),url:actionButtonNode.getAttribute('data-url'),label:actionButtonNode.innerHTML};})};}};var EventDetailViewPeopleInfo=function EventDetailViewPeopleInfo(){var item=useDetailViewContext().item;return jsx$1(StyledEventPeopleInfo,{item:item},void 0);};var StyledEventPeopleInfo=_styled(EventPeopleInfo).withConfig({displayName:"EventDetailViewPeopleInfo__StyledEventPeopleInfo",componentId:"sc-1d42bpm-0"})(templateObject_1$16||(templateObject_1$16=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$16;var EventDetailViewLocationInfo=function EventDetailViewLocationInfo(){var item=useDetailViewContext().item;if(!item.locations||item.locations.length===0){return null;}return jsx$1(StyledEventLocationInfo,{locations:item.locations},void 0);};var StyledEventLocationInfo=_styled(EventLocationInfo).withConfig({displayName:"EventDetailViewLocationInfo__StyledEventLocationInfo",componentId:"sc-4kfe0w-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$15;var EventDetailViewMetaInfo=function EventDetailViewMetaInfo(_a){var allowFilterByChannels=_a.allowFilterByChannels;var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;return jsxs(Fragment,{children:[jsx$1(EventDetailViewLocationInfo,{},void 0),jsx$1(EventDetailViewPeopleInfo,{},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userPreferredLanguage,allowFilterByChannels:allowFilterByChannels},void 0)]},void 0);};var EventDetailViewDatesInfo=function EventDetailViewDatesInfo(_a){var className=_a.className;var item=useDetailViewContext().item;return jsx$1(Host$o,{children:jsx$1(DateTimeRange,{className:className,startDate:item.startDate,endDate:item.endDate},void 0)},void 0);};var Host$o=_styled.div.withConfig({displayName:"EventDetailViewDatesInfo__Host",componentId:"sc-3sblty-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"],["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"])),fontSizeSmall,spacingM);var templateObject_1$14;var PollUserContext=/*#__PURE__*/createContext(null);var DetailViewPollsSubmitButton=function DetailViewPollsSubmitButton(_a){var isReadOnly=_a.isReadOnly;var formatMessage=useIntl().formatMessage;var _b=useContext(PollUserContext),submitPoll=_b.submitPoll,hasMissingUnsavedAnswer=_b.hasMissingUnsavedAnswer,hasMissingAnswers=_b.hasMissingAnswers,answers=_b.answers,resourceType=_b.resourceType,item=_b.item;var updatePollAnswers=useFeedbackApi().updatePollAnswers;if(!hasMissingUnsavedAnswer){return null;}return jsx$1("div",{children:jsx$1(PrimaryButton,{"data-poll-submit-button":true,onClick:function(){return submitPoll(function(){return updatePollAnswers(resourceType,item.id,answers);});},text:formatMessage({id:'Polls.display.submitButtonCaption'}),disabled:hasMissingAnswers||isReadOnly},void 0)},void 0);};var DetailViewCsvExportButton=function DetailViewCsvExportButton(_a){var path=_a.path,stringResource=_a.stringResource,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;if(!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsx$1(Host$n,__assign({className:className},{children:jsxs(DownloadButton$2,__assign({onClick:startDownload},{children:[jsx$1(LeftAlignedIcon,{iconName:"Download"},void 0),jsx$1(FormattedMessage$1,{id:stringResource},void 0)]}),void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(itemId,fileDownloadToken){return createApiUrl("/"+resourceType+"/"+itemId+"/"+path,{access_token:fileDownloadToken});}};var Host$n=_styled.div.withConfig({displayName:"DetailViewCsvExportButton__Host",componentId:"sc-n02scx-0"})(templateObject_1$13||(templateObject_1$13=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var DownloadButton$2=_styled(DefaultButton).withConfig({displayName:"DetailViewCsvExportButton__DownloadButton",componentId:"sc-n02scx-1"})(templateObject_2$y||(templateObject_2$y=__makeTemplateObject(["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.theme.textColors.default;},maxScreenSize.medium,fontSizeSmall);var LeftAlignedIcon=_styled(Icon).withConfig({displayName:"DetailViewCsvExportButton__LeftAlignedIcon",componentId:"sc-n02scx-2"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"],["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$13,templateObject_2$y,templateObject_3$l;var DetailViewPollExportButton=function DetailViewPollExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.polls){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/poll/result/export",stringResource:"Polls.display.exportAsCsv"},void 0);};var PollTranslationContext=/*#__PURE__*/createContext(null);var PollTranslationContextProvider=function PollTranslationContextProvider(_a){var contents=_a.contents,language=_a.language,additionalTranslations=_a.additionalTranslations,children=_a.children;var user=useCurrentUser();var activeContents=Object.values(contents||{}).filter(function(c){return c.active;});var allLanguages=activeContents.map(function(c){return c.language;});var allTranslations=additionalTranslations||[];for(var _i=0,_b=activeContents.filter(function(c){return c.poll&&c.poll.questions;});_i<_b.length;_i++){var content=_b[_i];var language_1=content.language;for(var _c=0,_d=content.poll.questions;_c<_d.length;_c++){var question=_d[_c];allTranslations.push({language:language_1,id:question.questionId,text:question.text});for(var _e=0,_f=question.choices;_e<_f.length;_e++){var choice=_f[_e];allTranslations.push({language:language_1,id:choice.choiceId,text:choice.text});}}}return jsx$1(PollTranslationContext.Provider,__assign({value:{getAllTranslations:getAllTranslations,getTranslation:getTranslation}},{children:jsx$1(Fragment,{children:children},void 0)}),void 0);function getAllTranslations(id){return allTranslations.filter(function(t){return t.id===id&&t.text;});}function getTranslation(id){var preferredLanguage=NewsService.getUserPreferredLanguage(allLanguages,user);var translationItems=getAllTranslations(id);var translation=translationItems.find(function(t){return t.language===language;})||translationItems.find(function(t){return t.language===preferredLanguage;})||translationItems[0];return translation?translation.text:null;}};var PollUserInput=function PollUserInput(){var _a=useContext(PollUserContext),questions=_a.questions,getQuestionResult=_a.getQuestionResult,addAnswer=_a.addAnswer;return jsx$1("div",{children:questions.map(function(q){return jsx$1(QuestionInputItem,{question:q,onChange:function(choiceIds){return handleQuestionChange(q,choiceIds);},result:getQuestionResult(q.questionId)},q.questionId);})},void 0);function handleQuestionChange(question,choiceIds){addAnswer(question.questionId,choiceIds);}};var QuestionInput=function QuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var questionText=getTranslation(question.questionId);return jsxs("div",__assign({className:className,"data-question-id":question.questionId,"data-question-text":questionText},{children:[jsx$1(QuestionText,{children:questionText},void 0),question.isMultiChoice&&jsx$1(MultiChoiceQuestionInput,{question:question,onChange:onChange,result:result},void 0),!question.isMultiChoice&&jsx$1(SingleChoiceQuestionInput,{question:question,onChange:function(choiceId){return onChange([choiceId]);},result:result},void 0)]}),void 0);};var MultiChoiceQuestionInput=function MultiChoiceQuestionInput(_a){var question=_a.question,result=_a.result,onChange=_a.onChange;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1("div",{children:question.choices.map(function(c){return jsx$1(StyledCheckbox$2,{isResultMode:result.showResults,disabled:result.showResults||c.disabled,checked:result.userSelectedChoices.some(function(sc){return sc===c.choiceId;}),onChange:function(_,isChecked){return handleMultipleChoiceChange(c.choiceId,isChecked);},label:getTranslation(c.choiceId),onRenderLabel:function(_){return jsx$1(MultiChoiceLabel,{choice:c,result:result},void 0);}},c.choiceId);})},void 0);function handleMultipleChoiceChange(choiceId,isSelected){var choiceIds=result.userSelectedChoices.filter(function(c){return c!==choiceId;});if(isSelected){choiceIds.push(choiceId);}onChange(choiceIds);}};var SingleChoiceQuestionInput=function SingleChoiceQuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1(ChoiceInput,{isResultMode:result.showResults,selectedKey:result.userSelectedChoices[0],onChange:function(_,option){return onChange(option.key);},options:question.choices.map(function(c){return {key:c.choiceId,choiceId:c.choiceId,text:getTranslation(c.choiceId),disabled:result.showResults||c.disabled,onRenderLabel:function(_){return jsx$1(SingleChoiceLabel,{choice:c,result:result},void 0);}};})},void 0);};var ChoiceLabel=function ChoiceLabel(_a){var choice=_a.choice,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var choiceText=getTranslation(choice.choiceId);return jsxs(ChoiceLabelHost,__assign({isResultMode:result.showResults,className:className,"data-choice-id":choice.choiceId,"data-choice-text":choiceText},{children:[choiceText,choice.description&&jsx$1(ChoiceLabelSecondaryText,__assign({"data-choice-secondary-text":true},{children:choice.description}),void 0),result.showResults&&jsx$1(ChoiceResult,{result:result,choiceId:choice.choiceId},void 0)]}),void 0);};var ChoiceResult=function ChoiceResult(_a){var choiceId=_a.choiceId,result=_a.result;var numberResult=result.choiceResults[choiceId]||0;var percent=numberResult/result.totalFeedbackCount;var palette=useContext(ThemeContext$1).theme.palette;return jsxs(ChoiceResultHost,__assign({"data-choice-result":numberResult},{children:[jsx$1(Bar,{percentComplete:percent,barHeight:10,styles:{progressBar:{backgroundColor:palette.accent}}},void 0),jsx$1("span",{children:jsx$1(FormattedNumber,{value:numberResult},void 0)},void 0)]}),void 0);};var ChoiceResultHost=_styled.div.withConfig({displayName:"PollUserInput__ChoiceResultHost",componentId:"sc-eeg1mx-0"})(templateObject_1$12||(templateObject_1$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"],["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"])));var Bar=_styled(ProgressIndicator).withConfig({displayName:"PollUserInput__Bar",componentId:"sc-eeg1mx-1"})(templateObject_2$x||(templateObject_2$x=__makeTemplateObject(["\n flex: 1 0 auto;\n"],["\n flex: 1 0 auto;\n"])));var QuestionText=_styled.div.withConfig({displayName:"PollUserInput__QuestionText",componentId:"sc-eeg1mx-2"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var QuestionInputItem=_styled(QuestionInput).withConfig({displayName:"PollUserInput__QuestionInputItem",componentId:"sc-eeg1mx-3"})(templateObject_4$c$1||(templateObject_4$c$1=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingL);var ChoiceLabelHost=_styled.span.withConfig({displayName:"PollUserInput__ChoiceLabelHost",componentId:"sc-eeg1mx-4"})(templateObject_5$b$1||(templateObject_5$b$1=__makeTemplateObject(["\n display: inline-block;\n ","\n ","\n"],["\n display: inline-block;\n ","\n ","\n"])),function(p){return p.isResultMode&&'max-width: 400px;';},function(p){return p.isResultMode&&'width: 100%;';});var ChoiceLabelSecondaryText=_styled.div.withConfig({displayName:"PollUserInput__ChoiceLabelSecondaryText",componentId:"sc-eeg1mx-5"})(templateObject_6$7$1||(templateObject_6$7$1=__makeTemplateObject(["\n opacity: 0.75;\n"],["\n opacity: 0.75;\n"])));var SingleChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__SingleChoiceLabel",componentId:"sc-eeg1mx-6"})(templateObject_7$5$1||(templateObject_7$5$1=__makeTemplateObject(["\n padding-left: 30px;\n"],["\n padding-left: 30px;\n"])));var MultiChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__MultiChoiceLabel",componentId:"sc-eeg1mx-7"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n padding-left: 5px;\n"],["\n padding-left: 5px;\n"])));var ChoiceInput=_styled(ChoiceGroup).withConfig({displayName:"PollUserInput__ChoiceInput",componentId:"sc-eeg1mx-8"})(templateObject_9$4$1||(templateObject_9$4$1=__makeTemplateObject(["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"],["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"])));var StyledCheckbox$2=_styled(Checkbox).withConfig({displayName:"PollUserInput__StyledCheckbox",componentId:"sc-eeg1mx-9"})(templateObject_10$3$1||(templateObject_10$3$1=__makeTemplateObject(["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"],["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"])),function(p){return p.isResultMode?'flex-start':'center';});var templateObject_1$12,templateObject_2$x,templateObject_3$k,templateObject_4$c$1,templateObject_5$b$1,templateObject_6$7$1,templateObject_7$5$1,templateObject_8$4$1,templateObject_9$4$1,templateObject_10$3$1;var PollDisplay=function PollDisplay(_a){var children=_a.children,className=_a.className;var formatMessage=useIntl().formatMessage;return jsxs("section",__assign({className:className,"aria-label":formatMessage({id:'Polls.sectionLabel'}),"data-consumer-poll":true},{children:[jsx$1(PollUserInput,{},void 0),children]}),void 0);};var PollUserContextProvider=function PollUserContextProvider(_a){var _b;var item=_a.item,onBehalfOfUpn=_a.onBehalfOfUpn,resourceType=_a.resourceType,language=_a.language,getAdditionalQuestions=_a.getAdditionalQuestions,getAdditionalUserAnswers=_a.getAdditionalUserAnswers,getPollResults=_a.getPollResults,showResult=_a.showResult,children=_a.children;var poll=item.poll,itemId=item.id;var getFeedback=useFeedbackApi().getFeedback;var _c=useState$2(getAdditionalQuestions===null||getAdditionalQuestions===void 0?void 0:getAdditionalQuestions(null)),additionalQuestions=_c[0],setAdditionalQuestions=_c[1];var showError=useNotificationContext().showError;var questionDefinitions=(_b=poll===null||poll===void 0?void 0:poll.questions)!==null&&_b!==void 0?_b:[];var _d=usePromise$2(loadUserAnswers),userAnswers=_d[0],isLoading=_d[1],setUserAnswers=_d[3];var _e=useState$2([]),unsavedQuestionsIds=_e[0],setUnsavedQuestionsIds=_e[1];var _f=usePromise$2(function(){return getPollResults(itemId);},{answers:[]},[itemId]),pollResult=_f[0],isLoadingPollResult=_f[1],fetchPollResults=_f[5];useEffect$1(function(){var _a;if(isLoadingPollResult||!((_a=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_a===void 0?void 0:_a.length)){return;}getAdditionalQuestions&&setAdditionalQuestions(getAdditionalQuestions(pollResult));// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122323
122323
|
},[pollResult,isLoadingPollResult]);// If the pollResult and the choice input is rendered with showResults
|
|
122324
122324
|
// at the same time, we miss the animation of the bars when they fill up
|
|
122325
122325
|
// Delay the pollResult a bit so the users sees the animation
|
|
@@ -122343,16 +122343,16 @@ refreshUserDetails();setNextPageInfos({token:nextPage.paginationToken,hasMoreUnr
|
|
|
122343
122343
|
// dynamically and the comments might not be in DOM at the right time.
|
|
122344
122344
|
// TODO: Try to avoid this.
|
|
122345
122345
|
// It might be a little better, once the lazy loaded feedback & statistics buttons are all in one row
|
|
122346
|
-
if(container.current&&location.hash==='#comments'){setTimeout(function(){return container.current.scrollIntoView(true);},500);}},[location.hash]);return jsxs(Container,__assign({ref:container,id:"comments"},{children:[!user.isPublicUser&&jsx$1(StyledPagedCommentsSection$1,{mentionSearchHandler:getMentionsSearchHandler,readOnly:readOnly,loadInReadOnlyMode:loadInReadOnlyMode,itemId:item.id,groupIds:item.groupIds,type:type,initialPageSize:5,scope:ConversationScope.Public,noItemsYetStringResourceKey:"NewsArticle.comments.empty",baseAttachmentPath:"/"+type+"/"+item.id+"/comments",buttons:jsx$1(FollowButton,{type:type,itemId:item.id,scope:ConversationScope.Public,hideProfileUrl:hideProfileUrl},void 0),title:jsx$1(CommentsHeading,__assign({className:"comments-title"},{children:jsx$1(FormattedMessage$1,{id:"NewsArticle.comments"},void 0)}),void 0),onThreadReply:onThreadReply},item.id),user.isPublicUser&&jsxs(PublicUserButtonContainer,{children:[jsx$1(FormattedMessage$1,{id:"NewsArticle.comments.publicAccessMessage"},void 0),!disableLoginForPublicUser&&jsx$1(StyledPublicUserFullAccessButton,{user:{authenticationType:user.authenticationType,subscription:{subscriptionId:user.subscription.id,allowSelfRegistration:user.subscription.allowSelfRegistration}}},void 0)]},void 0)]}),void 0);function getMentionsSearchHandler(searchText){return searchAccountsByItemId(GroupRoles.Reader,item.id,searchText);}};var Container=_styled.div.withConfig({displayName:"PublishableItemComments__Container",componentId:"sc-5vaunf-0"})(templateObject_1$U||(templateObject_1$U=__makeTemplateObject(["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"],["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"])));var FollowButton=_styled(FollowComments).withConfig({displayName:"PublishableItemComments__FollowButton",componentId:"sc-5vaunf-1"})(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingXs);var StyledPublicUserFullAccessButton=_styled(PublicUserFullAccessButton).withConfig({displayName:"PublishableItemComments__StyledPublicUserFullAccessButton",componentId:"sc-5vaunf-2"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var StyledPagedCommentsSection$1=_styled(PagedCommentsSection).withConfig({displayName:"PublishableItemComments__StyledPagedCommentsSection",componentId:"sc-5vaunf-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"],["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"])),minScreenSize.small,detailViewSectionPaddingLarge,detailViewSectionPadding);var PublicUserButtonContainer=_styled.div.withConfig({displayName:"PublishableItemComments__PublicUserButtonContainer",componentId:"sc-5vaunf-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var CommentsHeading=_styled.h2.withConfig({displayName:"PublishableItemComments__CommentsHeading",componentId:"sc-5vaunf-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n font-size: 1.17rem; // equivalent of h3\n"],["\n font-size: 1.17rem; // equivalent of h3\n"])));var templateObject_1$U,templateObject_2$p,templateObject_3$g,templateObject_4$8$1,templateObject_5$7$1,templateObject_6$3$1;var FeedbackButtonContext=/*#__PURE__*/createContext(null);var FeedbackButtons=function FeedbackButtons(_a){var resourceType=_a.resourceType,item=_a.item,hasFeedbackEnabled=_a.hasFeedbackEnabled,language=_a.language,className=_a.className,children=_a.children;var getStatistics=useNewsApi().getStatistics;var _b=useState$2(null),statistics=_b[0],setStatistics=_b[1];var showError=useNotificationContext().showError;useEffect$1(function(){var updateStatisticsSubscription=onStatisticsUpdated.subscribe(setStatistics);return function(){return updateStatisticsSubscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122346
|
+
if(container.current&&location.hash==='#comments'){setTimeout(function(){return container.current.scrollIntoView(true);},500);}},[location.hash]);return jsxs(Container,__assign({ref:container,id:"comments"},{children:[!user.isPublicUser&&jsx$1(StyledPagedCommentsSection$1,{mentionSearchHandler:getMentionsSearchHandler,readOnly:readOnly,loadInReadOnlyMode:loadInReadOnlyMode,itemId:item.id,groupIds:item.groupIds,type:type,initialPageSize:5,scope:ConversationScope.Public,noItemsYetStringResourceKey:"NewsArticle.comments.empty",baseAttachmentPath:"/"+type+"/"+item.id+"/comments",buttons:jsx$1(FollowButton,{type:type,itemId:item.id,scope:ConversationScope.Public,hideProfileUrl:hideProfileUrl},void 0),title:jsx$1(CommentsHeading,__assign({className:"comments-title"},{children:jsx$1(FormattedMessage$1,{id:"NewsArticle.comments"},void 0)}),void 0),onThreadReply:onThreadReply},item.id),user.isPublicUser&&jsxs(PublicUserButtonContainer,{children:[jsx$1(FormattedMessage$1,{id:"NewsArticle.comments.publicAccessMessage"},void 0),!disableLoginForPublicUser&&jsx$1(StyledPublicUserFullAccessButton,{user:{authenticationType:user.authenticationType,subscription:{subscriptionId:user.subscription.id,allowSelfRegistration:user.subscription.allowSelfRegistration}}},void 0)]},void 0)]}),void 0);function getMentionsSearchHandler(searchText){return searchAccountsByItemId(GroupRoles.Reader,item.id,searchText);}};var Container=_styled.div.withConfig({displayName:"PublishableItemComments__Container",componentId:"sc-5vaunf-0"})(templateObject_1$U||(templateObject_1$U=__makeTemplateObject(["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"],["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"])));var FollowButton=_styled(FollowComments).withConfig({displayName:"PublishableItemComments__FollowButton",componentId:"sc-5vaunf-1"})(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingXs);var StyledPublicUserFullAccessButton=_styled(PublicUserFullAccessButton).withConfig({displayName:"PublishableItemComments__StyledPublicUserFullAccessButton",componentId:"sc-5vaunf-2"})(templateObject_3$g$1||(templateObject_3$g$1=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var StyledPagedCommentsSection$1=_styled(PagedCommentsSection).withConfig({displayName:"PublishableItemComments__StyledPagedCommentsSection",componentId:"sc-5vaunf-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"],["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"])),minScreenSize.small,detailViewSectionPaddingLarge,detailViewSectionPadding);var PublicUserButtonContainer=_styled.div.withConfig({displayName:"PublishableItemComments__PublicUserButtonContainer",componentId:"sc-5vaunf-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var CommentsHeading=_styled.h2.withConfig({displayName:"PublishableItemComments__CommentsHeading",componentId:"sc-5vaunf-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n font-size: 1.17rem; // equivalent of h3\n"],["\n font-size: 1.17rem; // equivalent of h3\n"])));var templateObject_1$U,templateObject_2$p,templateObject_3$g$1,templateObject_4$8$1,templateObject_5$7$1,templateObject_6$3$1;var FeedbackButtonContext=/*#__PURE__*/createContext(null);var FeedbackButtons=function FeedbackButtons(_a){var resourceType=_a.resourceType,item=_a.item,hasFeedbackEnabled=_a.hasFeedbackEnabled,language=_a.language,className=_a.className,children=_a.children;var getStatistics=useNewsApi().getStatistics;var _b=useState$2(null),statistics=_b[0],setStatistics=_b[1];var showError=useNotificationContext().showError;useEffect$1(function(){var updateStatisticsSubscription=onStatisticsUpdated.subscribe(setStatistics);return function(){return updateStatisticsSubscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122347
122347
|
},[]);var comparableStatistics=JSON.stringify(item.statistics);useEffect$1(function(){loadStatistics(item).then(function(){return null;});// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122348
122348
|
},[item.id,comparableStatistics]);if(!statistics){return null;}return jsx$1(FeedbackButtonContext.Provider,__assign({value:{statistics:statistics,language:language,item:item,resourceType:resourceType,hasFeedbackEnabled:hasFeedbackEnabled}},{children:jsx$1(FeedbackButtonsContainer,__assign({className:className},{children:Children.map(children,function(child){return jsx$1("li",{children:child},void 0);})}),void 0)}),void 0);function loadStatistics(item){return __awaiter(this,void 0,void 0,function(){var newStatistics,error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(item.statistics){setStatistics(item.statistics);return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getStatistics(item.id)];case 2:newStatistics=_a.sent();setStatistics(newStatistics);return [3/*break*/,4];case 3:error_1=_a.sent();logger.error(error_1);showError('NewsArticle.loadStatistics_error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var FeedbackButtonsContainer=_styled.ul.withConfig({displayName:"FeedbackButtons__FeedbackButtonsContainer",componentId:"sc-1vjmzsz-0"})(templateObject_1$T||(templateObject_1$T=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n\n > * {\n margin-bottom: 15px;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n\n > * {\n margin-bottom: 15px;\n }\n"])));var templateObject_1$T;var ThreadView=function ThreadView(_a){var _b;var parentComment=_a.parentComment,commentReplies=_a.commentReplies,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,type=_a.type,groupIds=_a.groupIds,baseAttachmentPath=_a.baseAttachmentPath,getHashtagFilterRoute=_a.getHashtagFilterRoute,onThreadCommentDelete=_a.onThreadCommentDelete,onShowAllComments=_a.onShowAllComments,className=_a.className;var user=useCurrentUser();var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;var history=useHistory();var location=useLocation$1();var showAutoTranslate=(parentComment===null||parentComment===void 0?void 0:parentComment.sender.id)!==user.id;var screenSize=useWindowSize$2();var placeHolderStringResourceKey=screenSize.width>maxScreenSize.medium?'Comment.threads.replyTo':'Comment.threads.replyTo.mobile';var _c=useState$2(commentReplies),replies=_c[0],setReplies=_c[1];var _d=useState$2(true),isDialogHidden=_d[0],setIsDialogHidden=_d[1];var _e=useState$2(((_b=parentComment.statistics)===null||_b===void 0?void 0:_b.replyCount)||0),replyCount=_e[0],setReplyCount=_e[1];usePageViewTracker(type+"/"+parentComment.parentItemId+"/comments",parentComment.id);return jsxs("div",__assign({className:className},{children:[jsx$1(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDeleteThread,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsx$1(CommentDisplay,{scope:scope,message:parentComment,showDelete:canDelete(parentComment),showEdit:canEdit(parentComment),showAutoTranslate:showAutoTranslate,type:type,highlight:parentComment.isUnread,isInitialLiked:parentComment.isLiked,mentionSearchHandler:mentionSearchHandler,baseAttachmentPath:baseAttachmentPath,onDelete:function(){return setIsDialogHidden(false);},getHashtagFilterRoute:getHashtagFilterRoute,replyCount:replyCount,onReplyIconClick:handleShowAllComments},parentComment.receivedDateTime),jsx$1(CommentReplies,{threadId:parentComment.id,initialPageSize:5,pageSize:5,type:type,baseAttachmentPath:baseAttachmentPath+"/"+parentComment.id+"/replies",mentionSearchHandler:mentionSearchHandler,groupIds:groupIds,getHashtagFilterRoute:getHashtagFilterRoute,readOnly:false,scope:scope,itemId:parentComment.parentItemId,autoFocusReplyField:!env.isTouchDevice,initialComments:replies,onCommentDeleted:deleteReply,onCommentAdded:function(){return setReplyCount(function(count){return count+1;});},showReplyBox:true,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:{name:parentComment===null||parentComment===void 0?void 0:parentComment.sender.displayName}},parentComment.parentItemId),jsx$1(ShowAllCommentsButton,__assign({iconProps:{iconName:'ReturnKey'},onClick:handleShowAllComments,"data-show-all-comments":true},{children:jsx$1(FormattedMessage$1,{id:"Comment.showAllComments"},void 0)}),void 0)]}),void 0);function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}function deleteReply(reply){setReplies(__assign(__assign({},replies),{items:replies.items.filter(function(c){return c.id!==reply.id;})}));setReplyCount(function(count){return count-1;});}function handleDeleteThread(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:_b.trys.push([0,2,,3]);return [4/*yield*/,deleteComment(type,scope,parentComment.parentItemId,parentComment.id)];case 1:_b.sent();onThreadCommentDelete();return [3/*break*/,3];case 2:_b.sent();showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}function handleShowAllComments(){history.replace(__assign(__assign({},location),{state:{parentCommentId:"Comment-"+parentComment.id}}));onShowAllComments===null||onShowAllComments===void 0?void 0:onShowAllComments();}};var CommentReplies=_styled(PagedCommentsSection).withConfig({displayName:"ThreadView__CommentReplies",componentId:"sc-1c4y6ek-0"})(templateObject_1$S||(templateObject_1$S=__makeTemplateObject(["\n @media (max-width: ","px) {\n .comment-list {\n padding-left: ","px;\n }\n }\n\n @media (min-width: ","px) {\n padding-left: ","px;\n }\n"],["\n @media (max-width: ","px) {\n .comment-list {\n padding-left: ","px;\n }\n }\n\n @media (min-width: ","px) {\n padding-left: ","px;\n }\n"])),maxScreenSize.medium,spacingL,minScreenSize.medium,spacingL);var ShowAllCommentsButton=_styled(ActionButton).withConfig({displayName:"ThreadView__ShowAllCommentsButton",componentId:"sc-1c4y6ek-1"})(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n margin: ","px 0 0 0;\n padding: 0;\n border: 0;\n\n @media (min-width: ","px) {\n margin-left: ","px;\n }\n"],["\n margin: ","px 0 0 0;\n padding: 0;\n border: 0;\n\n @media (min-width: ","px) {\n margin-left: ","px;\n }\n"])),spacingS,minScreenSize.medium,spacingL);var templateObject_1$S,templateObject_2$o;var PublishableItemThreadView=function PublishableItemThreadView(_a){var item=_a.item,type=_a.type,threadId=_a.threadId,onShowAllComments=_a.onShowAllComments,onThreadCommentDelete=_a.onThreadCommentDelete;var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var getCommentThread=useCommentApi().getCommentThread;var _b=usePromise$2(function(){return getCommentThread(type,item.id,threadId);},null),comments=_b[0],isLoading=_b[1];if(isLoading){return jsx$1(StyledSpinner,{},void 0);}var parentComment=comments===null||comments===void 0?void 0:comments.items.find(function(c){return c.id===threadId;});if(!parentComment||parentComment.threadId!=null){return jsx$1(Host$k,{children:jsx$1(FormattedMessage$1,{id:'NewsArticle.thread.empty'},void 0)},void 0);}return jsx$1(Host$k,{children:jsx$1(StyledThreadView$1,{parentComment:parentComment,commentReplies:{items:comments===null||comments===void 0?void 0:comments.items.filter(function(c){return c!==parentComment&&c.threadId===parentComment.id;}),paginationToken:comments===null||comments===void 0?void 0:comments.paginationToken,nextItem:comments===null||comments===void 0?void 0:comments.nextItem,hasMoreUnreadComments:comments===null||comments===void 0?void 0:comments.hasMoreUnreadComments},scope:ConversationScope.Public,groupIds:item.groupIds,baseAttachmentPath:"/"+type+"/"+item.id+"/comments",mentionSearchHandler:getMentionsSearchHandler,type:type,onThreadCommentDelete:onThreadCommentDelete,onShowAllComments:onShowAllComments},void 0)},void 0);function getMentionsSearchHandler(searchText){return searchAccountsByItemId(GroupRoles.Reader,item.id,searchText);}};var Host$k=_styled.div.withConfig({displayName:"PublishableItemThreadView__Host",componentId:"sc-1yiyuzb-0"})(templateObject_1$R||(templateObject_1$R=__makeTemplateObject(["\n padding: 1.5em ","px;\n background-color: ",";\n\n @media (min-width: ","px) {\n padding: 1.5em ","px;\n }\n"],["\n padding: 1.5em ","px;\n background-color: ",";\n\n @media (min-width: ","px) {\n padding: 1.5em ","px;\n }\n"])),detailViewSectionPadding,function(p){return p.theme.palette.neutralLight;},minScreenSize.small,detailViewSectionPaddingLarge);var StyledSpinner=_styled(Spinner).withConfig({displayName:"PublishableItemThreadView__StyledSpinner",componentId:"sc-1yiyuzb-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n margin: 5% 0;\n"],["\n margin: 5% 0;\n"])));var StyledThreadView$1=_styled(ThreadView).withConfig({displayName:"PublishableItemThreadView__StyledThreadView",componentId:"sc-1yiyuzb-2"})(templateObject_3$f$1||(templateObject_3$f$1=__makeTemplateObject(["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"],["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"])),minScreenSize.small,detailViewSectionPaddingLarge,detailViewSectionPadding);var templateObject_1$R,templateObject_2$n,templateObject_3$f$1;var FeedbackSection=function FeedbackSection(_a){var _b,_c;var type=_a.type,item=_a.item,language=_a.language,feedbackSettings=_a.feedbackSettings,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser,isReadOnly=_a.isReadOnly,children=_a.children,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var match=useRouteMatch();var history=useHistory();var location=useLocation$1();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _d=useState$2((_c=(_b=match.params)===null||_b===void 0?void 0:_b.threadId)!==null&&_c!==void 0?_c:null),threadId=_d[0],setThreadId=_d[1];var showComments=features.comments&&hasFeedbackEnabled('comment')&&!hideComments;var showThreadView=features.replyToComments&&threadId!=null;var hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;return jsxs(Fragment,{children:[jsx$1("section",__assign({className:className,"aria-label":formatMessage({id:'Generic.feedbackButtons'})},{children:jsx$1(StyledFeedbackButtons,__assign({resourceType:type,item:item,language:language,hasFeedbackEnabled:hasFeedbackEnabled},{children:children}),void 0)}),void 0),showComments&&(!showThreadView?jsx$1("section",__assign({id:"comments","data-comment-section":true,className:classNames('ms-bgColor-neutralLight',className),"aria-label":formatMessage({id:'AriaLabel.section.comments'})},{children:jsx$1(PublishableItemComments,{item:item,type:type,onThreadReply:features.replyToComments?setThreadId:null,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,readOnly:isReadOnly,loadInReadOnlyMode:isReadOnly&&hasPublishedVersion},void 0)}),void 0):jsx$1("section",__assign({"aria-label":formatMessage({id:'AriaLabel.section.comments'})},{children:jsx$1(PublishableItemThreadView,{item:item,type:type,threadId:threadId,onShowAllComments:handleOnShowAllComments,onThreadCommentDelete:handleThreadCommentDelete},void 0)}),void 0))]},void 0);function handleThreadCommentDelete(){var _a;// not using threadId here since we can still have a non thread path but be inline with the thread view
|
|
122349
|
-
if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath("/"+type+"/"+item.id)}));}setThreadId(null);}function hasFeedbackEnabled(feedbackType){return hasFeedbackType(feedbackSettings||{},feedbackType);}function handleOnShowAllComments(){var _a;setThreadId(null);if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath(type+"/"+item.id)}));}}};var StyledFeedbackButtons=_styled(FeedbackButtons).withConfig({displayName:"FeedbackSection__StyledFeedbackButtons",componentId:"sc-3bzj8d-0"})(templateObject_1$Q||(templateObject_1$Q=__makeTemplateObject(["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"],["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"])),function(p){return p.showComments?'15px':'30px';});var templateObject_1$Q;var FeedbackButtonLike=function FeedbackButtonLike(_a){var isReadOnly=_a.isReadOnly;var refreshStatistics=useNewsApi().refreshStatistics;var features=useFeatures();var _b=useContext(FeedbackButtonContext),item=_b.item,likeCount=_b.statistics.likeCount,resourceType=_b.resourceType,hasFeedbackEnabled=_b.hasFeedbackEnabled;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var showError=useNotificationContext().showError;var _d=usePromise$2(getLikeState,false,[item.id]),isLiked=_d[0],isLoading=_d[1],setIsLiked=_d[3];var _e=useState$2(false),isSaving=_e[0],setIsSaving=_e[1];if(!features.likes||!hasFeedbackEnabled('like')){return null;}return jsx$1(LikeButton,{itemType:resourceType,itemId:item.id,isActive:isLiked,readOnly:isLoading||isSaving||isReadOnly,count:likeCount,onClick:function(){return handleLikeChanged(!isLiked);},isDemoContent:item.isDemoContent},void 0);function getLikeState(){var _a;return __awaiter(this,void 0,void 0,function(){var hasPublishedVersion,feedbackSummary;return __generator(this,function(_b){switch(_b.label){case 0:hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;if(isReadOnly&&!hasPublishedVersion){return [2/*return*/,false];}if(!features.likes||!hasFeedbackEnabled('like')){return [2/*return*/,false];}return [4/*yield*/,getFeedback(resourceType,item.id)];case 1:feedbackSummary=_b.sent();return [2/*return*/,((_a=feedbackSummary.records)===null||_a===void 0?void 0:_a.findIndex(function(r){return r.type==='like';}))>-1];}});});}function handleLikeChanged(isNowLiked){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving||isLoading){return [2/*return*/];}setIsSaving(true);setIsLiked(isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?1:-1})];case 1:_b.sent();_b.label=2;case 2:_b.trys.push([2,7,9,10]);if(!isNowLiked)return [3/*break*/,4];return [4/*yield*/,setFeedback(resourceType,item.id,'like')];case 3:_b.sent();return [3/*break*/,6];case 4:return [4/*yield*/,unsetFeedback(resourceType,item.id,'like')];case 5:_b.sent();_b.label=6;case 6:return [3/*break*/,10];case 7:_b.sent();setIsLiked(!isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?-1:1})];case 8:_b.sent();showError('NewsArticle.setFeedback_error');return [3/*break*/,10];case 9:setIsSaving(false);return [7/*endfinally*/];case 10:return [2/*return*/];}});});}};var FeedbackButtonComments=function FeedbackButtonComments(){var features=useFeatures();var formatMessage=useIntl().formatMessage;var _a=useContext(FeedbackButtonContext),commentCount=_a.statistics.commentCount,resourceType=_a.resourceType,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.comments||!hasFeedbackEnabled('comment')){return null;}return jsx$1(FeedbackCountButton,{count:commentCount,iconName:"Chat",readOnly:true,tooltipResourceKey:resourceType===ItemResourceTypes.Pages?'Page.numberOfComments':'NewsArticle.numberOfComments',tooltipResourceKeyValues:{count:commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),feedbackType:"comment"},void 0);};var FeedbackButtonViews=function FeedbackButtonViews(){var _a=useContext(FeedbackButtonContext),readCount=_a.statistics.readCount,resourceType=_a.resourceType;var formatMessage=useIntl().formatMessage;var resourceKey=getResourceKey();return jsx$1(FeedbackCountButton,{count:readCount,iconName:"View",readOnly:true,tooltipResourceKey:resourceKey,tooltipResourceKeyValues:{count:readCount},ariaLabel:formatMessage({id:resourceKey},{count:readCount}),feedbackType:"view"},void 0);function getResourceKey(){if(resourceType===ItemResourceTypes.Pages){return 'Page.readersTooltip';}if(resourceType===ItemResourceTypes.News){return 'NewsArticle.readersTooltip';}return 'Events.readersTooltip';}};var EventDownloadCalendarFileButton=function EventDownloadCalendarFileButton(_a){var item=_a.item,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;return jsx$1(Host$j$1,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"Events.downloadCalendarFile"},{children:jsx$1(DownloadLink,__assign({href:getDownloadUrl(),"aria-label":formatMessage({id:'Events.downloadCalendarFile'})},{children:jsx$1(Icon,{iconName:"AddEvent"},void 0)}),void 0)}),void 0)}),void 0);function getDownloadUrl(){return createApiUrl("/events/"+encodeURI(item.id)+"/export",{access_token:item.fileAccessToken,subscriptionId:user.subscription.id});}};var Host$j$1=_styled.div.withConfig({displayName:"EventDownloadCalendarFileButton__Host",componentId:"sc-1hjuosf-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"],["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"])));var DownloadLink=_styled.a.withConfig({displayName:"EventDownloadCalendarFileButton__DownloadLink",componentId:"sc-1hjuosf-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"])),feedbackButtonHeight,feedbackButtonHeight,function(p){return p.theme.textColors.default;});var templateObject_1$P,templateObject_2$m;var EventFeedbackButtonDownloadCalendarFile=function EventFeedbackButtonDownloadCalendarFile(){var item=useContext(FeedbackButtonContext).item;return jsx$1(StyledEventDownloadCalendarFileButton,{item:item},void 0);};var StyledEventDownloadCalendarFileButton=_styled(EventDownloadCalendarFileButton).withConfig({displayName:"EventFeedbackButtonDownloadCalendarFile__StyledEventDownloadCalendarFileButton",componentId:"sc-dsznxm-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n min-width: 60px;\n margin-right: 9px;\n"],["\n min-width: 60px;\n margin-right: 9px;\n"])));var templateObject_1$O;var ShareButton=function ShareButton(_a){var url=_a.url,isReadOnly=_a.isReadOnly,className=_a.className;var copyContainerRef=useRef$1();var _b=useState$2(false),didCopy=_b[0],setDidCopy=_b[1];var onShare=useContext(LinkContext).onShare;var formatMessage=useIntl().formatMessage;return jsx$1(Host$i$1,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"ShareButton.ActionDescription"},{children:jsxs(StyledIconWithCallout,__assign({icon:"Share",onIconClick:function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,onShare(url)];case 1:return [2/*return*/,_a.sent()];}});});},onCalloutDismissed:function(){return setDidCopy(false);},directionalHint:DirectionalHint.topAutoEdge,ariaLabel:formatMessage({id:'ShareButton.ActionDescription'}),disabled:isReadOnly},{children:[jsx$1(FormattedMessage$1,{id:"ShareButton.ActionDescription"},void 0),jsxs(CopyContainer,__assign({ref:copyContainerRef},{children:[jsx$1(CopyField,{value:url,readOnly:true,onFocus:handleTextFieldFocus,onMouseUp:function(e){return e.preventDefault();},ariaLabel:formatMessage({id:'AriaLabel.shareButton.copyField'})},void 0),jsx$1(CopyIconButton,{iconProps:{iconName:'Copy'},onClick:copyToClipBoard,ariaLabel:formatMessage({id:'AriaLabel.copyText'})},void 0)]}),void 0),didCopy&&jsx$1(FormattedMessage$1,{id:"ShareButton.CopySuccess"},void 0)]}),void 0)}),void 0)}),void 0);function copyToClipBoard(){var tempTextField=document.createElement('textarea');tempTextField.innerText=url;copyContainerRef.current.appendChild(tempTextField);tempTextField.select();document.execCommand('copy');copyContainerRef.current.removeChild(tempTextField);setDidCopy(true);}function handleTextFieldFocus(event){event.target.select();}};var Host$i$1=_styled.div.withConfig({displayName:"ShareButton__Host",componentId:"sc-6avyh0-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIconWithCallout=_styled(IconWithCallout).withConfig({displayName:"ShareButton__StyledIconWithCallout",componentId:"sc-6avyh0-1"})(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"],["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"])),feedbackButtonHeight,fontSizeMedium+4);var CopyContainer=_styled.div.withConfig({displayName:"ShareButton__CopyContainer",componentId:"sc-6avyh0-2"})(templateObject_3$e$1||(templateObject_3$e$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"],["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"])));var CopyField=_styled(TextField).withConfig({displayName:"ShareButton__CopyField",componentId:"sc-6avyh0-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n padding-right: ","px;\n width: 400px;\n"],["\n padding-right: ","px;\n width: 400px;\n"])),spacingS);var CopyIconButton=_styled(IconButton).withConfig({displayName:"ShareButton__CopyIconButton",componentId:"sc-6avyh0-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n i {\n font-size: ","px;\n }\n"],["\n i {\n font-size: ","px;\n }\n"])),fontSizeMedium+4);var templateObject_1$N,templateObject_2$l,templateObject_3$e$1,templateObject_4$7$1,templateObject_5$6$1;var FeedbackButtonShare=function FeedbackButtonShare(_a){var isReadOnly=_a.isReadOnly;var item=useContext(FeedbackButtonContext).item;return jsx$1(ShareButton,{url:item.permalink,isReadOnly:isReadOnly},void 0);};var ConfirmationStatistics=function ConfirmationStatistics(_a){var count=_a.count;return jsxs(Host$h$1,{children:[jsx$1(Icon,{iconName:"Accept"},void 0),jsx$1(FormattedMessage$1,{id:'NewsArticle.feedback.statistic.label',values:{count:count}},void 0)]},void 0);};var Host$h$1=_styled.div.withConfig({displayName:"ConfirmationStatistics__Host",componentId:"sc-1wprhw1-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),spacingXs-1,maxScreenSize.medium,fontSizeSmall);var templateObject_1$M;var ConfirmationStatisticsExport=function ConfirmationStatisticsExport(_a){var item=_a.item;var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;return jsx$1(Host$g$1,__assign({resourceKey:"DownloadButton.downloadTooltip"},{children:jsx$1(DownloadButton$1,{onClick:startDownload,iconProps:{iconName:'Download'},"aria-label":formatMessage({id:'AriaLabel.confirmationStatisticsExportButton'})},void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(newsId,fileDownloadToken){return createApiUrl("/news/"+newsId+"/statistics/confirmations",{access_token:fileDownloadToken});}};var DownloadButton$1=_styled(IconButton$1).withConfig({displayName:"ConfirmationStatisticsExport__DownloadButton",componentId:"sc-1gesr6p-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n color: ",";\n"],["\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var Host$g$1=_styled(Tooltip).withConfig({displayName:"ConfirmationStatisticsExport__Host",componentId:"sc-1gesr6p-1"})(templateObject_2$k$1||(templateObject_2$k$1=__makeTemplateObject(["\n && {\n display: inline-flex;\n align-items: center;\n }\n"],["\n && {\n display: inline-flex;\n align-items: center;\n }\n"])));var templateObject_1$L,templateObject_2$k$1;var FeedbackButtonConfirmations=function FeedbackButtonConfirmations(){var features=useFeatures();var user=useCurrentUser();var _a=useContext(FeedbackButtonContext),item=_a.item,confirmationCount=_a.statistics.confirmationCount,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.confirmation||!hasFeedbackEnabled('confirm')||!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Host$f$1,{children:[jsx$1(ConfirmationStatistics,{count:confirmationCount},void 0),jsx$1(ConfirmationStatisticsExport,{item:item},void 0)]},void 0);};var Host$f$1=_styled.span.withConfig({displayName:"FeedbackButtonConfirmations__Host",componentId:"sc-sgky21-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"],["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"])),maxScreenSize.medium);var templateObject_1$K;var EventDetailViewFeedbackSection=function EventDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage;// Info: We need this check so that in Teams on mobile we don't show the
|
|
122349
|
+
if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath("/"+type+"/"+item.id)}));}setThreadId(null);}function hasFeedbackEnabled(feedbackType){return hasFeedbackType(feedbackSettings||{},feedbackType);}function handleOnShowAllComments(){var _a;setThreadId(null);if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath(type+"/"+item.id)}));}}};var StyledFeedbackButtons=_styled(FeedbackButtons).withConfig({displayName:"FeedbackSection__StyledFeedbackButtons",componentId:"sc-3bzj8d-0"})(templateObject_1$Q||(templateObject_1$Q=__makeTemplateObject(["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"],["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"])),function(p){return p.showComments?'15px':'30px';});var templateObject_1$Q;var FeedbackButtonLike=function FeedbackButtonLike(_a){var isReadOnly=_a.isReadOnly;var refreshStatistics=useNewsApi().refreshStatistics;var features=useFeatures();var _b=useContext(FeedbackButtonContext),item=_b.item,likeCount=_b.statistics.likeCount,resourceType=_b.resourceType,hasFeedbackEnabled=_b.hasFeedbackEnabled;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var showError=useNotificationContext().showError;var _d=usePromise$2(getLikeState,false,[item.id]),isLiked=_d[0],isLoading=_d[1],setIsLiked=_d[3];var _e=useState$2(false),isSaving=_e[0],setIsSaving=_e[1];if(!features.likes||!hasFeedbackEnabled('like')){return null;}return jsx$1(LikeButton,{itemType:resourceType,itemId:item.id,isActive:isLiked,readOnly:isLoading||isSaving||isReadOnly,count:likeCount,onClick:function(){return handleLikeChanged(!isLiked);},isDemoContent:item.isDemoContent},void 0);function getLikeState(){var _a;return __awaiter(this,void 0,void 0,function(){var hasPublishedVersion,feedbackSummary;return __generator(this,function(_b){switch(_b.label){case 0:hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;if(isReadOnly&&!hasPublishedVersion){return [2/*return*/,false];}if(!features.likes||!hasFeedbackEnabled('like')){return [2/*return*/,false];}return [4/*yield*/,getFeedback(resourceType,item.id)];case 1:feedbackSummary=_b.sent();return [2/*return*/,((_a=feedbackSummary.records)===null||_a===void 0?void 0:_a.findIndex(function(r){return r.type==='like';}))>-1];}});});}function handleLikeChanged(isNowLiked){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving||isLoading){return [2/*return*/];}setIsSaving(true);setIsLiked(isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?1:-1})];case 1:_b.sent();_b.label=2;case 2:_b.trys.push([2,7,9,10]);if(!isNowLiked)return [3/*break*/,4];return [4/*yield*/,setFeedback(resourceType,item.id,'like')];case 3:_b.sent();return [3/*break*/,6];case 4:return [4/*yield*/,unsetFeedback(resourceType,item.id,'like')];case 5:_b.sent();_b.label=6;case 6:return [3/*break*/,10];case 7:_b.sent();setIsLiked(!isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?-1:1})];case 8:_b.sent();showError('NewsArticle.setFeedback_error');return [3/*break*/,10];case 9:setIsSaving(false);return [7/*endfinally*/];case 10:return [2/*return*/];}});});}};var FeedbackButtonComments=function FeedbackButtonComments(){var features=useFeatures();var formatMessage=useIntl().formatMessage;var _a=useContext(FeedbackButtonContext),commentCount=_a.statistics.commentCount,resourceType=_a.resourceType,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.comments||!hasFeedbackEnabled('comment')){return null;}return jsx$1(FeedbackCountButton,{count:commentCount,iconName:"Chat",readOnly:true,tooltipResourceKey:resourceType===ItemResourceTypes.Pages?'Page.numberOfComments':'NewsArticle.numberOfComments',tooltipResourceKeyValues:{count:commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),feedbackType:"comment"},void 0);};var FeedbackButtonViews=function FeedbackButtonViews(){var _a=useContext(FeedbackButtonContext),readCount=_a.statistics.readCount,resourceType=_a.resourceType;var formatMessage=useIntl().formatMessage;var resourceKey=getResourceKey();return jsx$1(FeedbackCountButton,{count:readCount,iconName:"View",readOnly:true,tooltipResourceKey:resourceKey,tooltipResourceKeyValues:{count:readCount},ariaLabel:formatMessage({id:resourceKey},{count:readCount}),feedbackType:"view"},void 0);function getResourceKey(){if(resourceType===ItemResourceTypes.Pages){return 'Page.readersTooltip';}if(resourceType===ItemResourceTypes.News){return 'NewsArticle.readersTooltip';}return 'Events.readersTooltip';}};var EventDownloadCalendarFileButton=function EventDownloadCalendarFileButton(_a){var item=_a.item,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;return jsx$1(Host$j$1,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"Events.downloadCalendarFile"},{children:jsx$1(DownloadLink,__assign({href:getDownloadUrl(),"aria-label":formatMessage({id:'Events.downloadCalendarFile'})},{children:jsx$1(Icon,{iconName:"AddEvent"},void 0)}),void 0)}),void 0)}),void 0);function getDownloadUrl(){return createApiUrl("/events/"+encodeURI(item.id)+"/export",{access_token:item.fileAccessToken,subscriptionId:user.subscription.id});}};var Host$j$1=_styled.div.withConfig({displayName:"EventDownloadCalendarFileButton__Host",componentId:"sc-1hjuosf-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"],["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"])));var DownloadLink=_styled.a.withConfig({displayName:"EventDownloadCalendarFileButton__DownloadLink",componentId:"sc-1hjuosf-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"])),feedbackButtonHeight,feedbackButtonHeight,function(p){return p.theme.textColors.default;});var templateObject_1$P,templateObject_2$m;var EventFeedbackButtonDownloadCalendarFile=function EventFeedbackButtonDownloadCalendarFile(){var item=useContext(FeedbackButtonContext).item;return jsx$1(StyledEventDownloadCalendarFileButton,{item:item},void 0);};var StyledEventDownloadCalendarFileButton=_styled(EventDownloadCalendarFileButton).withConfig({displayName:"EventFeedbackButtonDownloadCalendarFile__StyledEventDownloadCalendarFileButton",componentId:"sc-dsznxm-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n min-width: 60px;\n margin-right: 9px;\n"],["\n min-width: 60px;\n margin-right: 9px;\n"])));var templateObject_1$O;var ShareButton=function ShareButton(_a){var url=_a.url,isReadOnly=_a.isReadOnly,className=_a.className;var copyContainerRef=useRef$1();var _b=useState$2(false),didCopy=_b[0],setDidCopy=_b[1];var onShare=useContext(LinkContext).onShare;var formatMessage=useIntl().formatMessage;return jsx$1(Host$i$1,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"ShareButton.ActionDescription"},{children:jsxs(StyledIconWithCallout,__assign({icon:"Share",onIconClick:function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,onShare(url)];case 1:return [2/*return*/,_a.sent()];}});});},onCalloutDismissed:function(){return setDidCopy(false);},directionalHint:DirectionalHint.topAutoEdge,ariaLabel:formatMessage({id:'ShareButton.ActionDescription'}),disabled:isReadOnly},{children:[jsx$1(FormattedMessage$1,{id:"ShareButton.ActionDescription"},void 0),jsxs(CopyContainer,__assign({ref:copyContainerRef},{children:[jsx$1(CopyField,{value:url,readOnly:true,onFocus:handleTextFieldFocus,onMouseUp:function(e){return e.preventDefault();},ariaLabel:formatMessage({id:'AriaLabel.shareButton.copyField'})},void 0),jsx$1(CopyIconButton,{iconProps:{iconName:'Copy'},onClick:copyToClipBoard,ariaLabel:formatMessage({id:'AriaLabel.copyText'})},void 0)]}),void 0),didCopy&&jsx$1(FormattedMessage$1,{id:"ShareButton.CopySuccess"},void 0)]}),void 0)}),void 0)}),void 0);function copyToClipBoard(){var tempTextField=document.createElement('textarea');tempTextField.innerText=url;copyContainerRef.current.appendChild(tempTextField);tempTextField.select();document.execCommand('copy');copyContainerRef.current.removeChild(tempTextField);setDidCopy(true);}function handleTextFieldFocus(event){event.target.select();}};var Host$i$1=_styled.div.withConfig({displayName:"ShareButton__Host",componentId:"sc-6avyh0-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIconWithCallout=_styled(IconWithCallout).withConfig({displayName:"ShareButton__StyledIconWithCallout",componentId:"sc-6avyh0-1"})(templateObject_2$l$1||(templateObject_2$l$1=__makeTemplateObject(["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"],["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"])),feedbackButtonHeight,fontSizeMedium+4);var CopyContainer=_styled.div.withConfig({displayName:"ShareButton__CopyContainer",componentId:"sc-6avyh0-2"})(templateObject_3$e$1||(templateObject_3$e$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"],["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"])));var CopyField=_styled(TextField).withConfig({displayName:"ShareButton__CopyField",componentId:"sc-6avyh0-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n padding-right: ","px;\n width: 400px;\n"],["\n padding-right: ","px;\n width: 400px;\n"])),spacingS);var CopyIconButton=_styled(IconButton).withConfig({displayName:"ShareButton__CopyIconButton",componentId:"sc-6avyh0-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n i {\n font-size: ","px;\n }\n"],["\n i {\n font-size: ","px;\n }\n"])),fontSizeMedium+4);var templateObject_1$N,templateObject_2$l$1,templateObject_3$e$1,templateObject_4$7$1,templateObject_5$6$1;var FeedbackButtonShare=function FeedbackButtonShare(_a){var isReadOnly=_a.isReadOnly;var item=useContext(FeedbackButtonContext).item;return jsx$1(ShareButton,{url:item.permalink,isReadOnly:isReadOnly},void 0);};var ConfirmationStatistics=function ConfirmationStatistics(_a){var count=_a.count;return jsxs(Host$h$1,{children:[jsx$1(Icon,{iconName:"Accept"},void 0),jsx$1(FormattedMessage$1,{id:'NewsArticle.feedback.statistic.label',values:{count:count}},void 0)]},void 0);};var Host$h$1=_styled.div.withConfig({displayName:"ConfirmationStatistics__Host",componentId:"sc-1wprhw1-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),spacingXs-1,maxScreenSize.medium,fontSizeSmall);var templateObject_1$M;var ConfirmationStatisticsExport=function ConfirmationStatisticsExport(_a){var item=_a.item;var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;return jsx$1(Host$g$1,__assign({resourceKey:"DownloadButton.downloadTooltip"},{children:jsx$1(DownloadButton$1,{onClick:startDownload,iconProps:{iconName:'Download'},"aria-label":formatMessage({id:'AriaLabel.confirmationStatisticsExportButton'})},void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(newsId,fileDownloadToken){return createApiUrl("/news/"+newsId+"/statistics/confirmations",{access_token:fileDownloadToken});}};var DownloadButton$1=_styled(IconButton$1).withConfig({displayName:"ConfirmationStatisticsExport__DownloadButton",componentId:"sc-1gesr6p-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n color: ",";\n"],["\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var Host$g$1=_styled(Tooltip).withConfig({displayName:"ConfirmationStatisticsExport__Host",componentId:"sc-1gesr6p-1"})(templateObject_2$k$1||(templateObject_2$k$1=__makeTemplateObject(["\n && {\n display: inline-flex;\n align-items: center;\n }\n"],["\n && {\n display: inline-flex;\n align-items: center;\n }\n"])));var templateObject_1$L,templateObject_2$k$1;var FeedbackButtonConfirmations=function FeedbackButtonConfirmations(){var features=useFeatures();var user=useCurrentUser();var _a=useContext(FeedbackButtonContext),item=_a.item,confirmationCount=_a.statistics.confirmationCount,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.confirmation||!hasFeedbackEnabled('confirm')||!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Host$f$1,{children:[jsx$1(ConfirmationStatistics,{count:confirmationCount},void 0),jsx$1(ConfirmationStatisticsExport,{item:item},void 0)]},void 0);};var Host$f$1=_styled.span.withConfig({displayName:"FeedbackButtonConfirmations__Host",componentId:"sc-sgky21-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"],["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"])),maxScreenSize.medium);var templateObject_1$K;var EventDetailViewFeedbackSection=function EventDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage;// Info: We need this check so that in Teams on mobile we don't show the
|
|
122350
122350
|
return jsxs(StyledFeedbackSection$2,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(EventFeedbackButtonDownloadCalendarFile,{},void 0),jsx$1(FeedbackButtonShare,{},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection$2=_styled(FeedbackSection).withConfig({displayName:"EventDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-1m82rje-0"})(templateObject_1$J||(templateObject_1$J=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$J;var EventDetailViewPlugins=function EventDetailViewPlugins(_a){var eventItem=_a.eventItem;return jsx$1(Host$e$1,{area:ExtensionArea.eventDetailViewSection,eventItem:eventItem},void 0);};var Host$e$1=_styled(Plugins)(templateObject_1$I||(templateObject_1$I=__makeTemplateObject(["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"],["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"])),spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$I;var PageDetailViewMetaInfo=function PageDetailViewMetaInfo(){var _a=useDetailViewContext(),item=_a.item,userPreferredLanguage=_a.userPreferredLanguage;return jsx$1(DetailMetaInfo$1,{item:item,dateMode:DateMode.Modified,language:userPreferredLanguage},void 0);};var DetailMetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"PageDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-1yz7bl7-0"})(templateObject_1$H||(templateObject_1$H=__makeTemplateObject(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"],["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"])),minScreenSize.small);var templateObject_1$H;var PageDetailViewFeedbackSection=function PageDetailViewFeedbackSection(_a){var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType,contentLanguage=_b.contentLanguage;return jsxs(StyledFeedbackSection$1,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:item.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{},void 0)]}),void 0);};var StyledFeedbackSection$1=_styled(FeedbackSection).withConfig({displayName:"PageDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-12s3v5d-0"})(templateObject_1$G||(templateObject_1$G=__makeTemplateObject(["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"],["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"])),DetailViewSectionPadding,spacingXl+10,minScreenSize.small);var templateObject_1$G;var InlinePageListByKeywords=function InlinePageListByKeywords(_a){var keywords=_a.keywords,showDocuments=_a.showDocuments,showPages=_a.showPages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showPagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var defaultPageSize=10;var keywordsAsString=keywords===null||keywords===void 0?void 0:keywords.join('-');var _b=useItemLoaderWithPreFetch(defaultPageSize,useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType),[keywordsAsString]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};var defaultPageSize$1=10;var InlinePageListByPageId=function InlinePageListByPageId(_a){var pageId=_a.pageId,showPages=_a.showPages,showDocuments=_a.showDocuments;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showSubpagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var _b=useItemLoaderWithPreFetch(defaultPageSize$1,useLoadPublishedItemsByPageId(pageId,showSubpagesAndDocuments,pageType),[pageId]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};var defaultPageSize=10;// the inline page list should be auto-added on a page with no content
|
|
122351
122351
|
// by default pages and documents should be shown
|
|
122352
122352
|
// for this case the blockProps would be an empty object and
|
|
122353
122353
|
// we need to set the showPages and showDocuments to true
|
|
122354
122354
|
var InlinePageListByCurrentPage=function InlinePageListByCurrentPage(_a){var _b=_a.blockProps,props=_b===void 0?{showDocuments:true,showPages:true}:_b;var item=useDetailViewContext().item;var getSubpages=usePagesApi().getSubpages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=useItemLoaderByCurrentPage(item.id,defaultPageSize,item.navigationContext,{showPages:props.showPages,showDocuments:props.showDocuments},getAllSubItems,[item===null||item===void 0?void 0:item.id]),items=_c.pageItems,pagingProps=_c.pagingProps;if(items.length===0){return null;}return jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:pagingProps,baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0);function getAllSubItems(id,pageType){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getSubpages(id,{pageType:pageType})];case 1:result=_a.sent();return [2/*return*/,result.items];}});});}};var InlinePageList=function InlinePageList(_a){var blockProps=_a.blockProps;if(blockProps===null||blockProps===void 0?void 0:blockProps.keywords){return jsx$1(InlinePageListByKeywords,{keywords:blockProps.keywords.split(','),showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}if(blockProps===null||blockProps===void 0?void 0:blockProps.pageId){return jsx$1(InlinePageListByPageId,{pageId:blockProps.pageId,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}return jsx$1(InlinePageListByCurrentPage,{blockProps:blockProps},void 0);};var InlinePageListMapper={component:InlinePageList,type:EntityType.InlinePageList,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var pageListId=node.getAttribute('data-page-list-id');if(pageListId==null){return null;}var showChildren=node.getAttribute('data-show-children')==='true';var showDocumentsAttribute=node.getAttribute('data-show-documents');var showPagesAttribute=node.getAttribute('data-show-pages');var pageId=node.getAttribute('data-page-id');var keywords=node.getAttribute('data-keywords');if(!showDocumentsAttribute&&!showPagesAttribute){// ensure backwards compatibility
|
|
122355
|
-
return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$d$1,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$d$1=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$j$1||(templateObject_2$j$1=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$F,templateObject_2$j$1;var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsx$1("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsx$1(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(TopBannerInner,{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled.div.withConfig({displayName:"Banner__TopBannerWrapper",componentId:"sc-d06z12-0"})(templateObject_2$i$1||(templateObject_2$i$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&css$2(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled.div.withConfig({displayName:"Banner__TopBannerInner",componentId:"sc-d06z12-1"})(templateObject_3$d$1||(templateObject_3$d$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var templateObject_1$E,templateObject_2$i$1,templateObject_3$d$1;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-contextual-menu'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-contextual-menu',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$D;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$C;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,useEditorRoutes:isEditorPreview,width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$B;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$A;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$z;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$b$1,__assign({className:className},{children:[jsx$1(IconContainer,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$9,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$2$1,{children:children},void 0)]}),void 0);};var Host$b$1=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$9=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$h$1||(templateObject_2$h$1=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$2$1=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$c$1||(templateObject_3$c$1=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$2$1).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$y,templateObject_2$h$1,templateObject_3$c$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$2$1,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$2$1=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$x;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$w$1||(templateObject_1$w$1=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$w$1;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper,InlineActionButtonMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$v$1||(templateObject_1$v$1=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS);var templateObject_1$v$1;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;var formatMessage=useIntl().formatMessage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$u$1||(templateObject_1$u$1=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$u$1;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$a$1,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$a$1=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$t$1||(templateObject_1$t$1=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$t$1;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$9$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$9$1=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$s$1||(templateObject_1$s$1=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$g$1||(templateObject_2$g$1=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$s$1,templateObject_2$g$1;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isEditorPreview=_a.isEditorPreview;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isEditorPreview},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$r$1||(templateObject_1$r$1=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$r$1;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(StyledCountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var StyledCountLabel=_styled(CountLabel).withConfig({displayName:"FeedbackButtonBookmark__StyledCountLabel",componentId:"sc-1ac9lm2-0"})(templateObject_1$q$1||(templateObject_1$q$1=__makeTemplateObject(["\n margin-left: 0;\n"],["\n margin-left: 0;\n"])));var templateObject_1$q$1;var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isEditorPreview=_c.isEditorPreview;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isEditorPreview},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$p$1||(templateObject_1$p$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$p$1;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$o$1||(templateObject_1$o$1=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$o$1;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$3,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$3=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$n$1||(templateObject_1$n$1=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$n$1;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},__assign(__assign(__assign({},filter),getCommaSeparatedChannelsString(filter===null||filter===void 0?void 0:filter.channels)),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords)),{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var $$g=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$m=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$m('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
122355
|
+
return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$d$1,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$d$1=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$j$1||(templateObject_2$j$1=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$F,templateObject_2$j$1;var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsx$1("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsx$1(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(TopBannerInner,{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled.div.withConfig({displayName:"Banner__TopBannerWrapper",componentId:"sc-d06z12-0"})(templateObject_2$i$1||(templateObject_2$i$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&css$2(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled.div.withConfig({displayName:"Banner__TopBannerInner",componentId:"sc-d06z12-1"})(templateObject_3$d$1||(templateObject_3$d$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var templateObject_1$E,templateObject_2$i$1,templateObject_3$d$1;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-contextual-menu'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-contextual-menu',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$D;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$C;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,useEditorRoutes:isEditorPreview,width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$B;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$A;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$z;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$b$1,__assign({className:className},{children:[jsx$1(IconContainer,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$9,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$2$1,{children:children},void 0)]}),void 0);};var Host$b$1=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$y$1||(templateObject_1$y$1=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$9=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$h$1||(templateObject_2$h$1=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$2$1=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$c$1||(templateObject_3$c$1=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$2$1).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$y$1,templateObject_2$h$1,templateObject_3$c$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$2$1,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$2$1=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$x$1||(templateObject_1$x$1=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$x$1;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$w$1||(templateObject_1$w$1=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$w$1;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper,InlineActionButtonMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$v$1||(templateObject_1$v$1=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS);var templateObject_1$v$1;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;var formatMessage=useIntl().formatMessage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$u$1||(templateObject_1$u$1=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$u$1;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$a$1,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$a$1=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$t$1||(templateObject_1$t$1=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$t$1;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$9$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$9$1=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$s$1||(templateObject_1$s$1=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$g$1||(templateObject_2$g$1=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$s$1,templateObject_2$g$1;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isEditorPreview=_a.isEditorPreview;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isEditorPreview},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$r$1||(templateObject_1$r$1=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$r$1;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(StyledCountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var StyledCountLabel=_styled(CountLabel).withConfig({displayName:"FeedbackButtonBookmark__StyledCountLabel",componentId:"sc-1ac9lm2-0"})(templateObject_1$q$1||(templateObject_1$q$1=__makeTemplateObject(["\n margin-left: 0;\n"],["\n margin-left: 0;\n"])));var templateObject_1$q$1;var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isEditorPreview=_c.isEditorPreview;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isEditorPreview},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$p$1||(templateObject_1$p$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$p$1;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$o$1||(templateObject_1$o$1=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$o$1;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$3,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$3=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$n$1||(templateObject_1$n$1=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$n$1;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},__assign(__assign(__assign({},filter),getCommaSeparatedChannelsString(filter===null||filter===void 0?void 0:filter.channels)),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords)),{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var $$g=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$m=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$m('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
122356
122356
|
// https://github.com/tc39/proposal-string-replace-all
|
|
122357
122357
|
$$g({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$c(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$c('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled.div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$m$1||(templateObject_1$m$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled.textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$f$1||(templateObject_2$f$1=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled(IconButton$1).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$b$1||(templateObject_3$b$1=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$m$1,templateObject_2$f$1,templateObject_3$b$1;var InsertFilesDialogHost=_styled.div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$e$1||(templateObject_2$e$1=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&css$2(templateObject_1$l$1||(templateObject_1$l$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled.p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled(DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n margin-top: ","px;\n padding: 0 ","px;\n\n i {\n margin: 0 ","px;\n }\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n padding: 0 ","px;\n\n i {\n margin: 0 ","px;\n }\n\n span {\n font-weight: normal;\n }\n"])),spacingM,spacingXs,spacingXs);_styled.div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$l$1,templateObject_2$e$1,templateObject_3$a$1,templateObject_4$5$1,templateObject_5$4$1;_styled(InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$k$1||(templateObject_1$k$1=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled(PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$d$1||(templateObject_2$d$1=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled.div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$k$1,templateObject_2$d$1,templateObject_3$9$1;_styled.div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n width: 100%;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n width: 100%;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);_styled(TextField).withConfig({displayName:"InsertVideoDialog__StyledTextField",componentId:"sc-12gp7sa-1"})(templateObject_2$c$1||(templateObject_2$c$1=__makeTemplateObject(["\n width: 510px;\n\n label {\n font-weight: normal;\n }\n"],["\n width: 510px;\n\n label {\n font-weight: normal;\n }\n"])));var templateObject_1$j$1,templateObject_2$c$1;var DateTimePicker=function DateTimePicker(props){var timeField=useRef$1();var formatMessage=useIntl().formatMessage;var _a=useState$2(getTime(props.date)),time=_a[0],setTime=_a[1];var _b=useState$2(false),timeHasFocus=_b[0],setTimeHasFocus=_b[1];var _c=useState$2(null),timeErrorMessageResourceKey=_c[0],setTimeErrorMessageResourceKey=_c[1];var momentMonths=['January','February','March','April','May','June','July','August','September','October','November','December'];var momentWeekdays=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];useEffect$1(function(){// do not update if the user is typing time
|
|
122358
122358
|
if(!timeHasFocus){// We might not know that the time field has the focus after an onBlur from the date field.
|
|
@@ -122425,9 +122425,9 @@ var NewsDetailViewMetaInfo = function NewsDetailViewMetaInfo() {
|
|
|
122425
122425
|
var DetailMetaInfo = _styled(ItemMetaInfo).withConfig({
|
|
122426
122426
|
displayName: "NewsDetailViewMetaInfo__DetailMetaInfo",
|
|
122427
122427
|
componentId: "sc-1v9a7tf-0"
|
|
122428
|
-
})(templateObject_1$
|
|
122428
|
+
})(templateObject_1$y || (templateObject_1$y = __makeTemplateObject$l(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ", "px) {\n font-size: 14px;\n }\n"], ["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ", "px) {\n font-size: 14px;\n }\n"])), minScreenSize.small);
|
|
122429
122429
|
|
|
122430
|
-
var templateObject_1$
|
|
122430
|
+
var templateObject_1$y;
|
|
122431
122431
|
|
|
122432
122432
|
var NewsItemContextProvider = function NewsItemContextProvider(_a) {
|
|
122433
122433
|
var itemId = _a.itemId,
|
|
@@ -122526,9 +122526,9 @@ var NewsDetailMainContent = function NewsDetailMainContent(_a) {
|
|
|
122526
122526
|
var Host$j = _styled.div.withConfig({
|
|
122527
122527
|
displayName: "NewsDetail__Host",
|
|
122528
122528
|
componentId: "sc-6rz5th-0"
|
|
122529
|
-
})(templateObject_1$
|
|
122529
|
+
})(templateObject_1$x || (templateObject_1$x = __makeTemplateObject$l([""], [""])));
|
|
122530
122530
|
|
|
122531
|
-
var templateObject_1$
|
|
122531
|
+
var templateObject_1$x;
|
|
122532
122532
|
|
|
122533
122533
|
var anObject$3 = anObject$v;
|
|
122534
122534
|
|
|
@@ -122927,11 +122927,11 @@ var PageTableOfContents = function PageTableOfContents(_a) {
|
|
|
122927
122927
|
}, void 0)]
|
|
122928
122928
|
}, void 0);
|
|
122929
122929
|
};
|
|
122930
|
-
var Host$i = _styled.div(templateObject_1$
|
|
122931
|
-
var PageTableOfContentsButton = _styled(IconButton$1)(templateObject_2$
|
|
122930
|
+
var Host$i = _styled.div(templateObject_1$w || (templateObject_1$w = __makeTemplateObject$l(["\n && {\n margin-top: ", "px;\n }\n"], ["\n && {\n margin-top: ", "px;\n }\n"])), spacingXs);
|
|
122931
|
+
var PageTableOfContentsButton = _styled(IconButton$1)(templateObject_2$l || (templateObject_2$l = __makeTemplateObject$l(["\n && {\n padding: 0;\n margin: 0;\n width: 22px;\n height: 22px;\n\n i {\n font-size: 20px;\n color: ", ";\n }\n }\n"], ["\n && {\n padding: 0;\n margin: 0;\n width: 22px;\n height: 22px;\n\n i {\n font-size: 20px;\n color: ", ";\n }\n }\n"])), function (p) {
|
|
122932
122932
|
return p.theme.textColors.default;
|
|
122933
122933
|
});
|
|
122934
|
-
var templateObject_1$
|
|
122934
|
+
var templateObject_1$w, templateObject_2$l;
|
|
122935
122935
|
|
|
122936
122936
|
var PageDetail = function PageDetail(props) {
|
|
122937
122937
|
var routeMatch = useRouteMatch();
|
|
@@ -123017,12 +123017,12 @@ var PageDetailInternal = function PageDetailInternal(_a) {
|
|
|
123017
123017
|
var Host$h = _styled.div.withConfig({
|
|
123018
123018
|
displayName: "PageDetail__Host",
|
|
123019
123019
|
componentId: "sc-22rpk8-0"
|
|
123020
|
-
})(templateObject_1$
|
|
123020
|
+
})(templateObject_1$v || (templateObject_1$v = __makeTemplateObject$l([""], [""])));
|
|
123021
123021
|
|
|
123022
123022
|
var PageHeader = _styled.div.withConfig({
|
|
123023
123023
|
displayName: "PageDetail__PageHeader",
|
|
123024
123024
|
componentId: "sc-22rpk8-1"
|
|
123025
|
-
})(templateObject_2$
|
|
123025
|
+
})(templateObject_2$k || (templateObject_2$k = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n margin-bottom: ", "px;\n"], ["\n display: flex;\n align-items: center;\n margin-bottom: ", "px;\n"])), spacingM);
|
|
123026
123026
|
|
|
123027
123027
|
var ConsumerBreadcrumbWrapper = function ConsumerBreadcrumbWrapper() {
|
|
123028
123028
|
var item = useDetailViewContext().item;
|
|
@@ -123037,7 +123037,7 @@ var ConsumerBreadcrumbWrapper = function ConsumerBreadcrumbWrapper() {
|
|
|
123037
123037
|
var StyledPageBreadcrumb = _styled(PageBreadcrumb).withConfig({
|
|
123038
123038
|
displayName: "PageDetail__StyledPageBreadcrumb",
|
|
123039
123039
|
componentId: "sc-22rpk8-2"
|
|
123040
|
-
})(templateObject_3$
|
|
123040
|
+
})(templateObject_3$g || (templateObject_3$g = __makeTemplateObject$l(["\n flex-grow: 1;\n box-sizing: border-box;\n max-width: calc(100% - 22px); /* 22px is for the ToC button */\n padding-right: ", "px;\n"], ["\n flex-grow: 1;\n box-sizing: border-box;\n max-width: calc(100% - 22px); /* 22px is for the ToC button */\n padding-right: ", "px;\n"])), spacingS);
|
|
123041
123041
|
|
|
123042
123042
|
var PageTableOfContentsWrapper = function PageTableOfContentsWrapper() {
|
|
123043
123043
|
var item = useDetailViewContext().item;
|
|
@@ -123076,8 +123076,8 @@ var PagesDetailViewNavigationWrapper = function PagesDetailViewNavigationWrapper
|
|
|
123076
123076
|
var StyledPagesDetailViewNavigation = _styled(PagesDetailViewNavigation).withConfig({
|
|
123077
123077
|
displayName: "PageDetail__StyledPagesDetailViewNavigation",
|
|
123078
123078
|
componentId: "sc-22rpk8-3"
|
|
123079
|
-
})(templateObject_5$
|
|
123080
|
-
return p.applyMarginTop && css$2(templateObject_4$
|
|
123079
|
+
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
123080
|
+
return p.applyMarginTop && css$2(templateObject_4$f || (templateObject_4$f = __makeTemplateObject$l(["\n margin-top: ", "px;\n "], ["\n margin-top: ", "px;\n "])), spacingL);
|
|
123081
123081
|
});
|
|
123082
123082
|
|
|
123083
123083
|
var InlinePageListWrapper = function InlinePageListWrapper() {
|
|
@@ -123094,7 +123094,7 @@ var InlinePageListWrapper = function InlinePageListWrapper() {
|
|
|
123094
123094
|
return jsx$1(InlinePageList, {}, void 0);
|
|
123095
123095
|
};
|
|
123096
123096
|
|
|
123097
|
-
var templateObject_1$
|
|
123097
|
+
var templateObject_1$v, templateObject_2$k, templateObject_3$g, templateObject_4$f, templateObject_5$c;
|
|
123098
123098
|
|
|
123099
123099
|
var EventDetail = function EventDetail(_a) {
|
|
123100
123100
|
var itemId = _a.itemId,
|
|
@@ -123162,26 +123162,26 @@ var EventDetail = function EventDetail(_a) {
|
|
|
123162
123162
|
var Host$g = _styled.div.withConfig({
|
|
123163
123163
|
displayName: "EventDetail__Host",
|
|
123164
123164
|
componentId: "sc-hrm4yl-0"
|
|
123165
|
-
})(templateObject_1$
|
|
123165
|
+
})(templateObject_1$u || (templateObject_1$u = __makeTemplateObject$l([""], [""])));
|
|
123166
123166
|
|
|
123167
123167
|
var EventDateAndRecurrenceInfo = _styled.div.withConfig({
|
|
123168
123168
|
displayName: "EventDetail__EventDateAndRecurrenceInfo",
|
|
123169
123169
|
componentId: "sc-hrm4yl-1"
|
|
123170
|
-
})(templateObject_2$
|
|
123170
|
+
})(templateObject_2$j || (templateObject_2$j = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"], ["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));
|
|
123171
123171
|
|
|
123172
123172
|
var DatesInfo = _styled(EventDetailViewDatesInfo).withConfig({
|
|
123173
123173
|
displayName: "EventDetail__DatesInfo",
|
|
123174
123174
|
componentId: "sc-hrm4yl-2"
|
|
123175
|
-
})(templateObject_3$
|
|
123175
|
+
})(templateObject_3$f || (templateObject_3$f = __makeTemplateObject$l(["\n margin-right: ", "px;\n"], ["\n margin-right: ", "px;\n"])), spacingM);
|
|
123176
123176
|
|
|
123177
123177
|
var EventRecurrenceSeriesInfoLink = _styled.a.withConfig({
|
|
123178
123178
|
displayName: "EventDetail__EventRecurrenceSeriesInfoLink",
|
|
123179
123179
|
componentId: "sc-hrm4yl-3"
|
|
123180
|
-
})(templateObject_4$
|
|
123180
|
+
})(templateObject_4$e || (templateObject_4$e = __makeTemplateObject$l(["\n color: ", ";\n margin-bottom: ", "px;\n"], ["\n color: ", ";\n margin-bottom: ", "px;\n"])), function (p) {
|
|
123181
123181
|
return p.theme.textColors.default;
|
|
123182
123182
|
}, spacingM);
|
|
123183
123183
|
|
|
123184
|
-
var templateObject_1$
|
|
123184
|
+
var templateObject_1$u, templateObject_2$j, templateObject_3$f, templateObject_4$e;
|
|
123185
123185
|
|
|
123186
123186
|
function useItemClickHandler() {
|
|
123187
123187
|
var user = useCurrentUserContext().user;
|
|
@@ -123378,31 +123378,31 @@ var PublishableItemCompactCard = function PublishableItemCompactCard(_a) {
|
|
|
123378
123378
|
var Host$f = _styled.div.withConfig({
|
|
123379
123379
|
displayName: "PublishableItemCompactCard__Host",
|
|
123380
123380
|
componentId: "sc-p3kszs-0"
|
|
123381
|
-
})(templateObject_1$
|
|
123381
|
+
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n"], ["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n"])), BannerSize, function (p) {
|
|
123382
123382
|
return p.theme.palette.white;
|
|
123383
123383
|
});
|
|
123384
123384
|
|
|
123385
|
-
var TextStyle = css$2(templateObject_2$
|
|
123385
|
+
var TextStyle = css$2(templateObject_2$i || (templateObject_2$i = __makeTemplateObject$l(["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"], ["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"])), fontSizeSmall);
|
|
123386
123386
|
|
|
123387
123387
|
var Inner$2 = _styled.div.withConfig({
|
|
123388
123388
|
displayName: "PublishableItemCompactCard__Inner",
|
|
123389
123389
|
componentId: "sc-p3kszs-1"
|
|
123390
|
-
})(templateObject_3$
|
|
123390
|
+
})(templateObject_3$e || (templateObject_3$e = __makeTemplateObject$l(["\n max-width: calc(100% - ", "px);\n width: 100%;\n display: flex;\n align-items: center;\n"], ["\n max-width: calc(100% - ", "px);\n width: 100%;\n display: flex;\n align-items: center;\n"])), BannerSize);
|
|
123391
123391
|
|
|
123392
123392
|
var Content$3 = _styled.div.withConfig({
|
|
123393
123393
|
displayName: "PublishableItemCompactCard__Content",
|
|
123394
123394
|
componentId: "sc-p3kszs-2"
|
|
123395
|
-
})(templateObject_4$
|
|
123395
|
+
})(templateObject_4$d || (templateObject_4$d = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n box-sizing: border-box;\n padding: ", "px ", "px;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n box-sizing: border-box;\n padding: ", "px ", "px;\n\n ", "\n"])), spacingXs, spacingS + 5, TextStyle);
|
|
123396
123396
|
|
|
123397
123397
|
var Intro$1 = _styled.p.withConfig({
|
|
123398
123398
|
displayName: "PublishableItemCompactCard__Intro",
|
|
123399
123399
|
componentId: "sc-p3kszs-3"
|
|
123400
|
-
})(templateObject_5$
|
|
123400
|
+
})(templateObject_5$b || (templateObject_5$b = __makeTemplateObject$l(["\n margin: 0;\n padding: 0;\n ", "\n"], ["\n margin: 0;\n padding: 0;\n ", "\n"])), TextStyle);
|
|
123401
123401
|
|
|
123402
123402
|
var Title$3 = _styled.span.withConfig({
|
|
123403
123403
|
displayName: "PublishableItemCompactCard__Title",
|
|
123404
123404
|
componentId: "sc-p3kszs-4"
|
|
123405
|
-
})(templateObject_6$
|
|
123405
|
+
})(templateObject_6$b || (templateObject_6$b = __makeTemplateObject$l(["\n ", "\n display: inline-block;\n max-width: 100%;\n"], ["\n ", "\n display: inline-block;\n max-width: 100%;\n"])), TextStyle);
|
|
123406
123406
|
|
|
123407
123407
|
var TitleWrapper$1 = _styled.a.withConfig({
|
|
123408
123408
|
displayName: "PublishableItemCompactCard__TitleWrapper",
|
|
@@ -123476,7 +123476,7 @@ var BannerHost = _styled.div.withConfig({
|
|
|
123476
123476
|
});
|
|
123477
123477
|
});
|
|
123478
123478
|
|
|
123479
|
-
var templateObject_1$
|
|
123479
|
+
var templateObject_1$t, templateObject_2$i, templateObject_3$e, templateObject_4$d, templateObject_5$b, templateObject_6$b, templateObject_7$8, templateObject_8$7, templateObject_9$5, templateObject_10$4, templateObject_11$4, templateObject_12$4, templateObject_13$3, templateObject_14$3, templateObject_15$3;
|
|
123480
123480
|
|
|
123481
123481
|
var ErrorContainer = function ErrorContainer() {
|
|
123482
123482
|
return jsx$1(Host$e, {
|
|
@@ -123489,11 +123489,11 @@ var ErrorContainer = function ErrorContainer() {
|
|
|
123489
123489
|
var Host$e = _styled.p.withConfig({
|
|
123490
123490
|
displayName: "ErrorContainer__Host",
|
|
123491
123491
|
componentId: "sc-499uwc-0"
|
|
123492
|
-
})(templateObject_1$
|
|
123492
|
+
})(templateObject_1$s || (templateObject_1$s = __makeTemplateObject$l(["\n color: ", ";\n padding: ", "px 0;\n text-align: center;\n"], ["\n color: ", ";\n padding: ", "px 0;\n text-align: center;\n"])), function (p) {
|
|
123493
123493
|
return p.theme.palette.red;
|
|
123494
123494
|
}, spacingM);
|
|
123495
123495
|
|
|
123496
|
-
var templateObject_1$
|
|
123496
|
+
var templateObject_1$s;
|
|
123497
123497
|
|
|
123498
123498
|
var PublishableItemList = function PublishableItemList(_a) {
|
|
123499
123499
|
var onRenderList = _a.onRenderList,
|
|
@@ -123560,9 +123560,9 @@ var CompactLayoutList = function CompactLayoutList(_a) {
|
|
|
123560
123560
|
var CompactList = _styled.ul.withConfig({
|
|
123561
123561
|
displayName: "CompactLayoutList__CompactList",
|
|
123562
123562
|
componentId: "sc-1bhjbb0-0"
|
|
123563
|
-
})(templateObject_1$
|
|
123563
|
+
})(templateObject_1$r || (templateObject_1$r = __makeTemplateObject$l(["\n margin: 0;\n padding: 0;\n list-style: none;\n\n > li:not(:first-child) {\n margin-top: ", "px;\n }\n"], ["\n margin: 0;\n padding: 0;\n list-style: none;\n\n > li:not(:first-child) {\n margin-top: ", "px;\n }\n"])), spacingS);
|
|
123564
123564
|
|
|
123565
|
-
var templateObject_1$
|
|
123565
|
+
var templateObject_1$r;
|
|
123566
123566
|
|
|
123567
123567
|
var ItemLayoutMode;
|
|
123568
123568
|
|
|
@@ -123645,7 +123645,7 @@ var NewsList = function NewsList(_a) {
|
|
|
123645
123645
|
var Date$1 = _styled(DateTime).withConfig({
|
|
123646
123646
|
displayName: "NewsList__Date",
|
|
123647
123647
|
componentId: "sc-1d0bzx1-0"
|
|
123648
|
-
})(templateObject_1$
|
|
123648
|
+
})(templateObject_1$q || (templateObject_1$q = __makeTemplateObject$l(["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"], ["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"])), fontSizeSmall);
|
|
123649
123649
|
|
|
123650
123650
|
var NewsListInternal = function NewsListInternal(_a) {
|
|
123651
123651
|
var items = _a.items,
|
|
@@ -123734,26 +123734,26 @@ var NewsListInternal = function NewsListInternal(_a) {
|
|
|
123734
123734
|
var Host$d = _styled.div.withConfig({
|
|
123735
123735
|
displayName: "NewsList__Host",
|
|
123736
123736
|
componentId: "sc-1d0bzx1-1"
|
|
123737
|
-
})(templateObject_2$
|
|
123737
|
+
})(templateObject_2$h || (templateObject_2$h = __makeTemplateObject$l([""], [""])));
|
|
123738
123738
|
|
|
123739
123739
|
var StyledNewsItemTile = _styled(NewsItemTile).withConfig({
|
|
123740
123740
|
displayName: "NewsList__StyledNewsItemTile",
|
|
123741
123741
|
componentId: "sc-1d0bzx1-2"
|
|
123742
|
-
})(templateObject_4$
|
|
123743
|
-
return p.showHighlight && css$2(templateObject_3$
|
|
123742
|
+
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject$l(["\n :not(:last-child) {\n margin-bottom: ", "px;\n }\n\n ", ";\n"], ["\n :not(:last-child) {\n margin-bottom: ", "px;\n }\n\n ", ";\n"])), spacingM, function (p) {
|
|
123743
|
+
return p.showHighlight && css$2(templateObject_3$d || (templateObject_3$d = __makeTemplateObject$l(["\n position: relative;\n\n &::after {\n content: '';\n border-right-width: 6px;\n border-right-color: ", ";\n border-right-style: solid;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n }\n "], ["\n position: relative;\n\n &::after {\n content: '';\n border-right-width: 6px;\n border-right-color: ", ";\n border-right-style: solid;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n }\n "])), p.theme.palette.accent);
|
|
123744
123744
|
});
|
|
123745
123745
|
|
|
123746
123746
|
var Comments$1 = _styled.a.withConfig({
|
|
123747
123747
|
displayName: "NewsList__Comments",
|
|
123748
123748
|
componentId: "sc-1d0bzx1-3"
|
|
123749
|
-
})(templateObject_5$
|
|
123749
|
+
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n color: ", ";\n"], ["\n display: flex;\n align-items: center;\n color: ", ";\n"])), function (p) {
|
|
123750
123750
|
return p.theme.textColors.default;
|
|
123751
123751
|
});
|
|
123752
123752
|
|
|
123753
123753
|
var StyledIcon$3 = _styled(Icon).withConfig({
|
|
123754
123754
|
displayName: "NewsList__StyledIcon",
|
|
123755
123755
|
componentId: "sc-1d0bzx1-4"
|
|
123756
|
-
})(templateObject_6$
|
|
123756
|
+
})(templateObject_6$a || (templateObject_6$a = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
123757
123757
|
return p.highlight && unreadCommentHighlight;
|
|
123758
123758
|
});
|
|
123759
123759
|
|
|
@@ -123767,7 +123767,7 @@ var StyledCardLikeButton = _styled(CardLikeButton).withConfig({
|
|
|
123767
123767
|
componentId: "sc-1d0bzx1-6"
|
|
123768
123768
|
})(templateObject_8$6 || (templateObject_8$6 = __makeTemplateObject$l(["\n margin-right: ", "px;\n"], ["\n margin-right: ", "px;\n"])), spacingM);
|
|
123769
123769
|
|
|
123770
|
-
var templateObject_1$
|
|
123770
|
+
var templateObject_1$q, templateObject_2$h, templateObject_3$d, templateObject_4$c, templateObject_5$a, templateObject_6$a, templateObject_7$7, templateObject_8$6;
|
|
123771
123771
|
|
|
123772
123772
|
var ManageChannels = function ManageChannels(_a) {
|
|
123773
123773
|
var className = _a.className;
|
|
@@ -123933,22 +123933,22 @@ var ManageChannels = function ManageChannels(_a) {
|
|
|
123933
123933
|
var Host$c = _styled.div.withConfig({
|
|
123934
123934
|
displayName: "ManageChannels__Host",
|
|
123935
123935
|
componentId: "sc-yyoxfw-0"
|
|
123936
|
-
})(templateObject_1$
|
|
123936
|
+
})(templateObject_1$p || (templateObject_1$p = __makeTemplateObject$l(["\n padding: ", "px ", "px;\n"], ["\n padding: ", "px ", "px;\n"])), spacingX, spacingM);
|
|
123937
123937
|
|
|
123938
123938
|
var Title$2 = _styled.h3.withConfig({
|
|
123939
123939
|
displayName: "ManageChannels__Title",
|
|
123940
123940
|
componentId: "sc-yyoxfw-1"
|
|
123941
|
-
})(templateObject_2$
|
|
123941
|
+
})(templateObject_2$g || (templateObject_2$g = __makeTemplateObject$l(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
123942
123942
|
|
|
123943
123943
|
var Description = _styled.span.withConfig({
|
|
123944
123944
|
displayName: "ManageChannels__Description",
|
|
123945
123945
|
componentId: "sc-yyoxfw-2"
|
|
123946
|
-
})(templateObject_3$
|
|
123946
|
+
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject$l(["\n font-size: ", "px;\n"], ["\n font-size: ", "px;\n"])), fontSizeSmall);
|
|
123947
123947
|
|
|
123948
123948
|
var ChannelList = _styled.ul.withConfig({
|
|
123949
123949
|
displayName: "ManageChannels__ChannelList",
|
|
123950
123950
|
componentId: "sc-yyoxfw-3"
|
|
123951
|
-
})(templateObject_4$
|
|
123951
|
+
})(templateObject_4$b || (templateObject_4$b = __makeTemplateObject$l(["\n list-style: none;\n\n && {\n margin-top: ", "px;\n padding-left: 0;\n }\n"], ["\n list-style: none;\n\n && {\n margin-top: ", "px;\n padding-left: 0;\n }\n"])), spacingS);
|
|
123952
123952
|
|
|
123953
123953
|
var ChannelItem = function ChannelItem(_a) {
|
|
123954
123954
|
var channel = _a.channel,
|
|
@@ -123970,7 +123970,7 @@ var ChannelItem = function ChannelItem(_a) {
|
|
|
123970
123970
|
children: jsx$1(Tooltip, __assign$g({
|
|
123971
123971
|
resourceKey: "Channels.ToggleNotifications" + (channel.sendNotifications ? 'Off' : 'On')
|
|
123972
123972
|
}, {
|
|
123973
|
-
children: jsx$1(StyledIconButton, {
|
|
123973
|
+
children: jsx$1(StyledIconButton$1, {
|
|
123974
123974
|
className: "bgColor-transparent--hover",
|
|
123975
123975
|
onClick: function () {
|
|
123976
123976
|
return onToggleNotifications(!channel.sendNotifications);
|
|
@@ -123987,26 +123987,26 @@ var ChannelItem = function ChannelItem(_a) {
|
|
|
123987
123987
|
var ChannelHost = _styled.div.withConfig({
|
|
123988
123988
|
displayName: "ManageChannels__ChannelHost",
|
|
123989
123989
|
componentId: "sc-yyoxfw-4"
|
|
123990
|
-
})(templateObject_5$
|
|
123990
|
+
})(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
123991
123991
|
|
|
123992
123992
|
var NotificationButton = _styled.div.withConfig({
|
|
123993
123993
|
displayName: "ManageChannels__NotificationButton",
|
|
123994
123994
|
componentId: "sc-yyoxfw-5"
|
|
123995
|
-
})(templateObject_6$
|
|
123995
|
+
})(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject$l(["\n margin-left: auto;\n align-self: flex-start;\n"], ["\n margin-left: auto;\n align-self: flex-start;\n"])));
|
|
123996
123996
|
|
|
123997
123997
|
var ChannelToggle = _styled(ToggleWithLabel).withConfig({
|
|
123998
123998
|
displayName: "ManageChannels__ChannelToggle",
|
|
123999
123999
|
componentId: "sc-yyoxfw-6"
|
|
124000
124000
|
})(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject$l(["\n && {\n margin: ", "px 0;\n\n label {\n font-weight: normal;\n padding: 0;\n }\n\n .ms-Toggle-innerContainer {\n align-self: flex-start;\n }\n }\n"], ["\n && {\n margin: ", "px 0;\n\n label {\n font-weight: normal;\n padding: 0;\n }\n\n .ms-Toggle-innerContainer {\n align-self: flex-start;\n }\n }\n"])), spacingXxs);
|
|
124001
124001
|
|
|
124002
|
-
var StyledIconButton = _styled(IconButton$1).withConfig({
|
|
124002
|
+
var StyledIconButton$1 = _styled(IconButton$1).withConfig({
|
|
124003
124003
|
displayName: "ManageChannels__StyledIconButton",
|
|
124004
124004
|
componentId: "sc-yyoxfw-7"
|
|
124005
124005
|
})(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject$l(["\n i {\n font-size: ", "px;\n color: ", ";\n }\n"], ["\n i {\n font-size: ", "px;\n color: ", ";\n }\n"])), fontSizeLarge - 5, function (p) {
|
|
124006
124006
|
return p.theme.textColors.default;
|
|
124007
124007
|
});
|
|
124008
124008
|
|
|
124009
|
-
var templateObject_1$
|
|
124009
|
+
var templateObject_1$p, templateObject_2$g, templateObject_3$c, templateObject_4$b, templateObject_5$9, templateObject_6$9, templateObject_7$6, templateObject_8$5;
|
|
124010
124010
|
|
|
124011
124011
|
var ChannelSelectorWrapper = function ChannelSelectorWrapper(_a) {
|
|
124012
124012
|
var onChannelsChanged = _a.onChannelsChanged,
|
|
@@ -124140,19 +124140,19 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
124140
124140
|
return NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
124141
124141
|
}
|
|
124142
124142
|
};
|
|
124143
|
-
var Host$b = _styled.div(templateObject_2$
|
|
124144
|
-
return p.showHighlight && css$2(templateObject_1$
|
|
124143
|
+
var Host$b = _styled.div(templateObject_2$f || (templateObject_2$f = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"])), function (p) {
|
|
124144
|
+
return p.showHighlight && css$2(templateObject_1$o || (templateObject_1$o = __makeTemplateObject$l(["\n position: relative;\n &::after {\n ", ";\n }\n "], ["\n position: relative;\n &::after {\n ", ";\n }\n "])), BannerHighlightStyle$1);
|
|
124145
124145
|
});
|
|
124146
|
-
var BannerHighlightStyle$1 = css$2(templateObject_3$
|
|
124146
|
+
var BannerHighlightStyle$1 = css$2(templateObject_3$b || (templateObject_3$b = __makeTemplateObject$l(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"], ["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"])), spacingXs, function (p) {
|
|
124147
124147
|
return p.theme.palette.accent;
|
|
124148
124148
|
});
|
|
124149
|
-
var Content$2 = _styled.div(templateObject_4$
|
|
124149
|
+
var Content$2 = _styled.div(templateObject_4$a || (templateObject_4$a = __makeTemplateObject$l(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"], ["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"])), function (p) {
|
|
124150
124150
|
return p.contentHeight;
|
|
124151
124151
|
}, spacingM, function (p) {
|
|
124152
124152
|
return p.theme.palette.white;
|
|
124153
124153
|
});
|
|
124154
|
-
var MetaInfo$1 = _styled.div(templateObject_5$
|
|
124155
|
-
var DateAndIcon = _styled.div(templateObject_6$
|
|
124154
|
+
var MetaInfo$1 = _styled.div(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject$l(["\n font-size: ", "px;\n"], ["\n font-size: ", "px;\n"])), fontSizeSmall);
|
|
124155
|
+
var DateAndIcon = _styled.div(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject$l(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
124156
124156
|
var PublishingDate = _styled(DateTime)(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject$l(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n align-self: center;\n"], ["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n align-self: center;\n"])));
|
|
124157
124157
|
var NewsCardIcon = _styled.div(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject$l(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"], ["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));
|
|
124158
124158
|
var StyledIcon$2 = _styled(Icon)(templateObject_9$4 || (templateObject_9$4 = __makeTemplateObject$l(["\n font-size: ", "px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ", "px;\n cursor: pointer;\n\n background-color: ", ";\n color: ", ";\n"], ["\n font-size: ", "px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ", "px;\n cursor: pointer;\n\n background-color: ", ";\n color: ", ";\n"])), fontSizeSmaller, spacingXs, function (p) {
|
|
@@ -124166,7 +124166,7 @@ var Headline$1 = _styled.p(templateObject_12$3 || (templateObject_12$3 = __makeT
|
|
|
124166
124166
|
var StyledTitle$1 = _styled(Title$8)(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject$l(["\n // info: this height calculation is required for the line-clamp\n // 1.2 refers to the line height, 3 refers to the number of lines\n height: ", "px;\n\n a {\n z-index: 1;\n display: inline-flex;\n }\n\n span {\n ", "\n }\n\n i[data-external-content] {\n line-height: ", "px; // fix icon alignment\n }\n"], ["\n // info: this height calculation is required for the line-clamp\n // 1.2 refers to the line height, 3 refers to the number of lines\n height: ", "px;\n\n a {\n z-index: 1;\n display: inline-flex;\n }\n\n span {\n ", "\n }\n\n i[data-external-content] {\n line-height: ", "px; // fix icon alignment\n }\n"])), fontSizeMedium * 1.2 * 3, LineClamp(3, fontSizeMedium, 1.2), fontSizeMedium - 2);
|
|
124167
124167
|
var StyledFlatKeywords = _styled(FlatKeywords)(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject$l(["\n font-size: ", "px;\n"], ["\n font-size: ", "px;\n"])), fontSizeSmall);
|
|
124168
124168
|
var StyledChannels$2 = _styled(ChannelList$1)(templateObject_15$2 || (templateObject_15$2 = __makeTemplateObject$l(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"], ["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), spacingS, spacingM);
|
|
124169
|
-
var templateObject_1$
|
|
124169
|
+
var templateObject_1$o, templateObject_2$f, templateObject_3$b, templateObject_4$a, templateObject_5$8, templateObject_6$8, templateObject_7$5, templateObject_8$4, templateObject_9$4, templateObject_10$3, templateObject_11$3, templateObject_12$3, templateObject_13$2, templateObject_14$2, templateObject_15$2;
|
|
124170
124170
|
|
|
124171
124171
|
var PublishableItemGrid = function PublishableItemGrid(_a) {
|
|
124172
124172
|
var onRenderCard = _a.onRenderCard,
|
|
@@ -124234,16 +124234,16 @@ var PublishableItemGrid = function PublishableItemGrid(_a) {
|
|
|
124234
124234
|
var Host$a = _styled.div.withConfig({
|
|
124235
124235
|
displayName: "PublishableItemGrid__Host",
|
|
124236
124236
|
componentId: "sc-q1r4s2-0"
|
|
124237
|
-
})(templateObject_1$
|
|
124237
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject$l([""], [""])));
|
|
124238
124238
|
|
|
124239
124239
|
var Grid = _styled.div.withConfig({
|
|
124240
124240
|
displayName: "PublishableItemGrid__Grid",
|
|
124241
124241
|
componentId: "sc-q1r4s2-1"
|
|
124242
|
-
})(templateObject_3$
|
|
124243
|
-
return css$2(templateObject_2$
|
|
124242
|
+
})(templateObject_3$a || (templateObject_3$a = __makeTemplateObject$l(["\n display: grid;\n gap: ", "px;\n ", "\n"], ["\n display: grid;\n gap: ", "px;\n ", "\n"])), spacingM, function (p) {
|
|
124243
|
+
return css$2(templateObject_2$e || (templateObject_2$e = __makeTemplateObject$l(["\n grid-template-columns: repeat(\n auto-fill,\n minmax(\n max(\n ", "px,\n calc(100% / ", " - ", "px)\n ),\n 1fr\n )\n ); /* we need the minColumnWidth so we don't break the card layout on smaller screens/containers */\n "], ["\n grid-template-columns: repeat(\n auto-fill,\n minmax(\n max(\n ", "px,\n calc(100% / ", " - ", "px)\n ),\n 1fr\n )\n ); /* we need the minColumnWidth so we don't break the card layout on smaller screens/containers */\n "])), p.minColumnWidth, p.columnCount, spacingM);
|
|
124244
124244
|
});
|
|
124245
124245
|
|
|
124246
|
-
var templateObject_1$
|
|
124246
|
+
var templateObject_1$n, templateObject_2$e, templateObject_3$a;
|
|
124247
124247
|
|
|
124248
124248
|
var NewsGrid = function NewsGrid(_a) {
|
|
124249
124249
|
var filter = _a.filter,
|
|
@@ -124392,17 +124392,17 @@ var EventGridCard = function EventGridCard(_a) {
|
|
|
124392
124392
|
return NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
124393
124393
|
}
|
|
124394
124394
|
};
|
|
124395
|
-
var Host$9 = _styled.div(templateObject_2$
|
|
124396
|
-
return p.showHighlight && css$2(templateObject_1$
|
|
124395
|
+
var Host$9 = _styled.div(templateObject_2$d || (templateObject_2$d = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"])), function (p) {
|
|
124396
|
+
return p.showHighlight && css$2(templateObject_1$m || (templateObject_1$m = __makeTemplateObject$l(["\n position: relative;\n &::after {\n ", ";\n }\n "], ["\n position: relative;\n &::after {\n ", ";\n }\n "])), BannerHighlightStyle);
|
|
124397
124397
|
});
|
|
124398
|
-
var BannerHighlightStyle = css$2(templateObject_3$
|
|
124398
|
+
var BannerHighlightStyle = css$2(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject$l(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"], ["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"])), spacingXs, function (p) {
|
|
124399
124399
|
return p.theme.palette.accent;
|
|
124400
124400
|
});
|
|
124401
|
-
var Content$1 = _styled.div(templateObject_4$
|
|
124401
|
+
var Content$1 = _styled.div(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject$l(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: 393px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"], ["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: 393px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"])), spacingM, function (p) {
|
|
124402
124402
|
return p.theme.palette.white;
|
|
124403
124403
|
});
|
|
124404
|
-
var MetaInfo = _styled.div(templateObject_5$
|
|
124405
|
-
var RecurrenceSeriesInfo = _styled(EventRecurrenceSeriesInfo)(templateObject_6$
|
|
124404
|
+
var MetaInfo = _styled.div(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject$l(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
124405
|
+
var RecurrenceSeriesInfo = _styled(EventRecurrenceSeriesInfo)(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject$l(["\n z-index: 1;\n margin-bottom: ", "px;\n margin-left: auto;\n padding-left: ", "px;\n\n i {\n font-size: ", "px;\n padding: 2px 0 2px 0;\n }\n"], ["\n z-index: 1;\n margin-bottom: ", "px;\n margin-left: auto;\n padding-left: ", "px;\n\n i {\n font-size: ", "px;\n padding: 2px 0 2px 0;\n }\n"])), spacingM, spacingS, fontSizeMedium + 4);
|
|
124406
124406
|
var Dates$1 = _styled(DateTimeRange)(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject$l(["\n display: flex;\n flex-wrap: wrap;\n font-size: ", "px;\n ", "\n margin-bottom: ", "px;\n"], ["\n display: flex;\n flex-wrap: wrap;\n font-size: ", "px;\n ", "\n margin-bottom: ", "px;\n"])), fontSizeMedium, function (p) {
|
|
124407
124407
|
return p.isCancelled && css$2(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject$l(["\n text-decoration: line-through;\n "], ["\n text-decoration: line-through;\n "])));
|
|
124408
124408
|
}, spacingM);
|
|
@@ -124413,7 +124413,7 @@ var Registration = _styled(EventCardUserRegistration)(templateObject_12$2 || (te
|
|
|
124413
124413
|
var CancelInfo = _styled(EventCancelInformation)(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject$l(["\n margin: 0 -", "px;\n padding: ", "px;\n\n p {\n padding-left: ", "px;\n ", "\n }\n"], ["\n margin: 0 -", "px;\n padding: ", "px;\n\n p {\n padding-left: ", "px;\n ", "\n }\n"])), spacingM, spacingS + 5, spacingM + spacingXs, LineClamp(2, fontSizeSmall, 1.4));
|
|
124414
124414
|
var Contact = _styled(EventPeopleInfo)(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject$l(["\n button {\n z-index: 1;\n }\n"], ["\n button {\n z-index: 1;\n }\n"])));
|
|
124415
124415
|
var Location = _styled(EventLocationInfo)(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject$l(["\n li {\n z-index: 1;\n }\n"], ["\n li {\n z-index: 1;\n }\n"])));
|
|
124416
|
-
var templateObject_1$
|
|
124416
|
+
var templateObject_1$m, templateObject_2$d, templateObject_3$9, templateObject_4$9, templateObject_5$7, templateObject_6$7, templateObject_7$4, templateObject_8$3, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$1, templateObject_14$1, templateObject_15$1;
|
|
124417
124417
|
|
|
124418
124418
|
var EventsGrid = function EventsGrid(_a) {
|
|
124419
124419
|
var _b = _a.view,
|
|
@@ -124550,28 +124550,28 @@ var EventsList = function EventsList(_a) {
|
|
|
124550
124550
|
var StyledPublishableItemCompactCard = _styled(PublishableItemCompactCard).withConfig({
|
|
124551
124551
|
displayName: "EventsList__StyledPublishableItemCompactCard",
|
|
124552
124552
|
componentId: "sc-10qt3tr-0"
|
|
124553
|
-
})(templateObject_1$
|
|
124553
|
+
})(templateObject_1$l || (templateObject_1$l = __makeTemplateObject$l(["\n & [data-compact-card-icon] {\n margin-top: auto;\n i {\n font-size: ", "px;\n }\n }\n"], ["\n & [data-compact-card-icon] {\n margin-top: auto;\n i {\n font-size: ", "px;\n }\n }\n"])), fontSizeMedium);
|
|
124554
124554
|
|
|
124555
124555
|
var DatesHost = _styled.div.withConfig({
|
|
124556
124556
|
displayName: "EventsList__DatesHost",
|
|
124557
124557
|
componentId: "sc-10qt3tr-1"
|
|
124558
|
-
})(templateObject_2$
|
|
124558
|
+
})(templateObject_2$c || (templateObject_2$c = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
124559
124559
|
|
|
124560
124560
|
var CancelIndicator = _styled(FormattedMessageWithStyle).withConfig({
|
|
124561
124561
|
displayName: "EventsList__CancelIndicator",
|
|
124562
124562
|
componentId: "sc-10qt3tr-2"
|
|
124563
|
-
})(templateObject_3$
|
|
124563
|
+
})(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject$l(["\n font-size: ", "px;\n color: red;\n"], ["\n font-size: ", "px;\n color: red;\n"])), fontSizeSmall);
|
|
124564
124564
|
|
|
124565
124565
|
var Locations = _styled(EventLocationInfo).withConfig({
|
|
124566
124566
|
displayName: "EventsList__Locations",
|
|
124567
124567
|
componentId: "sc-10qt3tr-3"
|
|
124568
|
-
})(templateObject_4$
|
|
124568
|
+
})(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject$l(["\n a {\n z-index: 1;\n }\n\n && [data-event-locations] {\n flex-direction: row;\n }\n ul li {\n margin-top: 0;\n display: inline;\n :not(:last-child) {\n &::after {\n content: ',';\n margin-right: 5px;\n }\n }\n }\n"], ["\n a {\n z-index: 1;\n }\n\n && [data-event-locations] {\n flex-direction: row;\n }\n ul li {\n margin-top: 0;\n display: inline;\n :not(:last-child) {\n &::after {\n content: ',';\n margin-right: 5px;\n }\n }\n }\n"])));
|
|
124569
124569
|
|
|
124570
124570
|
var Dates = _styled(DateTimeRange).withConfig({
|
|
124571
124571
|
displayName: "EventsList__Dates",
|
|
124572
124572
|
componentId: "sc-10qt3tr-4"
|
|
124573
|
-
})(templateObject_6$
|
|
124574
|
-
return p.isCancelled && css$2(templateObject_5$
|
|
124573
|
+
})(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject$l(["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n ", "\n"], ["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n ", "\n"])), fontSizeSmall, function (p) {
|
|
124574
|
+
return p.isCancelled && css$2(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject$l(["\n text-decoration: line-through;\n "], ["\n text-decoration: line-through;\n "])));
|
|
124575
124575
|
});
|
|
124576
124576
|
|
|
124577
124577
|
var DefaultLayoutList = function DefaultLayoutList(_a) {
|
|
@@ -124683,76 +124683,7 @@ var CommentsCount = _styled.span.withConfig({
|
|
|
124683
124683
|
componentId: "sc-10qt3tr-9"
|
|
124684
124684
|
})(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject$l(["\n padding-left: 5px;\n font-size: 0.9rem;\n"], ["\n padding-left: 5px;\n font-size: 0.9rem;\n"])));
|
|
124685
124685
|
|
|
124686
|
-
var templateObject_1$
|
|
124687
|
-
|
|
124688
|
-
var Hero = function Hero(_a) {
|
|
124689
|
-
var items = _a.items,
|
|
124690
|
-
itemResourceType = _a.itemResourceType,
|
|
124691
|
-
baseRoute = _a.baseRoute,
|
|
124692
|
-
disableAutoplay = _a.disableAutoplay,
|
|
124693
|
-
autoplayInterval = _a.autoplayInterval,
|
|
124694
|
-
_b = _a.width,
|
|
124695
|
-
width = _b === void 0 ? '100%' : _b,
|
|
124696
|
-
_c = _a.height,
|
|
124697
|
-
height = _c === void 0 ? '100%' : _c;
|
|
124698
|
-
|
|
124699
|
-
var _d = useState$2(false),
|
|
124700
|
-
forceDisableAutoplay = _d[0],
|
|
124701
|
-
setForceDisableAutoplay = _d[1];
|
|
124702
|
-
|
|
124703
|
-
if (!items || items.length === 0) {
|
|
124704
|
-
return null;
|
|
124705
|
-
}
|
|
124706
|
-
|
|
124707
|
-
var hasMoreItems = items.length > 1;
|
|
124708
|
-
return jsx$1(StyledCarousel, __assign$g({
|
|
124709
|
-
autoplay: !disableAutoplay && !forceDisableAutoplay,
|
|
124710
|
-
autoplayInterval: autoplayInterval !== null && autoplayInterval !== void 0 ? autoplayInterval : 5000,
|
|
124711
|
-
wrapAround: true,
|
|
124712
|
-
pauseOnHover: true,
|
|
124713
|
-
renderBottomCenterControls: function (props) {
|
|
124714
|
-
return hasMoreItems && !forceDisableAutoplay ? jsx$1("div", __assign$g({
|
|
124715
|
-
"data-dark-paging-indicator": !items[props.currentSlide].item.bannerInfo
|
|
124716
|
-
}, {
|
|
124717
|
-
children: jsx$1(PagingDots, __assign$g({}, props), void 0)
|
|
124718
|
-
}), void 0) : null;
|
|
124719
|
-
},
|
|
124720
|
-
renderCenterLeftControls: null,
|
|
124721
|
-
renderCenterRightControls: null,
|
|
124722
|
-
swiping: hasMoreItems,
|
|
124723
|
-
defaultControlsConfig: {
|
|
124724
|
-
pagingDotsContainerClassName: 'hero-paging'
|
|
124725
|
-
},
|
|
124726
|
-
transitionMode: "fade",
|
|
124727
|
-
width: typeof width === 'number' ? width + "px" : width,
|
|
124728
|
-
height: typeof height === 'number' ? height + "px" : height
|
|
124729
|
-
}, {
|
|
124730
|
-
children: items.map(function (i) {
|
|
124731
|
-
return jsx$1(HeroSlide, {
|
|
124732
|
-
item: i.item,
|
|
124733
|
-
icons: i.icons,
|
|
124734
|
-
itemResourceType: itemResourceType,
|
|
124735
|
-
baseRoute: baseRoute,
|
|
124736
|
-
additionalMetadata: i.additionalMetadata,
|
|
124737
|
-
onClick: i.onClick,
|
|
124738
|
-
onToggleVideo: function (isPlayerActive) {
|
|
124739
|
-
return setForceDisableAutoplay(isPlayerActive);
|
|
124740
|
-
},
|
|
124741
|
-
width: width,
|
|
124742
|
-
height: height
|
|
124743
|
-
}, i.item.id);
|
|
124744
|
-
})
|
|
124745
|
-
}), void 0);
|
|
124746
|
-
};
|
|
124747
|
-
|
|
124748
|
-
var StyledCarousel = _styled(Carousel).withConfig({
|
|
124749
|
-
displayName: "Hero__StyledCarousel",
|
|
124750
|
-
componentId: "sc-1hutyg7-0"
|
|
124751
|
-
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject$l(["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging {\n display: flex;\n width: 100%;\n top: -2px !important;\n\n > li {\n flex: 1;\n margin: 0 2px;\n\n > button {\n width: 100%;\n display: flex;\n padding: 0;\n\n height: 30px;\n\n position: relative;\n z-index: 1;\n\n &::after {\n content: '';\n height: 3px;\n position: absolute;\n left: 0;\n right: 0;\n top: 10px !important;\n }\n\n > svg {\n display: none;\n }\n }\n }\n }\n\n [data-dark-paging-indicator='true'] {\n .hero-paging > li > button::after {\n background: ", " !important;\n }\n }\n\n [data-dark-paging-indicator='false'] {\n .hero-paging > li > button::after {\n background: ", " !important;\n }\n }\n"], ["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging {\n display: flex;\n width: 100%;\n top: -2px !important;\n\n > li {\n flex: 1;\n margin: 0 2px;\n\n > button {\n width: 100%;\n display: flex;\n padding: 0;\n\n height: 30px;\n\n position: relative;\n z-index: 1;\n\n &::after {\n content: '';\n height: 3px;\n position: absolute;\n left: 0;\n right: 0;\n top: 10px !important;\n }\n\n > svg {\n display: none;\n }\n }\n }\n }\n\n [data-dark-paging-indicator='true'] {\n .hero-paging > li > button::after {\n background: ", " !important;\n }\n }\n\n [data-dark-paging-indicator='false'] {\n .hero-paging > li > button::after {\n background: ", " !important;\n }\n }\n"])), spacingL, spacingL, function (p) {
|
|
124752
|
-
return p.theme.palette.black;
|
|
124753
|
-
}, function (p) {
|
|
124754
|
-
return p.theme.palette.white;
|
|
124755
|
-
});
|
|
124686
|
+
var templateObject_1$l, templateObject_2$c, templateObject_3$8, templateObject_4$8, templateObject_5$6, templateObject_6$6, templateObject_7$3, templateObject_8$2, templateObject_9$2, templateObject_10$1, templateObject_11$1, templateObject_12$1;
|
|
124756
124687
|
|
|
124757
124688
|
var HeroSlide = function HeroSlide(_a) {
|
|
124758
124689
|
var item = _a.item,
|
|
@@ -124808,7 +124739,9 @@ var HeroSlide = function HeroSlide(_a) {
|
|
|
124808
124739
|
id: 'Generic.exitVideoPlayer'
|
|
124809
124740
|
})
|
|
124810
124741
|
}, void 0)
|
|
124811
|
-
}), void 0), jsxs(Content, {
|
|
124742
|
+
}), void 0), jsxs(Content, __assign$g({
|
|
124743
|
+
applyBackgroundColor: !hasBanner
|
|
124744
|
+
}, {
|
|
124812
124745
|
children: [hasBanner && jsx$1(BannerWrapper, {
|
|
124813
124746
|
children: jsx$1(Banner, {
|
|
124814
124747
|
itemId: item.id,
|
|
@@ -124847,7 +124780,14 @@ var HeroSlide = function HeroSlide(_a) {
|
|
|
124847
124780
|
return jsx$1(Tooltip, __assign$g({
|
|
124848
124781
|
text: icon.tooltipText
|
|
124849
124782
|
}, {
|
|
124850
|
-
children: jsx$1(
|
|
124783
|
+
children: icon.onClick ? jsx$1(StyledIconButton, {
|
|
124784
|
+
iconProps: {
|
|
124785
|
+
iconName: icon.name
|
|
124786
|
+
},
|
|
124787
|
+
color: icon.color,
|
|
124788
|
+
backgroundColor: icon.backgroundColor,
|
|
124789
|
+
onClick: icon.onClick
|
|
124790
|
+
}, void 0) : jsx$1(StyledIcon, {
|
|
124851
124791
|
iconName: icon.name,
|
|
124852
124792
|
color: icon.color,
|
|
124853
124793
|
backgroundColor: icon.backgroundColor
|
|
@@ -124882,7 +124822,7 @@ var HeroSlide = function HeroSlide(_a) {
|
|
|
124882
124822
|
}, void 0)]
|
|
124883
124823
|
}, void 0)]
|
|
124884
124824
|
}, void 0)]
|
|
124885
|
-
}, void 0)]
|
|
124825
|
+
}), void 0)]
|
|
124886
124826
|
}), void 0);
|
|
124887
124827
|
|
|
124888
124828
|
function handleToggleVideo(showPlayer) {
|
|
@@ -124892,128 +124832,361 @@ var HeroSlide = function HeroSlide(_a) {
|
|
|
124892
124832
|
};
|
|
124893
124833
|
|
|
124894
124834
|
var Host$7 = _styled.div.withConfig({
|
|
124895
|
-
displayName: "
|
|
124896
|
-
componentId: "sc-
|
|
124897
|
-
})(
|
|
124898
|
-
return p.width ? css$2(
|
|
124835
|
+
displayName: "HeroSlide__Host",
|
|
124836
|
+
componentId: "sc-3yofth-0"
|
|
124837
|
+
})(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject$l(["\n position: relative;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"], ["\n position: relative;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (p) {
|
|
124838
|
+
return p.width ? css$2(templateObject_1$k || (templateObject_1$k = __makeTemplateObject$l(["\n width: ", ";\n "], ["\n width: ", ";\n "])), p.width) : css$2(templateObject_2$b || (templateObject_2$b = __makeTemplateObject$l(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
|
|
124899
124839
|
}, function (p) {
|
|
124900
|
-
return p.height ? css$2(
|
|
124840
|
+
return p.height ? css$2(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject$l(["\n height: ", ";\n "], ["\n height: ", ";\n "])), p.height) : css$2(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject$l(["\n height: 100%;\n "], ["\n height: 100%;\n "])));
|
|
124901
124841
|
}, function (p) {
|
|
124902
|
-
return p.showBorder && css$2(
|
|
124842
|
+
return p.showBorder && css$2(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject$l(["\n border: 1px solid ", ";\n box-sizing: border-box;\n "], ["\n border: 1px solid ", ";\n box-sizing: border-box;\n "])), p.theme.palette.neutralTertiaryAlt);
|
|
124903
124843
|
}, function (p) {
|
|
124904
|
-
return p.applyOverlay && css$2(
|
|
124844
|
+
return p.applyOverlay && css$2(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject$l(["\n background-color: rgba(0, 0, 0, 0.33);\n\n .bannerImage {\n z-index: -1;\n }\n "], ["\n background-color: rgba(0, 0, 0, 0.33);\n\n .bannerImage {\n z-index: -1;\n }\n "])));
|
|
124905
124845
|
});
|
|
124906
124846
|
|
|
124907
124847
|
var Content = _styled.div.withConfig({
|
|
124908
|
-
displayName: "
|
|
124909
|
-
componentId: "sc-
|
|
124910
|
-
})(
|
|
124848
|
+
displayName: "HeroSlide__Content",
|
|
124849
|
+
componentId: "sc-3yofth-1"
|
|
124850
|
+
})(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject$l(["\n position: relative;\n height: 100%;\n width: 100%;\n ", ";\n"], ["\n position: relative;\n height: 100%;\n width: 100%;\n ", ";\n"])), function (p) {
|
|
124851
|
+
return p.applyBackgroundColor && "background-color: " + p.theme.palette.white;
|
|
124852
|
+
});
|
|
124911
124853
|
|
|
124912
124854
|
var Inner$1 = _styled.div.withConfig({
|
|
124913
|
-
displayName: "
|
|
124914
|
-
componentId: "sc-
|
|
124915
|
-
})(
|
|
124855
|
+
displayName: "HeroSlide__Inner",
|
|
124856
|
+
componentId: "sc-3yofth-2"
|
|
124857
|
+
})(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject$l(["\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: column;\n box-sizing: border-box;\n padding: ", "px ", "px 80px ", "px;\n"], ["\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: column;\n box-sizing: border-box;\n padding: ", "px ", "px 80px ", "px;\n"])), spacingL, spacingL, spacingL);
|
|
124916
124858
|
|
|
124917
124859
|
var CloseButtonHost = _styled(Tooltip).withConfig({
|
|
124918
|
-
displayName: "
|
|
124919
|
-
componentId: "sc-
|
|
124920
|
-
})(
|
|
124860
|
+
displayName: "HeroSlide__CloseButtonHost",
|
|
124861
|
+
componentId: "sc-3yofth-3"
|
|
124862
|
+
})(templateObject_10 || (templateObject_10 = __makeTemplateObject$l(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n z-index: 2;\n"], ["\n position: absolute;\n top: ", "px;\n right: ", "px;\n z-index: 2;\n"])), spacingS, spacingS);
|
|
124921
124863
|
|
|
124922
124864
|
var CloseButtonSize = 20;
|
|
124923
124865
|
|
|
124924
124866
|
var CloseButton = _styled(IconButton$1).withConfig({
|
|
124925
|
-
displayName: "
|
|
124926
|
-
componentId: "sc-
|
|
124927
|
-
})(
|
|
124867
|
+
displayName: "HeroSlide__CloseButton",
|
|
124868
|
+
componentId: "sc-3yofth-4"
|
|
124869
|
+
})(templateObject_11 || (templateObject_11 = __makeTemplateObject$l(["\n && {\n height: ", "px;\n width: ", "px;\n color: ", ";\n padding: 0;\n\n &:hover {\n color: ", ";\n }\n\n i {\n font-size: ", "px;\n }\n }\n"], ["\n && {\n height: ", "px;\n width: ", "px;\n color: ", ";\n padding: 0;\n\n &:hover {\n color: ", ";\n }\n\n i {\n font-size: ", "px;\n }\n }\n"])), CloseButtonSize, CloseButtonSize, function (p) {
|
|
124928
124870
|
return p.theme.palette.white;
|
|
124929
124871
|
}, function (p) {
|
|
124930
124872
|
return p.theme.palette.white;
|
|
124931
124873
|
}, fontSizeMedium);
|
|
124932
124874
|
|
|
124933
124875
|
var BannerWrapper = _styled.div.withConfig({
|
|
124934
|
-
displayName: "
|
|
124935
|
-
componentId: "sc-
|
|
124936
|
-
})(
|
|
124876
|
+
displayName: "HeroSlide__BannerWrapper",
|
|
124877
|
+
componentId: "sc-3yofth-5"
|
|
124878
|
+
})(templateObject_12 || (templateObject_12 = __makeTemplateObject$l(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n & button:focus {\n &:after {\n outline-offset: -4px !important;\n }\n }\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n & button:focus {\n &:after {\n outline-offset: -4px !important;\n }\n }\n"])));
|
|
124937
124879
|
|
|
124938
124880
|
var Banner = _styled(PublishableItemBanner).withConfig({
|
|
124939
|
-
displayName: "
|
|
124940
|
-
componentId: "sc-
|
|
124941
|
-
})(
|
|
124881
|
+
displayName: "HeroSlide__Banner",
|
|
124882
|
+
componentId: "sc-3yofth-6"
|
|
124883
|
+
})(templateObject_13 || (templateObject_13 = __makeTemplateObject$l(["\n width: 100%;\n\n &&.video-view-container {\n background-color: ", "; // in case video control does not fill the entire space\n }\n\n &&.video-view-container > iframe {\n top: ", "px; // safety space\n left: ", "px;\n height: calc(100% - ", "px);\n width: calc(100% - ", "px);\n }\n"], ["\n width: 100%;\n\n &&.video-view-container {\n background-color: ", "; // in case video control does not fill the entire space\n }\n\n &&.video-view-container > iframe {\n top: ", "px; // safety space\n left: ", "px;\n height: calc(100% - ", "px);\n width: calc(100% - ", "px);\n }\n"])), function (p) {
|
|
124942
124884
|
return p.theme.palette.black;
|
|
124943
124885
|
}, spacingS, CloseButtonSize, spacingS * 2, CloseButtonSize * 2);
|
|
124944
124886
|
|
|
124945
124887
|
var Header = _styled.div.withConfig({
|
|
124946
|
-
displayName: "
|
|
124947
|
-
componentId: "sc-
|
|
124948
|
-
})(
|
|
124888
|
+
displayName: "HeroSlide__Header",
|
|
124889
|
+
componentId: "sc-3yofth-7"
|
|
124890
|
+
})(templateObject_14 || (templateObject_14 = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n z-index: 1;\n"], ["\n display: flex;\n align-items: center;\n z-index: 1;\n"])));
|
|
124949
124891
|
|
|
124950
124892
|
var TitleWrapper = _styled.div.withConfig({
|
|
124951
|
-
displayName: "
|
|
124952
|
-
componentId: "sc-
|
|
124953
|
-
})(
|
|
124893
|
+
displayName: "HeroSlide__TitleWrapper",
|
|
124894
|
+
componentId: "sc-3yofth-8"
|
|
124895
|
+
})(templateObject_15 || (templateObject_15 = __makeTemplateObject$l(["\n max-width: calc(100% - 110px);\n"], ["\n max-width: calc(100% - 110px);\n"])));
|
|
124954
124896
|
|
|
124955
124897
|
var Icons = _styled.div.withConfig({
|
|
124956
|
-
displayName: "
|
|
124957
|
-
componentId: "sc-
|
|
124958
|
-
})(
|
|
124898
|
+
displayName: "HeroSlide__Icons",
|
|
124899
|
+
componentId: "sc-3yofth-9"
|
|
124900
|
+
})(templateObject_16 || (templateObject_16 = __makeTemplateObject$l(["\n display: flex;\n align-self: flex-start;\n margin-left: auto;\n z-index: 1;\n"], ["\n display: flex;\n align-self: flex-start;\n margin-left: auto;\n z-index: 1;\n"])));
|
|
124901
|
+
|
|
124902
|
+
var IconStyle = css$2(templateObject_17 || (templateObject_17 = __makeTemplateObject$l(["\n font-size: ", "px;\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ", "px;\n"], ["\n font-size: ", "px;\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ", "px;\n"])), fontSizeLarge, spacingXs);
|
|
124959
124903
|
|
|
124960
|
-
var
|
|
124904
|
+
var ColorStyle = function ColorStyle(backgroundColor, color) {
|
|
124905
|
+
return css$2(templateObject_21 || (templateObject_21 = __makeTemplateObject$l(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), function () {
|
|
124906
|
+
return backgroundColor && css$2(templateObject_18 || (templateObject_18 = __makeTemplateObject$l(["\n background-color: ", ";\n "], ["\n background-color: ", ";\n "])), backgroundColor);
|
|
124907
|
+
}, function (p) {
|
|
124908
|
+
return color ? css$2(templateObject_19 || (templateObject_19 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color) : css$2(templateObject_20 || (templateObject_20 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.default);
|
|
124909
|
+
});
|
|
124910
|
+
};
|
|
124961
124911
|
|
|
124962
124912
|
var StyledIcon = _styled(Icon).withConfig({
|
|
124963
|
-
displayName: "
|
|
124964
|
-
componentId: "sc-
|
|
124965
|
-
})(templateObject_22 || (templateObject_22 = __makeTemplateObject$l(["\n ", "\n ", "\n
|
|
124966
|
-
return p.backgroundColor
|
|
124913
|
+
displayName: "HeroSlide__StyledIcon",
|
|
124914
|
+
componentId: "sc-3yofth-10"
|
|
124915
|
+
})(templateObject_22 || (templateObject_22 = __makeTemplateObject$l(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), IconStyle, function (p) {
|
|
124916
|
+
return ColorStyle(p.backgroundColor, p.color);
|
|
124917
|
+
});
|
|
124918
|
+
|
|
124919
|
+
var StyledIconButton = _styled(IconButton$1).withConfig({
|
|
124920
|
+
displayName: "HeroSlide__StyledIconButton",
|
|
124921
|
+
componentId: "sc-3yofth-11"
|
|
124922
|
+
})(templateObject_23 || (templateObject_23 = __makeTemplateObject$l(["\n i {\n ", "\n }\n\n ", "\n & :hover {\n ", "\n }\n"], ["\n i {\n ", "\n }\n\n ", "\n & :hover {\n ", "\n }\n"])), IconStyle, function (p) {
|
|
124923
|
+
return ColorStyle(p.backgroundColor, p.color);
|
|
124967
124924
|
}, function (p) {
|
|
124968
|
-
return p.
|
|
124925
|
+
return ColorStyle(p.backgroundColor, p.color);
|
|
124969
124926
|
});
|
|
124970
124927
|
|
|
124971
124928
|
var Headline = _styled.div.withConfig({
|
|
124972
|
-
displayName: "
|
|
124973
|
-
componentId: "sc-
|
|
124974
|
-
})(
|
|
124929
|
+
displayName: "HeroSlide__Headline",
|
|
124930
|
+
componentId: "sc-3yofth-12"
|
|
124931
|
+
})(templateObject_24 || (templateObject_24 = __makeTemplateObject$l(["\n font-size: ", "px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n"], ["\n font-size: ", "px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n"])), fontSizeMedium, function (p) {
|
|
124975
124932
|
return p.color || p.theme.textColors.default;
|
|
124976
124933
|
});
|
|
124977
124934
|
|
|
124978
124935
|
var Title$1 = _styled.h3.withConfig({
|
|
124979
|
-
displayName: "
|
|
124980
|
-
componentId: "sc-
|
|
124981
|
-
})(
|
|
124936
|
+
displayName: "HeroSlide__Title",
|
|
124937
|
+
componentId: "sc-3yofth-13"
|
|
124938
|
+
})(templateObject_26 || (templateObject_26 = __makeTemplateObject$l(["\n padding: 0;\n margin: 0 auto 0 0;\n font-weight: normal;\n color: ", ";\n\n a {\n ", "\n\n &,\n :link,\n :visited {\n color: inherit;\n text-decoration: none;\n }\n }\n\n ", "\n"], ["\n padding: 0;\n margin: 0 auto 0 0;\n font-weight: normal;\n color: ", ";\n\n a {\n ", "\n\n &,\n :link,\n :visited {\n color: inherit;\n text-decoration: none;\n }\n }\n\n ", "\n"])), function (p) {
|
|
124982
124939
|
return p.color || p.theme.textColors.default;
|
|
124983
124940
|
}, LineClamp(2, fontSizeLarge, 1.2), function (p) {
|
|
124984
|
-
return p.applyClickableOverlay && css$2(
|
|
124941
|
+
return p.applyClickableOverlay && css$2(templateObject_25 || (templateObject_25 = __makeTemplateObject$l(["\n a::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n }\n "], ["\n a::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n }\n "])));
|
|
124985
124942
|
});
|
|
124986
124943
|
|
|
124987
124944
|
var MetadataHost = _styled.div.withConfig({
|
|
124988
|
-
displayName: "
|
|
124989
|
-
componentId: "sc-
|
|
124990
|
-
})(
|
|
124945
|
+
displayName: "HeroSlide__MetadataHost",
|
|
124946
|
+
componentId: "sc-3yofth-14"
|
|
124947
|
+
})(templateObject_27 || (templateObject_27 = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n margin-top: auto;\n z-index: 1;\n"], ["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n margin-top: auto;\n z-index: 1;\n"])));
|
|
124991
124948
|
|
|
124992
124949
|
var Metadata = _styled.div.withConfig({
|
|
124993
|
-
displayName: "
|
|
124994
|
-
componentId: "sc-
|
|
124995
|
-
})(
|
|
124950
|
+
displayName: "HeroSlide__Metadata",
|
|
124951
|
+
componentId: "sc-3yofth-15"
|
|
124952
|
+
})(templateObject_28 || (templateObject_28 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n"], ["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n"])), spacingS);
|
|
124996
124953
|
|
|
124997
124954
|
var AdditionalMetadata = _styled.div.withConfig({
|
|
124998
|
-
displayName: "
|
|
124999
|
-
componentId: "sc-
|
|
125000
|
-
})(
|
|
124955
|
+
displayName: "HeroSlide__AdditionalMetadata",
|
|
124956
|
+
componentId: "sc-3yofth-16"
|
|
124957
|
+
})(templateObject_29 || (templateObject_29 = __makeTemplateObject$l(["\n flex: 1;\n padding: ", "px 0;\n max-width: 100%;\n font-size: ", "px;\n"], ["\n flex: 1;\n padding: ", "px 0;\n max-width: 100%;\n font-size: ", "px;\n"])), spacingXs, fontSizeSmall);
|
|
125001
124958
|
|
|
125002
124959
|
var AuthorName = _styled(PersonaCard).withConfig({
|
|
125003
|
-
displayName: "
|
|
125004
|
-
componentId: "sc-
|
|
125005
|
-
})(
|
|
125006
|
-
return p.color ? css$2(
|
|
124960
|
+
displayName: "HeroSlide__AuthorName",
|
|
124961
|
+
componentId: "sc-3yofth-17"
|
|
124962
|
+
})(templateObject_32 || (templateObject_32 = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
124963
|
+
return p.color ? css$2(templateObject_30 || (templateObject_30 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.color) : css$2(templateObject_31 || (templateObject_31 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.default);
|
|
125007
124964
|
});
|
|
125008
124965
|
|
|
125009
124966
|
var StyledDateTime = _styled(DateTime).withConfig({
|
|
125010
|
-
displayName: "
|
|
125011
|
-
componentId: "sc-
|
|
125012
|
-
})(
|
|
125013
|
-
return p.color ? css$2(
|
|
124967
|
+
displayName: "HeroSlide__StyledDateTime",
|
|
124968
|
+
componentId: "sc-3yofth-18"
|
|
124969
|
+
})(templateObject_35 || (templateObject_35 = __makeTemplateObject$l(["\n font-size: ", "px;\n margin-top: ", "px;\n ", "\n"], ["\n font-size: ", "px;\n margin-top: ", "px;\n ", "\n"])), fontSizeSmaller, spacingXs, function (p) {
|
|
124970
|
+
return p.color ? css$2(templateObject_33 || (templateObject_33 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.color) : css$2(templateObject_34 || (templateObject_34 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.default);
|
|
125014
124971
|
});
|
|
125015
124972
|
|
|
125016
|
-
var templateObject_1$
|
|
124973
|
+
var templateObject_1$k, templateObject_2$b, templateObject_3$7, templateObject_4$7, templateObject_5$5, templateObject_6$5, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35;
|
|
124974
|
+
|
|
124975
|
+
var HeroPaging = function HeroPaging(_a) {
|
|
124976
|
+
var items = _a.items,
|
|
124977
|
+
goToSlide = _a.goToSlide,
|
|
124978
|
+
currentSlide = _a.currentSlide,
|
|
124979
|
+
frameWidth = _a.frameWidth,
|
|
124980
|
+
autoplay = _a.autoplay,
|
|
124981
|
+
className = _a.className;
|
|
124982
|
+
var user = useCurrentUserContext().user;
|
|
124983
|
+
var formatMessage = useIntl().formatMessage;
|
|
124984
|
+
var palette = useContext(ThemeContext$1).theme.palette;
|
|
124985
|
+
var containerWidth = frameWidth - 60; // margins are extracted
|
|
124986
|
+
|
|
124987
|
+
var maxVisibleItems = Math.floor(containerWidth / 150); // 150 - min-width + gap
|
|
124988
|
+
|
|
124989
|
+
var hasOverflow = items.length > maxVisibleItems;
|
|
124990
|
+
var visibleItemsCount = hasOverflow ? maxVisibleItems : items.length;
|
|
124991
|
+
var showArrows = hasOverflow;
|
|
124992
|
+
|
|
124993
|
+
var _b = useState$2(0),
|
|
124994
|
+
startIndex = _b[0],
|
|
124995
|
+
setStartIndex = _b[1]; // reset the active slide - ensure the first slide is active when resizing
|
|
124996
|
+
|
|
124997
|
+
|
|
124998
|
+
useEffect$1(function () {
|
|
124999
|
+
return showItemsStartingAtIndex(0);
|
|
125000
|
+
}, [frameWidth]);
|
|
125001
|
+
useEffect$1(function () {
|
|
125002
|
+
if (!autoplay || !showArrows) {
|
|
125003
|
+
return;
|
|
125004
|
+
} // update the visible paging buttons when currentSlide's paging button is outside the visible area
|
|
125005
|
+
|
|
125006
|
+
|
|
125007
|
+
if (currentSlide === startIndex + visibleItemsCount) {
|
|
125008
|
+
showItemsStartingAtIndex(startIndex + visibleItemsCount);
|
|
125009
|
+
}
|
|
125010
|
+
}, [currentSlide, autoplay]);
|
|
125011
|
+
var pagingColor = items[currentSlide].item.bannerInfo ? palette.white : palette.black;
|
|
125012
|
+
var currentSlideId = items[currentSlide].item.id;
|
|
125013
|
+
return jsxs(PagingHost, __assign$g({
|
|
125014
|
+
className: className
|
|
125015
|
+
}, {
|
|
125016
|
+
children: [showArrows && jsx$1(PagingArrow, {
|
|
125017
|
+
iconProps: {
|
|
125018
|
+
iconName: 'ChevronLeft',
|
|
125019
|
+
style: {
|
|
125020
|
+
fontSize: 22
|
|
125021
|
+
}
|
|
125022
|
+
},
|
|
125023
|
+
onClick: function () {
|
|
125024
|
+
return showItemsStartingAtIndex(startIndex - visibleItemsCount);
|
|
125025
|
+
},
|
|
125026
|
+
color: pagingColor,
|
|
125027
|
+
"data-paging-back": true
|
|
125028
|
+
}, void 0), jsx$1(Paging, {
|
|
125029
|
+
children: getItems().map(function (item) {
|
|
125030
|
+
var isActive = currentSlideId === item.id;
|
|
125031
|
+
return jsx$1(PagingItem, __assign$g({
|
|
125032
|
+
className: classNames({
|
|
125033
|
+
'paging-item--active': isActive,
|
|
125034
|
+
'paging-item--visible': true
|
|
125035
|
+
}),
|
|
125036
|
+
visibleItemsLength: showArrows ? visibleItemsCount : null
|
|
125037
|
+
}, {
|
|
125038
|
+
children: jsx$1(PagingButton, __assign$g({
|
|
125039
|
+
onClick: function () {
|
|
125040
|
+
return goToSlide(item.allItemsIndex);
|
|
125041
|
+
},
|
|
125042
|
+
color: pagingColor
|
|
125043
|
+
}, {
|
|
125044
|
+
children: item.title
|
|
125045
|
+
}), void 0)
|
|
125046
|
+
}), item.id);
|
|
125047
|
+
})
|
|
125048
|
+
}, void 0), showArrows && jsx$1(PagingArrow, {
|
|
125049
|
+
iconProps: {
|
|
125050
|
+
iconName: 'ChevronRight',
|
|
125051
|
+
style: {
|
|
125052
|
+
fontSize: 22
|
|
125053
|
+
}
|
|
125054
|
+
},
|
|
125055
|
+
onClick: function () {
|
|
125056
|
+
return showItemsStartingAtIndex(startIndex + visibleItemsCount);
|
|
125057
|
+
},
|
|
125058
|
+
color: pagingColor,
|
|
125059
|
+
"data-paging-next": true
|
|
125060
|
+
}, void 0)]
|
|
125061
|
+
}), void 0);
|
|
125062
|
+
|
|
125063
|
+
function showItemsStartingAtIndex(newFirstVisibleItemIndex) {
|
|
125064
|
+
setStartIndex(newFirstVisibleItemIndex);
|
|
125065
|
+
goToSlide(getWrappedIndex(newFirstVisibleItemIndex, items.length));
|
|
125066
|
+
}
|
|
125067
|
+
|
|
125068
|
+
function getItems() {
|
|
125069
|
+
var displayedItems = [];
|
|
125070
|
+
|
|
125071
|
+
for (var count = 0; count < visibleItemsCount; count++) {
|
|
125072
|
+
var itemsIndex = getWrappedIndex(startIndex + count, items.length);
|
|
125073
|
+
var heroItem = items[itemsIndex];
|
|
125074
|
+
displayedItems.push({
|
|
125075
|
+
title: getTitle(heroItem.item, user, formatMessage),
|
|
125076
|
+
id: heroItem.item.id,
|
|
125077
|
+
allItemsIndex: itemsIndex
|
|
125078
|
+
});
|
|
125079
|
+
}
|
|
125080
|
+
|
|
125081
|
+
return displayedItems;
|
|
125082
|
+
}
|
|
125083
|
+
};
|
|
125084
|
+
|
|
125085
|
+
function getWrappedIndex(index, max) {
|
|
125086
|
+
// returns a number which is always between 0 and `max`, mimicking a circular array
|
|
125087
|
+
// the two-part modulo accounts for negative numbers as well as positive.
|
|
125088
|
+
return (index % max + max) % max;
|
|
125089
|
+
}
|
|
125090
|
+
|
|
125091
|
+
var PagingHost = _styled.div.withConfig({
|
|
125092
|
+
displayName: "HeroPaging__PagingHost",
|
|
125093
|
+
componentId: "sc-1y3j8qb-0"
|
|
125094
|
+
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject$l(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
125095
|
+
|
|
125096
|
+
var Paging = _styled.ul.withConfig({
|
|
125097
|
+
displayName: "HeroPaging__Paging",
|
|
125098
|
+
componentId: "sc-1y3j8qb-1"
|
|
125099
|
+
})(templateObject_2$a || (templateObject_2$a = __makeTemplateObject$l(["\n display: flex;\n width: 100%;\n list-style: none;\n margin: 0 0 ", "px 0;\n padding: 0;\n"], ["\n display: flex;\n width: 100%;\n list-style: none;\n margin: 0 0 ", "px 0;\n padding: 0;\n"])), spacingM);
|
|
125100
|
+
|
|
125101
|
+
var PagingItem = _styled.li.withConfig({
|
|
125102
|
+
displayName: "HeroPaging__PagingItem",
|
|
125103
|
+
componentId: "sc-1y3j8qb-2"
|
|
125104
|
+
})(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject$l(["\n display: none;\n flex: 1;\n min-width: 140px;\n margin: 0 5px;\n\n ", "\n\n &:not(.paging-item--active) {\n opacity: 0.6;\n }\n\n &.paging-item--visible {\n display: block;\n }\n"], ["\n display: none;\n flex: 1;\n min-width: 140px;\n margin: 0 5px;\n\n ", "\n\n &:not(.paging-item--active) {\n opacity: 0.6;\n }\n\n &.paging-item--visible {\n display: block;\n }\n"])), function (p) {
|
|
125105
|
+
return p.visibleItemsLength && css$2(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject$l(["\n max-width: calc(100% / ", " - 10px);\n "], ["\n max-width: calc(100% / ", " - 10px);\n "])), p.visibleItemsLength);
|
|
125106
|
+
});
|
|
125107
|
+
|
|
125108
|
+
var PagingButton = _styled(ActionButton).withConfig({
|
|
125109
|
+
displayName: "HeroPaging__PagingButton",
|
|
125110
|
+
componentId: "sc-1y3j8qb-3"
|
|
125111
|
+
})(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject$l(["\n && {\n width: 100%;\n height: auto;\n text-align: left;\n padding: ", "px 0 2px 0;\n margin: 0;\n\n &:before {\n content: '';\n position: absolute;\n bottom: 100%;\n left: 0;\n right: 0;\n border-top: 3px solid ", ";\n }\n }\n\n .ms-Button-label {\n padding: 0;\n\n ", "\n }\n"], ["\n && {\n width: 100%;\n height: auto;\n text-align: left;\n padding: ", "px 0 2px 0;\n margin: 0;\n\n &:before {\n content: '';\n position: absolute;\n bottom: 100%;\n left: 0;\n right: 0;\n border-top: 3px solid ", ";\n }\n }\n\n .ms-Button-label {\n padding: 0;\n\n ", "\n }\n"])), spacingS, function (p) {
|
|
125112
|
+
return p.color;
|
|
125113
|
+
}, LineClamp(2, fontSizeSmall, 1.2));
|
|
125114
|
+
|
|
125115
|
+
var PagingArrow = _styled(IconButton).withConfig({
|
|
125116
|
+
displayName: "HeroPaging__PagingArrow",
|
|
125117
|
+
componentId: "sc-1y3j8qb-4"
|
|
125118
|
+
})(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject$l(["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"], ["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"])));
|
|
125119
|
+
|
|
125120
|
+
var templateObject_1$j, templateObject_2$a, templateObject_3$6, templateObject_4$6, templateObject_5$4, templateObject_6$4;
|
|
125121
|
+
|
|
125122
|
+
var Hero = function Hero(_a) {
|
|
125123
|
+
var items = _a.items,
|
|
125124
|
+
itemResourceType = _a.itemResourceType,
|
|
125125
|
+
baseRoute = _a.baseRoute,
|
|
125126
|
+
disableAutoplay = _a.disableAutoplay,
|
|
125127
|
+
autoplayInterval = _a.autoplayInterval,
|
|
125128
|
+
_b = _a.width,
|
|
125129
|
+
width = _b === void 0 ? '100%' : _b,
|
|
125130
|
+
_c = _a.height,
|
|
125131
|
+
height = _c === void 0 ? '100%' : _c;
|
|
125132
|
+
|
|
125133
|
+
var _d = useState$2(false),
|
|
125134
|
+
forceDisableAutoplay = _d[0],
|
|
125135
|
+
setForceDisableAutoplay = _d[1];
|
|
125136
|
+
|
|
125137
|
+
if (!items || items.length === 0) {
|
|
125138
|
+
return null;
|
|
125139
|
+
}
|
|
125140
|
+
|
|
125141
|
+
var hasMoreItems = items.length > 1;
|
|
125142
|
+
var autoplay = !disableAutoplay && !forceDisableAutoplay;
|
|
125143
|
+
return jsx$1(StyledCarousel, __assign$g({
|
|
125144
|
+
autoplay: autoplay,
|
|
125145
|
+
autoplayInterval: autoplayInterval !== null && autoplayInterval !== void 0 ? autoplayInterval : 5000,
|
|
125146
|
+
wrapAround: true,
|
|
125147
|
+
pauseOnHover: true,
|
|
125148
|
+
renderBottomCenterControls: function (props) {
|
|
125149
|
+
return hasMoreItems ? jsx$1(HeroPaging, __assign$g({
|
|
125150
|
+
items: items,
|
|
125151
|
+
autoplay: autoplay,
|
|
125152
|
+
className: classNames({
|
|
125153
|
+
'hero-paging--hidden': forceDisableAutoplay
|
|
125154
|
+
/* ensure paging is hidden when video player is active */
|
|
125155
|
+
|
|
125156
|
+
})
|
|
125157
|
+
}, props), void 0) : null;
|
|
125158
|
+
},
|
|
125159
|
+
renderCenterLeftControls: null,
|
|
125160
|
+
renderCenterRightControls: null,
|
|
125161
|
+
swiping: hasMoreItems,
|
|
125162
|
+
transitionMode: "fade",
|
|
125163
|
+
width: typeof width === 'number' ? width + "px" : width,
|
|
125164
|
+
height: typeof height === 'number' ? height + "px" : height
|
|
125165
|
+
}, {
|
|
125166
|
+
children: items.map(function (i) {
|
|
125167
|
+
return jsx$1(HeroSlide, {
|
|
125168
|
+
item: i.item,
|
|
125169
|
+
icons: i.icons,
|
|
125170
|
+
itemResourceType: itemResourceType,
|
|
125171
|
+
baseRoute: baseRoute,
|
|
125172
|
+
additionalMetadata: i.additionalMetadata,
|
|
125173
|
+
onClick: i.onClick,
|
|
125174
|
+
onToggleVideo: function (isPlayerActive) {
|
|
125175
|
+
return setForceDisableAutoplay(isPlayerActive);
|
|
125176
|
+
},
|
|
125177
|
+
width: width,
|
|
125178
|
+
height: height
|
|
125179
|
+
}, i.item.id);
|
|
125180
|
+
})
|
|
125181
|
+
}), void 0);
|
|
125182
|
+
};
|
|
125183
|
+
|
|
125184
|
+
var StyledCarousel = _styled(Carousel).withConfig({
|
|
125185
|
+
displayName: "Hero__StyledCarousel",
|
|
125186
|
+
componentId: "sc-55ys37-0"
|
|
125187
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject$l(["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging--hidden {\n display: none;\n }\n"], ["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging--hidden {\n display: none;\n }\n"])), spacingL, spacingL);
|
|
125188
|
+
|
|
125189
|
+
var templateObject_1$i;
|
|
125017
125190
|
|
|
125018
125191
|
var NewsHero = function NewsHero(_a) {
|
|
125019
125192
|
var filter = _a.filter,
|
|
@@ -125135,7 +125308,10 @@ var NewsHero = function NewsHero(_a) {
|
|
|
125135
125308
|
id: 'ExternalLinkButton.news.navigateTo'
|
|
125136
125309
|
}, {
|
|
125137
125310
|
url: externalContentUrl
|
|
125138
|
-
})
|
|
125311
|
+
}),
|
|
125312
|
+
onClick: function (e) {
|
|
125313
|
+
return handleItemClick(e, item, true, onItemClick, true);
|
|
125314
|
+
}
|
|
125139
125315
|
}]);
|
|
125140
125316
|
}
|
|
125141
125317
|
}
|