mirror of
https://github.com/dream-num/univer.git
synced 2026-10-02 04:24:34 +08:00
fix: fix autofixable lint (#1325)
* fix: fix autofixable lint * fix: header lint * fix: fix default import
This commit is contained in:
@@ -58,7 +58,7 @@ export const DEFAULT_DOCUMENT_DATA: IDocumentData = {
|
||||
},
|
||||
},
|
||||
body: {
|
||||
dataStream: `在“第1题”工作表中完成以下操作\b上标日期列单元格数据验证,限制只能输入日期(介于1949年1月1日至2099年1月1日)\r细化埋点上报链路和指标方案梳理目前通过每日定时任务发送报告\r自2018年首届进博会举办以来,进博会已经成为全球新品的首发地、前沿技术的首选地、创新服务的首推地。中国这十年”对外开放成就展湖北展区主要以图文、图表、数据、视频、企业展品、实物模型、光电科技等体现湖北十年开放成就、重大开放平台及产业。湖北省共计17家企业、机构的展品将在这一展区展示\r国家主席习近平以视频方式出席在上海举行的第五届中国国际进口博览会开幕式并发表题为《共创开放繁荣的美好未来》的致辞中国将推动各国各方共享深化国际合作机遇,全面深入参与世界贸易组织改革谈判\r中国男排两名现役国手彭世坤和张秉龙分别效力的三得利太阳鸟和东京大熊本轮遭遇。双方经过激战,主场作战的卫冕冠军三得利技高一筹3-2逆转击败对手,力夺第3场胜利\r\n`,
|
||||
dataStream: '在“第1题”工作表中完成以下操作\b上标日期列单元格数据验证,限制只能输入日期(介于1949年1月1日至2099年1月1日)\r细化埋点上报链路和指标方案梳理目前通过每日定时任务发送报告\r自2018年首届进博会举办以来,进博会已经成为全球新品的首发地、前沿技术的首选地、创新服务的首推地。中国这十年”对外开放成就展湖北展区主要以图文、图表、数据、视频、企业展品、实物模型、光电科技等体现湖北十年开放成就、重大开放平台及产业。湖北省共计17家企业、机构的展品将在这一展区展示\r国家主席习近平以视频方式出席在上海举行的第五届中国国际进口博览会开幕式并发表题为《共创开放繁荣的美好未来》的致辞中国将推动各国各方共享深化国际合作机遇,全面深入参与世界贸易组织改革谈判\r中国男排两名现役国手彭世坤和张秉龙分别效力的三得利太阳鸟和东京大熊本轮遭遇。双方经过激战,主场作战的卫冕冠军三得利技高一筹3-2逆转击败对手,力夺第3场胜利\r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
|
||||
@@ -65,7 +65,7 @@ const richTextTestFloat: IDocumentData = {
|
||||
},
|
||||
},
|
||||
body: {
|
||||
dataStream: `在“第1题”工作表中完成以下操作\b上标日期列单元格数据验证,限制只能输入日期(介于1949年1月1日至2099年1月1日)\r\n`,
|
||||
dataStream: '在“第1题”工作表中完成以下操作\b上标日期列单元格数据验证,限制只能输入日期(介于1949年1月1日至2099年1月1日)\r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
@@ -139,8 +139,8 @@ const richTextTestFloat: IDocumentData = {
|
||||
},
|
||||
documentStyle: {
|
||||
pageSize: {
|
||||
width: Infinity,
|
||||
height: Infinity,
|
||||
width: Number.POSITIVE_INFINITY,
|
||||
height: Number.POSITIVE_INFINITY,
|
||||
},
|
||||
marginTop: 0,
|
||||
marginBottom: 0,
|
||||
@@ -152,7 +152,7 @@ const richTextTestFloat: IDocumentData = {
|
||||
const richTextTest: IDocumentData = {
|
||||
id: 'd',
|
||||
body: {
|
||||
dataStream: `在“第1题”工作表中完成以下操作\b上标日期列单元格数据验证,限制只能输入日期(介于1949年1月1日至2099年1月1日)\r\n`,
|
||||
dataStream: '在“第1题”工作表中完成以下操作\b上标日期列单元格数据验证,限制只能输入日期(介于1949年1月1日至2099年1月1日)\r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
@@ -226,8 +226,8 @@ const richTextTest: IDocumentData = {
|
||||
},
|
||||
documentStyle: {
|
||||
pageSize: {
|
||||
width: Infinity,
|
||||
height: Infinity,
|
||||
width: Number.POSITIVE_INFINITY,
|
||||
height: Number.POSITIVE_INFINITY,
|
||||
},
|
||||
marginTop: 0,
|
||||
marginBottom: 0,
|
||||
@@ -245,7 +245,7 @@ export const DEFAULT_WORKBOOK_DATA: IWorkbookData = {
|
||||
name: 'universheet',
|
||||
sheetOrder: ['sheet-01', 'sheet-02', 'sheet-03', 'sheet-04', 'sheet-05', 'sheet-06'],
|
||||
styles: {
|
||||
'1': {
|
||||
1: {
|
||||
cl: {
|
||||
rgb: 'blue',
|
||||
},
|
||||
@@ -278,7 +278,7 @@ export const DEFAULT_WORKBOOK_DATA: IWorkbookData = {
|
||||
},
|
||||
ht: 3,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
bg: {
|
||||
rgb: 'rgb(200, 2, 0)',
|
||||
},
|
||||
@@ -286,7 +286,7 @@ export const DEFAULT_WORKBOOK_DATA: IWorkbookData = {
|
||||
ht: HorizontalAlign.RIGHT,
|
||||
vt: VerticalAlign.TOP,
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
ht: HorizontalAlign.RIGHT,
|
||||
vt: VerticalAlign.MIDDLE,
|
||||
tb: WrapStrategy.WRAP,
|
||||
@@ -331,12 +331,12 @@ export const DEFAULT_WORKBOOK_DATA: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
bg: {
|
||||
rgb: 'rgb(0, 0, 255)',
|
||||
},
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
tb: WrapStrategy.WRAP,
|
||||
},
|
||||
},
|
||||
@@ -346,108 +346,108 @@ export const DEFAULT_WORKBOOK_DATA: IWorkbookData = {
|
||||
type: SheetTypes.GRID,
|
||||
id: 'sheet-01',
|
||||
cellData: {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
s: '1',
|
||||
v: 1,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
s: '1',
|
||||
v: 1,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '2',
|
||||
v: 8,
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'0': {
|
||||
1: {
|
||||
0: {
|
||||
v: 1,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 1,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 80,
|
||||
s: '3',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '富文本编辑',
|
||||
s: '2',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'0': {
|
||||
2: {
|
||||
0: {
|
||||
v: 1111,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 1111,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'0': {
|
||||
3: {
|
||||
0: {
|
||||
v: 1111,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 1111,
|
||||
},
|
||||
},
|
||||
'10': {
|
||||
'9': {
|
||||
10: {
|
||||
9: {
|
||||
v: 1111,
|
||||
s: '2',
|
||||
},
|
||||
},
|
||||
'13': {
|
||||
'9': {
|
||||
13: {
|
||||
9: {
|
||||
v: 1111,
|
||||
s: '4',
|
||||
},
|
||||
},
|
||||
'17': {
|
||||
'3': {
|
||||
17: {
|
||||
3: {
|
||||
v: '做移动端开发和前端开发的人员,对 MVC、MVP、MVVM 这几个名词应该都不陌生,这是三个最常用的应用架构模式,目的都是为了将业务和视图的实现代码分离',
|
||||
s: '3',
|
||||
p: richTextTest,
|
||||
},
|
||||
},
|
||||
'20': {
|
||||
'10': {
|
||||
20: {
|
||||
10: {
|
||||
v: '北京马拉松组委会办公室一位接电话的女士证实,的确有这项规定,她还称2014年马拉松的预登记工作将在本周启动。北京马拉松比赛将在10月19日举行。',
|
||||
s: '3',
|
||||
},
|
||||
'12': {
|
||||
12: {
|
||||
s: '4',
|
||||
},
|
||||
},
|
||||
'29': {
|
||||
'13': {
|
||||
29: {
|
||||
13: {
|
||||
p: Tools.deepClone(richTextTest),
|
||||
s: '4',
|
||||
},
|
||||
},
|
||||
'32': {
|
||||
'3': {
|
||||
32: {
|
||||
3: {
|
||||
p: richTextTestFloat,
|
||||
s: '5',
|
||||
},
|
||||
@@ -514,29 +514,29 @@ export const DEFAULT_WORKBOOK_DATA: IWorkbookData = {
|
||||
},
|
||||
],
|
||||
rowData: {
|
||||
'3': {
|
||||
3: {
|
||||
h: 50,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
h: 60,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'29': {
|
||||
29: {
|
||||
h: 200,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
},
|
||||
columnData: {
|
||||
'5': {
|
||||
5: {
|
||||
w: 100,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
w: 200,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'13': {
|
||||
13: {
|
||||
w: 300,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
@@ -563,29 +563,29 @@ export const DEFAULT_WORKBOOK_DATA: IWorkbookData = {
|
||||
id: 'sheet-02',
|
||||
name: 'sheet2',
|
||||
cellData: {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
s: '1',
|
||||
v: 1,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
s: '1',
|
||||
v: 1,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '2',
|
||||
v: 8,
|
||||
},
|
||||
},
|
||||
'20': {
|
||||
'0': {
|
||||
20: {
|
||||
0: {
|
||||
v: 'sheet2',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 'sheet2 - 2',
|
||||
},
|
||||
},
|
||||
@@ -650,7 +650,7 @@ export const DEFAULT_WORKBOOK_DATA_DOWN: IWorkbookData = {
|
||||
name: 'universheet',
|
||||
sheetOrder: [],
|
||||
styles: {
|
||||
'1': {
|
||||
1: {
|
||||
cl: {
|
||||
rgb: 'green',
|
||||
},
|
||||
@@ -683,13 +683,13 @@ export const DEFAULT_WORKBOOK_DATA_DOWN: IWorkbookData = {
|
||||
},
|
||||
ht: 3,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
bg: {
|
||||
rgb: 'rgb(2, 200, 0)',
|
||||
},
|
||||
fs: 24,
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
ht: HorizontalAlign.RIGHT,
|
||||
vt: VerticalAlign.TOP,
|
||||
tb: WrapStrategy.WRAP,
|
||||
@@ -734,7 +734,7 @@ export const DEFAULT_WORKBOOK_DATA_DOWN: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
bg: {
|
||||
rgb: 'rgb(0, 0, 255)',
|
||||
},
|
||||
@@ -746,102 +746,102 @@ export const DEFAULT_WORKBOOK_DATA_DOWN: IWorkbookData = {
|
||||
type: SheetTypes.GRID,
|
||||
id: 'sheet-0001',
|
||||
cellData: {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
s: '1',
|
||||
v: 2,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
s: '1',
|
||||
v: 1,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '2',
|
||||
v: 8,
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'0': {
|
||||
1: {
|
||||
0: {
|
||||
v: 22,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 22,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 80,
|
||||
s: '3',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '富文本编辑',
|
||||
s: '2',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'0': {
|
||||
2: {
|
||||
0: {
|
||||
v: 2222,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 2222,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
s: '1',
|
||||
v: 8,
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'0': {
|
||||
3: {
|
||||
0: {
|
||||
v: 1111,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 1111,
|
||||
},
|
||||
},
|
||||
'10': {
|
||||
'9': {
|
||||
10: {
|
||||
9: {
|
||||
v: 1111,
|
||||
s: '2',
|
||||
},
|
||||
},
|
||||
'13': {
|
||||
'9': {
|
||||
13: {
|
||||
9: {
|
||||
v: 1111,
|
||||
s: '4',
|
||||
},
|
||||
},
|
||||
'17': {
|
||||
'3': {
|
||||
17: {
|
||||
3: {
|
||||
v: '做移动端开发和前端开发的人员,对 MVC、MVP、MVVM 这几个名词应该都不陌生,这是三个最常用的应用架构模式,目的都是为了将业务和视图的实现代码分离',
|
||||
s: '3',
|
||||
p: richTextTest,
|
||||
},
|
||||
},
|
||||
'20': {
|
||||
'10': {
|
||||
20: {
|
||||
10: {
|
||||
v: '北京马拉松组委会办公室一位接电话的女士证实,的确有这项规定,她还称2014年马拉松的预登记工作将在本周启动。北京马拉松比赛将在10月19日举行。',
|
||||
s: '3',
|
||||
},
|
||||
'12': {
|
||||
12: {
|
||||
s: '4',
|
||||
},
|
||||
},
|
||||
'29': {
|
||||
'13': {
|
||||
29: {
|
||||
13: {
|
||||
p: Tools.deepClone(richTextTest),
|
||||
s: '4',
|
||||
},
|
||||
@@ -902,29 +902,29 @@ export const DEFAULT_WORKBOOK_DATA_DOWN: IWorkbookData = {
|
||||
},
|
||||
],
|
||||
rowData: {
|
||||
'3': {
|
||||
3: {
|
||||
h: 50,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
h: 60,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'29': {
|
||||
29: {
|
||||
h: 200,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
},
|
||||
columnData: {
|
||||
'5': {
|
||||
5: {
|
||||
w: 100,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
w: 200,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
'13': {
|
||||
13: {
|
||||
w: 300,
|
||||
hd: BooleanNumber.FALSE,
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@ import { BooleanNumber, BorderStyleTypes, LocaleType, SheetTypes } from '@univer
|
||||
const richTextDemo: IDocumentData = {
|
||||
id: 'd',
|
||||
body: {
|
||||
dataStream: `Instructions: ①Project division - Fill in the specific division of labor after the project is disassembled: ②Responsible Person - Enter the responsible person's name here: ③Date-The specific execution time of the project (detailed to the date of a certain month), and the gray color block marks the planned real-time time of the division of labor of the project (for example, the specific execution time of [regional scene model arrangement and construction] is the 2 days marked in gray. \r\n`,
|
||||
dataStream: 'Instructions: ①Project division - Fill in the specific division of labor after the project is disassembled: ②Responsible Person - Enter the responsible person\'s name here: ③Date-The specific execution time of the project (detailed to the date of a certain month), and the gray color block marks the planned real-time time of the division of labor of the project (for example, the specific execution time of [regional scene model arrangement and construction] is the 2 days marked in gray. \r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
@@ -44,8 +44,8 @@ const richTextDemo: IDocumentData = {
|
||||
},
|
||||
documentStyle: {
|
||||
pageSize: {
|
||||
width: Infinity,
|
||||
height: Infinity,
|
||||
width: Number.POSITIVE_INFINITY,
|
||||
height: Number.POSITIVE_INFINITY,
|
||||
},
|
||||
marginTop: 0,
|
||||
marginBottom: 0,
|
||||
@@ -60,7 +60,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
name: 'universheet',
|
||||
sheetOrder: ['sheet-0001'],
|
||||
styles: {
|
||||
'1': {
|
||||
1: {
|
||||
fs: 30,
|
||||
vt: 2,
|
||||
bl: 1,
|
||||
@@ -68,7 +68,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
l: 5,
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
vt: 2,
|
||||
bl: 1,
|
||||
bg: {
|
||||
@@ -104,7 +104,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
vt: 2,
|
||||
bl: 1,
|
||||
bg: {
|
||||
@@ -138,7 +138,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
bl: 1,
|
||||
vt: 2,
|
||||
pd: {
|
||||
@@ -149,13 +149,13 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
ht: 2,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
vt: 2,
|
||||
pd: {
|
||||
l: 5,
|
||||
},
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 12,
|
||||
@@ -163,7 +163,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
rgb: 'rgb(1,136,251)',
|
||||
},
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
vt: 2,
|
||||
pd: {
|
||||
l: 5,
|
||||
@@ -198,7 +198,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -211,13 +211,13 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
rgb: 'rgb(255,251,224)',
|
||||
},
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
vt: 2,
|
||||
pd: {
|
||||
l: 25,
|
||||
},
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
bg: {
|
||||
rgb: '#bf9000',
|
||||
},
|
||||
@@ -231,7 +231,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'11': {
|
||||
11: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 24,
|
||||
@@ -242,7 +242,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
rgb: '#fff',
|
||||
},
|
||||
},
|
||||
'12': {
|
||||
12: {
|
||||
bg: {
|
||||
rgb: 'rgb(248,237,241)',
|
||||
},
|
||||
@@ -253,7 +253,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'13': {
|
||||
13: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -266,7 +266,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'14': {
|
||||
14: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -281,7 +281,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'15': {
|
||||
15: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -294,7 +294,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'16': {
|
||||
16: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -307,7 +307,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'17': {
|
||||
17: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -320,7 +320,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'18': {
|
||||
18: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -333,7 +333,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'19': {
|
||||
19: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -349,7 +349,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'20': {
|
||||
20: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -365,7 +365,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'21': {
|
||||
21: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -381,7 +381,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'22': {
|
||||
22: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -397,7 +397,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'23': {
|
||||
23: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -413,7 +413,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'24': {
|
||||
24: {
|
||||
bg: {
|
||||
rgb: '#3d85c6',
|
||||
},
|
||||
@@ -424,7 +424,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'25': {
|
||||
25: {
|
||||
bg: {
|
||||
rgb: '#c27ba0',
|
||||
},
|
||||
@@ -435,7 +435,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'26': {
|
||||
26: {
|
||||
bg: {
|
||||
rgb: 'rgb(224, 102, 102)',
|
||||
},
|
||||
@@ -446,7 +446,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'27': {
|
||||
27: {
|
||||
bg: {
|
||||
rgb: '#f90',
|
||||
},
|
||||
@@ -457,7 +457,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'28': {
|
||||
28: {
|
||||
bg: {
|
||||
rgb: '#76a5af',
|
||||
},
|
||||
@@ -468,7 +468,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'29': {
|
||||
29: {
|
||||
bg: {
|
||||
rgb: '#38761d',
|
||||
},
|
||||
@@ -479,7 +479,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'30': {
|
||||
30: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 30,
|
||||
@@ -497,7 +497,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'31': {
|
||||
31: {
|
||||
bd: {
|
||||
t: {
|
||||
s: BorderStyleTypes.THIN,
|
||||
@@ -525,7 +525,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'32': {
|
||||
32: {
|
||||
vt: 2,
|
||||
tb: 3,
|
||||
bd: {
|
||||
@@ -550,7 +550,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'33': {
|
||||
33: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -580,7 +580,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'34': {
|
||||
34: {
|
||||
vt: 2,
|
||||
bd: {
|
||||
t: null,
|
||||
@@ -604,7 +604,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'35': {
|
||||
35: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -640,7 +640,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'36': {
|
||||
36: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -670,7 +670,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'37': {
|
||||
37: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -711,7 +711,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'38': {
|
||||
38: {
|
||||
vt: 2,
|
||||
tb: 3,
|
||||
bg: {
|
||||
@@ -747,7 +747,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'39': {
|
||||
39: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -783,7 +783,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'40': {
|
||||
40: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 24,
|
||||
@@ -817,7 +817,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'41': {
|
||||
41: {
|
||||
ht: 3,
|
||||
bd: {
|
||||
t: {
|
||||
@@ -846,7 +846,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'42': {
|
||||
42: {
|
||||
vt: 2,
|
||||
cl: {
|
||||
rgb: 'rgb(125,133,22)',
|
||||
@@ -878,7 +878,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'43': {
|
||||
43: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -908,7 +908,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'44': {
|
||||
44: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -938,7 +938,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'45': {
|
||||
45: {
|
||||
vt: 2,
|
||||
tb: 3,
|
||||
pd: {
|
||||
@@ -972,7 +972,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'46': {
|
||||
46: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1002,7 +1002,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'47': {
|
||||
47: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1032,7 +1032,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'48': {
|
||||
48: {
|
||||
vt: 2,
|
||||
bd: {
|
||||
t: {
|
||||
@@ -1061,7 +1061,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'49': {
|
||||
49: {
|
||||
vt: 2,
|
||||
bd: {
|
||||
t: {
|
||||
@@ -1090,7 +1090,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'50': {
|
||||
50: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1120,7 +1120,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'51': {
|
||||
51: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1150,7 +1150,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'52': {
|
||||
52: {
|
||||
bd: {
|
||||
t: {
|
||||
s: BorderStyleTypes.THIN,
|
||||
@@ -1178,7 +1178,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'53': {
|
||||
53: {
|
||||
ht: 2,
|
||||
vt: 2,
|
||||
tr: {
|
||||
@@ -1209,7 +1209,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'54': {
|
||||
54: {
|
||||
bd: {
|
||||
l: {
|
||||
s: BorderStyleTypes.THIN,
|
||||
@@ -1225,7 +1225,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'55': {
|
||||
55: {
|
||||
ht: 3,
|
||||
vt: 3,
|
||||
tb: 3,
|
||||
@@ -1258,259 +1258,259 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
type: SheetTypes.GRID,
|
||||
id: 'sheet-0001',
|
||||
cellData: {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
s: '1',
|
||||
v: 'A Schedule of Items',
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'0': {
|
||||
1: {
|
||||
0: {
|
||||
s: '2',
|
||||
v: 'Division of Project',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
s: '3',
|
||||
v: 'Responsible Person',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
s: '4',
|
||||
v: 'Date',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'0': {
|
||||
2: {
|
||||
0: {
|
||||
v: 'General Project Manager',
|
||||
s: '5',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@XXX',
|
||||
s: '6',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 'March 1',
|
||||
s: '5',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: 'March 2',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: 'March 3',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: 'March 4',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: 'March 5',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: 'March 6',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: 'March 7',
|
||||
s: '5',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
v: 'March 8',
|
||||
s: '5',
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
v: 'March 9',
|
||||
s: '5',
|
||||
},
|
||||
'11': {
|
||||
11: {
|
||||
v: 'March 10',
|
||||
s: '5',
|
||||
},
|
||||
'12': {
|
||||
12: {
|
||||
v: 'March 11',
|
||||
s: '5',
|
||||
},
|
||||
'13': {
|
||||
13: {
|
||||
v: 'March 12',
|
||||
s: '5',
|
||||
},
|
||||
'14': {
|
||||
14: {
|
||||
v: 'March 13',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'0': {
|
||||
3: {
|
||||
0: {
|
||||
v: '1、Responsible Person of Model Section',
|
||||
s: '7',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@George',
|
||||
s: '8',
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
'0': {
|
||||
4: {
|
||||
0: {
|
||||
v: 'Advertisement Signboard',
|
||||
s: '9',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@Paul',
|
||||
s: '6',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
s: '10',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '10',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '10',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '10',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
s: '10',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
s: '10',
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
s: '10',
|
||||
},
|
||||
},
|
||||
'5': {
|
||||
'0': {
|
||||
5: {
|
||||
0: {
|
||||
v: 'Transport Ready',
|
||||
s: '9',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@George',
|
||||
s: '6',
|
||||
},
|
||||
},
|
||||
'6': {
|
||||
'0': {
|
||||
6: {
|
||||
0: {
|
||||
v: '2、Head of Special Effects Section',
|
||||
s: '7',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@Paul',
|
||||
s: '8',
|
||||
},
|
||||
},
|
||||
'7': {
|
||||
'0': {
|
||||
7: {
|
||||
0: {
|
||||
v: 'Render Output Parameter Test',
|
||||
s: '9',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@Paul',
|
||||
s: '6',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
s: '25',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
s: '25',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '25',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '25',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '25',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
s: '25',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
s: '25',
|
||||
},
|
||||
},
|
||||
'8': {
|
||||
'0': {
|
||||
8: {
|
||||
0: {
|
||||
v: 'Camera Moving Mirror',
|
||||
s: '9',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@Paul',
|
||||
s: '6',
|
||||
},
|
||||
},
|
||||
'9': {
|
||||
'0': {
|
||||
9: {
|
||||
0: {
|
||||
v: '3、Responsible Person of Rendering Section',
|
||||
s: '7',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: '@Jennifer',
|
||||
s: '8',
|
||||
},
|
||||
},
|
||||
'10': {
|
||||
'0': {
|
||||
10: {
|
||||
0: {
|
||||
v: 'Scene Dynamic Element Design',
|
||||
s: '9',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '27',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
s: '27',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
s: '27',
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
s: '27',
|
||||
},
|
||||
'11': {
|
||||
11: {
|
||||
s: '27',
|
||||
},
|
||||
},
|
||||
'11': {
|
||||
'0': {
|
||||
11: {
|
||||
0: {
|
||||
v: 'Sky Map Selection',
|
||||
s: '9',
|
||||
},
|
||||
},
|
||||
'12': {
|
||||
'0': {
|
||||
12: {
|
||||
0: {
|
||||
v: 'Reference Scenario Data Collection',
|
||||
s: '9',
|
||||
},
|
||||
},
|
||||
'13': {
|
||||
'0': {
|
||||
13: {
|
||||
0: {
|
||||
v: 'Scene Dynamic Element Design',
|
||||
s: '9',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
s: '29',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
s: '29',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
s: '29',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '29',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '29',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '29',
|
||||
},
|
||||
},
|
||||
'14': {
|
||||
'0': {
|
||||
14: {
|
||||
0: {
|
||||
p: richTextDemo,
|
||||
},
|
||||
},
|
||||
@@ -1546,93 +1546,93 @@ export const DEFAULT_WORKBOOK_DATA_DEMO3: IWorkbookData = {
|
||||
},
|
||||
],
|
||||
rowData: {
|
||||
'0': {
|
||||
0: {
|
||||
h: 70,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
h: 20,
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
h: 20,
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
h: 20,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
h: 20,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
h: 20,
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
h: 20,
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
h: 20,
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
h: 20,
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
h: 20,
|
||||
},
|
||||
'11': {
|
||||
11: {
|
||||
h: 20,
|
||||
},
|
||||
'12': {
|
||||
12: {
|
||||
h: 20,
|
||||
},
|
||||
'13': {
|
||||
13: {
|
||||
h: 20,
|
||||
},
|
||||
'14': {
|
||||
14: {
|
||||
h: 200,
|
||||
},
|
||||
},
|
||||
columnData: {
|
||||
'0': {
|
||||
0: {
|
||||
w: 250,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
w: 130,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
w: 60,
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
w: 60,
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
w: 60,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
w: 60,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
w: 60,
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
w: 60,
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
w: 60,
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
w: 60,
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
w: 60,
|
||||
},
|
||||
'11': {
|
||||
11: {
|
||||
w: 60,
|
||||
},
|
||||
'12': {
|
||||
12: {
|
||||
w: 60,
|
||||
},
|
||||
'13': {
|
||||
13: {
|
||||
w: 60,
|
||||
},
|
||||
'14': {
|
||||
14: {
|
||||
w: 60,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@ import { BooleanNumber, BorderStyleTypes, LocaleType, SheetTypes } from '@univer
|
||||
const richTextDemo1: IDocumentData = {
|
||||
id: 'd',
|
||||
body: {
|
||||
dataStream: `No.2824163\r\n`,
|
||||
dataStream: 'No.2824163\r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
@@ -46,8 +46,8 @@ const richTextDemo1: IDocumentData = {
|
||||
},
|
||||
documentStyle: {
|
||||
pageSize: {
|
||||
width: Infinity,
|
||||
height: Infinity,
|
||||
width: Number.POSITIVE_INFINITY,
|
||||
height: Number.POSITIVE_INFINITY,
|
||||
},
|
||||
marginTop: 0,
|
||||
marginBottom: 0,
|
||||
@@ -62,7 +62,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
name: 'universheet',
|
||||
sheetOrder: ['sheet-0004'],
|
||||
styles: {
|
||||
'1': {
|
||||
1: {
|
||||
fs: 30,
|
||||
vt: 2,
|
||||
bl: 1,
|
||||
@@ -70,7 +70,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
l: 5,
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
vt: 2,
|
||||
bl: 1,
|
||||
bg: {
|
||||
@@ -106,7 +106,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
vt: 2,
|
||||
bl: 1,
|
||||
bg: {
|
||||
@@ -140,7 +140,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
bl: 1,
|
||||
vt: 2,
|
||||
pd: {
|
||||
@@ -151,13 +151,13 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
ht: 2,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
vt: 2,
|
||||
pd: {
|
||||
l: 5,
|
||||
},
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 12,
|
||||
@@ -165,7 +165,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
rgb: 'rgb(1,136,251)',
|
||||
},
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
vt: 2,
|
||||
pd: {
|
||||
l: 5,
|
||||
@@ -200,7 +200,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -213,13 +213,13 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
rgb: 'rgb(255,251,224)',
|
||||
},
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
vt: 2,
|
||||
pd: {
|
||||
l: 25,
|
||||
},
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
bg: {
|
||||
rgb: '#bf9000',
|
||||
},
|
||||
@@ -233,7 +233,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'11': {
|
||||
11: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 24,
|
||||
@@ -244,7 +244,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
rgb: '#fff',
|
||||
},
|
||||
},
|
||||
'12': {
|
||||
12: {
|
||||
bg: {
|
||||
rgb: 'rgb(248,237,241)',
|
||||
},
|
||||
@@ -255,7 +255,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'13': {
|
||||
13: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -268,7 +268,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'14': {
|
||||
14: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -283,7 +283,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'15': {
|
||||
15: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -296,7 +296,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'16': {
|
||||
16: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -309,7 +309,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'17': {
|
||||
17: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -322,7 +322,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'18': {
|
||||
18: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -335,7 +335,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'19': {
|
||||
19: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -351,7 +351,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'20': {
|
||||
20: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -367,7 +367,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'21': {
|
||||
21: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -383,7 +383,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'22': {
|
||||
22: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -399,7 +399,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'23': {
|
||||
23: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
cl: {
|
||||
@@ -415,7 +415,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'24': {
|
||||
24: {
|
||||
bg: {
|
||||
rgb: '#3d85c6',
|
||||
},
|
||||
@@ -426,7 +426,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'25': {
|
||||
25: {
|
||||
bg: {
|
||||
rgb: '#c27ba0',
|
||||
},
|
||||
@@ -437,7 +437,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'26': {
|
||||
26: {
|
||||
bg: {
|
||||
rgb: 'rgb(224, 102, 102)',
|
||||
},
|
||||
@@ -448,7 +448,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'27': {
|
||||
27: {
|
||||
bg: {
|
||||
rgb: '#f90',
|
||||
},
|
||||
@@ -459,7 +459,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'28': {
|
||||
28: {
|
||||
bg: {
|
||||
rgb: '#76a5af',
|
||||
},
|
||||
@@ -470,7 +470,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'29': {
|
||||
29: {
|
||||
bg: {
|
||||
rgb: '#38761d',
|
||||
},
|
||||
@@ -481,7 +481,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'30': {
|
||||
30: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 30,
|
||||
@@ -499,7 +499,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
b: null,
|
||||
},
|
||||
},
|
||||
'31': {
|
||||
31: {
|
||||
bd: {
|
||||
t: {
|
||||
s: BorderStyleTypes.THIN,
|
||||
@@ -527,7 +527,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'32': {
|
||||
32: {
|
||||
vt: 2,
|
||||
tb: 3,
|
||||
bd: {
|
||||
@@ -552,7 +552,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'33': {
|
||||
33: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -582,7 +582,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'34': {
|
||||
34: {
|
||||
vt: 2,
|
||||
bd: {
|
||||
t: null,
|
||||
@@ -606,7 +606,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'35': {
|
||||
35: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -642,7 +642,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'36': {
|
||||
36: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -672,7 +672,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'37': {
|
||||
37: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -713,7 +713,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'38': {
|
||||
38: {
|
||||
vt: 2,
|
||||
tb: 3,
|
||||
bg: {
|
||||
@@ -749,7 +749,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'39': {
|
||||
39: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bg: {
|
||||
@@ -785,7 +785,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'40': {
|
||||
40: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
fs: 24,
|
||||
@@ -819,7 +819,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'41': {
|
||||
41: {
|
||||
ht: 3,
|
||||
bd: {
|
||||
t: {
|
||||
@@ -848,7 +848,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'42': {
|
||||
42: {
|
||||
vt: 2,
|
||||
cl: {
|
||||
rgb: 'rgb(125,133,22)',
|
||||
@@ -880,7 +880,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'43': {
|
||||
43: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -910,7 +910,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'44': {
|
||||
44: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -940,7 +940,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'45': {
|
||||
45: {
|
||||
vt: 2,
|
||||
tb: 3,
|
||||
pd: {
|
||||
@@ -974,7 +974,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'46': {
|
||||
46: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1004,7 +1004,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'47': {
|
||||
47: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1034,7 +1034,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'48': {
|
||||
48: {
|
||||
vt: 2,
|
||||
bd: {
|
||||
t: {
|
||||
@@ -1063,7 +1063,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'49': {
|
||||
49: {
|
||||
vt: 2,
|
||||
bd: {
|
||||
t: {
|
||||
@@ -1092,7 +1092,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'50': {
|
||||
50: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1122,7 +1122,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'51': {
|
||||
51: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bd: {
|
||||
@@ -1152,7 +1152,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'52': {
|
||||
52: {
|
||||
bd: {
|
||||
t: {
|
||||
s: BorderStyleTypes.THIN,
|
||||
@@ -1180,7 +1180,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'53': {
|
||||
53: {
|
||||
ht: 2,
|
||||
vt: 2,
|
||||
tr: {
|
||||
@@ -1211,7 +1211,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'54': {
|
||||
54: {
|
||||
bd: {
|
||||
l: {
|
||||
s: BorderStyleTypes.THIN,
|
||||
@@ -1227,7 +1227,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'55': {
|
||||
55: {
|
||||
ht: 3,
|
||||
vt: 3,
|
||||
tb: 3,
|
||||
@@ -1261,170 +1261,170 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
id: 'sheet-0004',
|
||||
name: 'sheet0004',
|
||||
cellData: {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
s: '40',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 'Travel Declaration Form',
|
||||
s: '40',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
p: richTextDemo1,
|
||||
s: '41',
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
s: '52',
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'1': {
|
||||
1: {
|
||||
1: {
|
||||
v: 'Department:',
|
||||
s: '42',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: 'Application Date:',
|
||||
s: '42',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'1': {
|
||||
2: {
|
||||
1: {
|
||||
v: 'Business Trip Employee',
|
||||
s: '43',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
s: '46',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: 'Position',
|
||||
s: '46',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
s: '46',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
s: '46',
|
||||
v: 'Entourage',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '47',
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
v: 'Borrower write-off',
|
||||
s: '53',
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'1': {
|
||||
3: {
|
||||
1: {
|
||||
v: 'Business Trip Place',
|
||||
s: '44',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: ' To To To',
|
||||
s: '48',
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
'1': {
|
||||
4: {
|
||||
1: {
|
||||
v: 'Amount',
|
||||
s: '44',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: '(Capital) 万 仟 佰 拾 元 角 分',
|
||||
s: '49',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '(Lower) ¥',
|
||||
s: '48',
|
||||
},
|
||||
},
|
||||
'5': {
|
||||
'1': {
|
||||
5: {
|
||||
1: {
|
||||
v: 'Departure Time',
|
||||
s: '44',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
s: '49',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: 'ETR',
|
||||
s: '50',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
s: '50',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: 'Days',
|
||||
s: '50',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
s: '48',
|
||||
},
|
||||
},
|
||||
'6': {
|
||||
'1': {
|
||||
6: {
|
||||
1: {
|
||||
v: 'Reasons',
|
||||
s: '44',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
s: '48',
|
||||
},
|
||||
},
|
||||
'7': {
|
||||
'1': {
|
||||
7: {
|
||||
1: {
|
||||
v: 'Applicant For Travel',
|
||||
s: '44',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
s: '50',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: 'Administrator',
|
||||
s: '50',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
s: '50',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: 'Financial Manager',
|
||||
s: '50',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '50',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
v: 'Payee',
|
||||
s: '51',
|
||||
},
|
||||
},
|
||||
'8': {
|
||||
'1': {
|
||||
8: {
|
||||
1: {
|
||||
v: 'Department Head',
|
||||
s: '44',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
s: '50',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: 'Manager',
|
||||
s: '50',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
s: '50',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: 'Cashier',
|
||||
s: '50',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
s: '50',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
s: '51',
|
||||
},
|
||||
},
|
||||
'9': {
|
||||
'1': {
|
||||
9: {
|
||||
1: {
|
||||
v: 'Record: The loan is used exclusively for travel expenses, and the travel expenses will not be written off without a business trip application.',
|
||||
s: '45',
|
||||
},
|
||||
@@ -1562,42 +1562,42 @@ export const DEFAULT_WORKBOOK_DATA_DEMO4: IWorkbookData = {
|
||||
},
|
||||
],
|
||||
rowData: {
|
||||
'0': {
|
||||
0: {
|
||||
h: 50,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
h: 20,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
h: 150,
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
h: 30,
|
||||
},
|
||||
},
|
||||
columnData: {
|
||||
'0': {
|
||||
0: {
|
||||
w: 20,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
w: 180,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
w: 120,
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
w: 60,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
w: 60,
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
w: 30,
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
w: 90,
|
||||
},
|
||||
'10': {
|
||||
10: {
|
||||
w: 40,
|
||||
},
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
name: 'universheet',
|
||||
sheetOrder: ['sheet-0001'],
|
||||
styles: {
|
||||
'1': {
|
||||
1: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bl: 1,
|
||||
@@ -37,7 +37,7 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
rgb: 'rgb(255,255,255)',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
vt: 2,
|
||||
ht: 2,
|
||||
bl: 1,
|
||||
@@ -75,7 +75,7 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
vt: 2,
|
||||
bg: {
|
||||
rgb: 'rgb(105,126,146)',
|
||||
@@ -112,7 +112,7 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
fs: 12,
|
||||
vt: 2,
|
||||
pd: {
|
||||
@@ -146,7 +146,7 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
ht: 2,
|
||||
vt: 2,
|
||||
bd: {
|
||||
@@ -176,7 +176,7 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
ht: 1,
|
||||
vt: 2,
|
||||
tb: 3,
|
||||
@@ -230,298 +230,298 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
defaultColumnWidth: 93,
|
||||
defaultRowHeight: 40,
|
||||
cellData: {
|
||||
'1': {
|
||||
'1': {
|
||||
1: {
|
||||
1: {
|
||||
v: 'Variants',
|
||||
s: '2',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 'Platform',
|
||||
s: '2',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: 'UGC Buzz volume',
|
||||
s: '2',
|
||||
},
|
||||
'9': {
|
||||
9: {
|
||||
p: PAGE5_RICHTEXT_1,
|
||||
s: '6',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'3': {
|
||||
2: {
|
||||
3: {
|
||||
v: "Jul'21",
|
||||
s: '1',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: "Aug'21",
|
||||
s: '1',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: "Sep'21",
|
||||
s: '1',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: "Oct'21",
|
||||
s: '1',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: "Nov'21",
|
||||
s: '1',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: "Dec'21",
|
||||
s: '1',
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'1': {
|
||||
3: {
|
||||
1: {
|
||||
v: 'Eleva',
|
||||
s: '3',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 'Amazon',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '4',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '145',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '44',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '20',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '7',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '12',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'4': {
|
||||
'2': {
|
||||
4: {
|
||||
2: {
|
||||
v: 'Google',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '2',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '6',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '5',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '6',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '12',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '3113',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'5': {
|
||||
'2': {
|
||||
5: {
|
||||
2: {
|
||||
v: 'Amazon',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '14',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '13',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '6',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '6',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '11',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '2',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'6': {
|
||||
'1': {
|
||||
6: {
|
||||
1: {
|
||||
v: 'Similac',
|
||||
s: '3',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 'SaleForce',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '451',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '255',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '72',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '23',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '163',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '22',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'7': {
|
||||
'2': {
|
||||
7: {
|
||||
2: {
|
||||
v: 'Oracle',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '0',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '1',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '1136',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '11',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '2',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '1',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'8': {
|
||||
'2': {
|
||||
8: {
|
||||
2: {
|
||||
v: 'Apple',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '7',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '2',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '10',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '5',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '6',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '3',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'9': {
|
||||
'1': {
|
||||
9: {
|
||||
1: {
|
||||
v: 'TC',
|
||||
s: '3',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 'IBM',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '1',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '12',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '2',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '1',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '1',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '1',
|
||||
s: '5',
|
||||
},
|
||||
},
|
||||
'10': {
|
||||
'2': {
|
||||
10: {
|
||||
2: {
|
||||
v: 'Google',
|
||||
s: '4',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: '26',
|
||||
s: '5',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
v: '33',
|
||||
s: '5',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
v: '33',
|
||||
s: '5',
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
v: '6',
|
||||
s: '5',
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
v: '22',
|
||||
s: '5',
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
v: '8',
|
||||
s: '5',
|
||||
},
|
||||
@@ -573,33 +573,33 @@ export const SLIDE_WORKBOOK_DATA: IWorkbookData = {
|
||||
],
|
||||
|
||||
rowData: {
|
||||
'0': {
|
||||
0: {
|
||||
h: 20,
|
||||
},
|
||||
},
|
||||
columnData: {
|
||||
'0': {
|
||||
0: {
|
||||
w: 20,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
w: 120,
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
w: 60,
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
w: 60,
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
w: 60,
|
||||
},
|
||||
'6': {
|
||||
6: {
|
||||
w: 60,
|
||||
},
|
||||
'7': {
|
||||
7: {
|
||||
w: 60,
|
||||
},
|
||||
'8': {
|
||||
8: {
|
||||
w: 60,
|
||||
},
|
||||
},
|
||||
|
||||
+1173
-1173
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@ export const PAGE3_RICHTEXT_1 = {
|
||||
rich: {
|
||||
id: 'd',
|
||||
body: {
|
||||
dataStream: `Digital Immune System\rApplied Observability\r\n`,
|
||||
dataStream: 'Digital Immune System\rApplied Observability\r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
|
||||
@@ -30,7 +30,7 @@ export const PAGE3_RICHTEXT_2 = {
|
||||
rich: {
|
||||
id: 'd',
|
||||
body: {
|
||||
dataStream: `combine SaaS, PaaS and IaaS with tailored\rprovides a curated set of tools, capabilities and processes that are packaged for easy consumption by developers and end users\r\n`,
|
||||
dataStream: 'combine SaaS, PaaS and IaaS with tailored\rprovides a curated set of tools, capabilities and processes that are packaged for easy consumption by developers and end users\r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
|
||||
@@ -30,7 +30,7 @@ export const PAGE3_RICHTEXT_3 = {
|
||||
rich: {
|
||||
id: 'd',
|
||||
body: {
|
||||
dataStream: `SuperApps are more than composite applications that aggregate services.\rAdaptive AI allows for model behavior change post-deployment by using real-time feedback\r\n`,
|
||||
dataStream: 'SuperApps are more than composite applications that aggregate services.\rAdaptive AI allows for model behavior change post-deployment by using real-time feedback\r\n',
|
||||
textRuns: [
|
||||
{
|
||||
st: 0,
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
const mutliNum = (function generate() {
|
||||
const obj = {};
|
||||
for (let i = 0, len = 17; i < len; i++) {
|
||||
|
||||
@@ -41,7 +41,7 @@ export type IComposeInterceptors<T = any, C = any> = (
|
||||
* A helper to compose a certain type of interceptors.
|
||||
*/
|
||||
export const composeInterceptors = <T, C>(interceptors: Array<IInterceptor<T, C>>) =>
|
||||
// eslint-disable-next-line func-names
|
||||
|
||||
function (initialValue: T, context: C) {
|
||||
let index = -1;
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ describe('test case in apply utils', () => {
|
||||
expect(body?.textRuns![2].ts?.bl).toBe(BooleanNumber.FALSE);
|
||||
});
|
||||
|
||||
it(`If textRuns doesn't intersect, they shouldn't be merged`, async () => {
|
||||
it('If textRuns doesn\'t intersect, they shouldn\'t be merged', async () => {
|
||||
const updateTextRuns = [
|
||||
{
|
||||
st: 0,
|
||||
|
||||
@@ -45,10 +45,10 @@ export class ObservableHooks<T> extends Observable<T> {
|
||||
}
|
||||
|
||||
override makeObserverTopPriority() {
|
||||
/** cancel * */
|
||||
/** cancel */
|
||||
}
|
||||
|
||||
override makeObserverBottomPriority() {
|
||||
/** cancel * */
|
||||
/** cancel */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
|
||||
import { Injector } from '@wendellhu/redi';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export const enum UniverInstanceType {
|
||||
UNKNOWN = 0,
|
||||
DOC = 1,
|
||||
SHEET = 2,
|
||||
// eslint-disable-next-line no-magic-numbers
|
||||
|
||||
SLIDE = 3,
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export class LifecycleService extends Disposable {
|
||||
}
|
||||
|
||||
private _reportProgress(stage: LifecycleStages): void {
|
||||
this._logService.debug(`[LifecycleService]`, `lifecycle progressed to "${LifecycleNameMap[stage]}".`);
|
||||
this._logService.debug('[LifecycleService]', `lifecycle progressed to "${LifecycleNameMap[stage]}".`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ export function searchArray(arr: number[], num: number) {
|
||||
return 0;
|
||||
}
|
||||
if (num > arr[arr.length - 1]) {
|
||||
return Infinity;
|
||||
return Number.POSITIVE_INFINITY;
|
||||
}
|
||||
|
||||
if (arr.length < 40 || num <= arr[20] || num >= arr[index - 20]) {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
interface IRgbColor {
|
||||
b: number;
|
||||
|
||||
@@ -516,15 +515,15 @@ const hexToColor: (color: string) => Color = (color) => {
|
||||
}
|
||||
|
||||
const rgbColor: IRgbColor = {
|
||||
r: parseInt(colors[0], 16),
|
||||
r: Number.parseInt(colors[0], 16),
|
||||
|
||||
g: parseInt(colors[1], 16),
|
||||
g: Number.parseInt(colors[1], 16),
|
||||
|
||||
b: parseInt(colors[2], 16),
|
||||
b: Number.parseInt(colors[2], 16),
|
||||
};
|
||||
|
||||
if (colors.length > 3) {
|
||||
rgbColor.a = parseInt(colors[3], 16) / 255;
|
||||
rgbColor.a = Number.parseInt(colors[3], 16) / 255;
|
||||
}
|
||||
|
||||
return rgbColor;
|
||||
@@ -544,15 +543,15 @@ const rgbToColor: (color: string) => Color = (color) => {
|
||||
}
|
||||
|
||||
const rgbColor: IRgbColor = {
|
||||
r: parseInt(values[0], 10),
|
||||
r: Number.parseInt(values[0], 10),
|
||||
|
||||
g: parseInt(values[1], 10),
|
||||
g: Number.parseInt(values[1], 10),
|
||||
|
||||
b: parseInt(values[2], 10),
|
||||
b: Number.parseInt(values[2], 10),
|
||||
};
|
||||
|
||||
if (values.length > 3) {
|
||||
rgbColor.a = parseFloat(values[3]);
|
||||
rgbColor.a = Number.parseFloat(values[3]);
|
||||
}
|
||||
|
||||
return rgbColor;
|
||||
@@ -572,15 +571,15 @@ const hslToColor: (color: string) => Color = (color) => {
|
||||
}
|
||||
|
||||
const hslColor: IHslColor = {
|
||||
h: parseInt(values[0], 10),
|
||||
h: Number.parseInt(values[0], 10),
|
||||
|
||||
s: parseFloat(values[1]),
|
||||
s: Number.parseFloat(values[1]),
|
||||
|
||||
l: parseFloat(values[2]),
|
||||
l: Number.parseFloat(values[2]),
|
||||
};
|
||||
|
||||
if (values.length > 3) {
|
||||
hslColor.a = parseFloat(values[3]);
|
||||
hslColor.a = Number.parseFloat(values[3]);
|
||||
}
|
||||
|
||||
return hslColor;
|
||||
@@ -600,15 +599,15 @@ const hsvToColor: (color: string) => Color = (color) => {
|
||||
}
|
||||
|
||||
const hsvColor: IHsvColor = {
|
||||
h: parseInt(values[0], 10),
|
||||
h: Number.parseInt(values[0], 10),
|
||||
|
||||
s: parseFloat(values[1]),
|
||||
s: Number.parseFloat(values[1]),
|
||||
|
||||
v: parseFloat(values[2]),
|
||||
v: Number.parseFloat(values[2]),
|
||||
};
|
||||
|
||||
if (values.length > 3) {
|
||||
hsvColor.a = parseFloat(values[3]);
|
||||
hsvColor.a = Number.parseFloat(values[3]);
|
||||
}
|
||||
|
||||
return hsvColor;
|
||||
|
||||
@@ -202,7 +202,7 @@ export function handleJsonToDom(p: IDocumentData): string {
|
||||
* @param style
|
||||
* @returns
|
||||
*/
|
||||
// eslint-disable-next-line max-lines-per-function
|
||||
|
||||
export function handleStyleToString(style: IStyleData, isCell: boolean = false) {
|
||||
let str = '';
|
||||
const styleMap = new Map([
|
||||
@@ -235,7 +235,7 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
'it',
|
||||
() => {
|
||||
if (style.it) {
|
||||
str += `font-style: italic; `;
|
||||
str += 'font-style: italic; ';
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -243,7 +243,7 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
'bl',
|
||||
() => {
|
||||
if (style.bl) {
|
||||
str += `font-weight: bold; `;
|
||||
str += 'font-weight: bold; ';
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -255,7 +255,7 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
if (str.indexOf('text-decoration-line') > -1) {
|
||||
str = str.replace(/(?<=text-decoration-line:.*)\b(?=;)/g, ' underline');
|
||||
} else {
|
||||
str += `text-decoration-line: underline; `;
|
||||
str += 'text-decoration-line: underline; ';
|
||||
}
|
||||
if (style.ul.cl && str.indexOf('text-decoration-color') === -1) {
|
||||
str += `text-decoration-color: ${getColorStyle(style.ul.cl)}; `;
|
||||
@@ -273,7 +273,7 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
if (str.indexOf('text-decoration-line') > -1) {
|
||||
str = str.replace(/(?<=text-decoration-line:.*)\b(?=;)/g, ' line-through');
|
||||
} else {
|
||||
str += `text-decoration-line: line-through; `;
|
||||
str += 'text-decoration-line: line-through; ';
|
||||
}
|
||||
if (style.st.cl && str.indexOf('text-decoration-color') === -1) {
|
||||
str += `text-decoration-color: ${getColorStyle(style.st.cl)}; `;
|
||||
@@ -291,7 +291,7 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
if (str.indexOf('text-decoration-line') > -1) {
|
||||
str = str.replace(/(?<=text-decoration-line:.*)\b(?=;)/g, ' overline');
|
||||
} else {
|
||||
str += `text-decoration-line: overline; `;
|
||||
str += 'text-decoration-line: overline; ';
|
||||
}
|
||||
if (style.ol.cl && str.indexOf('text-decoration-color') === -1) {
|
||||
str += `text-decoration-color: ${getColorStyle(style.ol.cl)}; `;
|
||||
@@ -339,9 +339,9 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
'va',
|
||||
() => {
|
||||
if (style.va === BaselineOffset.SUBSCRIPT) {
|
||||
str += `vertical-align: sub; `;
|
||||
str += 'vertical-align: sub; ';
|
||||
} else if (style.va === BaselineOffset.SUPERSCRIPT) {
|
||||
str += `vertical-align: super; `;
|
||||
str += 'vertical-align: super; ';
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -349,9 +349,9 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
'td',
|
||||
() => {
|
||||
if (style.td === TextDirection.LEFT_TO_RIGHT) {
|
||||
str += `direction: ltr; `;
|
||||
str += 'direction: ltr; ';
|
||||
} else if (style.td === TextDirection.RIGHT_TO_LEFT) {
|
||||
str += `direction: rtl; `;
|
||||
str += 'direction: rtl; ';
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -367,13 +367,13 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
'ht',
|
||||
() => {
|
||||
if (style.ht === HorizontalAlign.LEFT) {
|
||||
str += `text-align: left; `;
|
||||
str += 'text-align: left; ';
|
||||
} else if (style.ht === HorizontalAlign.RIGHT) {
|
||||
str += `text-align: right; `;
|
||||
str += 'text-align: right; ';
|
||||
} else if (style.ht === HorizontalAlign.CENTER) {
|
||||
str += `text-align: center; `;
|
||||
str += 'text-align: center; ';
|
||||
} else if (style.ht === HorizontalAlign.JUSTIFIED) {
|
||||
str += `text-align: justify; `;
|
||||
str += 'text-align: justify; ';
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -381,11 +381,11 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
'vt',
|
||||
() => {
|
||||
if (style.vt === VerticalAlign.BOTTOM) {
|
||||
str += `vertical-align: bottom; `;
|
||||
str += 'vertical-align: bottom; ';
|
||||
} else if (style.vt === VerticalAlign.TOP) {
|
||||
str += `vertical-align: top; `;
|
||||
str += 'vertical-align: top; ';
|
||||
} else if (style.vt === VerticalAlign.MIDDLE) {
|
||||
str += `vertical-align: middle; `;
|
||||
str += 'vertical-align: middle; ';
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -393,11 +393,11 @@ export function handleStyleToString(style: IStyleData, isCell: boolean = false)
|
||||
'tb',
|
||||
() => {
|
||||
if (style.tb === WrapStrategy.CLIP) {
|
||||
str += `text-overflow: clip; `;
|
||||
str += 'text-overflow: clip; ';
|
||||
} else if (style.tb === WrapStrategy.OVERFLOW) {
|
||||
str += `text-break: overflow; `;
|
||||
str += 'text-break: overflow; ';
|
||||
} else if (style.tb === WrapStrategy.WRAP) {
|
||||
str += `word-wrap: break-word;`;
|
||||
str += 'word-wrap: break-word;';
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
export function ABCToNumber(a: string) {
|
||||
if (a == null || a.length === 0) {
|
||||
return NaN;
|
||||
return Number.NaN;
|
||||
}
|
||||
const str = a.toLowerCase().split('');
|
||||
const al = str.length;
|
||||
@@ -28,7 +28,7 @@ export function ABCToNumber(a: string) {
|
||||
numOut += charnum * 26 ** (al - i - 1);
|
||||
}
|
||||
if (numOut === 0) {
|
||||
return NaN;
|
||||
return Number.NaN;
|
||||
}
|
||||
return numOut - 1;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ export class Tools {
|
||||
if (isIE) {
|
||||
const reIE = new RegExp('MSIE (\\d+\\.\\d+);');
|
||||
reIE.test(userAgent);
|
||||
const fIEVersion = parseFloat(RegExp.$1);
|
||||
const fIEVersion = Number.parseFloat(RegExp.$1);
|
||||
if (fIEVersion === 7) {
|
||||
return 'IE7';
|
||||
}
|
||||
@@ -393,7 +393,7 @@ export class Tools {
|
||||
}
|
||||
|
||||
static isStringNumber(value?: any): boolean {
|
||||
return !isNaN(parseFloat(value)) && isFinite(value);
|
||||
return !isNaN(Number.parseFloat(value)) && isFinite(value);
|
||||
}
|
||||
|
||||
static isObject<T>(value?: any): value is T {
|
||||
@@ -544,7 +544,7 @@ export class Tools {
|
||||
|
||||
static ABCatNum(a: string): number {
|
||||
if (a == null || a.length === 0) {
|
||||
return NaN;
|
||||
return Number.NaN;
|
||||
}
|
||||
|
||||
const str = a.toLowerCase().split('');
|
||||
@@ -556,7 +556,7 @@ export class Tools {
|
||||
numOut += charnum * 26 ** (al - i - 1);
|
||||
}
|
||||
if (numOut === 0) {
|
||||
return NaN;
|
||||
return Number.NaN;
|
||||
}
|
||||
return numOut - 1;
|
||||
}
|
||||
@@ -589,7 +589,7 @@ export class Tools {
|
||||
|
||||
static randSort<T>(arr: T[]) {
|
||||
for (let i = 0, len = arr.length; i < len; i++) {
|
||||
const rand = parseInt((Math.random() * len).toString());
|
||||
const rand = Number.parseInt((Math.random() * len).toString());
|
||||
const temp = arr[rand];
|
||||
arr[rand] = arr[i];
|
||||
arr[i] = temp;
|
||||
|
||||
@@ -31,11 +31,11 @@ const TEST_WORKBOOK_DATA: IWorkbookData = {
|
||||
sheet1: {
|
||||
id: 'sheet1',
|
||||
cellData: {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
v: 'A1',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 'B1',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -21,8 +21,8 @@ import { Styles } from '../styles';
|
||||
describe('Test Styles', () => {
|
||||
it('Init styles, set style', () => {
|
||||
const styles = new Styles({
|
||||
'1': { fs: 12 },
|
||||
'2': { fs: 14 },
|
||||
1: { fs: 12 },
|
||||
2: { fs: 14 },
|
||||
});
|
||||
|
||||
// get style by id
|
||||
@@ -57,8 +57,8 @@ describe('Test Styles', () => {
|
||||
// toJSON function
|
||||
const stylesJSON = styles.toJSON();
|
||||
expect(stylesJSON).toEqual({
|
||||
'1': { fs: 12 },
|
||||
'2': { fs: 14 },
|
||||
1: { fs: 12 },
|
||||
2: { fs: 14 },
|
||||
[styleId as string]: { fs: 16 },
|
||||
});
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ export class Workbook extends Disposable {
|
||||
return Tools.deepClone(this._snapshot);
|
||||
}
|
||||
|
||||
static isIRangeType(range: IRangeType | IRangeType[]): Boolean {
|
||||
static isIRangeType(range: IRangeType | IRangeType[]): boolean {
|
||||
return typeof range === 'string' || 'startRow' in range || 'row' in range;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ export class Workbook extends Disposable {
|
||||
rangeTxt = txt;
|
||||
}
|
||||
if (rangeTxt.indexOf(':') === -1) {
|
||||
const row = parseInt(rangeTxt.replace(/[^0-9]/g, ''), 10) - 1;
|
||||
const row = Number.parseInt(rangeTxt.replace(/[^0-9]/g, ''), 10) - 1;
|
||||
const col = Tools.ABCatNum(rangeTxt.replace(/[^A-Za-z]/g, ''));
|
||||
|
||||
if (!Number.isNaN(row) && !Number.isNaN(col)) {
|
||||
@@ -443,8 +443,8 @@ export class Workbook extends Disposable {
|
||||
const col: IColumnStartEndData = [0, 0];
|
||||
const maxRow = this.getSheetBySheetName(sheetTxt)?.getMaxRows() || this.getActiveSheet()?.getMaxRows();
|
||||
const maxCol = this.getSheetBySheetName(sheetTxt)?.getMaxColumns() || this.getActiveSheet()?.getMaxColumns();
|
||||
row[0] = parseInt(rangeTxt[0].replace(/[^0-9]/g, ''), 10) - 1;
|
||||
row[1] = parseInt(rangeTxt[1].replace(/[^0-9]/g, ''), 10) - 1;
|
||||
row[0] = Number.parseInt(rangeTxt[0].replace(/[^0-9]/g, ''), 10) - 1;
|
||||
row[1] = Number.parseInt(rangeTxt[1].replace(/[^0-9]/g, ''), 10) - 1;
|
||||
|
||||
if (Number.isNaN(row[0])) {
|
||||
row[0] = 0;
|
||||
|
||||
@@ -361,7 +361,7 @@ export class Worksheet {
|
||||
* Returns true if the sheet's gridlines are hidden; otherwise returns false. Gridlines are visible by default.
|
||||
* @returns Gridlines Hidden Status
|
||||
*/
|
||||
hasHiddenGridlines(): Boolean {
|
||||
hasHiddenGridlines(): boolean {
|
||||
const { _snapshot: _config } = this;
|
||||
const { showGridlines } = _config;
|
||||
if (showGridlines === 0) {
|
||||
|
||||
@@ -186,7 +186,7 @@ export const DEFAULT_STYLES = {
|
||||
*/
|
||||
v: BooleanNumber.FALSE,
|
||||
},
|
||||
/** *
|
||||
/**
|
||||
* textDirection
|
||||
*/
|
||||
td: TextDirection.UNSPECIFIED,
|
||||
|
||||
@@ -185,7 +185,7 @@ export interface IStyleData extends IStyleBase {
|
||||
* textRotation
|
||||
*/
|
||||
tr?: Nullable<ITextRotation>;
|
||||
/** *
|
||||
/**
|
||||
* textDirection
|
||||
*/
|
||||
td?: Nullable<TextDirection>;
|
||||
|
||||
@@ -39,7 +39,7 @@ function PagerDemo() {
|
||||
<Input placeholder="请输入" />
|
||||
</FormLayout>
|
||||
<FormLayout label="行标题与列标题" desc="转到“查看”>“冻结”可选择要在所有页面重复的行/列">
|
||||
<Select value={''} onChange={() => {}} />
|
||||
<Select value="" onChange={() => {}} />
|
||||
</FormLayout>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
|
||||
import styles from './index.module.less';
|
||||
|
||||
@@ -94,7 +94,6 @@ export class Message {
|
||||
}
|
||||
|
||||
append(type: MessageType, options: IMessageMethodOptions) {
|
||||
// eslint-disable-next-line no-magic-numbers
|
||||
const { content, delay = 3000 } = options;
|
||||
const key = Date.now();
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export interface ITreeProps {
|
||||
* @description
|
||||
* - `TreeSelectionMode.ONLY_LEAF_NODE` only select leaf node
|
||||
* - `TreeSelectionMode.ALL` select all node
|
||||
* */
|
||||
*/
|
||||
selectionMode?: TreeSelectionMode;
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,9 +25,9 @@ function convertToDashCase(input: string): string {
|
||||
function convertHexToRgb(input: string): string {
|
||||
if (input.startsWith('#')) {
|
||||
const hex = input.replace('#', '');
|
||||
const r = parseInt(hex.substring(0, 2), 16);
|
||||
const g = parseInt(hex.substring(2, 4), 16);
|
||||
const b = parseInt(hex.substring(4, 6), 16);
|
||||
const r = Number.parseInt(hex.substring(0, 2), 16);
|
||||
const g = Number.parseInt(hex.substring(2, 4), 16);
|
||||
const b = Number.parseInt(hex.substring(4, 6), 16);
|
||||
|
||||
return `${r}, ${g}, ${b}`;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export class AppUIController {
|
||||
|
||||
/**
|
||||
* Change language
|
||||
* @param {String} locale new language
|
||||
* @param {string} locale new language
|
||||
*
|
||||
* e: {target: HTMLSelectElement } reference from https://stackoverflow.com/a/48443771
|
||||
*
|
||||
|
||||
@@ -53,7 +53,7 @@ export class DocContainerUIController {
|
||||
|
||||
/**
|
||||
* Change language
|
||||
* @param {String} lang new language
|
||||
* @param {string} lang new language
|
||||
*
|
||||
* e: {target: HTMLSelectElement } reference from https://stackoverflow.com/a/48443771
|
||||
*
|
||||
|
||||
@@ -175,11 +175,9 @@ export class DocContainer extends Component<IBaseDocContainerProps> {
|
||||
{/* innerLeft */}
|
||||
</aside>
|
||||
<div
|
||||
className={
|
||||
config.contentSplit === 'vertical'
|
||||
? style.contentContainerVertical
|
||||
: style.contentContainerHorizontal
|
||||
}
|
||||
className={config.contentSplit === 'vertical'
|
||||
? style.contentContainerVertical
|
||||
: style.contentContainerHorizontal}
|
||||
>
|
||||
{!!config.contentSplit && (
|
||||
<div ref={this.splitLeftRef} className={style.contentInnerLeftContainer}>
|
||||
|
||||
@@ -160,7 +160,7 @@ describe('test cases in clipboard', () => {
|
||||
|
||||
describe('Test paste in multiple ranges', () => {
|
||||
it('Should paste content to each selection ranges', async () => {
|
||||
expect(getTextByPosition(0, 5)).toBe(`What’`);
|
||||
expect(getTextByPosition(0, 5)).toBe('What’');
|
||||
expect(getFormatValueAt('bl', 0)).toBe(BooleanNumber.FALSE);
|
||||
|
||||
const commandParams: IInnerPasteCommandParams = {
|
||||
@@ -182,7 +182,7 @@ describe('test cases in clipboard', () => {
|
||||
|
||||
await commandService.executeCommand(InnerPasteCommand.id, commandParams);
|
||||
|
||||
expect(getTextByPosition(0, 6)).toBe(`univer`);
|
||||
expect(getTextByPosition(0, 6)).toBe('univer');
|
||||
expect(getTextByPosition(11, 17)).toBe('univer');
|
||||
expect(getFormatValueAt('bl', 0)).toBe(BooleanNumber.TRUE);
|
||||
|
||||
@@ -192,7 +192,7 @@ describe('test cases in clipboard', () => {
|
||||
|
||||
describe('Test cut in multiple ranges', () => {
|
||||
it('Should cut content to each selection ranges', async () => {
|
||||
expect(getTextByPosition(0, 5)).toBe(`What’`);
|
||||
expect(getTextByPosition(0, 5)).toBe('What’');
|
||||
expect(getFormatValueAt('bl', 0)).toBe(BooleanNumber.FALSE);
|
||||
|
||||
const commandParams: IInnerCutCommandParams = {
|
||||
@@ -202,7 +202,7 @@ describe('test cases in clipboard', () => {
|
||||
|
||||
await commandService.executeCommand(CutContentCommand.id, commandParams);
|
||||
|
||||
expect(getTextByPosition(0, 5)).toBe(`s New`);
|
||||
expect(getTextByPosition(0, 5)).toBe('s New');
|
||||
|
||||
expect(await commandService.executeCommand(UndoCommand.id)).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ export class PageRenderController extends Disposable {
|
||||
const { width, pageWidth, height, pageHeight } = page;
|
||||
|
||||
ctx.save();
|
||||
// eslint-disable-next-line no-magic-numbers
|
||||
|
||||
ctx.translate(pageLeft - 0.5, pageTop - 0.5);
|
||||
Rect.drawWith(ctx, {
|
||||
width: pageSize?.width ?? pageWidth ?? width,
|
||||
|
||||
@@ -110,7 +110,7 @@ export class ZoomController extends Disposable {
|
||||
|
||||
const currentRatio = documentModel.zoomRatio;
|
||||
|
||||
let nextRatio = +parseFloat(`${currentRatio + ratioDelta}`).toFixed(1);
|
||||
let nextRatio = +Number.parseFloat(`${currentRatio + ratioDelta}`).toFixed(1);
|
||||
nextRatio = nextRatio >= 4 ? 4 : nextRatio <= 0.1 ? 0.1 : nextRatio;
|
||||
|
||||
this._commandService.executeCommand(SetDocZoomRatioCommand.id, {
|
||||
@@ -197,7 +197,7 @@ export class ZoomController extends Disposable {
|
||||
const parent = scene?.getParent();
|
||||
|
||||
const { width: docsWidth, height: docsHeight, pageMarginLeft, pageMarginTop } = docsComponent;
|
||||
if (parent == null || docsWidth === Infinity || docsHeight === Infinity) {
|
||||
if (parent == null || docsWidth === Number.POSITIVE_INFINITY || docsHeight === Number.POSITIVE_INFINITY) {
|
||||
return;
|
||||
}
|
||||
const { width: engineWidth, height: engineHeight } = parent;
|
||||
@@ -208,7 +208,7 @@ export class ZoomController extends Disposable {
|
||||
|
||||
let sceneHeight = 0;
|
||||
|
||||
let scrollToX = Infinity;
|
||||
let scrollToX = Number.POSITIVE_INFINITY;
|
||||
|
||||
if (engineWidth > (docsWidth + pageMarginLeft * 2) * zoomRatio) {
|
||||
docsLeft = engineWidth / 2 - (docsWidth * zoomRatio) / 2;
|
||||
@@ -240,7 +240,7 @@ export class ZoomController extends Disposable {
|
||||
docsComponent.translate(docsLeft, docsTop);
|
||||
|
||||
const viewport = scene.getViewport(VIEWPORT_KEY.VIEW_MAIN);
|
||||
if (scrollToX !== Infinity && viewport != null) {
|
||||
if (scrollToX !== Number.POSITIVE_INFINITY && viewport != null) {
|
||||
const actualX = viewport.getBarScroll(scrollToX, 0).x;
|
||||
viewport.scrollTo({
|
||||
x: actualX,
|
||||
|
||||
@@ -70,11 +70,11 @@ export function extractNodeStyle(node: HTMLElement): ITextStyle {
|
||||
}
|
||||
|
||||
case 'font-size': {
|
||||
const fontSize = parseInt(cssValue);
|
||||
const fontSize = Number.parseInt(cssValue);
|
||||
|
||||
if (!Number.isNaN(fontSize)) {
|
||||
// TODO: @JOCS, hand other CSS value unit, rem, em, pt, %
|
||||
docStyles.fs = /pt$/.test(cssValue) ? ptToPixel(fontSize) : fontSize;
|
||||
docStyles.fs = cssValue.endsWith('pt') ? ptToPixel(fontSize) : fontSize;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -28,13 +28,13 @@ export function getParagraphStyle(el: HTMLElement): Nullable<IParagraphStyle> {
|
||||
|
||||
switch (cssRule) {
|
||||
case 'margin-top': {
|
||||
const marginTopValue = parseInt(cssValue);
|
||||
const marginTopValue = Number.parseInt(cssValue);
|
||||
paragraphStyle.spaceAbove = /pt/.test(cssValue) ? ptToPixel(marginTopValue) : marginTopValue;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'margin-bottom': {
|
||||
const marginBottomValue = parseInt(cssValue);
|
||||
const marginBottomValue = Number.parseInt(cssValue);
|
||||
paragraphStyle.spaceBelow = /pt/.test(cssValue) ? ptToPixel(marginBottomValue) : marginBottomValue;
|
||||
|
||||
break;
|
||||
|
||||
@@ -68,7 +68,7 @@ function covertTextRunToHtml(dataStream: string, textRun: ITextRun): string {
|
||||
|
||||
// overline
|
||||
if (ol) {
|
||||
style.push(`text-decoration: overline`);
|
||||
style.push('text-decoration: overline');
|
||||
}
|
||||
|
||||
// background color
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
|
||||
import type { DocumentDataModel, EventState, Nullable } from '@univerjs/core';
|
||||
import {
|
||||
DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
|
||||
|
||||
@@ -39,11 +39,11 @@ export const REFERENCE_REGEX_SINGLE_ROW = `^(${UNIT_NAME_REGEX})?(${SHEET_NAME_R
|
||||
|
||||
export const REFERENCE_REGEX_SINGLE_COLUMN = `^(${UNIT_NAME_REGEX})?(${SHEET_NAME_REGEX})?\\s*?\\${ABSOLUTE_SYMBOL}?[A-Za-z]+$`;
|
||||
|
||||
const TABLE_NAME_REGEX = `((?![~!@#$%^&*()_+<>?:,./;’,。、‘:“《》?~!@#¥%……()【】\\[\\]\\/\\\\]).)+`;
|
||||
const TABLE_NAME_REGEX = '((?![~!@#$%^&*()_+<>?:,./;’,。、‘:“《》?~!@#¥%……()【】\\[\\]\\/\\\\]).)+';
|
||||
|
||||
const TABLE_TITLE_REGEX = `\\[#.+\\]\\s*?,\\s*?`;
|
||||
const TABLE_TITLE_REGEX = '\\[#.+\\]\\s*?,\\s*?';
|
||||
|
||||
const TABLE_CONTENT_REGEX = `\\[((?<!#).)*\\]`;
|
||||
const TABLE_CONTENT_REGEX = '\\[((?<!#).)*\\]';
|
||||
|
||||
const TABLE_MULTIPLE_COLUMN_REGEX = `${TABLE_CONTENT_REGEX}${RANGE_SYMBOL}${TABLE_CONTENT_REGEX}`;
|
||||
|
||||
@@ -53,9 +53,9 @@ export const REFERENCE_TABLE_SINGLE_COLUMN_REGEX = `^(${UNIT_NAME_REGEX})?${TABL
|
||||
|
||||
export const REFERENCE_TABLE_MULTIPLE_COLUMN_REGEX = `^(${UNIT_NAME_REGEX})?${TABLE_NAME_REGEX}(\\[${TABLE_MULTIPLE_COLUMN_REGEX}\\])?$|^${TABLE_NAME_REGEX}(\\[${TABLE_TITLE_REGEX}${TABLE_MULTIPLE_COLUMN_REGEX}\\])?$`; // =Table1[[#Title],[Column1]:[Column2]] | =Table1[[Column1]:[Column2]]
|
||||
|
||||
export const $SUPER_TABLE_COLUMN_REGEX = `[.*?]`;
|
||||
export const $SUPER_TABLE_COLUMN_REGEX = '[.*?]';
|
||||
|
||||
export const $ARRAY_VALUE_REGEX = `{.*?}`;
|
||||
export const $ARRAY_VALUE_REGEX = '{.*?}';
|
||||
|
||||
export function isReferenceString(refString: string) {
|
||||
return (
|
||||
|
||||
@@ -25,102 +25,102 @@ describe('lexer nodeMaker test', () => {
|
||||
describe('lexer', () => {
|
||||
it('lambda simple1', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(
|
||||
`=lambda(x,y, x*y*x)(sum(1,(1+2)*3),2)+1-max(100,200)`
|
||||
'=lambda(x,y, x*y*x)(sum(1,(1+2)*3),2)+1-max(100,200)'
|
||||
) as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"lambda","st":0,"ed":5,"children":[{"token":"L_1","st":14,"ed":16,"children":[{"token":"P_1","st":15,"ed":17,"children":[{"token":"sum","st":19,"ed":21,"children":[{"token":"P_1","st":19,"ed":21,"children":["1"]},{"token":"P_1","st":21,"ed":23,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":30,"ed":32,"children":["2"]}]},{"token":"P_1","st":3,"ed":5,"children":["x"]},{"token":"P_1","st":5,"ed":7,"children":["y"]},{"token":"P_1","st":7,"ed":9,"children":[" x","y","x","*","*"]}]},"1",{"token":"max","st":39,"ed":41,"children":[{"token":"P_1","st":39,"ed":41,"children":["100"]},{"token":"P_1","st":43,"ed":45,"children":["200"]}]},"-","+"]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"lambda","st":0,"ed":5,"children":[{"token":"L_1","st":14,"ed":16,"children":[{"token":"P_1","st":15,"ed":17,"children":[{"token":"sum","st":19,"ed":21,"children":[{"token":"P_1","st":19,"ed":21,"children":["1"]},{"token":"P_1","st":21,"ed":23,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":30,"ed":32,"children":["2"]}]},{"token":"P_1","st":3,"ed":5,"children":["x"]},{"token":"P_1","st":5,"ed":7,"children":["y"]},{"token":"P_1","st":7,"ed":9,"children":[" x","y","x","*","*"]}]},"1",{"token":"max","st":39,"ed":41,"children":[{"token":"P_1","st":39,"ed":41,"children":["100"]},{"token":"P_1","st":43,"ed":45,"children":["200"]}]},"-","+"]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('lambda mixed2', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(
|
||||
`=(-(1+2)--@A1:B2 + 5)/2 + -sum(indirect(A5):B10# + B6# + A1:offset(C5, 1, 1) , 100) + {1,2,3;4,5,6;7,8,10} + lambda(x,y,z, x*y*z)(sum(1,(1+2)*3),2,lambda(x,y, @offset(A1:B0,x#*y#))(1,2):C20) + sum((1+2%)*30%, 1+2)%`
|
||||
'=(-(1+2)--@A1:B2 + 5)/2 + -sum(indirect(A5):B10# + B6# + A1:offset(C5, 1, 1) , 100) + {1,2,3;4,5,6;7,8,10} + lambda(x,y,z, x*y*z)(sum(1,(1+2)*3),2,lambda(x,y, @offset(A1:B0,x#*y#))(1,2):C20) + sum((1+2%)*30%, 1+2)%'
|
||||
) as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"-","st":1,"ed":1,"children":[{"token":"P_1","st":-1,"ed":1,"children":["1","2","+"]}]},{"token":"-","st":-1,"ed":-1,"children":[{"token":"@","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B2 ","st":-1,"ed":-1,"children":[]}]}]}]}]}," 5","+","-","2 ","/",{"token":" -sum","st":24,"ed":28,"children":[{"token":"P_1","st":26,"ed":28,"children":[{"token":"#","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"indirect","st":30,"ed":37,"children":[{"token":"P_1","st":35,"ed":37,"children":["A5"]}]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"#","st":-1,"ed":-1,"children":[" B6"]},{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":" A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"offset","st":59,"ed":64,"children":[{"token":"P_1","st":62,"ed":64,"children":["C5"]},{"token":"P_1","st":65,"ed":67,"children":[" 1"]},{"token":"P_1","st":68,"ed":70,"children":[" 1"]}]}]}]}," +"," +"]},{"token":"P_1","st":74,"ed":76,"children":[" 100"]}]}," {1,2,3;4,5,6;7,8,10}",{"token":" lambda","st":109,"ed":115,"children":[{"token":"L_1","st":126,"ed":128,"children":[{"token":"P_1","st":127,"ed":129,"children":[{"token":"sum","st":131,"ed":133,"children":[{"token":"P_1","st":131,"ed":133,"children":["1"]},{"token":"P_1","st":133,"ed":135,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":142,"ed":144,"children":["2"]},{"token":"P_1","st":144,"ed":146,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"lambda","st":148,"ed":153,"children":[{"token":"L_1","st":177,"ed":179,"children":[{"token":"P_1","st":178,"ed":180,"children":["1"]},{"token":"P_1","st":180,"ed":182,"children":["2"]}]},{"token":"P_1","st":151,"ed":153,"children":["x"]},{"token":"P_1","st":153,"ed":155,"children":["y"]},{"token":"P_1","st":155,"ed":157,"children":[{"token":" @offset","st":159,"ed":166,"children":[{"token":"P_1","st":164,"ed":166,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B0","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":170,"ed":172,"children":[{"token":"#","st":-1,"ed":-1,"children":["x"]},{"token":"#","st":-1,"ed":-1,"children":["y"]},"*"]}]}]}]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C20","st":-1,"ed":-1,"children":[]}]}]}]}]},{"token":"P_1","st":113,"ed":115,"children":["x"]},{"token":"P_1","st":115,"ed":117,"children":["y"]},{"token":"P_1","st":117,"ed":119,"children":["z"]},{"token":"P_1","st":119,"ed":121,"children":[" x","y","z","*","*"]}]},{"token":"%","st":-1,"ed":-1,"children":[{"token":" sum","st":193,"ed":196,"children":[{"token":"P_1","st":194,"ed":196,"children":["1",{"token":"%","st":-1,"ed":-1,"children":["2"]},"+",{"token":"%","st":-1,"ed":-1,"children":["30"]},"*"]},{"token":"P_1","st":205,"ed":207,"children":[" 1","2","+"]}]}]}," +"," +"," +","+"]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"-","st":1,"ed":1,"children":[{"token":"P_1","st":-1,"ed":1,"children":["1","2","+"]}]},{"token":"-","st":-1,"ed":-1,"children":[{"token":"@","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B2 ","st":-1,"ed":-1,"children":[]}]}]}]}]}," 5","+","-","2 ","/",{"token":" -sum","st":24,"ed":28,"children":[{"token":"P_1","st":26,"ed":28,"children":[{"token":"#","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"indirect","st":30,"ed":37,"children":[{"token":"P_1","st":35,"ed":37,"children":["A5"]}]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"#","st":-1,"ed":-1,"children":[" B6"]},{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":" A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"offset","st":59,"ed":64,"children":[{"token":"P_1","st":62,"ed":64,"children":["C5"]},{"token":"P_1","st":65,"ed":67,"children":[" 1"]},{"token":"P_1","st":68,"ed":70,"children":[" 1"]}]}]}]}," +"," +"]},{"token":"P_1","st":74,"ed":76,"children":[" 100"]}]}," {1,2,3;4,5,6;7,8,10}",{"token":" lambda","st":109,"ed":115,"children":[{"token":"L_1","st":126,"ed":128,"children":[{"token":"P_1","st":127,"ed":129,"children":[{"token":"sum","st":131,"ed":133,"children":[{"token":"P_1","st":131,"ed":133,"children":["1"]},{"token":"P_1","st":133,"ed":135,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":142,"ed":144,"children":["2"]},{"token":"P_1","st":144,"ed":146,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"lambda","st":148,"ed":153,"children":[{"token":"L_1","st":177,"ed":179,"children":[{"token":"P_1","st":178,"ed":180,"children":["1"]},{"token":"P_1","st":180,"ed":182,"children":["2"]}]},{"token":"P_1","st":151,"ed":153,"children":["x"]},{"token":"P_1","st":153,"ed":155,"children":["y"]},{"token":"P_1","st":155,"ed":157,"children":[{"token":" @offset","st":159,"ed":166,"children":[{"token":"P_1","st":164,"ed":166,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B0","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":170,"ed":172,"children":[{"token":"#","st":-1,"ed":-1,"children":["x"]},{"token":"#","st":-1,"ed":-1,"children":["y"]},"*"]}]}]}]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C20","st":-1,"ed":-1,"children":[]}]}]}]}]},{"token":"P_1","st":113,"ed":115,"children":["x"]},{"token":"P_1","st":115,"ed":117,"children":["y"]},{"token":"P_1","st":117,"ed":119,"children":["z"]},{"token":"P_1","st":119,"ed":121,"children":[" x","y","z","*","*"]}]},{"token":"%","st":-1,"ed":-1,"children":[{"token":" sum","st":193,"ed":196,"children":[{"token":"P_1","st":194,"ed":196,"children":["1",{"token":"%","st":-1,"ed":-1,"children":["2"]},"+",{"token":"%","st":-1,"ed":-1,"children":["30"]},"*"]},{"token":"P_1","st":205,"ed":207,"children":[" 1","2","+"]}]}]}," +"," +"," +","+"]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('normal', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(
|
||||
`=(sum(max(B1:C10,10)*5-100,((1+1)*2+5)/2,10)+count(B1:C10,10*5-100))*5-100`
|
||||
'=(sum(max(B1:C10,10)*5-100,((1+1)*2+5)/2,10)+count(B1:C10,10*5-100))*5-100'
|
||||
) as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"sum","st":1,"ed":3,"children":[{"token":"P_1","st":1,"ed":3,"children":[{"token":"max","st":5,"ed":7,"children":[{"token":"P_1","st":5,"ed":7,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":12,"ed":14,"children":["10"]}]},"5","*","100","-"]},{"token":"P_1","st":22,"ed":24,"children":["1","1","+","2","*","5","+","2","/"]},{"token":"P_1","st":36,"ed":38,"children":["10"]}]},{"token":"count","st":44,"ed":48,"children":[{"token":"P_1","st":46,"ed":48,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":53,"ed":55,"children":["10","5","*","100","-"]}]},"+","5","*","100","-"]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"sum","st":1,"ed":3,"children":[{"token":"P_1","st":1,"ed":3,"children":[{"token":"max","st":5,"ed":7,"children":[{"token":"P_1","st":5,"ed":7,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":12,"ed":14,"children":["10"]}]},"5","*","100","-"]},{"token":"P_1","st":22,"ed":24,"children":["1","1","+","2","*","5","+","2","/"]},{"token":"P_1","st":36,"ed":38,"children":["10"]}]},{"token":"count","st":44,"ed":48,"children":[{"token":"P_1","st":46,"ed":48,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":53,"ed":55,"children":["10","5","*","100","-"]}]},"+","5","*","100","-"]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('normal', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(
|
||||
`=(sum(max(B1:C10,10)*5-100,((1+1)*2+5)/2,10, lambda(x,y, x*y*x)(sum(1,(1+2)*3),2))+lambda(x,y, x*y*x)(sum(1,(1+2)*3),2)+count(B1:C10,10*5-100))*5-100`
|
||||
'=(sum(max(B1:C10,10)*5-100,((1+1)*2+5)/2,10, lambda(x,y, x*y*x)(sum(1,(1+2)*3),2))+lambda(x,y, x*y*x)(sum(1,(1+2)*3),2)+count(B1:C10,10*5-100))*5-100'
|
||||
) as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"sum","st":1,"ed":3,"children":[{"token":"P_1","st":1,"ed":3,"children":[{"token":"max","st":5,"ed":7,"children":[{"token":"P_1","st":5,"ed":7,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":12,"ed":14,"children":["10"]}]},"5","*","100","-"]},{"token":"P_1","st":22,"ed":24,"children":["1","1","+","2","*","5","+","2","/"]},{"token":"P_1","st":36,"ed":38,"children":["10"]},{"token":"P_1","st":39,"ed":41,"children":[{"token":" lambda","st":43,"ed":49,"children":[{"token":"L_1","st":58,"ed":60,"children":[{"token":"P_1","st":59,"ed":61,"children":[{"token":"sum","st":63,"ed":65,"children":[{"token":"P_1","st":63,"ed":65,"children":["1"]},{"token":"P_1","st":65,"ed":67,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":74,"ed":76,"children":["2"]}]},{"token":"P_1","st":47,"ed":49,"children":["x"]},{"token":"P_1","st":49,"ed":51,"children":["y"]},{"token":"P_1","st":51,"ed":53,"children":[" x","y","x","*","*"]}]}]}]},{"token":"lambda","st":82,"ed":87,"children":[{"token":"L_1","st":96,"ed":98,"children":[{"token":"P_1","st":97,"ed":99,"children":[{"token":"sum","st":101,"ed":103,"children":[{"token":"P_1","st":101,"ed":103,"children":["1"]},{"token":"P_1","st":103,"ed":105,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":112,"ed":114,"children":["2"]}]},{"token":"P_1","st":85,"ed":87,"children":["x"]},{"token":"P_1","st":87,"ed":89,"children":["y"]},{"token":"P_1","st":89,"ed":91,"children":[" x","y","x","*","*"]}]},{"token":"count","st":119,"ed":123,"children":[{"token":"P_1","st":121,"ed":123,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":128,"ed":130,"children":["10","5","*","100","-"]}]},"+","+","5","*","100","-"]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"sum","st":1,"ed":3,"children":[{"token":"P_1","st":1,"ed":3,"children":[{"token":"max","st":5,"ed":7,"children":[{"token":"P_1","st":5,"ed":7,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":12,"ed":14,"children":["10"]}]},"5","*","100","-"]},{"token":"P_1","st":22,"ed":24,"children":["1","1","+","2","*","5","+","2","/"]},{"token":"P_1","st":36,"ed":38,"children":["10"]},{"token":"P_1","st":39,"ed":41,"children":[{"token":" lambda","st":43,"ed":49,"children":[{"token":"L_1","st":58,"ed":60,"children":[{"token":"P_1","st":59,"ed":61,"children":[{"token":"sum","st":63,"ed":65,"children":[{"token":"P_1","st":63,"ed":65,"children":["1"]},{"token":"P_1","st":65,"ed":67,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":74,"ed":76,"children":["2"]}]},{"token":"P_1","st":47,"ed":49,"children":["x"]},{"token":"P_1","st":49,"ed":51,"children":["y"]},{"token":"P_1","st":51,"ed":53,"children":[" x","y","x","*","*"]}]}]}]},{"token":"lambda","st":82,"ed":87,"children":[{"token":"L_1","st":96,"ed":98,"children":[{"token":"P_1","st":97,"ed":99,"children":[{"token":"sum","st":101,"ed":103,"children":[{"token":"P_1","st":101,"ed":103,"children":["1"]},{"token":"P_1","st":103,"ed":105,"children":["1","2","+","3","*"]}]}]},{"token":"P_1","st":112,"ed":114,"children":["2"]}]},{"token":"P_1","st":85,"ed":87,"children":["x"]},{"token":"P_1","st":87,"ed":89,"children":["y"]},{"token":"P_1","st":89,"ed":91,"children":[" x","y","x","*","*"]}]},{"token":"count","st":119,"ed":123,"children":[{"token":"P_1","st":121,"ed":123,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C10","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":128,"ed":130,"children":["10","5","*","100","-"]}]},"+","+","5","*","100","-"]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('let', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=let(x,5,y,4,sum(x,y)+x)`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=let(x,5,y,4,sum(x,y)+x)') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"let","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":["x"]},{"token":"P_1","st":2,"ed":4,"children":["5"]},{"token":"P_1","st":4,"ed":6,"children":["y"]},{"token":"P_1","st":6,"ed":8,"children":["4"]},{"token":"P_1","st":8,"ed":10,"children":[{"token":"sum","st":12,"ed":14,"children":[{"token":"P_1","st":12,"ed":14,"children":["x"]},{"token":"P_1","st":14,"ed":16,"children":["y"]}]},"x","+"]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"let","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":["x"]},{"token":"P_1","st":2,"ed":4,"children":["5"]},{"token":"P_1","st":4,"ed":6,"children":["y"]},{"token":"P_1","st":6,"ed":8,"children":["4"]},{"token":"P_1","st":8,"ed":10,"children":[{"token":"sum","st":12,"ed":14,"children":[{"token":"P_1","st":12,"ed":14,"children":["x"]},{"token":"P_1","st":14,"ed":16,"children":["y"]}]},"x","+"]}]}]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('REDUCE', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=REDUCE(1, A1:C2, LAMBDA(a,b,a+b^2))`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=REDUCE(1, A1:C2, LAMBDA(a,b,a+b^2))') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"REDUCE","st":0,"ed":5,"children":[{"token":"P_1","st":3,"ed":5,"children":["1"]},{"token":"P_1","st":5,"ed":7,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":" A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C2","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":12,"ed":14,"children":[{"token":" LAMBDA","st":16,"ed":22,"children":[{"token":"P_1","st":20,"ed":22,"children":["a"]},{"token":"P_1","st":22,"ed":24,"children":["b"]},{"token":"P_1","st":24,"ed":26,"children":["a","b","2","^","+"]}]}]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"REDUCE","st":0,"ed":5,"children":[{"token":"P_1","st":3,"ed":5,"children":["1"]},{"token":"P_1","st":5,"ed":7,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":" A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"C2","st":-1,"ed":-1,"children":[]}]}]}]},{"token":"P_1","st":12,"ed":14,"children":[{"token":" LAMBDA","st":16,"ed":22,"children":[{"token":"P_1","st":20,"ed":22,"children":["a"]},{"token":"P_1","st":22,"ed":24,"children":["b"]},{"token":"P_1","st":24,"ed":26,"children":["a","b","2","^","+"]}]}]}]}]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('missing default arguments', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=SUM(, A1:B1)`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=SUM(, A1:B1)') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"SUM","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":[]},{"token":"P_1","st":1,"ed":3,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":" A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]}]}]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"SUM","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":[]},{"token":"P_1","st":1,"ed":3,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":" A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]}]}]}]}]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('negative and percentage', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=0.1 -- 0.2%`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=0.1 -- 0.2%') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":["0.1 ",{"token":"%","st":-1,"ed":-1,"children":["- 0.2"]},"-"]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":["0.1 ",{"token":"%","st":-1,"ed":-1,"children":["- 0.2"]},"-"]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('negative and percentage', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=1+(3*4=4)*5+1`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=1+(3*4=4)*5+1') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":["1","3","4","*","4","=","5","*","1","+","+"]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":["1","3","4","*","4","=","5","*","1","+","+"]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('prefixToken', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`= -@A4:B5`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('= -@A4:B5') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"-","st":-1,"ed":-1,"children":[{"token":"@","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A4","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B5","st":-1,"ed":-1,"children":[]}]}]}]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"-","st":-1,"ed":-1,"children":[{"token":"@","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A4","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B5","st":-1,"ed":-1,"children":[]}]}]}]}]}]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('table', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=SUM(Table3[[#All],[Column1]:[Column2]])`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=SUM(Table3[[#All],[Column1]:[Column2]])') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"SUM","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":["Table3[[#All],[Column1]:[Column2]]"]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"SUM","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":["Table3[[#All],[Column1]:[Column2]]"]}]}]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('import range', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=[asdfasdfasdf]'sheet-1'!A3:B10`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=[asdfasdfasdf]\'sheet-1\'!A3:B10') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"[asdfasdfasdf]'sheet-1'!A3","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B10","st":-1,"ed":-1,"children":[]}]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"[asdfasdfasdf]\'sheet-1\'!A3","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B10","st":-1,"ed":-1,"children":[]}]}]}]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('nodeMaker performance', () => {
|
||||
const start = performance.now();
|
||||
// eslint-disable-next-line no-magic-numbers
|
||||
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
lexerTreeBuilder.nodeMakerTest(
|
||||
`=(-(1+2)--@A1:B2 + 5)/2 + -sum(indirect(A5):B10# + B6# + A1:offset(C5, 1, 1) , 100) + {1,2,3;4,5,6;7,8,10} + lambda(x,y,z, x*y*z)(sum(1,(1+2)*3),2,lambda(x,y, @offset(A1:B0,x#*y#))(1,2):C20) + sum((1+2%)*30%, 1+2)%`
|
||||
'=(-(1+2)--@A1:B2 + 5)/2 + -sum(indirect(A5):B10# + B6# + A1:offset(C5, 1, 1) , 100) + {1,2,3;4,5,6;7,8,10} + lambda(x,y,z, x*y*z)(sum(1,(1+2)*3),2,lambda(x,y, @offset(A1:B0,x#*y#))(1,2):C20) + sum((1+2%)*30%, 1+2)%'
|
||||
);
|
||||
}
|
||||
const end = performance.now();
|
||||
@@ -134,9 +134,9 @@ describe('lexer nodeMaker test', () => {
|
||||
});
|
||||
|
||||
it('error', () => {
|
||||
const node = lexerTreeBuilder.treeBuilder(`=sum(#REF! + 5 , #REF!)`) as LexerNode;
|
||||
const node = lexerTreeBuilder.treeBuilder('=sum(#REF! + 5 , #REF!)') as LexerNode;
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"sum","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":["#REF! "," 5 ","+"]},{"token":"P_1","st":11,"ed":13,"children":[" #REF!"]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"sum","st":0,"ed":2,"children":[{"token":"P_1","st":0,"ed":2,"children":["#REF! "," 5 ","+"]},{"token":"P_1","st":11,"ed":13,"children":[" #REF!"]}]}]}'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -96,20 +96,20 @@ describe('lexer nodeMaker test', () => {
|
||||
it('simple', () => {
|
||||
definedNamesService.registerDefinedName('test', 'myName', '$A$10:$C$100');
|
||||
|
||||
const node = lexer.treeBuilder(`=myName`) as LexerNode;
|
||||
const node = lexer.treeBuilder('=myName') as LexerNode;
|
||||
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"$A$10","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"$C$100","st":-1,"ed":-1,"children":[]}]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"$A$10","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"$C$100","st":-1,"ed":-1,"children":[]}]}]}]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('lambda', () => {
|
||||
definedNamesService.registerDefinedName('test', 'myName', 'lambda(x, y , x*x*y)');
|
||||
|
||||
const node = lexer.treeBuilder(`=myName(1+sum(A1:B1), 100)`) as LexerNode;
|
||||
const node = lexer.treeBuilder('=myName(1+sum(A1:B1), 100)') as LexerNode;
|
||||
|
||||
expect(JSON.stringify(node.serialize())).toStrictEqual(
|
||||
`{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"lambda","st":0,"ed":5,"children":[{"token":"L_1","st":16,"ed":18,"children":[{"token":"P_1","st":17,"ed":19,"children":["1",{"token":"sum","st":23,"ed":25,"children":[{"token":"P_1","st":23,"ed":25,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]}]}]}]},"+"]},{"token":"P_1","st":30,"ed":32,"children":[" 100"]}]},{"token":"P_1","st":3,"ed":5,"children":["x"]},{"token":"P_1","st":5,"ed":7,"children":[" y "]},{"token":"P_1","st":9,"ed":11,"children":[" x","x","y","*","*"]}]}]}`
|
||||
'{"token":"R_1","st":-1,"ed":-1,"children":[{"token":"lambda","st":0,"ed":5,"children":[{"token":"L_1","st":16,"ed":18,"children":[{"token":"P_1","st":17,"ed":19,"children":["1",{"token":"sum","st":23,"ed":25,"children":[{"token":"P_1","st":23,"ed":25,"children":[{"token":":","st":-1,"ed":-1,"children":[{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"A1","st":-1,"ed":-1,"children":[]}]},{"token":"P_1","st":-1,"ed":-1,"children":[{"token":"B1","st":-1,"ed":-1,"children":[]}]}]}]}]},"+"]},{"token":"P_1","st":30,"ed":32,"children":[" 100"]}]},{"token":"P_1","st":3,"ed":5,"children":["x"]},{"token":"P_1","st":5,"ed":7,"children":[" y "]},{"token":"P_1","st":9,"ed":11,"children":[" x","x","y","*","*"]}]}]}'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -896,7 +896,6 @@ export class LexerTreeBuilder extends Disposable {
|
||||
return false;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line max-lines-per-function
|
||||
private _nodeMaker(formulaString: string, sequenceArray?: ISequenceArray[], matchCurrentNodeIndex?: number) {
|
||||
if (formulaString.substring(0, 1) === operatorToken.EQUALS) {
|
||||
formulaString = formulaString.substring(1);
|
||||
|
||||
@@ -29,9 +29,9 @@ export class ColumnReferenceObject extends BaseReferenceObject {
|
||||
this.setForcedSheetName(grid.sheetName);
|
||||
const range: IRange = {
|
||||
startColumn: grid.range.startColumn,
|
||||
startRow: NaN,
|
||||
startRow: Number.NaN,
|
||||
endColumn: -1,
|
||||
endRow: NaN,
|
||||
endRow: Number.NaN,
|
||||
};
|
||||
this.setRangeData(range);
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ export class RowReferenceObject extends BaseReferenceObject {
|
||||
this.setForcedUnitIdDirect(grid.unitId);
|
||||
this.setForcedSheetName(grid.sheetName);
|
||||
const range: IRange = {
|
||||
startColumn: NaN,
|
||||
startColumn: Number.NaN,
|
||||
startRow: grid.range.startRow,
|
||||
endColumn: NaN,
|
||||
endColumn: Number.NaN,
|
||||
endRow: -1,
|
||||
};
|
||||
this.setRangeData(range);
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
|
||||
import { AbsoluteRefType, type IRange } from '@univerjs/core';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ describe('Test Reference', () => {
|
||||
expect(
|
||||
serializeRangeToRefString({
|
||||
range: {
|
||||
startColumn: NaN,
|
||||
endColumn: NaN,
|
||||
startColumn: Number.NaN,
|
||||
endColumn: Number.NaN,
|
||||
startRow: 15,
|
||||
endRow: 15,
|
||||
rangeType: RANGE_TYPE.ROW,
|
||||
@@ -128,8 +128,8 @@ describe('Test Reference', () => {
|
||||
expect(
|
||||
serializeRangeToRefString({
|
||||
range: {
|
||||
startColumn: NaN,
|
||||
endColumn: NaN,
|
||||
startColumn: Number.NaN,
|
||||
endColumn: Number.NaN,
|
||||
startRow: 15,
|
||||
endRow: 15,
|
||||
rangeType: RANGE_TYPE.ROW,
|
||||
@@ -173,10 +173,10 @@ describe('Test Reference', () => {
|
||||
range: {
|
||||
endAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
endColumn: 1,
|
||||
endRow: NaN,
|
||||
endRow: Number.NaN,
|
||||
startAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
startColumn: 0,
|
||||
startRow: NaN,
|
||||
startRow: Number.NaN,
|
||||
rangeType: RANGE_TYPE.COLUMN,
|
||||
},
|
||||
sheetName: 'sheet1',
|
||||
@@ -186,10 +186,10 @@ describe('Test Reference', () => {
|
||||
expect(deserializeRangeWithSheet('[workbook2]sheet1!10:100')).toStrictEqual({
|
||||
range: {
|
||||
endAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
endColumn: NaN,
|
||||
endColumn: Number.NaN,
|
||||
endRow: 99,
|
||||
startAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
startColumn: NaN,
|
||||
startColumn: Number.NaN,
|
||||
startRow: 9,
|
||||
rangeType: RANGE_TYPE.ROW,
|
||||
},
|
||||
@@ -200,10 +200,10 @@ describe('Test Reference', () => {
|
||||
expect(deserializeRangeWithSheet('10:100')).toStrictEqual({
|
||||
range: {
|
||||
endAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
endColumn: NaN,
|
||||
endColumn: Number.NaN,
|
||||
endRow: 99,
|
||||
startAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
startColumn: NaN,
|
||||
startColumn: Number.NaN,
|
||||
startRow: 9,
|
||||
rangeType: RANGE_TYPE.ROW,
|
||||
},
|
||||
@@ -211,13 +211,13 @@ describe('Test Reference', () => {
|
||||
unitId: '',
|
||||
});
|
||||
|
||||
expect(deserializeRangeWithSheet(`[workbook2]'sheet-1'!10:100`)).toStrictEqual({
|
||||
expect(deserializeRangeWithSheet('[workbook2]\'sheet-1\'!10:100')).toStrictEqual({
|
||||
range: {
|
||||
endAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
endColumn: NaN,
|
||||
endColumn: Number.NaN,
|
||||
endRow: 99,
|
||||
startAbsoluteRefType: AbsoluteRefType.NONE,
|
||||
startColumn: NaN,
|
||||
startColumn: Number.NaN,
|
||||
startRow: 9,
|
||||
rangeType: RANGE_TYPE.ROW,
|
||||
},
|
||||
|
||||
@@ -19,7 +19,6 @@ import { AbsoluteRefType, type IRange } from '@univerjs/core';
|
||||
import type { IGridRangeName } from './reference';
|
||||
import { handleRefStringInfo } from './reference';
|
||||
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const $relativeRegex = /[\[\]]/g;
|
||||
|
||||
function handleR1C1(rowOrColumnString: string, current: number) {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
+3
-4
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject, ValueObjectFactory } from '../array-value-object';
|
||||
@@ -305,15 +304,15 @@ describe('arrayValueObject test', () => {
|
||||
});
|
||||
|
||||
it('ValueObjectFactory create ErrorValueObject ', () => {
|
||||
let errorValueObject = ValueObjectFactory.create(NaN);
|
||||
let errorValueObject = ValueObjectFactory.create(Number.NaN);
|
||||
|
||||
expect(errorValueObject.isError()).toBeTruthy();
|
||||
|
||||
errorValueObject = ValueObjectFactory.create(Infinity);
|
||||
errorValueObject = ValueObjectFactory.create(Number.POSITIVE_INFINITY);
|
||||
|
||||
expect(errorValueObject.isError()).toBeTruthy();
|
||||
|
||||
errorValueObject = ValueObjectFactory.create(-Infinity);
|
||||
errorValueObject = ValueObjectFactory.create(Number.NEGATIVE_INFINITY);
|
||||
|
||||
expect(errorValueObject.isError()).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject, transformToValueObject } from '../array-value-object';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ErrorType } from '../../../../basics/error-type';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ErrorType } from '../../../../basics/error-type';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ErrorType } from '../../../../basics/error-type';
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { ArrayValueObject } from '../../../../engine/value-object/array-value-object';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { compareToken } from '../../../basics/token';
|
||||
import { type BaseValueObject } from '../../../engine/value-object/base-value-object';
|
||||
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
||||
import { BaseFunction } from '../../base-function';
|
||||
|
||||
export class Compare extends BaseFunction {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { type BaseValueObject } from '../../../engine/value-object/base-value-object';
|
||||
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
||||
import { BaseFunction } from '../../base-function';
|
||||
|
||||
export class Multiply extends BaseFunction {
|
||||
|
||||
@@ -20,7 +20,7 @@ import { BaseFunction } from '../../base-function';
|
||||
|
||||
export class Max extends BaseFunction {
|
||||
override calculate(...variants: BaseValueObject[]) {
|
||||
let accumulatorAll: BaseValueObject = new NumberValueObject(-Infinity);
|
||||
let accumulatorAll: BaseValueObject = new NumberValueObject(Number.NEGATIVE_INFINITY);
|
||||
for (let i = 0; i < variants.length; i++) {
|
||||
let variant = variants[i];
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { BaseFunction } from '../../base-function';
|
||||
|
||||
export class Min extends BaseFunction {
|
||||
override calculate(...variants: BaseValueObject[]) {
|
||||
let accumulatorAll: BaseValueObject = new NumberValueObject(Infinity);
|
||||
let accumulatorAll: BaseValueObject = new NumberValueObject(Number.POSITIVE_INFINITY);
|
||||
for (let i = 0; i < variants.length; i++) {
|
||||
let variant = variants[i];
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@ const TEST_WORKBOOK_DATA: IWorkbookData = {
|
||||
sheet1: {
|
||||
id: 'sheet1',
|
||||
cellData: {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
v: 'A1',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 'B1',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -29,25 +29,25 @@ const TEST_WORKBOOK_DATA_DEMO: IWorkbookData = {
|
||||
sheet1: {
|
||||
id: 'sheet1',
|
||||
cellData: {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
f: '=SUM(A1)',
|
||||
si: '3e4r5t',
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'3': {
|
||||
1: {
|
||||
3: {
|
||||
f: '=SUM(A2)',
|
||||
si: 'OSPtzm',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'3': {
|
||||
2: {
|
||||
3: {
|
||||
si: 'OSPtzm',
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'3': {
|
||||
3: {
|
||||
3: {
|
||||
si: 'OSPtzm',
|
||||
},
|
||||
},
|
||||
@@ -103,8 +103,8 @@ describe('Test formula data model', () => {
|
||||
const unitId = 'test';
|
||||
const sheetId = 'sheet1';
|
||||
const cellValue = {
|
||||
'1': {
|
||||
'3': {
|
||||
1: {
|
||||
3: {
|
||||
v: null,
|
||||
p: null,
|
||||
f: null,
|
||||
@@ -116,20 +116,20 @@ describe('Test formula data model', () => {
|
||||
const result = {
|
||||
[unitId]: {
|
||||
[sheetId]: {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
f: '=SUM(A1)',
|
||||
si: '3e4r5t',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'3': {
|
||||
2: {
|
||||
3: {
|
||||
f: '=SUM(A3)',
|
||||
si: 'OSPtzm',
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'3': {
|
||||
3: {
|
||||
3: {
|
||||
f: '=SUM(A3)',
|
||||
si: 'OSPtzm',
|
||||
x: 0,
|
||||
@@ -152,24 +152,24 @@ describe('Test formula data model', () => {
|
||||
const unitId = 'test';
|
||||
const sheetId = 'sheet1';
|
||||
const cellValue = {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
v: null,
|
||||
p: null,
|
||||
f: null,
|
||||
si: null,
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'3': {
|
||||
1: {
|
||||
3: {
|
||||
v: null,
|
||||
p: null,
|
||||
f: null,
|
||||
si: null,
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'3': {
|
||||
2: {
|
||||
3: {
|
||||
v: null,
|
||||
p: null,
|
||||
f: null,
|
||||
@@ -181,8 +181,8 @@ describe('Test formula data model', () => {
|
||||
const result = {
|
||||
[unitId]: {
|
||||
[sheetId]: {
|
||||
'3': {
|
||||
'3': {
|
||||
3: {
|
||||
3: {
|
||||
f: '=SUM(A4)',
|
||||
si: 'OSPtzm',
|
||||
},
|
||||
@@ -203,8 +203,8 @@ describe('Test formula data model', () => {
|
||||
const unitId = 'test';
|
||||
const sheetId = 'sheet1';
|
||||
const cellValue = {
|
||||
'3': {
|
||||
'3': {
|
||||
3: {
|
||||
3: {
|
||||
v: null,
|
||||
p: null,
|
||||
f: null,
|
||||
@@ -216,20 +216,20 @@ describe('Test formula data model', () => {
|
||||
const result = {
|
||||
[unitId]: {
|
||||
[sheetId]: {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
f: '=SUM(A1)',
|
||||
si: '3e4r5t',
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'3': {
|
||||
1: {
|
||||
3: {
|
||||
f: '=SUM(A2)',
|
||||
si: 'OSPtzm',
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'3': {
|
||||
2: {
|
||||
3: {
|
||||
f: '=SUM(A2)',
|
||||
si: 'OSPtzm',
|
||||
x: 0,
|
||||
@@ -255,8 +255,8 @@ describe('Test formula data model', () => {
|
||||
formulaDataModel.setArrayFormulaRange({
|
||||
[unitId]: {
|
||||
[sheetId]: {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
startRow: 0,
|
||||
startColumn: 3,
|
||||
endRow: 1,
|
||||
@@ -268,8 +268,8 @@ describe('Test formula data model', () => {
|
||||
});
|
||||
|
||||
const cellValue = {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
v: null,
|
||||
p: null,
|
||||
f: null,
|
||||
@@ -298,8 +298,8 @@ describe('Test formula data model', () => {
|
||||
formulaDataModel.setArrayFormulaRange({
|
||||
[unitId]: {
|
||||
[sheetId]: {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
startRow: 0,
|
||||
startColumn: 3,
|
||||
endRow: 1,
|
||||
@@ -313,13 +313,13 @@ describe('Test formula data model', () => {
|
||||
formulaDataModel.setArrayFormulaCellData({
|
||||
[unitId]: {
|
||||
[sheetId]: {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
v: 1,
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'3': {
|
||||
1: {
|
||||
3: {
|
||||
v: 2,
|
||||
},
|
||||
},
|
||||
@@ -328,8 +328,8 @@ describe('Test formula data model', () => {
|
||||
});
|
||||
|
||||
const cellValue = {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
v: null,
|
||||
p: null,
|
||||
f: null,
|
||||
@@ -362,34 +362,34 @@ describe('Test formula data model', () => {
|
||||
};
|
||||
|
||||
const cellValue = {
|
||||
'0': {
|
||||
'0': {
|
||||
0: {
|
||||
0: {
|
||||
v: 1,
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
v: 2,
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
v: 3,
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
v: 2,
|
||||
f: '=SUM(A1)',
|
||||
si: '3e4r5t',
|
||||
},
|
||||
},
|
||||
'1': {
|
||||
'0': {
|
||||
1: {
|
||||
0: {
|
||||
v: 4,
|
||||
},
|
||||
},
|
||||
'2': {
|
||||
'0': {
|
||||
2: {
|
||||
0: {
|
||||
v: 44,
|
||||
},
|
||||
},
|
||||
'3': {
|
||||
'0': {
|
||||
3: {
|
||||
0: {
|
||||
v: 444,
|
||||
},
|
||||
},
|
||||
@@ -400,8 +400,8 @@ describe('Test formula data model', () => {
|
||||
const result = {
|
||||
[unitId]: {
|
||||
[sheetId]: {
|
||||
'0': {
|
||||
'3': {
|
||||
0: {
|
||||
3: {
|
||||
f: '=SUM(A1)',
|
||||
si: '3e4r5t',
|
||||
},
|
||||
|
||||
@@ -27,7 +27,7 @@ import type {
|
||||
import { isInDirtyRange } from '../basics/dirty';
|
||||
import { ErrorType } from '../basics/error-type';
|
||||
import type { BaseAstNode } from '../engine/ast-node/base-ast-node';
|
||||
import { type BaseReferenceObject, type FunctionVariantType } from '../engine/reference-object/base-reference-object';
|
||||
import type { BaseReferenceObject, FunctionVariantType } from '../engine/reference-object/base-reference-object';
|
||||
import type { ArrayValueObject } from '../engine/value-object/array-value-object';
|
||||
import { type BaseValueObject, ErrorValueObject } from '../engine/value-object/base-value-object';
|
||||
import { IFormulaCurrentConfigService } from './current-data.service';
|
||||
@@ -178,8 +178,8 @@ export class FormulaRuntimeService extends Disposable implements IFormulaRuntime
|
||||
private _currentRow: number = -1;
|
||||
private _currentColumn: number = -1;
|
||||
|
||||
private _currentRowCount: number = -Infinity;
|
||||
private _currentColumnCount: number = -Infinity;
|
||||
private _currentRowCount: number = Number.NEGATIVE_INFINITY;
|
||||
private _currentColumnCount: number = Number.NEGATIVE_INFINITY;
|
||||
|
||||
private _currentSubUnitId: string = '';
|
||||
private _currentUnitId: string = '';
|
||||
|
||||
@@ -80,7 +80,7 @@ export interface IDocumentSkeletonPage {
|
||||
|
||||
pageNumber: number; // page页数
|
||||
pageNumberStart: number; // page开始页序号
|
||||
verticalAlign: Boolean; // 垂直对齐,仅对一页生效
|
||||
verticalAlign: boolean; // 垂直对齐,仅对一页生效
|
||||
angle: number; // 旋转角度,仅对一页生效
|
||||
width: number; // actual or content width,default 0
|
||||
height: number; // actual or content height, default 0
|
||||
|
||||
@@ -66,7 +66,7 @@ export const toPx = (num: number | string, ReferenceValue: Nullable<number>): nu
|
||||
return num;
|
||||
}
|
||||
if (ReferenceValue && num && Tools.isString(num) && num.substr(num.length - 1, 1) === '%') {
|
||||
const numFloat = parseFloat(num) / PERCENT_TO_NUMBER_DIVIDE;
|
||||
const numFloat = Number.parseFloat(num) / PERCENT_TO_NUMBER_DIVIDE;
|
||||
return ReferenceValue * numFloat;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -69,8 +69,8 @@ export class Transform {
|
||||
* Transform point
|
||||
* @method
|
||||
* @name UniverSheet.Transform#point
|
||||
* @param {Object} point 2D point(x, y)
|
||||
* @returns {Object} 2D point(x, y)
|
||||
* @param {object} point 2D point(x, y)
|
||||
* @returns {object} 2D point(x, y)
|
||||
*/
|
||||
applyPoint(point: Vector2, ignoreOffset: boolean = false): Vector2 {
|
||||
const m = this._m;
|
||||
@@ -88,8 +88,8 @@ export class Transform {
|
||||
* Apply translation
|
||||
* @method
|
||||
* @name universheet.Transform#translate
|
||||
* @param {Number} x
|
||||
* @param {Number} y
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @returns {UniverSheet.Transform}
|
||||
*/
|
||||
translate(x: number, y: number) {
|
||||
@@ -102,8 +102,8 @@ export class Transform {
|
||||
* Apply scale
|
||||
* @method
|
||||
* @name UniverSheet.Transform#scale
|
||||
* @param {Number} sx
|
||||
* @param {Number} sy
|
||||
* @param {number} sx
|
||||
* @param {number} sy
|
||||
* @returns {UniverSheet.Transform}
|
||||
*/
|
||||
scale(sx: number, sy: number) {
|
||||
@@ -118,7 +118,7 @@ export class Transform {
|
||||
* Apply rotation
|
||||
* @method
|
||||
* @name UniverSheet.Transform#rotate
|
||||
* @param {Number} Degree Angle in Degree
|
||||
* @param {number} Degree Angle in Degree
|
||||
* @returns {UniverSheet.Transform}
|
||||
*/
|
||||
rotate(deg: number) {
|
||||
@@ -140,7 +140,7 @@ export class Transform {
|
||||
* Returns the translation
|
||||
* @method
|
||||
* @name UniverSheet.Transform#getTranslation
|
||||
* @returns {Object} 2D point(x, y)
|
||||
* @returns {object} 2D point(x, y)
|
||||
*/
|
||||
getTranslation() {
|
||||
return {
|
||||
@@ -153,8 +153,8 @@ export class Transform {
|
||||
* Apply skew
|
||||
* @method
|
||||
* @name UniverSheet.Transform#skew
|
||||
* @param {Number} sx
|
||||
* @param {Number} sy
|
||||
* @param {number} sx
|
||||
* @param {number} sy
|
||||
* @returns {UniverSheet.Transform}
|
||||
*/
|
||||
skew(sx: number, sy: number) {
|
||||
@@ -358,14 +358,14 @@ export class Transform {
|
||||
* transformations from an object that is not enLived yet.
|
||||
* is called DimensionsTransformMatrix because those properties are the one that influence
|
||||
* the size of the resulting box of the object.
|
||||
* @param {Object} options
|
||||
* @param {Number} [options.scaleX]
|
||||
* @param {Number} [options.scaleY]
|
||||
* @param {Boolean} [options.flipX]
|
||||
* @param {Boolean} [options.flipY]
|
||||
* @param {Number} [options.skewX]
|
||||
* @param {Number} [options.skewX]
|
||||
* @return {Number[]} transform matrix
|
||||
* @param {object} options
|
||||
* @param {number} [options.scaleX]
|
||||
* @param {number} [options.scaleY]
|
||||
* @param {boolean} [options.flipX]
|
||||
* @param {boolean} [options.flipY]
|
||||
* @param {number} [options.skewX]
|
||||
* @param {number} [options.skewX]
|
||||
* @return {number[]} transform matrix
|
||||
*/
|
||||
private _calcDimensionsMatrix(options: ITransformState) {
|
||||
const scaleX = options.scaleX ?? 1;
|
||||
|
||||
@@ -29,10 +29,10 @@ interface ICanvasProps {
|
||||
* Usually you don't need to use it manually.
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @param {Object} props
|
||||
* @param {Number} props.width
|
||||
* @param {Number} props.height
|
||||
* @param {Number} props.pixelRatio
|
||||
* @param {object} props
|
||||
* @param {number} props.width
|
||||
* @param {number} props.height
|
||||
* @param {number} props.pixelRatio
|
||||
*/
|
||||
export class Canvas {
|
||||
isCache = false;
|
||||
@@ -142,9 +142,9 @@ export class Canvas {
|
||||
/**
|
||||
* to data url
|
||||
* @method
|
||||
* @param {String} mimeType
|
||||
* @param {Number} quality between 0 and 1 for jpg mime types
|
||||
* @returns {String} data url string
|
||||
* @param {string} mimeType
|
||||
* @param {number} quality between 0 and 1 for jpg mime types
|
||||
* @returns {string} data url string
|
||||
*/
|
||||
toDataURL(mimeType: string, quality: number) {
|
||||
try {
|
||||
|
||||
@@ -57,7 +57,7 @@ function decimal(startIndex: number, startNumber: number) {
|
||||
// // A number where single digit numbers are prefixed with a zero, like 01, 02, or 03. Numbers with more than one digit are not prefixed with a zero.
|
||||
function zeroDecimal(startIndex: number, startNumber: number) {
|
||||
const currentIndex = startIndex + startNumber;
|
||||
// eslint-disable-next-line no-magic-numbers
|
||||
|
||||
if (currentIndex < 10) {
|
||||
return `0${currentIndex}`;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ function ___getLevelAndSuffix(levelAndSuffixPre: string) {
|
||||
});
|
||||
|
||||
return {
|
||||
level: parseInt(level) - 1,
|
||||
level: Number.parseInt(level) - 1,
|
||||
suffix,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export function createSkeletonColumn(
|
||||
columnIndex: number = 0,
|
||||
columnProperties: ISectionColumnProperties[],
|
||||
columnSeparatorType: ColumnSeparatorType = ColumnSeparatorType.NONE,
|
||||
pageWidth: number = Infinity
|
||||
pageWidth: number = Number.POSITIVE_INFINITY
|
||||
): IDocumentSkeletonColumn {
|
||||
const { left, width, spaceWidth } = _calculateColumnSize(columnIndex, columnProperties, pageWidth);
|
||||
|
||||
@@ -53,7 +53,7 @@ function _calculateColumnSize(
|
||||
for (let i = 0; i <= columnIndex; i++) {
|
||||
const { width, paddingEnd } = columnProperties[i];
|
||||
if (i === columnProperties.length - 1) {
|
||||
colWidth = pageWidth === Infinity ? pageWidth - colWidth : width;
|
||||
colWidth = pageWidth === Number.POSITIVE_INFINITY ? pageWidth - colWidth : width;
|
||||
spaceWidth = 0;
|
||||
} else {
|
||||
spaceWidth = paddingEnd;
|
||||
|
||||
@@ -24,8 +24,8 @@ export function createSkeletonSection(
|
||||
columnSeparatorType: ColumnSeparatorType = ColumnSeparatorType.NONE,
|
||||
top: number = 0,
|
||||
left: number = 0,
|
||||
sectionWidth: number = Infinity,
|
||||
sectionHeight: number = Infinity
|
||||
sectionWidth: number = Number.POSITIVE_INFINITY,
|
||||
sectionHeight: number = Number.POSITIVE_INFINITY
|
||||
): IDocumentSkeletonSection {
|
||||
const columns: IDocumentSkeletonColumn[] = [];
|
||||
let colWidth = 0;
|
||||
@@ -45,7 +45,7 @@ export function createSkeletonSection(
|
||||
left += colWidth + spaceWidth;
|
||||
|
||||
if (i === columnProperties.length - 1) {
|
||||
colWidth = sectionWidth !== Infinity ? sectionWidth - colWidth : width;
|
||||
colWidth = sectionWidth !== Number.POSITIVE_INFINITY ? sectionWidth - colWidth : width;
|
||||
spaceWidth = 0;
|
||||
columns.push(_getSkeletonColumn(left, colWidth, spaceWidth, columnSeparatorType));
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ export function updateBlockIndex(pages: IDocumentSkeletonPage[], start: number =
|
||||
const pageStartIndex = prePageStartIndex;
|
||||
const pageEndIndex = pageStartIndex;
|
||||
let preSectionStartIndex = pageStartIndex;
|
||||
let maxContentWidth = -Infinity;
|
||||
let maxContentWidth = Number.NEGATIVE_INFINITY;
|
||||
let contentHeight = 0;
|
||||
|
||||
for (const section of sections) {
|
||||
@@ -307,7 +307,7 @@ export function updateBlockIndex(pages: IDocumentSkeletonPage[], start: number =
|
||||
const sectionStartIndex = preSectionStartIndex;
|
||||
const sectionEndIndex = pageStartIndex;
|
||||
let preColumnStartIndex = sectionStartIndex;
|
||||
let maxSectionHeight = -Infinity;
|
||||
let maxSectionHeight = Number.NEGATIVE_INFINITY;
|
||||
let sectionWidth = 0;
|
||||
|
||||
for (const column of columns) {
|
||||
@@ -316,7 +316,7 @@ export function updateBlockIndex(pages: IDocumentSkeletonPage[], start: number =
|
||||
const columnEndIndex = columStartIndex;
|
||||
let preLineStartIndex = columStartIndex;
|
||||
let columnHeight = 0;
|
||||
let maxColumnWidth = -Infinity;
|
||||
let maxColumnWidth = Number.NEGATIVE_INFINITY;
|
||||
let preLine: Nullable<IDocumentSkeletonLine> = null;
|
||||
|
||||
for (const line of lines) {
|
||||
@@ -479,7 +479,6 @@ export function columnIterator(
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line max-lines-per-function
|
||||
export function getPositionHorizon(
|
||||
positionH: ObjectPositionH,
|
||||
column: IDocumentSkeletonColumn,
|
||||
@@ -709,8 +708,8 @@ export function getFontCreateConfig(
|
||||
charSpace = 0,
|
||||
documentTextStyle = {},
|
||||
pageSize = {
|
||||
width: Infinity,
|
||||
height: Infinity,
|
||||
width: Number.POSITIVE_INFINITY,
|
||||
height: Number.POSITIVE_INFINITY,
|
||||
},
|
||||
|
||||
marginRight = 0,
|
||||
@@ -727,7 +726,7 @@ export function getFontCreateConfig(
|
||||
...textStyle,
|
||||
};
|
||||
|
||||
const pageWidth = pageSize.width || Infinity - marginLeft - marginRight;
|
||||
const pageWidth = pageSize.width || Number.POSITIVE_INFINITY - marginLeft - marginRight;
|
||||
|
||||
const result = {
|
||||
fontStyle,
|
||||
|
||||
@@ -65,7 +65,7 @@ export class DocComponent extends RenderComponent<
|
||||
const m = this.transform.getMatrix();
|
||||
|
||||
mainCtx.save();
|
||||
// eslint-disable-next-line no-magic-numbers
|
||||
|
||||
mainCtx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
|
||||
this._draw(mainCtx, bounds);
|
||||
mainCtx.restore();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user