Commit 4041eb5c4992c98e375082702824b8fadcaf2014
1 parent
bbd08ba0
update
Showing
38 changed files
with
2567 additions
and
4 deletions
pom.xml
| ... | ... | @@ -116,6 +116,33 @@ |
| 116 | 116 | <scope>test</scope> |
| 117 | 117 | </dependency> |
| 118 | 118 | |
| 119 | + <!-- pentaho kettle 依赖 --> | |
| 120 | + <dependency> | |
| 121 | + <groupId>com.pentaho.kettle</groupId> | |
| 122 | + <artifactId>kettle-core</artifactId> | |
| 123 | + <version>6.0.1.0-386</version> | |
| 124 | + </dependency> | |
| 125 | + <dependency> | |
| 126 | + <groupId>com.pentaho.kettle</groupId> | |
| 127 | + <artifactId>kettle-engine</artifactId> | |
| 128 | + <version>6.0.1.0-386</version> | |
| 129 | + </dependency> | |
| 130 | + <dependency> | |
| 131 | + <groupId>com.pentaho.kettle</groupId> | |
| 132 | + <artifactId>metastore</artifactId> | |
| 133 | + <version>6.0.1.0-386</version> | |
| 134 | + </dependency> | |
| 135 | + <dependency> | |
| 136 | + <groupId>com.pentaho.kettle</groupId> | |
| 137 | + <artifactId>vfs2</artifactId> | |
| 138 | + <version>2.1-20150824</version> | |
| 139 | + </dependency> | |
| 140 | + <dependency> | |
| 141 | + <groupId>net.sourceforge.jexcelapi</groupId> | |
| 142 | + <artifactId>jxl</artifactId> | |
| 143 | + <version>2.6.12</version> | |
| 144 | + </dependency> | |
| 145 | + | |
| 119 | 146 | </dependencies> |
| 120 | 147 | |
| 121 | 148 | <dependencyManagement> |
| ... | ... | @@ -156,6 +183,10 @@ |
| 156 | 183 | </plugins> |
| 157 | 184 | </build> |
| 158 | 185 | <repositories> |
| 186 | + <repository> | |
| 187 | + <id>pentaho-repo</id> | |
| 188 | + <url>http://repository.pentaho.org/content/repositories/omni/</url> | |
| 189 | + </repository> | |
| 159 | 190 | <repository> |
| 160 | 191 | <id>spring-snapshots</id> |
| 161 | 192 | <url>http://repo.spring.io/snapshot</url> | ... | ... |
src/main/java/com/bsth/controller/CarsController.java
| 1 | 1 | package com.bsth.controller; |
| 2 | 2 | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 3 | 4 | import com.bsth.entity.Cars; |
| 4 | 5 | import com.bsth.service.CarsService; |
| 6 | +import com.bsth.service.schedule.utils.DataImportExportService; | |
| 7 | +import com.bsth.service.schedule.utils.DataToolsProperties; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| 5 | 10 | import org.springframework.web.bind.annotation.*; |
| 11 | +import org.springframework.web.multipart.MultipartFile; | |
| 6 | 12 | |
| 13 | +import java.io.File; | |
| 14 | +import java.util.HashMap; | |
| 7 | 15 | import java.util.Map; |
| 8 | 16 | |
| 9 | 17 | /** |
| ... | ... | @@ -11,8 +19,13 @@ import java.util.Map; |
| 11 | 19 | */ |
| 12 | 20 | @RestController |
| 13 | 21 | @RequestMapping("cars") |
| 22 | +@EnableConfigurationProperties(DataToolsProperties.class) | |
| 14 | 23 | public class CarsController extends BaseController<Cars, Integer> { |
| 15 | 24 | |
| 25 | + @Autowired | |
| 26 | + private DataImportExportService dataImportExportService; | |
| 27 | + @Autowired | |
| 28 | + private DataToolsProperties dataToolsProperties; | |
| 16 | 29 | |
| 17 | 30 | /** |
| 18 | 31 | * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody |
| ... | ... | @@ -37,4 +50,29 @@ public class CarsController extends BaseController<Cars, Integer> { |
| 37 | 50 | public Map<String, Object> validateData(@RequestParam Map<String, Object> map) { |
| 38 | 51 | return ((CarsService) baseService).validateEquale(map); |
| 39 | 52 | } |
| 53 | + | |
| 54 | + // 上传图片 | |
| 55 | + @RequestMapping(value = "/dataImport", method = RequestMethod.POST) | |
| 56 | + public Map<String, Object> uploadPic(MultipartFile file) throws Exception { | |
| 57 | + Map<String, Object> resultMap = new HashMap<>(); | |
| 58 | + | |
| 59 | + try { | |
| 60 | + // 获取ktr转换文件绝对路径 | |
| 61 | + File ktrfile = new File(this.getClass().getResource( | |
| 62 | + dataToolsProperties.getTempDatainputktr()).toURI()); | |
| 63 | + System.out.println(ktrfile.getAbsolutePath()); | |
| 64 | + // 导入数据 | |
| 65 | + dataImportExportService.fileDataImport(file, ktrfile); | |
| 66 | + | |
| 67 | + resultMap.put("status", ResponseCode.SUCCESS); | |
| 68 | + resultMap.put("msg", "导入成功"); | |
| 69 | + } catch (Exception exp) { | |
| 70 | + exp.printStackTrace(); | |
| 71 | + resultMap.put("status", ResponseCode.ERROR); | |
| 72 | + resultMap.put("msg", exp.getLocalizedMessage()); | |
| 73 | + } | |
| 74 | + | |
| 75 | + return resultMap; | |
| 76 | + } | |
| 77 | + | |
| 40 | 78 | } | ... | ... |
src/main/java/com/bsth/service/schedule/utils/DataImportExportService.java
0 → 100644
| 1 | +package com.bsth.service.schedule.utils; | |
| 2 | + | |
| 3 | +import org.springframework.web.multipart.MultipartFile; | |
| 4 | + | |
| 5 | +import java.io.File; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 数据导入导出服务。 | |
| 9 | + */ | |
| 10 | +public interface DataImportExportService { | |
| 11 | + /** | |
| 12 | + * 上传文件。 | |
| 13 | + * @param file mutipartFile | |
| 14 | + * @return 上传后的文件路径 | |
| 15 | + * @throws Exception | |
| 16 | + */ | |
| 17 | + File uploadFile(MultipartFile file) throws Exception; | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * 上传文件,并导入文件数据。 | |
| 21 | + * @param datafile 上传的文件 | |
| 22 | + * @param ktrFile 导入的逻辑ktr文件 | |
| 23 | + * @throws Exception | |
| 24 | + */ | |
| 25 | + void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception; | |
| 26 | +} | ... | ... |
src/main/java/com/bsth/service/schedule/utils/DataImportExportServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.schedule.utils; | |
| 2 | + | |
| 3 | +import com.google.common.io.Files; | |
| 4 | +import org.pentaho.di.core.KettleEnvironment; | |
| 5 | +import org.pentaho.di.core.util.EnvUtil; | |
| 6 | +import org.pentaho.di.trans.Trans; | |
| 7 | +import org.pentaho.di.trans.TransMeta; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | +import org.springframework.web.multipart.MultipartFile; | |
| 12 | + | |
| 13 | +import java.io.File; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * Created by xu on 16/6/23. | |
| 17 | + */ | |
| 18 | +@Service | |
| 19 | +@EnableConfigurationProperties(DataToolsProperties.class) | |
| 20 | +public class DataImportExportServiceImpl implements DataImportExportService { | |
| 21 | + | |
| 22 | + @Autowired | |
| 23 | + private DataToolsProperties dataToolsProperties; | |
| 24 | + | |
| 25 | + @Override | |
| 26 | + public File uploadFile(MultipartFile file) throws Exception { | |
| 27 | + // TODO:以后的文件名要加时间戳 | |
| 28 | + File newFile = new File( | |
| 29 | + dataToolsProperties.getFileuploadDir() + File.separator + | |
| 30 | + file.getOriginalFilename()); | |
| 31 | + Files.write(file.getBytes(), newFile); | |
| 32 | + return newFile; | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception { | |
| 37 | + // 1、上传数据文件 | |
| 38 | + File uploadFile = uploadFile(datafile); | |
| 39 | + | |
| 40 | + // 2、使用kettle运行封装数据导入逻辑的ktr转换文件 | |
| 41 | + // 2.1、初始化kettle | |
| 42 | + EnvUtil.environmentInit(); | |
| 43 | + KettleEnvironment.init(); | |
| 44 | + // 2.2、创建转换元数据,转换 | |
| 45 | + TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | |
| 46 | + Trans trans = new Trans(transMeta); | |
| 47 | + // 2.3、设定命名参数,用于指定数据文件,注意每个ktr必须都有以下指定的命名参数 | |
| 48 | + trans.setParameterValue("filepath", uploadFile.getAbsolutePath()); | |
| 49 | + // TODO:可以考虑设定日志输出 | |
| 50 | + // 2.4、执行转换 | |
| 51 | + trans.execute(null); | |
| 52 | + // 2.5、等待转换结束 | |
| 53 | + trans.waitUntilFinished(); | |
| 54 | + | |
| 55 | + // 3、判定ktr错误数,注意这种错误代表部分数据错误,不会终止转换执行,一般设计ktr的时候,会有错误输出文件,TODO:以后考虑使用日志实时输出 | |
| 56 | + if (trans.getErrors() > 0) { | |
| 57 | + throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | ... | ... |
src/main/java/com/bsth/service/schedule/utils/DataToolsProperties.java
0 → 100644
| 1 | +package com.bsth.service.schedule.utils; | |
| 2 | + | |
| 3 | +import org.springframework.boot.context.properties.ConfigurationProperties; | |
| 4 | + | |
| 5 | +import javax.validation.constraints.NotNull; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 配置数据导入导出用到的配置信息 | |
| 9 | + */ | |
| 10 | +@ConfigurationProperties( | |
| 11 | + locations = "classpath:datatools/config.properties", | |
| 12 | + ignoreInvalidFields = true, | |
| 13 | + prefix = "datatools" | |
| 14 | +) | |
| 15 | +public class DataToolsProperties { | |
| 16 | + | |
| 17 | + /** 上传文件目录配置(根据不同的环境需要修正) */ | |
| 18 | + @NotNull | |
| 19 | + private String fileuploadDir; | |
| 20 | + | |
| 21 | + /** ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正) */ | |
| 22 | + @NotNull | |
| 23 | + private String transErrordir; | |
| 24 | + | |
| 25 | + /** 测试temp的ktr转换文件 */ | |
| 26 | + @NotNull | |
| 27 | + private String tempDatainputktr; | |
| 28 | + | |
| 29 | + public String getFileuploadDir() { | |
| 30 | + return fileuploadDir; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setFileuploadDir(String fileuploadDir) { | |
| 34 | + this.fileuploadDir = fileuploadDir; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public String getTransErrordir() { | |
| 38 | + return transErrordir; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setTransErrordir(String transErrordir) { | |
| 42 | + this.transErrordir = transErrordir; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getTempDatainputktr() { | |
| 46 | + return tempDatainputktr; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setTempDatainputktr(String tempDatainputktr) { | |
| 50 | + this.tempDatainputktr = tempDatainputktr; | |
| 51 | + } | |
| 52 | +} | ... | ... |
src/main/resources/application.properties
| ... | ... | @@ -25,6 +25,12 @@ server.session-timeout=-1 |
| 25 | 25 | |
| 26 | 26 | security.basic.enabled=false |
| 27 | 27 | |
| 28 | +# 上传文件大小限制配置 | |
| 29 | +# File size limit | |
| 30 | +multipart.maxFileSize = -1 | |
| 31 | +# Total request size for a multipart/form-data | |
| 32 | +multipart.maxRequestSize = -1 | |
| 33 | + | |
| 28 | 34 | ## |
| 29 | 35 | #222.66.0.204:5555 |
| 30 | 36 | ##\u5B9E\u65F6gps | ... | ... |
src/main/resources/datatools/config.properties
0 → 100644
| 1 | +# 配置数据导入导出用到的配置信息 | |
| 2 | + | |
| 3 | +# 上传文件目录配置(根据不同的环境需要修正) | |
| 4 | +datatools.fileupload_dir=/Users/xu/resource/project/bsth_control_u_d_files | |
| 5 | +# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正) | |
| 6 | +datatools.trans_errordir=/Users/xu/resource/project/bsth_control_u_d_files | |
| 7 | + | |
| 8 | +# 以下是封装数据导入导出逻辑的ktr转换文件,类路径,以后考虑放到数据库中 | |
| 9 | +# 测试temp的ktr转换文件 | |
| 10 | +datatools.temp_datainputktr=/datatools/ktrs/test.ktr | |
| 0 | 11 | \ No newline at end of file | ... | ... |
src/main/resources/datatools/ktrs/test.ktr
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<transformation> | |
| 3 | + <info> | |
| 4 | + <name>test</name> | |
| 5 | + <description/> | |
| 6 | + <extended_description/> | |
| 7 | + <trans_version/> | |
| 8 | + <trans_type>Normal</trans_type> | |
| 9 | + <trans_status>0</trans_status> | |
| 10 | + <directory>/</directory> | |
| 11 | + <parameters> | |
| 12 | + <parameter> | |
| 13 | + <name>filepath</name> | |
| 14 | + <default_value/> | |
| 15 | + <description>导入的excel路径</description> | |
| 16 | + </parameter> | |
| 17 | + </parameters> | |
| 18 | + <log> | |
| 19 | +<trans-log-table><connection/> | |
| 20 | +<schema/> | |
| 21 | +<table/> | |
| 22 | +<size_limit_lines/> | |
| 23 | +<interval/> | |
| 24 | +<timeout_days/> | |
| 25 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | |
| 26 | +<perf-log-table><connection/> | |
| 27 | +<schema/> | |
| 28 | +<table/> | |
| 29 | +<interval/> | |
| 30 | +<timeout_days/> | |
| 31 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | |
| 32 | +<channel-log-table><connection/> | |
| 33 | +<schema/> | |
| 34 | +<table/> | |
| 35 | +<timeout_days/> | |
| 36 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | |
| 37 | +<step-log-table><connection/> | |
| 38 | +<schema/> | |
| 39 | +<table/> | |
| 40 | +<timeout_days/> | |
| 41 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | |
| 42 | +<metrics-log-table><connection/> | |
| 43 | +<schema/> | |
| 44 | +<table/> | |
| 45 | +<timeout_days/> | |
| 46 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | |
| 47 | + </log> | |
| 48 | + <maxdate> | |
| 49 | + <connection/> | |
| 50 | + <table/> | |
| 51 | + <field/> | |
| 52 | + <offset>0.0</offset> | |
| 53 | + <maxdiff>0.0</maxdiff> | |
| 54 | + </maxdate> | |
| 55 | + <size_rowset>10000</size_rowset> | |
| 56 | + <sleep_time_empty>50</sleep_time_empty> | |
| 57 | + <sleep_time_full>50</sleep_time_full> | |
| 58 | + <unique_connections>N</unique_connections> | |
| 59 | + <feedback_shown>Y</feedback_shown> | |
| 60 | + <feedback_size>50000</feedback_size> | |
| 61 | + <using_thread_priorities>Y</using_thread_priorities> | |
| 62 | + <shared_objects_file/> | |
| 63 | + <capture_step_performance>N</capture_step_performance> | |
| 64 | + <step_performance_capturing_delay>1000</step_performance_capturing_delay> | |
| 65 | + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | |
| 66 | + <dependencies> | |
| 67 | + </dependencies> | |
| 68 | + <partitionschemas> | |
| 69 | + </partitionschemas> | |
| 70 | + <slaveservers> | |
| 71 | + </slaveservers> | |
| 72 | + <clusterschemas> | |
| 73 | + </clusterschemas> | |
| 74 | + <created_user>-</created_user> | |
| 75 | + <created_date>2016/06/23 10:31:17.508</created_date> | |
| 76 | + <modified_user>-</modified_user> | |
| 77 | + <modified_date>2016/06/23 10:31:17.508</modified_date> | |
| 78 | + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | |
| 79 | + <is_key_private>N</is_key_private> | |
| 80 | + </info> | |
| 81 | + <notepads> | |
| 82 | + </notepads> | |
| 83 | + <connection> | |
| 84 | + <name>bus_control_公司_201</name> | |
| 85 | + <server>192.168.168.201</server> | |
| 86 | + <type>MYSQL</type> | |
| 87 | + <access>Native</access> | |
| 88 | + <database>control</database> | |
| 89 | + <port>3306</port> | |
| 90 | + <username>root</username> | |
| 91 | + <password>Encrypted 2be98afc86aa7f2e4cb79ff228dc6fa8c</password> | |
| 92 | + <servername/> | |
| 93 | + <data_tablespace/> | |
| 94 | + <index_tablespace/> | |
| 95 | + <attributes> | |
| 96 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 97 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 98 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 99 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 100 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 101 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 102 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 103 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 104 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 105 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 106 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 107 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 108 | + </attributes> | |
| 109 | + </connection> | |
| 110 | + <connection> | |
| 111 | + <name>xlab_mysql_youle</name> | |
| 112 | + <server>101.231.124.8</server> | |
| 113 | + <type>MYSQL</type> | |
| 114 | + <access>Native</access> | |
| 115 | + <database>xlab_youle</database> | |
| 116 | + <port>45687</port> | |
| 117 | + <username>xlab-youle</username> | |
| 118 | + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | |
| 119 | + <servername/> | |
| 120 | + <data_tablespace/> | |
| 121 | + <index_tablespace/> | |
| 122 | + <attributes> | |
| 123 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 124 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 125 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 126 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 127 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 128 | + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | |
| 129 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 130 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 131 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 132 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 133 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 134 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 135 | + </attributes> | |
| 136 | + </connection> | |
| 137 | + <connection> | |
| 138 | + <name>xlab_mysql_youle(本机)</name> | |
| 139 | + <server>localhost</server> | |
| 140 | + <type>MYSQL</type> | |
| 141 | + <access>Native</access> | |
| 142 | + <database>xlab_youle</database> | |
| 143 | + <port>3306</port> | |
| 144 | + <username>root</username> | |
| 145 | + <password>Encrypted </password> | |
| 146 | + <servername/> | |
| 147 | + <data_tablespace/> | |
| 148 | + <index_tablespace/> | |
| 149 | + <attributes> | |
| 150 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 151 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 152 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 153 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 154 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 155 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 156 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 157 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 158 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 159 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 160 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 161 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 162 | + </attributes> | |
| 163 | + </connection> | |
| 164 | + <connection> | |
| 165 | + <name>xlab_youle</name> | |
| 166 | + <server/> | |
| 167 | + <type>MYSQL</type> | |
| 168 | + <access>JNDI</access> | |
| 169 | + <database>xlab_youle</database> | |
| 170 | + <port>1521</port> | |
| 171 | + <username/> | |
| 172 | + <password>Encrypted </password> | |
| 173 | + <servername/> | |
| 174 | + <data_tablespace/> | |
| 175 | + <index_tablespace/> | |
| 176 | + <attributes> | |
| 177 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 178 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 179 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 180 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 181 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 182 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 183 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 184 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 185 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 186 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 187 | + </attributes> | |
| 188 | + </connection> | |
| 189 | + <order> | |
| 190 | + <hop> <from>Excel输入</from><to>空操作 (什么也不做)</to><enabled>Y</enabled> </hop> | |
| 191 | + <hop> <from>获取变量</from><to>Excel输入</to><enabled>Y</enabled> </hop> | |
| 192 | + </order> | |
| 193 | + <step> | |
| 194 | + <name>空操作 (什么也不做)</name> | |
| 195 | + <type>Dummy</type> | |
| 196 | + <description/> | |
| 197 | + <distribute>Y</distribute> | |
| 198 | + <custom_distribution/> | |
| 199 | + <copies>1</copies> | |
| 200 | + <partitioning> | |
| 201 | + <method>none</method> | |
| 202 | + <schema_name/> | |
| 203 | + </partitioning> | |
| 204 | + <cluster_schema/> | |
| 205 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 206 | + <xloc>400</xloc> | |
| 207 | + <yloc>100</yloc> | |
| 208 | + <draw>Y</draw> | |
| 209 | + </GUI> | |
| 210 | + </step> | |
| 211 | + | |
| 212 | + <step> | |
| 213 | + <name>Excel输入</name> | |
| 214 | + <type>ExcelInput</type> | |
| 215 | + <description/> | |
| 216 | + <distribute>Y</distribute> | |
| 217 | + <custom_distribution/> | |
| 218 | + <copies>1</copies> | |
| 219 | + <partitioning> | |
| 220 | + <method>none</method> | |
| 221 | + <schema_name/> | |
| 222 | + </partitioning> | |
| 223 | + <header>Y</header> | |
| 224 | + <noempty>Y</noempty> | |
| 225 | + <stoponempty>N</stoponempty> | |
| 226 | + <filefield/> | |
| 227 | + <sheetfield/> | |
| 228 | + <sheetrownumfield/> | |
| 229 | + <rownumfield/> | |
| 230 | + <sheetfield/> | |
| 231 | + <filefield/> | |
| 232 | + <limit>0</limit> | |
| 233 | + <encoding/> | |
| 234 | + <add_to_result_filenames>Y</add_to_result_filenames> | |
| 235 | + <accept_filenames>Y</accept_filenames> | |
| 236 | + <accept_field>filepath_</accept_field> | |
| 237 | + <accept_stepname>获取变量</accept_stepname> | |
| 238 | + <file> | |
| 239 | + <name/> | |
| 240 | + <filemask/> | |
| 241 | + <exclude_filemask/> | |
| 242 | + <file_required>N</file_required> | |
| 243 | + <include_subfolders>N</include_subfolders> | |
| 244 | + </file> | |
| 245 | + <fields> | |
| 246 | + <field> | |
| 247 | + <name>线路</name> | |
| 248 | + <type>String</type> | |
| 249 | + <length>-1</length> | |
| 250 | + <precision>-1</precision> | |
| 251 | + <trim_type>none</trim_type> | |
| 252 | + <repeat>N</repeat> | |
| 253 | + <format/> | |
| 254 | + <currency/> | |
| 255 | + <decimal/> | |
| 256 | + <group/> | |
| 257 | + </field> | |
| 258 | + <field> | |
| 259 | + <name>路牌编号</name> | |
| 260 | + <type>String</type> | |
| 261 | + <length>-1</length> | |
| 262 | + <precision>-1</precision> | |
| 263 | + <trim_type>none</trim_type> | |
| 264 | + <repeat>N</repeat> | |
| 265 | + <format/> | |
| 266 | + <currency/> | |
| 267 | + <decimal/> | |
| 268 | + <group/> | |
| 269 | + </field> | |
| 270 | + <field> | |
| 271 | + <name>路牌名称</name> | |
| 272 | + <type>String</type> | |
| 273 | + <length>-1</length> | |
| 274 | + <precision>-1</precision> | |
| 275 | + <trim_type>none</trim_type> | |
| 276 | + <repeat>N</repeat> | |
| 277 | + <format/> | |
| 278 | + <currency/> | |
| 279 | + <decimal/> | |
| 280 | + <group/> | |
| 281 | + </field> | |
| 282 | + <field> | |
| 283 | + <name>路牌类型</name> | |
| 284 | + <type>String</type> | |
| 285 | + <length>-1</length> | |
| 286 | + <precision>-1</precision> | |
| 287 | + <trim_type>none</trim_type> | |
| 288 | + <repeat>N</repeat> | |
| 289 | + <format/> | |
| 290 | + <currency/> | |
| 291 | + <decimal/> | |
| 292 | + <group/> | |
| 293 | + </field> | |
| 294 | + </fields> | |
| 295 | + <sheets> | |
| 296 | + </sheets> | |
| 297 | + <strict_types>N</strict_types> | |
| 298 | + <error_ignored>N</error_ignored> | |
| 299 | + <error_line_skipped>N</error_line_skipped> | |
| 300 | + <bad_line_files_destination_directory/> | |
| 301 | + <bad_line_files_extension>warning</bad_line_files_extension> | |
| 302 | + <error_line_files_destination_directory/> | |
| 303 | + <error_line_files_extension>error</error_line_files_extension> | |
| 304 | + <line_number_files_destination_directory/> | |
| 305 | + <line_number_files_extension>line</line_number_files_extension> | |
| 306 | + <shortFileFieldName/> | |
| 307 | + <pathFieldName/> | |
| 308 | + <hiddenFieldName/> | |
| 309 | + <lastModificationTimeFieldName/> | |
| 310 | + <uriNameFieldName/> | |
| 311 | + <rootUriNameFieldName/> | |
| 312 | + <extensionFieldName/> | |
| 313 | + <sizeFieldName/> | |
| 314 | + <spreadsheet_type>JXL</spreadsheet_type> | |
| 315 | + <cluster_schema/> | |
| 316 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 317 | + <xloc>205</xloc> | |
| 318 | + <yloc>103</yloc> | |
| 319 | + <draw>Y</draw> | |
| 320 | + </GUI> | |
| 321 | + </step> | |
| 322 | + | |
| 323 | + <step> | |
| 324 | + <name>获取变量</name> | |
| 325 | + <type>GetVariable</type> | |
| 326 | + <description/> | |
| 327 | + <distribute>Y</distribute> | |
| 328 | + <custom_distribution/> | |
| 329 | + <copies>1</copies> | |
| 330 | + <partitioning> | |
| 331 | + <method>none</method> | |
| 332 | + <schema_name/> | |
| 333 | + </partitioning> | |
| 334 | + <fields> | |
| 335 | + <field> | |
| 336 | + <name>filepath_</name> | |
| 337 | + <variable>${filepath}</variable> | |
| 338 | + <type>String</type> | |
| 339 | + <format/> | |
| 340 | + <currency/> | |
| 341 | + <decimal/> | |
| 342 | + <group/> | |
| 343 | + <length>-1</length> | |
| 344 | + <precision>-1</precision> | |
| 345 | + <trim_type>none</trim_type> | |
| 346 | + </field> | |
| 347 | + </fields> | |
| 348 | + <cluster_schema/> | |
| 349 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 350 | + <xloc>266</xloc> | |
| 351 | + <yloc>283</yloc> | |
| 352 | + <draw>Y</draw> | |
| 353 | + </GUI> | |
| 354 | + </step> | |
| 355 | + | |
| 356 | + <step_error_handling> | |
| 357 | + </step_error_handling> | |
| 358 | + <slave-step-copy-partition-distribution> | |
| 359 | +</slave-step-copy-partition-distribution> | |
| 360 | + <slave_transformation>N</slave_transformation> | |
| 361 | + | |
| 362 | +</transformation> | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/.bower.json
0 → 100644
| 1 | +{ | |
| 2 | + "name": "angular-file-upload", | |
| 3 | + "main": "dist/angular-file-upload.min.js", | |
| 4 | + "homepage": "https://github.com/nervgh/angular-file-upload", | |
| 5 | + "ignore": [ | |
| 6 | + "examples" | |
| 7 | + ], | |
| 8 | + "dependencies": { | |
| 9 | + "angular": "^1.1.5" | |
| 10 | + }, | |
| 11 | + "devDependencies": { | |
| 12 | + "es5-shim": ">=3.4.0" | |
| 13 | + }, | |
| 14 | + "keywords": [ | |
| 15 | + "angular", | |
| 16 | + "file", | |
| 17 | + "upload", | |
| 18 | + "module" | |
| 19 | + ], | |
| 20 | + "version": "2.1.4", | |
| 21 | + "_release": "2.1.4", | |
| 22 | + "_resolution": { | |
| 23 | + "type": "version", | |
| 24 | + "tag": "v2.1.4", | |
| 25 | + "commit": "888127c60b2946196784a3af474931ae48a8afca" | |
| 26 | + }, | |
| 27 | + "_source": "https://github.com/nervgh/angular-file-upload.git", | |
| 28 | + "_target": "2.1.4", | |
| 29 | + "_originalSource": "angular-file-upload" | |
| 30 | +} | |
| 0 | 31 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/.gitignore
0 → 100644
src/main/resources/static/assets/bower_components/angular-file-upload/.jshintrc
0 → 100644
| 1 | +{ | |
| 2 | + "camelcase" : true, | |
| 3 | + "indent": 4, | |
| 4 | + "strict": true, | |
| 5 | + "undef": true, | |
| 6 | + "unused": true, | |
| 7 | + "quotmark": "single", | |
| 8 | + "maxlen": 120, | |
| 9 | + "trailing": true, | |
| 10 | + "curly": true, | |
| 11 | + | |
| 12 | + "devel": true, | |
| 13 | + | |
| 14 | + "browser":true, | |
| 15 | + "jquery":true, | |
| 16 | + "predef": [ | |
| 17 | + "angular", | |
| 18 | + "define", | |
| 19 | + "require", | |
| 20 | + "app" | |
| 21 | + ] | |
| 22 | +} | |
| 0 | 23 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/README.md
0 → 100644
| 1 | +# Angular File Upload | |
| 2 | + | |
| 3 | +--- | |
| 4 | + | |
| 5 | +## About | |
| 6 | + | |
| 7 | +**Angular File Upload** is a module for the [AngularJS](http://angularjs.org/) framework. Supports drag-n-drop upload, upload progress, validation filters and a file upload queue. It supports native HTML5 uploads, but degrades to a legacy iframe upload method for older browsers. Works with any server side platform which supports standard HTML form uploads. | |
| 8 | + | |
| 9 | +When files are selected or dropped into the component, one or more filters are applied. Files which pass all filters are added to the queue. When file is added to the queue, for him is created instance of `{FileItem}` and uploader options are copied into this object. After, items in the queue (FileItems) are ready for uploading. | |
| 10 | + | |
| 11 | +## Package managers | |
| 12 | +### Bower | |
| 13 | +``` | |
| 14 | +bower install angular-file-upload | |
| 15 | +``` | |
| 16 | +You could find this module in bower like [_angular file upload_](http://bower.io/search/?q=angular%20file%20upload). | |
| 17 | + | |
| 18 | +### NPM | |
| 19 | +``` | |
| 20 | +npm install angular-file-upload | |
| 21 | +``` | |
| 22 | +You could find this module in npm like [_angular file upload_](https://www.npmjs.com/search?q=angular%20file%20upload). | |
| 23 | + | |
| 24 | +## Demos | |
| 25 | +1. [Simple example](http://nervgh.github.io/pages/angular-file-upload/examples/simple) | |
| 26 | +2. [Uploads only images (with canvas preview)](http://nervgh.github.io/pages/angular-file-upload/examples/image-preview) | |
| 27 | +3. [Without bootstrap example](http://nervgh.github.io/pages/angular-file-upload/examples/without-bootstrap) | |
| 28 | + | |
| 29 | +## More Info | |
| 30 | + | |
| 31 | +1. [Introduction](https://github.com/nervgh/angular-file-upload/wiki/Introduction) | |
| 32 | +2. [Module API](https://github.com/nervgh/angular-file-upload/wiki/Module-API) | |
| 33 | +3. [FAQ](https://github.com/nervgh/angular-file-upload/wiki/FAQ) | |
| 34 | +4. [Migrate from 0.x.x to 1.x.x](https://github.com/nervgh/angular-file-upload/wiki/Migrate-from-0.x.x-to-1.x.x) | |
| 35 | +5. [RubyGem](https://github.com/marthyn/angularjs-file-upload-rails) | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/bower.json
0 → 100644
| 1 | +{ | |
| 2 | + "name": "angular-file-upload", | |
| 3 | + "main": "dist/angular-file-upload.min.js", | |
| 4 | + "homepage": "https://github.com/nervgh/angular-file-upload", | |
| 5 | + "ignore": ["examples"], | |
| 6 | + "dependencies": { | |
| 7 | + "angular": "^1.1.5" | |
| 8 | + }, | |
| 9 | + "devDependencies": { | |
| 10 | + "es5-shim": ">=3.4.0" | |
| 11 | + }, | |
| 12 | + "keywords": [ | |
| 13 | + "angular", | |
| 14 | + "file", | |
| 15 | + "upload", | |
| 16 | + "module" | |
| 17 | + ] | |
| 18 | +} | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js
0 → 100644
| 1 | +/* | |
| 2 | + angular-file-upload v2.1.4 | |
| 3 | + https://github.com/nervgh/angular-file-upload | |
| 4 | +*/ | |
| 5 | + | |
| 6 | +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports["angular-file-upload"]=t():e["angular-file-upload"]=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=r(n(2)),o=r(n(3)),s=r(n(4)),a=r(n(5)),u=r(n(6)),l=r(n(7)),c=r(n(1)),f=r(n(8)),p=r(n(9)),d=r(n(10)),v=r(n(11)),h=r(n(12));angular.module(i.name,[]).value("fileUploaderOptions",o).factory("FileUploader",s).factory("FileLikeObject",a).factory("FileItem",u).factory("FileDirective",l).factory("FileSelect",c).factory("FileDrop",f).factory("FileOver",p).directive("nvFileSelect",d).directive("nvFileDrop",v).directive("nvFileOver",h).run(["FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver",function(e,t,n,r,i,o,s){e.FileLikeObject=t,e.FileItem=n,e.FileDirective=r,e.FileSelect=i,e.FileDrop=o,e.FileOver=s}])},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function l(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:l(i,t,n)}if("value"in r&&r.writable)return r.value;var o=r.get;return void 0===o?void 0:o.call(n)},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=(r(n(2)),angular.extend);e.exports=function(e){var t=function(e){function t(e){a(this,t);var n=u(e,{events:{$destroy:"destroy",change:"onChange"},prop:"select"});o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n),this.uploader.isHTML5||this.element.removeAttr("multiple"),this.element.prop("value",null)}return s(t,e),i(t,{getOptions:{value:function(){}},getFilters:{value:function(){}},isEmptyAfterSelection:{value:function(){return!!this.element.attr("multiple")}},onChange:{value:function(){var e=this.uploader.isHTML5?this.element[0].files:this.element[0],t=this.getOptions(),n=this.getFilters();this.uploader.isHTML5||this.destroy(),this.uploader.addToQueue(e,t,n),this.isEmptyAfterSelection()&&(this.element.prop("value",null),this.element.replaceWith(this.element=this.element.clone(!0)))}}}),t}(e);return t},e.exports.$inject=["FileDirective"]},function(e,t){e.exports={name:"angularFileUpload"}},function(e,t){"use strict";e.exports={url:"/",alias:"file",headers:{},queue:[],progress:0,autoUpload:!1,removeAfterUpload:!1,method:"POST",filters:[],formData:[],queueLimit:Number.MAX_VALUE,withCredentials:!1}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.copy),a=angular.extend,u=angular.forEach,l=angular.isObject,c=angular.isNumber,f=angular.isDefined,p=angular.isArray,d=angular.element;e.exports=function(e,t,n,r,v,h){var m=r.File,g=r.FormData,_=function(){function r(t){o(this,r);var n=s(e);a(this,n,t,{isUploading:!1,_nextIndex:0,_failFilterIndex:-1,_directives:{select:[],drop:[],over:[]}}),this.filters.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.filters.unshift({name:"folder",fn:this._folderFilter})}return i(r,{addToQueue:{value:function(e,t,n){var r=this,i=this.isArrayLikeObject(e)?e:[e],o=this._getFilters(n),s=this.queue.length,a=[];u(i,function(e){var n=new v(e);if(r._isValidFile(n,o,t)){var i=new h(r,e,t);a.push(i),r.queue.push(i),r._onAfterAddingFile(i)}else{var s=o[r._failFilterIndex];r._onWhenAddingFileFailed(n,s,t)}}),this.queue.length!==s&&(this._onAfterAddingAll(a),this.progress=this._getTotalProgress()),this._render(),this.autoUpload&&this.uploadAll()}},removeFromQueue:{value:function(e){var t=this.getIndexOfItem(e),n=this.queue[t];n.isUploading&&n.cancel(),this.queue.splice(t,1),n._destroy(),this.progress=this._getTotalProgress()}},clearQueue:{value:function(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}},uploadItem:{value:function(e){var t=this.getIndexOfItem(e),n=this.queue[t],r=this.isHTML5?"_xhrTransport":"_iframeTransport";n._prepareToUploading(),this.isUploading||(this.isUploading=!0,this[r](n))}},cancelItem:{value:function(e){var t=this.getIndexOfItem(e),n=this.queue[t],r=this.isHTML5?"_xhr":"_form";n&&n.isUploading&&n[r].abort()}},uploadAll:{value:function(){var e=this.getNotUploadedItems().filter(function(e){return!e.isUploading});e.length&&(u(e,function(e){return e._prepareToUploading()}),e[0].upload())}},cancelAll:{value:function(){var e=this.getNotUploadedItems();u(e,function(e){return e.cancel()})}},isFile:{value:function(e){return this.constructor.isFile(e)}},isFileLikeObject:{value:function(e){return this.constructor.isFileLikeObject(e)}},isArrayLikeObject:{value:function(e){return this.constructor.isArrayLikeObject(e)}},getIndexOfItem:{value:function(e){return c(e)?e:this.queue.indexOf(e)}},getNotUploadedItems:{value:function(){return this.queue.filter(function(e){return!e.isUploaded})}},getReadyItems:{value:function(){return this.queue.filter(function(e){return e.isReady&&!e.isUploading}).sort(function(e,t){return e.index-t.index})}},destroy:{value:function(){var e=this;u(this._directives,function(t){u(e._directives[t],function(e){e.destroy()})})}},onAfterAddingAll:{value:function(e){}},onAfterAddingFile:{value:function(e){}},onWhenAddingFileFailed:{value:function(e,t,n){}},onBeforeUploadItem:{value:function(e){}},onProgressItem:{value:function(e,t){}},onProgressAll:{value:function(e){}},onSuccessItem:{value:function(e,t,n,r){}},onErrorItem:{value:function(e,t,n,r){}},onCancelItem:{value:function(e,t,n,r){}},onCompleteItem:{value:function(e,t,n,r){}},onCompleteAll:{value:function(){}},_getTotalProgress:{value:function(e){if(this.removeAfterUpload)return e||0;var t=this.getNotUploadedItems().length,n=t?this.queue.length-t:this.queue.length,r=100/this.queue.length,i=(e||0)*r/100;return Math.round(n*r+i)}},_getFilters:{value:function(e){if(!e)return this.filters;if(p(e))return e;var t=e.match(/[^\s,]+/g);return this.filters.filter(function(e){return-1!==t.indexOf(e.name)})}},_render:{value:function(){t.$$phase||t.$apply()}},_folderFilter:{value:function(e){return!(!e.size&&!e.type)}},_queueLimitFilter:{value:function(){return this.queue.length<this.queueLimit}},_isValidFile:{value:function(e,t,n){var r=this;return this._failFilterIndex=-1,t.length?t.every(function(t){return r._failFilterIndex++,t.fn.call(r,e,n)}):!0}},_isSuccessCode:{value:function(e){return e>=200&&300>e||304===e}},_transformResponse:{value:function(e,t){var r=this._headersGetter(t);return u(n.defaults.transformResponse,function(t){e=t(e,r)}),e}},_parseHeaders:{value:function(e){var t,n,r,i={};return e?(u(e.split("\n"),function(e){r=e.indexOf(":"),t=e.slice(0,r).trim().toLowerCase(),n=e.slice(r+1).trim(),t&&(i[t]=i[t]?i[t]+", "+n:n)}),i):i}},_headersGetter:{value:function(e){return function(t){return t?e[t.toLowerCase()]||null:e}}},_xhrTransport:{value:function(e){var t=this,n=e._xhr=new XMLHttpRequest,r=new g;if(this._onBeforeUploadItem(e),u(e.formData,function(e){u(e,function(e,t){r.append(t,e)})}),"number"!=typeof e._file.size)throw new TypeError("The file specified is no longer valid");r.append(e.alias,e._file,e.file.name),n.upload.onprogress=function(n){var r=Math.round(n.lengthComputable?100*n.loaded/n.total:0);t._onProgressItem(e,r)},n.onload=function(){var r=t._parseHeaders(n.getAllResponseHeaders()),i=t._transformResponse(n.response,r),o=t._isSuccessCode(n.status)?"Success":"Error",s="_on"+o+"Item";t[s](e,i,n.status,r),t._onCompleteItem(e,i,n.status,r)},n.onerror=function(){var r=t._parseHeaders(n.getAllResponseHeaders()),i=t._transformResponse(n.response,r);t._onErrorItem(e,i,n.status,r),t._onCompleteItem(e,i,n.status,r)},n.onabort=function(){var r=t._parseHeaders(n.getAllResponseHeaders()),i=t._transformResponse(n.response,r);t._onCancelItem(e,i,n.status,r),t._onCompleteItem(e,i,n.status,r)},n.open(e.method,e.url,!0),n.withCredentials=e.withCredentials,u(e.headers,function(e,t){n.setRequestHeader(t,e)}),n.send(r),this._render()}},_iframeTransport:{value:function(e){var t=this,n=d('<form style="display: none;" />'),r=d('<iframe name="iframeTransport'+Date.now()+'">'),i=e._input;e._form&&e._form.replaceWith(i),e._form=n,this._onBeforeUploadItem(e),i.prop("name",e.alias),u(e.formData,function(e){u(e,function(e,t){var r=d('<input type="hidden" name="'+t+'" />');r.val(e),n.append(r)})}),n.prop({action:e.url,method:"POST",target:r.prop("name"),enctype:"multipart/form-data",encoding:"multipart/form-data"}),r.bind("load",function(){var n="",i=200;try{n=r[0].contentDocument.body.innerHTML}catch(o){i=500}var s={response:n,status:i,dummy:!0},a={},u=t._transformResponse(s.response,a);t._onSuccessItem(e,u,s.status,a),t._onCompleteItem(e,u,s.status,a)}),n.abort=function(){var o,s={status:0,dummy:!0},a={};r.unbind("load").prop("src","javascript:false;"),n.replaceWith(i),t._onCancelItem(e,o,s.status,a),t._onCompleteItem(e,o,s.status,a)},i.after(n),n.append(i).append(r),n[0].submit(),this._render()}},_onWhenAddingFileFailed:{value:function(e,t,n){this.onWhenAddingFileFailed(e,t,n)}},_onAfterAddingFile:{value:function(e){this.onAfterAddingFile(e)}},_onAfterAddingAll:{value:function(e){this.onAfterAddingAll(e)}},_onBeforeUploadItem:{value:function(e){e._onBeforeUpload(),this.onBeforeUploadItem(e)}},_onProgressItem:{value:function(e,t){var n=this._getTotalProgress(t);this.progress=n,e._onProgress(t),this.onProgressItem(e,t),this.onProgressAll(n),this._render()}},_onSuccessItem:{value:function(e,t,n,r){e._onSuccess(t,n,r),this.onSuccessItem(e,t,n,r)}},_onErrorItem:{value:function(e,t,n,r){e._onError(t,n,r),this.onErrorItem(e,t,n,r)}},_onCancelItem:{value:function(e,t,n,r){e._onCancel(t,n,r),this.onCancelItem(e,t,n,r)}},_onCompleteItem:{value:function(e,t,n,r){e._onComplete(t,n,r),this.onCompleteItem(e,t,n,r);var i=this.getReadyItems()[0];return this.isUploading=!1,f(i)?void i.upload():(this.onCompleteAll(),this.progress=this._getTotalProgress(),void this._render())}}},{isFile:{value:function(e){return m&&e instanceof m}},isFileLikeObject:{value:function(e){return e instanceof v}},isArrayLikeObject:{value:function(e){return l(e)&&"length"in e}},inherit:{value:function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.super_=t}}}),r}();return _.prototype.isHTML5=!(!m||!g),_.isHTML5=_.prototype.isHTML5,_},e.exports.$inject=["fileUploaderOptions","$rootScope","$http","$window","FileLikeObject","FileItem"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.copy),a=angular.isElement,u=angular.isString;e.exports=function(){var e=function(){function e(t){o(this,e);var n=a(t),r=n?t.value:t,i=u(r)?"FakePath":"Object",s="_createFrom"+i;this[s](r)}return i(e,{_createFromFakePath:{value:function(e){this.lastModifiedDate=null,this.size=null,this.type="like/"+e.slice(e.lastIndexOf(".")+1).toLowerCase(),this.name=e.slice(e.lastIndexOf("/")+e.lastIndexOf("\\")+2)}},_createFromObject:{value:function(e){this.lastModifiedDate=s(e.lastModifiedDate),this.size=e.size,this.type=e.type,this.name=e.name}}}),e}();return e},e.exports.$inject=[]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.copy),a=angular.extend,u=angular.element,l=angular.isElement;e.exports=function(e,t){var n=function(){function n(e,r,i){o(this,n);var c=l(r),f=c?u(r):null,p=c?null:r;a(this,{url:e.url,alias:e.alias,headers:s(e.headers),formData:s(e.formData),removeAfterUpload:e.removeAfterUpload,withCredentials:e.withCredentials,method:e.method},i,{uploader:e,file:new t(r),isReady:!1,isUploading:!1,isUploaded:!1,isSuccess:!1,isCancel:!1,isError:!1,progress:0,index:null,_file:p,_input:f}),f&&this._replaceNode(f)}return i(n,{upload:{value:function(){try{this.uploader.uploadItem(this)}catch(e){this.uploader._onCompleteItem(this,"",0,[]),this.uploader._onErrorItem(this,"",0,[])}}},cancel:{value:function(){this.uploader.cancelItem(this)}},remove:{value:function(){this.uploader.removeFromQueue(this)}},onBeforeUpload:{value:function(){}},onProgress:{value:function(e){}},onSuccess:{value:function(e,t,n){}},onError:{value:function(e,t,n){}},onCancel:{value:function(e,t,n){}},onComplete:{value:function(e,t,n){}},_onBeforeUpload:{value:function(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()}},_onProgress:{value:function(e){this.progress=e,this.onProgress(e)}},_onSuccess:{value:function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=null,this.onSuccess(e,t,n)}},_onError:{value:function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=null,this.onError(e,t,n)}},_onCancel:{value:function(e,t,n){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=null,this.onCancel(e,t,n)}},_onComplete:{value:function(e,t,n){this.onComplete(e,t,n),this.removeAfterUpload&&this.remove()}},_destroy:{value:function(){this._input&&this._input.remove(),this._form&&this._form.remove(),delete this._form,delete this._input}},_prepareToUploading:{value:function(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},_replaceNode:{value:function(t){var n=e(t.clone())(t.scope());n.prop("value",null),t.css("display","none"),t.after(n)}}}),n}();return n},e.exports.$inject=["$compile","FileLikeObject"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=(r(n(2)),angular.extend);e.exports=function(){var e=function(){function e(t){o(this,e),s(this,t),this.uploader._directives[this.prop].push(this),this._saveLinks(),this.bind()}return i(e,{bind:{value:function(){for(var e in this.events){var t=this.events[e];this.element.bind(e,this[t])}}},unbind:{value:function(){for(var e in this.events)this.element.unbind(e,this.events[e])}},destroy:{value:function(){var e=this.uploader._directives[this.prop].indexOf(this);this.uploader._directives[this.prop].splice(e,1),this.unbind()}},_saveLinks:{value:function(){for(var e in this.events){var t=this.events[e];this[t]=this[t].bind(this)}}}}),e}();return e.prototype.events={},e},e.exports.$inject=[]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function c(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:c(i,t,n)}if("value"in r&&r.writable)return r.value;var o=r.get;return void 0===o?void 0:o.call(n)},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=(r(n(2)),angular.extend),l=angular.forEach;e.exports=function(e){var t=function(e){function t(e){a(this,t);var n=u(e,{events:{$destroy:"destroy",drop:"onDrop",dragover:"onDragOver",dragleave:"onDragLeave"},prop:"drop"});o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n)}return s(t,e),i(t,{getOptions:{value:function(){}},getFilters:{value:function(){}},onDrop:{value:function(e){var t=this._getTransfer(e);if(t){var n=this.getOptions(),r=this.getFilters();this._preventAndStop(e),l(this.uploader._directives.over,this._removeOverClass,this),this.uploader.addToQueue(t.files,n,r)}}},onDragOver:{value:function(e){var t=this._getTransfer(e);this._haveFiles(t.types)&&(t.dropEffect="copy",this._preventAndStop(e),l(this.uploader._directives.over,this._addOverClass,this))}},onDragLeave:{value:function(e){e.currentTarget!==this.element[0]&&(this._preventAndStop(e),l(this.uploader._directives.over,this._removeOverClass,this))}},_getTransfer:{value:function(e){return e.dataTransfer?e.dataTransfer:e.originalEvent.dataTransfer}},_preventAndStop:{value:function(e){e.preventDefault(),e.stopPropagation()}},_haveFiles:{value:function(e){return e?e.indexOf?-1!==e.indexOf("Files"):e.contains?e.contains("Files"):!1:!1}},_addOverClass:{value:function(e){e.addOverClass()}},_removeOverClass:{value:function(e){e.removeOverClass()}}}),t}(e);return t},e.exports.$inject=["FileDirective"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},i=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function l(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:l(i,t,n)}if("value"in r&&r.writable)return r.value;var o=r.get;return void 0===o?void 0:o.call(n)},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=(r(n(2)),angular.extend);e.exports=function(e){var t=function(e){function t(e){a(this,t);var n=u(e,{events:{$destroy:"destroy"},prop:"over",overClass:"nv-file-over"});o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n)}return s(t,e),i(t,{addOverClass:{value:function(){this.element.addClass(this.getOverClass())}},removeOverClass:{value:function(){this.element.removeClass(this.getOverClass())}},getOverClass:{value:function(){return this.overClass}}}),t}(e);return t},e.exports.$inject=["FileDirective"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};r(n(2));e.exports=function(e,t,n){return{link:function(r,i,o){var s=r.$eval(o.uploader);if(!(s instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');var a=new n({uploader:s,element:i});a.getOptions=e(o.options).bind(a,r),a.getFilters=function(){return o.filters}}}},e.exports.$inject=["$parse","FileUploader","FileSelect"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};r(n(2));e.exports=function(e,t,n){return{link:function(r,i,o){var s=r.$eval(o.uploader);if(!(s instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');if(s.isHTML5){var a=new n({uploader:s,element:i});a.getOptions=e(o.options).bind(a,r),a.getFilters=function(){return o.filters}}}}},e.exports.$inject=["$parse","FileUploader","FileDrop"]},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e};r(n(2));e.exports=function(e,t){return{link:function(n,r,i){var o=n.$eval(i.uploader);if(!(o instanceof e))throw new TypeError('"Uploader" must be an instance of FileUploader');var s=new t({uploader:o,element:r});s.getOverClass=function(){return i.overClass||s.overClass}}}},e.exports.$inject=["FileUploader","FileOver"]}])}); | |
| 7 | +//# sourceMappingURL=angular-file-upload.min.js.map | |
| 0 | 8 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js.map
0 → 100644
| 1 | +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///angular-file-upload.min.js","webpack:///webpack/bootstrap 2be85a13effb1c2acd03","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/index.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/services/FileSelect.js","webpack:///./src/config.json","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/values/options.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/services/FileUploader.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/services/FileLikeObject.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/services/FileItem.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/services/FileDirective.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/services/FileDrop.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/services/FileOver.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/directives/FileSelect.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/directives/FileDrop.js","webpack:///c:/OpenServer/domains/angular-file-upload.my/src/directives/FileOver.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequire","obj","__esModule","CONFIG","options","serviceFileUploader","serviceFileLikeObject","serviceFileItem","serviceFileDirective","serviceFileSelect","serviceFileDrop","serviceFileOver","directiveFileSelect","directiveFileDrop","directiveFileOver","angular","name","value","directive","run","FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver","_createClass","defineProperties","target","props","key","prop","configurable","writable","Object","Constructor","protoProps","staticProps","prototype","_get","get","object","property","receiver","desc","getOwnPropertyDescriptor","undefined","parent","getPrototypeOf","getter","_inherits","subClass","superClass","TypeError","create","constructor","enumerable","__proto__","_classCallCheck","instance","extend","_FileDirective","extendedOptions","events","$destroy","change","uploader","isHTML5","element","removeAttr","getOptions","getFilters","isEmptyAfterSelection","attr","onChange","files","filters","destroy","addToQueue","replaceWith","clone","$inject","url","alias","headers","queue","progress","autoUpload","removeAfterUpload","method","formData","queueLimit","Number","MAX_VALUE","withCredentials","copy","forEach","isObject","isNumber","isDefined","isArray","fileUploaderOptions","$rootScope","$http","$window","File","FormData","settings","isUploading","_nextIndex","_failFilterIndex","_directives","select","drop","over","unshift","fn","_queueLimitFilter","_folderFilter","_this","list","isArrayLikeObject","arrayOfFilters","_getFilters","count","length","addedFileItems","some","temp","_isValidFile","fileItem","push","_onAfterAddingFile","filter","_onWhenAddingFileFailed","_onAfterAddingAll","_getTotalProgress","_render","uploadAll","removeFromQueue","index","getIndexOfItem","item","cancel","splice","_destroy","clearQueue","remove","uploadItem","transport","_prepareToUploading","cancelItem","abort","items","getNotUploadedItems","upload","cancelAll","isFile","isFileLikeObject","indexOf","isUploaded","getReadyItems","isReady","sort","item1","item2","onAfterAddingAll","fileItems","onAfterAddingFile","onWhenAddingFileFailed","onBeforeUploadItem","onProgressItem","onProgressAll","onSuccessItem","response","status","onErrorItem","onCancelItem","onCompleteItem","onCompleteAll","notUploaded","uploaded","ratio","current","Math","round","names","match","$$phase","$apply","size","type","file","every","_isSuccessCode","_transformResponse","headersGetter","_headersGetter","defaults","transformResponse","transformFn","_parseHeaders","val","i","parsed","split","line","slice","trim","toLowerCase","parsedHeaders","_xhrTransport","xhr","_xhr","XMLHttpRequest","form","_onBeforeUploadItem","append","_file","onprogress","event","lengthComputable","total","_onProgressItem","onload","getAllResponseHeaders","gist","_onCompleteItem","onerror","_onErrorItem","onabort","_onCancelItem","open","setRequestHeader","send","_iframeTransport","iframe","Date","now","input","_input","_form","element_","action","enctype","encoding","bind","html","contentDocument","body","innerHTML","e","dummy","_onSuccessItem","unbind","after","submit","_onBeforeUpload","_onProgress","_onSuccess","_onError","_onCancel","_onComplete","nextItem","inherit","source","super_","isElement","isString","fileOrInput","isInput","fakePathOrObject","postfix","_createFromFakePath","path","lastModifiedDate","lastIndexOf","_createFromObject","$compile","isSuccess","isCancel","isError","_replaceNode","onBeforeUpload","onProgress","onSuccess","onError","onCancel","onComplete","scope","css","_saveLinks","dragover","dragleave","onDrop","transfer","_getTransfer","_preventAndStop","_removeOverClass","onDragOver","_haveFiles","types","dropEffect","_addOverClass","onDragLeave","currentTarget","dataTransfer","originalEvent","preventDefault","stopPropagation","contains","addOverClass","removeOverClass","overClass","addClass","getOverClass","removeClass","$parse","link","attributes","$eval"],"mappings":";;;;;CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,OAAAH,GACA,gBAAAC,SACAA,QAAA,uBAAAD,IAEAD,EAAA,uBAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,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ACnB,GAAI7P,GAAW+N,EAAM+B,MAAMD,EAAW7P,SAEtC,MAAMA,YAAoB/C,IACtB,KAAM,IAAIkC,WAAU,iDAGxB,IAAKa,EAASC,QAAd,CAEA,GAAI1B,GAAS,GAAIjB,IACb0C,SAAUA,EACVE,QAASA,GAGb3B,GAAO6B,WAAauP,EAAOE,EAAW5T,SAASmP,KAAK7M,EAAQwP,GAC5DxP,EAAO8B,WAAa,Wbk4Df,Mal4DqBwP,GAAWnP,aAQjD3F,EAAOD,QAAQiG,SACX,SACA,eACA,abi4DE,SAAShG,EAAQD,EAASM,Gcr6DhC,Ydy6DC,IAAIS,GAAkB,SAAUC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,EAAI,WAAaA,Ect6D3ED,GAAAT,EAAM,Gd06DlBL,GAAOD,Qcv6DO,SAACmC,EAAcM,GAG1B,OACIqS,KAAM,SAAC7B,EAAO7N,EAAS2P,GACnB,GAAI7P,GAAW+N,EAAM+B,MAAMD,EAAW7P,SAEtC,MAAMA,YAAoB/C,IACtB,KAAM,IAAIkC,WAAU,iDAGxB,IAAIZ,GAAS,GAAIhB,IACbyC,SAAUA,EACVE,QAASA,GAGb3B,GAAOkR,aAAe,Wdu6DjB,Mcv6DuBI,GAAWN,WAAahR,EAAOgR,cAQvExU,EAAOD,QAAQiG,SACX,eACA","file":"angular-file-upload.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"angular-file-upload\"] = factory();\n\telse\n\t\troot[\"angular-file-upload\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"angular-file-upload\"] = factory();\n\telse\n\t\troot[\"angular-file-upload\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar options = _interopRequire(__webpack_require__(3));\n\t\n\tvar serviceFileUploader = _interopRequire(__webpack_require__(4));\n\t\n\tvar serviceFileLikeObject = _interopRequire(__webpack_require__(5));\n\t\n\tvar serviceFileItem = _interopRequire(__webpack_require__(6));\n\t\n\tvar serviceFileDirective = _interopRequire(__webpack_require__(7));\n\t\n\tvar serviceFileSelect = _interopRequire(__webpack_require__(1));\n\t\n\tvar serviceFileDrop = _interopRequire(__webpack_require__(8));\n\t\n\tvar serviceFileOver = _interopRequire(__webpack_require__(9));\n\t\n\tvar directiveFileSelect = _interopRequire(__webpack_require__(10));\n\t\n\tvar directiveFileDrop = _interopRequire(__webpack_require__(11));\n\t\n\tvar directiveFileOver = _interopRequire(__webpack_require__(12));\n\t\n\tangular.module(CONFIG.name, []).value(\"fileUploaderOptions\", options).factory(\"FileUploader\", serviceFileUploader).factory(\"FileLikeObject\", serviceFileLikeObject).factory(\"FileItem\", serviceFileItem).factory(\"FileDirective\", serviceFileDirective).factory(\"FileSelect\", serviceFileSelect).factory(\"FileDrop\", serviceFileDrop).factory(\"FileOver\", serviceFileOver).directive(\"nvFileSelect\", directiveFileSelect).directive(\"nvFileDrop\", directiveFileDrop).directive(\"nvFileOver\", directiveFileOver).run([\"FileUploader\", \"FileLikeObject\", \"FileItem\", \"FileDirective\", \"FileSelect\", \"FileDrop\", \"FileOver\", function (FileUploader, FileLikeObject, FileItem, FileDirective, FileSelect, FileDrop, FileOver) {\n\t // only for compatibility\n\t FileUploader.FileLikeObject = FileLikeObject;\n\t FileUploader.FileItem = FileItem;\n\t FileUploader.FileDirective = FileDirective;\n\t FileUploader.FileSelect = FileSelect;\n\t FileUploader.FileDrop = FileDrop;\n\t FileUploader.FileOver = FileOver;\n\t}]);\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _inherits = function (subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };\n\t\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar extend = angular.extend;\n\t\n\tmodule.exports = function (FileDirective) {\n\t var FileSelect = (function (_FileDirective) {\n\t /**\r\n\t * Creates instance of {FileSelect} object\r\n\t * @param {Object} options\r\n\t * @constructor\r\n\t */\n\t\n\t function FileSelect(options) {\n\t _classCallCheck(this, FileSelect);\n\t\n\t var extendedOptions = extend(options, {\n\t // Map of events\n\t events: {\n\t $destroy: \"destroy\",\n\t change: \"onChange\"\n\t },\n\t // Name of property inside uploader._directive object\n\t prop: \"select\"\n\t });\n\t\n\t _get(Object.getPrototypeOf(FileSelect.prototype), \"constructor\", this).call(this, extendedOptions);\n\t\n\t if (!this.uploader.isHTML5) {\n\t this.element.removeAttr(\"multiple\");\n\t }\n\t this.element.prop(\"value\", null); // FF fix\n\t }\n\t\n\t _inherits(FileSelect, _FileDirective);\n\t\n\t _createClass(FileSelect, {\n\t getOptions: {\n\t /**\r\n\t * Returns options\r\n\t * @return {Object|undefined}\r\n\t */\n\t\n\t value: function getOptions() {}\n\t },\n\t getFilters: {\n\t /**\r\n\t * Returns filters\r\n\t * @return {Array<Function>|String|undefined}\r\n\t */\n\t\n\t value: function getFilters() {}\n\t },\n\t isEmptyAfterSelection: {\n\t /**\r\n\t * If returns \"true\" then HTMLInputElement will be cleared\r\n\t * @returns {Boolean}\r\n\t */\n\t\n\t value: function isEmptyAfterSelection() {\n\t return !!this.element.attr(\"multiple\");\n\t }\n\t },\n\t onChange: {\n\t /**\r\n\t * Event handler\r\n\t */\n\t\n\t value: function onChange() {\n\t var files = this.uploader.isHTML5 ? this.element[0].files : this.element[0];\n\t var options = this.getOptions();\n\t var filters = this.getFilters();\n\t\n\t if (!this.uploader.isHTML5) this.destroy();\n\t this.uploader.addToQueue(files, options, filters);\n\t if (this.isEmptyAfterSelection()) {\n\t this.element.prop(\"value\", null);\n\t this.element.replaceWith(this.element = this.element.clone(true)); // IE fix\n\t }\n\t }\n\t }\n\t });\n\t\n\t return FileSelect;\n\t })(FileDirective);\n\t\n\t return FileSelect;\n\t};\n\t\n\tmodule.exports.$inject = [\"FileDirective\"];\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = {\n\t\t\"name\": \"angularFileUpload\"\n\t}\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = {\n\t url: \"/\",\n\t alias: \"file\",\n\t headers: {},\n\t queue: [],\n\t progress: 0,\n\t autoUpload: false,\n\t removeAfterUpload: false,\n\t method: \"POST\",\n\t filters: [],\n\t formData: [],\n\t queueLimit: Number.MAX_VALUE,\n\t withCredentials: false\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar copy = angular.copy;\n\tvar extend = angular.extend;\n\tvar forEach = angular.forEach;\n\tvar isObject = angular.isObject;\n\tvar isNumber = angular.isNumber;\n\tvar isDefined = angular.isDefined;\n\tvar isArray = angular.isArray;\n\tvar element = angular.element;\n\t\n\tmodule.exports = function (fileUploaderOptions, $rootScope, $http, $window, FileLikeObject, FileItem) {\n\t var File = $window.File;\n\t var FormData = $window.FormData;\n\t\n\t var FileUploader = (function () {\n\t /**********************\r\n\t * PUBLIC\r\n\t **********************/\n\t /**\r\n\t * Creates an instance of FileUploader\r\n\t * @param {Object} [options]\r\n\t * @constructor\r\n\t */\n\t\n\t function FileUploader(options) {\n\t _classCallCheck(this, FileUploader);\n\t\n\t var settings = copy(fileUploaderOptions);\n\t\n\t extend(this, settings, options, {\n\t isUploading: false,\n\t _nextIndex: 0,\n\t _failFilterIndex: -1,\n\t _directives: { select: [], drop: [], over: [] }\n\t });\n\t\n\t // add default filters\n\t this.filters.unshift({ name: \"queueLimit\", fn: this._queueLimitFilter });\n\t this.filters.unshift({ name: \"folder\", fn: this._folderFilter });\n\t }\n\t\n\t _createClass(FileUploader, {\n\t addToQueue: {\n\t /**\r\n\t * Adds items to the queue\r\n\t * @param {File|HTMLInputElement|Object|FileList|Array<Object>} files\r\n\t * @param {Object} [options]\r\n\t * @param {Array<Function>|String} filters\r\n\t */\n\t\n\t value: function addToQueue(files, options, filters) {\n\t var _this = this;\n\t\n\t var list = this.isArrayLikeObject(files) ? files : [files];\n\t var arrayOfFilters = this._getFilters(filters);\n\t var count = this.queue.length;\n\t var addedFileItems = [];\n\t\n\t forEach(list, function (some /*{File|HTMLInputElement|Object}*/) {\n\t var temp = new FileLikeObject(some);\n\t\n\t if (_this._isValidFile(temp, arrayOfFilters, options)) {\n\t var fileItem = new FileItem(_this, some, options);\n\t addedFileItems.push(fileItem);\n\t _this.queue.push(fileItem);\n\t _this._onAfterAddingFile(fileItem);\n\t } else {\n\t var filter = arrayOfFilters[_this._failFilterIndex];\n\t _this._onWhenAddingFileFailed(temp, filter, options);\n\t }\n\t });\n\t\n\t if (this.queue.length !== count) {\n\t this._onAfterAddingAll(addedFileItems);\n\t this.progress = this._getTotalProgress();\n\t }\n\t\n\t this._render();\n\t if (this.autoUpload) this.uploadAll();\n\t }\n\t },\n\t removeFromQueue: {\n\t /**\r\n\t * Remove items from the queue. Remove last: index = -1\r\n\t * @param {FileItem|Number} value\r\n\t */\n\t\n\t value: function removeFromQueue(value) {\n\t var index = this.getIndexOfItem(value);\n\t var item = this.queue[index];\n\t if (item.isUploading) item.cancel();\n\t this.queue.splice(index, 1);\n\t item._destroy();\n\t this.progress = this._getTotalProgress();\n\t }\n\t },\n\t clearQueue: {\n\t /**\r\n\t * Clears the queue\r\n\t */\n\t\n\t value: function clearQueue() {\n\t while (this.queue.length) {\n\t this.queue[0].remove();\n\t }\n\t this.progress = 0;\n\t }\n\t },\n\t uploadItem: {\n\t /**\r\n\t * Uploads a item from the queue\r\n\t * @param {FileItem|Number} value\r\n\t */\n\t\n\t value: function uploadItem(value) {\n\t var index = this.getIndexOfItem(value);\n\t var item = this.queue[index];\n\t var transport = this.isHTML5 ? \"_xhrTransport\" : \"_iframeTransport\";\n\t\n\t item._prepareToUploading();\n\t if (this.isUploading) {\n\t return;\n\t }this.isUploading = true;\n\t this[transport](item);\n\t }\n\t },\n\t cancelItem: {\n\t /**\r\n\t * Cancels uploading of item from the queue\r\n\t * @param {FileItem|Number} value\r\n\t */\n\t\n\t value: function cancelItem(value) {\n\t var index = this.getIndexOfItem(value);\n\t var item = this.queue[index];\n\t var prop = this.isHTML5 ? \"_xhr\" : \"_form\";\n\t if (item && item.isUploading) item[prop].abort();\n\t }\n\t },\n\t uploadAll: {\n\t /**\r\n\t * Uploads all not uploaded items of queue\r\n\t */\n\t\n\t value: function uploadAll() {\n\t var items = this.getNotUploadedItems().filter(function (item) {\n\t return !item.isUploading;\n\t });\n\t if (!items.length) {\n\t return;\n\t }forEach(items, function (item) {\n\t return item._prepareToUploading();\n\t });\n\t items[0].upload();\n\t }\n\t },\n\t cancelAll: {\n\t /**\r\n\t * Cancels all uploads\r\n\t */\n\t\n\t value: function cancelAll() {\n\t var items = this.getNotUploadedItems();\n\t forEach(items, function (item) {\n\t return item.cancel();\n\t });\n\t }\n\t },\n\t isFile: {\n\t /**\r\n\t * Returns \"true\" if value an instance of File\r\n\t * @param {*} value\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function isFile(value) {\n\t return this.constructor.isFile(value);\n\t }\n\t },\n\t isFileLikeObject: {\n\t /**\r\n\t * Returns \"true\" if value an instance of FileLikeObject\r\n\t * @param {*} value\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function isFileLikeObject(value) {\n\t return this.constructor.isFileLikeObject(value);\n\t }\n\t },\n\t isArrayLikeObject: {\n\t /**\r\n\t * Returns \"true\" if value is array like object\r\n\t * @param {*} value\r\n\t * @returns {Boolean}\r\n\t */\n\t\n\t value: function isArrayLikeObject(value) {\n\t return this.constructor.isArrayLikeObject(value);\n\t }\n\t },\n\t getIndexOfItem: {\n\t /**\r\n\t * Returns a index of item from the queue\r\n\t * @param {Item|Number} value\r\n\t * @returns {Number}\r\n\t */\n\t\n\t value: function getIndexOfItem(value) {\n\t return isNumber(value) ? value : this.queue.indexOf(value);\n\t }\n\t },\n\t getNotUploadedItems: {\n\t /**\r\n\t * Returns not uploaded items\r\n\t * @returns {Array}\r\n\t */\n\t\n\t value: function getNotUploadedItems() {\n\t return this.queue.filter(function (item) {\n\t return !item.isUploaded;\n\t });\n\t }\n\t },\n\t getReadyItems: {\n\t /**\r\n\t * Returns items ready for upload\r\n\t * @returns {Array}\r\n\t */\n\t\n\t value: function getReadyItems() {\n\t return this.queue.filter(function (item) {\n\t return item.isReady && !item.isUploading;\n\t }).sort(function (item1, item2) {\n\t return item1.index - item2.index;\n\t });\n\t }\n\t },\n\t destroy: {\n\t /**\r\n\t * Destroys instance of FileUploader\r\n\t */\n\t\n\t value: function destroy() {\n\t var _this = this;\n\t\n\t forEach(this._directives, function (key) {\n\t forEach(_this._directives[key], function (object) {\n\t object.destroy();\n\t });\n\t });\n\t }\n\t },\n\t onAfterAddingAll: {\n\t /**\r\n\t * Callback\r\n\t * @param {Array} fileItems\r\n\t */\n\t\n\t value: function onAfterAddingAll(fileItems) {}\n\t },\n\t onAfterAddingFile: {\n\t /**\r\n\t * Callback\r\n\t * @param {FileItem} fileItem\r\n\t */\n\t\n\t value: function onAfterAddingFile(fileItem) {}\n\t },\n\t onWhenAddingFileFailed: {\n\t /**\r\n\t * Callback\r\n\t * @param {File|Object} item\r\n\t * @param {Object} filter\r\n\t * @param {Object} options\r\n\t */\n\t\n\t value: function onWhenAddingFileFailed(item, filter, options) {}\n\t },\n\t onBeforeUploadItem: {\n\t /**\r\n\t * Callback\r\n\t * @param {FileItem} fileItem\r\n\t */\n\t\n\t value: function onBeforeUploadItem(fileItem) {}\n\t },\n\t onProgressItem: {\n\t /**\r\n\t * Callback\r\n\t * @param {FileItem} fileItem\r\n\t * @param {Number} progress\r\n\t */\n\t\n\t value: function onProgressItem(fileItem, progress) {}\n\t },\n\t onProgressAll: {\n\t /**\r\n\t * Callback\r\n\t * @param {Number} progress\r\n\t */\n\t\n\t value: function onProgressAll(progress) {}\n\t },\n\t onSuccessItem: {\n\t /**\r\n\t * Callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onSuccessItem(item, response, status, headers) {}\n\t },\n\t onErrorItem: {\n\t /**\r\n\t * Callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onErrorItem(item, response, status, headers) {}\n\t },\n\t onCancelItem: {\n\t /**\r\n\t * Callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onCancelItem(item, response, status, headers) {}\n\t },\n\t onCompleteItem: {\n\t /**\r\n\t * Callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onCompleteItem(item, response, status, headers) {}\n\t },\n\t onCompleteAll: {\n\t /**\r\n\t * Callback\r\n\t */\n\t\n\t value: function onCompleteAll() {}\n\t },\n\t _getTotalProgress: {\n\t /**********************\r\n\t * PRIVATE\r\n\t **********************/\n\t /**\r\n\t * Returns the total progress\r\n\t * @param {Number} [value]\r\n\t * @returns {Number}\r\n\t * @private\r\n\t */\n\t\n\t value: function _getTotalProgress(value) {\n\t if (this.removeAfterUpload) {\n\t return value || 0;\n\t }var notUploaded = this.getNotUploadedItems().length;\n\t var uploaded = notUploaded ? this.queue.length - notUploaded : this.queue.length;\n\t var ratio = 100 / this.queue.length;\n\t var current = (value || 0) * ratio / 100;\n\t\n\t return Math.round(uploaded * ratio + current);\n\t }\n\t },\n\t _getFilters: {\n\t /**\r\n\t * Returns array of filters\r\n\t * @param {Array<Function>|String} filters\r\n\t * @returns {Array<Function>}\r\n\t * @private\r\n\t */\n\t\n\t value: function _getFilters(filters) {\n\t if (!filters) {\n\t return this.filters;\n\t }if (isArray(filters)) {\n\t return filters;\n\t }var names = filters.match(/[^\\s,]+/g);\n\t return this.filters.filter(function (filter) {\n\t return names.indexOf(filter.name) !== -1;\n\t });\n\t }\n\t },\n\t _render: {\n\t /**\r\n\t * Updates html\r\n\t * @private\r\n\t */\n\t\n\t value: function _render() {\n\t if (!$rootScope.$$phase) $rootScope.$apply();\n\t }\n\t },\n\t _folderFilter: {\n\t /**\r\n\t * Returns \"true\" if item is a file (not folder)\r\n\t * @param {File|FileLikeObject} item\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function _folderFilter(item) {\n\t return !!(item.size || item.type);\n\t }\n\t },\n\t _queueLimitFilter: {\n\t /**\r\n\t * Returns \"true\" if the limit has not been reached\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function _queueLimitFilter() {\n\t return this.queue.length < this.queueLimit;\n\t }\n\t },\n\t _isValidFile: {\n\t /**\r\n\t * Returns \"true\" if file pass all filters\r\n\t * @param {File|Object} file\r\n\t * @param {Array<Function>} filters\r\n\t * @param {Object} options\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function _isValidFile(file, filters, options) {\n\t var _this = this;\n\t\n\t this._failFilterIndex = -1;\n\t return !filters.length ? true : filters.every(function (filter) {\n\t _this._failFilterIndex++;\n\t return filter.fn.call(_this, file, options);\n\t });\n\t }\n\t },\n\t _isSuccessCode: {\n\t /**\r\n\t * Checks whether upload successful\r\n\t * @param {Number} status\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function _isSuccessCode(status) {\n\t return status >= 200 && status < 300 || status === 304;\n\t }\n\t },\n\t _transformResponse: {\n\t /**\r\n\t * Transforms the server response\r\n\t * @param {*} response\r\n\t * @param {Object} headers\r\n\t * @returns {*}\r\n\t * @private\r\n\t */\n\t\n\t value: function _transformResponse(response, headers) {\n\t var headersGetter = this._headersGetter(headers);\n\t forEach($http.defaults.transformResponse, function (transformFn) {\n\t response = transformFn(response, headersGetter);\n\t });\n\t return response;\n\t }\n\t },\n\t _parseHeaders: {\n\t /**\r\n\t * Parsed response headers\r\n\t * @param headers\r\n\t * @returns {Object}\r\n\t * @see https://github.com/angular/angular.js/blob/master/src/ng/http.js\r\n\t * @private\r\n\t */\n\t\n\t value: function _parseHeaders(headers) {\n\t var parsed = {},\n\t key,\n\t val,\n\t i;\n\t\n\t if (!headers) {\n\t return parsed;\n\t }forEach(headers.split(\"\\n\"), function (line) {\n\t i = line.indexOf(\":\");\n\t key = line.slice(0, i).trim().toLowerCase();\n\t val = line.slice(i + 1).trim();\n\t\n\t if (key) {\n\t parsed[key] = parsed[key] ? parsed[key] + \", \" + val : val;\n\t }\n\t });\n\t\n\t return parsed;\n\t }\n\t },\n\t _headersGetter: {\n\t /**\r\n\t * Returns function that returns headers\r\n\t * @param {Object} parsedHeaders\r\n\t * @returns {Function}\r\n\t * @private\r\n\t */\n\t\n\t value: function _headersGetter(parsedHeaders) {\n\t return function (name) {\n\t if (name) {\n\t return parsedHeaders[name.toLowerCase()] || null;\n\t }\n\t return parsedHeaders;\n\t };\n\t }\n\t },\n\t _xhrTransport: {\n\t /**\r\n\t * The XMLHttpRequest transport\r\n\t * @param {FileItem} item\r\n\t * @private\r\n\t */\n\t\n\t value: function _xhrTransport(item) {\n\t var _this = this;\n\t\n\t var xhr = item._xhr = new XMLHttpRequest();\n\t var form = new FormData();\n\t\n\t this._onBeforeUploadItem(item);\n\t\n\t forEach(item.formData, function (obj) {\n\t forEach(obj, function (value, key) {\n\t form.append(key, value);\n\t });\n\t });\n\t\n\t if (typeof item._file.size != \"number\") {\n\t throw new TypeError(\"The file specified is no longer valid\");\n\t }\n\t\n\t form.append(item.alias, item._file, item.file.name);\n\t\n\t xhr.upload.onprogress = function (event) {\n\t var progress = Math.round(event.lengthComputable ? event.loaded * 100 / event.total : 0);\n\t _this._onProgressItem(item, progress);\n\t };\n\t\n\t xhr.onload = function () {\n\t var headers = _this._parseHeaders(xhr.getAllResponseHeaders());\n\t var response = _this._transformResponse(xhr.response, headers);\n\t var gist = _this._isSuccessCode(xhr.status) ? \"Success\" : \"Error\";\n\t var method = \"_on\" + gist + \"Item\";\n\t _this[method](item, response, xhr.status, headers);\n\t _this._onCompleteItem(item, response, xhr.status, headers);\n\t };\n\t\n\t xhr.onerror = function () {\n\t var headers = _this._parseHeaders(xhr.getAllResponseHeaders());\n\t var response = _this._transformResponse(xhr.response, headers);\n\t _this._onErrorItem(item, response, xhr.status, headers);\n\t _this._onCompleteItem(item, response, xhr.status, headers);\n\t };\n\t\n\t xhr.onabort = function () {\n\t var headers = _this._parseHeaders(xhr.getAllResponseHeaders());\n\t var response = _this._transformResponse(xhr.response, headers);\n\t _this._onCancelItem(item, response, xhr.status, headers);\n\t _this._onCompleteItem(item, response, xhr.status, headers);\n\t };\n\t\n\t xhr.open(item.method, item.url, true);\n\t\n\t xhr.withCredentials = item.withCredentials;\n\t\n\t forEach(item.headers, function (value, name) {\n\t xhr.setRequestHeader(name, value);\n\t });\n\t\n\t xhr.send(form);\n\t this._render();\n\t }\n\t },\n\t _iframeTransport: {\n\t /**\r\n\t * The IFrame transport\r\n\t * @param {FileItem} item\r\n\t * @private\r\n\t */\n\t\n\t value: function _iframeTransport(item) {\n\t var _this = this;\n\t\n\t var form = element(\"<form style=\\\"display: none;\\\" />\");\n\t var iframe = element(\"<iframe name=\\\"iframeTransport\" + Date.now() + \"\\\">\");\n\t var input = item._input;\n\t\n\t if (item._form) item._form.replaceWith(input); // remove old form\n\t item._form = form; // save link to new form\n\t\n\t this._onBeforeUploadItem(item);\n\t\n\t input.prop(\"name\", item.alias);\n\t\n\t forEach(item.formData, function (obj) {\n\t forEach(obj, function (value, key) {\n\t var element_ = element(\"<input type=\\\"hidden\\\" name=\\\"\" + key + \"\\\" />\");\n\t element_.val(value);\n\t form.append(element_);\n\t });\n\t });\n\t\n\t form.prop({\n\t action: item.url,\n\t method: \"POST\",\n\t target: iframe.prop(\"name\"),\n\t enctype: \"multipart/form-data\",\n\t encoding: \"multipart/form-data\" // old IE\n\t });\n\t\n\t iframe.bind(\"load\", function () {\n\t var html = \"\";\n\t var status = 200;\n\t\n\t try {\n\t // Fix for legacy IE browsers that loads internal error page\n\t // when failed WS response received. In consequence iframe\n\t // content access denied error is thrown becouse trying to\n\t // access cross domain page. When such thing occurs notifying\n\t // with empty response object. See more info at:\n\t // http://stackoverflow.com/questions/151362/access-is-denied-error-on-accessing-iframe-document-object\n\t // Note that if non standard 4xx or 5xx error code returned\n\t // from WS then response content can be accessed without error\n\t // but 'XHR' status becomes 200. In order to avoid confusion\n\t // returning response via same 'success' event handler.\n\t\n\t // fixed angular.contents() for iframes\n\t html = iframe[0].contentDocument.body.innerHTML;\n\t } catch (e) {\n\t // in case we run into the access-is-denied error or we have another error on the server side\n\t // (intentional 500,40... errors), we at least say 'something went wrong' -> 500\n\t status = 500;\n\t }\n\t\n\t var xhr = { response: html, status: status, dummy: true };\n\t var headers = {};\n\t var response = _this._transformResponse(xhr.response, headers);\n\t\n\t _this._onSuccessItem(item, response, xhr.status, headers);\n\t _this._onCompleteItem(item, response, xhr.status, headers);\n\t });\n\t\n\t form.abort = function () {\n\t var xhr = { status: 0, dummy: true };\n\t var headers = {};\n\t var response;\n\t\n\t iframe.unbind(\"load\").prop(\"src\", \"javascript:false;\");\n\t form.replaceWith(input);\n\t\n\t _this._onCancelItem(item, response, xhr.status, headers);\n\t _this._onCompleteItem(item, response, xhr.status, headers);\n\t };\n\t\n\t input.after(form);\n\t form.append(input).append(iframe);\n\t\n\t form[0].submit();\n\t this._render();\n\t }\n\t },\n\t _onWhenAddingFileFailed: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {File|Object} item\r\n\t * @param {Object} filter\r\n\t * @param {Object} options\r\n\t * @private\r\n\t */\n\t\n\t value: function _onWhenAddingFileFailed(item, filter, options) {\n\t this.onWhenAddingFileFailed(item, filter, options);\n\t }\n\t },\n\t _onAfterAddingFile: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {FileItem} item\r\n\t */\n\t\n\t value: function _onAfterAddingFile(item) {\n\t this.onAfterAddingFile(item);\n\t }\n\t },\n\t _onAfterAddingAll: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {Array<FileItem>} items\r\n\t */\n\t\n\t value: function _onAfterAddingAll(items) {\n\t this.onAfterAddingAll(items);\n\t }\n\t },\n\t _onBeforeUploadItem: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {FileItem} item\r\n\t * @private\r\n\t */\n\t\n\t value: function _onBeforeUploadItem(item) {\n\t item._onBeforeUpload();\n\t this.onBeforeUploadItem(item);\n\t }\n\t },\n\t _onProgressItem: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {FileItem} item\r\n\t * @param {Number} progress\r\n\t * @private\r\n\t */\n\t\n\t value: function _onProgressItem(item, progress) {\n\t var total = this._getTotalProgress(progress);\n\t this.progress = total;\n\t item._onProgress(progress);\n\t this.onProgressItem(item, progress);\n\t this.onProgressAll(total);\n\t this._render();\n\t }\n\t },\n\t _onSuccessItem: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onSuccessItem(item, response, status, headers) {\n\t item._onSuccess(response, status, headers);\n\t this.onSuccessItem(item, response, status, headers);\n\t }\n\t },\n\t _onErrorItem: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onErrorItem(item, response, status, headers) {\n\t item._onError(response, status, headers);\n\t this.onErrorItem(item, response, status, headers);\n\t }\n\t },\n\t _onCancelItem: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onCancelItem(item, response, status, headers) {\n\t item._onCancel(response, status, headers);\n\t this.onCancelItem(item, response, status, headers);\n\t }\n\t },\n\t _onCompleteItem: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {FileItem} item\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onCompleteItem(item, response, status, headers) {\n\t item._onComplete(response, status, headers);\n\t this.onCompleteItem(item, response, status, headers);\n\t\n\t var nextItem = this.getReadyItems()[0];\n\t this.isUploading = false;\n\t\n\t if (isDefined(nextItem)) {\n\t nextItem.upload();\n\t return;\n\t }\n\t\n\t this.onCompleteAll();\n\t this.progress = this._getTotalProgress();\n\t this._render();\n\t }\n\t }\n\t }, {\n\t isFile: {\n\t /**********************\r\n\t * STATIC\r\n\t **********************/\n\t /**\r\n\t * Returns \"true\" if value an instance of File\r\n\t * @param {*} value\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function isFile(value) {\n\t return File && value instanceof File;\n\t }\n\t },\n\t isFileLikeObject: {\n\t /**\r\n\t * Returns \"true\" if value an instance of FileLikeObject\r\n\t * @param {*} value\r\n\t * @returns {Boolean}\r\n\t * @private\r\n\t */\n\t\n\t value: function isFileLikeObject(value) {\n\t return value instanceof FileLikeObject;\n\t }\n\t },\n\t isArrayLikeObject: {\n\t /**\r\n\t * Returns \"true\" if value is array like object\r\n\t * @param {*} value\r\n\t * @returns {Boolean}\r\n\t */\n\t\n\t value: function isArrayLikeObject(value) {\n\t return isObject(value) && \"length\" in value;\n\t }\n\t },\n\t inherit: {\n\t /**\r\n\t * Inherits a target (Class_1) by a source (Class_2)\r\n\t * @param {Function} target\r\n\t * @param {Function} source\r\n\t */\n\t\n\t value: function inherit(target, source) {\n\t target.prototype = Object.create(source.prototype);\n\t target.prototype.constructor = target;\n\t target.super_ = source;\n\t }\n\t }\n\t });\n\t\n\t return FileUploader;\n\t })();\n\t\n\t /**********************\r\n\t * PUBLIC\r\n\t **********************/\n\t /**\r\n\t * Checks a support the html5 uploader\r\n\t * @returns {Boolean}\r\n\t * @readonly\r\n\t */\n\t FileUploader.prototype.isHTML5 = !!(File && FormData);\n\t /**********************\r\n\t * STATIC\r\n\t **********************/\n\t /**\r\n\t * @borrows FileUploader.prototype.isHTML5\r\n\t */\n\t FileUploader.isHTML5 = FileUploader.prototype.isHTML5;\n\t\n\t return FileUploader;\n\t};\n\t\n\tmodule.exports.$inject = [\"fileUploaderOptions\", \"$rootScope\", \"$http\", \"$window\", \"FileLikeObject\", \"FileItem\"];\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar copy = angular.copy;\n\tvar isElement = angular.isElement;\n\tvar isString = angular.isString;\n\t\n\tmodule.exports = function () {\n\t var FileLikeObject = (function () {\n\t /**\r\n\t * Creates an instance of FileLikeObject\r\n\t * @param {File|HTMLInputElement|Object} fileOrInput\r\n\t * @constructor\r\n\t */\n\t\n\t function FileLikeObject(fileOrInput) {\n\t _classCallCheck(this, FileLikeObject);\n\t\n\t var isInput = isElement(fileOrInput);\n\t var fakePathOrObject = isInput ? fileOrInput.value : fileOrInput;\n\t var postfix = isString(fakePathOrObject) ? \"FakePath\" : \"Object\";\n\t var method = \"_createFrom\" + postfix;\n\t this[method](fakePathOrObject);\n\t }\n\t\n\t _createClass(FileLikeObject, {\n\t _createFromFakePath: {\n\t /**\r\n\t * Creates file like object from fake path string\r\n\t * @param {String} path\r\n\t * @private\r\n\t */\n\t\n\t value: function _createFromFakePath(path) {\n\t this.lastModifiedDate = null;\n\t this.size = null;\n\t this.type = \"like/\" + path.slice(path.lastIndexOf(\".\") + 1).toLowerCase();\n\t this.name = path.slice(path.lastIndexOf(\"/\") + path.lastIndexOf(\"\\\\\") + 2);\n\t }\n\t },\n\t _createFromObject: {\n\t /**\r\n\t * Creates file like object from object\r\n\t * @param {File|FileLikeObject} object\r\n\t * @private\r\n\t */\n\t\n\t value: function _createFromObject(object) {\n\t this.lastModifiedDate = copy(object.lastModifiedDate);\n\t this.size = object.size;\n\t this.type = object.type;\n\t this.name = object.name;\n\t }\n\t }\n\t });\n\t\n\t return FileLikeObject;\n\t })();\n\t\n\t return FileLikeObject;\n\t};\n\t\n\tmodule.exports.$inject = [];\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar copy = angular.copy;\n\tvar extend = angular.extend;\n\tvar element = angular.element;\n\tvar isElement = angular.isElement;\n\t\n\tmodule.exports = function ($compile, FileLikeObject) {\n\t var FileItem = (function () {\n\t /**\r\n\t * Creates an instance of FileItem\r\n\t * @param {FileUploader} uploader\r\n\t * @param {File|HTMLInputElement|Object} some\r\n\t * @param {Object} options\r\n\t * @constructor\r\n\t */\n\t\n\t function FileItem(uploader, some, options) {\n\t _classCallCheck(this, FileItem);\n\t\n\t var isInput = isElement(some);\n\t var input = isInput ? element(some) : null;\n\t var file = !isInput ? some : null;\n\t\n\t extend(this, {\n\t url: uploader.url,\n\t alias: uploader.alias,\n\t headers: copy(uploader.headers),\n\t formData: copy(uploader.formData),\n\t removeAfterUpload: uploader.removeAfterUpload,\n\t withCredentials: uploader.withCredentials,\n\t method: uploader.method\n\t }, options, {\n\t uploader: uploader,\n\t file: new FileLikeObject(some),\n\t isReady: false,\n\t isUploading: false,\n\t isUploaded: false,\n\t isSuccess: false,\n\t isCancel: false,\n\t isError: false,\n\t progress: 0,\n\t index: null,\n\t _file: file,\n\t _input: input\n\t });\n\t\n\t if (input) this._replaceNode(input);\n\t }\n\t\n\t _createClass(FileItem, {\n\t upload: {\n\t /**********************\r\n\t * PUBLIC\r\n\t **********************/\n\t /**\r\n\t * Uploads a FileItem\r\n\t */\n\t\n\t value: function upload() {\n\t try {\n\t this.uploader.uploadItem(this);\n\t } catch (e) {\n\t this.uploader._onCompleteItem(this, \"\", 0, []);\n\t this.uploader._onErrorItem(this, \"\", 0, []);\n\t }\n\t }\n\t },\n\t cancel: {\n\t /**\r\n\t * Cancels uploading of FileItem\r\n\t */\n\t\n\t value: function cancel() {\n\t this.uploader.cancelItem(this);\n\t }\n\t },\n\t remove: {\n\t /**\r\n\t * Removes a FileItem\r\n\t */\n\t\n\t value: function remove() {\n\t this.uploader.removeFromQueue(this);\n\t }\n\t },\n\t onBeforeUpload: {\n\t /**\r\n\t * Callback\r\n\t * @private\r\n\t */\n\t\n\t value: function onBeforeUpload() {}\n\t },\n\t onProgress: {\n\t /**\r\n\t * Callback\r\n\t * @param {Number} progress\r\n\t * @private\r\n\t */\n\t\n\t value: function onProgress(progress) {}\n\t },\n\t onSuccess: {\n\t /**\r\n\t * Callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onSuccess(response, status, headers) {}\n\t },\n\t onError: {\n\t /**\r\n\t * Callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onError(response, status, headers) {}\n\t },\n\t onCancel: {\n\t /**\r\n\t * Callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onCancel(response, status, headers) {}\n\t },\n\t onComplete: {\n\t /**\r\n\t * Callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t */\n\t\n\t value: function onComplete(response, status, headers) {}\n\t },\n\t _onBeforeUpload: {\n\t /**********************\r\n\t * PRIVATE\r\n\t **********************/\n\t /**\r\n\t * Inner callback\r\n\t */\n\t\n\t value: function _onBeforeUpload() {\n\t this.isReady = true;\n\t this.isUploading = true;\n\t this.isUploaded = false;\n\t this.isSuccess = false;\n\t this.isCancel = false;\n\t this.isError = false;\n\t this.progress = 0;\n\t this.onBeforeUpload();\n\t }\n\t },\n\t _onProgress: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {Number} progress\r\n\t * @private\r\n\t */\n\t\n\t value: function _onProgress(progress) {\n\t this.progress = progress;\n\t this.onProgress(progress);\n\t }\n\t },\n\t _onSuccess: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onSuccess(response, status, headers) {\n\t this.isReady = false;\n\t this.isUploading = false;\n\t this.isUploaded = true;\n\t this.isSuccess = true;\n\t this.isCancel = false;\n\t this.isError = false;\n\t this.progress = 100;\n\t this.index = null;\n\t this.onSuccess(response, status, headers);\n\t }\n\t },\n\t _onError: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onError(response, status, headers) {\n\t this.isReady = false;\n\t this.isUploading = false;\n\t this.isUploaded = true;\n\t this.isSuccess = false;\n\t this.isCancel = false;\n\t this.isError = true;\n\t this.progress = 0;\n\t this.index = null;\n\t this.onError(response, status, headers);\n\t }\n\t },\n\t _onCancel: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onCancel(response, status, headers) {\n\t this.isReady = false;\n\t this.isUploading = false;\n\t this.isUploaded = false;\n\t this.isSuccess = false;\n\t this.isCancel = true;\n\t this.isError = false;\n\t this.progress = 0;\n\t this.index = null;\n\t this.onCancel(response, status, headers);\n\t }\n\t },\n\t _onComplete: {\n\t /**\r\n\t * Inner callback\r\n\t * @param {*} response\r\n\t * @param {Number} status\r\n\t * @param {Object} headers\r\n\t * @private\r\n\t */\n\t\n\t value: function _onComplete(response, status, headers) {\n\t this.onComplete(response, status, headers);\n\t if (this.removeAfterUpload) this.remove();\n\t }\n\t },\n\t _destroy: {\n\t /**\r\n\t * Destroys a FileItem\r\n\t */\n\t\n\t value: function _destroy() {\n\t if (this._input) this._input.remove();\n\t if (this._form) this._form.remove();\n\t delete this._form;\n\t delete this._input;\n\t }\n\t },\n\t _prepareToUploading: {\n\t /**\r\n\t * Prepares to uploading\r\n\t * @private\r\n\t */\n\t\n\t value: function _prepareToUploading() {\n\t this.index = this.index || ++this.uploader._nextIndex;\n\t this.isReady = true;\n\t }\n\t },\n\t _replaceNode: {\n\t /**\r\n\t * Replaces input element on his clone\r\n\t * @param {JQLite|jQuery} input\r\n\t * @private\r\n\t */\n\t\n\t value: function _replaceNode(input) {\n\t var clone = $compile(input.clone())(input.scope());\n\t clone.prop(\"value\", null); // FF fix\n\t input.css(\"display\", \"none\");\n\t input.after(clone); // remove jquery dependency\n\t }\n\t }\n\t });\n\t\n\t return FileItem;\n\t })();\n\t\n\t return FileItem;\n\t};\n\t\n\tmodule.exports.$inject = [\"$compile\", \"FileLikeObject\"];\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar extend = angular.extend;\n\t\n\tmodule.exports = function () {\n\t var FileDirective = (function () {\n\t /**\r\n\t * Creates instance of {FileDirective} object\r\n\t * @param {Object} options\r\n\t * @param {Object} options.uploader\r\n\t * @param {HTMLElement} options.element\r\n\t * @param {Object} options.events\r\n\t * @param {String} options.prop\r\n\t * @constructor\r\n\t */\n\t\n\t function FileDirective(options) {\n\t _classCallCheck(this, FileDirective);\n\t\n\t extend(this, options);\n\t this.uploader._directives[this.prop].push(this);\n\t this._saveLinks();\n\t this.bind();\n\t }\n\t\n\t _createClass(FileDirective, {\n\t bind: {\n\t /**\r\n\t * Binds events handles\r\n\t */\n\t\n\t value: function bind() {\n\t for (var key in this.events) {\n\t var prop = this.events[key];\n\t this.element.bind(key, this[prop]);\n\t }\n\t }\n\t },\n\t unbind: {\n\t /**\r\n\t * Unbinds events handles\r\n\t */\n\t\n\t value: function unbind() {\n\t for (var key in this.events) {\n\t this.element.unbind(key, this.events[key]);\n\t }\n\t }\n\t },\n\t destroy: {\n\t /**\r\n\t * Destroys directive\r\n\t */\n\t\n\t value: function destroy() {\n\t var index = this.uploader._directives[this.prop].indexOf(this);\n\t this.uploader._directives[this.prop].splice(index, 1);\n\t this.unbind();\n\t // this.element = null;\n\t }\n\t },\n\t _saveLinks: {\n\t /**\r\n\t * Saves links to functions\r\n\t * @private\r\n\t */\n\t\n\t value: function _saveLinks() {\n\t for (var key in this.events) {\n\t var prop = this.events[key];\n\t this[prop] = this[prop].bind(this);\n\t }\n\t }\n\t }\n\t });\n\t\n\t return FileDirective;\n\t })();\n\t\n\t /**\r\n\t * Map of events\r\n\t * @type {Object}\r\n\t */\n\t FileDirective.prototype.events = {};\n\t\n\t return FileDirective;\n\t};\n\t\n\tmodule.exports.$inject = [];\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _inherits = function (subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };\n\t\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar extend = angular.extend;\n\tvar forEach = angular.forEach;\n\t\n\tmodule.exports = function (FileDirective) {\n\t var FileDrop = (function (_FileDirective) {\n\t /**\r\n\t * Creates instance of {FileDrop} object\r\n\t * @param {Object} options\r\n\t * @constructor\r\n\t */\n\t\n\t function FileDrop(options) {\n\t _classCallCheck(this, FileDrop);\n\t\n\t var extendedOptions = extend(options, {\n\t // Map of events\n\t events: {\n\t $destroy: \"destroy\",\n\t drop: \"onDrop\",\n\t dragover: \"onDragOver\",\n\t dragleave: \"onDragLeave\"\n\t },\n\t // Name of property inside uploader._directive object\n\t prop: \"drop\"\n\t });\n\t\n\t _get(Object.getPrototypeOf(FileDrop.prototype), \"constructor\", this).call(this, extendedOptions);\n\t }\n\t\n\t _inherits(FileDrop, _FileDirective);\n\t\n\t _createClass(FileDrop, {\n\t getOptions: {\n\t /**\r\n\t * Returns options\r\n\t * @return {Object|undefined}\r\n\t */\n\t\n\t value: function getOptions() {}\n\t },\n\t getFilters: {\n\t /**\r\n\t * Returns filters\r\n\t * @return {Array<Function>|String|undefined}\r\n\t */\n\t\n\t value: function getFilters() {}\n\t },\n\t onDrop: {\n\t /**\r\n\t * Event handler\r\n\t */\n\t\n\t value: function onDrop(event) {\n\t var transfer = this._getTransfer(event);\n\t if (!transfer) {\n\t return;\n\t }var options = this.getOptions();\n\t var filters = this.getFilters();\n\t this._preventAndStop(event);\n\t forEach(this.uploader._directives.over, this._removeOverClass, this);\n\t this.uploader.addToQueue(transfer.files, options, filters);\n\t }\n\t },\n\t onDragOver: {\n\t /**\r\n\t * Event handler\r\n\t */\n\t\n\t value: function onDragOver(event) {\n\t var transfer = this._getTransfer(event);\n\t if (!this._haveFiles(transfer.types)) {\n\t return;\n\t }transfer.dropEffect = \"copy\";\n\t this._preventAndStop(event);\n\t forEach(this.uploader._directives.over, this._addOverClass, this);\n\t }\n\t },\n\t onDragLeave: {\n\t /**\r\n\t * Event handler\r\n\t */\n\t\n\t value: function onDragLeave(event) {\n\t if (event.currentTarget === this.element[0]) {\n\t return;\n\t }this._preventAndStop(event);\n\t forEach(this.uploader._directives.over, this._removeOverClass, this);\n\t }\n\t },\n\t _getTransfer: {\n\t /**\r\n\t * Helper\r\n\t */\n\t\n\t value: function _getTransfer(event) {\n\t return event.dataTransfer ? event.dataTransfer : event.originalEvent.dataTransfer; // jQuery fix;\n\t }\n\t },\n\t _preventAndStop: {\n\t /**\r\n\t * Helper\r\n\t */\n\t\n\t value: function _preventAndStop(event) {\n\t event.preventDefault();\n\t event.stopPropagation();\n\t }\n\t },\n\t _haveFiles: {\n\t /**\r\n\t * Returns \"true\" if types contains files\r\n\t * @param {Object} types\r\n\t */\n\t\n\t value: function _haveFiles(types) {\n\t if (!types) {\n\t return false;\n\t }if (types.indexOf) {\n\t return types.indexOf(\"Files\") !== -1;\n\t } else if (types.contains) {\n\t return types.contains(\"Files\");\n\t } else {\n\t return false;\n\t }\n\t }\n\t },\n\t _addOverClass: {\n\t /**\r\n\t * Callback\r\n\t */\n\t\n\t value: function _addOverClass(item) {\n\t item.addOverClass();\n\t }\n\t },\n\t _removeOverClass: {\n\t /**\r\n\t * Callback\r\n\t */\n\t\n\t value: function _removeOverClass(item) {\n\t item.removeOverClass();\n\t }\n\t }\n\t });\n\t\n\t return FileDrop;\n\t })(FileDirective);\n\t\n\t return FileDrop;\n\t};\n\t\n\tmodule.exports.$inject = [\"FileDirective\"];\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _inherits = function (subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };\n\t\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tvar extend = angular.extend;\n\t\n\tmodule.exports = function (FileDirective) {\n\t var FileOver = (function (_FileDirective) {\n\t /**\r\n\t * Creates instance of {FileDrop} object\r\n\t * @param {Object} options\r\n\t * @constructor\r\n\t */\n\t\n\t function FileOver(options) {\n\t _classCallCheck(this, FileOver);\n\t\n\t var extendedOptions = extend(options, {\n\t // Map of events\n\t events: {\n\t $destroy: \"destroy\"\n\t },\n\t // Name of property inside uploader._directive object\n\t prop: \"over\",\n\t // Over class\n\t overClass: \"nv-file-over\"\n\t });\n\t\n\t _get(Object.getPrototypeOf(FileOver.prototype), \"constructor\", this).call(this, extendedOptions);\n\t }\n\t\n\t _inherits(FileOver, _FileDirective);\n\t\n\t _createClass(FileOver, {\n\t addOverClass: {\n\t /**\r\n\t * Adds over class\r\n\t */\n\t\n\t value: function addOverClass() {\n\t this.element.addClass(this.getOverClass());\n\t }\n\t },\n\t removeOverClass: {\n\t /**\r\n\t * Removes over class\r\n\t */\n\t\n\t value: function removeOverClass() {\n\t this.element.removeClass(this.getOverClass());\n\t }\n\t },\n\t getOverClass: {\n\t /**\r\n\t * Returns over class\r\n\t * @returns {String}\r\n\t */\n\t\n\t value: function getOverClass() {\n\t return this.overClass;\n\t }\n\t }\n\t });\n\t\n\t return FileOver;\n\t })(FileDirective);\n\t\n\t return FileOver;\n\t};\n\t\n\tmodule.exports.$inject = [\"FileDirective\"];\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tmodule.exports = function ($parse, FileUploader, FileSelect) {\n\t\n\t return {\n\t link: function (scope, element, attributes) {\n\t var uploader = scope.$eval(attributes.uploader);\n\t\n\t if (!(uploader instanceof FileUploader)) {\n\t throw new TypeError(\"\\\"Uploader\\\" must be an instance of FileUploader\");\n\t }\n\t\n\t var object = new FileSelect({\n\t uploader: uploader,\n\t element: element\n\t });\n\t\n\t object.getOptions = $parse(attributes.options).bind(object, scope);\n\t object.getFilters = function () {\n\t return attributes.filters;\n\t };\n\t }\n\t };\n\t};\n\t\n\tmodule.exports.$inject = [\"$parse\", \"FileUploader\", \"FileSelect\"];\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tmodule.exports = function ($parse, FileUploader, FileDrop) {\n\t\n\t return {\n\t link: function (scope, element, attributes) {\n\t var uploader = scope.$eval(attributes.uploader);\n\t\n\t if (!(uploader instanceof FileUploader)) {\n\t throw new TypeError(\"\\\"Uploader\\\" must be an instance of FileUploader\");\n\t }\n\t\n\t if (!uploader.isHTML5) return;\n\t\n\t var object = new FileDrop({\n\t uploader: uploader,\n\t element: element\n\t });\n\t\n\t object.getOptions = $parse(attributes.options).bind(object, scope);\n\t object.getFilters = function () {\n\t return attributes.filters;\n\t };\n\t }\n\t };\n\t};\n\t\n\tmodule.exports.$inject = [\"$parse\", \"FileUploader\", \"FileDrop\"];\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\t\n\tvar CONFIG = _interopRequire(__webpack_require__(2));\n\t\n\tmodule.exports = function (FileUploader, FileOver) {\n\t\n\t return {\n\t link: function (scope, element, attributes) {\n\t var uploader = scope.$eval(attributes.uploader);\n\t\n\t if (!(uploader instanceof FileUploader)) {\n\t throw new TypeError(\"\\\"Uploader\\\" must be an instance of FileUploader\");\n\t }\n\t\n\t var object = new FileOver({\n\t uploader: uploader,\n\t element: element\n\t });\n\t\n\t object.getOverClass = function () {\n\t return attributes.overClass || object.overClass;\n\t };\n\t }\n\t };\n\t};\n\t\n\tmodule.exports.$inject = [\"FileUploader\", \"FileOver\"];\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** angular-file-upload.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 2be85a13effb1c2acd03\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './config.json';\r\n\r\n\r\nimport options from './values/options'\r\n\r\n\r\nimport serviceFileUploader from './services/FileUploader';\r\nimport serviceFileLikeObject from './services/FileLikeObject';\r\nimport serviceFileItem from './services/FileItem';\r\nimport serviceFileDirective from './services/FileDirective';\r\nimport serviceFileSelect from './services/FileSelect';\r\nimport serviceFileDrop from './services/FileDrop';\r\nimport serviceFileOver from './services/FileOver';\r\n\r\n\r\nimport directiveFileSelect from './directives/FileSelect';\r\nimport directiveFileDrop from './directives/FileDrop';\r\nimport directiveFileOver from './directives/FileOver';\r\n\r\n\r\nangular\r\n .module(CONFIG.name, [])\r\n .value('fileUploaderOptions', options)\r\n .factory('FileUploader', serviceFileUploader)\r\n .factory('FileLikeObject', serviceFileLikeObject)\r\n .factory('FileItem', serviceFileItem)\r\n .factory('FileDirective', serviceFileDirective)\r\n .factory('FileSelect', serviceFileSelect)\r\n .factory('FileDrop', serviceFileDrop)\r\n .factory('FileOver', serviceFileOver)\r\n .directive('nvFileSelect', directiveFileSelect)\r\n .directive('nvFileDrop', directiveFileDrop)\r\n .directive('nvFileOver', directiveFileOver)\r\n .run([\r\n 'FileUploader',\r\n 'FileLikeObject',\r\n 'FileItem',\r\n 'FileDirective',\r\n 'FileSelect',\r\n 'FileDrop',\r\n 'FileOver',\r\n function(FileUploader, FileLikeObject, FileItem, FileDirective, FileSelect, FileDrop, FileOver) {\r\n // only for compatibility\r\n FileUploader.FileLikeObject = FileLikeObject;\r\n FileUploader.FileItem = FileItem;\r\n FileUploader.FileDirective = FileDirective;\r\n FileUploader.FileSelect = FileSelect;\r\n FileUploader.FileDrop = FileDrop;\r\n FileUploader.FileOver = FileOver;\r\n }\r\n ]);\r\n\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/index.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n extend\r\n } = angular;\r\n\r\n\r\nexport default (FileDirective) => {\r\n \r\n \r\n class FileSelect extends FileDirective {\r\n /**\r\n * Creates instance of {FileSelect} object\r\n * @param {Object} options\r\n * @constructor\r\n */\r\n constructor(options) {\r\n let extendedOptions = extend(options, {\r\n // Map of events\r\n events: {\r\n $destroy: 'destroy',\r\n change: 'onChange'\r\n },\r\n // Name of property inside uploader._directive object\r\n prop: 'select'\r\n });\r\n \r\n super(extendedOptions);\r\n \r\n if(!this.uploader.isHTML5) {\r\n this.element.removeAttr('multiple');\r\n }\r\n this.element.prop('value', null); // FF fix\r\n }\r\n /**\r\n * Returns options\r\n * @return {Object|undefined}\r\n */\r\n getOptions() {\r\n }\r\n /**\r\n * Returns filters\r\n * @return {Array<Function>|String|undefined}\r\n */\r\n getFilters() {\r\n }\r\n /**\r\n * If returns \"true\" then HTMLInputElement will be cleared\r\n * @returns {Boolean}\r\n */\r\n isEmptyAfterSelection() {\r\n return !!this.element.attr('multiple');\r\n }\r\n /**\r\n * Event handler\r\n */\r\n onChange() {\r\n var files = this.uploader.isHTML5 ? this.element[0].files : this.element[0];\r\n var options = this.getOptions();\r\n var filters = this.getFilters();\r\n\r\n if(!this.uploader.isHTML5) this.destroy();\r\n this.uploader.addToQueue(files, options, filters);\r\n if(this.isEmptyAfterSelection()) {\r\n this.element.prop('value', null);\r\n this.element.replaceWith(this.element = this.element.clone(true)); // IE fix\r\n }\r\n }\r\n }\r\n \r\n \r\n return FileSelect;\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n 'FileDirective'\r\n];\r\n\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/services/FileSelect.js\n **/","module.exports = {\n\t\"name\": \"angularFileUpload\"\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/config.json\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\r\n\r\n\r\nexport default {\r\n url: '/',\r\n alias: 'file',\r\n headers: {},\r\n queue: [],\r\n progress: 0,\r\n autoUpload: false,\r\n removeAfterUpload: false,\r\n method: 'POST',\r\n filters: [],\r\n formData: [],\r\n queueLimit: Number.MAX_VALUE,\r\n withCredentials: false\r\n};\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/values/options.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n copy,\r\n extend,\r\n forEach,\r\n isObject,\r\n isNumber,\r\n isDefined,\r\n isArray,\r\n element\r\n } = angular;\r\n\r\n\r\nexport default (fileUploaderOptions, $rootScope, $http, $window, FileLikeObject, FileItem) => {\r\n \r\n \r\n let {\r\n File,\r\n FormData\r\n } = $window;\r\n \r\n \r\n class FileUploader {\r\n /**********************\r\n * PUBLIC\r\n **********************/\r\n /**\r\n * Creates an instance of FileUploader\r\n * @param {Object} [options]\r\n * @constructor\r\n */\r\n constructor(options) {\r\n var settings = copy(fileUploaderOptions);\r\n \r\n extend(this, settings, options, {\r\n isUploading: false,\r\n _nextIndex: 0,\r\n _failFilterIndex: -1,\r\n _directives: {select: [], drop: [], over: []}\r\n });\r\n\r\n // add default filters\r\n this.filters.unshift({name: 'queueLimit', fn: this._queueLimitFilter});\r\n this.filters.unshift({name: 'folder', fn: this._folderFilter});\r\n }\r\n /**\r\n * Adds items to the queue\r\n * @param {File|HTMLInputElement|Object|FileList|Array<Object>} files\r\n * @param {Object} [options]\r\n * @param {Array<Function>|String} filters\r\n */\r\n addToQueue(files, options, filters) {\r\n var list = this.isArrayLikeObject(files) ? files: [files];\r\n var arrayOfFilters = this._getFilters(filters);\r\n var count = this.queue.length;\r\n var addedFileItems = [];\r\n\r\n forEach(list, (some /*{File|HTMLInputElement|Object}*/) => {\r\n var temp = new FileLikeObject(some);\r\n\r\n if (this._isValidFile(temp, arrayOfFilters, options)) {\r\n var fileItem = new FileItem(this, some, options);\r\n addedFileItems.push(fileItem);\r\n this.queue.push(fileItem);\r\n this._onAfterAddingFile(fileItem);\r\n } else {\r\n var filter = arrayOfFilters[this._failFilterIndex];\r\n this._onWhenAddingFileFailed(temp, filter, options);\r\n }\r\n });\r\n\r\n if(this.queue.length !== count) {\r\n this._onAfterAddingAll(addedFileItems);\r\n this.progress = this._getTotalProgress();\r\n }\r\n\r\n this._render();\r\n if (this.autoUpload) this.uploadAll();\r\n }\r\n /**\r\n * Remove items from the queue. Remove last: index = -1\r\n * @param {FileItem|Number} value\r\n */\r\n removeFromQueue(value) {\r\n var index = this.getIndexOfItem(value);\r\n var item = this.queue[index];\r\n if(item.isUploading) item.cancel();\r\n this.queue.splice(index, 1);\r\n item._destroy();\r\n this.progress = this._getTotalProgress();\r\n }\r\n /**\r\n * Clears the queue\r\n */\r\n clearQueue() {\r\n while(this.queue.length) {\r\n this.queue[0].remove();\r\n }\r\n this.progress = 0;\r\n }\r\n /**\r\n * Uploads a item from the queue\r\n * @param {FileItem|Number} value\r\n */\r\n uploadItem(value) {\r\n var index = this.getIndexOfItem(value);\r\n var item = this.queue[index];\r\n var transport = this.isHTML5 ? '_xhrTransport' : '_iframeTransport';\r\n\r\n item._prepareToUploading();\r\n if(this.isUploading) return;\r\n\r\n this.isUploading = true;\r\n this[transport](item);\r\n }\r\n /**\r\n * Cancels uploading of item from the queue\r\n * @param {FileItem|Number} value\r\n */\r\n cancelItem(value) {\r\n var index = this.getIndexOfItem(value);\r\n var item = this.queue[index];\r\n var prop = this.isHTML5 ? '_xhr' : '_form';\r\n if(item && item.isUploading) item[prop].abort();\r\n }\r\n /**\r\n * Uploads all not uploaded items of queue\r\n */\r\n uploadAll() {\r\n var items = this.getNotUploadedItems().filter(item => !item.isUploading);\r\n if(!items.length) return;\r\n\r\n forEach(items, item => item._prepareToUploading());\r\n items[0].upload();\r\n }\r\n /**\r\n * Cancels all uploads\r\n */\r\n cancelAll() {\r\n var items = this.getNotUploadedItems();\r\n forEach(items, item => item.cancel());\r\n }\r\n /**\r\n * Returns \"true\" if value an instance of File\r\n * @param {*} value\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n isFile(value) {\r\n return this.constructor.isFile(value);\r\n }\r\n /**\r\n * Returns \"true\" if value an instance of FileLikeObject\r\n * @param {*} value\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n isFileLikeObject(value) {\r\n return this.constructor.isFileLikeObject(value);\r\n }\r\n /**\r\n * Returns \"true\" if value is array like object\r\n * @param {*} value\r\n * @returns {Boolean}\r\n */\r\n isArrayLikeObject(value) {\r\n return this.constructor.isArrayLikeObject(value);\r\n }\r\n /**\r\n * Returns a index of item from the queue\r\n * @param {Item|Number} value\r\n * @returns {Number}\r\n */\r\n getIndexOfItem(value) {\r\n return isNumber(value) ? value : this.queue.indexOf(value);\r\n }\r\n /**\r\n * Returns not uploaded items\r\n * @returns {Array}\r\n */\r\n getNotUploadedItems() {\r\n return this.queue.filter(item => !item.isUploaded);\r\n }\r\n /**\r\n * Returns items ready for upload\r\n * @returns {Array}\r\n */\r\n getReadyItems() {\r\n return this.queue\r\n .filter(item => (item.isReady && !item.isUploading))\r\n .sort((item1, item2) => item1.index - item2.index);\r\n }\r\n /**\r\n * Destroys instance of FileUploader\r\n */\r\n destroy() {\r\n forEach(this._directives, (key) => {\r\n forEach(this._directives[key], (object) => {\r\n object.destroy();\r\n });\r\n });\r\n }\r\n /**\r\n * Callback\r\n * @param {Array} fileItems\r\n */\r\n onAfterAddingAll(fileItems) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} fileItem\r\n */\r\n onAfterAddingFile(fileItem) {\r\n }\r\n /**\r\n * Callback\r\n * @param {File|Object} item\r\n * @param {Object} filter\r\n * @param {Object} options\r\n */\r\n onWhenAddingFileFailed(item, filter, options) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} fileItem\r\n */\r\n onBeforeUploadItem(fileItem) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} fileItem\r\n * @param {Number} progress\r\n */\r\n onProgressItem(fileItem, progress) {\r\n }\r\n /**\r\n * Callback\r\n * @param {Number} progress\r\n */\r\n onProgressAll(progress) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onSuccessItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onErrorItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onCancelItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onCompleteItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n */\r\n onCompleteAll() {\r\n }\r\n /**********************\r\n * PRIVATE\r\n **********************/\r\n /**\r\n * Returns the total progress\r\n * @param {Number} [value]\r\n * @returns {Number}\r\n * @private\r\n */\r\n _getTotalProgress(value) {\r\n if(this.removeAfterUpload) return value || 0;\r\n\r\n var notUploaded = this.getNotUploadedItems().length;\r\n var uploaded = notUploaded ? this.queue.length - notUploaded : this.queue.length;\r\n var ratio = 100 / this.queue.length;\r\n var current = (value || 0) * ratio / 100;\r\n\r\n return Math.round(uploaded * ratio + current);\r\n }\r\n /**\r\n * Returns array of filters\r\n * @param {Array<Function>|String} filters\r\n * @returns {Array<Function>}\r\n * @private\r\n */\r\n _getFilters(filters) {\r\n if(!filters) return this.filters;\r\n if(isArray(filters)) return filters;\r\n var names = filters.match(/[^\\s,]+/g);\r\n return this.filters\r\n .filter(filter => names.indexOf(filter.name) !== -1);\r\n }\r\n /**\r\n * Updates html\r\n * @private\r\n */\r\n _render() {\r\n if(!$rootScope.$$phase) $rootScope.$apply();\r\n }\r\n /**\r\n * Returns \"true\" if item is a file (not folder)\r\n * @param {File|FileLikeObject} item\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n _folderFilter(item) {\r\n return !!(item.size || item.type);\r\n }\r\n /**\r\n * Returns \"true\" if the limit has not been reached\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n _queueLimitFilter() {\r\n return this.queue.length < this.queueLimit;\r\n }\r\n /**\r\n * Returns \"true\" if file pass all filters\r\n * @param {File|Object} file\r\n * @param {Array<Function>} filters\r\n * @param {Object} options\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n _isValidFile(file, filters, options) {\r\n this._failFilterIndex = -1;\r\n return !filters.length ? true : filters.every((filter) => {\r\n this._failFilterIndex++;\r\n return filter.fn.call(this, file, options);\r\n });\r\n }\r\n /**\r\n * Checks whether upload successful\r\n * @param {Number} status\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n _isSuccessCode(status) {\r\n return (status >= 200 && status < 300) || status === 304;\r\n }\r\n /**\r\n * Transforms the server response\r\n * @param {*} response\r\n * @param {Object} headers\r\n * @returns {*}\r\n * @private\r\n */\r\n _transformResponse(response, headers) {\r\n var headersGetter = this._headersGetter(headers);\r\n forEach($http.defaults.transformResponse, (transformFn) => {\r\n response = transformFn(response, headersGetter);\r\n });\r\n return response;\r\n }\r\n /**\r\n * Parsed response headers\r\n * @param headers\r\n * @returns {Object}\r\n * @see https://github.com/angular/angular.js/blob/master/src/ng/http.js\r\n * @private\r\n */\r\n _parseHeaders(headers) {\r\n var parsed = {}, key, val, i;\r\n\r\n if(!headers) return parsed;\r\n\r\n forEach(headers.split('\\n'), (line) => {\r\n i = line.indexOf(':');\r\n key = line.slice(0, i).trim().toLowerCase();\r\n val = line.slice(i + 1).trim();\r\n\r\n if(key) {\r\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\r\n }\r\n });\r\n\r\n return parsed;\r\n }\r\n /**\r\n * Returns function that returns headers\r\n * @param {Object} parsedHeaders\r\n * @returns {Function}\r\n * @private\r\n */\r\n _headersGetter(parsedHeaders) {\r\n return (name) => {\r\n if(name) {\r\n return parsedHeaders[name.toLowerCase()] || null;\r\n }\r\n return parsedHeaders;\r\n };\r\n }\r\n /**\r\n * The XMLHttpRequest transport\r\n * @param {FileItem} item\r\n * @private\r\n */\r\n _xhrTransport(item) {\r\n var xhr = item._xhr = new XMLHttpRequest();\r\n var form = new FormData();\r\n\r\n this._onBeforeUploadItem(item);\r\n\r\n forEach(item.formData, (obj) => {\r\n forEach(obj, (value, key) => {\r\n form.append(key, value);\r\n });\r\n });\r\n\r\n if(typeof(item._file.size) != 'number') {\r\n throw new TypeError('The file specified is no longer valid');\r\n }\r\n\r\n form.append(item.alias, item._file, item.file.name);\r\n\r\n xhr.upload.onprogress = (event) => {\r\n var progress = Math.round(event.lengthComputable ? event.loaded * 100 / event.total : 0);\r\n this._onProgressItem(item, progress);\r\n };\r\n\r\n xhr.onload = () => {\r\n var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n var response = this._transformResponse(xhr.response, headers);\r\n var gist = this._isSuccessCode(xhr.status) ? 'Success' : 'Error';\r\n var method = '_on' + gist + 'Item';\r\n this[method](item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n };\r\n\r\n xhr.onerror = () => {\r\n var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n var response = this._transformResponse(xhr.response, headers);\r\n this._onErrorItem(item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n };\r\n\r\n xhr.onabort = () => {\r\n var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n var response = this._transformResponse(xhr.response, headers);\r\n this._onCancelItem(item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n };\r\n\r\n xhr.open(item.method, item.url, true);\r\n\r\n xhr.withCredentials = item.withCredentials;\r\n\r\n forEach(item.headers, (value, name) => {\r\n xhr.setRequestHeader(name, value);\r\n });\r\n\r\n xhr.send(form);\r\n this._render();\r\n }\r\n /**\r\n * The IFrame transport\r\n * @param {FileItem} item\r\n * @private\r\n */\r\n _iframeTransport(item) {\r\n var form = element('<form style=\"display: none;\" />');\r\n var iframe = element('<iframe name=\"iframeTransport' + Date.now() + '\">');\r\n var input = item._input;\r\n\r\n if(item._form) item._form.replaceWith(input); // remove old form\r\n item._form = form; // save link to new form\r\n\r\n this._onBeforeUploadItem(item);\r\n\r\n input.prop('name', item.alias);\r\n\r\n forEach(item.formData, (obj) => {\r\n forEach(obj, (value, key) => {\r\n var element_ = element('<input type=\"hidden\" name=\"' + key + '\" />');\r\n element_.val(value);\r\n form.append(element_);\r\n });\r\n });\r\n\r\n form.prop({\r\n action: item.url,\r\n method: 'POST',\r\n target: iframe.prop('name'),\r\n enctype: 'multipart/form-data',\r\n encoding: 'multipart/form-data' // old IE\r\n });\r\n\r\n iframe.bind('load', () => {\r\n var html = '';\r\n var status = 200;\r\n\r\n try {\r\n // Fix for legacy IE browsers that loads internal error page\r\n // when failed WS response received. In consequence iframe\r\n // content access denied error is thrown becouse trying to\r\n // access cross domain page. When such thing occurs notifying\r\n // with empty response object. See more info at:\r\n // http://stackoverflow.com/questions/151362/access-is-denied-error-on-accessing-iframe-document-object\r\n // Note that if non standard 4xx or 5xx error code returned\r\n // from WS then response content can be accessed without error\r\n // but 'XHR' status becomes 200. In order to avoid confusion\r\n // returning response via same 'success' event handler.\r\n\r\n // fixed angular.contents() for iframes\r\n html = iframe[0].contentDocument.body.innerHTML;\r\n } catch(e) {\r\n // in case we run into the access-is-denied error or we have another error on the server side\r\n // (intentional 500,40... errors), we at least say 'something went wrong' -> 500\r\n status = 500;\r\n }\r\n\r\n var xhr = {response: html, status: status, dummy: true};\r\n var headers = {};\r\n var response = this._transformResponse(xhr.response, headers);\r\n\r\n this._onSuccessItem(item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n });\r\n\r\n form.abort = () => {\r\n var xhr = {status: 0, dummy: true};\r\n var headers = {};\r\n var response;\r\n\r\n iframe.unbind('load').prop('src', 'javascript:false;');\r\n form.replaceWith(input);\r\n\r\n this._onCancelItem(item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n };\r\n\r\n input.after(form);\r\n form.append(input).append(iframe);\r\n\r\n form[0].submit();\r\n this._render();\r\n }\r\n /**\r\n * Inner callback\r\n * @param {File|Object} item\r\n * @param {Object} filter\r\n * @param {Object} options\r\n * @private\r\n */\r\n _onWhenAddingFileFailed(item, filter, options) {\r\n this.onWhenAddingFileFailed(item, filter, options);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {FileItem} item\r\n */\r\n _onAfterAddingFile(item) {\r\n this.onAfterAddingFile(item);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {Array<FileItem>} items\r\n */\r\n _onAfterAddingAll(items) {\r\n this.onAfterAddingAll(items);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {FileItem} item\r\n * @private\r\n */\r\n _onBeforeUploadItem(item) {\r\n item._onBeforeUpload();\r\n this.onBeforeUploadItem(item);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {FileItem} item\r\n * @param {Number} progress\r\n * @private\r\n */\r\n _onProgressItem(item, progress) {\r\n var total = this._getTotalProgress(progress);\r\n this.progress = total;\r\n item._onProgress(progress);\r\n this.onProgressItem(item, progress);\r\n this.onProgressAll(total);\r\n this._render();\r\n }\r\n /**\r\n * Inner callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onSuccessItem(item, response, status, headers) {\r\n item._onSuccess(response, status, headers);\r\n this.onSuccessItem(item, response, status, headers);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onErrorItem(item, response, status, headers) {\r\n item._onError(response, status, headers);\r\n this.onErrorItem(item, response, status, headers);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onCancelItem(item, response, status, headers) {\r\n item._onCancel(response, status, headers);\r\n this.onCancelItem(item, response, status, headers);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onCompleteItem(item, response, status, headers) {\r\n item._onComplete(response, status, headers);\r\n this.onCompleteItem(item, response, status, headers);\r\n\r\n var nextItem = this.getReadyItems()[0];\r\n this.isUploading = false;\r\n\r\n if(isDefined(nextItem)) {\r\n nextItem.upload();\r\n return;\r\n }\r\n\r\n this.onCompleteAll();\r\n this.progress = this._getTotalProgress();\r\n this._render();\r\n }\r\n /**********************\r\n * STATIC\r\n **********************/\r\n /**\r\n * Returns \"true\" if value an instance of File\r\n * @param {*} value\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n static isFile(value) {\r\n return (File && value instanceof File);\r\n }\r\n /**\r\n * Returns \"true\" if value an instance of FileLikeObject\r\n * @param {*} value\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n static isFileLikeObject(value) {\r\n return value instanceof FileLikeObject;\r\n }\r\n /**\r\n * Returns \"true\" if value is array like object\r\n * @param {*} value\r\n * @returns {Boolean}\r\n */\r\n static isArrayLikeObject(value) {\r\n return (isObject(value) && 'length' in value);\r\n }\r\n /**\r\n * Inherits a target (Class_1) by a source (Class_2)\r\n * @param {Function} target\r\n * @param {Function} source\r\n */\r\n static inherit(target, source) {\r\n target.prototype = Object.create(source.prototype);\r\n target.prototype.constructor = target;\r\n target.super_ = source;\r\n }\r\n }\r\n\r\n\r\n /**********************\r\n * PUBLIC\r\n **********************/\r\n /**\r\n * Checks a support the html5 uploader\r\n * @returns {Boolean}\r\n * @readonly\r\n */\r\n FileUploader.prototype.isHTML5 = !!(File && FormData);\r\n /**********************\r\n * STATIC\r\n **********************/\r\n /**\r\n * @borrows FileUploader.prototype.isHTML5\r\n */\r\n FileUploader.isHTML5 = FileUploader.prototype.isHTML5;\r\n\r\n \r\n return FileUploader;\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n 'fileUploaderOptions', \r\n '$rootScope', \r\n '$http', \r\n '$window',\r\n 'FileLikeObject',\r\n 'FileItem'\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/services/FileUploader.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n copy,\r\n isElement,\r\n isString\r\n } = angular;\r\n\r\n\r\nexport default () => {\r\n \r\n \r\n class FileLikeObject {\r\n /**\r\n * Creates an instance of FileLikeObject\r\n * @param {File|HTMLInputElement|Object} fileOrInput\r\n * @constructor\r\n */\r\n constructor(fileOrInput) {\r\n var isInput = isElement(fileOrInput);\r\n var fakePathOrObject = isInput ? fileOrInput.value : fileOrInput;\r\n var postfix = isString(fakePathOrObject) ? 'FakePath' : 'Object';\r\n var method = '_createFrom' + postfix;\r\n this[method](fakePathOrObject);\r\n }\r\n /**\r\n * Creates file like object from fake path string\r\n * @param {String} path\r\n * @private\r\n */\r\n _createFromFakePath(path) {\r\n this.lastModifiedDate = null;\r\n this.size = null;\r\n this.type = 'like/' + path.slice(path.lastIndexOf('.') + 1).toLowerCase();\r\n this.name = path.slice(path.lastIndexOf('/') + path.lastIndexOf('\\\\') + 2);\r\n }\r\n /**\r\n * Creates file like object from object\r\n * @param {File|FileLikeObject} object\r\n * @private\r\n */\r\n _createFromObject(object) {\r\n this.lastModifiedDate = copy(object.lastModifiedDate);\r\n this.size = object.size;\r\n this.type = object.type;\r\n this.name = object.name;\r\n }\r\n }\r\n \r\n \r\n return FileLikeObject;\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/services/FileLikeObject.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n copy,\r\n extend,\r\n element,\r\n isElement\r\n } = angular;\r\n\r\n\r\nexport default ($compile, FileLikeObject) => {\r\n \r\n \r\n class FileItem {\r\n /**\r\n * Creates an instance of FileItem\r\n * @param {FileUploader} uploader\r\n * @param {File|HTMLInputElement|Object} some\r\n * @param {Object} options\r\n * @constructor\r\n */\r\n constructor(uploader, some, options) {\r\n var isInput = isElement(some);\r\n var input = isInput ? element(some) : null;\r\n var file = !isInput ? some : null;\r\n\r\n extend(this, {\r\n url: uploader.url,\r\n alias: uploader.alias,\r\n headers: copy(uploader.headers),\r\n formData: copy(uploader.formData),\r\n removeAfterUpload: uploader.removeAfterUpload,\r\n withCredentials: uploader.withCredentials,\r\n method: uploader.method\r\n }, options, {\r\n uploader: uploader,\r\n file: new FileLikeObject(some),\r\n isReady: false,\r\n isUploading: false,\r\n isUploaded: false,\r\n isSuccess: false,\r\n isCancel: false,\r\n isError: false,\r\n progress: 0,\r\n index: null,\r\n _file: file,\r\n _input: input\r\n });\r\n\r\n if (input) this._replaceNode(input);\r\n }\r\n /**********************\r\n * PUBLIC\r\n **********************/\r\n /**\r\n * Uploads a FileItem\r\n */\r\n upload() {\r\n try {\r\n this.uploader.uploadItem(this);\r\n } catch(e) {\r\n this.uploader._onCompleteItem(this, '', 0, []);\r\n this.uploader._onErrorItem(this, '', 0, []);\r\n }\r\n }\r\n /**\r\n * Cancels uploading of FileItem\r\n */\r\n cancel() {\r\n this.uploader.cancelItem(this);\r\n }\r\n /**\r\n * Removes a FileItem\r\n */\r\n remove() {\r\n this.uploader.removeFromQueue(this);\r\n }\r\n /**\r\n * Callback\r\n * @private\r\n */\r\n onBeforeUpload() {\r\n }\r\n /**\r\n * Callback\r\n * @param {Number} progress\r\n * @private\r\n */\r\n onProgress(progress) {\r\n }\r\n /**\r\n * Callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onSuccess(response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onError(response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onCancel(response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onComplete(response, status, headers) {\r\n }\r\n /**********************\r\n * PRIVATE\r\n **********************/\r\n /**\r\n * Inner callback\r\n */\r\n _onBeforeUpload() {\r\n this.isReady = true;\r\n this.isUploading = true;\r\n this.isUploaded = false;\r\n this.isSuccess = false;\r\n this.isCancel = false;\r\n this.isError = false;\r\n this.progress = 0;\r\n this.onBeforeUpload();\r\n }\r\n /**\r\n * Inner callback\r\n * @param {Number} progress\r\n * @private\r\n */\r\n _onProgress(progress) {\r\n this.progress = progress;\r\n this.onProgress(progress);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onSuccess(response, status, headers) {\r\n this.isReady = false;\r\n this.isUploading = false;\r\n this.isUploaded = true;\r\n this.isSuccess = true;\r\n this.isCancel = false;\r\n this.isError = false;\r\n this.progress = 100;\r\n this.index = null;\r\n this.onSuccess(response, status, headers);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onError(response, status, headers) {\r\n this.isReady = false;\r\n this.isUploading = false;\r\n this.isUploaded = true;\r\n this.isSuccess = false;\r\n this.isCancel = false;\r\n this.isError = true;\r\n this.progress = 0;\r\n this.index = null;\r\n this.onError(response, status, headers);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onCancel(response, status, headers) {\r\n this.isReady = false;\r\n this.isUploading = false;\r\n this.isUploaded = false;\r\n this.isSuccess = false;\r\n this.isCancel = true;\r\n this.isError = false;\r\n this.progress = 0;\r\n this.index = null;\r\n this.onCancel(response, status, headers);\r\n }\r\n /**\r\n * Inner callback\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n * @private\r\n */\r\n _onComplete(response, status, headers) {\r\n this.onComplete(response, status, headers);\r\n if(this.removeAfterUpload) this.remove();\r\n }\r\n /**\r\n * Destroys a FileItem\r\n */\r\n _destroy() {\r\n if(this._input) this._input.remove();\r\n if(this._form) this._form.remove();\r\n delete this._form;\r\n delete this._input;\r\n }\r\n /**\r\n * Prepares to uploading\r\n * @private\r\n */\r\n _prepareToUploading() {\r\n this.index = this.index || ++this.uploader._nextIndex;\r\n this.isReady = true;\r\n }\r\n /**\r\n * Replaces input element on his clone\r\n * @param {JQLite|jQuery} input\r\n * @private\r\n */\r\n _replaceNode(input) {\r\n var clone = $compile(input.clone())(input.scope());\r\n clone.prop('value', null); // FF fix\r\n input.css('display', 'none');\r\n input.after(clone); // remove jquery dependency\r\n }\r\n\r\n }\r\n \r\n \r\n return FileItem;\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n '$compile',\r\n 'FileLikeObject'\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/services/FileItem.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n extend\r\n } = angular;\r\n\r\n\r\nexport default () => {\r\n\r\n\r\n class FileDirective {\r\n /**\r\n * Creates instance of {FileDirective} object\r\n * @param {Object} options\r\n * @param {Object} options.uploader\r\n * @param {HTMLElement} options.element\r\n * @param {Object} options.events\r\n * @param {String} options.prop\r\n * @constructor\r\n */\r\n constructor(options) {\r\n extend(this, options);\r\n this.uploader._directives[this.prop].push(this);\r\n this._saveLinks();\r\n this.bind();\r\n }\r\n /**\r\n * Binds events handles\r\n */\r\n bind() {\r\n for(var key in this.events) {\r\n var prop = this.events[key];\r\n this.element.bind(key, this[prop]);\r\n }\r\n }\r\n /**\r\n * Unbinds events handles\r\n */\r\n unbind() {\r\n for(var key in this.events) {\r\n this.element.unbind(key, this.events[key]);\r\n }\r\n }\r\n /**\r\n * Destroys directive\r\n */\r\n destroy() {\r\n var index = this.uploader._directives[this.prop].indexOf(this);\r\n this.uploader._directives[this.prop].splice(index, 1);\r\n this.unbind();\r\n // this.element = null;\r\n }\r\n /**\r\n * Saves links to functions\r\n * @private\r\n */\r\n _saveLinks() {\r\n for(var key in this.events) {\r\n var prop = this.events[key];\r\n this[prop] = this[prop].bind(this);\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Map of events\r\n * @type {Object}\r\n */\r\n FileDirective.prototype.events = {};\r\n\r\n\r\n return FileDirective;\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/services/FileDirective.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n extend,\r\n forEach\r\n } = angular;\r\n\r\n\r\nexport default (FileDirective) => {\r\n \r\n \r\n class FileDrop extends FileDirective {\r\n /**\r\n * Creates instance of {FileDrop} object\r\n * @param {Object} options\r\n * @constructor\r\n */\r\n constructor(options) {\r\n let extendedOptions = extend(options, {\r\n // Map of events\r\n events: {\r\n $destroy: 'destroy',\r\n drop: 'onDrop',\r\n dragover: 'onDragOver',\r\n dragleave: 'onDragLeave'\r\n },\r\n // Name of property inside uploader._directive object\r\n prop: 'drop'\r\n });\r\n \r\n super(extendedOptions);\r\n }\r\n /**\r\n * Returns options\r\n * @return {Object|undefined}\r\n */\r\n getOptions() {\r\n }\r\n /**\r\n * Returns filters\r\n * @return {Array<Function>|String|undefined}\r\n */\r\n getFilters() {\r\n }\r\n /**\r\n * Event handler\r\n */\r\n onDrop(event) {\r\n var transfer = this._getTransfer(event);\r\n if(!transfer) return;\r\n var options = this.getOptions();\r\n var filters = this.getFilters();\r\n this._preventAndStop(event);\r\n forEach(this.uploader._directives.over, this._removeOverClass, this);\r\n this.uploader.addToQueue(transfer.files, options, filters);\r\n }\r\n /**\r\n * Event handler\r\n */\r\n onDragOver(event) {\r\n var transfer = this._getTransfer(event);\r\n if(!this._haveFiles(transfer.types)) return;\r\n transfer.dropEffect = 'copy';\r\n this._preventAndStop(event);\r\n forEach(this.uploader._directives.over, this._addOverClass, this);\r\n }\r\n /**\r\n * Event handler\r\n */\r\n onDragLeave(event) {\r\n if(event.currentTarget === this.element[0]) return;\r\n this._preventAndStop(event);\r\n forEach(this.uploader._directives.over, this._removeOverClass, this);\r\n }\r\n /**\r\n * Helper\r\n */\r\n _getTransfer(event) {\r\n return event.dataTransfer ? event.dataTransfer : event.originalEvent.dataTransfer; // jQuery fix;\r\n }\r\n /**\r\n * Helper\r\n */\r\n _preventAndStop(event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n /**\r\n * Returns \"true\" if types contains files\r\n * @param {Object} types\r\n */\r\n _haveFiles(types) {\r\n if(!types) return false;\r\n if(types.indexOf) {\r\n return types.indexOf('Files') !== -1;\r\n } else if(types.contains) {\r\n return types.contains('Files');\r\n } else {\r\n return false;\r\n }\r\n }\r\n /**\r\n * Callback\r\n */\r\n _addOverClass(item) {\r\n item.addOverClass();\r\n }\r\n /**\r\n * Callback\r\n */\r\n _removeOverClass(item) {\r\n item.removeOverClass();\r\n }\r\n }\r\n \r\n \r\n return FileDrop;\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n 'FileDirective'\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/services/FileDrop.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n extend\r\n } = angular;\r\n\r\n\r\nexport default (FileDirective) => {\r\n \r\n \r\n class FileOver extends FileDirective {\r\n /**\r\n * Creates instance of {FileDrop} object\r\n * @param {Object} options\r\n * @constructor\r\n */\r\n constructor(options) {\r\n let extendedOptions = extend(options, {\r\n // Map of events\r\n events: {\r\n $destroy: 'destroy'\r\n },\r\n // Name of property inside uploader._directive object\r\n prop: 'over',\r\n // Over class\r\n overClass: 'nv-file-over'\r\n });\r\n \r\n super(extendedOptions);\r\n }\r\n /**\r\n * Adds over class\r\n */\r\n addOverClass() {\r\n this.element.addClass(this.getOverClass());\r\n }\r\n /**\r\n * Removes over class\r\n */\r\n removeOverClass() {\r\n this.element.removeClass(this.getOverClass());\r\n }\r\n /**\r\n * Returns over class\r\n * @returns {String}\r\n */\r\n getOverClass() {\r\n return this.overClass;\r\n }\r\n }\r\n \r\n \r\n return FileOver;\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n 'FileDirective'\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/services/FileOver.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nexport default ($parse, FileUploader, FileSelect) => {\r\n\r\n\r\n return {\r\n link: (scope, element, attributes) => {\r\n var uploader = scope.$eval(attributes.uploader);\r\n\r\n if (!(uploader instanceof FileUploader)) {\r\n throw new TypeError('\"Uploader\" must be an instance of FileUploader');\r\n }\r\n\r\n var object = new FileSelect({\r\n uploader: uploader,\r\n element: element\r\n });\r\n\r\n object.getOptions = $parse(attributes.options).bind(object, scope);\r\n object.getFilters = () => attributes.filters;\r\n }\r\n };\r\n\r\n\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n '$parse',\r\n 'FileUploader',\r\n 'FileSelect'\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/directives/FileSelect.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nexport default ($parse, FileUploader, FileDrop) => {\r\n\r\n\r\n return {\r\n link: (scope, element, attributes) => {\r\n var uploader = scope.$eval(attributes.uploader);\r\n\r\n if (!(uploader instanceof FileUploader)) {\r\n throw new TypeError('\"Uploader\" must be an instance of FileUploader');\r\n }\r\n\r\n if (!uploader.isHTML5) return;\r\n\r\n var object = new FileDrop({\r\n uploader: uploader,\r\n element: element\r\n });\r\n\r\n object.getOptions = $parse(attributes.options).bind(object, scope);\r\n object.getFilters = () => attributes.filters;\r\n }\r\n };\r\n\r\n\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n '$parse',\r\n 'FileUploader',\r\n 'FileDrop'\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/directives/FileDrop.js\n **/","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nexport default (FileUploader, FileOver) => {\r\n\r\n\r\n return {\r\n link: (scope, element, attributes) => {\r\n var uploader = scope.$eval(attributes.uploader);\r\n\r\n if (!(uploader instanceof FileUploader)) {\r\n throw new TypeError('\"Uploader\" must be an instance of FileUploader');\r\n }\r\n\r\n var object = new FileOver({\r\n uploader: uploader,\r\n element: element\r\n });\r\n\r\n object.getOverClass = () => attributes.overClass || object.overClass;\r\n }\r\n };\r\n\r\n\r\n}\r\n\r\n\r\nmodule.exports.$inject = [\r\n 'FileUploader',\r\n 'FileOver'\r\n];\n\n\n/** WEBPACK FOOTER **\n ** c:/OpenServer/domains/angular-file-upload.my/src/directives/FileOver.js\n **/"],"sourceRoot":""} | |
| 0 | 2 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/gulpfile.js
0 → 100644
| 1 | + | |
| 2 | + | |
| 3 | +var pkg = require('./package.json'); | |
| 4 | +// https://github.com/gulpjs/gulp/blob/master/docs/README.md | |
| 5 | +var gulp = require('gulp'); | |
| 6 | +// http://webpack.github.io/docs/ | |
| 7 | +var webpack = require('webpack'); | |
| 8 | +// https://github.com/shama/webpack-stream | |
| 9 | +var webpackStream = require('webpack-stream'); | |
| 10 | + | |
| 11 | + | |
| 12 | +gulp.task( | |
| 13 | + pkg.name + '/build', | |
| 14 | + function() { | |
| 15 | + return gulp | |
| 16 | + .src('./src/index.js') | |
| 17 | + .pipe(webpackStream({ | |
| 18 | + module: { | |
| 19 | + loaders: [ | |
| 20 | + // https://github.com/babel/babel-loader | |
| 21 | + {test: /\.js$/, loader: 'babel'}, | |
| 22 | + // https://github.com/webpack/json-loader | |
| 23 | + {test: /\.json$/, loader: 'json'}, | |
| 24 | + // https://github.com/webpack/html-loader | |
| 25 | + {test: /\.html$/, loader: 'html'} | |
| 26 | + ] | |
| 27 | + }, | |
| 28 | + plugins: [ | |
| 29 | + // http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin | |
| 30 | + new webpack.optimize.UglifyJsPlugin({ | |
| 31 | + compress: { | |
| 32 | + warnings: false | |
| 33 | + } | |
| 34 | + }), | |
| 35 | + // http://webpack.github.io/docs/list-of-plugins.html#bannerplugin | |
| 36 | + new webpack.BannerPlugin( | |
| 37 | + '/*\n' + | |
| 38 | + ' ' + pkg.name + ' v' + pkg.version + '\n' + | |
| 39 | + ' ' + pkg.homepage + '\n' + | |
| 40 | + '*/\n' | |
| 41 | + , { | |
| 42 | + entryOnly: true, | |
| 43 | + raw: true | |
| 44 | + }) | |
| 45 | + ], | |
| 46 | + devtool: 'source-map', | |
| 47 | + debug: true, | |
| 48 | + output: { | |
| 49 | + library: pkg.name, | |
| 50 | + libraryTarget: 'umd', | |
| 51 | + filename: pkg.name + '.min.js' | |
| 52 | + } | |
| 53 | + })) | |
| 54 | + .pipe(gulp.dest('./dist')); | |
| 55 | + } | |
| 56 | +); | |
| 57 | + | |
| 58 | + | |
| 59 | +gulp.task( | |
| 60 | + pkg.name + '/watch', function() { | |
| 61 | + return gulp | |
| 62 | + .watch( | |
| 63 | + [ | |
| 64 | + './src/**/*.js', | |
| 65 | + './src/**/*.json', | |
| 66 | + './src/**/*.html' | |
| 67 | + ], | |
| 68 | + [ | |
| 69 | + pkg.name + '/build' | |
| 70 | + ] | |
| 71 | + ); | |
| 72 | + } | |
| 73 | +); | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/license.txt
0 → 100644
| 1 | +The MIT License | |
| 2 | + | |
| 3 | +Copyright (c) 2013 nerv. https://github.com/nervgh | |
| 4 | + | |
| 5 | +Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | +of this software and associated documentation files (the "Software"), to deal | |
| 7 | +in the Software without restriction, including without limitation the rights | |
| 8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 9 | +copies of the Software, and to permit persons to whom the Software is | |
| 10 | +furnished to do so, subject to the following conditions: | |
| 11 | + | |
| 12 | +The above copyright notice and this permission notice shall be included in | |
| 13 | +all copies or substantial portions of the Software. | |
| 14 | + | |
| 15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 21 | +THE SOFTWARE. | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/package.json
0 → 100644
| 1 | +{ | |
| 2 | + "name": "angular-file-upload", | |
| 3 | + "version": "2.1.4", | |
| 4 | + "homepage": "https://github.com/nervgh/angular-file-upload", | |
| 5 | + "description": "Angular File Upload is a module for the AngularJS framework", | |
| 6 | + "author": { | |
| 7 | + "name": "nerv", | |
| 8 | + "url": "https://github.com/nervgh" | |
| 9 | + }, | |
| 10 | + "main": "dist/angular-file-upload.min.js", | |
| 11 | + "devDependencies": { | |
| 12 | + "babel": "^4.7.16", | |
| 13 | + "babel-loader": "^4.0.0", | |
| 14 | + "json-loader": "^0.5.1", | |
| 15 | + "html-loader": "^0.2.3", | |
| 16 | + "gulp": "^3.9.0", | |
| 17 | + "webpack": "^1.10.1", | |
| 18 | + "webpack-stream": "^2.0.0" | |
| 19 | + } | |
| 20 | +} | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/config.json
0 → 100644
src/main/resources/static/assets/bower_components/angular-file-upload/src/directives/FileDrop.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +export default ($parse, FileUploader, FileDrop) => { | |
| 8 | + | |
| 9 | + | |
| 10 | + return { | |
| 11 | + link: (scope, element, attributes) => { | |
| 12 | + var uploader = scope.$eval(attributes.uploader); | |
| 13 | + | |
| 14 | + if (!(uploader instanceof FileUploader)) { | |
| 15 | + throw new TypeError('"Uploader" must be an instance of FileUploader'); | |
| 16 | + } | |
| 17 | + | |
| 18 | + if (!uploader.isHTML5) return; | |
| 19 | + | |
| 20 | + var object = new FileDrop({ | |
| 21 | + uploader: uploader, | |
| 22 | + element: element | |
| 23 | + }); | |
| 24 | + | |
| 25 | + object.getOptions = $parse(attributes.options).bind(object, scope); | |
| 26 | + object.getFilters = () => attributes.filters; | |
| 27 | + } | |
| 28 | + }; | |
| 29 | + | |
| 30 | + | |
| 31 | +} | |
| 32 | + | |
| 33 | + | |
| 34 | +module.exports.$inject = [ | |
| 35 | + '$parse', | |
| 36 | + 'FileUploader', | |
| 37 | + 'FileDrop' | |
| 38 | +]; | |
| 0 | 39 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/directives/FileOver.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +export default (FileUploader, FileOver) => { | |
| 8 | + | |
| 9 | + | |
| 10 | + return { | |
| 11 | + link: (scope, element, attributes) => { | |
| 12 | + var uploader = scope.$eval(attributes.uploader); | |
| 13 | + | |
| 14 | + if (!(uploader instanceof FileUploader)) { | |
| 15 | + throw new TypeError('"Uploader" must be an instance of FileUploader'); | |
| 16 | + } | |
| 17 | + | |
| 18 | + var object = new FileOver({ | |
| 19 | + uploader: uploader, | |
| 20 | + element: element | |
| 21 | + }); | |
| 22 | + | |
| 23 | + object.getOverClass = () => attributes.overClass || object.overClass; | |
| 24 | + } | |
| 25 | + }; | |
| 26 | + | |
| 27 | + | |
| 28 | +} | |
| 29 | + | |
| 30 | + | |
| 31 | +module.exports.$inject = [ | |
| 32 | + 'FileUploader', | |
| 33 | + 'FileOver' | |
| 34 | +]; | |
| 0 | 35 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/directives/FileSelect.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +export default ($parse, FileUploader, FileSelect) => { | |
| 8 | + | |
| 9 | + | |
| 10 | + return { | |
| 11 | + link: (scope, element, attributes) => { | |
| 12 | + var uploader = scope.$eval(attributes.uploader); | |
| 13 | + | |
| 14 | + if (!(uploader instanceof FileUploader)) { | |
| 15 | + throw new TypeError('"Uploader" must be an instance of FileUploader'); | |
| 16 | + } | |
| 17 | + | |
| 18 | + var object = new FileSelect({ | |
| 19 | + uploader: uploader, | |
| 20 | + element: element | |
| 21 | + }); | |
| 22 | + | |
| 23 | + object.getOptions = $parse(attributes.options).bind(object, scope); | |
| 24 | + object.getFilters = () => attributes.filters; | |
| 25 | + } | |
| 26 | + }; | |
| 27 | + | |
| 28 | + | |
| 29 | +} | |
| 30 | + | |
| 31 | + | |
| 32 | +module.exports.$inject = [ | |
| 33 | + '$parse', | |
| 34 | + 'FileUploader', | |
| 35 | + 'FileSelect' | |
| 36 | +]; | |
| 0 | 37 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/index.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +import options from './values/options' | |
| 8 | + | |
| 9 | + | |
| 10 | +import serviceFileUploader from './services/FileUploader'; | |
| 11 | +import serviceFileLikeObject from './services/FileLikeObject'; | |
| 12 | +import serviceFileItem from './services/FileItem'; | |
| 13 | +import serviceFileDirective from './services/FileDirective'; | |
| 14 | +import serviceFileSelect from './services/FileSelect'; | |
| 15 | +import serviceFileDrop from './services/FileDrop'; | |
| 16 | +import serviceFileOver from './services/FileOver'; | |
| 17 | + | |
| 18 | + | |
| 19 | +import directiveFileSelect from './directives/FileSelect'; | |
| 20 | +import directiveFileDrop from './directives/FileDrop'; | |
| 21 | +import directiveFileOver from './directives/FileOver'; | |
| 22 | + | |
| 23 | + | |
| 24 | +angular | |
| 25 | + .module(CONFIG.name, []) | |
| 26 | + .value('fileUploaderOptions', options) | |
| 27 | + .factory('FileUploader', serviceFileUploader) | |
| 28 | + .factory('FileLikeObject', serviceFileLikeObject) | |
| 29 | + .factory('FileItem', serviceFileItem) | |
| 30 | + .factory('FileDirective', serviceFileDirective) | |
| 31 | + .factory('FileSelect', serviceFileSelect) | |
| 32 | + .factory('FileDrop', serviceFileDrop) | |
| 33 | + .factory('FileOver', serviceFileOver) | |
| 34 | + .directive('nvFileSelect', directiveFileSelect) | |
| 35 | + .directive('nvFileDrop', directiveFileDrop) | |
| 36 | + .directive('nvFileOver', directiveFileOver) | |
| 37 | + .run([ | |
| 38 | + 'FileUploader', | |
| 39 | + 'FileLikeObject', | |
| 40 | + 'FileItem', | |
| 41 | + 'FileDirective', | |
| 42 | + 'FileSelect', | |
| 43 | + 'FileDrop', | |
| 44 | + 'FileOver', | |
| 45 | + function(FileUploader, FileLikeObject, FileItem, FileDirective, FileSelect, FileDrop, FileOver) { | |
| 46 | + // only for compatibility | |
| 47 | + FileUploader.FileLikeObject = FileLikeObject; | |
| 48 | + FileUploader.FileItem = FileItem; | |
| 49 | + FileUploader.FileDirective = FileDirective; | |
| 50 | + FileUploader.FileSelect = FileSelect; | |
| 51 | + FileUploader.FileDrop = FileDrop; | |
| 52 | + FileUploader.FileOver = FileOver; | |
| 53 | + } | |
| 54 | + ]); | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileDirective.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +let { | |
| 8 | + extend | |
| 9 | + } = angular; | |
| 10 | + | |
| 11 | + | |
| 12 | +export default () => { | |
| 13 | + | |
| 14 | + | |
| 15 | + class FileDirective { | |
| 16 | + /** | |
| 17 | + * Creates instance of {FileDirective} object | |
| 18 | + * @param {Object} options | |
| 19 | + * @param {Object} options.uploader | |
| 20 | + * @param {HTMLElement} options.element | |
| 21 | + * @param {Object} options.events | |
| 22 | + * @param {String} options.prop | |
| 23 | + * @constructor | |
| 24 | + */ | |
| 25 | + constructor(options) { | |
| 26 | + extend(this, options); | |
| 27 | + this.uploader._directives[this.prop].push(this); | |
| 28 | + this._saveLinks(); | |
| 29 | + this.bind(); | |
| 30 | + } | |
| 31 | + /** | |
| 32 | + * Binds events handles | |
| 33 | + */ | |
| 34 | + bind() { | |
| 35 | + for(var key in this.events) { | |
| 36 | + var prop = this.events[key]; | |
| 37 | + this.element.bind(key, this[prop]); | |
| 38 | + } | |
| 39 | + } | |
| 40 | + /** | |
| 41 | + * Unbinds events handles | |
| 42 | + */ | |
| 43 | + unbind() { | |
| 44 | + for(var key in this.events) { | |
| 45 | + this.element.unbind(key, this.events[key]); | |
| 46 | + } | |
| 47 | + } | |
| 48 | + /** | |
| 49 | + * Destroys directive | |
| 50 | + */ | |
| 51 | + destroy() { | |
| 52 | + var index = this.uploader._directives[this.prop].indexOf(this); | |
| 53 | + this.uploader._directives[this.prop].splice(index, 1); | |
| 54 | + this.unbind(); | |
| 55 | + // this.element = null; | |
| 56 | + } | |
| 57 | + /** | |
| 58 | + * Saves links to functions | |
| 59 | + * @private | |
| 60 | + */ | |
| 61 | + _saveLinks() { | |
| 62 | + for(var key in this.events) { | |
| 63 | + var prop = this.events[key]; | |
| 64 | + this[prop] = this[prop].bind(this); | |
| 65 | + } | |
| 66 | + } | |
| 67 | + } | |
| 68 | + | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * Map of events | |
| 72 | + * @type {Object} | |
| 73 | + */ | |
| 74 | + FileDirective.prototype.events = {}; | |
| 75 | + | |
| 76 | + | |
| 77 | + return FileDirective; | |
| 78 | +} | |
| 79 | + | |
| 80 | + | |
| 81 | +module.exports.$inject = [ | |
| 82 | +]; | |
| 0 | 83 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileDrop.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +let { | |
| 8 | + extend, | |
| 9 | + forEach | |
| 10 | + } = angular; | |
| 11 | + | |
| 12 | + | |
| 13 | +export default (FileDirective) => { | |
| 14 | + | |
| 15 | + | |
| 16 | + class FileDrop extends FileDirective { | |
| 17 | + /** | |
| 18 | + * Creates instance of {FileDrop} object | |
| 19 | + * @param {Object} options | |
| 20 | + * @constructor | |
| 21 | + */ | |
| 22 | + constructor(options) { | |
| 23 | + let extendedOptions = extend(options, { | |
| 24 | + // Map of events | |
| 25 | + events: { | |
| 26 | + $destroy: 'destroy', | |
| 27 | + drop: 'onDrop', | |
| 28 | + dragover: 'onDragOver', | |
| 29 | + dragleave: 'onDragLeave' | |
| 30 | + }, | |
| 31 | + // Name of property inside uploader._directive object | |
| 32 | + prop: 'drop' | |
| 33 | + }); | |
| 34 | + | |
| 35 | + super(extendedOptions); | |
| 36 | + } | |
| 37 | + /** | |
| 38 | + * Returns options | |
| 39 | + * @return {Object|undefined} | |
| 40 | + */ | |
| 41 | + getOptions() { | |
| 42 | + } | |
| 43 | + /** | |
| 44 | + * Returns filters | |
| 45 | + * @return {Array<Function>|String|undefined} | |
| 46 | + */ | |
| 47 | + getFilters() { | |
| 48 | + } | |
| 49 | + /** | |
| 50 | + * Event handler | |
| 51 | + */ | |
| 52 | + onDrop(event) { | |
| 53 | + var transfer = this._getTransfer(event); | |
| 54 | + if(!transfer) return; | |
| 55 | + var options = this.getOptions(); | |
| 56 | + var filters = this.getFilters(); | |
| 57 | + this._preventAndStop(event); | |
| 58 | + forEach(this.uploader._directives.over, this._removeOverClass, this); | |
| 59 | + this.uploader.addToQueue(transfer.files, options, filters); | |
| 60 | + } | |
| 61 | + /** | |
| 62 | + * Event handler | |
| 63 | + */ | |
| 64 | + onDragOver(event) { | |
| 65 | + var transfer = this._getTransfer(event); | |
| 66 | + if(!this._haveFiles(transfer.types)) return; | |
| 67 | + transfer.dropEffect = 'copy'; | |
| 68 | + this._preventAndStop(event); | |
| 69 | + forEach(this.uploader._directives.over, this._addOverClass, this); | |
| 70 | + } | |
| 71 | + /** | |
| 72 | + * Event handler | |
| 73 | + */ | |
| 74 | + onDragLeave(event) { | |
| 75 | + if(event.currentTarget === this.element[0]) return; | |
| 76 | + this._preventAndStop(event); | |
| 77 | + forEach(this.uploader._directives.over, this._removeOverClass, this); | |
| 78 | + } | |
| 79 | + /** | |
| 80 | + * Helper | |
| 81 | + */ | |
| 82 | + _getTransfer(event) { | |
| 83 | + return event.dataTransfer ? event.dataTransfer : event.originalEvent.dataTransfer; // jQuery fix; | |
| 84 | + } | |
| 85 | + /** | |
| 86 | + * Helper | |
| 87 | + */ | |
| 88 | + _preventAndStop(event) { | |
| 89 | + event.preventDefault(); | |
| 90 | + event.stopPropagation(); | |
| 91 | + } | |
| 92 | + /** | |
| 93 | + * Returns "true" if types contains files | |
| 94 | + * @param {Object} types | |
| 95 | + */ | |
| 96 | + _haveFiles(types) { | |
| 97 | + if(!types) return false; | |
| 98 | + if(types.indexOf) { | |
| 99 | + return types.indexOf('Files') !== -1; | |
| 100 | + } else if(types.contains) { | |
| 101 | + return types.contains('Files'); | |
| 102 | + } else { | |
| 103 | + return false; | |
| 104 | + } | |
| 105 | + } | |
| 106 | + /** | |
| 107 | + * Callback | |
| 108 | + */ | |
| 109 | + _addOverClass(item) { | |
| 110 | + item.addOverClass(); | |
| 111 | + } | |
| 112 | + /** | |
| 113 | + * Callback | |
| 114 | + */ | |
| 115 | + _removeOverClass(item) { | |
| 116 | + item.removeOverClass(); | |
| 117 | + } | |
| 118 | + } | |
| 119 | + | |
| 120 | + | |
| 121 | + return FileDrop; | |
| 122 | +} | |
| 123 | + | |
| 124 | + | |
| 125 | +module.exports.$inject = [ | |
| 126 | + 'FileDirective' | |
| 127 | +]; | |
| 0 | 128 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileItem.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +let { | |
| 8 | + copy, | |
| 9 | + extend, | |
| 10 | + element, | |
| 11 | + isElement | |
| 12 | + } = angular; | |
| 13 | + | |
| 14 | + | |
| 15 | +export default ($compile, FileLikeObject) => { | |
| 16 | + | |
| 17 | + | |
| 18 | + class FileItem { | |
| 19 | + /** | |
| 20 | + * Creates an instance of FileItem | |
| 21 | + * @param {FileUploader} uploader | |
| 22 | + * @param {File|HTMLInputElement|Object} some | |
| 23 | + * @param {Object} options | |
| 24 | + * @constructor | |
| 25 | + */ | |
| 26 | + constructor(uploader, some, options) { | |
| 27 | + var isInput = isElement(some); | |
| 28 | + var input = isInput ? element(some) : null; | |
| 29 | + var file = !isInput ? some : null; | |
| 30 | + | |
| 31 | + extend(this, { | |
| 32 | + url: uploader.url, | |
| 33 | + alias: uploader.alias, | |
| 34 | + headers: copy(uploader.headers), | |
| 35 | + formData: copy(uploader.formData), | |
| 36 | + removeAfterUpload: uploader.removeAfterUpload, | |
| 37 | + withCredentials: uploader.withCredentials, | |
| 38 | + method: uploader.method | |
| 39 | + }, options, { | |
| 40 | + uploader: uploader, | |
| 41 | + file: new FileLikeObject(some), | |
| 42 | + isReady: false, | |
| 43 | + isUploading: false, | |
| 44 | + isUploaded: false, | |
| 45 | + isSuccess: false, | |
| 46 | + isCancel: false, | |
| 47 | + isError: false, | |
| 48 | + progress: 0, | |
| 49 | + index: null, | |
| 50 | + _file: file, | |
| 51 | + _input: input | |
| 52 | + }); | |
| 53 | + | |
| 54 | + if (input) this._replaceNode(input); | |
| 55 | + } | |
| 56 | + /********************** | |
| 57 | + * PUBLIC | |
| 58 | + **********************/ | |
| 59 | + /** | |
| 60 | + * Uploads a FileItem | |
| 61 | + */ | |
| 62 | + upload() { | |
| 63 | + try { | |
| 64 | + this.uploader.uploadItem(this); | |
| 65 | + } catch(e) { | |
| 66 | + this.uploader._onCompleteItem(this, '', 0, []); | |
| 67 | + this.uploader._onErrorItem(this, '', 0, []); | |
| 68 | + } | |
| 69 | + } | |
| 70 | + /** | |
| 71 | + * Cancels uploading of FileItem | |
| 72 | + */ | |
| 73 | + cancel() { | |
| 74 | + this.uploader.cancelItem(this); | |
| 75 | + } | |
| 76 | + /** | |
| 77 | + * Removes a FileItem | |
| 78 | + */ | |
| 79 | + remove() { | |
| 80 | + this.uploader.removeFromQueue(this); | |
| 81 | + } | |
| 82 | + /** | |
| 83 | + * Callback | |
| 84 | + * @private | |
| 85 | + */ | |
| 86 | + onBeforeUpload() { | |
| 87 | + } | |
| 88 | + /** | |
| 89 | + * Callback | |
| 90 | + * @param {Number} progress | |
| 91 | + * @private | |
| 92 | + */ | |
| 93 | + onProgress(progress) { | |
| 94 | + } | |
| 95 | + /** | |
| 96 | + * Callback | |
| 97 | + * @param {*} response | |
| 98 | + * @param {Number} status | |
| 99 | + * @param {Object} headers | |
| 100 | + */ | |
| 101 | + onSuccess(response, status, headers) { | |
| 102 | + } | |
| 103 | + /** | |
| 104 | + * Callback | |
| 105 | + * @param {*} response | |
| 106 | + * @param {Number} status | |
| 107 | + * @param {Object} headers | |
| 108 | + */ | |
| 109 | + onError(response, status, headers) { | |
| 110 | + } | |
| 111 | + /** | |
| 112 | + * Callback | |
| 113 | + * @param {*} response | |
| 114 | + * @param {Number} status | |
| 115 | + * @param {Object} headers | |
| 116 | + */ | |
| 117 | + onCancel(response, status, headers) { | |
| 118 | + } | |
| 119 | + /** | |
| 120 | + * Callback | |
| 121 | + * @param {*} response | |
| 122 | + * @param {Number} status | |
| 123 | + * @param {Object} headers | |
| 124 | + */ | |
| 125 | + onComplete(response, status, headers) { | |
| 126 | + } | |
| 127 | + /********************** | |
| 128 | + * PRIVATE | |
| 129 | + **********************/ | |
| 130 | + /** | |
| 131 | + * Inner callback | |
| 132 | + */ | |
| 133 | + _onBeforeUpload() { | |
| 134 | + this.isReady = true; | |
| 135 | + this.isUploading = true; | |
| 136 | + this.isUploaded = false; | |
| 137 | + this.isSuccess = false; | |
| 138 | + this.isCancel = false; | |
| 139 | + this.isError = false; | |
| 140 | + this.progress = 0; | |
| 141 | + this.onBeforeUpload(); | |
| 142 | + } | |
| 143 | + /** | |
| 144 | + * Inner callback | |
| 145 | + * @param {Number} progress | |
| 146 | + * @private | |
| 147 | + */ | |
| 148 | + _onProgress(progress) { | |
| 149 | + this.progress = progress; | |
| 150 | + this.onProgress(progress); | |
| 151 | + } | |
| 152 | + /** | |
| 153 | + * Inner callback | |
| 154 | + * @param {*} response | |
| 155 | + * @param {Number} status | |
| 156 | + * @param {Object} headers | |
| 157 | + * @private | |
| 158 | + */ | |
| 159 | + _onSuccess(response, status, headers) { | |
| 160 | + this.isReady = false; | |
| 161 | + this.isUploading = false; | |
| 162 | + this.isUploaded = true; | |
| 163 | + this.isSuccess = true; | |
| 164 | + this.isCancel = false; | |
| 165 | + this.isError = false; | |
| 166 | + this.progress = 100; | |
| 167 | + this.index = null; | |
| 168 | + this.onSuccess(response, status, headers); | |
| 169 | + } | |
| 170 | + /** | |
| 171 | + * Inner callback | |
| 172 | + * @param {*} response | |
| 173 | + * @param {Number} status | |
| 174 | + * @param {Object} headers | |
| 175 | + * @private | |
| 176 | + */ | |
| 177 | + _onError(response, status, headers) { | |
| 178 | + this.isReady = false; | |
| 179 | + this.isUploading = false; | |
| 180 | + this.isUploaded = true; | |
| 181 | + this.isSuccess = false; | |
| 182 | + this.isCancel = false; | |
| 183 | + this.isError = true; | |
| 184 | + this.progress = 0; | |
| 185 | + this.index = null; | |
| 186 | + this.onError(response, status, headers); | |
| 187 | + } | |
| 188 | + /** | |
| 189 | + * Inner callback | |
| 190 | + * @param {*} response | |
| 191 | + * @param {Number} status | |
| 192 | + * @param {Object} headers | |
| 193 | + * @private | |
| 194 | + */ | |
| 195 | + _onCancel(response, status, headers) { | |
| 196 | + this.isReady = false; | |
| 197 | + this.isUploading = false; | |
| 198 | + this.isUploaded = false; | |
| 199 | + this.isSuccess = false; | |
| 200 | + this.isCancel = true; | |
| 201 | + this.isError = false; | |
| 202 | + this.progress = 0; | |
| 203 | + this.index = null; | |
| 204 | + this.onCancel(response, status, headers); | |
| 205 | + } | |
| 206 | + /** | |
| 207 | + * Inner callback | |
| 208 | + * @param {*} response | |
| 209 | + * @param {Number} status | |
| 210 | + * @param {Object} headers | |
| 211 | + * @private | |
| 212 | + */ | |
| 213 | + _onComplete(response, status, headers) { | |
| 214 | + this.onComplete(response, status, headers); | |
| 215 | + if(this.removeAfterUpload) this.remove(); | |
| 216 | + } | |
| 217 | + /** | |
| 218 | + * Destroys a FileItem | |
| 219 | + */ | |
| 220 | + _destroy() { | |
| 221 | + if(this._input) this._input.remove(); | |
| 222 | + if(this._form) this._form.remove(); | |
| 223 | + delete this._form; | |
| 224 | + delete this._input; | |
| 225 | + } | |
| 226 | + /** | |
| 227 | + * Prepares to uploading | |
| 228 | + * @private | |
| 229 | + */ | |
| 230 | + _prepareToUploading() { | |
| 231 | + this.index = this.index || ++this.uploader._nextIndex; | |
| 232 | + this.isReady = true; | |
| 233 | + } | |
| 234 | + /** | |
| 235 | + * Replaces input element on his clone | |
| 236 | + * @param {JQLite|jQuery} input | |
| 237 | + * @private | |
| 238 | + */ | |
| 239 | + _replaceNode(input) { | |
| 240 | + var clone = $compile(input.clone())(input.scope()); | |
| 241 | + clone.prop('value', null); // FF fix | |
| 242 | + input.css('display', 'none'); | |
| 243 | + input.after(clone); // remove jquery dependency | |
| 244 | + } | |
| 245 | + | |
| 246 | + } | |
| 247 | + | |
| 248 | + | |
| 249 | + return FileItem; | |
| 250 | +} | |
| 251 | + | |
| 252 | + | |
| 253 | +module.exports.$inject = [ | |
| 254 | + '$compile', | |
| 255 | + 'FileLikeObject' | |
| 256 | +]; | |
| 0 | 257 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileLikeObject.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +let { | |
| 8 | + copy, | |
| 9 | + isElement, | |
| 10 | + isString | |
| 11 | + } = angular; | |
| 12 | + | |
| 13 | + | |
| 14 | +export default () => { | |
| 15 | + | |
| 16 | + | |
| 17 | + class FileLikeObject { | |
| 18 | + /** | |
| 19 | + * Creates an instance of FileLikeObject | |
| 20 | + * @param {File|HTMLInputElement|Object} fileOrInput | |
| 21 | + * @constructor | |
| 22 | + */ | |
| 23 | + constructor(fileOrInput) { | |
| 24 | + var isInput = isElement(fileOrInput); | |
| 25 | + var fakePathOrObject = isInput ? fileOrInput.value : fileOrInput; | |
| 26 | + var postfix = isString(fakePathOrObject) ? 'FakePath' : 'Object'; | |
| 27 | + var method = '_createFrom' + postfix; | |
| 28 | + this[method](fakePathOrObject); | |
| 29 | + } | |
| 30 | + /** | |
| 31 | + * Creates file like object from fake path string | |
| 32 | + * @param {String} path | |
| 33 | + * @private | |
| 34 | + */ | |
| 35 | + _createFromFakePath(path) { | |
| 36 | + this.lastModifiedDate = null; | |
| 37 | + this.size = null; | |
| 38 | + this.type = 'like/' + path.slice(path.lastIndexOf('.') + 1).toLowerCase(); | |
| 39 | + this.name = path.slice(path.lastIndexOf('/') + path.lastIndexOf('\\') + 2); | |
| 40 | + } | |
| 41 | + /** | |
| 42 | + * Creates file like object from object | |
| 43 | + * @param {File|FileLikeObject} object | |
| 44 | + * @private | |
| 45 | + */ | |
| 46 | + _createFromObject(object) { | |
| 47 | + this.lastModifiedDate = copy(object.lastModifiedDate); | |
| 48 | + this.size = object.size; | |
| 49 | + this.type = object.type; | |
| 50 | + this.name = object.name; | |
| 51 | + } | |
| 52 | + } | |
| 53 | + | |
| 54 | + | |
| 55 | + return FileLikeObject; | |
| 56 | +} | |
| 57 | + | |
| 58 | + | |
| 59 | +module.exports.$inject = [ | |
| 60 | +]; | |
| 0 | 61 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileOver.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +let { | |
| 8 | + extend | |
| 9 | + } = angular; | |
| 10 | + | |
| 11 | + | |
| 12 | +export default (FileDirective) => { | |
| 13 | + | |
| 14 | + | |
| 15 | + class FileOver extends FileDirective { | |
| 16 | + /** | |
| 17 | + * Creates instance of {FileDrop} object | |
| 18 | + * @param {Object} options | |
| 19 | + * @constructor | |
| 20 | + */ | |
| 21 | + constructor(options) { | |
| 22 | + let extendedOptions = extend(options, { | |
| 23 | + // Map of events | |
| 24 | + events: { | |
| 25 | + $destroy: 'destroy' | |
| 26 | + }, | |
| 27 | + // Name of property inside uploader._directive object | |
| 28 | + prop: 'over', | |
| 29 | + // Over class | |
| 30 | + overClass: 'nv-file-over' | |
| 31 | + }); | |
| 32 | + | |
| 33 | + super(extendedOptions); | |
| 34 | + } | |
| 35 | + /** | |
| 36 | + * Adds over class | |
| 37 | + */ | |
| 38 | + addOverClass() { | |
| 39 | + this.element.addClass(this.getOverClass()); | |
| 40 | + } | |
| 41 | + /** | |
| 42 | + * Removes over class | |
| 43 | + */ | |
| 44 | + removeOverClass() { | |
| 45 | + this.element.removeClass(this.getOverClass()); | |
| 46 | + } | |
| 47 | + /** | |
| 48 | + * Returns over class | |
| 49 | + * @returns {String} | |
| 50 | + */ | |
| 51 | + getOverClass() { | |
| 52 | + return this.overClass; | |
| 53 | + } | |
| 54 | + } | |
| 55 | + | |
| 56 | + | |
| 57 | + return FileOver; | |
| 58 | +} | |
| 59 | + | |
| 60 | + | |
| 61 | +module.exports.$inject = [ | |
| 62 | + 'FileDirective' | |
| 63 | +]; | |
| 0 | 64 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileSelect.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +let { | |
| 8 | + extend | |
| 9 | + } = angular; | |
| 10 | + | |
| 11 | + | |
| 12 | +export default (FileDirective) => { | |
| 13 | + | |
| 14 | + | |
| 15 | + class FileSelect extends FileDirective { | |
| 16 | + /** | |
| 17 | + * Creates instance of {FileSelect} object | |
| 18 | + * @param {Object} options | |
| 19 | + * @constructor | |
| 20 | + */ | |
| 21 | + constructor(options) { | |
| 22 | + let extendedOptions = extend(options, { | |
| 23 | + // Map of events | |
| 24 | + events: { | |
| 25 | + $destroy: 'destroy', | |
| 26 | + change: 'onChange' | |
| 27 | + }, | |
| 28 | + // Name of property inside uploader._directive object | |
| 29 | + prop: 'select' | |
| 30 | + }); | |
| 31 | + | |
| 32 | + super(extendedOptions); | |
| 33 | + | |
| 34 | + if(!this.uploader.isHTML5) { | |
| 35 | + this.element.removeAttr('multiple'); | |
| 36 | + } | |
| 37 | + this.element.prop('value', null); // FF fix | |
| 38 | + } | |
| 39 | + /** | |
| 40 | + * Returns options | |
| 41 | + * @return {Object|undefined} | |
| 42 | + */ | |
| 43 | + getOptions() { | |
| 44 | + } | |
| 45 | + /** | |
| 46 | + * Returns filters | |
| 47 | + * @return {Array<Function>|String|undefined} | |
| 48 | + */ | |
| 49 | + getFilters() { | |
| 50 | + } | |
| 51 | + /** | |
| 52 | + * If returns "true" then HTMLInputElement will be cleared | |
| 53 | + * @returns {Boolean} | |
| 54 | + */ | |
| 55 | + isEmptyAfterSelection() { | |
| 56 | + return !!this.element.attr('multiple'); | |
| 57 | + } | |
| 58 | + /** | |
| 59 | + * Event handler | |
| 60 | + */ | |
| 61 | + onChange() { | |
| 62 | + var files = this.uploader.isHTML5 ? this.element[0].files : this.element[0]; | |
| 63 | + var options = this.getOptions(); | |
| 64 | + var filters = this.getFilters(); | |
| 65 | + | |
| 66 | + if(!this.uploader.isHTML5) this.destroy(); | |
| 67 | + this.uploader.addToQueue(files, options, filters); | |
| 68 | + if(this.isEmptyAfterSelection()) { | |
| 69 | + this.element.prop('value', null); | |
| 70 | + this.element.replaceWith(this.element = this.element.clone(true)); // IE fix | |
| 71 | + } | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + | |
| 76 | + return FileSelect; | |
| 77 | +} | |
| 78 | + | |
| 79 | + | |
| 80 | +module.exports.$inject = [ | |
| 81 | + 'FileDirective' | |
| 82 | +]; | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileUploader.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +import CONFIG from './../config.json'; | |
| 5 | + | |
| 6 | + | |
| 7 | +let { | |
| 8 | + copy, | |
| 9 | + extend, | |
| 10 | + forEach, | |
| 11 | + isObject, | |
| 12 | + isNumber, | |
| 13 | + isDefined, | |
| 14 | + isArray, | |
| 15 | + element | |
| 16 | + } = angular; | |
| 17 | + | |
| 18 | + | |
| 19 | +export default (fileUploaderOptions, $rootScope, $http, $window, FileLikeObject, FileItem) => { | |
| 20 | + | |
| 21 | + | |
| 22 | + let { | |
| 23 | + File, | |
| 24 | + FormData | |
| 25 | + } = $window; | |
| 26 | + | |
| 27 | + | |
| 28 | + class FileUploader { | |
| 29 | + /********************** | |
| 30 | + * PUBLIC | |
| 31 | + **********************/ | |
| 32 | + /** | |
| 33 | + * Creates an instance of FileUploader | |
| 34 | + * @param {Object} [options] | |
| 35 | + * @constructor | |
| 36 | + */ | |
| 37 | + constructor(options) { | |
| 38 | + var settings = copy(fileUploaderOptions); | |
| 39 | + | |
| 40 | + extend(this, settings, options, { | |
| 41 | + isUploading: false, | |
| 42 | + _nextIndex: 0, | |
| 43 | + _failFilterIndex: -1, | |
| 44 | + _directives: {select: [], drop: [], over: []} | |
| 45 | + }); | |
| 46 | + | |
| 47 | + // add default filters | |
| 48 | + this.filters.unshift({name: 'queueLimit', fn: this._queueLimitFilter}); | |
| 49 | + this.filters.unshift({name: 'folder', fn: this._folderFilter}); | |
| 50 | + } | |
| 51 | + /** | |
| 52 | + * Adds items to the queue | |
| 53 | + * @param {File|HTMLInputElement|Object|FileList|Array<Object>} files | |
| 54 | + * @param {Object} [options] | |
| 55 | + * @param {Array<Function>|String} filters | |
| 56 | + */ | |
| 57 | + addToQueue(files, options, filters) { | |
| 58 | + var list = this.isArrayLikeObject(files) ? files: [files]; | |
| 59 | + var arrayOfFilters = this._getFilters(filters); | |
| 60 | + var count = this.queue.length; | |
| 61 | + var addedFileItems = []; | |
| 62 | + | |
| 63 | + forEach(list, (some /*{File|HTMLInputElement|Object}*/) => { | |
| 64 | + var temp = new FileLikeObject(some); | |
| 65 | + | |
| 66 | + if (this._isValidFile(temp, arrayOfFilters, options)) { | |
| 67 | + var fileItem = new FileItem(this, some, options); | |
| 68 | + addedFileItems.push(fileItem); | |
| 69 | + this.queue.push(fileItem); | |
| 70 | + this._onAfterAddingFile(fileItem); | |
| 71 | + } else { | |
| 72 | + var filter = arrayOfFilters[this._failFilterIndex]; | |
| 73 | + this._onWhenAddingFileFailed(temp, filter, options); | |
| 74 | + } | |
| 75 | + }); | |
| 76 | + | |
| 77 | + if(this.queue.length !== count) { | |
| 78 | + this._onAfterAddingAll(addedFileItems); | |
| 79 | + this.progress = this._getTotalProgress(); | |
| 80 | + } | |
| 81 | + | |
| 82 | + this._render(); | |
| 83 | + if (this.autoUpload) this.uploadAll(); | |
| 84 | + } | |
| 85 | + /** | |
| 86 | + * Remove items from the queue. Remove last: index = -1 | |
| 87 | + * @param {FileItem|Number} value | |
| 88 | + */ | |
| 89 | + removeFromQueue(value) { | |
| 90 | + var index = this.getIndexOfItem(value); | |
| 91 | + var item = this.queue[index]; | |
| 92 | + if(item.isUploading) item.cancel(); | |
| 93 | + this.queue.splice(index, 1); | |
| 94 | + item._destroy(); | |
| 95 | + this.progress = this._getTotalProgress(); | |
| 96 | + } | |
| 97 | + /** | |
| 98 | + * Clears the queue | |
| 99 | + */ | |
| 100 | + clearQueue() { | |
| 101 | + while(this.queue.length) { | |
| 102 | + this.queue[0].remove(); | |
| 103 | + } | |
| 104 | + this.progress = 0; | |
| 105 | + } | |
| 106 | + /** | |
| 107 | + * Uploads a item from the queue | |
| 108 | + * @param {FileItem|Number} value | |
| 109 | + */ | |
| 110 | + uploadItem(value) { | |
| 111 | + var index = this.getIndexOfItem(value); | |
| 112 | + var item = this.queue[index]; | |
| 113 | + var transport = this.isHTML5 ? '_xhrTransport' : '_iframeTransport'; | |
| 114 | + | |
| 115 | + item._prepareToUploading(); | |
| 116 | + if(this.isUploading) return; | |
| 117 | + | |
| 118 | + this.isUploading = true; | |
| 119 | + this[transport](item); | |
| 120 | + } | |
| 121 | + /** | |
| 122 | + * Cancels uploading of item from the queue | |
| 123 | + * @param {FileItem|Number} value | |
| 124 | + */ | |
| 125 | + cancelItem(value) { | |
| 126 | + var index = this.getIndexOfItem(value); | |
| 127 | + var item = this.queue[index]; | |
| 128 | + var prop = this.isHTML5 ? '_xhr' : '_form'; | |
| 129 | + if(item && item.isUploading) item[prop].abort(); | |
| 130 | + } | |
| 131 | + /** | |
| 132 | + * Uploads all not uploaded items of queue | |
| 133 | + */ | |
| 134 | + uploadAll() { | |
| 135 | + var items = this.getNotUploadedItems().filter(item => !item.isUploading); | |
| 136 | + if(!items.length) return; | |
| 137 | + | |
| 138 | + forEach(items, item => item._prepareToUploading()); | |
| 139 | + items[0].upload(); | |
| 140 | + } | |
| 141 | + /** | |
| 142 | + * Cancels all uploads | |
| 143 | + */ | |
| 144 | + cancelAll() { | |
| 145 | + var items = this.getNotUploadedItems(); | |
| 146 | + forEach(items, item => item.cancel()); | |
| 147 | + } | |
| 148 | + /** | |
| 149 | + * Returns "true" if value an instance of File | |
| 150 | + * @param {*} value | |
| 151 | + * @returns {Boolean} | |
| 152 | + * @private | |
| 153 | + */ | |
| 154 | + isFile(value) { | |
| 155 | + return this.constructor.isFile(value); | |
| 156 | + } | |
| 157 | + /** | |
| 158 | + * Returns "true" if value an instance of FileLikeObject | |
| 159 | + * @param {*} value | |
| 160 | + * @returns {Boolean} | |
| 161 | + * @private | |
| 162 | + */ | |
| 163 | + isFileLikeObject(value) { | |
| 164 | + return this.constructor.isFileLikeObject(value); | |
| 165 | + } | |
| 166 | + /** | |
| 167 | + * Returns "true" if value is array like object | |
| 168 | + * @param {*} value | |
| 169 | + * @returns {Boolean} | |
| 170 | + */ | |
| 171 | + isArrayLikeObject(value) { | |
| 172 | + return this.constructor.isArrayLikeObject(value); | |
| 173 | + } | |
| 174 | + /** | |
| 175 | + * Returns a index of item from the queue | |
| 176 | + * @param {Item|Number} value | |
| 177 | + * @returns {Number} | |
| 178 | + */ | |
| 179 | + getIndexOfItem(value) { | |
| 180 | + return isNumber(value) ? value : this.queue.indexOf(value); | |
| 181 | + } | |
| 182 | + /** | |
| 183 | + * Returns not uploaded items | |
| 184 | + * @returns {Array} | |
| 185 | + */ | |
| 186 | + getNotUploadedItems() { | |
| 187 | + return this.queue.filter(item => !item.isUploaded); | |
| 188 | + } | |
| 189 | + /** | |
| 190 | + * Returns items ready for upload | |
| 191 | + * @returns {Array} | |
| 192 | + */ | |
| 193 | + getReadyItems() { | |
| 194 | + return this.queue | |
| 195 | + .filter(item => (item.isReady && !item.isUploading)) | |
| 196 | + .sort((item1, item2) => item1.index - item2.index); | |
| 197 | + } | |
| 198 | + /** | |
| 199 | + * Destroys instance of FileUploader | |
| 200 | + */ | |
| 201 | + destroy() { | |
| 202 | + forEach(this._directives, (key) => { | |
| 203 | + forEach(this._directives[key], (object) => { | |
| 204 | + object.destroy(); | |
| 205 | + }); | |
| 206 | + }); | |
| 207 | + } | |
| 208 | + /** | |
| 209 | + * Callback | |
| 210 | + * @param {Array} fileItems | |
| 211 | + */ | |
| 212 | + onAfterAddingAll(fileItems) { | |
| 213 | + } | |
| 214 | + /** | |
| 215 | + * Callback | |
| 216 | + * @param {FileItem} fileItem | |
| 217 | + */ | |
| 218 | + onAfterAddingFile(fileItem) { | |
| 219 | + } | |
| 220 | + /** | |
| 221 | + * Callback | |
| 222 | + * @param {File|Object} item | |
| 223 | + * @param {Object} filter | |
| 224 | + * @param {Object} options | |
| 225 | + */ | |
| 226 | + onWhenAddingFileFailed(item, filter, options) { | |
| 227 | + } | |
| 228 | + /** | |
| 229 | + * Callback | |
| 230 | + * @param {FileItem} fileItem | |
| 231 | + */ | |
| 232 | + onBeforeUploadItem(fileItem) { | |
| 233 | + } | |
| 234 | + /** | |
| 235 | + * Callback | |
| 236 | + * @param {FileItem} fileItem | |
| 237 | + * @param {Number} progress | |
| 238 | + */ | |
| 239 | + onProgressItem(fileItem, progress) { | |
| 240 | + } | |
| 241 | + /** | |
| 242 | + * Callback | |
| 243 | + * @param {Number} progress | |
| 244 | + */ | |
| 245 | + onProgressAll(progress) { | |
| 246 | + } | |
| 247 | + /** | |
| 248 | + * Callback | |
| 249 | + * @param {FileItem} item | |
| 250 | + * @param {*} response | |
| 251 | + * @param {Number} status | |
| 252 | + * @param {Object} headers | |
| 253 | + */ | |
| 254 | + onSuccessItem(item, response, status, headers) { | |
| 255 | + } | |
| 256 | + /** | |
| 257 | + * Callback | |
| 258 | + * @param {FileItem} item | |
| 259 | + * @param {*} response | |
| 260 | + * @param {Number} status | |
| 261 | + * @param {Object} headers | |
| 262 | + */ | |
| 263 | + onErrorItem(item, response, status, headers) { | |
| 264 | + } | |
| 265 | + /** | |
| 266 | + * Callback | |
| 267 | + * @param {FileItem} item | |
| 268 | + * @param {*} response | |
| 269 | + * @param {Number} status | |
| 270 | + * @param {Object} headers | |
| 271 | + */ | |
| 272 | + onCancelItem(item, response, status, headers) { | |
| 273 | + } | |
| 274 | + /** | |
| 275 | + * Callback | |
| 276 | + * @param {FileItem} item | |
| 277 | + * @param {*} response | |
| 278 | + * @param {Number} status | |
| 279 | + * @param {Object} headers | |
| 280 | + */ | |
| 281 | + onCompleteItem(item, response, status, headers) { | |
| 282 | + } | |
| 283 | + /** | |
| 284 | + * Callback | |
| 285 | + */ | |
| 286 | + onCompleteAll() { | |
| 287 | + } | |
| 288 | + /********************** | |
| 289 | + * PRIVATE | |
| 290 | + **********************/ | |
| 291 | + /** | |
| 292 | + * Returns the total progress | |
| 293 | + * @param {Number} [value] | |
| 294 | + * @returns {Number} | |
| 295 | + * @private | |
| 296 | + */ | |
| 297 | + _getTotalProgress(value) { | |
| 298 | + if(this.removeAfterUpload) return value || 0; | |
| 299 | + | |
| 300 | + var notUploaded = this.getNotUploadedItems().length; | |
| 301 | + var uploaded = notUploaded ? this.queue.length - notUploaded : this.queue.length; | |
| 302 | + var ratio = 100 / this.queue.length; | |
| 303 | + var current = (value || 0) * ratio / 100; | |
| 304 | + | |
| 305 | + return Math.round(uploaded * ratio + current); | |
| 306 | + } | |
| 307 | + /** | |
| 308 | + * Returns array of filters | |
| 309 | + * @param {Array<Function>|String} filters | |
| 310 | + * @returns {Array<Function>} | |
| 311 | + * @private | |
| 312 | + */ | |
| 313 | + _getFilters(filters) { | |
| 314 | + if(!filters) return this.filters; | |
| 315 | + if(isArray(filters)) return filters; | |
| 316 | + var names = filters.match(/[^\s,]+/g); | |
| 317 | + return this.filters | |
| 318 | + .filter(filter => names.indexOf(filter.name) !== -1); | |
| 319 | + } | |
| 320 | + /** | |
| 321 | + * Updates html | |
| 322 | + * @private | |
| 323 | + */ | |
| 324 | + _render() { | |
| 325 | + if(!$rootScope.$$phase) $rootScope.$apply(); | |
| 326 | + } | |
| 327 | + /** | |
| 328 | + * Returns "true" if item is a file (not folder) | |
| 329 | + * @param {File|FileLikeObject} item | |
| 330 | + * @returns {Boolean} | |
| 331 | + * @private | |
| 332 | + */ | |
| 333 | + _folderFilter(item) { | |
| 334 | + return !!(item.size || item.type); | |
| 335 | + } | |
| 336 | + /** | |
| 337 | + * Returns "true" if the limit has not been reached | |
| 338 | + * @returns {Boolean} | |
| 339 | + * @private | |
| 340 | + */ | |
| 341 | + _queueLimitFilter() { | |
| 342 | + return this.queue.length < this.queueLimit; | |
| 343 | + } | |
| 344 | + /** | |
| 345 | + * Returns "true" if file pass all filters | |
| 346 | + * @param {File|Object} file | |
| 347 | + * @param {Array<Function>} filters | |
| 348 | + * @param {Object} options | |
| 349 | + * @returns {Boolean} | |
| 350 | + * @private | |
| 351 | + */ | |
| 352 | + _isValidFile(file, filters, options) { | |
| 353 | + this._failFilterIndex = -1; | |
| 354 | + return !filters.length ? true : filters.every((filter) => { | |
| 355 | + this._failFilterIndex++; | |
| 356 | + return filter.fn.call(this, file, options); | |
| 357 | + }); | |
| 358 | + } | |
| 359 | + /** | |
| 360 | + * Checks whether upload successful | |
| 361 | + * @param {Number} status | |
| 362 | + * @returns {Boolean} | |
| 363 | + * @private | |
| 364 | + */ | |
| 365 | + _isSuccessCode(status) { | |
| 366 | + return (status >= 200 && status < 300) || status === 304; | |
| 367 | + } | |
| 368 | + /** | |
| 369 | + * Transforms the server response | |
| 370 | + * @param {*} response | |
| 371 | + * @param {Object} headers | |
| 372 | + * @returns {*} | |
| 373 | + * @private | |
| 374 | + */ | |
| 375 | + _transformResponse(response, headers) { | |
| 376 | + var headersGetter = this._headersGetter(headers); | |
| 377 | + forEach($http.defaults.transformResponse, (transformFn) => { | |
| 378 | + response = transformFn(response, headersGetter); | |
| 379 | + }); | |
| 380 | + return response; | |
| 381 | + } | |
| 382 | + /** | |
| 383 | + * Parsed response headers | |
| 384 | + * @param headers | |
| 385 | + * @returns {Object} | |
| 386 | + * @see https://github.com/angular/angular.js/blob/master/src/ng/http.js | |
| 387 | + * @private | |
| 388 | + */ | |
| 389 | + _parseHeaders(headers) { | |
| 390 | + var parsed = {}, key, val, i; | |
| 391 | + | |
| 392 | + if(!headers) return parsed; | |
| 393 | + | |
| 394 | + forEach(headers.split('\n'), (line) => { | |
| 395 | + i = line.indexOf(':'); | |
| 396 | + key = line.slice(0, i).trim().toLowerCase(); | |
| 397 | + val = line.slice(i + 1).trim(); | |
| 398 | + | |
| 399 | + if(key) { | |
| 400 | + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; | |
| 401 | + } | |
| 402 | + }); | |
| 403 | + | |
| 404 | + return parsed; | |
| 405 | + } | |
| 406 | + /** | |
| 407 | + * Returns function that returns headers | |
| 408 | + * @param {Object} parsedHeaders | |
| 409 | + * @returns {Function} | |
| 410 | + * @private | |
| 411 | + */ | |
| 412 | + _headersGetter(parsedHeaders) { | |
| 413 | + return (name) => { | |
| 414 | + if(name) { | |
| 415 | + return parsedHeaders[name.toLowerCase()] || null; | |
| 416 | + } | |
| 417 | + return parsedHeaders; | |
| 418 | + }; | |
| 419 | + } | |
| 420 | + /** | |
| 421 | + * The XMLHttpRequest transport | |
| 422 | + * @param {FileItem} item | |
| 423 | + * @private | |
| 424 | + */ | |
| 425 | + _xhrTransport(item) { | |
| 426 | + var xhr = item._xhr = new XMLHttpRequest(); | |
| 427 | + var form = new FormData(); | |
| 428 | + | |
| 429 | + this._onBeforeUploadItem(item); | |
| 430 | + | |
| 431 | + forEach(item.formData, (obj) => { | |
| 432 | + forEach(obj, (value, key) => { | |
| 433 | + form.append(key, value); | |
| 434 | + }); | |
| 435 | + }); | |
| 436 | + | |
| 437 | + if(typeof(item._file.size) != 'number') { | |
| 438 | + throw new TypeError('The file specified is no longer valid'); | |
| 439 | + } | |
| 440 | + | |
| 441 | + form.append(item.alias, item._file, item.file.name); | |
| 442 | + | |
| 443 | + xhr.upload.onprogress = (event) => { | |
| 444 | + var progress = Math.round(event.lengthComputable ? event.loaded * 100 / event.total : 0); | |
| 445 | + this._onProgressItem(item, progress); | |
| 446 | + }; | |
| 447 | + | |
| 448 | + xhr.onload = () => { | |
| 449 | + var headers = this._parseHeaders(xhr.getAllResponseHeaders()); | |
| 450 | + var response = this._transformResponse(xhr.response, headers); | |
| 451 | + var gist = this._isSuccessCode(xhr.status) ? 'Success' : 'Error'; | |
| 452 | + var method = '_on' + gist + 'Item'; | |
| 453 | + this[method](item, response, xhr.status, headers); | |
| 454 | + this._onCompleteItem(item, response, xhr.status, headers); | |
| 455 | + }; | |
| 456 | + | |
| 457 | + xhr.onerror = () => { | |
| 458 | + var headers = this._parseHeaders(xhr.getAllResponseHeaders()); | |
| 459 | + var response = this._transformResponse(xhr.response, headers); | |
| 460 | + this._onErrorItem(item, response, xhr.status, headers); | |
| 461 | + this._onCompleteItem(item, response, xhr.status, headers); | |
| 462 | + }; | |
| 463 | + | |
| 464 | + xhr.onabort = () => { | |
| 465 | + var headers = this._parseHeaders(xhr.getAllResponseHeaders()); | |
| 466 | + var response = this._transformResponse(xhr.response, headers); | |
| 467 | + this._onCancelItem(item, response, xhr.status, headers); | |
| 468 | + this._onCompleteItem(item, response, xhr.status, headers); | |
| 469 | + }; | |
| 470 | + | |
| 471 | + xhr.open(item.method, item.url, true); | |
| 472 | + | |
| 473 | + xhr.withCredentials = item.withCredentials; | |
| 474 | + | |
| 475 | + forEach(item.headers, (value, name) => { | |
| 476 | + xhr.setRequestHeader(name, value); | |
| 477 | + }); | |
| 478 | + | |
| 479 | + xhr.send(form); | |
| 480 | + this._render(); | |
| 481 | + } | |
| 482 | + /** | |
| 483 | + * The IFrame transport | |
| 484 | + * @param {FileItem} item | |
| 485 | + * @private | |
| 486 | + */ | |
| 487 | + _iframeTransport(item) { | |
| 488 | + var form = element('<form style="display: none;" />'); | |
| 489 | + var iframe = element('<iframe name="iframeTransport' + Date.now() + '">'); | |
| 490 | + var input = item._input; | |
| 491 | + | |
| 492 | + if(item._form) item._form.replaceWith(input); // remove old form | |
| 493 | + item._form = form; // save link to new form | |
| 494 | + | |
| 495 | + this._onBeforeUploadItem(item); | |
| 496 | + | |
| 497 | + input.prop('name', item.alias); | |
| 498 | + | |
| 499 | + forEach(item.formData, (obj) => { | |
| 500 | + forEach(obj, (value, key) => { | |
| 501 | + var element_ = element('<input type="hidden" name="' + key + '" />'); | |
| 502 | + element_.val(value); | |
| 503 | + form.append(element_); | |
| 504 | + }); | |
| 505 | + }); | |
| 506 | + | |
| 507 | + form.prop({ | |
| 508 | + action: item.url, | |
| 509 | + method: 'POST', | |
| 510 | + target: iframe.prop('name'), | |
| 511 | + enctype: 'multipart/form-data', | |
| 512 | + encoding: 'multipart/form-data' // old IE | |
| 513 | + }); | |
| 514 | + | |
| 515 | + iframe.bind('load', () => { | |
| 516 | + var html = ''; | |
| 517 | + var status = 200; | |
| 518 | + | |
| 519 | + try { | |
| 520 | + // Fix for legacy IE browsers that loads internal error page | |
| 521 | + // when failed WS response received. In consequence iframe | |
| 522 | + // content access denied error is thrown becouse trying to | |
| 523 | + // access cross domain page. When such thing occurs notifying | |
| 524 | + // with empty response object. See more info at: | |
| 525 | + // http://stackoverflow.com/questions/151362/access-is-denied-error-on-accessing-iframe-document-object | |
| 526 | + // Note that if non standard 4xx or 5xx error code returned | |
| 527 | + // from WS then response content can be accessed without error | |
| 528 | + // but 'XHR' status becomes 200. In order to avoid confusion | |
| 529 | + // returning response via same 'success' event handler. | |
| 530 | + | |
| 531 | + // fixed angular.contents() for iframes | |
| 532 | + html = iframe[0].contentDocument.body.innerHTML; | |
| 533 | + } catch(e) { | |
| 534 | + // in case we run into the access-is-denied error or we have another error on the server side | |
| 535 | + // (intentional 500,40... errors), we at least say 'something went wrong' -> 500 | |
| 536 | + status = 500; | |
| 537 | + } | |
| 538 | + | |
| 539 | + var xhr = {response: html, status: status, dummy: true}; | |
| 540 | + var headers = {}; | |
| 541 | + var response = this._transformResponse(xhr.response, headers); | |
| 542 | + | |
| 543 | + this._onSuccessItem(item, response, xhr.status, headers); | |
| 544 | + this._onCompleteItem(item, response, xhr.status, headers); | |
| 545 | + }); | |
| 546 | + | |
| 547 | + form.abort = () => { | |
| 548 | + var xhr = {status: 0, dummy: true}; | |
| 549 | + var headers = {}; | |
| 550 | + var response; | |
| 551 | + | |
| 552 | + iframe.unbind('load').prop('src', 'javascript:false;'); | |
| 553 | + form.replaceWith(input); | |
| 554 | + | |
| 555 | + this._onCancelItem(item, response, xhr.status, headers); | |
| 556 | + this._onCompleteItem(item, response, xhr.status, headers); | |
| 557 | + }; | |
| 558 | + | |
| 559 | + input.after(form); | |
| 560 | + form.append(input).append(iframe); | |
| 561 | + | |
| 562 | + form[0].submit(); | |
| 563 | + this._render(); | |
| 564 | + } | |
| 565 | + /** | |
| 566 | + * Inner callback | |
| 567 | + * @param {File|Object} item | |
| 568 | + * @param {Object} filter | |
| 569 | + * @param {Object} options | |
| 570 | + * @private | |
| 571 | + */ | |
| 572 | + _onWhenAddingFileFailed(item, filter, options) { | |
| 573 | + this.onWhenAddingFileFailed(item, filter, options); | |
| 574 | + } | |
| 575 | + /** | |
| 576 | + * Inner callback | |
| 577 | + * @param {FileItem} item | |
| 578 | + */ | |
| 579 | + _onAfterAddingFile(item) { | |
| 580 | + this.onAfterAddingFile(item); | |
| 581 | + } | |
| 582 | + /** | |
| 583 | + * Inner callback | |
| 584 | + * @param {Array<FileItem>} items | |
| 585 | + */ | |
| 586 | + _onAfterAddingAll(items) { | |
| 587 | + this.onAfterAddingAll(items); | |
| 588 | + } | |
| 589 | + /** | |
| 590 | + * Inner callback | |
| 591 | + * @param {FileItem} item | |
| 592 | + * @private | |
| 593 | + */ | |
| 594 | + _onBeforeUploadItem(item) { | |
| 595 | + item._onBeforeUpload(); | |
| 596 | + this.onBeforeUploadItem(item); | |
| 597 | + } | |
| 598 | + /** | |
| 599 | + * Inner callback | |
| 600 | + * @param {FileItem} item | |
| 601 | + * @param {Number} progress | |
| 602 | + * @private | |
| 603 | + */ | |
| 604 | + _onProgressItem(item, progress) { | |
| 605 | + var total = this._getTotalProgress(progress); | |
| 606 | + this.progress = total; | |
| 607 | + item._onProgress(progress); | |
| 608 | + this.onProgressItem(item, progress); | |
| 609 | + this.onProgressAll(total); | |
| 610 | + this._render(); | |
| 611 | + } | |
| 612 | + /** | |
| 613 | + * Inner callback | |
| 614 | + * @param {FileItem} item | |
| 615 | + * @param {*} response | |
| 616 | + * @param {Number} status | |
| 617 | + * @param {Object} headers | |
| 618 | + * @private | |
| 619 | + */ | |
| 620 | + _onSuccessItem(item, response, status, headers) { | |
| 621 | + item._onSuccess(response, status, headers); | |
| 622 | + this.onSuccessItem(item, response, status, headers); | |
| 623 | + } | |
| 624 | + /** | |
| 625 | + * Inner callback | |
| 626 | + * @param {FileItem} item | |
| 627 | + * @param {*} response | |
| 628 | + * @param {Number} status | |
| 629 | + * @param {Object} headers | |
| 630 | + * @private | |
| 631 | + */ | |
| 632 | + _onErrorItem(item, response, status, headers) { | |
| 633 | + item._onError(response, status, headers); | |
| 634 | + this.onErrorItem(item, response, status, headers); | |
| 635 | + } | |
| 636 | + /** | |
| 637 | + * Inner callback | |
| 638 | + * @param {FileItem} item | |
| 639 | + * @param {*} response | |
| 640 | + * @param {Number} status | |
| 641 | + * @param {Object} headers | |
| 642 | + * @private | |
| 643 | + */ | |
| 644 | + _onCancelItem(item, response, status, headers) { | |
| 645 | + item._onCancel(response, status, headers); | |
| 646 | + this.onCancelItem(item, response, status, headers); | |
| 647 | + } | |
| 648 | + /** | |
| 649 | + * Inner callback | |
| 650 | + * @param {FileItem} item | |
| 651 | + * @param {*} response | |
| 652 | + * @param {Number} status | |
| 653 | + * @param {Object} headers | |
| 654 | + * @private | |
| 655 | + */ | |
| 656 | + _onCompleteItem(item, response, status, headers) { | |
| 657 | + item._onComplete(response, status, headers); | |
| 658 | + this.onCompleteItem(item, response, status, headers); | |
| 659 | + | |
| 660 | + var nextItem = this.getReadyItems()[0]; | |
| 661 | + this.isUploading = false; | |
| 662 | + | |
| 663 | + if(isDefined(nextItem)) { | |
| 664 | + nextItem.upload(); | |
| 665 | + return; | |
| 666 | + } | |
| 667 | + | |
| 668 | + this.onCompleteAll(); | |
| 669 | + this.progress = this._getTotalProgress(); | |
| 670 | + this._render(); | |
| 671 | + } | |
| 672 | + /********************** | |
| 673 | + * STATIC | |
| 674 | + **********************/ | |
| 675 | + /** | |
| 676 | + * Returns "true" if value an instance of File | |
| 677 | + * @param {*} value | |
| 678 | + * @returns {Boolean} | |
| 679 | + * @private | |
| 680 | + */ | |
| 681 | + static isFile(value) { | |
| 682 | + return (File && value instanceof File); | |
| 683 | + } | |
| 684 | + /** | |
| 685 | + * Returns "true" if value an instance of FileLikeObject | |
| 686 | + * @param {*} value | |
| 687 | + * @returns {Boolean} | |
| 688 | + * @private | |
| 689 | + */ | |
| 690 | + static isFileLikeObject(value) { | |
| 691 | + return value instanceof FileLikeObject; | |
| 692 | + } | |
| 693 | + /** | |
| 694 | + * Returns "true" if value is array like object | |
| 695 | + * @param {*} value | |
| 696 | + * @returns {Boolean} | |
| 697 | + */ | |
| 698 | + static isArrayLikeObject(value) { | |
| 699 | + return (isObject(value) && 'length' in value); | |
| 700 | + } | |
| 701 | + /** | |
| 702 | + * Inherits a target (Class_1) by a source (Class_2) | |
| 703 | + * @param {Function} target | |
| 704 | + * @param {Function} source | |
| 705 | + */ | |
| 706 | + static inherit(target, source) { | |
| 707 | + target.prototype = Object.create(source.prototype); | |
| 708 | + target.prototype.constructor = target; | |
| 709 | + target.super_ = source; | |
| 710 | + } | |
| 711 | + } | |
| 712 | + | |
| 713 | + | |
| 714 | + /********************** | |
| 715 | + * PUBLIC | |
| 716 | + **********************/ | |
| 717 | + /** | |
| 718 | + * Checks a support the html5 uploader | |
| 719 | + * @returns {Boolean} | |
| 720 | + * @readonly | |
| 721 | + */ | |
| 722 | + FileUploader.prototype.isHTML5 = !!(File && FormData); | |
| 723 | + /********************** | |
| 724 | + * STATIC | |
| 725 | + **********************/ | |
| 726 | + /** | |
| 727 | + * @borrows FileUploader.prototype.isHTML5 | |
| 728 | + */ | |
| 729 | + FileUploader.isHTML5 = FileUploader.prototype.isHTML5; | |
| 730 | + | |
| 731 | + | |
| 732 | + return FileUploader; | |
| 733 | +} | |
| 734 | + | |
| 735 | + | |
| 736 | +module.exports.$inject = [ | |
| 737 | + 'fileUploaderOptions', | |
| 738 | + '$rootScope', | |
| 739 | + '$http', | |
| 740 | + '$window', | |
| 741 | + 'FileLikeObject', | |
| 742 | + 'FileItem' | |
| 743 | +]; | |
| 0 | 744 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/bower_components/angular-file-upload/src/values/options.js
0 → 100644
| 1 | +'use strict'; | |
| 2 | + | |
| 3 | + | |
| 4 | +export default { | |
| 5 | + url: '/', | |
| 6 | + alias: 'file', | |
| 7 | + headers: {}, | |
| 8 | + queue: [], | |
| 9 | + progress: 0, | |
| 10 | + autoUpload: false, | |
| 11 | + removeAfterUpload: false, | |
| 12 | + method: 'POST', | |
| 13 | + filters: [], | |
| 14 | + formData: [], | |
| 15 | + queueLimit: Number.MAX_VALUE, | |
| 16 | + withCredentials: false | |
| 17 | +}; | |
| 0 | 18 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/bower.json
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js
| ... | ... | @@ -139,18 +139,79 @@ angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageSer |
| 139 | 139 | }; |
| 140 | 140 | }]); |
| 141 | 141 | |
| 142 | -angular.module('ScheduleApp').controller('BusInfoManageCtrl', ['BusInfoManageService','$state', function(busInfoManageService, $state) { | |
| 142 | +angular.module('ScheduleApp').controller('BusInfoManageCtrl', ['BusInfoManageService','$state', '$uibModal', function(busInfoManageService, $state, $uibModal) { | |
| 143 | 143 | var self = this; |
| 144 | 144 | |
| 145 | 145 | // 切换到form状态 |
| 146 | 146 | self.goForm = function() { |
| 147 | 147 | //alert("切换"); |
| 148 | 148 | $state.go("busInfoManage_form"); |
| 149 | - } | |
| 149 | + }; | |
| 150 | + | |
| 151 | + // 导入excel | |
| 152 | + self.importData = function() { | |
| 153 | + // large方式弹出模态对话框 | |
| 154 | + var modalInstance = $uibModal.open({ | |
| 155 | + templateUrl: '/pages/scheduleApp/module/basicInfo/busInfoManage/dataImport.html', | |
| 156 | + size: "lg", | |
| 157 | + animation: true, | |
| 158 | + backdrop: 'static', | |
| 159 | + resolve: { | |
| 160 | + // 可以传值给controller | |
| 161 | + }, | |
| 162 | + windowClass: 'center-modal', | |
| 163 | + controller: "BusInfoManageToolsCtrl", | |
| 164 | + controllerAs: "ctrl", | |
| 165 | + bindToController: true | |
| 166 | + }); | |
| 167 | + modalInstance.result.then( | |
| 168 | + function() { | |
| 169 | + console.log("dataImport.html打开"); | |
| 170 | + }, | |
| 171 | + function() { | |
| 172 | + console.log("dataImport.html消失"); | |
| 173 | + } | |
| 174 | + ); | |
| 175 | + }; | |
| 176 | +}]); | |
| 150 | 177 | |
| 178 | +angular.module('ScheduleApp').controller('BusInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 179 | + var self = this; | |
| 180 | + self.data = "TODO"; | |
| 181 | + | |
| 182 | + // 关闭窗口 | |
| 183 | + self.close = function() { | |
| 184 | + $modalInstance.dismiss("cancel"); | |
| 185 | + }; | |
| 186 | + | |
| 187 | + self.clearInputFile = function() { | |
| 188 | + angular.element("input[type='file']").val(null); | |
| 189 | + }; | |
| 190 | + | |
| 191 | + // 上传文件组件 | |
| 192 | + self.uploader = new FileUploader({ | |
| 193 | + url: "/cars/dataImport", | |
| 194 | + filters: [] // 用于过滤文件,比如只允许导入excel | |
| 195 | + }); | |
| 196 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 197 | + { | |
| 198 | + console.info('onAfterAddingFile', fileItem); | |
| 199 | + console.log(self.uploader.queue.length); | |
| 200 | + if (self.uploader.queue.length > 1) | |
| 201 | + self.uploader.removeFromQueue(0); | |
| 202 | + }; | |
| 203 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 204 | + { | |
| 205 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 206 | + }; | |
| 207 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 208 | + { | |
| 209 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 210 | + }; | |
| 151 | 211 | |
| 152 | 212 | }]); |
| 153 | 213 | |
| 214 | + | |
| 154 | 215 | angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManageService','$scope', function(busInfoManageService, $scope) { |
| 155 | 216 | var self = this; |
| 156 | 217 | self.pageInfo = { | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/dataExport.html
0 → 100644
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/dataImport.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <h3 class="modal-title">excel数据导入</h3> | |
| 3 | +</div> | |
| 4 | +<div class="modal-body"> | |
| 5 | + <div class="col-md-6"> | |
| 6 | + <div class="input-group"> | |
| 7 | + <input type="file" class="form-control" nv-file-select="" uploader="ctrl.uploader"/> | |
| 8 | + <span class="input-group-btn"> | |
| 9 | + <button type="button" ng-click="ctrl.clearInputFile()" class="btn btn-default"> | |
| 10 | + <span class="glyphicon glyphicon-trash"></span> | |
| 11 | + </button> | |
| 12 | + </span> | |
| 13 | + </div> | |
| 14 | + </div> | |
| 15 | + | |
| 16 | + <div class="table-scrollable table-scrollable-borderless"> | |
| 17 | + <table class="table table-hover table-light"> | |
| 18 | + <thead> | |
| 19 | + <tr class="uppercase"> | |
| 20 | + <th width="50%">文件名</th> | |
| 21 | + <th ng-show="ctrl.uploader.isHTML5">大小(M)</th> | |
| 22 | + <th ng-show="ctrl.uploader.isHTML5">进度</th> | |
| 23 | + <th>状态</th> | |
| 24 | + <th>操作</th> | |
| 25 | + </tr> | |
| 26 | + </thead> | |
| 27 | + <tbody> | |
| 28 | + <tr ng-repeat="item in ctrl.uploader.queue"> | |
| 29 | + <td> | |
| 30 | + <strong>{{ item.file.name }}</strong> | |
| 31 | + </td> | |
| 32 | + <td ng-show="ctrl.uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td> | |
| 33 | + <td ng-show="ctrl.uploader.isHTML5"> | |
| 34 | + <div class="progress progress-sm" style="margin-bottom: 0;"> | |
| 35 | + <div class="progress-bar progress-bar-info" role="progressbar" | |
| 36 | + ng-style="{ 'width': item.progress + '%' }"></div> | |
| 37 | + </div> | |
| 38 | + </td> | |
| 39 | + <td class="text-center"> | |
| 40 | + <span ng-show="item.isSuccess" class="text-success"> | |
| 41 | + <i class="glyphicon glyphicon-ok"></i> | |
| 42 | + </span> | |
| 43 | + <span ng-show="item.isCancel" class="text-info"> | |
| 44 | + <i class="glyphicon glyphicon-ban-circle"></i> | |
| 45 | + </span> | |
| 46 | + <span ng-show="item.isError" class="text-danger"> | |
| 47 | + <i class="glyphicon glyphicon-remove"></i> | |
| 48 | + </span> | |
| 49 | + </td> | |
| 50 | + <td nowrap> | |
| 51 | + <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" | |
| 52 | + ng-disabled="item.isReady || item.isUploading || item.isSuccess"> | |
| 53 | + <span class="glyphicon glyphicon-upload"></span> 上传 | |
| 54 | + </button> | |
| 55 | + <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" | |
| 56 | + ng-disabled="!item.isUploading"> | |
| 57 | + <span class="glyphicon glyphicon-ban-circle"></span> 取消 | |
| 58 | + </button> | |
| 59 | + <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()"> | |
| 60 | + <span class="glyphicon glyphicon-trash"></span> 删除 | |
| 61 | + </button> | |
| 62 | + </td> | |
| 63 | + </tr> | |
| 64 | + </tbody> | |
| 65 | + </table> | |
| 66 | + </div> | |
| 67 | + | |
| 68 | +</div> | |
| 69 | + | |
| 70 | +<div class="modal-footer"> | |
| 71 | + <button class="btn btn-primary" ng-click="ctrl.close()">关闭</button> | |
| 72 | +</div> | |
| 0 | 73 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/index.html
| ... | ... | @@ -40,6 +40,12 @@ |
| 40 | 40 | </a> |
| 41 | 41 | <ul class="dropdown-menu pull-right"> |
| 42 | 42 | <li> |
| 43 | + <a href="javascript:" class="tool-action" ng-click="ctrl.importData()"> | |
| 44 | + <i class="fa fa-file-excel-o"></i> | |
| 45 | + 导入excel | |
| 46 | + </a> | |
| 47 | + </li> | |
| 48 | + <li> | |
| 43 | 49 | <a href="javascript:" class="tool-action"> |
| 44 | 50 | <i class="fa fa-file-excel-o"></i> |
| 45 | 51 | 导出excel |
| ... | ... | @@ -48,8 +54,8 @@ |
| 48 | 54 | <li class="divider"></li> |
| 49 | 55 | <li> |
| 50 | 56 | <a href="javascript:" class="tool-action"> |
| 51 | - <i class="fa fa-refresh"></i> | |
| 52 | - 刷行数据 | |
| 57 | + <i class="fa fa-download"></i> | |
| 58 | + excel模版 | |
| 53 | 59 | </a> |
| 54 | 60 | </li> |
| 55 | 61 | </ul> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/main.css
| ... | ... | @@ -17,4 +17,14 @@ form input.ng-valid.ng-dirty.ng-valid-required { |
| 17 | 17 | } |
| 18 | 18 | .ui-select-container.ng-valid.ng-dirty.ng-valid-required .form-control { |
| 19 | 19 | background-color: #78FA89; |
| 20 | +} | |
| 21 | + | |
| 22 | +.center-modal { | |
| 23 | + position: fixed; | |
| 24 | + top: 10%; | |
| 25 | + left: 18.5%; | |
| 26 | + z-index: 1050; | |
| 27 | + width: 80%; | |
| 28 | + height: 80%; | |
| 29 | + margin-left: -10%; | |
| 20 | 30 | } |
| 21 | 31 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/main.js
| ... | ... | @@ -62,6 +62,7 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi |
| 62 | 62 | name: 'busInfoManage_module', |
| 63 | 63 | insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 |
| 64 | 64 | files: [ |
| 65 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 65 | 66 | "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" |
| 66 | 67 | ] |
| 67 | 68 | }); | ... | ... |