sp-dev-fx-webparts/samples/jquery-photopile/lib/webparts/photopileWebPart/SPPicturesListService.js.map

1 line
23 KiB
Plaintext

{"version":3,"sources":["webparts/photopileWebPart/SPPicturesListService.ts"],"names":[],"mappings":";AAQA,8CAA2F;AAE3F,8DAA2E;AAC3E,mDAA8C;AAmB9C;;;GAGG;AACH;IAIE;;;OAGG;IACH,+BAAY,MAA8B,EAAE,WAA4B;QACpE,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,8CAAc,GAArB;QACE,EAAE,CAAC,CAAC,6BAAW,CAAC,IAAI,KAAK,iCAAe,CAAC,KAAK,CAAC,CAAC,CAAC;YAC/C,kEAAkE;YAClE,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC;QACvC,CAAC;QACD,IAAI,CAAC,CAAC;YACJ,0EAA0E;YAC1E,2DAA2D;YAC3D,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CACjC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,8EAA2E,EAAC,sBAAY,CAAC,cAAc,CAAC,EAAE,CAAC;iBACrJ,IAAI,CAAC,UAAC,QAA8B;gBACjC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,sDAAsB,GAA9B;QACE,MAAM,CAAC,wBAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;YACxE,IAAM,QAAQ,GAAa;gBACvB,KAAK,EACL;oBACI,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE;oBACxD,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,EAA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zD,MAAM,EACN;gCACE,MAAM,EAAE,QAAQ;gCAChB,mBAAmB,EAAE,yDAAyD;gCAC9E,oBAAoB,EAAE,uDAAuD;6BAC9E;yBACF;wBACD;4BACE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,EAAE;4BACxD,MAAM,EACN;gCACE,MAAM,EAAE,QAAQ;gCAChB,mBAAmB,EAAE,yDAAyD;gCAC9E,oBAAoB,EAAE,uDAAuD;6BAC9E;yBACF;wBACD;4BACE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,EAAE;4BACxD,MAAM,EACN;gCACE,MAAM,EAAE,QAAQ;gCAChB,mBAAmB,EAAE,yDAAyD;gCAC9E,oBAAoB,EAAE,uDAAuD;6BAC9E;yBACF;wBACD;4BACE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,EAAE;4BAC5D,MAAM,EACN;gCACE,MAAM,EAAE,QAAQ;gCAChB,mBAAmB,EAAE,yDAAyD;gCAC9E,oBAAoB,EAAE,uDAAuD;6BAC9E;yBACF;wBACD;4BACE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,EAAE;4BAC5D,MAAM,EACN;gCACE,MAAM,EAAE,QAAQ;gCAChB,mBAAmB,EAAE,yDAAyD;gCAC9E,oBAAoB,EAAE,uDAAuD;6BAC9E;yBACF;qBACJ;iBACJ,CAAC;YACJ,CAAC;YAED,MAAM,CAAC,QAAQ,CAAC;QACpB,CAAC,CAA0B,CAAC;IAChC,CAAC;IAEH,4BAAC;AAAD,CAtUA,AAsUC,IAAA;AAtUY,sDAAqB","file":"webparts/photopileWebPart/SPPicturesListService.js","sourcesContent":["/**\n * @file\n * Service to get list & list items from current SharePoint site\n *\n * Author: Olivier Carpentier\n */\nimport { ISPLists, ISPListItems, ISPListItem } from './ISPList';\nimport { IWebPartContext } from '@microsoft/sp-webpart-base';\nimport {SPHttpClient,ISPHttpClientOptions,SPHttpClientResponse } from '@microsoft/sp-http';\nimport { IPhotopileWebPartProps } from './IPhotopileWebPartProps';\nimport { Environment, EnvironmentType } from '@microsoft/sp-core-library';\nimport MockHttpClient from './MockHttpClient';\n\n/**\n * @interface\n * Service interface definition\n */\nexport interface ISPPicturesListService {\n /**\n * @function\n * Gets the list of picture libs in the current SharePoint site\n */\n getPictureLibs(): Promise<ISPLists>;\n /**\n * @function\n * Gets the pictures from a SharePoint list\n */\n getPictures(libId: string): Promise<ISPListItems>;\n}\n\n/**\n * @class\n * Service implementation to get list & list items from current SharePoint site\n */\nexport class SPPicturesListService implements ISPPicturesListService {\n private context: IWebPartContext;\n private props: IPhotopileWebPartProps;\n\n /**\n * @function\n * Service constructor\n */\n constructor(_props: IPhotopileWebPartProps, pageContext: IWebPartContext){\n this.props = _props;\n this.context = pageContext;\n }\n\n /**\n * @function\n * Gets the list of picture libs in the current SharePoint site\n */\n public getPictureLibs(): Promise<ISPLists> {\n if (Environment.type === EnvironmentType.Local) {\n //If the running environment is local, load the data from the mock\n return this.getPictureLibsFromMock();\n }\n else {\n //If the running environment is SharePoint, request the lists REST service\n //Gets only the list with BaseTemplate = 109 (picture libs)\n return this.context.spHttpClient.get(\n `${this.context.pageContext.web.absoluteUrl}/_api/lists?$select=Title,id,BaseTemplate&$filter=BaseTemplate%20eq%20109`,SPHttpClient.configurations.v1)\n .then((response: SPHttpClientResponse) => {\n return response.json();\n });\n }\n }\n\n /**\n * @function\n * Returns 3 fake SharePoint lists for the Mock mode\n */\n private getPictureLibsFromMock(): Promise<ISPLists> {\n return MockHttpClient.getLists(this.context.pageContext.web.absoluteUrl).then(() => {\n const listData: ISPLists = {\n value:\n [\n { Title: 'Mock List One', Id: '1', BaseTemplate: '109' },\n { Title: 'Mock List Two', Id: '2', BaseTemplate: '109' },\n { Title: 'Mock List Three', Id: '3', BaseTemplate: '109' }\n ]\n };\n return listData;\n }) as Promise<ISPLists>;\n }\n\n\n /**\n * @function\n * Gets the pictures from a SharePoint list\n */\n public getPictures(libId: string): Promise<ISPListItems> {\n if (Environment.type === EnvironmentType.Local) {\n //If the running environment is local, load the data from the mock\n return this.getPicturesFromMock(libId);\n }\n else {\n //If the running environment is SharePoint, request the items REST service\n //Builds the request to get only some fields, order the items & limit the number of items\n //TODO: optimize the request to not include folders and get only items\n var restUrl: string = this.context.pageContext.web.absoluteUrl;\n restUrl += \"/_api/Web/Lists(guid'\";\n restUrl += this.props.listName;\n restUrl += \"')/items?$expand=File&$select=Title,Description,id,File,FileSystemObjectType&$orderby=\";\n restUrl += this.props.orderBy;\n restUrl += \"%20\";\n restUrl += this.props.orderByAsc;\n restUrl += \"&$top=\";\n restUrl += this.props.count;\n\n //Request the SharePoint web service\n return this.context.spHttpClient.get(restUrl,SPHttpClient.configurations.v1).then((response: SPHttpClientResponse) => {\n return response.json().then((responseFormated: any) => {\n var formatedResponse: ISPListItems = { value: []};\n //Fetchs the Json response to construct the final items list\n responseFormated.value.map((object: any, i: number) => {\n //Tests if the result is a file and not a folder\n if (object['FileSystemObjectType'] == '0') {\n var spListItem: ISPListItem = {\n 'ID': object[\"ID\"],\n 'Title': object['Title'],\n 'Description': object['Description'],\n 'File': {\n 'Name': object['File']['Name'],\n 'ServerRelativeUrl': object['File']['ServerRelativeUrl']\n }\n };\n //Creates the thumbnail item url from the Picture path\n spListItem.File.ThumbnailServerUrl = this.getThumbnailUrl(spListItem.File.ServerRelativeUrl, spListItem.File.Name);\n formatedResponse.value.push(spListItem);\n }\n });\n return formatedResponse;\n });\n }) as Promise<ISPListItems>;\n }\n }\n\n /**\n * @function\n * Gets the thumbnail picture url from the Picture name.\n * In SharePoint pictures libs, the thumbnail url is formated as for example '/_t/10_jpg.jpg'\n */\n private getThumbnailUrl(pictureUrl: string, pictureName: string): string {\n if (pictureUrl == null || pictureUrl == '')\n return '';\n var thumbUrl: string = '';\n thumbUrl = pictureUrl.replace(pictureName, '');\n thumbUrl += \"_t/\";\n thumbUrl += pictureName.replace(\".\", \"_\");\n thumbUrl += \".jpg\";\n return thumbUrl;\n }\n\n /**\n * @function\n * Gets the pictures list from the mock. This function will return a\n * different list of pics for the lib 1 & 2, and an empty list for the third.\n */\n private getPicturesFromMock(libId: string): Promise<ISPListItems> {\n return MockHttpClient.getListsItems(this.context.pageContext.web.absoluteUrl).then(() => {\n var listData: ISPListItems = { value: []};\n if (libId == '1') {\n listData = {\n value:\n [\n {\n \"ID\": \"1\", \"Title\": \"Barton Dam, Ann Arbor, Michigan\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"01.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/01.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/01.jpg\"\n }\n },\n {\n \"ID\": \"2\", \"Title\": \"Building Atlanta, Georgia\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"02.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/02.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/02.jpg\"\n }\n },\n {\n \"ID\": \"3\", \"Title\": \"Nice day for a swim\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"03.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/03.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/03.jpg\"\n }\n },\n {\n \"ID\": \"4\", \"Title\": \"The plants that never die\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"04.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/04.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/04.jpg\"\n }\n },\n {\n \"ID\": \"5\", \"Title\": \"Downtown Atlanta, Georgia\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"05.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/05.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/05.jpg\"\n }\n },\n {\n \"ID\": \"6\", \"Title\": \"Atlanta traffic\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"06.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/06.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/06.jpg\"\n }\n },\n {\n \"ID\": \"7\", \"Title\": \"A pathetic dog\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"07.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/07.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/07.jpg\"\n }\n },\n {\n \"ID\": \"8\", \"Title\": \"Two happy dogs\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"08.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/08.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/08.jpg\"\n }\n },\n {\n \"ID\": \"9\", \"Title\": \"Antigua, Guatemala\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"09.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/09.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/09.jpg\"\n }\n },\n {\n \"ID\": \"10\", \"Title\": \"Iximche, Guatemala\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"10.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/10.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/10.jpg\"\n }\n }\n ]\n };\n }\n else if (libId == '2') {\n listData = {\n value:\n [\n {\n \"ID\": \"11\", \"Title\": \"Barton Dam, Ann Arbor, Michigan\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"11.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/11.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/11.jpg\"\n }\n },\n {\n \"ID\": \"12\", \"Title\": \"Building Atlanta, Georgia\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"12.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/12.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/12.jpg\"\n }\n },\n {\n \"ID\": \"13\", \"Title\": \"Nice day for a swim\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"13.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/13.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/13.jpg\"\n }\n },\n {\n \"ID\": \"14\", \"Title\": \"The plants that never die\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"14.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/14.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/14.jpg\"\n }\n },\n {\n \"ID\": \"15\", \"Title\": \"Downtown Atlanta, Georgia\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"15.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/15.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/15.jpg\"\n }\n },\n {\n \"ID\": \"16\", \"Title\": \"Atlanta traffic\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"16.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/16.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/16.jpg\"\n }\n },\n {\n \"ID\": \"17\", \"Title\": \"A pathetic dog\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"17.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/17.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/17.jpg\"\n }\n },\n {\n \"ID\": \"18\", \"Title\": \"Two happy dogs\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"18.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/18.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/18.jpg\"\n }\n },\n {\n \"ID\": \"19\", \"Title\": \"Antigua, Guatemala\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"19.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/19.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/19.jpg\"\n }\n },\n {\n \"ID\": \"20\", \"Title\": \"Iximche, Guatemala\", \"Description\": \"\",\n \"File\":\n {\n \"Name\": \"20.jpg\",\n \"ServerRelativeUrl\": \"../src/webparts/photopileWebPart/images/fullsize/20.jpg\",\n \"ThumbnailServerUrl\": \"../src/webparts/photopileWebPart/images/thumbs/20.jpg\"\n }\n }\n ]\n };\n }\n\n return listData;\n }) as Promise<ISPListItems>;\n }\n\n}\n"],"sourceRoot":"..\\..\\..\\src"}