dtable-ui-component 6.0.29-beta10 → 6.0.29-beta2

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 (282) hide show
  1. package/lib/CheckboxEditor/index.js +118 -24
  2. package/lib/CheckboxFormatter/index.css +1 -1
  3. package/lib/CheckboxFormatter/index.js +25 -10
  4. package/lib/CollaboratorEditor/index.js +11 -23
  5. package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +85 -0
  6. package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +148 -0
  7. package/lib/DTableCommonAddTool/index.js +3 -1
  8. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +6 -6
  9. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -6
  10. package/lib/DateEditor/index.js +95 -69
  11. package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +118 -0
  12. package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
  13. package/lib/DateEditor/mb-date-editor-popover/index.js +226 -0
  14. package/lib/DateEditor/{pc-editor.js → pc-date-editor-popover.js} +9 -9
  15. package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.js +6 -6
  16. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/department-single-select.js +7 -7
  17. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.css +3 -10
  18. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.js +25 -8
  19. package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.css +1 -0
  20. package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.js +3 -3
  21. package/lib/DigitalSignEditor/index.js +171 -24
  22. package/lib/FileEditor/addition-previewer/index.css +1 -0
  23. package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
  24. package/lib/FileEditor/addition-previewer/local-file-addition/index.css +1 -0
  25. package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/local-file-addition/index.js +4 -4
  26. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/dropdown-menu.js +1 -1
  27. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.js +1 -1
  28. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.css +2 -0
  29. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.js +2 -2
  30. package/lib/FileEditor/files-previewer/index.js +268 -26
  31. package/lib/FileEditor/index.css +5 -0
  32. package/lib/FileEditor/index.js +265 -26
  33. package/lib/FormulaFormatter/index.css +5 -5
  34. package/lib/GeolocationEditor/{pc-editor/country-editor.js → country-editor.js} +50 -5
  35. package/lib/GeolocationEditor/{pc-editor/index.css → index.css} +4 -3
  36. package/lib/GeolocationEditor/index.js +230 -90
  37. package/lib/GeolocationEditor/{pc-editor/location-editor.js → location-editor.js} +41 -8
  38. package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/index.js +6 -6
  39. package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.js +7 -7
  40. package/lib/GeolocationEditor/map-editor-utils.js +2 -6
  41. package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/index.js +7 -7
  42. package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.js +7 -7
  43. package/lib/GeolocationEditor/{pc-editor/province-city-editor.js → province-city-editor.js} +38 -7
  44. package/lib/GeolocationEditor/{pc-editor/province-editor.js → province-editor.js} +31 -7
  45. package/lib/GeolocationEditor/{pc-editor/selector-header-item.js → selector-header-item.js} +1 -1
  46. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.js +1 -1
  47. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
  48. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.js +4 -4
  49. package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
  50. package/lib/ImageEditor/images-previewer/index.js +4 -9
  51. package/lib/ImageEditor/index.css +16 -17
  52. package/lib/ImageEditor/index.js +185 -26
  53. package/lib/ImageThumbnail/index.js +1 -2
  54. package/lib/LinkEditor/index.js +5 -5
  55. package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.css +1 -1
  56. package/lib/MultipleSelectEditor/index.js +14 -9
  57. package/lib/RowExpandDialog/column-content/index.js +2 -2
  58. package/lib/RowExpandDialog/index.js +0 -2
  59. package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.js +4 -6
  60. package/lib/RowExpandEditor/{checkbox-editor/pc-editor.js → RowExpandCheckboxEditor/index.js} +13 -9
  61. package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.css +1 -1
  62. package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.js +7 -6
  63. package/lib/RowExpandEditor/{date-editor/pc-editor.js → RowExpandDateEditor/index.js} +2 -2
  64. package/lib/RowExpandEditor/{department-editor/pc-editor.js → RowExpandDepartmentEditor/index.js} +49 -44
  65. package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.css +1 -1
  66. package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.js +11 -11
  67. package/lib/RowExpandEditor/{duration-editor/pc-editor.js → RowExpandDurationEditor/index.js} +2 -2
  68. package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +2 -0
  69. package/lib/RowExpandEditor/{email-editor/pc-editor → RowExpandEmailEditor}/index.js +3 -3
  70. package/lib/RowExpandEditor/RowExpandFileEditor/index.css +1 -0
  71. package/lib/RowExpandEditor/{file-editor/pc-editor → RowExpandFileEditor}/index.js +9 -9
  72. package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.js +11 -10
  73. package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.js +9 -9
  74. package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.js +7 -7
  75. package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.css +1 -1
  76. package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.js +6 -6
  77. package/lib/RowExpandEditor/{number-editor/pc-editor.js → RowExpandNumberEditor/index.js} +2 -2
  78. package/lib/RowExpandEditor/RowExpandRateEditor/index.css +13 -0
  79. package/lib/RowExpandEditor/{rate-editor/pc-editor.js → RowExpandRateEditor/index.js} +3 -2
  80. package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.js +17 -17
  81. package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.js +7 -7
  82. package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.js +6 -6
  83. package/lib/RowExpandEditor/constants.js +34 -34
  84. package/lib/RowExpandFormatter/{department-formatter/pc-formatter.js → RowExpandDepartmentFormatter/index.js} +2 -2
  85. package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.css +4 -4
  86. package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +5 -0
  87. package/lib/RowExpandFormatter/constants.js +17 -17
  88. package/lib/RowExpandFormatter/index.css +18 -33
  89. package/lib/RowExpandFormatter/index.js +1 -1
  90. package/lib/SelectItem/index.js +33 -57
  91. package/lib/SingleSelectEditor/index.js +14 -9
  92. package/lib/SvgIcon/index.js +20 -15
  93. package/lib/assets/icons/check.svg +12 -0
  94. package/lib/assets/icons/cross.svg +13 -0
  95. package/lib/assets/icons/dot.svg +9 -0
  96. package/lib/constants/index.js +2 -3
  97. package/lib/css/mb-cell-editor.css +1 -1
  98. package/lib/index.js +6 -69
  99. package/lib/locales/de.json +1 -3
  100. package/lib/locales/en.json +1 -3
  101. package/lib/locales/es.json +1 -3
  102. package/lib/locales/fr.json +1 -3
  103. package/lib/locales/pt.json +1 -3
  104. package/lib/locales/ru.json +1 -3
  105. package/lib/locales/zh-CN.json +1 -3
  106. package/lib/select-editor/index.js +20 -27
  107. package/lib/select-editor/mb-select-editor/index.css +127 -0
  108. package/lib/select-editor/mb-select-editor/index.js +197 -0
  109. package/lib/select-editor/{pc-editor → pc-select-editor}/index.css +1 -1
  110. package/lib/select-editor/{pc-editor → pc-select-editor}/index.js +7 -7
  111. package/lib/select-editor/select-editor-option.js +84 -0
  112. package/lib/utils/editor-utils.js +2 -6
  113. package/lib/utils/get-event-transfer.js +1 -2
  114. package/lib/utils/utils.js +2 -11
  115. package/package.json +2 -2
  116. package/lib/BodyPortal/index.js +0 -29
  117. package/lib/CheckboxEditor/mb-editor.js +0 -99
  118. package/lib/CheckboxEditor/pc-editor.js +0 -118
  119. package/lib/CollaboratorEditor/mb-editor/index.css +0 -41
  120. package/lib/CollaboratorEditor/mb-editor/index.js +0 -88
  121. package/lib/DateEditor/mb-editor/custom-rc-calendar.css +0 -118
  122. package/lib/DateEditor/mb-editor/index.css +0 -39
  123. package/lib/DateEditor/mb-editor/index.js +0 -215
  124. package/lib/DepartmentSingleSelectEditor/index.js +0 -34
  125. package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +0 -4
  126. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +0 -227
  127. package/lib/DigitalSignEditor/mb-editor/index.css +0 -35
  128. package/lib/DigitalSignEditor/mb-editor/index.js +0 -144
  129. package/lib/DigitalSignEditor/pc-editor/index.js +0 -181
  130. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +0 -122
  131. package/lib/FileEditor/files-previewer/mb-previewer/index.css +0 -39
  132. package/lib/FileEditor/files-previewer/mb-previewer/index.js +0 -64
  133. package/lib/FileEditor/files-previewer/pc-previewer/index.js +0 -276
  134. package/lib/FileEditor/mb-editor/index.css +0 -10
  135. package/lib/FileEditor/mb-editor/index.js +0 -136
  136. package/lib/FileEditor/pc-editor/addition-previewer/index.css +0 -1
  137. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +0 -1
  138. package/lib/FileEditor/pc-editor/index.css +0 -5
  139. package/lib/FileEditor/pc-editor/index.js +0 -274
  140. package/lib/GeolocationEditor/mb-editor/country-editor.js +0 -79
  141. package/lib/GeolocationEditor/mb-editor/index.css +0 -11
  142. package/lib/GeolocationEditor/mb-editor/index.js +0 -125
  143. package/lib/GeolocationEditor/mb-editor/location-editor.js +0 -101
  144. package/lib/GeolocationEditor/mb-editor/map-editor/index.css +0 -11
  145. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +0 -474
  146. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +0 -158
  147. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +0 -530
  148. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +0 -77
  149. package/lib/GeolocationEditor/mb-editor/province-editor.js +0 -76
  150. package/lib/GeolocationEditor/pc-editor/index.js +0 -247
  151. package/lib/ImageEditor/mb-editor/index.css +0 -29
  152. package/lib/ImageEditor/mb-editor/index.js +0 -136
  153. package/lib/ImageEditor/pc-editor/images-previewer/index.js +0 -140
  154. package/lib/ImageEditor/pc-editor/index.css +0 -24
  155. package/lib/ImageEditor/pc-editor/index.js +0 -194
  156. package/lib/MobileFullScreenPage/body/index.css +0 -9
  157. package/lib/MobileFullScreenPage/body/index.js +0 -23
  158. package/lib/MobileFullScreenPage/header/index.css +0 -39
  159. package/lib/MobileFullScreenPage/header/index.js +0 -38
  160. package/lib/MobileFullScreenPage/index.css +0 -13
  161. package/lib/MobileFullScreenPage/index.js +0 -73
  162. package/lib/MobileModal/index.js +0 -41
  163. package/lib/MobileOperationSheet/index.css +0 -27
  164. package/lib/MobileOperationSheet/index.js +0 -92
  165. package/lib/MobileSelector/empty/index.css +0 -3
  166. package/lib/MobileSelector/empty/index.js +0 -23
  167. package/lib/MobileSelector/index.css +0 -32
  168. package/lib/MobileSelector/index.js +0 -57
  169. package/lib/MobileSelector/option/index.css +0 -28
  170. package/lib/MobileSelector/option/index.js +0 -36
  171. package/lib/MobileSelector/options/index.css +0 -8
  172. package/lib/MobileSelector/options/index.js +0 -18
  173. package/lib/MobileSelector/search/index.css +0 -7
  174. package/lib/MobileSelector/search/index.js +0 -26
  175. package/lib/MobileUpload/index.css +0 -1
  176. package/lib/MobileUpload/index.js +0 -160
  177. package/lib/RowExpand/index.js +0 -24
  178. package/lib/RowExpandEditor/add-btn/index.js +0 -24
  179. package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +0 -3
  180. package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +0 -19
  181. package/lib/RowExpandEditor/checkbox-editor/index.js +0 -25
  182. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +0 -6
  183. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +0 -36
  184. package/lib/RowExpandEditor/collaborator-editor/index.js +0 -24
  185. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +0 -9
  186. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +0 -163
  187. package/lib/RowExpandEditor/date-editor/index.js +0 -24
  188. package/lib/RowExpandEditor/date-editor/mb-editor.js +0 -82
  189. package/lib/RowExpandEditor/department-editor/index.js +0 -24
  190. package/lib/RowExpandEditor/department-editor/mb-editor.js +0 -65
  191. package/lib/RowExpandEditor/digital-sign-editor/index.js +0 -24
  192. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +0 -1
  193. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +0 -130
  194. package/lib/RowExpandEditor/duration-editor/index.js +0 -24
  195. package/lib/RowExpandEditor/duration-editor/mb-editor.js +0 -71
  196. package/lib/RowExpandEditor/email-editor/index.js +0 -24
  197. package/lib/RowExpandEditor/email-editor/mb-editor/index.css +0 -1
  198. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +0 -84
  199. package/lib/RowExpandEditor/email-editor/pc-editor/index.css +0 -1
  200. package/lib/RowExpandEditor/file-editor/index.js +0 -24
  201. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +0 -114
  202. package/lib/RowExpandEditor/file-editor/pc-editor/index.css +0 -1
  203. package/lib/RowExpandEditor/geolocation-editor/index.js +0 -24
  204. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +0 -100
  205. package/lib/RowExpandEditor/image-editor/index.js +0 -24
  206. package/lib/RowExpandEditor/image-editor/mb-editor/index.css +0 -30
  207. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +0 -109
  208. package/lib/RowExpandEditor/long-text-editor/index.js +0 -24
  209. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +0 -10
  210. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +0 -80
  211. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +0 -3
  212. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +0 -91
  213. package/lib/RowExpandEditor/multiple-select-editor/index.js +0 -24
  214. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +0 -154
  215. package/lib/RowExpandEditor/number-editor/index.js +0 -24
  216. package/lib/RowExpandEditor/number-editor/mb-editor/index.css +0 -3
  217. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +0 -76
  218. package/lib/RowExpandEditor/rate-editor/index.css +0 -34
  219. package/lib/RowExpandEditor/rate-editor/index.js +0 -25
  220. package/lib/RowExpandEditor/rate-editor/mb-editor.js +0 -92
  221. package/lib/RowExpandEditor/right-angle/index.css +0 -6
  222. package/lib/RowExpandEditor/right-angle/index.js +0 -17
  223. package/lib/RowExpandEditor/single-select-editor/index.js +0 -24
  224. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +0 -8
  225. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +0 -134
  226. package/lib/RowExpandEditor/text-editor/index.js +0 -24
  227. package/lib/RowExpandEditor/text-editor/mb-editor/index.css +0 -14
  228. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +0 -37
  229. package/lib/RowExpandEditor/url-editor/index.js +0 -24
  230. package/lib/RowExpandEditor/url-editor/mb-editor/index.css +0 -17
  231. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +0 -87
  232. package/lib/RowExpandFormatter/department-formatter/index.js +0 -19
  233. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +0 -20
  234. package/lib/RowExpandFormatter/rate-formatter/index.css +0 -5
  235. package/lib/RowExpandView/body/index.css +0 -173
  236. package/lib/RowExpandView/body/index.js +0 -111
  237. package/lib/RowExpandView/column-content/index.css +0 -27
  238. package/lib/RowExpandView/column-content/index.js +0 -25
  239. package/lib/RowExpandView/index.css +0 -3
  240. package/lib/RowExpandView/index.js +0 -178
  241. package/lib/select-editor/mb-editor/index.css +0 -1
  242. package/lib/select-editor/mb-editor/index.js +0 -105
  243. /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.css +0 -0
  244. /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.js +0 -0
  245. /package/lib/{constants/departments.js → Department-editor/constants.js} +0 -0
  246. /package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.css +0 -0
  247. /package/lib/{utils/departments.js → Department-editor/utils.js} +0 -0
  248. /package/lib/DigitalSignEditor/{pc-editor/index.css → index.css} +0 -0
  249. /package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.css +0 -0
  250. /package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.css +0 -0
  251. /package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.css +0 -0
  252. /package/lib/GeolocationEditor/{pc-editor/parse-geolocation.js → parse-geolocation.js} +0 -0
  253. /package/lib/GeolocationEditor/{pc-editor/selector-list.js → selector-list.js} +0 -0
  254. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.css +0 -0
  255. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.css +0 -0
  256. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.css +0 -0
  257. /package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.js +0 -0
  258. /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.css +0 -0
  259. /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.js +0 -0
  260. /package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.css +0 -0
  261. /package/lib/RowExpandEditor/{checkbox-editor → RowExpandCheckboxEditor}/index.css +0 -0
  262. /package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.css +0 -0
  263. /package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.css +0 -0
  264. /package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.css +0 -0
  265. /package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.css +0 -0
  266. /package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.css +0 -0
  267. /package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.css +0 -0
  268. /package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.js +0 -0
  269. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.css +0 -0
  270. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.js +0 -0
  271. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +0 -0
  272. /package/lib/RowExpandFormatter/{formula-formatter → RowExpandFormulaFormatter}/index.js +0 -0
  273. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.css +0 -0
  274. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.js +0 -0
  275. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +0 -0
  276. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +0 -0
  277. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.css +0 -0
  278. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.js +0 -0
  279. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
  280. /package/lib/RowExpandFormatter/{rate-formatter → RowExpandRateFormatter}/index.js +0 -0
  281. /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.css +0 -0
  282. /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.js +0 -0
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
5
+ <title>check</title>
6
+ <g id="check">
7
+ <g id="路径" transform="translate(0.020249, 4.178564)">
8
+ <path d="M27.9,0.7L12,18.1L4.1,8.9C3.2,7.9,1.8,7.6,0.7,8.6c-1,0.8-0.9,2.5,0,3.6c6.5,7.3,9.8,11,9.8,11
9
+ c1,0.9,1.9,1,2.8,0l17.9-19c1-1,1-2.5,0.2-3.4C30.4-0.4,28.8-0.2,27.9,0.7z"/>
10
+ </g>
11
+ </g>
12
+ </svg>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
5
+ <title>x-check-box</title>
6
+ <g id="x-check-box">
7
+ <g id="fork-number">
8
+ <path id="路径" d="M18.8,16l8.5-8.5c0.8-0.8,0.8-2.1,0-2.8s-2.1-0.8-2.8,0L16,13.2L7.5,4.6c-0.8-0.8-2.1-0.8-2.8,0
9
+ s-0.8,2.1,0,2.8l8.5,8.5l-8.5,8.5c-0.8,0.8-0.8,2.1,0,2.8c0.8,0.7,2.1,0.8,2.8,0l8.5-8.5l8.5,8.5c0.8,0.8,2.1,0.8,2.8,0
10
+ c0.8-0.8,0.8-2.1,0-2.8l0,0L18.8,16z"/>
11
+ </g>
12
+ </g>
13
+ </svg>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
5
+ <title>dot</title>
6
+ <g id="dot">
7
+ <circle id="椭圆形" cx="16" cy="16" r="9"/>
8
+ </g>
9
+ </svg>
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.isMobile = exports.SIMPLE_CELL_FORMULA_RESULTS = exports.SIMPLE_CELL_COLUMNS = exports.ROW_EXPAND_FOCUS_STYLE = exports.ROW_EXPAND_BTN_FOCUS_STYLE = exports.NUMBER_TYPES = exports.LONG_TEXT_LENGTH_LIMIT = exports.LONG_TEXT_EXCEED_LIMIT_SUGGEST = exports.LONG_TEXT_EXCEED_LIMIT_MESSAGE = exports.KeyCodes = exports.FORMAT_REG_EXP_LIST = exports.FILE_EDITOR_STATUS = exports.EVENT_BUS_TYPE = exports.DELETED_OPTION_TIPS = exports.DELETED_OPTION_BACKGROUND_COLOR = exports.DEFAULT_CHECKBOX_MARK_STYLE = exports.DATE_TYPES = exports.ARRAY_FORMAT_COLUMNS = void 0;
7
+ exports.SIMPLE_CELL_FORMULA_RESULTS = exports.SIMPLE_CELL_COLUMNS = exports.ROW_EXPAND_FOCUS_STYLE = exports.ROW_EXPAND_BTN_FOCUS_STYLE = exports.NUMBER_TYPES = exports.LONG_TEXT_LENGTH_LIMIT = exports.LONG_TEXT_EXCEED_LIMIT_SUGGEST = exports.LONG_TEXT_EXCEED_LIMIT_MESSAGE = exports.KeyCodes = exports.FORMAT_REG_EXP_LIST = exports.FILE_EDITOR_STATUS = exports.EVENT_BUS_TYPE = exports.DELETED_OPTION_TIPS = exports.DELETED_OPTION_BACKGROUND_COLOR = exports.DEFAULT_CHECKBOX_MARK_STYLE = exports.DATE_TYPES = exports.ARRAY_FORMAT_COLUMNS = void 0;
8
8
  var _dtableUtils = require("dtable-utils");
9
9
  var _keyCodes = _interopRequireDefault(require("./key-codes"));
10
10
  const NUMBER_TYPES = exports.NUMBER_TYPES = {
@@ -53,5 +53,4 @@ const LONG_TEXT_LENGTH_LIMIT = exports.LONG_TEXT_LENGTH_LIMIT = 10 * 10000;
53
53
  const FILE_EDITOR_STATUS = exports.FILE_EDITOR_STATUS = {
54
54
  PREVIEWER: 'previewer',
55
55
  ADDITION: 'addition'
56
- };
57
- const isMobile = exports.isMobile = typeof window !== 'undefined' && (window.innerWidth < 768 || navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null);
56
+ };
@@ -1,4 +1,4 @@
1
- @media screen and (max-width: 768px) {
1
+ @media screen and (max-width: 767.8px) {
2
2
  .dtable-ui-mb-editor-popover {
3
3
  position: fixed;
4
4
  top: 0;
package/lib/index.js CHANGED
@@ -10,12 +10,6 @@ Object.defineProperty(exports, "AutoNumberFormatter", {
10
10
  return _AutoNumberFormatter.default;
11
11
  }
12
12
  });
13
- Object.defineProperty(exports, "BodyPortal", {
14
- enumerable: true,
15
- get: function () {
16
- return _BodyPortal.default;
17
- }
18
- });
19
13
  Object.defineProperty(exports, "ButtonFormatter", {
20
14
  enumerable: true,
21
15
  get: function () {
@@ -184,16 +178,16 @@ Object.defineProperty(exports, "DateFormatter", {
184
178
  return _DateFormatter.default;
185
179
  }
186
180
  });
187
- Object.defineProperty(exports, "DepartmentSelectFilter", {
181
+ Object.defineProperty(exports, "DepartmentEditor", {
188
182
  enumerable: true,
189
183
  get: function () {
190
- return _DepartmentSelectFilter.default;
184
+ return _DepartmentEditor.default;
191
185
  }
192
186
  });
193
- Object.defineProperty(exports, "DepartmentSingleSelectEditor", {
187
+ Object.defineProperty(exports, "DepartmentSelectFilter", {
194
188
  enumerable: true,
195
189
  get: function () {
196
- return _DepartmentSingleSelectEditor.default;
190
+ return _DepartmentSelectFilter.default;
197
191
  }
198
192
  });
199
193
  Object.defineProperty(exports, "DepartmentSingleSelectFormatter", {
@@ -340,36 +334,6 @@ Object.defineProperty(exports, "MTimeFormatter", {
340
334
  return _MTimeFormatter.default;
341
335
  }
342
336
  });
343
- Object.defineProperty(exports, "MobileFullScreenPage", {
344
- enumerable: true,
345
- get: function () {
346
- return _MobileFullScreenPage.default;
347
- }
348
- });
349
- Object.defineProperty(exports, "MobileModal", {
350
- enumerable: true,
351
- get: function () {
352
- return _MobileModal.default;
353
- }
354
- });
355
- Object.defineProperty(exports, "MobileOperationSheet", {
356
- enumerable: true,
357
- get: function () {
358
- return _MobileOperationSheet.default;
359
- }
360
- });
361
- Object.defineProperty(exports, "MobileSelector", {
362
- enumerable: true,
363
- get: function () {
364
- return _MobileSelector.default;
365
- }
366
- });
367
- Object.defineProperty(exports, "MobileUpload", {
368
- enumerable: true,
369
- get: function () {
370
- return _MobileUpload.default;
371
- }
372
- });
373
337
  Object.defineProperty(exports, "ModalPortal", {
374
338
  enumerable: true,
375
339
  get: function () {
@@ -418,12 +382,6 @@ Object.defineProperty(exports, "RoleStatusEditor", {
418
382
  return _RoleStatusEditor.default;
419
383
  }
420
384
  });
421
- Object.defineProperty(exports, "RowExpand", {
422
- enumerable: true,
423
- get: function () {
424
- return _RowExpand.default;
425
- }
426
- });
427
385
  Object.defineProperty(exports, "RowExpandDialog", {
428
386
  enumerable: true,
429
387
  get: function () {
@@ -442,12 +400,6 @@ Object.defineProperty(exports, "RowExpandFormatter", {
442
400
  return _RowExpandFormatter.default;
443
401
  }
444
402
  });
445
- Object.defineProperty(exports, "RowExpandView", {
446
- enumerable: true,
447
- get: function () {
448
- return _RowExpandView.default;
449
- }
450
- });
451
403
  Object.defineProperty(exports, "SelectItem", {
452
404
  enumerable: true,
453
405
  get: function () {
@@ -472,12 +424,6 @@ Object.defineProperty(exports, "SingleSelectFormatter", {
472
424
  return _SingleSelectFormatter.default;
473
425
  }
474
426
  });
475
- Object.defineProperty(exports, "SvgIcon", {
476
- enumerable: true,
477
- get: function () {
478
- return _SvgIcon.default;
479
- }
480
- });
481
427
  Object.defineProperty(exports, "TextEditor", {
482
428
  enumerable: true,
483
429
  get: function () {
@@ -555,13 +501,11 @@ var _DepartmentSingleSelectFormatter = _interopRequireDefault(require("./Departm
555
501
  var _SimpleLongTextFormatter = _interopRequireDefault(require("./SimpleLongTextFormatter"));
556
502
  var _RowExpandFormatter = _interopRequireDefault(require("./RowExpandFormatter"));
557
503
  var _RowExpandEditor = _interopRequireDefault(require("./RowExpandEditor"));
558
- var _RowExpand = _interopRequireDefault(require("./RowExpand"));
559
504
  var _RowExpandDialog = _interopRequireDefault(require("./RowExpandDialog"));
560
- var _RowExpandView = _interopRequireDefault(require("./RowExpandView"));
561
505
  var _CheckboxEditor = _interopRequireDefault(require("./CheckboxEditor"));
562
506
  var _CollaboratorEditor = _interopRequireDefault(require("./CollaboratorEditor"));
563
507
  var _DateEditor = _interopRequireDefault(require("./DateEditor"));
564
- var _DepartmentSingleSelectEditor = _interopRequireDefault(require("./DepartmentSingleSelectEditor"));
508
+ var _DepartmentEditor = _interopRequireDefault(require("./Department-editor"));
565
509
  var _DigitalSignEditor = _interopRequireDefault(require("./DigitalSignEditor"));
566
510
  var _DurationEditor = _interopRequireDefault(require("./DurationEditor"));
567
511
  var _EmailEditor = _interopRequireDefault(require("./EmailEditor"));
@@ -598,11 +542,4 @@ var _CollapsibleSettingLayout = _interopRequireDefault(require("./CollapsibleSet
598
542
  var _DTableRadioGroup = _interopRequireDefault(require("./DTableRadioGroup"));
599
543
  var _DTableEmptyTip = _interopRequireDefault(require("./DTableEmptyTip"));
600
544
  var _IconButton = _interopRequireDefault(require("./IconButton"));
601
- var _UploadProgress = _interopRequireDefault(require("./UploadProgress"));
602
- var _SvgIcon = _interopRequireDefault(require("./SvgIcon"));
603
- var _BodyPortal = _interopRequireDefault(require("./BodyPortal"));
604
- var _MobileModal = _interopRequireDefault(require("./MobileModal"));
605
- var _MobileOperationSheet = _interopRequireDefault(require("./MobileOperationSheet"));
606
- var _MobileUpload = _interopRequireDefault(require("./MobileUpload"));
607
- var _MobileSelector = _interopRequireDefault(require("./MobileSelector"));
608
- var _MobileFullScreenPage = _interopRequireDefault(require("./MobileFullScreenPage"));
545
+ var _UploadProgress = _interopRequireDefault(require("./UploadProgress"));
@@ -163,7 +163,5 @@
163
163
  "Mark_as_resolved": "Als erledigt markieren",
164
164
  "No_comment_yet": "Es sind keine Kommentare vorhanden.",
165
165
  "Add_comment": "Kommentar hinzufügen",
166
- "Add_participants": "Teilnehmer hinzufügen",
167
- "Edit_long_text": "Langtext bearbeiten",
168
- "Choose_a_department": "Bereich wählen"
166
+ "Add_participants": "Teilnehmer hinzufügen"
169
167
  }
@@ -163,7 +163,5 @@
163
163
  "Mark_as_resolved": "Mark as resolved",
164
164
  "No_comment_yet": "No comment yet",
165
165
  "Add_comment": "Add comment",
166
- "Add_participants": "Add participants",
167
- "Edit_long_text": "Edit long text",
168
- "Choose_a_department": "Choose a department"
166
+ "Add_participants": "Add participants"
169
167
  }
@@ -163,7 +163,5 @@
163
163
  "Mark_as_resolved": "Marcar como resuelto",
164
164
  "No_comment_yet": "No comment yet",
165
165
  "Add_comment": "Añadir comentario",
166
- "Add_participants": "Añadir participantes",
167
- "Edit_long_text": "Edit long text",
168
- "Choose_a_department": "Choose a department"
166
+ "Add_participants": "Añadir participantes"
169
167
  }
@@ -163,7 +163,5 @@
163
163
  "Mark_as_resolved": "Marquer comme résolu",
164
164
  "No_comment_yet": "Aucun commentaire n'est disponible.",
165
165
  "Add_comment": "Ajouter un commentaire",
166
- "Add_participants": "Ajouter des participants",
167
- "Edit_long_text": "Modifier le texte long",
168
- "Choose_a_department": "Sélectionner un département"
166
+ "Add_participants": "Ajouter des participants"
169
167
  }
@@ -163,7 +163,5 @@
163
163
  "Mark_as_resolved": "Marca conforme resolvido",
164
164
  "No_comment_yet": "No comment yet",
165
165
  "Add_comment": "Adicionar comentário",
166
- "Add_participants": "Adicione participantes",
167
- "Edit_long_text": "Editar texto longo",
168
- "Choose_a_department": "Choose a department"
166
+ "Add_participants": "Adicione participantes"
169
167
  }
@@ -163,7 +163,5 @@
163
163
  "Mark_as_resolved": "Пометить как разрешенный",
164
164
  "No_comment_yet": "Пока без комментариев",
165
165
  "Add_comment": "Добавить комментарий",
166
- "Add_participants": "Добавить участников",
167
- "Edit_long_text": "Редактировать длинный текст",
168
- "Choose_a_department": "Выберите отдел"
166
+ "Add_participants": "Добавить участников"
169
167
  }
@@ -163,7 +163,5 @@
163
163
  "Mark_as_resolved": "标记为已解决",
164
164
  "No_comment_yet": "暂无评论",
165
165
  "Add_comment": "增加评论",
166
- "Add_participants": "添加参与人",
167
- "Edit_long_text": "编辑长文本",
168
- "Choose_a_department": "选择一个部门"
166
+ "Add_participants": "添加参与人"
169
167
  }
@@ -1,34 +1,27 @@
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
- exports.default = void 0;
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"));
13
- const SelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
14
- let {
15
- isMobile,
16
- ...props
17
- } = _ref;
18
- if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
19
- ref: ref
20
- }));
21
- if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
22
- ref: ref
23
- }));
24
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
25
- query: "(min-width: 768px)"
26
- }, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
27
- ref: ref
28
- }))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
29
- query: "(max-width: 768px)"
30
- }, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
31
- ref: ref
32
- }))));
7
+ Object.defineProperty(exports, "MBSelectEditor", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _mbSelectEditor.default;
11
+ }
33
12
  });
34
- var _default = exports.default = SelectEditor;
13
+ Object.defineProperty(exports, "PCSelectEditor", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _pcSelectEditor.default;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "SelectEditorOption", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _selectEditorOption.default;
23
+ }
24
+ });
25
+ var _mbSelectEditor = _interopRequireDefault(require("./mb-select-editor"));
26
+ var _pcSelectEditor = _interopRequireDefault(require("./pc-select-editor"));
27
+ var _selectEditorOption = _interopRequireDefault(require("./select-editor-option"));
@@ -0,0 +1,127 @@
1
+ @import url('../../css/mb-cell-editor.css');
2
+
3
+ @media screen and (max-width: 767.8px) {
4
+ .dtable-ui-mb-select-editor-body .mb-selected-item {
5
+ margin-top: 10px;
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
9
+
10
+ .dtable-ui-mb-select-editor-body .mb-selected-item .title {
11
+ padding: 6px 16px;
12
+ border-bottom: 1px solid #e9e9e9;
13
+ }
14
+
15
+ .dtable-ui-mb-select-editor-body .mb-selected-item .content {
16
+ display: flex;
17
+ flex-wrap: wrap;
18
+ align-items: center;
19
+ min-height: 50px;
20
+ padding: 8px 16px;
21
+ border-bottom: 1px solid #e9e9e9;
22
+ overflow: auto;
23
+ background-color: #fff;
24
+ }
25
+
26
+ .dtable-ui-mb-select-editor-body .mb-selected-item .content .select-option-item {
27
+ margin: 3px 10px 3px 0;
28
+ }
29
+
30
+ .dtable-ui-mb-select-editor-body .mb-search-select-items {
31
+ padding: 8px 16px;
32
+ margin-top: 20px;
33
+ border-top: 1px solid #e9e9e9;
34
+ border-bottom: 1px solid #e9e9e9;
35
+ background-color: #fff;
36
+ }
37
+
38
+ .dtable-ui-mb-select-editor-body .mb-search-select-items > input {
39
+ outline: none;
40
+ height: 30px;
41
+ padding: 0;
42
+ line-height: 30px;
43
+ border: none;
44
+ }
45
+ .dtable-ui-mb-select-editor-body .mb-search-select-items > input:focus,
46
+ .dtable-ui-mb-select-editor-body .mb-search-select-items > input:active {
47
+ outline: none;
48
+ box-shadow: none;
49
+ }
50
+
51
+ .dtable-ui-mb-select-editor-body .mb-select-options-container {
52
+ display: flex;
53
+ flex-direction: column;
54
+ margin-top: 10px;
55
+ }
56
+
57
+ .dtable-ui-mb-select-editor-body .mb-select-options-container .title {
58
+ padding: 6px 16px;
59
+ border-bottom: 1px solid #e9e9e9;
60
+ }
61
+
62
+ .dtable-ui-mb-select-editor-body .mb-select-options-container .content {
63
+ display: flex;
64
+ flex-direction: column;
65
+ border-bottom: 1px solid #e9e9e9;
66
+ }
67
+
68
+ .dtable-ui-mb-select-editor-body .mb-select-options-container .search-result-none {
69
+ padding: 16px 0;
70
+ }
71
+
72
+ .dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item {
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: space-between;
76
+ height: 50px;
77
+ padding: 10px 10px 10px 16px;
78
+ font-size: 13px;
79
+ background-color: #fff;
80
+ color: #212529;
81
+ }
82
+
83
+ .dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item + .mb-select-option-item {
84
+ border-top: 1px solid #e9e9e9;
85
+ }
86
+
87
+ .dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item .item-name {
88
+ display: inline-block;
89
+ padding: 0 10px;
90
+ margin-top: 5px;
91
+ height: 20px;
92
+ line-height: 20px;
93
+ text-align: center;
94
+ text-overflow: ellipsis;
95
+ border-radius: 10px;
96
+ overflow: hidden;
97
+ }
98
+
99
+ .dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item .dtable-font {
100
+ font-size: 12px;
101
+ color: #798d99;
102
+ }
103
+
104
+ .dtable-ui-mb-select-editor-body .mb-create-select-item {
105
+ display: flex;
106
+ align-items: center;
107
+ height: 50px;
108
+ padding: 0 10px;
109
+ margin-top: 20px;
110
+ border-top: 1px solid #dedede;
111
+ border-bottom: 1px solid #e9e9e9;
112
+ background-color: #fff;
113
+ }
114
+
115
+ .dtable-ui-mb-select-editor-body .mb-create-select-item .dtable-font {
116
+ margin-right: 10px;
117
+ font-size: 12px;
118
+ font-weight: 600px;
119
+ transition: translateY(1px);
120
+ }
121
+
122
+ .dtable-ui-mb-select-editor-body .mb-create-select-item .dtable-ui-add-new-option {
123
+ font-size: 14px;
124
+ font-weight: 500px;
125
+ }
126
+
127
+ }
@@ -0,0 +1,197 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _lang = require("../../lang");
11
+ var _selectEditorOption = _interopRequireDefault(require("../select-editor-option"));
12
+ var _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
13
+ require("./index.css");
14
+ class MBSelectEditorPopover 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 = event => {
29
+ let {
30
+ searchVal
31
+ } = this.state;
32
+ if (searchVal === event.target.value) {
33
+ return;
34
+ }
35
+ searchVal = event.target.value;
36
+ this.setState({
37
+ searchVal
38
+ });
39
+ };
40
+ this.getSelectedOptions = () => {
41
+ let {
42
+ value,
43
+ options
44
+ } = this.props;
45
+ if (!Array.isArray(value)) {
46
+ return [];
47
+ }
48
+ return options.filter(option => {
49
+ return value.indexOf(option.id) > -1;
50
+ });
51
+ };
52
+ this.getFilteredOptions = () => {
53
+ let {
54
+ options
55
+ } = this.props;
56
+ let {
57
+ searchVal
58
+ } = this.state;
59
+ return searchVal ? options.filter(item => item.name.indexOf(searchVal) > -1) : options;
60
+ };
61
+ this.onSelectOption = option => {
62
+ this.props.onOptionItemToggle(option);
63
+ };
64
+ this.onAddNewOption = event => {
65
+ event.stopPropagation();
66
+ event.nativeEvent.stopImmediatePropagation();
67
+ let newOption = this.state.searchVal.trim();
68
+ if (newOption) {
69
+ this.props.onAddNewOption(newOption);
70
+ this.props.onClosePopover();
71
+ }
72
+ };
73
+ this.onRemoveOption = option => {
74
+ this.props.onOptionItemToggle(option);
75
+ };
76
+ this.renderSelectOptions = options => {
77
+ let {
78
+ value
79
+ } = this.props;
80
+ return options.map((option, index) => {
81
+ let isSelect = value.some(item => item === option.id);
82
+ let style = {
83
+ backgroundColor: option.color,
84
+ color: option.textColor || null
85
+ };
86
+ return /*#__PURE__*/_react.default.createElement("div", {
87
+ className: "mb-select-option-item",
88
+ key: index,
89
+ onMouseDown: this.onSelectOption.bind(this, option)
90
+ }, /*#__PURE__*/_react.default.createElement("span", {
91
+ className: "mb-select-item"
92
+ }, /*#__PURE__*/_react.default.createElement("span", {
93
+ className: "item-name",
94
+ style: style,
95
+ title: option.name
96
+ }, option.name)), /*#__PURE__*/_react.default.createElement("span", {
97
+ className: "mb-item-checked"
98
+ }, isSelect && /*#__PURE__*/_react.default.createElement("i", {
99
+ className: "dtable-font dtable-icon-check-mark"
100
+ })));
101
+ });
102
+ };
103
+ this.setEditorPopover = editorPopover => {
104
+ this.editorPopover = editorPopover;
105
+ };
106
+ this.state = {
107
+ searchVal: ''
108
+ };
109
+ }
110
+ componentDidMount() {
111
+ history.pushState(null, null, '#'); // eslint-disable-line
112
+ window.addEventListener('popstate', this.handleHistoryBack, false);
113
+ }
114
+ componentWillUnmount() {
115
+ window.removeEventListener('popstate', this.handleHistoryBack, false);
116
+ }
117
+ render() {
118
+ const {
119
+ isReadOnly,
120
+ column,
121
+ isSupportNewOption,
122
+ isShowRemoveIcon
123
+ } = this.props;
124
+ const {
125
+ searchVal
126
+ } = this.state;
127
+ const selectedOptions = this.getSelectedOptions();
128
+ const filteredOptions = this.getFilteredOptions();
129
+ let isShowRemoveBtn = !isReadOnly && isShowRemoveIcon;
130
+ let isShowCreateBtn = !isReadOnly && isSupportNewOption && !!searchVal;
131
+ if (isShowCreateBtn) {
132
+ isShowCreateBtn = filteredOptions.length === 0;
133
+ }
134
+ return /*#__PURE__*/_react.default.createElement("div", {
135
+ ref: this.setEditorPopover,
136
+ className: "dtable-ui-mb-editor-popover mb-select-editor-popover",
137
+ style: {
138
+ zIndex: 99
139
+ },
140
+ onClick: this.onContainerClick
141
+ }, /*#__PURE__*/_react.default.createElement(_MBEditorHeader.default, {
142
+ title: column.name,
143
+ leftContent: /*#__PURE__*/_react.default.createElement("i", {
144
+ className: "dtable-font dtable-icon-return"
145
+ }),
146
+ onLeftClick: this.props.onClosePopover
147
+ }), /*#__PURE__*/_react.default.createElement("div", {
148
+ className: "dtable-ui-mb-editor-body dtable-ui-mb-select-editor-body"
149
+ }, /*#__PURE__*/_react.default.createElement("div", {
150
+ className: "mb-selected-item"
151
+ }, /*#__PURE__*/_react.default.createElement("div", {
152
+ className: "title"
153
+ }, (0, _lang.getLocale)('Current_option')), /*#__PURE__*/_react.default.createElement("div", {
154
+ className: "content"
155
+ }, selectedOptions.length === 0 && /*#__PURE__*/_react.default.createElement("span", {
156
+ className: "empty-placeholder"
157
+ }, (0, _lang.getLocale)('No_option')), selectedOptions.length > 0 && selectedOptions.map(selectedOption => {
158
+ return /*#__PURE__*/_react.default.createElement(_selectEditorOption.default, {
159
+ key: selectedOption.id,
160
+ option: selectedOption,
161
+ isShowRemoveIcon: isShowRemoveBtn,
162
+ onDeleteSelectOption: this.onRemoveOption
163
+ });
164
+ }))), /*#__PURE__*/_react.default.createElement("div", {
165
+ className: "mb-search-select-items"
166
+ }, /*#__PURE__*/_react.default.createElement("input", {
167
+ className: "form-control",
168
+ type: "text",
169
+ placeholder: (0, _lang.getLocale)('Search_option'),
170
+ value: searchVal,
171
+ onChange: this.onChangeSearch,
172
+ onClick: this.onInputClick
173
+ })), /*#__PURE__*/_react.default.createElement("div", {
174
+ className: "mb-select-options-container"
175
+ }, /*#__PURE__*/_react.default.createElement("div", {
176
+ className: "title"
177
+ }, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Choose_an_option'))), /*#__PURE__*/_react.default.createElement("div", {
178
+ className: "content"
179
+ }, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, filteredOptions.length === 0 && /*#__PURE__*/_react.default.createElement("div", {
180
+ className: "search-result-none"
181
+ }, (0, _lang.getLocale)('No_options_available')), filteredOptions.length > 0 && this.renderSelectOptions(filteredOptions)))), isShowCreateBtn && /*#__PURE__*/_react.default.createElement("div", {
182
+ className: "mb-create-select-item",
183
+ onClick: this.onAddNewOption
184
+ }, /*#__PURE__*/_react.default.createElement("i", {
185
+ className: "dtable-font dtable-icon-add-table"
186
+ }), /*#__PURE__*/_react.default.createElement("span", {
187
+ className: "dtable-ui-add-new-option"
188
+ }, "".concat((0, _lang.getLocale)('Add_an_option'), " ").concat(searchVal)))));
189
+ }
190
+ }
191
+ MBSelectEditorPopover.defaultProps = {
192
+ isReadOnly: false,
193
+ isShowRemoveIcon: false,
194
+ isSupportNewOption: false,
195
+ value: []
196
+ };
197
+ var _default = exports.default = MBSelectEditorPopover;
@@ -8,7 +8,7 @@
8
8
  height: 28px;
9
9
  }
10
10
 
11
- .dtable-ui-select-editor-container .select-dtable-ui-mobile-selector-options-container {
11
+ .dtable-ui-select-editor-container .select-options-container {
12
12
  min-height: 160px;
13
13
  max-height: 200px;
14
14
  padding: 10px 0;