diff --git a/README.md b/README.md index 7adc14a..c3c30e4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # open-JSD-9634 -JSD-9634 钉钉用户同步 \ No newline at end of file +JSD-9634 钉钉用户同步\ +免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\ +仅作为开发者学习参考使用!禁止用于任何商业用途!\ +为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系hugh处理。 \ No newline at end of file diff --git a/doc/JSD-9634-需求确认书V1.docx b/doc/JSD-9634-需求确认书V1.docx new file mode 100644 index 0000000..4449dc0 Binary files /dev/null and b/doc/JSD-9634-需求确认书V1.docx differ diff --git a/doc/钉钉数据同步插件-配置使用文档.pdf b/doc/钉钉数据同步插件-配置使用文档.pdf new file mode 100644 index 0000000..8d0f971 Binary files /dev/null and b/doc/钉钉数据同步插件-配置使用文档.pdf differ diff --git a/lib/commons-codec-1.15.jar b/lib/commons-codec-1.15.jar new file mode 100644 index 0000000..f14985a Binary files /dev/null and b/lib/commons-codec-1.15.jar differ diff --git a/lib/finekit-10.0.jar b/lib/finekit-10.0.jar new file mode 100644 index 0000000..f4482fc Binary files /dev/null and b/lib/finekit-10.0.jar differ diff --git a/lib/lippi-oapi-encrpt.jar b/lib/lippi-oapi-encrpt.jar new file mode 100644 index 0000000..f112223 Binary files /dev/null and b/lib/lippi-oapi-encrpt.jar differ diff --git a/lib/taobao-sdk-java-auto_1479188381469-20210421.jar b/lib/taobao-sdk-java-auto_1479188381469-20210421.jar new file mode 100644 index 0000000..2978668 Binary files /dev/null and b/lib/taobao-sdk-java-auto_1479188381469-20210421.jar differ diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..950ecdf --- /dev/null +++ b/plugin.xml @@ -0,0 +1,33 @@ + + + com.fr.plugin.xxxx.dingtalksyn.job + + yes + 1.0 + 10.0 + 2018-07-31 + fr.open + + + 1.用户信息全量同步
+ 2.用户信息增量同步
+ 3.用户单点登陆功能
+ ]]>
+ com.fr.plugin.xxxx.dingtalksyn + + com.fanruan.api + org.apache.commons.codec + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/bean/DataResponse.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/bean/DataResponse.java new file mode 100644 index 0000000..41e6295 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/bean/DataResponse.java @@ -0,0 +1,158 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DataResponse + * Author: Louis + * Date: 2021/3/19 11:46 + */ + package com.fr.plugin.xxxx.dingtalksyn.bean; + + import com.fanruan.api.util.StringKit; + import com.fr.decision.webservice.Response; +import com.fr.third.fasterxml.jackson.annotation.JsonInclude; +import com.fr.third.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Map; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + @JsonInclude(JsonInclude.Include.NON_DEFAULT) + public class DataResponse extends Response { + private static final long serialVersionUID = -6470353731188369521L; + @JsonProperty("msg_signature") + private String msgSignature; + private String timeStamp; + private String nonce; + private String encrypt; + + private String code; + private String message; + + public DataResponse() { + } + + private static DataResponse create() { + return new DataResponse(); + } + + /** + * 相应success结果 + * + * @return + */ + public static DataResponse success(Map successMap) { + return create().msgSignature(successMap.get("msg_signature")) + .timeStamp(successMap.get("timeStamp")) + .nonce(successMap.get("nonce")) + .encrypt(successMap.get("encrypt")); + } + + /** + * 操作结果 + * + * @param data + * @return + */ + public static DataResponse operation(String data) { + return create().code("200").message("success").data(data); + } + + /** + * 报错结果 + * + * @param code + * @param message + * @return + */ + public static DataResponse error(String code, String message) { + return create().code(code).message(message).data(StringKit.EMPTY); + } + + public DataResponse msgSignature(String msgSignature) { + this.msgSignature = msgSignature; + return this; + } + + public DataResponse timeStamp(String timeStamp) { + this.timeStamp = timeStamp; + return this; + } + + public DataResponse nonce(String nonce) { + this.nonce = nonce; + return this; + } + + public DataResponse encrypt(String encrypt) { + this.encrypt = encrypt; + return this; + } + + public DataResponse code(String code) { + this.code = code; + return this; + } + + public DataResponse message(String message) { + this.message = message; + return this; + } + + public DataResponse data(Object data) { + this.setData(data); + return this; + } + + public String getMsgSignature() { + return msgSignature; + } + + public void setMsgSignature(String msgSignature) { + this.msgSignature = msgSignature; + } + + public String getTimeStamp() { + return timeStamp; + } + + public void setTimeStamp(String timeStamp) { + this.timeStamp = timeStamp; + } + + public String getNonce() { + return nonce; + } + + public void setNonce(String nonce) { + this.nonce = nonce; + } + + public String getEncrypt() { + return encrypt; + } + + public void setEncrypt(String encrypt) { + this.encrypt = encrypt; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/bean/DingTalkJobConstructor.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/bean/DingTalkJobConstructor.java new file mode 100644 index 0000000..2f0e8ec --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/bean/DingTalkJobConstructor.java @@ -0,0 +1,107 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkJobConstructor + * Author: Louis + * Date: 2021/4/21 15:58 + */ + package com.fr.plugin.xxxx.dingtalksyn.bean; + + import com.fr.scheduler.job.FineScheduleJob; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkJobConstructor { + private String cron; + private String jobName; + private String jobGroup; + private String triggerName; + private String triggerGroup; + private Class jobClazz; + + public DingTalkJobConstructor() { + } + + public DingTalkJobConstructor cron(String var1) { + this.setCron(var1); + return this; + } + + public String getCron() { + return this.cron; + } + + public void setCron(String var1) { + this.cron = var1; + } + + public DingTalkJobConstructor jobName(String var1) { + this.setJobName(var1); + return this; + } + + public String getJobName() { + return this.jobName; + } + + public void setJobName(String var1) { + this.jobName = var1; + } + + public DingTalkJobConstructor jobGroup(String var1) { + this.setJobGroup(var1); + return this; + } + + public String getJobGroup() { + return this.jobGroup; + } + + public void setJobGroup(String var1) { + this.jobGroup = var1; + } + + public DingTalkJobConstructor triggerName(String var1) { + this.setTriggerName(var1); + return this; + } + + public String getTriggerName() { + return this.triggerName; + } + + public void setTriggerName(String var1) { + this.triggerName = var1; + } + + public DingTalkJobConstructor triggerGroup(String var1) { + this.setTriggerGroup(var1); + return this; + } + + public String getTriggerGroup() { + return this.triggerGroup; + } + + public void setTriggerGroup(String var1) { + this.triggerGroup = var1; + } + + public DingTalkJobConstructor jobClazz(Class var1) { + this.setJobClazz(var1); + return this; + } + + public Class getJobClazz() { + return this.jobClazz; + } + + public void setJobClazz(Class var1) { + this.jobClazz = var1; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingSynConfig.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingSynConfig.java new file mode 100644 index 0000000..5349d43 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingSynConfig.java @@ -0,0 +1,146 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingSynConfig + * Author: Louis + * Date: 2021/3/30 9:38 + */ + package com.fr.plugin.xxxx.dingtalksyn.config; + + import com.fanruan.api.util.StringKit; +import com.fr.config.*; +import com.fr.config.holder.Conf; +import com.fr.config.holder.factory.Holders; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + @Visualization(category = "Plugin-dingtalksyn_Group") + public class DingSynConfig extends DefaultConfiguration { + + // 每天中午十二点触发 + public static final String CRON_CONDITION = "0 0 12 * * ?"; + public static final long ROOT_DEP_ID = 1; + private static volatile DingSynConfig config = null; + + public static DingSynConfig getInstance() { + if (config == null) { + config = ConfigContext.getConfigInstance(DingSynConfig.class); + } + return config; + } + + @Identifier(value = "cronCondition", name = "Plugin-dingtalksyn_Config_CronCondition", description = "Plugin-dingtalksyn_Config_CronCondition_Description", status = Status.SHOW) + private Conf cronCondition = Holders.simple(CRON_CONDITION); + @Identifier(value = "appKey", name = "Plugin-dingtalksyn_Config_appKey", description = "Plugin-dingtalksyn_Config_appKey_Description", status = Status.SHOW) + private Conf appKey = Holders.simple(StringKit.EMPTY); + @Identifier(value = "appSecret", name = "Plugin-dingtalksyn_Config_appSecret", description = "Plugin-dingtalksyn_Config_appSecret_Description", status = Status.SHOW) + private Conf appSecret = Holders.simple(StringKit.EMPTY); + @Identifier(value = "corpId", name = "Plugin-dingtalksyn_Config_corpId", description = "Plugin-dingtalksyn_Config_corpId_Description", status = Status.SHOW) + private Conf corpId = Holders.simple(StringKit.EMPTY); + @Identifier(value = "rootDepId", name = "Plugin-dingtalksyn_Config_rootDepId", description = "Plugin-dingtalksyn_Config_rootDepId_Description", status = Status.SHOW) + private Conf rootDepId = Holders.simple(ROOT_DEP_ID); + @Identifier(value = "token", name = "Plugin-dingtalksyn_Config_Token", description = "Plugin-dingtalksyn_Config_Token_Description", status = Status.SHOW) + private Conf token = Holders.simple(StringKit.EMPTY); + @Identifier(value = "aesKey", name = "Plugin-dingtalksyn_Config_AesKey", description = "Plugin-dingtalksyn_Config_AesKey_Description", status = Status.SHOW) + private Conf aesKey = Holders.simple(StringKit.EMPTY); + @Identifier(value = "ssoEnable", name = "Plugin-dingtalksyn_Config_SsoEnable", description = "Plugin-dingtalksyn_Config_SsoEnable_Description", status = Status.SHOW) + private Conf ssoEnable = Holders.simple(true); + + private Conf url = Holders.simple(StringKit.EMPTY); + private Conf proxyServer = Holders.simple(StringKit.EMPTY); + private Conf memberManagementConfig = Holders.obj(new DingTalkMemberManagementConfig(), DingTalkMemberManagementConfig.class); + private Conf timingTaskConfig = Holders.obj(new DingTalkTimingTaskConfig(), DingTalkTimingTaskConfig.class); + + public String getCronCondition() { + return cronCondition.get(); + } + + public void setCronCondition(String cronCondition) { + this.cronCondition.set(cronCondition); + } + + public String getAppKey() { + return appKey.get(); + } + + public void setAppKey(String appKey) { + this.appKey.set(appKey); + } + + public String getAppSecret() { + return appSecret.get(); + } + + public void setAppSecret(String appSecret) { + this.appSecret.set(appSecret); + } + + public String getCorpId() { + return corpId.get(); + } + + public void setCorpId(String corpId) { + this.corpId.set(corpId); + } + + public long getRootDepId() { + return rootDepId.get(); + } + + public void setRootDepId(long rootDepId) { + this.rootDepId.set(rootDepId); + } + + public String getToken() { + return token.get(); + } + + public void setToken(String token) { + this.token.set(token); + } + + public String getAesKey() { + return aesKey.get(); + } + + public void setAesKey(String aesKey) { + this.aesKey.set(aesKey); + } + + public boolean getSsoEnable() { + return ssoEnable.get(); + } + + public void setSsoEnable(boolean ssoEnable) { + this.ssoEnable.set(ssoEnable); + } + + public String getUrl() { + return (String) this.url.get(); + } + + public void setUrl(String url) { + this.url.set(url); + } + + public String getProxyServer() { + return (String) this.proxyServer.get(); + } + + public void setProxyServer(String proxyServer) { + this.proxyServer.set(proxyServer); + } + + public DingTalkMemberManagementConfig getMemberManagementConfig() { + return (DingTalkMemberManagementConfig) this.memberManagementConfig.get(); + } + + public DingTalkTimingTaskConfig getTimingTaskConfig() { + return (DingTalkTimingTaskConfig) this.timingTaskConfig.get(); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingTalkMemberManagementConfig.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingTalkMemberManagementConfig.java new file mode 100644 index 0000000..f714f81 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingTalkMemberManagementConfig.java @@ -0,0 +1,74 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkMemberManagementConfig + * Author: Louis + * Date: 2021/6/24 22:33 + */ + package com.fr.plugin.xxxx.dingtalksyn.config; + + import com.fr.config.holder.Conf; + import com.fr.config.holder.factory.Holders; + import com.fr.config.utils.UniqueKey; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkMemberManagementConfig extends UniqueKey { + private static final long serialVersionUID = -7306068222156688449L; + private Conf matchingFSWay; + private Conf dataSet; + private Conf dataSetFsUserNameColumn; + private Conf dataSetDingTalkUserIdColumn; + + public DingTalkMemberManagementConfig() { + this.matchingFSWay = Holders.simple(MatchingFSWay.MATCHING_USER_BY_DINGTALK_ID.getValue()); + this.dataSet = Holders.simple(""); + this.dataSetFsUserNameColumn = Holders.simple(-1); + this.dataSetDingTalkUserIdColumn = Holders.simple(-1); + } + + public DingTalkMemberManagementConfig(int var1) { + this.matchingFSWay = Holders.simple(MatchingFSWay.MATCHING_USER_BY_DINGTALK_ID.getValue()); + this.dataSet = Holders.simple(""); + this.dataSetFsUserNameColumn = Holders.simple(-1); + this.dataSetDingTalkUserIdColumn = Holders.simple(-1); + this.matchingFSWay.set(var1); + } + + public int getMatchingFSWay() { + return (Integer) this.matchingFSWay.get(); + } + + public void setMatchingFSWay(int var1) { + this.matchingFSWay.set(var1); + } + + public String getDataSet() { + return (String) this.dataSet.get(); + } + + public void setDataSet(String var1) { + this.dataSet.set(var1); + } + + public int getDataSetFsUserNameColumn() { + return (Integer) this.dataSetFsUserNameColumn.get(); + } + + public void setDataSetFsUserNameColumn(int var1) { + this.dataSetFsUserNameColumn.set(var1); + } + + public int getDataSetDingTalkUserIdColumn() { + return (Integer) this.dataSetDingTalkUserIdColumn.get(); + } + + public void setDataSetDingTalkUserIdColumn(int var1) { + this.dataSetDingTalkUserIdColumn.set(var1); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingTalkTimingTaskConfig.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingTalkTimingTaskConfig.java new file mode 100644 index 0000000..cc1c43e --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/DingTalkTimingTaskConfig.java @@ -0,0 +1,93 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkTimingTaskConfig + * Author: Louis + * Date: 2021/6/27 15:24 + */ + package com.fr.plugin.xxxx.dingtalksyn.config; + + import com.fr.config.holder.Conf; + import com.fr.config.holder.factory.Holders; + import com.fr.config.utils.UniqueKey; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkTimingTaskConfig extends UniqueKey { + private static final long serialVersionUID = -4918602359444495066L; + private Conf enableAutoSync; + private Conf period; + private Conf startWeekDay; + private Conf startHour; + private Conf startMinute; + + public DingTalkTimingTaskConfig() { + this.enableAutoSync = Holders.simple(false); + this.period = Holders.simple(0); + this.startWeekDay = Holders.simple(Week.MONDAY.getDay()); + this.startHour = Holders.simple("00"); + this.startMinute = Holders.simple("00"); + } + + public DingTalkTimingTaskConfig(boolean var1, int var2, String var3, String var4) { + this.enableAutoSync = Holders.simple(false); + this.period = Holders.simple(0); + this.startWeekDay = Holders.simple(Week.MONDAY.getDay()); + this.startHour = Holders.simple("00"); + this.startMinute = Holders.simple("00"); + this.enableAutoSync.set(var1); + this.period.set(var2); + this.startHour.set(var3); + this.startMinute.set(var4); + } + + public DingTalkTimingTaskConfig(boolean var1, int var2, int var3, String var4, String var5) { + this(var1, var2, var4, var5); + this.startWeekDay.set(var3); + } + + public boolean isEnableAutoSync() { + return (Boolean) this.enableAutoSync.get(); + } + + public void setEnableAutoSync(boolean var1) { + this.enableAutoSync.set(var1); + } + + public int getPeriod() { + return (Integer) this.period.get(); + } + + public void setPeriod(int var1) { + this.period.set(var1); + } + + public int getStartWeekDay() { + return (Integer) this.startWeekDay.get(); + } + + public void setStartWeekDay(int var1) { + this.startWeekDay.set(var1); + } + + public String getStartHour() { + return (String) this.startHour.get(); + } + + public void setStartHour(String var1) { + this.startHour.set(var1); + } + + public String getStartMinute() { + return (String) this.startMinute.get(); + } + + public void setStartMinute(String var1) { + this.startMinute.set(var1); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/MatchingFSWay.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/MatchingFSWay.java new file mode 100644 index 0000000..25708ee --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/MatchingFSWay.java @@ -0,0 +1,32 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: MatchingFSWay + * Author: Louis + * Date: 2021/6/26 14:52 + */ + package com.fr.plugin.xxxx.dingtalksyn.config; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public enum MatchingFSWay { + MATCHING_USER_BY_DINGTALK_ID(0), + MATCHING_USER_BY_DINGTALK_MOBILE(1), + MATCHING_USER_MANUALLY(2), + MATCHING_USER_BY_DATASET(3); + + private int matchingWay; + + private MatchingFSWay(int var3) { + this.matchingWay = var3; + } + + public int getValue() { + return this.matchingWay; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/Week.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/Week.java new file mode 100644 index 0000000..c8ae0fb --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/config/Week.java @@ -0,0 +1,62 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: Week + * Author: Louis + * Date: 2021/6/27 15:26 + */ + package com.fr.plugin.xxxx.dingtalksyn.config; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public enum Week { + SUNDAY("SUN", 0), + MONDAY("MON", 1), + TUESDAY("TUE", 2), + WEDNESDAY("WED", 3), + THURSDAY("THU", 4), + FRIDAY("FRI", 5), + SATURDAY("STA", 6); + + private int day; + private String dayName; + + private Week(String var3, int var4) { + this.dayName = var3; + this.day = var4; + } + + public int getDay() { + return this.day; + } + + public String getDayName() { + return this.dayName; + } + + public static Week getWeek(int var0) { + switch (var0) { + case 0: + return SUNDAY; + case 1: + return MONDAY; + case 2: + return TUESDAY; + case 3: + return WEDNESDAY; + case 4: + return THURSDAY; + case 5: + return FRIDAY; + case 6: + return SATURDAY; + default: + return MONDAY; + } + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/exceptions/DingTalkRequestException.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/exceptions/DingTalkRequestException.java new file mode 100644 index 0000000..9549870 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/exceptions/DingTalkRequestException.java @@ -0,0 +1,26 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkRequestException + * Author: Louis + * Date: 2021/6/24 22:26 + */ + package com.fr.plugin.xxxx.dingtalksyn.exceptions; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkRequestException extends Exception { + private static final long serialVersionUID = -729781689637350516L; + + public DingTalkRequestException() { + } + + public DingTalkRequestException(String msg) { + super(msg); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/exceptions/DingTalkTokenEmptyException.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/exceptions/DingTalkTokenEmptyException.java new file mode 100644 index 0000000..1a59412 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/exceptions/DingTalkTokenEmptyException.java @@ -0,0 +1,26 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkTokenEmptyException + * Author: Louis + * Date: 2021/6/24 22:27 + */ + package com.fr.plugin.xxxx.dingtalksyn.exceptions; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkTokenEmptyException extends Exception { + private static final long serialVersionUID = -7930789693326095840L; + + public DingTalkTokenEmptyException() { + } + + public DingTalkTokenEmptyException(String msg) { + super(msg); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/handler/DingTalkHttpHandlerDecorator.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/handler/DingTalkHttpHandlerDecorator.java new file mode 100644 index 0000000..3253884 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/handler/DingTalkHttpHandlerDecorator.java @@ -0,0 +1,87 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkHttpHandlerDecorator + * Author: Louis + * Date: 2021/6/24 20:30 + */ + package com.fr.plugin.xxxx.dingtalksyn.handler; + + import com.fanruan.api.log.LogKit; + import com.fr.decision.fun.HttpHandler; + import com.fr.decision.fun.impl.BaseHttpHandler; + import com.fr.decision.webservice.exception.general.NoPrivilegeException; + import com.fr.plugin.xxxx.dingtalksyn.exceptions.DingTalkRequestException; + import com.fr.plugin.xxxx.dingtalksyn.exceptions.DingTalkTokenEmptyException; + import com.fr.plugin.xxxx.dingtalksyn.helper.DingTalkDecUserHelper; + import com.fr.plugin.xxxx.dingtalksyn.utils.DingTalkAuthorityUtils; + import com.fr.plugin.xxxx.dingtalksyn.utils.DingTalkLogUtil; + import com.fr.third.springframework.web.bind.annotation.RequestMethod; + import com.fr.web.utils.WebUtils; + + import javax.servlet.http.HttpServletRequest; + import javax.servlet.http.HttpServletResponse; + + import static com.fr.plugin.xxxx.dingtalksyn.provider.DingTalkSystemOption.DING_TALK_SYN_SYSTEM_OPTION; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkHttpHandlerDecorator extends BaseHttpHandler { + private HttpHandler handler; + private boolean checkModulePrivilege; + + public DingTalkHttpHandlerDecorator(HttpHandler handler) { + this.handler = handler; + this.checkModulePrivilege = true; + } + + public DingTalkHttpHandlerDecorator(HttpHandler handler, boolean checkModule) { + this.handler = handler; + this.checkModulePrivilege = checkModule; + } + + public RequestMethod getMethod() { + return this.handler.getMethod(); + } + + public String getPath() { + return this.handler.getPath(); + } + + public boolean isPublic() { + return this.handler.isPublic(); + } + + public String[] modules() { + return this.checkModulePrivilege ? new String[]{DING_TALK_SYN_SYSTEM_OPTION} : new String[0]; + } + + public void handle(HttpServletRequest request, HttpServletResponse response) throws Exception { + try { + if (this.checkModulePrivilege && !this.handler.isPublic()) { + String var3 = DingTalkDecUserHelper.getCurrentUserId(request); + if (!DingTalkAuthorityUtils.hasModulePrivilege(var3, DING_TALK_SYN_SYSTEM_OPTION)) { + throw new NoPrivilegeException(); + } + this.handler.handle(request, response); + } else { + this.handler.handle(request, response); + } + } catch (DingTalkRequestException e) { + DingTalkLogUtil.error(e.getMessage(), e, 44001); + WebUtils.flushFailureMessageAutoClose(request, response, 11205037, e.getMessage()); + } catch (DingTalkTokenEmptyException e) { + String message = "获取token失败,钉钉返回信息为:" + e.getMessage(); + DingTalkLogUtil.error(message, 44002); + WebUtils.flushFailureMessageAutoClose(request, response, 11205031, message); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + throw e; + } + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/helper/DingTalkDecUserHelper.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/helper/DingTalkDecUserHelper.java new file mode 100644 index 0000000..2855d7e --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/helper/DingTalkDecUserHelper.java @@ -0,0 +1,128 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkDecUserHelper + * Author: Louis + * Date: 2021/6/24 22:04 + */ + package com.fr.plugin.xxxx.dingtalksyn.helper; + + import com.fanruan.api.log.LogKit; + import com.fanruan.api.util.StringKit; + import com.fr.decision.authority.AuthorityContext; + import com.fr.decision.authority.data.User; + import com.fr.decision.webservice.v10.user.UserService; + import com.fr.general.ComparatorUtils; + import com.fr.stable.StringUtils; + import com.fr.stable.query.QueryFactory; + import com.fr.stable.query.restriction.RestrictionFactory; + + import javax.servlet.http.HttpServletRequest; + import java.util.ArrayList; + import java.util.Iterator; + import java.util.List; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkDecUserHelper { + public DingTalkDecUserHelper() { + } + + public static boolean isUserExist(String userName) { + if (StringUtils.isEmpty(userName)) { + return false; + } + try { + List userList = AuthorityContext.getInstance().getUserController().find(QueryFactory.create().addRestriction(RestrictionFactory.eq("userName", userName))); + return userList != null && !userList.isEmpty(); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + return false; + } + } + + public static List getDecUsers() { + List userList = null; + try { + userList = AuthorityContext.getInstance().getUserController().find(QueryFactory.create()); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + return (userList == null ? new ArrayList<>() : userList); + } + + public static String getDecUserNameById(String userId, List userList) { + String userName = StringKit.EMPTY; + for (User user : userList) { + if (ComparatorUtils.equals(user.getId(), userId)) { + userName = user.getUserName(); + break; + } + } + return userName; + } + + public static User getDecUserByName(String userName) { + User User = null; + if (StringUtils.isNotBlank(userName)) { + try { + List userList = AuthorityContext.getInstance().getUserController().find(QueryFactory.create().addRestriction(RestrictionFactory.eq("userName", userName))); + if (userList != null && !userList.isEmpty()) { + User = userList.get(0); + } + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + } + return User; + } + + public static void filterEnableUserNames(List userNames) { + List userList = getDecUsers(); + Iterator iterator = userNames.iterator(); + while (iterator.hasNext()) { + boolean enable = false; + String userName = iterator.next(); + for (User user : userList) { + if (ComparatorUtils.equals(user.getUserName(), userName) && user.isEnable()) { + enable = true; + break; + } + } + if (!enable) { + iterator.remove(); + } + } + } + + public static String userNameToRealName(String userName, List userList) { + String realName = StringKit.EMPTY; + if (StringUtils.isNotEmpty(userName)) { + for (User user : userList) { + if (ComparatorUtils.equals(userName, user.getUserName())) { + realName = user.getRealName(); + break; + } + } + } + return realName; + } + + public static String getCurrentUserId(HttpServletRequest request) { + String currentUserId = StringKit.EMPTY; + try { + currentUserId = UserService.getInstance().getCurrentUserId(request); + } catch (Exception e) { + try { + currentUserId = UserService.getInstance().getCurrentUserIdFromCookie(request); + } catch (Exception e1) { + } + } + return currentUserId; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/helper/DingTalkScheduleHelper.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/helper/DingTalkScheduleHelper.java new file mode 100644 index 0000000..7187482 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/helper/DingTalkScheduleHelper.java @@ -0,0 +1,77 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkScheduleHelper + * Author: Louis + * Date: 2021/4/21 15:52 + */ + package com.fr.plugin.xxxx.dingtalksyn.helper; + + import com.fr.plugin.xxxx.dingtalksyn.bean.DingTalkJobConstructor; + import com.fr.plugin.xxxx.dingtalksyn.job.DingTalkSyncMemberJob; + import com.fr.scheduler.ScheduleJobManager; + import com.fr.third.v2.org.quartz.CronScheduleBuilder; + import com.fr.third.v2.org.quartz.TriggerBuilder; + + import java.util.ArrayList; + import java.util.HashMap; + import java.util.TimeZone; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkScheduleHelper { + public static final String DINGTALK_SCHEDULE_SYN_MEMBER_JOB_NAME = "MqhDingTalkSynDepMemberJob"; + public static final String DINGTALK_SCHEDULE_SYN_MEMBER_TRIGGER_NAME = "MqhDingTalkSynDepMemberTrigger"; + public static final String DINGTALK_SCHEDULE_SYN_MEMBER_GROUP = "MqhDingTalkSynDepMemberGroup"; + public static final String DINGTALK_SCHEDULE_SYN_MEMBER_TRIGGER_GROUP = "MqhDingTalkSynDepMemberTriggerGroup"; + + private DingTalkScheduleHelper() { + } + + public static DingTalkScheduleHelper getInstance() { + return HOLDER.INSTANCE; + } + + public void startSynMemberSchedule(String cronCondition) throws Exception { + DingTalkJobConstructor jobConstructor = (new DingTalkJobConstructor()) + .cron(cronCondition).jobName(DINGTALK_SCHEDULE_SYN_MEMBER_JOB_NAME) + .jobGroup(DINGTALK_SCHEDULE_SYN_MEMBER_GROUP).triggerName(DINGTALK_SCHEDULE_SYN_MEMBER_TRIGGER_NAME) + .triggerGroup(DINGTALK_SCHEDULE_SYN_MEMBER_TRIGGER_GROUP).jobClazz(DingTalkSyncMemberJob.class); + this.startSchedule(jobConstructor); + } + + public void startSchedule(DingTalkJobConstructor var1) throws Exception { + if (var1 != null) { + String var2 = var1.getCron(); + String var3 = var1.getTriggerName(); + String var4 = var1.getTriggerGroup(); + String var5 = var1.getJobName(); + String var6 = var1.getJobGroup(); + Class var7 = var1.getJobClazz(); + TriggerBuilder var8 = TriggerBuilder.newTrigger(); + var8.withIdentity(var3, var4); + var8.withSchedule(CronScheduleBuilder.cronSchedule(var2).withMisfireHandlingInstructionFireAndProceed().inTimeZone(TimeZone.getTimeZone(TimeZone.getDefault().getID()))).startNow(); + var8.forJob(var5, var6); + ArrayList var9 = new ArrayList(); + var9.add(var8.build()); + ScheduleJobManager.getInstance().removeJob(var5, var6); + ScheduleJobManager.getInstance().addJob(var5, var6, "jobDescription", var7, var9, new HashMap()); + } + } + + public void stopSchedule(String var1, String var2) { + ScheduleJobManager.getInstance().removeJob(var1, var2); + } + + public static class HOLDER { + private static final DingTalkScheduleHelper INSTANCE = new DingTalkScheduleHelper(); + + public HOLDER() { + } + } + } diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/job/DingTalkSyncMemberJob.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/job/DingTalkSyncMemberJob.java new file mode 100644 index 0000000..2acfbbb --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/job/DingTalkSyncMemberJob.java @@ -0,0 +1,42 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkSyncMemberJob + * Author: Louis + * Date: 2021/4/21 16:02 + */ + package com.fr.plugin.xxxx.dingtalksyn.job; + + import com.fanruan.api.i18n.I18nKit; + import com.fanruan.api.log.LogKit; + import com.fr.cluster.core.ClusterNode; + import com.fr.plugin.context.PluginContexts; + import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; + import com.fr.plugin.xxxx.dingtalksyn.user.DingTalkUserManager; + import com.fr.scheduler.job.FineScheduleJob; + import com.fr.third.v2.org.quartz.JobExecutionContext; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkSyncMemberJob extends FineScheduleJob { + public DingTalkSyncMemberJob() { + } + + public void run(JobExecutionContext jobExecutionContext, ClusterNode clusterNode) { + try { + if (PluginContexts.currentContext().isAvailable()) { + DingTalkUserManager.getInstance().synDingTalkUsers(); + } else { + DingSynConfig.getInstance().setSsoEnable(false); + throw new Exception(I18nKit.getLocText("Plugin-dingtalksyn_Error_501")); + } + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/CustomRoleServiceKit.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/CustomRoleServiceKit.java new file mode 100644 index 0000000..4f03300 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/CustomRoleServiceKit.java @@ -0,0 +1,65 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: CustomRoleServiceKit + * Author: Louis + * Date: 2021/5/14 10:31 + */ + package com.fr.plugin.xxxx.dingtalksyn.kit; + + import com.fr.decision.authority.AuthorityContext; + import com.fr.decision.authority.base.constant.SoftRoleType; + import com.fr.decision.authority.base.constant.type.operation.ManualOperationType; + import com.fr.decision.authority.data.CustomRole; + import com.fr.decision.record.OperateMessage; + import com.fr.decision.webservice.bean.user.RoleBean; + import com.fr.decision.webservice.exception.general.DuplicatedNameException; + import com.fr.decision.webservice.utils.ControllerFactory; + import com.fr.decision.webservice.v10.user.CustomRoleService; + import com.fr.intelli.record.MetricRegistry; + import com.fr.stable.query.QueryFactory; + import com.fr.stable.query.condition.QueryCondition; + import com.fr.stable.query.restriction.Restriction; + import com.fr.stable.query.restriction.RestrictionFactory; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class CustomRoleServiceKit extends CustomRoleService { + private static volatile CustomRoleServiceKit customRoleServiceKit = null; + + public CustomRoleServiceKit() { + } + + public static CustomRoleServiceKit getInstance() { + if (customRoleServiceKit == null) { + customRoleServiceKit = new CustomRoleServiceKit(); + } + return customRoleServiceKit; + } + + public void addCustomRole(String username, RoleBean roleBean) throws Exception { + this.checkDuplicatedCustomRole(roleBean.getText()); + CustomRole customRole = (new CustomRole()).id(roleBean.getId()).name(roleBean.getText()).description(roleBean.getDescription()).creationType(ManualOperationType.KEY).lastOperationType(ManualOperationType.KEY).enable(true); + ControllerFactory.getInstance().getCustomRoleController(username).addCustomRole(username, customRole); + this.deleteSoftData(customRole.getName()); + MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Module-User_Manager", "Dec-Role", roleBean.getText(), "Dec-Log_Add")); + } + + private void checkDuplicatedCustomRole(String roleName) throws Exception { + QueryCondition queryCondition = QueryFactory.create().addRestriction(RestrictionFactory.eq("name", roleName)); + CustomRole customRole = (CustomRole) AuthorityContext.getInstance().getCustomRoleController().findOne(queryCondition); + if (customRole != null) { + throw new DuplicatedNameException(); + } + } + + private void deleteSoftData(String roleName) throws Exception { + QueryCondition queryCondition = QueryFactory.create().addRestriction(RestrictionFactory.and(new Restriction[]{RestrictionFactory.eq("deletedName", roleName), RestrictionFactory.eq("type", SoftRoleType.CUSTOM)})); + AuthorityContext.getInstance().getSoftDataController().remove(queryCondition); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/DepartmentServiceKit.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/DepartmentServiceKit.java new file mode 100644 index 0000000..43094cd --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/DepartmentServiceKit.java @@ -0,0 +1,109 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DepartmentServiceKit + * Author: Louis + * Date: 2021/5/14 9:38 + */ + package com.fr.plugin.xxxx.dingtalksyn.kit; + + import com.fanruan.api.i18n.I18nKit; + import com.fanruan.api.util.StringKit; + import com.fr.decision.authority.AuthorityContext; + import com.fr.decision.authority.base.constant.type.operation.ManualOperationType; + import com.fr.decision.authority.data.Department; + import com.fr.decision.record.OperateMessage; + import com.fr.decision.webservice.exception.general.DuplicatedNameException; + import com.fr.decision.webservice.v10.user.DepartmentService; + import com.fr.general.ComparatorUtils; + import com.fr.intelli.record.MetricRegistry; + import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; + import com.fr.stable.StableUtils; + import com.fr.stable.query.QueryFactory; + import com.fr.stable.query.condition.QueryCondition; + import com.fr.stable.query.restriction.Restriction; + import com.fr.stable.query.restriction.RestrictionFactory; + + import java.util.ArrayList; + import java.util.Collections; + import java.util.List; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DepartmentServiceKit extends DepartmentService { + public static final String DECISION_DEP_ROOT = "decision-dep-root"; + private static volatile DepartmentServiceKit departmentServiceKit = null; + + public DepartmentServiceKit() { + } + + public static DepartmentServiceKit getInstance() { + if (departmentServiceKit == null) { + departmentServiceKit = new DepartmentServiceKit(); + } + return departmentServiceKit; + } + + /** + * 钉钉跟部门与FR跟部门转换 + * + * @param parentId + * @return + */ + public String changeRootId(String parentId) { + if (StringKit.equals(parentId, String.valueOf(DingSynConfig.getInstance().getRootDepId()))) { + return DECISION_DEP_ROOT; + } + return parentId; + } + + public void addDepartment(String id, String pId, String depName) throws Exception { + if (StringKit.equals(pId, DECISION_DEP_ROOT)) { + pId = null; + } + this.checkDuplicatedDepartmentName(pId, depName); + Department department = (new Department()).id(id).name(depName).parentId(pId).creationType(ManualOperationType.KEY).lastOperationType(ManualOperationType.KEY).enable(true); + AuthorityContext.getInstance().getDepartmentController().add(department); + MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Module-User_Manager", "Dec-Department", this.getDepartmentFullPath(pId, depName, "/"), "Dec-Log_Add")); + } + + private void checkDuplicatedDepartmentName(String parentId, String depName) throws Exception { + QueryCondition condition = QueryFactory.create().addRestriction(RestrictionFactory.and(new Restriction[]{RestrictionFactory.eq("name", depName), RestrictionFactory.eq("parentId", parentId)})); + Department sameNameDep = AuthorityContext.getInstance().getDepartmentController().findOne(condition); + if (sameNameDep != null) { + throw new DuplicatedNameException(); + } + } + + private String getDepartmentFullPath(String pId, String depName, String splitter) throws Exception { + List paths = new ArrayList<>(); + paths.add(depName); + while (!ComparatorUtils.equals(pId, DECISION_DEP_ROOT) && pId != null) { + Department parentDepartment = AuthorityContext.getInstance().getDepartmentController().getById(pId); + paths.add(parentDepartment.getName()); + pId = parentDepartment.getParentId(); + } + Collections.reverse(paths); + return StableUtils.join(paths.toArray(new String[0]), splitter); + } + + public void editDepartment(String departmentId, String depName, String pId) throws Exception { + if (StringKit.equals(pId, DECISION_DEP_ROOT)) { + pId = null; + } + Department department = AuthorityContext.getInstance().getDepartmentController().getById(departmentId); + String departmentFullPath = DepartmentService.getInstance().getDepartmentFullPath(departmentId); + if (!ComparatorUtils.equals(department.getName(), depName)) { + this.checkDuplicatedDepartmentName(department.getParentId(), depName); + department.setName(depName); + department.setParentId(pId); + AuthorityContext.getInstance().getDepartmentController().update(department); + } + MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Module-User_Manager", "Dec-Department", DepartmentService.getInstance().getDepartmentFullPath(departmentId), "Dec-Log_Update", I18nKit.getLocText("Fine-Dec_Department") + ":" + departmentFullPath)); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/UserServiceKit.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/UserServiceKit.java new file mode 100644 index 0000000..0c23be3 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/kit/UserServiceKit.java @@ -0,0 +1,231 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: UserServiceKit + * Author: Louis + * Date: 2021/5/14 8:28 + */ + package com.fr.plugin.xxxx.dingtalksyn.kit; + + import com.dingtalk.api.response.OapiV2UserGetResponse; + import com.fanruan.api.log.LogKit; + import com.fanruan.api.util.StringKit; + import com.fr.decision.authority.AuthorityContext; + import com.fr.decision.authority.data.BaseUserDataRecord; + import com.fr.decision.authority.data.CustomRole; + import com.fr.decision.authority.data.Post; + import com.fr.decision.authority.data.User; + import com.fr.decision.authority.data.personnel.DepRole; + import com.fr.decision.privilege.TransmissionTool; + import com.fr.decision.webservice.bean.user.DepartmentPostBean; + import com.fr.decision.webservice.bean.user.UserBean; + import com.fr.decision.webservice.bean.user.UserUpdateBean; + import com.fr.decision.webservice.utils.UserSourceFactory; + import com.fr.decision.webservice.utils.WebServiceUtils; + import com.fr.decision.webservice.v10.user.PositionService; + import com.fr.decision.webservice.v10.user.UserService; + import com.fr.stable.StringUtils; + import com.fr.stable.collections.CollectionUtils; + import com.fr.stable.query.QueryFactory; + import com.fr.stable.query.restriction.RestrictionFactory; + + import java.util.ArrayList; + import java.util.List; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class UserServiceKit extends UserService { + private static volatile UserServiceKit userServiceKit = null; + + public UserServiceKit() { + } + + public static UserServiceKit getInstance() { + if (userServiceKit == null) { + userServiceKit = new UserServiceKit(); + } + return userServiceKit; + } + + public UserBean createUserBean(OapiV2UserGetResponse.UserGetResponse userGetResponse) throws Exception { + UserBean userBean = new UserBean(); + userBean.setUsername(userGetResponse.getUserid()); + userBean.setRealName(userGetResponse.getName()); + userBean.setEmail(userGetResponse.getEmail()); + userBean.setMobile(userGetResponse.getMobile()); + userBean.setPassword(TransmissionTool.defaultEncrypt(userGetResponse.getUserid() + "123456")); + if (!CollectionUtils.isEmpty(userGetResponse.getRoleList())) { + userBean.setRoleIds(oapiUserRoles2Ids(userGetResponse.getRoleList())); + } + if (!CollectionUtils.isEmpty(userGetResponse.getDeptIdList())) { + List departmentPostIds = createDepartmentPostIds(userGetResponse.getDeptIdList(), userGetResponse.getTitle()); + userBean.setDepartmentPostIds(departmentPostIds); + } + return userBean; + } + + /** + * 钉钉部门list转为部门职务组合list + * + * @param deptIdList + * @param title + * @return + * @throws Exception + */ + private List createDepartmentPostIds(List deptIdList, String title) throws Exception { + List departmentPostIds = new ArrayList<>(); + String departmentPostId; + for (long currentDepId : deptIdList) { + departmentPostId = String.valueOf(currentDepId); + if (StringKit.isBlank(departmentPostId) || StringKit.equals(departmentPostId, "null")) { + continue; + } + // 职务处理 + String positionId = positionSynOperation(title, departmentPostId); + if (StringKit.isNotBlank(positionId)) { + departmentPostId = departmentPostId + "@@@" + positionId; + } + departmentPostIds.add(departmentPostId); + } + return departmentPostIds; + } + + /** + * 职务同步操作 + * + * @param title + * @return + * @throws Exception + */ + private String positionSynOperation(String title, String departmentId) throws Exception { + String position = StringKit.isNotBlank(title) ? title : "职员"; + Post post = AuthorityContext.getInstance().getPostController().findOne(QueryFactory.create().addRestriction(RestrictionFactory.eq("name", position))); + String positionId; + if (post == null) { + positionId = PositionService.getInstance().addPosition(position, position); + } else { + positionId = post.getId(); + } + List departmentPostBeanList = PositionService.getInstance().getPositionsUnderParentDepartment(getAdminUserId(), departmentId, position); + if (departmentPostBeanList == null || departmentPostBeanList.isEmpty()) { + try { + AuthorityContext.getInstance().getPostController().addPostToDepartment(positionId, departmentId); + } catch (Exception e) { + LogKit.info("dingtalksyn-UserServiceKit-positionSynOperation-addPostToDepartmentFailed-position:{}, departmentId:{}", positionId + position, departmentId); + LogKit.error(e.getMessage(), e); + } + } + return positionId; + } + + /** + * 获取管理员id + * + * @return + * @throws Exception + */ + public String getAdminUserId() throws Exception { + List adminUserIdList = this.getAdminUserIdList(); + if (adminUserIdList.isEmpty()) { + return "admin"; + } + return StringKit.isNotBlank(adminUserIdList.get(0)) ? adminUserIdList.get(0) : "admin"; + } + + public void editUser(UserBean userBean) throws Exception { + super.editUser(userBean, this.getAdminUserId()); + } + + public UserBean updateUserBean(OapiV2UserGetResponse.UserGetResponse userGetResponse) throws Exception { + User user = this.getUserByUserName(userGetResponse.getUserid()); + if (user == null) { + return null; + } + UserBean userBean = new UserBean(); + userBean.setId(user.getId()); + userBean.setUsername(user.getUserName()); + userBean.setRealName(userGetResponse.getName()); + userBean.setEmail(userGetResponse.getEmail()); + userBean.setMobile(userGetResponse.getMobile()); + if (!CollectionUtils.isEmpty(userGetResponse.getRoleList())) { + userBean.setRoleIds(oapiUserRoles2Ids(userGetResponse.getRoleList())); + } + if (!CollectionUtils.isEmpty(userGetResponse.getDeptIdList())) { + List departmentPostIds = createDepartmentPostIds(userGetResponse.getDeptIdList(), userGetResponse.getTitle()); + userBean.setDepartmentPostIds(departmentPostIds); + } + return userBean; + } + + public int updateRoleUsers(String var1, UserUpdateBean var2) throws Exception { + String[] var3 = var2.getAddUserIds(); + String[] var4 = var2.getRemoveUserIds(); + CustomRole var5 = (CustomRole) AuthorityContext.getInstance().getCustomRoleController().getById(var1); + int var6 = 0; + String[] var7; + int var8; + int var9; + String var10; + if (var3 != null) { + var7 = var3; + var8 = var3.length; + + for (var9 = 0; var9 < var8; ++var9) { + var10 = var7[var9]; +// MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Module-User_Manager", "Dec-Role_User", this.getRoleUsername(var1, var10), "Dec-Log_Add")); + UserSourceFactory.getInstance().checkSource((BaseUserDataRecord) AuthorityContext.getInstance().getUserController().getById(var10), var5); + AuthorityContext.getInstance().getUserController().addUserToCustomRole(var10, var1); + ++var6; + } + } + + if (var4 != null) { + var7 = var4; + var8 = var4.length; + + for (var9 = 0; var9 < var8; ++var9) { + var10 = var7[var9]; +// MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Module-User_Manager", "Dec-Role_User", this.getRoleUsername(var1, var10), "Dec-Log_Delete")); + UserSourceFactory.getInstance().checkSource((BaseUserDataRecord) AuthorityContext.getInstance().getUserController().getById(var10), var5); + AuthorityContext.getInstance().getUserController().removeUserFromCustomRole(var10, var1); + ++var6; + } + } + + return var6; + } + + /** + * 增加用户部门关联 + * + * @param userBean + * @throws Exception + */ + public void addUserDepartment(UserBean userBean) throws Exception { + if (CollectionUtils.isEmpty(userBean.getDepartmentPostIds())) { + return; + } + for (String departmentPostId : userBean.getDepartmentPostIds()) { + if (StringUtils.isEmpty(departmentPostId)) { + continue; + } + User user = this.getUserByUserName(userBean.getUsername()); + DepRole depRole = WebServiceUtils.parseUniqueDepartmentPostId(departmentPostId); + UserSourceFactory.getInstance().checkSource(user, AuthorityContext.getInstance().getDepartmentController().getById(depRole.getDepartmentId())); + AuthorityContext.getInstance().getUserController().addUserToDepartmentAndPost(user.getId(), depRole.getDepartmentId(), depRole.getPostId()); + } + } + + private String[] oapiUserRoles2Ids(List oapiUserRoleList) { + String[] roleIds = new String[oapiUserRoleList.size()]; + for (int i = 0; i < oapiUserRoleList.size(); i++) { + roleIds[i] = String.valueOf(oapiUserRoleList.get(i).getId()); + } + return roleIds; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/DingTalkHttpHandlerProvider.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/DingTalkHttpHandlerProvider.java new file mode 100644 index 0000000..d8afe24 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/DingTalkHttpHandlerProvider.java @@ -0,0 +1,62 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkHttpHandlerProvider + * Author: Louis + * Date: 2021/6/24 20:18 + */ + package com.fr.plugin.xxxx.dingtalksyn.provider; + + import com.fr.decision.fun.HttpHandler; +import com.fr.decision.fun.impl.AbstractHttpHandlerProvider; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkHttpHandlerProvider extends AbstractHttpHandlerProvider { + public DingTalkHttpHandlerProvider() { + } + + public HttpHandler[] registerHandlers() { + return new HttpHandler[]{ +// new DingTalkHttpHandlerDecorator(new DingTalkCreateAgentHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkUpdateAgentHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkDeleteAgentHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetAgentListHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkGetReportServerHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkSaveReportServerHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetCorpListHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetMembersHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetMatchMethodHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetTimingTaskHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkSaveMatchMethodHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkSaveTimingTaskHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkSyncMembersHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkSaveUserRelationHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkCreateEntryUrlHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetProxyServerHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkProxyTestConnectionHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkSaveProxyServerHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkCheckLicenseHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkExpireHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkGetJsTicketHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkUrlToBase64(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkSingleLoginHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkStartDebuggerHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkDebuggerHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkSetLogLevelHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkGetLogLevelHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkLogDownLoadHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkCreateChatGroupHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetChatGroupHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkDeleteChatGroupHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkGetAgentMemberHandler()), +// new DingTalkHttpHandlerDecorator(new DingTalkMatchUserHandler(), false), +// new DingTalkHttpHandlerDecorator(new DingTalkGetFSUserHandler(), false) + }; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/DingTalkSystemOption.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/DingTalkSystemOption.java new file mode 100644 index 0000000..b58bd81 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/DingTalkSystemOption.java @@ -0,0 +1,49 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkSystemOption + * Author: Louis + * Date: 2021/6/22 16:40 + */ + package com.fr.plugin.xxxx.dingtalksyn.provider; + + import com.fanruan.api.i18n.I18nKit; + import com.fr.decision.fun.impl.AbstractSystemOptionProvider; + import com.fr.decision.web.MainComponent; + import com.fr.plugin.xxxx.dingtalksyn.provider.components.DingTalkComponent; + import com.fr.web.struct.Atom; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkSystemOption extends AbstractSystemOptionProvider { + + public static final String DING_TALK_SYN_SYSTEM_OPTION = "DingTalkSynSystemOption"; + + public DingTalkSystemOption() { + } + + public String id() { + return DING_TALK_SYN_SYSTEM_OPTION; + } + + public String displayName() { + return I18nKit.getLocText("Plugin-dingtalksyn_DingTalk_Manager"); + } + + public int sortIndex() { + return 2; + } + + public Atom attach() { + return MainComponent.KEY; + } + + public Atom client() { + return DingTalkComponent.KEY; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/LifeCycleMonitorImpl.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/LifeCycleMonitorImpl.java new file mode 100644 index 0000000..c0317b5 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/LifeCycleMonitorImpl.java @@ -0,0 +1,49 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: LifeCycleMonitorImpl + * Author: Louis + * Date: 2021/3/30 15:10 + */ + package com.fr.plugin.xxxx.dingtalksyn.provider; + + import com.fanruan.api.log.LogKit; + import com.fr.plugin.context.PluginContext; + import com.fr.plugin.xxxx.dingtalksyn.helper.DingTalkScheduleHelper; + import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor; + import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; + + import static com.fr.plugin.xxxx.dingtalksyn.helper.DingTalkScheduleHelper.DINGTALK_SCHEDULE_SYN_MEMBER_GROUP; + import static com.fr.plugin.xxxx.dingtalksyn.helper.DingTalkScheduleHelper.DINGTALK_SCHEDULE_SYN_MEMBER_JOB_NAME; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class LifeCycleMonitorImpl extends AbstractPluginLifecycleMonitor { + public LifeCycleMonitorImpl() { + } + + @Override + public void afterRun(PluginContext pluginContext) { + DingSynConfig.getInstance(); + this.reStartSchedule(); + } + + @Override + public void beforeStop(PluginContext pluginContext) { + DingTalkScheduleHelper.getInstance().stopSchedule(DINGTALK_SCHEDULE_SYN_MEMBER_JOB_NAME, DINGTALK_SCHEDULE_SYN_MEMBER_GROUP); + } + + private void reStartSchedule() { + try { + String cronCondition = DingSynConfig.getInstance().getCronCondition(); + DingTalkScheduleHelper.getInstance().startSynMemberSchedule(cronCondition); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/LocaleFinder.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/LocaleFinder.java new file mode 100644 index 0000000..84fd96e --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/LocaleFinder.java @@ -0,0 +1,43 @@ + /* + * Copyright (C), 2018-2020 + * Project: starter + * FileName: LocaleFinder + * Author: Louis + * Date: 2020/8/31 22:19 + */ + package com.fr.plugin.xxxx.dingtalksyn.provider; + + import com.fanruan.api.util.StringKit; +import com.fr.intelli.record.Focus; +import com.fr.intelli.record.Original; +import com.fr.plugin.context.PluginContexts; +import com.fr.record.analyzer.EnableMetrics; +import com.fr.stable.fun.Authorize; +import com.fr.stable.fun.impl.AbstractLocaleFinder; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + @EnableMetrics + @Authorize(callSignKey = LocaleFinder.PLUGIN_ID) + public class LocaleFinder extends AbstractLocaleFinder { + public static final String PLUGIN_ID = "com.fr.plugin.xxxx.dingtalksyn.job"; + + @Override + @Focus(id = PLUGIN_ID, text = "Plugin-dingtalksyn", source = Original.PLUGIN) + public String find() { + if (PluginContexts.currentContext().isAvailable()) { + return "com/fr/plugin/xxxx/dingtalksyn/locale/lang"; + } + return StringKit.EMPTY; + } + + @Override + public int currentAPILevel() { + return CURRENT_LEVEL; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/components/DingTalkComponent.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/components/DingTalkComponent.java new file mode 100644 index 0000000..bacbcf6 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/provider/components/DingTalkComponent.java @@ -0,0 +1,37 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkComponent + * Author: Louis + * Date: 2021/6/22 16:46 + */ + package com.fr.plugin.xxxx.dingtalksyn.provider.components; + + import com.fr.web.struct.Component; + import com.fr.web.struct.browser.RequestClient; + import com.fr.web.struct.category.ScriptPath; + import com.fr.web.struct.category.StylePath; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkComponent extends Component { + public static DingTalkComponent KEY = new DingTalkComponent(); + + public DingTalkComponent() { + } + + @Override + public ScriptPath script(RequestClient client) { + return ScriptPath.build("/com/fr/plugin/xxxx/dingtalksyn/web/dingtalk.js"); + } + + @Override + public StylePath style(RequestClient client) { + return StylePath.build("/com/fr/plugin/officialaccount/web/dingtalk.css"); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/CallBackController.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/CallBackController.java new file mode 100644 index 0000000..5fa05fc --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/CallBackController.java @@ -0,0 +1,404 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: CallBackController + * Author: Louis + * Date: 2021/3/29 22:36 + */ + package com.fr.plugin.xxxx.dingtalksyn.request; + + import com.dingtalk.api.response.OapiRoleGetroleResponse; +import com.dingtalk.api.response.OapiV2DepartmentGetResponse; +import com.dingtalk.api.response.OapiV2UserGetResponse; +import com.dingtalk.oapi.lib.aes.DingTalkEncryptor; +import com.fanruan.api.decision.user.UserKit; +import com.fanruan.api.i18n.I18nKit; +import com.fanruan.api.log.LogKit; + import com.fanruan.api.util.StringKit; + import com.fr.decision.authority.base.constant.type.operation.ManualOperationType; +import com.fr.decision.authority.data.User; +import com.fr.decision.webservice.annotation.LoginStatusChecker; +import com.fr.decision.webservice.bean.user.RoleBean; +import com.fr.decision.webservice.bean.user.UserBean; +import com.fr.decision.webservice.bean.user.UserUpdateBean; +import com.fr.decision.webservice.v10.user.CustomRoleService; +import com.fr.decision.webservice.v10.user.DepartmentService; +import com.fr.decision.webservice.v10.user.UserService; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.plugin.context.PluginContexts; +import com.fr.plugin.xxxx.dingtalksyn.bean.DataResponse; +import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; +import com.fr.plugin.xxxx.dingtalksyn.kit.CustomRoleServiceKit; +import com.fr.plugin.xxxx.dingtalksyn.kit.DepartmentServiceKit; +import com.fr.plugin.xxxx.dingtalksyn.kit.UserServiceKit; +import com.fr.plugin.xxxx.dingtalksyn.utils.DingTokenUtils; +import com.fr.third.springframework.stereotype.Controller; +import com.fr.third.springframework.web.bind.annotation.*; +import com.taobao.api.ApiException; + +import javax.servlet.http.HttpServletResponse; + +import static com.fr.plugin.xxxx.dingtalksyn.utils.DingAPI.*; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + @Controller + @RequestMapping("dingCallback") + public class CallBackController { + + /** + * 测试检查url + */ + public static final String EVENT_CHECK_URL = "check_url"; + /** + * 创建应用,验证回调URL创建有效事件(第一次保存回调URL之前) + */ + public static final String EVENT_CHECK_CREATE_SUITE_URL = "check_create_suite_url"; + /** + * 创建应用,验证回调URL变更有效事件(第一次保存回调URL之后) + */ + public static final String EVENT_CHECK_UPADTE_SUITE_URL = "check_update_suite_url"; + /** + * suite_ticket推送事件 + */ + public static final String EVENT_SUITE_TICKET = "suite_ticket"; + /** + * 企业授权开通应用事件 + */ + public static final String EVENT_TMP_AUTH_CODE = "tmp_auth_code"; + public static final String USER_ADD_ORG = "user_add_org"; + public static final String USER_MODIFY_ORG = "user_modify_org"; + public static final String USER_LEAVE_ORG = "user_leave_org"; + public static final String USER_ACTIVE_ORG = "user_active_org"; + public static final String ORG_DEPT_CREATE = "org_dept_create"; + public static final String ORG_DEPT_MODIFY = "org_dept_modify"; + public static final String ORG_DEPT_REMOVE = "org_dept_remove"; + public static final String LABEL_USER_CHANGE = "label_user_change"; + public static final String LABEL_CONF_ADD = "label_conf_add"; + public static final String LABEL_CONF_DEL = "label_conf_del"; + public static final String LABEL_CONF_MODIFY = "label_conf_modify"; + public static final String ACTION_ADD = "add"; + public static final String ACTION_REMOVE = "remove"; + + private DingSynConfig config; + private String adminName; + + public CallBackController() { + this.config = DingSynConfig.getInstance(); + } + + @RequestMapping(method = RequestMethod.POST) + @ResponseBody + @LoginStatusChecker(required = false) + public DataResponse doAction(@RequestParam(value = "signature") String signature, + @RequestParam(value = "timestamp") Long timestamp, + @RequestParam(value = "nonce") String nonce, + @RequestBody(required = false) String bodyContent, + HttpServletResponse res) { + if (!PluginContexts.currentContext().isAvailable()) { + DingSynConfig.getInstance().setSsoEnable(false); + return DataResponse.error("501", I18nKit.getLocText("Plugin-dingtalksyn_Error_501")); + } + try { + JSONObject bodyJson = new JSONObject(bodyContent); + String encryptMsg = bodyJson.getString("encrypt"); + DingTalkEncryptor dingTalkEncryptor = new DingTalkEncryptor(this.config.getToken(), this.config.getAesKey(), this.config.getAppKey()); + String decryptMsg = dingTalkEncryptor.getDecryptMsg(signature, timestamp.toString(), nonce, encryptMsg); + JSONObject event = new JSONObject(decryptMsg); + this.adminName = UserService.getInstance().getAdminUserNameList().get(0); + setHeader(res); + operation(event); + return DataResponse.success(dingTalkEncryptor.getEncryptedMap("success", timestamp, nonce)); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + return DataResponse.error("500", I18nKit.getLocText("Plugin-dingtalksyn_Error_500")); + } + } + + /** + * 企业应用业务事件处理 + * + * @param event + * @return + */ + private void operation(JSONObject event) throws Exception { + String eventType = event.getString("EventType"); + LogKit.info("dingtalksyn-CallBackController-operation-eventType:{}", eventType); + switch (eventType) { + case EVENT_CHECK_URL: + // 测试回调url事件 无操作,只返回success信息 + break; + case EVENT_CHECK_CREATE_SUITE_URL: + // 验证新创建的回调URL,只返回success信息 + break; + case EVENT_CHECK_UPADTE_SUITE_URL: + // 验证更新回调URL,只返回success信息 + break; + case EVENT_SUITE_TICKET: + // 推送suite_ticket事件,保存 + DingTokenUtils.setSuiteTicket(event.getString("SuiteTicket")); + break; + case USER_ADD_ORG: + createUser(event); + break; + case USER_MODIFY_ORG: + updateUser(event); + break; + case USER_LEAVE_ORG: + deleteUser(event); + break; + case USER_ACTIVE_ORG: + addOrUpdateUser(event); + break; + case ORG_DEPT_CREATE: + createOrganization(event); + break; + case ORG_DEPT_MODIFY: + updateOrganization(event); + break; + case ORG_DEPT_REMOVE: + deleteOrganization(event); + break; + case LABEL_USER_CHANGE: + changeRoleUsers(event); + break; + case LABEL_CONF_ADD: + addRoles(event); + break; + case LABEL_CONF_DEL: + deleteRoles(event); + break; + case LABEL_CONF_MODIFY: + updateRoles(event); + break; + } + } + + /** + * 员工角色信息发生变更 + * + * @param event + */ + private void changeRoleUsers(JSONObject event) throws Exception { + String action = event.getString("action"); + JSONArray roleIdArray = event.getJSONArray("LabelIdList"); + JSONArray userIdArray = event.getJSONArray("UserIdList"); + String[] userIds = new String[userIdArray.size()]; + for (int i = 0; i < userIdArray.size(); i++) { + User user = UserService.getInstance().getUserByUserName(userIdArray.getString(i)); + if (user == null) { + continue; + } + userIds[i] = user.getId(); + } + UserUpdateBean userUpdateBean; + for (int j = 0; j < roleIdArray.size(); j++) { + userUpdateBean = new UserUpdateBean(); + if (StringKit.equals(action, ACTION_ADD)) { + userUpdateBean.setAddUserIds(userIds); + } + if (StringKit.equals(action, ACTION_REMOVE)) { + userUpdateBean.setRemoveUserIds(userIds); + } + UserServiceKit.getInstance().updateRoleUsers(roleIdArray.getString(j), userUpdateBean); + } + } + + /** + * 修改角色或者角色组 + * + * @param event + */ + private void updateRoles(JSONObject event) throws Exception { + JSONArray roleIds = event.getJSONArray("LabelIdList"); + for (int i = 0; i < roleIds.size(); i++) { + OapiRoleGetroleResponse.OpenRole openRole = getRoleResponse(roleIds.getLong(i)); + RoleBean roleBean = CustomRoleService.getInstance().getCustomRole(roleIds.getString(i)); + roleBean.setText(openRole.getName()); + roleBean.setDescription(openRole.getName()); + CustomRoleService.getInstance().editCustomRole(roleBean.getId(), roleBean); + } + } + + /** + * 删除角色或者角色组 + * + * @param event + */ + private void deleteRoles(JSONObject event) throws Exception { + JSONArray roleIds = event.getJSONArray("LabelIdList"); + for (int i = 0; i < roleIds.size(); i++) { + CustomRoleService.getInstance().deleteCustomRole(roleIds.getString(i)); + } + } + + /** + * 增加角色或者角色组 + * + * @param event + * @throws ApiException + */ + private void addRoles(JSONObject event) throws Exception { + JSONArray roleIds = event.getJSONArray("LabelIdList"); + long roleId; + for (int i = 0; i < roleIds.size(); i++) { + roleId = roleIds.getLong(i); + OapiRoleGetroleResponse.OpenRole openRole = getRoleResponse(roleId); + RoleBean roleBean = new RoleBean(openRole.getName(), String.valueOf(roleId), openRole.getName(), ManualOperationType.KEY.toInteger()); + CustomRoleServiceKit.getInstance().addCustomRole(UserServiceKit.getInstance().getAdminUserId(), roleBean); + } + } + + /** + * 通讯录企业部门创建 + * + * @param event + * @return + */ + private void createOrganization(JSONObject event) throws Exception { + JSONArray deptIds = event.getJSONArray("DeptId"); + long deptId; + for (int i = 0; i < deptIds.size(); i++) { + deptId = deptIds.getLong(i); + OapiV2DepartmentGetResponse.DeptGetResponse deptGetResponse = getDeptResponse(deptId); + String parentId = String.valueOf(deptGetResponse.getParentId()); + parentId = DepartmentServiceKit.getInstance().changeRootId(parentId); + String depName = deptGetResponse.getName(); + DepartmentServiceKit.getInstance().addDepartment(String.valueOf(deptId), parentId, depName); + } + } + + /** + * 更新组织事件 + * + * @param event + * @return + */ + private void updateOrganization(JSONObject event) throws Exception { + JSONArray deptIds = event.getJSONArray("DeptId"); + long deptId; + for (int i = 0; i < deptIds.size(); i++) { + deptId = deptIds.getLong(i); + OapiV2DepartmentGetResponse.DeptGetResponse deptGetResponse = getDeptResponse(deptId); + String departmentId = String.valueOf(deptGetResponse.getDeptId()); + String depName = deptGetResponse.getName(); + String parentId = String.valueOf(deptGetResponse.getParentId()); + parentId = DepartmentServiceKit.getInstance().changeRootId(parentId); + DepartmentServiceKit.getInstance().editDepartment(departmentId, depName, parentId); + } + } + + /** + * 删除组织事件 + * + * @param event + * @return + */ + private void deleteOrganization(JSONObject event) throws Exception { + JSONArray deptIds = event.getJSONArray("DeptId"); + for (int i = 0; i < deptIds.size(); i++) { + DepartmentService.getInstance().deleteDepartment(deptIds.getString(i)); + } + } + + /** + * 新增用户事件 + * + * @param event + * @return + */ + private void createUser(JSONObject event) throws Exception { + JSONArray userIds = event.getJSONArray("UserId"); + String userId; + for (int i = 0; i < userIds.size(); i++) { + userId = userIds.getString(i); + OapiV2UserGetResponse.UserGetResponse userGetResponse = getUserResponse(userId); + UserBean userBean = UserServiceKit.getInstance().createUserBean(userGetResponse); + UserService.getInstance().addUser(userBean); + } + } + + /** + * 更新用户事件 + * + * @param event + * @return + */ + private void updateUser(JSONObject event) throws Exception { + JSONArray userIds = event.getJSONArray("UserId"); + String userId; + for (int i = 0; i < userIds.size(); i++) { + userId = userIds.getString(i); + OapiV2UserGetResponse.UserGetResponse userGetResponse = getUserResponse(userId); + UserBean userBean = UserServiceKit.getInstance().updateUserBean(userGetResponse); + if (userBean == null) { + continue; + } + UserServiceKit.getInstance().editUser(userBean); + } + } + + /** + * 加入企业后用户激活 + * 新增或更新用户 + * + * @param event + * @throws Exception + */ + private void addOrUpdateUser(JSONObject event) throws Exception { + JSONArray userIds = event.getJSONArray("UserId"); + String userId; + for (int i = 0; i < userIds.size(); i++) { + userId = userIds.getString(i); + OapiV2UserGetResponse.UserGetResponse userGetResponse = getUserResponse(userId); + UserBean userBean; + if (UserKit.existUsername(userId)) { + userBean = UserServiceKit.getInstance().updateUserBean(userGetResponse); + if (userBean == null) { + continue; + } + UserServiceKit.getInstance().editUser(userBean); + } else { + userBean = UserServiceKit.getInstance().createUserBean(userGetResponse); + UserService.getInstance().addUser(userBean); + } + } + } + + /** + * 用户离职事件 + * + * @param event + * @return + */ + private void deleteUser(JSONObject event) throws Exception { + JSONArray userIds = event.getJSONArray("UserId"); + User user; + for (int i = 0; i < userIds.size(); i++) { + user = UserService.getInstance().getUserByUserName(userIds.getString(i)); + String[] removeUserIds = new String[]{user.getId()}; + UserUpdateBean userUpdateBean = new UserUpdateBean(); + userUpdateBean.setRemoveUserIds(removeUserIds); + UserService.getInstance().deleteUsers(userUpdateBean); + } + } + + /** + * 解决跨域访问问题 + * + * @param res + */ + private void setHeader(HttpServletResponse res) { + // 跨域设置header + res.setHeader("Access-Control-Allow-Origin", "*"); + res.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); + res.setHeader("Access-Control-Max-Age", "3600"); + res.setHeader("Access-Control-Allow-Headers", "x-requested-with"); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/DingTalkControllerBridge.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/DingTalkControllerBridge.java new file mode 100644 index 0000000..2a1d5d0 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/DingTalkControllerBridge.java @@ -0,0 +1,26 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkControllerBridge + * Author: Louis + * Date: 2021/3/29 22:30 + */ + package com.fr.plugin.xxxx.dingtalksyn.request; + + import com.fr.decision.fun.impl.AbstractControllerRegisterProvider; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkControllerBridge extends AbstractControllerRegisterProvider { + @Override + public Class[] getControllers() { + return new Class[]{ + CallBackController.class + }; + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/GlobalRequestFilterBridge.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/GlobalRequestFilterBridge.java new file mode 100644 index 0000000..1c70e75 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/request/GlobalRequestFilterBridge.java @@ -0,0 +1,202 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: GlobalRequestFilterBridge + * Author: Louis + * Date: 2021/3/30 22:09 + */ + package com.fr.plugin.xxxx.dingtalksyn.request; + + import com.fanruan.api.decision.login.LoginKit; +import com.fanruan.api.log.LogKit; +import com.fanruan.api.net.NetworkKit; +import com.fanruan.api.net.http.HttpKit; +import com.fanruan.api.util.IOKit; +import com.fanruan.api.util.StringKit; +import com.fr.base.TemplateUtils; +import com.fr.decision.fun.impl.AbstractGlobalRequestFilterProvider; +import com.fr.decision.webservice.utils.DecisionServiceConstants; +import com.fr.json.JSONObject; +import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; +import com.fr.web.utils.WebUtils; + +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.Map; + +import static com.fr.plugin.xxxx.dingtalksyn.utils.DingAPI.GETTOKEN; +import static com.fr.plugin.xxxx.dingtalksyn.utils.DingAPI.GET_USER_INFO; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class GlobalRequestFilterBridge extends AbstractGlobalRequestFilterProvider { + public static final String TPL_PATH = "/com/fr/plugin/xxxx/dingtalksyn/web/codePage.html"; + public static final String DINGTALK_OPEN_JS = "/com/fr/plugin/xxxx/dingtalksyn/web/dingtalk.open.js"; + public static final String CODE = "code"; + public static final String DING_TALK_LOGIN = "dt"; + + private DingSynConfig config; + + /** + * 过滤器名称 + * + * @return + */ + @Override + public String filterName() { + return "DingTalkSynFilter"; + } + + /** + * 过滤规则 + * + * @return + */ + @Override + public String[] urlPatterns() { + return new String[]{"/decision/*"}; + } + + /** + * 过滤器初始化 + * + * @param filterConfig + */ + @Override + public void init(FilterConfig filterConfig) { + this.config = DingSynConfig.getInstance(); + super.init(filterConfig); + } + + /** + * 过滤器处理 + * + * @param request + * @param response + * @param filterChain + */ + @Override + public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) { + try { + if (operation(request, response)) { + filterChain.doFilter(request, response); + } + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + } + + /** + * 用户验证登陆操作 + * + * @param req + * @param res + * @throws Exception + */ + private boolean operation(HttpServletRequest req, HttpServletResponse res) throws Exception { + // 判断单点功能是否开启 + if (!this.config.getSsoEnable()) { + return true; + } + String pathInfo = (req.getPathInfo() != null) ? req.getPathInfo() : StringKit.EMPTY; + if (StringKit.equals(DINGTALK_OPEN_JS, pathInfo)) { + WebUtils.printAsString(res, IOKit.readResourceAsString(DINGTALK_OPEN_JS)); + return false; + } + //DingTalk登陆参数 + String dt = NetworkKit.getHTTPRequestParameter(req, DING_TALK_LOGIN); + if (StringKit.isBlank(dt)) { + return true; + } + String code = NetworkKit.getHTTPRequestParameter(req, CODE); + LogKit.info("dingtalksyn-GlobalRequestFilterBridge-operation-code:{}", code); + if (StringKit.isEmpty(code)) { + loginPage(req, res); + return false; + } + String accessToken = getAccessToken(code); + String username = getUsername(code, accessToken); + LogKit.info("dingtalksyn-GlobalRequestFilterBridge-operation-username:{}", username); + if (StringKit.isEmpty(username)) { + return true; + } + String tokenFR = LoginKit.login(req, res, username); + req.setAttribute(DecisionServiceConstants.FINE_AUTH_TOKEN_NAME, tokenFR); + return true; + } + + /** + * 钉钉获取code页面 + * + * @param req + * @param res + * @return + * @throws Exception + */ + private void loginPage(HttpServletRequest req, HttpServletResponse res) throws Exception { + Map parameterMap = new HashMap<>(); + parameterMap.put("corpId", this.config.getCorpId()); + parameterMap.put("openJs", WebUtils.createServletURL(req) + DINGTALK_OPEN_JS); + parameterMap.put("remoteServletURL", getRemoteServletURL(WebUtils.getOriginalURL(req))); + String codePage = TemplateUtils.renderTemplate(TPL_PATH, parameterMap); + WebUtils.printAsString(res, codePage); + } + + /** + * 处理请求url加入code参数 + * + * @param url + * @return + */ + private String getRemoteServletURL(String url) { + if (url.contains("?")) { + return url + "&" + CODE + "="; + } + return url + "?" + CODE + "="; + } + + /** + * 获取access_token + * + * @param code + * @return + * @throws Exception + */ + private String getAccessToken(String code) throws Exception { + Map tokenParams = new HashMap<>(); + tokenParams.put("appkey", this.config.getAppKey()); + tokenParams.put("appsecret", this.config.getAppSecret()); + tokenParams.put("code", code); + LogKit.info("dingtalksyn-GlobalRequestFilterBridge-getAccessToken-params:{}", tokenParams); + String res = HttpKit.get(GETTOKEN, tokenParams); + LogKit.info("dingtalksyn-GlobalRequestFilterBridge-getAccessToken-res:{}", res); + if (StringKit.isEmpty(res)) { + return StringKit.EMPTY; + } + return new JSONObject(res).getString("access_token"); + } + + /** + * 通过凭证获得username + * + * @param code + * @param accessToken + * @return + */ + private String getUsername(String code, String accessToken) throws Exception { + Map userInfoParams = new HashMap<>(); + userInfoParams.put("access_token", accessToken); + userInfoParams.put("code", code); + String userRes = HttpKit.get(GET_USER_INFO, userInfoParams); + LogKit.info("dingtalksyn-GlobalRequestFilterBridge-getUsername-userRes:{}", userRes); + return new JSONObject(userRes).getString("userid"); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/user/DingTalkUserManager.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/user/DingTalkUserManager.java new file mode 100644 index 0000000..a894567 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/user/DingTalkUserManager.java @@ -0,0 +1,177 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkUserManager + * Author: Louis + * Date: 2021/4/21 16:18 + */ + package com.fr.plugin.xxxx.dingtalksyn.user; + + import com.dingtalk.api.response.OapiRoleListResponse; +import com.dingtalk.api.response.OapiV2DepartmentListsubResponse; +import com.dingtalk.api.response.OapiV2UserGetResponse; +import com.fanruan.api.decision.user.UserKit; +import com.fanruan.api.log.LogKit; +import com.fanruan.api.util.StringKit; +import com.fr.decision.authority.AuthorityContext; +import com.fr.decision.authority.base.constant.type.operation.ManualOperationType; +import com.fr.decision.authority.data.Department; +import com.fr.decision.webservice.bean.user.RoleBean; +import com.fr.decision.webservice.bean.user.UserBean; +import com.fr.decision.webservice.v10.user.CustomRoleService; +import com.fr.decision.webservice.v10.user.UserService; +import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; +import com.fr.plugin.xxxx.dingtalksyn.kit.CustomRoleServiceKit; +import com.fr.plugin.xxxx.dingtalksyn.kit.DepartmentServiceKit; +import com.fr.plugin.xxxx.dingtalksyn.kit.UserServiceKit; +import com.taobao.api.ApiException; + +import java.util.List; + +import static com.fr.plugin.xxxx.dingtalksyn.utils.DingAPI.*; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public final class DingTalkUserManager { + private DingSynConfig config; + + public DingTalkUserManager() { + this.config = DingSynConfig.getInstance(); + } + + private static class HOLDER { + private static final DingTalkUserManager INSTANCE = new DingTalkUserManager(); + } + public static DingTalkUserManager getInstance() { + return HOLDER.INSTANCE; + } + + /** + * 同步更新的字段包括:用户、邮箱、手机、部门、职位、角色。 + * 用户唯一字段用户名,更新时也是基于用户名。 + * + * @throws Exception + */ + public synchronized void synDingTalkUsers() throws Exception { + LogKit.info("dingtalksyn-DingTalkUserManager-synDingTalkUsers-start"); + // 同步用户角色 + List oapiRoleGroupList = getOapiRoleList(); + for (OapiRoleListResponse.OpenRoleGroup openRoleGroup : oapiRoleGroupList) { + List openRoleList = openRoleGroup.getRoles(); + for (OapiRoleListResponse.OpenRole openRole : openRoleList) { + roleSynOperation(openRoleGroup.getName(), openRole); + } + } + // 同步部门和用户信息 + departmentSynLoop(this.config.getRootDepId()); + LogKit.info("dingtalksyn-DingTalkUserManager-synDingTalkUsers-end"); + } + + /** + * 按部门遍历子部门并同步人员信息 + * + * @param deptId + * @throws Exception + */ + private void departmentSynLoop(long deptId) throws ApiException { + List departmentList = getDepartmentList(deptId); + if (departmentList == null || departmentList.isEmpty()) { + return; + } + // 同步部门信息 + for (OapiV2DepartmentListsubResponse.DeptBaseResponse oapiDepartment : departmentList) { + try { + departmentSynOperation(oapiDepartment); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + // 同步当前部门的用户信息 + List deptMemberList = getDeptMember(oapiDepartment.getDeptId()); + for (String userId : deptMemberList) { + try { + OapiV2UserGetResponse.UserGetResponse userGetResponse = getUserResponse(userId); + if (userGetResponse == null) { + continue; + } + userSynOperation(userGetResponse); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + } + // 操作子部门遍历 + departmentSynLoop(oapiDepartment.getDeptId()); + } + } + + /** + * 角色的新增更新操作 + * + * @param openRole + * @throws Exception + */ + private void roleSynOperation(String groupName, OapiRoleListResponse.OpenRole openRole) throws Exception { + if (openRole == null) { + return; + } + RoleBean roleBean = CustomRoleService.getInstance().getCustomRole(String.valueOf(openRole.getId())); + String roleName = StringKit.isBlank(groupName) ? openRole.getName() : groupName + "-" + openRole.getName(); + if (roleBean == null) { + roleBean = new RoleBean(roleName, String.valueOf(openRole.getId()), roleName, ManualOperationType.KEY.toInteger()); + CustomRoleServiceKit.getInstance().addCustomRole(UserServiceKit.getInstance().getAdminUserId(), roleBean); + } else if (!StringKit.equals(roleBean.getText(), roleName)) { + roleBean.setText(roleName); + roleBean.setDescription(roleName); + CustomRoleService.getInstance().editCustomRole(roleBean.getId(), roleBean); + } + } + + /** + * 部门组织的新增更新操作 + * + * @param oapiDepartment + * @throws Exception + */ + private void departmentSynOperation(OapiV2DepartmentListsubResponse.DeptBaseResponse oapiDepartment) throws Exception { + String departmentId = String.valueOf(oapiDepartment.getDeptId()); + String parentId = String.valueOf(oapiDepartment.getParentId()); + parentId = DepartmentServiceKit.getInstance().changeRootId(parentId); + String depName = oapiDepartment.getName(); + Department department = AuthorityContext.getInstance().getDepartmentController().getById(departmentId); + if (department == null) { + DepartmentServiceKit.getInstance().addDepartment(departmentId, parentId, depName); + } else { + DepartmentServiceKit.getInstance().editDepartment(department.getId(), depName, parentId); + } + } + + /** + * 用户新增更新操作 + * + * @param userGetResponse + * @throws Exception + */ + private void userSynOperation(OapiV2UserGetResponse.UserGetResponse userGetResponse) throws Exception { + UserBean userBean; + if (UserKit.existUsername(userGetResponse.getUserid())) { + userBean = UserServiceKit.getInstance().updateUserBean(userGetResponse); + if (userBean == null) { + return; + } + UserServiceKit.getInstance().editUser(userBean); + } else { + userBean = UserServiceKit.getInstance().createUserBean(userGetResponse); + try { + UserService.getInstance().addUser(userBean); + } catch (Exception e) { + LogKit.error("dingtalksyn-DingTalkUserManager-userSynOperation-Username:{}, RealName:{}, Mobile:{}, Email:{}", + userBean.getUsername(), userBean.getRealName(), userBean.getMobile(), userBean.getEmail()); + LogKit.error(e.getMessage(), e); + } + } + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingAPI.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingAPI.java new file mode 100644 index 0000000..850eda8 --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingAPI.java @@ -0,0 +1,150 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingAPI + * Author: Louis + * Date: 2021/5/13 16:16 + */ + package com.fr.plugin.xxxx.dingtalksyn.utils; + + import com.dingtalk.api.DefaultDingTalkClient; +import com.dingtalk.api.DingTalkClient; +import com.dingtalk.api.request.*; +import com.dingtalk.api.response.*; +import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; +import com.taobao.api.ApiException; + +import java.util.List; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingAPI { + public static final int TOKEN_EXPIRE_TIME = 3600000; + /** + * 获取企业内部应用的access_token + */ + public static final String GETTOKEN = "https://oapi.dingtalk.com/gettoken"; + /** + * 通过免登码获取用户信息 + */ + public static final String GET_USER_INFO = "https://oapi.dingtalk.com/user/getuserinfo"; + public static final String USER_GET = "https://oapi.dingtalk.com/topapi/v2/user/get"; + public static final String DEPARTMENT_LIST = "https://oapi.dingtalk.com/topapi/v2/department/listsub"; + public static final String GET_DEPT_MEMBER = "https://oapi.dingtalk.com/topapi/user/listid"; + public static final String GET_DEPT = "https://oapi.dingtalk.com/topapi/v2/department/get"; + public static final String ROLE_LIST = "https://oapi.dingtalk.com/topapi/role/list"; + public static final String GETROLE = "https://oapi.dingtalk.com/topapi/role/getrole"; + + /** + * 根据deptId获取用户详情 + * + * @param deptId + * @return + * @throws ApiException + */ + public static OapiV2DepartmentGetResponse.DeptGetResponse getDeptResponse(long deptId) throws ApiException { + DingTalkClient client = new DefaultDingTalkClient(GET_DEPT); + OapiV2DepartmentGetRequest req = new OapiV2DepartmentGetRequest(); + req.setDeptId(deptId); + req.setLanguage("zh_CN"); + OapiV2DepartmentGetResponse rsp = client.execute(req, DingTokenUtils.getAccessToken()); + return rsp.getResult(); + } + + /** + * 获取部门用户userid列表 + * + * @param deptId + * @return + * @throws ApiException + */ + public static List getDeptMember(long deptId) throws ApiException { + DingTalkClient client = new DefaultDingTalkClient(GET_DEPT_MEMBER); + OapiUserListidRequest req = new OapiUserListidRequest(); + req.setDeptId(deptId); + OapiUserListidResponse rsp = client.execute(req, DingTokenUtils.getAccessToken()); + return rsp.getResult().getUseridList(); + } + + /** + * 获取部门列表 + * + * @return + * @throws ApiException + */ + public static List getDepartmentList(long deptId) throws ApiException { + DingTalkClient client = new DefaultDingTalkClient(DEPARTMENT_LIST); + OapiV2DepartmentListsubRequest req = new OapiV2DepartmentListsubRequest(); + req.setDeptId(deptId); + req.setLanguage("zh_CN"); + OapiV2DepartmentListsubResponse rsp = client.execute(req, DingTokenUtils.getAccessToken()); + return rsp.getResult(); + } + + /** + * 根据roleId获取角色详情 + * + * @param roleId + * @return + * @throws ApiException + */ + public static OapiRoleGetroleResponse.OpenRole getRoleResponse(long roleId) throws ApiException { + DingTalkClient client = new DefaultDingTalkClient(GETROLE); + OapiRoleGetroleRequest req = new OapiRoleGetroleRequest(); + req.setRoleId(roleId); + OapiRoleGetroleResponse rsp = client.execute(req, DingTokenUtils.getAccessToken()); + return rsp.getRole(); + } + + /** + * 获取角色列表 + * + * @return + * @throws ApiException + */ + public static List getOapiRoleList() throws ApiException { + DingTalkClient client = new DefaultDingTalkClient(ROLE_LIST); + OapiRoleListRequest req = new OapiRoleListRequest(); + req.setSize(200L); + req.setOffset(0L); + OapiRoleListResponse rsp = client.execute(req, DingTokenUtils.getAccessToken()); + return rsp.getResult().getList(); + } + + /** + * 根据userid获取用户详情 + * + * @param userId + * @return + * @throws ApiException + */ + public static OapiV2UserGetResponse.UserGetResponse getUserResponse(String userId) throws ApiException { + DingTalkClient client = new DefaultDingTalkClient(USER_GET); + OapiV2UserGetRequest req = new OapiV2UserGetRequest(); + req.setUserid(userId); + req.setLanguage("zh_CN"); + OapiV2UserGetResponse rsp = client.execute(req, DingTokenUtils.getAccessToken()); + return rsp.getResult(); + } + + /** + * 获取企业内部应用的access_token + * + * @return + * @throws ApiException + */ + public static String getAccessToken() throws ApiException { + DingTalkClient client = new DefaultDingTalkClient(GETTOKEN); + OapiGettokenRequest request = new OapiGettokenRequest(); + request.setAppkey(DingSynConfig.getInstance().getAppKey()); + request.setAppsecret(DingSynConfig.getInstance().getAppSecret()); + request.setHttpMethod("GET"); + OapiGettokenResponse response = client.execute(request); + return response.getAccessToken(); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTalkAuthorityUtils.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTalkAuthorityUtils.java new file mode 100644 index 0000000..b6e71fb --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTalkAuthorityUtils.java @@ -0,0 +1,40 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkAuthorityUtils + * Author: Louis + * Date: 2021/6/24 22:23 + */ + package com.fr.plugin.xxxx.dingtalksyn.utils; + + import com.fanruan.api.log.LogKit; + import com.fr.decision.authority.base.constant.type.authority.ViewAuthorityType; + import com.fr.decision.config.FSConfig; + import com.fr.decision.webservice.utils.ControllerFactory; + import com.fr.decision.webservice.v10.user.UserService; + import com.fr.license.function.VT4FR; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkAuthorityUtils { + public DingTalkAuthorityUtils() { + } + + public static boolean hasModulePrivilege(String userId, String entityId) throws Exception { + try { + if (UserService.getInstance().isAdmin(userId)) { + return true; + } else { + return VT4FR.MultiPrivilege.isSupport() && FSConfig.getInstance().getAuthorizeAttr().isGradeAuthority() && ControllerFactory.getInstance().getEntryController(userId).doesUserHasEntityAuth(userId, entityId, ViewAuthorityType.TYPE); + } + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + throw e; + } + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTalkLogUtil.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTalkLogUtil.java new file mode 100644 index 0000000..33d0b7d --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTalkLogUtil.java @@ -0,0 +1,66 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTalkLogUtil + * Author: Louis + * Date: 2021/6/24 22:29 + */ + package com.fr.plugin.xxxx.dingtalksyn.utils; + + import com.fanruan.api.log.LogKit; + import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; + import com.fr.plugin.xxxx.dingtalksyn.config.DingTalkMemberManagementConfig; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTalkLogUtil { + public DingTalkLogUtil() { + } + + public static String getMatchWay() { + DingTalkMemberManagementConfig var0 = DingSynConfig.getInstance().getMemberManagementConfig(); + switch (var0.getMatchingFSWay()) { + case 0: + return "工号匹配"; + case 1: + return "手机号匹配"; + case 2: + return "手动匹配"; + case 3: + return "数据集匹配"; + default: + return ""; + } + } + + public static String transformMessageType(int msgType) { + switch (msgType) { + case 0: + default: + return "未知消息类型"; + case 1: + return "链接消息"; + case 2: + return "图文消息"; + case 3: + return "文件消息"; + } + } + + public static void warn(String msg, int errorCode) { + LogKit.warn(msg + ",错误码为:" + errorCode + ",更多信息请参考" + "https://help.fanruan.com/finereport/doc-view-4051.html"); + } + + public static void error(String msg, int errorCode) { + error(msg, (Exception) null, errorCode); + } + + public static void error(String msg, Exception e, int errorCode) { + LogKit.error(msg + ",错误码为:" + errorCode + ",更多信息请参考" + "https://help.fanruan.com/finereport/doc-view-4051.html", e); + } + } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTokenUtils.java b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTokenUtils.java new file mode 100644 index 0000000..dbf021e --- /dev/null +++ b/src/main/java/com/fr/plugin/xxxx/dingtalksyn/utils/DingTokenUtils.java @@ -0,0 +1,67 @@ + /* + * Copyright (C), 2018-2021 + * Project: starter + * FileName: DingTokenUtils + * Author: Louis + * Date: 2021/5/14 14:23 + */ + package com.fr.plugin.xxxx.dingtalksyn.utils; + + import com.fanruan.api.log.LogKit; + import com.fanruan.api.util.StringKit; + import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig; + import com.fr.store.StateHubManager; + import com.fr.store.StateHubService; + + import static com.fr.plugin.xxxx.dingtalksyn.utils.DingAPI.TOKEN_EXPIRE_TIME; + + /** + *
+ * + * + * @author fr.open + * @since 1.0.0 + */ + public class DingTokenUtils { + + public static final String DINGTALKSYN_ACCESS_TOKEN = "dingtalksyn_access_token"; + public static final String DINGTALKSYN_SUITE_TICKET = "dingtalksyn_suite_ticket"; + + private static final StateHubService tokenService = StateHubManager.applyForService(DINGTALKSYN_ACCESS_TOKEN); + private static final StateHubService ticketService = StateHubManager.applyForService(DINGTALKSYN_SUITE_TICKET); + + public DingTokenUtils() { + } + + /** + * 缓存钉钉端AccessToken + * + * @return + */ + public static String getAccessToken() { + String appKey = DingSynConfig.getInstance().getAppKey(); + try { + if (StringKit.isBlank(tokenService.get(appKey))) { + tokenService.put(appKey, DingAPI.getAccessToken(), TOKEN_EXPIRE_TIME); + } + return tokenService.get(appKey); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + return StringKit.EMPTY; + } + } + + /** + * 缓存钉钉端SuiteTicket + * + * @return + */ + public static void setSuiteTicket(String suiteTicket) { + String appKey = DingSynConfig.getInstance().getAppKey(); + try { + ticketService.put(appKey, suiteTicket, TOKEN_EXPIRE_TIME); + } catch (Exception e) { + LogKit.error(e.getMessage(), e); + } + } + } \ No newline at end of file diff --git a/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/locale/lang.properties b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/locale/lang.properties new file mode 100644 index 0000000..91c8296 --- /dev/null +++ b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/locale/lang.properties @@ -0,0 +1,188 @@ +Plugin-dingtalksyn=DingTalk syn Plugin +Plugin-dingtalksyn_Group=DingTalk syn Plugin +Plugin-dingtalksyn_Config_CronCondition=Cron Condition +Plugin-dingtalksyn_Config_CronCondition_Description=Cron Condition +Plugin-dingtalksyn_Config_appKey=APPKEY +Plugin-dingtalksyn_Config_appKey_Description=APPKEY +Plugin-dingtalksyn_Config_appSecret=appSecret +Plugin-dingtalksyn_Config_appSecret_Description=appSecret +Plugin-dingtalksyn_Config_corpId=Corp Id +Plugin-dingtalksyn_Config_corpId_Description=Corp Id +Plugin-dingtalksyn_Config_rootDepId=Root Department ID +Plugin-dingtalksyn_Config_rootDepId_Description=Root Department ID +Plugin-dingtalksyn_Config_Token=Token +Plugin-dingtalksyn_Config_Token_Description=Token +Plugin-dingtalksyn_Config_AesKey=AesKey +Plugin-dingtalksyn_Config_AesKey_Description=AesKey +Plugin-dingtalksyn_Config_SsoEnable=Sso Enable +Plugin-dingtalksyn_Config_SsoEnable_Description=Sso Enable +Plugin-dingtalksyn_Error_500=error +Plugin-dingtalksyn_Error_501=DingTalkSyn Plugin License Expired! +## \u524D\u7AEFjs +Plugin-dingtalksyn_DingTalk_Manager=DingTalk Sync + +Dec-Module-DingTalkSyn_Manager=Dec-Module-DingTalkSyn_Manager +Dec-DingTalkSyn_Basic=Dec-DingTalkSyn_Basic +Dec-DingTalkSyn_Recive_Data_URL=Dec-DingTalkSyn_Recive_Data_URL +Dec-DingTalkSyn_Corp_ID=Dec-DingTalkSyn_Corp_ID +Dec-DingTalkSyn_Secret=Dec-DingTalkSyn_Secret +Dec-DingTalkSyn_Member_Management=Dec-DingTalkSyn_Member_Management +Dec-DingTalkSyn_User-Same-With-FS=Dec-DingTalkSyn_User-Same-With-FS +Dec-DingTalkSyn_Mobile-Same-With-FS=Dec-DingTalkSyn_Mobile-Same-With-FS +Dec-DingTalkSyn_Manual-Matching-FS=Dec-DingTalkSyn_Manual-Matching-FS +Dec-DingTalkSyn_Custom-Matching-FS=Dec-DingTalkSyn_Custom-Matching-FS +Dec-DingTalkSyn_UserID=Dec-DingTalkSyn_UserID +Dec-DingTalkSyn_DecUserName=Dec-DingTalkSyn_DecUserName +Dec-DingTalkSyn_Name=Dec-DingTalkSyn_Name +Dec-DingTalkSyn_Department=Dec-DingTalkSyn_Department +Dec-DingTalkSyn_User_Job_Name=Dec-DingTalkSyn_User_Job_Name +Dec-Schedule-Notification_DingTalkSyn=Dec-Schedule-Notification_DingTalkSyn +Dec-Schedule-Notification_DingTalkSyn_CorpID=Dec-Schedule-Notification_DingTalkSyn_CorpID +Dec-Schedule-Notification_DingTalkSyn_Users=Dec-Schedule-Notification_DingTalkSyn_Users +Dec-Schedule-Notification_DingTalkSyn_DepID=Dec-Schedule-Notification_DingTalkSyn_DepID +Dec-Schedule-Notification_DingTalkSyn_Content=Dec-Schedule-Notification_DingTalkSyn_Content +Dec-Schedule-Notification_DingTalkSyn_WithLink=Dec-Schedule-Notification_DingTalkSyn_WithLink +Dec-Schedule_Mobile-Push-DingTalkSynId-Not-Null=Dec-Schedule_Mobile-Push-DingTalkSynId-Not-Null +Dec-DingTalkSyn_UrlHint=Dec-DingTalkSyn_UrlHint +Dec-DingTalkSyn_Token_Path=Dec-DingTalkSyn_Token_Path +Dec-DingTalkSyn_Refresh_User=Dec-DingTalkSyn_Refresh_User +Dec-DingTalkSyn_Mobile=Dec-DingTalkSyn_Mobile +Dec-DingTalkSyn_Matching_Way=Dec-DingTalkSyn_Matching_Way +Dec-DingTalkSyn_Hint=Dec-DingTalkSyn_Hint +Dec-DingTalkSyn_Loading=Dec-DingTalkSyn_Loading +Dec-DingTalkSyn_Mobile_Not_Supported=Dec-DingTalkSyn_Mobile_Not_Supported +Dec-DingTalkSyn_Mobile-Push-DingTalkSyn-Terminal=DingTalkSyn +Dec-DingTalkSyn_Addressee_Chat_Group=Dec-DingTalkSyn_Addressee_Chat_Group +Dec-DingTalkSyn_Addressee_Chat_Group_Disable_Tip=Dec-DingTalkSyn_Addressee_Chat_Group_Disable_Tip +Dec-DingTalkSyn_Mobile-Push-DingTalkSyn-AgentId=AgentID +Dec-DingTalkSyn_Expired_Error=Dec-DingTalkSyn_Expired_Error +Dec-DingTalkSyn_Expired_Solution=Dec-DingTalkSyn_Expired_Solution +Dec-DingTalkSyn_Agent-Management=Dec-DingTalkSyn_Agent-Management +Dec-DingTalkSyn_Member-Management=Dec-DingTalkSyn_Member-Management +Dec-DingTalkSyn_Agent-Config=Dec-DingTalkSyn_Agent-Config +Dec-DingTalkSyn_Agent-Name=Dec-DingTalkSyn_Agent-Name +Dec-DingTalkSyn_Agent-Id=Dec-DingTalkSyn_Agent-Id +Dec-DingTalkSyn_Organizational-Structure=Dec-DingTalkSyn_Organizational-Structure +Dec-DingTalkSyn_Tag=Dec-DingTalkSyn_Tag +Dec-DingTalkSyn_Server=Dec-DingTalkSyn_Server +Dec-DingTalkSyn_Save=Dec-DingTalkSyn_Save +Dec-DingTalkSyn_Start_With_Http=Dec-DingTalkSyn_Start_With_Http +Dec-DingTalkSyn_Server_Url=Dec-DingTalkSyn_Server_Url +Dec-DingTalkSyn_Server_Tip=Dec-DingTalkSyn_Server_Tip +Dec-DingTalkSyn_Enterprise-DingDing=Dec-DingTalkSyn_Enterprise-DingDing +Dec-DingTalkSyn_New-Agent=Dec-DingTalkSyn_New-Agent +Dec-DingTalkSyn_Non-Adapted-Agent=Dec-DingTalkSyn_Non-Adapted-Agent +Dec-DingTalkSyn_Modify-Agent=Dec-DingTalkSyn_Modify-Agent +Dec-DingTalkSyn_DeleteAgent-Confirm-Popup=Dec-DingTalkSyn_DeleteAgent-Confirm-Popup +Dec-DingTalkSyn_Confirm=Dec-DingTalkSyn_Confirm +Dec-DingTalkSyn_Cancel=Dec-DingTalkSyn_Cancel +Dec-DingTalkSyn_Save-Agent-Fail=Dec-DingTalkSyn_Save-Agent-Fail +Dec-DingTalkSyn_Unknown-Agent=Dec-DingTalkSyn_Unknown-Agent +Dec-DingTalkSyn_Agent-Name-Exist=Dec-DingTalkSyn_Agent-Name-Exist +Dec-DingTalkSyn_Match-Way=Dec-DingTalkSyn_Match-Way +Dec-DingTalkSyn_Match-Setting=Dec-DingTalkSyn_Match-Setting +Dec-DingTalkSyn_DataSet=Dec-DingTalkSyn_DataSet +Dec-DingTalkSyn_Address-Book=Dec-DingTalkSyn_Address-Book +Dec-DingTalkSyn_Member-Update=Dec-DingTalkSyn_Member-Update +Dec-DingTalkSyn_Set-Update=Dec-DingTalkSyn_Set-Update +Dec-DingTalkSyn_Not-Null=Dec-DingTalkSyn_Not-Null +Dec-DingTalkSyn_Start-Update=Dec-DingTalkSyn_Start-Update +Dec-DingTalkSyn_Per=Dec-DingTalkSyn_Per +Dec-DingTalkSyn_Day=Dec-DingTalkSyn_Day +Dec-DingTalkSyn_Week=Dec-DingTalkSyn_Week +Dec-DingTalkSyn_Monday=Dec-DingTalkSyn_Monday +Dec-DingTalkSyn_Tuesday=Dec-DingTalkSyn_Tuesday +Dec-DingTalkSyn_Wednesday=Dec-DingTalkSyn_Wednesday +Dec-DingTalkSyn_Thursday=Dec-DingTalkSyn_Thursday +Dec-DingTalkSyn_Friday=Dec-DingTalkSyn_Friday +Dec-DingTalkSyn_Saturday=Dec-DingTalkSyn_Saturday +Dec-DingTalkSyn_Sunday=Dec-DingTalkSyn_Sunday +Dec-DingTalkSyn_Hour=Dec-DingTalkSyn_Hour +Dec-DingTalkSyn_Minute=Dec-DingTalkSyn_Minute +Dec-DingTalkSyn_Update-Once=Dec-DingTalkSyn_Update-Once +Dec-DingTalkSyn_Illegal=Dec-DingTalkSyn_Illegal +Dec-DingTalkSyn_Proxy=Dec-DingTalkSyn_Proxy +Dec-DingTalkSyn_Proxy_Address=Dec-DingTalkSyn_Proxy_Address +Dec-DingTalkSyn_Proxy_Address_Tip=Dec-DingTalkSyn_Proxy_Address_Tip +Dec-DingTalkSyn_Test-Proxy-Address=Dec-DingTalkSyn_Test-Proxy-Address +Dec-DingTalkSyn_Start-With-Http=Dec-DingTalkSyn_Start-With-Http +Dec-DingTalkSyn_Test-Connection=Dec-DingTalkSyn_Test-Connection +Dec-DingTalkSyn_Connection-Success=Dec-DingTalkSyn_Connection-Success +Dec-DingTalkSyn_Connection-Fail=Dec-DingTalkSyn_Connection-Fail +Dec-DingTalkSyn_Unknown-Agent-Id=Dec-DingTalkSyn_Unknown-Agent-Id +Dec-DingTalkSyn_Delete-Agent-Fail=Dec-DingTalkSyn_Delete-Agent-Fail +Dec-DingTalkSyn_Agent-Id-Exist=Dec-DingTalkSyn_Agent-Id-Exist +Dec-DingTalkSyn_Save-ReportServer-Url-Fail=Dec-DingTalkSyn_Save-ReportServer-Url-Fail +Dec-DingTalkSyn_Save-Timing-Task-Fail=Dec-DingTalkSyn_Save-Timing-Task-Fail +Dec-DingTalkSyn_Error-AppKey-And-AppSecret=Dec-DingTalkSyn_Error-AppKey-And-AppSecret +Dec-DingTalkSyn_Error-AppKey-And-AgentId=Dec-DingTalkSyn_Error-AppKey-And-AgentId +Dec-DingTalkSyn_Duplicate-Agent-Name=Dec-DingTalkSyn_Duplicate-Agent-Name +Dec-DingTalkSyn_Save-Match-Method-Fail=Dec-DingTalkSyn_Save-Match-Method-Fail +Dec-DingTalkSyn_Duplicate-Agent-Id=Dec-DingTalkSyn_Duplicate-Agent-Id +Dec-DingTalkSyn_Save-Proxy-Server-Fail=Dec-DingTalkSyn_Save-Proxy-Server-Fail +Dec-DingTalkSyn_Connect-Proxy-Server-Fail=Dec-DingTalkSyn_Connect-Proxy-Server-Fail +Dec-DingTalkSyn_NetWork-Anomaly=Dec-DingTalkSyn_NetWork-Anomaly +Dec-DingTalkSyn_Create-DingTalkSyn-Url=Dec-DingTalkSyn_Create-DingTalkSyn-Url +Dec-DingTalkSyn_Platform-Page=Dec-DingTalkSyn_Platform_Page +Dec-DingTalkSyn_Platform-Report=Dec-DingTalkSyn_Platform-Report +Dec-DingTalkSyn_Platform=Dec-DingTalkSyn_Platform +Dec-DingTalkSyn_Parameter_Setting=Dec-DingTalkSyn_Parameter_Setting +Dec-DingTalkSyn_Create-Url=Dec-DingTalkSyn_Create-Url +Dec-DingTalkSyn_DingTalkSyn_Url=Dec-DingTalkSyn_DingTalkSyn_Url +Dec-DingTalkSyn_Copy-Url=Dec-DingTalkSyn_Copy-Url +Dec-DingTalkSyn_Copy-Success=Dec-DingTalkSyn_Copy-Success +Dec-DingTalkSyn_Input-Hint=Dec-DingTalkSyn_Input-Hint +Dec-DingTalkSyn_Save-User-Relation-Fail=Dec-DingTalkSyn_Save-User-Relation-Fail +BI-Basic_Search=BI-Basic_Search +Dec-DingTalkSyn_Match-Way-Not-Null=Dec-DingTalkSyn_Match-Way-Not-Null +Dec-DingTalkSyn_Not-Select=Dec-DingTalkSyn_Not-Select +Dec-DingTalkSyn_Tip-Get-ReportServer-Url-Fail=Dec-DingTalkSyn_Tip-Get-ReportServer-Url-Fail +Dec-DingTalkSyn_Create-Agent-Tip=Dec-DingTalkSyn_Create-Agent-Tip +Dec-DingTalkSyn_IP-Config-Not-Available=Dec-DingTalkSyn_IP-Config-Not-Available +Dec-DingTalkSyn_NetWork-Invalid=Dec-DingTalkSyn_NetWork-Invalid +Dec-DingTalkSyn_Not_Trusted_Domain_Error=Dec-DingTalkSyn_Not_Trusted_Domain_Error +Dec-DingTalkSyn_Not_Trusted_Domain_Exception=Dec-DingTalkSyn_Not_Trusted_Domain_Exception +Dec-DingTalkSyn_Debugger-Set-Level=Dec-DingTalkSyn_Debugger-Set-Level +Dec-DingTalkSyn_Debugger-Level=Dec-DingTalkSyn_Debugger-Level +Dec-DingTalkSyn_Debugger-Parameter-List=Dec-DingTalkSyn_Debugger-Parameter-List +Dec-DingTalkSyn_Debugger-Content=Dec-DingTalkSyn_Debugger-Content +Dec-DingTalkSyn_Debugger-Type-Get-Access-Token=Dec-DingTalkSyn_Debugger-Type-Get-Access-Token +Dec-DingTalkSyn_Debugger-Type-Check-Ip=Dec-DingTalkSyn_Debugger-Type-Check-Ip +Dec-DingTalkSyn_Debugger-Start-Check=Dec-DingTalkSyn_Debugger-Start-Check +Dec-DingTalkSyn_Debugger-Show-Result=Dec-DingTalkSyn_Debugger-Show-Result +Dec-DingTalkSyn_Debugger-Type-Check-Request-Time=Dec-DingTalkSyn_Debugger-Type-Check-Request-Time +Dec-DingTalkSyn_Debugger-Type-Check-Request-Time-Result=Dec-DingTalkSyn_Debugger-Type-Check-Request-Time-Result +Dec-DingTalkSyn_Debugger-Tip-Curl-Invalid=Dec-DingTalkSyn_Debugger-Tip-Curl-Invalid +Dec-DingTalkSyn_Debugger-DownLoad_Log=Dec-DingTalkSyn_Debugger-DownLoad_Log +Dec-DingTalkSyn_Click-To-Download=Dec-DingTalkSyn_Click-To-Download +Dec-DingTalkSyn_Download-Fail=Dec-DingTalkSyn_Download-Fail +Dec-DingTalkSyn_Not_Null=Dec-DingTalkSyn_Not_Null +Dec-DingTalkSyn_ErrorDetail=Dec-DingTalkSyn_ErrorDetail +Dec-DingTalkSyn_Debugger-Check-Ip-Result=Dec-DingTalkSyn_Debugger-Check-Ip-Result +Dec-DingTalkSyn_Debugger-Get-Token=Dec-DingTalkSyn_Debugger-Get-Token +Dec-DingTalkSyn_Agent_Deleted_Tip=Dec-DingTalkSyn_Agent_Deleted_Tip +Dec-DingTalkSyn_Parse_Parameters=Dec-DingTalkSyn_Parse_Parameters +Dec-DingTalkSyn_Parse_Parameters_Tip=Dec-DingTalkSyn_Parse_Parameters_Tip +Dec-DingTalkSyn_Enterprise_Agent=Dec-DingTalkSyn_Enterprise_Agent +Dec-DingTalkSyn_Chatgroup_Name=Dec-DingTalkSyn_Chatgroup_Name +Dec-DingTalkSyn_Chat_Group=Dec-DingTalkSyn_Chat_Group +Dec-DingTalkSyn_New_Chat_Group=Dec-DingTalkSyn_New_Chat_Group +Dec-DingTalkSyn_Delete_ChatGroup_Confirm=Dec-DingTalkSyn_Delete_ChatGroup_Confirm +Dec-DingTalkSyn_Chat_Group_Member_Tip=Dec-DingTalkSyn_Chat_Group_Member_Tip +Dec-DingTalkSyn_Chat_Group_Leader=Dec-DingTalkSyn_Chat_Group_Leader +Dec-DingTalkSyn_Chat_Group_Member=Dec-DingTalkSyn_Chat_Group_Member +Dec-DingTalkSyn_New_Chat_Group_Tip1=Dec-DingTalkSyn_New_Chat_Group_Tip1 +Dec-DingTalkSyn_New_Chat_Group_Tip2=Dec-DingTalkSyn_New_Chat_Group_Tip2 +Dec-DingTalkSyn_New_Chat_Group_Message=Dec-DingTalkSyn_New_Chat_Group_Message +Dec-DingTalkSyn_Common_Error_Tip=Dec-DingTalkSyn_Common_Error_Tip +Dec-DingTalkSyn_Chat_Group_Name_Length_Tip=Dec-DingTalkSyn_Chat_Group_Name_Length_Tip +Dec-DingTalkSyn_Create-Chat-Group-Fail=Dec-DingTalkSyn_Create-Chat-Group-Fail +Dec-DingTalkSyn_Output_User_Empty=Dec-DingTalkSyn_Output_User_Empty +Dec-DingTalkSyn_Message_Agent=Dec-DingTalkSyn_Message_Agent +Dec-DingTalkSyn_Message_Group=Dec-DingTalkSyn_Message_Group +Dec-DingTalkSyn_DingTalkSyn=Dec-DingTalkSyn_DingTalkSyn +Dec-DingTalkSyn_Output_User_Fail_Partly_Header=Dec-DingTalkSyn_Output_User_Fail_Partly_Header +Dec-DingTalkSyn_Output_User_Fail_Partly_Tip=Dec-DingTalkSyn_Output_User_Fail_Partly_Tip +Dec-DingTalkSyn_Output_Group_Fail_Partly_Header=Dec-DingTalkSyn_Output_Group_Fail_Partly_Header +Dec-DingTalkSyn_Output_Group_Fail_Partly_Tip=Dec-DingTalkSyn_Output_Group_Fail_Partly_Tip +Dec-DingTalkSyn_User_Match_Dec_User_Fail=Dec-DingTalkSyn_User_Match_Dec_User_Fail \ No newline at end of file diff --git a/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/locale/lang_zh_CN.properties b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/locale/lang_zh_CN.properties new file mode 100644 index 0000000..6e991ee --- /dev/null +++ b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/locale/lang_zh_CN.properties @@ -0,0 +1,188 @@ +Plugin-dingtalksyn=\u9489\u9489\u6570\u636E\u540C\u6B65\u63D2\u4EF6 +Plugin-dingtalksyn_Group=\u9489\u9489\u6570\u636E\u540C\u6B65\u63D2\u4EF6 +Plugin-dingtalksyn_Config_CronCondition=Cron\u8868\u8FBE\u5F0F +Plugin-dingtalksyn_Config_CronCondition_Description=Cron\u8868\u8FBE\u5F0F +Plugin-dingtalksyn_Config_appKey=\u5E94\u7528\u7CFB\u7EDF\u7684APPKEY +Plugin-dingtalksyn_Config_appKey_Description=\u5E94\u7528\u7CFB\u7EDF\u7684APPKEY +Plugin-dingtalksyn_Config_appSecret=\u5E94\u7528\u7CFB\u7EDF\u7684appSecret +Plugin-dingtalksyn_Config_appSecret_Description=\u5E94\u7528\u7CFB\u7EDF\u7684appSecret +Plugin-dingtalksyn_Config_corpId=Corp Id +Plugin-dingtalksyn_Config_corpId_Description=Corp Id +Plugin-dingtalksyn_Config_rootDepId=\u6839\u90E8\u95E8ID +Plugin-dingtalksyn_Config_rootDepId_Description=\u6839\u90E8\u95E8ID +Plugin-dingtalksyn_Config_Token=\u7B7E\u540DToken +Plugin-dingtalksyn_Config_Token_Description=\u7B7E\u540DToken +Plugin-dingtalksyn_Config_AesKey=\u52A0\u5BC6aes_key +Plugin-dingtalksyn_Config_AesKey_Description=\u52A0\u5BC6aes_key +Plugin-dingtalksyn_Config_SsoEnable=\u5355\u70B9\u529F\u80FD\u5F00\u5173 +Plugin-dingtalksyn_Config_SsoEnable_Description=\u5355\u70B9\u529F\u80FD\u5F00\u5173 +Plugin-dingtalksyn_Error_500=error +Plugin-dingtalksyn_Error_501=DingTalkSyn\u63D2\u4EF6\u8BB8\u53EF\u5931\u6548! +## \u524D\u7AEFjs +Plugin-dingtalksyn_DingTalk_Manager=\u9489\u9489\u540C\u6B65 + +Dec-Module-DingTalkSyn_Manager=\u9489\u9489\u7BA1\u7406 +Dec-DingTalkSyn_Basic=\u57FA\u672C\u4FE1\u606F +Dec-Schedule-Notification_DingTalkSyn=\u63A8\u9001\u9489\u9489\u6D88\u606F +Dec-Schedule-Notification_DingTalkSyn_CorpID=\u5E94\u7528AgentID\uFF1A +Dec-Schedule-Notification_DingTalkSyn_Users=\u9489\u9489\u7528\u6237\uFF1A +Dec-Schedule-Notification_DingTalkSyn_DepID=\u90E8\u95E8ID\uFF1A +Dec-Schedule-Notification_DingTalkSyn_Content=\u6D88\u606F\u5185\u5BB9\uFF1A +Dec-Schedule-Notification_DingTalkSyn_WithLink=\u5B9A\u65F6\u7ED3\u679C\u8BBF\u95EE\u94FE\u63A5 +Dec-Schedule_Mobile-Push-DingTalkSynId-Not-Null=\u8BF7\u8BBE\u7F6E\u63A8\u9001\u7684\u9489\u9489\u5E94\u7528 +Dec-DingTalkSyn_Recive_Data_URL=\u63A5\u6536\u6570\u636EURL +Dec-DingTalkSyn_Corp_ID=\u9489\u9489\u4F01\u4E1A\u53F7ID +Dec-DingTalkSyn_Secret=\u7BA1\u7406\u7EC4\u51ED\u8BC1\u5BC6\u94A5 +Dec-DingTalkSyn_Member_Management=\u9489\u9489\u6210\u5458\u7BA1\u7406 +Dec-DingTalkSyn_User-Same-With-FS=\u9489\u9489\u5DE5\u53F7\u5339\u914D +Dec-DingTalkSyn_Mobile-Same-With-FS=\u624B\u673A\u53F7\u5339\u914D +Dec-DingTalkSyn_Manual-Matching-FS=\u624B\u52A8\u5339\u914D +Dec-DingTalkSyn_Custom-Matching-FS=\u81EA\u5B9A\u4E49\u5339\u914D +Dec-DingTalkSyn_UserID=\u9489\u9489\u6210\u5458ID +Dec-DingTalkSyn_DecUserName=\u7528\u6237\u540D +Dec-DingTalkSyn_Name=\u59D3\u540D +Dec-DingTalkSyn_Department=\u9489\u9489\u90E8\u95E8 +Dec-DingTalkSyn_UrlHint=\u670D\u52A1\u5668\u4FDD\u5B58\u7684Url\uFF1A +Dec-DingTalkSyn_User_Job_Name=\u9489\u9489\u5DE5\u53F7 +Dec-DingTalkSyn_Token_Path=\u8BBE\u7F6EToken\u83B7\u53D6\u8DEF\u5F84 +Dec-DingTalkSyn_Refresh_User=\u66F4\u65B0\u901A\u8BAF\u5F55 +Dec-DingTalkSyn_Mobile=\u9489\u9489\u6210\u5458\u624B\u673A\u53F7 +Dec-DingTalkSyn_Matching_Way=\u7528\u6237\u5339\u914D\u65B9\u5F0F +Dec-DingTalkSyn_Hint=\u63D0\u793A +Dec-DingTalkSyn_Loading=\u6B63\u5728\u52A0\u8F7D\u7528\u6237... +Dec-DingTalkSyn_Mobile_Not_Supported=\u5F53\u524DHTML5\u62A5\u8868\u4E0D\u652F\u6301\u6839\u636E\u624B\u673A\u53F7\u5339\u914D\uFF0C\u8BF7\u5347\u7EA7HTML5\u63D2\u4EF6 +Dec-DingTalkSyn_Mobile-Push-DingTalkSyn-Terminal=\u9489\u9489\u901A\u77E5 +Dec-DingTalkSyn_Addressee_Chat_Group=\u9489\u9489\u7FA4 +Dec-DingTalkSyn_Addressee_Chat_Group_Disable_Tip=\u5982\u679C\u6839\u636E\u9ED8\u8BA4\u7528\u6237\u7EC4\u5185\u7684\u7528\u6237\u5355\u72EC\u751F\u6210\u7ED3\u679C\uFF0C\u5219\u65E0\u6CD5\u901A\u77E5\u5230\u9489\u9489\u7FA4 +Dec-DingTalkSyn_Mobile-Push-DingTalkSyn-AgentId=\u5E94\u7528ID +Dec-DingTalkSyn_Expired_Error=\u9519\u8BEF\u4EE3\u7801:11100016 \u60A8\u4F7F\u7528\u4E86\u672A\u6CE8\u518C\u7684\u529F\u80FD\u2014\u2014\u9489\u9489\u96C6\u6210 +Dec-DingTalkSyn_Expired_Solution=\u9489\u9489\u529F\u80FD\u672A\u6CE8\u518C\uFF0C\u5982\u9700\u4F7F\u7528\u8BF7\u8054\u7CFB\u9500\u552E +Dec-DingTalkSyn_Agent-Management=\u5E94\u7528\u7BA1\u7406 +Dec-DingTalkSyn_Member-Management=\u6210\u5458\u7BA1\u7406 +Dec-DingTalkSyn_Agent-Config=\u5E94\u7528\u5FEB\u6377\u914D\u7F6E +Dec-DingTalkSyn_Agent-Name=\u9489\u9489\u5E94\u7528\u540D\u79F0 +Dec-DingTalkSyn_Agent-Id=\u9489\u9489\u5E94\u7528ID +Dec-DingTalkSyn_Organizational-Structure=\u7EC4\u7EC7\u67B6\u6784 +Dec-DingTalkSyn_Tag=\u6807\u7B7E +Dec-DingTalkSyn_Server=\u670D\u52A1\u5668 +Dec-DingTalkSyn_Save=\u4FDD\u5B58 +Dec-DingTalkSyn_Start_With_Http=\u670D\u52A1\u5668\u5730\u5740\u5FC5\u987B\u4EE5http\u6216https\u5F00\u5934 +Dec-DingTalkSyn_Server_Url=\u670D\u52A1\u5668\u5730\u5740 +Dec-DingTalkSyn_Server_Tip=1\u3001\u8BE5\u5730\u5740\u5C06\u7528\u4E8E\u5FEB\u6377\u914D\u7F6E\u4E2D\u751F\u6210\u5E73\u53F0\u5355\u70B9\u94FE\u63A5\u3001\u6A21\u677F\u5355\u70B9\u94FE\u63A5\uFF0C\u4EE5\u53CA\u63A8\u9001\u7684\u7ED3\u679C\u94FE\u63A5\uFF1B\n2\u3001\u8BE5\u5730\u5740\u9700\u8981\u5916\u7F51\u53EF\u8BBF\u95EE\uFF0C\u5730\u5740\u683C\u5F0F\u4E3Ahttp://\u57DF\u540D:\u7AEF\u53E3/decision\u6216https://\u57DF\u540D:\u7AEF\u53E3/decision\uFF0C\u914D\u7F6E\u540E\u8BF7\u4FDD\u5B58 +Dec-DingTalkSyn_Enterprise-DingDing=\u4F01\u4E1A\u9489\u9489 +Dec-DingTalkSyn_New-Agent=\u65B0\u5EFA\u9489\u9489\u5E94\u7528 +Dec-DingTalkSyn_Non-Adapted-Agent=\u63D0\u793A\uFF1A\u8BF7\u786E\u8BA4\u5E94\u7528id\u662F\u5426\u6B63\u786E +Dec-DingTalkSyn_Modify-Agent=\u4FEE\u6539\u9489\u9489\u5E94\u7528 +Dec-DingTalkSyn_DeleteAgent-Confirm-Popup=\u786E\u5B9A\u5220\u9664\u6B64\u4F01\u4E1A\u9489\u9489\u5E94\u7528 +Dec-DingTalkSyn_Confirm=\u786E\u5B9A +Dec-DingTalkSyn_Cancel=\u53D6\u6D88 +Dec-DingTalkSyn_Save-Agent-Fail=\u5B58\u50A8\u5E94\u7528\u4FE1\u606F\u5931\u8D25 +Dec-DingTalkSyn_Unknown-Agent=\u7F51\u7EDC\u5F02\u5E38\u6216\u8005\u8BF7\u786E\u8BA4\u5F53\u524D\u4F7F\u7528\u7684CorpId\u548CSecret\u662F\u5426\u6B63\u786E +Dec-DingTalkSyn_Agent-Name-Exist=\u5E94\u7528\u540D\u79F0\u5DF2\u5B58\u5728 +Dec-DingTalkSyn_Match-Way=\u5339\u914D\u65B9\u5F0F +Dec-DingTalkSyn_Match-Setting=\u5339\u914D\u8BBE\u7F6E +Dec-DingTalkSyn_DataSet=\u6570\u636E\u96C6 +Dec-DingTalkSyn_Address-Book=\u9489\u9489\u901A\u8BAF\u5F55 +Dec-DingTalkSyn_Member-Update=\u7ACB\u5373\u66F4\u65B0 +Dec-DingTalkSyn_Set-Update=\u8BBE\u7F6E\u81EA\u52A8\u66F4\u65B0 +Dec-DingTalkSyn_Not-Null=\u4E0D\u5141\u8BB8\u4E3A\u7A7A +Dec-DingTalkSyn_Start-Update=\u542F\u7528\u81EA\u52A8\u66F4\u65B0 +Dec-DingTalkSyn_Per=\u6BCF +Dec-DingTalkSyn_Day=\u5929 +Dec-DingTalkSyn_Week=\u5468 +Dec-DingTalkSyn_Monday=\u5468\u4E00 +Dec-DingTalkSyn_Tuesday=\u5468\u4E8C +Dec-DingTalkSyn_Wednesday=\u5468\u4E09 +Dec-DingTalkSyn_Thursday=\u5468\u56DB +Dec-DingTalkSyn_Friday=\u5468\u4E94 +Dec-DingTalkSyn_Saturday=\u5468\u516D +Dec-DingTalkSyn_Sunday=\u5468\u65E5 +Dec-DingTalkSyn_Hour=\u65F6 +Dec-DingTalkSyn_Minute=\u5206 +Dec-DingTalkSyn_Update-Once=\u5B9A\u65F6\u540C\u6B65\u4E00\u6B21 +Dec-DingTalkSyn_Illegal=\u4E0D\u5408\u6CD5 +Dec-DingTalkSyn_Proxy=\u9489\u9489\u4EE3\u7406\u8DF3\u8F6C +Dec-DingTalkSyn_Proxy_Address=\u4EE3\u7406\u670D\u52A1\u5668\u5730\u5740 +Dec-DingTalkSyn_Proxy_Address_Tip=1\u3001\u8BE5\u5730\u5740\u586B\u5199\u5E06\u8F6F\u6240\u5728\u5E94\u7528\u670D\u52A1\u5668\u8BBF\u95EE\u4EE3\u7406\u670D\u52A1\u5668\u7684\u5730\u5740\uFF0C\u5373\u6B63\u5411\u4EE3\u7406\u5730\u5740\uFF0C\u4ECE\u800C\u4F7F\u5E06\u8F6F\u5E94\u7528\u670D\u52A1\u5668\u80FD\u591F\u901A\u8FC7\u4EE3\u7406\u670D\u52A1\u5668\u8BBF\u95EE\u5230\u5916\u7F51\u9489\u9489\u670D\u52A1\u5668\uFF1B\n2\u3001\u5730\u5740\u683C\u5F0F\u4E3Ahttp://\u57DF\u540D:\u7AEF\u53E3 +Dec-DingTalkSyn_Test-Proxy-Address=\u6D4B\u8BD5\u8FDE\u63A5 +Dec-DingTalkSyn_Start-With-Http=\u670D\u52A1\u5668\u5730\u5740\u5FC5\u987B\u4EE5http\u6216https\u5F00\u5934 +Dec-DingTalkSyn_Test-Connection=\u6D4B\u8BD5\u8FDE\u63A5\u4E2D... +Dec-DingTalkSyn_Connection-Success=\u8FDE\u63A5\u6210\u529F +Dec-DingTalkSyn_Connection-Fail=\u8FDE\u63A5\u5931\u8D25 +Dec-DingTalkSyn_Unknown-Agent-Id=\u5E94\u7528ID\u4E0D\u6B63\u786E +Dec-DingTalkSyn_Delete-Agent-Fail=\u5220\u9664\u5E94\u7528\u5931\u8D25 +Dec-DingTalkSyn_Agent-Id-Exist=\u5E94\u7528ID\u5DF2\u5B58\u5728 +Dec-DingTalkSyn_Save-ReportServer-Url-Fail=\u4FDD\u5B58\u670D\u52A1\u5668\u5730\u5740\u5931\u8D25 +Dec-DingTalkSyn_Save-Timing-Task-Fail=\u4FDD\u5B58\u5B9A\u65F6\u4EFB\u52A1\u5931\u8D25 +Dec-DingTalkSyn_Error-AppKey-And-AppSecret=\u8BF7\u786E\u8BA4\u5F53\u524D\u4F7F\u7528\u7684AppKey\u548CAppSecret\u662F\u5426\u6B63\u786E +Dec-DingTalkSyn_Error-AppKey-And-AgentId=\u8BF7\u786E\u8BA4\u5F53\u524D\u5E94\u7528ID\u548CAppKey\u662F\u5426\u5BF9\u5E94 +Dec-DingTalkSyn_Duplicate-Agent-Name=\u5E94\u7528\u540D\u79F0\u5DF2\u5B58\u5728 +Dec-DingTalkSyn_Save-Match-Method-Fail=\u5B58\u50A8\u6210\u5458\u7BA1\u7406\u914D\u7F6E\u4FE1\u606F\u5931\u8D25 +Dec-DingTalkSyn_Duplicate-Agent-Id=\u5E94\u7528ID\u5DF2\u5B58\u5728 +Dec-DingTalkSyn_Save-Proxy-Server-Fail=\u4FDD\u5B58\u4EE3\u7406\u670D\u52A1\u5668\u5931\u8D25 +Dec-DingTalkSyn_Connect-Proxy-Server-Fail=\u9489\u9489\u4EE3\u7406\u670D\u52A1\u5668\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25 +Dec-DingTalkSyn_NetWork-Anomaly=\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u914D\u7F6E +Dec-DingTalkSyn_Create-DingTalkSyn-Url=\u751F\u6210\u9489\u9489\u94FE\u63A5 +Dec-DingTalkSyn_Platform-Page=\u94FE\u63A5\u9875\u9762 +Dec-DingTalkSyn_Platform-Report=\u5355\u4E2A\u6A21\u677F +Dec-DingTalkSyn_Platform=\u51B3\u7B56\u5E73\u53F0 +Dec-DingTalkSyn_Parameter_Setting=\u53C2\u6570\u8BBE\u7F6E +Dec-DingTalkSyn_Create-Url=\u751F\u6210\u94FE\u63A5 +Dec-DingTalkSyn_DingTalkSyn_Url=\u9489\u9489\u94FE\u63A5 +Dec-DingTalkSyn_Copy-Url=\u590D\u5236 +Dec-DingTalkSyn_Copy-Success=\u590D\u5236\u6210\u529F +Dec-DingTalkSyn_Input-Hint=\u8BF7\u8F93\u5165 +Dec-DingTalkSyn_Save-User-Relation-Fail=\u624B\u52A8\u5339\u914D\u5931\u8D25 +BI-Basic_Search=\u641C\u7D22 +Dec-DingTalkSyn_Match-Way-Not-Null=\u5339\u914D\u8BBE\u7F6E\u4E0D\u80FD\u4E3A\u7A7A +Dec-DingTalkSyn_Not-Select=\u4E0D\u9009 +Dec-DingTalkSyn_Tip-Get-ReportServer-Url-Fail=\u8BF7\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740 +Dec-DingTalkSyn_Create-Agent-Tip=\u82E5\u65E0AppKey\uFF0C\u8BF7\u5728Appkey\u548CAppSecret\u4E2D\u5206\u522B\u586B\u5199CorpId\u548CCorpSecret +Dec-DingTalkSyn_IP-Config-Not-Available=\u8BBF\u95EEIP\u4E0D\u5728\u767D\u540D\u5355\u4E4B\u4E2D +Dec-DingTalkSyn_NetWork-Invalid=\u7F51\u7EDC\u5F02\u5E38 +Dec-DingTalkSyn_Not_Trusted_Domain_Error=\u9519\u8BEF\u4EE3\u7801\uFF1A11205040\uFF0CredirectUrl\u57DF\u540D\u4E0E\u540E\u53F0\u914D\u7F6E\u4E0D\u4E00\u81F4 +Dec-DingTalkSyn_Not_Trusted_Domain_Exception=\u68C0\u67E5\u57DF\u540D\u4E0E\u670D\u52A1\u5668\u5730\u5740\u662F\u5426\u4E00\u81F4 +Dec-DingTalkSyn_Debugger-Set-Level=\u8BBE\u7F6E\u65E5\u5FD7\u7EA7\u522B +Dec-DingTalkSyn_Debugger-Level=\u65E5\u5FD7\u7EA7\u522B +Dec-DingTalkSyn_Debugger-Parameter-List=\u53C2\u6570\u5217\u8868 +Dec-DingTalkSyn_Debugger-Content=\u8C03\u8BD5\u5185\u5BB9 +Dec-DingTalkSyn_Debugger-Type-Get-Access-Token=\u83B7\u53D6access_token +Dec-DingTalkSyn_Debugger-Type-Check-Ip=\u68C0\u67E5ip\u767D\u540D\u5355 +Dec-DingTalkSyn_Debugger-Start-Check=\u5F00\u59CB\u68C0\u6D4B +Dec-DingTalkSyn_Debugger-Show-Result=\u68C0\u6D4B\u7ED3\u679C +Dec-DingTalkSyn_Debugger-Type-Check-Request-Time=\u68C0\u6D4B\u8BF7\u6C42\u8017\u65F6 +Dec-DingTalkSyn_Debugger-Type-Check-Request-Time-Result=\u68C0\u6D4B\u7ED3\u679C +Dec-DingTalkSyn_Debugger-Tip-Curl-Invalid=\u63D0\u793A\uFF1A\u670D\u52A1\u5668\u7CFB\u7EDF\u82E5\u4E3Awindows\u5219\u9700\u8981\u5B89\u88C5curl\u5DE5\u5177\u624D\u80FD\u652F\u6301\u68C0\u6D4B +Dec-DingTalkSyn_Debugger-DownLoad_Log=\u4E0B\u8F7D\u65E5\u5FD7 +Dec-DingTalkSyn_Click-To-Download=\u70B9\u51FB\u4E0B\u8F7D +Dec-DingTalkSyn_Download-Fail=\u4E0B\u8F7D\u5931\u8D25 +Dec-DingTalkSyn_Not_Null=\u4E0D\u53EF\u4E3A\u7A7A +Dec-DingTalkSyn_ErrorDetail=\u9519\u8BEF\u4FE1\u606F +Dec-DingTalkSyn_Debugger-Check-Ip-Result=\u68C0\u67E5\u7ED3\u679C +Dec-DingTalkSyn_Debugger-Get-Token=access_token +Dec-DingTalkSyn_Agent_Deleted_Tip=\u65E0\u6CD5\u83B7\u53D6\u8BE5\u9489\u9489\u5E94\u7528\uFF0C\u8BF7\u68C0\u67E5\u914D\u7F6E\u9879\u662F\u5426\u6709\u8BEF +Dec-DingTalkSyn_Parse_Parameters=\u89E3\u6790\u53C2\u6570\u503C +Dec-DingTalkSyn_Parse_Parameters_Tip=\u5FAE\u4FE1\uFF0F\u9489\u9489\u96C6\u6210\u94FE\u63A5\u5FC5\u987B\u52FE\u9009\u89E3\u6790\u53C2\u6570\u503C\uFF0C\u5426\u5219\u5C06\u5BFC\u81F4\u53C2\u6570\u4E22\u5931\uFF1B\u6A21\u677F\u6D88\u606F\u63A8\u9001\u7684\u6D88\u606F\u94FE\u63A5\u53EF\u9009\u62E9\u4E0D\u89E3\u6790\u53C2\u6570\u503C\uFF0C\u4ECE\u800C\u5B9E\u73B0\u63A8\u9001\u65F6\u7684\u5B9E\u65F6\u516C\u5F0F\u8BA1\u7B97\u3002 +Dec-DingTalkSyn_Enterprise_Agent=\u9489\u9489\u5E94\u7528 +Dec-DingTalkSyn_Chatgroup_Name=\u9489\u9489\u7FA4\u540D\u79F0 +Dec-DingTalkSyn_Chat_Group=\u9489\u9489\u7FA4 +Dec-DingTalkSyn_New_Chat_Group=\u65B0\u5EFA\u9489\u9489\u7FA4 +Dec-DingTalkSyn_Delete_ChatGroup_Confirm=\u786E\u8BA4\u5220\u9664\u9489\u9489\u7FA4\uFF1F +Dec-DingTalkSyn_Chat_Group_Member_Tip=\u9664\u7FA4\u4E3B\u5916\uFF0C\u4E0D\u53EF\u5C11\u4E8E2\u4EBA +Dec-DingTalkSyn_Chat_Group_Leader=\u7FA4\u4E3B +Dec-DingTalkSyn_Chat_Group_Member=\u7FA4\u6210\u5458 +Dec-DingTalkSyn_New_Chat_Group_Tip1=\u7FA4\u6210\u5458\u8D85\u8FC730\u4EBA\u65F6\uFF0C\u5EFA\u8BAE\u5728\u9489\u9489\u5BA2\u6237\u7AEF\u6DFB\u52A0\u66F4\u591A\u7FA4\u6210\u5458\u3002 +Dec-DingTalkSyn_New_Chat_Group_Tip2=\u5BA2\u6237\u7AEF\u6DFB\u52A0\u7684\u6210\u5458\u82E5\u4E0D\u5728\u5E94\u7528\u53EF\u89C1\u8303\u56F4\u5185\uFF0C\u5C06\u65E0\u6CD5\u5355\u70B9\u767B\u5F55\u67E5\u770B\u6A21\u677F\u3002 +Dec-DingTalkSyn_New_Chat_Group_Message=\u60A8\u5DF2\u52A0\u5165\u7FA4\u804A +Dec-DingTalkSyn_Common_Error_Tip=\u53D1\u751F\u9519\u8BEF\uFF0C\u9519\u8BEF\u7801\u4E3A\uFF1A +Dec-DingTalkSyn_Chat_Group_Name_Length_Tip=\u7FA4\u540D\u79F0\u957F\u5EA6\u965020\u4E2A\u5B57\u7B26 +Dec-DingTalkSyn_Create-Chat-Group-Fail=\u521B\u5EFA\u9489\u9489\u7FA4\u5931\u8D25 +Dec-DingTalkSyn_Output_User_Empty=\u63A8\u9001\u4EBA\u4E3A\u7A7A\uFF01 +Dec-DingTalkSyn_Message_Agent=\u5E94\u7528\u6D88\u606F +Dec-DingTalkSyn_Message_Group=\u7FA4\u6D88\u606F +Dec-DingTalkSyn_DingTalkSyn=\u9489\u9489 +Dec-DingTalkSyn_Output_User_Fail_Partly_Header=\u4E2A\u7528\u6237\u63A8\u9001\u5931\u8D25\uFF1A +Dec-DingTalkSyn_Output_User_Fail_Partly_Tip=...\uFF0C\u53EF\u5728\u65E5\u5FD7\u4E2D\u67E5\u770B\u5B8C\u6574\u7528\u6237\u540D\u5355 +Dec-DingTalkSyn_Output_Group_Fail_Partly_Header=\u4E2A\u7FA4\u63A8\u9001\u5931\u8D25\uFF1A +Dec-DingTalkSyn_Output_Group_Fail_Partly_Tip=...\uFF0C\u53EF\u5728\u65E5\u5FD7\u4E2D\u67E5\u770B\u5B8C\u6574\u7FA4\u540D\u5355 +Dec-DingTalkSyn_User_Match_Dec_User_Fail=\u9489\u9489\u7528\u6237\u5339\u914D\u5E73\u53F0\u7528\u6237\u5931\u8D25\uFF01 \ No newline at end of file diff --git a/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/web/codePage.html b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/web/codePage.html new file mode 100644 index 0000000..064ed88 --- /dev/null +++ b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/web/codePage.html @@ -0,0 +1,24 @@ + + + + + + + DingTalk + + + + + + \ No newline at end of file diff --git a/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/web/dingtalk.open.js b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/web/dingtalk.open.js new file mode 100644 index 0000000..3d1ed4d --- /dev/null +++ b/src/main/resources/com/fr/plugin/xxxx/dingtalksyn/web/dingtalk.open.js @@ -0,0 +1 @@ +(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dd=t():e.dd=t()})(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=707)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(180),i=n(2);t.ENV_ENUM=i.ENV_ENUM,t.ENV_ENUM_SUB=i.ENV_ENUM_SUB;var a=n(3);n(186),t.ddSdk=new a.Sdk(r.getENV(),o.log)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addWatchParamsDeal=function(e){var t=Object.assign({},e);return t.watch=!0,t},t.addDefaultCorpIdParamsDeal=function(e){var t=Object.assign({},e);return t.corpId="corpId",t},t.genDefaultParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign({},t,e)}},t.forceChangeParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign(e,t)}},t.genBoolResultDealFn=function(e){return function(t){var n=Object.assign({},t);return e.forEach(function(e){void 0!==n[e]&&(n[e]=!!n[e])}),n}},t.genBizStoreParamsDealFn=function(e){var t=Object.assign({},e);return"string"!=typeof t.params?(t.params=JSON.stringify(t),t):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(3);t.ENV_ENUM=o.ENV_ENUM,t.APP_TYPE=o.APP_TYPE,t.ENV_ENUM_SUB=o.ENV_ENUM_SUB;var i,a=n(183);(function(e){e.singlePage="singlePage",e.miniApp="miniApp",e.miniWidget="miniWidget"})(i||(i={})),t.getUA=function(){var e="";try{"undefined"!=typeof navigator&&(e=navigator&&(navigator.userAgent||navigator.swuserAgent)||"")}catch(t){e=""}return e},t.getENV=function(){var e=t.getUA(),n=/iPhone|iPad|iPod|iOS/i.test(e),o=/Android/i.test(e),s=/Nebula/i.test(e),d=/DingTalk/i.test(e),u=/dd-web/i.test(e),c="object"==typeof nuva,l="object"==typeof dd&&"function"==typeof dd.dtBridge,f=l&&n||c&&n,v=d||a.default.isDingTalk,p=n&&v||a.default.isWeexiOS||f,_=o&&v||a.default.isWeexAndroid,E=s&&v||l,N=u,P=r.APP_TYPE.WEB;if(N)P=r.APP_TYPE.WEBVIEW_IN_MINIAPP;else if(E)P=r.APP_TYPE.MINI_APP;else if(a.default.isWeexiOS||a.default.isWeexAndroid)try{var M=weex.config.ddWeexEnv;P=M===i.miniWidget?r.APP_TYPE.WEEX_WIDGET:r.APP_TYPE.WEEX}catch(e){P=r.APP_TYPE.WEEX}var h,m="*",k=e.match(/AliApp\(\w+\/([a-zA-Z0-9.-]+)\)/);null===k&&(k=e.match(/DingTalk\/([a-zA-Z0-9.-]+)/));var b;k&&k[1]&&(b=k[1]);var g="";if("undefined"!=typeof name&&(g=name),g)try{var I=JSON.parse(g);I.hostVersion&&(b=I.hostVersion),m=I.language||navigator.language||"*",h=I.containerId}catch(e){}var y=!!h;y&&!b&&(k=e.match(/DingTalk\(([a-zA-Z0-9\.-]+)\)/))&&k[1]&&(b=k[1]);var A,S=r.ENV_ENUM_SUB.noSub;if(p)A=r.ENV_ENUM.ios;else if(_)A=r.ENV_ENUM.android;else if(y){var V=e.indexOf("Macintosh; Intel Mac OS")>-1;S=V?r.ENV_ENUM_SUB.mac:r.ENV_ENUM_SUB.win,A=r.ENV_ENUM.pc}else A=r.ENV_ENUM.notInDingTalk;return{platform:A,platformSub:S,version:b,appType:P,language:m}}},function(e,t,n){"use strict";function r(e,t){var n=e&&e.vs;return"object"==typeof n&&(n=n[t.platformSub]),n}Object.defineProperty(t,"__esModule",{value:!0});var o=n(189);t.APP_TYPE=o.APP_TYPE,t.LogLevel=o.LogLevel,t.isFunction=o.isFunction,t.compareVersion=o.compareVersion,t.ENV_ENUM=o.ENV_ENUM,t.ENV_ENUM_SUB=o.ENV_ENUM_SUB;var i=function(){function e(e,t){var n=this;this.configJsApiList=[],this.hadConfig=!1,this.p={},this.config$=new Promise(function(e,t){n.p.reject=t,n.p.resolve=e}),this.logQueue=[],this.devConfig={debug:!1},this.platformConfigMap={},this.invokeAPIConfigMapByMethod={},this.isBridgeDrity=!0,this.getExportSdk=function(){return n.exportSdk},this.setAPI=function(e,t){n.invokeAPIConfigMapByMethod[e]=t},this.setPlatform=function(e){n.isBridgeDrity=!0,n.platformConfigMap[e.platform]=e,e.platform===n.env.platform&&e.bridgeInit().catch(function(e){n.customLog(o.LogLevel.WARNING,["auto bridgeInit error",e||""])})},this.getPlatformConfigMap=function(){return n.platformConfigMap},this.deleteApiConfig=function(e,t){var r=n.invokeAPIConfigMapByMethod[e];r&&delete r[t]},this.invokeAPI=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i=!0),n.customLog(o.LogLevel.INFO,['==> "'+e+'" params: ',t]);var a=+new Date,s=a+"_"+Math.floor(1e3*Math.random());if(n.devConfig.onBeforeInvokeAPI)try{n.devConfig.onBeforeInvokeAPI({invokeId:s,method:e,params:t,startTime:a})}catch(e){n.customLog(o.LogLevel.ERROR,["call Hook:onBeforeInvokeAPI failed, reason:",e])}return!1===n.devConfig.isAuthApi&&(i=!1),n.bridgeInitFn().then(function(d){var u=n.invokeAPIConfigMapByMethod[e],c=n.devConfig.forceEnableDealApiFnMap&&n.devConfig.forceEnableDealApiFnMap[e]&&!0===n.devConfig.forceEnableDealApiFnMap[e](t),l=!c&&(!0===n.devConfig.isDisableDeal||n.devConfig.disbaleDealApiWhiteList&&-1!==n.devConfig.disbaleDealApiWhiteList.indexOf(e));if(u||!i){var f;if(u&&(f=u[n.env.platform]),f||!i){var v={};v=!l&&f&&f.paramsDeal&&o.isFunction(f.paramsDeal)?f.paramsDeal(t):Object.assign({},t);var p=function(e){return!l&&f&&f.resultDeal&&o.isFunction(f.resultDeal)?f.resultDeal(e):e};if(o.isFunction(v.onSuccess)){var _=v.onSuccess;v.onSuccess=function(e){_(p(e))}}return d(e,v).then(p,function(t){var a=n.hadConfig&&void 0===n.isReady&&-1!==n.configJsApiList.indexOf(e),s="object"==typeof t&&"string"==typeof t.errorCode&&t.errorCode===o.ERROR_CODE.no_permission,u="object"==typeof t&&"string"==typeof t.errorCode&&t.errorCode===o.ERROR_CODE.cancel,c=r(f,n.env),l=c&&n.env.version&&o.compareVersion(n.env.version,c),_=(n.env.platform===o.ENV_ENUM.ios||n.env.platform===o.ENV_ENUM.android)&&a&&s,E=n.env.platform===o.ENV_ENUM.pc&&a&&(l&&!u&&i||s);return _||E?n.config$.then(function(){return d(e,v).then(p)}):Promise.reject(t)}).then(function(r){if(n.devConfig.onAfterInvokeAPI)try{n.devConfig.onAfterInvokeAPI({invokeId:s,method:e,params:t,payload:r,isSuccess:!0,startTime:a,duration:+new Date-a})}catch(e){n.customLog(o.LogLevel.ERROR,["call Hook:onAfterInvokeAPI failed, reason:",e])}return n.customLog(o.LogLevel.INFO,['<== "'+e+'" success result: ',r]),r},function(r){if(n.devConfig.onAfterInvokeAPI)try{n.devConfig.onAfterInvokeAPI({invokeId:s,method:e,params:t,payload:r,startTime:a,duration:+new Date-a,isSuccess:!1})}catch(r){n.customLog(o.LogLevel.ERROR,["call Hook:onAfterInvokeAPI failed, reason:",r])}return n.customLog(o.LogLevel.WARNING,['<== "'+e+'" fail result: ',r]),Promise.reject(r)})}var E='"'+e+'" do not support the current platform ('+n.env.platform+")";return n.customLog(o.LogLevel.ERROR,[E]),Promise.reject({errorCode:o.ERROR_CODE.jsapi_internal_error,errorMessage:E})}var E="This API method is not configured for the platform ("+n.env.platform+")";return n.customLog(o.LogLevel.ERROR,[E]),Promise.reject({errorCode:o.ERROR_CODE.jsapi_internal_error,errorMessage:E})})},this.customLog=function(e,t){var r={level:e,text:t,time:new Date};if(!0===n.devConfig.debug)n.customLogInstance(r);else{n.logQueue.push(r);n.logQueue.length>10&&(n.logQueue=n.logQueue.slice(n.logQueue.length-10))}},this.clearLogQueue=function(){n.logQueue.forEach(function(e){n.customLogInstance(e)}),n.logQueue=[]},this.customLogInstance=t,this.env=e,this.bridgeInitFn=function(){if(n.bridgeInitFnPromise&&!n.isBridgeDrity)return n.bridgeInitFnPromise;n.isBridgeDrity=!1;var t=n.platformConfigMap[e.platform];if(t)n.bridgeInitFnPromise=t.bridgeInit().catch(function(e){return n.customLog(o.LogLevel.ERROR,["\b\b\b\b\bJsBridge initialization fails, jsapi will not work"]),Promise.reject(e)});else{var r="Do not support the current environment:"+e.platform;n.customLog(o.LogLevel.WARNING,[r]),n.bridgeInitFnPromise=Promise.reject(new Error(r))}return n.bridgeInitFnPromise};var i=function(e){void 0===e&&(e={}),n.devConfig=Object.assign(n.devConfig,e),!0===e.debug&&n.clearLogQueue(),e.extraPlatform&&n.setPlatform(e.extraPlatform)};this.exportSdk={config:function(t){void 0===t&&(t={});var r=!0;Object.keys(t).forEach(function(e){-1===["debug","usePromise"].indexOf(e)&&(r=!1)}),r?(n.customLog(o.LogLevel.WARNING,["This is a deprecated feature, recommend use dd.devConfig"]),i(t)):n.hadConfig?n.customLog(o.LogLevel.WARNING,["Config has been executed"]):(t.jsApiList&&(n.configJsApiList=t.jsApiList),n.hadConfig=!0,n.bridgeInitFn().then(function(r){var o=n.platformConfigMap[e.platform],i=t;o.authParamsDeal&&(i=o.authParamsDeal(i)),r(o.authMethod,i).then(function(e){n.isReady=!0,n.p.resolve(e)}).catch(function(e){n.isReady=!1,n.p.reject(e)})},function(){n.customLog(o.LogLevel.ERROR,['\b\b\b\b\bJsBridge initialization failed and "dd.config" failed to call'])}))},devConfig:i,ready:function(e){!1===n.hadConfig?(n.customLog(o.LogLevel.WARNING,["You don 't use a dd.config, so you don't need to wrap dd.ready, recommend remove dd.ready"]),n.bridgeInitFn().then(function(){e()})):n.config$.then(function(t){e()})},error:function(e){n.config$.catch(function(t){e(t)})},on:function(t,r){n.bridgeInitFn().then(function(){n.platformConfigMap[e.platform].event.on(t,r)})},off:function(t,r){n.bridgeInitFn().then(function(){n.platformConfigMap[e.platform].event.off(t,r)})},env:e,checkJsApi:function(t){void 0===t&&(t={});var i={};return t.jsApiList&&t.jsApiList.forEach(function(t){var a=n.invokeAPIConfigMapByMethod[t];if(a){var s=a[e.platform],d=r(s,e);d&&e.version&&o.compareVersion(e.version,d)&&(i[t]=!0)}i[t]||(i[t]=!1)}),Promise.resolve(i)},_invoke:function(e,t){return void 0===t&&(t={}),n.invokeAPI(e,t,!1)}}}return e}();t.Sdk=i},function(e,t,n){(function(t,n){e.exports=n()})(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=579)}({179:function(e,t,n){"use strict";var r=n(181);e.exports=r},181:function(e,t,n){"use strict";var r=n(183),o=n(184),i=n(182),a=n(185),s=new i,d=!1,u="",c=null,l={},f=/{.*}/;try{var v=window.name.match(f);if(v&&v[0])var l=JSON.parse(v[0])}catch(e){l={}}l.hostOrigin&&".dingtalk.com"===l.hostOrigin.split(":")[1].slice(0-".dingtalk.com".length)&&l.containerId&&(d=!0,u=l.hostOrigin,c=l.containerId);var p={},_=new Promise(function(e,t){p._resolve=e,p._reject=t}),E={},N=null;window.top!==window&&(N=window.top,p._resolve()),E[a.SYS_INIT]=function(e){N=e.frameWindow,p._resolve(),e.respond({})},window.addEventListener("message",function(e){var t=e.data,n=e.origin;if(n===u)if("response"===t.type&&t.msgId){var r=t.msgId,i=s.getMsyById(r);i&&i.receiveResponse(t.body,!t.success)}else if("event"===t.type&&t.msgId){var r=t.msgId,i=s.getMsyById(r);i&&i.receiveEvent(t.eventName,t.body)}else if("request"===t.type&&t.msgId){var i=new o(e.source,n,t);E[i.methodName]&&E[i.methodName](i)}}),t.invokeAPI=function(e,t){var n=new r(c,e,t);return d&&_.then(function(){N&&N.postMessage(n.getPayload(),u),s.addPending(n)}),n};var P=null;t.addEventListener=function(e,n){P||(P=t.invokeAPI(a.SYS_EVENT,{})),P.addEventListener(e,n)},t.removeEventListener=function(e,t){P&&P.removeEventListener(e,t)}},182:function(e,t,n){"use strict";var r=function(){this.pendingMsgs={}};r.prototype.addPending=function(e){this.pendingMsgs[e.id]=e;var t=function(){delete this.pendingMsgs[e.id],e.removeEventListener("_finish",t)}.bind(this);e.addEventListener("_finish",t)},r.prototype.getMsyById=function(e){return this.pendingMsgs[e]},e.exports=r},183:function(e,t,n){"use strict";var r=n(574),o=n(573),i=0,a=Math.floor(1e3*Math.random()),s=function(){return 1e3*(1e3*a+Math.floor(1e3*Math.random()))+ ++i%1e3},d={code:408,reason:"timeout"},u={TIMEOUT:"_timeout",FINISH:"_finish"},c={timeout:-1},l=function(e,t,n,r){this.id=s(),this.methodName=t,this.containerId=e,this.option=o({},c,r);var n=n||{};this._p={},this.result=new Promise(function(e,t){this._p._resolve=e,this._p._reject=t}.bind(this)),this.callbacks={},this.plainMsg=this._handleMsg(n),this._eventsHandle={},this._timeoutTimer=null,this._initTimeout(),this.isFinish=!1};l.prototype._initTimeout=function(){this._clearTimeout(),this.option.timeout>0&&(this._timeoutTimer=setTimeout(function(){this.receiveEvent(u.TIMEOUT),this.receiveResponse(d,!0)}.bind(this),this.option.timeout))},l.prototype._clearTimeout=function(){clearTimeout(this._timeoutTimer)},l.prototype._handleMsg=function(e){var t={};return Object.keys(e).forEach(function(n){var o=e[n];"function"==typeof o&&"on"===n.slice(0,2)?this.callbacks[n]=o:t[n]=r(o)}.bind(this)),t},l.prototype.getPayload=function(){return{msgId:this.id,containerId:this.containerId,methodName:this.methodName,body:this.plainMsg,type:"request"}},l.prototype.receiveEvent=function(e,t){if(this.isFinish&&e!==u.FINISH)return!1;e!==u.FINISH&&e!==u.TIMEOUT&&this._initTimeout(),Array.isArray(this._eventsHandle[e])&&this._eventsHandle[e].forEach(function(e){try{e(t)}catch(e){console.error(t)}});var n="on"+e.charAt(0).toUpperCase()+e.slice(1);return this.callbacks[n]&&this.callbacks[n](t),!0},l.prototype.addEventListener=function(e,t){if(!e||"function"!=typeof t)throw"eventName is null or handle is not a function, addEventListener fail";Array.isArray(this._eventsHandle[e])||(this._eventsHandle[e]=[]),this._eventsHandle[e].push(t)},l.prototype.removeEventListener=function(e,t){if(!e||!t)throw"eventName is null or handle is null, invoke removeEventListener fail";if(Array.isArray(this._eventsHandle[e])){var n=this._eventsHandle[e].indexOf(t);-1!==n&&this._eventsHandle[e].splice(n,1)}},l.prototype.receiveResponse=function(e,t){if(!0===this.isFinish)return!1;this._clearTimeout();var t=!!t;return t?this._p._reject(e):this._p._resolve(e),setTimeout(function(){this.receiveEvent(u.FINISH)}.bind(this),0),this.isFinish=!0,!0},e.exports=l},184:function(e,t,n){"use strict";var r=function(e,t,n){if(this._msgId=n.msgId,this.frameWindow=e,this.methodName=n.methodName,this.clientOrigin=t,this.containerId=n.containerId,this.params=n.body,!this._msgId)throw"msgId not exist";if(!this.frameWindow)throw"frameWindow not exist";if(!this.methodName)throw"methodName not exits";if(!this.clientOrigin)throw"clientOrigin not exist";this.hasResponded=!1};r.prototype.respond=function(e,t){var t=!!t;if(!0!==this.hasResponded){var n={type:"response",success:!t,body:e,msgId:this._msgId};this.frameWindow.postMessage(n,this.clientOrigin),this.hasResponded=!0}},r.prototype.emit=function(e,t){var n={type:"event",eventName:e,body:t,msgId:this._msgId};this.frameWindow.postMessage(n,this.clientOrigin)},e.exports=r},185:function(e,t,n){"use strict";e.exports={SYS_EVENT:"SYS_openAPIContainerInitEvent",SYS_INIT:"SYS_openAPIContainerInit"}},4:function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},572:function(e,t,n){(function(e,n){function r(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function i(e,t){for(var n=-1,r=e.length;++n-1}function g(e,t){var n=this.__data__,r=W(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function I(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=Ve}function ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function be(e){return!!e&&"object"==typeof e}function ge(e){return!!ke(e)&&(he(e)||c(e)?Pt:tt).test(_e(e))}function Ie(e){return"string"==typeof e||!Lt(e)&&be(e)&&Nt.call(e)==xe}function ye(e){var t=pe(e);if(!t&&!Pe(e))return z(e);var n=le(e),r=!!n,o=n||[],i=o.length;for(var a in e)!B(e,a)||r&&("length"==a||fe(a,i))||t&&"constructor"==a||o.push(a);return o}var Ae=200,Se="__lodash_hash_undefined__",Ve=9007199254740991,Ue="[object Arguments]",Oe="[object Boolean]",je="[object Date]",$e="[object Function]",we="[object GeneratorFunction]",De="[object Map]",Ce="[object Number]",Te="[object Object]",We="[object RegExp]",Re="[object Set]",xe="[object String]",Fe="[object Symbol]",Le="[object ArrayBuffer]",Be="[object DataView]",ze="[object Float32Array]",qe="[object Float64Array]",Ye="[object Int8Array]",Je="[object Int16Array]",Ge="[object Int32Array]",He="[object Uint8Array]",Xe="[object Uint8ClampedArray]",Ke="[object Uint16Array]",Qe="[object Uint32Array]",Ze=/[\\^$.*+?()[\]{}|]/g,et=/\w*$/,tt=/^\[object .+?Constructor\]$/,nt=/^(?:0|[1-9]\d*)$/,rt={};rt[Ue]=rt["[object Array]"]=rt[Le]=rt[Be]=rt[Oe]=rt[je]=rt[ze]=rt[qe]=rt[Ye]=rt[Je]=rt[Ge]=rt[De]=rt[Ce]=rt[Te]=rt[We]=rt[Re]=rt[xe]=rt[Fe]=rt[He]=rt[Xe]=rt[Ke]=rt[Qe]=!0,rt["[object Error]"]=rt[$e]=rt["[object WeakMap]"]=!1;var ot={function:!0,object:!0},it=ot[typeof t]&&t&&!t.nodeType?t:void 0,at=ot[typeof e]&&e&&!e.nodeType?e:void 0,st=at&&at.exports===it?it:void 0,dt=u(it&&at&&"object"==typeof n&&n),ut=u(ot[typeof self]&&self),ct=u(ot[typeof window]&&window),lt=u(ot[typeof this]&&this),ft=dt||ct!==(lt&<.window)&&ct||ut||lt||Function("return this")(),vt=Array.prototype,pt=Object.prototype,_t=Function.prototype.toString,Et=pt.hasOwnProperty,Nt=pt.toString,Pt=RegExp("^"+_t.call(Et).replace(Ze,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mt=st?ft.Buffer:void 0,ht=ft.Symbol,mt=ft.Uint8Array,kt=Object.getOwnPropertySymbols,bt=Object.create,gt=pt.propertyIsEnumerable,It=vt.splice,yt=Object.getPrototypeOf,At=Object.keys,St=oe(ft,"DataView"),Vt=oe(ft,"Map"),Ut=oe(ft,"Promise"),Ot=oe(ft,"Set"),jt=oe(ft,"WeakMap"),$t=oe(Object,"create"),wt=_e(St),Dt=_e(Vt),Ct=_e(Ut),Tt=_e(Ot),Wt=_e(jt),Rt=ht?ht.prototype:void 0,xt=Rt?Rt.valueOf:void 0;v.prototype.clear=p,v.prototype.delete=_,v.prototype.get=E,v.prototype.has=N,v.prototype.set=P,M.prototype.clear=h,M.prototype.delete=m,M.prototype.get=k,M.prototype.has=b,M.prototype.set=g,I.prototype.clear=y,I.prototype.delete=A,I.prototype.get=S,I.prototype.has=V,I.prototype.set=U,O.prototype.clear=j,O.prototype.delete=$,O.prototype.get=w,O.prototype.has=D,O.prototype.set=C;var Ft=function(e){return function(e){return null==e?void 0:e.length}}();kt||(ae=function(){return[]}),(St&&se(new St(new ArrayBuffer(1)))!=Be||Vt&&se(new Vt)!=De||Ut&&"[object Promise]"!=se(Ut.resolve())||Ot&&se(new Ot)!=Re||jt&&"[object WeakMap]"!=se(new jt))&&(se=function(e){var t=Nt.call(e),n=t==Te?e.constructor:void 0,r=n?_e(n):void 0;if(r)switch(r){case wt:return Be;case Dt:return De;case Ct:return"[object Promise]";case Tt:return Re;case Wt:return"[object WeakMap]"}return t});var Lt=Array.isArray,Bt=Mt?function(e){return e instanceof Mt}:function(e){return function(){return!1}}();e.exports=x}).call(t,n(577)(e),n(4))},573:function(e,t,n){function r(e,t,n){var r=e[t];h.call(e,t)&&d(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function o(e,t,n,o){n||(n={});for(var i=-1,a=t.length;++i-1&&e%1==0&&e-1&&e%1==0&&e<=_}function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(575),p=n(576),_=9007199254740991,E="[object Function]",N="[object GeneratorFunction]",P=/^(?:0|[1-9]\d*)$/,M=Object.prototype,h=M.hasOwnProperty,m=M.toString,k=M.propertyIsEnumerable,b=!k.call({valueOf:1},"valueOf"),g=function(e){return function(e){return null==e?void 0:e.length}}(),I=function(e){return p(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&a(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1&&e%1==0&&e-1&&e%1==0&&e<=_}function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function p(e){return d(e)?r(e):o(e)}var _=9007199254740991,E="[object Arguments]",N="[object Function]",P="[object GeneratorFunction]",M=/^(?:0|[1-9]\d*)$/,h=Object.prototype,m=h.hasOwnProperty,k=h.toString,b=h.propertyIsEnumerable,g=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),I=Array.isArray;e.exports=p},576:function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t){return t=b(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=b(r.length-t,0),a=Array(i);++o0;)o=a.shift(),i=s.shift();return n?(i||0)>=(o||0):(i||0)>(o||0)},t.language=o.language,t.version=o.version},function(e,t,n){"use strict";function r(e,t,n){var r="Web"===n.platform,i="iOS"===n.platform,a="android"===n.platform,s=a||i,d=function(){return r?window.navigator.userAgent.toLowerCase():""}(),u=function(){var e={};if(r){var t=window.name;try{var n=JSON.parse(t);e.containerId=n.containerId,e.version=n.hostVersion,e.language=n.language||"*"}catch(e){}}return e}(),c=function(){return s?"DingTalk"===n.appName||"com.alibaba.android.rimet"===n.appName:d.indexOf("dingtalk")>-1||!!u.containerId}(),l=function(){if(r){if(u.version)return u.version;var e=d.match(/aliapp\(\w+\/([a-zA-Z0-9.-]+)\)/);null===e&&(e=d.match(/dingtalk\/([a-zA-Z0-9.-]+)/));return e&&e[1]||"Unknown"}return n.appVersion}(),f=!!u.containerId,v=/iphone|ipod|ios/.test(d),p=/ipad/.test(d),_=d.indexOf("android")>-1,E=d.indexOf("mac")>-1&&f,N=d.indexOf("win")>-1&&f,P=!E&&!N&&f,M=f,h="";return h=c?v||i?o.PLATFORM.IOS:_||a?o.PLATFORM.ANDROID:p?o.PLATFORM.IPAD:E?o.PLATFORM.MAC:N?o.PLATFORM.WINDOWS:P?o.PLATFORM.BROWSER:o.PLATFORM.UNKNOWN:o.PLATFORM.UNKNOWN,{isDingTalk:c,isWebiOS:v,isWebAndroid:_,isWeexiOS:i,isWeexAndroid:a,isDingTalkPCMac:E,isDingTalkPCWeb:P,isDingTalkPCWindows:N,isDingTalkPC:M,runtime:e,framework:t,platform:h,version:l,isWeex:s}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11);t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(184),o=n(182),i=n(11),a=r.default().split("."),s=a[0],d=a[1],u=function(){var e={};switch(d){case i.FRAMEWORK.VUE:var t=weex.config,n=t.env;e.platform=n.platform,i.RUNTIME.WEEX===s&&(e.appVersion=n.appVersion,e.appName=n.appName);break;case i.FRAMEWORK.RAX:i.RUNTIME.WEEX===s&&(e.platform=navigator.platform,e.appName=navigator.appName,e.appVersion=navigator.appVersion);break;case i.FRAMEWORK.UNKNOWN:i.RUNTIME.WEB===s&&(e.platform=i.RUNTIME.WEB),i.RUNTIME.UNKNOWN===s&&(e.platform=i.RUNTIME.UNKNOWN)}return e}(),c=o.default(s,d,u);t.default=c},function(e,t,n){"use strict";function r(e,t){for(var n=e.length,r=0,o=!0;ro[i])return!0}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=r,t.compareVersion=o;(function(e){e.cancel="-1",e.not_exist="1",e.no_permission="7",e.jsapi_internal_error="22"})(t.ERROR_CODE||(t.ERROR_CODE={}));(function(e){e.pc="pc",e.android="android",e.ios="ios",e.notInDingTalk="notInDingTalk"})(t.ENV_ENUM||(t.ENV_ENUM={}));(function(e){e.mac="mac",e.win="win",e.noSub="noSub"})(t.ENV_ENUM_SUB||(t.ENV_ENUM_SUB={}));(function(e){e.WEB="WEB",e.MINI_APP="MINI_APP",e.WEEX="WEEX",e.WEBVIEW_IN_MINIAPP="WEBVIEW_IN_MINIAPP",e.WEEX_WIDGET="WEEX_WIDGET"})(t.APP_TYPE||(t.APP_TYPE={}));(function(e){e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR"})(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(2),i=n(3),a=n(5),s=n(9),d=n(176),u=n(6),c=n(8),l=n(10);r.ddSdk.setPlatform({platform:o.ENV_ENUM.android,bridgeInit:function(){var e=o.getENV();return e.appType===i.APP_TYPE.MINI_APP?Promise.resolve(a.default):e.appType===i.APP_TYPE.WEBVIEW_IN_MINIAPP?Promise.resolve(s.default):e.appType===i.APP_TYPE.WEEX?u.androidWeexBridge():d.h5AndroidbridgeInit().then(function(){return d.default})},authMethod:"runtime.permission.requestJsApis",event:{on:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.on(e,t);break;case i.APP_TYPE.WEEX:l.on(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}},off:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.off(e,t);break;case i.APP_TYPE.WEEX:l.off(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(193),n(190),n(192)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(2),i=n(3),a=n(5),s=n(9),d=n(177),u=n(6),c=n(8),l=n(10);r.ddSdk.setPlatform({platform:o.ENV_ENUM.ios,bridgeInit:function(){var e=o.getENV();return e.appType===i.APP_TYPE.MINI_APP?Promise.resolve(a.default):e.appType===i.APP_TYPE.WEBVIEW_IN_MINIAPP?Promise.resolve(s.default):e.appType===i.APP_TYPE.WEEX?u.iosWeexBridge():d.h5IosBridgeInit().then(function(){return d.default})},authMethod:"runtime.permission.requestJsApis",event:{on:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.on(e,t);break;case i.APP_TYPE.WEEX:l.on(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}},off:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:case i.APP_TYPE.WEBVIEW_IN_MINIAPP:c.off(e,t);break;case i.APP_TYPE.WEEX:l.off(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(2),i=n(178),a=n(5),s=n(3),d=n(179);r.ddSdk.setPlatform({platform:o.ENV_ENUM.pc,bridgeInit:function(){switch(o.getENV().appType){case s.APP_TYPE.MINI_APP:return Promise.resolve(a.default);default:return i.h5PcBridgeInit().then(function(){return i.default})}},authMethod:"config",authParamsDeal:function(e){var t=Object.assign({},e);return t.url=window.location.href.split("#")[0],t},event:{on:function(e,t){if(o.getENV().appType===s.APP_TYPE.WEB)return d.on(e,t)},off:function(e,t){if(o.getENV().appType===s.APP_TYPE.WEB)return d.off(e,t)}}})},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){_&&v&&(_=!1,v.length?p=v.concat(p):E=-1,p.length&&s())}function s(){if(!_){var e=o(a);_=!0;for(var t=p.length;t;){for(v=p,p=[];++E1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(196),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(7))},,function(e,t,n){"use strict";var r=n(175),o=n(665),i=Object.assign(r,o.apiObj);e.exports=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(13),i=n(14),a=n(15),s=n(16),d=n(17),u=n(18),c=n(19),l=n(20),f=n(21),v=n(22),p=n(23),_=n(24),E=n(25),N=n(26),P=n(27),M=n(28),h=n(29),m=n(30),k=n(31),b=n(32),g=n(33),I=n(34),y=n(35),A=n(36),S=n(37),V=n(38),U=n(39),O=n(40),j=n(41),$=n(42),w=n(43),D=n(44),C=n(45),T=n(46),W=n(47),R=n(48),x=n(49),F=n(50),L=n(51),B=n(52),z=n(53),q=n(54),Y=n(55),J=n(56),G=n(57),H=n(58),X=n(59),K=n(60),Q=n(61),Z=n(62),ee=n(63),te=n(64),ne=n(65),re=n(66),oe=n(67),ie=n(68),ae=n(69),se=n(70),de=n(71),ue=n(72),ce=n(73),le=n(74),fe=n(75),ve=n(76),pe=n(77),_e=n(78),Ee=n(79),Ne=n(80),Pe=n(81),Me=n(82),he=n(83),me=n(84),ke=n(85),be=n(86),ge=n(87),Ie=n(88),ye=n(89),Ae=n(90),Se=n(91),Ve=n(92),Ue=n(93),Oe=n(94),je=n(95),$e=n(96),we=n(97),De=n(98),Ce=n(99),Te=n(100),We=n(101),Re=n(102),xe=n(103),Fe=n(104),Le=n(105),Be=n(106),ze=n(107),qe=n(108),Ye=n(109),Je=n(110),Ge=n(111),He=n(112),Xe=n(113),Ke=n(114),Qe=n(115),Ze=n(116),et=n(117),tt=n(118),nt=n(119),rt=n(120),ot=n(121),it=n(122),at=n(123),st=n(124),dt=n(125),ut=n(126),ct=n(127),lt=n(128),ft=n(129),vt=n(130),pt=n(131),_t=n(132),Et=n(133),Nt=n(134),Pt=n(135),Mt=n(136),ht=n(137),mt=n(138),kt=n(139),bt=n(140),gt=n(141),It=n(142),yt=n(143),At=n(144),St=n(145),Vt=n(146),Ut=n(147),Ot=n(148),jt=n(149),$t=n(150),wt=n(151),Dt=n(152),Ct=n(153),Tt=n(154),Wt=n(155),Rt=n(156),xt=n(157),Ft=n(158),Lt=n(159),Bt=n(160),zt=n(161),qt=n(162),Yt=n(163),Jt=n(164),Gt=n(165),Ht=n(166),Xt=n(167),Kt=n(168),Qt=n(169),Zt=n(170),en=n(171),tn=n(172),nn=n(173);t.apiObj={biz:{ATMBle:{beaconPicker:r.beaconPicker$,faceManager:o.faceManager$,punchModePicker:i.punchModePicker$},alipay:{pay:a.pay$},calendar:{chooseDateTime:s.chooseDateTime$,chooseHalfDay:d.chooseHalfDay$,chooseInterval:u.chooseInterval$,chooseOneDay:c.chooseOneDay$},chat:{chooseConversationByCorpId:l.chooseConversationByCorpId$,collectSticker:f.collectSticker$,createSceneGroup:v.createSceneGroup$,getRealmCid:p.getRealmCid$,locationChatMessage:_.locationChatMessage$,openSingleChat:E.openSingleChat$,pickConversation:N.pickConversation$,sendEmotion:P.sendEmotion$,toConversation:M.toConversation$},clipboardData:{setData:h.setData$},conference:{videoConfCall:m.videoConfCall$},contact:{choose:k.choose$,chooseMobileContacts:b.chooseMobileContacts$,complexPicker:g.complexPicker$,createGroup:I.createGroup$,departmentsPicker:y.departmentsPicker$,externalComplexPicker:A.externalComplexPicker$,externalEditForm:S.externalEditForm$,setRule:V.setRule$},cspace:{chooseSpaceDir:U.chooseSpaceDir$,delete:O.delete$,preview:j.preview$,saveFile:$.saveFile$},customContact:{choose:w.choose$,multipleChoose:D.multipleChoose$},ding:{create:C.create$,post:T.post$},event:{notifyWeex:W.notifyWeex$},intent:{fetchData:R.fetchData$},iot:{bind:x.bind$,bindMeetingRoom:F.bindMeetingRoom$,getDeviceProperties:L.getDeviceProperties$,invokeThingService:B.invokeThingService$,queryMeetingRoomList:z.queryMeetingRoomList$,setDeviceProperties:q.setDeviceProperties$,unbind:Y.unbind$},map:{locate:J.locate$,search:G.search$,view:H.view$},media:{compressVideo:X.compressVideo$},microApp:{openApp:K.openApp$},navigation:{close:Q.close$,goBack:Z.goBack$,hideBar:ee.hideBar$,quit:te.quit$,replace:ne.replace$,setIcon:re.setIcon$,setLeft:oe.setLeft$,setMenu:ie.setMenu$,setRight:ae.setRight$,setTitle:se.setTitle$},realm:{subscribe:de.subscribe$,unsubscribe:ue.unsubscribe$},shortCut:{addShortCut:ce.addShortCut$},store:{closeUnpayOrder:le.closeUnpayOrder$,createOrder:fe.createOrder$,getPayUrl:ve.getPayUrl$,inquiry:pe.inquiry$},telephone:{call:_e.call$,checkBizCall:Ee.checkBizCall$,quickCallList:Ne.quickCallList$,showCallMenu:Pe.showCallMenu$},user:{checkPassword:Me.checkPassword$,get:he.get$},util:{chosen:me.chosen$,datepicker:ke.datepicker$,datetimepicker:be.datetimepicker$,decrypt:ge.decrypt$,downloadFile:Ie.downloadFile$,encrypt:ye.encrypt$,isLocalFileExist:Ae.isLocalFileExist$,multiSelect:Se.multiSelect$,open:Ve.open$,openLink:Ue.openLink$,openLocalFile:Oe.openLocalFile$,openModal:je.openModal$,openSlidePanel:$e.openSlidePanel$,presentWindow:we.presentWindow$,previewImage:De.previewImage$,previewVideo:Ce.previewVideo$,scan:Te.scan$,scanCard:We.scanCard$,setScreenBrightnessAndKeepOn:Re.setScreenBrightnessAndKeepOn$,share:xe.share$,startDocSign:Fe.startDocSign$,systemShare:Le.systemShare$,timepicker:Be.timepicker$,uploadAttachment:ze.uploadAttachment$,uploadImage:qe.uploadImage$,uploadImageFromCamera:Ye.uploadImageFromCamera$,ut:Je.ut$},verify:{openBindIDCard:Ge.openBindIDCard$,startAuth:He.startAuth$}},channel:{permission:{requestAuthCode:Xe.requestAuthCode$}},device:{accelerometer:{clearShake:Ke.clearShake$,watchShake:Qe.watchShake$},audio:{download:Ze.download$,onPlayEnd:et.onPlayEnd$,onRecordEnd:tt.onRecordEnd$,pause:nt.pause$,play:rt.play$,resume:ot.resume$,startRecord:it.startRecord$,stop:at.stop$,stopRecord:st.stopRecord$,translateVoice:dt.translateVoice$},base:{getInterface:ut.getInterface$,getPhoneInfo:ct.getPhoneInfo$,getUUID:lt.getUUID$,getWifiStatus:ft.getWifiStatus$},connection:{getNetworkType:vt.getNetworkType$},geolocation:{checkPermission:pt.checkPermission$,get:_t.get$,start:Et.start$,status:Nt.status$,stop:Pt.stop$},launcher:{checkInstalledApps:Mt.checkInstalledApps$,launchApp:ht.launchApp$},nfc:{nfcRead:mt.nfcRead$,nfcStop:kt.nfcStop$,nfcWrite:bt.nfcWrite$},notification:{actionSheet:gt.actionSheet$,alert:It.alert$,confirm:yt.confirm$,extendModal:At.extendModal$,hidePreloader:St.hidePreloader$,modal:Vt.modal$,prompt:Ut.prompt$,showPreloader:Ot.showPreloader$,toast:jt.toast$,vibrate:$t.vibrate$},screen:{insetAdjust:wt.insetAdjust$,resetView:Dt.resetView$,rotateView:Ct.rotateView$}},net:{bjGovApn:{loginGovNet:Tt.loginGovNet$}},runtime:{message:{fetch:Wt.fetch$,post:Rt.post$},permission:{requestAuthCode:xt.requestAuthCode$,requestOperateAuthCode:Ft.requestOperateAuthCode$}},ui:{input:{plain:Lt.plain$},nav:{close:Bt.close$,getCurrentId:zt.getCurrentId$,go:qt.go$,preload:Yt.preload$,recycle:Jt.recycle$},progressBar:{setColors:Gt.setColors$},pullToRefresh:{disable:Ht.disable$,enable:Xt.enable$,stop:Kt.stop$},webViewBounce:{disable:Qt.disable$,enable:Zt.enable$}},util:{domainStorage:{getItem:en.getItem$,removeItem:tn.removeItem$,setItem:nn.setItem$}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(199)}])}); \ No newline at end of file diff --git a/src/main/web/.eslintrc b/src/main/web/.eslintrc new file mode 100644 index 0000000..a39ab29 --- /dev/null +++ b/src/main/web/.eslintrc @@ -0,0 +1,182 @@ +{ + "extends": "eslint:recommended", + "plugins": [ + "mocha" + ], + "rules": { + // 声明 + "no-use-before-define": "error", + //禁止定义前使用 + + // 对象 + "no-dupe-keys": "error", + // 禁止在对象字面量中出现重复的键 + "quote-props": [ + "error", + "as-needed" + ], + // 对象属性只在需要的时候加引号 + + // 字符串 + "quotes": [ + "error", + "double", + { + "allowTemplateLiterals": true + } + ], + // 字符串开头和结束使用双引号 + "no-useless-concat": "error", + // 禁止没有必要的字符拼接 + "no-useless-escape": "error", + // 禁用不必要的转义 + + // 函数 + "no-dupe-args": "error", + // 禁止在 function 定义中出现重复的参数 + "space-before-function-paren": "error", + // 函数括号前必须要有空格 + + // 变量 + "no-undef": "error", + // 禁止使用未声明的变量 + + // 比较运算符 & 相等运算符 + "eqeqeq": "error", + // 使用 === 和 !== 代替 == 和 != + "no-unneeded-ternary": "error", + //禁止可以在有更简单的可替代的表达式时使用三元操作符 + + // 条件 + "default-case": "error", + // 要求 Switch 语句中有 Default 分支 + "no-else-return": "error", + // 如果 if 块中包含了一个 return 语句,else 块就成了多余的了。可以将其内容移至块外 + + // 代码块 + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + // 代码块左括号紧跟上一行结束 + "curly": [ + "error", + "multi-line" + ], + // if、else if、else、for、while强制使用大括号,但允许在单行中省略大括号 + + // 注释 + "spaced-comment": "error", + // 注释前有空格 + + // 空白 + "indent": [ + "error", + 4, + { + "SwitchCase": 1 + } + ], + // 缩进控制4空格 + "no-mixed-spaces-and-tabs": "error", + // 禁止使用 空格 和 tab 混合缩进 + "space-before-blocks": [ + "error", + "always" + ], + // 语句块之前的需要有空格 + "space-infix-ops": [ + "error", + { + "int32Hint": false + } + ], + // 要求中缀操作符周围有空格,设置 int32Hint 选项为 true (默认 false) 允许 a|0 不带空格 + "no-trailing-spaces": [ + "error", + { + "skipBlankLines": true + } + ], + // 禁用行尾空格 + "key-spacing": [ + "error", + { + "afterColon": true + } + ], + // 要求在对象字面量的冒号和值之间存在至少有一个空格 + + + // 逗号 + "comma-style": "error", + // 逗号必须放在行末 + "comma-dangle": [ + "error", + "never" + ], + // 多行对象字面量中要求不要拖尾逗号 + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + //在变量声明、数组字面量、对象字面量、函数参数 和 序列中禁止在逗号前使用空格,要求在逗号后使用一个或多个空格 + + + // 分号 + "semi": "error", + //不得省略语句结束的分号 + "semi-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + //禁止分号周围的空格 + "no-extra-semi": "error", + // 禁用不必要的分号 + + + // 类型转换 + "no-extra-boolean-cast": "error", + // 禁止不必要的布尔类型转换 + + + // 其他最佳实践或规范 + "no-unexpected-multiline": "error", + // 禁止使用令人困惑的多行表达式 + "no-unreachable": "error", + // 禁止在 return、throw、continue 和 break 语句后出现不可达代码 + "valid-typeof": "error", + // 强制 typeof 表达式与有效的字符串进行比较 + "no-new-wrappers": "error", + // 禁止通过 new 操作符使用 String、Number 和 Boolean + + "mocha/no-exclusive-tests": "error" + }, + "globals": { + "window": true, + "$": true, + "WebUI": true, + "BI": true, + "BICst": true, + "Data": true, + "Fix": true, + "module": true, + "Dec": true, + "DecCst": true, + "FS": true, + "NProgress": true, + "describe": true, + "before": true, + "it": true, + "expect": true + } +} \ No newline at end of file diff --git a/src/main/web/.gitignore b/src/main/web/.gitignore new file mode 100644 index 0000000..01d6878 --- /dev/null +++ b/src/main/web/.gitignore @@ -0,0 +1,10 @@ +/.vscode +/node_modules +.idea/workspace.xml +.idea/vcs.xml +.idea/modules.xml +.idea/ +/css/ +/src/css/ +/dist/**/*.js +/dist/**/*.css \ No newline at end of file diff --git a/src/main/web/README.md b/src/main/web/README.md new file mode 100644 index 0000000..0af5827 --- /dev/null +++ b/src/main/web/README.md @@ -0,0 +1,45 @@ +# 平台插件基础工程 + +## 下载运行 + +```sh +# 安装 +git clone https://git.fanruan.com/frank.qiu/plugin-template-simple.git + +cd plugin-template-simple + +# 如果没有全局安装gulp,需要先npm install -g gulp在全局安装gulp +npm install + +# 安装完成之后直接运行 +npm run dev +``` + +## 配置 + +### 修改代理服务器 +目前前端工程是通过代理访问到后台资源的,需要根据实际情况修改gulpfile中的代理设置。 +```js +// 配置代理 +proxy("/webroot/decision", { + // 服务器路径 + target: "http://localhost:8075", + changeOrigin: true +}) +``` + +### 配置插件 + +通过修改`start.js`来替换对应的组件,修改`config.js`来配置组件。具体可以查看fineui插件开发文档。 + + +## 如何使用 + +前端页面开发完成之后,这个时候需要把js和css文件放到插件当中,需要做的就是把文件合并压缩,复制到插件对应位置。 + +```sh +# 合并、压缩 +npm run build + +# 在dist文件夹中会生成js/plugin.min.js和css/plugin.min.css。复制即可 +``` diff --git a/src/main/web/config.json b/src/main/web/config.json new file mode 100644 index 0000000..9a57588 --- /dev/null +++ b/src/main/web/config.json @@ -0,0 +1,106 @@ +{ + "dev": { + "dingTalkJs": { + "src": [ + "src/entry.js", + "src/modules/util/**/*.js", + "src/modules/module/**/*.js", + "src/modules/entry/**/*.js", + "src/modules/schedule/**/*.js" + ], + "dest": "dingtalk.js" + }, + "dingTalkScheduleJs": { + "src": [ + "src/modules/util/dingtalk.ajax.util.js", + "src/modules/module/constants/errorcode.js", + "src/modules/module/combo/combo.chat.group*.js", + "src/modules/schedule/**/*.js" + ], + "dest": "dingtalk.schedule.terminal.js" + }, + "dingTalkCustomApi": { + "src": [ + "src/modules/lib/sha.util.js", + "src/modules/jsapi/dingtalk.jsapi.js", + "src/modules/jsapi/dingtalk.config.jsapi.list.js", + "src/modules/jsapi/dingtalk.custom.api.js" + ], + "dest": "dingtalk.custom.api.js" + }, + "dingTalkSingleLoginJs": { + "src": [ + "src/modules/single/login/dingtalk.single.login.js", + "src/modules/jsapi/dingtalk.jsapi.js" + ], + "dest": "dingtalk.single.login.js" + }, + "dingTalkUtilJs": { + "src": [ + "src/modules/util/**/*.js" + ], + "dest": "dingtalk.util.js" + }, + "dingTalkConstants": { + "src": [ + "src/modules/module/constants/*.js" + ], + "dest": "dingtalk.constants.js" + }, + "less": { + "src": [ + "src/modules/style/*.less" + ], + "dest": "src/css" + }, + "css": { + "src": [ + "src/css/**/*.css" + ], + "dest": "css/dingtalk.css" + } + }, + "min": { + "js": { + "src": [ + "src/entry.js", + "src/modules/util/**/*.js", + "src/modules/module/**/*.js", + "src/modules/entry/**/*.js", + "src/modules/schedule/**/*.js" + ] + }, + "dingtalkSchedule": { + "src": [ + "src/modules/util/dingtalk.ajax.util.js", + "src/modules/module/constants/errorcode.js", + "src/modules/module/combo/combo.chat.group*.js", + "src/modules/schedule/**/*.js" + ] + }, + "dingTalkCustomApi": { + "src": [ + "src/modules/lib/sha.util.js", + "src/modules/jsapi/dingtalk.jsapi.js", + "src/modules/jsapi/dingtalk.config.jsapi.list.js", + "src/modules/jsapi/dingtalk.custom.api.js" + ] + }, + "dingTalkSingleLogin": { + "src": [ + "src/modules/single/login/dingtalk.single.login.js", + "src/modules/jsapi/dingtalk.jsapi.js" + ] + }, + "dingTalkUtil": { + "src": [ + "src/modules/util/**/*.js" + ] + }, + "dingTalkConstants": { + "src": [ + "src/modules/module/constants/*.js" + ] + } + } +} \ No newline at end of file diff --git a/src/main/web/gulpfile.js b/src/main/web/gulpfile.js new file mode 100644 index 0000000..f4fe286 --- /dev/null +++ b/src/main/web/gulpfile.js @@ -0,0 +1,249 @@ +var gulp = require("gulp"), + minifycss = require("gulp-minify-css"), + concat = require("gulp-concat"), + uglify = require("gulp-uglify"), + rename = require("gulp-rename"), + proxy = require("http-proxy-middleware"), + less = require("gulp-less"), + gutil = require("gulp-util"), + browserSync = require("browser-sync").create(), + clean = require("gulp-clean"), + cached = require("gulp-cached"), + remember = require("gulp-remember"), + header = require("gulp-header"); + +var config = require("./config"); +var pkg = require("./package.json"); +var moment = require("moment"); + +var DEST = "dist"; + +gulp.task("default", function () { + gulp.start(["dev", "serve"]); + gulp.watch("src/**/*.js", ["devjs"]); + gulp.watch("src/**/*.less", ["devcss"]); +}); + + +// 开发 +gulp.task("serve", function () { + browserSync.init({ + server: "./", + notify: false, + middleware: [ + // 配置代理 + proxy("/webroot/decision", { + target: "http://localhost:8075", + changeOrigin: true + }) + ] + }); + gulp.watch("./*.html").on("change", browserSync.reload); +}); + +gulp.task("less2css", ["clean-css"], function () { + return gulp.src(config.dev.less.src) + .pipe(cached("less-cached")) + .pipe(less()) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(remember("less-cached")) + .pipe(gulp.dest(config.dev.less.dest)); +}); + +gulp.task("dev", ["devDingTalkJs", "devcss", "devDingTalkScheduleJs", "devDingTalkCustomApi", "devDingTalkSingleLoginJs", "devDingTalkUtilJs", "devDingTalkConstants"]); + +gulp.task("devcss", ["less2css"], function () { + return gulp.src(config.dev.css.src) + .pipe(concat(config.dev.css.dest)) + .pipe(header("/* <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest(DEST)) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(browserSync.stream()); +}); + +gulp.task("devDingTalkJs", function () { + return gulp.src(config.dev.dingTalkJs.src) + .pipe(concat(config.dev.dingTalkJs.dest)) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest(DEST)) + .pipe(browserSync.stream()); +}); + +gulp.task("devDingTalkScheduleJs", function () { + return gulp.src(config.dev.dingTalkScheduleJs.src) + .pipe(concat(config.dev.dingTalkScheduleJs.dest)) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest(DEST)) + .pipe(browserSync.stream()); +}); + +gulp.task("devDingTalkCustomApi", function () { + return gulp.src(config.dev.dingTalkCustomApi.src) + .pipe(concat(config.dev.dingTalkCustomApi.dest)) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest(DEST)) + .pipe(browserSync.stream()); +}); + +gulp.task("devDingTalkSingleLoginJs", function () { + return gulp.src(config.dev.dingTalkSingleLoginJs.src) + .pipe(concat(config.dev.dingTalkSingleLoginJs.dest)) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest(DEST)) + .pipe(browserSync.stream()); +}); + +gulp.task("devDingTalkUtilJs", function () { + return gulp.src(config.dev.dingTalkUtilJs.src) + .pipe(concat(config.dev.dingTalkUtilJs.dest)) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest(DEST)) + .pipe(browserSync.stream()); +}); + +gulp.task("devDingTalkConstants", function () { + return gulp.src(config.dev.dingTalkConstants.src) + .pipe(concat(config.dev.dingTalkConstants.dest)) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest(DEST)) + .pipe(browserSync.stream()); +}); + +gulp.task("clean-css", function () { + return gulp.src("src/css/**/*.css", {read: false}) + .pipe(clean()); +}); + +// 打包压缩 +gulp.task("min", ["proclean"], function () { + gulp.start(["minifycss", "minifyDingtalk", "minifyDingtalkSchedule", "minifyDingTalkCustomApi", "minifyDingTalkSingleLogin", "minifyDingTalkUtil", "minifyDingTalkConstants"]); +}); + +gulp.task("proclean", function () { + return gulp.src(["dist/js/*.js", "dist/css/*.css"], {read: false}) + .pipe(clean()); +}); + +gulp.task("pro-less2css", function () { + return gulp.src("src/**/*.less") + .pipe(cached("pro-less-cached")) + .pipe(less()) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(remember("pro-less-cached")) + .pipe(gulp.dest("src/css")); +}); + +gulp.task("minifycss", ["pro-less2css"], function () { + return gulp.src("src/css/**/*.css") + .pipe(concat("dingtalk.css")) + .pipe(gulp.dest("dist/css")) + .pipe(rename({suffix: ".min"})) + .pipe(minifycss()) + .pipe(header("/* <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest("dist/css")); +}); + +gulp.task("minifyDingtalk", function () { + return gulp.src(config.min.js.src) + .pipe(concat("dingtalk.js")) + .pipe(gulp.dest("dist/js")) + .pipe(rename({suffix: ".min"})) + .pipe(uglify({ie8: true})) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest("dist/js")); +}); + +gulp.task("minifyDingtalkSchedule", function () { + return gulp.src(config.min.dingtalkSchedule.src) + .pipe(concat("dingtalk.schedule.js")) + .pipe(gulp.dest("dist/js")) + .pipe(rename({suffix: ".min"})) + .pipe(uglify({ie8: true})) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest("dist/js")); +}); + +gulp.task("minifyDingTalkCustomApi", function () { + return gulp.src(config.min.dingtalkSchedule.src) + .pipe(concat("dingtalk.custom.api.js")) + .pipe(gulp.dest("dist/js")) + .pipe(rename({suffix: ".min"})) + .pipe(uglify({ie8: true})) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest("dist/js")); +}); + +gulp.task("minifyDingTalkSingleLogin", function () { + return gulp.src(config.min.dingtalkSchedule.src) + .pipe(concat("dingtalk.single.login.js")) + .pipe(gulp.dest("dist/js")) + .pipe(rename({suffix: ".min"})) + .pipe(uglify({ie8: true})) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest("dist/js")); +}); + +gulp.task("minifyDingTalkUtil", function () { + return gulp.src(config.min.dingtalkSchedule.src) + .pipe(concat("dingtalk.util.js")) + .pipe(gulp.dest("dist/js")) + .pipe(rename({suffix: ".min"})) + .pipe(uglify({ie8: true})) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest("dist/js")); +}); + +gulp.task("minifyDingTalkConstants", function () { + return gulp.src(config.min.dingtalkSchedule.src) + .pipe(concat("dingtalk.constants.js")) + .pipe(gulp.dest("dist/js")) + .pipe(rename({suffix: ".min"})) + .pipe(uglify({ie8: true})) + .on("error", function (err) { + gutil.log(gutil.colors.red("[Error]"), err.toString()); + }) + .pipe(header("/** <%= name %> <%= time %> */\n", {name: pkg.name, time: moment().format("YY-MM-DD HH:mm:ss")})) + .pipe(gulp.dest("dist/js")); +}); \ No newline at end of file diff --git a/src/main/web/index.html b/src/main/web/index.html new file mode 100644 index 0000000..caa0a4c --- /dev/null +++ b/src/main/web/index.html @@ -0,0 +1,54 @@ + + + + + + + 插件DEMO + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/web/package-lock.json b/src/main/web/package-lock.json new file mode 100644 index 0000000..743f97c --- /dev/null +++ b/src/main/web/package-lock.json @@ -0,0 +1,7740 @@ +{ + "name": "decision-simple-fineui-plugin", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "http://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.0.0.tgz", + "integrity": "sha1-BuKrGb21NThVWaq7W6WXKUgoAPg=", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "http://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.0.0.tgz", + "integrity": "sha1-9xDDjI1Fjm3ZogGvtjf8t4HOmeQ=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz", + "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "accepts": { + "version": "1.3.5", + "resolved": "http://registry.npm.taobao.org/accepts/download/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "accord": { + "version": "0.29.0", + "resolved": "http://registry.npm.taobao.org/accord/download/accord-0.29.0.tgz", + "integrity": "sha1-t0HBdtAENcWSnUZt/oz2vukzseQ=", + "dev": true, + "requires": { + "convert-source-map": "^1.5.0", + "glob": "^7.0.5", + "indx": "^0.2.3", + "lodash.clone": "^4.3.2", + "lodash.defaults": "^4.0.1", + "lodash.flatten": "^4.2.0", + "lodash.merge": "^4.4.0", + "lodash.partialright": "^4.1.4", + "lodash.pick": "^4.2.1", + "lodash.uniq": "^4.3.0", + "resolve": "^1.5.0", + "semver": "^5.3.0", + "uglify-js": "^2.8.22", + "when": "^3.7.8" + } + }, + "acorn": { + "version": "5.7.3", + "resolved": "http://registry.npm.taobao.org/acorn/download/acorn-5.7.3.tgz", + "integrity": "sha1-Z6ojG/iBKXS4UjWpZ3Hra9B+onk=", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "http://registry.npm.taobao.org/acorn/download/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "after": { + "version": "0.8.2", + "resolved": "http://registry.npm.taobao.org/after/download/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "dev": true + }, + "ajv": { + "version": "5.5.2", + "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/align-text/download/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/ansi-colors/download/ansi-colors-1.1.0.tgz", + "integrity": "sha1-Y3S03V1HGP884npnGjscrQdxMqk=", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/ansi-cyan/download/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "http://registry.npm.taobao.org/ansi-escapes/download/ansi-escapes-3.2.0.tgz", + "integrity": "sha1-h4C5j/nb9WOBUtHx/lwde0RCl2s=", + "dev": true + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/ansi-gray/download/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/ansi-red/download/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/ansi-wrap/download/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", + "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "micromatch": { + "version": "3.1.10", + "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "archy": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/archy/download/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "http://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/array-differ/download/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/array-each/download/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/array-slice/download/array-slice-1.1.0.tgz", + "integrity": "sha1-42jqFfibxwaff/uJrsOmx9SsItQ=", + "dev": true + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "http://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "http://registry.npm.taobao.org/arraybuffer.slice/download/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha1-O7xCdd1YTMGxCAm4nU6LY6aednU=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "http://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true, + "optional": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz", + "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/astral-regex/download/astral-regex-1.0.0.tgz", + "integrity": "sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "http://registry.npm.taobao.org/async/download/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "async-each": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/async-each/download/async-each-1.0.2.tgz", + "integrity": "sha1-i4p8oqZY+Sfp8wfW0aQvQZnw9zU=", + "dev": true + }, + "async-each-series": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/async-each-series/download/async-each-series-0.1.1.tgz", + "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", + "dev": true + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.0.tgz", + "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true, + "optional": true + }, + "atob": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz", + "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz", + "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=", + "dev": true, + "optional": true + }, + "axios": { + "version": "0.17.1", + "resolved": "http://registry.npm.taobao.org/axios/download/axios-0.17.1.tgz", + "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", + "dev": true, + "requires": { + "follow-redirects": "^1.2.5", + "is-buffer": "^1.1.5" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "http://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "backo2": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/backo2/download/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "http://registry.npm.taobao.org/base/download/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "http://registry.npm.taobao.org/base64-arraybuffer/download/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "base64id": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/base64id/download/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/batch/download/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/beeper/download/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "better-assert": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/better-assert/download/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "dev": true, + "requires": { + "callsite": "1.0.0" + } + }, + "binary-extensions": { + "version": "1.13.0", + "resolved": "http://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.0.tgz", + "integrity": "sha1-lSPgATBqMkRLkHQj8d4hZCIvarE=", + "dev": true + }, + "binaryextensions": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/binaryextensions/download/binaryextensions-2.1.2.tgz", + "integrity": "sha1-yDw9dCM7p2dOTzE8sqK3D1TpS3w=", + "dev": true + }, + "blob": { + "version": "0.0.5", + "resolved": "http://registry.npm.taobao.org/blob/download/blob-0.0.5.tgz", + "integrity": "sha1-1oDu7yX4zZGtUz9bAe7UjmTK9oM=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "http://registry.npm.taobao.org/boom/download/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "optional": true, + "requires": { + "hoek": "2.x.x" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "http://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "browser-sync": { + "version": "2.26.3", + "resolved": "http://registry.npm.taobao.org/browser-sync/download/browser-sync-2.26.3.tgz", + "integrity": "sha1-G1m9WTWTilsPpzs9eO8QUL0r+RI=", + "dev": true, + "requires": { + "browser-sync-client": "^2.26.2", + "browser-sync-ui": "^2.26.2", + "bs-recipes": "1.3.4", + "bs-snippet-injector": "^2.0.1", + "chokidar": "^2.0.4", + "connect": "3.6.6", + "connect-history-api-fallback": "^1", + "dev-ip": "^1.0.1", + "easy-extender": "^2.3.4", + "eazy-logger": "^3", + "etag": "^1.8.1", + "fresh": "^0.5.2", + "fs-extra": "3.0.1", + "http-proxy": "1.15.2", + "immutable": "^3", + "localtunnel": "1.9.1", + "micromatch": "2.3.11", + "opn": "5.3.0", + "portscanner": "2.1.1", + "qs": "6.2.3", + "raw-body": "^2.3.2", + "resp-modifier": "6.0.2", + "rx": "4.1.0", + "send": "0.16.2", + "serve-index": "1.9.1", + "serve-static": "1.13.2", + "server-destroy": "1.0.1", + "socket.io": "2.1.1", + "ua-parser-js": "0.7.17", + "yargs": "6.4.0" + } + }, + "browser-sync-client": { + "version": "2.26.2", + "resolved": "http://registry.npm.taobao.org/browser-sync-client/download/browser-sync-client-2.26.2.tgz", + "integrity": "sha1-3QBwyAvcbZAh6J94N+5w7QqKz5E=", + "dev": true, + "requires": { + "etag": "1.8.1", + "fresh": "0.5.2", + "mitt": "^1.1.3", + "rxjs": "^5.5.6" + } + }, + "browser-sync-ui": { + "version": "2.26.2", + "resolved": "http://registry.npm.taobao.org/browser-sync-ui/download/browser-sync-ui-2.26.2.tgz", + "integrity": "sha1-odjhB8/tWEnXfju9hK5dVmvrTqA=", + "dev": true, + "requires": { + "async-each-series": "0.1.1", + "connect-history-api-fallback": "^1", + "immutable": "^3", + "server-destroy": "1.0.1", + "socket.io-client": "^2.0.4", + "stream-throttle": "^0.1.3" + } + }, + "bs-recipes": { + "version": "1.3.4", + "resolved": "http://registry.npm.taobao.org/bs-recipes/download/bs-recipes-1.3.4.tgz", + "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=", + "dev": true + }, + "bs-snippet-injector": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/bs-snippet-injector/download/bs-snippet-injector-2.0.1.tgz", + "integrity": "sha1-YbU5PxH1JVntEgaTEANDtu2wTdU=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz", + "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=", + "dev": true + }, + "bufferstreams": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/bufferstreams/download/bufferstreams-1.0.1.tgz", + "integrity": "sha1-z7GtlWjTujz+k1upq92VLeiKqyo=", + "dev": true, + "requires": { + "readable-stream": "^1.0.33" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caller-path": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/caller-path/download/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/callsite/download/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "dev": true + }, + "callsites": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/callsites/download/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/center-align/download/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "http://registry.npm.taobao.org/chardet/download/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chokidar": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/chokidar/download/chokidar-2.1.2.tgz", + "integrity": "sha1-nCPqQLAWOEOeBROGTTYq6sxa0Fg=", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.0" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "http://registry.npm.taobao.org/circular-json/download/circular-json-0.3.3.tgz", + "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "http://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "3.4.28", + "resolved": "http://registry.npm.taobao.org/clean-css/download/clean-css-3.4.28.tgz", + "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=", + "dev": true, + "requires": { + "commander": "2.8.x", + "source-map": "0.4.x" + }, + "dependencies": { + "commander": { + "version": "2.8.1", + "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.8.1.tgz", + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "source-map": { + "version": "0.4.4", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/cli-width/download/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "http://registry.npm.taobao.org/cliui/download/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "1.0.4", + "resolved": "http://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/clone-buffer/download/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/clone-stats/download/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/cloneable-readable/download/cloneable-readable-1.1.2.tgz", + "integrity": "sha1-1ZHe5Kj4vBXaQ86X3O66E9Q+KmU=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "co": { + "version": "4.6.0", + "resolved": "http://registry.npm.taobao.org/co/download/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", + "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-support": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/color-support/download/color-support-1.1.3.tgz", + "integrity": "sha1-k4NDeaHMmgxh+C9S8NBDIiUb1aI=", + "dev": true + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.7.tgz", + "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=", + "dev": true, + "optional": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.19.0", + "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz", + "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So=", + "dev": true + }, + "component-bind": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/component-bind/download/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "http://registry.npm.taobao.org/component-emitter/download/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "http://registry.npm.taobao.org/component-inherit/download/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "http://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz", + "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/concat-with-sourcemaps/download/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha1-1OqT8FriV5CVG5nns7CeOQikCC4=", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "connect": { + "version": "3.6.6", + "resolved": "http://registry.npm.taobao.org/connect/download/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "http://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "http://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.6.0.tgz", + "integrity": "sha1-UbU3qMQ+DwTewZk7/83VBOdYrCA=", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.3.1", + "resolved": "http://registry.npm.taobao.org/cookie/download/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "http://registry.npm.taobao.org/cryptiles/download/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.x.x" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/dateformat/download/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "optional": true + }, + "depd": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "deprecated": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/deprecated/download/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "destroy": { + "version": "1.0.4", + "resolved": "http://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/detect-file/download/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "dev-ip": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/dev-ip/download/dev-ip-1.0.1.tgz", + "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=", + "dev": true + }, + "doctrine": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/doctrine/download/doctrine-2.1.0.tgz", + "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "http://registry.npm.taobao.org/duplexer2/download/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "easy-extender": { + "version": "2.3.4", + "resolved": "http://registry.npm.taobao.org/easy-extender/download/easy-extender-2.3.4.tgz", + "integrity": "sha1-KYeJtk+aq6Yhacd6KztktMlYm48=", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "eazy-logger": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/eazy-logger/download/eazy-logger-3.0.2.tgz", + "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", + "dev": true, + "requires": { + "tfunk": "^3.0.1" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "editions": { + "version": "1.3.4", + "resolved": "http://registry.npm.taobao.org/editions/download/editions-1.3.4.tgz", + "integrity": "sha1-NmLLWSNHwxaOuOSYoP9zJx1n9Qs=", + "dev": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "http://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz", + "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "http://registry.npm.taobao.org/end-of-stream/download/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "~1.3.0" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "http://registry.npm.taobao.org/once/download/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1" + } + } + } + }, + "engine.io": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/engine.io/download/engine.io-3.2.1.tgz", + "integrity": "sha1-tgKBw1SEpw7gNR6g6/+D7IyVIqI=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "ws": "~3.3.1" + }, + "dependencies": { + "ws": { + "version": "3.3.3", + "resolved": "http://registry.npm.taobao.org/ws/download/ws-3.3.3.tgz", + "integrity": "sha1-8c+E/i1ekB686U767OeF8YeiKPI=", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } + } + }, + "engine.io-client": { + "version": "3.3.2", + "resolved": "http://registry.npm.taobao.org/engine.io-client/download/engine.io-client-3.3.2.tgz", + "integrity": "sha1-BOBoeY11vtoUN1omS7PXQte8M6o=", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~6.1.0", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + } + }, + "engine.io-parser": { + "version": "2.1.3", + "resolved": "http://registry.npm.taobao.org/engine.io-parser/download/engine.io-parser-2.1.3.tgz", + "integrity": "sha1-dXq5cPvy37Mse3SwMyFtVznveaY=", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "http://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz", + "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", + "dev": true, + "optional": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "http://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz", + "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "4.19.1", + "resolved": "http://registry.npm.taobao.org/eslint/download/eslint-4.19.1.tgz", + "integrity": "sha1-MtHWU+HZBAiFS/spbwdux+GGowA=", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.4", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", + "table": "4.0.2", + "text-table": "~0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "eslint-plugin-mocha": { + "version": "5.3.0", + "resolved": "http://registry.npm.taobao.org/eslint-plugin-mocha/download/eslint-plugin-mocha-5.3.0.tgz", + "integrity": "sha1-zz6xiuDkTkM673FZY3CVp8sZsVs=", + "dev": true, + "requires": { + "ramda": "^0.26.1" + } + }, + "eslint-scope": { + "version": "3.7.3", + "resolved": "http://registry.npm.taobao.org/eslint-scope/download/eslint-scope-3.7.3.tgz", + "integrity": "sha1-u1ByANPRf2AkdjYWC0gmKEsQhTU=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/eslint-utils/download/eslint-utils-1.3.1.tgz", + "integrity": "sha1-moUbqJ7nxGA0b5fPiTnHKYgn5RI=", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", + "dev": true + }, + "espree": { + "version": "3.5.4", + "resolved": "http://registry.npm.taobao.org/espree/download/espree-3.5.4.tgz", + "integrity": "sha1-sPRHGHyKi+2US4FaZgvd9d610ac=", + "dev": true, + "requires": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "http://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz", + "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/esquery/download/esquery-1.0.1.tgz", + "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "http://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "http://registry.npm.taobao.org/estraverse/download/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "http://registry.npm.taobao.org/esutils/download/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "http://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eventemitter3": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/eventemitter3/download/eventemitter3-1.2.0.tgz", + "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "http://registry.npm.taobao.org/expand-range/download/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "http://registry.npm.taobao.org/fill-range/download/fill-range-2.2.4.tgz", + "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "http://registry.npm.taobao.org/expand-tilde/download/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz", + "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/external-editor/download/external-editor-2.2.0.tgz", + "integrity": "sha1-BFURz9jRM/OEZnPRBHwVTiFK09U=", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "http://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "optional": true + }, + "fancy-log": { + "version": "1.3.3", + "resolved": "http://registry.npm.taobao.org/fancy-log/download/fancy-log-1.3.3.tgz", + "integrity": "sha1-28GRVPVYaQFQojlToK29A1vkX8c=", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/figures/download/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/find-index/download/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/findup-sync/download/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "fined": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/fined/download/fined-1.1.1.tgz", + "integrity": "sha1-ldiP8ykSPdGmlQ/fzTIfdGJx4B8=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/first-chunk-stream/download/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/flagged-respawn/download/flagged-respawn-1.0.1.tgz", + "integrity": "sha1-595vEnnd2cqarIpZcdYYYGs6q0E=", + "dev": true + }, + "flat-cache": { + "version": "1.3.4", + "resolved": "http://registry.npm.taobao.org/flat-cache/download/flat-cache-1.3.4.tgz", + "integrity": "sha1-LC73dSXMKSkAff/6HdMUqpyd7m8=", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/flatted/download/flatted-2.0.0.tgz", + "integrity": "sha1-VRIrZTbqSWtLRIk+4mCBQdENmRY=", + "dev": true + }, + "follow-redirects": { + "version": "1.7.0", + "resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.7.0.tgz", + "integrity": "sha1-SJ68GY3A5/ZBZ70jsDxMGbV4THY=", + "dev": true, + "requires": { + "debug": "^3.2.6" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz", + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", + "dev": true + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "http://registry.npm.taobao.org/for-own/download/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "http://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz", + "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "http://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs-extra": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/fs-extra/download/fs-extra-3.0.1.tgz", + "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^3.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.7", + "resolved": "http://registry.npm.taobao.org/fsevents/download/fsevents-1.2.7.tgz", + "integrity": "sha1-SFG2ZKN4PlIAOzxm6w7uEHSTOqQ=", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gaze": { + "version": "0.5.2", + "resolved": "http://registry.npm.taobao.org/gaze/download/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "~0.1.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz", + "integrity": "sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "http://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "http://registry.npm.taobao.org/glob/download/glob-7.1.3.tgz", + "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "http://registry.npm.taobao.org/glob-base/download/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/glob-parent/download/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "http://registry.npm.taobao.org/glob-stream/download/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "^4.3.1", + "glob2base": "^0.0.12", + "minimatch": "^2.0.1", + "ordered-read-streams": "^0.1.0", + "through2": "^0.6.1", + "unique-stream": "^1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "http://registry.npm.taobao.org/glob/download/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "minimatch": { + "version": "2.0.10", + "resolved": "http://registry.npm.taobao.org/minimatch/download/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "http://registry.npm.taobao.org/through2/download/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "http://registry.npm.taobao.org/glob-watcher/download/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "^0.5.1" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "http://registry.npm.taobao.org/glob2base/download/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "^0.1.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/global-modules/download/global-modules-1.0.0.tgz", + "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/global-prefix/download/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "11.11.0", + "resolved": "http://registry.npm.taobao.org/globals/download/globals-11.11.0.tgz", + "integrity": "sha1-3Pk3V/ot5Uhvvu1xGFOK33ienC4=", + "dev": true + }, + "globule": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/globule/download/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "http://registry.npm.taobao.org/glob/download/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/inherits/download/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "lodash": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "http://registry.npm.taobao.org/lru-cache/download/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "http://registry.npm.taobao.org/minimatch/download/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "glogg": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/glogg/download/glogg-1.0.2.tgz", + "integrity": "sha1-LX3XAr7aIus7/634gGltpthGMT8=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.15.tgz", + "integrity": "sha1-/7cD4QZuig7qpMi4C6klPu77+wA=", + "dev": true + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/graceful-readlink/download/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "http://registry.npm.taobao.org/gulp/download/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "^1.0.0", + "chalk": "^1.0.0", + "deprecated": "^0.0.1", + "gulp-util": "^3.0.0", + "interpret": "^1.0.0", + "liftoff": "^2.1.0", + "minimist": "^1.1.0", + "orchestrator": "^0.3.0", + "pretty-hrtime": "^1.0.0", + "semver": "^4.1.0", + "tildify": "^1.0.0", + "v8flags": "^2.0.2", + "vinyl-fs": "^0.3.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "http://registry.npm.taobao.org/semver/download/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + } + } + }, + "gulp-cached": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/gulp-cached/download/gulp-cached-1.1.1.tgz", + "integrity": "sha1-/nzU+H83YB5gc8/t7lwr2vi2rM4=", + "dev": true, + "requires": { + "lodash.defaults": "^4.2.0", + "through2": "^2.0.1" + } + }, + "gulp-clean": { + "version": "0.4.0", + "resolved": "http://registry.npm.taobao.org/gulp-clean/download/gulp-clean-0.4.0.tgz", + "integrity": "sha1-O8JecITmQbvXveBXz5DAHFDZWVA=", + "dev": true, + "requires": { + "fancy-log": "^1.3.2", + "plugin-error": "^0.1.2", + "rimraf": "^2.6.2", + "through2": "^2.0.3", + "vinyl": "^2.1.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/clone-stats/download/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/replace-ext/download/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/vinyl/download/vinyl-2.2.0.tgz", + "integrity": "sha1-2FsH2pbkWNJbL/4Z/s6fLKoT7YY=", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "gulp-concat": { + "version": "2.6.1", + "resolved": "http://registry.npm.taobao.org/gulp-concat/download/gulp-concat-2.6.1.tgz", + "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=", + "dev": true, + "requires": { + "concat-with-sourcemaps": "^1.0.0", + "through2": "^2.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/clone-stats/download/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/replace-ext/download/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/vinyl/download/vinyl-2.2.0.tgz", + "integrity": "sha1-2FsH2pbkWNJbL/4Z/s6fLKoT7YY=", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "gulp-eslint": { + "version": "5.0.0", + "resolved": "http://registry.npm.taobao.org/gulp-eslint/download/gulp-eslint-5.0.0.tgz", + "integrity": "sha1-KiaECV93Syz3kxAmIHjFbMehK1I=", + "dev": true, + "requires": { + "eslint": "^5.0.1", + "fancy-log": "^1.3.2", + "plugin-error": "^1.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.1.1", + "resolved": "http://registry.npm.taobao.org/acorn/download/acorn-6.1.1.tgz", + "integrity": "sha1-fSWuBbuK0fm2mRCOEJTs14hK3B8=", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "http://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.0.1.tgz", + "integrity": "sha1-MqBk/ZJUKSFqCbFBECv90YX65A4=", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-6.10.0.tgz", + "integrity": "sha1-kNDVRDnaWHzX6EO/twRfUL0ivfE=", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "http://registry.npm.taobao.org/chardet/download/chardet-0.7.0.tgz", + "integrity": "sha1-kAlISfCTfy7twkJdDSip5fDLrZ4=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz", + "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/doctrine/download/doctrine-3.0.0.tgz", + "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eslint": { + "version": "5.15.2", + "resolved": "http://registry.npm.taobao.org/eslint/download/eslint-5.15.2.tgz", + "integrity": "sha1-Aje7sjYvifTv/vLxkesP6lJ5wKU=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.12.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "http://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz", + "integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "espree": { + "version": "5.0.1", + "resolved": "http://registry.npm.taobao.org/espree/download/espree-5.0.1.tgz", + "integrity": "sha1-XWUm+k/H8HiKXPdbFfMDI+L4H3o=", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "external-editor": { + "version": "3.0.3", + "resolved": "http://registry.npm.taobao.org/external-editor/download/external-editor-3.0.3.tgz", + "integrity": "sha1-WGbbKal4Jtvkvzr9JAcOrZ6kOic=", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "http://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-5.0.1.tgz", + "integrity": "sha1-yg9u+m3T1WEzP7FFFQZcL6/fQ5w=", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/flat-cache/download/flat-cache-2.0.1.tgz", + "integrity": "sha1-XSltbwS9pEpGMKMBQTvbwuwIXsA=", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz", + "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "http://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz", + "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", + "dev": true + }, + "inquirer": { + "version": "6.2.2", + "resolved": "http://registry.npm.taobao.org/inquirer/download/inquirer-6.2.2.tgz", + "integrity": "sha1-RpQRdvZcnrIIBGJxSbdDohjyVAY=", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.11", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", + "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", + "dev": true + }, + "strip-ansi": { + "version": "5.1.0", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.1.0.tgz", + "integrity": "sha1-VaqlTjO0wGSaczikNDexiH0VPsQ=", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz", + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", + "dev": true + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/plugin-error/download/plugin-error-1.0.1.tgz", + "integrity": "sha1-dwFr2JGdCsN3/c3QMiMolTyleBw=", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/regexpp/download/regexpp-2.0.1.tgz", + "integrity": "sha1-jRnTHPYySCtYkEn4KB+T28uk0H8=", + "dev": true + }, + "rxjs": { + "version": "6.4.0", + "resolved": "http://registry.npm.taobao.org/rxjs/download/rxjs-6.4.0.tgz", + "integrity": "sha1-87sP572n+2nerAwW8XtQsLh5BQQ=", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/slice-ansi/download/slice-ansi-2.1.0.tgz", + "integrity": "sha1-ys12k0YaY3pXiNkqfdT7oGjoFjY=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.2.3", + "resolved": "http://registry.npm.taobao.org/table/download/table-5.2.3.tgz", + "integrity": "sha1-zeDMbrBnUcAJ76sn6Mggyltnt/I=", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", + "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz", + "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.1.0", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.1.0.tgz", + "integrity": "sha1-VaqlTjO0wGSaczikNDexiH0VPsQ=", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "write": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/write/download/write-1.0.3.tgz", + "integrity": "sha1-CADhRSO5I6OH5BUSPIZWFqrg9cM=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + } + } + }, + "gulp-header": { + "version": "2.0.7", + "resolved": "http://registry.npm.taobao.org/gulp-header/download/gulp-header-2.0.7.tgz", + "integrity": "sha1-B1BXQOtDLo0rsq9odEhY2rqvSRs=", + "dev": true, + "requires": { + "concat-with-sourcemaps": "^1.1.0", + "lodash.template": "^4.4.0", + "map-stream": "0.0.7", + "through2": "^2.0.0" + }, + "dependencies": { + "lodash.template": { + "version": "4.4.0", + "resolved": "http://registry.npm.taobao.org/lodash.template/download/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "http://registry.npm.taobao.org/lodash.templatesettings/download/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0" + } + } + } + }, + "gulp-less": { + "version": "4.0.1", + "resolved": "http://registry.npm.taobao.org/gulp-less/download/gulp-less-4.0.1.tgz", + "integrity": "sha1-NIwzpd3nogfFdxsdgmHRrBAhzu0=", + "dev": true, + "requires": { + "accord": "^0.29.0", + "less": "2.6.x || ^3.7.1", + "object-assign": "^4.0.1", + "plugin-error": "^0.1.2", + "replace-ext": "^1.0.0", + "through2": "^2.0.0", + "vinyl-sourcemaps-apply": "^0.2.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "less": { + "version": "3.9.0", + "resolved": "http://registry.npm.taobao.org/less/download/less-3.9.0.tgz", + "integrity": "sha1-t1EcQ/N89X3Iff/ZiD7BISibFHQ=", + "dev": true, + "requires": { + "clone": "^2.1.2", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "mime": "^1.4.1", + "mkdirp": "^0.5.0", + "promise": "^7.1.1", + "request": "^2.83.0", + "source-map": "~0.6.0" + } + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/replace-ext/download/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true, + "optional": true + } + } + }, + "gulp-minify-css": { + "version": "1.2.4", + "resolved": "http://registry.npm.taobao.org/gulp-minify-css/download/gulp-minify-css-1.2.4.tgz", + "integrity": "sha1-thZJV2Auon+eWtiCJ2ld0gV3jAY=", + "dev": true, + "requires": { + "clean-css": "^3.3.3", + "gulp-util": "^3.0.5", + "object-assign": "^4.0.1", + "readable-stream": "^2.0.0", + "vinyl-bufferstream": "^1.0.1", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "gulp-remember": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/gulp-remember/download/gulp-remember-1.0.1.tgz", + "integrity": "sha1-zDqrKgSmI2FDdVccpGTRPodQK/4=", + "dev": true, + "requires": { + "fancy-log": "^1.3.2", + "plugin-error": "^0.1.2", + "through2": "^0.5.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.5.1", + "resolved": "http://registry.npm.taobao.org/through2/download/through2-0.5.1.tgz", + "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", + "dev": true, + "requires": { + "readable-stream": "~1.0.17", + "xtend": "~3.0.0" + } + }, + "xtend": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/xtend/download/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=", + "dev": true + } + } + }, + "gulp-rename": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/gulp-rename/download/gulp-rename-1.4.0.tgz", + "integrity": "sha1-3hxxjnxAla6GH3KW708ySGSCQL0=", + "dev": true + }, + "gulp-replace": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/gulp-replace/download/gulp-replace-1.0.0.tgz", + "integrity": "sha1-syvWFlTZe414Qwpns+jOBnt8kUM=", + "dev": true, + "requires": { + "istextorbinary": "2.2.1", + "readable-stream": "^2.0.1", + "replacestream": "^4.0.0" + } + }, + "gulp-uglify": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/gulp-uglify/download/gulp-uglify-3.0.2.tgz", + "integrity": "sha1-X1sugzf4ecqd7Jcf6xuCpah4ULA=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "extend-shallow": "^3.0.2", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "isobject": "^3.0.1", + "make-error-cause": "^1.1.1", + "safe-buffer": "^5.1.2", + "through2": "^2.0.0", + "uglify-js": "^3.0.5", + "vinyl-sourcemaps-apply": "^0.2.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "uglify-js": { + "version": "3.4.10", + "resolved": "http://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz", + "integrity": "sha1-mtlWPY6zrN+404WX0q8dgV9qdV8=", + "dev": true, + "requires": { + "commander": "~2.19.0", + "source-map": "~0.6.1" + } + } + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "http://registry.npm.taobao.org/gulp-util/download/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/gulplog/download/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "optional": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "http://registry.npm.taobao.org/har-validator/download/har-validator-5.1.3.tgz", + "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=", + "dev": true, + "optional": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-6.10.0.tgz", + "integrity": "sha1-kNDVRDnaWHzX6EO/twRfUL0ivfE=", + "dev": true, + "optional": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true, + "optional": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true, + "optional": true + } + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/has-binary2/download/has-binary2-1.0.3.tgz", + "integrity": "sha1-d3asYn8+p3JQz8My2rfd9eT10R0=", + "dev": true, + "requires": { + "isarray": "2.0.1" + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/has-cors/download/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/has-gulplog/download/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "http://registry.npm.taobao.org/hawk/download/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "http://registry.npm.taobao.org/hoek/download/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true, + "optional": true + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/homedir-polyfill/download/homedir-polyfill-1.0.3.tgz", + "integrity": "sha1-dDKYzvTlrz4ZQWH7rcwhUdOgWOg=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "http://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.7.1.tgz", + "integrity": "sha1-l/I2l3vW4SVAiTD/bePuxigewEc=", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "http://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + } + } + }, + "http-proxy": { + "version": "1.15.2", + "resolved": "http://registry.npm.taobao.org/http-proxy/download/http-proxy-1.15.2.tgz", + "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", + "dev": true, + "requires": { + "eventemitter3": "1.x.x", + "requires-port": "1.x.x" + } + }, + "http-proxy-middleware": { + "version": "0.19.1", + "resolved": "http://registry.npm.taobao.org/http-proxy-middleware/download/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha1-GDx9xKoUeRUDBkmMIQza+WCApDo=", + "dev": true, + "requires": { + "http-proxy": "^1.17.0", + "is-glob": "^4.0.0", + "lodash": "^4.17.11", + "micromatch": "^3.1.10" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/eventemitter3/download/eventemitter3-3.1.0.tgz", + "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=", + "dev": true + }, + "http-proxy": { + "version": "1.17.0", + "resolved": "http://registry.npm.taobao.org/http-proxy/download/http-proxy-1.17.0.tgz", + "integrity": "sha1-etOElGWPhGBeL220Q230EPTlvpo=", + "dev": true, + "requires": { + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.23.tgz", + "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "http://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz", + "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=", + "dev": true + }, + "image-size": { + "version": "0.5.5", + "resolved": "http://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "dev": true, + "optional": true + }, + "immutable": { + "version": "3.8.2", + "resolved": "http://registry.npm.taobao.org/immutable/download/immutable-3.8.2.tgz", + "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/import-fresh/download/import-fresh-3.0.0.tgz", + "integrity": "sha1-o9iX9CDKsOZxI2iX91vBS0iFw5A=", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz", + "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=", + "dev": true + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/indexof/download/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "indx": { + "version": "0.2.3", + "resolved": "http://registry.npm.taobao.org/indx/download/indx-0.2.3.tgz", + "integrity": "sha1-Fdz1bunPZcAjTFE8J/vVgOcPvFA=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "http://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz", + "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", + "dev": true + }, + "inquirer": { + "version": "3.3.0", + "resolved": "http://registry.npm.taobao.org/inquirer/download/inquirer-3.3.0.tgz", + "integrity": "sha1-ndLyrXZdyrH/BEO0kUQqILoifck=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/interpret/download/interpret-1.2.0.tgz", + "integrity": "sha1-1QYaYiS+WOgIOYX1AU2EQ1lXYpY=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-absolute/download/is-absolute-1.0.0.tgz", + "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/is-dotfile/download/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/is-equal-shallow/download/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-like": { + "version": "1.0.8", + "resolved": "http://registry.npm.taobao.org/is-number-like/download/is-number-like-1.0.8.tgz", + "integrity": "sha1-LhKWILUIkQQuROm7uzBZPnXPu+M=", + "dev": true, + "requires": { + "lodash.isfinite": "^3.3.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "http://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/is-posix-bracket/download/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/is-promise/download/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-relative": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-relative/download/is-relative-1.0.0.tgz", + "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz", + "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true, + "optional": true + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-unc-path/download/is-unc-path-1.0.0.tgz", + "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/is-utf8/download/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true, + "optional": true + }, + "istextorbinary": { + "version": "2.2.1", + "resolved": "http://registry.npm.taobao.org/istextorbinary/download/istextorbinary-2.2.1.tgz", + "integrity": "sha1-pSMaCO9t0ismjQiVCEz41Ytb7FM=", + "dev": true, + "requires": { + "binaryextensions": "2", + "editions": "^1.3.3", + "textextensions": "2" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.2", + "resolved": "http://registry.npm.taobao.org/js-yaml/download/js-yaml-3.12.2.tgz", + "integrity": "sha1-7x0GfFqdnLZb1y8oW12BBcd/FPw=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true, + "optional": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/json-stable-stringify/download/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "optional": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true, + "optional": true + }, + "jsonfile": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/jsonfile/download/jsonfile-3.0.1.tgz", + "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "http://registry.npm.taobao.org/jsonify/download/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "http://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "http://registry.npm.taobao.org/lazy-cache/download/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "less": { + "version": "2.7.3", + "resolved": "http://registry.npm.taobao.org/less/download/less-2.7.3.tgz", + "integrity": "sha1-zBJg9RyQCp7A2R+2mYE54CUHtjs=", + "dev": true, + "requires": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "mime": "^1.2.11", + "mkdirp": "^0.5.0", + "promise": "^7.1.1", + "request": "2.81.0", + "source-map": "^0.5.3" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "optional": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "http://registry.npm.taobao.org/form-data/download/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "http://registry.npm.taobao.org/har-validator/download/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "optional": true, + "requires": { + "ajv": "^4.9.1", + "har-schema": "^1.0.5" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/http-signature/download/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true, + "optional": true + }, + "performance-now": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true, + "optional": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true, + "optional": true + }, + "request": { + "version": "2.81.0", + "resolved": "http://registry.npm.taobao.org/request/download/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.3.4.tgz", + "integrity": "sha1-7GDO44rGdQY//JelwYlwV47oNlU=", + "dev": true, + "optional": true, + "requires": { + "punycode": "^1.4.1" + } + } + } + }, + "levn": { + "version": "0.3.0", + "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "liftoff": { + "version": "2.5.0", + "resolved": "http://registry.npm.taobao.org/liftoff/download/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, + "limiter": { + "version": "1.1.4", + "resolved": "http://registry.npm.taobao.org/limiter/download/limiter-1.1.4.tgz", + "integrity": "sha1-h8nDly04n9sLpnpFqtvF0vhBO8E=", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "localtunnel": { + "version": "1.9.1", + "resolved": "http://registry.npm.taobao.org/localtunnel/download/localtunnel-1.9.1.tgz", + "integrity": "sha1-HRc36rZYrdWkAmbY5D84m2Ru47E=", + "dev": true, + "requires": { + "axios": "0.17.1", + "debug": "2.6.9", + "openurl": "1.1.1", + "yargs": "6.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "yargs": { + "version": "6.6.0", + "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.2.0" + } + } + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-4.17.11.tgz", + "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40=", + "dev": true + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/lodash._basecopy/download/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/lodash._basetostring/download/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/lodash._basevalues/download/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "http://registry.npm.taobao.org/lodash._getnative/download/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "http://registry.npm.taobao.org/lodash._isiterateecall/download/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/lodash._reescape/download/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/lodash._reevaluate/download/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/lodash._reinterpolate/download/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/lodash._root/download/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.clone": { + "version": "4.5.0", + "resolved": "http://registry.npm.taobao.org/lodash.clone/download/lodash.clone-4.5.0.tgz", + "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", + "dev": true + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "http://registry.npm.taobao.org/lodash.defaults/download/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "http://registry.npm.taobao.org/lodash.escape/download/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "http://registry.npm.taobao.org/lodash.flatten/download/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/lodash.isarguments/download/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "http://registry.npm.taobao.org/lodash.isarray/download/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.isfinite": { + "version": "3.3.2", + "resolved": "http://registry.npm.taobao.org/lodash.isfinite/download/lodash.isfinite-3.3.2.tgz", + "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "http://registry.npm.taobao.org/lodash.keys/download/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.merge": { + "version": "4.6.1", + "resolved": "http://registry.npm.taobao.org/lodash.merge/download/lodash.merge-4.6.1.tgz", + "integrity": "sha1-rcJdnLmbk5HFliTzefu6YNcRHVQ=", + "dev": true + }, + "lodash.partialright": { + "version": "4.2.1", + "resolved": "http://registry.npm.taobao.org/lodash.partialright/download/lodash.partialright-4.2.1.tgz", + "integrity": "sha1-ATDYDoM2MmTUAHTzKbij56ihzEs=", + "dev": true + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "http://registry.npm.taobao.org/lodash.pick/download/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "http://registry.npm.taobao.org/lodash.restparam/download/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "http://registry.npm.taobao.org/lodash.template/download/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "http://registry.npm.taobao.org/lodash.templatesettings/download/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "http://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz", + "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "http://registry.npm.taobao.org/make-error/download/make-error-1.3.5.tgz", + "integrity": "sha1-7+ToH22yjK3WBccPKcgxtY73dsg=", + "dev": true + }, + "make-error-cause": { + "version": "1.2.2", + "resolved": "http://registry.npm.taobao.org/make-error-cause/download/make-error-cause-1.2.2.tgz", + "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", + "dev": true, + "requires": { + "make-error": "^1.2.0" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/make-iterator/download/make-iterator-1.0.1.tgz", + "integrity": "sha1-KbM/MSqo9UfEpeSQ9Wr87JkTOtY=", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-stream": { + "version": "0.0.7", + "resolved": "http://registry.npm.taobao.org/map-stream/download/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-random": { + "version": "1.0.4", + "resolved": "http://registry.npm.taobao.org/math-random/download/math-random-1.0.4.tgz", + "integrity": "sha1-XdaUPJOFSCZwFtTjTwV1gwgMUUw=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/arr-diff/download/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/array-unique/download/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "http://registry.npm.taobao.org/braces/download/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "http://registry.npm.taobao.org/extglob/download/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "mime": { + "version": "1.4.1", + "resolved": "http://registry.npm.taobao.org/mime/download/mime-1.4.1.tgz", + "integrity": "sha1-Eh+evEnjdm8xGnbh+hyAA8SwOqY=", + "dev": true + }, + "mime-db": { + "version": "1.38.0", + "resolved": "http://registry.npm.taobao.org/mime-db/download/mime-db-1.38.0.tgz", + "integrity": "sha1-GiqrFtqesWe0nG5N8tnGjWPY4q0=", + "dev": true + }, + "mime-types": { + "version": "2.1.22", + "resolved": "http://registry.npm.taobao.org/mime-types/download/mime-types-2.1.22.tgz", + "integrity": "sha1-/ms1WhkJJqt2mMmgVWoRGZshmb0=", + "dev": true, + "requires": { + "mime-db": "~1.38.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/mimic-fn/download/mimic-fn-1.2.0.tgz", + "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mitt": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/mitt/download/mitt-1.1.3.tgz", + "integrity": "sha1-UoxQYjigXc4RzZFKdB6izDMtqbg=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "moment": { + "version": "2.24.0", + "resolved": "http://registry.npm.taobao.org/moment/download/moment-2.24.0.tgz", + "integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multipipe": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/multipipe/download/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.13.1", + "resolved": "http://registry.npm.taobao.org/nan/download/nan-2.13.1.tgz", + "integrity": "sha1-oVvuN5C94kfo848dRG7c2usF8t0=", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "http://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", + "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natives": { + "version": "1.1.6", + "resolved": "http://registry.npm.taobao.org/natives/download/natives-1.1.6.tgz", + "integrity": "sha1-pgO0pJirdxc2ErnqGs3sTZgPALs=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/negotiator/download/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "http://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz", + "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "http://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.5.0.tgz", + "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", + "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz", + "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-component": { + "version": "0.0.3", + "resolved": "http://registry.npm.taobao.org/object-component/download/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-path": { + "version": "0.9.2", + "resolved": "http://registry.npm.taobao.org/object-path/download/object-path-0.9.2.tgz", + "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/object.defaults/download/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/for-own/download/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/object.map/download/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/for-own/download/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "http://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "http://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "openurl": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/openurl/download/openurl-1.1.1.tgz", + "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=", + "dev": true + }, + "opn": { + "version": "5.3.0", + "resolved": "http://registry.npm.taobao.org/opn/download/opn-5.3.0.tgz", + "integrity": "sha1-ZIcVZchjh18FLP31PT48ta21Oxw=", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "http://registry.npm.taobao.org/optionator/download/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "http://registry.npm.taobao.org/orchestrator/download/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "~0.1.5", + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/ordered-read-streams/download/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/os-locale/download/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/parent-module/download/parent-module-1.0.0.tgz", + "integrity": "sha1-3yUL3FOR9KCF+1idrXYfWta4ZbU=", + "dev": true, + "requires": { + "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/callsites/download/callsites-3.0.0.tgz", + "integrity": "sha1-+361abcq16RYEvk/2UMKPkELPdM=", + "dev": true + } + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/parse-filepath/download/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "http://registry.npm.taobao.org/parse-glob/download/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/parse-node-version/download/parse-node-version-1.0.1.tgz", + "integrity": "sha1-4rXb7eAOf6m8NjYH9TMn6LBzGJs=", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/parse-passwd/download/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parseqs": { + "version": "0.0.5", + "resolved": "http://registry.npm.taobao.org/parseqs/download/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "http://registry.npm.taobao.org/parseuri/download/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "http://registry.npm.taobao.org/parseurl/download/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/path-exists/download/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz", + "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/path-root/download/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/path-root-regex/download/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/path-type/download/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true, + "optional": true + }, + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "http://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/plugin-error/download/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/arr-diff/download/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/arr-union/download/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "http://registry.npm.taobao.org/array-slice/download/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + } + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "http://registry.npm.taobao.org/pluralize/download/pluralize-7.0.0.tgz", + "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", + "dev": true + }, + "portscanner": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/portscanner/download/portscanner-2.1.1.tgz", + "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", + "dev": true, + "requires": { + "async": "1.5.2", + "is-number-like": "^1.0.3" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/pretty-hrtime/download/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "http://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz", + "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "http://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz", + "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", + "dev": true, + "optional": true, + "requires": { + "asap": "~2.0.3" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true, + "optional": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.1.31", + "resolved": "http://registry.npm.taobao.org/psl/download/psl-1.1.31.tgz", + "integrity": "sha1-6aqG0BAbWxBcvpOsa3hM1UcnYYQ=", + "dev": true, + "optional": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "dev": true + }, + "qs": { + "version": "6.2.3", + "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", + "dev": true + }, + "ramda": { + "version": "0.26.1", + "resolved": "http://registry.npm.taobao.org/ramda/download/ramda-0.26.1.tgz", + "integrity": "sha1-jUE1HrgRHFU1Nhf8O7/62OTTXQY=", + "dev": true + }, + "randomatic": { + "version": "3.1.1", + "resolved": "http://registry.npm.taobao.org/randomatic/download/randomatic-3.1.1.tgz", + "integrity": "sha1-t3bvxZN1mE42xTey9RofCv8Noe0=", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "dev": true + } + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/range-parser/download/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.3", + "resolved": "http://registry.npm.taobao.org/raw-body/download/raw-body-2.3.3.tgz", + "integrity": "sha1-GzJOzmtXBuFThVvBFIxlu39uoMM=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/read-pkg/download/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "http://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz", + "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "micromatch": { + "version": "3.1.10", + "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "http://registry.npm.taobao.org/rechoir/download/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "http://registry.npm.taobao.org/regex-cache/download/regex-cache-0.4.4.tgz", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/regexpp/download/regexpp-1.1.0.tgz", + "integrity": "sha1-DjUW3Qt5BPQT0tQZPc5GGMOmias=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz", + "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/replace-ext/download/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "replacestream": { + "version": "4.0.3", + "resolved": "http://registry.npm.taobao.org/replacestream/download/replacestream-4.0.3.tgz", + "integrity": "sha1-PuV5gJK+Nksc2xSEMISSyz3/LzY=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.3", + "object-assign": "^4.0.1", + "readable-stream": "^2.0.2" + } + }, + "request": { + "version": "2.88.0", + "resolved": "http://registry.npm.taobao.org/request/download/request-2.88.0.tgz", + "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz", + "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", + "dev": true, + "optional": true + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/require-uncached/download/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.10.0", + "resolved": "http://registry.npm.taobao.org/resolve/download/resolve-1.10.0.tgz", + "integrity": "sha1-O9qur0XMB/N1ZW39LlTtCBCxAbo=", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/resolve-dir/download/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/resolve-from/download/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "resp-modifier": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/resp-modifier/download/resp-modifier-6.0.2.tgz", + "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "minimatch": "^3.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "http://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/right-align/download/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "http://registry.npm.taobao.org/rimraf/download/rimraf-2.6.3.tgz", + "integrity": "sha1-stEE/g2Psnz54KHNqCYt04M8bKs=", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "http://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "http://registry.npm.taobao.org/rx/download/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "http://registry.npm.taobao.org/rx-lite-aggregates/download/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "*" + } + }, + "rxjs": { + "version": "5.5.12", + "resolved": "http://registry.npm.taobao.org/rxjs/download/rxjs-5.5.12.tgz", + "integrity": "sha1-b6YbinfD15PbrycL7i9D9lLXQcw=", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "http://registry.npm.taobao.org/semver/download/semver-5.6.0.tgz", + "integrity": "sha1-fnQlb7qknHWqfHogXMInmcrIAAQ=", + "dev": true + }, + "send": { + "version": "0.16.2", + "resolved": "http://registry.npm.taobao.org/send/download/send-0.16.2.tgz", + "integrity": "sha1-bsyh4PjBVtFBWXVZhI32RzCmu8E=", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/statuses/download/statuses-1.4.0.tgz", + "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=", + "dev": true + } + } + }, + "sequencify": { + "version": "0.0.7", + "resolved": "http://registry.npm.taobao.org/sequencify/download/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "serve-index": { + "version": "1.9.1", + "resolved": "http://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "http://registry.npm.taobao.org/serve-static/download/serve-static-1.13.2.tgz", + "integrity": "sha1-CV6Ecv1bRiN9tQzkhqQ/S4bGzsE=", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "server-destroy": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/server-destroy/download/server-destroy-1.0.1.tgz", + "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/set-value/download/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz", + "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/sigmund/download/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/slice-ansi/download/slice-ansi-1.0.0.tgz", + "integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "http://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "http://registry.npm.taobao.org/sntp/download/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "optional": true, + "requires": { + "hoek": "2.x.x" + } + }, + "socket.io": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/socket.io/download/socket.io-2.1.1.tgz", + "integrity": "sha1-oGnF/qvuPmshSnW0DOBlLhz7mYA=", + "dev": true, + "requires": { + "debug": "~3.1.0", + "engine.io": "~3.2.0", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.1.1", + "socket.io-parser": "~3.2.0" + }, + "dependencies": { + "engine.io-client": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/engine.io-client/download/engine.io-client-3.2.1.tgz", + "integrity": "sha1-b1TAR13khxWKGnx30QF4cItq3TY=", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + } + }, + "socket.io-client": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/socket.io-client/download/socket.io-client-2.1.1.tgz", + "integrity": "sha1-3LOBA0NqtFeN2wJmOK4vIbYjZx8=", + "dev": true, + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "engine.io-client": "~3.2.0", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.2.0", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.2.0", + "resolved": "http://registry.npm.taobao.org/socket.io-parser/download/socket.io-parser-3.2.0.tgz", + "integrity": "sha1-58Yii2qh+BTmFIrqMltRqpSZ4Hc=", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + }, + "ws": { + "version": "3.3.3", + "resolved": "http://registry.npm.taobao.org/ws/download/ws-3.3.3.tgz", + "integrity": "sha1-8c+E/i1ekB686U767OeF8YeiKPI=", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } + } + }, + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/socket.io-adapter/download/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", + "dev": true + }, + "socket.io-client": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/socket.io-client/download/socket.io-client-2.2.0.tgz", + "integrity": "sha1-hOc+48Q9UCDMwaJY+u65rsJyOvc=", + "dev": true, + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "engine.io-client": "~3.3.1", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.3.0", + "resolved": "http://registry.npm.taobao.org/socket.io-parser/download/socket.io-parser-3.3.0.tgz", + "integrity": "sha1-K1KpalCf3zFEC6QP7WCUx9TxJi8=", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "http://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/sparkles/download/sparkles-1.0.1.tgz", + "integrity": "sha1-AI22XtzmxQ7sDF4ijhlFBh3QQ3w=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.0.tgz", + "integrity": "sha1-+4PlBERSaPFUsHTiGMh8ADzTHfQ=", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/spdx-exceptions/download/spdx-exceptions-2.2.0.tgz", + "integrity": "sha1-LqRQrudPKom/uUUZwH/Nb0EyKXc=", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.3", + "resolved": "http://registry.npm.taobao.org/spdx-license-ids/download/spdx-license-ids-3.0.3.tgz", + "integrity": "sha1-gcDOjyFHR1YUi7tfO/wPNr8V124=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "http://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz", + "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=", + "dev": true, + "optional": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/statuses/download/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, + "stream-consume": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/stream-consume/download/stream-consume-0.1.1.tgz", + "integrity": "sha1-0721mMK9CugrjKx6xQsRB6eZbEg=", + "dev": true + }, + "stream-throttle": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/stream-throttle/download/stream-throttle-0.1.3.tgz", + "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", + "dev": true, + "requires": { + "commander": "^2.2.0", + "limiter": "^1.0.5" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringstream": { + "version": "0.0.6", + "resolved": "http://registry.npm.taobao.org/stringstream/download/stringstream-0.0.6.tgz", + "integrity": "sha1-eIAiWw1K0Q4wkn0Weh1vL9OzOnI=", + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/strip-bom/download/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/symbol-observable/download/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "table": { + "version": "4.0.2", + "resolved": "http://registry.npm.taobao.org/table/download/table-4.0.2.tgz", + "integrity": "sha1-ozRHN1OR52atNNNIbm4q7chNLjY=", + "dev": true, + "requires": { + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "textextensions": { + "version": "2.4.0", + "resolved": "http://registry.npm.taobao.org/textextensions/download/textextensions-2.4.0.tgz", + "integrity": "sha1-ahQ6mFRkOEzCz/Ea6kSM1bAY5ys=", + "dev": true + }, + "tfunk": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/tfunk/download/tfunk-3.1.0.tgz", + "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "object-path": "^0.9.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "http://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz", + "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/tildify/download/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/time-stamp/download/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz", + "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/to-array/download/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "http://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz", + "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=", + "dev": true, + "optional": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + } + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "http://registry.npm.taobao.org/tslib/download/tslib-1.9.3.tgz", + "integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "http://registry.npm.taobao.org/type-check/download/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "http://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.17", + "resolved": "http://registry.npm.taobao.org/ua-parser-js/download/ua-parser-js-0.7.17.tgz", + "integrity": "sha1-6exflJi57JEOeuOsYmqAXE0J7Kw=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "http://registry.npm.taobao.org/uglify-js/download/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "http://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "ultron": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/ultron/download/ultron-1.1.1.tgz", + "integrity": "sha1-n+FTahCmZKZSZqHjzPhf02MCvJw=", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/unc-path-regex/download/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/union-value/download/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "http://registry.npm.taobao.org/set-value/download/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/unique-stream/download/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz", + "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "http://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/upath/download/upath-1.1.2.tgz", + "integrity": "sha1-PbZYYA7a7sy+bbXmhNZ+6MKs0Gg=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "http://registry.npm.taobao.org/use/download/use-3.1.1.tgz", + "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", + "dev": true + }, + "user-home": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "http://registry.npm.taobao.org/uuid/download/uuid-3.3.2.tgz", + "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE=", + "dev": true, + "optional": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/v8flags/download/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "http://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "http://registry.npm.taobao.org/vinyl/download/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-bufferstream": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/vinyl-bufferstream/download/vinyl-bufferstream-1.0.1.tgz", + "integrity": "sha1-BTeGn1gO/6TKRay0dXnkuf5jCBo=", + "dev": true, + "requires": { + "bufferstreams": "1.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "http://registry.npm.taobao.org/vinyl-fs/download/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/clone/download/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "^1.1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/strip-bom/download/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "^1.0.0", + "is-utf8": "^0.2.0" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "http://registry.npm.taobao.org/through2/download/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "http://registry.npm.taobao.org/vinyl/download/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/vinyl-sourcemaps-apply/download/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "^0.5.1" + } + }, + "when": { + "version": "3.7.8", + "resolved": "http://registry.npm.taobao.org/when/download/when-3.7.8.tgz", + "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/which/download/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/which-module/download/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/window-size/download/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/wordwrap/download/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/write/download/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "ws": { + "version": "6.1.4", + "resolved": "http://registry.npm.taobao.org/ws/download/ws-6.1.4.tgz", + "integrity": "sha1-W1yIAK+rkl6UzLKdFTyNAsF3bvk=", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xmlhttprequest-ssl": { + "version": "1.5.5", + "resolved": "http://registry.npm.taobao.org/xmlhttprequest-ssl/download/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "http://registry.npm.taobao.org/xtend/download/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/y18n/download/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "6.4.0", + "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-6.4.0.tgz", + "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.1.0" + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "http://registry.npm.taobao.org/yargs-parser/download/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/yeast/download/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + } + } +} diff --git a/src/main/web/package.json b/src/main/web/package.json new file mode 100644 index 0000000..60f6360 --- /dev/null +++ b/src/main/web/package.json @@ -0,0 +1,35 @@ +{ + "name": "com.fr.plugin.officialaccount", + "version": "1.0.0", + "description": "WeChat officialaccount plugin", + "main": "index.js", + "devDependencies": { + "browser-sync": "^2.26.3", + "eslint": "^4.19.1", + "eslint-plugin-mocha": "^5.2.0", + "gulp": "^3.9.1", + "gulp-cached": "^1.1.1", + "gulp-clean": "^0.4.0", + "gulp-concat": "^2.6.1", + "gulp-eslint": "^5.0.0", + "gulp-header": "^2.0.5", + "gulp-less": "^4.0.1", + "gulp-minify-css": "^1.2.4", + "gulp-remember": "^1.0.1", + "gulp-rename": "^1.4.0", + "gulp-replace": "^1.0.0", + "gulp-uglify": "^3.0.1", + "gulp-util": "^3.0.8", + "http-proxy-middleware": "^0.19.0", + "less": "^2.7.2", + "moment": "^2.22.2" + }, + "scripts": { + "dev": "gulp", + "build": "gulp min", + "eslint": "eslint src --fix" + }, + "author": "", + "license": "MIT", + "dependencies": {} +} diff --git a/src/main/web/src/config.js b/src/main/web/src/config.js new file mode 100644 index 0000000..d51c262 --- /dev/null +++ b/src/main/web/src/config.js @@ -0,0 +1,15 @@ +// !(function () { +// Dec.Configs.pushConfig(function () { + // 示例,往左侧管理菜单中加上一项 + // BI.config("dec.constant.management.navigation", function (items) { + // items.push({ + // value: "pluginD", + // id: "decision-management-plugin-demo", + // text: "这是插件DEMO", + // cardType: "dec.plugin.demo", + // cls: "management-plugin-font" + // }); + // return items; + // }); +// }); +// })(); diff --git a/src/main/web/src/entry.js b/src/main/web/src/entry.js new file mode 100644 index 0000000..9c31c52 --- /dev/null +++ b/src/main/web/src/entry.js @@ -0,0 +1,12 @@ +/* + * 工程配置文件 + */ +!(function () { + if (!window.Dec) { + window.Dec = {}; + Dec.injection = {}; + } +if (!window.DecCst) { + window.DecCst = {}; + } +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/entry/dingtalk.entry.js b/src/main/web/src/modules/entry/dingtalk.entry.js new file mode 100644 index 0000000..829bb1b --- /dev/null +++ b/src/main/web/src/modules/entry/dingtalk.entry.js @@ -0,0 +1,38 @@ +// 添加一个新节点 +!(function () { + Dec.Plugin.Management.addItem({ + id: 'DingTalkSynSynSystemOption', + value: 'DingTalkSynSynSystemOption', + displayName: BI.i18nText('Plugin-dingtalksyn_DingTalkSyn_Manager'), + cls: 'dingtalksyn-node-font', + cardType: 'dec.plugin.dingtalksyn' + }); +})(); + +!(function () { + var DingTalkSynManagement = BI.inherit(BI.Widget, { + _store: function() { + return BI.Models.getModel('dingtalksyn.model.entry'); + }, + + beforeInit: function (callBack) { + this.store.checkLisence(callBack); + }, + + render: function () { + return this.model.authorized ? { + type: 'dingtalksyn.tab', + cls: 'dingtalksyn-container' + } : { + type: "bi.adaptive", + items: [{ + type: 'bi.iframe', + cls: "bi-card", + src: resolvePath('/dingtalksyn/expired', false) + }] + }; + } + }); + + BI.shortcut("dec.plugin.dingtalksyn", DingTalkSynManagement); +}) (); diff --git a/src/main/web/src/modules/entry/dingtalk.entry.model.js b/src/main/web/src/modules/entry/dingtalk.entry.model.js new file mode 100644 index 0000000..a2e1bf9 --- /dev/null +++ b/src/main/web/src/modules/entry/dingtalk.entry.model.js @@ -0,0 +1,33 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + + state: function() { + return { + authorized: true + } + }, + + actions: { + checkLisence: function (callBack) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/check/license', + type: 'GET', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.authorized = result.authorized; + callBack(); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + } + } + }); + + BI.model("dingtalksyn.model.entry", Model); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/jsapi/dingtalk.config.jsapi.list.js b/src/main/web/src/modules/jsapi/dingtalk.config.jsapi.list.js new file mode 100644 index 0000000..8d5945e --- /dev/null +++ b/src/main/web/src/modules/jsapi/dingtalk.config.jsapi.list.js @@ -0,0 +1,61 @@ +function getJsApiList() { + return jsApiList; +} +var jsApiList = [ + 'runtime.info', + 'runtime.permission.requestAuthCode', + 'biz.util.scan', + 'biz.util.uploadImage', + 'biz.navigation.setTitle', + 'device.geolocation.get', + 'device.base.getUUID', + 'device.base.getInterface', + 'device.nfc.nfcWrite', + 'runtime.permission.requestOperateAuthCode', + 'biz.util.scanCard', + 'device.geolocation.start', + 'device.geolocation.stop', + 'biz.map.locate', + 'biz.map.search', + 'biz.map.view', + 'biz.clipboardData.setData', + 'biz.util.open', + 'biz.telephone.call', + 'biz.telephone.showCallMenu', + 'biz.telephone.checkBizCall', + 'biz.telephone.quickCallList', + 'biz.ding.create', + 'biz.ding.post', + 'biz.contact.choose', + 'biz.contact.chooseMobileContacts', + 'biz.contact.complexPicker', + 'biz.contact.departmentsPicker', + 'biz.contact.createGroup', + 'biz.contact.setRule', + 'biz.contact.externalComplexPicker', + 'biz.contact.externalEditForm', + 'biz.customContact.choose', + 'biz.customContact.multipleChoose', + 'biz.chat.pickConversation', + 'biz.chat.chooseConversationByCorpId', + 'biz.chat.openSingleChat', + 'biz.chat.toConversation', + 'biz.cspace.saveFile', + 'biz.cspace.preview', + 'biz.cspace.chooseSpaceDir', + 'biz.util.uploadAttachment', + 'device.audio.startRecord', + 'device.audio.stopRecord', + 'device.audio.onRecordEnd', + 'device.audio.download', + 'device.audio.play', + 'device.audio.pause', + 'device.audio.resume', + 'device.audio.stop', + 'device.audio.onPlayEnd', + 'device.audio.translateVoice', + 'biz.conference.videoConfCall', + 'biz.alipay.pay', + 'biz.util.encrypt', + 'biz.util.decrypt' +]; \ No newline at end of file diff --git a/src/main/web/src/modules/jsapi/dingtalk.custom.api.js b/src/main/web/src/modules/jsapi/dingtalk.custom.api.js new file mode 100644 index 0000000..76c42a6 --- /dev/null +++ b/src/main/web/src/modules/jsapi/dingtalk.custom.api.js @@ -0,0 +1,211 @@ +if (!window.Dec) { + window.Dec = {}; +} + +if (!window.Dec.H5) { + window.Dec.H5 = {}; +} + +var pluginId = 'com.fr.plugin.dingtalksyn'; + +function resolvePath(path, isPublic) { + if (!path || path[0] !== '/') { + path = '/' + path; + } + return isPublic === true + ? window.FRTemplate.servletURL + '/plugin/public/' + pluginId + path + : window.FRTemplate.servletURL + '/plugin/private/' + pluginId + path; +} + +window.Dec.H5 = { + ERROR_CODE_EXPIRE: 11100016, + ERROR_CODE_NOT_SUPPORTED: 11205020, + ERROR_CODE_LOGIN_FAIL: 11205027, + + Config: function() { + var self = this; + var sb = self._getQueryString('sb'); + if (sb) { + self._ajax({ + url: resolvePath('/dingtalksyn/js/ticket?sb=' + sb), + type: 'GET', + success: function (req) { + var result = JSON.parse(req.responseText); + var timeStamp = new Date().getTime(); + var nonceStr = 'dingtalksyn'; + var jsTicket = result.jsTicket; + var jsApiList = getJsApiList(); + dd.config({ + agentId: result.agentId, + corpId: result.corpId, + timeStamp: timeStamp, + nonceStr: nonceStr, + signature: self._createSignature(timeStamp, nonceStr, jsTicket), + jsApiList: jsApiList + }); + } + }); + } + }, + + Ready: function(_callBack) { + dd.ready(_callBack); + }, + + Error: function(_callBack) { + dd.error(_callBack); + }, + + ScanQRCode: function(needResult, success, error) { + dd.biz.util.scan({ + type: 'all', + onSuccess: success, + onFail : error + }) + }, + + GetLocation: function(success, error, type) { + var coordinate = type == "wgs84" ? 0 : 1; + dd.device.geolocation.get({ + targetAccuracy: 200, + coordinate: coordinate, + withReGeocode: false, + useCache: false, //默认是true,如果需要频繁获取地理位置,请设置false + onSuccess : function(res) { + success(res); + }, + onFail : function(err) { + error(err); + } + }); + }, + + ChooseImage: function(count, success) { + var self = this; + var jo = arguments[0]; + var compress = false; + if (jo instanceof Object) { + count = jo.count || 9; + success = jo.success || function () { + + }; + compress = jo.compress || false; + } + var callBack = function(res) { + self._getImgStrFromUrl(res, function(datas) { + success(datas); + }); + }; + dd.biz.util.uploadImage({ + compression: compress,//(是否压缩) + multiple: true, //是否多选,默认false + max: count, //最多可选个数 + quality: 50, // 图片压缩质量, + resize: 50, // 图片缩放率 + onSuccess : callBack, + onFail : function(err) { + + } + }) + }, + + SetTitle: function(title, success, fail) { + document.title = title; + dd.biz.navigation.setTitle({ + title : title,//控制标题文本,空字符串表示显示默认文本 + onSuccess : success, + onFail : fail + }); + }, + + /** + * 钉钉旋转到横屏状态,如果showStatusBar被指定为false,则手机导航栏(带时间、信号的那一栏)都会被隐藏 + * @constructor + */ + RotateViewToLandScape: function (success, fail) { + dd.device.screen.rotateView({ + showStatusBar : true, // 否显示statusbar + clockwise : true, // 是否顺时针方向 + onSuccess : success, + onFail : fail + }); + }, + + ResetRotation: function (success, fail) { + dd.device.screen.resetView({ + onSuccess : success, + onFail : fail + }); + }, + + GoBack: function (success, fail) { + dd.biz.navigation.goBack({ + onSuccess : success, + onFail : fail + }) + }, + + OpenLink: function(url, success, fail) { + dd.biz.util.openLink({ + url: url, //要打开链接的地址 + onSuccess : success, + onFail : fail + }); + }, + + _getImgStrFromUrl: function(urls, callBack) { + var self = this; + self._ajax({ + url: resolvePath('/dingtalksyn/get/url/base64data'), + type: 'POST', + data: 'imgUrls=' + urls, + success: function(req) { + var result = JSON.parse(req.responseText); + if (result.errorCode === 0) { + callBack(result.datas); + } + } + }); + }, + + _ajax: function(props) { + if (props instanceof Object) { + var url = props.url || ''; + var data = props.data || {}; + var type = props.type || 'POST'; + var async = props.async === undefined? true : props.async; + var complete = props.complete || function(req) {}; + var success = props.success || function(req) {}; + var fail = props.fail || function(req) {}; + + var xmlHttpRequest = new XMLHttpRequest(); + xmlHttpRequest.onreadystatechange = function() { + if (xmlHttpRequest.readyState === 4 && xmlHttpRequest.status === 200) { + success.call(this, xmlHttpRequest); + } else { + fail.call(this, xmlHttpRequest); + } + complete.call(this, xmlHttpRequest); + }; + xmlHttpRequest.open(type, url, async); + xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"); + xmlHttpRequest.send(data); + } + }, + + _createSignature: function(timeStamp, nonceStr, jsTicket) { + var url = decodeURIComponent(location.href.split('#')[0]); + var plainTex = "jsapi_ticket=" + jsTicket + "&noncestr=" + nonceStr + "×tamp=" + timeStamp + "&url=" + url; + return SHA2(utf16to8(plainTex)); + }, + + _getQueryString: function(key) { + var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)", "i"); + var result = window.location.search.substr(1).match(reg); + if (result !== null) { + return decodeURIComponent(result[2]) + } else { + return ''; + } + } +}; diff --git a/src/main/web/src/modules/jsapi/dingtalk.jsapi.js b/src/main/web/src/modules/jsapi/dingtalk.jsapi.js new file mode 100644 index 0000000..e0f25ed --- /dev/null +++ b/src/main/web/src/modules/jsapi/dingtalk.jsapi.js @@ -0,0 +1 @@ +(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dd=t():e.dd=t()})(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=570)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(160),i=n(2);t.ENV_ENUM=i.ENV_ENUM;var a=n(3);n(166),t.ddSdk=new a.Sdk(r.getENV(),o.log)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addWatchParamsDeal=function(e){var t=Object.assign({},e);return t.watch=!0,t},t.addDefaultCorpIdParamsDeal=function(e){var t=Object.assign({},e);return t.corpId="corpId",t},t.genDefaultParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign(t,e)}},t.forceChangeParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign(e,t)}},t.genBoolResultDealFn=function(e){return function(t){var n=Object.assign({},t);return e.forEach(function(e){void 0!==n[e]&&(n[e]=!!n[e])}),n}},t.genBizStoreParamsDealFn=function(e){var t=Object.assign({},e);return"string"!=typeof t.params?(t.params=JSON.stringify(t),t):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(3);t.ENV_ENUM=o.ENV_ENUM,t.APP_TYPE=o.APP_TYPE;var i=n(163);t.getUA=function(){var e="";try{"undefined"!=typeof navigator&&(e=navigator&&(navigator.userAgent||navigator.swuserAgent)||"")}catch(t){e=""}return e},t.getENV=function(){var e=t.getUA(),n=/DingTalkSyn/i.test(e)||i.default.isDingTalkSyn,o=/iPhone|iPad|iPod|iOS/i.test(e)&&n||i.default.isWeexiOS,a=/Android/i.test(e)&&n||i.default.isWeexAndroid,s=/Nebula/i.test(e)&&n||"object"==typeof dd&&"function"==typeof dd.dtBridge,d=/dd-web/i.test(e),u=r.APP_TYPE.WEB;d?u=r.APP_TYPE.WEBVIEW_IN_MINIAPP:s?u=r.APP_TYPE.MINI_APP:(i.default.isWeexiOS||i.default.isWeexAndroid)&&(u=r.APP_TYPE.WEEX);var c,l="*",f=e.match(/AliApp\(\w+\/([a-zA-Z0-9.-]+)\)/);null===f&&(f=e.match(/DingTalkSyn\/([a-zA-Z0-9.-]+)/));var v;f&&f[1]&&(v=f[1]);var p="";if("undefined"!=typeof name&&(p=name),p)try{var _=JSON.parse(p);_.hostVersion&&(v=_.hostVersion),l=_.language||navigator.language||"*",c=_.containerId}catch(e){}var E,N=!!c;return E=o?r.ENV_ENUM.ios:a?r.ENV_ENUM.android:N?r.ENV_ENUM.pc:r.ENV_ENUM.notInDingTalkSyn,{platform:E,version:v,appType:u,language:l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(169);t.APP_TYPE=r.APP_TYPE,t.LogLevel=r.LogLevel,t.isFunction=r.isFunction,t.compareVersion=r.compareVersion,t.ENV_ENUM=r.ENV_ENUM;var o=function(){function e(e,t){var n=this;this.configJsApiList=[],this.hadConfig=!1,this.p={},this.config$=new Promise(function(e,t){n.p.reject=t,n.p.resolve=e}),this.logQueue=[],this.devConfig={debug:!1},this.platformConfigMap={},this.invokeAPIConfigMapByMethod={},this.isBridgeDrity=!0,this.getExportSdk=function(){return n.exportSdk},this.setAPI=function(e,t){n.invokeAPIConfigMapByMethod[e]=t},this.setPlatform=function(e){n.isBridgeDrity=!0,n.platformConfigMap[e.platform]=e,e.platform===n.env.platform&&e.bridgeInit().catch(function(e){n.customLog(r.LogLevel.WARNING,["auto bridgeInit error",e||""])})},this.getPlatformConfigMap=function(){return n.platformConfigMap},this.deleteApiConfig=function(e,t){var r=n.invokeAPIConfigMapByMethod[e];r&&delete r[t]},this.invokeAPI=function(e,t,o){void 0===t&&(t={}),void 0===o&&(o=!0),n.customLog(r.LogLevel.INFO,['==> "'+e+'" params: ',t]);var i=+new Date,a=i+"_"+Math.floor(1e3*Math.random());return n.devConfig.onBeforeInvokeAPI&&n.devConfig.onBeforeInvokeAPI({invokeId:a,method:e,params:t,startTime:i}),!1===n.devConfig.isAuthApi&&(o=!1),n.bridgeInitFn().then(function(s){var d=n.invokeAPIConfigMapByMethod[e],u=!0===n.devConfig.isDisableDeal||n.devConfig.disbaleDealApiWhiteList&&-1!==n.devConfig.disbaleDealApiWhiteList.indexOf(e);if(d||!o){var c;if(d&&(c=d[n.env.platform]),c||!o){var l={};l=!u&&c&&c.paramsDeal&&r.isFunction(c.paramsDeal)?c.paramsDeal(t):Object.assign({},t);var f=function(e){return!u&&c&&c.resultDeal&&r.isFunction(c.resultDeal)?c.resultDeal(e):e};if(r.isFunction(l.onSuccess)){var v=l.onSuccess;l.onSuccess=function(e){v(f(e))}}return s(e,l).then(f,function(t){var i=n.hadConfig&&void 0===n.isReady&&-1!==n.configJsApiList.indexOf(e),a="object"==typeof t&&"string"==typeof t.errorCode&&t.errorCode===r.ERROR_CODE.no_permission,d="object"==typeof t&&"string"==typeof t.errorCode&&t.errorCode===r.ERROR_CODE.cancel,u=c&&c.vs&&n.env.version&&r.compareVersion(n.env.version,c.vs),v=(n.env.platform===r.ENV_ENUM.ios||n.env.platform===r.ENV_ENUM.android)&&i&&a,p=n.env.platform===r.ENV_ENUM.pc&&i&&(u&&!d&&o||a);return v||p?n.config$.then(function(){return s(e,l).then(f)}):Promise.reject(t)}).then(function(o){return n.devConfig.onAfterInvokeAPI&&n.devConfig.onAfterInvokeAPI({invokeId:a,method:e,params:t,payload:o,isSuccess:!0,startTime:i,duration:+new Date-i}),n.customLog(r.LogLevel.INFO,['<== "'+e+'" success result: ',o]),o},function(o){return n.devConfig.onAfterInvokeAPI&&n.devConfig.onAfterInvokeAPI({invokeId:a,method:e,params:t,payload:o,startTime:i,duration:+new Date-i,isSuccess:!1}),n.customLog(r.LogLevel.WARNING,['<== "'+e+'" fail result: ',o]),Promise.reject(o)})}var p='"'+e+'" do not support the current platform ('+n.env.platform+")";return n.customLog(r.LogLevel.ERROR,[p]),Promise.reject({errorCode:r.ERROR_CODE.jsapi_internal_error,errorMessage:p})}var p="This API method is not configured for the platform ("+n.env.platform+")";return n.customLog(r.LogLevel.ERROR,[p]),Promise.reject({errorCode:r.ERROR_CODE.jsapi_internal_error,errorMessage:p})})},this.customLog=function(e,t){var r={level:e,text:t,time:new Date};!0===n.devConfig.debug?n.customLogInstance(r):n.logQueue.push(r)},this.clearLogQueue=function(){n.logQueue.forEach(function(e){n.customLogInstance(e)}),n.logQueue=[]},this.customLogInstance=t,this.env=e,this.bridgeInitFn=function(){if(n.bridgeInitFnPromise&&!n.isBridgeDrity)return n.bridgeInitFnPromise;n.isBridgeDrity=!1;var t=n.platformConfigMap[e.platform];if(t)n.bridgeInitFnPromise=t.bridgeInit().catch(function(e){return n.customLog(r.LogLevel.ERROR,["\b\b\b\b\bJsBridge initialization fails, jsapi will not work"]),Promise.reject(e)});else{var o="Do not support the current environment锛�"+e.platform;n.customLog(r.LogLevel.WARNING,[o]),n.bridgeInitFnPromise=Promise.reject(new Error(o))}return n.bridgeInitFnPromise};var o=function(e){void 0===e&&(e={}),n.devConfig=Object.assign(n.devConfig,e),!0===e.debug&&n.clearLogQueue(),e.extraPlatform&&n.setPlatform(e.extraPlatform)};this.exportSdk={config:function(t){void 0===t&&(t={});var i=!0;Object.keys(t).forEach(function(e){-1===["debug","usePromise"].indexOf(e)&&(i=!1)}),i?(n.customLog(r.LogLevel.WARNING,["This is a deprecated feature, recommend use dd.devConfig"]),o(t)):n.hadConfig?n.customLog(r.LogLevel.WARNING,["Config has been executed"]):(t.jsApiList&&(n.configJsApiList=t.jsApiList),n.hadConfig=!0,n.bridgeInitFn().then(function(r){var o=n.platformConfigMap[e.platform],i=t;o.authParamsDeal&&(i=o.authParamsDeal(i)),r(o.authMethod,i).then(function(e){n.isReady=!0,n.p.resolve(e)}).catch(function(e){n.isReady=!1,n.p.reject(e)})},function(){n.customLog(r.LogLevel.ERROR,['\b\b\b\b\bJsBridge initialization failed and "dd.config" failed to call'])}))},devConfig:o,ready:function(e){!1===n.hadConfig?(n.customLog(r.LogLevel.WARNING,["You don 't use a dd.config, so you don't need to wrap dd.ready, recommend remove dd.ready"]),n.bridgeInitFn().then(function(){e()})):n.config$.then(function(t){e()})},error:function(e){n.config$.catch(function(t){e(t)})},on:function(t,r){n.bridgeInitFn().then(function(){n.platformConfigMap[e.platform].event.on(t,r)})},off:function(t,r){n.bridgeInitFn().then(function(){n.platformConfigMap[e.platform].event.off(t,r)})},env:e,checkJsApi:function(t){void 0===t&&(t={});var o={};return t.jsApiList&&t.jsApiList.forEach(function(t){var i=n.invokeAPIConfigMapByMethod[t];if(i){var a=i[e.platform];a&&a.vs&&e.version&&r.compareVersion(e.version,a.vs)&&(o[t]=!0)}o[t]||(o[t]=!1)}),Promise.resolve(o)},_invoke:function(e,t){return void 0===t&&(t={}),n.invokeAPI(e,t,!1)}}}return e}();t.Sdk=o},function(e,t,n){(function(t,n){e.exports=n()})(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=579)}({179:function(e,t,n){"use strict";var r=n(181);e.exports=r},181:function(e,t,n){"use strict";var r=n(183),o=n(184),i=n(182),a=n(185),s=new i,d=!1,u="",c=null,l={},f=/{.*}/;try{var v=window.name.match(f);if(v&&v[0])var l=JSON.parse(v[0])}catch(e){l={}}l.hostOrigin&&".dingtalksyn.com"===l.hostOrigin.split(":")[1].slice(0-".dingtalksyn.com".length)&&l.containerId&&(d=!0,u=l.hostOrigin,c=l.containerId);var p={},_=new Promise(function(e,t){p._resolve=e,p._reject=t}),E={},N=null;window.top!==window&&(N=window.top,p._resolve()),E[a.SYS_INIT]=function(e){N=e.frameWindow,p._resolve(),e.respond({})},window.addEventListener("message",function(e){var t=e.data,n=e.origin;if(n===u)if("response"===t.type&&t.msgId){var r=t.msgId,i=s.getMsyById(r);i&&i.receiveResponse(t.body,!t.success)}else if("event"===t.type&&t.msgId){var r=t.msgId,i=s.getMsyById(r);i&&i.receiveEvent(t.eventName,t.body)}else if("request"===t.type&&t.msgId){var i=new o(e.source,n,t);E[i.methodName]&&E[i.methodName](i)}}),t.invokeAPI=function(e,t){var n=new r(c,e,t);return d&&_.then(function(){N&&N.postMessage(n.getPayload(),u),s.addPending(n)}),n};var P=null;t.addEventListener=function(e,n){P||(P=t.invokeAPI(a.SYS_EVENT,{})),P.addEventListener(e,n)},t.removeEventListener=function(e,t){P&&P.removeEventListener(e,t)}},182:function(e,t,n){"use strict";var r=function(){this.pendingMsgs={}};r.prototype.addPending=function(e){this.pendingMsgs[e.id]=e;var t=function(){delete this.pendingMsgs[e.id],e.removeEventListener("_finish",t)}.bind(this);e.addEventListener("_finish",t)},r.prototype.getMsyById=function(e){return this.pendingMsgs[e]},e.exports=r},183:function(e,t,n){"use strict";var r=n(574),o=n(573),i=0,a=Math.floor(1e3*Math.random()),s=function(){return 1e3*(1e3*a+Math.floor(1e3*Math.random()))+ ++i%1e3},d={code:408,reason:"timeout"},u={TIMEOUT:"_timeout",FINISH:"_finish"},c={timeout:-1},l=function(e,t,n,r){this.id=s(),this.methodName=t,this.containerId=e,this.option=o({},c,r);var n=n||{};this._p={},this.result=new Promise(function(e,t){this._p._resolve=e,this._p._reject=t}.bind(this)),this.callbacks={},this.plainMsg=this._handleMsg(n),this._eventsHandle={},this._timeoutTimer=null,this._initTimeout(),this.isFinish=!1};l.prototype._initTimeout=function(){this._clearTimeout(),this.option.timeout>0&&(this._timeoutTimer=setTimeout(function(){this.receiveEvent(u.TIMEOUT),this.receiveResponse(d,!0)}.bind(this),this.option.timeout))},l.prototype._clearTimeout=function(){clearTimeout(this._timeoutTimer)},l.prototype._handleMsg=function(e){var t={};return Object.keys(e).forEach(function(n){var o=e[n];"function"==typeof o&&"on"===n.slice(0,2)?this.callbacks[n]=o:t[n]=r(o)}.bind(this)),t},l.prototype.getPayload=function(){return{msgId:this.id,containerId:this.containerId,methodName:this.methodName,body:this.plainMsg,type:"request"}},l.prototype.receiveEvent=function(e,t){if(this.isFinish&&e!==u.FINISH)return!1;e!==u.FINISH&&e!==u.TIMEOUT&&this._initTimeout(),Array.isArray(this._eventsHandle[e])&&this._eventsHandle[e].forEach(function(e){try{e(t)}catch(e){console.error(t)}});var n="on"+e.charAt(0).toUpperCase()+e.slice(1);return this.callbacks[n]&&this.callbacks[n](t),!0},l.prototype.addEventListener=function(e,t){if(!e||"function"!=typeof t)throw"eventName is null or handle is not a function, addEventListener fail";Array.isArray(this._eventsHandle[e])||(this._eventsHandle[e]=[]),this._eventsHandle[e].push(t)},l.prototype.removeEventListener=function(e,t){if(!e||!t)throw"eventName is null or handle is null, invoke removeEventListener fail";if(Array.isArray(this._eventsHandle[e])){var n=this._eventsHandle[e].indexOf(t);-1!==n&&this._eventsHandle[e].splice(n,1)}},l.prototype.receiveResponse=function(e,t){if(!0===this.isFinish)return!1;this._clearTimeout();var t=!!t;return t?this._p._reject(e):this._p._resolve(e),setTimeout(function(){this.receiveEvent(u.FINISH)}.bind(this),0),this.isFinish=!0,!0},e.exports=l},184:function(e,t,n){"use strict";var r=function(e,t,n){if(this._msgId=n.msgId,this.frameWindow=e,this.methodName=n.methodName,this.clientOrigin=t,this.containerId=n.containerId,this.params=n.body,!this._msgId)throw"msgId not exist";if(!this.frameWindow)throw"frameWindow not exist";if(!this.methodName)throw"methodName not exits";if(!this.clientOrigin)throw"clientOrigin not exist";this.hasResponded=!1};r.prototype.respond=function(e,t){var t=!!t;if(!0!==this.hasResponded){var n={type:"response",success:!t,body:e,msgId:this._msgId};this.frameWindow.postMessage(n,this.clientOrigin),this.hasResponded=!0}},r.prototype.emit=function(e,t){var n={type:"event",eventName:e,body:t,msgId:this._msgId};this.frameWindow.postMessage(n,this.clientOrigin)},e.exports=r},185:function(e,t,n){"use strict";e.exports={SYS_EVENT:"SYS_openAPIContainerInitEvent",SYS_INIT:"SYS_openAPIContainerInit"}},4:function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},572:function(e,t,n){(function(e,n){function r(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function i(e,t){for(var n=-1,r=e.length;++n-1}function g(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=Ve}function ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ke(e){return!!e&&"object"==typeof e}function ge(e){return!!ye(e)&&(me(e)||c(e)?Pt:tt).test(_e(e))}function be(e){return"string"==typeof e||!Lt(e)&&ke(e)&&Nt.call(e)==We}function Ie(e){var t=pe(e);if(!t&&!Pe(e))return z(e);var n=le(e),r=!!n,o=n||[],i=o.length;for(var a in e)!B(e,a)||r&&("length"==a||fe(a,i))||t&&"constructor"==a||o.push(a);return o}var Ae=200,Se="__lodash_hash_undefined__",Ve=9007199254740991,Ue="[object Arguments]",Oe="[object Boolean]",je="[object Date]",we="[object Function]",$e="[object GeneratorFunction]",De="[object Map]",Ce="[object Number]",Te="[object Object]",xe="[object RegExp]",Fe="[object Set]",We="[object String]",Re="[object Symbol]",Le="[object ArrayBuffer]",Be="[object DataView]",ze="[object Float32Array]",qe="[object Float64Array]",Ye="[object Int8Array]",Je="[object Int16Array]",Ge="[object Int32Array]",He="[object Uint8Array]",Ke="[object Uint8ClampedArray]",Xe="[object Uint16Array]",Qe="[object Uint32Array]",Ze=/[\\^$.*+?()[\]{}|]/g,et=/\w*$/,tt=/^\[object .+?Constructor\]$/,nt=/^(?:0|[1-9]\d*)$/,rt={};rt[Ue]=rt["[object Array]"]=rt[Le]=rt[Be]=rt[Oe]=rt[je]=rt[ze]=rt[qe]=rt[Ye]=rt[Je]=rt[Ge]=rt[De]=rt[Ce]=rt[Te]=rt[xe]=rt[Fe]=rt[We]=rt[Re]=rt[He]=rt[Ke]=rt[Xe]=rt[Qe]=!0,rt["[object Error]"]=rt[we]=rt["[object WeakMap]"]=!1;var ot={function:!0,object:!0},it=ot[typeof t]&&t&&!t.nodeType?t:void 0,at=ot[typeof e]&&e&&!e.nodeType?e:void 0,st=at&&at.exports===it?it:void 0,dt=u(it&&at&&"object"==typeof n&&n),ut=u(ot[typeof self]&&self),ct=u(ot[typeof window]&&window),lt=u(ot[typeof this]&&this),ft=dt||ct!==(lt&<.window)&&ct||ut||lt||Function("return this")(),vt=Array.prototype,pt=Object.prototype,_t=Function.prototype.toString,Et=pt.hasOwnProperty,Nt=pt.toString,Pt=RegExp("^"+_t.call(Et).replace(Ze,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=st?ft.Buffer:void 0,mt=ft.Symbol,Mt=ft.Uint8Array,yt=Object.getOwnPropertySymbols,kt=Object.create,gt=pt.propertyIsEnumerable,bt=vt.splice,It=Object.getPrototypeOf,At=Object.keys,St=oe(ft,"DataView"),Vt=oe(ft,"Map"),Ut=oe(ft,"Promise"),Ot=oe(ft,"Set"),jt=oe(ft,"WeakMap"),wt=oe(Object,"create"),$t=_e(St),Dt=_e(Vt),Ct=_e(Ut),Tt=_e(Ot),xt=_e(jt),Ft=mt?mt.prototype:void 0,Wt=Ft?Ft.valueOf:void 0;v.prototype.clear=p,v.prototype.delete=_,v.prototype.get=E,v.prototype.has=N,v.prototype.set=P,h.prototype.clear=m,h.prototype.delete=M,h.prototype.get=y,h.prototype.has=k,h.prototype.set=g,b.prototype.clear=I,b.prototype.delete=A,b.prototype.get=S,b.prototype.has=V,b.prototype.set=U,O.prototype.clear=j,O.prototype.delete=w,O.prototype.get=$,O.prototype.has=D,O.prototype.set=C;var Rt=function(e){return function(e){return null==e?void 0:e.length}}();yt||(ae=function(){return[]}),(St&&se(new St(new ArrayBuffer(1)))!=Be||Vt&&se(new Vt)!=De||Ut&&"[object Promise]"!=se(Ut.resolve())||Ot&&se(new Ot)!=Fe||jt&&"[object WeakMap]"!=se(new jt))&&(se=function(e){var t=Nt.call(e),n=t==Te?e.constructor:void 0,r=n?_e(n):void 0;if(r)switch(r){case $t:return Be;case Dt:return De;case Ct:return"[object Promise]";case Tt:return Fe;case xt:return"[object WeakMap]"}return t});var Lt=Array.isArray,Bt=ht?function(e){return e instanceof ht}:function(e){return function(){return!1}}();e.exports=W}).call(t,n(577)(e),n(4))},573:function(e,t,n){function r(e,t,n){var r=e[t];m.call(e,t)&&d(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function o(e,t,n,o){n||(n={});for(var i=-1,a=t.length;++i-1&&e%1==0&&e-1&&e%1==0&&e<=_}function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(575),p=n(576),_=9007199254740991,E="[object Function]",N="[object GeneratorFunction]",P=/^(?:0|[1-9]\d*)$/,h=Object.prototype,m=h.hasOwnProperty,M=h.toString,y=h.propertyIsEnumerable,k=!y.call({valueOf:1},"valueOf"),g=function(e){return function(e){return null==e?void 0:e.length}}(),b=function(e){return p(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&a(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1&&e%1==0&&e-1&&e%1==0&&e<=_}function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function p(e){return d(e)?r(e):o(e)}var _=9007199254740991,E="[object Arguments]",N="[object Function]",P="[object GeneratorFunction]",h=/^(?:0|[1-9]\d*)$/,m=Object.prototype,M=m.hasOwnProperty,y=m.toString,k=m.propertyIsEnumerable,g=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),b=Array.isArray;e.exports=p},576:function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t){return t=k(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=k(r.length-t,0),a=Array(i);++o0;)o=a.shift(),i=s.shift();return n?(i||0)>=(o||0):(i||0)>(o||0)},t.language=o.language,t.version=o.version},function(e,t,n){"use strict";function r(e,t,n){var r="Web"===n.platform,i="iOS"===n.platform,a="android"===n.platform,s=a||i,d=function(){return r?window.navigator.userAgent.toLowerCase():""}(),u=function(){var e={};if(r){var t=window.name;try{var n=JSON.parse(t);e.containerId=n.containerId,e.version=n.hostVersion,e.language=n.language||"*"}catch(e){}}return e}(),c=function(){return s?"DingTalkSyn"===n.appName||"com.alibaba.android.rimet"===n.appName:d.indexOf("dingtalksyn")>-1||!!u.containerId}(),l=function(){if(r){if(u.version)return u.version;var e=d.match(/aliapp\(\w+\/([a-zA-Z0-9.-]+)\)/);null===e&&(e=d.match(/dingtalksyn\/([a-zA-Z0-9.-]+)/));return e&&e[1]||"Unknown"}return n.appVersion}(),f=!!u.containerId,v=/iphone|ipod|ios/.test(d),p=/ipad/.test(d),_=d.indexOf("android")>-1,E=d.indexOf("mac")>-1&&f,N=d.indexOf("win")>-1&&f,P=!E&&!N&&f,h=f,m="";return m=c?v||i?o.PLATFORM.IOS:_||a?o.PLATFORM.ANDROID:p?o.PLATFORM.IPAD:E?o.PLATFORM.MAC:N?o.PLATFORM.WINDOWS:P?o.PLATFORM.BROWSER:o.PLATFORM.UNKNOWN:o.PLATFORM.UNKNOWN,{isDingTalkSyn:c,isWebiOS:v,isWebAndroid:_,isWeexiOS:i,isWeexAndroid:a,isDingTalkSynPCMac:E,isDingTalkSynPCWeb:P,isDingTalkSynPCWindows:N,isDingTalkSynPC:h,runtime:e,framework:t,platform:m,version:l}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11);t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(164),o=n(162),i=n(11),a=r.default().split("."),s=a[0],d=a[1],u=function(){var e={};switch(d){case i.FRAMEWORK.VUE:var t=weex.config,n=t.env;e.platform=n.platform,i.RUNTIME.WEEX===s&&(e.appVersion=n.appVersion,e.appName=n.appName);break;case i.FRAMEWORK.RAX:i.RUNTIME.WEEX===s&&(e.platform=navigator.platform,e.appName=navigator.appName,e.appVersion=navigator.appVersion);break;case i.FRAMEWORK.UNKNOWN:i.RUNTIME.WEB===s&&(e.platform=i.RUNTIME.WEB),i.RUNTIME.UNKNOWN===s&&(e.platform=i.RUNTIME.UNKNOWN)}return e}(),c=o.default(s,d,u);t.default=c},function(e,t,n){"use strict";function r(e,t){for(var n=e.length,r=0,o=!0;ro[i])return!0}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=r,t.compareVersion=o;(function(e){e.cancel="-1",e.not_exist="1",e.no_permission="7",e.jsapi_internal_error="22"})(t.ERROR_CODE||(t.ERROR_CODE={}));(function(e){e.pc="pc",e.android="android",e.ios="ios",e.notInDingTalkSyn="notInDingTalkSyn"})(t.ENV_ENUM||(t.ENV_ENUM={}));(function(e){e.WEB="WEB",e.MINI_APP="MINI_APP",e.WEEX="WEEX",e.WEBVIEW_IN_MINIAPP="WEBVIEW_IN_MINIAPP"})(t.APP_TYPE||(t.APP_TYPE={}));(function(e){e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR"})(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(2),i=n(3),a=n(5),s=n(9),d=n(156),u=n(6),c=n(8),l=n(10);r.ddSdk.setPlatform({platform:o.ENV_ENUM.android,bridgeInit:function(){var e=o.getENV();return e.appType===i.APP_TYPE.MINI_APP?Promise.resolve(a.default):e.appType===i.APP_TYPE.WEBVIEW_IN_MINIAPP?Promise.resolve(s.default):e.appType===i.APP_TYPE.WEEX?u.androidWeexBridge():d.h5AndroidbridgeInit().then(function(){return d.default})},authMethod:"runtime.permission.requestJsApis",event:{on:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:c.on(e,t);break;case i.APP_TYPE.WEEX:l.on(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}},off:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:c.off(e,t);break;case i.APP_TYPE.WEEX:l.off(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(173),n(170),n(172)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(2),i=n(3),a=n(5),s=n(9),d=n(157),u=n(6),c=n(8),l=n(10);r.ddSdk.setPlatform({platform:o.ENV_ENUM.ios,bridgeInit:function(){var e=o.getENV();return e.appType===i.APP_TYPE.MINI_APP?Promise.resolve(a.default):e.appType===i.APP_TYPE.WEBVIEW_IN_MINIAPP?Promise.resolve(s.default):e.appType===i.APP_TYPE.WEEX?u.iosWeexBridge():d.h5IosBridgeInit().then(function(){return d.default})},authMethod:"runtime.permission.requestJsApis",event:{on:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:c.on(e,t);break;case i.APP_TYPE.WEEX:l.on(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}},off:function(e,t){var n=o.getENV();switch(n.appType){case i.APP_TYPE.WEB:c.off(e,t);break;case i.APP_TYPE.WEEX:l.off(e,t);break;default:throw new Error("Not support global event in the platfrom: "+n.appType)}}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(2),i=n(158),a=n(5),s=n(3),d=n(159);r.ddSdk.setPlatform({platform:o.ENV_ENUM.pc,bridgeInit:function(){switch(o.getENV().appType){case s.APP_TYPE.MINI_APP:return Promise.resolve(a.default);default:return i.h5PcBridgeInit().then(function(){return i.default})}},authMethod:"config",authParamsDeal:function(e){var t=Object.assign({},e);return t.url=window.location.href.split("#")[0],t},event:{on:function(e,t){if(o.getENV().appType===s.APP_TYPE.WEB)return d.on(e,t)},off:function(e,t){if(o.getENV().appType===s.APP_TYPE.WEB)return d.off(e,t)}}})},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){_&&v&&(_=!1,v.length?p=v.concat(p):E=-1,p.length&&s())}function s(){if(!_){var e=o(a);_=!0;for(var t=p.length;t;){for(v=p,p=[];++E1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(176),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(7))},,function(e,t,n){"use strict";var r=n(155),o=n(528),i=Object.assign(r,o.apiObj);e.exports=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(13),i=n(14),a=n(15),s=n(16),d=n(17),u=n(18),c=n(19),l=n(20),f=n(21),v=n(22),p=n(23),_=n(24),E=n(25),N=n(26),P=n(27),h=n(28),m=n(29),M=n(30),y=n(31),k=n(32),g=n(33),b=n(34),I=n(35),A=n(36),S=n(37),V=n(38),U=n(39),O=n(40),j=n(41),w=n(42),$=n(43),D=n(44),C=n(45),T=n(46),x=n(47),F=n(48),W=n(49),R=n(50),L=n(51),B=n(52),z=n(53),q=n(54),Y=n(55),J=n(56),G=n(57),H=n(58),K=n(59),X=n(60),Q=n(61),Z=n(62),ee=n(63),te=n(64),ne=n(65),re=n(66),oe=n(67),ie=n(68),ae=n(69),se=n(70),de=n(71),ue=n(72),ce=n(73),le=n(74),fe=n(75),ve=n(76),pe=n(77),_e=n(78),Ee=n(79),Ne=n(80),Pe=n(81),he=n(82),me=n(83),Me=n(84),ye=n(85),ke=n(86),ge=n(87),be=n(88),Ie=n(89),Ae=n(90),Se=n(91),Ve=n(92),Ue=n(93),Oe=n(94),je=n(95),we=n(96),$e=n(97),De=n(98),Ce=n(99),Te=n(100),xe=n(101),Fe=n(102),We=n(103),Re=n(104),Le=n(105),Be=n(106),ze=n(107),qe=n(108),Ye=n(109),Je=n(110),Ge=n(111),He=n(112),Ke=n(113),Xe=n(114),Qe=n(115),Ze=n(116),et=n(117),tt=n(118),nt=n(119),rt=n(120),ot=n(121),it=n(122),at=n(123),st=n(124),dt=n(125),ut=n(126),ct=n(127),lt=n(128),ft=n(129),vt=n(130),pt=n(131),_t=n(132),Et=n(133),Nt=n(134),Pt=n(135),ht=n(136),mt=n(137),Mt=n(138),yt=n(139),kt=n(140),gt=n(141),bt=n(142),It=n(143),At=n(144),St=n(145),Vt=n(146),Ut=n(147),Ot=n(148),jt=n(149),wt=n(150),$t=n(151),Dt=n(152),Ct=n(153);t.apiObj={biz:{alipay:{pay:r.pay$},calendar:{chooseDateTime:o.chooseDateTime$,chooseHalfDay:i.chooseHalfDay$,chooseInterval:a.chooseInterval$,chooseOneDay:s.chooseOneDay$},chat:{chooseConversationByCorpId:d.chooseConversationByCorpId$,locationChatMessage:u.locationChatMessage$,openSingleChat:c.openSingleChat$,pickConversation:l.pickConversation$,sendEmotion:f.sendEmotion$,toConversation:v.toConversation$},clipboardData:{setData:p.setData$},contact:{choose:_.choose$,chooseMobileContacts:E.chooseMobileContacts$,complexPicker:N.complexPicker$,createGroup:P.createGroup$,departmentsPicker:h.departmentsPicker$,externalComplexPicker:m.externalComplexPicker$,externalEditForm:M.externalEditForm$,setRule:y.setRule$},cspace:{chooseSpaceDir:k.chooseSpaceDir$,delete:g.delete$,preview:b.preview$,saveFile:I.saveFile$},customContact:{choose:A.choose$,multipleChoose:S.multipleChoose$},ding:{create:V.create$,post:U.post$},event:{notifyWeex:O.notifyWeex$},intent:{fetchData:j.fetchData$},map:{locate:w.locate$,search:$.search$,view:D.view$},microApp:{openApp:C.openApp$},navigation:{close:T.close$,goBack:x.goBack$,hideBar:F.hideBar$,quit:W.quit$,replace:R.replace$,setIcon:L.setIcon$,setLeft:B.setLeft$,setMenu:z.setMenu$,setRight:q.setRight$,setTitle:Y.setTitle$},store:{closeUnpayOrder:J.closeUnpayOrder$,createOrder:G.createOrder$,getPayUrl:H.getPayUrl$,inquiry:K.inquiry$},telephone:{call:X.call$,checkBizCall:Q.checkBizCall$,quickCallList:Z.quickCallList$,showCallMenu:ee.showCallMenu$},user:{checkPassword:te.checkPassword$,get:ne.get$},util:{chosen:re.chosen$,datepicker:oe.datepicker$,datetimepicker:ie.datetimepicker$,decrypt:ae.decrypt$,downloadFile:se.downloadFile$,encrypt:de.encrypt$,isLocalFileExist:ue.isLocalFileExist$,multiSelect:ce.multiSelect$,open:le.open$,openLink:fe.openLink$,openLocalFile:ve.openLocalFile$,openModal:pe.openModal$,openSlidePanel:_e.openSlidePanel$,presentWindow:Ee.presentWindow$,previewImage:Ne.previewImage$,previewVideo:Pe.previewVideo$,scan:he.scan$,scanCard:me.scanCard$,setScreenBrightnessAndKeepOn:Me.setScreenBrightnessAndKeepOn$,share:ye.share$,systemShare:ke.systemShare$,timepicker:ge.timepicker$,uploadAttachment:be.uploadAttachment$,uploadImage:Ie.uploadImage$,uploadImageFromCamera:Ae.uploadImageFromCamera$,ut:Se.ut$},verify:{openBindIDCard:Ve.openBindIDCard$,startAuth:Ue.startAuth$}},channel:{permission:{requestAuthCode:Oe.requestAuthCode$}},device:{accelerometer:{clearShake:je.clearShake$,watchShake:we.watchShake$},audio:{download:$e.download$,onPlayEnd:De.onPlayEnd$,onRecordEnd:Ce.onRecordEnd$,pause:Te.pause$,play:xe.play$,resume:Fe.resume$,startRecord:We.startRecord$,stop:Re.stop$,stopRecord:Le.stopRecord$,translateVoice:Be.translateVoice$},base:{getInterface:ze.getInterface$,getPhoneInfo:qe.getPhoneInfo$,getUUID:Ye.getUUID$,getWifiStatus:Je.getWifiStatus$},connection:{getNetworkType:Ge.getNetworkType$},geolocation:{get:He.get$,start:Ke.start$,status:Xe.status$,stop:Qe.stop$},launcher:{checkInstalledApps:Ze.checkInstalledApps$,launchApp:et.launchApp$},nfc:{nfcRead:tt.nfcRead$,nfcStop:nt.nfcStop$,nfcWrite:rt.nfcWrite$},notification:{actionSheet:ot.actionSheet$,alert:it.alert$,confirm:at.confirm$,extendModal:st.extendModal$,hidePreloader:dt.hidePreloader$,modal:ut.modal$,prompt:ct.prompt$,showPreloader:lt.showPreloader$,toast:ft.toast$,vibrate:vt.vibrate$},screen:{insetAdjust:pt.insetAdjust$,resetView:_t.resetView$,rotateView:Et.rotateView$}},net:{bjGovApn:{loginGovNet:Nt.loginGovNet$}},runtime:{message:{fetch:Pt.fetch$,post:ht.post$},permission:{requestAuthCode:mt.requestAuthCode$,requestOperateAuthCode:Mt.requestOperateAuthCode$}},ui:{input:{plain:yt.plain$},nav:{close:kt.close$,getCurrentId:gt.getCurrentId$,go:bt.go$,preload:It.preload$,recycle:At.recycle$},progressBar:{setColors:St.setColors$},pullToRefresh:{disable:Vt.disable$,enable:Ut.enable$,stop:Ot.stop$},webViewBounce:{disable:jt.disable$,enable:wt.enable$}},util:{domainStorage:{getItem:$t.getItem$,removeItem:Dt.removeItem$,setItem:Ct.setItem$}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(179)}])}); \ No newline at end of file diff --git a/src/main/web/src/modules/lib/sha.util.js b/src/main/web/src/modules/lib/sha.util.js new file mode 100644 index 0000000..e6a5d91 --- /dev/null +++ b/src/main/web/src/modules/lib/sha.util.js @@ -0,0 +1,99 @@ +// SHA1 +function add(x, y) { + return((x & 0x7FFFFFFF) + (y & 0x7FFFFFFF)) ^ (x & 0x80000000) ^ (y & 0x80000000); +} + +function SHA1hex(num) { + var sHEXChars = "0123456789abcdef"; + var str = ""; + for(var j = 7; j >= 0; j--) + str += sHEXChars.charAt((num >> (j * 4)) & 0x0F); + return str; +} + +function AlignSHA1(sIn) { + var nblk = ((sIn.length + 8) >> 6) + 1, + blks = new Array(nblk * 16); + for(var i = 0; i < nblk * 16; i++) blks[i] = 0; + for(i = 0; i < sIn.length; i++) + blks[i >> 2] |= sIn.charCodeAt(i) << (24 - (i & 3) * 8); + blks[i >> 2] |= 0x80 << (24 - (i & 3) * 8); + blks[nblk * 16 - 1] = sIn.length * 8; + return blks; +} + +function rol(num, cnt) { + return(num << cnt) | (num >>> (32 - cnt)); +} + +function ft(t, b, c, d) { + if(t < 20) return(b & c) | ((~b) & d); + if(t < 40) return b ^ c ^ d; + if(t < 60) return(b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +function kt(t) { + return(t < 20) ? 1518500249 : (t < 40) ? 1859775393 : + (t < 60) ? -1894007588 : -899497514; +} + +function SHA1(sIn) { + var x = AlignSHA1(sIn); + var w = new Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + for(var i = 0; i < x.length; i += 16) { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + for(var j = 0; j < 80; j++) { + if(j < 16) w[j] = x[i + j]; + else w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); + t = add(add(rol(a, 5), ft(j, b, c, d)), add(add(e, w[j]), kt(j))); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + a = add(a, olda); + b = add(b, oldb); + c = add(c, oldc); + d = add(d, oldd); + e = add(e, olde); + } + SHA1Value = SHA1hex(a) + SHA1hex(b) + SHA1hex(c) + SHA1hex(d) + SHA1hex(e); + return SHA1Value.toUpperCase(); +} + +function SHA2(sIn) { + return SHA1(sIn).toLowerCase(); +} + +// JavaScript内部对字符串是UTF-16编码,要想加密结果和java保持一致需要先转成UTF-8 +function utf16to8(str) { + var out, i, len, c; + + out = ""; + len = str.length; + for(i = 0; i < len; i++){ + c = str.charCodeAt(i); + if ((c >= 0x0001) && (c <= 0x007F)) { + out += str.charAt(i); + } else if (c > 0x07FF){ + out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F)); + out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F)); + out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); + } else { + out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F)); + out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); + } + } + return out; +} diff --git a/src/main/web/src/modules/module/button/clipboard.button.js b/src/main/web/src/modules/module/button/clipboard.button.js new file mode 100644 index 0000000..c770d57 --- /dev/null +++ b/src/main/web/src/modules/module/button/clipboard.button.js @@ -0,0 +1,41 @@ +!(function () { + var ClipboardButton = BI.inherit(BI.Widget, { + props: { + width: 80, + height: 24, + text: '', + copy: function () { + + }, + afterCopy: function () { + + } + }, + + render: function () { + var self = this, o = this.options; + var clipBoard = BI.createWidget({ + type: 'bi.clipboard', + width: o.width, + height: o.height, + element: self, + copy: function () { + return o.copy(); + }, + afterCopy: function () { + o.afterCopy(); + } + }); + + var button = BI.createWidget({ + type: 'bi.button', + width: o.width, + height: o.height, + text: o.text, + element: clipBoard + }); + } + }); + + BI.shortcut('dingtalksyn.clipboard.button', ClipboardButton); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.chat.group.js b/src/main/web/src/modules/module/combo/combo.chat.group.js new file mode 100644 index 0000000..55d301f --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.chat.group.js @@ -0,0 +1,66 @@ +!(function () { + var ChatGroupCombo = BI.inherit(BI.Widget, { + props: { + count: 10 + }, + + _store: function () { + return BI.Models.getModel("dingtalksyn.model.chatgroup.combo"); + }, + + beforeInit: function (callback) { + var self = this; + BI.Services.getService("dingtalksyn.service.schedule.event").on("AGENT_CHANGE", function (v) { + self.store.setSelectedAgentId(v); + }); + this.store.init(callback); + }, + + watch: { + selectedValue: function (v) { + this.combo.setValue(v); + }, + + selectedAgentId: function (v) { + // 应用变化,那么群肯定需要重新选择 + this.store.setSelectedValue({}); + } + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.multi_select_combo", + value: self.model.selectedValue, + valueFormatter: BI.bind(this.store.valueFormatter, this), + itemsCreator: BI.bind(this.store.itemsCreator, this), + width: o.width, + height: o.height, + ref: function (_ref) { + self.combo = _ref; + }, + listeners: [{ + eventName: "EVENT_CONFIRM", + action: function () { + self.store.setSelectedValue(this.getValue()); + self.fireEvent("EVENT_CONFIRM", this.getValue()); + } + }] + }; + }, + + destroyed: function () { + BI.Services.getService("dingtalksyn.service.schedule.event").un("AGENT_CHANGE"); + }, + + getValue: function () { + return this.model.selectedValue; + }, + + setValue: function (v) { + this.store.setSelectedValue(v); + } + }); + + BI.shortcut("dingtalksyn.chatgroup.combo", ChatGroupCombo); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.chat.group.member.js b/src/main/web/src/modules/module/combo/combo.chat.group.member.js new file mode 100644 index 0000000..74b1c30 --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.chat.group.member.js @@ -0,0 +1,52 @@ +!(function () { + var ChatGroupMemberCombo = BI.inherit(BI.Widget, { + props: { + count: 50, + selectLeader: false + }, + + _store: function () { + return BI.Models.getModel("dingtalksyn.model.chatgroup.member.combo", this.options); + }, + + watch: { + agentId: function (v) { + this.setValue(null); + } + }, + + render: function () { + var self = this, o = this.options; + return { + type: o.selectLeader ? "bi.single_select_combo" : "bi.multi_select_combo", + allowNoSelect: true, + value: o.value, + text: o.text, + valueFormatter: BI.bind(this.store.valueFormatter, this), + itemsCreator: BI.bind(this.store.itemsCreator, this), + width: o.width, + height: o.height, + ref: function (_ref) { + self.combo = _ref; + }, + listeners: [{ + eventName: "EVENT_CONFIRM", + action: function () { + var selectedMember = this.getValue(); + self.fireEvent("EVENT_CONFIRM", selectedMember); + } + }] + }; + }, + + getValue: function () { + return this.combo.getValue(); + }, + + setValue: function (v) { + this.combo.setValue(v); + } + }); + + BI.shortcut("dingtalksyn.chatgroup.member.combo", ChatGroupMemberCombo); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.chat.group.member.model.js b/src/main/web/src/modules/module/combo/combo.chat.group.member.model.js new file mode 100644 index 0000000..3dededd --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.chat.group.member.model.js @@ -0,0 +1,107 @@ +!(function () { + var Model = BI.inherit(Fix.Model, { + _init: function () { + var o = this.options; + this.resultItems = []; + this.map = {}; + if (!BI.isEmpty(o.value)) { + this.map[o.value] = o.text + " (" + o.value + ")"; + } + }, + + context: ["agentId"], + + actions: { + getMembers: function (times, count, keyword, callback) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/agentmember', + type: 'GET', + data: { + startIdx: (times - 1) * count, + count: count, + agentId: self.model.agentId, + keyword: BI.isKey(keyword) ? keyword : "" + }, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + var data = result.data; + var hasNext = data.total > times * count; + callback(data.userList, hasNext); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result); + } + } + } + }); + }, + + itemsCreator: function (options, populate) { + var self = this, o = this.options, keyword = BI.isNotEmptyArray(options.keywords) ? options.keywords.join("") : ""; + if (o.selectLeader) { + if (options.type === BI.SingleSelectCombo.REQ_GET_DATA_LENGTH) { + populate({}); + return; + } + } else { + if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { + populate({ + items: this.resultItems + }); + return; + } + + if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { + populate({ + count: this.resultItems.length + }); + return; + } + } + + if(options.times) { + this.getMembers(options.times, o.count, keyword, function (res, hasNext) { + if (options.selectedValues) { + var filter = BI.makeObject(options.selectedValues, true); + res = BI.filter(res, function (i, ob) { + return !filter[ob.userId]; + }); + } + self.resultItems = self._processUserItems(res); + populate({ + items: self.resultItems, + hasNext: hasNext + }); + }); + } + }, + + _processUserItems: function (items) { + var self = this, o = this.options; + return BI.map(items, function (i, v) { + self.map[v.userId] = v.name; + return o.selectLeader ? { + type: "bi.text_item", + textLgap: 10, + title: v.name, + text: v.name, + value: v.userId, + cls: "bi-list-item" + } : { + text: v.name, + value: v.userId, + title: v.name + }; + }); + }, + + valueFormatter: function (v) { + return this.map[v] || v; + } + } + }); + + BI.model("dingtalksyn.model.chatgroup.member.combo", Model); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.chat.group.model.js b/src/main/web/src/modules/module/combo/combo.chat.group.model.js new file mode 100644 index 0000000..399497f --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.chat.group.model.js @@ -0,0 +1,113 @@ +!(function () { + var Model = BI.inherit(Fix.Model, { + state: function () { + return { + chatGroups: {}, + selectedAgentId: BI.Services.getService("dingtalksyn.service.schedule.event").getSelectedAgentId() + } + }, + + context: ["selectedValue"], + + computed: { + chatGroupItems: function () { + return this._processChatItems(this.model.chatGroups); + } + }, + + actions: { + init: function (callback) { + this.map = {}; + this.getAllChatGroups(callback); + }, + + getAllChatGroups: function (callback) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/chatgroup', + type: 'GET', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.chatGroups = result.chatGroups; + self._processChatItems(self.model.chatGroups); // 这里只是为了生成一下map,否则不点开下拉框map无法生成 + callback(); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result); + } + } + } + }); + }, + + itemsCreator: function (options, populate) { + var self = this, keywords = (options.keywords || []).slice(); + + var items = BI.filter(self.model.chatGroupItems, function (i, ob) { + return ob.agentId === self.model.selectedAgentId; + }); + + if (options.keyword) { + keywords.push(options.keyword); + } + BI.each(keywords, function (i, keyword) { + var search = BI.Func.getSearchResult(items, keyword); + items = search.match.concat(search.find); + }); + + if (options.selectedValues) { + var filter = BI.makeObject(options.selectedValues, true); + items = BI.filter(items, function (i, ob) { + return !filter[ob.value]; + }); + } + + if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { + populate({ + items: items + }); + return; + } + + if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { + populate({ + count: items.length + }); + return; + } + + populate({ + items: items, + hasNext: false + }); + }, + + _processChatItems: function (items) { + var self = this, o = this.options; + return BI.map(items, function (i, v) { + self.map[v.chatGroupId] = v.chatGroupName; + return { + text: v.chatGroupName, + value: v.chatGroupId, + agentId: v.agentId + }; + }); + }, + + valueFormatter: function (v) { + return this.map[v] || v; + }, + + setSelectedValue: function (v) { + this.model.selectedValue = v; + }, + + setSelectedAgentId: function (v) { + this.model.selectedAgentId = v; + } + } + }); + + BI.model("dingtalksyn.model.chatgroup.combo", Model); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.editortext.js b/src/main/web/src/modules/module/combo/combo.editortext.js new file mode 100644 index 0000000..ec4f94b --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.editortext.js @@ -0,0 +1,78 @@ +(function() { + var EditorTextCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(EditorTextCombo.superclass._defaultConfig.apply(this, arguments), { + baseClass: "", + width: 100, + height: 24, + allowBlank: true, + watermark: "", + editable: false, + errorText: "" + }) + }, + + _init: function () { + EditorTextCombo.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.trigger = BI.createWidget({ + type: "dingtalksyn.editor_trigger", + items: o.items, + height: o.height, + allowBlank: o.allowBlank, + watermark: o.watermark, + editable: o.editable, + errorText: o.errorText, + value: o.value + }); + this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () { + self.popup.setValue(this.getValue()); + self.fireEvent(EditorTextCombo.EVENT_CHANGE, arguments); + }); + this.popup = BI.createWidget({ + type: "bi.text_value_combo_popup", + value: o.value, + items: o.items + }); + this.popup.on(EditorTextCombo.EVENT_CHANGE, function () { + self.setValue(self.popup.getValue()); + self.editorTextCombo.hideView(); + self.fireEvent(EditorTextCombo.EVENT_CHANGE, arguments); + }); + this.popup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editorTextCombo = BI.createWidget({ + type: "bi.combo", + element: this, + adjustLength: 2, + el: this.trigger, + popup: { + el: this.popup, + maxHeight: 300 + } + }); + }, + + setValue: function (v) { + this.editorTextCombo.setValue(v); + }, + + setText: function(t) { + this.trigger.setText(t); + }, + + getValue: function () { + return this.trigger.getValue(); + }, + + populate: function (items) { + this.options.items = items; + this.trigger.populate(items); + this.editorTextCombo.populate(items); + } + }); + + EditorTextCombo.EVENT_CHANGE = "EVENT_CHANGE"; + BI.shortcut("dingtalksyn.editor_text_value_combo", EditorTextCombo); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.searcheditor.js b/src/main/web/src/modules/module/combo/combo.searcheditor.js new file mode 100644 index 0000000..ebe54e6 --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.searcheditor.js @@ -0,0 +1,110 @@ +!(function() { + var SearchTextValueCombo = BI.inherit(BI.Widget, { + + props: { + baseCls: "bi-search-text-value-combo", + height: 30, + text: "", + items: [] + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.absolute", + cls: 'dingtalksyn-search-combo-container', + items: [{ + el: { + type: "bi.combo", + adjustLength: 2, + toggle: false, + ref: function () { + self.combo = this; + }, + el: { + type: "dingtalksyn.search_text_value_trigger", + ref: function () { + self.trigger = this; + }, + items: o.items, + height: o.height - 2, + text: o.text, + value: o.value, + listeners: [{ + eventName: "EVENT_CHANGE", + action: function () { + self.setValue(this.getValue()); + self.combo.hideView(); + self.fireEvent(SearchTextValueCombo.EVENT_CHANGE); + } + }] + }, + popup: { + el:{ + type: "bi.text_value_combo_popup", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, + value: o.value, + items: o.items, + ref: function () { + self.popup = this; + self.trigger.getSearcher().setAdapter(self.popup); + }, + listeners: [{ + eventName: BI.TextValueComboPopup.EVENT_CHANGE, + action: function () { + self.setValue(this.getValue()); + self.combo.hideView(); + self.fireEvent(SearchTextValueCombo.EVENT_CHANGE); + } + }] + }, + maxHeight: 300 + }, + listeners: [{ + eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, + action: function(){ + self.trigger.stopEditing(); + } + }] + }, + left: 0, + right: 0, + bottom: 0, + top: 0 + }, { + el: { + type: "bi.trigger_icon_button", + cls: 'dingtalksyn-search-combo-button', + width: o.height, + handler: function () { + if (self.combo.isViewVisible()) { + self.combo.hideView(); + } else { + self.combo.showView(); + } + } + }, + right: 0, + bottom: 0, + top: 0 + }] + } + }, + + populate: function (items) { + this.options.items = items; + this.combo.populate(items); + }, + + setValue: function (v) { + this.combo.setValue(v); + }, + + getValue: function () { + var value = this.popup.getValue(); + return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]); + } + }); + SearchTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; + BI.shortcut("dingtalksyn.search_text_value_combo", SearchTextValueCombo); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.user.js b/src/main/web/src/modules/module/combo/combo.user.js new file mode 100644 index 0000000..0b29cff --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.user.js @@ -0,0 +1,41 @@ +!(function () { + var UserCombo = BI.inherit(BI.Widget, { + props: { + text: "" + }, + + _store: function () { + return BI.Models.getModel("dingtalksyn.model.user.combo", this.options); + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.single_select_combo", + allowNoSelect: true, + value: o.value, + text: o.text, + valueFormatter: BI.bind(this.store.valueFormatter, this), + itemsCreator: BI.bind(this.store.itemsCreator, this), + width: o.width, + height: o.height, + ref: function (_ref) { + self.userCombo = _ref; + }, + listeners: [{ + eventName: "EVENT_CONFIRM", + action: function () { + var user = this.getValue(); + self.fireEvent("EVENT_CONFIRM", user); + } + }] + }; + }, + + getValue: function () { + return this.userCombo.getValue(); + } + }); + + BI.shortcut("dingtalksyn.user.combo", UserCombo); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/combo/combo.user.model.js b/src/main/web/src/modules/module/combo/combo.user.model.js new file mode 100644 index 0000000..7d9d85f --- /dev/null +++ b/src/main/web/src/modules/module/combo/combo.user.model.js @@ -0,0 +1,69 @@ +!(function () { + var Model = BI.inherit(Fix.Model, { + _init: function () { + var o = this.options; + this.map = {}; + if (!BI.isEmpty(o.value)) { + this.map[o.value] = o.text + " (" + o.value + ")"; + } + }, + + actions: { + getUsers: function (times, count, keyword, callback) { + Dec.Utils.reqUsersByPage({ + page: times, + count: count, + keyword: keyword + }, function (res) { + var data = res.data; + var hasNext = data.total > times * count; + callback(data.items, hasNext); + }); + }, + + itemsCreator: function (options, populate) { + var self = this, o = this.options, keyword = options.keywords && options.keywords[0]; + + if (options.type === BI.SingleSelectCombo.REQ_GET_DATA_LENGTH) { + populate({}); + return; + } + + if(options.times) { + this.getUsers(options.times, o.count, keyword, function (res, hasNext) { + if (options.selectedValues) { + var filter = BI.makeObject(options.selectedValues, true); + res = BI.filter(res, function (i, ob) { + return !filter[ob.username]; + }); + } + populate({ + items: self._processUserItems(res), + hasNext: hasNext + }); + }); + } + }, + + _processUserItems: function (items) { + var self = this; + return BI.map(items, function (i, v) { + self.map[v.username] = v.realName + " (" + v.username + ")"; + return { + type: "bi.text_item", + textLgap: 10, + text: v.realName + " (" + v.username + ")", + value: v.username, + cls: "bi-list-item" + }; + }); + }, + + valueFormatter: function (v) { + return this.map[v] || v; + } + } + }); + + BI.model("dingtalksyn.model.user.combo", Model); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/constants/constant.js b/src/main/web/src/modules/module/constants/constant.js new file mode 100644 index 0000000..943be65 --- /dev/null +++ b/src/main/web/src/modules/module/constants/constant.js @@ -0,0 +1,162 @@ +!(function() { + BI.constant('dingtalksyn.constants.management.tabs',[{ + text: BI.i18nText("Dec-DingTalkSyn_Agent-Management"), + cls: 'dec-font-weight-bold', + value: "agent", + selected: true + }, { + text: BI.i18nText("Dec-DingTalkSyn_Member-Management"), + cls: 'dec-font-weight-bold', + value: "member" + }, { + text: BI.i18nText("Dec-DingTalkSyn_Agent-Config"), + cls: 'dec-font-weight-bold', + value: "config" + }]); + + BI.constant('dingtalksyn.constants.agentmanagement.table.header', [ + [{ + text: BI.i18nText("Dec-DingTalkSyn_Agent-Name"), + baseCls: '', // fineUI的previewTable才能支持列宽百分比,但是表头文字会被加粗,这里把表头加粗的样式去掉 + cls: 'dingtalksyn-table-header', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Agent-Id'), + baseCls: '', + cls: 'dingtalksyn-table-header', + height: 33 + }, { + text: 'CorpID', + baseCls: '', + cls: 'dingtalksyn-table-header', + height: 33 + }, { + text: 'AppKey', + baseCls: '', + cls: 'dingtalksyn-table-header', + height: 33 + }, { + text: 'AppSecret', + baseCls: '', + cls: 'dingtalksyn-table-header', + height: 33 + }] + ]); + + BI.constant('dingtalksyn.constants.member.management.tabs', [{ + text: BI.i18nText('Dec-DingTalkSyn_Organizational-Structure'), + value: 'departments', + width: 100, + selected: true + }, { + text: BI.i18nText('Dec-DingTalkSyn_Tag'), + value: 'tag', + width: 100 + }]); + + BI.constant('dingtalksyn.constants.member.management.table.header.fsusername', [ + [{ + text: BI.i18nText('Dec-DingTalkSyn_Name'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_User_Job_Name'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_DecUserName'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_UserID'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Department'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Mobile'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }] + ]); + + BI.constant('dingtalksyn.constants.member.management.table.header.nonfsusername', [ + [{ + text: BI.i18nText('Dec-DingTalkSyn_Name'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_User_Job_Name'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_UserID'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Department'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Mobile'), + baseCls: '', + cls: 'dingtalksyn-table-header', + whiteSpace: 'nowrap', + height: 33 + }] + ]); + + BI.constant('dingtalksyn.constants.chatgroup.management.table.header', [ + [{ + text: BI.i18nText("Dec-DingTalkSyn_Enterprise_Agent"), + baseCls: '', + cls: 'dingtalksyn-table-header', + height: 33 + }, { + text: BI.i18nText("Dec-DingTalkSyn_Chatgroup_Name"), + baseCls: '', + cls: 'dingtalksyn-table-header', + height: 33 + }] + ]); + + BI.constant('dingtalksyn.constants', { + popup_create_agent: 'create_agent', + popup_create_chat_group: 'create_chat_group', + popup_not_null: 'popup_not_null', + popup_auto_update_member: 'popup_auto_update_member', + popup_alert: 'popup_alert', + popup_alert_detail: 'popup_alert_detail', + popup_loading_syn_users: 'popup_loading_syn_users', + popup_loading_configuration: 'popup_loading_configuration', + popup_result_tip_popup: 'popup_result_tip_popup', + agent_type_valid: 1, + agent_type_token_empty: 2, + matching_fs_way_user_id: 0, + matching_fs_way_mobile: 1, + matching_fs_way_custom: 2, + matching_fs_way_dataSet: 3 + }); +}()); \ No newline at end of file diff --git a/src/main/web/src/modules/module/constants/errorcode.js b/src/main/web/src/modules/module/constants/errorcode.js new file mode 100644 index 0000000..8586cab --- /dev/null +++ b/src/main/web/src/modules/module/constants/errorcode.js @@ -0,0 +1,28 @@ +!(function() { + if (!Dec.DingTalkSyn) { + Dec.DingTalkSyn = {}; + } + + Dec.DingTalkSyn.ERROR_CODE_OK = 0; + Dec.DingTalkSyn.ERROR_CODE_ILLEGAL_PARAMETERS = 11205025; + + Dec.DingTalkSyn.ERRORCODE = { + '11205011': 'Dec-DingTalkSyn_Delete-Agent-Fail', + '11205012': 'Dec-DingTalkSyn_Save-ReportServer-Url-Fail', + '11205013': 'Dec-DingTalkSyn_Save-Agent-Fail', + '11205015': 'Dec-DingTalkSyn_Save-Timing-Task-Fail', + '11205017': 'Dec-DingTalkSyn_Error-AppKey-And-AgentId', + '11205018': 'Dec-DingTalkSyn_Duplicate-Agent-Name', + '11205019': 'Dec-DingTalkSyn_Save-Match-Method-Fail', + '11205020': 'Dec-DingTalkSyn_Duplicate-Agent-Id', + '11205023': 'Dec-DingTalkSyn_Save-Proxy-Server-Fail', + '11205024': 'Dec-DingTalkSyn_Connect-Proxy-Server-Fail', + '11205026': 'Dec-DingTalkSyn_Save-User-Relation-Fail', + '11205031': 'Dec-DingTalkSyn_Error-AppKey-And-AppSecret', + '11205035': 'Dec-DingTalkSyn_Tip-Get-ReportServer-Url-Fail', + '11205036': 'Dec-DingTalkSyn_IP-Config-Not-Available', + '11205037': 'Dec-DingTalkSyn_NetWork-Invalid', + '11205039': 'Dec-DingTalkSyn_Download-Fail', + '11205041': 'Dec-DingTalkSyn_Create-Chat-Group-Fail' + } +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/editor/editor.sign.js b/src/main/web/src/modules/module/editor/editor.sign.js new file mode 100644 index 0000000..597fc65 --- /dev/null +++ b/src/main/web/src/modules/module/editor/editor.sign.js @@ -0,0 +1,295 @@ +!(function() { + var SignEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = SignEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-sign-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + allowBlank: true, + watermark: "", + errorText: "", + editable: false, + height: 24, + items: [] + }); + }, + + _init: function () { + SignEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + var text = ''; + var value = BI.isArray(o.value) ? o.value[0] : o.value; + BI.each(o.items, function(index, item) { + if (item.value === value) { + text = item.text; + } + }); + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: text, + allowBlank: o.allowBlank, + watermark: o.watermark, + disabled: !o.editable, + errorText: o.errorText, + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "sign-editor-text", + title: o.title, + warningTitle: o.warningTitle, + tipType: o.tipType, + textAlign: "left", + height: o.height, + value: text, + hgap: 4, + handler: function () { + if (self.options.editable) { + self._showInput(); + self.editor.focus(); + self.editor.selectAll(); + } + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent(SignEditor.EVENT_CLICK_LABEL); + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent(SignEditor.EVENT_FOCUS, arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent(SignEditor.EVENT_BLUR, arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent(SignEditor.EVENT_CLICK, arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent(SignEditor.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent(SignEditor.EVENT_KEY_DOWN, arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent(SignEditor.EVENT_VALID, arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self._checkText(); + self.fireEvent(SignEditor.EVENT_CONFIRM, arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent(SignEditor.EVENT_START, arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent(SignEditor.EVENT_PAUSE, arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent(SignEditor.EVENT_STOP, arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent(SignEditor.EVENT_SPACE, arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self._checkText(); + self.fireEvent(SignEditor.EVENT_ERROR, arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent(SignEditor.EVENT_ENTER, arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent(SignEditor.EVENT_RESTRICT, arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent(SignEditor.EVENT_EMPTY, arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + self._checkText(); + }, + + _checkText: function () { + var o = this.options; + BI.nextTick(BI.bind(function () { + if (this.editor.getValue() === "") { + this.text.setValue(o.watermark || ""); + this.text.element.addClass("bi-water-mark"); + } else { + this.text.setValue(this.editor.getValue()); + this.text.element.removeClass("bi-water-mark"); + } + }, this)); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + setTitle: function (title) { + this.text.setTitle(title); + }, + + setWarningTitle: function (title) { + this.text.setWarningTitle(title); + }, + + focus: function () { + this._showInput(); + this.editor.focus(); + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + this._checkText(); + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + var self = this; + k = BI.isArray(k) ? k[0] : k; + if(self.options.items.length === 0) { + self.editor.setValue(""); + self._checkText(); + return ; + } + var valueExists = false; + BI.each(self.options.items, function(index, item) { + if (item.value === k) { + valueExists = true; + self.editor.setValue(item.text); + self._checkText(); + } + }); + if (!valueExists) { + self.editor.setValue(''); + self._checkText(); + } + }, + + getValue: function () { + var self = this; + for (var i = 0; i < self.options.items.length; i++) { + if (self.options.items[i].text === self.editor.getValue()) { + return self.options.items[i].value; + } + } + }, + + setEditable: function(v) { + this.options.editable = v; + this.editor.setEnable(v); + }, + + getEditable: function() { + return this.editor.isEnabled(); + }, + + getState: function () { + return this.text.getValue(); + }, + + setState: function (v) { + this._showHint(); + this.text.setValue(v); + } + }); + SignEditor.EVENT_CHANGE = "EVENT_CHANGE"; + SignEditor.EVENT_FOCUS = "EVENT_FOCUS"; + SignEditor.EVENT_BLUR = "EVENT_BLUR"; + SignEditor.EVENT_CLICK = "EVENT_CLICK"; + SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; + SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; + + SignEditor.EVENT_START = "EVENT_START"; + SignEditor.EVENT_PAUSE = "EVENT_PAUSE"; + SignEditor.EVENT_STOP = "EVENT_STOP"; + SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; + SignEditor.EVENT_VALID = "EVENT_VALID"; + SignEditor.EVENT_ERROR = "EVENT_ERROR"; + SignEditor.EVENT_ENTER = "EVENT_ENTER"; + SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; + SignEditor.EVENT_SPACE = "EVENT_SPACE"; + SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; + + BI.shortcut("dingtalksyn.sign_editor", SignEditor); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/editor/editor.state.js b/src/main/web/src/modules/module/editor/editor.state.js new file mode 100644 index 0000000..ddda05c --- /dev/null +++ b/src/main/web/src/modules/module/editor/editor.state.js @@ -0,0 +1,257 @@ +// 由于bi4.1fineui已经合并到4月初发布的platform中,新建一个editor.state.js修改bug,之后可以删除,继续用bi.state_editor +!(function() { + var StateEditor = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = StateEditor.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-state-editor", + hgap: 4, + vgap: 2, + lgap: 0, + rgap: 0, + tgap: 0, + bgap: 0, + validationChecker: BI.emptyFn, + quitChecker: BI.emptyFn, + allowBlank: true, + watermark: "", + errorText: "", + height: 24 + }); + }, + + _init: function () { + StateEditor.superclass._init.apply(this, arguments); + var self = this, o = this.options; + this.editor = BI.createWidget({ + type: "bi.editor", + height: o.height, + hgap: o.hgap, + vgap: o.vgap, + lgap: o.lgap, + rgap: o.rgap, + tgap: o.tgap, + bgap: o.bgap, + value: o.value, + validationChecker: o.validationChecker, + quitChecker: o.quitChecker, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText + }); + this.text = BI.createWidget({ + type: "bi.text_button", + cls: "state-editor-infinite-text", + textAlign: "left", + height: o.height, + text: BI.i18nText("BI-Basic_Unrestricted"), + hgap: 4, + handler: function () { + self._showInput(); + self.editor.focus(); + self.editor.setValue(""); + } + }); + this.text.on(BI.TextButton.EVENT_CHANGE, function () { + BI.nextTick(function () { + self.fireEvent('EVENT_CLICK_LABEL'); + }); + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.text, + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.Editor.EVENT_FOCUS, function () { + self.fireEvent('EVENT_FOCUS', arguments); + }); + this.editor.on(BI.Editor.EVENT_BLUR, function () { + self.fireEvent('EVENT_BLUR', arguments); + }); + this.editor.on(BI.Editor.EVENT_CLICK, function () { + self.fireEvent('EVENT_CLICK', arguments); + }); + this.editor.on(BI.Editor.EVENT_CHANGE, function () { + self.fireEvent('EVENT_CHANGE', arguments); + }); + this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { + self.fireEvent('EVENT_KEY_DOWN', arguments); + }); + + this.editor.on(BI.Editor.EVENT_VALID, function () { + self.fireEvent('EVENT_VALID', arguments); + }); + this.editor.on(BI.Editor.EVENT_CONFIRM, function () { + self._showHint(); + self.fireEvent('EVENT_CONFIRM', arguments); + }); + this.editor.on(BI.Editor.EVENT_START, function () { + self.fireEvent('EVENT_START', arguments); + }); + this.editor.on(BI.Editor.EVENT_PAUSE, function () { + self.fireEvent('EVENT_PAUSE', arguments); + }); + this.editor.on(BI.Editor.EVENT_STOP, function () { + self.fireEvent('EVENT_STOP', arguments); + }); + this.editor.on(BI.Editor.EVENT_SPACE, function () { + self.fireEvent('EVENT_SPACE', arguments); + }); + this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.fireEvent('EVENT_ERROR', arguments); + }); + this.editor.on(BI.Editor.EVENT_ENTER, function () { + self.fireEvent('EVENT_ENTER', arguments); + }); + this.editor.on(BI.Editor.EVENT_RESTRICT, function () { + self.fireEvent('EVENT_RESTRICT', arguments); + }); + this.editor.on(BI.Editor.EVENT_EMPTY, function () { + self.fireEvent('EVENT_EMPTY', arguments); + }); + BI.createWidget({ + type: "bi.vertical", + scrolly: false, + element: this, + items: [this.editor] + }); + this._showHint(); + if(BI.isNotNull(o.text)){ + this.setState(o.text); + } + }, + + doRedMark: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { + return; + } + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + focus: function () { + if (this.options.disabled === false) { + this._showInput(); + this.editor.focus(); + } + }, + + blur: function () { + this.editor.blur(); + this._showHint(); + }, + + _showInput: function () { + this.editor.visible(); + this.text.invisible(); + }, + + _showHint: function () { + this.editor.invisible(); + this.text.visible(); + }, + + isValid: function () { + return this.editor.isValid(); + }, + + setErrorText: function (text) { + this.editor.setErrorText(text); + }, + + getErrorText: function () { + return this.editor.getErrorText(); + }, + + isEditing: function () { + return this.editor.isEditing(); + }, + + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + setValue: function (k) { + this.editor.setValue(k); + }, + + getValue: function () { + return this.editor.getValue(); + }, + + getState: function () { + return this.editor.getValue().match(/[^\s]+/g); + }, + + setState: function (v) { + StateEditor.superclass.setValue.apply(this, arguments); + if (BI.isNumber(v)) { + if (v === BI.Selection.All) { + this.text.setText(BI.i18nText("BI-Select_All")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } else if (v === BI.Selection.Multi) { + this.text.setText(BI.i18nText("BI-Select_Part")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.setTitle(""); + this.text.element.addClass("state-editor-infinite-text"); + } + return; + } + if (BI.isString(v)) { + // if (BI.isEmpty(v)) { + // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + // this.text.setTitle(""); + // this.text.element.addClass("state-editor-infinite-text"); + // } else { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + // } + return; + } + if (BI.isArray(v)) { + if (BI.isEmpty(v)) { + this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.element.addClass("state-editor-infinite-text"); + } else if (v.length === 1) { + this.text.setText(v[0]); + this.text.setTitle(v[0]); + this.text.element.removeClass("state-editor-infinite-text"); + } else { + this.text.setText(BI.i18nText("BI-Select_Part")); + this.text.setTitle(""); + this.text.element.removeClass("state-editor-infinite-text"); + } + } + } + }); + + BI.shortcut("dingtalksyn.state_editor", StateEditor); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/linesegement/button.line_segment.js b/src/main/web/src/modules/module/linesegement/button.line_segment.js new file mode 100644 index 0000000..9147164 --- /dev/null +++ b/src/main/web/src/modules/module/linesegement/button.line_segment.js @@ -0,0 +1,60 @@ +!(function () { + var LineSegmentButton = BI.inherit(BI.BasicButton, { + props: { + baseCls: 'bi-line-segment-button bi-list-item-effect cursor-pointer', + once: true, + readonly: true, + hgap: 10, + height: 25 + }, + + render: function () { + var o = this.options, self = this; + this.text = BI.createWidget({ + type: "bi.label", + element: this, + text: o.text, + width: o.width, + height: o.height, + value: o.value, + hgap: o.hgap + }); + + this.line = BI.createWidget({ + type: "bi.layout", + cls: "line-segment-button-line", + height: 2 + }); + BI.createWidget({ + type: "bi.absolute", + element: this, + items: [{ + el: this.line, + left: o.hgap - 1, + right: o.hgap - 1, + bottom: 0 + }] + }) + }, + + setSelected: function (v) { + LineSegmentButton.superclass.setSelected.apply(this, arguments); + if (v) { + this.line.element.addClass("bi-high-light-background"); + } else { + this.line.element.removeClass("bi-high-light-background"); + } + }, + + setText: function (text) { + LineSegmentButton.superclass.setText.apply(this, arguments); + this.text.setText(text); + }, + + destroy: function () { + LineSegmentButton.superclass.destroy.apply(this, arguments); + } + }); + BI.shortcut('dingtalksyn.line_segment_button', LineSegmentButton); +}()); + diff --git a/src/main/web/src/modules/module/linesegement/line_segment.js b/src/main/web/src/modules/module/linesegement/line_segment.js new file mode 100644 index 0000000..e3186ed --- /dev/null +++ b/src/main/web/src/modules/module/linesegement/line_segment.js @@ -0,0 +1,68 @@ +!(function () { + var LineSegment = BI.inherit(BI.Widget, { + props: { + baseCls: "decision-line-segment", + items: [], + height: 30, + hgap: 15, + layouts: [ + { + type: "bi.horizontal" + } + ], + defaultValue: null + }, + + render: function () { + var self = this, o = this.options; + if (BI.isNumber(o.height)) { + this.element.css({height: o.height, lineHeight: (o.height) + 'px'}); + } + this.buttonGroup = BI.createWidget({ + element: this, + type: "bi.button_group", + items: BI.createItems(o.items, { + type: "dingtalksyn.line_segment_button", + height: o.height, + hgap: o.hgap + }), + layouts: o.layouts + }); + this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) { + self.fireEvent(LineSegment.EVENT_CHANGE, value, obj); + }); + if (!BI.isNull(o.defaultValue)) { + this.setValue(o.defaultValue); + } + }, + + setValue: function (v) { + this.buttonGroup.setValue(v); + }, + + setEnabledValue: function (v) { + this.buttonGroup.setEnabledValue(v); + }, + + + getValue: function () { + return this.buttonGroup.getValue(); + }, + + populate: function (items) { + var o = this.options; + this.buttonGroup.populate(BI.createItems(items, { + type: "dingtalksyn.line_segment_button", + height: o.height + })) + } + + }); + LineSegment.EVENT_CHANGE = "EVENT_CHANGE"; + BI.shortcut('dingtalksyn.line_segment', LineSegment); +}()); + + diff --git a/src/main/web/src/modules/module/popup/chatgroup/popup.create.chatgroup.js b/src/main/web/src/modules/module/popup/chatgroup/popup.create.chatgroup.js new file mode 100644 index 0000000..89a54aa --- /dev/null +++ b/src/main/web/src/modules/module/popup/chatgroup/popup.create.chatgroup.js @@ -0,0 +1,298 @@ +!(function() { + var ChatGroupPopover = BI.inherit(BI.Widget, { + props: { + noClose: false + }, + + _store: function () { + return BI.Models.getModel("dingtalksyn.model.create.chatgroup.popover", this.options); + }, + + watch: { + agentId: function (v) { + this.store.setGroupLeader(''); + this.store.setGroupMemberValue({}); + } + }, + + render: function() { + return { + type: "bi.vtape", + items: [ + { + el: this._rebuildCenter() + }, { + el: this._rebuildSouth(), + height: 44 + } + ] + }; + }, + + getValue: function() { + return { + agentId: this.model.agentId, + groupName: this.model.groupName, + groupLeader: this.model.groupLeader, + groupMember: this.model.groupMemberValue + }; + }, + + _rebuildCenter: function() { + return this._createChatGroupPane({}) + }, + + _rebuildSouth: function() { + var self = this, o = this.options; + var sure = { + type: "bi.button", + text: BI.i18nText('Dec-DingTalkSyn_Confirm'), + width: 80, + height: 25, + value: 0, + handler: function (v) { + if (self._checkValid()) { + self.end(); + } + } + }; + + var cancel = o.noClose? {} : { + type: "bi.button", + text: BI.i18nText('Dec-DingTalkSyn_Cancel'), + width: 80, + height: 25, + value: 1, + level: "ignore", + handler: function (v) { + self.close(v); + }, + rgap:10 + }; + + return { + type: "bi.right_vertical_adapt", + items: [cancel, sure] + }; + }, + + end: function() { + this.fireEvent("EVENT_CONFIRM"); + }, + + _checkValid: function() { + var result = true; + if (!BI.isKey(this.model.agentId)) { + result = false; + this.agentComboErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not_Null')); + } + + if (!BI.isKey(this.model.groupName)) { + result = false; + this.chatGroupNameErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not_Null')); + } + + if (this.model.groupName.length > 20) { + result = false; + this.chatGroupNameErrorPane.showError(BI.i18nText("Dec-DingTalkSyn_Chat_Group_Name_Length_Tip")); + } + + if (!BI.isKey(this.model.groupLeader)) { + result = false; + this.groupLeaderComboErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not_Null')); + } + + if (this.model.groupMemberValue.type === BI.Selection.Multi) { + if (this.model.groupMemberValue.value.length < 1) { + result = false; + this.groupMemberComboErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not_Null')); + } else if (this.model.groupMembers.length < 2) { + result = false; + this.groupMemberComboErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Chat_Group_Member_Tip')) + } + } else if (BI.isEmpty(this.model.groupMemberValue) || this.model.groupMemberValue.type === BI.Selection.None) { + result = false; + this.groupMemberComboErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not_Null')); + } + + return result; + }, + + close: function () { + this.fireEvent("EVENT_CLOSE"); + }, + + _createChatGroupPane: function() { + var self = this; + return { + type: 'bi.vertical', + cls: 'dingtalksyn-overflow-visible', + items: [{ + type: "bi.html_label", + cls: "bi-tips", + textAlign: 'left', + text: "
  • " + BI.i18nText("Dec-DingTalkSyn_New_Chat_Group_Tip1") + "
  • " + BI.i18nText("Dec-DingTalkSyn_New_Chat_Group_Tip2") + "
", + whiteSpace: "normal", + lgap: -25, + tgap: -10, + }, { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Enterprise_Agent'), + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 335, + el: { + type: "bi.text_value_combo", + height: 24, + items: self.model.agents, + ref: function(_ref) { + self.agentCombo = _ref; + }, + listeners: [{ + eventName: 'EVENT_CHANGE', + action: function () { + self.agentComboErrorPane.hideError(); + self.store.setAgentId(this.getValue()[0]); + } + }] + }, + ref: function (_ref) { + self.agentComboErrorPane = _ref; + } + } + + ] + }, + }, { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Chatgroup_Name'), + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 335, + el: { + type: "bi.editor", + cls: "bi-border dingtalksyn-border-box", + height: 24, + errorTextHeight: 18, + allowBlank: true, + ref: function (_ref) { + self.chatGroupName = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_FOCUS, + action: function () { + self.chatGroupNameErrorPane.hideError(); + } + }, { + eventName: BI.Editor.EVENT_CONFIRM, + action: function () { + self.store.setGroupName(this.getValue()); + } + }] + }, + ref: function (_ref) { + self.chatGroupNameErrorPane = _ref; + } + } + + ] + }, + tgap: 10 + }, { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Chat_Group_Leader'), + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 335, + el: { + type: "dingtalksyn.chatgroup.member.combo", + selectLeader: true, + height: 24, + ref: function(_ref) { + self.groupLeaderCombo = _ref; + }, + listeners: [{ + eventName: "EVENT_CONFIRM", + action: function (v) { + self.groupLeaderComboErrorPane.hideError(); + self.groupMemberComboErrorPane.hideError(); + self.store.setGroupLeader(v); + } + }] + }, + ref: function (_ref) { + self.groupLeaderComboErrorPane = _ref; + } + } + + ] + }, + tgap: 10 + }, { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Chat_Group_Member'), + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 335, + el: { + type: "dingtalksyn.chatgroup.member.combo", + selectLeader: false, + height: 24, + ref: function(_ref) { + self.groupMemberCombo = _ref; + }, + listeners: [{ + eventName: "EVENT_CONFIRM", + action: function (v) { + self.groupMemberComboErrorPane.hideError(); + self.store.setGroupMemberValue(v); + } + }] + }, + ref: function (_ref) { + self.groupMemberComboErrorPane = _ref; + } + } + + ] + }, + tgap: 10 + }] + }; + } + }); + + BI.shortcut('dingtalksyn.create.chatgroup.popover', ChatGroupPopover); +})(); diff --git a/src/main/web/src/modules/module/popup/chatgroup/popup.create.chatgroup.model.js b/src/main/web/src/modules/module/popup/chatgroup/popup.create.chatgroup.model.js new file mode 100644 index 0000000..db72c0a --- /dev/null +++ b/src/main/web/src/modules/module/popup/chatgroup/popup.create.chatgroup.model.js @@ -0,0 +1,76 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + childContext: ["agentId"], + + state: function () { + return { + agentId: '', + groupName: '', + groupLeader: '', + groupMemberValue: {} + } + }, + + computed: { + agents: function () { + var agents = BI.filter(this.options.agentList, function(index, agent) { + return Dec.DingTalkSyn.Util.isValidAgent(agent.validStatus); + }); + return BI.map(agents, function(index, agent) { + return { + text: agent.agentName + '-' + agent.agentId, + value: agent.id + } + }); + }, + + groupMembers: function () { + var members = this.model.groupMemberValue ? this.model.groupMemberValue.value : []; + return this._filterLeaderInGroupMember(members); + } + }, + + actions: { + setAgentId: function (id) { + this.model.agentId = id; + }, + + getAgentId: function () { + return this.model.agentId; + }, + + setGroupName: function (name) { + this.model.groupName = name; + }, + + getGroupName: function () { + return this.model.groupName; + }, + + setGroupLeader: function (leader) { + this.model.groupLeader = leader; + }, + + getGroupLeader: function () { + return this.model.groupLeader; + }, + + setGroupMemberValue: function (v) { + this.model.groupMemberValue = v; + }, + + getGroupMemberValue: function () { + return this.model.groupMemberValue; + }, + + _filterLeaderInGroupMember: function (groupMembers) { + var self = this; + return BI.filter(groupMembers, function (i, member) { + return member !== self.model.groupLeader; + }); + } + } + }); + + BI.model("dingtalksyn.model.create.chatgroup.popover", Model); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/popup/controller/popup.loading.controller.js b/src/main/web/src/modules/module/popup/controller/popup.loading.controller.js new file mode 100644 index 0000000..cce7afe --- /dev/null +++ b/src/main/web/src/modules/module/popup/controller/popup.loading.controller.js @@ -0,0 +1,134 @@ +!(function() { + if (!Dec.DingTalkSyn) { + Dec.DingTalkSyn = {} + } + + Dec.DingTalkSyn.LoadingPopupController = BI.inherit(BI.Controller, { + _defaultConfig: function () { + return BI.extend( Dec.DingTalkSyn.LoadingPopupController.superclass._defaultConfig.apply(this, arguments), { + render: "body" + }); + }, + + _init: function () { + Dec.DingTalkSyn.LoadingPopupController.superclass._init.apply(this, arguments); + this.floatManager = {}; + this.floatLayer = {}; + this.floatContainer = {}; + this.floatOpened = {}; + this.zindex = BI.zIndex_popover; + this.zindexMap = {}; + }, + + _check: function (name) { + return BI.isNotNull(this.floatManager[name]); + }, + + create: function (name, options) { + if (this._check(name)) { + return this; + } + var popover = BI.createWidget(options || {}, { + type: "dingtalksyn.loading.popup" + }); + this.add(name, popover, options); + return this; + }, + + add: function (name, popover, options) { + var self = this; + options || (options = {}); + if (this._check(name)) { + return this; + } + this.floatContainer[name] = BI.createWidget({ + type: "bi.absolute", + items: [{ + el: (this.floatLayer[name] = BI.createWidget({ + type: "bi.absolute", + items: [popover] + })), + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + this.floatManager[name] = popover; + BI.createWidget({ + type: "bi.absolute", + element: options.container || this.options.render, + items: [{ + el: this.floatContainer[name], + left: 0, + right: 0, + top: 0, + bottom: 0 + }] + }); + return this; + }, + + open: function (name) { + if (!this._check(name)) { + return this; + } + if (!this.floatOpened[name]) { + this.floatOpened[name] = true; + var container = this.floatContainer[name]; + container.element.css("zIndex", this.zindex++); + container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); + this.zindexMap[name] = this.zindex; + container.element.__buildZIndexMask__(this.zindex++); + this.get(name).setZindex(this.zindex++); + this.floatContainer[name].visible(); + var popover = this.get(name); + popover.show && popover.show(); + var W = $(this.options.render).width(), H = $(this.options.render).height(); + var w = popover.element.width(), h = popover.element.height(); + var left = (W - w) / 2, top = (H - h) / 2; + if (left < 0) { + left = 0; + } + if (top < 0) { + top = 0; + } + popover.element.css({ + left: left + "px", + top: top + "px" + }); + } + return this; + }, + + close: function (name) { + if (!this._check(name)) { + return this; + } + if (this.floatOpened[name]) { + delete this.floatOpened[name]; + this.floatContainer[name].invisible(); + this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); + } + return this; + }, + + get: function (name) { + return this.floatManager[name]; + }, + + remove: function (name) { + if (!this._check(name)) { + return this; + } + this.floatContainer[name].destroy(); + this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); + delete this.floatManager[name]; + delete this.floatLayer[name]; + delete this.zindexMap[name]; + delete this.floatContainer[name]; + delete this.floatOpened[name]; + return this; + } + }); +}) (); diff --git a/src/main/web/src/modules/module/popup/detail/alert/popup.detail.alert.js b/src/main/web/src/modules/module/popup/detail/alert/popup.detail.alert.js new file mode 100644 index 0000000..255df86 --- /dev/null +++ b/src/main/web/src/modules/module/popup/detail/alert/popup.detail.alert.js @@ -0,0 +1,112 @@ +!(function () { + var DetailAlert = BI.inherit(BI.Widget, { + props: { + baseCls: "dingtalksyn-detail-alert", + iconCls: "upload-fail-icon", + tipText: "", + detailText: "" + }, + + _store: function () { + return BI.Models.getModel("dingtalksyn.model.detail.alert"); + }, + + watch: { + showDetail: function (v) { + this.detail.setVisible(v); + var detailBtnText = v ? BI.i18nText("Dec-Basic_Pack_Up_Information") : BI.i18nText("Dec-Basic_Detailed_Information"); + this.detailBtn.setText(detailBtnText); + } + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.center_adapt", + cls: "bi-z-index-mask", + items: [{ + type: "bi.absolute", + width: 450, + height: 250, + cls: "bi-card", + items: [{ + el: { + type: "bi.vertical", + items: [{ + type: "dec.tip.icon.vertical", + iconCls: o.iconCls, + iconTgap: 40, + text: o.tipText + }, { + type: "bi.horizontal_float", + items: [{ + type: "bi.vertical_adapt", + tgap: 15, + items: [{ + type: "bi.button", + text: BI.i18nText("Dec-Basic_Detailed_Information"), + level: "ignore", + width: 80, + height: 24, + ref: function (_ref) { + self.detailBtn = _ref; + }, + handler: function () { + self.store.setShowDetail(!self.model.showDetail); + } + }, { + type: "bi.button", + hgap: 10, + height: 24, + level: "ignore", + text: BI.i18nText("Dec-Basic_Back"), + handler: function () { + self.fireEvent("EVENT_CLOSE"); + } + }] + }] + }] + }, + top: 0, left: 0, bottom: 0, right: 0 + }, { + el: { + type: "bi.vertical", + cls: "bi-card", + hgap: 5, + items: [{ + el: { + type: "bi.vertical", + height: 73, + cls: "dingtalksyn-error-background", + hgap: 10, + scrolly: true, + invisible: !self.model.showDetail, + items: [{ + el: { + type: "dec.label.line.feed", + cls: "dingtalksyn-message-board", + width: 400, + textHeight: 16, + text: o.detailText, + ref: function (_ref) { + self.detailMessage = _ref; + } + }, + tgap: 5 + }], + ref: function (_ref) { + self.detail = _ref; + } + }, + bgap: 10 + }] + }, + top: 190, left: 0, right: 0 + }] + }] + } + } + }); + + BI.shortcut('dingtalksyn.detail.alert', DetailAlert); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/popup/detail/alert/popup.detail.alert.model.js b/src/main/web/src/modules/module/popup/detail/alert/popup.detail.alert.model.js new file mode 100644 index 0000000..0fe1473 --- /dev/null +++ b/src/main/web/src/modules/module/popup/detail/alert/popup.detail.alert.model.js @@ -0,0 +1,16 @@ +!(function () { + var Model = BI.inherit(Fix.Model, { + state: function() { + return { + showDetail: false + } + }, + + actions: { + setShowDetail: function (v) { + this.model.showDetail = v; + } + } + }); + BI.model("dingtalksyn.model.detail.alert", Model); +}()); diff --git a/src/main/web/src/modules/module/popup/popup.alert.js b/src/main/web/src/modules/module/popup/popup.alert.js new file mode 100644 index 0000000..00f6d3e --- /dev/null +++ b/src/main/web/src/modules/module/popup/popup.alert.js @@ -0,0 +1,66 @@ +!(function() { + var AlertPopover = BI.inherit(BI.Widget, { + props: { + label: '', + end: null + }, + + render: function() { + return { + type: "bi.vtape", + items: [ + { + el: this._rebuildCenter() + }, { + el: this._rebuildSouth(), + height: 44 + } + ] + } + }, + + _rebuildCenter: function() { + return { + type: 'bi.vertical', + items:[{ + type: 'bi.label', + textAlign: 'left', + whiteSpace: 'normal', + text: this.options.label + }] + } + }, + + _rebuildSouth: function() { + var self = this, o = this.options; + var sure = { + type: "bi.button", + cls: 'dingtalksyn-popup-confirm-button', + text: BI.i18nText('Dec-DingTalkSyn_Confirm'), + width: 80, + height: 25, + value: 0, + handler: function (v) { + if (BI.isFunction(o.end)) { + o.end(); + } + self.close(v); + } + }; + + return { + type: "bi.right_vertical_adapt", + cls: 'dingtalksyn-popup-south-container', + lgap: 10, + items: [sure] + }; + }, + + close: function () { + this.fireEvent("EVENT_CLOSE"); + } + }); + + BI.shortcut('dingtalksyn.alert.popover', AlertPopover); +}) (); + diff --git a/src/main/web/src/modules/module/popup/popup.auto_update_member.js b/src/main/web/src/modules/module/popup/popup.auto_update_member.js new file mode 100644 index 0000000..13265ee --- /dev/null +++ b/src/main/web/src/modules/module/popup/popup.auto_update_member.js @@ -0,0 +1,300 @@ +!(function() { + var ScheduleTaskPopover = BI.inherit(BI.Widget, { + props: { + executeTimingTask: false, + timingTaskFrequencyType: 0, + timingTaskStartDay: 1, + timingTaskStartHour: '12', + timingTaskStartMinute: '00' + }, + + render: function() { + return { + type: "bi.vtape", + items: [ + { + el: this._rebuildCenter() + }, { + el: this._rebuildSouth(), + height: 44 + } + ] + } + }, + + _rebuildCenter: function() { + var self = this; + return { + type: 'bi.vertical', + items: [ + { + type: 'bi.vertical_adapt', + items: [{ + type: 'bi.checkbox', + width: 16, + height: 16, + selected: self.options.executeTimingTask, + ref: function (_ref) { + self.executeTimingTaskCheckBox = _ref; + } + }, { + type: 'bi.label', + lgap: 2, + text: BI.i18nText('Dec-DingTalkSyn_Start-Update') + }] + }, { + el: { + type: 'bi.vertical_adapt', + items: [{ + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Per'), + width: 12 + }, { + type: "dingtalksyn.editor_text_value_combo", + lgap: 7, + width: 60, + height: 24, + value: self.options.timingTaskFrequencyType, + items: [{ + text: BI.i18nText('Dec-DingTalkSyn_Day'), + value: 0 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Week'), + value: 1 + }], + ref: function(_ref) { + self.timingTaskFrequencyTypeCombo = _ref; + }, + listeners: [{ + eventName: BI.TextValueCombo.EVENT_CHANGE, + action: function () { + var v = this.getValue(); + if (v === 0) { + self.timingTaskStartDayCombo.setVisible(false); + } else if (v === 1) { + self.timingTaskStartDayCombo.setVisible(true); + } + } + }] + }, { + type: "dingtalksyn.editor_text_value_combo", + lgap: 7, + width: 60, + height: 24, + value: self.options.timingTaskStartDay, + items: [{ + text: BI.i18nText('Dec-DingTalkSyn_Monday'), + value: 1 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Tuesday'), + value: 2 + },{ + text: BI.i18nText('Dec-DingTalkSyn_Wednesday'), + value: 3 + },{ + text: BI.i18nText('Dec-DingTalkSyn_Thursday'), + value: 4 + },{ + text: BI.i18nText('Dec-DingTalkSyn_Friday'), + value: 5 + },{ + text: BI.i18nText('Dec-DingTalkSyn_Saturday'), + value: 6 + },{ + text: BI.i18nText('Dec-DingTalkSyn_Sunday'), + value: 0 + }], + invisible: !self.options.timingTaskFrequencyType, + ref: function(_ref) { + self.timingTaskStartDayCombo = _ref; + } + }, { + type: "dec.error_label", + width: 60, + lgap: 7, + el: { + type: 'bi.editor', + cls: "bi-border dingtalksyn-border-box", + allowBlank: true, + width: 60, + height: 24, + value: self.options.timingTaskStartHour, + ref: function(_ref) { + self.timingTaskStartHourEditor = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_CHANGE, + action: function () { + self.hourErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + self.hourErrorPane = _ref; + } + }, { + el: { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Hour'), + width: 12 + }, + lgap: 7 + }, { + type: "dec.error_label", + width: 60, + lgap: 7, + el: { + type: 'bi.editor', + cls: "bi-border dingtalksyn-border-box", + allowBlank: true, + height: 24, + value: self.options.timingTaskStartMinute, + ref: function(_ref) { + self.timingTaskStartMinuteEditor = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_CHANGE, + action: function () { + self.minuteErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + self.minuteErrorPane = _ref; + } + }, { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Minute') + BI.i18nText('Dec-DingTalkSyn_Update-Once'), + lgap: 4 + }] + }, + tgap: 10 + } + ] + }; + }, + + _rebuildSouth: function() { + var self = this, o = this.options; + var sure = BI.createWidget({ + type: "bi.button", + cls: 'dingtalksyn-popup-confirm-button', + text: BI.i18nText('Dec-DingTalkSyn_Confirm'), + width: 80, + height: 25, + value: 0, + handler: function (v) { + if (self._checkValid()) { + self.end(); + self.close(v); + } + } + }); + var cancel = BI.createWidget({ + type: "bi.button", + cls: 'dingtalksyn-popup-cancel-button', + text: BI.i18nText('Dec-DingTalkSyn_Cancel'), + width: 80, + height: 25, + value: 1, + level: "ignore", + handler: function (v) { + self.close(v); + } + }); + return { + type: "bi.right_vertical_adapt", + cls: 'dingtalksyn-popup-south-container', + lgap: 10, + items: [cancel, sure] + }; + }, + + end: function() { + this._saveTimingTaskData(); + }, + + _checkValid: function() { + var self = this; + var result = true; + if (!BI.isKey(self.timingTaskStartHourEditor.getValue())) { + result = false; + self.hourErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not-Null')); + } else if (!self._isHourValid()) { + result = false; + self.hourErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Illegal')); + } + + if (!BI.isKey(self.timingTaskStartMinuteEditor.getValue())) { + result = false; + self.minuteErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not-Null')); + } else if (!self._isMinuteValid()) { + result = false; + self.minuteErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Illegal')); + } + + return result; + }, + + _saveTimingTaskData: function() { + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/timing/task', + type: 'POST', + data: { + enableAutoSync: this.executeTimingTaskCheckBox.isSelected(), + period: this.timingTaskFrequencyTypeCombo.getValue(), + startWeekDay: this.timingTaskStartDayCombo.getValue(), + startHour: parseInt(this.timingTaskStartHourEditor.getValue()), // 把01,02这种去0 + startMinute: parseInt(this.timingTaskStartMinuteEditor.getValue()) + }, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + BI.Msg.toast(BI.i18nText("Dec-Basic_Success")); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + close: function () { + this.fireEvent("EVENT_CLOSE"); + }, + + /** + * 小时输入是否合法 + */ + _isHourValid: function() { + var self = this; + return self._isNumber(self.timingTaskStartHourEditor.getValue()) + && parseInt(self.timingTaskStartHourEditor.getValue()) < 24 + && parseInt(self.timingTaskStartHourEditor.getValue()) >= 0 + }, + + /** + * 分钟输入是否合法 + */ + _isMinuteValid: function() { + var self = this; + return self._isNumber(self.timingTaskStartMinuteEditor.getValue()) + && parseInt(self.timingTaskStartMinuteEditor.getValue()) < 60 + && parseInt(self.timingTaskStartMinuteEditor.getValue()) >= 0 + }, + + /** + * 判断num是否是合法数字 允许0开头的两位数 + * @param num + * @returns {boolean} + */ + _isNumber: function(num) { + var reg = /^\d{1,2}$/; + return reg.test(num); + } + }); + + BI.shortcut('dingtalksyn.schedule.task.popover', ScheduleTaskPopover); +}) (); + diff --git a/src/main/web/src/modules/module/popup/popup.create_agent.js b/src/main/web/src/modules/module/popup/popup.create_agent.js new file mode 100644 index 0000000..e8f021f --- /dev/null +++ b/src/main/web/src/modules/module/popup/popup.create_agent.js @@ -0,0 +1,413 @@ +!(function() { + var AgentPopover = BI.inherit(BI.Widget, { + props: { + id: [], + agentName: [], + agentId: [], + corpId: [], + appKey: [], + appSecret: [], + tipLabel: '', + refreshAgentList: null, + noClose: false + }, + + render: function() { + var self = this; + self.secArr = []; + return { + type: "bi.vtape", + items: [ + { + el: this._rebuildCenter() + }, { + el: this._rebuildSouth(), + height: 44 + } + ] + }; + }, + + getValue: function() { + var dataArr = []; + for (var i = 0; i < this.secArr.length; i++) { + var data = {}; + if (this.secArr[i].id) { + data.id = this.secArr[i].id; + } + data.agentName = this.secArr[i].agentName.getValue(); + data.agentId = this.secArr[i].agentId.getValue(); + data.corpId = this.secArr[i].corpId.getValue(); + data.appKey = this.secArr[i].appKey.getValue(); + data.appSecret = this.secArr[i].appSecret.getValue(); + dataArr.push(data); + } + return { + agents: dataArr, + compatible: this.options.noClose + }; + }, + + _rebuildCenter: function() { + var self = this, o = this.options; + var tipLabel = {}; + if (self.options.tipLabel) { + tipLabel = { + type: 'bi.label', + cls: 'dingtalksyn-gray-color', + text: self.options.tipLabel, + textAlign: 'left', + whiteSpace: 'normal' + } + } + + var items = []; + items.push(tipLabel); + if (o.agentName.length > 0) { + for (var i = 0; i < o.agentName.length; i++) { + !(function(index) { + var sec = self._createAgentSection({ + id: o.id[index], + agentName: o.agentName[index], + agentId: o.agentId[index], + corpId: o.corpId[index], + appKey: o.appKey[index], + appSecret: o.appSecret[index] + }); + items.push(sec); + }) (i); + } + } else { + var sec = self._createAgentSection({}); + items.push(sec); + } + + var appSecretTipLabel = { + el: { + type: 'bi.label', + cls: 'bi-disabled', + text: BI.i18nText('Dec-DingTalkSyn_Create-Agent-Tip'), + textAlign: 'left', + textHeight: 12, + whiteSpace: 'normal' + }, + lgap: 80, + tgap: 10 + }; + + items.push(appSecretTipLabel); + + return { + type: 'bi.vertical', + cls: 'dingtalksyn-create-agent-popup-content dingtalksyn-overflow-visible', + items: items + } + }, + + _rebuildSouth: function() { + var self = this, o = this.options; + var sure = { + type: "bi.button", + cls: 'dingtalksyn-popup-confirm-button', + text: BI.i18nText('Dec-DingTalkSyn_Confirm'), + width: 80, + height: 25, + value: 0, + handler: function (v) { + if (self._checkValid()) { + self.end(); + } + } + }; + + var cancel = o.noClose? {} : { + type: "bi.button", + cls: 'dingtalksyn-popup-cancel-button', + text: BI.i18nText('Dec-DingTalkSyn_Cancel'), + width: 80, + height: 25, + value: 1, + level: "ignore", + handler: function (v) { + self.close(v); + } + }; + + return { + type: "bi.right_vertical_adapt", + cls: 'dingtalksyn-popup-south-container', + rgap: 10, + items: [cancel, sure] + }; + }, + + end: function() { + this.fireEvent("EVENT_CONFIRM"); + }, + + _checkValid: function() { + var self = this; + var result = true; + for (var i = 0; i < self.secArr.length; i++) { + var agentName = self.secArr[i].agentName; + var agentId = self.secArr[i].agentId; + var corpId = self.secArr[i].corpId; + var appKey = self.secArr[i].appKey; + var appSecret = self.secArr[i].appSecret; + + if (!BI.isKey(agentName.getValue())) { + result = false; + self.secArr[i].agentNameErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not-Null')); + } + + if (!BI.isKey(agentId.getValue())) { + result = false; + self.secArr[i].agentIdErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not-Null')); + } + + if (!BI.isKey(corpId.getValue())) { + result = false; + self.secArr[i].corpIdErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not-Null')); + } + + if (!BI.isKey(appKey.getValue())) { + result = false; + self.secArr[i].appKeyErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not-Null')); + } + + if (!BI.isKey(appSecret.getValue())) { + result = false; + self.secArr[i].secretErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not-Null')); + } + } + + return result; + }, + + close: function () { + this.fireEvent("EVENT_CLOSE"); + }, + + _createAgentSection: function(props) { + var self = this; + var secJo = {}; + if (props instanceof Object) { + props.agentName = props.agentName || ''; + props.agentId = props.agentId || ''; + props.corpId = props.corpId || ''; + props.appKey = props.appKey || ''; + props.appSecret = props.appSecret || ''; + } + + var sec = { + type: 'bi.vertical', + cls: 'dingtalksyn-overflow-visible', + items: [ + { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Agent-Name'), + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 330, + el: { + type: "bi.editor", + cls: "bi-border dingtalksyn-border-box", + height: 24, + errorTextHeight: 18, + allowBlank: true, + value: props.agentName, + ref: function(_ref) { + secJo.agentName = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_FOCUS, + action: function () { + secJo.agentNameErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + secJo.agentNameErrorPane = _ref; + } + } + + ] + }, + { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Agent-Id'), + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 330, + el: { + type: "bi.editor", + cls: "bi-border dingtalksyn-border-box", + value: props.agentId, + height: 24, + errorTextHeight: 18, + allowBlank: true, + ref: function(_ref) { + secJo.agentId = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_FOCUS, + action: function () { + secJo.agentIdErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + secJo.agentIdErrorPane = _ref; + } + } + + ] + }, + tgap: 10 + }, + { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: 'CorpID', + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 330, + el: { + type: "bi.editor", + cls: "bi-border dingtalksyn-border-box", + value: props.corpId, + height: 24, + errorTextHeight: 18, + allowBlank: true, + ref: function (_ref) { + secJo.corpId = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_FOCUS, + action: function () { + secJo.corpIdErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + secJo.corpIdErrorPane = _ref; + } + } + + ] + }, + tgap: 10 + }, + { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: 'AppKey', + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 330, + el: { + type: "bi.editor", + cls: "bi-border dingtalksyn-border-box", + value: props.appKey, + height: 24, + errorTextHeight: 18, + allowBlank: false, + ref: function(_ref) { + secJo.appKey = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_FOCUS, + action: function () { + secJo.appKeyErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + secJo.appKeyErrorPane = _ref; + } + } + + ] + }, + tgap: 10 + }, + { + el: { + type: 'bi.vertical_adapt', + items: [ + { + type: 'bi.label', + text: 'AppSecret', + textAlign: 'left', + width: 80, + height: 12 + }, + { + type: "dec.error_label", + width: 330, + el: { + type: "bi.editor", + cls: "bi-border dingtalksyn-border-box", + value: props.appSecret, + height: 24, + errorTextHeight: 18, + allowBlank: false, + ref: function(_ref) { + secJo.appSecret = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_FOCUS, + action: function () { + secJo.secretErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + secJo.secretErrorPane = _ref; + } + } + + ] + }, + tgap: 10 + } + ] + }; + secJo.id = props.id; + self.secArr.push(secJo); + + return sec; + } + }); + + BI.shortcut('dingtalksyn.create.agent.popover', AgentPopover); +})(); diff --git a/src/main/web/src/modules/module/popup/popup.loading.js b/src/main/web/src/modules/module/popup/popup.loading.js new file mode 100644 index 0000000..1375d38 --- /dev/null +++ b/src/main/web/src/modules/module/popup/popup.loading.js @@ -0,0 +1,55 @@ +!(function() { + var LoadingPopup = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(LoadingPopup.superclass._defaultConfig.apply(this, arguments), { + baseCls: "dingtalksyn-loading-popup bi-card", + width: 450, + height: 250, + body: null + }); + }, + + render: function() { + var self = this; + var items = { + center: { + el: { + type: "bi.absolute", + width: self.options.width, + height: self.options.height, + items: [{ + el: BI.createWidget(this.options.body), + left: 0, + top: 0, + right: 0, + bottom: 0 + }] + } + } + }; + + return { + type: "bi.border", + items: items, + width: this.options.width, + height: this.options.height + }; + }, + + open: function () { + this.show(); + this.fireEvent('EVENT_OPEN', arguments); + }, + + close: function () { + this.hide(); + this.fireEvent('EVENT_CLOSE', arguments); + }, + + setZindex: function (zindex) { + this.element.css({"z-index": zindex}); + }, + }); + + BI.shortcut('dingtalksyn.loading.popup', LoadingPopup); +}) (); diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tab.dingtalk_management.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tab.dingtalk_management.js new file mode 100644 index 0000000..0b3520e --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tab.dingtalk_management.js @@ -0,0 +1,123 @@ +!(function() { + var Tabs = BI.inherit(BI.Widget, { + _store: function() { + return BI.Models.getModel('dingtalksyn.model.management'); + }, + + watch: { + selectedTab: function(v) { + this.tab.setSelect(v); + } + }, + + render: function() { + var self = this; + this.navTabs = BI.Constants.getConstant('dingtalksyn.constants.management.tabs'); + this.nav = this._createNavTab(); + + return { + type: 'bi.vtape', + element: this, + items: [ + { + type: 'bi.absolute', + cls: 'dingtalksyn-tab-title', + height: 40, + items: [ + { + el: this.nav, + top: 0, left: 0, bottom: 0, right: 0 + } + ] + }, { + type: "bi.absolute", + cls: 'dingtalksyn-tab-content', + items: [ + { + el: { + type: 'bi.tab', + ref: function () { + self.tab = this; + }, + single: false, + showIndex: this.model.selectedTab, + defaultShowIndex: this.model.selectedTab, + cardCreator: BI.bind(this._createTabPane, this) + }, + top: 10, + right: 10, + bottom: 10, + left: 10 + } + ] + }], + bgap: 1 + } + }, + + _createNavTab: function() { + var self = this; + return { + type: "dingtalksyn.line_segment", + items: self.navTabs, + listeners: [ + { + eventName: "EVENT_CHANGE", + action: function (v) { + self.store.setSelectedTab(v); + if (v === 'member' && self.memberManagementTab) { + self.memberManagementTab.store.getDepMemberData({}); + self.memberManagementTab.depMemberPane.store.getDepTreeData(); + self.memberManagementTab._clearPageEditor(); + } + } + } + ], + height: 40 + }; + }, + + _createTabPane: function (v) { + var self = this; + switch (v) { + case 'agent': + return { + type: 'dingtalksyn.agentmanagement', + ref: function(_ref) { + self.agentManagementTab = _ref; + } + }; + case 'member': + return { + type: 'bi.vertical', + cls: 'dingtalksyn-member-management-container', + items: [{ + height: '100%', + type: 'dingtalksyn.membermanagement', + ref: function(_ref) { + self.memberManagementTab = _ref; + } + }] + }; + case 'config': + return { + type: 'bi.vertical', + cls: 'dingtalksyn-quick-config-container', + items: [{ + height: '100%', + type: 'dingtalksyn.agentquickconfig', + ref: function(_ref) { + self.quickConfigTab = _ref; + } + }] + }; + default: + return { + type: 'dingtalksyn.agentmanagement' + }; + } + } + }); + + BI.shortcut("dingtalksyn.tab", Tabs); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tab.dingtalk_management.model.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tab.dingtalk_management.model.js new file mode 100644 index 0000000..5af3b3f --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tab.dingtalk_management.model.js @@ -0,0 +1,21 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + + state: function() { + return { + selectedTab: BI.Constants.getConstant("dingtalksyn.constants.management.tabs")[0].value, + agentList: [], + total: 0 + } + }, + + actions: { + setSelectedTab: function(selectedTab) { + this.model.selectedTab = selectedTab; + } + }, + + childContext: ["selectedTab", "agentList"] + }); + BI.model("dingtalksyn.model.management", Model); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/agent.quick.config.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/agent.quick.config.js new file mode 100644 index 0000000..d66ad56 --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/agent.quick.config.js @@ -0,0 +1,417 @@ +/** + * 应用快捷配置模块 + * + * @author fanglei + * @since 2017/12/16 + */ + +!(function() { + var AgentQuickConfig = BI.inherit(BI.Widget, { + render: function() { + this.proxyPane = this._createProxyPane(); + this.agentUrlPane = this._createAgentUrlPane(); + this.chatGroupPane = this._createChatGroupPane(); + + return ({ + type: 'bi.flex_vertical', + rowSize: ['', '', 'fill'], + horizontalAlign: 'stretch', + items: [{ + el: this.proxyPane + }, { + el: this.agentUrlPane, + tgap: 10 + }, { + el: this.chatGroupPane, + tgap: 10 + }] + }); + }, + + mounted: function() { + this._initData(); + }, + + _store: function() { + return BI.Models.getModel("dingtalksyn.model.quick.config"); + }, + + watch: { + proxyServer: function() { + this.proxyUrlPane.setValue(this.model.proxyServer); + }, + + agentList: function() { + this._populateAgentListCombo(); + }, + + dingTalkUrl: function() { + this.createUrlPane.setValue(this.model.dingTalkUrl); + } + }, + + _initData: function() { + this.store.getProxyServer(); + this._populateAgentListCombo(); + }, + + _populateAgentListCombo: function() { + var self = this; + var items = self.model.agentListComboItems; + self.agentListCombo.populate(items); + self.agentListCombo.setValue(items[0] && items[0].value); + }, + + _createProxyPane: function() { + var self = this; + return { + type: 'bi.vertical', + cls: 'dingtalksyn-section-container', + hgap: 15, + items: [ + { + type: 'bi.left_right_vertical_adapt', + cls: 'bi-border-bottom', + height: 40, + items: { + left: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Proxy'), + cls: 'dec-font-weight-bold' + }], + right: [{ + width: 80, + height: 24, + type: 'bi.button', + text: BI.i18nText('Dec-DingTalkSyn_Save'), + handler: function () { + var proxyUrl = self.proxyUrlPane.getValue().trim(); + var callBack = function() { + this.store.saveProxyServer(proxyUrl); + }; + self._checkProxyUrlValid(proxyUrl, callBack); + } + }] + } + }, + { + el: { + type: 'bi.vertical_adapt', + height: 40, + items: [ + { + type: 'bi.vertical_adapt', + items: [{ + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Proxy_Address'), + textAlign: 'left' + }, { + el: { + type: "bi.icon_label", + cls: "blue-remark-font", + title: BI.i18nText("Dec-DingTalkSyn_Proxy_Address_Tip") + }, + lgap: 5 + }], + width: 116 + }, + { + el: { + type: 'bi.editor', + cls: "bi-border", + width: 300, + height: 24, + allowBlank: true, + ref: function (_ref) { + self.proxyUrlPane = _ref; + } + }, + rgap: 10 + }, + { + height: 24, + type: 'bi.button', + text: BI.i18nText('Dec-DingTalkSyn_Test-Proxy-Address'), + handler: function () { + var proxyUrl = self.proxyUrlPane.getValue().trim(); + var callBack = function() { + this.store.testProxyServer(proxyUrl); + }; + self._checkProxyUrlValid(proxyUrl, callBack); + } + } + ] + }, + vgap: 15 + } + ] + } + }, + + _createAgentUrlPane: function() { + var self = this; + return { + type: 'bi.vertical', + cls: 'dingtalksyn-section-container', + hgap: 15, + items: [ + { + type: 'bi.left_right_vertical_adapt', + cls: 'bi-border-bottom', + height: 40, + items: { + left: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Create-DingTalkSyn-Url'), + cls: 'dec-font-weight-bold' + }] + } + }, + { + el: { + type: 'bi.vertical_adapt', + height: 25, + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Agent-Name'), + textAlign: 'left', + width: 116 + }, + { + type: "dingtalksyn.editor_text_value_combo", + width: 150, + height: 24, + ref: function (_ref) { + self.agentListCombo = _ref; + }, + items: [] + } + ] + }, + tgap: 10 + }, + { + el: { + type: 'bi.vertical_adapt', + height: 25, + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Platform-Page'), + textAlign: 'left', + width: 116 + }, + { + type: "dingtalksyn.editor_text_value_combo", + width: 150, + height: 24, + value: 1, + items: [{ + text: BI.i18nText('Dec-DingTalkSyn_Platform'), + value: 1 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Platform-Report'), + value: 2 + }], + ref: function (_ref) { + self.platform = _ref; + }, + listeners: [{ + eventName: BI.TextValueCombo.EVENT_CHANGE, + action: function () { + var v = this.getValue(); + if (v === 1) { + self.reportFileTree.setVisible(false); + self._hideParameterPane(); + } else if (v === 2) { + self.reportFileTree.setVisible(true); + var value = self.reportFileTree.getValue(); + if (self._isFRTemplate(value)) { + self._populateParameterPane(); + } + } + } + }] + }, + { + type: "dingtalksyn.template.search.tree", + invisible: true, + lgap: 10, + ref: function (_ref) { + self.reportFileTree = _ref; + }, + listeners: [{ + eventName: BI.MultiLayerSingleTreeCombo.EVENT_CHANGE, + action: function (fileName) { + if (self._isFRTemplate(fileName)) { + self._populateParameterPane(); + } else { + self._hideParameterPane(); + } + } + }] + } + ] + }, + tgap: 10 + }, + { + el: { + type: 'bi.vertical_adapt', + invisible: true, + ref: function(_ref) { + self.parameterPane = _ref; + }, + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_Parameter_Setting'), + textAlign: 'left', + width: 116, + height: 25, + }, + { + type: 'bi.vertical', + items:[{ + type: 'dec.common.parameter_button', + parameters: [], + templateId: '', + ref: function (_ref) { + self.parameterBtn = _ref; + }, + tgap: 10 + }, { + type: 'bi.horizontal', + items: [{ + type: "bi.multi_select_item", + logic: { dynamic: true }, + text: BI.i18nText("Dec-DingTalkSyn_Parse_Parameters"), + selected: self.model.shouldParseParams, + listeners: [{ + eventName: BI.MultiSelectItem.EVENT_CHANGE, + action: function () { + self.store.setShouldParseParams(this.isSelected()); + }, + }], + tgap: 5, + lgap: -4 + }, { + el: { + type: "bi.icon_label", + cls: "blue-remark-font", + title: BI.i18nText("Dec-DingTalkSyn_Parse_Parameters_Tip") + }, + tgap: 9, + lgap: 5 + }] + }] + } + ] + }, + tgap: 10 + }, + { + el: { + type: 'bi.vertical_adapt', + height: 25, + items: [ + { + type: 'bi.label', + text: BI.i18nText('Dec-DingTalkSyn_DingTalkSyn_Url'), + textAlign: 'left', + width: 116 + }, + { + el: { + type: 'bi.editor', + cls: "bi-border", + width: 300, + height: 24, + allowBlank: true, + ref: function (_ref) { + self.createUrlPane = _ref; + }, + listeners: [{ + eventName: 'EVENT_CHANGE', + action: function (text) { + self.store.setDingTalkSynUrl(text); + } + }] + }, + rgap: 10 + }, + { + el: { + height: 24, + type: 'bi.button', + text: BI.i18nText('Dec-DingTalkSyn_Create-Url'), + handler: function () { + var data = { + agentValue: self.agentListCombo.getValue(), + platform: self.platform.getValue(), + fileName: self.reportFileTree.getValue(), + entryParameters: self.store.showParameter ? self.parameterBtn.getValue() : '' + }; + self.store.createDingTalkSynUrl(data); + } + }, + rgap: 10 + }, + { + width: 80, + height: 24, + type: 'dingtalksyn.clipboard.button', + text: BI.i18nText('Dec-DingTalkSyn_Copy-Url'), + copy: function () { + return self.createUrlPane.getValue(); + }, + afterCopy: function () { + BI.Msg.toast(BI.i18nText('Dec-DingTalkSyn_Copy-Success')); + } + } + ] + }, + vgap: 15 + } + ] + }; + }, + + _checkProxyUrlValid: function(proxyUrl, callBack) { + var self = this; + if (Dec.DingTalkSyn.Util.checkUrlValid(proxyUrl) || proxyUrl === '') { + if (BI.isFunction(callBack)) { + callBack.call(self); + } + } else { + Dec.Msg.alert({ + message: BI.i18nText('Dec-DingTalkSyn_Start-With-Http') + }); + } + }, + + _populateParameterPane: function() { + this.parameterPane.setVisible(true); + this.parameterBtn.populate([], this.reportFileTree.getValue()); + this.store.showParameter = true; + }, + + _hideParameterPane: function() { + this.parameterPane.setVisible(false); + this.store.showParameter = false; + }, + + _isFRTemplate: function(fileName) { + return fileName.indexOf('.cpt') > -1 || fileName.indexOf('.frm') > -1; + }, + + _createChatGroupPane: function () { + return { + type: "dingtalksyn.chatgroup.management" + } + } + }); + + BI.shortcut('dingtalksyn.agentquickconfig', AgentQuickConfig); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/chatgroup/chatgroup.management.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/chatgroup/chatgroup.management.js new file mode 100644 index 0000000..bc6fb7b --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/chatgroup/chatgroup.management.js @@ -0,0 +1,353 @@ +!(function() { + var ChatGroupManagement = BI.inherit(BI.Widget, { + props: { + baseCls: 'dingtalksyn-chatgourp-management' + }, + + _store: function () { + return BI.Models.getModel("dingtalksyn.model.chatgroup.management"); + }, + + watch: { + addResult: function() { + var self = this; + if(!this.model.addResult.success) { + Dec.DingTalkSyn.Util.alertErrWithDetail(this.model.addResult); + } else { + BI.Msg.toast(BI.i18nText("Dec-Basic_Success")); + self.store.initChatGroups(); + BI.Popovers.remove(BI.Constants.getConstant('dingtalksyn.constants').popup_create_chat_group); + } + }, + + chatGroups: function(chatGroups) { + var self = this; + self._populateChatGroupTable(chatGroups, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(chatGroups); + } + }, + + render: function () { + var self = this; + self.currentPage = 1; + self.totalPage = 1; + this.chat_group_management_table_header = BI.Constants.getConstant('dingtalksyn.constants.chatgroup.management.table.header'); + return { + type: 'bi.vertical', + cls: 'dingtalksyn-section-container', + hgap: 10, + items: [{ + type: 'bi.left_right_vertical_adapt', + height: 40, + cls: 'bi-border-bottom', + items: { + left: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Chat_Group'), + cls: 'dec-font-weight-bold', + height: 40 + }] + } + }, { + type: 'bi.vertical_adapt', + height: 46, + items: [{ + type: "bi.icon_text_item", + text: BI.i18nText('Dec-DingTalkSyn_New_Chat_Group'), + cls: 'plus-font', + width: 400, + height: 17, + handler: function() { + self._createChatGroupPopupPane({ + title: BI.i18nText('Dec-DingTalkSyn_New_Chat_Group') + }, false); + } + }] + }, { + type: 'bi.table_view', + cls: 'dingtalksyn-table', + isNeedMerge: false, + isNeedFreeze: false, + columnSize: [370, "fill"], + items: [], + header: self.chat_group_management_table_header, + ref: function(_ref) { + self.chatGroupTable = _ref; + } + }, { + type: "bi.left_right_vertical_adapt", + height: 26, + tgap: 10, + items: { + right: [{ + type: 'bi.horizontal', + items: [{ + type: 'bi.icon_button', + width: 24, + height: 24, + cls: 'page-button dec-pager-first-font', + handler: function() { + if (self.currentPage > 1) { + self.currentPage = 1; + self.chatGroupPageEditor.setValue(self.currentPage.toString()); + self._populateChatGroupTable(self.model.chatGroups, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.chatGroups); + } + } + }, { + type: 'bi.icon_button', + lgap: 5, + width: 24, + height: 24, + cls: 'page-button dec-pager-prev-font', + disabled: true, + ref: function(_ref) { + self.previousPageButton = _ref; + }, + handler: function() { + if (self.currentPage > 1) { + self.currentPage -= 1; + self.chatGroupPageEditor.setValue(self.currentPage.toString()); + self._populateChatGroupTable(self.model.chatGroups, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.chatGroups); + } + } + }, { + type: 'bi.editor', + cls: "bi-border", + allowBlank: true, + lgap: 5, + rgap: 5, + width: 40, + height: 24, + value: self.currentPage.toString(), + ref: function(_ref) { + self.chatGroupPageEditor = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_CONFIRM, + action: function () { + if (this.getValue() > self.totalPage) { + this.setValue(self.totalPage); + } else if (this.getValue() < 1) { + this.setValue(1); + } + self.currentPage = parseInt(this.getValue()); + self._populateChatGroupTable(self.model.chatGroups, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.chatGroups); + } + }] + }, { + type: 'bi.label', + width: 5, + height: 24, + text: '/ ' + }, { + type: 'bi.label', + height: 24, + lgap: 5, + text: '1', + ref: function(_ref) { + self.chatGroupPageLabel = _ref; + } + }, { + type: 'bi.icon_button', + width: 24, + height: 24, + lgap: 5, + cls: 'page-button dec-pager-next-font', + ref: function(_ref) { + self.nextPageButton = _ref; + }, + handler: function() { + if (self.currentPage < self.totalPage) { + self.currentPage += 1; + self.chatGroupPageEditor.setValue(self.currentPage.toString()); + self._populateChatGroupTable(self.model.chatGroups, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.chatGroups); + } + } + }, { + type: 'bi.icon_button', + width: 24, + height: 24, + lgap: 5, + cls: 'page-button dec-pager-last-font', + handler: function() { + if (self.currentPage < self.totalPage) { + self.currentPage = self.totalPage; + self.chatGroupPageEditor.setValue(self.currentPage.toString()); + self._populateChatGroupTable(self.model.chatGroups, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.chatGroups); + } + } + }] + }] + } + }] + }; + }, + + mounted: function() { + Dec.DingTalkSyn.Util.formatTableStyle(); + this.store.initChatGroups(); + }, + + _populateChatGroupTable: function(result, page) { + var self = this; + page = page || 0; + var items = []; + var bubbleCombo = []; + var chatGroups = result; + var startIdx = page * 10; + var endIdx = Math.min(startIdx + 10, chatGroups.length); + for (var i = startIdx; i < endIdx; i++) { + items.push( + (function(index) { + return [ + { + type: 'bi.label', + textAlign: "left", + height: 32, + lgap: 5, + title: chatGroups[index].agentName, + text: chatGroups[index].agentName + }, + { + type: 'bi.left_right_vertical_adapt', + height: 32, + items: { + left: [{ + type: 'bi.label', + textAlign: "left", + lgap: 2.5, + title: chatGroups[index].chatGroupName, + text: chatGroups[index].chatGroupName + }], + right: [{ + type: 'bi.bubble_combo', + rgap: 10, + ref: function (_ref) { + bubbleCombo[index] = _ref; + }, + el: { + type: 'bi.icon_button', + cls: 'delete-node-font', + height: 32 + }, + stopPropagation: true, + popup: { + type: 'bi.text_bubble_bar_popup_view', + cls: "dec-bubble-combo-popup", + text: BI.i18nText('Dec-DingTalkSyn_Delete_ChatGroup_Confirm'), + buttons: [ + { + text: BI.i18nText('Dec-DingTalkSyn_Confirm'), + value: i, + width: 80, + height: 24, + handler: function (v) { + self.store.deleteChatGroup(chatGroups[index].id); + bubbleCombo[index].hideView(); + } + }, + { + text: BI.i18nText('Dec-DingTalkSyn_Cancel'), + level: 'ignore', + value: i, + width: 80, + height: 24, + handler: function (v) { + bubbleCombo[index].hideView(); + } + } + ] + } + }] + } + } + ] + })(i) + ); + } + self.chatGroupTable.populate(items); + Dec.DingTalkSyn.Util.formatTableStyle(); + }, + + _populateDingTalkSynPageNumberButtons: function(result) { + var chatGroupTotalNumber = result.length; + this.totalPage = Math.ceil(chatGroupTotalNumber / 10); + if (this.totalPage === 0) { + this.totalPage = 1; + } + this.chatGroupPageLabel.setValue(this.totalPage); + if (this.totalPage === 1 && this.currentPage === 1) { + this.nextPageButton.setEnable(false); + this.previousPageButton.setEnable(false); + } else if (this.currentPage === 1) { + this.nextPageButton.setEnable(true); + this.previousPageButton.setEnable(false); + } else if (this.currentPage === this.totalPage) { + this.nextPageButton.setEnable(false); + this.previousPageButton.setEnable(true); + } else { + this.nextPageButton.setEnable(true); + this.previousPageButton.setEnable(true); + } + }, + + _createChatGroupPopupPane: function(props, noClose) { + var self = this; + var popupCreateChatGroup = BI.Constants.getConstant('dingtalksyn.constants').popup_create_chat_group; + var chatGroupPopover = BI.extend(props, { + type: 'dingtalksyn.create.chatgroup.popover', + noClose: noClose, + agentList: self.model.agentList, + listeners: [{ + eventName: "EVENT_CLOSE", + action: function () { + BI.Popovers.remove(popupCreateChatGroup); + } + }, { + eventName: "EVENT_CONFIRM", + action: function() { + var inputInfo = self.createChatGroupPopover.getValue(); + self.store.createChatGroups(inputInfo); + } + }], + ref: function(_ref) { + self.createChatGroupPopover = _ref; + } + }); + + BI.Popovers.create(popupCreateChatGroup, { + type: 'bi.popover', + noClose: noClose, + header: { + type: 'bi.left_vertical_adapt', + hgap: 5, + items: [ + { + type: 'bi.label', + forceCenter: true, + text: props.title + } + ] + }, + body: chatGroupPopover, + width: 455, + height: 270, + listeners: [ + { + eventName: "EVENT_CLOSE", + action: function () { + BI.Popovers.remove(popupCreateChatGroup); + } + } + ] + }).open(popupCreateChatGroup); + } + }); + + BI.shortcut('dingtalksyn.chatgroup.management', ChatGroupManagement); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/chatgroup/chatgroup.management.model.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/chatgroup/chatgroup.management.model.js new file mode 100644 index 0000000..7d0d38a --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/chatgroup/chatgroup.management.model.js @@ -0,0 +1,74 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + context: ["agentList"], + + state: function() { + return { + addResult: { + }, + chatGroups: [] + } + }, + + actions: { + initChatGroups: function() { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/chatgroup', + type: 'GET', + complete: function(res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.chatGroups = result.chatGroups; + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result); + } + } + } + }); + }, + + createChatGroups: function(chatGroup) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/chatgroup', + type: 'POST', + data: chatGroup, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.addResult = { + success: true + }; + } else { + self.model.addResult = result; + } + } + } + }); + }, + + deleteChatGroup: function(id) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/chatgroup?id=' + id, + type: 'DELETE', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.initChatGroups(); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result); + } + } + } + }); + } + } + }); + + BI.model("dingtalksyn.model.chatgroup.management", Model); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/quick.config.model.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/quick.config.model.js new file mode 100644 index 0000000..7801ce4 --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentconfig/quick.config.model.js @@ -0,0 +1,148 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + context: ["agentList"], + + state: function() { + return { + dingTalkUrl: '', + proxyServer: '', + showParameter: false, + shouldParseParams: true + } + }, + + computed: { + agentListComboItems: function() { + var items = []; + var agentList = this.model.agentList; + var total = this.model.agentList.length; + for (var i = 0; i < total; i++) { + var jo = agentList[i]; + var data = {}; + data.text = jo.agentName; + data.value = i; + items.push(data); + } + return items; + } + }, + + actions: { + createDingTalkSynUrl: function(data) { + var self = this; + if (BI.isKey(data.agentValue)) { + var agentInfo = self.model.agentList[data.agentValue]; + if (agentInfo) { + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/entry/url', + type: 'POST', + data: { + corpId: agentInfo.corpId, + id: agentInfo.id, + platform: data.platform, + fileName: data.fileName, + entryParameters: data.entryParameters, + shouldParseParams: self.model.shouldParseParams + }, + complete: function(res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.dingTalkUrl = result.oauthUrl; + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + } + } + }, + + getProxyServer: function() { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/proxy/server/url', + type: 'GET', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.proxyServer = result.proxyServer; + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + saveProxyServer: function(proxyServer) { + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/proxy/server/url', + type: 'POST', + data: { + proxyServer: proxyServer + }, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + BI.Msg.toast(BI.i18nText('Dec-Basic_Success')); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + testProxyServer: function(proxyServer) { + var self = this; + var loadingPane = BI.Constants.getConstant('dingtalksyn.constants').popup_loading_configuration; + var loadingController = Dec.DingTalkSyn.Util.showLoading('.dingtalksyn-quick-config-container', BI.i18nText('Dec-DingTalkSyn_Test-Connection'), loadingPane); + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/test/proxy/connection', + type: 'POST', + data: { + proxyServer: proxyServer + }, + complete: function (res, status) { + loadingController.remove(loadingPane); + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self._showResultAlert(BI.i18nText('Dec-DingTalkSyn_Connection-Success'), true); + self._hideResultAlert(); + } else { + self._showResultAlert(Dec.DingTalkSyn.Util.getErrorText(result), false); + } + } + } + }); + }, + + setDingTalkSynUrl: function (url) { + this.model.dingTalkUrl = url; + }, + + setShouldParseParams: function(shouldParseParams) { + this.model.shouldParseParams = shouldParseParams; + }, + + _showResultAlert: function(label, resultSuccess) { + var resultTipPopup = BI.Constants.getConstant('dingtalksyn.constants').popup_result_tip_popup; + Dec.DingTalkSyn.Util.showResultAlert('.dingtalksyn-quick-config-container', label, resultSuccess, resultTipPopup); + }, + + _hideResultAlert: function() { + var resultTipPopup = BI.Constants.getConstant('dingtalksyn.constants').popup_result_tip_popup; + setTimeout(function() { + Dec.DingTalkSyn.Util.hideResultAlert(resultTipPopup); + }, 1500); + } + } + }); + + BI.model("dingtalksyn.model.quick.config", Model); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentmanager/agent.management.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentmanager/agent.management.js new file mode 100644 index 0000000..ce4139d --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentmanager/agent.management.js @@ -0,0 +1,541 @@ +!(function() { + var AgentManagement = BI.inherit(BI.Widget, { + render: function() { + var self = this; + self.currentPage = 1; + self.totalPage = 1; + this.agent_management_table_header = BI.Constants.getConstant('dingtalksyn.constants.agentmanagement.table.header'); + + this._reportServerPane = this._createReportServerPane(); + this._agentListPane = this._createAgentListPane(); + + return { + type: 'bi.flex_vertical', + rowSize: ['', 'fill'], + horizontalAlign: 'stretch', + items: [ + { + el: self._reportServerPane + }, + { + el: self._agentListPane, + tgap: 10 + } + ] + }; + }, + + _store: function () { + return BI.Models.getModel("dingtalksyn.model.agent.management"); + }, + + watch: { + agentList: function(agentList) { + var self = this; + self._populateDingTalkSynAgentTable(agentList, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(agentList); + }, + + addResult: function() { + var self = this; + if(!this.model.addResult.success) { + Dec.DingTalkSyn.Util.alertErrWithDetail(this.model.addResult); + } else { + BI.Msg.toast(BI.i18nText("Dec-Basic_Success")); + self.store.initAgentList(); + BI.Popovers.remove(BI.Constants.getConstant('dingtalksyn.constants').popup_create_agent); + } + }, + + reportServerUrl: function() { + var self = this; + self.reportServerEditor.setValue(self.model.reportServerUrl); + } + }, + + mounted: function() { + Dec.DingTalkSyn.Util.formatTableStyle(); + this.store.getReportServerUrl(); + this.store.initAgentList(); + }, + + _createReportServerPane: function() { + var self = this; + return { + type: 'bi.vertical', + cls: 'dingtalksyn-section-container', + hgap: 10, + items: [ + { + type: 'bi.left_right_vertical_adapt', + cls: 'bi-border-bottom', + height: 40, + items: { + left: [{ + type: 'bi.label', + cls: 'dec-font-weight-bold', + text: BI.i18nText('Dec-DingTalkSyn_Server'), + height: 40 + }], + right: [{ + width: 80, + height: 24, + type: 'bi.button', + text: BI.i18nText('Dec-DingTalkSyn_Save'), + handler: function () { + var reportServerUrl = self.reportServerEditor.getValue().trim(); + if (!Dec.DingTalkSyn.Util.checkUrlValid(reportServerUrl)) { + Dec.Msg.alert({ + message: BI.i18nText('Dec-DingTalkSyn_Start_With_Http') + }); + } else { + self.store.saveReportServerUrl(reportServerUrl); + } + } + }] + } + }, + { + type: 'bi.vertical', + items: [{ + el: { + type: 'bi.vertical_adapt', + height: 40, + items: [ + { + el: { + type: 'bi.label', + textAlign: 'left', + text: BI.i18nText('Dec-DingTalkSyn_Server_Url'), + title: BI.i18nText('Dec-DingTalkSyn_Server_Url'), + width: 111, + height: 24 + }, + rgap: 15 + }, + { + type: 'bi.editor', + cls: "bi-border", + width: 390, + height: 24, + watermark: 'http://www.fanruan.com:80/webroot/decision', + allowBlank: false, + value: self.model.reportServerUrl, + ref: function (_ref) { + self.reportServerEditor = _ref; + } + }, + { + type: 'dec.text.bubble.combo', + cls: 'help-area', + text: BI.i18nText('Dec-DingTalkSyn_Server_Tip'), + popupWidth: 450, + popupHeight: 140, + el: { + type: 'bi.icon_button', + $point: 'dec-system-normal-extensible', + cls: 'detail-font', + width: 35, + height: 24 + } + } + ] + }, + vgap: 10 + }] + } + ] + }; + }, + + _createAgentListPane: function() { + var self = this; + return { + type: 'bi.vertical', + cls: 'dingtalksyn-section-container', + hgap: 10, + items: [{ + type: 'bi.left_right_vertical_adapt', + height: 40, + cls: 'bi-border-bottom', + items: { + left: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Enterprise-DingDing'), + cls: 'dec-font-weight-bold', + height: 40 + }] + } + }, { + type: 'bi.vertical_adapt', + height: 46, + items: [{ + type: "bi.icon_text_item", + text: BI.i18nText('Dec-DingTalkSyn_New-Agent'), + cls: 'plus-font', + width: 200, + height: 17, + handler: function() { + self._saveOrUpdateAgentPopupPane({ + refreshAgentList: BI.bind(self.store.initAgentList, self.store), + title: BI.i18nText('Dec-DingTalkSyn_New-Agent') + }, false, true); + } + }] + }, { + type: 'bi.table_view', + cls: 'dingtalksyn-table', + isNeedMerge: false, + isNeedFreeze: false, + columnSize: [140, 100, 250, 250, "fill"], + items: [], + header: self.agent_management_table_header, + ref: function(_ref) { + self.agentTable = _ref; + } + }, { + type: "bi.left_right_vertical_adapt", + height: 26, + vgap: 10, + items: { + right: [{ + type: 'bi.horizontal', + items: [{ + type: 'bi.icon_button', + width: 24, + height: 24, + cls: 'page-button dec-pager-first-font', + ref: function(_ref) { + self.firstPageButton = _ref; + }, + handler: function() { + if (self.currentPage > 1) { + self.currentPage = 1; + self.agentPageEditor.setValue(self.currentPage.toString()); + self._populateDingTalkSynAgentTable(self.model.agentList, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.agentList); + } + } + }, { + type: 'bi.icon_button', + lgap: 5, + width: 24, + height: 24, + cls: 'page-button dec-pager-prev-font', + disabled: true, + ref: function(_ref) { + self.previousPageButton = _ref; + }, + handler: function() { + if (self.currentPage > 1) { + self.currentPage -= 1; + self.agentPageEditor.setValue(self.currentPage.toString()); + self._populateDingTalkSynAgentTable(self.model.agentList, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.agentList); + } + } + }, { + type: 'bi.editor', + cls: "bi-border", + allowBlank: true, + lgap: 5, + width: 40, + height: 24, + value: self.currentPage.toString(), + ref: function(_ref) { + self.agentPageEditor = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_CONFIRM, + action: function () { + if (this.getValue() > self.totalPage) { + this.setValue(self.totalPage); + } else if (this.getValue() < 1) { + this.setValue(1); + } + self.currentPage = parseInt(this.getValue()); + self._populateDingTalkSynAgentTable(self.model.agentList, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.agentList); + } + }] + }, { + type: 'bi.label', + lgap: 5, + width: 5, + height: 24, + text: '/' + }, { + type: 'bi.label', + height: 24, + lgap: 5, + text: '1', + ref: function(_ref) { + self.agentPageLabel = _ref; + } + }, { + type: 'bi.icon_button', + width: 24, + height: 24, + lgap: 5, + cls: 'page-button dec-pager-next-font', + ref: function(_ref) { + self.nextPageButton = _ref; + }, + handler: function() { + if (self.currentPage < self.totalPage) { + self.currentPage += 1; + self.agentPageEditor.setValue(self.currentPage.toString()); + self._populateDingTalkSynAgentTable(self.model.agentList, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.agentList); + } + } + }, { + type: 'bi.icon_button', + width: 24, + height: 24, + lgap: 5, + cls: 'page-button dec-pager-last-font', + ref: function(_ref) { + self.lastPageButton = _ref; + }, + handler: function() { + if (self.currentPage < self.totalPage) { + self.currentPage = self.totalPage; + self.agentPageEditor.setValue(self.currentPage.toString()); + self._populateDingTalkSynAgentTable(self.model.agentList, self.currentPage - 1); + self._populateDingTalkSynPageNumberButtons(self.model.agentList); + } + } + }] + }] + } + }] + }; + }, + + _populateDingTalkSynAgentTable: function(result, page) { + var self = this; + page = page || 0; + var items = []; + var bubbleCombo = []; + var agentList = result; + var startIdx = page * 10; + var endIdx = Math.min(startIdx + 10, agentList.length); + for (var i = startIdx; i < endIdx; i++) { + items.push( + (function(index) { + var agentId = agentList[index].agentId === BI.Constants.getConstant('dingtalksyn.constants').dingtalksyn_agent_id_non_adapted? '' : agentList[index].agentId; + return [ + { + type: 'bi.label', + textAlign: "left", + height: 32, + lgap: 5, + title: agentList[index].agentName, + text: agentList[index].agentName + }, + { + type: 'bi.label', + textAlign: "left", + height: 32, + lgap: 5, + title: agentId, + text: agentId + }, + { + type: 'bi.label', + textAlign: "left", + height: 32, + lgap: 5, + title: agentList[index].corpId, + text: agentList[index].corpId + }, + { + type: 'bi.label', + textAlign: "left", + height: 32, + lgap: 5, + title: agentList[index].appKey, + text: agentList[index].appKey + }, + { + type: 'bi.left_right_vertical_adapt', + height: 32, + items: { + left: [{ + type: 'bi.label', + textAlign: "left", + lgap: 2.5, + title: agentList[index].appSecret, + text: agentList[index].appSecret, + width: 280, + height: 32 + }], + right: [self._isShowErrorTip(agentList[index].validStatus) ? { + type: "bi.icon_label", + cls: "red-remark-font", + rgap: 10, + title: self._getErrorTip(agentList[index].validStatus) + } : {}, { + type: 'bi.icon_button', + cls: 'normal-edit-font', + rgap: 10, + height: 32, + handler: function () { + self._saveOrUpdateAgentPopupPane({ + id: [agentList[index].id], + agentName: [agentList[index].agentName], + agentId: [agentList[index].agentId], + corpId: [agentList[index].corpId], + appKey: [agentList[index].appKey], + appSecret: [agentList[index].appSecret], + refreshAgentList: BI.bind(self.store.initAgentList, self.store), + title: BI.i18nText('Dec-DingTalkSyn_Modify-Agent') + }, false, false); + } + }, { + type: 'bi.bubble_combo', + rgap: 10, + ref: function (_ref) { + bubbleCombo[index] = _ref; + }, + el: { + type: 'bi.icon_button', + cls: 'delete-node-font', + height: 32 + }, + stopPropagation: true, + popup: { + type: 'bi.text_bubble_bar_popup_view', + cls: "dec-bubble-combo-popup", + text: BI.i18nText('Dec-DingTalkSyn_DeleteAgent-Confirm-Popup'), + buttons: [ + { + text: BI.i18nText('Dec-DingTalkSyn_Confirm'), + value: i, + width: 80, + height: 24, + handler: function (v) { + self.store.deleteAgent(agentList[index].id); + bubbleCombo[index].hideView(); + } + }, + { + text: BI.i18nText('Dec-DingTalkSyn_Cancel'), + level: 'ignore', + value: i, + width: 80, + height: 24, + handler: function (v) { + bubbleCombo[index].hideView(); + } + } + ] + } + }] + } + } + ] + })(i) + ); + } + self.agentTable.populate(items); + Dec.DingTalkSyn.Util.formatTableStyle(); + }, + + _isShowErrorTip: function (type) { + return !Dec.DingTalkSyn.Util.isValidAgent(type); + }, + + _getErrorTip: function (type) { + if (Dec.DingTalkSyn.Util.isTokenEmptyAgent(type)) { + return BI.i18nText('Dec-DingTalkSyn_Agent_Deleted_Tip'); + } else { + return ''; + } + }, + + _populateDingTalkSynPageNumberButtons: function(result) { + var agentTotalNumber = result.length; + this.totalPage = Math.ceil(agentTotalNumber / 10); + if (this.totalPage === 0) { + this.totalPage = 1; // 如果一条记录都没有,这边计算出来的页数是0,但是按照要求,最大页数还是应该显示为1 + } + this.agentPageLabel.setValue(this.totalPage); + if (this.totalPage === 1 && this.currentPage === 1) { + this.firstPageButton.setEnable(false); + this.nextPageButton.setEnable(false); + this.previousPageButton.setEnable(false); + this.lastPageButton.setEnable(false); + } else if (this.currentPage === 1) { + this.firstPageButton.setEnable(false); + this.nextPageButton.setEnable(true); + this.previousPageButton.setEnable(false); + this.lastPageButton.setEnable(true); + } else if (this.currentPage === this.totalPage) { + this.firstPageButton.setEnable(true); + this.nextPageButton.setEnable(false); + this.previousPageButton.setEnable(true); + this.lastPageButton.setEnable(false); + } else { + this.firstPageButton.setEnable(true); + this.nextPageButton.setEnable(true); + this.previousPageButton.setEnable(true); + this.lastPageButton.setEnable(true); + } + }, + + _saveOrUpdateAgentPopupPane: function(props, noClose, save) { + var self = this; + var popup_create_agent = BI.Constants.getConstant('dingtalksyn.constants').popup_create_agent; + var agentPopover = BI.extend(props, { + type: 'dingtalksyn.create.agent.popover', + noClose: noClose, + listeners: [{ + eventName: "EVENT_CLOSE", + action: function () { + BI.Popovers.remove(popup_create_agent); + } + }, { + eventName: "EVENT_CONFIRM", + action: function() { + var inputInfo = self.createAgentPopover.getValue(); + self.store.saveOrUpdateAgent(inputInfo.agents, inputInfo.compatible, save); + } + }], + ref: function(_ref) { + self.createAgentPopover = _ref; + } + }); + + BI.Popovers.create(popup_create_agent, { + type: 'bi.popover', + noClose: noClose, + header: { + type: 'bi.left_vertical_adapt', + hgap: 5, + items: [ + { + type: 'bi.label', + forceCenter: true, + text: props.title + } + ] + }, + body: agentPopover, + width: 450, + height: 288, + listeners: [ + { + eventName: "EVENT_CLOSE", + action: function () { + BI.Popovers.remove(popup_create_agent); + } + } + ] + }).open(popup_create_agent); + } + }); + + BI.shortcut('dingtalksyn.agentmanagement', AgentManagement); +})(); diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentmanager/agent.management.model.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentmanager/agent.management.model.js new file mode 100644 index 0000000..ce4089d --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/agentmanager/agent.management.model.js @@ -0,0 +1,115 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + + context: ["agentList"], + + state: function() { + return { + addResult: { + }, + reportServerUrl: '' + } + }, + + actions: { + saveReportServerUrl: function(reportServerUrl) { + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/report/server/url', + type: 'POST', + data: { + reportServer: reportServerUrl + }, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + BI.Msg.toast(BI.i18nText("Dec-Basic_Success")); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + getReportServerUrl: function () { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/report/server/url', + type: 'GET', + complete: function(res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.reportServerUrl = result.reportServerUrl; + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + initAgentList: function() { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/agent', + type: 'GET', + complete: function(res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.agentList = result.agentList; + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + saveOrUpdateAgent: function(agents, compatible, save) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: save? '/dingtalksyn/save/agent' : '/dingtalksyn/update/agent', + type: 'POST', + data: { + agentArray: agents + }, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.addResult = { + success: true, + compatible: compatible + }; + } else { + self.model.addResult = result; + } + } + } + }); + }, + + deleteAgent: function(agentID) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/agent?id=' + agentID, + type: 'DELETE', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.initAgentList(); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + } + } + }); + BI.model("dingtalksyn.model.agent.management", Model); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.department.management.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.department.management.js new file mode 100644 index 0000000..9c85b50 --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.department.management.js @@ -0,0 +1,58 @@ +!(function() { + var MemberDepartment = BI.inherit(BI.Widget, { + + _store: function() { + return BI.Models.getModel("dingtalksyn.model.member.department"); + }, + + watch: { + depTree: function() { + var depTree = this.model.depTree; + var firstNode = null; + if (depTree && depTree.length > 0) { + depTree[0].selected = true; + depTree[0].open = true; + firstNode = depTree[0]; + } + + this.dingtalksynDepartmentTree.populate(depTree); + this.dingtalksynDepartmentTree.setValue(firstNode === null ? "" : firstNode.value); + } + }, + + props: { + refreshDepartmentData: null, + clearPageEditor: null + }, + + render: function() { + var self = this; + return { + type: 'bi.multilayer_select_level_tree', + width: '100%', + height: '100%', + ref: function(_ref) { + self.dingtalksynDepartmentTree = _ref; + }, + items: self.model.depMember, + listeners: [{ + eventName: BI.MultiLayerSelectLevelTree.EVENT_CHANGE, + action: function() { + self.options.refreshDepartmentData(); + self.options.clearPageEditor(); + } + }] + } + }, + + mounted: function() { + this.store.getDepTreeData(); + }, + + _getDepTree: function() { + return this.dingtalksynDepartmentTree; + } + }); + + BI.shortcut('dingtalksyn.member.department', MemberDepartment); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.department.management.model.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.department.management.model.js new file mode 100644 index 0000000..b044493 --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.department.management.model.js @@ -0,0 +1,46 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + context: ["agentList"], + + state: function() { + return { + depTreeData: {} + } + }, + + computed: { + depTree: function() { + var depTree = []; + var corpList = this.model.depTreeData.corpList; + if (corpList) { + corpList.map(function(corp, index) { + depTree.push(Dec.DingTalkSyn.Util.generateDepTreeRootNode(corp)); + depTree = depTree.concat(Dec.DingTalkSyn.Util.generateDepTreeChildNode(corp.departmentList, corp.corpId)); + }); + } + return depTree; + } + }, + + actions: { + getDepTreeData: function() { + var self = this; + Dec.DingTalkSyn.Util.reqWithLoading({ + url: '/dingtalksyn/corp/list', + type: 'GET', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.depTreeData = BI.jsonDecode(res.responseText); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + } + } + }); + BI.model("dingtalksyn.model.member.department", Model); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.management.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.management.js new file mode 100644 index 0000000..a966ded --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.management.js @@ -0,0 +1,740 @@ +!(function() { + var MemberManagement = BI.inherit(BI.Widget, { + _store: function() { + return BI.Models.getModel("dingtalksyn.model.member.management"); + }, + + watch: { + agentList: function() { + this._clearPageEditor(); + }, + + depMember: function() { + this._populateDingTalkSynMemberTable(this.model.depMember); + this._populateDingTalkSynPageNumberButtons(this.model.depMemberData); + }, + + matchConfig: function() { + if (this.model.matchConfig.matchingFsWay) { + this.matchingFSWayCombo.setValue(this.model.matchConfig.matchingFsWay); + } else { + this.matchingFSWayCombo.setValue(0); + } + switch(this.model.matchConfig.matchingFsWay) { + case BI.Constants.getConstant('dingtalksyn.constants').matching_fs_way_user_id: + case BI.Constants.getConstant('dingtalksyn.constants').matching_fs_way_mobile: + this.dataSetContainer.setVisible(false); + this.memberTableNonFsUserName.setVisible(true); + this.memberTableWithFsUserName.setVisible(false); + break; + case BI.Constants.getConstant('dingtalksyn.constants').matching_fs_way_custom: + this.dataSetContainer.setVisible(false); + this.memberTableNonFsUserName.setVisible(false); + this.memberTableWithFsUserName.setVisible(true); + break; + case BI.Constants.getConstant('dingtalksyn.constants').matching_fs_way_dataSet: + this.dataSetContainer.setVisible(true); + this.memberTableNonFsUserName.setVisible(true); + this.memberTableWithFsUserName.setVisible(false); + break; + } + }, + + serverTableData: function() { + this.dataSetCombo.populate(this.model.serverTableData); + this.dataSetCombo.setValue(this.model.matchConfig.dataSet); + this.store.getDataSetColumn(this.dataSetCombo.getValue()); + }, + + tableDataColName: function() { + this.userIdCombo.populate(this.model.tableDataColName); + this.userIdCombo.setValue(this.model.matchConfig.dataSetUserId); + this.fsUserNameCombo.populate(this.model.tableDataColName); + this.fsUserNameCombo.setValue(this.model.matchConfig.dataSetFsName); + } + }, + + render: function() { + var self = this; + self.currentPage = 1; + self.totalPage = 1; + self.matchConfig = {}; + self.fsUserNameComboGroup = []; + self.member_management_table_header_non_fsusername = BI.Constants.getConstant('dingtalksyn.constants.member.management.table.header.nonfsusername'); + self.member_management_table_header_fsusername = BI.Constants.getConstant('dingtalksyn.constants.member.management.table.header.fsusername'); + + self.matchingFsWayPane = self._createMatchingFsWayPane(); + self.synMemberPane = self._createSynMemberPane(); + + return { + type: 'bi.flex_vertical', + rowSize: ['', 'fill'], + horizontalAlign: 'stretch', + items: [ + { + el: self.matchingFsWayPane + }, + { + el: self.synMemberPane, + tgap: 10 + } + ] + }; + }, + + mounted: function() { + var self = this; + Dec.DingTalkSyn.Util.formatTableStyle(); + this.store.initData(function() { + self.store.getDepMemberData({ + corpId: self._getDepTree().getValue()[0] ? self._getDepTree().getValue()[0].corpId : '' + }); + }); + this._clearPageEditor(); + }, + + _createMatchingFsWayPane: function() { + var self = this; + return { + type: 'bi.vertical', + cls: 'dingtalksyn-section-container', + hgap: 10, + items: [ + { + type: 'bi.left_right_vertical_adapt', + height: 40, + cls: 'bi-border-bottom', + items: { + left: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Matching_Way'), + cls: 'dec-font-weight-bold' + }], + right: [{ + width: 80, + height: 24, + type: 'bi.button', + text: BI.i18nText('Dec-DingTalkSyn_Save'), + handler: function () { + if (self._checkValid()) { + self.store.saveMatchingFSWayData({ + matchingFsWay: self.matchingFSWayCombo.getValue()[0], + dataSet: self.dataSetCombo.getValue(), + dataSetFsName: self.fsUserNameCombo.getValue(), + dataSetUserId: self.userIdCombo.getValue() + }); + } else { + Dec.Msg.alert({ + message: BI.i18nText('Dec-DingTalkSyn_Match-Way-Not-Null') + }); + } + } + }] + } + }, + { + el: { + type: 'bi.vertical_adapt', + items: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Match-Way'), + width: 116, + textAlign: 'left' + }, { + type: "bi.text_value_combo", + width: 150, + height: 24, + items: [{ + text: BI.i18nText('Dec-DingTalkSyn_User-Same-With-FS'), + value: 0 + }, { + text: BI.i18nText('Dec-DingTalkSyn_Mobile-Same-With-FS'), + value: 1 + },{ + text: BI.i18nText('Dec-DingTalkSyn_Manual-Matching-FS'), + value: 2 + },{ + text: BI.i18nText('Dec-DingTalkSyn_Custom-Matching-FS'), + value: 3 + }], + ref: function(_ref) { + self.matchingFSWayCombo = _ref; + }, + listeners: [{ + eventName: 'EVENT_CHANGE', + action: function () { + var v = this.getValue()[0]; + switch(v) { + case 0: + case 1: + self.dataSetContainer.setVisible(false); + self.memberTableNonFsUserName.setVisible(true); + self.memberTableWithFsUserName.setVisible(false); + break; + case 2: + self.dataSetContainer.setVisible(false); + self.memberTableNonFsUserName.setVisible(false); + self.memberTableWithFsUserName.setVisible(true); + break; + case 3: + self.dataSetContainer.setVisible(true); + self.memberTableNonFsUserName.setVisible(true); + self.memberTableWithFsUserName.setVisible(false); + break; + } + + self._refreshDepartmentData(); + } + }] + }] + }, + tgap: 10, + bgap: 10 + }, + { + el: { + type: 'bi.vertical_adapt', + invisible: true, + items: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Match-Setting'), + width: 116, + textAlign: 'left' + }, { + type: "dingtalksyn.editor_text_value_combo", + width: 150, + height: 24, + rgap: 10, + watermark: BI.i18nText('Dec-DingTalkSyn_DataSet'), + items: [], + ref: function(_ref) { + self.dataSetCombo = _ref; + }, + listeners: [{ + eventName: BI.TextValueCombo.EVENT_CHANGE, + action: function () { + self.store.clearSelectedDataSetColumn(); + self.store.getDataSetColumn(this.getValue()); + } + }] + }, { + type: "dingtalksyn.editor_text_value_combo", + width: 150, + height: 24, + rgap: 10, + watermark: BI.i18nText('Dec-DingTalkSyn_UserID'), + items: self.model.tableDataColName, + ref: function(_ref) { + self.userIdCombo = _ref; + } + }, { + type: "dingtalksyn.editor_text_value_combo", + width: 150, + height: 24, + rgap: 10, + watermark: BI.i18nText('Dec-DingTalkSyn_DecUserName'), + items: self.model.tableDataColName, + ref: function(_ref) { + self.fsUserNameCombo = _ref; + } + }], + ref: function(_ref) { + self.dataSetContainer = _ref; + } + }, + bgap: 10 + } + ] + } + }, + + _createSynMemberPane: function() { + var self = this; + return { + type: 'bi.vtape', + cls: 'dingtalksyn-section-container', + hgap: 10, + items: [ + { + el: { + type: 'bi.left_right_vertical_adapt', + cls: 'bi-border-bottom', + items: { + left: [{ + type: "bi.label", + text: BI.i18nText('Dec-DingTalkSyn_Address-Book'), + cls: 'dec-font-weight-bold' + }] + } + }, + height: 40 + }, + { + el: { + type: 'bi.left_right_vertical_adapt', + items: { + left: [{ + type: 'bi.icon_text_item', + text: BI.i18nText('Dec-DingTalkSyn_Member-Update'), + cls: 'dingtalksyn-refresh-font', + width: 75, + height: 20, + handler: function() { + self.synMember(); + } + }, { + type: 'bi.text_button', + cls: 'dingtalksyn-member-auto-update-button', + text: BI.i18nText('Dec-DingTalkSyn_Set-Update'), + height: 20, + handler: function() { + var callBack = function(result) { + self._createAutoUpdateMemberPopupPane({ + executeTimingTask: result.enableAutoSync, + timingTaskFrequencyType: result.period, + timingTaskStartDay: result.startWeekDay, + timingTaskStartHour: result.startHour, + timingTaskStartMinute: result.startMinute + }); + }; + self.store.getScheduleTaskConfig(callBack); + } + }], + right: [{ + type: 'bi.search_editor', + width: 150, + height: 24, + ref: function(_ref) { + self.dingtalksynMemberSearchEditor = _ref; + }, + listeners: [{ + eventName: BI.SearchEditor.EVENT_CLEAR, + action: function () { + // 点叉号清空搜索框触发的事件,把表格还原 + self._clearPageEditor(); + self._refreshDepartmentData(); + } + }, { + eventName: BI.Editor.EVENT_CONFIRM, + action: function () { + // 点击回车或者失去焦点的时候触发搜索表格数据的操作,如果没有搜到,不动table数据 + self._clearPageEditor(); + self._refreshDepartmentData(); + } + }] + }] + } + }, + height: 54 + }, + { + el: { + type: 'bi.htape', + height: 456, + cls: 'bi-border-top', + items: [{ + type: 'bi.vertical', + cls: 'bi-border-right', + width: 200, + items: [{ + type: 'dingtalksyn.member.department', + ref: function(_ref) { + self.depMemberPane = _ref; + }, + refreshDepartmentData: BI.bind(self._refreshDepartmentData, self), + clearPageEditor: BI.bind(self._clearPageEditor, self) + }] + }, { + type: 'bi.vertical', + items: [{ + el: { + type: 'bi.preview_table', + cls: 'dingtalksyn-table', + isNeedMerge: false, + isNeedFreeze: false, + columnSize: [0.2, 0.2, 0.2, 0.2, 0.2], + header: self.member_management_table_header_non_fsusername, + items: [], + ref: function(_ref) { + self.memberTableNonFsUserName = _ref; + } + }, + tgap: 10, + lgap: 10 + }, { + el: { + type: 'bi.preview_table', + cls: 'dingtalksyn-table', + isNeedMerge: false, + isNeedFreeze: false, + columnSize: [0.16, 0.16, 0.16, 0.16, 0.16, 0.2], + header: self.member_management_table_header_fsusername, + invisible: true, + items: [], + ref: function(_ref) { + self.memberTableWithFsUserName = _ref; + } + }, + tgap: 10, + lgap: 10 + }, { + type: "bi.left_right_vertical_adapt", + tgap: 10, + height: 26, + items: { + right: [{ + type: 'bi.horizontal', + items: [{ + type: 'bi.icon_button', + width: 24, + height: 24, + cls: 'page-button dec-pager-first-font', + ref: function(_ref) { + self.firstPageButton = _ref; + }, + handler: function() { + if (self.currentPage > 1) { + self.currentPage = 1; + self.memberPageEditor.setValue(self.currentPage.toString()); + self._refreshDepartmentData(); + } + } + }, { + type: 'bi.icon_button', + width: 24, + height: 24, + lgap: 5, + cls: 'page-button dec-pager-prev-font', + disabled: true, + ref: function(_ref) { + self.previousPageButton = _ref; + }, + handler: function() { + if (self.currentPage > 1) { + self.currentPage -= 1; + self.memberPageEditor.setValue(self.currentPage.toString()); + self._refreshDepartmentData(); + } + } + }, { + type: 'bi.editor', + cls: "bi-border", + allowBlank: true, + width: 40, + height: 24, + lgap: 5, + value: self.currentPage.toString(), + ref: function(_ref) { + self.memberPageEditor = _ref; + }, + listeners: [{ + eventName: BI.Editor.EVENT_CONFIRM, + action: function () { + if (this.getValue() > self.totalPage) { + this.setValue(self.totalPage); + } else if (this.getValue() < 1) { + this.setValue(1); + } + self.currentPage = parseInt(this.getValue()); + self._refreshDepartmentData(); + } + }] + }, { + type: 'bi.label', + width: 5, + height: 24, + lgap: 5, + text: '/' + }, { + type: 'bi.label', + width: 25, + height: 24, + lgap: 5, + text: '1', + ref: function(_ref) { + self.memberPageLabel = _ref; + } + }, { + type: 'bi.icon_button', + width: 24, + height: 24, + lgap: 5, + cls: 'page-button dec-pager-next-font', + ref: function(_ref) { + self.nextPageButton = _ref; + }, + handler: function() { + if (self.currentPage < self.totalPage) { + self.currentPage += 1; + self.memberPageEditor.setValue(self.currentPage.toString()); + self._refreshDepartmentData(); + } + } + }, { + type: 'bi.icon_button', + width: 24, + height: 24, + lgap: 5, + cls: 'page-button dec-pager-last-font', + ref: function(_ref) { + self.lastPageButton = _ref; + }, + handler: function() { + if (self.currentPage < self.totalPage) { + self.currentPage = self.totalPage; + self.memberPageEditor.setValue(self.currentPage.toString()); + self._refreshDepartmentData(); + } + } + }] + }] + } + }] + }] + }, + height: 'fill' + } + ] + } + }, + + _refreshDepartmentData: function() { + var self = this; + + this.store.getDepMemberData({ + corpId: this._getDepTree().getValue()[0]? this._getDepTree().getValue()[0].corpId : '', + depId: this._getDepTree().getValue()[0]? this._getDepTree().getValue()[0].depId : '', + keyword: self.dingtalksynMemberSearchEditor.getValue(), + page: self.currentPage - 1 + }); + }, + + _populateDingTalkSynPageNumberButtons: function(result) { + var userTotalNumber = result.total; + this.totalPage = userTotalNumber? Math.ceil(userTotalNumber / 10) : 1; + this.memberPageLabel.setValue(this.totalPage); + if (this.totalPage === 1 && this.currentPage === 1) { + this.firstPageButton.setEnable(false); + this.nextPageButton.setEnable(false); + this.previousPageButton.setEnable(false); + this.lastPageButton.setEnable(false); + } else if (this.currentPage === 1) { + this.firstPageButton.setEnable(false); + this.nextPageButton.setEnable(true); + this.previousPageButton.setEnable(false); + this.lastPageButton.setEnable(true); + } else if (this.currentPage === this.totalPage) { + this.firstPageButton.setEnable(true); + this.nextPageButton.setEnable(false); + this.previousPageButton.setEnable(true); + this.lastPageButton.setEnable(false); + } else { + this.firstPageButton.setEnable(true); + this.nextPageButton.setEnable(true); + this.previousPageButton.setEnable(true); + this.lastPageButton.setEnable(true); + } + }, + + _populateDingTalkSynMemberTable: function(result) { + var self = this; + + var itemWithFsUserName = []; + var itemNonFsUserName = []; + var users = result? result : []; + + var v = self.matchingFSWayCombo.getValue()[0]; + if (v === 2) { + for (var i = 0; i < users.length; i++) { + var deps = Dec.DingTalkSyn.Util.replaceDepartmentArrToString(users[i]); + itemWithFsUserName.push( + (function (index) { + return [ + { + type: 'bi.label', + textAlign: "left", + text: users[index].name, + lgap: 5, + height: 32 + }, + { + type: 'bi.label', + textAlign: "left", + text: users[index].jobNumber, + lgap: 5, + height: 32 + }, + { + type: 'dingtalksyn.user.combo', + value: BI.isEmpty(users[index].decUserName)? null : users[index].decUserName, + text: users[index].decRealName, + height: 24, + count: 10, + ref: function(_ref) { + self.fsUserNameComboGroup[index] = _ref; + }, + listeners: [{ + eventName: 'EVENT_CONFIRM', + action: function () { + self.store.saveFsUserRelationData(users[index], this.getValue()); + } + }] + + }, + { + type: 'bi.label', + textAlign: "left", + text: users[index].userId, + lgap: 5, + height: 32 + }, + { + type: 'bi.label', + textAlign: "left", + text: deps, + lgap: 5, + height: 32 + }, + { + type: 'bi.label', + textAlign: "left", + text: users[index].phone, + lgap: 5, + height: 32 + } + ] + })(i) + ); + } + self.memberTableWithFsUserName.populate(itemWithFsUserName); + } else { + for (var i = 0; i < users.length; i++) { + var deps = Dec.DingTalkSyn.Util.replaceDepartmentArrToString(users[i]); + itemNonFsUserName.push( + (function (index) { + return [ + { + type: 'bi.label', + textAlign: "left", + text: users[index].name, + lgap: 5, + height: 32 + }, + { + type: 'bi.label', + textAlign: "left", + text: users[index].jobNumber, + lgap: 5, + height: 32 + }, + { + type: 'bi.label', + textAlign: "left", + text: users[index].userId, + lgap: 5, + height: 32 + }, + { + type: 'bi.label', + textAlign: "left", + text: deps, + lgap: 5, + height: 32 + }, + { + type: 'bi.label', + textAlign: "left", + text: users[index].phone, + lgap: 5, + height: 32 + } + ] + })(i) + ); + } + self.memberTableNonFsUserName.populate(itemNonFsUserName); + } + Dec.DingTalkSyn.Util.formatTableStyle(); + }, + + _createAutoUpdateMemberPopupPane: function(props) { + var popup_auto_update_member = BI.Constants.getConstant('dingtalksyn.constants').popup_auto_update_member; + var schedulePopover = BI.extend(props, { + type: 'dingtalksyn.schedule.task.popover', + listeners: [ + { + eventName: "EVENT_CLOSE", + action: function () { + BI.Popovers.remove(popup_auto_update_member); + } + } + ] + }); + + BI.Popovers.create(popup_auto_update_member, { + header: { + type: 'bi.left_vertical_adapt', + hgap: 5, + items: [ + { + type: 'bi.label', + forceCenter: true, + text: BI.i18nText('Dec-DingTalkSyn_Set-Update') + } + ] + }, + body: schedulePopover, + width: 455, + height: 245, + listeners: [ + { + eventName: "EVENT_CLOSE", + action: function () { + BI.Popovers.remove(popup_auto_update_member); + } + } + ] + }).open(popup_auto_update_member); + $('.dingtalksyn-popup-cancel-button').css('border', '1px solid #3685F2').css('border-radius', '2px') + .css('color', '#3685F2'); + $('.dingtalksyn-popup-confirm-button').css('border-radius', '2px'); + }, + + _getDingTalkSynMemberTab: function() { + return this.depMemberPane; + }, + + _getDepTree: function() { + return this.depMemberPane._getDepTree(); + }, + + _clearPageEditor: function() { + this.memberPageEditor.setValue(1); + this.currentPage = 1; + this.nextPageButton.setEnable(true); + this.previousPageButton.setEnable(false); + }, + + synMember: function() { + var self = this; + self.store.synMemberData(function() { + self.store.getDepMemberData({}); + self.depMemberPane.store.getDepTreeData(); + self._clearPageEditor(); + }); + }, + + _checkValid: function() { + var self = this; + if (self.matchingFSWayCombo.getValue()[0] === BI.Constants.getConstant('dingtalksyn.constants').matching_fs_way_dataSet) { + if (Dec.DingTalkSyn.Util.isEmpty(self.dataSetCombo.getValue()) || Dec.DingTalkSyn.Util.isEmpty(self.fsUserNameCombo.getValue()) + || Dec.DingTalkSyn.Util.isEmpty(self.userIdCombo.getValue())) { + return false; + } + } + return true; + } + }); + + BI.shortcut('dingtalksyn.membermanagement', MemberManagement); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.management.model.js b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.management.model.js new file mode 100644 index 0000000..7642fdd --- /dev/null +++ b/src/main/web/src/modules/module/tab/dingtalkmanagementtab/tabcontents/membermanager/member.management.model.js @@ -0,0 +1,195 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + context: ["agentList"], + + state: function() { + return { + depMemberData: {}, + matchConfig: {}, + serverTables: [], + tableColNames: [] + } + }, + + computed: { + depMember: function() { + return this.model.depMemberData.userList; + }, + + serverTableData: function () { + return BI.map(this.model.serverTables, function (index, item) { + return { + text: item.dataSetName, + value: item.dataSetValue + } + }); + }, + + tableDataColName: function () { + return BI.map(this.model.tableColNames, function (index, item) { + return { + text: item.columnName, + value: item.columnValue + } + }); + } + }, + + actions: { + initData: function(callBack) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/match/method', + type: 'GET', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.matchConfig = result; + Dec.reqGet("/v10/serverdatasets", {}, function (res) { + self.model.serverTables = res.data; + }); + if (BI.isFunction(callBack)) { + callBack(); + } + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + getDataSetColumn: function(dataSet) { + var self = this; + Dec.reqGet('/v10/' + dataSet + '/datasetcolumns', {}, function (res) { + var data = res.data; + if (data) { + self.model.tableColNames = data; + } + }); + }, + + clearSelectedDataSetColumn: function() { + var self = this; + self.model.matchConfig.dataSetUserId = -1; + self.model.matchConfig.dataSetFsName = -1; + }, + + getDepMemberData: function(keyword, corpId, depId, page, count) { + var self = this; + var jo = arguments[0]; + if (jo instanceof Object) { + keyword = jo.keyword || ''; + corpId = jo.corpId || ''; + depId = jo.depId || ''; + page = jo.page || 0; + count = jo.count || 10; + } + + var synUserLoadingPane = BI.Constants.getConstant('dingtalksyn.constants').popup_loading_syn_users; + var loadingController = Dec.DingTalkSyn.Util.showLoading('.digntalk-member-management-container', BI.i18nText('Dec-DingTalkSyn_Loading'), synUserLoadingPane); + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/dep/member', + type: 'POST', + data: { + keyword: keyword, + corpId: corpId, + depId: depId, + page: page, + count: count + }, + complete: function (res, status) { + loadingController.remove(synUserLoadingPane); + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.depMemberData = BI.jsonDecode(res.responseText); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + synMemberData: function(callback) { + var self = this; + Dec.DingTalkSyn.Util.synMemberData(function() { + BI.isFunction(callback) && callback(); + }); + }, + + saveMatchingFSWayData: function(data) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/match/method', + type: 'POST', + data: data, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + BI.Msg.toast(BI.i18nText("Dec-Basic_Success")); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + getScheduleTaskConfig: function(callBack) { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/timing/task', + type: 'GET', + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + if (BI.isFunction(callBack)) { + callBack.call(self, result); + } + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + saveFsUserRelationData: function(dingTalkUser, fsUserName) { + var self = this; + var userId = dingTalkUser.userId; + var id = dingTalkUser.userRelationId; + var corpId = dingTalkUser.corpId; + var data = { + dingTalkUser: userId, + fsUser: BI.isEmpty(fsUserName)? "" : fsUserName, + corpId: corpId + }; + if (!BI.isEmpty(id)) { + data.id = id; + } + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/user/relation', + type: 'POST', + data: data, + complete: function (res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + dingTalkUser.userRelationId = result.id; + BI.Msg.toast(BI.i18nText("Dec-Basic_Success")); + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + } + }); + BI.model("dingtalksyn.model.member.management", Model); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/tree/template.search.tree.js b/src/main/web/src/modules/module/tree/template.search.tree.js new file mode 100644 index 0000000..f094146 --- /dev/null +++ b/src/main/web/src/modules/module/tree/template.search.tree.js @@ -0,0 +1,34 @@ +!(function() { + var TemplateSearchTree = BI.inherit(BI.Widget, { + props: { + width: 322, + height: 24 + }, + + render: function() { + var self = this, o = this.options; + return { + type: "dec.schedule.template.search", + width: o.width, + height: o.height, + ref: function(_ref) { + self.templateSearchTree = _ref; + }, + listeners: [{ + eventName: BI.MultiLayerSingleTreeCombo.EVENT_CHANGE, + action: function () { + self.fireEvent("EVENT_CHANGE", self.getValue()); + } + }] + } + }, + + getValue: function() { + var file = this.templateSearchTree.getValue(); + // 这里是在兼容10.3 平台改动了搜索树的返回值,从数组变成了值 + return Array.isArray(file) ? file[0] : file; + } + }); + + BI.shortcut('dingtalksyn.template.search.tree', TemplateSearchTree); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/module/trigger/editor.trigger.js b/src/main/web/src/modules/module/trigger/editor.trigger.js new file mode 100644 index 0000000..ff1ebb5 --- /dev/null +++ b/src/main/web/src/modules/module/trigger/editor.trigger.js @@ -0,0 +1,77 @@ +!(function() { + // fanglei: 自定义editorTrigger,主要解决两个问题:1.提供不可编辑配置选项。2.根据value选出text展示出来。 + var EditorTrigger = BI.inherit(BI.Trigger, { + _const: { + hgap: 4 + }, + + _defaultConfig: function () { + var conf = EditorTrigger.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-editor-trigger bi-border", + height: 24, + allowBlank: false, + watermark: "", + errorText: "", + editable: false, + items: [] + }); + }, + + _init: function () { + this.options.height -= 2; + EditorTrigger.superclass._init.apply(this, arguments); + var self = this, o = this.options, c = this._const; + this.editor = BI.createWidget({ + type: "dingtalksyn.sign_editor", + height: o.height, + value: o.value, + allowBlank: o.allowBlank, + watermark: o.watermark, + errorText: o.errorText, + editable: o.editable, + items: o.items + }); + this.editor.on(BI.Controller.EVENT_CHANGE, function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.editor.on(BI.SignEditor.EVENT_CHANGE, function () { + self.fireEvent(EditorTrigger.EVENT_CHANGE, arguments); + }); + + BI.createWidget({ + element: this, + type: "bi.htape", + items: [ + { + el: this.editor + }, { + el: { + type: "bi.trigger_icon_button", + width: o.triggerWidth || o.height + }, + width: o.triggerWidth || o.height + } + ] + }); + }, + + populate: function(items) { + this.editor.options.items = items; + }, + + getValue: function () { + return this.editor.getValue(); + }, + + setValue: function (value) { + this.editor.setValue(value); + }, + + setText: function (text) { + this.editor.setState(text); + } + }); + EditorTrigger.EVENT_CHANGE = "EVENT_CHANGE"; + BI.shortcut("dingtalksyn.editor_trigger", EditorTrigger); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/module/trigger/search.editor.trigger.js b/src/main/web/src/modules/module/trigger/search.editor.trigger.js new file mode 100644 index 0000000..7b74cfb --- /dev/null +++ b/src/main/web/src/modules/module/trigger/search.editor.trigger.js @@ -0,0 +1,106 @@ +!(function() { + var SearchTextValueTrigger = BI.inherit(BI.Trigger, { + + props: { + baseCls: "bi-search-text-value-trigger", + height: 30 + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.htape", + items: [ + { + el: { + type: "bi.searcher", + ref: function () { + self.searcher = this; + }, + isAutoSearch: false, + el: { + type: "dingtalksyn.state_editor", + ref: function () { + self.editor = this; + }, + text: this._digest(o.value, o.items), + value: o.value, + height: o.height + }, + popup: { + type: "bi.search_text_value_combo_popup", + cls: "bi-card", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE + }, + onSearch: function (obj, callback) { + var keyword = obj.keyword; + var finding = BI.Func.getSearchResult(o.items, keyword); + var matched = finding.matched, finded = finding.finded; + callback(finded, matched); + }, + listeners: [{ + eventName: BI.Searcher.EVENT_CHANGE, + action: function () { + self.fireEvent(SearchTextValueTrigger.EVENT_CHANGE); + } + }] + } + }, { + el: { + type: "bi.layout", + width: 30 + }, + width: 30 + } + ] + } + }, + + _setState: function (v) { + this.editor.setState(v); + }, + + _digest: function(vals, items){ + var o = this.options; + vals = BI.isArray(vals) ? vals : [vals]; + var result = []; + var formatItems = BI.Tree.transformToArrayFormat(items); + BI.each(formatItems, function (i, item) { + if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) { + result.push(item.text || item.value); + } + }); + + if (result.length > 0) { + return result.join(","); + } else { + return o.text; + } + }, + + stopEditing: function () { + this.searcher.stopSearch(); + }, + + getSearcher: function () { + return this.searcher; + }, + + populate: function (items) { + this.options.items = items; + }, + + setValue: function (vals) { + this._setState(this._digest(vals, this.options.items)); + }, + + getValue: function () { + return this.searcher.getValue(); + } + }); + SearchTextValueTrigger.EVENT_SEARCHING = "EVENT_SEARCHING"; + SearchTextValueTrigger.EVENT_STOP = "EVENT_STOP"; + SearchTextValueTrigger.EVENT_START = "EVENT_START"; + SearchTextValueTrigger.EVENT_CHANGE = "EVENT_CHANGE"; + BI.shortcut("dingtalksyn.search_text_value_trigger", SearchTextValueTrigger); +})(); \ No newline at end of file diff --git a/src/main/web/src/modules/schedule/dingtalk.schedule.addressee.js b/src/main/web/src/modules/schedule/dingtalk.schedule.addressee.js new file mode 100644 index 0000000..7a4958a --- /dev/null +++ b/src/main/web/src/modules/schedule/dingtalk.schedule.addressee.js @@ -0,0 +1,57 @@ +!(function () { + var Addressee = BI.inherit(BI.Widget, { + _store: function () { + return BI.Models.getModel("dingtalksyn.model.schedule.addressee", this.options); + }, + + render: function () { + var self = this, o = this.options; + return { + type: "dec.error_label", + width: 281, + el: { + type: "dingtalksyn.chatgroup.combo", + value: self.model.selectedValue, + height: 24, + ref: function(_ref) { + self.chatGroupCombo = _ref; + }, + listeners: [{ + eventName: "EVENT_CONFIRM", + action: function () { + self.chatGroupComboErrorPane.hideError(); + } + }] + }, + ref: function (_ref) { + self.chatGroupComboErrorPane = _ref; + } + } + }, + + getValue: function () { + return this.model.selectedChatGroups; + }, + + setValue: function (v) { + this.store.setSelectedValue(v); + }, + + checkValid: function () { + var ob = this.model.selectedValue, valid = true; + if (BI.isEmpty(ob) || (ob.type === BI.Selection.Multi && ob.value.length < 1) || ob.type === BI.Selection.None) { + this.chatGroupComboErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not_Null')); + valid = false; + } + return valid; + }, + + destroyed: function () { + if (BI.isFunction(this.options.destroyed)) { + this.options.destroyed() + } + } + }); + + BI.shortcut("dingtalksyn.schedule.addressee", Addressee); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/schedule/dingtalk.schedule.addressee.model.js b/src/main/web/src/modules/schedule/dingtalk.schedule.addressee.model.js new file mode 100644 index 0000000..fb7cf2d --- /dev/null +++ b/src/main/web/src/modules/schedule/dingtalk.schedule.addressee.model.js @@ -0,0 +1,32 @@ +!(function () { + var Model = BI.inherit(Fix.Model, { + state: function() { + return { + selectedValue: {} + } + }, + + childContext: ["selectedValue"], + + computed: { + selectedChatGroups: function () { + return { + type: this.model.selectedValue.type, + chatGroups: this.model.selectedValue.value + } + } + }, + + actions: { + getSelectedValue: function () { + return this.model.selectedValue; + }, + + setSelectedValue: function (v) { + this.model.selectedValue = v; + } + } + }); + + BI.model("dingtalksyn.model.schedule.addressee", Model); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/schedule/dingtalk.schedule.event.service.js b/src/main/web/src/modules/schedule/dingtalk.schedule.event.service.js new file mode 100644 index 0000000..b3aa27c --- /dev/null +++ b/src/main/web/src/modules/schedule/dingtalk.schedule.event.service.js @@ -0,0 +1,16 @@ +BI.service("dingtalksyn.service.schedule.event", BI.inherit(BI.OB, { + selectedAgentId: "", + + getSelectedAgentId: function () { + return this.selectedAgentId; + }, + + setSelectedAgentId: function (id) { + this.selectedAgentId = id; + }, + + // Service本是单例对象,当触发事件的组件被销毁的时候,应该把里面的值清空一下。 + clear: function () { + this.selectedAgentId = ""; + } +})); \ No newline at end of file diff --git a/src/main/web/src/modules/schedule/dingtalk.schedule.terminal.js b/src/main/web/src/modules/schedule/dingtalk.schedule.terminal.js new file mode 100644 index 0000000..42d8517 --- /dev/null +++ b/src/main/web/src/modules/schedule/dingtalk.schedule.terminal.js @@ -0,0 +1,75 @@ +!(function () { + var Schedule = BI.inherit(BI.Widget, { + _store: function () { + return BI.Models.getModel("dingtalksyn.model.schedule.terminal"); + }, + + watch: { + agentIds: function (v) { + this.combo.populate(v); + this.combo.setValue(this.model.selectedId); + }, + + selectedId: function (v) { + var service = BI.Services.getService("dingtalksyn.service.schedule.event"); + service.setSelectedAgentId(v); + service.fireEvent("AGENT_CHANGE", v); + this.combo.setValue(v); + } + }, + + render: function () { + var self = this; + return { + type: "dec.error_label", + width: 281, + el: { + type: "bi.text_value_combo", + height: 24, + value: self.model.selectedId, + ref: function (_ref) { + self.combo = _ref; + }, + listeners: [{ + eventName: BI.TextValueCombo.EVENT_CHANGE, + action: function () { + self.store.setSelectedId(this.getValue()[0]); + self.comboErrorPane.hideError(); + } + }], + items: self.model.agentIds + }, + ref: function (_ref) { + self.comboErrorPane = _ref; + } + } + }, + + mounted: function () { + this.store.getAgents(); + }, + + destroyed: function () { + BI.Services.getService("dingtalksyn.service.schedule.event").clear(); + }, + + getValue: function () { + return this.store.getSelectedId(); + }, + + setValue: function (v) { + this.store.setSelectedId(v); + }, + + checkValid: function () { + var valid = true; + if (BI.isEmpty(this.combo.getValue()[0])) { + this.comboErrorPane.showError(BI.i18nText('Dec-DingTalkSyn_Not_Null')); + valid = false; + } + return valid; + } + }); + + BI.shortcut("dingtalksyn.schedule.terminal", Schedule); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/schedule/dingtalk.schedule.terminal.model.js b/src/main/web/src/modules/schedule/dingtalk.schedule.terminal.model.js new file mode 100644 index 0000000..b1283fd --- /dev/null +++ b/src/main/web/src/modules/schedule/dingtalk.schedule.terminal.model.js @@ -0,0 +1,56 @@ +!(function() { + var Model = BI.inherit(Fix.Model, { + state: function() { + return { + agents: [], + selectedId: "" + } + }, + + computed: { + agentIds: function () { + var self = this; + return BI.map(self.model.agents, function(index, agent) { + return { + text: agent.agentName + '-' + agent.agentId, + value: agent.id + } + }); + } + }, + + actions: { + setAgents: function (agents) { + this.model.agents = agents; + }, + + getAgents: function () { + var self = this; + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/agent', + type: 'GET', + complete: function(res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + self.model.agents = result.agentList; + } else { + Dec.DingTalkSyn.Util.handleCommonErr(result) + } + } + } + }); + }, + + getSelectedId: function () { + return this.model.selectedId; + }, + + setSelectedId: function (v) { + this.model.selectedId = v; + } + } + }); + + BI.model("dingtalksyn.model.schedule.terminal", Model); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/schedule/provider/dingtalk.output.action.provider.js b/src/main/web/src/modules/schedule/provider/dingtalk.output.action.provider.js new file mode 100644 index 0000000..bf89caf --- /dev/null +++ b/src/main/web/src/modules/schedule/provider/dingtalk.output.action.provider.js @@ -0,0 +1,123 @@ +!(function () { + var TERMINAL_TYPE = 4; + var ADDRESSEE_CHAT_GROUP = 1; + + BI.config("dec.provider.client.notification", function (provider) { + provider.registerHandler({ + getTerminalType: function () { + return TERMINAL_TYPE; + }, + + getTerminalText: function () { + return BI.i18nText("Dec-DingTalkSyn_Mobile-Push-DingTalkSyn-Terminal"); + }, + + getTerminalComponent: function () { + var self = this; + return { + type: "dingtalksyn.schedule.terminal", + ref: function (_ref) { + self.terminalComponent = _ref; + }, + checkValid: function () { + return self.terminalComponent.checkValid() + } + } + }, + + getExtraAddressees: function () { + var self = this; + var extraAddressees = {}; + extraAddressees[ADDRESSEE_CHAT_GROUP] = { + text: BI.i18nText("Dec-DingTalkSyn_Addressee_Chat_Group"), + disabledTip: BI.i18nText("Dec-DingTalkSyn_Addressee_Chat_Group_Disable_Tip"), + component: { + type: "dingtalksyn.schedule.addressee", + ref: function (_ref) { + self.chatGroupComponent = _ref; + }, + destroyed: function () { + self.chatGroupComponent = null; + } + }, + isEnable: function (res) { + return !res.createAttachByUsername; + }, + checkValid: function () { + return self.chatGroupComponent.checkValid() + } + }; + return extraAddressees; + }, + + getValue: function () { + var self = this; + // actionName最后一个点后面的类名要和这个return的json的字段名一致 + return { + OutputDingTalkSyn: BI.extend(self.value, { + "@class": "com.fr.plugin.dingtalksyn.server.bean.OutputDingTalkSyn", + actionName: "com.fr.plugin.dingtalksyn.server.bean.OutputDingTalkSyn", + terminal: TERMINAL_TYPE, + agentId: self.terminalComponent.getValue(), + outputChat: self.chatGroupComponent.getValue() + }) + } + }, + + setValue: function (v) { + if (v.terminal && v.terminal === TERMINAL_TYPE) { + this.value = v; + this.terminalComponent.setValue(v.agentId); + + var outputChat = this._transformOutputChatToComboValue(v.outputChat); + this.chatGroupComponent.setValue(outputChat); + } + }, + + checkValid: function (validJo) { + var valid = true; + // 判断拓展组件是否为空的前提是该组件对应的复选框已经选中 + var selectedTerminal = validJo.selectedTerminal; + if (this._isTerminalSelected(selectedTerminal)) { + valid = this.terminalComponent.checkValid(); + var selectedExtraAddressee = validJo.selectedExtraAddressee[TERMINAL_TYPE]; + if (this._isChatGroupSelected(selectedExtraAddressee)) { + valid = this.chatGroupComponent.checkValid(); + } + } + + return valid; + }, + + _isTerminalSelected: function (terminals) { + var totalTerminal = 0; + BI.each(terminals, function (i, terminal) { + totalTerminal += terminal; + }); + return (TERMINAL_TYPE & totalTerminal) === TERMINAL_TYPE; + }, + + _isChatGroupSelected: function (addressees) { + var totalExtraAddressee = 0; + BI.each(addressees, function (i, addressee) { + totalExtraAddressee += addressee; + }); + return (ADDRESSEE_CHAT_GROUP & totalExtraAddressee) === ADDRESSEE_CHAT_GROUP; + }, + + _transformOutputChatToComboValue: function (outputChat) { + if (!BI.isEmpty(outputChat)) { + return { + type: outputChat.type, + value: outputChat.chatGroups + } + } else { + return { + type: BI.Selection.None, + value: [] + } + } + } + }); + }); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/single/login/dingtalk.single.login.js b/src/main/web/src/modules/single/login/dingtalk.single.login.js new file mode 100644 index 0000000..1843e83 --- /dev/null +++ b/src/main/web/src/modules/single/login/dingtalk.single.login.js @@ -0,0 +1,35 @@ +var DDLogin = function(corpId, url, isPC) { + dd.ready(function () { + dd.runtime.permission.requestAuthCode({ + corpId: corpId, + onSuccess: function (result) { + var code = result.code; + var redirectUrl = window.location.origin + url + "&code=" + code; + if (isPC) { + window.location.replace(redirectUrl); + } else { + dd.biz.navigation.replace({ + url: redirectUrl, + onSuccess : function(result) {}, + onFail : function(err) {} + }); + } + }, + onFail: function (err) { + alert(JSON.stringify(err)); + } + }) + }); + + dd.error(function (error) { + alert(JSON.stringify(error)); + }); +}; + +/** + * @return {boolean} + */ +var IsPC = function () { + var isMobile = /Android|iPhone|Windows Phone|iPad|iPod|xiaomi/i.test(navigator.userAgent); + return !isMobile; +}; \ No newline at end of file diff --git a/src/main/web/src/modules/style/DingTalkQuickConfigManagement.css b/src/main/web/src/modules/style/DingTalkQuickConfigManagement.css new file mode 100644 index 0000000..d8c4424 --- /dev/null +++ b/src/main/web/src/modules/style/DingTalkQuickConfigManagement.css @@ -0,0 +1,18 @@ +.dingtalksyn-chatgourp-management { + overflow: visible !important; + flex-shrink: 0 !important; +} + +.dingtalksyn-error-background { + background: #F2F4F7; +} + +/*让错误信息可以被选中,方便复制*/ +.dingtalksyn-message-board { + -webkit-user-select: text; + -khtml-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + -o-user-select: text; + user-select: text; +} \ No newline at end of file diff --git a/src/main/web/src/modules/style/dingtalk.main.css b/src/main/web/src/modules/style/dingtalk.main.css new file mode 100644 index 0000000..b2e923f --- /dev/null +++ b/src/main/web/src/modules/style/dingtalk.main.css @@ -0,0 +1,66 @@ +* { + margin: 0; + padding: 0; +} + +.dingtalksyn-gray-color { + color: #9EA6B2; +} + +.dingtalksyn-table-header { + background: #EAF2FD; +} + +.odd { + background: #FFFFFF; +} + +.even { + background: #FBFDFF; +} + +.dingtalksyn-tab-title { + background: #FFFFFF; +} + +.dingtalksyn-tab-content { + background: #F7F8FA; +} + +.dingtalksyn-section-container { + background: #FFFFFF; +} + +.page-button { + border: 1px solid #E8EAED; + border-radius: 2px; +} + +.dingtalksyn-no-border { + border: 0; +} + +.dingtalksyn-popup-cancel-button { + border: 1px solid #3685F2; +} + +.dingtalksyn-border-box { + box-sizing: border-box; +} + +.dingtalksyn-container .bi-combo .bi-editor-trigger, .dingtalksyn-container .bi-editor { + border-radius: 2px; +} + +.dingtalksyn-refresh-font .b-font:before{ + content: "\e6ef"; + color: #3c89f3; +} + +.dingtalksyn-node-font .b-font:before { + content: "\e7b7"; +} + +.dingtalksyn-overflow-visible { + overflow: visible !important; +} \ No newline at end of file diff --git a/src/main/web/src/modules/style/dingtalk.member.management.css b/src/main/web/src/modules/style/dingtalk.member.management.css new file mode 100644 index 0000000..36e8dbf --- /dev/null +++ b/src/main/web/src/modules/style/dingtalk.member.management.css @@ -0,0 +1,11 @@ +.dingtalksyn-search-combo-button { + visibility: hidden; +} + +.dingtalksyn-search-combo-container:hover .dingtalksyn-search-combo-button{ + visibility: visible; +} + +.dingtalksyn-member-auto-update-button { + color: #3685F2; +} \ No newline at end of file diff --git a/src/main/web/src/modules/util/dingtalk.agent.util.js b/src/main/web/src/modules/util/dingtalk.agent.util.js new file mode 100644 index 0000000..b48e0f2 --- /dev/null +++ b/src/main/web/src/modules/util/dingtalk.agent.util.js @@ -0,0 +1,17 @@ +!(function () { + if (!Dec.DingTalkSyn) { + Dec.DingTalkSyn = {}; + } + + Dec.DingTalkSyn.Util = Dec.DingTalkSyn.Util || {}; + + BI.extend(Dec.DingTalkSyn.Util, { + isValidAgent: function (type) { + return type === BI.Constants.getConstant('dingtalksyn.constants').agent_type_valid; + }, + + isTokenEmptyAgent: function (type) { + return type === BI.Constants.getConstant('dingtalksyn.constants').agent_type_token_empty; + } + }); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/util/dingtalk.ajax.util.js b/src/main/web/src/modules/util/dingtalk.ajax.util.js new file mode 100644 index 0000000..79282f4 --- /dev/null +++ b/src/main/web/src/modules/util/dingtalk.ajax.util.js @@ -0,0 +1,170 @@ +!(function () { + if (!Dec.DingTalkSyn) { + Dec.DingTalkSyn = {}; + } + + Dec.DingTalkSyn.Util = Dec.DingTalkSyn.Util || {}; + + var pluginId = 'com.fr.plugin.dingtalksyn'; + + var resolvePath = resolvePath || function resolvePath(path, isPublic) { + if (!path || path[0] !== '/') { + path = '/' + path; + } + return isPublic === true + ? Dec.fineServletURL + '/plugin/public/' + pluginId + path + : Dec.fineServletURL + '/plugin/private/' + pluginId + path; + }; + + BI.extend(Dec.DingTalkSyn.Util, { + resolvePath: resolvePath, + + ajax: function(props) { + var self = this; + if (props instanceof Object) { + var isPublic = props.isPublic === undefined? false : props.isPublic; + if (!isPublic) { + var token = BI.Cache.getCookie(DecCst.Cookie.TOKEN); + if (token) { + props.headers = props.headers || {}; + props.headers.Authorization = "Bearer " + token; + } + } + var url = resolvePath(props.url, isPublic) || ''; + var type = props.type || 'POST'; + var data = props.data || {}; + var complete = BI.isFunction(props.complete)? props.complete : BI.emptyFn; + $.ajax({ + url: url, + headers: props.headers, + data: BI.cjkEncodeDO(data), + type: type, + complete: function(res, status) { + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_ILLEGAL_PARAMETERS) { + Dec.Msg.alert({ + message: result.errorMsg + }); + } else if (!isPublic && BI.contains([DecCst.ErrorCode.LOGIN_INFO_NOT_AVAILABLE, DecCst.ErrorCode.LOGIN_INFO_ERROR], result.errorCode)) { + BI.Services.getService("dec.service.main").loginKick(result.errorCode); + } else { + complete.apply(this, [res, status]); + } + } else { + Dec.Msg.alert({ + message: BI.i18nText('Dec-DingTalkSyn_NetWork-Anomaly') + }); + complete.apply(this, [res, status]); + } + } + }); + } + }, + + downLoad: function (url, method, fileName, callback) { + if (url) { + if (url instanceof Object) { + method = url.method; + fileName = url.fileName; + callback = url.callback; + url = url.url; + } + var xhr = new XMLHttpRequest(); + xhr.open(method, url, true); + xhr.setRequestHeader("Authorization", "Bearer " + this._getCookie('fine_auth_token')); + xhr.responseType = 'blob'; + xhr.onload = function(e) { + var self = this; + if (this.status === 200) { + var reader = new FileReader(); + reader.onload = function (event) { + try { + var data = JSON.parse(event.target.result); + if (data && data.errorCode) { + callback && callback(data); + } + } catch (error) { + // 接口返回对象是blob,不能被转换成json,正常下载文件 + var blob = self.response; + var a = document.createElement('a'); + var link = window.URL.createObjectURL(blob); + a.href = link; + a.download = fileName; + a.click(); + window.URL.revokeObjectURL(link); + } + }; + reader.readAsText(self.response); + } + }; + xhr.send(); + } + }, + + reqWithLoading: function (props) { + var synUserLoadingPane = BI.Constants.getConstant('dingtalksyn.constants').popup_loading_syn_users; + var loadingController = Dec.DingTalkSyn.Util.showLoading('.dingtalksyn-member-management-container', BI.i18nText('Dec-DingTalkSyn_Loading'), synUserLoadingPane); + var complete = (function (func) { + return function (res, status) { + loadingController.remove(synUserLoadingPane); + BI.isFunction(func) && func(res, status); + } + }) (props && props.complete); + props && (props.complete = complete); + this.ajax(props); + }, + + /** + * 针对可以提示详细信息的弹窗,错误简述就用这个方法获取错误码对应的提示文字 + * 如果错误码是500或者404这种,那就采取通用的提示文字:“发生错误,错误码为:500,点击详细信息按钮获取errorMsg,即报错堆栈" + */ + getErrorText: function (result) { + return BI.i18nText(Dec.DingTalkSyn.ERRORCODE[result.errorCode]) ? + BI.i18nText(Dec.DingTalkSyn.ERRORCODE[result.errorCode]) : + BI.i18nText("Dec-DingTalkSyn_Common_Error_Tip") + result.errorCode + }, + + handleCommonErr: function(result) { + var errMsg = this.getErrorText(result); + if (errMsg) { + Dec.Msg.alert({ + message: errMsg + }); + } + }, + + alertErrWithDetail: function (result) { + var self = this; + var maskerName = BI.Constants.getConstant('dingtalksyn.constants').popup_alert_detail; + BI.Maskers.create(maskerName, null, { + render: { + type: "dingtalksyn.detail.alert", + iconCls: "upload-fail-icon", + tipText: self.getErrorText(result), + detailText: result.errorMsg, + listeners: [{ + eventName: "EVENT_CLOSE", + action: function () { + BI.Maskers.remove(maskerName); + } + }] + } + }); + + BI.Maskers.show(maskerName); + }, + + _getCookie: function (name) { + var cookies = document.cookie; + var list = cookies.split("; "); + + for(var i = 0; i < list.length; i++) { + var arr = list[i].split("="); + if(arr[0] === name) + return decodeURIComponent(arr[1]); + } + return ""; + } + }); +}) (); \ No newline at end of file diff --git a/src/main/web/src/modules/util/dingtalk.util.js b/src/main/web/src/modules/util/dingtalk.util.js new file mode 100644 index 0000000..821c680 --- /dev/null +++ b/src/main/web/src/modules/util/dingtalk.util.js @@ -0,0 +1,247 @@ +!(function () { + if (!Dec.DingTalkSyn) { + Dec.DingTalkSyn = {}; + } + + Dec.DingTalkSyn.Util = Dec.DingTalkSyn.Util || {}; + + BI.extend(Dec.DingTalkSyn.Util, { + /** + * 将user中的部门数组转换成string显示 + * @param user + * @returns {string} + */ + replaceDepartmentArrToString: function(user) { + var deps = ''; + for (var j = 0; j < user.department.length; j++) { + deps = deps + user.department[j]; + if (j !== user.department.length - 1) { + deps = deps + ','; + } + } + return deps; + }, + + formatTableStyle: function() { + $('.dingtalksyn-table').find('table').css('border', '0'); + $('.dingtalksyn-table').find('td').css('border', '0'); + $('.dingtalksyn-table').find('td').css('border-bottom', '1px solid #EAF2FD'); + }, + + alert: function(props) { + var popup_alert = BI.Constants.getConstant('dingtalksyn.constants').popup_alert; + var alertPopover = BI.extend(props, { + type: 'dingtalksyn.alert.popover', + listeners: [ + { + eventName: "EVENT_CLOSE", + action: function () { + BI.Popovers.remove(popup_alert); + } + } + ] + }); + + BI.Popovers.create(popup_alert, { + cls: 'dingtalksyn-container', + header: { + type: 'bi.left_vertical_adapt', + hgap: 5, + items: [ + { + type: 'bi.label', + forceCenter: true, + text: BI.i18nText('Dec-DingTalkSyn_Hint') + } + ] + }, + body: alertPopover, + width: 455, + height: 245 + }).open(popup_alert); + + $('.dingtalksyn-popup-cancel-button').css('border', '1px solid #3685F2').css('border-radius', '2px') + .css('color', '#3685F2'); + $('.dingtalksyn-popup-confirm-button').css('border-radius', '2px'); + }, + + /** + * 同步后台数据 + * @param callBack + * @private + */ + synMemberData: function(callBack) { + var self = this; + callBack = callBack || null; + var synUserLoadingPane = BI.Constants.getConstant('dingtalksyn.constants').popup_loading_syn_users; + var loadingController = self.showLoading('.dingtalksyn-member-management-container', BI.i18nText('Dec-DingTalkSyn_Loading'), synUserLoadingPane); + Dec.DingTalkSyn.Util.ajax({ + url: '/dingtalksyn/syn/member', + type: 'POST', + complete: function (res, status) { + loadingController.remove(synUserLoadingPane); + if (status === 'success') { + var result = BI.jsonDecode(res.responseText); + if (result.errorCode === Dec.DingTalkSyn.ERROR_CODE_OK) { + if (BI.isFunction(callBack)) { + callBack.call(self); + } + } else { + self.alert({ + label: self.getErrorText(result) + }); + } + } + } + }); + }, + + /** + * @param container loading显示的容器 + * @param label loading提示文字 + * @param popup_loading_name loading名称 + * @return loadingController 当前loadingPane所在的controller + */ + showLoading: function(container, label, popup_loading_name) { + var loadingController = new Dec.DingTalkSyn.LoadingPopupController({ + render: container + }); + + loadingController.create(popup_loading_name, { + body: { + type: "bi.center_adapt", + items: [{ + type: 'bi.vertical', + vgap: 20, + items: [{ + type: "bi.center_adapt", + items: [{ + type: "bi.img", + width: 96, + height: 96, + src: Dec.fineServletURL + "/resources?path=/com/fr/plugin/dingtalksyn/dist/images/2x/icon/loading.gif" + }] + }, { + type: 'bi.label', + width: 400, + height: 12, + text: label + }] + }] + } + }).open(popup_loading_name); + return loadingController; + }, + + /** + * 展示结果的alert + * @param container + * @param label + * @param success 结果 true false + * @param popup_alert_name + */ + showResultAlert: function(container, label, success, popup_alert_name) { + Dec.DingTalkSyn.ResultAlert = new Dec.DingTalkSyn.LoadingPopupController({ + render: container + }); + + var imgSrc = Dec.fineServletURL + (success? '/resources?path=/com/fr/plugin/dingtalksyn/dist/images/2x/icon/icon_success.png' : '/resources?path=/com/fr/plugin/dingtalksyn/dist/images/2x/icon/icon_fail.png'); + var confirmBtn = success? {} : { + type: 'bi.center_adapt', + items: [{ + type: 'bi.button', + width: 80, + height: 24, + text: BI.i18nText('Dec-DingTalkSyn_Confirm'), + handler: function () { + Dec.DingTalkSyn.Util.hideResultAlert(popup_alert_name); + } + }] + }; + Dec.DingTalkSyn.ResultAlert.create(popup_alert_name, { + body: { + type: 'bi.center_adapt', + items: [{ + type: 'bi.vertical', + vgap: 20, + items: [{ + type: 'bi.center_adapt', + items: [{ + type: "bi.img", + width: 96, + height: 96, + src: imgSrc + }] + }, { + type: 'bi.center_adapt', + items: [{ + type: 'bi.label', + width: 400, + height: 12, + title: label, + text: label + }] + }, confirmBtn] + }] + } + }).open(popup_alert_name); + }, + + hideResultAlert: function(popup_alert_name) { + Dec.DingTalkSyn.ResultAlert && Dec.DingTalkSyn.ResultAlert.remove(popup_alert_name); + }, + + checkUrlValid: function(url) { + return BI.startWith(url.toLowerCase(), 'http') || BI.startWith(url.toLowerCase(), 'https'); + }, + + generateDepTreeRootNode: function(corp) { + var rootNode = {}; + rootNode.id = corp.corpId; + rootNode.text = BI.i18nText('Dec-DingTalkSyn_Enterprise-DingDing') + '(' + corp.corpId + ')'; + rootNode.value = {}; + rootNode.value.depId = ''; + rootNode.value.corpId = corp.corpId; + return rootNode; + }, + + generateDepTreeChildNode: function(departmentList, corpId) { + // parentId不存在于已知列表中的元素 + var nodes = departmentList.filter(function(department) { + return departmentList.every(function(dep) { + return department.parentId !== dep.id; + }); + }); + + // parentId存在于已知列表中的元素 + var leafNodes = departmentList.filter(function(department) { + return nodes.every(function(dep) { + return department.id !== dep.id; + }); + }); + + nodes = this.formatTreeNode(nodes, corpId, false); + leafNodes = this.formatTreeNode(leafNodes, corpId, true); + return nodes.concat(leafNodes); + }, + + formatTreeNode: function(nodes, corpId, isLeafNode) { + nodes.map(function(node) { + node.value = {}; + node.value.corpId = corpId; + node.value.depId = node.id; + node.id = corpId + node.id; + node.text = node.name; + node.pId = isLeafNode? corpId + node.parentId : corpId; + delete node.name; + delete node.parentId; + }); + return nodes; + }, + + isEmpty: function (value) { + return value === "" || value === null || value === undefined; + } + }); + +}) (); \ No newline at end of file diff --git a/src/main/web/src/start.js b/src/main/web/src/start.js new file mode 100644 index 0000000..e69de29