@univerjs/sheets-ui 0.1.17 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +12 -11
- package/lib/es/index.js +16943 -14998
- package/lib/locale/en-US.json +1 -1
- package/lib/locale/ru-RU.json +1 -1
- package/lib/locale/zh-CN.json +1 -1
- package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +12 -12
- package/lib/types/commands/commands/set-scroll.command.d.ts +5 -5
- package/lib/types/commands/operations/scroll.operation.d.ts +2 -2
- package/lib/types/commands/operations/set-zoom-ratio.operation.d.ts +0 -2
- package/lib/types/controllers/auto-fill.controller.d.ts +2 -1
- package/lib/types/controllers/menu/__tests__/create-menu-test-bed.d.ts +6 -6
- package/lib/types/controllers/menu/permission.menu.d.ts +1 -1
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +3 -8
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +2 -4
- package/lib/types/controllers/render-controllers/header-resize.render-controller.d.ts +4 -4
- package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts +43 -0
- package/lib/types/controllers/render-controllers/mobile/mobile-selection.render-controller.d.ts +40 -0
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +3 -2
- package/lib/types/controllers/render-controllers/selection.render-controller.d.ts +1 -1
- package/lib/types/controllers/render-controllers/skeleton.render-controller.d.ts +10 -0
- package/lib/types/controllers/utils/component-tools.d.ts +3 -0
- package/lib/types/index.d.ts +32 -14
- package/lib/types/services/auto-fill/rules.d.ts +1 -0
- package/lib/types/services/auto-fill/type.d.ts +7 -6
- package/lib/types/services/clipboard/__tests__/clipboard-paste-from-notepad.spec.d.ts +16 -0
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +6 -6
- package/lib/types/services/clipboard/__tests__/constant.d.ts +2 -1
- package/lib/types/services/clipboard/html-to-usm/converter.d.ts +7 -1
- package/lib/types/services/clipboard/html-to-usm/parse-node-style.d.ts +1 -1
- package/lib/types/services/clipboard/html-to-usm/utils.d.ts +1 -1
- package/lib/types/services/clipboard/utils.d.ts +1 -0
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +2 -2
- package/lib/types/services/scroll-manager.service.d.ts +63 -14
- package/lib/types/services/selection/mobile-selection-render.service.d.ts +179 -0
- package/lib/types/services/selection/mobile-selection-shape.d.ts +53 -0
- package/lib/types/services/selection/selection-render-model.d.ts +14 -5
- package/lib/types/services/selection/selection-render.service.d.ts +20 -18
- package/lib/types/services/selection/selection-shape-extension.d.ts +7 -3
- package/lib/types/services/selection/selection-shape.d.ts +96 -39
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +9 -4
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/animate.d.ts +0 -1
- package/lib/types/views/status-bar/CopyableStatisticItem.d.ts +1 -1
- package/lib/umd/index.js +12 -11
- package/package.json +25 -25
- /package/lib/types/commands/commands/{delete-range-move-left-confirm.command .d.ts → delete-range-move-left-confirm.command.d.ts} +0 -0
|
@@ -21,7 +21,8 @@ export declare const fontSampleByUniver = "<html><head></head><body><google data
|
|
|
21
21
|
export declare const borderSampleByExcel = "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"\r\nxmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\nxmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\nxmlns=\"http://www.w3.org/TR/REC-html40\">\r\n\r\n<head>\r\n<meta http-equiv=Content-Type content=\"text/html; charset=utf-8\">\r\n<meta name=ProgId content=Excel.Sheet>\r\n<meta name=Generator content=\"Microsoft Excel 15\">\r\n<link id=Main-File rel=Main-File\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip.htm\">\r\n<link rel=File-List\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml\">\r\n<style>\r\n<!--table\r\n\t{mso-displayed-decimal-separator:\"\\.\";\r\n\tmso-displayed-thousand-separator:\"\\,\";}\r\n@page\r\n\t{margin:.75in .7in .75in .7in;\r\n\tmso-header-margin:.3in;\r\n\tmso-footer-margin:.3in;}\r\ntr\r\n\t{mso-height-source:auto;\r\n\tmso-ruby-visibility:none;}\r\ncol\r\n\t{mso-width-source:auto;\r\n\tmso-ruby-visibility:none;}\r\nbr\r\n\t{mso-data-placement:same-cell;}\r\ntd\r\n\t{padding-top:1px;\r\n\tpadding-right:1px;\r\n\tpadding-left:1px;\r\n\tmso-ignore:padding;\r\n\tcolor:black;\r\n\tfont-size:12.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-number-format:General;\r\n\ttext-align:general;\r\n\tvertical-align:middle;\r\n\tborder:none;\r\n\tmso-background-source:auto;\r\n\tmso-pattern:auto;\r\n\tmso-protection:locked visible;\r\n\twhite-space:nowrap;\r\n\tmso-rotate:0;}\r\n.xl65\r\n\t{border:.5pt solid black;}\r\n.xl66\r\n\t{text-align:center;\r\n\tborder:.5pt solid black;}\r\nruby\r\n\t{ruby-align:left;}\r\nrt\r\n\t{color:windowtext;\r\n\tfont-size:9.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-char-type:none;\r\n\tdisplay:none;}\r\n-->\r\n</style>\r\n</head>\r\n\r\n<body link=\"#0563C1\" vlink=\"#954F72\">\r\n\r\n<table border=0 cellpadding=0 cellspacing=0 width=348 style='border-collapse:\r\n collapse;width:260pt'>\r\n<!--StartFragment-->\r\n <col width=87 span=4 style='width:65pt'>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 width=87 style='height:16.0pt;width:65pt'></td>\r\n <td width=87 style='width:65pt'></td>\r\n <td width=87 style='width:65pt'></td>\r\n <td width=87 style='width:65pt'></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65>\u3000</td>\r\n <td class=xl65 style='border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td colspan=2 rowspan=5 class=xl66>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n </tr>\r\n<!--EndFragment-->\r\n</table>\r\n\r\n</body>\r\n\r\n</html>\r\n";
|
|
22
22
|
export declare const borderSampleByGoogle = "<google-sheets-html-origin><style type=\"text/css\"><!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--></style><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" border=\"1\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\" data-sheets-root=\"1\"><colgroup><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/></colgroup><tbody><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\" rowspan=\"5\" colspan=\"2\"><span><div style=\"max-height:105px\"></div></span></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr></tbody></table>";
|
|
23
23
|
export declare const borderSampleByUniver = "<html><head></head><body><google data-copy-id=\"PgwMK9\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td rowspan=\"5\" colspan=\"2\" style=\"border-top: 0.5pt solid #000000; border-left: 0.5pt solid #000000; ;border-bottom: 0.5pt solid #000000; border-right: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr></tbody></table></google></body></html>";
|
|
24
|
-
export declare const rotateSampleByUniver = "<html><head></head><body><google data-copy-id=\"1rz7ZZ\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 19px;\"><td>univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"data-rotate: (-45deg);\">univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"data-rotate: (45deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"data-rotate: (0deg ,1);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"data-rotate: (-90deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"data-rotate: (90deg);\">univer</td></tr></tbody></table></google></body></html>";
|
|
24
|
+
export declare const rotateSampleByUniver = "<html><head></head><body><google data-copy-id=\"1rz7ZZ\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 19px;\"><td>univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"--data-rotate: (-45deg);\">univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"--data-rotate: (45deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"--data-rotate: (0deg ,1);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"--data-rotate: (-90deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"--data-rotate: (90deg);\">univer</td></tr></tbody></table></google></body></html>";
|
|
25
25
|
export declare const alignmentSampleByExcel = "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"\r\nxmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\nxmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\nxmlns=\"http://www.w3.org/TR/REC-html40\">\r\n\r\n<head>\r\n<meta http-equiv=Content-Type content=\"text/html; charset=utf-8\">\r\n<meta name=ProgId content=Excel.Sheet>\r\n<meta name=Generator content=\"Microsoft Excel 15\">\r\n<link id=Main-File rel=Main-File\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip.htm\">\r\n<link rel=File-List\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml\">\r\n<style>\r\n<!--table\r\n\t{mso-displayed-decimal-separator:\"\\.\";\r\n\tmso-displayed-thousand-separator:\"\\,\";}\r\n@page\r\n\t{margin:.75in .7in .75in .7in;\r\n\tmso-header-margin:.3in;\r\n\tmso-footer-margin:.3in;}\r\ntr\r\n\t{mso-height-source:auto;\r\n\tmso-ruby-visibility:none;}\r\ncol\r\n\t{mso-width-source:auto;\r\n\tmso-ruby-visibility:none;}\r\nbr\r\n\t{mso-data-placement:same-cell;}\r\ntd\r\n\t{padding-top:1px;\r\n\tpadding-right:1px;\r\n\tpadding-left:1px;\r\n\tmso-ignore:padding;\r\n\tcolor:black;\r\n\tfont-size:12.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-number-format:General;\r\n\ttext-align:general;\r\n\tvertical-align:middle;\r\n\tborder:none;\r\n\tmso-background-source:auto;\r\n\tmso-pattern:auto;\r\n\tmso-protection:locked visible;\r\n\twhite-space:nowrap;\r\n\tmso-rotate:0;}\r\n.xl65\r\n\t{text-align:left;\r\n\tvertical-align:bottom;}\r\n.xl66\r\n\t{text-align:right;\r\n\tvertical-align:bottom;}\r\n.xl67\r\n\t{text-align:center;\r\n\tvertical-align:bottom;}\r\n.xl68\r\n\t{vertical-align:top;}\r\n.xl69\r\n\t{color:#44546A;\r\n\tfont-size:11.0pt;\r\n\tfont-weight:700;}\r\n.xl70\r\n\t{vertical-align:bottom;}\r\nruby\r\n\t{ruby-align:left;}\r\nrt\r\n\t{color:windowtext;\r\n\tfont-size:9.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-char-type:none;\r\n\tdisplay:none;}\r\n-->\r\n</style>\r\n</head>\r\n\r\n<body link=\"#0563C1\" vlink=\"#954F72\">\r\n\r\n<table border=0 cellpadding=0 cellspacing=0 width=522 style='border-collapse:\r\n collapse;width:390pt'>\r\n <col width=87 span=6 style='width:65pt'>\r\n <tr height=88 style='mso-height-source:userset;height:66.0pt'>\r\n<!--StartFragment-->\r\n <td height=88 class=xl65 width=87 style='height:66.0pt;width:65pt'>\u5DE6\u5BF9\u9F50</td>\r\n <td class=xl66 width=87 style='width:65pt'>\u53F3\u5BF9\u9F50</td>\r\n <td class=xl67 width=87 style='width:65pt'>\u4E2D\u95F4\u5BF9\u9F50</td>\r\n <td class=xl68 width=87 style='width:65pt'>\u9876\u90E8</td>\r\n <td class=xl70 width=87 style='width:65pt'>\u5E95\u90E8\u5BF9\u9F50</td>\r\n <td class=xl69 width=87 style='width:65pt'>\u5C45\u4E2D\u5BF9\u9F50</td>\r\n<!--EndFragment-->\r\n </tr>\r\n</table>\r\n\r\n</body>\r\n\r\n</html>\r\n";
|
|
26
26
|
export declare const alignmentSampleByGoogle = "<google-sheets-html-origin><style type=\"text/css\"><!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--></style><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" border=\"1\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\" data-sheets-root=\"1\"><colgroup><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/></colgroup><tbody><tr style=\"height:65px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;\" data-sheets-value=\"{"1":2,"2":"\u5DE6\u5BF9\u9F50"}\">\u5DE6\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;text-align:right;\" data-sheets-value=\"{"1":2,"2":"\u53F3\u5BF9\u9F50"}\">\u53F3\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;text-align:center;\" data-sheets-value=\"{"1":2,"2":"\u4E2D\u95F4\u5BF9\u9F50"}\">\u4E2D\u95F4\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:top;font-family:Arial;font-size:12pt;font-weight:normal;\" data-sheets-value=\"{"1":2,"2":"\u9876\u90E8"}\">\u9876\u90E8</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;\" data-sheets-value=\"{"1":2,"2":"\u5E95\u90E8\u5BF9\u9F50"}\">\u5E95\u90E8\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:middle;font-family:Arial;font-size:11pt;font-weight:bold;color:#44546a;\" data-sheets-value=\"{"1":2,"2":"\u5C45\u4E2D\u5BF9\u9F50"}\">\u5C45\u4E2D\u5BF9\u9F50</td></tr></tbody></table>";
|
|
27
27
|
export declare const alignmentSampleByUniver = "<html><head></head><body><google data-copy-id=\"rJhHMI\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 66px;\"><td style=\"color: rgb(0, 0, 0); font-size: 12pt; text-align: left; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u5DE6\u5BF9\u9F50</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; text-align: right; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u53F3\u5BF9\u9F50</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; text-align: center; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u4E2D\u95F4\u5BF9\u9F50</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; vertical-align: top; font-family: \u7B49\u7EBF; \">\u9876\u90E8</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u5E95\u90E8\u5BF9\u9F50</td><td style=\"color: rgb(68, 84, 106); font-size: 11pt; vertical-align: middle; font-weight: bold; font-family: \u7B49\u7EBF; \">\u5C45\u4E2D\u5BF9\u9F50</td></tr></tbody></table></google></body></html>";
|
|
28
|
+
export declare const plainTextByNotepad = "day\t2024\u5E74\u4E94\u4E00\u5047\u671F\uFF1A\u76F8\u8F8323\u5E74\t\u76F8\u8F8319\u5E74\r\n\u516C\u8DEF\u603B\u8BA1\t2.1\t24.4\r\n\u516C\u8DEF\u975E\u8425\u4E1A\t1.4\t39.2\r\n\u94C1\u8DEF\t1.4\t23.3\r\n\u6C11\u822A\t8.1\t11.1\r\n\u516C\u8DEF\u8425\u4E1A\u6027\t6.5\t-25.1\r\n\u6C34\u8FD0\t6\t-31.3\r\n";
|
|
@@ -16,14 +16,20 @@ interface IHtmlToUSMServiceProps {
|
|
|
16
16
|
export declare class HtmlToUSMService {
|
|
17
17
|
private static pluginList;
|
|
18
18
|
static use(plugin: IPastePlugin): void;
|
|
19
|
+
private _styleMap;
|
|
19
20
|
private _styleCache;
|
|
20
21
|
private _styleRules;
|
|
21
22
|
private _afterProcessRules;
|
|
22
|
-
private
|
|
23
|
+
private _dom;
|
|
23
24
|
private _getCurrentSkeleton;
|
|
24
25
|
constructor(props: IHtmlToUSMServiceProps);
|
|
25
26
|
convert(html: string): IUniverSheetCopyDataModel;
|
|
27
|
+
private _getStyleBySelectorText;
|
|
28
|
+
private _getStyle;
|
|
26
29
|
private _parseTable;
|
|
30
|
+
private _parseTableByHtml;
|
|
31
|
+
private _parseCellHtml;
|
|
32
|
+
private _getCellTextAndRichText;
|
|
27
33
|
private _generateDocumentDataModelSnapshot;
|
|
28
34
|
private process;
|
|
29
35
|
dispose(): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITextStyle } from '@univerjs/core';
|
|
2
2
|
|
|
3
|
-
export declare function extractNodeStyle(node: HTMLElement, predefinedStyles?:
|
|
3
|
+
export declare function extractNodeStyle(node: HTMLElement, predefinedStyles?: Record<string, string>): ITextStyle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IParagraph, IParagraphStyle, Nullable } from '@univerjs/core';
|
|
2
2
|
|
|
3
|
-
export default function parseToDom(rawHtml: string):
|
|
3
|
+
export default function parseToDom(rawHtml: string): HTMLBodyElement;
|
|
4
4
|
export declare function getParagraphStyle(el: HTMLElement): Nullable<IParagraphStyle>;
|
|
5
5
|
export declare function generateParagraphs(dataStream: string, prevParagraph?: IParagraph): IParagraph[];
|
|
@@ -20,3 +20,4 @@ export declare function getRangeValuesMergeable(m1: IMutationInfo<ISetRangeValue
|
|
|
20
20
|
export declare function mergeSetRangeValues(mutations: IMutationInfo[]): IMutationInfo<object>[];
|
|
21
21
|
export declare function rangeIntersectWithDiscreteRange(range: IRange, discrete: IDiscreteRange): true | undefined;
|
|
22
22
|
export declare function discreteRangeContainsRange(discrete: IDiscreteRange, range: IRange): boolean;
|
|
23
|
+
export declare function convertTextToTable(text: string): string;
|
|
@@ -2,7 +2,7 @@ import { Disposable, IUniverInstanceService, ThemeService } from '@univerjs/core
|
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
4
|
import { ISelectionRenderService } from '../selection/selection-render.service';
|
|
5
|
-
import {
|
|
5
|
+
import { SelectionControl } from '../selection/selection-shape';
|
|
6
6
|
|
|
7
7
|
export interface IMarkSelectionService {
|
|
8
8
|
addShape(selection: ISelectionWithStyle, exits?: string[], zIndex?: number): string | null;
|
|
@@ -16,7 +16,7 @@ interface IMarkSelectionInfo {
|
|
|
16
16
|
subUnitId: string;
|
|
17
17
|
selection: ISelectionWithStyle;
|
|
18
18
|
zIndex: number;
|
|
19
|
-
control:
|
|
19
|
+
control: SelectionControl | null;
|
|
20
20
|
exits: string[];
|
|
21
21
|
}
|
|
22
22
|
export declare const IMarkSelectionService: import('@wendellhu/redi').IdentifierDecorator<IMarkSelectionService>;
|
|
@@ -1,19 +1,46 @@
|
|
|
1
1
|
import { IUniverInstanceService, Nullable } from '@univerjs/core';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
4
|
|
|
5
|
+
export interface IViewportScrollState {
|
|
6
|
+
scrollX: number;
|
|
7
|
+
scrollY: number;
|
|
8
|
+
viewportScrollX: number;
|
|
9
|
+
viewportScrollY: number;
|
|
10
|
+
}
|
|
4
11
|
export interface IScrollManagerParam {
|
|
12
|
+
/**
|
|
13
|
+
* offsetX from startRow, coordinate same as viewport, not scrollbar
|
|
14
|
+
*/
|
|
5
15
|
offsetX: number;
|
|
16
|
+
/**
|
|
17
|
+
* offsetY from startColumn, coordinate same as viewport, not scrollbar
|
|
18
|
+
*/
|
|
6
19
|
offsetY: number;
|
|
20
|
+
/**
|
|
21
|
+
* currrent start row in viewport visible area
|
|
22
|
+
*/
|
|
7
23
|
sheetViewStartRow: number;
|
|
24
|
+
/**
|
|
25
|
+
* current start column in viewport visible area
|
|
26
|
+
*/
|
|
8
27
|
sheetViewStartColumn: number;
|
|
28
|
+
/**
|
|
29
|
+
* overall offsetX from sheet cotent topleft, should be same as startRow * rowHeight + offsetY
|
|
30
|
+
* coordinate same as viewport, not scrollbar
|
|
31
|
+
*/
|
|
9
32
|
viewportScrollX?: number;
|
|
33
|
+
/**
|
|
34
|
+
* overall offsetY from sheet content topleft, should be same as startColumn * columnWidth + offsetX
|
|
35
|
+
* coordinate same as viewport, not scrollbar
|
|
36
|
+
*/
|
|
10
37
|
viewportScrollY?: number;
|
|
11
38
|
}
|
|
12
39
|
export interface IScrollManagerSearchParam {
|
|
13
40
|
unitId: string;
|
|
14
41
|
sheetId: string;
|
|
15
42
|
}
|
|
16
|
-
export interface
|
|
43
|
+
export interface IScrollManagerWithSearchParam extends IScrollManagerSearchParam, IScrollManagerParam {
|
|
17
44
|
}
|
|
18
45
|
export type IScrollInfo = Map<string, Map<string, IScrollManagerParam>>;
|
|
19
46
|
/**
|
|
@@ -25,9 +52,27 @@ export type IScrollInfo = Map<string, Map<string, IScrollManagerParam>>;
|
|
|
25
52
|
export declare class ScrollManagerService {
|
|
26
53
|
private readonly _univerInstanceService;
|
|
27
54
|
private readonly _renderManagerService;
|
|
28
|
-
|
|
55
|
+
/**
|
|
56
|
+
* a map holds all scroll info for each sheet
|
|
57
|
+
*/
|
|
58
|
+
private readonly _scrollInfoMap;
|
|
59
|
+
/**
|
|
60
|
+
* a subject for current sheet scrollInfo
|
|
61
|
+
*/
|
|
29
62
|
private readonly _scrollInfo$;
|
|
30
|
-
|
|
63
|
+
/**
|
|
64
|
+
* a subject for current sheet scrollInfo ( events, ex wheel event and point events add deltaXY to rawScrollInfo$)
|
|
65
|
+
*/
|
|
66
|
+
readonly rawScrollInfo$: import('rxjs').Observable<Nullable<IScrollManagerParam>>;
|
|
67
|
+
/**
|
|
68
|
+
* a subject for current valid scrollInfo, viewport@_scrollCore would limit rawScrollInfo$ exclude negative value or over max value.
|
|
69
|
+
* use this subject not rawScrollInfo$ when get scrolling state of viewport.
|
|
70
|
+
*/
|
|
71
|
+
readonly validViewportScrollInfo$: BehaviorSubject<Nullable<IViewportScrollState>>;
|
|
72
|
+
/**
|
|
73
|
+
* a subject for current valid scrollInfo, viewport@_scrollCore would limit rawScrollInfo$ exclude negative value or over max value.
|
|
74
|
+
* use this subject not rawScrollInfo$ when get scrolling state of viewport.
|
|
75
|
+
*/
|
|
31
76
|
private _searchParamForScroll;
|
|
32
77
|
constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
|
|
33
78
|
dispose(): void;
|
|
@@ -39,26 +84,30 @@ export declare class ScrollManagerService {
|
|
|
39
84
|
/**
|
|
40
85
|
* set scrollInfo by cmd,
|
|
41
86
|
* call _setScrollInfo twice after one scrolling.
|
|
42
|
-
* first time set scrollInfo
|
|
87
|
+
* first time set scrollInfo by scrollOperation, but offsetXY is derived from scroll event.
|
|
43
88
|
* second time set scrollInfo by viewport.scrollTo(scrol.render-controller --> onScrollAfterObserver), this time offsetXY has been limited.
|
|
44
89
|
*
|
|
45
|
-
* wheelevent --> sheetCanvasView --> set-scroll.command('sheet.command.set-scroll-relative') --> scrollOperation -->
|
|
46
|
-
* scroll.render-controller@
|
|
90
|
+
* wheelevent --> sheetCanvasView --> set-scroll.command('sheet.command.set-scroll-relative') --> scrollOperation --> scrollManagerService.setScrollInfo --> scrollInfo$.next --> scroll.render-controller@viewportMain.scrollTo & notify -->
|
|
91
|
+
* scroll.render-controller@onScrollAfter$ --> this.setScrollInfoToCurrSheetWithoutNotify --> this._setScrollInfo({}, false)
|
|
47
92
|
* call _setScrollInfo again, a loop!, so we should call setScrollInfoToCurrSheetWithoutNotify
|
|
48
93
|
* @param param
|
|
49
94
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
95
|
+
setScrollInfoAndEmitEvent(param: IScrollManagerWithSearchParam): void;
|
|
96
|
+
setScrollInfoToCurrSheetAndEmitEvent(scrollInfo: IScrollManagerParam): void;
|
|
97
|
+
/**
|
|
98
|
+
* call _setScrollInfo but no _scrollInfo$.next
|
|
99
|
+
* @param scroll
|
|
100
|
+
*/
|
|
101
|
+
justSetScrollInfoToCurrSheet(scroll: IScrollManagerParam): void;
|
|
53
102
|
clear(): void;
|
|
54
|
-
|
|
103
|
+
calcViewportScrollFromRowColOffset(scrollInfo: IScrollManagerWithSearchParam): {
|
|
55
104
|
scrollTop: number;
|
|
56
105
|
scrollLeft: number;
|
|
57
|
-
|
|
58
|
-
|
|
106
|
+
overallScrollX?: undefined;
|
|
107
|
+
overallScrollY?: undefined;
|
|
59
108
|
} | {
|
|
60
|
-
|
|
61
|
-
|
|
109
|
+
overallScrollX: number;
|
|
110
|
+
overallScrollY: number;
|
|
62
111
|
scrollTop?: undefined;
|
|
63
112
|
scrollLeft?: undefined;
|
|
64
113
|
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { IRange, IRangeWithCoord, ISelection, ISelectionCell, ISelectionCellWithMergeInfo, Nullable, InterceptorManager, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
2
|
+
import { IMouseEvent, IPointerEvent, Scene, SpreadsheetSkeleton, Viewport, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { ISelectionStyle, ISelectionWithCoordAndStyle, ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
|
+
import { IShortcutService } from '@univerjs/ui';
|
|
5
|
+
import { Injector } from '@wendellhu/redi';
|
|
6
|
+
import { SelectionControl } from './selection-shape';
|
|
7
|
+
import { IControlFillConfig, ISelectionRenderService } from './selection-render.service';
|
|
8
|
+
import { MobileSelectionControl } from './mobile-selection-shape';
|
|
9
|
+
|
|
10
|
+
declare enum ExpandingControl {
|
|
11
|
+
BOTTOM_RIGHT = "bottom-right",
|
|
12
|
+
TOP_LEFT = "top-left",
|
|
13
|
+
LEFT = "left",
|
|
14
|
+
RIGHT = "right",
|
|
15
|
+
TOP = "top",
|
|
16
|
+
BOTTOM = "bottom"
|
|
17
|
+
}
|
|
18
|
+
export declare class MobileSelectionRenderService implements ISelectionRenderService {
|
|
19
|
+
private readonly _themeService;
|
|
20
|
+
private readonly _shortcutService;
|
|
21
|
+
private readonly _renderManagerService;
|
|
22
|
+
private readonly _injector;
|
|
23
|
+
hasSelection: boolean;
|
|
24
|
+
private _pointerdownSub;
|
|
25
|
+
private _mainScenePointerUpSub;
|
|
26
|
+
private _scenePointerMoveSub;
|
|
27
|
+
private _scenePointerUpSub;
|
|
28
|
+
private _controlFillConfig$;
|
|
29
|
+
readonly controlFillConfig$: import('rxjs').Observable<IControlFillConfig | null>;
|
|
30
|
+
private _selectionControls;
|
|
31
|
+
private _activeCellRangeOfCurrSelection;
|
|
32
|
+
private _startOffsetX;
|
|
33
|
+
private _startOffsetY;
|
|
34
|
+
private _scrollTimer;
|
|
35
|
+
private _skeleton;
|
|
36
|
+
private _scene;
|
|
37
|
+
private _isHeaderHighlight;
|
|
38
|
+
private _isDetectMergedCell;
|
|
39
|
+
private _selectionStyle;
|
|
40
|
+
private _isSelectionEnabled;
|
|
41
|
+
private _isShowPreviousEnable;
|
|
42
|
+
private _isRemainLastEnable;
|
|
43
|
+
private _isSkipRemainLastEnable;
|
|
44
|
+
private _isSingleSelection;
|
|
45
|
+
private readonly _selectionMoveEnd$;
|
|
46
|
+
readonly selectionMoveEnd$: import('rxjs').Observable<ISelectionWithCoordAndStyle[]>;
|
|
47
|
+
private readonly _selectionMoving$;
|
|
48
|
+
/**
|
|
49
|
+
* Triggered during the drawing of the selection area.
|
|
50
|
+
*/
|
|
51
|
+
readonly selectionMoving$: import('rxjs').Observable<ISelectionWithCoordAndStyle[]>;
|
|
52
|
+
private readonly _selectionMoveStart$;
|
|
53
|
+
/**
|
|
54
|
+
* Triggered during the start draw the selection area.
|
|
55
|
+
*/
|
|
56
|
+
readonly selectionMoveStart$: import('rxjs').Observable<ISelectionWithCoordAndStyle[]>;
|
|
57
|
+
private _activeViewport;
|
|
58
|
+
/**
|
|
59
|
+
* This service relies on the scene and skeleton to work
|
|
60
|
+
* Use usable$ to check if this service works
|
|
61
|
+
*/
|
|
62
|
+
private readonly _usable$;
|
|
63
|
+
readonly usable$: import('rxjs').Observable<boolean>;
|
|
64
|
+
interceptor: InterceptorManager<{
|
|
65
|
+
RANGE_MOVE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, null>;
|
|
66
|
+
RANGE_FILL_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
skeleton: SpreadsheetSkeleton;
|
|
70
|
+
scene: Scene;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
73
|
+
expandingControlMode: ExpandingControl;
|
|
74
|
+
constructor(_themeService: ThemeService, _shortcutService: IShortcutService, _renderManagerService: IRenderManagerService, _injector: Injector);
|
|
75
|
+
enableHeaderHighlight(): void;
|
|
76
|
+
disableHeaderHighlight(): void;
|
|
77
|
+
enableDetectMergedCell(): void;
|
|
78
|
+
disableDetectMergedCell(): void;
|
|
79
|
+
setStyle(style: ISelectionStyle): void;
|
|
80
|
+
resetStyle(): void;
|
|
81
|
+
enableSelection(): void;
|
|
82
|
+
disableSelection(): void;
|
|
83
|
+
enableShowPrevious(): void;
|
|
84
|
+
disableShowPrevious(): void;
|
|
85
|
+
enableRemainLast(): void;
|
|
86
|
+
disableRemainLast(): void;
|
|
87
|
+
enableSkipRemainLast(): void;
|
|
88
|
+
disableSkipRemainLast(): void;
|
|
89
|
+
enableSingleSelection(): void;
|
|
90
|
+
disableSingleSelection(): void;
|
|
91
|
+
getViewPort(): Viewport;
|
|
92
|
+
/**
|
|
93
|
+
* add a selection
|
|
94
|
+
*
|
|
95
|
+
* in PC:init & pointerup would call this function.
|
|
96
|
+
*
|
|
97
|
+
* init
|
|
98
|
+
* selectionController@_initSkeletonChangeListener --> selectionManagerService.add --> selectionManagerService._selectionMoveEnd$ --> this.addControlToCurrentByRangeData
|
|
99
|
+
*
|
|
100
|
+
* selectionMoveEnd$ --> this.addSelectionControlBySelectionData
|
|
101
|
+
*
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
* pointer
|
|
105
|
+
* engine@_pointerDownEvent --> spreadsheet?.onPointerDownObserve --> eventTrigger --> scene@disableEvent() --> then scene.input-manager currentObject is always scene until scene@enableEvent.
|
|
106
|
+
* engine@_pointerUpEvent --> scene.input-manager@_onPointerUp --> this._selectionMoveEnd$ --> _selectionManagerService.selectionMoveEnd$ --> this.addControlToCurrentByRangeData
|
|
107
|
+
*
|
|
108
|
+
* but in mobile, we do not call disableEvent() in eventTrigger,
|
|
109
|
+
* so pointerup --> scene.input-manager currentObject is spreadsheet --> this.eventTrigger
|
|
110
|
+
*
|
|
111
|
+
*
|
|
112
|
+
*
|
|
113
|
+
* @param selectionData
|
|
114
|
+
*/
|
|
115
|
+
addSelectionControlBySelectionData(selectionData: ISelectionWithCoordAndStyle): void;
|
|
116
|
+
newSelectionControl(scene: Scene, rangeType: RANGE_TYPE): MobileSelectionControl;
|
|
117
|
+
updateControlForCurrentByRangeData(selections: ISelectionWithCoordAndStyle[]): void;
|
|
118
|
+
refreshSelectionMoveStart(): void;
|
|
119
|
+
changeRuntime(skeleton: Nullable<SpreadsheetSkeleton>, scene: Nullable<Scene>, viewport?: Viewport): void;
|
|
120
|
+
getSelectionDataWithStyle(): ISelectionWithCoordAndStyle[];
|
|
121
|
+
getSelectionControls(): SelectionControl[];
|
|
122
|
+
private _clearSelectionControls;
|
|
123
|
+
private _getFreeze;
|
|
124
|
+
private _getViewportByCell;
|
|
125
|
+
/**
|
|
126
|
+
* Returns the list of active ranges in the active sheet or null if there are no active ranges.
|
|
127
|
+
* If there is a single range selected, this method behaves like a getActiveRange() call.
|
|
128
|
+
*/
|
|
129
|
+
getActiveSelections(): Nullable<ISelection[]>;
|
|
130
|
+
/**
|
|
131
|
+
* Returns the selected range in the active sheet, or null if there is no active range. If multiple ranges are selected this method returns only the last selected range.
|
|
132
|
+
*/
|
|
133
|
+
getActiveRange(): Nullable<IRange>;
|
|
134
|
+
/**
|
|
135
|
+
* get last selection control
|
|
136
|
+
*/
|
|
137
|
+
getActiveSelectionControl(): Nullable<SelectionControl>;
|
|
138
|
+
endSelection(): void;
|
|
139
|
+
reset(): void;
|
|
140
|
+
resetAndEndSelection(): void;
|
|
141
|
+
expandingSelection: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* invoked when pointerup or longpress on spreadsheet, or pointerdown on row&col
|
|
144
|
+
* then move curr selection to cell at cursor
|
|
145
|
+
* Main perpose to create a new selection, or update curr selection to a new range.
|
|
146
|
+
* @param evt
|
|
147
|
+
* @param _zIndex
|
|
148
|
+
* @param rangeType
|
|
149
|
+
* @param viewport
|
|
150
|
+
*/
|
|
151
|
+
eventTrigger(evt: IPointerEvent | IMouseEvent, _zIndex?: number, rangeType?: RANGE_TYPE, viewport?: Viewport): false | undefined;
|
|
152
|
+
/**
|
|
153
|
+
*
|
|
154
|
+
* @param evt component point event
|
|
155
|
+
* @param style selection style, Styles for user-customized selectors
|
|
156
|
+
* @param zIndex Stacking order of the selection object
|
|
157
|
+
* @param rangeType Determines whether the selection is made normally according to the range or by rows and columns
|
|
158
|
+
*
|
|
159
|
+
* invoked by selection.render-controller@pointerDownObserver
|
|
160
|
+
*
|
|
161
|
+
* derived from eventTrigger
|
|
162
|
+
*/
|
|
163
|
+
private _fillControlPointerDownHandler;
|
|
164
|
+
attachSelectionWithCoord(selectionWithStyle: ISelectionWithStyle): ISelectionWithCoordAndStyle;
|
|
165
|
+
attachRangeWithCoord(range: IRange): Nullable<IRangeWithCoord>;
|
|
166
|
+
attachPrimaryWithCoord(primary: Nullable<ISelectionCell>): Nullable<ISelectionCellWithMergeInfo>;
|
|
167
|
+
getSelectionCellByPosition(x: number, y: number): Nullable<ISelectionCellWithMergeInfo>;
|
|
168
|
+
/**
|
|
169
|
+
* When mousedown and mouseup need to go to the coordination and undo stack, when mousemove does not need to go to the coordination and undo stack
|
|
170
|
+
*/
|
|
171
|
+
private _movingHandler;
|
|
172
|
+
/**
|
|
173
|
+
* rm pointerUp & pointerMove Observer on scene
|
|
174
|
+
*/
|
|
175
|
+
private _endSelection;
|
|
176
|
+
private _addCancelObserver;
|
|
177
|
+
private _getCellRangeByCursorPosition;
|
|
178
|
+
}
|
|
179
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IRangeWithCoord, Nullable, ThemeService, RANGE_TYPE } from '@univerjs/core';
|
|
2
|
+
import { IRectProps, Scene, Rect } from '@univerjs/engine-render';
|
|
3
|
+
import { ISelectionStyle } from '@univerjs/sheets';
|
|
4
|
+
import { SelectionControl } from './selection-shape';
|
|
5
|
+
|
|
6
|
+
export declare class MobileSelectionControl extends SelectionControl {
|
|
7
|
+
protected _scene: Scene;
|
|
8
|
+
protected _zIndex: number;
|
|
9
|
+
protected _isHeaderHighlight: boolean;
|
|
10
|
+
protected readonly _themeService: ThemeService;
|
|
11
|
+
protected _rangeType: RANGE_TYPE;
|
|
12
|
+
/**
|
|
13
|
+
* topLeft controlPointer, it is not visible, just transparent, for handling event.
|
|
14
|
+
*/
|
|
15
|
+
private _fillControlTopLeft;
|
|
16
|
+
/**
|
|
17
|
+
* bottomRight controlPointer, it is not visible, just transparent, for handling event.
|
|
18
|
+
*/
|
|
19
|
+
private _fillControlBottomRight;
|
|
20
|
+
/**
|
|
21
|
+
* a very small visible point, placed in control pointer
|
|
22
|
+
*/
|
|
23
|
+
private _fillControlTopLeftInner;
|
|
24
|
+
/**
|
|
25
|
+
* a very small visible point, placed in control pointer
|
|
26
|
+
*/
|
|
27
|
+
private _fillControlBottomRightInner;
|
|
28
|
+
constructor(_scene: Scene, _zIndex: number, _isHeaderHighlight: boolean, _themeService: ThemeService, _rangeType?: RANGE_TYPE);
|
|
29
|
+
initControlPoints(): void;
|
|
30
|
+
get fillControlTopLeft(): Rect<IRectProps> | null;
|
|
31
|
+
set fillControlTopLeft(value: Rect);
|
|
32
|
+
get fillControlBottomRight(): Rect<IRectProps> | null;
|
|
33
|
+
set fillControlBottomRight(value: Rect);
|
|
34
|
+
get rangeType(): RANGE_TYPE;
|
|
35
|
+
set rangeType(value: RANGE_TYPE);
|
|
36
|
+
dispose(): void;
|
|
37
|
+
updateRange(range: IRangeWithCoord): void;
|
|
38
|
+
protected _updateControl(style: Nullable<ISelectionStyle>, rowHeaderWidth: number, columnHeaderHeight: number): void;
|
|
39
|
+
getViewportMainScrollInfo(): {
|
|
40
|
+
viewportScrollX: number;
|
|
41
|
+
viewportScrollY: number;
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Mainly for row & col selection control point position. update control point position by when scrolling.
|
|
47
|
+
* @param viewportScrollX viewportScrollX
|
|
48
|
+
* @param viewportScrollY
|
|
49
|
+
* @param sheetContentWidth
|
|
50
|
+
* @param sheetContentHeight max sheet content height, for very short sheet, control pointer shoud not out of sheet
|
|
51
|
+
*/
|
|
52
|
+
transformControlPoint(viewportScrollX?: number, viewportScrollY?: number, sheetContentWidth?: number, sheetContentHeight?: number): void;
|
|
53
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRangeWithCoord,
|
|
1
|
+
import { IRangeWithCoord, ISelectionCellWithMergeInfo, ISelectionWithCoord, Nullable, RANGE_TYPE } from '@univerjs/core';
|
|
2
2
|
|
|
3
3
|
export declare class SelectionRenderModel implements IRangeWithCoord {
|
|
4
4
|
private _startColumn;
|
|
@@ -12,6 +12,11 @@ export declare class SelectionRenderModel implements IRangeWithCoord {
|
|
|
12
12
|
private _startY;
|
|
13
13
|
private _endX;
|
|
14
14
|
private _endY;
|
|
15
|
+
/**
|
|
16
|
+
* highlight cell of selection
|
|
17
|
+
* when there is no merge info
|
|
18
|
+
* top left cell of current selection (or bottomLeft of current selection)
|
|
19
|
+
*/
|
|
15
20
|
private _currentCell;
|
|
16
21
|
private _rangeType;
|
|
17
22
|
get startColumn(): number;
|
|
@@ -34,7 +39,10 @@ export declare class SelectionRenderModel implements IRangeWithCoord {
|
|
|
34
39
|
* value from { startY, endY, startX, endX } = getCellPositionByIndex in basics/tools
|
|
35
40
|
*/
|
|
36
41
|
get endY(): number;
|
|
37
|
-
|
|
42
|
+
/**
|
|
43
|
+
* highlight cell of selection
|
|
44
|
+
*/
|
|
45
|
+
get currentCell(): Nullable<ISelectionCellWithMergeInfo>;
|
|
38
46
|
get rangeType(): RANGE_TYPE;
|
|
39
47
|
isEqual(rangeWithCoord: IRangeWithCoord): boolean;
|
|
40
48
|
isInclude(rangeWithCoord: IRangeWithCoord): boolean;
|
|
@@ -50,10 +58,11 @@ export declare class SelectionRenderModel implements IRangeWithCoord {
|
|
|
50
58
|
endY: number;
|
|
51
59
|
rangeType: RANGE_TYPE;
|
|
52
60
|
};
|
|
53
|
-
getCell(): Nullable<
|
|
61
|
+
getCell(): Nullable<ISelectionCellWithMergeInfo>;
|
|
54
62
|
getRangeType(): RANGE_TYPE;
|
|
63
|
+
setRangeType(rangeType: RANGE_TYPE): void;
|
|
55
64
|
getValue(): ISelectionWithCoord;
|
|
56
|
-
setValue(newSelectionRange: IRangeWithCoord, currentCell: Nullable<
|
|
57
|
-
setCurrentCell(currentCell: Nullable<
|
|
65
|
+
setValue(newSelectionRange: IRangeWithCoord, currentCell: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
66
|
+
setCurrentCell(currentCell: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
58
67
|
clearCurrentCell(): void;
|
|
59
68
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IInterceptor, IRange, IRangeWithCoord, ISelection, ISelectionCell,
|
|
1
|
+
import { IInterceptor, IRange, IRangeWithCoord, ISelection, ISelectionCell, ISelectionCellWithMergeInfo, Nullable, InterceptorManager, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { IMouseEvent, IPointerEvent, Scene, SpreadsheetSkeleton, Viewport, IRenderManagerService, ScrollTimerType } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionStyle, ISelectionWithCoordAndStyle, ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
5
5
|
import { Injector } from '@wendellhu/redi';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
|
-
import { SelectionShape } from './selection-shape';
|
|
7
|
+
import { SelectionControl as SelectionShape } from './selection-shape';
|
|
8
8
|
|
|
9
9
|
export interface IControlFillConfig {
|
|
10
10
|
oldRange: IRange;
|
|
@@ -39,20 +39,20 @@ export interface ISelectionRenderService {
|
|
|
39
39
|
disableRemainLast(): void;
|
|
40
40
|
enableSkipRemainLast(): void;
|
|
41
41
|
disableSkipRemainLast(): void;
|
|
42
|
-
|
|
42
|
+
addSelectionControlBySelectionData(data: ISelectionWithCoordAndStyle): void;
|
|
43
43
|
updateControlForCurrentByRangeData(selections: ISelectionWithCoordAndStyle[]): void;
|
|
44
44
|
changeRuntime(skeleton: Nullable<SpreadsheetSkeleton>, scene: Nullable<Scene>, viewport?: Viewport): void;
|
|
45
45
|
/** @deprecated This should not be provided by the selection render service. */
|
|
46
46
|
getViewPort(): Viewport;
|
|
47
|
-
|
|
47
|
+
getSelectionControls(): SelectionShape[];
|
|
48
48
|
getActiveSelections(): Nullable<ISelection[]>;
|
|
49
49
|
getActiveRange(): Nullable<IRange>;
|
|
50
|
-
|
|
50
|
+
getActiveSelectionControl(): Nullable<SelectionShape>;
|
|
51
51
|
getSelectionDataWithStyle(): ISelectionWithCoordAndStyle[];
|
|
52
52
|
attachSelectionWithCoord(selectionWithStyle: ISelectionWithStyle): ISelectionWithCoordAndStyle;
|
|
53
53
|
attachRangeWithCoord(range: IRange): Nullable<IRangeWithCoord>;
|
|
54
|
-
attachPrimaryWithCoord(primary: Nullable<ISelectionCell>): Nullable<
|
|
55
|
-
getSelectionCellByPosition(x: number, y: number): Nullable<
|
|
54
|
+
attachPrimaryWithCoord(primary: Nullable<ISelectionCell>): Nullable<ISelectionCellWithMergeInfo>;
|
|
55
|
+
getSelectionCellByPosition(x: number, y: number): Nullable<ISelectionCellWithMergeInfo>;
|
|
56
56
|
eventTrigger(evt: IPointerEvent | IMouseEvent, zIndex: number, rangeType: RANGE_TYPE, viewport?: Viewport, scrollTimerType?: ScrollTimerType): void;
|
|
57
57
|
reset(): void;
|
|
58
58
|
refreshSelectionMoveStart(): void;
|
|
@@ -83,9 +83,10 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
83
83
|
private readonly _themeService;
|
|
84
84
|
private readonly _shortcutService;
|
|
85
85
|
private readonly _renderManagerService;
|
|
86
|
-
private readonly _instanceService;
|
|
87
86
|
private readonly _injector;
|
|
88
87
|
hasSelection: boolean;
|
|
88
|
+
private _pointerdownSub;
|
|
89
|
+
private _mainScenePointerUpSub;
|
|
89
90
|
private _scenePointerMoveSub;
|
|
90
91
|
private _scenePointerUpSub;
|
|
91
92
|
private _controlFillConfig$;
|
|
@@ -95,8 +96,6 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
95
96
|
private _startOffsetX;
|
|
96
97
|
private _startOffsetY;
|
|
97
98
|
private _scrollTimer;
|
|
98
|
-
private _pointerdownSub;
|
|
99
|
-
private _mainScenePointerUpSub;
|
|
100
99
|
private _skeleton;
|
|
101
100
|
private _scene;
|
|
102
101
|
private _isHeaderHighlight;
|
|
@@ -135,7 +134,7 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
135
134
|
scene: Scene;
|
|
136
135
|
}>;
|
|
137
136
|
}>;
|
|
138
|
-
constructor(_themeService: ThemeService, _shortcutService: IShortcutService, _renderManagerService: IRenderManagerService,
|
|
137
|
+
constructor(_themeService: ThemeService, _shortcutService: IShortcutService, _renderManagerService: IRenderManagerService, _injector: Injector);
|
|
139
138
|
enableHeaderHighlight(): void;
|
|
140
139
|
disableHeaderHighlight(): void;
|
|
141
140
|
enableDetectMergedCell(): void;
|
|
@@ -155,15 +154,14 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
155
154
|
getViewPort(): Viewport;
|
|
156
155
|
/**
|
|
157
156
|
* add a selection
|
|
158
|
-
* @param
|
|
159
|
-
* @param curCellRange
|
|
157
|
+
* @param data
|
|
160
158
|
*/
|
|
161
|
-
|
|
159
|
+
addSelectionControlBySelectionData(data: ISelectionWithCoordAndStyle): void;
|
|
162
160
|
updateControlForCurrentByRangeData(selections: ISelectionWithCoordAndStyle[]): void;
|
|
163
161
|
refreshSelectionMoveStart(): void;
|
|
164
162
|
changeRuntime(skeleton: Nullable<SpreadsheetSkeleton>, scene: Nullable<Scene>, viewport?: Viewport): void;
|
|
165
163
|
getSelectionDataWithStyle(): ISelectionWithCoordAndStyle[];
|
|
166
|
-
|
|
164
|
+
getSelectionControls(): SelectionShape[];
|
|
167
165
|
private _clearSelectionControls;
|
|
168
166
|
private _getFreeze;
|
|
169
167
|
private _getViewportByCell;
|
|
@@ -184,8 +182,12 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
184
182
|
* get active selection control
|
|
185
183
|
* @returns
|
|
186
184
|
*/
|
|
187
|
-
|
|
185
|
+
getActiveSelectionControl(): Nullable<SelectionShape>;
|
|
188
186
|
endSelection(): void;
|
|
187
|
+
/**
|
|
188
|
+
* first, clear All selection controls
|
|
189
|
+
* then unsubscribe all events
|
|
190
|
+
*/
|
|
189
191
|
reset(): void;
|
|
190
192
|
resetAndEndSelection(): void;
|
|
191
193
|
/**
|
|
@@ -198,8 +200,8 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
198
200
|
eventTrigger(evt: IPointerEvent | IMouseEvent, zIndex?: number, rangeType?: RANGE_TYPE, viewport?: Viewport, scrollTimerType?: ScrollTimerType): false | undefined;
|
|
199
201
|
attachSelectionWithCoord(selectionWithStyle: ISelectionWithStyle): ISelectionWithCoordAndStyle;
|
|
200
202
|
attachRangeWithCoord(range: IRange): Nullable<IRangeWithCoord>;
|
|
201
|
-
attachPrimaryWithCoord(primary: Nullable<ISelectionCell>): Nullable<
|
|
202
|
-
getSelectionCellByPosition(x: number, y: number): Nullable<
|
|
203
|
+
attachPrimaryWithCoord(primary: Nullable<ISelectionCell>): Nullable<ISelectionCellWithMergeInfo>;
|
|
204
|
+
getSelectionCellByPosition(x: number, y: number): Nullable<ISelectionCellWithMergeInfo>;
|
|
203
205
|
/**
|
|
204
206
|
* When mousedown and mouseup need to go to the coordination and undo stack, when mousemove does not need to go to the coordination and undo stack
|
|
205
207
|
*/
|