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C;IACH,8BAAC;AAAD,CA1OA,AA0OC,CA1OoD,uCAAqB,GA0OzE","file":"webparts/photopileWebPart/PhotopileWebPartWebPart.js","sourcesContent":["import { Version } from '@microsoft/sp-core-library';\r\nimport * as React from 'react';\r\nimport * as ReactDom from 'react-dom';\r\nimport {\r\n  BaseClientSideWebPart,\r\n  IPropertyPaneConfiguration,\r\n  PropertyPaneTextField,  \r\n  IWebPartContext,  \r\n  PropertyPaneToggle,\r\n  PropertyPaneDropdown,\r\n  IPropertyPaneDropdownOption,\r\n  PropertyPaneSlider\r\n} from '@microsoft/sp-webpart-base';\r\nimport { escape } from '@microsoft/sp-lodash-subset';\r\n\r\nimport * as strings from 'mystrings';\r\nimport { IPhotopileWebPartProps } from './IPhotopileWebPartProps';\r\nimport PhotopileWebPart from './components/PhotopileWebPart';\r\nimport { IPhotopileWebPartWebPartProps } from './IPhotopileWebPartWebPartProps';\r\nimport { SPPicturesListService } from './SPPicturesListService';\r\nimport { ISPList } from './ISPList';\r\n\r\n/**\r\n * @class\r\n * Defines the Photopile client side web part\r\n */\r\nexport default class PhotopileWebPartWebPart extends BaseClientSideWebPart<IPhotopileWebPartWebPartProps> {\r\n\r\n    /**\r\n   * @var\r\n   * Stores the list of SharePoint Pictures library found in the current SP web\r\n   */\r\n  private listsDropdownOptions: IPropertyPaneDropdownOption[] = [];\r\n\r\n  /**\r\n   * @function\r\n   * Web Part constructor\r\n   */\r\n  public constructor(context: IWebPartContext) {\r\n    super();\r\n  }\r\n\r\n  /**\r\n   * @function\r\n   * Function called when the web part is inialized\r\n   */\r\n  public onInit<T>(): Promise<T> {\r\n    //Init the PicturesListService to get the picture libs\r\n    const picturesListService: SPPicturesListService = new SPPicturesListService(this.properties, this.context);\r\n    //Request the libs\r\n    picturesListService.getPictureLibs()\r\n      .then((response) => {\r\n        //Store the result as list of dropdown options\r\n        this.listsDropdownOptions = response.value.map((list: ISPList) => {\r\n          return {\r\n            key: list.Id,\r\n            text: list.Title\r\n          };\r\n        });\r\n      });\r\n      return Promise.resolve();\r\n  }\r\n\r\n  /**\r\n   * @function\r\n   * Renders the web part\r\n   */\r\n\r\n    public render(): void {\r\n\r\n    //Constructs the react element code to JSX\r\n    const element: React.ReactElement<IPhotopileWebPartProps> = React.createElement(PhotopileWebPart, {\r\n      listName: this.properties.listName,\r\n      orderBy: this.properties.orderBy,\r\n      orderByAsc: this.properties.orderByAsc,\r\n      count: this.properties.count,\r\n      numLayers: this.properties.numLayers,\r\n      thumbOverlap: this.properties.thumbOverlap,\r\n      thumbRotation: this.properties.thumbRotation,\r\n      thumbBorderWidth: this.properties.thumbBorderWidth,\r\n      thumbBorderColor: this.properties.thumbBorderColor,\r\n      thumbBorderHover: this.properties.thumbBorderHover,\r\n      draggable: this.properties.draggable,\r\n      fadeDuration: this.properties.fadeDuration,\r\n      pickupDuration: this.properties.pickupDuration,\r\n      photoZIndex: this.properties.photoZIndex,\r\n      photoBorder: this.properties.photoBorder,\r\n      photoBorderColor: this.properties.photoBorderColor,\r\n      showInfo: this.properties.showInfo,\r\n      autoplayGallery: this.properties.autoplayGallery,\r\n      autoplaySpeed: this.properties.autoplaySpeed,\r\n      context: this.context\r\n    });\r\n\r\n    //Render the dom\r\n    ReactDom.render(element, this.domElement);\r\n  }\r\n\r\n  /**\r\n   * @function\r\n   * Prevent from changing the pane properties on typing\r\n   */\r\n\tprotected get disableReactivePropertyChanges(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n  /**\r\n   * @function\r\n   * Gets the web part properties panel settings\r\n   */\r\n\r\n  protected get dataVersion(): Version {\r\n    return Version.parse('1.0');\r\n  }\r\n\r\n  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {\r\n    return {\r\n      pages: [\r\n        {\r\n          header: {\r\n            description: strings.PropertyPaneDescription\r\n          },\r\n          //Display the web part properties as accordion\r\n          displayGroupsAsAccordion: true,\r\n          groups: [\r\n            {\r\n              groupName: strings.PictureLibraryGroupName,\r\n              groupFields: [\r\n                PropertyPaneDropdown('listName', {\r\n                  label: strings.PictureLibraryFieldLabel,\r\n                  options: this.listsDropdownOptions\r\n                }),\r\n                PropertyPaneDropdown('orderBy', {\r\n                  label: strings.OrderByFieldLabel,\r\n                  options: [\r\n                    { key: 'ID', text: strings.OrderByChoiceLabelId },\r\n                    { key: 'Title', text: strings.OrderByChoiceLabelTitle },\r\n                    { key: 'Created', text: strings.OrderByChoiceLabelCreated },\r\n                    { key: 'Modified', text: strings.OrderByChoiceLabelModified },\r\n                    { key: 'ImageWidth', text: strings.OrderByChoiceLabelImageWidth },\r\n                    { key: 'ImageHeight', text: strings.OrderByChoiceLabelImageHeight }\r\n                  ]\r\n                }),\r\n                PropertyPaneDropdown('orderByAsc', {\r\n                  label: strings.OrderByAscFieldLabel,\r\n                  options: [\r\n                    { key: 'asc', text: strings.OrderByAscChoiceLabel },\r\n                    { key: 'desc', text: strings.OrderByDescChoiceLabel }\r\n                  ]\r\n                }),\r\n                PropertyPaneSlider('count', {\r\n                  label: strings.PictureLibraryCountLabel,\r\n                  min: 1,\r\n                  max: 100,\r\n                  step: 1,\r\n                  showValue: true\r\n                })\r\n              ]\r\n            },\r\n            {\r\n              groupName: strings.ThumbnailsGroupName,\r\n              groupFields: [\r\n                PropertyPaneSlider('numLayers', {\r\n                  label: strings.NumLayersFieldLabel,\r\n                  min: 1,\r\n                  max: 20,\r\n                  step: 1,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneSlider('thumbOverlap', {\r\n                  label: strings.ThumbOverlabFieldLabel,\r\n                  min: 1,\r\n                  max: 130,\r\n                  step: 1,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneSlider('thumbRotation', {\r\n                  label: strings.ThumbRotationFieldLabel,\r\n                  min: 0,\r\n                  max: 360,\r\n                  step: 1,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneSlider('thumbBorderWidth', {\r\n                  label: strings.ThumbBorderWidthFieldLabel,\r\n                  min: 0,\r\n                  max: 50,\r\n                  step: 1,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneTextField('thumbBorderColor', {\r\n                  label: strings.ThumbBorderColorFieldLabel\r\n                }),\r\n                PropertyPaneTextField('thumbBorderHover', {\r\n                  label: strings.ThumbBorderHoverFieldLabel\r\n                }),\r\n                PropertyPaneToggle('draggable', {\r\n                  label: strings.DraggableFieldLabel\r\n                })\r\n              ]\r\n            },\r\n             {\r\n              groupName: strings.PhotoContainerGroupName,\r\n              groupFields: [\r\n                PropertyPaneSlider('fadeDuration', {\r\n                  label: strings.FadeDurationFieldLabel,\r\n                  min: 0,\r\n                  max: 5000,\r\n                  step: 100,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneSlider('pickupDuration', {\r\n                  label: strings.PickupDurationFieldLabel,\r\n                  min: 0,\r\n                  max: 5000,\r\n                  step: 100,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneSlider('photoZIndex', {\r\n                  label: strings.PhotoZIndexFieldLabel,\r\n                  min: 1,\r\n                  max: 1000,\r\n                  step: 1,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneSlider('photoBorder', {\r\n                  label: strings.PhotoBorderFieldLabel,\r\n                  min: 0,\r\n                  max: 50,\r\n                  step: 1,\r\n                  showValue: true\r\n                }),\r\n                PropertyPaneTextField('photoBorderColor', {\r\n                  label: strings.PhotoBorderColorFieldLabel\r\n                }),\r\n                PropertyPaneToggle('showInfo', {\r\n                  label: strings.ShowInfoFieldLabel\r\n                })\r\n              ]\r\n            },\r\n             {\r\n              groupName: strings.AutoplayGroupName,\r\n              groupFields: [\r\n                PropertyPaneToggle('autoplayGallery', {\r\n                  label: strings.AutoplayGalleryFieldLabel\r\n                }),\r\n                PropertyPaneSlider('autoplaySpeed', {\r\n                  label: strings.AutoplaySpeedFieldLabel,\r\n                  min: 0,\r\n                  max: 5000,\r\n                  step: 100,\r\n                  showValue: true\r\n                })\r\n              ]\r\n            }\r\n          ]\r\n        }\r\n      ]\r\n    };\r\n  }\r\n}\r\n"],"sourceRoot":"..\\..\\..\\src"}