@fileverse-dev/fortune-core 1.0.26 → 2.0.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.
Files changed (346) hide show
  1. package/dist/index.esm.js +80254 -0
  2. package/dist/index.js +80600 -0
  3. package/{es → dist/packages/core/src}/api/cell.d.ts +10 -10
  4. package/{lib → dist/packages/core/src}/api/common.d.ts +66 -71
  5. package/{es → dist/packages/core/src}/api/errors.d.ts +2 -2
  6. package/{es → dist/packages/core/src}/api/index.d.ts +9 -9
  7. package/{es → dist/packages/core/src}/api/merge.d.ts +5 -5
  8. package/{lib → dist/packages/core/src}/api/range.d.ts +22 -22
  9. package/{lib → dist/packages/core/src}/api/rowcol.d.ts +14 -14
  10. package/{lib → dist/packages/core/src}/api/sheet.d.ts +10 -10
  11. package/{lib → dist/packages/core/src}/api/workbook.d.ts +15 -15
  12. package/{lib → dist/packages/core/src}/canvas.d.ts +46 -46
  13. package/{es → dist/packages/core/src}/context.d.ts +197 -198
  14. package/{es → dist/packages/core/src}/events/copy.d.ts +2 -2
  15. package/{lib → dist/packages/core/src}/events/index.d.ts +4 -4
  16. package/{lib → dist/packages/core/src}/events/keyboard.d.ts +6 -6
  17. package/{es → dist/packages/core/src}/events/mouse.d.ts +22 -22
  18. package/{es → dist/packages/core/src}/events/paste.d.ts +3 -3
  19. package/{lib → dist/packages/core/src}/index.d.ts +10 -10
  20. package/{lib → dist/packages/core/src}/locale/en.d.ts +992 -992
  21. package/{lib → dist/packages/core/src}/locale/es.d.ts +1134 -1134
  22. package/{lib → dist/packages/core/src}/locale/hi.d.ts +1030 -1030
  23. package/{lib → dist/packages/core/src}/locale/index.d.ts +1049 -1049
  24. package/{es → dist/packages/core/src}/locale/zh.d.ts +1048 -1048
  25. package/{lib → dist/packages/core/src}/locale/zh_tw.d.ts +1187 -1187
  26. package/{lib → dist/packages/core/src}/modules/ConditionFormat.d.ts +17 -17
  27. package/{lib → dist/packages/core/src}/modules/border.d.ts +3 -3
  28. package/{lib → dist/packages/core/src}/modules/cell.d.ts +32 -32
  29. package/{es → dist/packages/core/src}/modules/clipboard.d.ts +3 -3
  30. package/{es → dist/packages/core/src}/modules/color.d.ts +1 -1
  31. package/{lib → dist/packages/core/src}/modules/comment.d.ts +97 -97
  32. package/{es → dist/packages/core/src}/modules/conditionalFormat.d.ts +2 -2
  33. package/{es → dist/packages/core/src}/modules/cursor.d.ts +3 -3
  34. package/{es → dist/packages/core/src}/modules/dataVerification.d.ts +11 -11
  35. package/{es → dist/packages/core/src}/modules/dropCell.d.ts +10 -10
  36. package/{lib → dist/packages/core/src}/modules/filter.d.ts +45 -45
  37. package/{es → dist/packages/core/src}/modules/format.d.ts +6 -6
  38. package/{lib → dist/packages/core/src}/modules/formula.d.ts +54 -54
  39. package/{es → dist/packages/core/src}/modules/freeze.d.ts +5 -5
  40. package/{es → dist/packages/core/src}/modules/hyperlink.d.ts +21 -21
  41. package/{lib → dist/packages/core/src}/modules/iframe.d.ts +12 -12
  42. package/{es → dist/packages/core/src}/modules/image.d.ts +31 -31
  43. package/{es → dist/packages/core/src}/modules/index.d.ts +36 -36
  44. package/{lib → dist/packages/core/src}/modules/inline-string.d.ts +36 -36
  45. package/{es → dist/packages/core/src}/modules/location.d.ts +6 -6
  46. package/{es → dist/packages/core/src}/modules/locationCondition.d.ts +21 -21
  47. package/{es → dist/packages/core/src}/modules/merge.d.ts +3 -3
  48. package/{es → dist/packages/core/src}/modules/mobile.d.ts +5 -5
  49. package/{lib → dist/packages/core/src}/modules/moveCells.d.ts +5 -5
  50. package/{lib → dist/packages/core/src}/modules/protection.d.ts +5 -5
  51. package/{lib → dist/packages/core/src}/modules/refresh.d.ts +3 -3
  52. package/{es → dist/packages/core/src}/modules/rowcol.d.ts +19 -19
  53. package/{lib → dist/packages/core/src}/modules/screenshot.d.ts +2 -2
  54. package/{es → dist/packages/core/src}/modules/searchReplace.d.ts +36 -36
  55. package/{lib → dist/packages/core/src}/modules/selection.d.ts +46 -46
  56. package/{es → dist/packages/core/src}/modules/sheet.d.ts +10 -10
  57. package/{es → dist/packages/core/src}/modules/sort.d.ts +7 -7
  58. package/{es → dist/packages/core/src}/modules/splitColumn.d.ts +5 -5
  59. package/{es → dist/packages/core/src}/modules/text.d.ts +10 -10
  60. package/{lib → dist/packages/core/src}/modules/toolbar.d.ts +32 -32
  61. package/{es → dist/packages/core/src}/modules/validation.d.ts +19 -19
  62. package/{es → dist/packages/core/src}/modules/zoom.d.ts +3 -3
  63. package/{es → dist/packages/core/src}/settings.d.ts +100 -100
  64. package/{es → dist/packages/core/src}/types.d.ts +371 -376
  65. package/{es → dist/packages/core/src}/utils/freeze.d.ts +7 -7
  66. package/{es → dist/packages/core/src}/utils/index.d.ts +18 -19
  67. package/{lib → dist/packages/core/src}/utils/patch.d.ts +37 -37
  68. package/dist/packages/react/src/components/ChangeColor/index.d.ts +7 -0
  69. package/dist/packages/react/src/components/ConditionFormat/ConditionRules.d.ts +6 -0
  70. package/dist/packages/react/src/components/ConditionFormat/index.d.ts +7 -0
  71. package/dist/packages/react/src/components/ContextMenu/Divider.d.ts +3 -0
  72. package/dist/packages/react/src/components/ContextMenu/FilterMenu.d.ts +3 -0
  73. package/dist/packages/react/src/components/ContextMenu/Menu.d.ts +8 -0
  74. package/dist/packages/react/src/components/ContextMenu/SheetTab.d.ts +4 -0
  75. package/dist/packages/react/src/components/ContextMenu/index.d.ts +5 -0
  76. package/dist/packages/react/src/components/CustomSort/index.d.ts +4 -0
  77. package/dist/packages/react/src/components/DataVerification/DropdownList.d.ts +4 -0
  78. package/dist/packages/react/src/components/DataVerification/RangeDialog.d.ts +4 -0
  79. package/dist/packages/react/src/components/DataVerification/getDisplayedRangeTxt.d.ts +2 -0
  80. package/dist/packages/react/src/components/DataVerification/index.d.ts +4 -0
  81. package/dist/packages/react/src/components/Dialog/index.d.ts +15 -0
  82. package/dist/packages/react/src/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +11 -0
  83. package/dist/packages/react/src/components/DunePreview/DunePreview.d.ts +13 -0
  84. package/dist/packages/react/src/components/FilterOption/index.d.ts +5 -0
  85. package/dist/packages/react/src/components/FormatSearch/index.d.ts +6 -0
  86. package/dist/packages/react/src/components/FormulaSearch/index.d.ts +5 -0
  87. package/dist/packages/react/src/components/FxEditor/NameBox.d.ts +3 -0
  88. package/dist/packages/react/src/components/FxEditor/index.d.ts +4 -0
  89. package/dist/packages/react/src/components/IFrameBoxs/iFrameBoxs.d.ts +4 -0
  90. package/dist/packages/react/src/components/ImgBoxs/index.d.ts +3 -0
  91. package/dist/packages/react/src/components/LinkEidtCard/index.d.ts +5 -0
  92. package/dist/packages/react/src/components/LocationCondition/index.d.ts +3 -0
  93. package/dist/packages/react/src/components/MessageBox/index.d.ts +9 -0
  94. package/dist/packages/react/src/components/NotationBoxes/index.d.ts +3 -0
  95. package/dist/packages/react/src/components/ResetColumnWidth/index.d.ts +2 -0
  96. package/dist/packages/react/src/components/SVGDefines.d.ts +5 -0
  97. package/dist/packages/react/src/components/SVGIcon.d.ts +9 -0
  98. package/dist/packages/react/src/components/SearchReplace/index.d.ts +6 -0
  99. package/dist/packages/react/src/components/Sheet/index.d.ts +8 -0
  100. package/dist/packages/react/src/components/SheetList/SheetHiddenButton.d.ts +8 -0
  101. package/dist/packages/react/src/components/SheetList/SheetListItem.d.ts +9 -0
  102. package/dist/packages/react/src/components/SheetList/index.d.ts +4 -0
  103. package/dist/packages/react/src/components/SheetOverlay/ColumnHeader.d.ts +3 -0
  104. package/dist/packages/react/src/components/SheetOverlay/ContentEditable.d.ts +11 -0
  105. package/dist/packages/react/src/components/SheetOverlay/FormulaHint/index.d.ts +4 -0
  106. package/dist/packages/react/src/components/SheetOverlay/FormulaSearch/constant.d.ts +63 -0
  107. package/dist/packages/react/src/components/SheetOverlay/FormulaSearch/index.d.ts +4 -0
  108. package/dist/packages/react/src/components/SheetOverlay/InputBox.d.ts +3 -0
  109. package/dist/packages/react/src/components/SheetOverlay/RowHeader.d.ts +3 -0
  110. package/dist/packages/react/src/components/SheetOverlay/ScrollBar/index.d.ts +7 -0
  111. package/dist/packages/react/src/components/SheetOverlay/index.d.ts +4 -0
  112. package/dist/packages/react/src/components/SheetTab/SheetItem.d.ts +8 -0
  113. package/dist/packages/react/src/components/SheetTab/index.d.ts +4 -0
  114. package/dist/packages/react/src/components/SplitColumn/index.d.ts +3 -0
  115. package/dist/packages/react/src/components/Toolbar/Button.d.ts +12 -0
  116. package/dist/packages/react/src/components/Toolbar/ColorPicker.d.ts +6 -0
  117. package/dist/packages/react/src/components/Toolbar/Combo.d.ts +12 -0
  118. package/dist/packages/react/src/components/Toolbar/CustomBorder.d.ts +7 -0
  119. package/dist/packages/react/src/components/Toolbar/CustomButton.d.ts +11 -0
  120. package/dist/packages/react/src/components/Toolbar/CustomColor.d.ts +8 -0
  121. package/dist/packages/react/src/components/Toolbar/CustomIcon.d.ts +9 -0
  122. package/dist/packages/react/src/components/Toolbar/Divider.d.ts +4 -0
  123. package/dist/packages/react/src/components/Toolbar/MoreItemsContainer.d.ts +6 -0
  124. package/dist/packages/react/src/components/Toolbar/Select.d.ts +14 -0
  125. package/dist/packages/react/src/components/Toolbar/index.d.ts +10 -0
  126. package/dist/packages/react/src/components/Workbook/api.d.ts +1177 -0
  127. package/dist/packages/react/src/components/Workbook/index.d.ts +1185 -0
  128. package/dist/packages/react/src/components/ZoomControl/index.d.ts +4 -0
  129. package/dist/packages/react/src/components/index.d.ts +4 -0
  130. package/dist/packages/react/src/constants.d.ts +1 -0
  131. package/dist/packages/react/src/context/index.d.ts +25 -0
  132. package/dist/packages/react/src/context/modal.d.ts +10 -0
  133. package/dist/packages/react/src/hooks/useAlert.d.ts +4 -0
  134. package/dist/packages/react/src/hooks/useDialog.d.ts +5 -0
  135. package/dist/packages/react/src/hooks/useOutsideClick.d.ts +2 -0
  136. package/dist/packages/react/src/hooks/usePrevious.d.ts +2 -0
  137. package/dist/packages/react/src/index.d.ts +1 -0
  138. package/dist/packages/react/src/utils/datepickerStyles.d.ts +2 -0
  139. package/dist/stories/API.stories.d.ts +1210 -0
  140. package/dist/stories/Collabration.stories.d.ts +2359 -0
  141. package/dist/stories/Features.stories.d.ts +9430 -0
  142. package/dist/stories/data/cell.d.ts +983 -0
  143. package/dist/stories/data/dataVerification.d.ts +131 -0
  144. package/dist/stories/data/empty.d.ts +10 -0
  145. package/dist/stories/data/formula.d.ts +362 -0
  146. package/dist/stories/data/freeze.d.ts +34 -0
  147. package/dist/stories/data/protected.d.ts +40 -0
  148. package/dist/stories/utils.d.ts +1 -0
  149. package/package.json +6 -7
  150. package/es/api/cell.js +0 -204
  151. package/es/api/common.d.ts +0 -71
  152. package/es/api/common.js +0 -79
  153. package/es/api/errors.js +0 -2
  154. package/es/api/index.js +0 -8
  155. package/es/api/merge.js +0 -15
  156. package/es/api/range.d.ts +0 -22
  157. package/es/api/range.js +0 -123
  158. package/es/api/rowcol.d.ts +0 -14
  159. package/es/api/rowcol.js +0 -207
  160. package/es/api/sheet.d.ts +0 -10
  161. package/es/api/sheet.js +0 -128
  162. package/es/api/workbook.d.ts +0 -15
  163. package/es/api/workbook.js +0 -85
  164. package/es/canvas.d.ts +0 -46
  165. package/es/canvas.js +0 -1350
  166. package/es/context.js +0 -381
  167. package/es/events/copy.js +0 -78
  168. package/es/events/index.d.ts +0 -4
  169. package/es/events/index.js +0 -4
  170. package/es/events/keyboard.d.ts +0 -6
  171. package/es/events/keyboard.js +0 -332
  172. package/es/events/mouse.js +0 -1725
  173. package/es/events/paste.js +0 -1378
  174. package/es/index.d.ts +0 -10
  175. package/es/index.js +0 -10
  176. package/es/locale/en.d.ts +0 -992
  177. package/es/locale/en.js +0 -10564
  178. package/es/locale/es.d.ts +0 -1134
  179. package/es/locale/es.js +0 -10010
  180. package/es/locale/hi.d.ts +0 -1030
  181. package/es/locale/hi.js +0 -10550
  182. package/es/locale/index.d.ts +0 -1049
  183. package/es/locale/index.js +0 -23
  184. package/es/locale/zh.js +0 -10568
  185. package/es/locale/zh_tw.d.ts +0 -1187
  186. package/es/locale/zh_tw.js +0 -10072
  187. package/es/modules/ConditionFormat.d.ts +0 -17
  188. package/es/modules/ConditionFormat.js +0 -1258
  189. package/es/modules/border.d.ts +0 -3
  190. package/es/modules/border.js +0 -1240
  191. package/es/modules/cell.d.ts +0 -32
  192. package/es/modules/cell.js +0 -1055
  193. package/es/modules/clipboard.js +0 -36
  194. package/es/modules/color.js +0 -1
  195. package/es/modules/comment.d.ts +0 -97
  196. package/es/modules/comment.js +0 -597
  197. package/es/modules/conditionalFormat.js +0 -441
  198. package/es/modules/cursor.js +0 -62
  199. package/es/modules/dataVerification.js +0 -701
  200. package/es/modules/dropCell.js +0 -2267
  201. package/es/modules/filter.d.ts +0 -45
  202. package/es/modules/filter.js +0 -434
  203. package/es/modules/format.js +0 -323
  204. package/es/modules/formula.d.ts +0 -54
  205. package/es/modules/formula.js +0 -2301
  206. package/es/modules/freeze.js +0 -148
  207. package/es/modules/hyperlink.js +0 -216
  208. package/es/modules/iframe.d.ts +0 -12
  209. package/es/modules/iframe.js +0 -220
  210. package/es/modules/image.js +0 -253
  211. package/es/modules/index.js +0 -36
  212. package/es/modules/inline-string.d.ts +0 -36
  213. package/es/modules/inline-string.js +0 -437
  214. package/es/modules/location.js +0 -46
  215. package/es/modules/locationCondition.js +0 -218
  216. package/es/modules/merge.js +0 -216
  217. package/es/modules/mobile.js +0 -33
  218. package/es/modules/moveCells.d.ts +0 -5
  219. package/es/modules/moveCells.js +0 -348
  220. package/es/modules/protection.d.ts +0 -5
  221. package/es/modules/protection.js +0 -96
  222. package/es/modules/refresh.d.ts +0 -3
  223. package/es/modules/refresh.js +0 -34
  224. package/es/modules/rowcol.js +0 -1922
  225. package/es/modules/screenshot.d.ts +0 -2
  226. package/es/modules/screenshot.js +0 -90
  227. package/es/modules/searchReplace.js +0 -388
  228. package/es/modules/selection.d.ts +0 -46
  229. package/es/modules/selection.js +0 -1674
  230. package/es/modules/sheet.js +0 -237
  231. package/es/modules/sort.js +0 -134
  232. package/es/modules/splitColumn.js +0 -126
  233. package/es/modules/ssf.js +0 -1533
  234. package/es/modules/text.js +0 -1207
  235. package/es/modules/toolbar.d.ts +0 -32
  236. package/es/modules/toolbar.js +0 -970
  237. package/es/modules/validation.js +0 -190
  238. package/es/modules/zoom.js +0 -29
  239. package/es/settings.js +0 -36
  240. package/es/types.js +0 -1
  241. package/es/utils/freeze.js +0 -86
  242. package/es/utils/index.js +0 -198
  243. package/es/utils/patch.d.ts +0 -37
  244. package/es/utils/patch.js +0 -381
  245. package/lib/api/cell.d.ts +0 -10
  246. package/lib/api/cell.js +0 -215
  247. package/lib/api/common.js +0 -88
  248. package/lib/api/errors.d.ts +0 -2
  249. package/lib/api/errors.js +0 -8
  250. package/lib/api/index.d.ts +0 -9
  251. package/lib/api/index.js +0 -101
  252. package/lib/api/merge.d.ts +0 -5
  253. package/lib/api/merge.js +0 -22
  254. package/lib/api/range.js +0 -138
  255. package/lib/api/rowcol.js +0 -222
  256. package/lib/api/sheet.js +0 -145
  257. package/lib/api/workbook.js +0 -98
  258. package/lib/canvas.js +0 -1356
  259. package/lib/context.d.ts +0 -198
  260. package/lib/context.js +0 -393
  261. package/lib/events/copy.d.ts +0 -2
  262. package/lib/events/copy.js +0 -85
  263. package/lib/events/index.js +0 -49
  264. package/lib/events/keyboard.js +0 -342
  265. package/lib/events/mouse.d.ts +0 -22
  266. package/lib/events/mouse.js +0 -1744
  267. package/lib/events/paste.d.ts +0 -3
  268. package/lib/events/paste.js +0 -1386
  269. package/lib/index.js +0 -109
  270. package/lib/locale/en.js +0 -10570
  271. package/lib/locale/es.js +0 -10016
  272. package/lib/locale/hi.js +0 -10556
  273. package/lib/locale/index.js +0 -29
  274. package/lib/locale/zh.d.ts +0 -1048
  275. package/lib/locale/zh.js +0 -10574
  276. package/lib/locale/zh_tw.js +0 -10078
  277. package/lib/modules/ConditionFormat.js +0 -1273
  278. package/lib/modules/border.js +0 -1248
  279. package/lib/modules/cell.js +0 -1085
  280. package/lib/modules/clipboard.d.ts +0 -3
  281. package/lib/modules/clipboard.js +0 -42
  282. package/lib/modules/color.d.ts +0 -1
  283. package/lib/modules/color.js +0 -7
  284. package/lib/modules/comment.js +0 -625
  285. package/lib/modules/conditionalFormat.d.ts +0 -2
  286. package/lib/modules/conditionalFormat.js +0 -447
  287. package/lib/modules/cursor.d.ts +0 -3
  288. package/lib/modules/cursor.js +0 -70
  289. package/lib/modules/dataVerification.d.ts +0 -11
  290. package/lib/modules/dataVerification.js +0 -716
  291. package/lib/modules/dropCell.d.ts +0 -10
  292. package/lib/modules/dropCell.js +0 -2283
  293. package/lib/modules/filter.js +0 -448
  294. package/lib/modules/format.d.ts +0 -6
  295. package/lib/modules/format.js +0 -334
  296. package/lib/modules/formula.js +0 -2330
  297. package/lib/modules/freeze.d.ts +0 -5
  298. package/lib/modules/freeze.js +0 -158
  299. package/lib/modules/hyperlink.d.ts +0 -21
  300. package/lib/modules/hyperlink.js +0 -232
  301. package/lib/modules/iframe.js +0 -236
  302. package/lib/modules/image.d.ts +0 -31
  303. package/lib/modules/image.js +0 -272
  304. package/lib/modules/index.d.ts +0 -36
  305. package/lib/modules/index.js +0 -401
  306. package/lib/modules/inline-string.js +0 -452
  307. package/lib/modules/location.d.ts +0 -6
  308. package/lib/modules/location.js +0 -57
  309. package/lib/modules/locationCondition.d.ts +0 -21
  310. package/lib/modules/locationCondition.js +0 -229
  311. package/lib/modules/merge.d.ts +0 -3
  312. package/lib/modules/merge.js +0 -223
  313. package/lib/modules/mobile.d.ts +0 -5
  314. package/lib/modules/mobile.js +0 -41
  315. package/lib/modules/moveCells.js +0 -357
  316. package/lib/modules/protection.js +0 -106
  317. package/lib/modules/refresh.js +0 -40
  318. package/lib/modules/rowcol.d.ts +0 -19
  319. package/lib/modules/rowcol.js +0 -1935
  320. package/lib/modules/screenshot.js +0 -96
  321. package/lib/modules/searchReplace.d.ts +0 -36
  322. package/lib/modules/searchReplace.js +0 -402
  323. package/lib/modules/selection.js +0 -1703
  324. package/lib/modules/sheet.d.ts +0 -10
  325. package/lib/modules/sheet.js +0 -250
  326. package/lib/modules/sort.d.ts +0 -7
  327. package/lib/modules/sort.js +0 -143
  328. package/lib/modules/splitColumn.d.ts +0 -5
  329. package/lib/modules/splitColumn.js +0 -136
  330. package/lib/modules/ssf.js +0 -1539
  331. package/lib/modules/text.d.ts +0 -10
  332. package/lib/modules/text.js +0 -1221
  333. package/lib/modules/toolbar.js +0 -1003
  334. package/lib/modules/validation.d.ts +0 -19
  335. package/lib/modules/validation.js +0 -205
  336. package/lib/modules/zoom.d.ts +0 -3
  337. package/lib/modules/zoom.js +0 -36
  338. package/lib/settings.d.ts +0 -100
  339. package/lib/settings.js +0 -42
  340. package/lib/types.d.ts +0 -376
  341. package/lib/types.js +0 -5
  342. package/lib/utils/freeze.d.ts +0 -7
  343. package/lib/utils/freeze.js +0 -92
  344. package/lib/utils/index.d.ts +0 -19
  345. package/lib/utils/index.js +0 -258
  346. package/lib/utils/patch.js +0 -392
package/lib/context.d.ts DELETED
@@ -1,198 +0,0 @@
1
- import { SheetConfig } from ".";
2
- import { FormulaCache } from "./modules";
3
- import { Hooks } from "./settings";
4
- import { Sheet, Selection, Cell, CommentBox, Rect, Image, Presence, LinkCardProps, FilterOptions, RangeDialogProps, DataRegulationProps, ConditionRulesProps, GlobalCache } from "./types";
5
- interface MutableRefObject<T> {
6
- current: T;
7
- }
8
- type RefValues = {
9
- globalCache: GlobalCache;
10
- cellInput: MutableRefObject<HTMLDivElement | null>;
11
- fxInput: MutableRefObject<HTMLDivElement | null>;
12
- canvas: MutableRefObject<HTMLCanvasElement | null>;
13
- cellArea: MutableRefObject<HTMLDivElement | null>;
14
- workbookContainer: MutableRefObject<HTMLDivElement | null>;
15
- };
16
- export type Context = {
17
- luckysheetfile: Sheet[];
18
- defaultcolumnNum: number;
19
- defaultrowNum: number;
20
- addDefaultRows: number;
21
- fullscreenmode: boolean;
22
- devicePixelRatio: number;
23
- commentBoxes?: CommentBox[];
24
- editingCommentBox?: CommentBox;
25
- hoveredCommentBox?: CommentBox;
26
- insertedImgs?: Image[];
27
- editingInsertedImgs?: Image;
28
- activeImg?: string;
29
- insertedIframes?: {
30
- id: string;
31
- src: string;
32
- left: number;
33
- top: number;
34
- width: number;
35
- height: number;
36
- }[];
37
- activeIframe?: string;
38
- presences?: Presence[];
39
- showSearch?: boolean;
40
- showReplace?: boolean;
41
- linkCard?: LinkCardProps;
42
- rangeDialog?: RangeDialogProps;
43
- warnDialog?: string;
44
- currency?: string;
45
- dataVerification?: {
46
- selectStatus: boolean;
47
- selectRange: [];
48
- optionLabel_en: any;
49
- optionLabel_zh: any;
50
- optionLabel_zh_tw: any;
51
- optionLabel_es: any;
52
- optionLabel_hi: any;
53
- dataRegulation?: DataRegulationProps;
54
- };
55
- dataVerificationDropDownList?: boolean;
56
- conditionRules: ConditionRulesProps;
57
- contextMenu: {
58
- x?: number;
59
- y?: number;
60
- headerMenu?: boolean;
61
- pageX?: number;
62
- pageY?: number;
63
- };
64
- sheetTabContextMenu: {
65
- x?: number;
66
- y?: number;
67
- sheet?: Sheet;
68
- onRename?: () => void;
69
- };
70
- filterContextMenu?: {
71
- x: number;
72
- y: number;
73
- col: number;
74
- startRow: number;
75
- endRow: number;
76
- startCol: number;
77
- endCol: number;
78
- hiddenRows: number[];
79
- listBoxMaxHeight: number;
80
- };
81
- currentSheetId: string;
82
- calculateSheetId: string;
83
- config: SheetConfig;
84
- visibledatarow: number[];
85
- visibledatacolumn: number[];
86
- ch_width: number;
87
- rh_height: number;
88
- cellmainWidth: number;
89
- cellmainHeight: number;
90
- toolbarHeight: number;
91
- infobarHeight: number;
92
- calculatebarHeight: number;
93
- rowHeaderWidth: number;
94
- columnHeaderHeight: number;
95
- cellMainSrollBarSize: number;
96
- sheetBarHeight: number;
97
- statisticBarHeight: number;
98
- luckysheetTableContentHW: number[];
99
- defaultcollen: number;
100
- defaultrowlen: number;
101
- scrollLeft: number;
102
- scrollTop: number;
103
- sheetScrollRecord: Record<string, any>;
104
- luckysheet_select_status: boolean;
105
- luckysheet_select_save: Sheet["luckysheet_select_save"];
106
- luckysheet_selection_range: Sheet["luckysheet_selection_range"];
107
- formulaRangeHighlight: ({
108
- rangeIndex: number;
109
- backgroundColor: string;
110
- } & Rect)[];
111
- formulaRangeSelect: ({
112
- rangeIndex: number;
113
- } & Rect) | undefined;
114
- functionCandidates: any[];
115
- defaultCandidates: any[];
116
- functionHint: string | null | undefined;
117
- luckysheet_copy_save?: {
118
- dataSheetId: string;
119
- copyRange: {
120
- row: number[];
121
- column: number[];
122
- }[];
123
- RowlChange: boolean;
124
- HasMC: boolean;
125
- };
126
- luckysheet_paste_iscut: boolean;
127
- filterchage: boolean;
128
- filterOptions?: FilterOptions;
129
- luckysheet_filter_save?: {
130
- row: number[];
131
- column: number[];
132
- } | undefined;
133
- filter: Record<string, {
134
- caljs: any;
135
- rowhidden: Record<string, number>;
136
- optionstate: boolean;
137
- str: number;
138
- edr: number;
139
- cindex: number;
140
- stc: number;
141
- edc: number;
142
- }>;
143
- luckysheet_sheet_move_status: boolean;
144
- luckysheet_sheet_move_data: any[];
145
- luckysheet_scroll_status: boolean;
146
- luckysheetcurrentisPivotTable: boolean;
147
- luckysheet_rows_selected_status: boolean;
148
- luckysheet_cols_selected_status: boolean;
149
- luckysheet_rows_change_size: boolean;
150
- luckysheet_rows_change_size_start: any[];
151
- luckysheet_cols_change_size: boolean;
152
- luckysheet_cols_change_size_start: any[];
153
- luckysheet_cols_freeze_drag: boolean;
154
- luckysheet_rows_freeze_drag: boolean;
155
- luckysheetCellUpdate: any[];
156
- luckysheet_shiftkeydown: boolean;
157
- luckysheet_shiftpositon: Selection | undefined;
158
- iscopyself: boolean;
159
- orderbyindex: number;
160
- luckysheet_model_move_state: boolean;
161
- luckysheet_model_xy: number[];
162
- luckysheet_model_move_obj: any;
163
- luckysheet_cell_selected_move: boolean;
164
- luckysheet_cell_selected_move_index: any[];
165
- luckysheet_cell_selected_extend: boolean;
166
- luckysheet_cell_selected_extend_index: any[];
167
- lang: string | null;
168
- chart_selection: any;
169
- zoomRatio: number;
170
- showGridLines: boolean;
171
- allowEdit: boolean;
172
- isFlvReadOnly: boolean;
173
- fontList: any[];
174
- defaultFontSize: number;
175
- luckysheetPaintModelOn: boolean;
176
- luckysheetPaintSingle: boolean;
177
- defaultCell: Cell;
178
- groupValuesRefreshData: any[];
179
- formulaCache: FormulaCache;
180
- hooks: Hooks;
181
- showSheetList?: Boolean;
182
- forceFormulaRef?: Boolean;
183
- getRefs: () => RefValues;
184
- showDunePreview?: {
185
- url: string;
186
- position: {
187
- left: number;
188
- top: number;
189
- };
190
- };
191
- };
192
- export declare function defaultContext(refs: RefValues): Context;
193
- export declare function getFlowdata(ctx?: Context, id?: string | null): import("./types").CellMatrix | null | undefined;
194
- export declare function ensureSheetIndex(data: Sheet[], generateSheetId: () => string): void;
195
- export declare function initSheetIndex(ctx: Context): void;
196
- export declare function updateContextWithSheetData(ctx: Context, data: any[][]): void;
197
- export declare function updateContextWithCanvas(ctx: Context, canvas: HTMLCanvasElement, placeholder: HTMLDivElement): void;
198
- export {};
package/lib/context.js DELETED
@@ -1,393 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.defaultContext = defaultContext;
7
- exports.ensureSheetIndex = ensureSheetIndex;
8
- exports.getFlowdata = getFlowdata;
9
- exports.initSheetIndex = initSheetIndex;
10
- exports.updateContextWithCanvas = updateContextWithCanvas;
11
- exports.updateContextWithSheetData = updateContextWithSheetData;
12
- var _lodash = _interopRequireDefault(require("lodash"));
13
- var _modules = require("./modules");
14
- var _selection = require("./modules/selection");
15
- var _utils = require("./utils");
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- function defaultContext(refs) {
18
- return {
19
- luckysheetfile: [],
20
- defaultcolumnNum: 60,
21
- defaultrowNum: 84,
22
- addDefaultRows: 50,
23
- fullscreenmode: true,
24
- devicePixelRatio: (globalThis || window).devicePixelRatio,
25
- showDunePreview: {
26
- url: "",
27
- position: {
28
- left: 0,
29
- top: 0
30
- }
31
- },
32
- contextMenu: {},
33
- sheetTabContextMenu: {},
34
- currentSheetId: "",
35
- calculateSheetId: "",
36
- config: {},
37
- warnDialog: undefined,
38
- currency: "¥",
39
- rangeDialog: {
40
- show: false,
41
- rangeTxt: "",
42
- type: "",
43
- singleSelect: false
44
- },
45
- dataVerification: {
46
- selectStatus: false,
47
- selectRange: [],
48
- optionLabel_en: {
49
- number: "numeric",
50
- number_integer: "integer",
51
- number_decimal: "decimal",
52
- between: "between",
53
- notBetween: "not between",
54
- equal: "equal to",
55
- notEqualTo: "not equal to",
56
- moreThanThe: "greater",
57
- lessThan: "less than",
58
- greaterOrEqualTo: "greater or equal to",
59
- lessThanOrEqualTo: "less than or equal to",
60
- include: "include",
61
- exclude: "not include",
62
- earlierThan: "earlier than",
63
- noEarlierThan: "not earlier than",
64
- laterThan: "later than",
65
- noLaterThan: "not later than",
66
- identificationNumber: "identification number",
67
- phoneNumber: "phone number"
68
- },
69
- optionLabel_hi: {
70
- number: "संख्यात्मक",
71
- number_integer: "पूर्णांक",
72
- number_decimal: "दशमलव",
73
- between: "के बीच",
74
- notBetween: "के बीच नहीं",
75
- equal: "के बराबर",
76
- notEqualTo: "के बराबर नहीं",
77
- moreThanThe: "से अधिक",
78
- lessThan: "से कम",
79
- greaterOrEqualTo: "के बराबर या अधिक",
80
- lessThanOrEqualTo: "के बराबर या कम",
81
- include: "शामिल",
82
- exclude: "शामिल नहीं",
83
- earlierThan: "से पहले",
84
- noEarlierThan: "से पहले नहीं",
85
- laterThan: "के बाद",
86
- noLaterThan: "के बाद नहीं",
87
- identificationNumber: "पहचान संख्या",
88
- phoneNumber: "फोन नंबर"
89
- },
90
- optionLabel_zh: {
91
- number: "数值",
92
- number_integer: "整数",
93
- number_decimal: "小数",
94
- between: "介于",
95
- notBetween: "不介于",
96
- equal: "等于",
97
- notEqualTo: "不等于",
98
- moreThanThe: "大于",
99
- lessThan: "小于",
100
- greaterOrEqualTo: "大于等于",
101
- lessThanOrEqualTo: "小于等于",
102
- include: "包括",
103
- exclude: "不包括",
104
- earlierThan: "早于",
105
- noEarlierThan: "不早于",
106
- laterThan: "晚于",
107
- noLaterThan: "不晚于",
108
- identificationNumber: "身份证号码",
109
- phoneNumber: "手机号"
110
- },
111
- optionLabel_zh_tw: {
112
- number: "數位",
113
- number_integer: "數位-整數",
114
- number_decimal: "數位-小數",
115
- between: "介於",
116
- notBetween: "不介於",
117
- equal: "等於",
118
- notEqualTo: "不等於",
119
- moreThanThe: "大於",
120
- lessThan: "小於",
121
- greaterOrEqualTo: "大於等於",
122
- lessThanOrEqualTo: "小於等於",
123
- include: "包括",
124
- exclude: "不包括",
125
- earlierThan: "早於",
126
- noEarlierThan: "不早於",
127
- laterThan: "晚於",
128
- noLaterThan: "不晚於",
129
- identificationNumber: "身份證號碼",
130
- phoneNumber: "手機號"
131
- },
132
- optionLabel_es: {
133
- number: "Número",
134
- number_integer: "Número entero",
135
- number_decimal: "Número decimal",
136
- between: "Entre",
137
- notBetween: "No entre",
138
- equal: "Iqual",
139
- notEqualTo: "No iqual a",
140
- moreThanThe: "Más que el",
141
- lessThan: "Menos que",
142
- greaterOrEqualTo: "Mayor o igual a",
143
- lessThanOrEqualTo: "Menor o igual a",
144
- include: "Incluir",
145
- exclude: "Excluir",
146
- earlierThan: "Antes de",
147
- noEarlierThan: "No antes de",
148
- laterThan: "Después de",
149
- noLaterThan: "No después de",
150
- identificationNumber: "Número de identificación",
151
- phoneNumber: "Número de teléfono"
152
- },
153
- dataRegulation: {
154
- type: "",
155
- type2: "",
156
- rangeTxt: "",
157
- value1: "",
158
- value2: "",
159
- validity: "",
160
- remote: false,
161
- prohibitInput: false,
162
- hintShow: false,
163
- hintValue: ""
164
- }
165
- },
166
- dataVerificationDropDownList: false,
167
- conditionRules: {
168
- rulesType: "",
169
- rulesValue: "",
170
- textColor: {
171
- check: true,
172
- color: "#000000"
173
- },
174
- cellColor: {
175
- check: true,
176
- color: "#000000"
177
- },
178
- betweenValue: {
179
- value1: "",
180
- value2: ""
181
- },
182
- dateValue: "",
183
- repeatValue: "0",
184
- projectValue: "10"
185
- },
186
- visibledatarow: [],
187
- visibledatacolumn: [],
188
- ch_width: 0,
189
- rh_height: 0,
190
- cellmainWidth: 0,
191
- cellmainHeight: 0,
192
- toolbarHeight: 41,
193
- infobarHeight: 57,
194
- calculatebarHeight: 29,
195
- rowHeaderWidth: 46,
196
- columnHeaderHeight: 20,
197
- cellMainSrollBarSize: 12,
198
- sheetBarHeight: 31,
199
- statisticBarHeight: 23,
200
- luckysheetTableContentHW: [0, 0],
201
- defaultcollen: 73,
202
- defaultrowlen: 19,
203
- scrollLeft: 0,
204
- scrollTop: 0,
205
- sheetScrollRecord: {},
206
- luckysheet_select_status: false,
207
- luckysheet_select_save: undefined,
208
- luckysheet_selection_range: [],
209
- formulaRangeHighlight: [],
210
- formulaRangeSelect: undefined,
211
- functionCandidates: [],
212
- defaultCandidates: [],
213
- functionHint: null,
214
- luckysheet_copy_save: undefined,
215
- luckysheet_paste_iscut: false,
216
- filterchage: true,
217
- filter: {},
218
- luckysheet_sheet_move_status: false,
219
- luckysheet_sheet_move_data: [],
220
- luckysheet_scroll_status: false,
221
- luckysheetcurrentisPivotTable: false,
222
- luckysheet_rows_selected_status: false,
223
- luckysheet_cols_selected_status: false,
224
- luckysheet_rows_change_size: false,
225
- luckysheet_rows_change_size_start: [],
226
- luckysheet_cols_change_size: false,
227
- luckysheet_cols_change_size_start: [],
228
- luckysheet_cols_freeze_drag: false,
229
- luckysheet_rows_freeze_drag: false,
230
- luckysheetCellUpdate: [],
231
- luckysheet_shiftkeydown: false,
232
- luckysheet_shiftpositon: undefined,
233
- iscopyself: true,
234
- activeImg: undefined,
235
- insertedIframes: [],
236
- activeIframe: undefined,
237
- orderbyindex: 0,
238
- luckysheet_model_move_state: false,
239
- luckysheet_model_xy: [0, 0],
240
- luckysheet_model_move_obj: null,
241
- luckysheet_cell_selected_move: false,
242
- luckysheet_cell_selected_move_index: [],
243
- luckysheet_cell_selected_extend: false,
244
- luckysheet_cell_selected_extend_index: [],
245
- lang: null,
246
- chart_selection: {},
247
- zoomRatio: 1,
248
- showGridLines: true,
249
- allowEdit: true,
250
- isFlvReadOnly: false,
251
- fontList: [],
252
- defaultFontSize: 10,
253
- luckysheetPaintModelOn: false,
254
- luckysheetPaintSingle: false,
255
- defaultCell: {
256
- bl: 0,
257
- ct: {
258
- fa: "General",
259
- t: "n"
260
- },
261
- fc: "rgb(51, 51, 51)",
262
- ff: 0,
263
- fs: 11,
264
- ht: 1,
265
- it: 0,
266
- vt: 1,
267
- m: "",
268
- v: ""
269
- },
270
- groupValuesRefreshData: [],
271
- formulaCache: new _modules.FormulaCache(),
272
- hooks: {},
273
- getRefs: function getRefs() {
274
- return refs;
275
- }
276
- };
277
- }
278
- function getFlowdata(ctx, id) {
279
- var _a, _b;
280
- if (!ctx) return null;
281
- var i = (0, _utils.getSheetIndex)(ctx, id || ctx.currentSheetId);
282
- if (_lodash.default.isNil(i)) {
283
- return null;
284
- }
285
- return (_b = (_a = ctx.luckysheetfile) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.data;
286
- }
287
- function calcRowColSize(ctx, rowCount, colCount) {
288
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
289
- ctx.visibledatarow = [];
290
- ctx.rh_height = 0;
291
- for (var r = 0; r < rowCount; r += 1) {
292
- var rowlen = ctx.defaultrowlen;
293
- if ((_a = ctx.config.rowlen) === null || _a === void 0 ? void 0 : _a[r]) {
294
- rowlen = (_c = (_b = ctx.config) === null || _b === void 0 ? void 0 : _b.rowlen) === null || _c === void 0 ? void 0 : _c[r];
295
- }
296
- if (((_e = (_d = ctx.config) === null || _d === void 0 ? void 0 : _d.rowhidden) === null || _e === void 0 ? void 0 : _e[r]) != null) {
297
- ctx.visibledatarow.push(ctx.rh_height);
298
- continue;
299
- }
300
- ctx.rh_height += Math.round((rowlen + 1) * ctx.zoomRatio);
301
- ctx.visibledatarow.push(ctx.rh_height);
302
- }
303
- ctx.rh_height += 80;
304
- ctx.visibledatacolumn = [];
305
- ctx.ch_width = 0;
306
- var maxColumnlen = 120;
307
- var flowdata = getFlowdata(ctx);
308
- for (var c = 0; c < colCount; c += 1) {
309
- var firstcolumnlen = ctx.defaultcollen;
310
- if ((_g = (_f = ctx.config) === null || _f === void 0 ? void 0 : _f.columnlen) === null || _g === void 0 ? void 0 : _g[c]) {
311
- firstcolumnlen = ctx.config.columnlen[c];
312
- } else {
313
- if ((_h = flowdata === null || flowdata === void 0 ? void 0 : flowdata[0]) === null || _h === void 0 ? void 0 : _h[c]) {
314
- if (firstcolumnlen > 300) {
315
- firstcolumnlen = 300;
316
- } else if (firstcolumnlen < ctx.defaultcollen) {
317
- firstcolumnlen = ctx.defaultcollen;
318
- }
319
- if (firstcolumnlen !== ctx.defaultcollen) {
320
- if (!((_j = ctx.config) === null || _j === void 0 ? void 0 : _j.columnlen)) {
321
- ctx.config.columnlen = {};
322
- }
323
- ctx.config.columnlen[c] = firstcolumnlen;
324
- }
325
- }
326
- }
327
- if (((_l = (_k = ctx.config) === null || _k === void 0 ? void 0 : _k.colhidden) === null || _l === void 0 ? void 0 : _l[c]) != null) {
328
- ctx.visibledatacolumn.push(ctx.ch_width);
329
- continue;
330
- }
331
- ctx.ch_width += Math.round((firstcolumnlen + 1) * ctx.zoomRatio);
332
- ctx.visibledatacolumn.push(ctx.ch_width);
333
- }
334
- ctx.ch_width += maxColumnlen;
335
- }
336
- function ensureSheetIndex(data, generateSheetId) {
337
- if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
338
- var hasActive_1 = false;
339
- var indexs_1 = [];
340
- data.forEach(function (item) {
341
- if (item.id == null) {
342
- item.id = generateSheetId();
343
- }
344
- if (indexs_1.includes(item.id)) {
345
- item.id = generateSheetId();
346
- } else {
347
- indexs_1.push(item.id);
348
- }
349
- if (item.status == null) {
350
- item.status = 0;
351
- }
352
- if (item.status === 1) {
353
- if (hasActive_1) {
354
- item.status = 0;
355
- } else {
356
- hasActive_1 = true;
357
- }
358
- }
359
- });
360
- if (!hasActive_1) {
361
- data[0].status = 1;
362
- }
363
- }
364
- }
365
- function initSheetIndex(ctx) {
366
- var shownSheets = ctx.luckysheetfile.filter(function (singleSheet) {
367
- return _lodash.default.isUndefined(singleSheet.hide) || singleSheet.hide !== 1;
368
- });
369
- ctx.currentSheetId = _lodash.default.sortBy(shownSheets, function (sheet) {
370
- return sheet.order;
371
- })[0].id;
372
- for (var i = 0; i < ctx.luckysheetfile.length; i += 1) {
373
- if (ctx.luckysheetfile[i].status === 1 && ctx.luckysheetfile[i].hide !== 1) {
374
- ctx.currentSheetId = ctx.luckysheetfile[i].id;
375
- break;
376
- }
377
- }
378
- }
379
- function updateContextWithSheetData(ctx, data) {
380
- var rowCount = data.length;
381
- var colCount = rowCount === 0 ? 0 : data[0].length;
382
- calcRowColSize(ctx, rowCount, colCount);
383
- (0, _selection.normalizeSelection)(ctx, ctx.luckysheet_select_save);
384
- }
385
- function updateContextWithCanvas(ctx, canvas, placeholder) {
386
- ctx.luckysheetTableContentHW = [placeholder.clientWidth, placeholder.clientHeight];
387
- ctx.cellmainHeight = placeholder.clientHeight - ctx.columnHeaderHeight;
388
- ctx.cellmainWidth = placeholder.clientWidth - ctx.rowHeaderWidth;
389
- canvas.style.width = "".concat(ctx.luckysheetTableContentHW[0], "px");
390
- canvas.style.height = "".concat(ctx.luckysheetTableContentHW[1], "px");
391
- canvas.width = Math.ceil(ctx.luckysheetTableContentHW[0] * ctx.devicePixelRatio);
392
- canvas.height = Math.ceil(ctx.luckysheetTableContentHW[1] * ctx.devicePixelRatio);
393
- }
@@ -1,2 +0,0 @@
1
- import { Context } from "../context";
2
- export declare function handleCopy(ctx: Context): void;
@@ -1,85 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.handleCopy = handleCopy;
7
- var _lodash = _interopRequireDefault(require("lodash"));
8
- var _2 = require("..");
9
- var _selection = require("../modules/selection");
10
- var _validation = require("../modules/validation");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- function handleCopy(ctx) {
13
- if (ctx.luckysheetPaintModelOn) {
14
- (0, _2.cancelPaintModel)(ctx);
15
- }
16
- var selection = ctx.luckysheet_select_save;
17
- if (!selection || _lodash.default.isEmpty(selection)) {
18
- return;
19
- }
20
- if (ctx.config.merge != null) {
21
- var has_PartMC = false;
22
- for (var s = 0; s < selection.length; s += 1) {
23
- var r1 = selection[s].row[0];
24
- var r2 = selection[s].row[1];
25
- var c1 = selection[s].column[0];
26
- var c2 = selection[s].column[1];
27
- has_PartMC = (0, _validation.hasPartMC)(ctx, ctx.config, r1, r2, c1, c2);
28
- if (has_PartMC) {
29
- break;
30
- }
31
- }
32
- if (has_PartMC) {
33
- return;
34
- }
35
- }
36
- var cdformat = ctx.luckysheetfile[(0, _2.getSheetIndex)(ctx, ctx.currentSheetId)].luckysheet_conditionformat_save;
37
- if (!_lodash.default.isNil(ctx.luckysheet_select_save) && ctx.luckysheet_select_save.length > 1 && !_lodash.default.isNil(cdformat) && cdformat.length > 0) {
38
- var hasCF = false;
39
- var cf_compute = (0, _2.getComputeMap)(ctx);
40
- for (var s = 0; s < ctx.luckysheet_select_save.length; s += 1) {
41
- if (hasCF) {
42
- break;
43
- }
44
- var r1 = ctx.luckysheet_select_save[s].row[0];
45
- var r2 = ctx.luckysheet_select_save[s].row[1];
46
- var c1 = ctx.luckysheet_select_save[s].column[0];
47
- var c2 = ctx.luckysheet_select_save[s].column[1];
48
- for (var r = r1; r <= r2; r += 1) {
49
- if (hasCF) {
50
- break;
51
- }
52
- for (var c = c1; c <= c2; c += 1) {
53
- if (!_lodash.default.isNil((0, _2.checkCF)(r, c, cf_compute))) {
54
- hasCF = true;
55
- break;
56
- }
57
- }
58
- }
59
- }
60
- if (hasCF) {
61
- return;
62
- }
63
- }
64
- if (selection.length > 1) {
65
- var isSameRow = true;
66
- var str_r = selection[0].row[0];
67
- var end_r = selection[0].row[1];
68
- var isSameCol = true;
69
- var str_c = selection[0].column[0];
70
- var end_c = selection[0].column[1];
71
- for (var s = 1; s < selection.length; s += 1) {
72
- if (selection[s].row[0] !== str_r || selection[s].row[1] !== end_r) {
73
- isSameRow = false;
74
- }
75
- if (selection[s].column[0] !== str_c || selection[s].column[1] !== end_c) {
76
- isSameCol = false;
77
- }
78
- }
79
- if (!isSameRow && !isSameCol || (0, _selection.selectIsOverlap)(ctx)) {
80
- return;
81
- }
82
- }
83
- (0, _selection.copy)(ctx);
84
- ctx.luckysheet_paste_iscut = false;
85
- }