@mikezimm/fps-library-v2
Version:
Library of reusable typescript/javascript functions, interfaces and constants
106 lines • 7.19 kB
JavaScript
import * as React from 'react';
import { Stack } from '@fluentui/react/lib/Stack';
import { gitFpsCoreV7, gitFpsLibraryV2, gitFpsPnp2, gitFpsStyles } from '../../../components/atoms/Links/RepoLinks/LinksCommon';
import { createLink } from '../../../components/atoms/Links/CreateLinks';
export default class WebPartLinks extends React.Component {
/***
* .o88b. .d88b. d8b db .d8888. d888888b d8888b. db db .o88b. d888888b .d88b. d8888b.
* d8P Y8 .8P Y8. 888o 88 88' YP `~~88~~' 88 `8D 88 88 d8P Y8 `~~88~~' .8P Y8. 88 `8D
* 8P 88 88 88V8o 88 `8bo. 88 88oobY' 88 88 8P 88 88 88 88oobY'
* 8b 88 88 88 V8o88 `Y8b. 88 88`8b 88 88 8b 88 88 88 88`8b
* Y8b d8 `8b d8' 88 V888 db 8D 88 88 `88. 88b d88 Y8b d8 88 `8b d8' 88 `88.
* `Y88P' `Y88P' VP V8P `8888Y' YP 88 YD ~Y8888P' `Y88P' YP `Y88P' 88 YD
*
*
*/
constructor(props) {
super(props);
this.parentListURL = this.props.parentListURL;
this.parentListName = this.props.parentListName;
this.childListURL = this.props.childListURL;
this.childListName = this.props.childListName;
this.state = {
selectedChoice: 'About',
lastChoice: '',
};
}
// public componentDidMount() { }
/***
* d8888b. d888888b d8888b. db db d8888b. d8888b. .d8b. d888888b d88888b
* 88 `8D `88' 88 `8D 88 88 88 `8D 88 `8D d8' `8b `~~88~~' 88'
* 88 88 88 88 88 88 88 88oodD' 88 88 88ooo88 88 88ooooo
* 88 88 88 88 88 88 88 88~~~ 88 88 88~~~88 88 88~~~~~
* 88 .8D .88. 88 .8D 88b d88 88 88 .8D 88 88 88 88.
* Y8888D' Y888888P Y8888D' ~Y8888P' 88 Y8888D' YP YP YP Y88888P
*
*
*/
// public componentDidUpdate(prevProps : any){ }
/***
* d8888b. d88888b d8b db d8888b. d88888b d8888b.
* 88 `8D 88' 888o 88 88 `8D 88' 88 `8D
* 88oobY' 88ooooo 88V8o 88 88 88 88ooooo 88oobY'
* 88`8b 88~~~~~ 88 V8o88 88 88 88~~~~~ 88`8b
* 88 `88. 88. 88 V888 88 .8D 88. 88 `88.
* 88 YD Y88888P VP V8P Y8888D' Y88888P 88 YD
*
*
*/
render() {
/***
* d888888b db db d888888b .d8888. d8888b. .d8b. d888b d88888b
* `~~88~~' 88 88 `88' 88' YP 88 `8D d8' `8b 88' Y8b 88'
* 88 88ooo88 88 `8bo. 88oodD' 88ooo88 88 88ooooo
* 88 88~~~88 88 `Y8b. 88~~~ 88~~~88 88 ooo 88~~~~~
* 88 88 88 .88. db 8D 88 88 88 88. ~8~ 88.
* YP YP YP Y888888P `8888Y' 88 YP YP Y888P Y88888P
*
*
*/
const stackTokensBody = { childrenGap: 20 };
let thisPage = null;
let doParentList = this.parentListURL && this.parentListName && this.parentListURL.length > 0 && this.parentListName.length > 0 ? true : false;
let doChildList = this.childListURL && this.childListName && this.childListURL.length > 0 && this.childListName.length > 0 ? true : false;
let parentListURL = doParentList ? createLink(this.parentListURL, '_blank', this.parentListName) : null;
let childListURL = doChildList ? createLink(this.childListURL, '_blank', this.childListName) : null;
let showLists = doParentList === true || doChildList === true ? true : false;
let webpartInfo = this.props.showRepoLinks === true ? React.createElement("div", null,
this.props.repoObject ? React.createElement("div", { style: { paddingLeft: doChildList === true ? '30px' : '' } },
React.createElement("b", null, "Webpart info:")) : null,
this.props.repoObject ? this.props.repoObject.repo : null,
this.props.repoObject ? this.props.repoObject.issues : null,
this.props.repoObject ? this.props.repoObject.wiki : null)
: React.createElement("div", null);
thisPage = React.createElement("div", { style: { paddingTop: '30px' } },
React.createElement(Stack, { horizontal: true, wrap: true, horizontalAlign: "stretch", tokens: stackTokensBody, style: { gap: '1em' } },
(showLists === true ? React.createElement("div", null,
React.createElement("b", null, "Your Lists:")) : undefined),
(doParentList === true ? parentListURL : undefined),
(doChildList === true ? childListURL : undefined),
(showLists === true ? React.createElement("span", { style: { width: '30px' } }, " ") : undefined),
this.props.repoObject && this.props.showRepoLinks === true ? React.createElement("div", { style: { paddingLeft: doChildList === true ? '30px' : '' } },
React.createElement("b", null, "Webpart info:")) : undefined,
this.props.repoObject && this.props.showRepoLinks === true ? this.props.repoObject.repo : undefined,
this.props.repoObject && this.props.showRepoLinks === true ? this.props.repoObject.issues : undefined,
this.props.repoObject && this.props.showRepoLinks === true ? this.props.repoObject.wiki : undefined),
React.createElement(Stack, { horizontal: true, wrap: true, horizontalAlign: "stretch", tokens: stackTokensBody, style: { paddingTop: '10px', gap: '.75em' } },
this.props.repoObject && this.props.showRepoLinks === true ? React.createElement("div", { style: { paddingLeft: doChildList === true ? '30px' : '' }, title: 'Updates in these libraries also impact this webpart.' },
React.createElement("b", null, "Related Libs")) : undefined,
this.props.repoObject && this.props.showRepoLinks === true ? gitFpsCoreV7.issues : undefined,
this.props.repoObject && this.props.showRepoLinks === true ? gitFpsLibraryV2.issues : undefined,
this.props.repoObject && this.props.showRepoLinks === true ? gitFpsPnp2.issues : undefined,
this.props.repoObject && this.props.showRepoLinks === true ? gitFpsStyles.issues : undefined));
/***
* d8888b. d88888b d888888b db db d8888b. d8b db
* 88 `8D 88' `~~88~~' 88 88 88 `8D 888o 88
* 88oobY' 88ooooo 88 88 88 88oobY' 88V8o 88
* 88`8b 88~~~~~ 88 88 88 88`8b 88 V8o88
* 88 `88. 88. 88 88b d88 88 `88. 88 V888
* 88 YD Y88888P YP ~Y8888P' 88 YD VP V8P
*
*
*/
return (thisPage);
}
}
//# sourceMappingURL=WebPartLinks.js.map