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ACE,MAAM,CAAC,IAAI,CAAC;QACd,CAAC;;;OAAA;IACH,+BAAC;AAAD,CA1HA,AA0HC,CA1HqD,uCAAqB,GA0H1E","file":"webparts/angularFileUpload/AngularFileUploadWebPart.js","sourcesContent":["import { Version } from '@microsoft/sp-core-library';\r\nimport {\r\n BaseClientSideWebPart,\r\n IPropertyPaneConfiguration,\r\n PropertyPaneTextField,\r\n IWebPartContext\r\n} from '@microsoft/sp-webpart-base';\r\n\r\nimport { escape } from '@microsoft/sp-lodash-subset';\r\nimport { SPComponentLoader } from '@microsoft/sp-loader';\r\nimport styles from './AngularFileUpload.module.scss';\r\nimport * as strings from 'angularFileUploadStrings';\r\nimport { IAngularFileUploadWebPartProps } from './IAngularFileUploadWebPartProps';\r\n\r\nimport * as angular from 'angular';\r\nimport 'ng-office-ui-fabric';\r\nimport { BaseService } from './app/services/baseSvc';\r\nimport { FileUploadService } from './app/services/fileUploadSvc';\r\nimport { FileUploadCtrl } from './app/controllers/fileUploadCtrl';\r\nimport { CustomFileChange } from './app/directives/customFileChange';\r\nimport { IsoToDateString } from './app/filters/isoToDateString';\r\n\r\nexport default class AngularFileUploadWebPart extends BaseClientSideWebPart<IAngularFileUploadWebPartProps> {\r\n public context: IWebPartContext;\r\n private $injector: ng.auto.IInjectorService;\r\n public constructor(context: IWebPartContext) {\r\n super();\r\n SPComponentLoader.loadCss('https://appsforoffice.microsoft.com/fabric/2.6.1/fabric.min.css');\r\n SPComponentLoader.loadCss('https://appsforoffice.microsoft.com/fabric/2.6.1/fabric.components.min.css');\r\n }\r\n\r\n public render(): void {\r\n\r\n if (this.renderedOnce === false) {\r\n this.domElement.innerHTML = `\r\n <div class=\"${styles.angularFileUpload}\">\r\n <div class=\"${styles.container}\" data-ng-controller=\"fileUploadCtrl as vm\">\r\n <div class=\"ms-Grid ms-fontColor-white ${styles.row} ${styles.headerBackground}\">\r\n <div class=\"ms-Grid-row\">\r\n <div class=\"ms-Grid-col ms-u-sm12 ms-u-md12 ms-u-lg12\">\r\n <h1 class=\"ms-fontSize-su ms-fontColor-white ${styles.textAlignCenter}\">Welcome to Angular File Upload!</h1>\r\n </div>\r\n </div>\r\n <div class=\"ms-Grid-row ${styles.whiteBackground} ${styles.row}\">\r\n <div class=\"ms-Grid-col ms-u-sm5 ms-u-md7 ms-u-lg7 ms-fontColor-black\"><input type=\"file\" value=\"vm.file.fileName\" data-custom-file-change=\"vm.file\" /></div>\r\n <div class=\"ms-Grid-col ms-u-sm2 ms-u-md2 ms-u-lg2\"><uif-spinner data-ng-if=\"vm.isUploading\"></uif-spinner></div>\r\n <div class=\"ms-Grid-col ms-u-sm5 ms-u-md3 ms-u-lg3\"><uif-button uif-type=\"primary\" data-ng-click=\"vm.upload()\">Upload</uif-button></div>\r\n </div>\r\n\r\n <div class=\"ms-Grid-row\">\r\n <div class=\"ms-Grid-col ms-u-sm12 ms-u-md12 ms-u-lg12\">\r\n <h1 class=\"ms-fontSize-su ms-fontColor-white ${styles.textAlignCenter}\">{{vm.libraryTitle}}: Files uploaded by You</h1>\r\n </div>\r\n </div>\r\n\r\n <div class=\"ms-Grid-row ${styles.whiteBackground} ${styles.row}\">\r\n <div class=\"ms-Grid-col ms-u-sm12 ms-u-md12 ms-u-lg12\">\r\n <uif-spinner data-ng-if=\"vm.isRemoving\">Removing .....</uif-spinner>\r\n </div>\r\n </div>\r\n\r\n <div class=\"ms-Grid-row ${styles.whiteBackground} ${styles.row}\">\r\n <div class=\"ms-Grid-col ms-u-sm12 ms-u-md12 ms-u-lg12\">\r\n <uif-table>\r\n <uif-table-head>\r\n <uif-table-row>\r\n <uif-table-header>File Name</uif-table-header>\r\n <uif-table-header>Modified</uif-table-header>\r\n <uif-table-header>Action</uif-table-header>\r\n </uif-table-row>\r\n </uif-table-head>\r\n <uif-table-body>\r\n <uif-table-row data-ng-repeat=\"fileItem in vm.allFiles\">\r\n <uif-table-cell>{{fileItem.FileLeafRef}}</uif-table-cell>\r\n <uif-table-cell>{{fileItem.Modified | isoToDateString}}</uif-table-cell>\r\n <uif-table-cell><i class=\"ms-Icon ms-Icon--Delete ${styles.cursorPointer}\" aria-hidden=\"true\" data-ng-click=\"vm.deleteFile(fileItem)\"></i></uif-table-cell>\r\n </uif-table-row>\r\n </uif-table-body>\r\n </uif-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>`;\r\n var context = this.context.pageContext;\r\n\r\n this.initAngularApp(context);\r\n }\r\n this.$injector.get('$rootScope').$broadcast('configurationChanged', {\r\n libraryTitle: this.properties.libraryTitle,\r\n rowLimit: this.properties.rowLimit\r\n });\r\n }\r\n\r\n protected initAngularApp(pageContext: any) {\r\n\r\n const fileUploadApp: ng.IModule = angular.module('fileUploadApp', [\r\n 'officeuifabric.core',\r\n 'officeuifabric.components'\r\n ]);\r\n\r\n fileUploadApp\r\n .constant(\"pageContext\", pageContext)\r\n .service(\"baseService\", BaseService)\r\n .service(\"fileUploadService\", FileUploadService)\r\n .controller(\"fileUploadCtrl\", FileUploadCtrl)\r\n .filter(\"isoToDateString\", IsoToDateString.filter)\r\n .directive(\"customFileChange\", CustomFileChange.factory());\r\n\r\n this.$injector = angular.bootstrap(this.domElement, ['fileUploadApp']);\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 groups: [\r\n {\r\n groupName: strings.BasicGroupName,\r\n groupFields: [\r\n PropertyPaneTextField('libraryTitle', {\r\n label: strings.LibraryTitleLabel\r\n }),\r\n PropertyPaneTextField('rowLimit', {\r\n label: strings.RowLimitLabel\r\n })\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n }\r\n\r\n protected get disableReactivePropertyChanges(): boolean {\r\n return true;\r\n }\r\n}\r\n"],"sourceRoot":"..\\..\\..\\src"} |