sp-dev-fx-webparts/samples/react-officegraph/lib/webparts/trendingInThisSite/components/TrendingInThisSite.js.map

1 line
28 KiB
Plaintext

{"version":3,"sources":["webparts/trendingInThisSite/components/TrendingInThisSite.tsx"],"names":[],"mappings":";;;;;;AAAA,6BAA+B;AAC/B,iEAMgC;AAEhC,oFAAuD;AA6BvD;IAAgD,sCAAmE;IACjH,4BAAY,KAA+B,EAAE,KAA+B;QAA5E,YACE,kBAAM,KAAK,CAAC,SAOb;QALC,KAAI,CAAC,KAAK,GAAG;YACX,iBAAiB,EAAE,EAAyB;YAC5C,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,IAAI;SACZ,CAAC;;IACJ,CAAC;IAEM,8CAAiB,GAAxB;QACE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC7E,CAAC;IAEM,+CAAkB,GAAzB,UAA0B,SAAmC,EAAE,SAAmC,EAAE,WAAgB;QAClH,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,KAAK,SAAS,CAAC,iBAAiB;YAC9D,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO,IAAI,CAC1C,IAAI,CAAC,KAAK,CAAC,iBAAiB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CACnD,CAAC,CAAC,CAAC;YACJ,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;IAEM,mCAAM,GAAb;QACE,IAAM,OAAO,GAAgB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,6BAAK,KAAK,EAAE,EAAC,MAAM,EAAE,QAAQ,EAAC;YAAE,oBAAC,gCAAO,IAAC,KAAK,EAAE,YAAY,GAAI,CAAM,GAAG,gCAAM,CAAC;QAClI,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.js","sourcesContent":["import * as React from 'react';\nimport {\n DocumentCard,\n DocumentCardPreview,\n DocumentCardTitle,\n DocumentCardActivity,\n Spinner\n} from 'office-ui-fabric-react';\n\nimport styles from '../TrendingInThisSite.module.scss';\nimport { ITrendingInThisSiteWebPartProps } from '../ITrendingInThisSiteWebPartProps';\n\nexport interface ITrendingInThisSiteProps extends ITrendingInThisSiteWebPartProps {\n siteUrl: string;\n}\n\nexport interface ITrendingInThisSiteState {\n trendingDocuments: ITrendingDocument[];\n loading: boolean;\n error: string;\n}\n\nexport interface ITrendingDocument {\n id: string;\n title: string;\n url: string;\n previewImageUrl: string;\n lastModifiedByPhotoUrl: string;\n lastModifiedByName: string;\n lastModifiedTime: string;\n extension: string;\n}\n\ninterface ISearchResultValue {\n Key: string;\n Value: string;\n}\n\nexport default class TrendingInThisSite extends React.Component<ITrendingInThisSiteProps, ITrendingInThisSiteState> {\n constructor(props: ITrendingInThisSiteProps, state: ITrendingInThisSiteState) {\n super(props);\n\n this.state = {\n trendingDocuments: [] as ITrendingDocument[],\n loading: true,\n error: null\n };\n }\n\n public componentDidMount(): void {\n this.loadTrendingContent(this.props.siteUrl, this.props.numberOfDocuments);\n }\n\n public componentDidUpdate(prevProps: ITrendingInThisSiteProps, prevState: ITrendingInThisSiteState, prevContext: any): void {\n if (this.props.numberOfDocuments !== prevProps.numberOfDocuments ||\n this.props.siteUrl !== prevProps.siteUrl && (\n this.props.numberOfDocuments && this.props.siteUrl\n )) {\n this.loadTrendingContent(this.props.siteUrl, this.props.numberOfDocuments);\n }\n }\n\n public render(): JSX.Element {\n const loading: JSX.Element = this.state.loading ? <div style={{margin: '0 auto'}}><Spinner label={'Loading...'} /></div> : <div/>;\n const error: JSX.Element = this.state.error ? <div><strong>Error:</strong> {this.state.error}</div> : <div/>;\n const documents: JSX.Element[] = this.state.trendingDocuments.map((doc: ITrendingDocument, i: number) => {\n const iconUrl: string = `https://spoprod-a.akamaihd.net/files/odsp-next-prod_ship-2016-08-15_20160815.002/odsp-media/images/filetypes/32/${doc.extension}.png`;\n return (\n <DocumentCard onClickHref={doc.url} key={doc.id}>\n <DocumentCardPreview\n previewImages={[\n {\n previewImageSrc: doc.previewImageUrl,\n iconSrc: iconUrl,\n width: 318,\n height: 196,\n accentColor: '#ce4b1f'\n }\n ]}\n />\n <DocumentCardTitle title={doc.title}/>\n <DocumentCardActivity\n activity={'Modified ' + doc.lastModifiedTime}\n people={\n [\n { name: doc.lastModifiedByName, profileImageSrc: doc.lastModifiedByPhotoUrl }\n ]\n }\n />\n </DocumentCard>\n );\n });\n return (\n <div className={styles.trendingInThisSite}>\n {loading}\n {error}\n {documents}\n <div style={{clear: 'both'}}/>\n </div>\n );\n }\n\n private getValueFromResults(key: string, results: ISearchResultValue[]): string {\n let value: string = '';\n\n if (results != null && results.length > 0 && key != null) {\n for (let i: number = 0; i < results.length; i++) {\n const resultItem: ISearchResultValue = results[i];\n if (resultItem.Key === key) {\n value = resultItem.Value;\n break;\n }\n }\n }\n\n return value;\n }\n\n private trim(s: string): string {\n if (s != null && s.length > 0) {\n return s.replace(/^\\s+|\\s+$/gm, '');\n }\n else {\n return s;\n }\n }\n\n private getPreviewImageUrl(result: ISearchResultValue[], siteUrl: string): string {\n const uniqueID: string = this.getValueFromResults('uniqueID', result);\n const siteId: string = this.getValueFromResults('siteID', result);\n const webId: string = this.getValueFromResults('webID', result);\n const docId: string = this.getValueFromResults('DocId', result);\n if (uniqueID !== null && siteId !== null && webId !== null && docId !== null) {\n return `${siteUrl}/_layouts/15/getpreview.ashx?guidFile=${uniqueID}&guidSite=${siteId}&guidWeb=${webId}&docid=${docId}\n &metadatatoken=300x424x2&ClientType=CodenameOsloWeb&size=small`;\n }\n else {\n return '';\n }\n }\n\n private getUserPhotoUrl(userEmail: string, siteUrl: string): string {\n return `${siteUrl}/_layouts/15/userphoto.aspx?size=S&accountname=${userEmail}`;\n }\n\n private request<T>(url: string, method: string = 'GET', headers: any = null, data: any = null): Promise<T> {\n return new Promise<T>((resolve, reject): void => {\n const xhr: XMLHttpRequest = new XMLHttpRequest();\n xhr.onreadystatechange = function (): void {\n if (this.readyState === 4) {\n if (this.status === 200) {\n resolve(this.response as T);\n }\n else if (this.status >= 400) {\n reject({\n message: this.response['odata.error'].message.value,\n statusText: this.statusText,\n status: this.status\n });\n }\n }\n };\n\n xhr.open(method, url, true);\n if (headers === null) {\n xhr.setRequestHeader('Accept', 'application/json;odata=nometadata');\n }\n else {\n for (var header in headers) {\n if (headers.hasOwnProperty(header)) {\n xhr.setRequestHeader(header, headers[header]);\n }\n }\n }\n xhr.responseType = 'json';\n xhr.send(data);\n });\n }\n\n private getSiteMembers(siteUrl: string): Promise<string[]> {\n const component: TrendingInThisSite = this;\n return new Promise<string[]>((resolve: (siteMembers: string[]) => void, reject: (err: any) => void): void => {\n component.request(`${siteUrl}/_api/Web/AssociatedMemberGroup/Users?$select=Email`).then((members: { value: { Email: string }[] }): void => {\n const siteMembers: string[] = [];\n for (let i: number = 0; i < members.value.length; i++) {\n siteMembers.push(members.value[i].Email);\n }\n\n resolve(siteMembers);\n }, (error: any): void => {\n reject(error);\n });\n });\n }\n\n private getActors(siteMembers: string[], requestDigest: string, siteUrl: string): Promise<string[]> {\n const component: TrendingInThisSite = this;\n let query: string = '';\n siteMembers.forEach((member: string): void => {\n if (query.length > 0) {\n query += ' OR ';\n }\n query += `UserName:${member}`;\n });\n const postData: string = JSON.stringify({\n 'request': {\n '__metadata': {\n 'type': 'Microsoft.Office.Server.Search.REST.SearchRequest'\n },\n 'Querytext': query,\n 'SelectProperties': {\n 'results': ['DocId', 'WorkEmail']\n },\n 'RowLimit': '100',\n 'StartRow': '0',\n 'SourceId': 'b09a7990-05ea-4af9-81ef-edfab16c4e31'\n }\n });\n\n return new Promise<string[]>((resolve: (actors: string[]) => void, reject: (err?: any) => void): void => {\n component.request(`${siteUrl}/_api/search/postquery`, 'POST', {\n 'Accept': 'application/json;odata=nometadata',\n 'Content-Type': 'application/json;odata=verbose',\n 'X-RequestDigest': requestDigest\n }, postData).then((data: any): void => {\n if (data && data.PrimaryQueryResult && data.PrimaryQueryResult.RelevantResults) {\n const actors: string[] = [];\n data.PrimaryQueryResult.RelevantResults.Table.Rows.forEach((row: any): void => {\n const actorId: string = component.getValueFromResults('DocId', row.Cells);\n if (actorId != null && actorId.length > 0) {\n actors.push(actorId);\n }\n });\n resolve(actors);\n }\n else {\n reject();\n }\n }, (error: any): void => {\n reject(error);\n });\n });\n }\n\n private getTrendingContent(siteUrl: string, actors: string[], requestDigest: string): Promise<ITrendingDocument[]> {\n const component: TrendingInThisSite = this;\n let gq: string = '';\n if (actors.length > 1) {\n actors.forEach((actor: string): void => {\n if (gq.length > 0) {\n gq += ',';\n }\n gq += `actor(${actor},action:1020)`;\n });\n gq += ',and(actor(me,action:1021),actor(me,or(action:1021,action:1036,action:1037,action:1039)))';\n gq = `or(${gq})`;\n }\n else {\n gq = `or(actor(${actors[0]},action:1020),and(actor(me,action:1021),actor(me,or(action:1021,action:1036,action:1037,action:1039))))`;\n }\n siteUrl = siteUrl.replace(':443/', '/');\n const postData: string = JSON.stringify({\n 'request': {\n '__metadata': {\n 'type': 'Microsoft.Office.Server.Search.REST.SearchRequest'\n },\n 'Querytext': 'path:' + siteUrl,\n 'SelectProperties': {\n 'results': ['Author', 'AuthorOwsUser', 'DocId', 'DocumentPreviewMetadata', 'Edges', 'EditorOwsUser', 'FileExtension', 'FileType', 'HitHighlightedProperties', 'HitHighlightedSummary', 'LastModifiedTime', 'LikeCountLifetime', 'ListID', 'ListItemID', 'OriginalPath', 'Path', 'Rank', 'SPWebUrl', 'SecondaryFileExtension', 'ServerRedirectedURL', 'SiteTitle', 'Title', 'ViewCountLifetime', 'siteID', 'uniqueID', 'webID']\n },\n 'ClientType': 'TrendingInThisSite',\n 'BypassResultTypes': 'true',\n 'RowLimit': component.props.numberOfDocuments.toString(),\n 'StartRow': '0',\n 'RankingModelId': '0c77ded8-c3ef-466d-929d-905670ea1d72',\n 'Properties': {\n 'results': [{\n 'Name': 'IncludeExternalContent',\n 'Value': {\n 'BoolVal': 'True',\n 'QueryPropertyValueTypeIndex': 3\n }\n }, {\n 'Name': 'GraphQuery',\n 'Value': {\n 'StrVal': gq,\n 'QueryPropertyValueTypeIndex': 1\n }\n }, {\n 'Name': 'GraphRankingModel',\n 'Value': {\n 'StrVal': '{\"features\":[{\"function\":\"EdgeWeight\"}],\"featureCombination\":\"sum\",\"actorCombination\":\"sum\"}',\n 'QueryPropertyValueTypeIndex': 1\n }\n }]\n }\n }\n });\n return new Promise<ITrendingDocument[]>((resolve: (trendingDocuments: ITrendingDocument[]) => void, reject: (err: any) => void): void => {\n component.request(`${siteUrl}/_api/search/postquery`, 'POST', {\n 'Accept': 'application/json;odata=nometadata',\n 'Content-Type': 'application/json;odata=verbose',\n 'X-RequestDigest': requestDigest\n }, postData).then((data: any): void => {\n const trendingContent: ITrendingDocument[] = [];\n if (data.PrimaryQueryResult && data.PrimaryQueryResult.RelevantResults &&\n data.PrimaryQueryResult.RelevantResults.Table.Rows.length > 0) {\n data.PrimaryQueryResult.RelevantResults.Table.Rows.forEach((row: any): void => {\n const cells: ISearchResultValue[] = row.Cells;\n const editorInfo: string[] = component.getValueFromResults('EditorOwsUser', cells).split('|');\n const modifiedDate: Date = new Date(component.getValueFromResults('LastModifiedTime', cells).replace('.0000000', ''));\n const dateString: string = (modifiedDate.getMonth() + 1) + '/' + modifiedDate.getDate() + '/' + modifiedDate.getFullYear();\n trendingContent.push({\n id: component.getValueFromResults('DocId', cells),\n url: component.getValueFromResults('ServerRedirectedURL', cells),\n title: component.getValueFromResults('Title', cells),\n previewImageUrl: component.getPreviewImageUrl(cells, siteUrl),\n lastModifiedTime: dateString,\n lastModifiedByName: component.trim(editorInfo[1]),\n lastModifiedByPhotoUrl: component.getUserPhotoUrl(component.trim(editorInfo[0]), siteUrl),\n extension: component.getValueFromResults('FileType', cells)\n });\n });\n }\n resolve(trendingContent);\n }, (error: any): void => {\n reject(error);\n });\n });\n }\n\n private loadTrendingContent(siteUrl: string, numberOfDocuments: number): void {\n const component: TrendingInThisSite = this;\n\n let requestDigest: string = null;\n component.getRequestDigest(siteUrl)\n .then((digest: string): void => {\n requestDigest = digest;\n }, (err: any): void => {\n component.handleError(err);\n })\n .then((): Promise<string[]> => {\n return component.getSiteMembers(siteUrl);\n }, (err: any): void => {\n component.handleError(err);\n })\n .then((siteMembers: string[]): Promise<string[]> => {\n return component.getActors(siteMembers, requestDigest, siteUrl);\n }, (err: any): void => {\n component.handleError(err);\n })\n .then((actors: string[]): Promise<ITrendingDocument[]> => {\n return component.getTrendingContent(siteUrl, actors, requestDigest);\n }, (err: any): void => {\n component.handleError(err);\n })\n .then((trendingDocuments: ITrendingDocument[]): void => {\n component.setState((previousState: ITrendingInThisSiteState, curProps: ITrendingInThisSiteProps): ITrendingInThisSiteState => {\n previousState.trendingDocuments.length = 0;\n return previousState;\n });\n trendingDocuments.forEach((result): void => {\n component.setState((previousState: ITrendingInThisSiteState, curProps: ITrendingInThisSiteProps): ITrendingInThisSiteState => {\n previousState.trendingDocuments.push(result);\n return previousState;\n });\n });\n component.setState((previousState: ITrendingInThisSiteState, curProps: ITrendingInThisSiteProps): ITrendingInThisSiteState => {\n previousState.loading = false;\n return previousState;\n });\n }, (err: any): void => {\n component.handleError(err);\n });\n }\n\n private handleError(err: any): void {\n if (err.responseJSON && err.responseJSON.error) {\n this.setState((previousState: ITrendingInThisSiteState, curProps: ITrendingInThisSiteProps): ITrendingInThisSiteState => {\n previousState.error = \"The following error has occured while running the query: \" + err.responseJSON.error.message.value;\n return previousState;\n });\n } else if (err.responseJSON && err.responseJSON[\"odata.error\"]) {\n this.setState((previousState: ITrendingInThisSiteState, curProps: ITrendingInThisSiteProps): ITrendingInThisSiteState => {\n previousState.error = \"The following error has occured while running the query: \" + err.responseJSON[\"odata.error\"].message.value;\n return previousState;\n });\n } else {\n this.setState((previousState: ITrendingInThisSiteState, curProps: ITrendingInThisSiteProps): ITrendingInThisSiteState => {\n previousState.error = \"An unexpected error occured while running the query\";\n return previousState;\n });\n }\n\n this.setState((previousState: ITrendingInThisSiteState, curProps: ITrendingInThisSiteProps): ITrendingInThisSiteState => {\n previousState.loading = false;\n return previousState;\n });\n }\n\n private getRequestDigest(siteUrl: string): Promise<string> {\n const component: TrendingInThisSite = this;\n return new Promise<string>((resolve, reject): void => {\n component.request(`${siteUrl}/_api/contextinfo`, 'POST').then((data: { FormDigestValue: string }): void => {\n resolve(data.FormDigestValue);\n }, (error: any): void => {\n reject(error);\n });\n });\n }\n}\n"],"sourceRoot":"..\\..\\..\\..\\src"}