Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
399e709d1d |
|
|
@ -11,7 +11,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 8
|
- name: Set up JDK 8
|
||||||
|
|
|
||||||
135
README.cn.md
135
README.cn.md
|
|
@ -13,7 +13,7 @@
|
||||||
11. 支持 epub 图书文档
|
11. 支持 epub 图书文档
|
||||||
12. 支持 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件
|
12. 支持 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件
|
||||||
13. 支持 dwg, dxf, dwf, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt 等 CAD 模型文件
|
13. 支持 dwg, dxf, dwf, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt 等 CAD 模型文件
|
||||||
14. 支持 txt, xml(渲染), xbrl(渲染), md(渲染), java, php, py, js, css 等所有纯文本
|
14. 支持 txt, xml(渲染), md(渲染), java, php, py, js, css 等所有纯文本
|
||||||
15. 支持 zip, rar, jar, tar, gzip, 7z 等压缩包
|
15. 支持 zip, rar, jar, tar, gzip, 7z 等压缩包
|
||||||
16. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp 等图片预览(翻转,缩放,镜像)
|
16. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp 等图片预览(翻转,缩放,镜像)
|
||||||
17. 支持 tif, tiff 图信息模型文件
|
17. 支持 tif, tiff 图信息模型文件
|
||||||
|
|
@ -42,7 +42,9 @@
|
||||||
地址:[https://file.kkview.cn](https://file.kkview.cn)
|
地址:[https://file.kkview.cn](https://file.kkview.cn)
|
||||||
|
|
||||||
### 项目文档(Project documentation)
|
### 项目文档(Project documentation)
|
||||||
1. 详细使用文档:https://kkview.cn/zh-cn/docs/home.html
|
1. 详细wiki文档:https://gitee.com/kekingcn/file-online-preview/wikis/pages
|
||||||
|
1. 中文文档:https://gitee.com/kekingcn/file-online-preview/blob/master/README.md
|
||||||
|
1. English document:https://gitee.com/kekingcn/file-online-preview/blob/master/README.en.md
|
||||||
|
|
||||||
### 联系我们,加入组织
|
### 联系我们,加入组织
|
||||||
> 我们会用心回答解决大家在项目使用中的问题,也请大家在提问前至少 Google 或 baidu 过,珍爱生命远离无效的交流沟通
|
> 我们会用心回答解决大家在项目使用中的问题,也请大家在提问前至少 Google 或 baidu 过,珍爱生命远离无效的交流沟通
|
||||||
|
|
@ -51,7 +53,7 @@
|
||||||
|
|
||||||
### 文档预览效果
|
### 文档预览效果
|
||||||
#### 1. 文本预览
|
#### 1. 文本预览
|
||||||
支持所有类型的文本文档预览, 由于文本文档类型过多,无法全部枚举,默认开启的类型如下 txt,html,htm,asp,jsp,xml,xbrl,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd
|
支持所有类型的文本文档预览, 由于文本文档类型过多,无法全部枚举,默认开启的类型如下 txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd
|
||||||
文本预览效果如下
|
文本预览效果如下
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -108,33 +110,12 @@ pdf预览模式预览效果如下
|
||||||

|

|
||||||
考虑说明篇幅原因,就不贴其他格式文件的预览效果了,感兴趣的可以参考下面的实例搭建下
|
考虑说明篇幅原因,就不贴其他格式文件的预览效果了,感兴趣的可以参考下面的实例搭建下
|
||||||
|
|
||||||
#### 10. Excel文件纯前端渲染效果
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
#### 11. 流程图bpmn文件预览效果
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
#### 12. 3D模型文件预览效果:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
#### 13. dcm医疗数位影像文件预览效果:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
#### 14. drawio流程图预览效果:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 快速开始
|
### 快速开始
|
||||||
> 项目使用技术
|
> 项目使用技术
|
||||||
- spring boot: [spring boot开发参考指南](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
|
- spring boot: [spring boot开发参考指南](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
|
||||||
- freemarker
|
- freemarker
|
||||||
- redisson
|
- redisson
|
||||||
- jodconverter
|
- jodconverter
|
||||||
|
|
||||||
> 依赖外部环境
|
> 依赖外部环境
|
||||||
- redis (可选,默认不用)
|
- redis (可选,默认不用)
|
||||||
- OpenOffice 或者 LibreOffice( Windows 下已内置,Linux 脚本启动模式会自动安装,Mac OS 下需要手动安装)
|
- OpenOffice 或者 LibreOffice( Windows 下已内置,Linux 脚本启动模式会自动安装,Mac OS 下需要手动安装)
|
||||||
|
|
@ -148,82 +129,7 @@ pdf预览模式预览效果如下
|
||||||
|
|
||||||
### 历史更新记录
|
### 历史更新记录
|
||||||
|
|
||||||
#### > 2023年07月05日,v4.3 版本发布 :
|
> 2022年12月14日,v4.1.0 版本发布 :
|
||||||
|
|
||||||
#### 新增功能:
|
|
||||||
1. 新增dcm等医疗数位影像预
|
|
||||||
2. 新增drawio绘图预览
|
|
||||||
3. 新增开启缓存的情况下重新生成的命令 &forceUpdatedCache=true
|
|
||||||
4. 新增dwg CAD文件预览
|
|
||||||
5. 新增PDF文件支持密码功能
|
|
||||||
6. 新增PDF文件生成图片的dpi自定义配置
|
|
||||||
7. 新增删除转换后OFFICE、CAD、TIFF、压缩包源文件配置 默认开启 节约磁盘空间
|
|
||||||
8. 新增前端解析xlsx方法
|
|
||||||
9. 新增pages,eps, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt等格式支持
|
|
||||||
|
|
||||||
#### 优化:
|
|
||||||
1. 调整生成的PDF文件 文件名称添加文件后缀 防止生成同名文件
|
|
||||||
2. 调整SQL文件预览方式
|
|
||||||
3. 优化OFD预览兼容性
|
|
||||||
4. 美化TXT文本 分页框的显示
|
|
||||||
5. 升级Linux、Docker版内置office为LibreOffice-7.5.3版本
|
|
||||||
6. 升级Windows版内置office为LibreOffice-7.5.3 Portable版本
|
|
||||||
7. 其他功能优化
|
|
||||||
|
|
||||||
#### 修复:
|
|
||||||
1. 修复反代情况下压缩包获取路径错误
|
|
||||||
2. 修复预览图片的url中如果包含&会导致.click报错
|
|
||||||
3. 修复OFD预览部分已知问题
|
|
||||||
4. 修复预览压缩包时,如果点击的是文件目录(树节点),页面会报错
|
|
||||||
5. 其他已知问题修复
|
|
||||||
|
|
||||||
#### > 2023年04月18日,v4.2.1 版本发布 :
|
|
||||||
|
|
||||||
#### 更新日志:
|
|
||||||
|
|
||||||
1. 修复 dwg 文件预览报空指针的 bug
|
|
||||||
|
|
||||||
#### > 2023年04月13日,v4.2.0 版本发布 :
|
|
||||||
|
|
||||||
#### 新增功能:
|
|
||||||
1. 新增 SVG 格式文件预览支持
|
|
||||||
2. 新增加密的 Office 文件预览支持
|
|
||||||
3. 新增加密的 zip、rar 等压缩包文件预览支持
|
|
||||||
4. 新增 xmind 软件模型文件预览支持
|
|
||||||
5. 新增 bpmn 工作流模型文件预览支持
|
|
||||||
6. 新增 eml 邮件文件预览支持
|
|
||||||
7. 新增 epub 电子书文件预览支持
|
|
||||||
8. 新增 dotm,ett,xlt,xltm,wpt,dot,xlam,xla,dotx 等格式的办公文档预览支持
|
|
||||||
9. 新增 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件预览支持
|
|
||||||
10. 新增可配置限制高风险文件上传的功能,比如 exe 文件
|
|
||||||
11. 新增可配置站点的备案信息
|
|
||||||
12. 新增演示站点删除文件需要密码的功能
|
|
||||||
|
|
||||||
#### 优化:
|
|
||||||
1. 文本文档预览加入缓存
|
|
||||||
2. 美化 404、500 报错页
|
|
||||||
3. 优化发票等 ofd 文件预览的印证渲染兼容性
|
|
||||||
4. 移除 office-plugin 模块, 使用新版 jodconverter组件
|
|
||||||
5. 优化 Excel 文件的预览效果
|
|
||||||
6. 优化 CAD 文件的预览效果
|
|
||||||
7. 更新 xstream 、junrar、pdfbox 等依赖的版本
|
|
||||||
8. 更新 TIF 文件转换 PDF 的插件,添加转换缓存
|
|
||||||
9. 优化演示页 UI 部署
|
|
||||||
10. 压缩包文件预览支持目录
|
|
||||||
|
|
||||||
#### 修复:
|
|
||||||
1. 修复部分接口 XSS 问题
|
|
||||||
2. 修复控制台打印的演示地址不跟着 content-path 配置走的问题
|
|
||||||
3. 修复 ofd 文件预览跨域问题
|
|
||||||
4. 修复内部自签证书 https 协议 url 文件无法下载的问题
|
|
||||||
5. 修复特殊符号的文件无法删除的问题
|
|
||||||
6. 修复 PDF 转图片,内存无法回收导致的 OOM
|
|
||||||
7. 修复 xlsx7.4 以上版本文件预览乱码的问题
|
|
||||||
8. 修复 TrustHostFilter 未拦截跨域接口的问题,这是一个安全问题,有使用到 TrustHost 功能的务必升级
|
|
||||||
9. 修复压缩包文件预览在 Linux 系统下文件名乱码的问题
|
|
||||||
10. 修复 ofd 文件预览页码只能显示10页的问题
|
|
||||||
|
|
||||||
#### > 2022年12月14日,v4.1.0 版本发布 :
|
|
||||||
|
|
||||||
1. 全新首页视觉 @wsd7747
|
1. 全新首页视觉 @wsd7747
|
||||||
2. tif图片预览兼容多页tif的pdf转换、jpg转换,以及jpg在线多页预览功能 @zhangzhen1979
|
2. tif图片预览兼容多页tif的pdf转换、jpg转换,以及jpg在线多页预览功能 @zhangzhen1979
|
||||||
|
|
@ -236,7 +142,7 @@ pdf预览模式预览效果如下
|
||||||
|
|
||||||
感谢 @yl-yue @wsd7747 @zhangzhen1979 @tomhusky @shenghuadun @kischn.sun 的代码贡献
|
感谢 @yl-yue @wsd7747 @zhangzhen1979 @tomhusky @shenghuadun @kischn.sun 的代码贡献
|
||||||
|
|
||||||
#### > 2021年7月6日,v4.0.0 版本发布 :
|
> 2021年7月6日,v4.0.0 版本发布 :
|
||||||
|
|
||||||
1. 底层集成OpenOffice替换为LibreOffice,Office文件兼容性增强,预览效果提升
|
1. 底层集成OpenOffice替换为LibreOffice,Office文件兼容性增强,预览效果提升
|
||||||
2. 修复压缩文件目录穿越漏洞
|
2. 修复压缩文件目录穿越漏洞
|
||||||
|
|
@ -247,7 +153,7 @@ pdf预览模式预览效果如下
|
||||||
7. 优化Windows环境下,查找Office组件逻辑(内置的LibreOffice优先)
|
7. 优化Windows环境下,查找Office组件逻辑(内置的LibreOffice优先)
|
||||||
8. 优化启动Office进程改同步执行
|
8. 优化启动Office进程改同步执行
|
||||||
|
|
||||||
#### > 2021年6月17日,v3.6.0 版本发布 :
|
> 2021年6月17日,v3.6.0 版本发布 :
|
||||||
|
|
||||||
ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献,感谢 @gaoxingzaq、@zhangxiaoxiao9527 的代码贡献
|
ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献,感谢 @gaoxingzaq、@zhangxiaoxiao9527 的代码贡献
|
||||||
1. 新增 ofd 类型文件预览支持,ofd 是国产的类似 pdf 格式的文件
|
1. 新增 ofd 类型文件预览支持,ofd 是国产的类似 pdf 格式的文件
|
||||||
|
|
@ -255,7 +161,7 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
|
||||||
3. 美化了 ppt、pptx 类型文件预览效果,比之前版本好看太多
|
3. 美化了 ppt、pptx 类型文件预览效果,比之前版本好看太多
|
||||||
4. 更新了 pdfbox、xstream、common-io 等依赖的版本
|
4. 更新了 pdfbox、xstream、common-io 等依赖的版本
|
||||||
|
|
||||||
#### > 2021年1月28日 :
|
> 2021年1月28日 :
|
||||||
|
|
||||||
2020农历年最后一个版本发布,主要包含了部分 UI 改进,和解决了 QQ 群友、 Issue 里反馈的 Bug 修复,最最重要的是发个新版,过个好年
|
2020农历年最后一个版本发布,主要包含了部分 UI 改进,和解决了 QQ 群友、 Issue 里反馈的 Bug 修复,最最重要的是发个新版,过个好年
|
||||||
|
|
||||||
|
|
@ -278,7 +184,7 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
|
||||||
17. escaping of dangerous characters to prevent reflected xss
|
17. escaping of dangerous characters to prevent reflected xss
|
||||||
18. 修复重复编码导致文档转图片预览失败的问题&编码规范
|
18. 修复重复编码导致文档转图片预览失败的问题&编码规范
|
||||||
|
|
||||||
#### > 2020年12月27日 :
|
> 2020年12月27日 :
|
||||||
|
|
||||||
2020年年终大版本更新,架构全面设计,代码全面重构,代码质量全面提升,二次开发更便捷,欢迎拉源码品鉴,提issue、pr共同建设
|
2020年年终大版本更新,架构全面设计,代码全面重构,代码质量全面提升,二次开发更便捷,欢迎拉源码品鉴,提issue、pr共同建设
|
||||||
|
|
||||||
|
|
@ -298,7 +204,7 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
|
||||||
14. 修复压缩包里文件再次预览失败的bug
|
14. 修复压缩包里文件再次预览失败的bug
|
||||||
15. 修复图片预览的bug
|
15. 修复图片预览的bug
|
||||||
|
|
||||||
#### > 2020年05月20日 :
|
> 2020年05月20日 :
|
||||||
1. 新增支持全局水印,并支持通过参数动态改变水印内容
|
1. 新增支持全局水印,并支持通过参数动态改变水印内容
|
||||||
2. 新增支持CAD文件预览
|
2. 新增支持CAD文件预览
|
||||||
3. 新增base.url配置,支持使用nginx反向代理和使用context-path
|
3. 新增base.url配置,支持使用nginx反向代理和使用context-path
|
||||||
|
|
@ -316,35 +222,35 @@ ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献
|
||||||
15. 官网建设:[https://kkview.cn](https://kkview.cn/)
|
15. 官网建设:[https://kkview.cn](https://kkview.cn/)
|
||||||
16. 官方Docker镜像仓库建设:[https://hub.docker.com/r/keking/kkfileview](https://hub.docker.com/r/keking/kkfileview)
|
16. 官方Docker镜像仓库建设:[https://hub.docker.com/r/keking/kkfileview](https://hub.docker.com/r/keking/kkfileview)
|
||||||
|
|
||||||
#### > 2019年06月18日 :
|
> 2019年06月18日 :
|
||||||
1. 支持自动清理缓存及预览文件
|
1. 支持自动清理缓存及预览文件
|
||||||
2. 支持http/https下载流url文件预览
|
2. 支持http/https下载流url文件预览
|
||||||
3. 支持FTP url文件预览
|
3. 支持FTP url文件预览
|
||||||
4. 加入Docker构建
|
4. 加入Docker构建
|
||||||
|
|
||||||
#### > 2019年04月08日 :
|
> 2019年04月08日 :
|
||||||
1. 缓存及队列实现抽象,提供JDK和REDIS两种实现(REDIS成为可选依赖)
|
1. 缓存及队列实现抽象,提供JDK和REDIS两种实现(REDIS成为可选依赖)
|
||||||
2. 打包方式提供zip和tar.gz包,并提供一键启动脚本
|
2. 打包方式提供zip和tar.gz包,并提供一键启动脚本
|
||||||
|
|
||||||
#### > 2018年01月19日 :
|
> 2018年01月19日 :
|
||||||
|
|
||||||
1. 大文件入队提前处理
|
1. 大文件入队提前处理
|
||||||
1. 新增addTask文件转换入队接口
|
1. 新增addTask文件转换入队接口
|
||||||
1. 采用redis队列,支持kkFIleView接口和异构系统入队两种方式
|
1. 采用redis队列,支持kkFIleView接口和异构系统入队两种方式
|
||||||
|
|
||||||
#### > 2018年01月17日 :
|
> 2018年01月17日 :
|
||||||
|
|
||||||
1. 优化项目结构,抽象文件预览接口,更方便的加入更多的文件类型预览支持,方便二次开发
|
1. 优化项目结构,抽象文件预览接口,更方便的加入更多的文件类型预览支持,方便二次开发
|
||||||
1. 新增英文文档说明(@幻幻Fate,@汝辉)贡献
|
1. 新增英文文档说明(@幻幻Fate,@汝辉)贡献
|
||||||
1. 新增图片预览文件支持类型
|
1. 新增图片预览文件支持类型
|
||||||
1. 修复压缩包内轮播图片总是从第一张开始的问题
|
1. 修复压缩包内轮播图片总是从第一张开始的问题
|
||||||
|
|
||||||
#### > 2018年01月12日 :
|
> 2018年01月12日 :
|
||||||
|
|
||||||
1. 新增多图片同时预览
|
1. 新增多图片同时预览
|
||||||
1. 支持压缩包内图片轮番预览
|
1. 支持压缩包内图片轮番预览
|
||||||
|
|
||||||
#### > 2018年01月02日 :
|
> 2018年01月02日 :
|
||||||
|
|
||||||
1. 修复txt等文本编码问题导致预览乱码
|
1. 修复txt等文本编码问题导致预览乱码
|
||||||
1. 修复项目模块依赖引入不到的问题
|
1. 修复项目模块依赖引入不到的问题
|
||||||
|
|
@ -359,15 +265,14 @@ xmind 引用于 [ xmind-embed-viewer](https://github.com/xmindltd/xmind-embed-v
|
||||||
epub 引用于 [ epub.js](https://github.com/futurepress/epub.js) 开源协议 BSD许可证
|
epub 引用于 [ epub.js](https://github.com/futurepress/epub.js) 开源协议 BSD许可证
|
||||||
压缩包 引用于 [sevenzipjbinding](https://github.com/borisbrodski/sevenzipjbinding )开源协议LGPL
|
压缩包 引用于 [sevenzipjbinding](https://github.com/borisbrodski/sevenzipjbinding )开源协议LGPL
|
||||||
3D 引用于 [Online3DViewer](https://github.com/kovacsv/Online3DViewer )开源协议MIT
|
3D 引用于 [Online3DViewer](https://github.com/kovacsv/Online3DViewer )开源协议MIT
|
||||||
drawio 引用于 [drawio](https://github.com/jgraph/drawio )开源协议 Apache-2.0
|
|
||||||
bpmn流程图 引用于 [bpmn-js](https://github.com/bpmn-io/bpmn-js ) 自定义协议 保留水印 具体自行查看
|
|
||||||
dcm医疗数位影像 引用于 [dcmjs](https://github.com/dcmjs-org/dcmjs )开源协议MIT
|
|
||||||
|
|
||||||
### 使用登记
|
### 使用登记
|
||||||
如果这个项目解决了你的实际问题,可在 https://gitee.com/kekingcn/file-online-preview/issues/IGSBV
|
如果这个项目解决了你的实际问题,可在 https://gitee.com/kekingcn/file-online-preview/issues/IGSBV
|
||||||
登记下,如果节省了你的三方预览服务费用,也愿意支持下的话,可点击下方【捐助】请作者喝杯咖啡,也是非常感谢
|
登记下,如果节省了你的三方预览服务费用,也愿意支持下的话,可点击下方【捐助】请作者喝杯咖啡,也是非常感谢
|
||||||
|
|
||||||
### Stars
|
### Stars 趋势图
|
||||||
|
#### Gitee
|
||||||
|
[](https://whnb.wang/kekingcn/file-online-preview?e=86400)
|
||||||
|
|
||||||
#### GitHub
|
#### GitHub
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
FROM arm64v8/ubuntu:20.04
|
|
||||||
MAINTAINER chenjh "842761733@qq.com"
|
|
||||||
# 内置一些常用的中文字体,避免普遍性乱码
|
|
||||||
COPY fonts/* /usr/share/fonts/chinese/
|
|
||||||
RUN apt-get clean && apt-get update &&\
|
|
||||||
sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list &&\
|
|
||||||
sed -i 's/# deb/deb/g' /etc/apt/sources.list &&\
|
|
||||||
apt-get install -y --reinstall ca-certificates &&\
|
|
||||||
apt-get clean && apt-get update &&\
|
|
||||||
apt-get install -y locales language-pack-zh-hans &&\
|
|
||||||
localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 && locale-gen zh_CN.UTF-8 &&\
|
|
||||||
export DEBIAN_FRONTEND=noninteractive &&\
|
|
||||||
apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
|
|
||||||
apt-get install -y fontconfig ttf-mscorefonts-installer ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\
|
|
||||||
apt-get install -y wget
|
|
||||||
# 安装 arm64-jre8
|
|
||||||
RUN apt-get install -y openjdk-8-jre
|
|
||||||
# 编译 libreoffice
|
|
||||||
RUN apt-get install -y git build-essential zip ccache junit4 libkrb5-dev nasm graphviz python3 python3-dev qtbase5-dev libkf5coreaddons-dev libkf5i18n-dev libkf5config-dev libkf5windowsystem-dev libkf5kio-dev autoconf libcups2-dev libfontconfig1-dev gperf default-jdk doxygen libxslt1-dev xsltproc libxml2-utils libxrandr-dev libx11-dev bison flex libgtk-3-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev ant ant-optional libnss3-dev libavahi-client-dev libxt-dev &&\
|
|
||||||
# 安装 ccache(重复编译时加快速度)
|
|
||||||
apt-get install ccache &&\
|
|
||||||
ccache -M 10G &&\
|
|
||||||
# clone主代码
|
|
||||||
mkdir /opt/libreoffice
|
|
||||||
WORKDIR /opt/libreoffice
|
|
||||||
RUN git clone --depth=1 --branch libreoffice-7-5 git://go.suokunlong.cn/lo/core ./libreoffice-7-5
|
|
||||||
# 配置&抓取子模块
|
|
||||||
WORKDIR /opt/libreoffice/libreoffice-7-5
|
|
||||||
RUN git submodule init &&\
|
|
||||||
git config --unset-all submodule.dictionaries.active &&\
|
|
||||||
git config --unset-all submodule.dictionaries.url &&\
|
|
||||||
git config --unset-all submodule.helpcontent2.active &&\
|
|
||||||
git config --unset-all submodule.helpcontent2.url &&\
|
|
||||||
git submodule update --progress --depth=1 &&\
|
|
||||||
# 下载第三方依赖
|
|
||||||
mkdir -p /opt/libreoffice/ext &&\
|
|
||||||
wget --recursive --no-parent --no-check-certificate -P /opt/libreoffice/ext https://go.suokunlong.cn:88/dl/libreoffice/external_tarballs/
|
|
||||||
RUN mv /opt/libreoffice/ext/go.suokunlong.cn:88/dl/libreoffice/external_tarballs/* /opt/libreoffice/ext
|
|
||||||
# 配置编译选项
|
|
||||||
RUN cat << EOF > autogen.input \
|
|
||||||
&& echo "--without-help" >> autogen.input \
|
|
||||||
&& echo "--without-helppack-integration" >> autogen.input \
|
|
||||||
&& echo "--with-lang=zh-CN zh-TW" >> autogen.input \
|
|
||||||
&& echo "--disable-online-update" >> autogen.input \
|
|
||||||
&& echo "--disable-breakpad" >> autogen.input \
|
|
||||||
&& echo "--disable-odk" >> autogen.input \
|
|
||||||
&& echo "--without-doxygen" >> autogen.input \
|
|
||||||
&& echo "--with-external-tar=/opt/libreoffice/ext" >> autogen.input \
|
|
||||||
&& echo "--without-java" >> autogen.input \
|
|
||||||
&& echo "--enable-firebird-sdbc" >> autogen.input \
|
|
||||||
&& echo "--without-system-firebird" >> autogen.input \
|
|
||||||
&& echo "--enable-python=internal" >> autogen.input
|
|
||||||
# 预编译
|
|
||||||
RUN ./autogen.sh
|
|
||||||
# 因为libreoffice的安全策略,不允许root用户执行编译操作(可以改Makefile文件解决),所以新建用户
|
|
||||||
RUN useradd libreoffice
|
|
||||||
# 切换用户
|
|
||||||
RUN su libreoffice
|
|
||||||
# 在普通用户下编译
|
|
||||||
RUN make || true
|
|
||||||
# !!!编译40分钟左右会报错,此时需要执行以下操作重新编译
|
|
||||||
RUN cp ./workdir/UnpackedTarball/python3/build/lib.linux-aarch64-3.8/_sysconfigdata__linux_aarch64-linux-gnu.py ./workdir/UnpackedTarball/python3/build/lib.linux-aarch64-3.8/_sysconfigdata__linux_aarch64-unknown-linux-gnu.py
|
|
||||||
# 重新编译
|
|
||||||
RUN make &&\
|
|
||||||
make install
|
|
||||||
|
|
||||||
RUN ln -s /usr/local/lib/libreoffice/program/soffice /usr/bin/libreoffice
|
|
||||||
|
|
||||||
# 清理临时文件
|
|
||||||
RUN rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\
|
|
||||||
cd /usr/share/fonts/chinese &&\
|
|
||||||
mkfontscale &&\
|
|
||||||
mkfontdir &&\
|
|
||||||
fc-cache -fv
|
|
||||||
ENV LANG zh_CN.UTF-8
|
|
||||||
ENV LC_ALL zh_CN.UTF-8
|
|
||||||
CMD ["/bin/bash"]
|
|
||||||
|
|
@ -1,5 +1,2 @@
|
||||||
# 执行如下命令构建基础镜像,加快kkfileview docker镜像构建与发布
|
# 执行如下命令构建基础镜像,加快kkfileview docker镜像构建与发布
|
||||||
docker build --tag keking/kkfileview-jdk:4.3.0 .
|
docker build --tag keking/kkfileview-jdk:4.3.0 .
|
||||||
|
|
||||||
# arm64架构执行如下命令
|
|
||||||
docker build -f Dockerfile_arm64 --tag keking/kkfileview-jdk:4.3.0 .
|
|
||||||
13
pom.xml
13
pom.xml
|
|
@ -15,14 +15,14 @@
|
||||||
<poi.version>5.2.2</poi.version>
|
<poi.version>5.2.2</poi.version>
|
||||||
<xdocreport.version>1.0.6</xdocreport.version>
|
<xdocreport.version>1.0.6</xdocreport.version>
|
||||||
<xstream.version>1.4.20</xstream.version>
|
<xstream.version>1.4.20</xstream.version>
|
||||||
<junrar.version>7.5.5</junrar.version>
|
<junrar.version>7.5.4</junrar.version>
|
||||||
<redisson.version>3.2.0</redisson.version>
|
<redisson.version>3.2.0</redisson.version>
|
||||||
<sevenzipjbinding.version>16.02-2.01</sevenzipjbinding.version>
|
<sevenzipjbinding.version>16.02-2.01</sevenzipjbinding.version>
|
||||||
<jchardet.version>1.0</jchardet.version>
|
<jchardet.version>1.0</jchardet.version>
|
||||||
<antlr.version>2.7.7</antlr.version>
|
<antlr.version>2.7.7</antlr.version>
|
||||||
<concurrentlinkedhashmap.version>1.4.2</concurrentlinkedhashmap.version>
|
<concurrentlinkedhashmap.version>1.4.2</concurrentlinkedhashmap.version>
|
||||||
<rocksdb.version>5.17.2</rocksdb.version>
|
<rocksdb.version>5.17.2</rocksdb.version>
|
||||||
<pdfbox.version>2.0.29</pdfbox.version>
|
<pdfbox.version>2.0.27</pdfbox.version>
|
||||||
<jai-imageio.version>1.4.0</jai-imageio.version>
|
<jai-imageio.version>1.4.0</jai-imageio.version>
|
||||||
<jbig2-imageio.version>3.0.4</jbig2-imageio.version>
|
<jbig2-imageio.version>3.0.4</jbig2-imageio.version>
|
||||||
<galimatias.version>0.2.1</galimatias.version>
|
<galimatias.version>0.2.1</galimatias.version>
|
||||||
|
|
@ -32,13 +32,12 @@
|
||||||
<ffmpeg.version>4.2.1-1.5.2</ffmpeg.version>
|
<ffmpeg.version>4.2.1-1.5.2</ffmpeg.version>
|
||||||
<itextpdf.version>5.5.13.3</itextpdf.version>
|
<itextpdf.version>5.5.13.3</itextpdf.version>
|
||||||
<httpclient.version>3.1</httpclient.version>
|
<httpclient.version>3.1</httpclient.version>
|
||||||
<aspose-cad.version>23.3</aspose-cad.version>
|
<aspose-cad.version>23.1</aspose-cad.version>
|
||||||
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
|
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
|
||||||
<juniversalchardet.version>1.0.3</juniversalchardet.version>
|
|
||||||
|
|
||||||
<commons-cli.version>1.5.0</commons-cli.version>
|
<commons-cli.version>1.2</commons-cli.version>
|
||||||
<commons-net.version>3.9.0</commons-net.version>
|
<commons-net.version>3.6</commons-net.version>
|
||||||
<commons-lang3.version>3.13.0</commons-lang3.version>
|
<commons-lang3.version>3.7</commons-lang3.version>
|
||||||
|
|
||||||
|
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
|
|
||||||
|
|
@ -122,14 +122,6 @@
|
||||||
<artifactId>redisson</artifactId>
|
<artifactId>redisson</artifactId>
|
||||||
<version>${redisson.version}</version>
|
<version>${redisson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 编码检测-JUniversalCharDet-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.googlecode.juniversalchardet</groupId>
|
|
||||||
<artifactId>juniversalchardet</artifactId>
|
|
||||||
<version>${juniversalchardet.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 解压(rar)-->
|
<!-- 解压(rar)-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.junrar</groupId>
|
<groupId>com.github.junrar</groupId>
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
server.port = ${KK_SERVER_PORT:8012}
|
server.port = ${KK_SERVER_PORT:8012}
|
||||||
server.servlet.context-path= ${KK_CONTEXT_PATH:/}
|
server.servlet.context-path= ${KK_CONTEXT_PATH:/}
|
||||||
server.servlet.encoding.charset = utf-8
|
server.servlet.encoding.charset = utf-8
|
||||||
#启用GZIP压缩功能
|
#文件上传限制前端
|
||||||
server.compression.enable= true
|
|
||||||
#允许压缩的响应缓冲区最小字节数,默认2048
|
|
||||||
server.compression.min-response-size = 2048
|
|
||||||
#压缩格式
|
|
||||||
server.compression.mime-types=application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain,font/woff,application/font-woff,font/eot,image/svg+xml,image/x-icon
|
|
||||||
# 文件上传限制前端
|
|
||||||
spring.servlet.multipart.max-file-size=500MB
|
spring.servlet.multipart.max-file-size=500MB
|
||||||
#文件上传限制
|
#文件上传限制
|
||||||
spring.servlet.multipart.max-request-size=500MB
|
spring.servlet.multipart.max-request-size=500MB
|
||||||
|
|
@ -23,44 +17,28 @@ spring.freemarker.expose-session-attributes = true
|
||||||
spring.freemarker.request-context-attribute = request
|
spring.freemarker.request-context-attribute = request
|
||||||
spring.freemarker.suffix = .ftl
|
spring.freemarker.suffix = .ftl
|
||||||
|
|
||||||
# office设置
|
# office-plugin
|
||||||
#openoffice或LibreOffice home路径
|
|
||||||
#office.home = C:\\Program Files (x86)\\OpenOffice 4
|
|
||||||
office.home = ${KK_OFFICE_HOME:default}
|
|
||||||
## office转换服务的进程数,默认开启两个进程
|
## office转换服务的进程数,默认开启两个进程
|
||||||
office.plugin.server.ports = 2001,2002
|
office.plugin.server.ports = 2001,2002
|
||||||
## office 转换服务 task 超时时间,默认五分钟
|
## office 转换服务 task 超时时间,默认五分钟
|
||||||
office.plugin.task.timeout = 5m
|
office.plugin.task.timeout = 5m
|
||||||
#生成限制 默认不限制 使用方法 (1-5)
|
|
||||||
office.pagerange = ${KK_OFFICE_PAGERANGE:false}
|
|
||||||
#生成水印 默认不启用 使用方法 (kkFileView)
|
|
||||||
office.watermark = ${KK_OFFICE_WATERMARK:false}
|
|
||||||
#OFFICE JPEG图片压缩
|
|
||||||
office.quality = ${KK_OFFICE_QUALITY:80}
|
|
||||||
#图像分辨率限制
|
|
||||||
office.maximageresolution = ${KK_OFFICE_MAXIMAGERESOLUTION:150}
|
|
||||||
#导出书签
|
|
||||||
office.exportbookmarks = ${KK_OFFICE_EXPORTBOOKMARKS:true}
|
|
||||||
#批注作为PDF的注释
|
|
||||||
office.exportnotes = ${KK_OFFICE_EXPORTNOTES:true}
|
|
||||||
#加密文档 生成的PDF文档 添加密码(密码为加密文档的密码)
|
|
||||||
office.documentopenpasswords = ${KK_OFFICE_DOCUMENTOPENPASSWORD:true}
|
|
||||||
#xlsx格式前端解析
|
|
||||||
office.type.web = ${KK_OFFICE_TYPE_WEB:web}
|
|
||||||
|
|
||||||
|
|
||||||
# 其他核心设置
|
|
||||||
#预览生成资源路径(默认为打包根路径下的file目录下)
|
#预览生成资源路径(默认为打包根路径下的file目录下)
|
||||||
#file.dir = D:\\kkFileview\\
|
#file.dir = D:\\kkFileview\\
|
||||||
file.dir = ${KK_FILE_DIR:default}
|
file.dir = ${KK_FILE_DIR:default}
|
||||||
|
|
||||||
#允许预览的本地文件夹 默认不允许任何本地文件被预览
|
#允许预览的本地文件夹 默认不允许任何本地文件被预览
|
||||||
#WINDOWS参考 local.preview.dir = \D:\\kkFileview\\1\\1.txt (注意前面必须添加反斜杠)
|
#WINDOWS参考 local.preview.dir = \D:\\kkFileview\\1\\1.txt (注意前面必须添加反斜杠)
|
||||||
#LINUX参考 local.preview.dir = /opt/1.txt (注意前面必须是正斜杠)
|
#LINUX参考 local.preview.dir = /opt/1.txt (注意前面必须是正斜杠)
|
||||||
#使用方法 windows file://d:/1/1.txt linux file:/opt/1/1.txt
|
#使用方法 windows file://d:/1/1.txt linux file:/opt/1/1.txt
|
||||||
#file 协议参考:https://datatracker.ietf.org/doc/html/rfc8089
|
#file 协议参考:https://datatracker.ietf.org/doc/html/rfc8089
|
||||||
local.preview.dir = ${KK_LOCAL_PREVIEW_DIR:default}
|
local.preview.dir = ${KK_LOCAL_PREVIEW_DIR:default}
|
||||||
#是否启用缓存
|
|
||||||
cache.enabled = ${KK_CACHE_ENABLED:true}
|
|
||||||
|
#openoffice home路径
|
||||||
|
#office.home = C:\\Program Files (x86)\\OpenOffice 4
|
||||||
|
office.home = ${KK_OFFICE_HOME:default}
|
||||||
|
|
||||||
#缓存实现类型,不配默认为内嵌RocksDB(type = default)实现,可配置为redis(type = redis)实现(需要配置spring.redisson.address等参数)和 JDK 内置对象实现(type = jdk),
|
#缓存实现类型,不配默认为内嵌RocksDB(type = default)实现,可配置为redis(type = redis)实现(需要配置spring.redisson.address等参数)和 JDK 内置对象实现(type = jdk),
|
||||||
cache.type = ${KK_CACHE_TYPE:jdk}
|
cache.type = ${KK_CACHE_TYPE:jdk}
|
||||||
#redis连接,只有当cache.type = redis时才有用
|
#redis连接,只有当cache.type = redis时才有用
|
||||||
|
|
@ -70,39 +48,33 @@ spring.redisson.password = ${KK_SPRING_REDISSON_PASSWORD:}
|
||||||
cache.clean.enabled = ${KK_CACHE_CLEAN_ENABLED:true}
|
cache.clean.enabled = ${KK_CACHE_CLEAN_ENABLED:true}
|
||||||
#缓存自动清理时间,cache.clean.enabled = true时才有用,cron表达式,基于Quartz cron
|
#缓存自动清理时间,cache.clean.enabled = true时才有用,cron表达式,基于Quartz cron
|
||||||
cache.clean.cron = ${KK_CACHE_CLEAN_CRON:0 0 3 * * ?}
|
cache.clean.cron = ${KK_CACHE_CLEAN_CRON:0 0 3 * * ?}
|
||||||
|
|
||||||
#######################################可在运行时动态配置#######################################
|
#######################################可在运行时动态配置#######################################
|
||||||
#提供预览服务的地址,默认从请求url读,如果使用nginx等反向代理,需要手动设置
|
#提供预览服务的地址,默认从请求url读,如果使用nginx等反向代理,需要手动设置
|
||||||
#base.url = https://file.keking.cn
|
#base.url = https://file.keking.cn
|
||||||
base.url = ${KK_BASE_URL:default}
|
base.url = ${KK_BASE_URL:default}
|
||||||
|
|
||||||
#信任站点,多个用','隔开,设置了之后,会限制只能预览来自信任站点列表的文件,默认不限制
|
#信任站点,多个用','隔开,设置了之后,会限制只能预览来自信任站点列表的文件,默认不限制
|
||||||
#trust.host = kkview.cn
|
#trust.host = kkview.cn
|
||||||
trust.host = ${KK_TRUST_HOST:default}
|
trust.host = ${KK_TRUST_HOST:default}
|
||||||
|
|
||||||
|
#是否启用缓存
|
||||||
|
cache.enabled = ${KK_CACHE_ENABLED:true}
|
||||||
|
|
||||||
#文本类型,默认如下,可自定义添加
|
#文本类型,默认如下,可自定义添加
|
||||||
simText = ${KK_SIMTEXT:txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd}
|
simText = ${KK_SIMTEXT:txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd}
|
||||||
|
|
||||||
|
|
||||||
#FTP模块设置
|
|
||||||
#预览源为FTP时 FTP用户名,可在ftp url后面加参数ftp.username=ftpuser指定,不指定默认用配置的
|
|
||||||
ftp.username = ${KK_FTP_USERNAME:ftpuser}
|
|
||||||
#预览源为FTP时 FTP密码,可在ftp url后面加参数ftp.password=123456指定,不指定默认用配置的
|
|
||||||
ftp.password = ${KK_FTP_PASSWORD:123456}
|
|
||||||
#预览源为FTP时, FTP连接默认ControlEncoding(根据FTP服务器操作系统选择,Linux一般为UTF-8,Windows一般为GBK),可在ftp url后面加参数ftp.control.encoding=UTF-8指定,不指定默认用配置的
|
|
||||||
ftp.control.encoding = ${KK_FTP_CONTROL_ENCODING:UTF-8}
|
|
||||||
|
|
||||||
#视频设置
|
|
||||||
#多媒体类型,默认如下,可自定义添加
|
#多媒体类型,默认如下,可自定义添加
|
||||||
media = ${KK_MEDIA:mp3,wav,mp4,flv,mpd,m3u8,ts,mpeg,m4a}
|
media = ${KK_MEDIA:mp3,wav,mp4,flv}
|
||||||
#是否开启多媒体类型转视频格式转换,目前可转换视频格式有:avi,mov,wmv,3gp,rm
|
#是否开启多媒体类型转视频格式转换,目前可转换视频格式有:avi,mov,wmv,3gp,rm
|
||||||
#请谨慎开启此功能,建议异步调用添加到处理队列,并且增加任务队列处理线程,防止视频转换占用完线程资源,转换比较耗费时间,并且控制了只能串行处理转换任务
|
#请谨慎开启此功能,建议异步调用添加到处理队列,并且增加任务队列处理线程,防止视频转换占用完线程资源,转换比较耗费时间,并且控制了只能串行处理转换任务
|
||||||
media.convert.disable = ${KK_MEDIA_CONVERT_DISABLE:false}
|
media.convert.disable = ${KK_MEDIA_CONVERT_DISABLE:false}
|
||||||
#支持转换的视频类型
|
#支持转换的视频类型
|
||||||
convertMedias = ${KK_CONVERTMEDIAS:avi,mov,wmv,mkv,3gp,rm}
|
convertMedias = ${KK_CONVERTMEDIAS:avi,mov,wmv,mkv,3gp,rm}
|
||||||
|
#office类型文档(word ppt)样式,默认为图片(image),可配置为pdf(预览时也有按钮切换)
|
||||||
|
office.preview.type = ${KK_OFFICE_PREVIEW_TYPE:image}
|
||||||
|
#是否关闭office预览切换开关,默认为false,可配置为true关闭
|
||||||
|
office.preview.switch.disabled = ${KK_OFFICE_PREVIEW_SWITCH_DISABLED:false}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#PDF预览模块设置
|
|
||||||
#配置PDF文件生成图片的像素大小,dpi 越高,图片质量越清晰,同时也会消耗更多的计算资源。
|
|
||||||
pdf2jpg.dpi = ${KK_PDF2JPG_DPI:144}
|
|
||||||
#是否禁止演示模式
|
#是否禁止演示模式
|
||||||
pdf.presentationMode.disable = ${KK_PDF_PRESENTATION_MODE_DISABLE:true}
|
pdf.presentationMode.disable = ${KK_PDF_PRESENTATION_MODE_DISABLE:true}
|
||||||
#是否禁止打开文件
|
#是否禁止打开文件
|
||||||
|
|
@ -113,13 +85,15 @@ pdf.print.disable = ${KK_PDF_PRINT_DISABLE:true}
|
||||||
pdf.download.disable = ${KK_PDF_DOWNLOAD_DISABLE:true}
|
pdf.download.disable = ${KK_PDF_DOWNLOAD_DISABLE:true}
|
||||||
#是否禁止bookmark
|
#是否禁止bookmark
|
||||||
pdf.bookmark.disable = ${KK_PDF_BOOKMARK_DISABLE:true}
|
pdf.bookmark.disable = ${KK_PDF_BOOKMARK_DISABLE:true}
|
||||||
#是否禁止签名
|
#是否禁用首页文件上传
|
||||||
pdf.disable.editing = ${KK_PDF_DISABLE_EDITING:false}
|
file.upload.disable = ${KK_FILE_UPLOAD_ENABLED:false}
|
||||||
#office类型文档(word ppt)样式,默认为图片(image),可配置为pdf(预览时也有按钮切换)
|
|
||||||
office.preview.type = ${KK_OFFICE_PREVIEW_TYPE:image}
|
|
||||||
#是否关闭office预览切换开关,默认为false,可配置为true关闭
|
|
||||||
office.preview.switch.disabled = ${KK_OFFICE_PREVIEW_SWITCH_DISABLED:false}
|
|
||||||
|
|
||||||
|
#预览源为FTP时 FTP用户名,可在ftp url后面加参数ftp.username=ftpuser指定,不指定默认用配置的
|
||||||
|
ftp.username = ${KK_FTP_USERNAME:ftpuser}
|
||||||
|
#预览源为FTP时 FTP密码,可在ftp url后面加参数ftp.password=123456指定,不指定默认用配置的
|
||||||
|
ftp.password = ${KK_FTP_PASSWORD:123456}
|
||||||
|
#预览源为FTP时, FTP连接默认ControlEncoding(根据FTP服务器操作系统选择,Linux一般为UTF-8,Windows一般为GBK),可在ftp url后面加参数ftp.control.encoding=UTF-8指定,不指定默认用配置的
|
||||||
|
ftp.control.encoding = ${KK_FTP_CONTROL_ENCODING:UTF-8}
|
||||||
|
|
||||||
#水印内容
|
#水印内容
|
||||||
#例:watermark.txt = ${WATERMARK_TXT:凯京科技内部文件,严禁外泄}
|
#例:watermark.txt = ${WATERMARK_TXT:凯京科技内部文件,严禁外泄}
|
||||||
|
|
@ -144,39 +118,17 @@ watermark.height = ${WATERMARK_HEIGHT:80}
|
||||||
#水印倾斜度数,要求设置在大于等于0,小于90
|
#水印倾斜度数,要求设置在大于等于0,小于90
|
||||||
watermark.angle = ${WATERMARK_ANGLE:10}
|
watermark.angle = ${WATERMARK_ANGLE:10}
|
||||||
|
|
||||||
|
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
||||||
#首页功能设置
|
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
||||||
#是否禁用首页文件上传
|
|
||||||
file.upload.disable = ${KK_FILE_UPLOAD_ENABLED:false}
|
|
||||||
# 备案信息,默认为空
|
# 备案信息,默认为空
|
||||||
beian = ${KK_BEIAN:default}
|
beian = ${KK_BEIAN:default}
|
||||||
#禁止上传类型
|
#禁止上传类型
|
||||||
prohibit = ${KK_PROHIBIT:exe,dll,dat}
|
prohibit = ${KK_PROHIBIT:exe,dll,dat}
|
||||||
#启用验证码删除文件 默认关闭
|
|
||||||
delete.captcha= ${KK_DELETE_CAPTCHA:false}
|
|
||||||
#删除密码
|
#删除密码
|
||||||
delete.password = ${KK_DELETE_PASSWORD:123456}
|
delete.password = ${KK_DELETE_PASSWORD:123456}
|
||||||
#删除 转换后OFFICE、CAD、TIFF、压缩包源文件 默认开启 节约磁盘空间
|
#删除 转换后OFFICE、CAD、TIFF、压缩包源文件 默认开启 节约磁盘空间
|
||||||
delete.source.file = ${KK_DELETE_SOURCE_FILE:true}
|
delete.source.file = ${KK_DELETE_SOURCE_FILE:true}
|
||||||
#首页初始化加载第一页
|
#配置PDF文件生成图片的像素大小,dpi 越高,图片质量越清晰,同时也会消耗更多的计算资源。
|
||||||
home.pagenumber = ${DEFAULT_HOME_PAGENUMBER:1}
|
pdf2jpg.dpi = ${KK_PDF2JPG_DPI:144}
|
||||||
#首页是否分页
|
#xlsx格式前端解析
|
||||||
home.pagination = ${DEFAULT_HOME_PAGINATION:true}
|
office.type.web = ${KK_OFFICE_TYPE_WEB:web}
|
||||||
#首页初始化单页记录数
|
|
||||||
home.pagesize = ${DEFAULT_HOME_PAGSIZE:15}
|
|
||||||
#首页显示查询框
|
|
||||||
home.search = ${DEFAULT_HOME_SEARCH:true}
|
|
||||||
|
|
||||||
#Tif类型设置
|
|
||||||
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
|
||||||
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
|
||||||
|
|
||||||
#Cad类型设置
|
|
||||||
#Cad类型图片浏览模式:tif(利用前端js插件浏览);svg(转换为svg显示);pdf(转换为pdf后显示,便于打印)
|
|
||||||
cad.preview.type = ${KK_CAD_PREVIEW_TYPE:svg}
|
|
||||||
#Cad转换超时设置
|
|
||||||
cad.timeout =${KK_CAD_TIMEOUT:90}
|
|
||||||
#Cad转换线程设置
|
|
||||||
cad.thread =${KK_CAD_THREAD:5}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -13,9 +13,9 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
* @author: chenjh
|
* @author: chenjh
|
||||||
* @since: 2019/4/10 17:22
|
* @since: 2019/4/10 17:22
|
||||||
*/
|
*/
|
||||||
@Component(value = ConfigConstants.BEAN_NAME)
|
@Component
|
||||||
public class ConfigConstants {
|
public class ConfigConstants {
|
||||||
public static final String BEAN_NAME = "configConstants";
|
|
||||||
static {
|
static {
|
||||||
//pdfbox兼容低版本jdk
|
//pdfbox兼容低版本jdk
|
||||||
System.setProperty("sun.java2d.cmm", "sun.java2d.cmm.kcms.KcmsServiceProvider");
|
System.setProperty("sun.java2d.cmm", "sun.java2d.cmm.kcms.KcmsServiceProvider");
|
||||||
|
|
@ -36,7 +36,6 @@ public class ConfigConstants {
|
||||||
private static String localPreviewDir;
|
private static String localPreviewDir;
|
||||||
private static CopyOnWriteArraySet<String> trustHostSet;
|
private static CopyOnWriteArraySet<String> trustHostSet;
|
||||||
private static String pdfPresentationModeDisable;
|
private static String pdfPresentationModeDisable;
|
||||||
private static String pdfDisableEditing;
|
|
||||||
private static String pdfOpenFileDisable;
|
private static String pdfOpenFileDisable;
|
||||||
private static String pdfPrintDisable;
|
private static String pdfPrintDisable;
|
||||||
private static String pdfDownloadDisable;
|
private static String pdfDownloadDisable;
|
||||||
|
|
@ -49,25 +48,10 @@ public class ConfigConstants {
|
||||||
private static String password;
|
private static String password;
|
||||||
private static int pdf2JpgDpi;
|
private static int pdf2JpgDpi;
|
||||||
private static String officeTypeWeb;
|
private static String officeTypeWeb;
|
||||||
private static String cadPreviewType;
|
|
||||||
private static Boolean deleteSourceFile;
|
private static Boolean deleteSourceFile;
|
||||||
private static Boolean deleteCaptcha;
|
|
||||||
private static String officePageRange;
|
|
||||||
private static String officeWatermark;
|
|
||||||
private static String officeQuality;
|
|
||||||
private static String officeMaxImageResolution;
|
|
||||||
private static Boolean officeExportBookmarks;
|
|
||||||
private static Boolean officeExportNotes;
|
|
||||||
private static Boolean officeDocumentOpenPasswords;
|
|
||||||
private static String cadTimeout;
|
|
||||||
private static int cadThread;
|
|
||||||
private static String homePpageNumber;
|
|
||||||
private static String homePagination;
|
|
||||||
private static String homePageSize;
|
|
||||||
private static String homeSearch;
|
|
||||||
|
|
||||||
public static final String DEFAULT_CACHE_ENABLED = "true";
|
public static final String DEFAULT_CACHE_ENABLED = "true";
|
||||||
public static final String DEFAULT_TXT_TYPE = "txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd,xbrl";
|
public static final String DEFAULT_TXT_TYPE = "txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd";
|
||||||
public static final String DEFAULT_MEDIA_TYPE = "mp3,wav,mp4,flv";
|
public static final String DEFAULT_MEDIA_TYPE = "mp3,wav,mp4,flv";
|
||||||
public static final String DEFAULT_OFFICE_PREVIEW_TYPE = "image";
|
public static final String DEFAULT_OFFICE_PREVIEW_TYPE = "image";
|
||||||
public static final String DEFAULT_OFFICE_PREVIEW_SWITCH_DISABLED = "false";
|
public static final String DEFAULT_OFFICE_PREVIEW_SWITCH_DISABLED = "false";
|
||||||
|
|
@ -83,10 +67,8 @@ public class ConfigConstants {
|
||||||
public static final String DEFAULT_PDF_PRINT_DISABLE = "true";
|
public static final String DEFAULT_PDF_PRINT_DISABLE = "true";
|
||||||
public static final String DEFAULT_PDF_DOWNLOAD_DISABLE = "true";
|
public static final String DEFAULT_PDF_DOWNLOAD_DISABLE = "true";
|
||||||
public static final String DEFAULT_PDF_BOOKMARK_DISABLE = "true";
|
public static final String DEFAULT_PDF_BOOKMARK_DISABLE = "true";
|
||||||
public static final String DEFAULT_PDF_DISABLE_EDITING = "true";
|
|
||||||
public static final String DEFAULT_FILE_UPLOAD_DISABLE = "false";
|
public static final String DEFAULT_FILE_UPLOAD_DISABLE = "false";
|
||||||
public static final String DEFAULT_TIF_PREVIEW_TYPE = "tif";
|
public static final String DEFAULT_TIF_PREVIEW_TYPE = "tif";
|
||||||
public static final String DEFAULT_CAD_PREVIEW_TYPE = "pdf";
|
|
||||||
public static final String DEFAULT_BEIAN = "无";
|
public static final String DEFAULT_BEIAN = "无";
|
||||||
public static final String DEFAULT_SIZE = "500MB";
|
public static final String DEFAULT_SIZE = "500MB";
|
||||||
public static final String DEFAULT_PROHIBIT = "exe,dll";
|
public static final String DEFAULT_PROHIBIT = "exe,dll";
|
||||||
|
|
@ -94,20 +76,7 @@ public class ConfigConstants {
|
||||||
public static final String DEFAULT_PDF2_JPG_DPI = "105";
|
public static final String DEFAULT_PDF2_JPG_DPI = "105";
|
||||||
public static final String DEFAULT_OFFICE_TYPE_WEB = "web";
|
public static final String DEFAULT_OFFICE_TYPE_WEB = "web";
|
||||||
public static final String DEFAULT_DELETE_SOURCE_FILE = "true";
|
public static final String DEFAULT_DELETE_SOURCE_FILE = "true";
|
||||||
public static final String DEFAULT_DELETE_CAPTCHA = "false";
|
|
||||||
public static final String DEFAULT_CAD_TIMEOUT = "90";
|
|
||||||
public static final String DEFAULT_CAD_THREAD = "5";
|
|
||||||
public static final String DEFAULT_OFFICE_PAQERANQE = "false";
|
|
||||||
public static final String DEFAULT_OFFICE_WATERMARK = "false";
|
|
||||||
public static final String DEFAULT_OFFICE_QUALITY = "80";
|
|
||||||
public static final String DEFAULT_OFFICE_MAXIMAQERESOLUTION = "150";
|
|
||||||
public static final String DEFAULT_OFFICE_EXPORTBOOKMARKS = "true";
|
|
||||||
public static final String DEFAULT_OFFICE_EXPORTNOTES = "true";
|
|
||||||
public static final String DEFAULT_OFFICE_EOCUMENTOPENPASSWORDS = "true";
|
|
||||||
public static final String DEFAULT_HOME_PAGENUMBER = "1";
|
|
||||||
public static final String DEFAULT_HOME_PAGINATION = "true";
|
|
||||||
public static final String DEFAULT_HOME_PAGSIZE = "15";
|
|
||||||
public static final String DEFAULT_HOME_SEARCH = "true";
|
|
||||||
public static Boolean isCacheEnabled() {
|
public static Boolean isCacheEnabled() {
|
||||||
return cacheEnabled;
|
return cacheEnabled;
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +94,7 @@ public class ConfigConstants {
|
||||||
return simTexts;
|
return simTexts;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Value("${simText:txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd,xbrl}")
|
@Value("${simText:txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd}")
|
||||||
public void setSimText(String simText) {
|
public void setSimText(String simText) {
|
||||||
String[] simTextArr = simText.split(",");
|
String[] simTextArr = simText.split(",");
|
||||||
setSimTextValue(simTextArr);
|
setSimTextValue(simTextArr);
|
||||||
|
|
@ -361,18 +330,6 @@ public class ConfigConstants {
|
||||||
ConfigConstants.pdfBookmarkDisable = pdfBookmarkDisable;
|
ConfigConstants.pdfBookmarkDisable = pdfBookmarkDisable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String getPdfDisableEditing() {
|
|
||||||
return pdfDisableEditing;
|
|
||||||
}
|
|
||||||
@Value("${pdf.disable.editing:true}")
|
|
||||||
public void setpdfDisableEditing(String pdfDisableEditing) {
|
|
||||||
setPdfDisableEditingValue(pdfDisableEditing);
|
|
||||||
}
|
|
||||||
public static void setPdfDisableEditingValue(String pdfDisableEditing) {
|
|
||||||
ConfigConstants.pdfDisableEditing = pdfDisableEditing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getOfficePreviewSwitchDisabled() {
|
public static String getOfficePreviewSwitchDisabled() {
|
||||||
return officePreviewSwitchDisabled;
|
return officePreviewSwitchDisabled;
|
||||||
}
|
}
|
||||||
|
|
@ -411,6 +368,16 @@ public class ConfigConstants {
|
||||||
ConfigConstants.tifPreviewType = tifPreviewType;
|
ConfigConstants.tifPreviewType = tifPreviewType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getBeian() {
|
||||||
|
return beian;
|
||||||
|
}
|
||||||
|
@Value("${beian:default}")
|
||||||
|
public void setBeian(String beian) {
|
||||||
|
setBeianValue(beian);
|
||||||
|
}
|
||||||
|
public static void setBeianValue(String beian) {
|
||||||
|
ConfigConstants.beian = beian;
|
||||||
|
}
|
||||||
public static String[] getProhibit() {
|
public static String[] getProhibit() {
|
||||||
return prohibit;
|
return prohibit;
|
||||||
}
|
}
|
||||||
|
|
@ -482,203 +449,4 @@ public class ConfigConstants {
|
||||||
ConfigConstants.deleteSourceFile = deleteSourceFile;
|
ConfigConstants.deleteSourceFile = deleteSourceFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean getDeleteCaptcha() {
|
|
||||||
return deleteCaptcha;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value("${delete.captcha:false}")
|
|
||||||
public void setDeleteCaptcha(Boolean deleteCaptcha) {
|
|
||||||
setDeleteCaptchaValue(deleteCaptcha);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setDeleteCaptchaValue(Boolean deleteCaptcha) {
|
|
||||||
ConfigConstants.deleteCaptcha = deleteCaptcha;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 以下为cad转换模块设置
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static String getCadPreviewType() {
|
|
||||||
return cadPreviewType;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value("${cad.preview.type:svg}")
|
|
||||||
public void setCadPreviewType(String cadPreviewType) {
|
|
||||||
setCadPreviewTypeValue(cadPreviewType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setCadPreviewTypeValue(String cadPreviewType) {
|
|
||||||
ConfigConstants.cadPreviewType = cadPreviewType;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static String getCadTimeout() {
|
|
||||||
return cadTimeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value("${cad.timeout:90}")
|
|
||||||
public void setCadTimeout(String cadTimeout) {
|
|
||||||
setCadTimeoutValue(cadTimeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setCadTimeoutValue(String cadTimeout) {
|
|
||||||
ConfigConstants.cadTimeout = cadTimeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static int getCadThread() {
|
|
||||||
return cadThread;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value("${cad.thread:5}")
|
|
||||||
public void setCadThread(int cadThread) {
|
|
||||||
setCadThreadValue(cadThread);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setCadThreadValue(int cadThread) {
|
|
||||||
ConfigConstants.cadThread = cadThread;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 以下为OFFICE转换模块设置
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static String getOfficePageRange() {
|
|
||||||
return officePageRange;
|
|
||||||
}
|
|
||||||
@Value("${office.pagerange:false}")
|
|
||||||
public void setOfficePageRange(String officePageRange) {
|
|
||||||
setOfficePageRangeValue(officePageRange);
|
|
||||||
}
|
|
||||||
public static void setOfficePageRangeValue(String officePageRange) {
|
|
||||||
ConfigConstants.officePageRange = officePageRange;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getOfficeWatermark() {
|
|
||||||
return officeWatermark;
|
|
||||||
}
|
|
||||||
@Value("${office.watermark:false}")
|
|
||||||
public void setOfficeWatermark(String officeWatermark) {
|
|
||||||
setOfficeWatermarkValue(officeWatermark);
|
|
||||||
}
|
|
||||||
public static void setOfficeWatermarkValue(String officeWatermark) {
|
|
||||||
ConfigConstants.officeWatermark = officeWatermark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getOfficeQuality() {
|
|
||||||
return officeQuality;
|
|
||||||
}
|
|
||||||
@Value("${office.quality:80}")
|
|
||||||
public void setOfficeQuality(String officeQuality) {
|
|
||||||
setOfficeQualityValue(officeQuality);
|
|
||||||
}
|
|
||||||
public static void setOfficeQualityValue(String officeQuality) {
|
|
||||||
ConfigConstants.officeQuality = officeQuality;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getOfficeMaxImageResolution() {
|
|
||||||
return officeMaxImageResolution;
|
|
||||||
}
|
|
||||||
@Value("${office.maximageresolution:150}")
|
|
||||||
public void setOfficeMaxImageResolution(String officeMaxImageResolution) {
|
|
||||||
setOfficeMaxImageResolutionValue(officeMaxImageResolution);
|
|
||||||
}
|
|
||||||
public static void setOfficeMaxImageResolutionValue(String officeMaxImageResolution) {
|
|
||||||
ConfigConstants.officeMaxImageResolution = officeMaxImageResolution;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Boolean getOfficeExportBookmarks() {
|
|
||||||
return officeExportBookmarks;
|
|
||||||
}
|
|
||||||
@Value("${office.exportbookmarks:true}")
|
|
||||||
public void setOfficeExportBookmarks(Boolean officeExportBookmarks) {
|
|
||||||
setOfficeExportBookmarksValue(officeExportBookmarks);
|
|
||||||
}
|
|
||||||
public static void setOfficeExportBookmarksValue(Boolean officeExportBookmarks) {
|
|
||||||
ConfigConstants.officeExportBookmarks = officeExportBookmarks;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Boolean getOfficeExportNotes() {
|
|
||||||
return officeExportNotes;
|
|
||||||
}
|
|
||||||
@Value("${office.exportnotes:true}")
|
|
||||||
public void setExportNotes(Boolean officeExportNotes) {
|
|
||||||
setOfficeExportNotesValue(officeExportNotes);
|
|
||||||
}
|
|
||||||
public static void setOfficeExportNotesValue(Boolean officeExportNotes) {
|
|
||||||
ConfigConstants.officeExportNotes = officeExportNotes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Boolean getOfficeDocumentOpenPasswords() {
|
|
||||||
return officeDocumentOpenPasswords;
|
|
||||||
}
|
|
||||||
@Value("${office.documentopenpasswords:true}")
|
|
||||||
public void setDocumentOpenPasswords(Boolean officeDocumentOpenPasswords) {
|
|
||||||
setOfficeDocumentOpenPasswordsValue(officeDocumentOpenPasswords);
|
|
||||||
}
|
|
||||||
public static void setOfficeDocumentOpenPasswordsValue(Boolean officeDocumentOpenPasswords) {
|
|
||||||
ConfigConstants.officeDocumentOpenPasswords = officeDocumentOpenPasswords;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 以下为首页显示
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static String getBeian() {
|
|
||||||
return beian;
|
|
||||||
}
|
|
||||||
@Value("${beian:default}")
|
|
||||||
public void setBeian(String beian) {
|
|
||||||
setBeianValue(beian);
|
|
||||||
}
|
|
||||||
public static void setBeianValue(String beian) {
|
|
||||||
ConfigConstants.beian = beian;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static String gethomePpageNumber() {
|
|
||||||
return homePpageNumber;
|
|
||||||
}
|
|
||||||
@Value("${home.pagenumber:1}")
|
|
||||||
public void sethomePpageNumber(String homePpageNumber) {
|
|
||||||
sethomePpageNumberValue(homePpageNumber);
|
|
||||||
}
|
|
||||||
public static void sethomePpageNumberValue(String homePpageNumber) {
|
|
||||||
ConfigConstants.homePpageNumber = homePpageNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String gethomePagination() {
|
|
||||||
return homePagination;
|
|
||||||
}
|
|
||||||
@Value("${home.pagination:true}")
|
|
||||||
public void sethomePagination(String homePagination) {
|
|
||||||
sethomePaginationValue(homePagination);
|
|
||||||
}
|
|
||||||
public static void sethomePaginationValue(String homePagination) {
|
|
||||||
ConfigConstants.homePagination = homePagination;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String gethomePageSize() {
|
|
||||||
return homePageSize;
|
|
||||||
}
|
|
||||||
@Value("${home.pagesize:15}")
|
|
||||||
public void sethomePagesize(String homePageSize) {
|
|
||||||
sethomePageSizeValue(homePageSize);
|
|
||||||
}
|
|
||||||
public static void sethomePageSizeValue(String homePageSize) {
|
|
||||||
ConfigConstants.homePageSize = homePageSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String gethomeSearch() {
|
|
||||||
return homeSearch;
|
|
||||||
}
|
|
||||||
@Value("${home.search:1}")
|
|
||||||
public void sethomeSearch(String homeSearch) {
|
|
||||||
sethomeSearchValue(homeSearch);
|
|
||||||
}
|
|
||||||
public static void sethomeSearchValue(String homeSearch) {
|
|
||||||
ConfigConstants.homeSearch = homeSearch;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ public class ConfigRefreshComponent {
|
||||||
String pdfPrintDisable;
|
String pdfPrintDisable;
|
||||||
String pdfDownloadDisable;
|
String pdfDownloadDisable;
|
||||||
String pdfBookmarkDisable;
|
String pdfBookmarkDisable;
|
||||||
String pdfDisableEditing;
|
|
||||||
boolean fileUploadDisable;
|
boolean fileUploadDisable;
|
||||||
String tifPreviewType;
|
String tifPreviewType;
|
||||||
String prohibit;
|
String prohibit;
|
||||||
|
|
@ -61,22 +60,7 @@ public class ConfigRefreshComponent {
|
||||||
String password;
|
String password;
|
||||||
int pdf2JpgDpi;
|
int pdf2JpgDpi;
|
||||||
String officeTypeWeb;
|
String officeTypeWeb;
|
||||||
String cadPreviewType;
|
|
||||||
boolean deleteSourceFile;
|
boolean deleteSourceFile;
|
||||||
boolean deleteCaptcha;
|
|
||||||
String officPageRange;
|
|
||||||
String officWatermark;
|
|
||||||
String officQuality;
|
|
||||||
String officMaxImageResolution;
|
|
||||||
boolean officExportBookmarks;
|
|
||||||
boolean officeExportNotes;
|
|
||||||
boolean officeDocumentOpenPasswords;
|
|
||||||
String cadTimeout;
|
|
||||||
int cadThread;
|
|
||||||
String homePpageNumber;
|
|
||||||
String homePagination;
|
|
||||||
String homePageSize;
|
|
||||||
String homeSearch;
|
|
||||||
while (true) {
|
while (true) {
|
||||||
FileReader fileReader = new FileReader(configFilePath);
|
FileReader fileReader = new FileReader(configFilePath);
|
||||||
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
||||||
|
|
@ -99,10 +83,8 @@ public class ConfigRefreshComponent {
|
||||||
pdfPrintDisable = properties.getProperty("pdf.print.disable", ConfigConstants.DEFAULT_PDF_PRINT_DISABLE);
|
pdfPrintDisable = properties.getProperty("pdf.print.disable", ConfigConstants.DEFAULT_PDF_PRINT_DISABLE);
|
||||||
pdfDownloadDisable = properties.getProperty("pdf.download.disable", ConfigConstants.DEFAULT_PDF_DOWNLOAD_DISABLE);
|
pdfDownloadDisable = properties.getProperty("pdf.download.disable", ConfigConstants.DEFAULT_PDF_DOWNLOAD_DISABLE);
|
||||||
pdfBookmarkDisable = properties.getProperty("pdf.bookmark.disable", ConfigConstants.DEFAULT_PDF_BOOKMARK_DISABLE);
|
pdfBookmarkDisable = properties.getProperty("pdf.bookmark.disable", ConfigConstants.DEFAULT_PDF_BOOKMARK_DISABLE);
|
||||||
pdfDisableEditing = properties.getProperty("pdf.disable.editing", ConfigConstants.DEFAULT_PDF_DISABLE_EDITING);
|
|
||||||
fileUploadDisable = Boolean.parseBoolean(properties.getProperty("file.upload.disable", ConfigConstants.DEFAULT_FILE_UPLOAD_DISABLE));
|
fileUploadDisable = Boolean.parseBoolean(properties.getProperty("file.upload.disable", ConfigConstants.DEFAULT_FILE_UPLOAD_DISABLE));
|
||||||
tifPreviewType = properties.getProperty("tif.preview.type", ConfigConstants.DEFAULT_TIF_PREVIEW_TYPE);
|
tifPreviewType = properties.getProperty("tif.preview.type", ConfigConstants.DEFAULT_TIF_PREVIEW_TYPE);
|
||||||
cadPreviewType = properties.getProperty("cad.preview.type", ConfigConstants.DEFAULT_CAD_PREVIEW_TYPE);
|
|
||||||
size = properties.getProperty("spring.servlet.multipart.max-file-size", ConfigConstants.DEFAULT_SIZE);
|
size = properties.getProperty("spring.servlet.multipart.max-file-size", ConfigConstants.DEFAULT_SIZE);
|
||||||
beian = properties.getProperty("beian", ConfigConstants.DEFAULT_BEIAN);
|
beian = properties.getProperty("beian", ConfigConstants.DEFAULT_BEIAN);
|
||||||
prohibit = properties.getProperty("prohibit", ConfigConstants.DEFAULT_PROHIBIT);
|
prohibit = properties.getProperty("prohibit", ConfigConstants.DEFAULT_PROHIBIT);
|
||||||
|
|
@ -110,20 +92,6 @@ public class ConfigRefreshComponent {
|
||||||
pdf2JpgDpi = Integer.parseInt(properties.getProperty("pdf2jpg.dpi", ConfigConstants.DEFAULT_PDF2_JPG_DPI));
|
pdf2JpgDpi = Integer.parseInt(properties.getProperty("pdf2jpg.dpi", ConfigConstants.DEFAULT_PDF2_JPG_DPI));
|
||||||
officeTypeWeb = properties.getProperty("office.type.web", ConfigConstants.DEFAULT_OFFICE_TYPE_WEB);
|
officeTypeWeb = properties.getProperty("office.type.web", ConfigConstants.DEFAULT_OFFICE_TYPE_WEB);
|
||||||
deleteSourceFile = Boolean.parseBoolean(properties.getProperty("delete.source.file", ConfigConstants.DEFAULT_DELETE_SOURCE_FILE));
|
deleteSourceFile = Boolean.parseBoolean(properties.getProperty("delete.source.file", ConfigConstants.DEFAULT_DELETE_SOURCE_FILE));
|
||||||
deleteCaptcha = Boolean.parseBoolean(properties.getProperty("delete.captcha", ConfigConstants.DEFAULT_DELETE_CAPTCHA));
|
|
||||||
officPageRange = properties.getProperty("office.pagerange", ConfigConstants.DEFAULT_OFFICE_PAQERANQE);
|
|
||||||
officWatermark = properties.getProperty("office.watermark", ConfigConstants.DEFAULT_OFFICE_WATERMARK);
|
|
||||||
officQuality = properties.getProperty("office.quality", ConfigConstants.DEFAULT_OFFICE_QUALITY);
|
|
||||||
officMaxImageResolution = properties.getProperty("office.maximageresolution", ConfigConstants.DEFAULT_OFFICE_MAXIMAQERESOLUTION);
|
|
||||||
officExportBookmarks = Boolean.parseBoolean(properties.getProperty("office.exportbookmarks", ConfigConstants.DEFAULT_OFFICE_EXPORTBOOKMARKS));
|
|
||||||
officeExportNotes = Boolean.parseBoolean(properties.getProperty("office.exportnotes", ConfigConstants.DEFAULT_OFFICE_EXPORTNOTES));
|
|
||||||
officeDocumentOpenPasswords = Boolean.parseBoolean(properties.getProperty("office.documentopenpasswords", ConfigConstants.DEFAULT_OFFICE_EOCUMENTOPENPASSWORDS));
|
|
||||||
cadTimeout = properties.getProperty("cad.timeout", ConfigConstants.DEFAULT_CAD_TIMEOUT);
|
|
||||||
homePpageNumber = properties.getProperty("home.pagenumber", ConfigConstants.DEFAULT_HOME_PAGENUMBER);
|
|
||||||
homePagination = properties.getProperty("home.pagination", ConfigConstants.DEFAULT_HOME_PAGINATION);
|
|
||||||
homePageSize = properties.getProperty("home.pagesize", ConfigConstants.DEFAULT_HOME_PAGSIZE);
|
|
||||||
homeSearch = properties.getProperty("home.search", ConfigConstants.DEFAULT_HOME_SEARCH);
|
|
||||||
cadThread = Integer.parseInt(properties.getProperty("cad.thread", ConfigConstants.DEFAULT_CAD_THREAD));
|
|
||||||
prohibitArray = prohibit.split(",");
|
prohibitArray = prohibit.split(",");
|
||||||
|
|
||||||
ConfigConstants.setCacheEnabledValueValue(cacheEnabled);
|
ConfigConstants.setCacheEnabledValueValue(cacheEnabled);
|
||||||
|
|
@ -141,31 +109,15 @@ public class ConfigRefreshComponent {
|
||||||
ConfigConstants.setPdfPrintDisableValue(pdfPrintDisable);
|
ConfigConstants.setPdfPrintDisableValue(pdfPrintDisable);
|
||||||
ConfigConstants.setPdfDownloadDisableValue(pdfDownloadDisable);
|
ConfigConstants.setPdfDownloadDisableValue(pdfDownloadDisable);
|
||||||
ConfigConstants.setPdfBookmarkDisableValue(pdfBookmarkDisable);
|
ConfigConstants.setPdfBookmarkDisableValue(pdfBookmarkDisable);
|
||||||
ConfigConstants.setPdfDisableEditingValue(pdfDisableEditing);
|
|
||||||
ConfigConstants.setFileUploadDisableValue(fileUploadDisable);
|
ConfigConstants.setFileUploadDisableValue(fileUploadDisable);
|
||||||
ConfigConstants.setTifPreviewTypeValue(tifPreviewType);
|
ConfigConstants.setTifPreviewTypeValue(tifPreviewType);
|
||||||
ConfigConstants.setCadPreviewTypeValue(cadPreviewType);
|
|
||||||
ConfigConstants.setBeianValue(beian);
|
ConfigConstants.setBeianValue(beian);
|
||||||
ConfigConstants.setSizeValue(size);
|
ConfigConstants.setSizeValue(size);
|
||||||
ConfigConstants.setProhibitValue(prohibitArray);
|
ConfigConstants.setProhibitValue(prohibitArray);
|
||||||
ConfigConstants.setPasswordValue(password);
|
ConfigConstants.setPasswordValue(password);
|
||||||
ConfigConstants.setPdf2JpgDpiValue(pdf2JpgDpi);
|
ConfigConstants.setPdf2JpgDpiValue(pdf2JpgDpi);
|
||||||
ConfigConstants.setOfficeTypeWebValue(officeTypeWeb);
|
ConfigConstants.setOfficeTypeWebValue(officeTypeWeb);
|
||||||
ConfigConstants.setOfficePageRangeValue(officPageRange);
|
|
||||||
ConfigConstants.setOfficeWatermarkValue(officWatermark);
|
|
||||||
ConfigConstants.setOfficeQualityValue(officQuality);
|
|
||||||
ConfigConstants.setOfficeMaxImageResolutionValue(officMaxImageResolution);
|
|
||||||
ConfigConstants.setOfficeExportBookmarksValue(officExportBookmarks);
|
|
||||||
ConfigConstants.setOfficeExportNotesValue(officeExportNotes);
|
|
||||||
ConfigConstants.setOfficeDocumentOpenPasswordsValue(officeDocumentOpenPasswords);
|
|
||||||
ConfigConstants.setDeleteSourceFileValue(deleteSourceFile);
|
ConfigConstants.setDeleteSourceFileValue(deleteSourceFile);
|
||||||
ConfigConstants.setDeleteCaptchaValue(deleteCaptcha);
|
|
||||||
ConfigConstants.setCadTimeoutValue(cadTimeout);
|
|
||||||
ConfigConstants.setCadThreadValue(cadThread);
|
|
||||||
ConfigConstants.sethomePpageNumberValue(homePpageNumber);
|
|
||||||
ConfigConstants.sethomePaginationValue(homePagination);
|
|
||||||
ConfigConstants.sethomePageSizeValue(homePageSize);
|
|
||||||
ConfigConstants.sethomeSearchValue(homeSearch);
|
|
||||||
setWatermarkConfig(properties);
|
setWatermarkConfig(properties);
|
||||||
bufferedReader.close();
|
bufferedReader.close();
|
||||||
fileReader.close();
|
fileReader.close();
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,6 @@ public class FileAttribute {
|
||||||
private Boolean skipDownLoad = false;
|
private Boolean skipDownLoad = false;
|
||||||
private Boolean forceUpdatedCache = false;
|
private Boolean forceUpdatedCache = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理请求到文件服务器的认证请求头,格式如下:
|
|
||||||
* {“username”:"test","password":"test"}
|
|
||||||
* 请求文件服务器时,会将 json 直接塞到请求头里
|
|
||||||
*/
|
|
||||||
private String kkProxyAuthorization;
|
|
||||||
|
|
||||||
public FileAttribute() {
|
public FileAttribute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,11 +124,4 @@ public class FileAttribute {
|
||||||
this.forceUpdatedCache = forceUpdatedCache;
|
this.forceUpdatedCache = forceUpdatedCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKkProxyAuthorization() {
|
|
||||||
return kkProxyAuthorization;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setKkProxyAuthorization(String kkProxyAuthorization) {
|
|
||||||
this.kkProxyAuthorization = kkProxyAuthorization;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ public enum FileType {
|
||||||
MEDIA("mediaFilePreviewImpl"),
|
MEDIA("mediaFilePreviewImpl"),
|
||||||
MARKDOWN("markdownFilePreviewImpl"),
|
MARKDOWN("markdownFilePreviewImpl"),
|
||||||
XML("xmlFilePreviewImpl"),
|
XML("xmlFilePreviewImpl"),
|
||||||
|
FLV("flvFilePreviewImpl"),
|
||||||
CAD("cadFilePreviewImpl"),
|
CAD("cadFilePreviewImpl"),
|
||||||
TIFF("tiffFilePreviewImpl"),
|
TIFF("tiffFilePreviewImpl"),
|
||||||
OFD("ofdFilePreviewImpl"),
|
OFD("ofdFilePreviewImpl"),
|
||||||
|
|
@ -42,7 +43,6 @@ public enum FileType {
|
||||||
private static final String[] EPUB_TYPES = {"epub"};
|
private static final String[] EPUB_TYPES = {"epub"};
|
||||||
private static final String[] DCM_TYPES = {"dcm"};
|
private static final String[] DCM_TYPES = {"dcm"};
|
||||||
private static final String[] DRAWIO_TYPES = {"drawio"};
|
private static final String[] DRAWIO_TYPES = {"drawio"};
|
||||||
private static final String[] XML_TYPES = {"xml","xbrl"};
|
|
||||||
private static final String[] TIFF_TYPES = {"tif", "tiff"};
|
private static final String[] TIFF_TYPES = {"tif", "tiff"};
|
||||||
private static final String[] OFD_TYPES = {"ofd"};
|
private static final String[] OFD_TYPES = {"ofd"};
|
||||||
private static final String[] SVG_TYPES = {"svg"};
|
private static final String[] SVG_TYPES = {"svg"};
|
||||||
|
|
@ -105,11 +105,10 @@ public enum FileType {
|
||||||
for (String drawio : DRAWIO_TYPES) {
|
for (String drawio : DRAWIO_TYPES) {
|
||||||
FILE_TYPE_MAPPER.put(drawio, FileType.DRAWIO);
|
FILE_TYPE_MAPPER.put(drawio, FileType.DRAWIO);
|
||||||
}
|
}
|
||||||
for (String xml : XML_TYPES) {
|
|
||||||
FILE_TYPE_MAPPER.put(xml, FileType.XML);
|
|
||||||
}
|
|
||||||
FILE_TYPE_MAPPER.put("md", FileType.MARKDOWN);
|
FILE_TYPE_MAPPER.put("md", FileType.MARKDOWN);
|
||||||
|
FILE_TYPE_MAPPER.put("xml", FileType.XML);
|
||||||
FILE_TYPE_MAPPER.put("pdf", FileType.PDF);
|
FILE_TYPE_MAPPER.put("pdf", FileType.PDF);
|
||||||
|
FILE_TYPE_MAPPER.put("flv", FileType.FLV);
|
||||||
FILE_TYPE_MAPPER.put("bpmn", FileType.BPMN);
|
FILE_TYPE_MAPPER.put("bpmn", FileType.BPMN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,12 @@ import cn.keking.utils.EncodingDetects;
|
||||||
import cn.keking.utils.KkFileUtils;
|
import cn.keking.utils.KkFileUtils;
|
||||||
import cn.keking.utils.WebUtils;
|
import cn.keking.utils.WebUtils;
|
||||||
import cn.keking.web.filter.BaseUrlFilter;
|
import cn.keking.web.filter.BaseUrlFilter;
|
||||||
import com.aspose.cad.*;
|
import com.aspose.cad.CodePages;
|
||||||
import com.aspose.cad.fileformats.tiff.enums.TiffExpectedFormat;
|
import com.aspose.cad.Color;
|
||||||
|
import com.aspose.cad.Image;
|
||||||
|
import com.aspose.cad.LoadOptions;
|
||||||
import com.aspose.cad.imageoptions.CadRasterizationOptions;
|
import com.aspose.cad.imageoptions.CadRasterizationOptions;
|
||||||
import com.aspose.cad.imageoptions.PdfOptions;
|
import com.aspose.cad.imageoptions.PdfOptions;
|
||||||
import com.aspose.cad.imageoptions.SvgOptions;
|
|
||||||
import com.aspose.cad.imageoptions.TiffOptions;
|
|
||||||
import com.aspose.cad.internal.Exceptions.TimeoutException;
|
|
||||||
import com.itextpdf.text.pdf.PdfReader;
|
import com.itextpdf.text.pdf.PdfReader;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||||
|
|
@ -25,12 +24,9 @@ import org.apache.pdfbox.tools.imageio.ImageIOUtil;
|
||||||
import org.apache.poi.EncryptedDocumentException;
|
import org.apache.poi.EncryptedDocumentException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.DependsOn;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.ObjectUtils;
|
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
@ -42,7 +38,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.*;
|
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -50,14 +45,14 @@ import java.util.stream.IntStream;
|
||||||
* @date 2017/11/13
|
* @date 2017/11/13
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@DependsOn(ConfigConstants.BEAN_NAME)
|
public class FileHandlerService {
|
||||||
public class FileHandlerService implements InitializingBean {
|
|
||||||
|
|
||||||
private static final String PDF2JPG_IMAGE_FORMAT = ".jpg";
|
private static final String PDF2JPG_IMAGE_FORMAT = ".jpg";
|
||||||
private static final String PDF_PASSWORD_MSG = "password";
|
private static final String PDF_PASSWORD_MSG = "password";
|
||||||
private final Logger logger = LoggerFactory.getLogger(FileHandlerService.class);
|
private final Logger logger = LoggerFactory.getLogger(FileHandlerService.class);
|
||||||
private final String fileDir = ConfigConstants.getFileDir();
|
private final String fileDir = ConfigConstants.getFileDir();
|
||||||
private final CacheService cacheService;
|
private final CacheService cacheService;
|
||||||
|
|
||||||
@Value("${server.tomcat.uri-encoding:UTF-8}")
|
@Value("${server.tomcat.uri-encoding:UTF-8}")
|
||||||
private String uriEncoding;
|
private String uriEncoding;
|
||||||
|
|
||||||
|
|
@ -148,14 +143,6 @@ public class FileHandlerService implements InitializingBean {
|
||||||
cacheService.putImgCache(fileKey, imgs);
|
cacheService.putImgCache(fileKey, imgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
cad定义线程池
|
|
||||||
*/
|
|
||||||
private ExecutorService pool = null;
|
|
||||||
@Override
|
|
||||||
public void afterPropertiesSet() throws Exception {
|
|
||||||
pool = Executors.newFixedThreadPool(ConfigConstants.getCadThread());
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 对转换后的文件进行操作(改变编码方式)
|
* 对转换后的文件进行操作(改变编码方式)
|
||||||
*
|
*
|
||||||
|
|
@ -175,8 +162,8 @@ public class FileHandlerService implements InitializingBean {
|
||||||
}
|
}
|
||||||
// 添加sheet控制头
|
// 添加sheet控制头
|
||||||
sb.append("<script src=\"js/jquery-3.6.1.min.js\" type=\"text/javascript\"></script>");
|
sb.append("<script src=\"js/jquery-3.6.1.min.js\" type=\"text/javascript\"></script>");
|
||||||
sb.append("<script src=\"excel/excel.header.js\" type=\"text/javascript\"></script>");
|
sb.append("<script src=\"js/excel.header.js\" type=\"text/javascript\"></script>");
|
||||||
sb.append("<link rel=\"stylesheet\" href=\"excel/excel.css\">");
|
sb.append("<link rel=\"stylesheet\" href=\"bootstrap/css/xlsx.css\">");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
@ -272,11 +259,7 @@ public class FileHandlerService implements InitializingBean {
|
||||||
imageUrls.add(imageUrl);
|
imageUrls.add(imageUrl);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (ObjectUtils.isEmpty(filePassword)){
|
pdfReader = new PdfReader(pdfFilePath); //读取PDF文件
|
||||||
pdfReader = new PdfReader(pdfFilePath); //读取PDF文件
|
|
||||||
}else {
|
|
||||||
pdfReader = new PdfReader(pdfFilePath,filePassword.getBytes()); //读取PDF文件
|
|
||||||
}
|
|
||||||
} catch (Exception e) { //获取异常方法 判断是否有加密字符串
|
} catch (Exception e) { //获取异常方法 判断是否有加密字符串
|
||||||
Throwable[] throwableArray = ExceptionUtils.getThrowables(e);
|
Throwable[] throwableArray = ExceptionUtils.getThrowables(e);
|
||||||
for (Throwable throwable : throwableArray) {
|
for (Throwable throwable : throwableArray) {
|
||||||
|
|
@ -314,79 +297,34 @@ public class FileHandlerService implements InitializingBean {
|
||||||
* @param outputFilePath pdf输出文件路径
|
* @param outputFilePath pdf输出文件路径
|
||||||
* @return 转换是否成功
|
* @return 转换是否成功
|
||||||
*/
|
*/
|
||||||
public String cadToPdf(String inputFilePath, String outputFilePath ,String cadPreviewType) throws Exception {
|
public String cadToPdf(String inputFilePath, String outputFilePath) throws Exception {
|
||||||
final InterruptionTokenSource source = new InterruptionTokenSource();//CAD延时
|
File outputFile = new File(outputFilePath);
|
||||||
Callable<String> call = () -> {
|
LoadOptions opts = new LoadOptions();
|
||||||
File outputFile = new File(outputFilePath);
|
opts.setSpecifiedEncoding(CodePages.SimpChinese);
|
||||||
LoadOptions opts = new LoadOptions();
|
com.aspose.cad.Image cadImage = Image.load(inputFilePath, opts);
|
||||||
opts.setSpecifiedEncoding(CodePages.SimpChinese);
|
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions();
|
||||||
Image cadImage = Image.load(inputFilePath, opts);
|
cadRasterizationOptions.setBackgroundColor(Color.getWhite());
|
||||||
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions();
|
cadRasterizationOptions.setPageWidth(1400);
|
||||||
cadRasterizationOptions.setBackgroundColor(Color.getWhite());
|
cadRasterizationOptions.setPageHeight(650);
|
||||||
cadRasterizationOptions.setPageWidth(1400);
|
cadRasterizationOptions.setAutomaticLayoutsScaling(true);
|
||||||
cadRasterizationOptions.setPageHeight(650);
|
cadRasterizationOptions.setNoScaling(false);
|
||||||
cadRasterizationOptions.setAutomaticLayoutsScaling(true);
|
cadRasterizationOptions.setDrawType(1);
|
||||||
cadRasterizationOptions.setNoScaling(false);
|
PdfOptions pdfOptions = new PdfOptions();
|
||||||
cadRasterizationOptions.setDrawType(1);
|
pdfOptions.setVectorRasterizationOptions(cadRasterizationOptions);
|
||||||
SvgOptions SvgOptions = null;
|
OutputStream stream = null;
|
||||||
PdfOptions pdfOptions = null;
|
|
||||||
TiffOptions TiffOptions = null;
|
|
||||||
switch (cadPreviewType) { //新增格式方法
|
|
||||||
case "svg":
|
|
||||||
SvgOptions = new SvgOptions();
|
|
||||||
SvgOptions.setVectorRasterizationOptions(cadRasterizationOptions);
|
|
||||||
SvgOptions.setInterruptionToken(source.getToken());
|
|
||||||
break;
|
|
||||||
case "pdf":
|
|
||||||
pdfOptions = new PdfOptions();
|
|
||||||
pdfOptions.setVectorRasterizationOptions(cadRasterizationOptions);
|
|
||||||
pdfOptions.setInterruptionToken(source.getToken());
|
|
||||||
break;
|
|
||||||
case "tif":
|
|
||||||
TiffOptions = new TiffOptions(TiffExpectedFormat.TiffJpegRgb);
|
|
||||||
TiffOptions.setVectorRasterizationOptions(cadRasterizationOptions);
|
|
||||||
TiffOptions.setInterruptionToken(source.getToken());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
try (OutputStream stream = new FileOutputStream(outputFile)) {
|
|
||||||
switch (cadPreviewType) {
|
|
||||||
case "svg":
|
|
||||||
cadImage.save(stream, SvgOptions);
|
|
||||||
break;
|
|
||||||
case "pdf":
|
|
||||||
cadImage.save(stream, pdfOptions);
|
|
||||||
break;
|
|
||||||
case "tif":
|
|
||||||
cadImage.save(stream, TiffOptions);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
logger.error("PDFFileNotFoundException,inputFilePath:{}", inputFilePath, e);
|
|
||||||
return null;
|
|
||||||
} finally {
|
|
||||||
//关闭
|
|
||||||
if (cadImage != null) { //关闭
|
|
||||||
cadImage.dispose();
|
|
||||||
}
|
|
||||||
source.interrupt(); //结束任务
|
|
||||||
}
|
|
||||||
return "true";
|
|
||||||
};
|
|
||||||
Future<String> result = pool.submit(call);
|
|
||||||
try {
|
try {
|
||||||
// 如果在超时时间内,没有数据返回:则抛出TimeoutException异常
|
stream = new FileOutputStream(outputFile);
|
||||||
result.get(Long.parseLong(ConfigConstants.getCadTimeout()), TimeUnit.SECONDS);
|
cadImage.save(stream, pdfOptions);
|
||||||
} catch (InterruptedException e) {
|
} catch (IOException e) {
|
||||||
System.out.println("InterruptedException发生");
|
logger.error("PDFFileNotFoundException,inputFilePath:{}", inputFilePath, e);
|
||||||
return null;
|
return "null";
|
||||||
} catch (ExecutionException e) {
|
|
||||||
System.out.println("ExecutionException发生");
|
|
||||||
return null;
|
|
||||||
} catch (TimeoutException e) {
|
|
||||||
System.out.println("TimeoutException发生,意味着线程超时报错");
|
|
||||||
return null;
|
|
||||||
} finally {
|
} finally {
|
||||||
source.dispose();
|
if (stream != null) { //关闭
|
||||||
|
stream.close();
|
||||||
|
}
|
||||||
|
if (cadImage != null) { //关闭
|
||||||
|
cadImage.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "true";
|
return "true";
|
||||||
}
|
}
|
||||||
|
|
@ -469,9 +407,6 @@ public class FileHandlerService implements InitializingBean {
|
||||||
if (StringUtils.hasText(userToken)) {
|
if (StringUtils.hasText(userToken)) {
|
||||||
attribute.setUserToken(userToken);
|
attribute.setUserToken(userToken);
|
||||||
}
|
}
|
||||||
String kkProxyAuthorization = req.getHeader( "kk-proxy-authorization");
|
|
||||||
attribute.setKkProxyAuthorization(kkProxyAuthorization);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return attribute;
|
return attribute;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import org.springframework.ui.Model;
|
||||||
*/
|
*/
|
||||||
public interface FilePreview {
|
public interface FilePreview {
|
||||||
|
|
||||||
|
String FLV_FILE_PREVIEW_PAGE = "flv";
|
||||||
String PDF_FILE_PREVIEW_PAGE = "pdf";
|
String PDF_FILE_PREVIEW_PAGE = "pdf";
|
||||||
String PPT_FILE_PREVIEW_PAGE = "ppt";
|
String PPT_FILE_PREVIEW_PAGE = "ppt";
|
||||||
String COMPRESS_FILE_PREVIEW_PAGE = "compress";
|
String COMPRESS_FILE_PREVIEW_PAGE = "compress";
|
||||||
|
|
@ -32,7 +33,6 @@ public interface FilePreview {
|
||||||
String DRAWUI_FILE_PREVIEW_PAGE = "drawio";
|
String DRAWUI_FILE_PREVIEW_PAGE = "drawio";
|
||||||
String NOT_SUPPORTED_FILE_PAGE = "fileNotSupported";
|
String NOT_SUPPORTED_FILE_PAGE = "fileNotSupported";
|
||||||
String XLSX_FILE_PREVIEW_PAGE = "officeweb";
|
String XLSX_FILE_PREVIEW_PAGE = "officeweb";
|
||||||
String CSV_FILE_PREVIEW_PAGE = "csv";
|
|
||||||
|
|
||||||
String filePreviewHandle(String url, Model model, FileAttribute fileAttribute);
|
String filePreviewHandle(String url, Model model, FileAttribute fileAttribute);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package cn.keking.service;
|
package cn.keking.service;
|
||||||
|
|
||||||
import cn.keking.config.ConfigConstants;
|
|
||||||
import cn.keking.model.FileAttribute;
|
import cn.keking.model.FileAttribute;
|
||||||
import com.sun.star.document.UpdateDocMode;
|
import com.sun.star.document.UpdateDocMode;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
@ -34,36 +33,15 @@ public class OfficeToPdfService {
|
||||||
logger.error("创建目录【{}】失败,请检查目录权限!",outputFilePath_end);
|
logger.error("创建目录【{}】失败,请检查目录权限!",outputFilePath_end);
|
||||||
}
|
}
|
||||||
LocalConverter.Builder builder;
|
LocalConverter.Builder builder;
|
||||||
Map<String, Object> filterData = new HashMap<>();
|
|
||||||
filterData.put("EncryptFile", true);
|
|
||||||
if(!ConfigConstants.getOfficePageRange().equals("false")){
|
|
||||||
filterData.put("PageRange", ConfigConstants.getOfficePageRange()); //限制页面
|
|
||||||
}
|
|
||||||
if(!ConfigConstants.getOfficeWatermark().equals("false")){
|
|
||||||
filterData.put("Watermark", ConfigConstants.getOfficeWatermark()); //水印
|
|
||||||
}
|
|
||||||
filterData.put("Quality", ConfigConstants.getOfficeQuality()); //图片压缩
|
|
||||||
filterData.put("MaxImageResolution", ConfigConstants.getOfficeMaxImageResolution()); //DPI
|
|
||||||
if(ConfigConstants.getOfficeExportBookmarks()){
|
|
||||||
filterData.put("ExportBookmarks", true); //导出书签
|
|
||||||
}
|
|
||||||
if(ConfigConstants.getOfficeExportNotes()){
|
|
||||||
filterData.put("ExportNotes", true); //批注作为PDF的注释
|
|
||||||
}
|
|
||||||
if(ConfigConstants.getOfficeDocumentOpenPasswords()){
|
|
||||||
filterData.put("DocumentOpenPassword", fileAttribute.getFilePassword()); //给PDF添加密码
|
|
||||||
}
|
|
||||||
Map<String, Object> customProperties = new HashMap<>();
|
|
||||||
customProperties.put("FilterData", filterData);
|
|
||||||
if (StringUtils.isNotBlank(fileAttribute.getFilePassword())) {
|
if (StringUtils.isNotBlank(fileAttribute.getFilePassword())) {
|
||||||
Map<String, Object> loadProperties = new HashMap<>();
|
Map<String, Object> loadProperties = new HashMap<>();
|
||||||
loadProperties.put("Hidden", true);
|
loadProperties.put("Hidden", true);
|
||||||
loadProperties.put("ReadOnly", true);
|
loadProperties.put("ReadOnly", true);
|
||||||
loadProperties.put("UpdateDocMode", UpdateDocMode.NO_UPDATE);
|
loadProperties.put("UpdateDocMode", UpdateDocMode.NO_UPDATE);
|
||||||
loadProperties.put("Password", fileAttribute.getFilePassword());
|
loadProperties.put("Password", fileAttribute.getFilePassword());
|
||||||
builder = LocalConverter.builder().loadProperties(loadProperties).storeProperties(customProperties);
|
builder = LocalConverter.builder().loadProperties(loadProperties);
|
||||||
} else {
|
} else {
|
||||||
builder = LocalConverter.builder().storeProperties(customProperties);
|
builder = LocalConverter.builder();
|
||||||
}
|
}
|
||||||
builder.build().convert(inputFile).to(outputFile).execute();
|
builder.build().convert(inputFile).to(outputFile).execute();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,17 @@ package cn.keking.service.impl;
|
||||||
import cn.keking.config.ConfigConstants;
|
import cn.keking.config.ConfigConstants;
|
||||||
import cn.keking.model.FileAttribute;
|
import cn.keking.model.FileAttribute;
|
||||||
import cn.keking.model.ReturnResponse;
|
import cn.keking.model.ReturnResponse;
|
||||||
import cn.keking.service.FileHandlerService;
|
|
||||||
import cn.keking.service.FilePreview;
|
import cn.keking.service.FilePreview;
|
||||||
import cn.keking.utils.DownloadUtils;
|
import cn.keking.utils.DownloadUtils;
|
||||||
|
import cn.keking.service.FileHandlerService;
|
||||||
import cn.keking.utils.KkFileUtils;
|
import cn.keking.utils.KkFileUtils;
|
||||||
import cn.keking.web.filter.BaseUrlFilter;
|
import cn.keking.web.filter.BaseUrlFilter;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.keking.service.impl.OfficeFilePreviewImpl.getPreviewType;
|
import static cn.keking.service.impl.OfficeFilePreviewImpl.getPreviewType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,8 +43,7 @@ public class CadFilePreviewImpl implements FilePreview {
|
||||||
boolean forceUpdatedCache=fileAttribute.forceUpdatedCache();
|
boolean forceUpdatedCache=fileAttribute.forceUpdatedCache();
|
||||||
String fileName = fileAttribute.getName();
|
String fileName = fileAttribute.getName();
|
||||||
String suffix = fileAttribute.getSuffix();
|
String suffix = fileAttribute.getSuffix();
|
||||||
String cadPreviewType = ConfigConstants.getCadPreviewType();
|
String pdfName = fileName.substring(0, fileName.lastIndexOf(".")) + suffix +"." + "pdf" ; //生成文件添加类型后缀 防止同名文件
|
||||||
String pdfName = fileName.substring(0, fileName.lastIndexOf(".")) + suffix +"." + cadPreviewType ; //生成文件添加类型后缀 防止同名文件
|
|
||||||
String outFilePath = FILE_DIR + pdfName;
|
String outFilePath = FILE_DIR + pdfName;
|
||||||
// 判断之前是否已转换过,如果转换过,直接返回,否则执行转换
|
// 判断之前是否已转换过,如果转换过,直接返回,否则执行转换
|
||||||
if (forceUpdatedCache || !fileHandlerService.listConvertedFiles().containsKey(pdfName) || !ConfigConstants.isCacheEnabled()) {
|
if (forceUpdatedCache || !fileHandlerService.listConvertedFiles().containsKey(pdfName) || !ConfigConstants.isCacheEnabled()) {
|
||||||
|
|
@ -55,7 +56,7 @@ public class CadFilePreviewImpl implements FilePreview {
|
||||||
String imageUrls = null;
|
String imageUrls = null;
|
||||||
if (StringUtils.hasText(outFilePath)) {
|
if (StringUtils.hasText(outFilePath)) {
|
||||||
try {
|
try {
|
||||||
imageUrls = fileHandlerService.cadToPdf(filePath, outFilePath,cadPreviewType);
|
imageUrls = fileHandlerService.cadToPdf(filePath, outFilePath);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
@ -72,17 +73,12 @@ public class CadFilePreviewImpl implements FilePreview {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("tif".equalsIgnoreCase(cadPreviewType)){
|
|
||||||
model.addAttribute("currentUrl", pdfName);
|
|
||||||
return TIFF_FILE_PREVIEW_PAGE;
|
|
||||||
}else if("svg".equalsIgnoreCase(cadPreviewType)){
|
|
||||||
model.addAttribute("currentUrl", pdfName);
|
|
||||||
return SVG_FILE_PREVIEW_PAGE;
|
|
||||||
}
|
|
||||||
if (baseUrl != null && (OFFICE_PREVIEW_TYPE_IMAGE.equals(officePreviewType) || OFFICE_PREVIEW_TYPE_ALL_IMAGES.equals(officePreviewType))) {
|
if (baseUrl != null && (OFFICE_PREVIEW_TYPE_IMAGE.equals(officePreviewType) || OFFICE_PREVIEW_TYPE_ALL_IMAGES.equals(officePreviewType))) {
|
||||||
return getPreviewType(model, fileAttribute, officePreviewType, baseUrl, pdfName, outFilePath, fileHandlerService, OFFICE_PREVIEW_TYPE_IMAGE,otherFilePreview);
|
return getPreviewType(model, fileAttribute, officePreviewType, baseUrl, pdfName, outFilePath, fileHandlerService, OFFICE_PREVIEW_TYPE_IMAGE,otherFilePreview);
|
||||||
}
|
}
|
||||||
model.addAttribute("pdfUrl", pdfName);
|
model.addAttribute("pdfUrl", pdfName);
|
||||||
return PDF_FILE_PREVIEW_PAGE;
|
return PDF_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package cn.keking.service.impl;
|
||||||
|
|
||||||
|
import cn.keking.model.FileAttribute;
|
||||||
|
import cn.keking.service.FilePreview;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : kl
|
||||||
|
* create : 2020-12-27 2:50 下午
|
||||||
|
* flv文件预览处理实现
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class FlvFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
|
private final MediaFilePreviewImpl mediaFilePreview;
|
||||||
|
|
||||||
|
public FlvFilePreviewImpl(MediaFilePreviewImpl mediaFilePreview) {
|
||||||
|
this.mediaFilePreview = mediaFilePreview;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
|
mediaFilePreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
|
return FLV_FILE_PREVIEW_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -60,13 +60,9 @@ public class OfficeFilePreviewImpl implements FilePreview {
|
||||||
if (!officePreviewType.equalsIgnoreCase("html")) {
|
if (!officePreviewType.equalsIgnoreCase("html")) {
|
||||||
if (ConfigConstants.getOfficeTypeWeb() .equalsIgnoreCase("web")) {
|
if (ConfigConstants.getOfficeTypeWeb() .equalsIgnoreCase("web")) {
|
||||||
if (suffix.equalsIgnoreCase("xlsx")) {
|
if (suffix.equalsIgnoreCase("xlsx")) {
|
||||||
model.addAttribute("pdfUrl", KkFileUtils.htmlEscape(url)); //特殊符号处理
|
model.addAttribute("pdfUrl", url);
|
||||||
return XLSX_FILE_PREVIEW_PAGE;
|
return XLSX_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
if (suffix.equalsIgnoreCase("csv")) {
|
|
||||||
model.addAttribute("csvUrl", KkFileUtils.htmlEscape(url));
|
|
||||||
return CSV_FILE_PREVIEW_PAGE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (forceUpdatedCache|| !fileHandlerService.listConvertedFiles().containsKey(pdfName) || !ConfigConstants.isCacheEnabled()) {
|
if (forceUpdatedCache|| !fileHandlerService.listConvertedFiles().containsKey(pdfName) || !ConfigConstants.isCacheEnabled()) {
|
||||||
|
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
package cn.keking.utils;
|
|
||||||
|
|
||||||
import org.springframework.util.Assert;
|
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class CaptchaUtil {
|
|
||||||
|
|
||||||
public static final String CAPTCHA_CODE = "captchaCode";
|
|
||||||
public static final String CAPTCHA_GENERATE_TIME = "captchaTime";
|
|
||||||
|
|
||||||
private static final int WIDTH = 100;// 定义图片的width
|
|
||||||
private static final int HEIGHT = 30;// 定义图片的height
|
|
||||||
private static final int CODE_LENGTH = 4;// 定义图片上显示验证码的个数
|
|
||||||
private static final int FONT_HEIGHT = 28;
|
|
||||||
private static final char[] CODE_SEQUENCE = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
|
||||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', '2', '3', '4', '5', '6', '7', '8', '9'};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 指定验证码、生成验证码图片。
|
|
||||||
* @param captchaCode 验证码
|
|
||||||
* @return 验证码图片
|
|
||||||
*/
|
|
||||||
public static BufferedImage generateCaptchaPic(final String captchaCode) {
|
|
||||||
Assert.notNull(captchaCode, "captchaCode must not be null");
|
|
||||||
// 定义图像buffer
|
|
||||||
BufferedImage buffImg = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
|
|
||||||
Graphics gd = buffImg.getGraphics();
|
|
||||||
Random random = new Random();
|
|
||||||
// 将图像填充为白色
|
|
||||||
gd.setColor(Color.WHITE);
|
|
||||||
gd.fillRect(0, 0, WIDTH, HEIGHT);
|
|
||||||
Font font = new Font("Times New Roman", Font.BOLD, FONT_HEIGHT);
|
|
||||||
gd.setFont(font);
|
|
||||||
// 画边框。
|
|
||||||
gd.setColor(Color.BLACK);
|
|
||||||
gd.drawRect(0, 0, WIDTH - 1, HEIGHT - 1);
|
|
||||||
|
|
||||||
// 随机产生40条干扰线,使图象中的认证码不易被其它程序探测到。
|
|
||||||
gd.setColor(Color.BLACK);
|
|
||||||
for (int i = 0; i < 30; i++) {
|
|
||||||
int x = random.nextInt(WIDTH);
|
|
||||||
int y = random.nextInt(HEIGHT);
|
|
||||||
int xl = random.nextInt(12);
|
|
||||||
int yl = random.nextInt(12);
|
|
||||||
gd.drawLine(x, y, x + xl, y + yl);
|
|
||||||
}
|
|
||||||
// randomCode用于保存随机产生的验证码,以便用户登录后进行验证。
|
|
||||||
int red, green, blue;
|
|
||||||
// 产生随机的颜色分量来构造颜色值,这样输出的每位数字的颜色值都将不同。
|
|
||||||
red = random.nextInt(255);
|
|
||||||
green = random.nextInt(255);
|
|
||||||
blue = random.nextInt(255);
|
|
||||||
// 用随机产生的颜色将验证码绘制到图像中。
|
|
||||||
gd.setColor(new Color(red, green, blue));
|
|
||||||
gd.drawString(captchaCode, 18, 27);
|
|
||||||
return buffImg;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成随机字符串。
|
|
||||||
* @return 字符串
|
|
||||||
*/
|
|
||||||
public static String generateCaptchaCode() {
|
|
||||||
Random random = new Random();
|
|
||||||
StringBuilder randomCode = new StringBuilder();
|
|
||||||
for (int i = 0; i < CODE_LENGTH; i++) {
|
|
||||||
randomCode.append(CODE_SEQUENCE[random.nextInt(52)]);
|
|
||||||
}
|
|
||||||
return randomCode.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package cn.keking.utils;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author kl (http://kailing.pub)
|
|
||||||
* @since 2023/8/11
|
|
||||||
*/
|
|
||||||
public class DateUtils {
|
|
||||||
/**
|
|
||||||
* 获取当前时间的秒级时间戳
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static long getCurrentSecond() {
|
|
||||||
return Instant.now().getEpochSecond();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算当前时间与指定时间的秒级时间戳差值
|
|
||||||
* @param datetime 指定时间
|
|
||||||
* @return 差值
|
|
||||||
*/
|
|
||||||
public static long calculateCurrentTimeDifference(long datetime) {
|
|
||||||
return getCurrentSecond() - datetime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,29 +3,21 @@ package cn.keking.utils;
|
||||||
import cn.keking.config.ConfigConstants;
|
import cn.keking.config.ConfigConstants;
|
||||||
import cn.keking.model.FileAttribute;
|
import cn.keking.model.FileAttribute;
|
||||||
import cn.keking.model.ReturnResponse;
|
import cn.keking.model.ReturnResponse;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import io.mola.galimatias.GalimatiasParseException;
|
import io.mola.galimatias.GalimatiasParseException;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLDecoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import static cn.keking.utils.KkFileUtils.isFtpUrl;
|
import static cn.keking.utils.KkFileUtils.isFtpUrl;
|
||||||
import static cn.keking.utils.KkFileUtils.isHttpUrl;
|
import static cn.keking.utils.KkFileUtils.isHttpUrl;
|
||||||
import org.springframework.http.HttpMethod;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
import org.springframework.web.client.RequestCallback;
|
|
||||||
import org.springframework.web.client.RestTemplate;
|
|
||||||
/**
|
/**
|
||||||
* @author yudian-it
|
* @author yudian-it
|
||||||
*/
|
*/
|
||||||
|
|
@ -36,9 +28,6 @@ public class DownloadUtils {
|
||||||
private static final String URL_PARAM_FTP_USERNAME = "ftp.username";
|
private static final String URL_PARAM_FTP_USERNAME = "ftp.username";
|
||||||
private static final String URL_PARAM_FTP_PASSWORD = "ftp.password";
|
private static final String URL_PARAM_FTP_PASSWORD = "ftp.password";
|
||||||
private static final String URL_PARAM_FTP_CONTROL_ENCODING = "ftp.control.encoding";
|
private static final String URL_PARAM_FTP_CONTROL_ENCODING = "ftp.control.encoding";
|
||||||
private static final RestTemplate restTemplate = new RestTemplate();
|
|
||||||
private static final ObjectMapper mapper = new ObjectMapper();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fileAttribute fileAttribute
|
* @param fileAttribute fileAttribute
|
||||||
|
|
@ -56,14 +45,6 @@ public class DownloadUtils {
|
||||||
}
|
}
|
||||||
ReturnResponse<String> response = new ReturnResponse<>(0, "下载成功!!!", "");
|
ReturnResponse<String> response = new ReturnResponse<>(0, "下载成功!!!", "");
|
||||||
String realPath = getRelFilePath(fileName, fileAttribute);
|
String realPath = getRelFilePath(fileName, fileAttribute);
|
||||||
|
|
||||||
// 判断是否非法地址
|
|
||||||
if (KkFileUtils.isIllegalFileName(realPath)) {
|
|
||||||
response.setCode(1);
|
|
||||||
response.setContent(null);
|
|
||||||
response.setMsg("下载失败:文件名不合法!" + urlStr);
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
if (!KkFileUtils.isAllowedUpload(realPath)) {
|
if (!KkFileUtils.isAllowedUpload(realPath)) {
|
||||||
response.setCode(1);
|
response.setCode(1);
|
||||||
response.setContent(null);
|
response.setContent(null);
|
||||||
|
|
@ -76,9 +57,14 @@ public class DownloadUtils {
|
||||||
response.setMsg(fileName);
|
response.setMsg(fileName);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
// 如果文件是否已经存在、且不强制更新,则直接返回文件路径
|
if(!StringUtils.hasText(realPath)){
|
||||||
if (KkFileUtils.isExist(realPath) && !fileAttribute.forceUpdatedCache()) {
|
response.setCode(1);
|
||||||
response.setContent(realPath);
|
response.setContent(null);
|
||||||
|
response.setMsg("下载失败:文件名不合法!" + urlStr);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
if(realPath.equals("cunzhai")){
|
||||||
|
response.setContent(fileDir + fileName);
|
||||||
response.setMsg(fileName);
|
response.setMsg(fileName);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
@ -87,20 +73,7 @@ public class DownloadUtils {
|
||||||
if (!fileAttribute.getSkipDownLoad()) {
|
if (!fileAttribute.getSkipDownLoad()) {
|
||||||
if (isHttpUrl(url)) {
|
if (isHttpUrl(url)) {
|
||||||
File realFile = new File(realPath);
|
File realFile = new File(realPath);
|
||||||
RequestCallback requestCallback = request -> {
|
FileUtils.copyURLToFile(url, realFile);
|
||||||
request.getHeaders()
|
|
||||||
.setAccept(Arrays.asList(MediaType.APPLICATION_OCTET_STREAM, MediaType.ALL));
|
|
||||||
String proxyAuthorization = fileAttribute.getKkProxyAuthorization();
|
|
||||||
if(StringUtils.hasText(proxyAuthorization)){
|
|
||||||
Map<String,String> proxyAuthorizationMap = mapper.readValue(proxyAuthorization, Map.class);
|
|
||||||
proxyAuthorizationMap.entrySet().forEach(entry-> request.getHeaders().set(entry.getKey(), entry.getValue()));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
urlStr = URLDecoder.decode(urlStr, StandardCharsets.UTF_8.name());
|
|
||||||
restTemplate.execute(urlStr, HttpMethod.GET, requestCallback, fileResponse -> {
|
|
||||||
FileUtils.copyToFile(fileResponse.getBody(), realFile);
|
|
||||||
return null;
|
|
||||||
});
|
|
||||||
} else if (isFtpUrl(url)) {
|
} else if (isFtpUrl(url)) {
|
||||||
String ftpUsername = WebUtils.getUrlParameterReg(fileAttribute.getUrl(), URL_PARAM_FTP_USERNAME);
|
String ftpUsername = WebUtils.getUrlParameterReg(fileAttribute.getUrl(), URL_PARAM_FTP_USERNAME);
|
||||||
String ftpPassword = WebUtils.getUrlParameterReg(fileAttribute.getUrl(), URL_PARAM_FTP_PASSWORD);
|
String ftpPassword = WebUtils.getUrlParameterReg(fileAttribute.getUrl(), URL_PARAM_FTP_PASSWORD);
|
||||||
|
|
@ -142,12 +115,21 @@ public class DownloadUtils {
|
||||||
} else { // 文件后缀不一致时,以type为准(针对simText【将类txt文件转为txt】)
|
} else { // 文件后缀不一致时,以type为准(针对simText【将类txt文件转为txt】)
|
||||||
fileName = fileName.replace(fileName.substring(fileName.lastIndexOf(".") + 1), type);
|
fileName = fileName.replace(fileName.substring(fileName.lastIndexOf(".") + 1), type);
|
||||||
}
|
}
|
||||||
|
// 判断是否非法地址
|
||||||
|
if (KkFileUtils.isIllegalFileName(fileName)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
String realPath = fileDir + fileName;
|
String realPath = fileDir + fileName;
|
||||||
File dirFile = new File(fileDir);
|
File dirFile = new File(fileDir);
|
||||||
if (!dirFile.exists() && !dirFile.mkdirs()) {
|
if (!dirFile.exists() && !dirFile.mkdirs()) {
|
||||||
logger.error("创建目录【{}】失败,可能是权限不够,请检查", fileDir);
|
logger.error("创建目录【{}】失败,可能是权限不够,请检查", fileDir);
|
||||||
}
|
}
|
||||||
|
// 文件已在本地存在,跳过文件下载
|
||||||
|
File realFile = new File(realPath);
|
||||||
|
if (realFile.exists()) {
|
||||||
|
fileAttribute.setSkipDownLoad(true);
|
||||||
|
return "cunzhai";
|
||||||
|
}
|
||||||
return realPath;
|
return realPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -34,33 +34,29 @@ public class KkFileUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查文件名是否合规
|
* 检查文件名是否合规
|
||||||
*
|
|
||||||
* @param fileName 文件名
|
* @param fileName 文件名
|
||||||
* @return 合规结果, true:不合规,false:合规
|
* @return 合规结果,true:不合规,false:合规
|
||||||
*/
|
*/
|
||||||
public static boolean isIllegalFileName(String fileName) {
|
public static boolean isIllegalFileName(String fileName){
|
||||||
for (String str : illegalFileStrList) {
|
for (String str: illegalFileStrList){
|
||||||
if (fileName.contains(str)) {
|
if(fileName.contains(str)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查是否是数字
|
* 检查是否是数字
|
||||||
*
|
|
||||||
* @param str 文件名
|
* @param str 文件名
|
||||||
* @return 合规结果, true:不合规,false:合规
|
* @return 合规结果,true:不合规,false:合规
|
||||||
*/
|
*/
|
||||||
public static boolean isInteger(String str) {
|
public static boolean isInteger(String str) {
|
||||||
if (StringUtils.hasText(str)) {
|
if(StringUtils.hasText(str)){
|
||||||
boolean strResult = str.matches("-?[0-9]+.?[0-9]*");
|
boolean strResult = str.matches("-?[0-9]+.?[0-9]*");
|
||||||
return strResult;
|
return strResult ;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断url是否是http资源
|
* 判断url是否是http资源
|
||||||
*
|
*
|
||||||
|
|
@ -106,7 +102,7 @@ public class KkFileUtils {
|
||||||
|
|
||||||
|
|
||||||
public static String htmlEscape(String input) {
|
public static String htmlEscape(String input) {
|
||||||
if (StringUtils.hasText(input)) {
|
if(StringUtils.hasText(input)){
|
||||||
//input = input.replaceAll("\\{", "%7B").replaceAll("}", "%7D").replaceAll("\\\\", "%5C");
|
//input = input.replaceAll("\\{", "%7B").replaceAll("}", "%7D").replaceAll("\\\\", "%5C");
|
||||||
String htmlStr = HtmlUtils.htmlEscape(input, "UTF-8");
|
String htmlStr = HtmlUtils.htmlEscape(input, "UTF-8");
|
||||||
//& -> &
|
//& -> &
|
||||||
|
|
@ -190,23 +186,11 @@ public class KkFileUtils {
|
||||||
*/
|
*/
|
||||||
public static boolean isAllowedUpload(String file) {
|
public static boolean isAllowedUpload(String file) {
|
||||||
String fileType = suffixFromFileName(file);
|
String fileType = suffixFromFileName(file);
|
||||||
for (String type : ConfigConstants.getProhibit()) {
|
for (String type : ConfigConstants.getProhibit()) {
|
||||||
if (type.equals(fileType)){
|
if (type.equals(fileType))
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return !ObjectUtils.isEmpty(fileType);
|
return !ObjectUtils.isEmpty(fileType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断文件是否存在
|
|
||||||
*
|
|
||||||
* @param filePath 文件路径
|
|
||||||
* @return 是否存在 true:存在,false:不存在
|
|
||||||
*/
|
|
||||||
public static boolean isExist(String filePath) {
|
|
||||||
File file = new File(filePath);
|
|
||||||
return file.exists();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -9,8 +9,6 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.util.HtmlUtils;
|
import org.springframework.web.util.HtmlUtils;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
@ -29,7 +27,7 @@ import java.util.regex.Pattern;
|
||||||
public class WebUtils {
|
public class WebUtils {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(WebUtils.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(WebUtils.class);
|
||||||
private static final String BASE64_MSG = "base64";
|
|
||||||
/**
|
/**
|
||||||
* 获取标准的URL
|
* 获取标准的URL
|
||||||
*
|
*
|
||||||
|
|
@ -207,7 +205,13 @@ public class WebUtils {
|
||||||
Matcher matcher = pattern.matcher(url);
|
Matcher matcher = pattern.matcher(url);
|
||||||
return matcher.find();
|
return matcher.find();
|
||||||
}
|
}
|
||||||
|
public static boolean kuayu(String host, String wjl) { //查询域名是否相同
|
||||||
|
if (wjl.contains(host)) {
|
||||||
|
return true;
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 将 Base64 字符串解码,再解码URL参数, 默认使用 UTF-8
|
* 将 Base64 字符串解码,再解码URL参数, 默认使用 UTF-8
|
||||||
* @param source 原始 Base64 字符串
|
* @param source 原始 Base64 字符串
|
||||||
|
|
@ -239,14 +243,10 @@ public class WebUtils {
|
||||||
try {
|
try {
|
||||||
return new String(Base64Utils.decodeFromString(source.replaceAll(" ", "+").replaceAll("\n", "")), charsets);
|
return new String(Base64Utils.decodeFromString(source.replaceAll(" ", "+").replaceAll("\n", "")), charsets);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e.getMessage().toLowerCase().contains(BASE64_MSG)) {
|
LOGGER.error("url解码异常,可能是接入方法错误或者未使用BASE64", e);
|
||||||
LOGGER.error("url解码异常,接入方法错误未使用BASE64");
|
|
||||||
}else {
|
|
||||||
LOGGER.error("url解码异常,其他错误", e);
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 url 的 host
|
* 获取 url 的 host
|
||||||
|
|
@ -261,61 +261,4 @@ public class WebUtils {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 session 中的 String 属性
|
|
||||||
* @param request 请求
|
|
||||||
* @return 属性值
|
|
||||||
*/
|
|
||||||
public static String getSessionAttr(HttpServletRequest request, String key) {
|
|
||||||
HttpSession session = request.getSession();
|
|
||||||
if (session == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Object value = session.getAttribute(key);
|
|
||||||
if (value == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return value.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 session 中的 long 属性
|
|
||||||
* @param request 请求
|
|
||||||
* @param key 属性名
|
|
||||||
* @return 属性值
|
|
||||||
*/
|
|
||||||
public static long getLongSessionAttr(HttpServletRequest request, String key) {
|
|
||||||
String value = getSessionAttr(request, key);
|
|
||||||
if (value == null) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return Long.parseLong(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* session 中设置属性
|
|
||||||
* @param request 请求
|
|
||||||
* @param key 属性名
|
|
||||||
*/
|
|
||||||
public static void setSessionAttr(HttpServletRequest request, String key, Object value) {
|
|
||||||
HttpSession session = request.getSession();
|
|
||||||
if (session == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
session.setAttribute(key, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 移除 session 中的属性
|
|
||||||
* @param request 请求
|
|
||||||
* @param key 属性名
|
|
||||||
*/
|
|
||||||
public static void removeSessionAttr(HttpServletRequest request, String key) {
|
|
||||||
HttpSession session = request.getSession();
|
|
||||||
if (session == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
session.removeAttribute(key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package cn.keking.web.controller;
|
||||||
|
|
||||||
import cn.keking.config.ConfigConstants;
|
import cn.keking.config.ConfigConstants;
|
||||||
import cn.keking.model.ReturnResponse;
|
import cn.keking.model.ReturnResponse;
|
||||||
import cn.keking.utils.CaptchaUtil;
|
|
||||||
import cn.keking.utils.DateUtils;
|
|
||||||
import cn.keking.utils.KkFileUtils;
|
import cn.keking.utils.KkFileUtils;
|
||||||
import cn.keking.utils.RarUtils;
|
import cn.keking.utils.RarUtils;
|
||||||
import cn.keking.utils.WebUtils;
|
import cn.keking.utils.WebUtils;
|
||||||
|
|
@ -13,34 +11,21 @@ import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.StreamUtils;
|
import org.springframework.util.StreamUtils;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.servlet.ServletOutputStream;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import static cn.keking.utils.CaptchaUtil.CAPTCHA_CODE;
|
|
||||||
import static cn.keking.utils.CaptchaUtil.CAPTCHA_GENERATE_TIME;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yudian-it
|
* @author yudian-it
|
||||||
* 2017/12/1
|
* 2017/12/1
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class FileController {
|
public class FileController {
|
||||||
|
|
@ -49,7 +34,6 @@ public class FileController {
|
||||||
|
|
||||||
private final String fileDir = ConfigConstants.getFileDir();
|
private final String fileDir = ConfigConstants.getFileDir();
|
||||||
private final String demoDir = "demo";
|
private final String demoDir = "demo";
|
||||||
|
|
||||||
private final String demoPath = demoDir + File.separator;
|
private final String demoPath = demoDir + File.separator;
|
||||||
public static final String BASE64_DECODE_ERROR_MSG = "Base64解码失败,请检查你的 %s 是否采用 Base64 + urlEncode 双重编码了!";
|
public static final String BASE64_DECODE_ERROR_MSG = "Base64解码失败,请检查你的 %s 是否采用 Base64 + urlEncode 双重编码了!";
|
||||||
|
|
||||||
|
|
@ -75,12 +59,16 @@ public class FileController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/deleteFile")
|
@GetMapping("/deleteFile")
|
||||||
public ReturnResponse<Object> deleteFile(HttpServletRequest request, String fileName, String password) {
|
public ReturnResponse<Object> deleteFile(String fileName,String password) {
|
||||||
ReturnResponse<Object> checkResult = this.deleteFileCheck(request, fileName, password);
|
ReturnResponse<Object> checkResult = this.deleteFileCheck(fileName);
|
||||||
if (checkResult.isFailure()) {
|
if (checkResult.isFailure()) {
|
||||||
return checkResult;
|
return checkResult;
|
||||||
}
|
}
|
||||||
fileName = checkResult.getContent().toString();
|
fileName = checkResult.getContent().toString();
|
||||||
|
if(!ConfigConstants.getPassword().equalsIgnoreCase(password)) {
|
||||||
|
logger.error("删除文件【{}】失败,密码错误!",fileName);
|
||||||
|
return ReturnResponse.failure("删除文件失败,密码错误!");
|
||||||
|
}
|
||||||
File file = new File(fileDir + demoPath + fileName);
|
File file = new File(fileDir + demoPath + fileName);
|
||||||
logger.info("删除文件:{}", file.getAbsolutePath());
|
logger.info("删除文件:{}", file.getAbsolutePath());
|
||||||
if (file.exists() && !file.delete()) {
|
if (file.exists() && !file.delete()) {
|
||||||
|
|
@ -88,42 +76,9 @@ public class FileController {
|
||||||
logger.error(msg);
|
logger.error(msg);
|
||||||
return ReturnResponse.failure(msg);
|
return ReturnResponse.failure(msg);
|
||||||
}
|
}
|
||||||
WebUtils.removeSessionAttr(request, CAPTCHA_CODE); //删除缓存验证码
|
|
||||||
return ReturnResponse.success();
|
return ReturnResponse.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码方法
|
|
||||||
*/
|
|
||||||
@RequestMapping("/deleteFile/captcha")
|
|
||||||
public void captcha(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
||||||
if (!ConfigConstants.getDeleteCaptcha()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
response.setContentType("image/jpeg");
|
|
||||||
response.setHeader("Pragma", "no-cache");
|
|
||||||
response.setHeader("Cache-Control", "no-cache");
|
|
||||||
response.setDateHeader("Expires", -1);
|
|
||||||
String captchaCode = WebUtils.getSessionAttr(request, CAPTCHA_CODE);
|
|
||||||
long captchaGenerateTime = WebUtils.getLongSessionAttr(request, CAPTCHA_GENERATE_TIME);
|
|
||||||
long timeDifference = DateUtils.calculateCurrentTimeDifference(captchaGenerateTime);
|
|
||||||
|
|
||||||
// 验证码为空,且生成验证码超过50秒,重新生成验证码
|
|
||||||
if (timeDifference > 50 && ObjectUtils.isEmpty(captchaCode)) {
|
|
||||||
captchaCode = CaptchaUtil.generateCaptchaCode();
|
|
||||||
// 更新验证码
|
|
||||||
WebUtils.setSessionAttr(request, CAPTCHA_CODE, captchaCode);
|
|
||||||
WebUtils.setSessionAttr(request, CAPTCHA_GENERATE_TIME, DateUtils.getCurrentSecond());
|
|
||||||
} else {
|
|
||||||
captchaCode = ObjectUtils.isEmpty(captchaCode) ? "wait" : captchaCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
ServletOutputStream outputStream = response.getOutputStream();
|
|
||||||
ImageIO.write(CaptchaUtil.generateCaptchaPic(captchaCode), "jpeg", outputStream);
|
|
||||||
outputStream.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/listFiles")
|
@GetMapping("/listFiles")
|
||||||
public List<Map<String, String>> getFiles() {
|
public List<Map<String, String>> getFiles() {
|
||||||
List<Map<String, String>> list = new ArrayList<>();
|
List<Map<String, String>> list = new ArrayList<>();
|
||||||
|
|
@ -151,7 +106,7 @@ public class FileController {
|
||||||
return ReturnResponse.failure("文件传接口已禁用");
|
return ReturnResponse.failure("文件传接口已禁用");
|
||||||
}
|
}
|
||||||
String fileName = WebUtils.getFileNameFromMultipartFile(file);
|
String fileName = WebUtils.getFileNameFromMultipartFile(file);
|
||||||
if (fileName.lastIndexOf(".") == -1) {
|
if(fileName.lastIndexOf(".")==-1){
|
||||||
return ReturnResponse.failure("不允许上传的类型");
|
return ReturnResponse.failure("不允许上传的类型");
|
||||||
}
|
}
|
||||||
if (!KkFileUtils.isAllowedUpload(fileName)) {
|
if (!KkFileUtils.isAllowedUpload(fileName)) {
|
||||||
|
|
@ -174,7 +129,7 @@ public class FileController {
|
||||||
* @param fileName 文件名
|
* @param fileName 文件名
|
||||||
* @return 校验结果
|
* @return 校验结果
|
||||||
*/
|
*/
|
||||||
private ReturnResponse<Object> deleteFileCheck(HttpServletRequest request, String fileName, String password) {
|
private ReturnResponse<Object> deleteFileCheck(String fileName) {
|
||||||
if (ObjectUtils.isEmpty(fileName)) {
|
if (ObjectUtils.isEmpty(fileName)) {
|
||||||
return ReturnResponse.failure("文件名为空,删除失败!");
|
return ReturnResponse.failure("文件名为空,删除失败!");
|
||||||
}
|
}
|
||||||
|
|
@ -191,16 +146,6 @@ public class FileController {
|
||||||
if (KkFileUtils.isIllegalFileName(fileName)) {
|
if (KkFileUtils.isIllegalFileName(fileName)) {
|
||||||
return ReturnResponse.failure("非法文件名,删除失败!");
|
return ReturnResponse.failure("非法文件名,删除失败!");
|
||||||
}
|
}
|
||||||
if (ObjectUtils.isEmpty(password)) {
|
|
||||||
return ReturnResponse.failure("密码 or 验证码为空,删除失败!");
|
|
||||||
}
|
|
||||||
|
|
||||||
String expectedPassword = ConfigConstants.getDeleteCaptcha() ? WebUtils.getSessionAttr(request, CAPTCHA_CODE) : ConfigConstants.getPassword();
|
|
||||||
|
|
||||||
if (!password.equalsIgnoreCase(expectedPassword)) {
|
|
||||||
logger.error("删除文件【{}】失败,密码错误!", fileName);
|
|
||||||
return ReturnResponse.failure("删除文件失败,密码错误!");
|
|
||||||
}
|
|
||||||
return ReturnResponse.success(fileName);
|
return ReturnResponse.success(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLDecoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -56,7 +53,6 @@ public class OnlinePreviewController {
|
||||||
|
|
||||||
@GetMapping( "/onlinePreview")
|
@GetMapping( "/onlinePreview")
|
||||||
public String onlinePreview(String url, Model model, HttpServletRequest req) {
|
public String onlinePreview(String url, Model model, HttpServletRequest req) {
|
||||||
|
|
||||||
String fileUrl;
|
String fileUrl;
|
||||||
try {
|
try {
|
||||||
fileUrl = WebUtils.decodeUrl(url);
|
fileUrl = WebUtils.decodeUrl(url);
|
||||||
|
|
@ -115,7 +111,6 @@ public class OnlinePreviewController {
|
||||||
}
|
}
|
||||||
HttpURLConnection urlcon = null;
|
HttpURLConnection urlcon = null;
|
||||||
InputStream inputStream = null;
|
InputStream inputStream = null;
|
||||||
String urlStr;
|
|
||||||
assert urlPath != null;
|
assert urlPath != null;
|
||||||
if (!urlPath.toLowerCase().startsWith("http") && !urlPath.toLowerCase().startsWith("https") && !urlPath.toLowerCase().startsWith("ftp")) {
|
if (!urlPath.toLowerCase().startsWith("http") && !urlPath.toLowerCase().startsWith("https") && !urlPath.toLowerCase().startsWith("ftp")) {
|
||||||
logger.info("读取跨域文件异常,可能存在非法访问,urlPath:{}", urlPath);
|
logger.info("读取跨域文件异常,可能存在非法访问,urlPath:{}", urlPath);
|
||||||
|
|
@ -130,43 +125,19 @@ public class OnlinePreviewController {
|
||||||
urlcon.setReadTimeout(30000);
|
urlcon.setReadTimeout(30000);
|
||||||
urlcon.setInstanceFollowRedirects(false);
|
urlcon.setInstanceFollowRedirects(false);
|
||||||
int responseCode = urlcon.getResponseCode();
|
int responseCode = urlcon.getResponseCode();
|
||||||
if ( responseCode == 403 || responseCode == 500) { //403 500
|
|
||||||
logger.error("读取跨域文件异常,url:{},错误:{}", urlPath,responseCode);
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
if (responseCode == HttpURLConnection.HTTP_MOVED_PERM || responseCode == HttpURLConnection.HTTP_MOVED_TEMP) { //301 302
|
if (responseCode == HttpURLConnection.HTTP_MOVED_PERM || responseCode == HttpURLConnection.HTTP_MOVED_TEMP) { //301 302
|
||||||
url =new URL(urlcon.getHeaderField("Location"));
|
url =new URL(urlcon.getHeaderField("Location"));
|
||||||
urlcon=(HttpURLConnection)url.openConnection();
|
urlcon=(HttpURLConnection)url.openConnection();
|
||||||
} if (responseCode == 404 ) { //404
|
|
||||||
try {
|
|
||||||
urlStr = URLDecoder.decode(urlPath, StandardCharsets.UTF_8.name());
|
|
||||||
urlStr = URLDecoder.decode(urlStr, StandardCharsets.UTF_8.name());
|
|
||||||
url = WebUtils.normalizedURL(urlStr);
|
|
||||||
urlcon=(HttpURLConnection)url.openConnection();
|
|
||||||
urlcon.setConnectTimeout(30000);
|
|
||||||
urlcon.setReadTimeout(30000);
|
|
||||||
urlcon.setInstanceFollowRedirects(false);
|
|
||||||
responseCode = urlcon.getResponseCode();
|
|
||||||
if (responseCode == HttpURLConnection.HTTP_MOVED_PERM || responseCode == HttpURLConnection.HTTP_MOVED_TEMP) { //301 302
|
|
||||||
url =new URL(urlcon.getHeaderField("Location"));
|
|
||||||
}
|
|
||||||
if(responseCode == 404 ||responseCode == 403 || responseCode == 500 ){
|
|
||||||
logger.error("读取跨域文件异常,url:{},错误:{}", urlPath,responseCode);
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}finally {
|
|
||||||
assert urlcon != null;
|
|
||||||
urlcon.disconnect();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (responseCode == HttpURLConnection.HTTP_NOT_FOUND ||responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR ) { //403 404 500
|
||||||
|
logger.error("读取跨域文件异常,url:{},错误:{}", urlPath,responseCode);
|
||||||
|
} else {
|
||||||
if(urlPath.contains( ".svg")) {
|
if(urlPath.contains( ".svg")) {
|
||||||
response.setContentType("image/svg+xml");
|
response.setContentType("image/svg+xml");
|
||||||
}
|
}
|
||||||
inputStream=(url).openStream();
|
inputStream=(url).openStream();
|
||||||
IOUtils.copy(inputStream, response.getOutputStream());
|
IOUtils.copy(inputStream, response.getOutputStream());
|
||||||
|
}
|
||||||
} catch (IOException | GalimatiasParseException e) {
|
} catch (IOException | GalimatiasParseException e) {
|
||||||
logger.error("读取跨域文件异常,url:{}", urlPath);
|
logger.error("读取跨域文件异常,url:{}", urlPath);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -37,17 +37,11 @@ public class AttributeSetFilter implements Filter {
|
||||||
request.setAttribute("pdfPrintDisable", ConfigConstants.getPdfPrintDisable());
|
request.setAttribute("pdfPrintDisable", ConfigConstants.getPdfPrintDisable());
|
||||||
request.setAttribute("pdfDownloadDisable", ConfigConstants.getPdfDownloadDisable());
|
request.setAttribute("pdfDownloadDisable", ConfigConstants.getPdfDownloadDisable());
|
||||||
request.setAttribute("pdfBookmarkDisable", ConfigConstants.getPdfBookmarkDisable());
|
request.setAttribute("pdfBookmarkDisable", ConfigConstants.getPdfBookmarkDisable());
|
||||||
request.setAttribute("pdfDisableEditing", ConfigConstants.getPdfDisableEditing());
|
|
||||||
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
|
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
|
||||||
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
||||||
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
|
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
|
||||||
request.setAttribute("beian", ConfigConstants.getBeian());
|
request.setAttribute("beian", ConfigConstants.getBeian());
|
||||||
request.setAttribute("size", ConfigConstants.maxSize());
|
request.setAttribute("size", ConfigConstants.maxSize());
|
||||||
request.setAttribute("deleteCaptcha", ConfigConstants.getDeleteCaptcha());
|
|
||||||
request.setAttribute("homePpageNumber", ConfigConstants.gethomePpageNumber());
|
|
||||||
request.setAttribute("homePagination", ConfigConstants.gethomePagination());
|
|
||||||
request.setAttribute("homePageSize", ConfigConstants.gethomePageSize());
|
|
||||||
request.setAttribute("homeSearch", ConfigConstants.gethomeSearch());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
5420
server/src/main/resources/static/bootstrap-table/bootstrap-table-locale-all.js
vendored
Normal file
5420
server/src/main/resources/static/bootstrap-table/bootstrap-table-locale-all.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
server/src/main/resources/static/bootstrap-table/bootstrap-table-locale-all.min.js
vendored
Normal file
10
server/src/main/resources/static/bootstrap-table/bootstrap-table-locale-all.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2279
server/src/main/resources/static/bootstrap-table/bootstrap-table-vue.esm.js
vendored
Normal file
2279
server/src/main/resources/static/bootstrap-table/bootstrap-table-vue.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
server/src/main/resources/static/bootstrap-table/bootstrap-table-vue.esm.min.js
vendored
Normal file
10
server/src/main/resources/static/bootstrap-table/bootstrap-table-vue.esm.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,352 @@
|
||||||
|
/**
|
||||||
|
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||||
|
* version: 1.16.0
|
||||||
|
* https://github.com/wenzhixin/bootstrap-table/
|
||||||
|
*/
|
||||||
|
.bootstrap-table .fixed-table-toolbar::after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .bs-bars,
|
||||||
|
.bootstrap-table .fixed-table-toolbar .search,
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: -1px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group > .btn {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:first-child > .btn {
|
||||||
|
border-top-left-radius: 4px;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:last-child > .btn {
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns .dropdown-menu {
|
||||||
|
text-align: left;
|
||||||
|
max-height: 300px;
|
||||||
|
overflow: auto;
|
||||||
|
-ms-overflow-style: scrollbar;
|
||||||
|
z-index: 1001;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns label {
|
||||||
|
display: block;
|
||||||
|
padding: 3px 20px;
|
||||||
|
clear: both;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.428571429;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns-left {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .columns-right {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu {
|
||||||
|
right: 0;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container {
|
||||||
|
position: relative;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table th,
|
||||||
|
.bootstrap-table .fixed-table-container .table td {
|
||||||
|
vertical-align: middle;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th {
|
||||||
|
vertical-align: bottom;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th:focus {
|
||||||
|
outline: 0 solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th.detail {
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .th-inner {
|
||||||
|
padding: 0.75rem;
|
||||||
|
vertical-align: bottom;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .sortable {
|
||||||
|
cursor: pointer;
|
||||||
|
background-position: right;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding-right: 30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .both {
|
||||||
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC");
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .asc {
|
||||||
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==");
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table thead th .desc {
|
||||||
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ");
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table tbody tr.selected td {
|
||||||
|
background-color: rgba(0, 0, 0, 0.075);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table tbody tr.no-records-found td {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table tbody tr .card-view {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title {
|
||||||
|
font-weight: bold;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 30%;
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table .bs-checkbox {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table .bs-checkbox label {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="radio"],
|
||||||
|
.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="checkbox"] {
|
||||||
|
margin: 0 auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .table.table-sm .th-inner {
|
||||||
|
padding: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height:not(.has-footer) {
|
||||||
|
border-bottom: 1px solid #dee2e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height.has-card-view {
|
||||||
|
border-top: 1px solid #dee2e6;
|
||||||
|
border-bottom: 1px solid #dee2e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height .fixed-table-border {
|
||||||
|
border-left: 1px solid #dee2e6;
|
||||||
|
border-right: 1px solid #dee2e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height .table thead th {
|
||||||
|
border-bottom: 1px solid #dee2e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container.fixed-height .table-dark thead th {
|
||||||
|
border-bottom: 1px solid #32383e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-header {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
|
||||||
|
align-items: center;
|
||||||
|
background: #fff;
|
||||||
|
display: none;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap {
|
||||||
|
align-items: baseline;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text {
|
||||||
|
font-size: 2rem;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot,
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after,
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::before {
|
||||||
|
content: "";
|
||||||
|
animation-duration: 1.5s;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-name: LOADING;
|
||||||
|
background: #212529;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: block;
|
||||||
|
height: 5px;
|
||||||
|
margin: 0 4px;
|
||||||
|
opacity: 0;
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot {
|
||||||
|
animation-delay: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after {
|
||||||
|
animation-delay: 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark {
|
||||||
|
background: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot,
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::after,
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::before {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-footer {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination::after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail,
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .pagination-info {
|
||||||
|
line-height: 34px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group .dropdown-menu {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination a {
|
||||||
|
padding: 6px 12px;
|
||||||
|
line-height: 1.428571429;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a {
|
||||||
|
color: #c8c8c8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::before {
|
||||||
|
content: '\2B05';
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::after {
|
||||||
|
content: '\27A1';
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.disabled a {
|
||||||
|
pointer-events: none;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table.fullscreen {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1050;
|
||||||
|
width: 100% !important;
|
||||||
|
background: #fff;
|
||||||
|
height: calc(100vh);
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* calculate scrollbar width */
|
||||||
|
div.fixed-table-scroll-inner {
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.fixed-table-scroll-outer {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
width: 200px;
|
||||||
|
height: 150px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes LOADING {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1631
server/src/main/resources/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js
vendored
Normal file
1631
server/src/main/resources/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1092
server/src/main/resources/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js
vendored
Normal file
1092
server/src/main/resources/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,12 @@
|
||||||
|
.table-cell-input {
|
||||||
|
display: block !important;
|
||||||
|
padding: 5px !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
border: 0 !important;
|
||||||
|
width: 100% !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
-moz-box-sizing: border-box !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
2248
server/src/main/resources/static/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js
vendored
Normal file
2248
server/src/main/resources/static/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.table-cell-input{display:block!important;padding:5px!important;margin:0!important;border:0!important;width:100%!important;box-sizing:border-box!important;-moz-box-sizing:border-box!important;border-radius:0!important;line-height:1!important;white-space:nowrap}
|
||||||
File diff suppressed because one or more lines are too long
2226
server/src/main/resources/static/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js
vendored
Normal file
2226
server/src/main/resources/static/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
server/src/main/resources/static/bootstrap-table/extensions/cookie/bootstrap-table-cookie.min.js
vendored
Normal file
10
server/src/main/resources/static/bootstrap-table/extensions/cookie/bootstrap-table-cookie.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1114
server/src/main/resources/static/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js
vendored
Normal file
1114
server/src/main/resources/static/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
820
server/src/main/resources/static/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js
vendored
Normal file
820
server/src/main/resources/static/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js
vendored
Normal file
|
|
@ -0,0 +1,820 @@
|
||||||
|
(function (global, factory) {
|
||||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
||||||
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||||
|
(global = global || self, factory(global.jQuery));
|
||||||
|
}(this, (function ($) { 'use strict';
|
||||||
|
|
||||||
|
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||||
|
|
||||||
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||||
|
|
||||||
|
function createCommonjsModule(fn, module) {
|
||||||
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||||
|
}
|
||||||
|
|
||||||
|
var check = function (it) {
|
||||||
|
return it && it.Math == Math && it;
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||||
|
var global_1 =
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
check(typeof globalThis == 'object' && globalThis) ||
|
||||||
|
check(typeof window == 'object' && window) ||
|
||||||
|
check(typeof self == 'object' && self) ||
|
||||||
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
||||||
|
// eslint-disable-next-line no-new-func
|
||||||
|
Function('return this')();
|
||||||
|
|
||||||
|
var fails = function (exec) {
|
||||||
|
try {
|
||||||
|
return !!exec();
|
||||||
|
} catch (error) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Thank's IE8 for his funny defineProperty
|
||||||
|
var descriptors = !fails(function () {
|
||||||
|
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
||||||
|
});
|
||||||
|
|
||||||
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
||||||
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||||
|
|
||||||
|
// Nashorn ~ JDK8 bug
|
||||||
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
||||||
|
|
||||||
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
||||||
|
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
||||||
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
||||||
|
return !!descriptor && descriptor.enumerable;
|
||||||
|
} : nativePropertyIsEnumerable;
|
||||||
|
|
||||||
|
var objectPropertyIsEnumerable = {
|
||||||
|
f: f
|
||||||
|
};
|
||||||
|
|
||||||
|
var createPropertyDescriptor = function (bitmap, value) {
|
||||||
|
return {
|
||||||
|
enumerable: !(bitmap & 1),
|
||||||
|
configurable: !(bitmap & 2),
|
||||||
|
writable: !(bitmap & 4),
|
||||||
|
value: value
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var toString = {}.toString;
|
||||||
|
|
||||||
|
var classofRaw = function (it) {
|
||||||
|
return toString.call(it).slice(8, -1);
|
||||||
|
};
|
||||||
|
|
||||||
|
var split = ''.split;
|
||||||
|
|
||||||
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||||
|
var indexedObject = fails(function () {
|
||||||
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
||||||
|
// eslint-disable-next-line no-prototype-builtins
|
||||||
|
return !Object('z').propertyIsEnumerable(0);
|
||||||
|
}) ? function (it) {
|
||||||
|
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
||||||
|
} : Object;
|
||||||
|
|
||||||
|
// `RequireObjectCoercible` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
||||||
|
var requireObjectCoercible = function (it) {
|
||||||
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||||
|
return it;
|
||||||
|
};
|
||||||
|
|
||||||
|
// toObject with fallback for non-array-like ES3 strings
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var toIndexedObject = function (it) {
|
||||||
|
return indexedObject(requireObjectCoercible(it));
|
||||||
|
};
|
||||||
|
|
||||||
|
var isObject = function (it) {
|
||||||
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||||
|
};
|
||||||
|
|
||||||
|
// `ToPrimitive` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
||||||
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||||
|
// and the second argument - flag - preferred type is a string
|
||||||
|
var toPrimitive = function (input, PREFERRED_STRING) {
|
||||||
|
if (!isObject(input)) return input;
|
||||||
|
var fn, val;
|
||||||
|
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
throw TypeError("Can't convert object to primitive value");
|
||||||
|
};
|
||||||
|
|
||||||
|
var hasOwnProperty = {}.hasOwnProperty;
|
||||||
|
|
||||||
|
var has = function (it, key) {
|
||||||
|
return hasOwnProperty.call(it, key);
|
||||||
|
};
|
||||||
|
|
||||||
|
var document = global_1.document;
|
||||||
|
// typeof document.createElement is 'object' in old IE
|
||||||
|
var EXISTS = isObject(document) && isObject(document.createElement);
|
||||||
|
|
||||||
|
var documentCreateElement = function (it) {
|
||||||
|
return EXISTS ? document.createElement(it) : {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Thank's IE8 for his funny defineProperty
|
||||||
|
var ie8DomDefine = !descriptors && !fails(function () {
|
||||||
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
||||||
|
get: function () { return 7; }
|
||||||
|
}).a != 7;
|
||||||
|
});
|
||||||
|
|
||||||
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||||
|
|
||||||
|
// `Object.getOwnPropertyDescriptor` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
||||||
|
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
||||||
|
O = toIndexedObject(O);
|
||||||
|
P = toPrimitive(P, true);
|
||||||
|
if (ie8DomDefine) try {
|
||||||
|
return nativeGetOwnPropertyDescriptor(O, P);
|
||||||
|
} catch (error) { /* empty */ }
|
||||||
|
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectGetOwnPropertyDescriptor = {
|
||||||
|
f: f$1
|
||||||
|
};
|
||||||
|
|
||||||
|
var anObject = function (it) {
|
||||||
|
if (!isObject(it)) {
|
||||||
|
throw TypeError(String(it) + ' is not an object');
|
||||||
|
} return it;
|
||||||
|
};
|
||||||
|
|
||||||
|
var nativeDefineProperty = Object.defineProperty;
|
||||||
|
|
||||||
|
// `Object.defineProperty` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
||||||
|
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
||||||
|
anObject(O);
|
||||||
|
P = toPrimitive(P, true);
|
||||||
|
anObject(Attributes);
|
||||||
|
if (ie8DomDefine) try {
|
||||||
|
return nativeDefineProperty(O, P, Attributes);
|
||||||
|
} catch (error) { /* empty */ }
|
||||||
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
||||||
|
if ('value' in Attributes) O[P] = Attributes.value;
|
||||||
|
return O;
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectDefineProperty = {
|
||||||
|
f: f$2
|
||||||
|
};
|
||||||
|
|
||||||
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
||||||
|
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
||||||
|
} : function (object, key, value) {
|
||||||
|
object[key] = value;
|
||||||
|
return object;
|
||||||
|
};
|
||||||
|
|
||||||
|
var setGlobal = function (key, value) {
|
||||||
|
try {
|
||||||
|
createNonEnumerableProperty(global_1, key, value);
|
||||||
|
} catch (error) {
|
||||||
|
global_1[key] = value;
|
||||||
|
} return value;
|
||||||
|
};
|
||||||
|
|
||||||
|
var SHARED = '__core-js_shared__';
|
||||||
|
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
||||||
|
|
||||||
|
var sharedStore = store;
|
||||||
|
|
||||||
|
var functionToString = Function.toString;
|
||||||
|
|
||||||
|
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
||||||
|
if (typeof sharedStore.inspectSource != 'function') {
|
||||||
|
sharedStore.inspectSource = function (it) {
|
||||||
|
return functionToString.call(it);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var inspectSource = sharedStore.inspectSource;
|
||||||
|
|
||||||
|
var WeakMap = global_1.WeakMap;
|
||||||
|
|
||||||
|
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
||||||
|
|
||||||
|
var shared = createCommonjsModule(function (module) {
|
||||||
|
(module.exports = function (key, value) {
|
||||||
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
||||||
|
})('versions', []).push({
|
||||||
|
version: '3.6.0',
|
||||||
|
mode: 'global',
|
||||||
|
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var id = 0;
|
||||||
|
var postfix = Math.random();
|
||||||
|
|
||||||
|
var uid = function (key) {
|
||||||
|
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
||||||
|
};
|
||||||
|
|
||||||
|
var keys = shared('keys');
|
||||||
|
|
||||||
|
var sharedKey = function (key) {
|
||||||
|
return keys[key] || (keys[key] = uid(key));
|
||||||
|
};
|
||||||
|
|
||||||
|
var hiddenKeys = {};
|
||||||
|
|
||||||
|
var WeakMap$1 = global_1.WeakMap;
|
||||||
|
var set, get, has$1;
|
||||||
|
|
||||||
|
var enforce = function (it) {
|
||||||
|
return has$1(it) ? get(it) : set(it, {});
|
||||||
|
};
|
||||||
|
|
||||||
|
var getterFor = function (TYPE) {
|
||||||
|
return function (it) {
|
||||||
|
var state;
|
||||||
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
||||||
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
||||||
|
} return state;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (nativeWeakMap) {
|
||||||
|
var store$1 = new WeakMap$1();
|
||||||
|
var wmget = store$1.get;
|
||||||
|
var wmhas = store$1.has;
|
||||||
|
var wmset = store$1.set;
|
||||||
|
set = function (it, metadata) {
|
||||||
|
wmset.call(store$1, it, metadata);
|
||||||
|
return metadata;
|
||||||
|
};
|
||||||
|
get = function (it) {
|
||||||
|
return wmget.call(store$1, it) || {};
|
||||||
|
};
|
||||||
|
has$1 = function (it) {
|
||||||
|
return wmhas.call(store$1, it);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
var STATE = sharedKey('state');
|
||||||
|
hiddenKeys[STATE] = true;
|
||||||
|
set = function (it, metadata) {
|
||||||
|
createNonEnumerableProperty(it, STATE, metadata);
|
||||||
|
return metadata;
|
||||||
|
};
|
||||||
|
get = function (it) {
|
||||||
|
return has(it, STATE) ? it[STATE] : {};
|
||||||
|
};
|
||||||
|
has$1 = function (it) {
|
||||||
|
return has(it, STATE);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var internalState = {
|
||||||
|
set: set,
|
||||||
|
get: get,
|
||||||
|
has: has$1,
|
||||||
|
enforce: enforce,
|
||||||
|
getterFor: getterFor
|
||||||
|
};
|
||||||
|
|
||||||
|
var redefine = createCommonjsModule(function (module) {
|
||||||
|
var getInternalState = internalState.get;
|
||||||
|
var enforceInternalState = internalState.enforce;
|
||||||
|
var TEMPLATE = String(String).split('String');
|
||||||
|
|
||||||
|
(module.exports = function (O, key, value, options) {
|
||||||
|
var unsafe = options ? !!options.unsafe : false;
|
||||||
|
var simple = options ? !!options.enumerable : false;
|
||||||
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
||||||
|
if (typeof value == 'function') {
|
||||||
|
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
||||||
|
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
||||||
|
}
|
||||||
|
if (O === global_1) {
|
||||||
|
if (simple) O[key] = value;
|
||||||
|
else setGlobal(key, value);
|
||||||
|
return;
|
||||||
|
} else if (!unsafe) {
|
||||||
|
delete O[key];
|
||||||
|
} else if (!noTargetGet && O[key]) {
|
||||||
|
simple = true;
|
||||||
|
}
|
||||||
|
if (simple) O[key] = value;
|
||||||
|
else createNonEnumerableProperty(O, key, value);
|
||||||
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
||||||
|
})(Function.prototype, 'toString', function toString() {
|
||||||
|
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var path = global_1;
|
||||||
|
|
||||||
|
var aFunction = function (variable) {
|
||||||
|
return typeof variable == 'function' ? variable : undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
var getBuiltIn = function (namespace, method) {
|
||||||
|
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
||||||
|
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
||||||
|
};
|
||||||
|
|
||||||
|
var ceil = Math.ceil;
|
||||||
|
var floor = Math.floor;
|
||||||
|
|
||||||
|
// `ToInteger` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
||||||
|
var toInteger = function (argument) {
|
||||||
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
||||||
|
};
|
||||||
|
|
||||||
|
var min = Math.min;
|
||||||
|
|
||||||
|
// `ToLength` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-tolength
|
||||||
|
var toLength = function (argument) {
|
||||||
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
||||||
|
};
|
||||||
|
|
||||||
|
var max = Math.max;
|
||||||
|
var min$1 = Math.min;
|
||||||
|
|
||||||
|
// Helper for a popular repeating case of the spec:
|
||||||
|
// Let integer be ? ToInteger(index).
|
||||||
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
||||||
|
var toAbsoluteIndex = function (index, length) {
|
||||||
|
var integer = toInteger(index);
|
||||||
|
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
||||||
|
};
|
||||||
|
|
||||||
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
||||||
|
var createMethod = function (IS_INCLUDES) {
|
||||||
|
return function ($this, el, fromIndex) {
|
||||||
|
var O = toIndexedObject($this);
|
||||||
|
var length = toLength(O.length);
|
||||||
|
var index = toAbsoluteIndex(fromIndex, length);
|
||||||
|
var value;
|
||||||
|
// Array#includes uses SameValueZero equality algorithm
|
||||||
|
// eslint-disable-next-line no-self-compare
|
||||||
|
if (IS_INCLUDES && el != el) while (length > index) {
|
||||||
|
value = O[index++];
|
||||||
|
// eslint-disable-next-line no-self-compare
|
||||||
|
if (value != value) return true;
|
||||||
|
// Array#indexOf ignores holes, Array#includes - not
|
||||||
|
} else for (;length > index; index++) {
|
||||||
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
||||||
|
} return !IS_INCLUDES && -1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var arrayIncludes = {
|
||||||
|
// `Array.prototype.includes` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
||||||
|
includes: createMethod(true),
|
||||||
|
// `Array.prototype.indexOf` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
||||||
|
indexOf: createMethod(false)
|
||||||
|
};
|
||||||
|
|
||||||
|
var indexOf = arrayIncludes.indexOf;
|
||||||
|
|
||||||
|
|
||||||
|
var objectKeysInternal = function (object, names) {
|
||||||
|
var O = toIndexedObject(object);
|
||||||
|
var i = 0;
|
||||||
|
var result = [];
|
||||||
|
var key;
|
||||||
|
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
||||||
|
// Don't enum bug & hidden keys
|
||||||
|
while (names.length > i) if (has(O, key = names[i++])) {
|
||||||
|
~indexOf(result, key) || result.push(key);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
// IE8- don't enum bug keys
|
||||||
|
var enumBugKeys = [
|
||||||
|
'constructor',
|
||||||
|
'hasOwnProperty',
|
||||||
|
'isPrototypeOf',
|
||||||
|
'propertyIsEnumerable',
|
||||||
|
'toLocaleString',
|
||||||
|
'toString',
|
||||||
|
'valueOf'
|
||||||
|
];
|
||||||
|
|
||||||
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
||||||
|
|
||||||
|
// `Object.getOwnPropertyNames` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
||||||
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
||||||
|
return objectKeysInternal(O, hiddenKeys$1);
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectGetOwnPropertyNames = {
|
||||||
|
f: f$3
|
||||||
|
};
|
||||||
|
|
||||||
|
var f$4 = Object.getOwnPropertySymbols;
|
||||||
|
|
||||||
|
var objectGetOwnPropertySymbols = {
|
||||||
|
f: f$4
|
||||||
|
};
|
||||||
|
|
||||||
|
// all object keys, includes non-enumerable and symbols
|
||||||
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
||||||
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
||||||
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
||||||
|
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
||||||
|
};
|
||||||
|
|
||||||
|
var copyConstructorProperties = function (target, source) {
|
||||||
|
var keys = ownKeys(source);
|
||||||
|
var defineProperty = objectDefineProperty.f;
|
||||||
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
||||||
|
for (var i = 0; i < keys.length; i++) {
|
||||||
|
var key = keys[i];
|
||||||
|
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var replacement = /#|\.prototype\./;
|
||||||
|
|
||||||
|
var isForced = function (feature, detection) {
|
||||||
|
var value = data[normalize(feature)];
|
||||||
|
return value == POLYFILL ? true
|
||||||
|
: value == NATIVE ? false
|
||||||
|
: typeof detection == 'function' ? fails(detection)
|
||||||
|
: !!detection;
|
||||||
|
};
|
||||||
|
|
||||||
|
var normalize = isForced.normalize = function (string) {
|
||||||
|
return String(string).replace(replacement, '.').toLowerCase();
|
||||||
|
};
|
||||||
|
|
||||||
|
var data = isForced.data = {};
|
||||||
|
var NATIVE = isForced.NATIVE = 'N';
|
||||||
|
var POLYFILL = isForced.POLYFILL = 'P';
|
||||||
|
|
||||||
|
var isForced_1 = isForced;
|
||||||
|
|
||||||
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
options.target - name of the target object
|
||||||
|
options.global - target is the global object
|
||||||
|
options.stat - export as static methods of target
|
||||||
|
options.proto - export as prototype methods of target
|
||||||
|
options.real - real prototype method for the `pure` version
|
||||||
|
options.forced - export even if the native feature is available
|
||||||
|
options.bind - bind methods to the target, required for the `pure` version
|
||||||
|
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
||||||
|
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
||||||
|
options.sham - add a flag to not completely full polyfills
|
||||||
|
options.enumerable - export as enumerable property
|
||||||
|
options.noTargetGet - prevent calling a getter on target
|
||||||
|
*/
|
||||||
|
var _export = function (options, source) {
|
||||||
|
var TARGET = options.target;
|
||||||
|
var GLOBAL = options.global;
|
||||||
|
var STATIC = options.stat;
|
||||||
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
||||||
|
if (GLOBAL) {
|
||||||
|
target = global_1;
|
||||||
|
} else if (STATIC) {
|
||||||
|
target = global_1[TARGET] || setGlobal(TARGET, {});
|
||||||
|
} else {
|
||||||
|
target = (global_1[TARGET] || {}).prototype;
|
||||||
|
}
|
||||||
|
if (target) for (key in source) {
|
||||||
|
sourceProperty = source[key];
|
||||||
|
if (options.noTargetGet) {
|
||||||
|
descriptor = getOwnPropertyDescriptor$1(target, key);
|
||||||
|
targetProperty = descriptor && descriptor.value;
|
||||||
|
} else targetProperty = target[key];
|
||||||
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
||||||
|
// contained in target
|
||||||
|
if (!FORCED && targetProperty !== undefined) {
|
||||||
|
if (typeof sourceProperty === typeof targetProperty) continue;
|
||||||
|
copyConstructorProperties(sourceProperty, targetProperty);
|
||||||
|
}
|
||||||
|
// add a flag to not completely full polyfills
|
||||||
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
||||||
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
||||||
|
}
|
||||||
|
// extend global
|
||||||
|
redefine(target, key, sourceProperty, options);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// `IsArray` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-isarray
|
||||||
|
var isArray = Array.isArray || function isArray(arg) {
|
||||||
|
return classofRaw(arg) == 'Array';
|
||||||
|
};
|
||||||
|
|
||||||
|
// `ToObject` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-toobject
|
||||||
|
var toObject = function (argument) {
|
||||||
|
return Object(requireObjectCoercible(argument));
|
||||||
|
};
|
||||||
|
|
||||||
|
var createProperty = function (object, key, value) {
|
||||||
|
var propertyKey = toPrimitive(key);
|
||||||
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
||||||
|
else object[propertyKey] = value;
|
||||||
|
};
|
||||||
|
|
||||||
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
||||||
|
// Chrome 38 Symbol has incorrect toString conversion
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
return !String(Symbol());
|
||||||
|
});
|
||||||
|
|
||||||
|
var useSymbolAsUid = nativeSymbol
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
&& !Symbol.sham
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
&& typeof Symbol() == 'symbol';
|
||||||
|
|
||||||
|
var WellKnownSymbolsStore = shared('wks');
|
||||||
|
var Symbol$1 = global_1.Symbol;
|
||||||
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
||||||
|
|
||||||
|
var wellKnownSymbol = function (name) {
|
||||||
|
if (!has(WellKnownSymbolsStore, name)) {
|
||||||
|
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
|
||||||
|
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
||||||
|
} return WellKnownSymbolsStore[name];
|
||||||
|
};
|
||||||
|
|
||||||
|
var SPECIES = wellKnownSymbol('species');
|
||||||
|
|
||||||
|
// `ArraySpeciesCreate` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
||||||
|
var arraySpeciesCreate = function (originalArray, length) {
|
||||||
|
var C;
|
||||||
|
if (isArray(originalArray)) {
|
||||||
|
C = originalArray.constructor;
|
||||||
|
// cross-realm fallback
|
||||||
|
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
||||||
|
else if (isObject(C)) {
|
||||||
|
C = C[SPECIES];
|
||||||
|
if (C === null) C = undefined;
|
||||||
|
}
|
||||||
|
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
||||||
|
};
|
||||||
|
|
||||||
|
var userAgent = getBuiltIn('navigator', 'userAgent') || '';
|
||||||
|
|
||||||
|
var process = global_1.process;
|
||||||
|
var versions = process && process.versions;
|
||||||
|
var v8 = versions && versions.v8;
|
||||||
|
var match, version;
|
||||||
|
|
||||||
|
if (v8) {
|
||||||
|
match = v8.split('.');
|
||||||
|
version = match[0] + match[1];
|
||||||
|
} else if (userAgent) {
|
||||||
|
match = userAgent.match(/Edge\/(\d+)/);
|
||||||
|
if (!match || match[1] >= 74) {
|
||||||
|
match = userAgent.match(/Chrome\/(\d+)/);
|
||||||
|
if (match) version = match[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var v8Version = version && +version;
|
||||||
|
|
||||||
|
var SPECIES$1 = wellKnownSymbol('species');
|
||||||
|
|
||||||
|
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
||||||
|
// We can't use this feature detection in V8 since it causes
|
||||||
|
// deoptimization and serious performance degradation
|
||||||
|
// https://github.com/zloirock/core-js/issues/677
|
||||||
|
return v8Version >= 51 || !fails(function () {
|
||||||
|
var array = [];
|
||||||
|
var constructor = array.constructor = {};
|
||||||
|
constructor[SPECIES$1] = function () {
|
||||||
|
return { foo: 1 };
|
||||||
|
};
|
||||||
|
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
||||||
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
||||||
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
||||||
|
|
||||||
|
// We can't use this feature detection in V8 since it causes
|
||||||
|
// deoptimization and serious performance degradation
|
||||||
|
// https://github.com/zloirock/core-js/issues/679
|
||||||
|
var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
|
||||||
|
var array = [];
|
||||||
|
array[IS_CONCAT_SPREADABLE] = false;
|
||||||
|
return array.concat()[0] !== array;
|
||||||
|
});
|
||||||
|
|
||||||
|
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
||||||
|
|
||||||
|
var isConcatSpreadable = function (O) {
|
||||||
|
if (!isObject(O)) return false;
|
||||||
|
var spreadable = O[IS_CONCAT_SPREADABLE];
|
||||||
|
return spreadable !== undefined ? !!spreadable : isArray(O);
|
||||||
|
};
|
||||||
|
|
||||||
|
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
||||||
|
|
||||||
|
// `Array.prototype.concat` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
||||||
|
// with adding support of @@isConcatSpreadable and @@species
|
||||||
|
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
||||||
|
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
||||||
|
var O = toObject(this);
|
||||||
|
var A = arraySpeciesCreate(O, 0);
|
||||||
|
var n = 0;
|
||||||
|
var i, k, length, len, E;
|
||||||
|
for (i = -1, length = arguments.length; i < length; i++) {
|
||||||
|
E = i === -1 ? O : arguments[i];
|
||||||
|
if (isConcatSpreadable(E)) {
|
||||||
|
len = toLength(E.length);
|
||||||
|
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||||
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
||||||
|
} else {
|
||||||
|
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||||
|
createProperty(A, n++, E);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
A.length = n;
|
||||||
|
return A;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function _classCallCheck(instance, Constructor) {
|
||||||
|
if (!(instance instanceof Constructor)) {
|
||||||
|
throw new TypeError("Cannot call a class as a function");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _defineProperties(target, props) {
|
||||||
|
for (var i = 0; i < props.length; i++) {
|
||||||
|
var descriptor = props[i];
|
||||||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _inherits(subClass, superClass) {
|
||||||
|
if (typeof superClass !== "function" && superClass !== null) {
|
||||||
|
throw new TypeError("Super expression must either be null or a function");
|
||||||
|
}
|
||||||
|
|
||||||
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||||
|
constructor: {
|
||||||
|
value: subClass,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _getPrototypeOf(o) {
|
||||||
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
||||||
|
return o.__proto__ || Object.getPrototypeOf(o);
|
||||||
|
};
|
||||||
|
return _getPrototypeOf(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _setPrototypeOf(o, p) {
|
||||||
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||||
|
o.__proto__ = p;
|
||||||
|
return o;
|
||||||
|
};
|
||||||
|
|
||||||
|
return _setPrototypeOf(o, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _assertThisInitialized(self) {
|
||||||
|
if (self === void 0) {
|
||||||
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _possibleConstructorReturn(self, call) {
|
||||||
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
||||||
|
return call;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _assertThisInitialized(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _superPropBase(object, property) {
|
||||||
|
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
||||||
|
object = _getPrototypeOf(object);
|
||||||
|
if (object === null) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _get(target, property, receiver) {
|
||||||
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
||||||
|
_get = Reflect.get;
|
||||||
|
} else {
|
||||||
|
_get = function _get(target, property, receiver) {
|
||||||
|
var base = _superPropBase(target, property);
|
||||||
|
|
||||||
|
if (!base) return;
|
||||||
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
||||||
|
|
||||||
|
if (desc.get) {
|
||||||
|
return desc.get.call(receiver);
|
||||||
|
}
|
||||||
|
|
||||||
|
return desc.value;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return _get(target, property, receiver || target);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When using server-side processing, the default mode of operation for
|
||||||
|
* bootstrap-table is to simply throw away any data that currently exists in the
|
||||||
|
* table and make a request to the server to get the first page of data to
|
||||||
|
* display. This is fine for an empty table, but if you already have the first
|
||||||
|
* page of data displayed in the plain HTML, it is a waste of resources. As
|
||||||
|
* such, you can use data-defer-url instead of data-url to allow you to instruct
|
||||||
|
* bootstrap-table to not make that initial request, rather it will use the data
|
||||||
|
* already on the page.
|
||||||
|
*
|
||||||
|
* @author: Ruben Suarez
|
||||||
|
* @webSite: http://rubensa.eu.org
|
||||||
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$.extend($.fn.bootstrapTable.defaults, {
|
||||||
|
deferUrl: undefined
|
||||||
|
});
|
||||||
|
|
||||||
|
$.BootstrapTable =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function (_$$BootstrapTable) {
|
||||||
|
_inherits(_class, _$$BootstrapTable);
|
||||||
|
|
||||||
|
function _class() {
|
||||||
|
_classCallCheck(this, _class);
|
||||||
|
|
||||||
|
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
||||||
|
}
|
||||||
|
|
||||||
|
_createClass(_class, [{
|
||||||
|
key: "init",
|
||||||
|
value: function init() {
|
||||||
|
var _get2;
|
||||||
|
|
||||||
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
args[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
(_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
|
||||||
|
|
||||||
|
if (this.options.deferUrl) {
|
||||||
|
this.options.url = this.options.deferUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
|
||||||
|
return _class;
|
||||||
|
}($.BootstrapTable);
|
||||||
|
|
||||||
|
})));
|
||||||
File diff suppressed because one or more lines are too long
1619
server/src/main/resources/static/bootstrap-table/extensions/editable/bootstrap-table-editable.js
vendored
Normal file
1619
server/src/main/resources/static/bootstrap-table/extensions/editable/bootstrap-table-editable.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2668
server/src/main/resources/static/bootstrap-table/extensions/export/bootstrap-table-export.js
vendored
Normal file
2668
server/src/main/resources/static/bootstrap-table/extensions/export/bootstrap-table-export.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
server/src/main/resources/static/bootstrap-table/extensions/export/bootstrap-table-export.min.js
vendored
Normal file
10
server/src/main/resources/static/bootstrap-table/extensions/export/bootstrap-table-export.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,13 @@
|
||||||
|
@charset "UTF-8";
|
||||||
|
/**
|
||||||
|
* @author: Dennis Hernández
|
||||||
|
* @webSite: http://djhvscf.github.io/Blog
|
||||||
|
* @version: v2.1.1
|
||||||
|
*/
|
||||||
|
.no-filter-control {
|
||||||
|
height: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-control {
|
||||||
|
margin: 0 2px 2px 2px;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
@charset "UTF-8";.no-filter-control{height:34px}.filter-control{margin:0 2px 2px 2px}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,25 @@
|
||||||
|
.fixed-columns,
|
||||||
|
.fixed-columns-right {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-columns {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-columns .fixed-table-body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-columns-right {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-columns-right .fixed-table-body {
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.fixed-columns,.fixed-columns-right{position:absolute;top:0;height:100%;background-color:#fff;box-sizing:border-box;z-index:1}.fixed-columns{left:0}.fixed-columns .fixed-table-body{overflow:hidden!important}.fixed-columns-right{right:0}.fixed-columns-right .fixed-table-body{overflow-x:hidden!important}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,7 @@
|
||||||
|
.bootstrap-table .table > tbody > tr.groupBy {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .table > tbody > tr.hidden + tr.detail-view {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
1874
server/src/main/resources/static/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js
vendored
Normal file
1874
server/src/main/resources/static/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bootstrap-table .table>tbody>tr.groupBy{cursor:pointer}.bootstrap-table .table>tbody>tr.hidden+tr.detail-view{display:none}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,125 @@
|
||||||
|
(function (global, factory) {
|
||||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
||||||
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||||
|
(global = global || self, factory(global.jQuery));
|
||||||
|
}(this, (function ($) { 'use strict';
|
||||||
|
|
||||||
|
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||||
|
|
||||||
|
function _classCallCheck(instance, Constructor) {
|
||||||
|
if (!(instance instanceof Constructor)) {
|
||||||
|
throw new TypeError("Cannot call a class as a function");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _defineProperties(target, props) {
|
||||||
|
for (var i = 0; i < props.length; i++) {
|
||||||
|
var descriptor = props[i];
|
||||||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _inherits(subClass, superClass) {
|
||||||
|
if (typeof superClass !== "function" && superClass !== null) {
|
||||||
|
throw new TypeError("Super expression must either be null or a function");
|
||||||
|
}
|
||||||
|
|
||||||
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||||
|
constructor: {
|
||||||
|
value: subClass,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _getPrototypeOf(o) {
|
||||||
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
||||||
|
return o.__proto__ || Object.getPrototypeOf(o);
|
||||||
|
};
|
||||||
|
return _getPrototypeOf(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _setPrototypeOf(o, p) {
|
||||||
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||||
|
o.__proto__ = p;
|
||||||
|
return o;
|
||||||
|
};
|
||||||
|
|
||||||
|
return _setPrototypeOf(o, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _assertThisInitialized(self) {
|
||||||
|
if (self === void 0) {
|
||||||
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _possibleConstructorReturn(self, call) {
|
||||||
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
||||||
|
return call;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _assertThisInitialized(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Jewway
|
||||||
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$.fn.bootstrapTable.methods.push('changeTitle');
|
||||||
|
$.fn.bootstrapTable.methods.push('changeLocale');
|
||||||
|
|
||||||
|
$.BootstrapTable =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function (_$$BootstrapTable) {
|
||||||
|
_inherits(_class, _$$BootstrapTable);
|
||||||
|
|
||||||
|
function _class() {
|
||||||
|
_classCallCheck(this, _class);
|
||||||
|
|
||||||
|
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
||||||
|
}
|
||||||
|
|
||||||
|
_createClass(_class, [{
|
||||||
|
key: "changeTitle",
|
||||||
|
value: function changeTitle(locale) {
|
||||||
|
$.each(this.options.columns, function (idx, columnList) {
|
||||||
|
$.each(columnList, function (idx, column) {
|
||||||
|
if (column.field) {
|
||||||
|
column.title = locale[column.field];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.initHeader();
|
||||||
|
this.initBody();
|
||||||
|
this.initToolbar();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "changeLocale",
|
||||||
|
value: function changeLocale(localeId) {
|
||||||
|
this.options.locale = localeId;
|
||||||
|
this.initLocale();
|
||||||
|
this.initPagination();
|
||||||
|
this.initBody();
|
||||||
|
this.initToolbar();
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
|
||||||
|
return _class;
|
||||||
|
}($.BootstrapTable);
|
||||||
|
|
||||||
|
})));
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t=t||self).jQuery)}(this,(function(t){"use strict";function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(t=t&&t.hasOwnProperty("default")?t.default:t).fn.bootstrapTable.methods.push("changeTitle"),t.fn.bootstrapTable.methods.push("changeLocale"),t.BootstrapTable=function(r){function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i(this,n(u).apply(this,arguments))}var a,c,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(u,r),a=u,(c=[{key:"changeTitle",value:function(e){t.each(this.options.columns,(function(n,o){t.each(o,(function(t,n){n.field&&(n.title=e[n.field])}))})),this.initHeader(),this.initBody(),this.initToolbar()}},{key:"changeLocale",value:function(t){this.options.locale=t,this.initLocale(),this.initPagination(),this.initBody(),this.initToolbar()}}])&&e(a.prototype,c),f&&e(a,f),u}(t.BootstrapTable)}));
|
||||||
1387
server/src/main/resources/static/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js
vendored
Normal file
1387
server/src/main/resources/static/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1239
server/src/main/resources/static/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
vendored
Normal file
1239
server/src/main/resources/static/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
server/src/main/resources/static/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js
vendored
Normal file
10
server/src/main/resources/static/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
||||||
|
.bootstrap-table.bootstrap3 .fixed-table-pagination > .pagination ul.pagination,
|
||||||
|
.bootstrap-table.bootstrap3 .fixed-table-pagination > .pagination .page-jump-to {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-pagination > .pagination .page-jump-to input {
|
||||||
|
width: 70px;
|
||||||
|
margin-left: 5px;
|
||||||
|
text-align: center;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
1043
server/src/main/resources/static/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js
vendored
Normal file
1043
server/src/main/resources/static/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bootstrap-table.bootstrap3 .fixed-table-pagination>.pagination .page-jump-to,.bootstrap-table.bootstrap3 .fixed-table-pagination>.pagination ul.pagination{display:inline}.bootstrap-table .fixed-table-pagination>.pagination .page-jump-to input{width:70px;margin-left:5px;text-align:center;float:left}
|
||||||
File diff suppressed because one or more lines are too long
1173
server/src/main/resources/static/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js
vendored
Normal file
1173
server/src/main/resources/static/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2055
server/src/main/resources/static/bootstrap-table/extensions/print/bootstrap-table-print.js
vendored
Normal file
2055
server/src/main/resources/static/bootstrap-table/extensions/print/bootstrap-table-print.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
server/src/main/resources/static/bootstrap-table/extensions/print/bootstrap-table-print.min.js
vendored
Normal file
10
server/src/main/resources/static/bootstrap-table/extensions/print/bootstrap-table-print.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,14 @@
|
||||||
|
.reorder_rows_onDragClass td {
|
||||||
|
background-color: #eee;
|
||||||
|
-webkit-box-shadow: 11px 5px 12px 2px #333, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset;
|
||||||
|
-webkit-box-shadow: 6px 3px 5px #555, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset;
|
||||||
|
-moz-box-shadow: 6px 4px 5px 1px #555, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset;
|
||||||
|
-box-shadow: 6px 4px 5px 1px #555, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reorder_rows_onDragClass td:last-child {
|
||||||
|
-webkit-box-shadow: 8px 7px 12px 0 #333, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset;
|
||||||
|
-webkit-box-shadow: 1px 8px 6px -4px #555, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset;
|
||||||
|
-moz-box-shadow: 0 9px 4px -4px #555, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset, -1px 0 0 #ccc inset;
|
||||||
|
-box-shadow: 0 9px 4px -4px #555, 0 1px 0 #ccc inset, 0 -1px 0 #ccc inset, -1px 0 0 #ccc inset;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,986 @@
|
||||||
|
(function (global, factory) {
|
||||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
||||||
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||||
|
(global = global || self, factory(global.jQuery));
|
||||||
|
}(this, (function ($) { 'use strict';
|
||||||
|
|
||||||
|
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||||
|
|
||||||
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||||
|
|
||||||
|
function createCommonjsModule(fn, module) {
|
||||||
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||||
|
}
|
||||||
|
|
||||||
|
var check = function (it) {
|
||||||
|
return it && it.Math == Math && it;
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||||
|
var global_1 =
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
check(typeof globalThis == 'object' && globalThis) ||
|
||||||
|
check(typeof window == 'object' && window) ||
|
||||||
|
check(typeof self == 'object' && self) ||
|
||||||
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
||||||
|
// eslint-disable-next-line no-new-func
|
||||||
|
Function('return this')();
|
||||||
|
|
||||||
|
var fails = function (exec) {
|
||||||
|
try {
|
||||||
|
return !!exec();
|
||||||
|
} catch (error) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Thank's IE8 for his funny defineProperty
|
||||||
|
var descriptors = !fails(function () {
|
||||||
|
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
||||||
|
});
|
||||||
|
|
||||||
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
||||||
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||||
|
|
||||||
|
// Nashorn ~ JDK8 bug
|
||||||
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
||||||
|
|
||||||
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
||||||
|
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
||||||
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
||||||
|
return !!descriptor && descriptor.enumerable;
|
||||||
|
} : nativePropertyIsEnumerable;
|
||||||
|
|
||||||
|
var objectPropertyIsEnumerable = {
|
||||||
|
f: f
|
||||||
|
};
|
||||||
|
|
||||||
|
var createPropertyDescriptor = function (bitmap, value) {
|
||||||
|
return {
|
||||||
|
enumerable: !(bitmap & 1),
|
||||||
|
configurable: !(bitmap & 2),
|
||||||
|
writable: !(bitmap & 4),
|
||||||
|
value: value
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var toString = {}.toString;
|
||||||
|
|
||||||
|
var classofRaw = function (it) {
|
||||||
|
return toString.call(it).slice(8, -1);
|
||||||
|
};
|
||||||
|
|
||||||
|
var split = ''.split;
|
||||||
|
|
||||||
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||||
|
var indexedObject = fails(function () {
|
||||||
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
||||||
|
// eslint-disable-next-line no-prototype-builtins
|
||||||
|
return !Object('z').propertyIsEnumerable(0);
|
||||||
|
}) ? function (it) {
|
||||||
|
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
||||||
|
} : Object;
|
||||||
|
|
||||||
|
// `RequireObjectCoercible` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
||||||
|
var requireObjectCoercible = function (it) {
|
||||||
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||||
|
return it;
|
||||||
|
};
|
||||||
|
|
||||||
|
// toObject with fallback for non-array-like ES3 strings
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var toIndexedObject = function (it) {
|
||||||
|
return indexedObject(requireObjectCoercible(it));
|
||||||
|
};
|
||||||
|
|
||||||
|
var isObject = function (it) {
|
||||||
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||||
|
};
|
||||||
|
|
||||||
|
// `ToPrimitive` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
||||||
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||||
|
// and the second argument - flag - preferred type is a string
|
||||||
|
var toPrimitive = function (input, PREFERRED_STRING) {
|
||||||
|
if (!isObject(input)) return input;
|
||||||
|
var fn, val;
|
||||||
|
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
throw TypeError("Can't convert object to primitive value");
|
||||||
|
};
|
||||||
|
|
||||||
|
var hasOwnProperty = {}.hasOwnProperty;
|
||||||
|
|
||||||
|
var has = function (it, key) {
|
||||||
|
return hasOwnProperty.call(it, key);
|
||||||
|
};
|
||||||
|
|
||||||
|
var document = global_1.document;
|
||||||
|
// typeof document.createElement is 'object' in old IE
|
||||||
|
var EXISTS = isObject(document) && isObject(document.createElement);
|
||||||
|
|
||||||
|
var documentCreateElement = function (it) {
|
||||||
|
return EXISTS ? document.createElement(it) : {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Thank's IE8 for his funny defineProperty
|
||||||
|
var ie8DomDefine = !descriptors && !fails(function () {
|
||||||
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
||||||
|
get: function () { return 7; }
|
||||||
|
}).a != 7;
|
||||||
|
});
|
||||||
|
|
||||||
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||||
|
|
||||||
|
// `Object.getOwnPropertyDescriptor` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
||||||
|
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
||||||
|
O = toIndexedObject(O);
|
||||||
|
P = toPrimitive(P, true);
|
||||||
|
if (ie8DomDefine) try {
|
||||||
|
return nativeGetOwnPropertyDescriptor(O, P);
|
||||||
|
} catch (error) { /* empty */ }
|
||||||
|
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectGetOwnPropertyDescriptor = {
|
||||||
|
f: f$1
|
||||||
|
};
|
||||||
|
|
||||||
|
var anObject = function (it) {
|
||||||
|
if (!isObject(it)) {
|
||||||
|
throw TypeError(String(it) + ' is not an object');
|
||||||
|
} return it;
|
||||||
|
};
|
||||||
|
|
||||||
|
var nativeDefineProperty = Object.defineProperty;
|
||||||
|
|
||||||
|
// `Object.defineProperty` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
||||||
|
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
||||||
|
anObject(O);
|
||||||
|
P = toPrimitive(P, true);
|
||||||
|
anObject(Attributes);
|
||||||
|
if (ie8DomDefine) try {
|
||||||
|
return nativeDefineProperty(O, P, Attributes);
|
||||||
|
} catch (error) { /* empty */ }
|
||||||
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
||||||
|
if ('value' in Attributes) O[P] = Attributes.value;
|
||||||
|
return O;
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectDefineProperty = {
|
||||||
|
f: f$2
|
||||||
|
};
|
||||||
|
|
||||||
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
||||||
|
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
||||||
|
} : function (object, key, value) {
|
||||||
|
object[key] = value;
|
||||||
|
return object;
|
||||||
|
};
|
||||||
|
|
||||||
|
var setGlobal = function (key, value) {
|
||||||
|
try {
|
||||||
|
createNonEnumerableProperty(global_1, key, value);
|
||||||
|
} catch (error) {
|
||||||
|
global_1[key] = value;
|
||||||
|
} return value;
|
||||||
|
};
|
||||||
|
|
||||||
|
var SHARED = '__core-js_shared__';
|
||||||
|
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
||||||
|
|
||||||
|
var sharedStore = store;
|
||||||
|
|
||||||
|
var functionToString = Function.toString;
|
||||||
|
|
||||||
|
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
||||||
|
if (typeof sharedStore.inspectSource != 'function') {
|
||||||
|
sharedStore.inspectSource = function (it) {
|
||||||
|
return functionToString.call(it);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var inspectSource = sharedStore.inspectSource;
|
||||||
|
|
||||||
|
var WeakMap = global_1.WeakMap;
|
||||||
|
|
||||||
|
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
||||||
|
|
||||||
|
var shared = createCommonjsModule(function (module) {
|
||||||
|
(module.exports = function (key, value) {
|
||||||
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
||||||
|
})('versions', []).push({
|
||||||
|
version: '3.6.0',
|
||||||
|
mode: 'global',
|
||||||
|
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var id = 0;
|
||||||
|
var postfix = Math.random();
|
||||||
|
|
||||||
|
var uid = function (key) {
|
||||||
|
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
||||||
|
};
|
||||||
|
|
||||||
|
var keys = shared('keys');
|
||||||
|
|
||||||
|
var sharedKey = function (key) {
|
||||||
|
return keys[key] || (keys[key] = uid(key));
|
||||||
|
};
|
||||||
|
|
||||||
|
var hiddenKeys = {};
|
||||||
|
|
||||||
|
var WeakMap$1 = global_1.WeakMap;
|
||||||
|
var set, get, has$1;
|
||||||
|
|
||||||
|
var enforce = function (it) {
|
||||||
|
return has$1(it) ? get(it) : set(it, {});
|
||||||
|
};
|
||||||
|
|
||||||
|
var getterFor = function (TYPE) {
|
||||||
|
return function (it) {
|
||||||
|
var state;
|
||||||
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
||||||
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
||||||
|
} return state;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (nativeWeakMap) {
|
||||||
|
var store$1 = new WeakMap$1();
|
||||||
|
var wmget = store$1.get;
|
||||||
|
var wmhas = store$1.has;
|
||||||
|
var wmset = store$1.set;
|
||||||
|
set = function (it, metadata) {
|
||||||
|
wmset.call(store$1, it, metadata);
|
||||||
|
return metadata;
|
||||||
|
};
|
||||||
|
get = function (it) {
|
||||||
|
return wmget.call(store$1, it) || {};
|
||||||
|
};
|
||||||
|
has$1 = function (it) {
|
||||||
|
return wmhas.call(store$1, it);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
var STATE = sharedKey('state');
|
||||||
|
hiddenKeys[STATE] = true;
|
||||||
|
set = function (it, metadata) {
|
||||||
|
createNonEnumerableProperty(it, STATE, metadata);
|
||||||
|
return metadata;
|
||||||
|
};
|
||||||
|
get = function (it) {
|
||||||
|
return has(it, STATE) ? it[STATE] : {};
|
||||||
|
};
|
||||||
|
has$1 = function (it) {
|
||||||
|
return has(it, STATE);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var internalState = {
|
||||||
|
set: set,
|
||||||
|
get: get,
|
||||||
|
has: has$1,
|
||||||
|
enforce: enforce,
|
||||||
|
getterFor: getterFor
|
||||||
|
};
|
||||||
|
|
||||||
|
var redefine = createCommonjsModule(function (module) {
|
||||||
|
var getInternalState = internalState.get;
|
||||||
|
var enforceInternalState = internalState.enforce;
|
||||||
|
var TEMPLATE = String(String).split('String');
|
||||||
|
|
||||||
|
(module.exports = function (O, key, value, options) {
|
||||||
|
var unsafe = options ? !!options.unsafe : false;
|
||||||
|
var simple = options ? !!options.enumerable : false;
|
||||||
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
||||||
|
if (typeof value == 'function') {
|
||||||
|
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
||||||
|
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
||||||
|
}
|
||||||
|
if (O === global_1) {
|
||||||
|
if (simple) O[key] = value;
|
||||||
|
else setGlobal(key, value);
|
||||||
|
return;
|
||||||
|
} else if (!unsafe) {
|
||||||
|
delete O[key];
|
||||||
|
} else if (!noTargetGet && O[key]) {
|
||||||
|
simple = true;
|
||||||
|
}
|
||||||
|
if (simple) O[key] = value;
|
||||||
|
else createNonEnumerableProperty(O, key, value);
|
||||||
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
||||||
|
})(Function.prototype, 'toString', function toString() {
|
||||||
|
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var path = global_1;
|
||||||
|
|
||||||
|
var aFunction = function (variable) {
|
||||||
|
return typeof variable == 'function' ? variable : undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
var getBuiltIn = function (namespace, method) {
|
||||||
|
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
||||||
|
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
||||||
|
};
|
||||||
|
|
||||||
|
var ceil = Math.ceil;
|
||||||
|
var floor = Math.floor;
|
||||||
|
|
||||||
|
// `ToInteger` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
||||||
|
var toInteger = function (argument) {
|
||||||
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
||||||
|
};
|
||||||
|
|
||||||
|
var min = Math.min;
|
||||||
|
|
||||||
|
// `ToLength` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-tolength
|
||||||
|
var toLength = function (argument) {
|
||||||
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
||||||
|
};
|
||||||
|
|
||||||
|
var max = Math.max;
|
||||||
|
var min$1 = Math.min;
|
||||||
|
|
||||||
|
// Helper for a popular repeating case of the spec:
|
||||||
|
// Let integer be ? ToInteger(index).
|
||||||
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
||||||
|
var toAbsoluteIndex = function (index, length) {
|
||||||
|
var integer = toInteger(index);
|
||||||
|
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
||||||
|
};
|
||||||
|
|
||||||
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
||||||
|
var createMethod = function (IS_INCLUDES) {
|
||||||
|
return function ($this, el, fromIndex) {
|
||||||
|
var O = toIndexedObject($this);
|
||||||
|
var length = toLength(O.length);
|
||||||
|
var index = toAbsoluteIndex(fromIndex, length);
|
||||||
|
var value;
|
||||||
|
// Array#includes uses SameValueZero equality algorithm
|
||||||
|
// eslint-disable-next-line no-self-compare
|
||||||
|
if (IS_INCLUDES && el != el) while (length > index) {
|
||||||
|
value = O[index++];
|
||||||
|
// eslint-disable-next-line no-self-compare
|
||||||
|
if (value != value) return true;
|
||||||
|
// Array#indexOf ignores holes, Array#includes - not
|
||||||
|
} else for (;length > index; index++) {
|
||||||
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
||||||
|
} return !IS_INCLUDES && -1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var arrayIncludes = {
|
||||||
|
// `Array.prototype.includes` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
||||||
|
includes: createMethod(true),
|
||||||
|
// `Array.prototype.indexOf` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
||||||
|
indexOf: createMethod(false)
|
||||||
|
};
|
||||||
|
|
||||||
|
var indexOf = arrayIncludes.indexOf;
|
||||||
|
|
||||||
|
|
||||||
|
var objectKeysInternal = function (object, names) {
|
||||||
|
var O = toIndexedObject(object);
|
||||||
|
var i = 0;
|
||||||
|
var result = [];
|
||||||
|
var key;
|
||||||
|
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
||||||
|
// Don't enum bug & hidden keys
|
||||||
|
while (names.length > i) if (has(O, key = names[i++])) {
|
||||||
|
~indexOf(result, key) || result.push(key);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
// IE8- don't enum bug keys
|
||||||
|
var enumBugKeys = [
|
||||||
|
'constructor',
|
||||||
|
'hasOwnProperty',
|
||||||
|
'isPrototypeOf',
|
||||||
|
'propertyIsEnumerable',
|
||||||
|
'toLocaleString',
|
||||||
|
'toString',
|
||||||
|
'valueOf'
|
||||||
|
];
|
||||||
|
|
||||||
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
||||||
|
|
||||||
|
// `Object.getOwnPropertyNames` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
||||||
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
||||||
|
return objectKeysInternal(O, hiddenKeys$1);
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectGetOwnPropertyNames = {
|
||||||
|
f: f$3
|
||||||
|
};
|
||||||
|
|
||||||
|
var f$4 = Object.getOwnPropertySymbols;
|
||||||
|
|
||||||
|
var objectGetOwnPropertySymbols = {
|
||||||
|
f: f$4
|
||||||
|
};
|
||||||
|
|
||||||
|
// all object keys, includes non-enumerable and symbols
|
||||||
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
||||||
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
||||||
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
||||||
|
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
||||||
|
};
|
||||||
|
|
||||||
|
var copyConstructorProperties = function (target, source) {
|
||||||
|
var keys = ownKeys(source);
|
||||||
|
var defineProperty = objectDefineProperty.f;
|
||||||
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
||||||
|
for (var i = 0; i < keys.length; i++) {
|
||||||
|
var key = keys[i];
|
||||||
|
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var replacement = /#|\.prototype\./;
|
||||||
|
|
||||||
|
var isForced = function (feature, detection) {
|
||||||
|
var value = data[normalize(feature)];
|
||||||
|
return value == POLYFILL ? true
|
||||||
|
: value == NATIVE ? false
|
||||||
|
: typeof detection == 'function' ? fails(detection)
|
||||||
|
: !!detection;
|
||||||
|
};
|
||||||
|
|
||||||
|
var normalize = isForced.normalize = function (string) {
|
||||||
|
return String(string).replace(replacement, '.').toLowerCase();
|
||||||
|
};
|
||||||
|
|
||||||
|
var data = isForced.data = {};
|
||||||
|
var NATIVE = isForced.NATIVE = 'N';
|
||||||
|
var POLYFILL = isForced.POLYFILL = 'P';
|
||||||
|
|
||||||
|
var isForced_1 = isForced;
|
||||||
|
|
||||||
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
options.target - name of the target object
|
||||||
|
options.global - target is the global object
|
||||||
|
options.stat - export as static methods of target
|
||||||
|
options.proto - export as prototype methods of target
|
||||||
|
options.real - real prototype method for the `pure` version
|
||||||
|
options.forced - export even if the native feature is available
|
||||||
|
options.bind - bind methods to the target, required for the `pure` version
|
||||||
|
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
||||||
|
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
||||||
|
options.sham - add a flag to not completely full polyfills
|
||||||
|
options.enumerable - export as enumerable property
|
||||||
|
options.noTargetGet - prevent calling a getter on target
|
||||||
|
*/
|
||||||
|
var _export = function (options, source) {
|
||||||
|
var TARGET = options.target;
|
||||||
|
var GLOBAL = options.global;
|
||||||
|
var STATIC = options.stat;
|
||||||
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
||||||
|
if (GLOBAL) {
|
||||||
|
target = global_1;
|
||||||
|
} else if (STATIC) {
|
||||||
|
target = global_1[TARGET] || setGlobal(TARGET, {});
|
||||||
|
} else {
|
||||||
|
target = (global_1[TARGET] || {}).prototype;
|
||||||
|
}
|
||||||
|
if (target) for (key in source) {
|
||||||
|
sourceProperty = source[key];
|
||||||
|
if (options.noTargetGet) {
|
||||||
|
descriptor = getOwnPropertyDescriptor$1(target, key);
|
||||||
|
targetProperty = descriptor && descriptor.value;
|
||||||
|
} else targetProperty = target[key];
|
||||||
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
||||||
|
// contained in target
|
||||||
|
if (!FORCED && targetProperty !== undefined) {
|
||||||
|
if (typeof sourceProperty === typeof targetProperty) continue;
|
||||||
|
copyConstructorProperties(sourceProperty, targetProperty);
|
||||||
|
}
|
||||||
|
// add a flag to not completely full polyfills
|
||||||
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
||||||
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
||||||
|
}
|
||||||
|
// extend global
|
||||||
|
redefine(target, key, sourceProperty, options);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// `IsArray` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-isarray
|
||||||
|
var isArray = Array.isArray || function isArray(arg) {
|
||||||
|
return classofRaw(arg) == 'Array';
|
||||||
|
};
|
||||||
|
|
||||||
|
// `ToObject` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-toobject
|
||||||
|
var toObject = function (argument) {
|
||||||
|
return Object(requireObjectCoercible(argument));
|
||||||
|
};
|
||||||
|
|
||||||
|
var createProperty = function (object, key, value) {
|
||||||
|
var propertyKey = toPrimitive(key);
|
||||||
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
||||||
|
else object[propertyKey] = value;
|
||||||
|
};
|
||||||
|
|
||||||
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
||||||
|
// Chrome 38 Symbol has incorrect toString conversion
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
return !String(Symbol());
|
||||||
|
});
|
||||||
|
|
||||||
|
var useSymbolAsUid = nativeSymbol
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
&& !Symbol.sham
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
&& typeof Symbol() == 'symbol';
|
||||||
|
|
||||||
|
var WellKnownSymbolsStore = shared('wks');
|
||||||
|
var Symbol$1 = global_1.Symbol;
|
||||||
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
||||||
|
|
||||||
|
var wellKnownSymbol = function (name) {
|
||||||
|
if (!has(WellKnownSymbolsStore, name)) {
|
||||||
|
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
|
||||||
|
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
||||||
|
} return WellKnownSymbolsStore[name];
|
||||||
|
};
|
||||||
|
|
||||||
|
var SPECIES = wellKnownSymbol('species');
|
||||||
|
|
||||||
|
// `ArraySpeciesCreate` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
||||||
|
var arraySpeciesCreate = function (originalArray, length) {
|
||||||
|
var C;
|
||||||
|
if (isArray(originalArray)) {
|
||||||
|
C = originalArray.constructor;
|
||||||
|
// cross-realm fallback
|
||||||
|
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
||||||
|
else if (isObject(C)) {
|
||||||
|
C = C[SPECIES];
|
||||||
|
if (C === null) C = undefined;
|
||||||
|
}
|
||||||
|
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
||||||
|
};
|
||||||
|
|
||||||
|
var userAgent = getBuiltIn('navigator', 'userAgent') || '';
|
||||||
|
|
||||||
|
var process = global_1.process;
|
||||||
|
var versions = process && process.versions;
|
||||||
|
var v8 = versions && versions.v8;
|
||||||
|
var match, version;
|
||||||
|
|
||||||
|
if (v8) {
|
||||||
|
match = v8.split('.');
|
||||||
|
version = match[0] + match[1];
|
||||||
|
} else if (userAgent) {
|
||||||
|
match = userAgent.match(/Edge\/(\d+)/);
|
||||||
|
if (!match || match[1] >= 74) {
|
||||||
|
match = userAgent.match(/Chrome\/(\d+)/);
|
||||||
|
if (match) version = match[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var v8Version = version && +version;
|
||||||
|
|
||||||
|
var SPECIES$1 = wellKnownSymbol('species');
|
||||||
|
|
||||||
|
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
||||||
|
// We can't use this feature detection in V8 since it causes
|
||||||
|
// deoptimization and serious performance degradation
|
||||||
|
// https://github.com/zloirock/core-js/issues/677
|
||||||
|
return v8Version >= 51 || !fails(function () {
|
||||||
|
var array = [];
|
||||||
|
var constructor = array.constructor = {};
|
||||||
|
constructor[SPECIES$1] = function () {
|
||||||
|
return { foo: 1 };
|
||||||
|
};
|
||||||
|
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
||||||
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
||||||
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
||||||
|
|
||||||
|
// We can't use this feature detection in V8 since it causes
|
||||||
|
// deoptimization and serious performance degradation
|
||||||
|
// https://github.com/zloirock/core-js/issues/679
|
||||||
|
var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
|
||||||
|
var array = [];
|
||||||
|
array[IS_CONCAT_SPREADABLE] = false;
|
||||||
|
return array.concat()[0] !== array;
|
||||||
|
});
|
||||||
|
|
||||||
|
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
||||||
|
|
||||||
|
var isConcatSpreadable = function (O) {
|
||||||
|
if (!isObject(O)) return false;
|
||||||
|
var spreadable = O[IS_CONCAT_SPREADABLE];
|
||||||
|
return spreadable !== undefined ? !!spreadable : isArray(O);
|
||||||
|
};
|
||||||
|
|
||||||
|
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
||||||
|
|
||||||
|
// `Array.prototype.concat` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
||||||
|
// with adding support of @@isConcatSpreadable and @@species
|
||||||
|
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
||||||
|
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
||||||
|
var O = toObject(this);
|
||||||
|
var A = arraySpeciesCreate(O, 0);
|
||||||
|
var n = 0;
|
||||||
|
var i, k, length, len, E;
|
||||||
|
for (i = -1, length = arguments.length; i < length; i++) {
|
||||||
|
E = i === -1 ? O : arguments[i];
|
||||||
|
if (isConcatSpreadable(E)) {
|
||||||
|
len = toLength(E.length);
|
||||||
|
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||||
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
||||||
|
} else {
|
||||||
|
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||||
|
createProperty(A, n++, E);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
A.length = n;
|
||||||
|
return A;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var sloppyArrayMethod = function (METHOD_NAME, argument) {
|
||||||
|
var method = [][METHOD_NAME];
|
||||||
|
return !method || !fails(function () {
|
||||||
|
// eslint-disable-next-line no-useless-call,no-throw-literal
|
||||||
|
method.call(null, argument || function () { throw 1; }, 1);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var $indexOf = arrayIncludes.indexOf;
|
||||||
|
|
||||||
|
|
||||||
|
var nativeIndexOf = [].indexOf;
|
||||||
|
|
||||||
|
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
|
||||||
|
var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
|
||||||
|
|
||||||
|
// `Array.prototype.indexOf` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
||||||
|
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
|
||||||
|
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
||||||
|
return NEGATIVE_ZERO
|
||||||
|
// convert -0 to +0
|
||||||
|
? nativeIndexOf.apply(this, arguments) || 0
|
||||||
|
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var max$1 = Math.max;
|
||||||
|
var min$2 = Math.min;
|
||||||
|
var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
|
||||||
|
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
||||||
|
|
||||||
|
// `Array.prototype.splice` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
|
||||||
|
// with adding support of @@species
|
||||||
|
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('splice') }, {
|
||||||
|
splice: function splice(start, deleteCount /* , ...items */) {
|
||||||
|
var O = toObject(this);
|
||||||
|
var len = toLength(O.length);
|
||||||
|
var actualStart = toAbsoluteIndex(start, len);
|
||||||
|
var argumentsLength = arguments.length;
|
||||||
|
var insertCount, actualDeleteCount, A, k, from, to;
|
||||||
|
if (argumentsLength === 0) {
|
||||||
|
insertCount = actualDeleteCount = 0;
|
||||||
|
} else if (argumentsLength === 1) {
|
||||||
|
insertCount = 0;
|
||||||
|
actualDeleteCount = len - actualStart;
|
||||||
|
} else {
|
||||||
|
insertCount = argumentsLength - 2;
|
||||||
|
actualDeleteCount = min$2(max$1(toInteger(deleteCount), 0), len - actualStart);
|
||||||
|
}
|
||||||
|
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {
|
||||||
|
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
||||||
|
}
|
||||||
|
A = arraySpeciesCreate(O, actualDeleteCount);
|
||||||
|
for (k = 0; k < actualDeleteCount; k++) {
|
||||||
|
from = actualStart + k;
|
||||||
|
if (from in O) createProperty(A, k, O[from]);
|
||||||
|
}
|
||||||
|
A.length = actualDeleteCount;
|
||||||
|
if (insertCount < actualDeleteCount) {
|
||||||
|
for (k = actualStart; k < len - actualDeleteCount; k++) {
|
||||||
|
from = k + actualDeleteCount;
|
||||||
|
to = k + insertCount;
|
||||||
|
if (from in O) O[to] = O[from];
|
||||||
|
else delete O[to];
|
||||||
|
}
|
||||||
|
for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
|
||||||
|
} else if (insertCount > actualDeleteCount) {
|
||||||
|
for (k = len - actualDeleteCount; k > actualStart; k--) {
|
||||||
|
from = k + actualDeleteCount - 1;
|
||||||
|
to = k + insertCount - 1;
|
||||||
|
if (from in O) O[to] = O[from];
|
||||||
|
else delete O[to];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (k = 0; k < insertCount; k++) {
|
||||||
|
O[k + actualStart] = arguments[k + 2];
|
||||||
|
}
|
||||||
|
O.length = len - actualDeleteCount + insertCount;
|
||||||
|
return A;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function _classCallCheck(instance, Constructor) {
|
||||||
|
if (!(instance instanceof Constructor)) {
|
||||||
|
throw new TypeError("Cannot call a class as a function");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _defineProperties(target, props) {
|
||||||
|
for (var i = 0; i < props.length; i++) {
|
||||||
|
var descriptor = props[i];
|
||||||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _inherits(subClass, superClass) {
|
||||||
|
if (typeof superClass !== "function" && superClass !== null) {
|
||||||
|
throw new TypeError("Super expression must either be null or a function");
|
||||||
|
}
|
||||||
|
|
||||||
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||||
|
constructor: {
|
||||||
|
value: subClass,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _getPrototypeOf(o) {
|
||||||
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
||||||
|
return o.__proto__ || Object.getPrototypeOf(o);
|
||||||
|
};
|
||||||
|
return _getPrototypeOf(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _setPrototypeOf(o, p) {
|
||||||
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||||
|
o.__proto__ = p;
|
||||||
|
return o;
|
||||||
|
};
|
||||||
|
|
||||||
|
return _setPrototypeOf(o, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _assertThisInitialized(self) {
|
||||||
|
if (self === void 0) {
|
||||||
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _possibleConstructorReturn(self, call) {
|
||||||
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
||||||
|
return call;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _assertThisInitialized(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _superPropBase(object, property) {
|
||||||
|
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
||||||
|
object = _getPrototypeOf(object);
|
||||||
|
if (object === null) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _get(target, property, receiver) {
|
||||||
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
||||||
|
_get = Reflect.get;
|
||||||
|
} else {
|
||||||
|
_get = function _get(target, property, receiver) {
|
||||||
|
var base = _superPropBase(target, property);
|
||||||
|
|
||||||
|
if (!base) return;
|
||||||
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
||||||
|
|
||||||
|
if (desc.get) {
|
||||||
|
return desc.get.call(receiver);
|
||||||
|
}
|
||||||
|
|
||||||
|
return desc.value;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return _get(target, property, receiver || target);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Dennis Hernández
|
||||||
|
* @webSite: http://djhvscf.github.io/Blog
|
||||||
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
var rowAttr = function rowAttr(row, index) {
|
||||||
|
return {
|
||||||
|
id: "customId_".concat(index)
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.bootstrapTable.defaults, {
|
||||||
|
reorderableRows: false,
|
||||||
|
onDragStyle: null,
|
||||||
|
onDropStyle: null,
|
||||||
|
onDragClass: 'reorder_rows_onDragClass',
|
||||||
|
dragHandle: '>tbody>tr>td',
|
||||||
|
useRowAttrFunc: false,
|
||||||
|
onReorderRowsDrag: function onReorderRowsDrag(row) {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
onReorderRowsDrop: function onReorderRowsDrop(row) {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
onReorderRow: function onReorderRow(newData) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
||||||
|
'reorder-row.bs.table': 'onReorderRow'
|
||||||
|
});
|
||||||
|
|
||||||
|
$.BootstrapTable =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function (_$$BootstrapTable) {
|
||||||
|
_inherits(_class, _$$BootstrapTable);
|
||||||
|
|
||||||
|
function _class() {
|
||||||
|
_classCallCheck(this, _class);
|
||||||
|
|
||||||
|
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
||||||
|
}
|
||||||
|
|
||||||
|
_createClass(_class, [{
|
||||||
|
key: "init",
|
||||||
|
value: function init() {
|
||||||
|
var _this = this,
|
||||||
|
_get3;
|
||||||
|
|
||||||
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
args[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.options.reorderableRows) {
|
||||||
|
var _get2;
|
||||||
|
|
||||||
|
(_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.useRowAttrFunc) {
|
||||||
|
this.options.rowAttributes = rowAttr;
|
||||||
|
}
|
||||||
|
|
||||||
|
var onPostBody = this.options.onPostBody;
|
||||||
|
|
||||||
|
this.options.onPostBody = function () {
|
||||||
|
setTimeout(function () {
|
||||||
|
_this.makeRowsReorderable();
|
||||||
|
|
||||||
|
onPostBody.apply();
|
||||||
|
}, 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
(_get3 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get3, [this].concat(args));
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "makeRowsReorderable",
|
||||||
|
value: function makeRowsReorderable() {
|
||||||
|
var _this2 = this;
|
||||||
|
|
||||||
|
this.$el.tableDnD({
|
||||||
|
onDragStyle: this.options.onDragStyle,
|
||||||
|
onDropStyle: this.options.onDropStyle,
|
||||||
|
onDragClass: this.options.onDragClass,
|
||||||
|
onDragStart: function onDragStart(table, droppedRow) {
|
||||||
|
return _this2.onDropStart(table, droppedRow);
|
||||||
|
},
|
||||||
|
onDrop: function onDrop(table, droppedRow) {
|
||||||
|
return _this2.onDrop(table, droppedRow);
|
||||||
|
},
|
||||||
|
dragHandle: this.options.dragHandle
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "onDropStart",
|
||||||
|
value: function onDropStart(table, draggingTd) {
|
||||||
|
this.$draggingTd = $(draggingTd).css('cursor', 'move');
|
||||||
|
this.draggingIndex = $(this.$draggingTd.parent()).data('index'); // Call the user defined function
|
||||||
|
|
||||||
|
this.options.onReorderRowsDrag(this.data[this.draggingIndex]);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "onDrop",
|
||||||
|
value: function onDrop(table) {
|
||||||
|
this.$draggingTd.css('cursor', '');
|
||||||
|
var newData = [];
|
||||||
|
|
||||||
|
for (var i = 0; i < table.tBodies[0].rows.length; i++) {
|
||||||
|
var $tr = $(table.tBodies[0].rows[i]);
|
||||||
|
newData.push(this.data[$tr.data('index')]);
|
||||||
|
$tr.data('index', i);
|
||||||
|
}
|
||||||
|
|
||||||
|
var draggingRow = this.data[this.draggingIndex];
|
||||||
|
var droppedIndex = newData.indexOf(this.data[this.draggingIndex]);
|
||||||
|
var droppedRow = this.data[droppedIndex];
|
||||||
|
var index = this.options.data.indexOf(this.data[droppedIndex]);
|
||||||
|
this.options.data.splice(this.options.data.indexOf(draggingRow), 1);
|
||||||
|
this.options.data.splice(index, 0, draggingRow); // Call the user defined function
|
||||||
|
|
||||||
|
this.options.onReorderRowsDrop(droppedRow); // Call the event reorder-row
|
||||||
|
|
||||||
|
this.trigger('reorder-row', newData);
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
|
||||||
|
return _class;
|
||||||
|
}($.BootstrapTable);
|
||||||
|
|
||||||
|
})));
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.reorder_rows_onDragClass td{background-color:#eee;-webkit-box-shadow:11px 5px 12px 2px #333,0 1px 0 #ccc inset,0 -1px 0 #ccc inset;-webkit-box-shadow:6px 3px 5px #555,0 1px 0 #ccc inset,0 -1px 0 #ccc inset;-moz-box-shadow:6px 4px 5px 1px #555,0 1px 0 #ccc inset,0 -1px 0 #ccc inset;-box-shadow:6px 4px 5px 1px #555,0 1px 0 #ccc inset,0 -1px 0 #ccc inset}.reorder_rows_onDragClass td:last-child{-webkit-box-shadow:8px 7px 12px 0 #333,0 1px 0 #ccc inset,0 -1px 0 #ccc inset;-webkit-box-shadow:1px 8px 6px -4px #555,0 1px 0 #ccc inset,0 -1px 0 #ccc inset;-moz-box-shadow:0 9px 4px -4px #555,0 1px 0 #ccc inset,0 -1px 0 #ccc inset,-1px 0 0 #ccc inset;-box-shadow:0 9px 4px -4px #555,0 1px 0 #ccc inset,0 -1px 0 #ccc inset,-1px 0 0 #ccc inset}
|
||||||
File diff suppressed because one or more lines are too long
716
server/src/main/resources/static/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js
vendored
Normal file
716
server/src/main/resources/static/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js
vendored
Normal file
|
|
@ -0,0 +1,716 @@
|
||||||
|
(function (global, factory) {
|
||||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
||||||
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||||
|
(global = global || self, factory(global.jQuery));
|
||||||
|
}(this, (function ($) { 'use strict';
|
||||||
|
|
||||||
|
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||||
|
|
||||||
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||||
|
|
||||||
|
function createCommonjsModule(fn, module) {
|
||||||
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||||
|
}
|
||||||
|
|
||||||
|
var check = function (it) {
|
||||||
|
return it && it.Math == Math && it;
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||||
|
var global_1 =
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
check(typeof globalThis == 'object' && globalThis) ||
|
||||||
|
check(typeof window == 'object' && window) ||
|
||||||
|
check(typeof self == 'object' && self) ||
|
||||||
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
||||||
|
// eslint-disable-next-line no-new-func
|
||||||
|
Function('return this')();
|
||||||
|
|
||||||
|
var fails = function (exec) {
|
||||||
|
try {
|
||||||
|
return !!exec();
|
||||||
|
} catch (error) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Thank's IE8 for his funny defineProperty
|
||||||
|
var descriptors = !fails(function () {
|
||||||
|
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
||||||
|
});
|
||||||
|
|
||||||
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
||||||
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||||
|
|
||||||
|
// Nashorn ~ JDK8 bug
|
||||||
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
||||||
|
|
||||||
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
||||||
|
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
||||||
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
||||||
|
return !!descriptor && descriptor.enumerable;
|
||||||
|
} : nativePropertyIsEnumerable;
|
||||||
|
|
||||||
|
var objectPropertyIsEnumerable = {
|
||||||
|
f: f
|
||||||
|
};
|
||||||
|
|
||||||
|
var createPropertyDescriptor = function (bitmap, value) {
|
||||||
|
return {
|
||||||
|
enumerable: !(bitmap & 1),
|
||||||
|
configurable: !(bitmap & 2),
|
||||||
|
writable: !(bitmap & 4),
|
||||||
|
value: value
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var toString = {}.toString;
|
||||||
|
|
||||||
|
var classofRaw = function (it) {
|
||||||
|
return toString.call(it).slice(8, -1);
|
||||||
|
};
|
||||||
|
|
||||||
|
var split = ''.split;
|
||||||
|
|
||||||
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||||
|
var indexedObject = fails(function () {
|
||||||
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
||||||
|
// eslint-disable-next-line no-prototype-builtins
|
||||||
|
return !Object('z').propertyIsEnumerable(0);
|
||||||
|
}) ? function (it) {
|
||||||
|
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
||||||
|
} : Object;
|
||||||
|
|
||||||
|
// `RequireObjectCoercible` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
||||||
|
var requireObjectCoercible = function (it) {
|
||||||
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||||
|
return it;
|
||||||
|
};
|
||||||
|
|
||||||
|
// toObject with fallback for non-array-like ES3 strings
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var toIndexedObject = function (it) {
|
||||||
|
return indexedObject(requireObjectCoercible(it));
|
||||||
|
};
|
||||||
|
|
||||||
|
var isObject = function (it) {
|
||||||
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||||
|
};
|
||||||
|
|
||||||
|
// `ToPrimitive` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
||||||
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||||
|
// and the second argument - flag - preferred type is a string
|
||||||
|
var toPrimitive = function (input, PREFERRED_STRING) {
|
||||||
|
if (!isObject(input)) return input;
|
||||||
|
var fn, val;
|
||||||
|
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||||
|
throw TypeError("Can't convert object to primitive value");
|
||||||
|
};
|
||||||
|
|
||||||
|
var hasOwnProperty = {}.hasOwnProperty;
|
||||||
|
|
||||||
|
var has = function (it, key) {
|
||||||
|
return hasOwnProperty.call(it, key);
|
||||||
|
};
|
||||||
|
|
||||||
|
var document = global_1.document;
|
||||||
|
// typeof document.createElement is 'object' in old IE
|
||||||
|
var EXISTS = isObject(document) && isObject(document.createElement);
|
||||||
|
|
||||||
|
var documentCreateElement = function (it) {
|
||||||
|
return EXISTS ? document.createElement(it) : {};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Thank's IE8 for his funny defineProperty
|
||||||
|
var ie8DomDefine = !descriptors && !fails(function () {
|
||||||
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
||||||
|
get: function () { return 7; }
|
||||||
|
}).a != 7;
|
||||||
|
});
|
||||||
|
|
||||||
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||||
|
|
||||||
|
// `Object.getOwnPropertyDescriptor` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
||||||
|
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
||||||
|
O = toIndexedObject(O);
|
||||||
|
P = toPrimitive(P, true);
|
||||||
|
if (ie8DomDefine) try {
|
||||||
|
return nativeGetOwnPropertyDescriptor(O, P);
|
||||||
|
} catch (error) { /* empty */ }
|
||||||
|
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectGetOwnPropertyDescriptor = {
|
||||||
|
f: f$1
|
||||||
|
};
|
||||||
|
|
||||||
|
var anObject = function (it) {
|
||||||
|
if (!isObject(it)) {
|
||||||
|
throw TypeError(String(it) + ' is not an object');
|
||||||
|
} return it;
|
||||||
|
};
|
||||||
|
|
||||||
|
var nativeDefineProperty = Object.defineProperty;
|
||||||
|
|
||||||
|
// `Object.defineProperty` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
||||||
|
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
||||||
|
anObject(O);
|
||||||
|
P = toPrimitive(P, true);
|
||||||
|
anObject(Attributes);
|
||||||
|
if (ie8DomDefine) try {
|
||||||
|
return nativeDefineProperty(O, P, Attributes);
|
||||||
|
} catch (error) { /* empty */ }
|
||||||
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
||||||
|
if ('value' in Attributes) O[P] = Attributes.value;
|
||||||
|
return O;
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectDefineProperty = {
|
||||||
|
f: f$2
|
||||||
|
};
|
||||||
|
|
||||||
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
||||||
|
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
||||||
|
} : function (object, key, value) {
|
||||||
|
object[key] = value;
|
||||||
|
return object;
|
||||||
|
};
|
||||||
|
|
||||||
|
var setGlobal = function (key, value) {
|
||||||
|
try {
|
||||||
|
createNonEnumerableProperty(global_1, key, value);
|
||||||
|
} catch (error) {
|
||||||
|
global_1[key] = value;
|
||||||
|
} return value;
|
||||||
|
};
|
||||||
|
|
||||||
|
var SHARED = '__core-js_shared__';
|
||||||
|
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
||||||
|
|
||||||
|
var sharedStore = store;
|
||||||
|
|
||||||
|
var functionToString = Function.toString;
|
||||||
|
|
||||||
|
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
||||||
|
if (typeof sharedStore.inspectSource != 'function') {
|
||||||
|
sharedStore.inspectSource = function (it) {
|
||||||
|
return functionToString.call(it);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var inspectSource = sharedStore.inspectSource;
|
||||||
|
|
||||||
|
var WeakMap = global_1.WeakMap;
|
||||||
|
|
||||||
|
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
||||||
|
|
||||||
|
var shared = createCommonjsModule(function (module) {
|
||||||
|
(module.exports = function (key, value) {
|
||||||
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
||||||
|
})('versions', []).push({
|
||||||
|
version: '3.6.0',
|
||||||
|
mode: 'global',
|
||||||
|
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var id = 0;
|
||||||
|
var postfix = Math.random();
|
||||||
|
|
||||||
|
var uid = function (key) {
|
||||||
|
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
||||||
|
};
|
||||||
|
|
||||||
|
var keys = shared('keys');
|
||||||
|
|
||||||
|
var sharedKey = function (key) {
|
||||||
|
return keys[key] || (keys[key] = uid(key));
|
||||||
|
};
|
||||||
|
|
||||||
|
var hiddenKeys = {};
|
||||||
|
|
||||||
|
var WeakMap$1 = global_1.WeakMap;
|
||||||
|
var set, get, has$1;
|
||||||
|
|
||||||
|
var enforce = function (it) {
|
||||||
|
return has$1(it) ? get(it) : set(it, {});
|
||||||
|
};
|
||||||
|
|
||||||
|
var getterFor = function (TYPE) {
|
||||||
|
return function (it) {
|
||||||
|
var state;
|
||||||
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
||||||
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
||||||
|
} return state;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (nativeWeakMap) {
|
||||||
|
var store$1 = new WeakMap$1();
|
||||||
|
var wmget = store$1.get;
|
||||||
|
var wmhas = store$1.has;
|
||||||
|
var wmset = store$1.set;
|
||||||
|
set = function (it, metadata) {
|
||||||
|
wmset.call(store$1, it, metadata);
|
||||||
|
return metadata;
|
||||||
|
};
|
||||||
|
get = function (it) {
|
||||||
|
return wmget.call(store$1, it) || {};
|
||||||
|
};
|
||||||
|
has$1 = function (it) {
|
||||||
|
return wmhas.call(store$1, it);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
var STATE = sharedKey('state');
|
||||||
|
hiddenKeys[STATE] = true;
|
||||||
|
set = function (it, metadata) {
|
||||||
|
createNonEnumerableProperty(it, STATE, metadata);
|
||||||
|
return metadata;
|
||||||
|
};
|
||||||
|
get = function (it) {
|
||||||
|
return has(it, STATE) ? it[STATE] : {};
|
||||||
|
};
|
||||||
|
has$1 = function (it) {
|
||||||
|
return has(it, STATE);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var internalState = {
|
||||||
|
set: set,
|
||||||
|
get: get,
|
||||||
|
has: has$1,
|
||||||
|
enforce: enforce,
|
||||||
|
getterFor: getterFor
|
||||||
|
};
|
||||||
|
|
||||||
|
var redefine = createCommonjsModule(function (module) {
|
||||||
|
var getInternalState = internalState.get;
|
||||||
|
var enforceInternalState = internalState.enforce;
|
||||||
|
var TEMPLATE = String(String).split('String');
|
||||||
|
|
||||||
|
(module.exports = function (O, key, value, options) {
|
||||||
|
var unsafe = options ? !!options.unsafe : false;
|
||||||
|
var simple = options ? !!options.enumerable : false;
|
||||||
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
||||||
|
if (typeof value == 'function') {
|
||||||
|
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
||||||
|
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
||||||
|
}
|
||||||
|
if (O === global_1) {
|
||||||
|
if (simple) O[key] = value;
|
||||||
|
else setGlobal(key, value);
|
||||||
|
return;
|
||||||
|
} else if (!unsafe) {
|
||||||
|
delete O[key];
|
||||||
|
} else if (!noTargetGet && O[key]) {
|
||||||
|
simple = true;
|
||||||
|
}
|
||||||
|
if (simple) O[key] = value;
|
||||||
|
else createNonEnumerableProperty(O, key, value);
|
||||||
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
||||||
|
})(Function.prototype, 'toString', function toString() {
|
||||||
|
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var path = global_1;
|
||||||
|
|
||||||
|
var aFunction = function (variable) {
|
||||||
|
return typeof variable == 'function' ? variable : undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
var getBuiltIn = function (namespace, method) {
|
||||||
|
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
||||||
|
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
||||||
|
};
|
||||||
|
|
||||||
|
var ceil = Math.ceil;
|
||||||
|
var floor = Math.floor;
|
||||||
|
|
||||||
|
// `ToInteger` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
||||||
|
var toInteger = function (argument) {
|
||||||
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
||||||
|
};
|
||||||
|
|
||||||
|
var min = Math.min;
|
||||||
|
|
||||||
|
// `ToLength` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-tolength
|
||||||
|
var toLength = function (argument) {
|
||||||
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
||||||
|
};
|
||||||
|
|
||||||
|
var max = Math.max;
|
||||||
|
var min$1 = Math.min;
|
||||||
|
|
||||||
|
// Helper for a popular repeating case of the spec:
|
||||||
|
// Let integer be ? ToInteger(index).
|
||||||
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
||||||
|
var toAbsoluteIndex = function (index, length) {
|
||||||
|
var integer = toInteger(index);
|
||||||
|
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
||||||
|
};
|
||||||
|
|
||||||
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
||||||
|
var createMethod = function (IS_INCLUDES) {
|
||||||
|
return function ($this, el, fromIndex) {
|
||||||
|
var O = toIndexedObject($this);
|
||||||
|
var length = toLength(O.length);
|
||||||
|
var index = toAbsoluteIndex(fromIndex, length);
|
||||||
|
var value;
|
||||||
|
// Array#includes uses SameValueZero equality algorithm
|
||||||
|
// eslint-disable-next-line no-self-compare
|
||||||
|
if (IS_INCLUDES && el != el) while (length > index) {
|
||||||
|
value = O[index++];
|
||||||
|
// eslint-disable-next-line no-self-compare
|
||||||
|
if (value != value) return true;
|
||||||
|
// Array#indexOf ignores holes, Array#includes - not
|
||||||
|
} else for (;length > index; index++) {
|
||||||
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
||||||
|
} return !IS_INCLUDES && -1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var arrayIncludes = {
|
||||||
|
// `Array.prototype.includes` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
||||||
|
includes: createMethod(true),
|
||||||
|
// `Array.prototype.indexOf` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
||||||
|
indexOf: createMethod(false)
|
||||||
|
};
|
||||||
|
|
||||||
|
var indexOf = arrayIncludes.indexOf;
|
||||||
|
|
||||||
|
|
||||||
|
var objectKeysInternal = function (object, names) {
|
||||||
|
var O = toIndexedObject(object);
|
||||||
|
var i = 0;
|
||||||
|
var result = [];
|
||||||
|
var key;
|
||||||
|
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
||||||
|
// Don't enum bug & hidden keys
|
||||||
|
while (names.length > i) if (has(O, key = names[i++])) {
|
||||||
|
~indexOf(result, key) || result.push(key);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
// IE8- don't enum bug keys
|
||||||
|
var enumBugKeys = [
|
||||||
|
'constructor',
|
||||||
|
'hasOwnProperty',
|
||||||
|
'isPrototypeOf',
|
||||||
|
'propertyIsEnumerable',
|
||||||
|
'toLocaleString',
|
||||||
|
'toString',
|
||||||
|
'valueOf'
|
||||||
|
];
|
||||||
|
|
||||||
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
||||||
|
|
||||||
|
// `Object.getOwnPropertyNames` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
||||||
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
||||||
|
return objectKeysInternal(O, hiddenKeys$1);
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectGetOwnPropertyNames = {
|
||||||
|
f: f$3
|
||||||
|
};
|
||||||
|
|
||||||
|
var f$4 = Object.getOwnPropertySymbols;
|
||||||
|
|
||||||
|
var objectGetOwnPropertySymbols = {
|
||||||
|
f: f$4
|
||||||
|
};
|
||||||
|
|
||||||
|
// all object keys, includes non-enumerable and symbols
|
||||||
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
||||||
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
||||||
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
||||||
|
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
||||||
|
};
|
||||||
|
|
||||||
|
var copyConstructorProperties = function (target, source) {
|
||||||
|
var keys = ownKeys(source);
|
||||||
|
var defineProperty = objectDefineProperty.f;
|
||||||
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
||||||
|
for (var i = 0; i < keys.length; i++) {
|
||||||
|
var key = keys[i];
|
||||||
|
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var replacement = /#|\.prototype\./;
|
||||||
|
|
||||||
|
var isForced = function (feature, detection) {
|
||||||
|
var value = data[normalize(feature)];
|
||||||
|
return value == POLYFILL ? true
|
||||||
|
: value == NATIVE ? false
|
||||||
|
: typeof detection == 'function' ? fails(detection)
|
||||||
|
: !!detection;
|
||||||
|
};
|
||||||
|
|
||||||
|
var normalize = isForced.normalize = function (string) {
|
||||||
|
return String(string).replace(replacement, '.').toLowerCase();
|
||||||
|
};
|
||||||
|
|
||||||
|
var data = isForced.data = {};
|
||||||
|
var NATIVE = isForced.NATIVE = 'N';
|
||||||
|
var POLYFILL = isForced.POLYFILL = 'P';
|
||||||
|
|
||||||
|
var isForced_1 = isForced;
|
||||||
|
|
||||||
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
options.target - name of the target object
|
||||||
|
options.global - target is the global object
|
||||||
|
options.stat - export as static methods of target
|
||||||
|
options.proto - export as prototype methods of target
|
||||||
|
options.real - real prototype method for the `pure` version
|
||||||
|
options.forced - export even if the native feature is available
|
||||||
|
options.bind - bind methods to the target, required for the `pure` version
|
||||||
|
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
||||||
|
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
||||||
|
options.sham - add a flag to not completely full polyfills
|
||||||
|
options.enumerable - export as enumerable property
|
||||||
|
options.noTargetGet - prevent calling a getter on target
|
||||||
|
*/
|
||||||
|
var _export = function (options, source) {
|
||||||
|
var TARGET = options.target;
|
||||||
|
var GLOBAL = options.global;
|
||||||
|
var STATIC = options.stat;
|
||||||
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
||||||
|
if (GLOBAL) {
|
||||||
|
target = global_1;
|
||||||
|
} else if (STATIC) {
|
||||||
|
target = global_1[TARGET] || setGlobal(TARGET, {});
|
||||||
|
} else {
|
||||||
|
target = (global_1[TARGET] || {}).prototype;
|
||||||
|
}
|
||||||
|
if (target) for (key in source) {
|
||||||
|
sourceProperty = source[key];
|
||||||
|
if (options.noTargetGet) {
|
||||||
|
descriptor = getOwnPropertyDescriptor$1(target, key);
|
||||||
|
targetProperty = descriptor && descriptor.value;
|
||||||
|
} else targetProperty = target[key];
|
||||||
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
||||||
|
// contained in target
|
||||||
|
if (!FORCED && targetProperty !== undefined) {
|
||||||
|
if (typeof sourceProperty === typeof targetProperty) continue;
|
||||||
|
copyConstructorProperties(sourceProperty, targetProperty);
|
||||||
|
}
|
||||||
|
// add a flag to not completely full polyfills
|
||||||
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
||||||
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
||||||
|
}
|
||||||
|
// extend global
|
||||||
|
redefine(target, key, sourceProperty, options);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// `IsArray` abstract operation
|
||||||
|
// https://tc39.github.io/ecma262/#sec-isarray
|
||||||
|
var isArray = Array.isArray || function isArray(arg) {
|
||||||
|
return classofRaw(arg) == 'Array';
|
||||||
|
};
|
||||||
|
|
||||||
|
var createProperty = function (object, key, value) {
|
||||||
|
var propertyKey = toPrimitive(key);
|
||||||
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
||||||
|
else object[propertyKey] = value;
|
||||||
|
};
|
||||||
|
|
||||||
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
||||||
|
// Chrome 38 Symbol has incorrect toString conversion
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
return !String(Symbol());
|
||||||
|
});
|
||||||
|
|
||||||
|
var useSymbolAsUid = nativeSymbol
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
&& !Symbol.sham
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
&& typeof Symbol() == 'symbol';
|
||||||
|
|
||||||
|
var WellKnownSymbolsStore = shared('wks');
|
||||||
|
var Symbol$1 = global_1.Symbol;
|
||||||
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
||||||
|
|
||||||
|
var wellKnownSymbol = function (name) {
|
||||||
|
if (!has(WellKnownSymbolsStore, name)) {
|
||||||
|
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
|
||||||
|
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
||||||
|
} return WellKnownSymbolsStore[name];
|
||||||
|
};
|
||||||
|
|
||||||
|
var userAgent = getBuiltIn('navigator', 'userAgent') || '';
|
||||||
|
|
||||||
|
var process = global_1.process;
|
||||||
|
var versions = process && process.versions;
|
||||||
|
var v8 = versions && versions.v8;
|
||||||
|
var match, version;
|
||||||
|
|
||||||
|
if (v8) {
|
||||||
|
match = v8.split('.');
|
||||||
|
version = match[0] + match[1];
|
||||||
|
} else if (userAgent) {
|
||||||
|
match = userAgent.match(/Edge\/(\d+)/);
|
||||||
|
if (!match || match[1] >= 74) {
|
||||||
|
match = userAgent.match(/Chrome\/(\d+)/);
|
||||||
|
if (match) version = match[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var v8Version = version && +version;
|
||||||
|
|
||||||
|
var SPECIES = wellKnownSymbol('species');
|
||||||
|
|
||||||
|
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
||||||
|
// We can't use this feature detection in V8 since it causes
|
||||||
|
// deoptimization and serious performance degradation
|
||||||
|
// https://github.com/zloirock/core-js/issues/677
|
||||||
|
return v8Version >= 51 || !fails(function () {
|
||||||
|
var array = [];
|
||||||
|
var constructor = array.constructor = {};
|
||||||
|
constructor[SPECIES] = function () {
|
||||||
|
return { foo: 1 };
|
||||||
|
};
|
||||||
|
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var SPECIES$1 = wellKnownSymbol('species');
|
||||||
|
var nativeSlice = [].slice;
|
||||||
|
var max$1 = Math.max;
|
||||||
|
|
||||||
|
// `Array.prototype.slice` method
|
||||||
|
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
|
||||||
|
// fallback for not array-like ES3 strings and DOM objects
|
||||||
|
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
|
||||||
|
slice: function slice(start, end) {
|
||||||
|
var O = toIndexedObject(this);
|
||||||
|
var length = toLength(O.length);
|
||||||
|
var k = toAbsoluteIndex(start, length);
|
||||||
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
||||||
|
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
||||||
|
var Constructor, result, n;
|
||||||
|
if (isArray(O)) {
|
||||||
|
Constructor = O.constructor;
|
||||||
|
// cross-realm fallback
|
||||||
|
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
|
||||||
|
Constructor = undefined;
|
||||||
|
} else if (isObject(Constructor)) {
|
||||||
|
Constructor = Constructor[SPECIES$1];
|
||||||
|
if (Constructor === null) Constructor = undefined;
|
||||||
|
}
|
||||||
|
if (Constructor === Array || Constructor === undefined) {
|
||||||
|
return nativeSlice.call(O, k, fin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
|
||||||
|
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
||||||
|
result.length = n;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Dennis Hernández
|
||||||
|
* @webSite: http://djhvscf.github.io/Blog
|
||||||
|
* @version: v2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
var isInit = function isInit(that) {
|
||||||
|
return that.$el.data('resizableColumns') !== undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
var initResizable = function initResizable(that) {
|
||||||
|
if (that.options.resizable && !that.options.cardView && !isInit(that)) {
|
||||||
|
that.$el.resizableColumns({
|
||||||
|
store: window.store
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var destroy = function destroy(that) {
|
||||||
|
if (isInit(that)) {
|
||||||
|
that.$el.data('resizableColumns').destroy();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var reInitResizable = function reInitResizable(that) {
|
||||||
|
destroy(that);
|
||||||
|
initResizable(that);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.bootstrapTable.defaults, {
|
||||||
|
resizable: false
|
||||||
|
});
|
||||||
|
var BootstrapTable = $.fn.bootstrapTable.Constructor;
|
||||||
|
var _initBody = BootstrapTable.prototype.initBody;
|
||||||
|
var _toggleView = BootstrapTable.prototype.toggleView;
|
||||||
|
var _resetView = BootstrapTable.prototype.resetView;
|
||||||
|
|
||||||
|
BootstrapTable.prototype.initBody = function () {
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
|
args[_key] = arguments[_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
_initBody.apply(this, Array.prototype.slice.apply(args));
|
||||||
|
|
||||||
|
that.$el.off('column-switch.bs.table page-change.bs.table').on('column-switch.bs.table page-change.bs.table', function () {
|
||||||
|
reInitResizable(that);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
BootstrapTable.prototype.toggleView = function () {
|
||||||
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||||
|
args[_key2] = arguments[_key2];
|
||||||
|
}
|
||||||
|
|
||||||
|
_toggleView.apply(this, Array.prototype.slice.apply(args));
|
||||||
|
|
||||||
|
if (this.options.resizable && this.options.cardView) {
|
||||||
|
// Destroy the plugin
|
||||||
|
destroy(this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
BootstrapTable.prototype.resetView = function () {
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
||||||
|
args[_key3] = arguments[_key3];
|
||||||
|
}
|
||||||
|
|
||||||
|
_resetView.apply(this, Array.prototype.slice.apply(args));
|
||||||
|
|
||||||
|
if (this.options.resizable) {
|
||||||
|
// because in fitHeader function, we use setTimeout(func, 100);
|
||||||
|
setTimeout(function () {
|
||||||
|
initResizable(that);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
})));
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,21 @@
|
||||||
|
/**
|
||||||
|
* @author vincent loh <vincent.ml@gmail.com>
|
||||||
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
||||||
|
*/
|
||||||
|
.fix-sticky {
|
||||||
|
position: fixed !important;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fix-sticky table thead {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fix-sticky table thead.thead-light {
|
||||||
|
background: #e9ecef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fix-sticky table thead.thead-dark {
|
||||||
|
background: #212529;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
|
||||||
|
*
|
||||||
|
* @version v1.16.0
|
||||||
|
* @homepage https://bootstrap-table.com
|
||||||
|
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.fix-sticky{position:fixed!important;overflow:hidden;z-index:100}.fix-sticky table thead{background:#fff}.fix-sticky table thead.thead-light{background:#e9ecef}.fix-sticky table thead.thead-dark{background:#212529}
|
||||||
File diff suppressed because one or more lines are too long
2547
server/src/main/resources/static/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js
vendored
Normal file
2547
server/src/main/resources/static/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1910
server/src/main/resources/static/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js
vendored
Normal file
1910
server/src/main/resources/static/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue