Browse Source

Merge branch 'master' into make-loading-image-accessible-from-api

master
Dushusir 4 years ago
committed by GitHub
parent
commit
62e23d0b6f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintignore
  2. 30
      .github/ISSUE_TEMPLATE/bug_report.md
  3. 30
      .github/ISSUE_TEMPLATE/bug_report_zh.md
  4. 12
      .github/ISSUE_TEMPLATE/feature_request.md
  5. 13
      .github/ISSUE_TEMPLATE/feature_request_zh.md
  6. 4
      .gitignore
  7. 10
      docs/guide/config.md
  8. 12
      docs/zh/guide/config.md
  9. 4
      docs/zh/guide/sheet.md
  10. 10
      gulpfile.js
  11. 11
      src/controllers/constant.js
  12. 42
      src/controllers/dataVerificationCtrl.js
  13. 22
      src/controllers/handler.js
  14. 7
      src/controllers/luckysheetConfigsetting.js
  15. 2
      src/controllers/protection.js
  16. 13
      src/controllers/resize.js
  17. 43
      src/controllers/rowColumnOperation.js
  18. 4
      src/controllers/select.js
  19. 11
      src/controllers/selection.js
  20. 72
      src/controllers/server.js
  21. 1
      src/controllers/toolbar.js
  22. 2
      src/controllers/updateCell.js
  23. 3
      src/core.js
  24. 35
      src/css/luckysheet-core.css
  25. 37
      src/function/functionImplementation.js
  26. 110
      src/global/api.js
  27. 2
      src/global/draw.js
  28. 16
      src/global/formula.js
  29. 114
      src/global/getRowlen.js
  30. 23
      src/global/location.js
  31. 21
      src/global/rhchInit.js
  32. 8
      src/index.html
  33. 23
      src/locale/en.js
  34. 1
      src/locale/es.js
  35. 1
      src/locale/zh.js
  36. 1
      src/locale/zh_tw.js
  37. 178
      yarn.lock

1
.eslintignore

@ -0,0 +1 @@
src

30
.github/ISSUE_TEMPLATE/bug_report.md

@ -7,26 +7,32 @@ assignees: ''
---
<!--- Thank you for your attention and submit the issue, we hope that besides submitting the issue, you can also help us to understand your user case of Luckysheet, please help fill out the following solicitation form -->
<!-- Wanted: Who is using Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
<!-- The following is the issues template -->
**Describe the bug**
A clear and concise description of what the bug is.
<!--- A clear and concise description of what the bug is. -->
**To Reproduce**
Steps to reproduce the behavior:
1. The first step
2. The second step
3. The third step
4. See error
<!--- Steps to reproduce the behavior. -->
1. The first step:
2. The second step:
3. The third step:
4. See error:
**What is expected?**
A clear and concise description of what you expected to happen.
<!--- A clear and concise description of what you expected to happen. -->
**Screenshots or demo**
If applicable, add screenshots or online demo to help explain your problem.We will be more accurate when we retest.
<!--- If applicable, add screenshots or online demo to help explain your problem.We will be more accurate when we retest. -->
**Environment**
- OS: [e.g. Windows,Mac,Linux]
- Browser Version: [e.g. Chrome Version 84.0.4147.105 (Official Build) (64-bit), Safari,Firefox,Edge]
- Luckysheet Version: [e.g. 1.0.1,latest]
- OS: <!--- [e.g. Windows,Mac,Linux] -->
- Browser Version: <!---[e.g. Chrome Version 84.0.4147.105 (Official Build) (64-bit), Safari,Firefox,Edge] -->
- Luckysheet Version: <!---[e.g. 1.0.1,latest] -->
**Additional context**
Add any other context about the problem here.
<!--- Add any other context about the problem here. -->

30
.github/ISSUE_TEMPLATE/bug_report_zh.md

@ -7,26 +7,32 @@ assignees: ''
---
<!--- 感谢您的关注并发现问题,我们希望除了提交问题,还能帮助我们对您使用Luckysheet做进一步的了解,请帮忙填写以下征集表 -->
<!-- 征求:谁在使用Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
<!-- 以下是issues正文模板 -->
**描述错误**
清楚简洁地描述错误是什么。
<!--- 清楚简洁地描述错误是什么 -->
**重现**
重现错误的步骤:
1.第一步操作
2.第二步操作
3.第三步操作
4.最后看到了什么错误
<!--- 重现错误的步骤 -->
1. 第一步操作:
2. 第二步操作:
3. 第三步操作:
4. 最后看到了什么错误:
**期望的结果**
对您期望发生的结果简洁明了的描述。
<!--- 对您期望发生的结果简洁明了的描述 -->
**屏幕截图或演示**
方便的话,贴上屏幕截图或在线链接复现问题,我们复测时会更精准
<!--- 方便的话,贴上屏幕截图或在线链接复现问题,我们复测时会更精准 -->
**环境:**
-操作系统:[例如 Windows,Mac,Linux]
-浏览器 版本号:[例如 Chrome 版本 84.0.4147.105(正式版本) (64 位),Safari,Firefox,Edge]
-Luckysheet版本:[例如 1.0.1,最新]
- 操作系统:<!--- [例如 Windows,Mac,Linux] -->
- 浏览器 版本号:<!--- [例如 Chrome 版本 84.0.4147.105(正式版本) (64 位),Safari,Firefox,Edge] -->
- Luckysheet版本:<!--- [例如 1.0.1,最新] -->
**备注**
其他说明
<!--- 其他说明 -->

12
.github/ISSUE_TEMPLATE/feature_request.md

@ -7,11 +7,17 @@ assignees: ''
---
<!--- Thank you for your attention and submit the issue, we hope that besides submitting the issue, you can also help us to understand your user case of Luckysheet, please help fill out the following solicitation form -->
<!-- Wanted: Who is using Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
<!-- The following is the issues template -->
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
<!--- A clear and concise description of what the problem is. -->
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
<!--- A clear and concise description of what you want to happen. -->
**Additional context**
Add any other context or screenshots about the feature request here.
<!--- Add any other context or screenshots about the feature request here. -->

13
.github/ISSUE_TEMPLATE/feature_request_zh.md

@ -7,11 +7,18 @@ assignees: ''
---
<!--- 感谢您的关注并发现问题,我们希望除了提交问题,还能帮助我们对您使用Luckysheet做进一步的了解,请帮忙填写以下征集表 -->
<!-- 征求:谁在使用Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
<!-- 以下是issues正文模板 -->
**您的功能请求与问题有关吗?**
清楚简洁地说明问题。
<!--- 清楚简洁地说明问题 -->
**描述您想要的解决方案**
对您想要的功能效果简洁明了的描述。
<!--- 对您想要的功能效果简洁明了的描述 -->
**其他内容**
其他说明
<!--- 其他说明 -->

4
.gitignore

@ -2,4 +2,6 @@
node_modules
package-lock.json
dist
docs/.vuepress/dist
docs/.vuepress/dist
.idea

10
docs/guide/config.md

@ -1169,6 +1169,16 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura
------------
## Cooperative
### cooperativeMessage
- Type:Function
- Default:null
- Usage:Receive the cooperation message, secondary development. Expanding cooperative message instruction set
- Params:
- {Object} : Receives the entire collaboration message body object sent by the server
## Image
### imageInsertBefore

12
docs/zh/guide/config.md

@ -1470,6 +1470,18 @@ Luckysheet开放了更细致的自定义配置选项,分别有
- {Number} [canvasHeight]: 滚动容器的高度
------------
## 协作消息
### cooperativeMessage
- 类型:Function
- 默认值:null
- 作用:接受协作消息,二次开发。拓展协作消息指令集
- 参数:
- {Object} : 收到服务器发送的整个协作消息体对象
## 图片
### imageInsertBefore

4
docs/zh/guide/sheet.md

@ -1344,8 +1344,10 @@ options.data示例如下:
+ `"date"`(日期)
+ `"validity"`(有效性);
+ {String | Null} [type2]: 条件类型;
+ 类型`type`值为`"dropdown"/"checkbox"`时,`type2`值可为
+ 类型`type`值为`"checkbox"`时,`type2`值可为
+ `null`
+ 类型`type`值为`"dropdown"`时,`type2`值可为
+ `true` (多选) `false` (单选)
+ 类型`type`值为`"number"/"number_integer"/"number_decimal"/"text_length"`时,`type2`值可为
+ `"bw"`(介于)
+ `"nb"`(不介于)

10
gulpfile.js

@ -32,6 +32,13 @@ const babel = require('@rollup/plugin-babel').default;
// Distinguish development and production environments
const production = process.env.NODE_ENV === 'production' ? true : false;
const pkg = require('./package.json');
const banner = `/*! @preserve
* ${pkg.name}
* version: ${pkg.version}
* https://github.com/mengshukeji/Luckysheet
*/`;
// uglify js Compression configuration https://github.com/mishoo/UglifyJS#minify-options
const uglifyOptions = {
compress: {
@ -192,7 +199,7 @@ async function core() {
name: 'luckysheet',
sourcemap: true,
inlineDynamicImports:true,
banner: banner
});
if(production){
@ -202,6 +209,7 @@ async function core() {
name: 'luckysheet',
sourcemap: true,
inlineDynamicImports:true,
banner: banner
});
}

11
src/controllers/constant.js

@ -45,7 +45,7 @@ const gridHTML = function(){
</div>
</div>
<div class="luckysheet-wa-calculate-help-tool">
<i class="fa fa-caret-down" aria-hidden="true" style="margin-top: 7px;"></i>
<i class="fa fa-caret-down" aria-hidden="true"></i>
</div>
</div>
<div id="luckysheet-wa-functionbox-cancel" class="luckysheet-wa-functionbox">
@ -289,6 +289,14 @@ function rightclickHTML(){
dataMenuseparator = false;
}
const customsButtons = (config.customs || [{title: 'test'}]).map((item, index) => `
<div data-index="${index}" class="luckysheetColsRowsHandleAdd_custom luckysheet-cols-menuitem luckysheet-mousedown-cancel">
<div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">
${item.title}
</div>
</div>`
).join("");
const rightclickContainer = `<div id="luckysheet-rightclick-menu" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-mousedown-cancel">
<div id="luckysheet-copy-btn" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel luckysheet-copy-btn" data-clipboard-action="copy" data-clipboard-target="#luckysheet-copy-content" style="display:${config.copy ? 'block' : 'none'};">
<div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${rightclick.copy}</div>
@ -423,6 +431,7 @@ function rightclickHTML(){
<div id="luckysheetCellFormatRightClickMenu" class="luckysheet-cols-menuitem luckysheet-mousedown-cancel" style="display:${config.cellFormat ? 'block' : 'none'};">
<div class="luckysheet-cols-menuitem-content luckysheet-mousedown-cancel">${toolbar.cellFormat}</div>
</div>
${customsButtons}
</div>
</div>
<div id="luckysheetcopyfor_sub" class="luckysheet-cols-menu luckysheet-rightgclick-menu luckysheet-rightgclick-menu-sub luckysheet-mousedown-cancel">

42
src/controllers/dataVerificationCtrl.js

@ -114,6 +114,10 @@ const dataVerificationCtrl = {
<input class="formulaInputFocus data-verification-value1" placeholder="${dvText.placeholder1}" spellcheck="false">
<i class="fa fa-table" aria-hidden="true" title="${dvText.selectCellRange}"></i>
</div>
<div class="multi">
<input type="checkbox" id="data-verification-multi" class="data-verification-multi">
<label for="data-verification-multi">${dvText.allowMultiSelect}</label>
</div>
</div>
<div class="show-box-item show-box-item-checkbox">
<div class="check-box">
@ -257,9 +261,16 @@ const dataVerificationCtrl = {
e.stopPropagation();
});
$(document).off("click.dropdownListItem").on("click.dropdownListItem", "#luckysheet-dataVerification-dropdown-List .dropdown-List-item", function(e) {
$("#luckysheet-dataVerification-dropdown-List").hide();
var $item = $(this);
let value = e.target.innerText;
if ($item.hasClass('multi')) {
$item.toggleClass('checked');
value = $.map($("#luckysheet-dataVerification-dropdown-List").children().filter('.checked'), function(el) {
return el.innerText;
}).join(',');
} else {
$("#luckysheet-dataVerification-dropdown-List").hide();
}
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
let rowIndex = last.row_focus;
let colIndex = last.column_focus;
@ -437,6 +448,8 @@ const dataVerificationCtrl = {
}
$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val(value1);
$('#luckysheet-dataVerification-dialog #data-verification-multi').prop('checked', item.type2 ? true : false);
}
else if(value == 'checkbox'){
$("#luckysheet-dataVerification-dialog .show-box .show-box-item-checkbox").show();
@ -635,6 +648,7 @@ const dataVerificationCtrl = {
tooltip.info('<i class="fa fa-exclamation-triangle"></i>', dvText.tooltipInfo1);
return;
}
type2 = $("#luckysheet-dataVerification-dialog #data-verification-multi").is(':checked');
}
else if(type == 'checkbox'){
value1 = $("#luckysheet-dataVerification-dialog .show-box-item-checkbox .data-verification-value1").val().trim();
@ -839,6 +853,7 @@ const dataVerificationCtrl = {
if(item.type == 'dropdown'){
$("#luckysheet-dataVerification-dialog .show-box .show-box-item-dropdown").show();
$("#luckysheet-dataVerification-dialog .show-box-item-dropdown .data-verification-value1").val(item.value1);
$('#luckysheet-dataVerification-dialog #data-verification-multi').prop('checked', item.type2 ? true : false);
}
else if(item.type == 'checkbox'){
$("#luckysheet-dataVerification-dialog .show-box .show-box-item-checkbox").show();
@ -1270,6 +1285,13 @@ const dataVerificationCtrl = {
if(type == 'dropdown'){
let list = _this.getDropdownList(value1);
// 多选的情况 检查每个都在下拉列表中
if(type2 && cellValue){
return cellValue.split(',').every(function (i) {
return list.indexOf(i) !== -1;
});
}
let result = false;
for(let i = 0; i < list.length; i++){
@ -1464,9 +1486,19 @@ const dataVerificationCtrl = {
let list = _this.getDropdownList(item.value1);
let optionHtml = '';
list.forEach(i => {
optionHtml += `<div class="dropdown-List-item luckysheet-mousedown-cancel">${i}</div>`;
})
if (item.type === 'dropdown' && item.type2) {
// 下拉多选的情况下 将已经选择的标出来
let cellValue = getcellvalue(rowIndex, colIndex, null);
let valueArr = isRealNull(cellValue) ? [] : cellValue.split(',');
list.forEach(i => {
let checked = valueArr.indexOf(i) !== -1;
optionHtml += `<div class="dropdown-List-item luckysheet-mousedown-cancel multi${checked ? ' checked': ''}">${i}</div>`;
});
} else {
list.forEach(i => {
optionHtml += `<div class="dropdown-List-item luckysheet-mousedown-cancel">${i}</div>`;
});
}
$("#luckysheet-dataVerification-dropdown-List")
.html(optionHtml)

22
src/controllers/handler.js

@ -5326,7 +5326,7 @@ export default function luckysheetHandler() {
for(let c = copy_c1; c <= copy_c2; c++){
let cell = d[r][c];
let isInlineStr = false
if(cell != null && cell.mc != null && cell.mc.rs == null){
continue;
}
@ -5344,13 +5344,27 @@ export default function luckysheetHandler() {
v = "";
}
if(v == null && d[r][c] && d[r][c].ct && d[r][c].ct.t == 'inlineStr') {
v = d[r][c].ct.s.map(val=>val.v).join('');
isInlineStr = true;
}
if(v == null){
v = "";
v = "";
}
if(cpDataArr[r - copy_r1][c - copy_c1] != v){
if(isInlineStr){
const cpData = $(cpDataArr[r - copy_r1][c - copy_c1]).text().replace(/\s|\n/g,' ')
const storeValue = v.replace(/\n/g,'').replace(/\s/g,' ')
if(cpData != storeValue){
isEqual = false;
break;
}
}
else{
if(cpDataArr[r - copy_r1][c - copy_c1] != v){
isEqual = false;
break;
}
}
}
}

7
src/controllers/luckysheetConfigsetting.js

@ -22,12 +22,13 @@ const luckysheetConfigsetting = {
enableAddBackTop: true,
enablePage: true,
pageInfo: null,
editMode: false,
beforeCreateDom: null,
workbookCreateBefore: null,
workbookCreateAfter: null,
remoteFunction: null,
fireMousedown: null,
plugins:[],
forceCalculation:false,//强制刷新公式,公式较多会有性能问题,慎用
@ -39,4 +40,4 @@ const luckysheetConfigsetting = {
defaultCellColor: '#fff',
}
export default luckysheetConfigsetting;
export default luckysheetConfigsetting;

2
src/controllers/protection.js

@ -922,7 +922,7 @@ export function checkProtectionLocked(r, c, sheetIndex, isOpenAlert=true, isLock
//cell hidden state
export function checkProtectionCellHidden(r, c, sheetIndex){
let sheetFile = sheetmanage.getSheetByIndex(sheetIndex);
if(!sheetFile || !sheetFile.data[r] || !sheetFile.data[r][c]){
if(!sheetFile || (sheetFile.data && !sheetFile.data[r]) || (sheetFile.data && !sheetFile.data[r][c])){
return true;
}

13
src/controllers/resize.js

@ -117,7 +117,8 @@ export default function luckysheetsizeauto(isRefreshCanvas=true) {
const $t = $(this)[0];
const $container = $("#luckysheet-wa-editor")[0];
// $container.appendChild(document.createTextNode(" "));
$container.appendChild(document.createTextNode(" "));
$container.appendChild($t);
});
@ -392,7 +393,7 @@ export function menuToolBarWidth() {
if (JSON.stringify(showtoolbarConfig) !== '{}') {
if(showtoolbarConfig.hasOwnProperty('undoRedo')){
config.undo = config.redo = showtoolbarConfig.undoRedo;
// delete showtoolbarConfig.undoRedo;
}
Object.assign(config, showtoolbarConfig);
@ -401,10 +402,8 @@ export function menuToolBarWidth() {
for (let i = 0; i<defaultToolbar.length; i++) {
current = defaultToolbar[i];
next = defaultToolbar[i + 1];
if(config[current] === false) {
continue;
}
if (current !== '|') {
if (current !== '|' && config[current]) {
obj[current] = {
ele: toolbarIdMap[current],
index: index++
@ -605,4 +604,4 @@ function customStatisticBarConfig() {
$("#" + Store.container).find(".luckysheet-stat-area").show();
Store.statisticBarHeight = 23;
}
}
}

43
src/controllers/rowColumnOperation.js

@ -4,6 +4,7 @@ import luckysheetPostil from './postil';
import imageCtrl from './imageCtrl';
import menuButton from './menuButton';
import server from './server';
import method from '../global/method';
import { selectHightlightShow, luckysheet_count_show,selectHelpboxFill } from './select';
import {
getObjType,
@ -1103,7 +1104,10 @@ export function rowColumnOperationInitial(){
}
let st_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][0];
luckysheetextendtable(Store.luckysheetRightHeadClickIs, st_index, value, "lefttop");
if(!method.createHookFunction("rowInsertBefore", st_index, value, "lefttop")){
return;
}
luckysheetextendtable(Store.luckysheetRightHeadClickIs, st_index, value, "lefttop");
});
@ -1117,6 +1121,9 @@ export function rowColumnOperationInitial(){
}
let st_index = Store.luckysheet_select_save[0].row[0];
if(!method.createHookFunction("rowInsertBefore", st_index, 1, "lefttop")){
return;
}
luckysheetextendtable('row', st_index, 1, "lefttop");
@ -1134,6 +1141,29 @@ export function rowColumnOperationInitial(){
})
// custom right-click a cell buttton click
$(".luckysheetColsRowsHandleAdd_custom").click(function (clickEvent) {
$("#luckysheet-rightclick-menu").hide();
const cellRightClickConfig =
luckysheetConfigsetting.cellRightClickConfig;
const rowIndex = Store.luckysheet_select_save[0].row[0];
const columnIndex = Store.luckysheet_select_save[0].column[0];
if (
cellRightClickConfig.customs[
Number(clickEvent.currentTarget.dataset.index)
]
) {
try {
cellRightClickConfig.customs[
Number(clickEvent.currentTarget.dataset.index)
].onClick(clickEvent, event, { rowIndex, columnIndex });
} catch (e) {
console.error("custom click error", e);
}
}
});
// Add the row up, and click the text area to trigger the confirmation instead of clicking the confirmation button to enhance the experience
// $("#luckysheet-addTopRows").click(function (event) {
// $("#luckysheetColsRowsHandleAdd_sub .luckysheet-cols-menuitem:first-child").click(function (event) {
@ -1307,6 +1337,9 @@ export function rowColumnOperationInitial(){
}
let st_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][1];
if(!method.createHookFunction("rowInsertBefore", st_index, value, "rightbottom")){
return;
}
luckysheetextendtable(Store.luckysheetRightHeadClickIs, st_index, value, "rightbottom");
});
@ -1453,7 +1486,10 @@ export function rowColumnOperationInitial(){
let st_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][0],
ed_index = Store.luckysheet_select_save[0][Store.luckysheetRightHeadClickIs][1];
luckysheetdeletetable(Store.luckysheetRightHeadClickIs, st_index, ed_index);
if(!method.createHookFunction("rowDeleteBefore", st_index, ed_index)){
return;
}
luckysheetdeletetable(Store.luckysheetRightHeadClickIs, st_index, ed_index);
});
$("#luckysheet-delRows").click(function (event) {
$("#luckysheet-rightclick-menu").hide();
@ -1483,6 +1519,9 @@ export function rowColumnOperationInitial(){
let st_index = Store.luckysheet_select_save[0].row[0],
ed_index = Store.luckysheet_select_save[0].row[1];
if(!method.createHookFunction("rowDeleteBefore", st_index, ed_index)){
return;
}
luckysheetdeletetable('row', st_index, ed_index);
})
$("#luckysheet-delCols").click(function (event) {

4
src/controllers/select.js

@ -403,10 +403,10 @@ function collaborativeEditBox() {
if (Object.keys(range).length > 0 ) {
let flag_sure_merge = false
if(range.v.length > 1) {
flag_sure_merge = Object.keys(range.v[1][0]).length > 0
flag_sure_merge = range.v[1][0] == null || Object.keys(range.v[1][0]).length > 0
}
if(range.v[0].length > 1) {
flag_sure_merge = Object.keys(range.v[0][1]).length > 0
flag_sure_merge = range.v[0][1] == null || Object.keys(range.v[0][1]).length > 0
}
if(flag_sure_merge) {
// 合并成一个时执行

11
src/controllers/selection.js

@ -439,6 +439,17 @@ const selection = {
if(c_value == null){
c_value = getcellvalue(r, c, d);
}
if(c_value == null && d[r][c] && d[r][c].ct && d[r][c].ct.t == 'inlineStr') {
c_value = d[r][c].ct.s.map(val=>{
const font = $('<font></font>')
val.fs && font.css('font-size',val.fs)
val.bl && font.css('font-weight',val.border)
val.it && font.css('font-style',val.italic)
val.cl==1 && font.css('text-decoration','underline')
font.text(val.v)
return font[0].outerHTML
}).join('');
}
if(c_value == null){
c_value = "";

72
src/controllers/server.js

@ -20,6 +20,7 @@ import dayjs from "dayjs";
import json from '../global/json';
import luckysheetConfigsetting from './luckysheetConfigsetting';
import {customImageUpdate} from './imageUpdateCtrl';
import method from '../global/method';
const server = {
gridKey: null,
@ -99,7 +100,7 @@ const server = {
d.i = index;
d.v = value;
//切换sheet页不发后台,TODO:改为发后台+后台不广播
//切换sheet页不发后台,TODO:改为发后台+后台不广播
if(type === 'shs'){
return;
}
@ -188,7 +189,7 @@ const server = {
console.info(locale().websocket.success);
hideloading();
_this.wxErrorCount = 0;
//防止websocket长时间不发送消息导致断连
_this.retryTimer = setInterval(function(){
_this.websocket.send("rub");
@ -199,6 +200,7 @@ const server = {
_this.websocket.onmessage = function(result){
Store.result = result
let data = new Function("return " + result.data)();
method.createHookFunction('cooperativeMessage', data)
console.info(data);
let type = data.type;
let {message,id} = data;
@ -213,7 +215,19 @@ const server = {
})
}
if(type == 1){ //send 成功或失败
const oldIndex = data.data.v.index;
const sheetToUpdate = Store.luckysheetfile.filter((sheet)=> sheet.index === oldIndex)[0];
if (sheetToUpdate !== null) {
setTimeout(() => {
const index = data.data.i;
sheetToUpdate.index = index;
Store.currentSheetIndex = index;
$(`#luckysheet-sheets-item${oldIndex}`).attr('data-index', index);
$(`#luckysheet-sheets-item${oldIndex}`).prop('id', `luckysheet-sheets-item${index}`);
$(`#luckysheet-datavisual-selection-set-${oldIndex}`).prop('id', `luckysheet-datavisual-selection-set-${index}`);
}, 1);
}
}
else if(type == 2){ //更新数据
let item = JSON.parse(data.data);
@ -234,7 +248,7 @@ const server = {
value = item.v;
if(Store.cooperativeEdit.changeCollaborationSize.length === 0) {
Store.cooperativeEdit.changeCollaborationSize.push({id:id,v:item.v[0],i:index})
}
}
let flag = Store.cooperativeEdit.changeCollaborationSize.some(value1 => {
return value1.id == id
})
@ -244,10 +258,10 @@ const server = {
val.v = item.v[0]
val.i = index
}
})
})
} else {
Store.cooperativeEdit.changeCollaborationSize.push({id:id,v:item.v[0],i:index})
}
}
if(getObjType(value) != "array" && getObjType(value) !== "object"){
value = JSON.parse(value);
}
@ -259,16 +273,16 @@ const server = {
r = value.range[value.range.length - 1].row[0];
c = value.range[value.range.length - 1].column[0];
_this.multipleRangeShow(id, username, r, c, value.op);
}else {
r = value[value.length - 1].row[0];
c = value[value.length - 1].column[0];
_this.multipleRangeShow(id, username, r, c);
}
} else {
if(getObjType(value) === "object" && value.op === 'enterEdit'){
r = value.range[value.range.length - 1].row[0];
@ -331,7 +345,11 @@ const server = {
for(let i = 0; i < items.length; i++){
_this.wsUpdateMsg(item[i]);
}
}
} else if (type == 5) {
showloading(data.data);
} else if (type == 6) {
hideloading();
}
}
//通信发生错误时触发
@ -420,7 +438,7 @@ const server = {
if(index == Store.currentSheetIndex){//更新数据为当前表格数据
Store.flowdata = file.data;
editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据
//如果更新的单元格有批注
for(let r = r1; r <= r2; r++){
for(let c = c1; c <= c2; c++){
@ -452,7 +470,7 @@ const server = {
// for(let key in value){
// file["config"][k][key] = value[key];
// }
// ⚠️ 上面的处理方式会导致部分配置项被遗漏,以致协同编辑的时候多视图出现不一致的情况,调整处理的策略为直接替换配置项:
// 可能的配置项为:
// columnlen: {0: 65, 1: 186, 2: 52}
@ -695,7 +713,7 @@ const server = {
if(rc == "r"){
file["row"] += len;
//空行模板
let row = [];
for(let c = 0; c < data[0].length; c++){
@ -720,8 +738,8 @@ const server = {
new Function("data","return " + 'data.splice(' + st_i + ', 0, ' + arr.join(",") + ')')(data);
}
}
else{
new Function("data","return " + 'data.splice(' + (st_i + 1) + ', 0, ' + arr.join(",") + ')')(data);
else{
new Function("data","return " + 'data.splice(' + (st_i + 1) + ', 0, ' + arr.join(",") + ')')(data);
}
}
else{
@ -827,18 +845,18 @@ const server = {
else if(type == "shd"){ //删除sheet
for(let i = 0; i < Store.luckysheetfile.length; i++){
if(Store.luckysheetfile[i].index == value.deleIndex){
// 如果删除的是当前sheet,则切换到前一个sheet页
if(Store.currentSheetIndex === value.deleIndex){
const index = value.deleIndex;
Store.luckysheetfile[sheetmanage.getSheetIndex(index)].hide = 1;
let luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + index);
luckysheetcurrentSheetitem.hide();
$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active");
let indicator = luckysheetcurrentSheetitem.nextAll(":visible");
if (luckysheetcurrentSheetitem.nextAll(":visible").length > 0) {
indicator = indicator.eq(0).data("index");
@ -847,7 +865,7 @@ const server = {
indicator = luckysheetcurrentSheetitem.prevAll(":visible").eq(0).data("index");
}
$("#luckysheet-sheets-item" + indicator).addClass("luckysheet-sheets-item-active");
sheetmanage.changeSheetExec(indicator);
}
@ -966,12 +984,12 @@ const server = {
col = margeset.column[1];
col_pre = margeset.column[0];
}
// 超出16个字符就显示...
if(getByteLen(name) > 16){
name = getByteLen(name,16) + "...";
}
// 如果正在编辑,就显示“正在输入”
if(value === 'enterEdit'){
name += " " + locale().edit.typing;
@ -979,7 +997,7 @@ const server = {
if($("#luckysheet-multipleRange-show-" + id).length > 0){
$("#luckysheet-multipleRange-show-" + id).css({ "position": "absolute", "left": col_pre - 1, "width": col - col_pre - 1, "top": row_pre - 1, "height": row - row_pre - 1 });
$("#luckysheet-multipleRange-show-" + id + " .username").text(name);
$("#luckysheet-multipleRange-show-" + id + " .username").show();
@ -999,11 +1017,11 @@ const server = {
// '<div style="width: 100%;height: 100%;position: absolute;top: 0;right: 0;bottom: 0;left: 0;opacity: 0.03;background-color: '+ luckyColor[_this.multipleIndex] +'"></div>'+
// '</div>';
let itemHtml = `<div
let itemHtml = `<div
id="luckysheet-multipleRange-show-${id}"
class="luckysheet-multipleRange-show"
data-color="${luckyColor[_this.multipleIndex]}"
title="${name}"
data-color="${luckyColor[_this.multipleIndex]}"
title="${name}"
style="position: absolute;left: ${col_pre - 1}px;width: ${col - col_pre - 1}px;top: ${row_pre - 1}px;height: ${row - row_pre - 1}px;border: 1px solid ${luckyColor[_this.multipleIndex]};z-index: 15;">
<div class="username" style="height: 19px;line-height:19px;width: max-content;position: absolute;bottom: ${row - row_pre - 1}px;right: 0;background-color: ${luckyColor[_this.multipleIndex]};color:#ffffff;padding:0 10px;">
@ -1019,7 +1037,7 @@ const server = {
$(itemHtml).appendTo($("#luckysheet-cell-main #luckysheet-multipleRange-show"));
_this.multipleIndex++;
// 设定允许用户名消失的定时器,10秒后用户名可隐藏
// 10秒之类,用户操作界面不会隐藏用户名;10秒之后如果用户操作了界面,则隐藏用户名,没操作就不隐藏
if(Store.cooperativeEdit.usernameTimeout['user' + id] != null){

1
src/controllers/toolbar.js

@ -876,7 +876,6 @@ export function createToolbarHtml() {
if (JSON.stringify(showtoolbarConfig) !== '{}') {
if(showtoolbarConfig.hasOwnProperty('undoRedo')){
config.undo = config.redo = showtoolbarConfig.undoRedo;
// delete showtoolbarConfig.undoRedo;
}
Object.assign(config, showtoolbarConfig);
}

2
src/controllers/updateCell.js

@ -217,7 +217,7 @@ export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocu
if((value == null || value.toString() == "") && !cover){
value = "<br/>";
}
value = formula.xssDeal(value);
if(!checkProtectionCellHidden(row_index, col_index, Store.currentSheetIndex) && value.length>0 && value.substr(0, 63)=='<span dir="auto" class="luckysheet-formula-text-color">=</span>'){
$("#luckysheet-rich-text-editor").html("");
}

3
src/core.js

@ -39,6 +39,7 @@ import flatpickr from 'flatpickr'
import Mandarin from 'flatpickr/dist/l10n/zh.js'
import { initListener } from './controllers/listener';
import { hideloading, showloading } from './global/loading.js';
import { luckysheetextendData } from './global/extend.js';
let luckysheet = {};
@ -122,6 +123,7 @@ luckysheet.create = function (setting) {
luckysheetConfigsetting.beforeCreateDom = extendsetting.beforeCreateDom;
luckysheetConfigsetting.workbookCreateBefore = extendsetting.workbookCreateBefore;
luckysheetConfigsetting.workbookCreateAfter = extendsetting.workbookCreateAfter;
luckysheetConfigsetting.remoteFunction = extendsetting.remoteFunction;
luckysheetConfigsetting.fireMousedown = extendsetting.fireMousedown;
luckysheetConfigsetting.forceCalculation = extendsetting.forceCalculation;
@ -248,6 +250,7 @@ luckysheet.destroy = method.destroy;
luckysheet.showLoadingProgress = showloading;
luckysheet.hideLoadingProgress = hideloading;
luckysheet.luckysheetextendData = luckysheetextendData;
export {
luckysheet

35
src/css/luckysheet-core.css

@ -860,7 +860,8 @@
left: 0;
position: absolute;
right: 0;
top: 6px;
top: 50%;
transform: translateY(-50%);
resize: none;
/* border: 1px #b9b9b9 solid; */
font-family: arial, sans, sans-serif;
@ -897,6 +898,12 @@
border-left: 1px solid transparent;
border-right: 1px solid transparent;
}
.luckysheet-wa-calculate-help-tool .fa-caret-down {
position: absolute;
top: 50%;
left: 3px;
transform: translateY(-50%);
}
.luckysheet-wa-calculate-help-tool:hover {
background: #EFEFEF;
@ -7200,6 +7207,14 @@ fieldset[disabled] .btn-danger.focus {
cursor: pointer;
color: #6598F3;
}
#luckysheet-dataVerification-dialog .box-item .multi {
margin-top: 10px;
line-height: 30px;
font-size: 12px;
}
#luckysheet-dataVerification-dialog .box-item .multi input {
vertical-align: text-top;
}
#luckysheet-dataVerification-dialog .box-item .show-box{
margin-top: 10px;
}
@ -7303,6 +7318,24 @@ fieldset[disabled] .btn-danger.focus {
box-sizing: border-box;
cursor: pointer;
}
#luckysheet-dataVerification-dropdown-List .dropdown-List-item.multi {
padding-left: 0;
}
#luckysheet-dataVerification-dropdown-List .dropdown-List-item.multi:before{
content: "";
width: 14px;
font-family: "iconfont" !important;
font-size: 12px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
display: inline-block;
margin-right: 2px;
}
#luckysheet-dataVerification-dropdown-List .dropdown-List-item.multi.checked:before{
content: "\e7c8";
}
#luckysheet-dataVerification-dropdown-List .dropdown-List-item:hover{
background-color: #E1E1E1;
}

37
src/function/functionImplementation.js

@ -1,3 +1,4 @@
import luckysheetConfigsetting from '../controllers/luckysheetConfigsetting';
import { luckysheet_getcelldata, luckysheet_parseData, luckysheet_getValue } from './func';
import { inverse } from './matrix_methods';
import { getSheetIndex, getluckysheetfile,getRangetxt } from '../methods/get';
@ -3336,7 +3337,7 @@ const functionImplementation = {
}
else{
if (typeof value !== 'string') {
if (new Function("return " + value + criter)()) {
if (new Function("return " + value + criter)()) {
matches++;
}
}
@ -27587,6 +27588,40 @@ const functionImplementation = {
return [formula.error.v, err];
}
},
"REMOTE": function() {
if (arguments.length < this.m[0] || arguments.length > this.m[1]) {
return formula.error.na;
}
try {
const cellRow = window.luckysheetCurrentRow;
const cellColumn = window.luckysheetCurrentColumn;
const cellFunction = window.luckysheetCurrentFunction;
const remoteFunction = func_methods.getFirstValue(arguments[0]);
if(valueIsError(remoteFunction)){
return remoteFunction;
}
luckysheetConfigsetting.remoteFunction(remoteFunction, data => {
const flowData = editor.deepCopyFlowData(Store.flowdata);
formula.execFunctionGroup(cellRow, cellColumn, data);
flowData[cellRow][cellColumn] = {
"v": data,
"f": cellFunction
};
jfrefreshgrid(flowData, [{"row": [cellRow, cellRow], "column": [cellColumn, cellColumn]}]);
});
return "Loading...";
}
catch (e) {
console.log(e);
var err = e;
err = formula.errorInfo(err);
return [formula.error.v, err];
}
},
};
export default functionImplementation;

110
src/global/api.js

@ -1082,7 +1082,62 @@ export function insertRowOrColumn(type, index = 0, options = {}) {
success();
}
}
/**
* 在第index行或列的位置插入number行或列
* @param {String} type 插入行或列 row- column-
* @param {Number} index 在第几行插入空白行从0开始
* @param {Object} options 可选参数
* @param {Number} options.number 插入的空白行数默认为 1
* @param {Number} options.order 工作表索引默认值为当前工作表索引
* @param {Function} options.success 操作结束的回调函数
*/
export function insertRowBottomOrColumnRight(type, index = 0, options = {}) {
if(!isRealNum(index)){
return tooltip.info('The index parameter is invalid.', '');
}
let curSheetOrder = getSheetIndex(Store.currentSheetIndex);
let {
number = 1,
order = curSheetOrder,
success
} = {...options}
let _locale = locale();
let locale_info = _locale.info;
if (!isRealNum(number)) {
if(isEditMode()){
alert(locale_info.tipInputNumber);
} else{
tooltip.info(locale_info.tipInputNumber, "");
}
return;
}
number = parseInt(number);
if (number < 1 || number > 100) {
if(isEditMode()){
alert(locale_info.tipInputNumberLimit);
} else{
tooltip.info(locale_info.tipInputNumberLimit, "");
}
return;
}
// 默认在行上方增加行,列左侧增加列
let sheetIndex;
if(order){
if(Store.luckysheetfile[order]){
sheetIndex = Store.luckysheetfile[order].index;
}
}
luckysheetextendtable(type, index, number, "rightbottom", sheetIndex);
if (success && typeof success === 'function') {
success();
}
}
/**
* 在第row行的位置插入number行空白行
* @param {Number} row 在第几行插入空白行从0开始
@ -1094,7 +1149,17 @@ export function insertRowOrColumn(type, index = 0, options = {}) {
export function insertRow(row = 0, options = {}) {
insertRowOrColumn('row', row, options)
}
/**
* 在第row行的位置插入number行空白行
* @param {Number} row 在第几行插入空白行从0开始
* @param {Object} options 可选参数
* @param {Number} options.number 插入的空白行数默认为 1
* @param {Number} options.order 工作表索引默认值为当前工作表索引
* @param {Function} options.success 操作结束的回调函数
*/
export function insertRowBottom(row = 0, options = {}) {
insertRowBottomOrColumnRight('row', row, options)
}
/**
* 在第column列的位置插入number列空白列
* @param {Number} column 在第几列插入空白列从0开始
@ -1106,7 +1171,17 @@ export function insertRow(row = 0, options = {}) {
export function insertColumn(column = 0, options = {}) {
insertRowOrColumn('column', column, options)
}
/**
* 在第column列的位置插入number列空白列
* @param {Number} column 在第几列插入空白列从0开始
* @param {Object} options 可选参数
* @param {Number} options.number 插入的空白列数默认为 1
* @param {Number} options.order 工作表索引默认值为当前工作表索引
* @param {Function} options.success 操作结束的回调函数
*/
export function insertColumnRight(column = 0, options = {}) {
insertRowBottomOrColumnRight('column', column, options)
}
/**
* 删除指定的行或列删除行列之后行列的序号并不会变化下面的行右侧的列会补充到上注意观察数据是否被正确删除即可
* @param {String} type 删除行或列 row- column-
@ -1182,6 +1257,7 @@ export function hideRowOrColumn(type, startIndex, endIndex, options = {}) {
let curSheetOrder = getSheetIndex(Store.currentSheetIndex);
let {
order = curSheetOrder,
saveParam = true,
success
} = {...options}
@ -1209,7 +1285,10 @@ export function hideRowOrColumn(type, startIndex, endIndex, options = {}) {
}
Store.luckysheetfile[order].config = cfg;
server.saveParam("cg", file.index, cfg[cfgKey], { "k": cfgKey });
if (saveParam) {
server.saveParam("cg", file.index, cfg[cfgKey], { "k": cfgKey });
}
// 若操作sheet为当前sheet页,行高、列宽 刷新
if (order == curSheetOrder) {
@ -1240,6 +1319,7 @@ export function showRowOrColumn(type, startIndex, endIndex, options = {}) {
let curSheetOrder = getSheetIndex(Store.currentSheetIndex);
let {
order = curSheetOrder,
saveParam = true,
success
} = {...options}
@ -1269,7 +1349,9 @@ export function showRowOrColumn(type, startIndex, endIndex, options = {}) {
//config
Store.luckysheetfile[order].config = Store.config;
server.saveParam("cg", file.index, cfg[cfgKey], { "k": cfgKey });
if (saveParam) {
server.saveParam("cg", file.index, cfg[cfgKey], { "k": cfgKey });
}
// 若操作sheet为当前sheet页,行高、列宽 刷新
if (order === curSheetOrder) {
@ -1332,7 +1414,7 @@ export function showColumn(startIndex, endIndex, options = {}) {
/**
* 设置指定行的高度
* 设置指定行的高度优先级最高高于默认行高和用户自定义行高
* @param {Object} rowInfo 行数和高度对应关系
* @param {Object} options 可选参数
* @param {Number} options.order 工作表索引默认值为当前工作表索引
@ -1363,8 +1445,12 @@ export function setRowHeight(rowInfo, options = {}) {
if(parseInt(r) >= 0){
let len = rowInfo[r];
if(Number(len) >= 0){
cfg['rowlen'][parseInt(r)] = Number(len);
if (len === 'auto') {
cfg['rowlen'][parseInt(r)] = len
} else {
if(Number(len) >= 0){
cfg['rowlen'][parseInt(r)] = Number(len);
}
}
}
}
@ -1416,8 +1502,12 @@ export function setColumnWidth(columnInfo, options = {}) {
if(parseInt(c) >= 0){
let len = columnInfo[c];
if(Number(len) >= 0){
cfg['columnlen'][parseInt(c)] = Number(len);
if (len === 'auto') {
cfg['columnlen'][parseInt(c)] = len
} else {
if(Number(len) >= 0){
cfg['columnlen'][parseInt(c)] = Number(len);
}
}
}
}
@ -6741,4 +6831,4 @@ export function checkTheStatusOfTheSelectedCells(type,status){
})
return flag;
}
}

2
src/global/draw.js

@ -1492,7 +1492,7 @@ let cellRender = function(r, c, start_r, start_c, end_r, end_c, value, luckyshee
}
else{
//若单元格有条件格式数据条
if(checksCF != null && checksCF["dataBar"] != null){
if(checksCF != null && checksCF["dataBar"] != null && checksCF["dataBar"]["valueLen"] && checksCF["dataBar"]["valueLen"].toString() !== 'NaN'){
let x = (start_c + offsetLeft + space_width);
let y = (start_r + offsetTop + space_height);
let w = (cellWidth - space_width * 2);

16
src/global/formula.js

@ -321,7 +321,11 @@ const luckysheetformula = {
sheetmanage.changeSheetExec(_this.rangetosheet);
}
},
fucntionboxshow: function (r, c) {
xssDeal: function(str) {
if (typeof str !== 'string') return str;
return str.replace(/<script>/g, '&lt;script&gt;').replace(/<\/script>/, '&lt;/script&gt;');
},
fucntionboxshow: function(r, c) {
if (!checkProtectionCellHidden(r, c, Store.currentSheetIndex)) {
$("#luckysheet-functionbox-cell").html("");
@ -346,7 +350,7 @@ const luckysheetformula = {
value = valueShowEs(r, c, d);
}
}
value = this.xssDeal(value);
_this.oldvalue = value;
$("#luckysheet-functionbox-cell").html(value);
},
@ -3331,11 +3335,11 @@ const luckysheetformula = {
$editer = $input;
let value1 = $editer.html(),
value1txt = $editer.text();
setTimeout(function () {
let xssDeal = this.xssDeal
setTimeout(function() {
let value = $editer.text(),
valuetxt = value;
value = xssDeal(value);
if (value.length > 0 && value.substr(0, 1) == "=" && (kcode != 229 || value.length == 1)) {
value = _this.functionHTMLGenerate(value);
value1 = _this.functionHTMLGenerate(value1txt);
@ -5942,4 +5946,4 @@ const luckysheetformula = {
data_parm_index: 0 //选择公式后参数索引标记
}
export default luckysheetformula;
export default luckysheetformula;

114
src/global/getRowlen.js

@ -1,12 +1,21 @@
import { luckysheetfontformat } from '../utils/util';
import {luckysheetfontformat} from '../utils/util';
import menuButton from '../controllers/menuButton';
import { checkstatusByCell } from './getdata';
import { colLocationByIndex } from './location';
import { hasChinaword, isRealNull,checkWordByteLength } from './validate';
import { isInlineStringCell } from '../controllers/inlineString';
import {checkstatusByCell} from './getdata';
import {colLocationByIndex,colSpanLocationByIndex} from './location';
import {checkWordByteLength, hasChinaword, isRealNull} from './validate';
import {isInlineStringCell} from '../controllers/inlineString';
import Store from '../store';
//计算范围行高
/**
* 计算范围行高
*
* @param d 原始数据
* @param r1 起始行
* @param r2 截至行
* @param cfg 配置
* @returns 计算后的配置
*/
function rowlenByRange(d, r1, r2, cfg) {
let cfg_clone = $.extend(true, {}, cfg);
if(cfg_clone["rowlen"] == null){
@ -87,6 +96,95 @@ function rowlenByRange(d, r1, r2, cfg) {
return cfg_clone;
}
//根据内容计算行高
function computeRowlenByContent(d, r) {
let currentRowLen = 0;
let canvas = $("#luckysheetTableContent").get(0).getContext("2d");
canvas.textBaseline = 'top'; //textBaseline以top计算
for(let c = 0; c < d[r].length; c++){
let cell = d[r][c];
if (cell == null) {
continue;
}
if (cell.mc != null) {
if (1 !== cell.mc.rs) {
continue;
}
}
if(cell != null && (cell.v != null || isInlineStringCell(cell)) ){
let cellWidth = computeCellWidth(cell, c);
let textInfo = getCellTextInfo(cell, canvas,{
r:r,
c:c,
cellWidth:cellWidth
});
let computeRowlen = 0;
if (textInfo != null) {
computeRowlen = textInfo.textHeightAll + 2;
}
//比较计算高度和当前高度取最大高度
if (computeRowlen > currentRowLen) {
currentRowLen = computeRowlen;
}
}
}
return currentRowLen;
}
function computeCellWidth(cell, col_index) {
let colLocationArr = colLocationByIndex(col_index);
if (cell.mc && cell.mc.c !== cell.mc.cs) {
colLocationArr = colSpanLocationByIndex(col_index, cell.mc.cs);
}
return colLocationArr[1] - colLocationArr[0] - 2;
}
function computeColWidthByContent(d, c, rh) {
let currentColLen = 0;
let rowlenArr = computeRowlenArr(rh, c)
let canvas = $("#luckysheetTableContent").get(0).getContext("2d");
canvas.textBaseline = 'top'; //textBaseline以top计算
for (var i = 0; i < d.length; i++) {
var cell = d[i][c]
if (cell != null && (cell.v != null || isInlineStringCell(cell))) {
let cellHeight = rowlenArr[c];
let textInfo = getCellTextInfo(cell, canvas, {
r: i,
c: c,
cellHeight: cellHeight
});
let computeCollen = 0;
if (textInfo != null) {
computeCollen = textInfo.textWidthAll + 2;
}
//比较计算高度和当前高度取最大高度
if (computeCollen > currentColLen) {
currentColLen = computeCollen;
}
}
}
return currentColLen;
}
//计算表格行高数组
function computeRowlenArr(rowHeight, cfg) {
let rowlenArr = [];
@ -1619,9 +1717,11 @@ function drawLineInfo(wordGroup, cancelLine,underLine,option){
export {
computeColWidthByContent,
rowlenByRange,
computeRowlenByContent,
computeRowlenArr,
getCellTextSplitArr,
getMeasureText,
getCellTextInfo
}
}

23
src/global/location.js

@ -24,12 +24,12 @@ function rowLocation(y) {
else if (row_index == -1 && y <= 0) {
row_index = 0;
}
return rowLocationByIndex(row_index);
}
function colLocationByIndex(col_index){
let col = 0, col_pre = 0;
let col = 0, col_pre = 0;
col = Store.visibledatacolumn[col_index];
if (col_index == 0) {
@ -42,6 +42,20 @@ function colLocationByIndex(col_index){
return [col_pre, col, col_index];
}
function colSpanLocationByIndex(col_index, span){
let col = 0, col_pre = 0;
col = Store.visibledatacolumn[col_index + span - 1];
if (col_index == 0) {
col_pre = 0;
}
else {
col_pre = Store.visibledatacolumn[col_index - 1];
}
return [col_pre, col, col_index];
}
function colLocation(x) {
let col_index = luckysheet_searcharray(Store.visibledatacolumn, x);
@ -57,7 +71,7 @@ function colLocation(x) {
function mouseposition(x, y) {
let container_offset = $("#" + Store.container).offset();
let newX = x - container_offset.left - Store.rowHeaderWidth,
newY = y - container_offset.top - Store.infobarHeight - Store.toolbarHeight - Store.calculatebarHeight - Store.columnHeaderHeight;
@ -68,6 +82,7 @@ export {
rowLocationByIndex,
rowLocation,
colLocationByIndex,
colSpanLocationByIndex,
colLocation,
mouseposition,
}
}

21
src/global/rhchInit.js

@ -1,4 +1,5 @@
import Store from '../store';
import { computeRowlenByContent,computeColWidthByContent } from './getRowlen';
import luckysheetConfigsetting from '../controllers/luckysheetConfigsetting';
export default function rhchInit(rowheight, colwidth) {
@ -19,19 +20,23 @@ export default function rhchInit(rowheight, colwidth) {
Store.visibledatarow.push(Store.rh_height);
continue;
}
// 自动行高计算
if (rowlen === 'auto') {
rowlen = computeRowlenByContent(Store.flowdata, r);
}
Store.rh_height += Math.round((rowlen + 1) * Store.zoomRatio);
Store.visibledatarow.push(Store.rh_height); //行的临时长度分布
}
// 如果增加行和回到顶部按钮隐藏,则减少底部空白区域,但是预留足够空间给单元格下拉按钮
if(!luckysheetConfigsetting.enableAddRow && !luckysheetConfigsetting.enableAddBackTop){
if (!luckysheetConfigsetting.enableAddRow && !luckysheetConfigsetting.enableAddBackTop) {
Store.rh_height += 29;
}else{
} else {
Store.rh_height += 80; //最底部增加空白
}
}
//列宽
@ -71,6 +76,10 @@ export default function rhchInit(rowheight, colwidth) {
continue;
}
// 自动行高计算
if (firstcolumnlen === 'auto') {
firstcolumnlen = computeColWidthByContent(Store.flowdata, c, rowheight);
}
Store.ch_width += Math.round((firstcolumnlen + 1)*Store.zoomRatio);
Store.visibledatacolumn.push(Store.ch_width);//列的临时长度分布
@ -79,7 +88,7 @@ export default function rhchInit(rowheight, colwidth) {
// maxColumnlen = firstcolumnlen + 1;
// }
}
// Store.ch_width += 120;
Store.ch_width += maxColumnlen;
}
@ -93,4 +102,4 @@ export function zoomSetting(){
$("#luckysheet-rows-h").width((Store.rowHeaderWidth-1.5));
$("#luckysheet-cols-h-c").height((Store.columnHeaderHeight-1.5));
$("#luckysheet-left-top").css({width:Store.rowHeaderWidth-1.5, height:Store.columnHeaderHeight-1.5});
}
}

8
src/index.html

@ -1883,6 +1883,14 @@
},
imageClass:"loadingAnimation"
}
options.cellRightClickConfig = {
customs: [{
title: 'test',
onClick: function (clickEvent, event, params) {
console.log('function test click', clickEvent, event, params)
}
}]
}
luckysheet.create(options);
})
</script>

23
src/locale/en.js

@ -8827,6 +8827,21 @@ export default {
"type": "rangeall"
}]
},
{
"n": "REMOTE",
"t": "5",
"d": "Calls a function on a remote server",
"a": "Calls a function on a remote back end server/API.",
"m": [1, 1],
"p": [{
"name": "remote_expression",
"example": 'SUM(A1:A10000000)',
"detail": "Formula",
"require": "m",
"repeat": "n",
"type": "string"
}]
},
],
toolbar: {
undo: 'Undo',
@ -9391,7 +9406,7 @@ export default {
byRow: 'By row',
byCol: 'By column',
generateNewMatrix: 'Generate new matrix',
},
comment:{
"insert":"Insert",
@ -9449,7 +9464,7 @@ export default {
"semicolon":"semicolon",
"comma":"comma",
"space":"space",
},
findAndReplace:{
find:"Find",
@ -9509,7 +9524,7 @@ export default {
locationTiplessTwoRow:"Please select at least two rows",
locationTiplessTwoColumn:"Please select at least two columns",
locationTipNotFindCell:"Cell not found"
},
sheetconfig: {
delete: 'Delete',
@ -9733,6 +9748,7 @@ export default {
selectCellRange: 'Click to select a cell range',
selectCellRange2: 'Please select a range of cells',
verificationCondition: 'Verification condition',
allowMultiSelect: "Allow multiple selection",
dropdown: 'drop-down list',
checkbox: 'Checkbox',
number: 'Number',
@ -10031,4 +10047,3 @@ export default {
support: 'The current browser does not support WebSocket',
}
};

1
src/locale/es.js

@ -9716,6 +9716,7 @@ export default {
selectCellRange: 'Haz clic para seleccionar un rango de celdas',
selectCellRange2: 'Selecciona un rango de celdas',
verificationCondition: 'Condición de verificación',
allowMultiSelect: "Permitir selección múltiple",
dropdown: 'lista desplegable',
checkbox: 'Casilla de verificación',
number: 'Número',

1
src/locale/zh.js

@ -9976,6 +9976,7 @@ export default {
selectCellRange: '点击选择单元格范围',
selectCellRange2: '请选择单元格范围',
verificationCondition: '验证条件',
allowMultiSelect: '是否允许多选',
dropdown: '下拉列表',
checkbox: '复选框',
number: '数字',

1
src/locale/zh_tw.js

@ -9969,6 +9969,7 @@ export default {
selectCellRange : '點擊選擇儲存格範圍',
selectCellRange2 : '請選擇儲存格範圍',
verificationCondition: '驗證條件',
allowMultiSelect : "是否允許多選",
dropdown : '下拉清單',
checkbox : '核取方塊',
number : '數位',

178
yarn.lock

@ -2166,10 +2166,10 @@ bluebird@^3.1.1, bluebird@^3.5.5:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0:
version "4.11.9"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828"
integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9:
version "4.12.0"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==
bn.js@^5.0.0, bn.js@^5.1.1:
version "5.1.3"
@ -2254,7 +2254,7 @@ braces@^3.0.1, braces@~3.0.2:
dependencies:
fill-range "^7.0.1"
brorand@^1.0.1:
brorand@^1.0.1, brorand@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
@ -2379,15 +2379,15 @@ browserify-zlib@^0.2.0:
pako "~1.0.5"
browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0:
version "4.16.1"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.1.tgz#bf757a2da376b3447b800a16f0f1c96358138766"
integrity sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA==
version "4.16.6"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2"
integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==
dependencies:
caniuse-lite "^1.0.30001173"
colorette "^1.2.1"
electron-to-chromium "^1.3.634"
caniuse-lite "^1.0.30001219"
colorette "^1.2.2"
electron-to-chromium "^1.3.723"
escalade "^3.1.1"
node-releases "^1.1.69"
node-releases "^1.1.71"
bs-recipes@1.3.4:
version "1.3.4"
@ -2635,10 +2635,10 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001173:
version "1.0.30001177"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001177.tgz#2c3b384933aafda03e29ccca7bb3d8c3389e1ece"
integrity sha512-6Ld7t3ifCL02jTj3MxPMM5wAYjbo4h/TAQGFTgv1inihP1tWnWp8mxxT4ut4JBEHLbpFXEXJJQ119JCJTBkYDw==
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219:
version "1.0.30001230"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz#8135c57459854b2240b57a4a6786044bdc5a9f71"
integrity sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==
caseless@~0.12.0:
version "0.12.0"
@ -2784,15 +2784,6 @@ cli-width@^2.0.0:
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==
clipboard@^2.0.0:
version "2.0.6"
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376"
integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==
dependencies:
good-listener "^1.2.2"
select "^1.1.2"
tiny-emitter "^2.0.0"
cliui@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
@ -2916,9 +2907,9 @@ color-name@^1.0.0, color-name@~1.1.4:
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-string@^1.5.4:
version "1.5.4"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.4.tgz#dd51cd25cfee953d138fe4002372cc3d0e504cb6"
integrity sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==
version "1.5.5"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014"
integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
@ -2936,10 +2927,10 @@ color@^3.0.0:
color-convert "^1.9.1"
color-string "^1.5.4"
colorette@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==
colorette@^1.2.1, colorette@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==
combined-stream@^1.0.6, combined-stream@~1.0.6:
version "1.0.8"
@ -3910,11 +3901,6 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
delegate@^3.1.2:
version "3.2.0"
resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166"
integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==
delete@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/delete/-/delete-1.1.0.tgz#931eb819cb6a0833d4ac4686621241cdca202e7c"
@ -3995,9 +3981,9 @@ dns-equal@^1.0.0:
integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0=
dns-packet@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a"
integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==
version "1.3.4"
resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.4.tgz#e3455065824a2507ba886c55a89963bb107dec6f"
integrity sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==
dependencies:
ip "^1.1.0"
safe-buffer "^5.0.1"
@ -4159,23 +4145,23 @@ ee-first@1.1.1:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.634:
version "1.3.639"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.639.tgz#0a27e3018ae3acf438a14a1dd4e41db4b8ab764e"
integrity sha512-bwl6/U6xb3d3CNufQU9QeO1L32ueouFwW4bWANSwdXR7LVqyLzWjNbynoKNfuC38QFB5Qn7O0l2KLqBkcXnC3Q==
electron-to-chromium@^1.3.723:
version "1.3.739"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.739.tgz#f07756aa92cabd5a6eec6f491525a64fe62f98b9"
integrity sha512-+LPJVRsN7hGZ9EIUUiWCpO7l4E3qBYHNadazlucBfsXBbccDFNKUBAgzE68FnkWGJPwD/AfKhSzL+G+Iqb8A4A==
elliptic@^6.5.3:
version "6.5.3"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6"
integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==
version "6.5.4"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
dependencies:
bn.js "^4.4.0"
brorand "^1.0.1"
bn.js "^4.11.9"
brorand "^1.1.0"
hash.js "^1.0.0"
hmac-drbg "^1.0.0"
inherits "^2.0.1"
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.0"
hmac-drbg "^1.0.1"
inherits "^2.0.4"
minimalistic-assert "^1.0.1"
minimalistic-crypto-utils "^1.0.1"
emoji-regex@^7.0.1:
version "7.0.3"
@ -5310,13 +5296,6 @@ glogg@^1.0.0:
dependencies:
sparkles "^1.0.0"
good-listener@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=
dependencies:
delegate "^3.1.2"
got@^9.6.0:
version "9.6.0"
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
@ -5472,9 +5451,9 @@ handle-thing@^2.0.0:
integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==
handlebars@^4.7.6:
version "4.7.6"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e"
integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==
version "4.7.7"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
dependencies:
minimist "^1.2.5"
neo-async "^2.6.0"
@ -5624,7 +5603,7 @@ hex-color-regex@^1.1.0:
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
hmac-drbg@^1.0.0:
hmac-drbg@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=
@ -5649,9 +5628,9 @@ homedir-polyfill@^1.0.1:
parse-passwd "^1.0.0"
hosted-git-info@^2.1.4:
version "2.8.8"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
version "2.8.9"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==
hosted-git-info@^3.0.6:
version "3.0.7"
@ -6863,9 +6842,9 @@ lodash.uniq@^4.5.0:
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.3, lodash@^4.17.5:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
loglevel@^1.6.8:
version "1.7.1"
@ -7296,7 +7275,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==
minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
minimalistic-crypto-utils@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
@ -7519,10 +7498,10 @@ node-libs-browser@^2.2.1:
util "^0.11.0"
vm-browserify "^1.0.1"
node-releases@^1.1.69:
version "1.1.69"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.69.tgz#3149dbde53b781610cd8b486d62d86e26c3725f6"
integrity sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA==
node-releases@^1.1.71:
version "1.1.72"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.72.tgz#14802ab6b1039a79a0c7d662b610a5bbd76eacbe"
integrity sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==
nopt@1.0.10:
version "1.0.10"
@ -8562,9 +8541,9 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0:
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6:
version "7.0.35"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24"
integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==
version "7.0.36"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.36.tgz#056f8cffa939662a8f5905950c07d5285644dfcb"
integrity sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==
dependencies:
chalk "^2.4.2"
source-map "^0.6.1"
@ -8599,11 +8578,9 @@ pretty-time@^1.1.0:
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
prismjs@^1.13.0:
version "1.23.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33"
integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==
optionalDependencies:
clipboard "^2.0.0"
version "1.24.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.24.0.tgz#0409c30068a6c52c89ef7f1089b3ca4de56be2ac"
integrity sha512-SqV5GRsNqnzCL8k5dfAjCNhUrF3pR0A9lTDSCUZeh/LIshheXJEaP0hwLz2t4XHivd2J/v2HR+gRnigzeKe3cQ==
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
version "2.0.1"
@ -9349,11 +9326,6 @@ select-hose@^2.0.0:
resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=
select@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=
selfsigned@^1.10.8:
version "1.10.8"
resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.8.tgz#0d17208b7d12c33f8eac85c41835f27fc3d81a30"
@ -9887,9 +9859,9 @@ sshpk@^1.7.0:
tweetnacl "~0.14.0"
ssri@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
version "6.0.2"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
dependencies:
figgy-pudding "^3.5.1"
@ -10395,11 +10367,6 @@ timsort@^0.3.0:
resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4"
integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=
tiny-emitter@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==
tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
@ -10607,9 +10574,9 @@ typedarray@^0.0.6:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
ua-parser-js@^0.7.18:
version "0.7.23"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.23.tgz#704d67f951e13195fbcd3d78818577f5bc1d547b"
integrity sha512-m4hvMLxgGHXG3O3fQVAyyAQpZzDOvwnhOTjYz5Xmr7r/+LpkNy3vJXdVRWgd1TkAb7NGROZuSy96CrlNVjA7KA==
version "0.7.28"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31"
integrity sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==
uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.6"
@ -10624,11 +10591,16 @@ uglify-js@3.4.x:
commander "~2.19.0"
source-map "~0.6.1"
uglify-js@^3.0.5, uglify-js@^3.1.4:
uglify-js@^3.0.5:
version "3.12.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.4.tgz#93de48bb76bb3ec0fc36563f871ba46e2ee5c7ee"
integrity sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==
uglify-js@^3.1.4:
version "3.13.5"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113"
integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==
ultron@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
@ -10813,9 +10785,9 @@ url-parse-lax@^3.0.0:
prepend-http "^2.0.0"
url-parse@^1.4.3, url-parse@^1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278"
integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==
version "1.5.1"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b"
integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==
dependencies:
querystringify "^2.1.1"
requires-port "^1.0.0"

Loading…
Cancel
Save