"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var sp_core_library_1 = require("@microsoft/sp-core-library"); var sp_webpart_base_1 = require("@microsoft/sp-webpart-base"); var sp_loader_1 = require("@microsoft/sp-loader"); var AngularFileUpload_module_scss_1 = require("./AngularFileUpload.module.scss"); var strings = require("angularFileUploadStrings"); var angular = require("angular"); require("ng-office-ui-fabric"); var baseSvc_1 = require("./app/services/baseSvc"); var fileUploadSvc_1 = require("./app/services/fileUploadSvc"); var fileUploadCtrl_1 = require("./app/controllers/fileUploadCtrl"); var customFileChange_1 = require("./app/directives/customFileChange"); var isoToDateString_1 = require("./app/filters/isoToDateString"); var AngularFileUploadWebPart = (function (_super) { __extends(AngularFileUploadWebPart, _super); function AngularFileUploadWebPart(context) { var _this = _super.call(this) || this; sp_loader_1.SPComponentLoader.loadCss('https://appsforoffice.microsoft.com/fabric/2.6.1/fabric.min.css'); sp_loader_1.SPComponentLoader.loadCss('https://appsforoffice.microsoft.com/fabric/2.6.1/fabric.components.min.css'); return _this; } AngularFileUploadWebPart.prototype.render = function () { if (this.renderedOnce === false) { this.domElement.innerHTML = "\n
\n
\n
\n
\n
\n

Welcome to Angular File Upload!

\n
\n
\n
\n
\n
\n
Upload
\n
\n\n
\n
\n

{{vm.libraryTitle}}: Files uploaded by You

\n
\n
\n\n
\n
\n Removing .....\n
\n
\n\n
\n
\n \n \n \n File Name\n Modified\n Action\n \n \n \n \n {{fileItem.FileLeafRef}}\n {{fileItem.Modified | isoToDateString}}\n \n \n \n \n
\n
\n
\n
\n
"; var context = this.context.pageContext; this.initAngularApp(context); } this.$injector.get('$rootScope').$broadcast('configurationChanged', { libraryTitle: this.properties.libraryTitle, rowLimit: this.properties.rowLimit }); }; AngularFileUploadWebPart.prototype.initAngularApp = function (pageContext) { var fileUploadApp = angular.module('fileUploadApp', [ 'officeuifabric.core', 'officeuifabric.components' ]); fileUploadApp .constant("pageContext", pageContext) .service("baseService", baseSvc_1.BaseService) .service("fileUploadService", fileUploadSvc_1.FileUploadService) .controller("fileUploadCtrl", fileUploadCtrl_1.FileUploadCtrl) .filter("isoToDateString", isoToDateString_1.IsoToDateString.filter) .directive("customFileChange", customFileChange_1.CustomFileChange.factory()); this.$injector = angular.bootstrap(this.domElement, ['fileUploadApp']); }; Object.defineProperty(AngularFileUploadWebPart.prototype, "dataVersion", { get: function () { return sp_core_library_1.Version.parse('1.0'); }, enumerable: true, configurable: true }); AngularFileUploadWebPart.prototype.getPropertyPaneConfiguration = function () { return { pages: [ { header: { description: strings.PropertyPaneDescription }, groups: [ { groupName: strings.BasicGroupName, groupFields: [ sp_webpart_base_1.PropertyPaneTextField('libraryTitle', { label: strings.LibraryTitleLabel }), sp_webpart_base_1.PropertyPaneTextField('rowLimit', { label: strings.RowLimitLabel }) ] } ] } ] }; }; Object.defineProperty(AngularFileUploadWebPart.prototype, "disableReactivePropertyChanges", { get: function () { return true; }, enumerable: true, configurable: true }); return AngularFileUploadWebPart; }(sp_webpart_base_1.BaseClientSideWebPart)); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = AngularFileUploadWebPart; //# sourceMappingURL=AngularFileUploadWebPart.js.map