dtable-ui-component 6.0.29-beta9 → 6.0.30

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 +365 -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
@@ -0,0 +1,76 @@
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 _classnames = _interopRequireDefault(require("classnames"));
10
+ var React = _interopRequireWildcard(require("react"));
11
+ require("./index.css");
12
+ /* tslint:disable:jsx-no-multiline-js */
13
+
14
+ class ActivityIndicator extends React.Component {
15
+ render() {
16
+ const {
17
+ prefixCls,
18
+ className,
19
+ animating,
20
+ toast,
21
+ size,
22
+ text
23
+ } = this.props;
24
+ const wrapClass = (0, _classnames.default)(prefixCls, className, {
25
+ ["".concat(prefixCls, "-lg")]: size === 'large',
26
+ ["".concat(prefixCls, "-sm")]: size === 'small',
27
+ ["".concat(prefixCls, "-toast")]: !!toast
28
+ });
29
+ const spinnerClass = (0, _classnames.default)("".concat(prefixCls, "-spinner"), {
30
+ ["".concat(prefixCls, "-spinner-lg")]: !!toast || size === 'large'
31
+ });
32
+ if (animating) {
33
+ if (toast) {
34
+ return /*#__PURE__*/React.createElement("div", {
35
+ className: wrapClass
36
+ }, text ? /*#__PURE__*/React.createElement("div", {
37
+ className: "".concat(prefixCls, "-content")
38
+ }, /*#__PURE__*/React.createElement("span", {
39
+ className: spinnerClass,
40
+ "aria-hidden": "true"
41
+ }), /*#__PURE__*/React.createElement("span", {
42
+ className: "".concat(prefixCls, "-toast")
43
+ }, text)) : /*#__PURE__*/React.createElement("div", {
44
+ className: "".concat(prefixCls, "-content")
45
+ }, /*#__PURE__*/React.createElement("span", {
46
+ className: spinnerClass,
47
+ "aria-label": "Loading"
48
+ })));
49
+ } else {
50
+ return text ? /*#__PURE__*/React.createElement("div", {
51
+ className: wrapClass
52
+ }, /*#__PURE__*/React.createElement("span", {
53
+ className: spinnerClass,
54
+ "aria-hidden": "true"
55
+ }), /*#__PURE__*/React.createElement("span", {
56
+ className: "".concat(prefixCls, "-tip")
57
+ }, text)) : /*#__PURE__*/React.createElement("div", {
58
+ className: wrapClass
59
+ }, /*#__PURE__*/React.createElement("span", {
60
+ className: spinnerClass,
61
+ "aria-label": "loading"
62
+ }));
63
+ }
64
+ } else {
65
+ return null;
66
+ }
67
+ }
68
+ }
69
+ exports.default = ActivityIndicator;
70
+ ActivityIndicator.defaultProps = {
71
+ prefixCls: 'am-activity-indicator',
72
+ animating: true,
73
+ size: 'small',
74
+ panelColor: 'rgba(34,34,34,0.6)',
75
+ toast: false
76
+ };
@@ -0,0 +1,98 @@
1
+ @import url('../css/am.css');
2
+
3
+ .am-badge {
4
+ position: relative;
5
+ display: inline-block;
6
+ line-height: 1;
7
+ vertical-align: middle;
8
+ }
9
+
10
+ .am-badge-text {
11
+ text-rendering: optimizeLegibility;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ position: absolute;
15
+ top: -6px;
16
+ height: 18px;
17
+ line-height: 18px;
18
+ min-width: 9px;
19
+ border-radius: 12px;
20
+ padding: 0 5px;
21
+ text-align: center;
22
+ font-size: 12px;
23
+ color: #fff;
24
+ background-color: #ff5b05;
25
+ white-space: nowrap;
26
+ -webkit-transform: translateX(-45%);
27
+ -ms-transform: translateX(-45%);
28
+ transform: translateX(-45%);
29
+ -webkit-transform-origin: -10% center;
30
+ -ms-transform-origin: -10% center;
31
+ transform-origin: -10% center;
32
+ z-index: 10;
33
+ font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", SimSun, sans-serif;
34
+ }
35
+
36
+ .am-badge-text a {
37
+ color: #fff;
38
+ }
39
+
40
+ .am-badge-text p {
41
+ margin: 0;
42
+ padding: 0;
43
+ }
44
+
45
+ .am-badge-hot .am-badge-text {
46
+ background-color: #f96268;
47
+ }
48
+
49
+ .am-badge-dot {
50
+ position: absolute;
51
+ -webkit-transform: translateX(-50%);
52
+ -ms-transform: translateX(-50%);
53
+ transform: translateX(-50%);
54
+ -webkit-transform-origin: 0 center;
55
+ -ms-transform-origin: 0 center;
56
+ transform-origin: 0 center;
57
+ top: -4px;
58
+ height: 8px;
59
+ width: 8px;
60
+ border-radius: 100%;
61
+ background: #ff5b05;
62
+ z-index: 10;
63
+ }
64
+
65
+ .am-badge-dot-large {
66
+ height: 16px;
67
+ width: 16px;
68
+ }
69
+
70
+ .am-badge-not-a-wrapper .am-badge-text,
71
+ .am-badge-not-a-wrapper .am-badge-dot {
72
+ top: auto;
73
+ display: block;
74
+ position: relative;
75
+ -webkit-transform: translateX(0);
76
+ -ms-transform: translateX(0);
77
+ transform: translateX(0);
78
+ }
79
+
80
+ .am-badge-corner {
81
+ width: 80px;
82
+ padding: 8px;
83
+ position: absolute;
84
+ right: -32px;
85
+ top: 8px;
86
+ background-color: #ff5b05;
87
+ color: #fff;
88
+ white-space: nowrap;
89
+ -webkit-transform: rotate(45deg);
90
+ -ms-transform: rotate(45deg);
91
+ transform: rotate(45deg);
92
+ text-align: center;
93
+ font-size: 15px;
94
+ }
95
+
96
+ .am-badge-corner-wrapper {
97
+ overflow: hidden;
98
+ }
@@ -0,0 +1,65 @@
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 _classnames = _interopRequireDefault(require("classnames"));
10
+ var React = _interopRequireWildcard(require("react"));
11
+ require("./index.css");
12
+ class Badge extends React.Component {
13
+ render() {
14
+ // tslint:disable:prefer-const
15
+ let {
16
+ className,
17
+ prefixCls,
18
+ children,
19
+ text,
20
+ size,
21
+ overflowCount,
22
+ dot,
23
+ corner,
24
+ hot,
25
+ ...restProps
26
+ } = this.props;
27
+ // eslint-disable-next-line no-self-assign
28
+ overflowCount = overflowCount;
29
+ text = typeof text === 'number' && text > overflowCount ? "".concat(overflowCount, "+") : text;
30
+
31
+ // dot mode don't need text
32
+ if (dot) {
33
+ text = '';
34
+ }
35
+ const scrollNumberCls = (0, _classnames.default)({
36
+ ["".concat(prefixCls, "-dot")]: dot,
37
+ ["".concat(prefixCls, "-dot-large")]: dot && size === 'large',
38
+ ["".concat(prefixCls, "-text")]: !dot && !corner,
39
+ ["".concat(prefixCls, "-corner")]: corner,
40
+ ["".concat(prefixCls, "-corner-large")]: corner && size === 'large'
41
+ });
42
+ const badgeCls = (0, _classnames.default)(prefixCls, className, {
43
+ ["".concat(prefixCls, "-not-a-wrapper")]: !children,
44
+ ["".concat(prefixCls, "-corner-wrapper")]: corner,
45
+ ["".concat(prefixCls, "-hot")]: !!hot,
46
+ ["".concat(prefixCls, "-corner-wrapper-large")]: corner && size === 'large'
47
+ });
48
+ return /*#__PURE__*/React.createElement("span", {
49
+ className: badgeCls
50
+ }, children, (text || dot) &&
51
+ /*#__PURE__*/
52
+ // tslint:disable-next-line:jsx-no-multiline-js
53
+ React.createElement("sup", Object.assign({
54
+ className: scrollNumberCls
55
+ }, restProps), text));
56
+ }
57
+ }
58
+ exports.default = Badge;
59
+ Badge.defaultProps = {
60
+ prefixCls: 'am-badge',
61
+ size: 'small',
62
+ overflowCount: 99,
63
+ dot: false,
64
+ corner: false
65
+ };
@@ -7,29 +7,121 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
- var _reactResponsive = _interopRequireDefault(require("react-responsive"));
11
- var _pcEditor = _interopRequireDefault(require("./pc-editor"));
12
- var _mbEditor = _interopRequireDefault(require("./mb-editor"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
12
+ var _utils = require("../utils/utils");
13
+ var _constants = require("../constants");
13
14
  require("./index.css");
14
- const CheckboxEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
15
- let {
16
- isMobile,
17
- ...props
18
- } = _ref;
19
- if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
20
- ref: ref
21
- }));
22
- if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
23
- ref: ref
24
- }));
25
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
26
- query: "(min-width: 768px)"
27
- }, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
28
- ref: ref
29
- }))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
30
- query: "(max-width: 768px)"
31
- }, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
32
- ref: ref
33
- }))));
34
- });
15
+ class CheckboxEditor extends _react.Component {
16
+ constructor(props) {
17
+ super(props);
18
+ this.onKeyDown = event => {
19
+ const {
20
+ isEditorShow,
21
+ readOnly
22
+ } = this.props;
23
+ if (event.keyCode === _constants.KeyCodes.Enter && isEditorShow && !readOnly) {
24
+ this.setState({
25
+ value: !this.state.value
26
+ });
27
+ }
28
+ };
29
+ this.getValue = () => {
30
+ const {
31
+ value
32
+ } = this.state;
33
+ return value;
34
+ };
35
+ this.updateValue = value => {
36
+ if (value === this.state.value) {
37
+ return;
38
+ }
39
+ this.setState({
40
+ value
41
+ });
42
+ };
43
+ this.onChangeCheckboxValue = event => {
44
+ if (event) {
45
+ event.stopPropagation();
46
+ event.nativeEvent.stopImmediatePropagation();
47
+ event.persist();
48
+ }
49
+ const {
50
+ value
51
+ } = this.state;
52
+ const newValue = !value;
53
+ this.setState({
54
+ value: newValue
55
+ }, () => {
56
+ if (this.props.onCommit) {
57
+ this.props.onCommit(event);
58
+ }
59
+ });
60
+ };
61
+ this.renderIcon = (symbol, color) => {
62
+ const className = (0, _classnames.default)('dtable-ui-checkbox-check-mark', {
63
+ 'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon'))
64
+ });
65
+ if (symbol.startsWith('dtable-icon')) {
66
+ return /*#__PURE__*/_react.default.createElement("span", {
67
+ className: "dtable-font ".concat(symbol, " ").concat(className || ''),
68
+ style: {
69
+ color
70
+ }
71
+ });
72
+ }
73
+ return /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
74
+ className: className,
75
+ symbol: symbol,
76
+ color: color
77
+ });
78
+ };
79
+ this.state = {
80
+ value: props.value || false
81
+ };
82
+ }
83
+ componentDidMount() {
84
+ document.addEventListener('keydown', this.onKeyDown);
85
+ }
86
+ componentWillUnmount() {
87
+ document.removeEventListener('keydown', this.onKeyDown);
88
+ }
89
+ componentDidUpdate(prevProps) {
90
+ const {
91
+ value
92
+ } = this.props;
93
+ if (value !== prevProps.value) {
94
+ this.setState({
95
+ value
96
+ });
97
+ }
98
+ }
99
+ render() {
100
+ var _column$data;
101
+ const {
102
+ className,
103
+ style,
104
+ column
105
+ } = this.props;
106
+ const {
107
+ value
108
+ } = this.state;
109
+ const checkboxProps = {
110
+ ...(!_utils.isMobile && {
111
+ onClick: this.onChangeCheckboxValue
112
+ }),
113
+ ...(_utils.isMobile && {
114
+ onTouchStart: this.onChangeCheckboxValue
115
+ })
116
+ };
117
+ let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
118
+ if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
119
+ checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
120
+ }
121
+ return /*#__PURE__*/_react.default.createElement("div", Object.assign({
122
+ className: (0, _classnames.default)('dtable-ui-checkbox-editor', className),
123
+ style: style || {}
124
+ }, checkboxProps), value && this.renderIcon(checkboxStyle.type, checkboxStyle.color));
125
+ }
126
+ }
35
127
  var _default = exports.default = CheckboxEditor;
@@ -1,41 +1,29 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
10
9
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
11
- var _pcEditor = _interopRequireDefault(require("./pc-editor"));
12
- var _mbEditor = _interopRequireDefault(require("./mb-editor"));
10
+ var _pcCollaboratorEditor = _interopRequireDefault(require("./pc-collaborator-editor"));
11
+ var _mbCollaboratorEditor = _interopRequireDefault(require("./mb-collaborator-editor"));
13
12
  require("./index.css");
14
- const CollaboratorEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
13
+ const CollaboratorEditor = _ref => {
15
14
  let {
16
- isMobile,
17
15
  value: oldValue,
18
16
  ...props
19
17
  } = _ref;
20
18
  const value = Array.isArray(oldValue) ? oldValue : [];
21
- if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
22
- value: value,
23
- ref: ref
24
- }));
25
- if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
26
- value: value,
27
- ref: ref
28
- }));
29
19
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
30
- query: "(min-width: 768px)"
31
- }, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
32
- value: value,
33
- ref: ref
20
+ query: '(min-width: 768px)'
21
+ }, /*#__PURE__*/_react.default.createElement(_pcCollaboratorEditor.default, Object.assign({}, props, {
22
+ value: value
34
23
  }))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
35
- query: "(max-width: 768px)"
36
- }, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
37
- value: value,
38
- ref: ref
24
+ query: '(max-width: 767.8px)'
25
+ }, /*#__PURE__*/_react.default.createElement(_mbCollaboratorEditor.default, Object.assign({}, props, {
26
+ value: value
39
27
  }))));
40
- });
28
+ };
41
29
  var _default = exports.default = CollaboratorEditor;
@@ -0,0 +1,85 @@
1
+ @import url('../../css/mb-cell-editor.css');
2
+
3
+ @media screen and (max-width: 767.8px) {
4
+ .dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items {
5
+ padding: 8px 16px;
6
+ margin-top: 20px;
7
+ border-top: 1px solid #e9e9e9;
8
+ border-bottom: 1px solid #e9e9e9;
9
+ background-color: #fff;
10
+ }
11
+
12
+ .dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items > input {
13
+ outline: none;
14
+ height: 30px;
15
+ padding: 0;
16
+ line-height: 30px;
17
+ border: none;
18
+ }
19
+
20
+ .dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items > input:focus,
21
+ .dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items > input:active {
22
+ outline: none;
23
+ box-shadow: none;
24
+ }
25
+
26
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborators-container {
27
+ flex: 1;
28
+ display: flex;
29
+ flex-direction: column;
30
+ margin-top: 10px;
31
+ min-height: 0;
32
+ }
33
+
34
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborators-container .title {
35
+ padding: 6px 16px;
36
+ border-bottom: 1px solid #e9e9e9;
37
+ }
38
+
39
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborators-container .content {
40
+ flex: 1;
41
+ overflow: auto;
42
+ display: flex;
43
+ flex-direction: column;
44
+ border-bottom: 1px solid #e9e9e9;
45
+ }
46
+
47
+ .dtable-ui-mb-collaborator-editor-body .search-result-none {
48
+ padding: 16px 0 16px 16px;
49
+ }
50
+
51
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item {
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: space-between;
55
+ height: 50px;
56
+ padding: 10px 10px 10px 16px;
57
+ font-size: 13px;
58
+ background-color: #fff;
59
+ }
60
+
61
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item {
62
+ border-bottom: 1px solid #e9e9e9;
63
+ }
64
+
65
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .mb-collaborator-info {
66
+ display: flex;
67
+ align-items: center;
68
+ }
69
+
70
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .collaborator-avatar img {
71
+ width: 24px;
72
+ height: 24px;
73
+ border-radius: 50%;
74
+ }
75
+
76
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .collaborator-name {
77
+ padding: 0 10px;
78
+ overflow: hidden;
79
+ }
80
+
81
+ .dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .dtable-font {
82
+ font-size: 12px;
83
+ color: #798d99;
84
+ }
85
+ }
@@ -0,0 +1,148 @@
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 _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
11
+ var _DTableSearchInput = _interopRequireDefault(require("../../DTableSearchInput"));
12
+ var _lang = require("../../lang");
13
+ require("./index.css");
14
+ class MBCollaboratorEditor extends _react.default.Component {
15
+ constructor(props) {
16
+ super(props);
17
+ this.handleHistoryBack = e => {
18
+ e.preventDefault();
19
+ this.props.onClosePopover();
20
+ };
21
+ this.onContainerClick = event => {
22
+ if (this.editorPopover && this.editorPopover.contains(event.target)) {
23
+ event.stopPropagation();
24
+ event.nativeEvent.stopImmediatePropagation();
25
+ return false;
26
+ }
27
+ };
28
+ this.onChangeSearch = newValue => {
29
+ let {
30
+ searchVal
31
+ } = this.state;
32
+ if (searchVal === newValue) return;
33
+ this.setState({
34
+ searchVal: newValue
35
+ });
36
+ };
37
+ this.getSelectedCollaborators = () => {
38
+ let {
39
+ value,
40
+ collaborators
41
+ } = this.props;
42
+ if (!Array.isArray(value)) {
43
+ return [];
44
+ }
45
+ return collaborators.filter(collaborator => {
46
+ return value.indexOf(collaborator.email) > -1;
47
+ });
48
+ };
49
+ this.getFilteredCollaborators = () => {
50
+ let {
51
+ collaborators
52
+ } = this.props;
53
+ let {
54
+ searchVal
55
+ } = this.state;
56
+ return searchVal ? (0, _dtableUtils.searchCollaborators)(collaborators, searchVal) : collaborators;
57
+ };
58
+ this.onCollaboratorClick = collaborator => {
59
+ this.props.onCommit(collaborator);
60
+ };
61
+ this.onRemoveCollaborator = collaborator => {
62
+ this.props.onCommit(collaborator);
63
+ };
64
+ this.renderFilteredCollaborators = collaborators => {
65
+ let {
66
+ value = []
67
+ } = this.props;
68
+ return collaborators.map((collaborator, index) => {
69
+ const isSelected = value.includes(collaborator.email);
70
+ return /*#__PURE__*/_react.default.createElement("div", {
71
+ className: "mb-collaborator-option-item",
72
+ key: index,
73
+ onMouseDown: this.onCollaboratorClick.bind(this, collaborator)
74
+ }, /*#__PURE__*/_react.default.createElement("span", {
75
+ className: "mb-collaborator-info"
76
+ }, /*#__PURE__*/_react.default.createElement("span", {
77
+ className: "collaborator-avatar"
78
+ }, /*#__PURE__*/_react.default.createElement("img", {
79
+ src: collaborator.avatar_url,
80
+ width: "24",
81
+ height: "24",
82
+ alt: "avatar"
83
+ })), /*#__PURE__*/_react.default.createElement("span", {
84
+ className: "collaborator-name"
85
+ }, collaborator.name)), isSelected && /*#__PURE__*/_react.default.createElement("i", {
86
+ className: "mb-collaborator-checked dtable-font dtable-icon-check-mark"
87
+ }));
88
+ });
89
+ };
90
+ this.setEditorPopover = editorPopover => {
91
+ this.editorPopover = editorPopover;
92
+ };
93
+ this.state = {
94
+ searchVal: ''
95
+ };
96
+ }
97
+ componentDidMount() {
98
+ history.pushState(null, null, '#'); // eslint-disable-line
99
+ window.addEventListener('popstate', this.handleHistoryBack, false);
100
+ }
101
+ componentWillUnmount() {
102
+ window.removeEventListener('popstate', this.handleHistoryBack, false);
103
+ }
104
+ render() {
105
+ const {
106
+ column
107
+ } = this.props;
108
+ const {
109
+ searchVal
110
+ } = this.state;
111
+ let filteredCollaborators = this.getFilteredCollaborators();
112
+ return /*#__PURE__*/_react.default.createElement("div", {
113
+ ref: this.setEditorPopover,
114
+ className: "dtable-ui-mb-editor-popover mb-collaborator-editor-popover",
115
+ onClick: this.onContainerClick
116
+ }, /*#__PURE__*/_react.default.createElement(_MBEditorHeader.default, {
117
+ title: column.name,
118
+ leftContent: /*#__PURE__*/_react.default.createElement("i", {
119
+ className: "dtable-font dtable-icon-return"
120
+ }),
121
+ rightContent: /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Done')),
122
+ onLeftClick: this.props.onClose,
123
+ onRightClick: this.props.onClose
124
+ }), /*#__PURE__*/_react.default.createElement("div", {
125
+ className: "dtable-ui-mb-editor-body dtable-ui-mb-collaborator-editor-body"
126
+ }, /*#__PURE__*/_react.default.createElement("div", {
127
+ className: "mb-search-collaborator-items"
128
+ }, /*#__PURE__*/_react.default.createElement(_DTableSearchInput.default, {
129
+ autoFocus: true,
130
+ value: searchVal,
131
+ placeholder: (0, _lang.getLocale)('Search_collaborator'),
132
+ onChange: this.onChangeSearch
133
+ })), /*#__PURE__*/_react.default.createElement("div", {
134
+ className: "mb-collaborators-container"
135
+ }, /*#__PURE__*/_react.default.createElement("div", {
136
+ className: "title"
137
+ }, (0, _lang.getLocale)('Choose_a_collaborator')), /*#__PURE__*/_react.default.createElement("div", {
138
+ className: "content"
139
+ }, filteredCollaborators.length === 0 && /*#__PURE__*/_react.default.createElement("div", {
140
+ className: "search-result-none"
141
+ }, (0, _lang.getLocale)('No_collaborators_available')), filteredCollaborators.length > 0 && this.renderFilteredCollaborators(filteredCollaborators)))));
142
+ }
143
+ }
144
+ MBCollaboratorEditor.defaultProps = {
145
+ isReadOnly: false,
146
+ value: []
147
+ };
148
+ var _default = exports.default = MBCollaboratorEditor;
@@ -19,7 +19,9 @@ function DTableCommonAddTool(_ref) {
19
19
  return /*#__PURE__*/_react.default.createElement("div", {
20
20
  className: "dtable-ui add-item-btn ".concat(className ? className : ''),
21
21
  style: style,
22
- onClick: e => callBack(e)
22
+ onClick: e => {
23
+ callBack(e);
24
+ }
23
25
  }, !hideIcon && /*#__PURE__*/_react.default.createElement("span", {
24
26
  className: "dtable-font dtable-icon-add-table ".concat(addIconClassName || '')
25
27
  }), /*#__PURE__*/_react.default.createElement("span", {