dtable-ui-component 6.0.29-beta9 → 6.0.29

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/lib/ActionSheet/index.js +196 -0
  2. package/lib/ActionSheet/style/index.css +377 -0
  3. package/lib/ActivityIndicator/index.css +110 -0
  4. package/lib/ActivityIndicator/index.js +76 -0
  5. package/lib/Badge/index.css +98 -0
  6. package/lib/Badge/index.js +65 -0
  7. package/lib/CheckboxEditor/index.js +116 -24
  8. package/lib/CollaboratorEditor/index.js +11 -23
  9. package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +85 -0
  10. package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +148 -0
  11. package/lib/DTableCommonAddTool/index.js +3 -1
  12. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +6 -6
  13. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -6
  14. package/lib/DateEditor/index.js +95 -69
  15. package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +118 -0
  16. package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
  17. package/lib/DateEditor/mb-date-editor-popover/index.js +226 -0
  18. package/lib/DateEditor/{pc-editor.js → pc-date-editor-popover.js} +9 -9
  19. package/lib/DatePicker/index.js +120 -0
  20. package/lib/DatePicker/locale/en_US.js +14 -0
  21. package/lib/DatePicker/locale/ru_RU.js +14 -0
  22. package/lib/DatePicker/locale/sv_SE.js +14 -0
  23. package/lib/DatePicker/locale/zh_CN.js +14 -0
  24. package/lib/DatePicker/style/index.css +298 -0
  25. package/lib/DatePicker/utils.js +36 -0
  26. package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.js +6 -6
  27. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/department-single-select.js +7 -7
  28. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.css +3 -10
  29. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.js +25 -8
  30. package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.css +1 -0
  31. package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.js +3 -3
  32. package/lib/DigitalSignEditor/index.js +171 -24
  33. package/lib/Drawer/index.css +144 -0
  34. package/lib/Drawer/index.js +21 -0
  35. package/lib/FileEditor/addition-previewer/index.css +1 -0
  36. package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
  37. package/lib/FileEditor/addition-previewer/local-file-addition/index.css +1 -0
  38. package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/local-file-addition/index.js +4 -4
  39. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/dropdown-menu.js +1 -1
  40. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.js +1 -1
  41. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.css +2 -0
  42. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.js +2 -2
  43. package/lib/FileEditor/files-previewer/index.js +268 -26
  44. package/lib/FileEditor/index.css +5 -0
  45. package/lib/FileEditor/index.js +265 -26
  46. package/lib/FormulaFormatter/index.css +5 -5
  47. package/lib/GeolocationEditor/{pc-editor/country-editor.js → country-editor.js} +49 -5
  48. package/lib/GeolocationEditor/{pc-editor/index.css → index.css} +4 -3
  49. package/lib/GeolocationEditor/index.js +230 -90
  50. package/lib/GeolocationEditor/{pc-editor/location-editor.js → location-editor.js} +41 -8
  51. package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/index.js +6 -6
  52. package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.js +7 -7
  53. package/lib/GeolocationEditor/map-editor-utils.js +4 -10
  54. package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/index.js +7 -7
  55. package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.js +7 -7
  56. package/lib/GeolocationEditor/{pc-editor/province-city-editor.js → province-city-editor.js} +38 -7
  57. package/lib/GeolocationEditor/{pc-editor/province-editor.js → province-editor.js} +31 -7
  58. package/lib/GeolocationEditor/{pc-editor/selector-header-item.js → selector-header-item.js} +1 -1
  59. package/lib/Icon/index.css +50 -0
  60. package/lib/Icon/index.js +35 -0
  61. package/lib/Icon/load-sprite.js +56 -0
  62. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.js +1 -1
  63. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
  64. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.js +4 -4
  65. package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
  66. package/lib/ImageEditor/images-previewer/index.js +4 -9
  67. package/lib/ImageEditor/index.css +16 -17
  68. package/lib/ImageEditor/index.js +185 -26
  69. package/lib/ImageThumbnail/index.js +1 -2
  70. package/lib/InputItem/custom-input.js +321 -0
  71. package/lib/InputItem/custom-keyboard.js +162 -0
  72. package/lib/InputItem/index.js +389 -0
  73. package/lib/InputItem/input.js +45 -0
  74. package/lib/InputItem/locale/en_US.js +12 -0
  75. package/lib/InputItem/locale/ru_RU.js +12 -0
  76. package/lib/InputItem/locale/sv_SE.js +12 -0
  77. package/lib/InputItem/locale/zh_CN.js +12 -0
  78. package/lib/InputItem/portal.js +23 -0
  79. package/lib/InputItem/style/index.css +524 -0
  80. package/lib/LinkEditor/index.js +5 -5
  81. package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.css +1 -1
  82. package/lib/List/index.css +389 -0
  83. package/lib/List/index.js +41 -0
  84. package/lib/List/list-item.js +169 -0
  85. package/lib/Modal/alert.js +86 -0
  86. package/lib/Modal/index.js +16 -0
  87. package/lib/Modal/modal.js +118 -0
  88. package/lib/Modal/operation.js +81 -0
  89. package/lib/Modal/prompt.js +211 -0
  90. package/lib/Modal/style/index.css +593 -0
  91. package/lib/MultipleSelectEditor/index.js +14 -9
  92. package/lib/Picker/AbstractPicker.js +190 -0
  93. package/lib/Picker/index.js +28 -0
  94. package/lib/Picker/locale/en_US.js +12 -0
  95. package/lib/Picker/locale/ru_RU.js +12 -0
  96. package/lib/Picker/locale/sv_SE.js +12 -0
  97. package/lib/Picker/locale/zh_CN.js +12 -0
  98. package/lib/Picker/popupProps.js +12 -0
  99. package/lib/Picker/style/index.css +145 -0
  100. package/lib/Popover/index.js +63 -0
  101. package/lib/Popover/item.js +55 -0
  102. package/lib/Popover/style/index.css +233 -0
  103. package/lib/Progress/index.css +24 -0
  104. package/lib/Progress/index.js +66 -0
  105. package/lib/Radio/Radio.js +47 -0
  106. package/lib/Radio/RadioItem.js +57 -0
  107. package/lib/Radio/index.css +92 -0
  108. package/lib/Radio/index.js +12 -0
  109. package/lib/RowExpandDialog/column-content/index.js +2 -2
  110. package/lib/RowExpandDialog/index.js +0 -2
  111. package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.js +4 -6
  112. package/lib/RowExpandEditor/{checkbox-editor/pc-editor.js → RowExpandCheckboxEditor/index.js} +13 -9
  113. package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.css +1 -1
  114. package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.js +7 -6
  115. package/lib/RowExpandEditor/{date-editor/pc-editor.js → RowExpandDateEditor/index.js} +2 -2
  116. package/lib/RowExpandEditor/{department-editor/pc-editor.js → RowExpandDepartmentEditor/index.js} +49 -44
  117. package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.css +1 -1
  118. package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.js +11 -11
  119. package/lib/RowExpandEditor/{duration-editor/pc-editor.js → RowExpandDurationEditor/index.js} +2 -2
  120. package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +2 -0
  121. package/lib/RowExpandEditor/{email-editor/pc-editor → RowExpandEmailEditor}/index.js +3 -3
  122. package/lib/RowExpandEditor/RowExpandFileEditor/index.css +1 -0
  123. package/lib/RowExpandEditor/{file-editor/pc-editor → RowExpandFileEditor}/index.js +9 -9
  124. package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.js +13 -17
  125. package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.js +9 -9
  126. package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.js +7 -7
  127. package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.css +1 -1
  128. package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.js +6 -6
  129. package/lib/RowExpandEditor/{number-editor/pc-editor.js → RowExpandNumberEditor/index.js} +2 -2
  130. package/lib/RowExpandEditor/RowExpandRateEditor/index.css +13 -0
  131. package/lib/RowExpandEditor/{rate-editor/pc-editor.js → RowExpandRateEditor/index.js} +3 -2
  132. package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.js +17 -17
  133. package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.js +7 -7
  134. package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.js +6 -6
  135. package/lib/RowExpandEditor/constants.js +34 -34
  136. package/lib/RowExpandFormatter/{department-formatter/pc-formatter.js → RowExpandDepartmentFormatter/index.js} +2 -2
  137. package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.css +4 -4
  138. package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +5 -0
  139. package/lib/RowExpandFormatter/constants.js +17 -17
  140. package/lib/RowExpandFormatter/index.css +18 -33
  141. package/lib/RowExpandFormatter/index.js +1 -1
  142. package/lib/SelectItem/index.js +33 -57
  143. package/lib/SingleSelectEditor/index.js +14 -9
  144. package/lib/SvgIcon/index.js +1 -2
  145. package/lib/TabBar/Tab.js +76 -0
  146. package/lib/TabBar/index.css +142 -0
  147. package/lib/TabBar/index.js +129 -0
  148. package/lib/Tabs/index.css +453 -0
  149. package/lib/Tabs/index.js +39 -0
  150. package/lib/TextareaItem/index.css +235 -0
  151. package/lib/TextareaItem/index.js +231 -0
  152. package/lib/Toast/index.css +67 -0
  153. package/lib/Toast/index.js +131 -0
  154. package/lib/_util/class.js +34 -0
  155. package/lib/_util/closest.js +17 -0
  156. package/lib/_util/exenv.js +8 -0
  157. package/lib/_util/getDataAttr.js +15 -0
  158. package/lib/_util/getLocale.js +42 -0
  159. package/lib/constants/index.js +2 -3
  160. package/lib/css/am.css +390 -0
  161. package/lib/css/mb-cell-editor.css +1 -1
  162. package/lib/index.js +100 -51
  163. package/lib/locales/de.json +1 -3
  164. package/lib/locales/en.json +1 -3
  165. package/lib/locales/es.json +1 -3
  166. package/lib/locales/fr.json +1 -3
  167. package/lib/locales/pt.json +1 -3
  168. package/lib/locales/ru.json +1 -3
  169. package/lib/locales/zh-CN.json +1 -3
  170. package/lib/select-editor/index.js +20 -27
  171. package/lib/select-editor/mb-select-editor/index.css +127 -0
  172. package/lib/select-editor/mb-select-editor/index.js +197 -0
  173. package/lib/select-editor/{pc-editor → pc-select-editor}/index.css +1 -1
  174. package/lib/select-editor/{pc-editor → pc-select-editor}/index.js +7 -7
  175. package/lib/select-editor/select-editor-option.js +84 -0
  176. package/lib/utils/editor-utils.js +2 -6
  177. package/lib/utils/get-event-transfer.js +1 -2
  178. package/lib/utils/utils.js +2 -11
  179. package/package.json +25 -16
  180. package/lib/BodyPortal/index.js +0 -29
  181. package/lib/CheckboxEditor/mb-editor.js +0 -99
  182. package/lib/CheckboxEditor/pc-editor.js +0 -118
  183. package/lib/CollaboratorEditor/mb-editor/index.css +0 -41
  184. package/lib/CollaboratorEditor/mb-editor/index.js +0 -88
  185. package/lib/DateEditor/mb-editor/custom-rc-calendar.css +0 -118
  186. package/lib/DateEditor/mb-editor/index.css +0 -39
  187. package/lib/DateEditor/mb-editor/index.js +0 -215
  188. package/lib/DepartmentSingleSelectEditor/index.js +0 -34
  189. package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +0 -4
  190. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +0 -230
  191. package/lib/DigitalSignEditor/mb-editor/index.css +0 -35
  192. package/lib/DigitalSignEditor/mb-editor/index.js +0 -144
  193. package/lib/DigitalSignEditor/pc-editor/index.js +0 -181
  194. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +0 -122
  195. package/lib/FileEditor/files-previewer/mb-previewer/index.css +0 -39
  196. package/lib/FileEditor/files-previewer/mb-previewer/index.js +0 -64
  197. package/lib/FileEditor/files-previewer/pc-previewer/index.js +0 -276
  198. package/lib/FileEditor/mb-editor/index.css +0 -10
  199. package/lib/FileEditor/mb-editor/index.js +0 -136
  200. package/lib/FileEditor/pc-editor/addition-previewer/index.css +0 -1
  201. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +0 -1
  202. package/lib/FileEditor/pc-editor/index.css +0 -5
  203. package/lib/FileEditor/pc-editor/index.js +0 -274
  204. package/lib/GeolocationEditor/mb-editor/country-editor.js +0 -79
  205. package/lib/GeolocationEditor/mb-editor/index.css +0 -11
  206. package/lib/GeolocationEditor/mb-editor/index.js +0 -125
  207. package/lib/GeolocationEditor/mb-editor/location-editor.js +0 -101
  208. package/lib/GeolocationEditor/mb-editor/map-editor/index.css +0 -11
  209. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +0 -474
  210. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +0 -158
  211. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +0 -530
  212. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +0 -77
  213. package/lib/GeolocationEditor/mb-editor/province-editor.js +0 -76
  214. package/lib/GeolocationEditor/pc-editor/index.js +0 -247
  215. package/lib/ImageEditor/mb-editor/index.css +0 -29
  216. package/lib/ImageEditor/mb-editor/index.js +0 -136
  217. package/lib/ImageEditor/pc-editor/images-previewer/index.js +0 -140
  218. package/lib/ImageEditor/pc-editor/index.css +0 -24
  219. package/lib/ImageEditor/pc-editor/index.js +0 -194
  220. package/lib/MobileFullScreenPage/body/index.css +0 -9
  221. package/lib/MobileFullScreenPage/body/index.js +0 -23
  222. package/lib/MobileFullScreenPage/header/index.css +0 -39
  223. package/lib/MobileFullScreenPage/header/index.js +0 -38
  224. package/lib/MobileFullScreenPage/index.css +0 -13
  225. package/lib/MobileFullScreenPage/index.js +0 -73
  226. package/lib/MobileModal/index.js +0 -41
  227. package/lib/MobileOperationSheet/index.css +0 -27
  228. package/lib/MobileOperationSheet/index.js +0 -92
  229. package/lib/MobileSelector/empty/index.css +0 -3
  230. package/lib/MobileSelector/empty/index.js +0 -23
  231. package/lib/MobileSelector/index.css +0 -32
  232. package/lib/MobileSelector/index.js +0 -57
  233. package/lib/MobileSelector/option/index.css +0 -28
  234. package/lib/MobileSelector/option/index.js +0 -36
  235. package/lib/MobileSelector/options/index.css +0 -8
  236. package/lib/MobileSelector/options/index.js +0 -18
  237. package/lib/MobileSelector/search/index.css +0 -7
  238. package/lib/MobileSelector/search/index.js +0 -26
  239. package/lib/MobileUpload/index.css +0 -1
  240. package/lib/MobileUpload/index.js +0 -160
  241. package/lib/RowExpand/index.js +0 -24
  242. package/lib/RowExpandEditor/add-btn/index.js +0 -24
  243. package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +0 -3
  244. package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +0 -19
  245. package/lib/RowExpandEditor/checkbox-editor/index.js +0 -25
  246. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +0 -6
  247. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +0 -36
  248. package/lib/RowExpandEditor/collaborator-editor/index.js +0 -24
  249. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +0 -9
  250. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +0 -163
  251. package/lib/RowExpandEditor/date-editor/index.js +0 -24
  252. package/lib/RowExpandEditor/date-editor/mb-editor.js +0 -82
  253. package/lib/RowExpandEditor/department-editor/index.js +0 -24
  254. package/lib/RowExpandEditor/department-editor/mb-editor.js +0 -65
  255. package/lib/RowExpandEditor/digital-sign-editor/index.js +0 -24
  256. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +0 -1
  257. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +0 -130
  258. package/lib/RowExpandEditor/duration-editor/index.js +0 -24
  259. package/lib/RowExpandEditor/duration-editor/mb-editor.js +0 -71
  260. package/lib/RowExpandEditor/email-editor/index.js +0 -24
  261. package/lib/RowExpandEditor/email-editor/mb-editor/index.css +0 -1
  262. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +0 -84
  263. package/lib/RowExpandEditor/email-editor/pc-editor/index.css +0 -1
  264. package/lib/RowExpandEditor/file-editor/index.js +0 -24
  265. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +0 -114
  266. package/lib/RowExpandEditor/file-editor/pc-editor/index.css +0 -1
  267. package/lib/RowExpandEditor/geolocation-editor/index.js +0 -24
  268. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +0 -100
  269. package/lib/RowExpandEditor/image-editor/index.js +0 -24
  270. package/lib/RowExpandEditor/image-editor/mb-editor/index.css +0 -30
  271. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +0 -109
  272. package/lib/RowExpandEditor/long-text-editor/index.js +0 -24
  273. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +0 -10
  274. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +0 -80
  275. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +0 -3
  276. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +0 -91
  277. package/lib/RowExpandEditor/multiple-select-editor/index.js +0 -24
  278. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +0 -154
  279. package/lib/RowExpandEditor/number-editor/index.js +0 -24
  280. package/lib/RowExpandEditor/number-editor/mb-editor/index.css +0 -3
  281. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +0 -76
  282. package/lib/RowExpandEditor/rate-editor/index.css +0 -34
  283. package/lib/RowExpandEditor/rate-editor/index.js +0 -25
  284. package/lib/RowExpandEditor/rate-editor/mb-editor.js +0 -92
  285. package/lib/RowExpandEditor/right-angle/index.css +0 -6
  286. package/lib/RowExpandEditor/right-angle/index.js +0 -17
  287. package/lib/RowExpandEditor/single-select-editor/index.js +0 -24
  288. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +0 -8
  289. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +0 -134
  290. package/lib/RowExpandEditor/text-editor/index.js +0 -24
  291. package/lib/RowExpandEditor/text-editor/mb-editor/index.css +0 -14
  292. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +0 -37
  293. package/lib/RowExpandEditor/url-editor/index.js +0 -24
  294. package/lib/RowExpandEditor/url-editor/mb-editor/index.css +0 -17
  295. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +0 -87
  296. package/lib/RowExpandFormatter/department-formatter/index.js +0 -19
  297. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +0 -20
  298. package/lib/RowExpandFormatter/rate-formatter/index.css +0 -5
  299. package/lib/RowExpandView/body/index.css +0 -173
  300. package/lib/RowExpandView/body/index.js +0 -111
  301. package/lib/RowExpandView/column-content/index.css +0 -27
  302. package/lib/RowExpandView/column-content/index.js +0 -25
  303. package/lib/RowExpandView/index.css +0 -3
  304. package/lib/RowExpandView/index.js +0 -178
  305. package/lib/select-editor/mb-editor/index.css +0 -1
  306. package/lib/select-editor/mb-editor/index.js +0 -105
  307. /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.css +0 -0
  308. /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.js +0 -0
  309. /package/lib/{constants/departments.js → Department-editor/constants.js} +0 -0
  310. /package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.css +0 -0
  311. /package/lib/{utils/departments.js → Department-editor/utils.js} +0 -0
  312. /package/lib/DigitalSignEditor/{pc-editor/index.css → index.css} +0 -0
  313. /package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.css +0 -0
  314. /package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.css +0 -0
  315. /package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.css +0 -0
  316. /package/lib/GeolocationEditor/{pc-editor/parse-geolocation.js → parse-geolocation.js} +0 -0
  317. /package/lib/GeolocationEditor/{pc-editor/selector-list.js → selector-list.js} +0 -0
  318. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.css +0 -0
  319. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.css +0 -0
  320. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.css +0 -0
  321. /package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.js +0 -0
  322. /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.css +0 -0
  323. /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.js +0 -0
  324. /package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.css +0 -0
  325. /package/lib/RowExpandEditor/{checkbox-editor → RowExpandCheckboxEditor}/index.css +0 -0
  326. /package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.css +0 -0
  327. /package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.css +0 -0
  328. /package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.css +0 -0
  329. /package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.css +0 -0
  330. /package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.css +0 -0
  331. /package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.css +0 -0
  332. /package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.js +0 -0
  333. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.css +0 -0
  334. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.js +0 -0
  335. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +0 -0
  336. /package/lib/RowExpandFormatter/{formula-formatter → RowExpandFormulaFormatter}/index.js +0 -0
  337. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.css +0 -0
  338. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.js +0 -0
  339. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +0 -0
  340. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +0 -0
  341. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.css +0 -0
  342. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.js +0 -0
  343. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
  344. /package/lib/RowExpandFormatter/{rate-formatter → RowExpandRateFormatter}/index.js +0 -0
  345. /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.css +0 -0
  346. /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.js +0 -0
@@ -1,247 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _dtableUtils = require("dtable-utils");
10
- var _constants = require("../../constants");
11
- var _objectUtils = _interopRequireDefault(require("../../utils/object-utils"));
12
- var _locationEditor = _interopRequireDefault(require("./location-editor"));
13
- var _mapEditor = _interopRequireDefault(require("./map-editor"));
14
- var _mapSelectionEditor = _interopRequireDefault(require("./map-selection-editor"));
15
- var _countryEditor = _interopRequireDefault(require("./country-editor"));
16
- var _provinceEditor = _interopRequireDefault(require("./province-editor"));
17
- var _provinceCityEditor = _interopRequireDefault(require("./province-city-editor"));
18
- require("./index.css");
19
- class PCGeolocationEditor extends _react.default.Component {
20
- constructor(_props) {
21
- super(_props);
22
- this.onHotKey = e => {
23
- if (e.keyCode === _constants.KeyCodes.Enter && e.target.tagName !== 'TEXTAREA') {
24
- this.onSubmit();
25
- } else if (e.keyCode === _constants.KeyCodes.Escape) {
26
- if (this.props.isInModal) {
27
- e.stopPropagation();
28
- this.onCancel();
29
- }
30
- }
31
- };
32
- this.getValue = () => {
33
- return this.value;
34
- };
35
- this.setValue = value => {
36
- this.value = value;
37
- };
38
- this.onSubmit = () => {
39
- if (_objectUtils.default.isSameObject(this.initValue, this.value)) {
40
- this.onCancel();
41
- return;
42
- }
43
- this.props.onCommit(this.value);
44
- };
45
- this.onCancel = () => {
46
- this.props.onToggle && this.props.onToggle();
47
- };
48
- this.setEditorPosition = () => {
49
- const {
50
- isInModal
51
- } = this.props;
52
- const editorFormat = this.getGeoFormat();
53
- if (this.ref && (editorFormat === _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION || editorFormat === _dtableUtils.GEOLOCATION_FORMAT.PROVINCE)) {
54
- let height = 240;
55
- let width = 200;
56
- let left = this.ref.parentNode.getBoundingClientRect().x;
57
- let top = this.ref.parentNode.getBoundingClientRect().y;
58
- if (isInModal) {
59
- left = 220;
60
- }
61
- if (top + height > window.innerHeight) {
62
- top = window.innerHeight - height - 35;
63
- }
64
- this.setState({
65
- editorPosition: {
66
- top,
67
- left,
68
- width,
69
- zIndex: 1000,
70
- position: 'fixed'
71
- }
72
- });
73
- return;
74
- }
75
- if (this.ref && editorFormat === _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY) {
76
- let height = 215;
77
- let width = 400;
78
- let left = this.ref.parentNode.getBoundingClientRect().x;
79
- let top = this.ref.parentNode.getBoundingClientRect().y;
80
- if (isInModal) {
81
- left = 220;
82
- if (top + height + 35 + 200 > window.innerHeight) {
83
- top = window.innerHeight - height - 235;
84
- }
85
- } else {
86
- if (top + height + 200 > window.innerHeight) {
87
- top = window.innerHeight - height - 200 - 5;
88
- }
89
- if (left + width > window.innerWidth) {
90
- left = window.innerWidth - width - 10;
91
- }
92
- }
93
- this.setState({
94
- editorPosition: {
95
- top,
96
- left,
97
- width,
98
- zIndex: 1000,
99
- position: 'fixed'
100
- }
101
- });
102
- return;
103
- }
104
- if (this.ref) {
105
- const isMapTypeEditor = editorFormat === _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT || editorFormat === _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION;
106
- let width = isMapTypeEditor ? 500 : 400;
107
- let height = isMapTypeEditor ? 454 : 310;
108
- let geoEditorTop = 0;
109
- let geoEditorLeft = 0;
110
- if (isInModal) {
111
- let innerHeight = window.innerHeight;
112
- const offsetTop = this.ref.parentNode.getBoundingClientRect().y;
113
- geoEditorTop = offsetTop;
114
- geoEditorTop = height + geoEditorTop > innerHeight ? innerHeight - height - 30 : geoEditorTop;
115
- geoEditorLeft = -30;
116
- } else {
117
- let {
118
- offsetLeft,
119
- offsetTop
120
- } = this.ref.parentNode;
121
- geoEditorLeft = offsetLeft - width;
122
- geoEditorTop = offsetTop;
123
- if (offsetLeft < width) {
124
- geoEditorLeft = offsetLeft + this.props.column.width;
125
- }
126
- if (geoEditorLeft + width > window.innerWidth) {
127
- geoEditorLeft = window.innerWidth - width;
128
- }
129
- if (offsetTop + height > window.innerHeight) {
130
- geoEditorTop = window.innerHeight - height;
131
- }
132
- }
133
- this.setState({
134
- editorPosition: {
135
- top: geoEditorTop,
136
- left: geoEditorLeft,
137
- zIndex: 1000,
138
- position: 'fixed'
139
- }
140
- });
141
- }
142
- };
143
- this.getGeoFormat = () => {
144
- const {
145
- column
146
- } = this.props;
147
- let data = column.data || {};
148
- return data.geo_format ? data.geo_format : _dtableUtils.DEFAULT_GEOLOCATION_FORMAT;
149
- };
150
- this.getLargeEditorState = () => {
151
- var _this$editor, _this$editor$state;
152
- return (_this$editor = this.editor) === null || _this$editor === void 0 ? void 0 : (_this$editor$state = _this$editor.state) === null || _this$editor$state === void 0 ? void 0 : _this$editor$state.isShowLargeEditor;
153
- };
154
- this.createEditor = () => {
155
- const geoFormat = this.getGeoFormat();
156
- const {
157
- config,
158
- column,
159
- getCountryData,
160
- getLocationData
161
- } = this.props;
162
- const props = {
163
- column,
164
- config,
165
- value: this.value,
166
- setValue: this.setValue,
167
- onSubmit: this.onSubmit,
168
- onCancel: this.onCancel
169
- };
170
- switch (geoFormat) {
171
- case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
172
- {
173
- return /*#__PURE__*/_react.default.createElement(_mapEditor.default, Object.assign({}, props, {
174
- ref: ref => this.editor = ref
175
- }));
176
- }
177
- case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
178
- {
179
- return /*#__PURE__*/_react.default.createElement(_mapSelectionEditor.default, Object.assign({}, props, {
180
- ref: ref => this.editor = ref
181
- }));
182
- }
183
- case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
184
- {
185
- return /*#__PURE__*/_react.default.createElement(_countryEditor.default, Object.assign({}, props, {
186
- getData: getCountryData,
187
- ref: ref => this.editor = ref
188
- }));
189
- }
190
- case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
191
- {
192
- return /*#__PURE__*/_react.default.createElement(_provinceEditor.default, Object.assign({}, props, {
193
- onPressTab: this.props.onPressTab,
194
- getData: getLocationData,
195
- ref: ref => this.editor = ref
196
- }));
197
- }
198
- case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
199
- {
200
- return /*#__PURE__*/_react.default.createElement(_provinceCityEditor.default, Object.assign({}, props, {
201
- getData: getLocationData,
202
- ref: ref => this.editor = ref
203
- }));
204
- }
205
- case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
206
- {
207
- return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
208
- getData: getLocationData,
209
- ref: ref => this.editor = ref
210
- }));
211
- }
212
- default:
213
- {
214
- return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
215
- isShowDetails: true,
216
- getData: getLocationData,
217
- ref: ref => this.editor = ref
218
- }));
219
- }
220
- }
221
- };
222
- this.value = _props.value || {};
223
- this.initValue = this.value;
224
- this.state = {
225
- editorPosition: null
226
- };
227
- this.editor = null;
228
- }
229
- componentDidMount() {
230
- this.setEditorPosition();
231
- document.addEventListener('keydown', this.onHotKey, true);
232
- }
233
- componentWillUnmount() {
234
- document.removeEventListener('keydown', this.onHotKey, true);
235
- }
236
- render() {
237
- const {
238
- editorPosition
239
- } = this.state;
240
- return /*#__PURE__*/_react.default.createElement("div", {
241
- ref: ref => this.ref = ref,
242
- style: editorPosition,
243
- className: "dtable-ui-dtable-ui-geolocation-editor"
244
- }, this.createEditor());
245
- }
246
- }
247
- var _default = exports.default = PCGeolocationEditor;
@@ -1,29 +0,0 @@
1
- .dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container {
2
- width: 100%;
3
- margin-top: 20px;
4
- }
5
-
6
- .dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .dtable-ui-image-previewer-wrapper {
7
- background-color: #fff;
8
- width: 100%;
9
- border-top: 1px solid rgb(233, 233, 233);
10
- border-bottom: 1px solid rgb(233, 233, 233);
11
- height: fit-content;
12
- }
13
-
14
- .dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .dtable-ui-image-previewer-box {
15
- margin-right: 0;
16
- }
17
-
18
- .dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .dtable-ui-image-previewer-box:nth-child(even) {
19
- margin-left: 15px;
20
- }
21
-
22
- .dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .add-item-btn {
23
- margin-top: 20px;
24
- border-bottom: 1px solid #dedede;
25
- }
26
-
27
- .dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .add-item-btn:hover {
28
- background-color: #fff;
29
- }
@@ -1,136 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _activityIndicator = _interopRequireDefault(require("antd-mobile/lib/activity-indicator"));
10
- var _react = _interopRequireWildcard(require("react"));
11
- var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
12
- var _imagesPreviewer = _interopRequireDefault(require("../images-previewer"));
13
- var _MobileUpload = _interopRequireDefault(require("../../MobileUpload"));
14
- var _toaster = _interopRequireDefault(require("../../toaster"));
15
- var _utils = require("../../utils/utils");
16
- var _lang = require("../../lang");
17
- require("./index.css");
18
- const {
19
- Header,
20
- Body
21
- } = _MobileFullScreenPage.default;
22
- const MBImageEditor = _ref => {
23
- let {
24
- value: oldValue,
25
- column,
26
- config,
27
- onToggle,
28
- onCommit,
29
- uploadFile
30
- } = _ref;
31
- const [value, setValue] = (0, _react.useState)(oldValue || []);
32
- const [isShowEditor, setShowEditor] = (0, _react.useState)(false);
33
- const [uploadLocalImages, setUploadLocalImages] = (0, _react.useState)([]);
34
- const [isUploading, setUploading] = (0, _react.useState)(false);
35
- const uploadingFilesCount = (0, _react.useRef)(0);
36
- const uploadedFilesCount = (0, _react.useRef)(0);
37
- const {
38
- mediaUrl
39
- } = config || {};
40
- const resetAdditionImage = (0, _react.useCallback)(() => {
41
- setUploadLocalImages([]);
42
- }, []);
43
- const openEditor = (0, _react.useCallback)(() => {
44
- setShowEditor(true);
45
- }, []);
46
- const closeEditor = (0, _react.useCallback)(() => {
47
- setShowEditor(false);
48
- }, []);
49
- const deleteImage = (0, _react.useCallback)(index => {
50
- const newValue = value.slice(0);
51
- newValue.splice(index, 1);
52
- setValue(newValue);
53
- onCommit(newValue);
54
- }, [value, onCommit]);
55
- const onChange = (0, _react.useCallback)(() => {
56
- const newValue = value.concat(uploadLocalImages);
57
- setValue(newValue);
58
- onCommit(newValue);
59
- setShowEditor(false);
60
- }, [value, uploadLocalImages, onCommit]);
61
- const uploadImage = (0, _react.useCallback)(file => {
62
- uploadFile(file).then(res => {
63
- const fileInfo = res;
64
- const newUploadLocalImages = uploadLocalImages.slice(0);
65
- newUploadLocalImages.push(fileInfo.url);
66
- setUploadLocalImages(newUploadLocalImages);
67
- uploadedFilesCount.current = uploadedFilesCount.current + 1;
68
- }).catch(error => {
69
- let errMsg = (0, _utils.getErrorMsg)(error, true);
70
- if (!error.response || error.response.status !== 403) {
71
- _toaster.default.danger((0, _lang.getLocale)(errMsg));
72
- }
73
- uploadedFilesCount.current = uploadedFilesCount.current + 1;
74
- });
75
- }, [uploadFile, uploadLocalImages]);
76
- const onFilesChange = (0, _react.useCallback)(function () {
77
- let files = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
78
- setUploading(true);
79
- uploadingFilesCount.current = files.length;
80
- uploadedFilesCount.current = 0;
81
- for (let i = 0; i < uploadingFilesCount.current; i++) {
82
- const file = files[i];
83
- const reader = new FileReader();
84
- reader.readAsDataURL(file);
85
- reader.addEventListener('load', () => {
86
- uploadImage(file);
87
- }, false);
88
- reader.addEventListener('error', () => {
89
- const message = (0, _lang.getLocale)('Image_loading_failed');
90
- _toaster.default.warning(message);
91
- uploadedFilesCount.current = uploadedFilesCount.current + 1;
92
- }, false);
93
- }
94
- }, [uploadImage]);
95
- (0, _react.useEffect)(() => {
96
- if (uploadingFilesCount.current === uploadedFilesCount.current && uploadedFilesCount.current !== 0) {
97
- uploadedFilesCount.current = 0;
98
- uploadingFilesCount.current = 0;
99
- onChange();
100
- setUploading(false);
101
- }
102
- }, [uploadingFilesCount, uploadedFilesCount, onChange]);
103
- return /*#__PURE__*/_react.default.createElement(_MobileFullScreenPage.default, {
104
- onClose: onToggle,
105
- className: "dtable-ui-mobile-image-editor"
106
- }, /*#__PURE__*/_react.default.createElement(Header, {
107
- onLeftClick: onToggle
108
- }, /*#__PURE__*/_react.default.createElement("i", {
109
- "aria-hidden": "true",
110
- className: "dtable-font dtable-icon-return"
111
- }), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, column.name)), /*#__PURE__*/_react.default.createElement(Body, null, (0, _utils.isIPhone)() && (0, _utils.isQQBuiltInBrowser)() ? /*#__PURE__*/_react.default.createElement("div", {
112
- className: "dtable-ui-file-open-external-browser"
113
- }, /*#__PURE__*/_react.default.createElement("div", {
114
- className: "seatable-tip-danger"
115
- }, '不支持 QQ 内置浏览器上传图片或者文件'), /*#__PURE__*/_react.default.createElement("div", {
116
- className: "image-container"
117
- }, /*#__PURE__*/_react.default.createElement("img", {
118
- src: mediaUrl + 'img/qq-upload-tip.png',
119
- alt: "Open browser tip"
120
- }))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_imagesPreviewer.default, {
121
- value: value,
122
- resetAdditionImage: resetAdditionImage,
123
- togglePreviewer: openEditor,
124
- closeEditor: closeEditor,
125
- deleteImage: deleteImage
126
- }), isShowEditor && /*#__PURE__*/_react.default.createElement(_MobileUpload.default, {
127
- type: "image",
128
- onClose: closeEditor,
129
- onChange: onFilesChange
130
- }), isUploading && /*#__PURE__*/_react.default.createElement(_activityIndicator.default, {
131
- toast: true,
132
- text: (0, _lang.getLocale)('Images_are_uploading'),
133
- animating: isUploading
134
- }))));
135
- };
136
- var _default = exports.default = MBImageEditor;
@@ -1,140 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _ImagePreviewerLightbox = _interopRequireDefault(require("../../ImagePreviewerLightbox"));
10
- var _imagePreview = _interopRequireDefault(require("./image-preview"));
11
- var _DTableCommonAddTool = _interopRequireDefault(require("../../DTableCommonAddTool"));
12
- var _utils = require("../../utils/utils");
13
- var _constants = require("../../constants");
14
- var _lang = require("../../lang");
15
- require("./index.css");
16
- class ImagesPreviewer extends _react.default.Component {
17
- constructor(props) {
18
- super(props);
19
- this.handleHistoryBack = e => {
20
- if (this.state.isShowLargeImage) {
21
- this.hideLargeImage();
22
- } else if (this.props.closeEditor) {
23
- this.props.closeEditor();
24
- }
25
- };
26
- this.showLargeImage = itemUrl => {
27
- let {
28
- value
29
- } = this.props;
30
- this.setState({
31
- isShowLargeImage: true,
32
- largeImageIndex: value.indexOf(itemUrl)
33
- });
34
- };
35
- this.hideLargeImage = () => {
36
- this.setState({
37
- isShowLargeImage: false,
38
- largeImageIndex: ''
39
- });
40
- };
41
- this.moveNext = () => {
42
- let images = this.props.value;
43
- this.setState(prevState => ({
44
- largeImageIndex: (prevState.largeImageIndex + 1) % images.length
45
- }));
46
- };
47
- this.movePrev = () => {
48
- let images = this.props.value;
49
- this.setState(prevState => ({
50
- largeImageIndex: (prevState.largeImageIndex + images.length - 1) % images.length
51
- }));
52
- };
53
- this.togglePreviewer = () => {
54
- this.props.togglePreviewer(_constants.FILE_EDITOR_STATUS.ADDITION);
55
- this.props.resetAdditionImage();
56
- };
57
- this.deleteImage = (index, type) => {
58
- this.props.deleteImage(index, type);
59
- const {
60
- value
61
- } = this.props;
62
- if (index > value.length - 2) {
63
- if (value.length - 2 < 0) {
64
- this.hideLargeImage();
65
- } else {
66
- this.setState({
67
- largeImageIndex: 0
68
- });
69
- }
70
- }
71
- };
72
- this.downloadImage = imageItemUrl => {
73
- let rotateIndex = imageItemUrl.indexOf('?a=');
74
- if (rotateIndex > -1) {
75
- imageItemUrl = imageItemUrl.slice(0, rotateIndex);
76
- }
77
- let imageUrlSuffix = imageItemUrl.indexOf('?dl=1');
78
- let downloadUrl = imageUrlSuffix !== -1 ? imageItemUrl : imageItemUrl + '?dl=1';
79
- (0, _utils.downloadFile)(downloadUrl);
80
- };
81
- this.setImageItemIndex = index => {
82
- this.setState({
83
- enterImageItemIndex: index
84
- });
85
- };
86
- this.state = {
87
- isShowLargeImage: false,
88
- largeImageIndex: '',
89
- enterImageItemIndex: -1
90
- };
91
- }
92
- componentDidMount() {
93
- if (_constants.isMobile) {
94
- window.history.pushState(null, null, '#');
95
- window.addEventListener('popstate', this.handleHistoryBack, false);
96
- }
97
- }
98
- componentWillUnmount() {
99
- if (_constants.isMobile) {
100
- window.removeEventListener('popstate', this.handleHistoryBack, false);
101
- }
102
- }
103
- render() {
104
- let {
105
- value
106
- } = this.props;
107
- return /*#__PURE__*/_react.default.createElement("div", {
108
- className: "dtable-ui-image-previewer-container"
109
- }, /*#__PURE__*/_react.default.createElement("div", {
110
- className: "dtable-ui-image-previewer-wrapper ".concat(value.length === 0 && _constants.isMobile ? 'd-none' : '')
111
- }, /*#__PURE__*/_react.default.createElement("div", {
112
- className: "dtable-ui-image-previewer-content"
113
- }, value.length > 0 && value.map((imageItemUrl, index) => {
114
- return /*#__PURE__*/_react.default.createElement(_imagePreview.default, {
115
- key: imageItemUrl + index,
116
- imageItemUrl: imageItemUrl,
117
- value: value,
118
- itemIndex: index,
119
- deleteImage: this.props.deleteImage,
120
- showLargeImage: this.showLargeImage,
121
- downloadImage: this.downloadImage,
122
- enterImageItemIndex: this.state.enterImageItemIndex,
123
- setImageItemIndex: this.setImageItemIndex
124
- });
125
- }))), this.state.isShowLargeImage && /*#__PURE__*/_react.default.createElement(_ImagePreviewerLightbox.default, {
126
- imageItems: value,
127
- imageIndex: this.state.largeImageIndex,
128
- closeImagePopup: this.hideLargeImage,
129
- moveToPrevImage: this.movePrev,
130
- moveToNextImage: this.moveNext,
131
- deleteImage: this.props.deleteImage ? this.deleteImage : null,
132
- downloadImage: this.downloadImage,
133
- onRotateImage: this.props.onRotateImage
134
- }), /*#__PURE__*/_react.default.createElement(_DTableCommonAddTool.default, {
135
- callBack: this.togglePreviewer,
136
- footerName: (0, _lang.getLocale)('Add_images')
137
- }));
138
- }
139
- }
140
- var _default = exports.default = ImagesPreviewer;
@@ -1,24 +0,0 @@
1
- .dtable-ui-image-editor-dialog {
2
- max-width: 620px;
3
- }
4
-
5
- .dtable-ui-image-editor-modal {
6
- width: 620px;
7
- max-height: 620px;
8
- overflow: hidden;
9
- }
10
-
11
- .dtable-ui-image-editor-container {
12
- width: 100%;
13
- background-color: #fff;
14
- }
15
-
16
- .dtable-ui-image-addition-container {
17
- display: flex;
18
- flex-direction: row;
19
- }
20
-
21
- .dtable-ui-image-editor-dialog .dtable-icon-return {
22
- color: #666666;
23
- font-size: 14px;
24
- }