dtable-ui-component 5.3.1-beta → 5.3.1

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 (223) hide show
  1. package/lib/CheckboxEditor/index.css +20 -3
  2. package/lib/CheckboxEditor/index.js +35 -98
  3. package/lib/CheckboxFormatter/index.js +9 -6
  4. package/lib/CollaboratorEditor/index.css +35 -12
  5. package/lib/CollaboratorEditor/index.js +212 -18
  6. package/lib/CollaboratorEditor/{mb-collaborator-editor → mb-collaborator-editor-popover}/index.js +29 -26
  7. package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +97 -0
  8. package/lib/CollaboratorItem/index.css +1 -1
  9. package/lib/CollaboratorItem/index.js +2 -6
  10. package/lib/DTableFiltersPopover/utils/index.js +7 -1
  11. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +2 -2
  12. package/lib/DTableSelect/index.js +1 -3
  13. package/lib/DateEditor/index.js +51 -14
  14. package/lib/DateEditor/pc-date-editor-popover.js +12 -145
  15. package/lib/Department-editor/department-single-select.js +1 -1
  16. package/lib/Department-editor/index.js +4 -3
  17. package/lib/DepartmentSingleSelectFormatter/index.js +1 -2
  18. package/lib/FileEditor/index.js +11 -244
  19. package/lib/FileEditor/pc-files-addition/index.js +1 -0
  20. package/lib/FileEditor/pc-files-addition/pc-file-uploaded-item.js +1 -0
  21. package/lib/FileEditor/pc-files-preview/index.js +1 -0
  22. package/lib/FileEditor/pc-files-preview/pc-file-item-preview.js +1 -0
  23. package/lib/FileItemFormatter/assets/file/192/excel.png +0 -0
  24. package/lib/FileItemFormatter/assets/file/192/file.png +0 -0
  25. package/lib/FileItemFormatter/assets/file/192/music.png +0 -0
  26. package/lib/FileItemFormatter/assets/file/192/pdf.png +0 -0
  27. package/lib/FileItemFormatter/assets/file/192/pic.png +0 -0
  28. package/lib/FileItemFormatter/assets/file/192/ppt.png +0 -0
  29. package/lib/FileItemFormatter/assets/file/192/txt.png +0 -0
  30. package/lib/FileItemFormatter/assets/file/192/video.png +0 -0
  31. package/lib/FileItemFormatter/assets/file/192/word.png +0 -0
  32. package/lib/FileItemFormatter/assets/file/24/excel.png +0 -0
  33. package/lib/FileItemFormatter/assets/file/24/file.png +0 -0
  34. package/lib/FileItemFormatter/assets/file/24/music.png +0 -0
  35. package/lib/FileItemFormatter/assets/file/24/pdf.png +0 -0
  36. package/lib/FileItemFormatter/assets/file/24/pic.png +0 -0
  37. package/lib/FileItemFormatter/assets/file/24/ppt.png +0 -0
  38. package/lib/FileItemFormatter/assets/file/24/txt.png +0 -0
  39. package/lib/FileItemFormatter/assets/file/24/video.png +0 -0
  40. package/lib/FileItemFormatter/assets/file/24/word.png +0 -0
  41. package/lib/FileItemFormatter/assets/folder/folder-192.png +0 -0
  42. package/lib/FileItemFormatter/assets/folder/folder-24.png +0 -0
  43. package/lib/FileItemFormatter/index.js +20 -19
  44. package/lib/FileItemFormatter/utils.js +99 -0
  45. package/lib/FileUploader/index.js +14 -268
  46. package/lib/FormulaFormatter/index.js +1 -2
  47. package/lib/FormulaFormatter/utils.js +31 -0
  48. package/lib/LinkEditor/pc-link-editor-popover/index.js +1 -1
  49. package/lib/MultipleSelectEditor/index.css +9 -0
  50. package/lib/MultipleSelectEditor/index.js +177 -16
  51. package/lib/NumberEditor/index.js +77 -64
  52. package/lib/{RowExpandFormatter/RowExpandEmailFormatter → RowExpandEmailFormatter}/index.css +1 -1
  53. package/lib/{RowExpandFormatter/RowExpandEmailFormatter → RowExpandEmailFormatter}/index.js +1 -1
  54. package/lib/{RowExpandFormatter/RowExpandFileFormatter → RowExpandFileFormatter}/index.css +6 -6
  55. package/lib/{RowExpandFormatter/RowExpandFileFormatter → RowExpandFileFormatter}/index.js +1 -3
  56. package/lib/{RowExpandFormatter/RowExpandFileFormatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +11 -10
  57. package/lib/RowExpandFormatter/index.css +0 -26
  58. package/lib/RowExpandFormatter/index.js +100 -84
  59. package/lib/{RowExpandFormatter/RowExpandFormulaFormatter → RowExpandFormulaFormatter}/index.js +10 -11
  60. package/lib/{RowExpandFormatter/RowExpandImageFormatter → RowExpandImageFormatter}/index.css +6 -6
  61. package/lib/{RowExpandFormatter/RowExpandImageFormatter → RowExpandImageFormatter}/index.js +1 -1
  62. package/lib/{RowExpandFormatter/RowExpandImageFormatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +3 -3
  63. package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +1 -1
  64. package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/index.js +5 -5
  65. package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/utils.js +1 -1
  66. package/lib/{RowExpandFormatter/RowExpandRateFormatter → RowExpandRateFormatter}/index.css +1 -1
  67. package/lib/RowExpandUrlFormatter/index.css +1 -0
  68. package/lib/{RowExpandFormatter/RowExpandUrlFormatter → RowExpandUrlFormatter}/index.js +3 -4
  69. package/lib/SingleSelectEditor/index.css +14 -0
  70. package/lib/SingleSelectEditor/index.js +156 -16
  71. package/lib/TextEditor/index.js +42 -113
  72. package/lib/constants/index.js +2 -34
  73. package/lib/css/cell-editor.css +2 -18
  74. package/lib/index.js +46 -74
  75. package/lib/lang/index.js +14 -16
  76. package/lib/locals/de.js +103 -0
  77. package/lib/locals/en.js +104 -0
  78. package/lib/locals/es.js +103 -0
  79. package/lib/locals/fr.js +103 -0
  80. package/lib/locals/pt.js +103 -0
  81. package/lib/locals/ru.js +103 -0
  82. package/lib/locals/zh-CN.js +104 -0
  83. package/lib/select-editor/index.js +6 -6
  84. package/lib/select-editor/{mb-select-editor → mb-select-editor-popover}/index.js +3 -3
  85. package/lib/select-editor/pc-select-editor-popover/index.css +71 -0
  86. package/lib/select-editor/pc-select-editor-popover/index.js +122 -0
  87. package/lib/utils/editor-utils.js +6 -1
  88. package/lib/utils/url.js +8 -119
  89. package/lib/utils/utils.js +2 -89
  90. package/package.json +2 -3
  91. package/lib/CollaboratorEditor/pc-collaborator-editor/index.js +0 -257
  92. package/lib/DeleteTip/index.js +0 -50
  93. package/lib/DigitalSignEditor/constants.js +0 -7
  94. package/lib/DigitalSignEditor/index.css +0 -69
  95. package/lib/DigitalSignEditor/index.js +0 -182
  96. package/lib/DigitalSignEditor/service.js +0 -38
  97. package/lib/DigitalSignEditor/signature-board/index.css +0 -35
  98. package/lib/DigitalSignEditor/signature-board/index.js +0 -135
  99. package/lib/DigitalSignEditor/signature-board/signature-tool.js +0 -396
  100. package/lib/DigitalSignEditor/utils.js +0 -29
  101. package/lib/DurationEditor/index.js +0 -111
  102. package/lib/EmailEditor/index.js +0 -59
  103. package/lib/FileEditor/addition-previewer/index.css +0 -1
  104. package/lib/FileEditor/addition-previewer/index.js +0 -52
  105. package/lib/FileEditor/addition-previewer/local-file-addition/index.css +0 -1
  106. package/lib/FileEditor/addition-previewer/local-file-addition/index.js +0 -252
  107. package/lib/FileEditor/constants.js +0 -7
  108. package/lib/FileEditor/files-previewer/file-previewer/dropdown-menu.js +0 -74
  109. package/lib/FileEditor/files-previewer/file-previewer/file-name-editor/index.css +0 -5
  110. package/lib/FileEditor/files-previewer/file-previewer/file-name-editor/index.js +0 -77
  111. package/lib/FileEditor/files-previewer/file-previewer/index.css +0 -88
  112. package/lib/FileEditor/files-previewer/file-previewer/index.js +0 -167
  113. package/lib/FileEditor/files-previewer/index.css +0 -56
  114. package/lib/FileEditor/files-previewer/index.js +0 -277
  115. package/lib/FileEditor/index.css +0 -6
  116. package/lib/FileEditor/utils.js +0 -22
  117. package/lib/FileUploader/index.css +0 -9
  118. package/lib/GeolocationEditor/country-editor.js +0 -319
  119. package/lib/GeolocationEditor/index.css +0 -641
  120. package/lib/GeolocationEditor/index.js +0 -241
  121. package/lib/GeolocationEditor/location-editor.js +0 -368
  122. package/lib/GeolocationEditor/map-editor/index.js +0 -456
  123. package/lib/GeolocationEditor/map-editor/large-editor/index.css +0 -137
  124. package/lib/GeolocationEditor/map-editor/large-editor/index.js +0 -461
  125. package/lib/GeolocationEditor/map-editor-utils.js +0 -153
  126. package/lib/GeolocationEditor/map-selection-editor/index.js +0 -455
  127. package/lib/GeolocationEditor/map-selection-editor/large-editor/index.css +0 -1
  128. package/lib/GeolocationEditor/map-selection-editor/large-editor/index.js +0 -447
  129. package/lib/GeolocationEditor/parse-geolocation.js +0 -282
  130. package/lib/GeolocationEditor/province-city-editor.js +0 -292
  131. package/lib/GeolocationEditor/province-editor.js +0 -226
  132. package/lib/GeolocationEditor/selector-header-item.js +0 -28
  133. package/lib/GeolocationEditor/selector-list.js +0 -33
  134. package/lib/GeolocationEditor/with-ref.js +0 -27
  135. package/lib/ImageEditor/addition-previewer/image-link/index.css +0 -45
  136. package/lib/ImageEditor/addition-previewer/image-link/index.js +0 -73
  137. package/lib/ImageEditor/addition-previewer/index.css +0 -106
  138. package/lib/ImageEditor/addition-previewer/index.js +0 -63
  139. package/lib/ImageEditor/addition-previewer/local-image-addition/index.css +0 -125
  140. package/lib/ImageEditor/addition-previewer/local-image-addition/index.js +0 -254
  141. package/lib/ImageEditor/constants.js +0 -7
  142. package/lib/ImageEditor/images-previewer/image-preview/index.css +0 -59
  143. package/lib/ImageEditor/images-previewer/image-preview/index.js +0 -155
  144. package/lib/ImageEditor/images-previewer/index.css +0 -18
  145. package/lib/ImageEditor/images-previewer/index.js +0 -140
  146. package/lib/ImageEditor/index.css +0 -24
  147. package/lib/ImageEditor/index.js +0 -194
  148. package/lib/ImageThumbnail/index.css +0 -20
  149. package/lib/ImageThumbnail/index.js +0 -136
  150. package/lib/RowExpandDialog/body/index.css +0 -21
  151. package/lib/RowExpandDialog/body/index.js +0 -279
  152. package/lib/RowExpandDialog/column-content/index.css +0 -43
  153. package/lib/RowExpandDialog/column-content/index.js +0 -50
  154. package/lib/RowExpandDialog/constants.js +0 -114
  155. package/lib/RowExpandDialog/header/index.css +0 -31
  156. package/lib/RowExpandDialog/header/index.js +0 -33
  157. package/lib/RowExpandDialog/index.css +0 -24
  158. package/lib/RowExpandDialog/index.js +0 -268
  159. package/lib/RowExpandDialog/utils.js +0 -83
  160. package/lib/RowExpandEditor/RowExpandAddBtn/index.css +0 -22
  161. package/lib/RowExpandEditor/RowExpandAddBtn/index.js +0 -24
  162. package/lib/RowExpandEditor/RowExpandCheckboxEditor/index.css +0 -18
  163. package/lib/RowExpandEditor/RowExpandCheckboxEditor/index.js +0 -43
  164. package/lib/RowExpandEditor/RowExpandCollaboratorEditor/index.css +0 -5
  165. package/lib/RowExpandEditor/RowExpandCollaboratorEditor/index.js +0 -232
  166. package/lib/RowExpandEditor/RowExpandDateEditor/index.js +0 -130
  167. package/lib/RowExpandEditor/RowExpandDepartmentEditor/index.js +0 -129
  168. package/lib/RowExpandEditor/RowExpandDigitalSignEditor/index.css +0 -13
  169. package/lib/RowExpandEditor/RowExpandDigitalSignEditor/index.js +0 -208
  170. package/lib/RowExpandEditor/RowExpandDurationEditor/index.js +0 -105
  171. package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +0 -2
  172. package/lib/RowExpandEditor/RowExpandEmailEditor/index.js +0 -125
  173. package/lib/RowExpandEditor/RowExpandFileEditor/index.css +0 -1
  174. package/lib/RowExpandEditor/RowExpandFileEditor/index.js +0 -146
  175. package/lib/RowExpandEditor/RowExpandGeolocationEditor/index.css +0 -17
  176. package/lib/RowExpandEditor/RowExpandGeolocationEditor/index.js +0 -165
  177. package/lib/RowExpandEditor/RowExpandImageEditor/index.css +0 -6
  178. package/lib/RowExpandEditor/RowExpandImageEditor/index.js +0 -170
  179. package/lib/RowExpandEditor/RowExpandLongTextEditor/index.css +0 -6
  180. package/lib/RowExpandEditor/RowExpandLongTextEditor/index.js +0 -124
  181. package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/index.css +0 -44
  182. package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/index.js +0 -224
  183. package/lib/RowExpandEditor/RowExpandNumberEditor/index.js +0 -105
  184. package/lib/RowExpandEditor/RowExpandRateEditor/index.css +0 -13
  185. package/lib/RowExpandEditor/RowExpandRateEditor/index.js +0 -152
  186. package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/index.css +0 -58
  187. package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/index.js +0 -192
  188. package/lib/RowExpandEditor/RowExpandTextEditor/index.css +0 -4
  189. package/lib/RowExpandEditor/RowExpandTextEditor/index.js +0 -127
  190. package/lib/RowExpandEditor/RowExpandUrlEditor/index.css +0 -31
  191. package/lib/RowExpandEditor/RowExpandUrlEditor/index.js +0 -130
  192. package/lib/RowExpandEditor/constants.js +0 -44
  193. package/lib/RowExpandEditor/index.css +0 -0
  194. package/lib/RowExpandEditor/index.js +0 -32
  195. package/lib/RowExpandFormatter/RowExpandDepartmentFormatter/index.js +0 -27
  196. package/lib/RowExpandFormatter/RowExpandUrlFormatter/index.css +0 -1
  197. package/lib/RowExpandFormatter/constants.js +0 -60
  198. package/lib/UploadProgress/index.js +0 -38
  199. package/lib/UrlEditor/index.js +0 -62
  200. package/lib/common/editor-base.js +0 -53
  201. package/lib/constants/file.js +0 -96
  202. package/lib/constants/key-codes.js +0 -109
  203. package/lib/hooks/index.js +0 -16
  204. package/lib/locales/de.json +0 -163
  205. package/lib/locales/en.json +0 -163
  206. package/lib/locales/es.json +0 -163
  207. package/lib/locales/fr.json +0 -163
  208. package/lib/locales/pt.json +0 -163
  209. package/lib/locales/ru.json +0 -163
  210. package/lib/locales/zh-CN.json +0 -163
  211. package/lib/select-editor/pc-select-editor/index.css +0 -85
  212. package/lib/select-editor/pc-select-editor/index.js +0 -290
  213. package/lib/utils/cell-comparer.js +0 -35
  214. package/lib/utils/cell.js +0 -55
  215. package/lib/utils/column-utils.js +0 -25
  216. package/lib/utils/get-event-transfer.js +0 -75
  217. package/lib/utils/object-utils.js +0 -61
  218. /package/lib/CollaboratorEditor/{mb-collaborator-editor → mb-collaborator-editor-popover}/index.css +0 -0
  219. /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-collaborator-editor-popover}/index.css +0 -0
  220. /package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/index.css +0 -0
  221. /package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
  222. /package/lib/{RowExpandFormatter/RowExpandRateFormatter → RowExpandRateFormatter}/index.js +0 -0
  223. /package/lib/select-editor/{mb-select-editor → mb-select-editor-popover}/index.css +0 -0
@@ -1,163 +0,0 @@
1
- {
2
- "Add_an_option": "Add an option",
3
- "Search_option": "搜索选项",
4
- "No_options_available": "没有找到标签",
5
- "Current_option": "当前标签",
6
- "No_option": "没有标签",
7
- "Choose_an_option": "Choose an option",
8
- "Add_a_collaborator": "Add a collaborator",
9
- "Search_collaborator": "搜索协作人",
10
- "No_collaborators_available": "没有找到协作人",
11
- "Done": "完成",
12
- "Choose_a_collaborator": "Choose a collaborator",
13
- "Please_input": "请输入",
14
- "Please_select": "请选择",
15
- "Clear": "清除",
16
- "Are_you_sure_you_want_to_delete_this_file": "你确定要删除此文件吗?",
17
- "Are_you_sure_you_want_to_delete_this_image": "你确定要删除此图片吗?",
18
- "Cancel": "取消",
19
- "Delete": "删除",
20
- "Search_department": "搜索部门",
21
- "No_departments_available": "没有可用的部门",
22
- "Current_user_department": "当前用户的部门",
23
- "Current_user_department_and_sub": "当前用户的部门和子部门",
24
- "Specific_departments": "具体部门",
25
- "Deleted_department": "已删除部门",
26
- "View_original_image": "View original image",
27
- "Add_filter": "增加过滤条件",
28
- "Submit": "提交",
29
- "No_filters": "没有过滤器",
30
- "Select_an_option": "选择标签",
31
- "Add_collaborator": "添加协作人",
32
- "Add_a_creator": "添加创建者",
33
- "Add_a_last_modifier": "添加最近的修改人",
34
- "Invalid_filter": "无效的过滤器",
35
- "Search_column": "搜索列",
36
- "No_results": "没有结果。",
37
- "Select_option(s)": "选择标签",
38
- "contains": "包含",
39
- "does_not_contain": "不包含",
40
- "is": "是",
41
- "is_not": "不是",
42
- "equal": "等于",
43
- "not_equal": "不等于",
44
- "less": "小于",
45
- "greater": "大于",
46
- "less_or_equal": "小于或等于",
47
- "greater_or_equal": "大于或等于",
48
- "is_empty": "是空",
49
- "is_not_empty": "不是空",
50
- "is_within": "在某段时间内",
51
- "is_before": "在某天之前",
52
- "is_after": "在某天之后",
53
- "is_on_or_before": "在某天或之前",
54
- "is_on_or_after": "在某天或之后",
55
- "has_any_of": "包含其中一个",
56
- "has_all_of": "包含所有",
57
- "has_none_of": "不包含",
58
- "is_exactly": "精确筛选",
59
- "is_current_user_ID": "是当前用户的 ID",
60
- "Current_date": "当前日期",
61
- "Specific_date": "指定日期",
62
- "x_days_before_current_date": "当前日期的前 X 天",
63
- "x_days_after_current_date": "当前日期的后 X 天",
64
- "is_any_of": "是任意一个...",
65
- "is_none_of": "不是任意一个...",
66
- "include_me": "包括当前用户",
67
- "today": "今天",
68
- "tomorrow": "明天",
69
- "yesterday": "昨天",
70
- "one_week_ago": "一周前",
71
- "one_week_from_now": "一周后",
72
- "one_month_ago": "一个月前",
73
- "one_month_from_now": "一个月后",
74
- "number_of_days_ago": "特定天数前",
75
- "number_of_days_from_now": "特定天数后",
76
- "exact_date": "精确日期",
77
- "the_past_week": "上个星期",
78
- "the_past_month": "上个月",
79
- "the_past_year": "去年",
80
- "the_next_week": "下个星期",
81
- "the_next_month": "下个月",
82
- "the_next_year": "下一年",
83
- "the_next_numbers_of_days": "今天之后的指定天数",
84
- "the_past_numbers_of_days": "今天之前的指定天数",
85
- "this_week": "这个星期",
86
- "this_month": "这个月",
87
- "this_year": "今年",
88
- "last_week": "上个星期",
89
- "last_month": "上个月",
90
- "last_year": "去年",
91
- "URL_is_invalid": "URL 无效",
92
- "Select_department": "选择部门",
93
- "Default": "默认",
94
- "Custom": "自定义",
95
- "Recently_used": "Recently used",
96
- "Digital_signature": "数字签名",
97
- "Please_sign_on_this_panel": "请在此面板上签名",
98
- "Re-sign": "重新签名",
99
- "Saving": "保存中...",
100
- "Save": "保存",
101
- "All_files": "全部文件",
102
- "Add_files": "添加文件",
103
- "Local_Files": "本地文件",
104
- "Indexing": "索引中...",
105
- "Network_Error": "网络错误",
106
- "Re_upload": "重新上传",
107
- "Drag_and_drop_to_add_a_file": "拖拽添加文件",
108
- "Drag_and_drop_files_or_click_here_to_add": "将文件拖拽或点击到此处进行上传",
109
- "Upload": "上传",
110
- "Select": "选择",
111
- "Download": "下载",
112
- "Select_all": "选择全部",
113
- "1_file_selected": "已选择 1 个文件",
114
- "Selected_xxx_files": "已选择 {{ count }} 个文件",
115
- "xxx_existing_file": "{{ count }} 个文件",
116
- "xxx_existing_files": "{{ count }} 个文件",
117
- "More_operations": "更多操作",
118
- "Rename": "重命名",
119
- "No_options": "无选项",
120
- "Search_country": "搜索国家",
121
- "Province/City/District_must_be_filled_in": "省/市/区必须填写。",
122
- "Address_information": "地址信息",
123
- "Select_province_city_district": "选择省/市/区",
124
- "Detailed_address": "详细地址",
125
- "Detailed_address_placeholder": "输入详细的地址, 如道路, 门牌号, 小区等",
126
- "Auto_recognition": "自动识别",
127
- "Try_pasting_addresses_such_as_provinces/cities/districts_roads_neighborhoods_etc_to_quickly_identify_the_address_information": "尝试粘贴地址,例如省/城市/地区,道路,社区等,以快速识别地址信息",
128
- "Loading_geolocation_data": "正在加载位置信息",
129
- "Province/City_must_be_filled_in": "省/市必须填写。",
130
- "Select_province_city": "选择省份/城市",
131
- "Try_pasting_addresses_such_as_provinces/cities_information_to_quickly_identify_the_address_information": "尝试粘贴地址,例如省/市信息,以快速识别地址信息",
132
- "Search_province": "搜索省份",
133
- "Select_location": "选择",
134
- "Positioning_failed": "定位失败",
135
- "Address": "地址",
136
- "Enter_longitude_and_latitude": "输入经度和纬度",
137
- "Enter_latitude_and_longitude": "输入经度和纬度",
138
- "The_map_plugin_is_not_properly_configured_contact_the_administrator": "地图插件未正确配置。请与管理员联系。",
139
- "Fill_in": "填入",
140
- "Search_failed_please_enter_detailed_address": "搜索失败,请输入详细地址",
141
- "This_map_type_currently_does_not_support_map_point_selection": "该地图类型暂不支持地图选点",
142
- "Please_enter_the_address": "请输入地址",
143
- "Add_images": "添加图片",
144
- "All_images": "全部图片",
145
- "Local_Images": "本地图片",
146
- "Image_Link": "图片链接",
147
- "Enter_a_URL": "输入一个地址",
148
- "Please_enter_the_correct_image_address": "请输入正确的图片地址。",
149
- "Drag_and_drop_to_add_an_image": "拖拽即可添加图片",
150
- "Drag_and_drop_images_or_click_or_paste_here_to_add": "将图片拖拽或点击或粘贴到此处进行上传",
151
- "Save_failed": "保存失败",
152
- "Permission_denied": "权限错误。",
153
- "Error": "错误。",
154
- "Please_check_the_network": "请检查网络连接。",
155
- "Close_expanded_record": "关闭行展开对话框",
156
- "Unknown": "未知",
157
- "Edit_signature": "编辑签名",
158
- "Edit_Location": "编辑地理位置",
159
- "Long_text_exceed_limit_message": "文档内容已超过 100000 字符限制,内容无法保存",
160
- "Long_text_exceed_limit_suggest": "文档内容已超过 100000 个字符的限制,仅保存前 100000 个字符",
161
- "Deleted_option": "已删除的标签",
162
- "Input_does_not_meet_specifications": "输入不符合规范"
163
- }
@@ -1,85 +0,0 @@
1
- @import url('../../css/cell-editor.css');
2
-
3
- .dtable-ui-select-editor-container .select-options-search {
4
- padding: 10px 10px 0 10px;
5
- }
6
-
7
- .dtable-ui-select-editor-container .select-options-search input {
8
- height: 28px;
9
- }
10
-
11
- .dtable-ui-select-editor-container .select-options-container {
12
- min-height: 160px;
13
- max-height: 200px;
14
- padding: 10px 0;
15
- overflow: auto;
16
- }
17
-
18
- /* option item */
19
- .dtable-ui-select-editor-container .select-option-item {
20
- white-space: nowrap;
21
- }
22
-
23
- .dtable-ui-select-editor-container .select-option-item .select-option-item-container {
24
- display: flex;
25
- align-items: center;
26
- width: 100%;
27
- height: 30px;
28
- border-radius: 2px;
29
- font-size: 13px;
30
- color: #212529;
31
- padding: 0 10px;
32
- }
33
-
34
- .dtable-ui-select-editor-container .select-option-item .select-option-item-container.select-option-item-container-highlight {
35
- background: #f5f5f5;
36
- cursor: pointer;
37
- }
38
-
39
- .dtable-ui-select-editor-container .option-info {
40
- flex: 1;
41
- display: flex;
42
- align-items: center;
43
- overflow: hidden;
44
- }
45
-
46
- .dtable-ui-select-editor-container .option-info .option-name {
47
- width: fit-content;
48
- overflow: hidden;
49
- text-overflow: ellipsis;
50
- white-space: nowrap;
51
- }
52
-
53
- .dtable-ui-select-editor-container .option-checked {
54
- width: 20px;
55
- text-align: center;
56
- }
57
-
58
- .dtable-ui-select-editor-container .option-checked .dtable-font {
59
- font-size: 12px;
60
- color: #798d99;
61
- }
62
-
63
- .dtable-ui-select-editor-container .select-options-add {
64
- display: flex;
65
- align-items: center;
66
- padding: 0 10px;
67
- height: 30px;
68
- border-top: 1px solid #ccc;
69
- }
70
-
71
- .dtable-ui-select-editor-container .select-options-add .dtable-font {
72
- margin-right: 5px;
73
- font-size: 12px;
74
- font-weight: 600;
75
- }
76
-
77
- .dtable-ui-select-editor-container .select-options-add > span {
78
- display: inline-block;
79
- font-size: 14px;
80
- font-weight: 500;
81
- color: #212529;
82
- white-space: nowrap;
83
- overflow: hidden;
84
- text-overflow: ellipsis;
85
- }
@@ -1,290 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _classnames = _interopRequireDefault(require("classnames"));
10
- var _reactstrap = require("reactstrap");
11
- var _lang = require("../../lang");
12
- var _DTableSearchInput = _interopRequireDefault(require("../../DTableSearchInput"));
13
- var _constants = require("../../constants");
14
- require("./index.css");
15
- class PCSelectEditor extends _react.default.Component {
16
- constructor(props) {
17
- super(props);
18
- this.onHotKey = e => {
19
- if (e.keyCode === _constants.KeyCodes.Enter) {
20
- this.onEnter(e);
21
- } else if (e.keyCode === _constants.KeyCodes.UpArrow) {
22
- this.onUpArrow(e);
23
- } else if (e.keyCode === _constants.KeyCodes.DownArrow) {
24
- this.onDownArrow(e);
25
- } else if (e.keyCode === _constants.KeyCodes.Tab) {
26
- if (this.props.onPressTab) {
27
- this.props.onPressTab(e);
28
- }
29
- } else if (e.keyCode === _constants.KeyCodes.Escape) {
30
- if (this.props.isInModal) {
31
- e.stopPropagation();
32
- this.props.onClose && this.props.onClose();
33
- }
34
- }
35
- };
36
- this.onEnter = e => {
37
- e.preventDefault();
38
- let option;
39
- const {
40
- isSupportNewOption
41
- } = this.props;
42
- if (this.filteredOptions.length === 1) {
43
- option = this.filteredOptions[0];
44
- } else if (this.state.highlightIndex > -1) {
45
- option = this.filteredOptions[this.state.highlightIndex];
46
- }
47
- if (option) {
48
- this.onOptionItemToggle(option);
49
- } else {
50
- const {
51
- searchValue
52
- } = this.state;
53
- if (searchValue && isSupportNewOption && this.filteredOptions.length === 0) {
54
- e.stopPropagation();
55
- this.onAddNewOption();
56
- }
57
- }
58
- };
59
- this.onUpArrow = e => {
60
- e.preventDefault();
61
- e.stopPropagation();
62
- let {
63
- highlightIndex,
64
- maxItemNum,
65
- itemHeight
66
- } = this.state;
67
- if (highlightIndex > 0) {
68
- this.setState({
69
- highlightIndex: highlightIndex - 1
70
- }, () => {
71
- if (highlightIndex < this.filteredOptions.length - maxItemNum) {
72
- this.container.scrollTop -= itemHeight;
73
- }
74
- });
75
- }
76
- };
77
- this.onDownArrow = e => {
78
- e.preventDefault();
79
- e.stopPropagation();
80
- let {
81
- highlightIndex,
82
- maxItemNum,
83
- itemHeight
84
- } = this.state;
85
- if (highlightIndex < this.filteredOptions.length - 1) {
86
- this.setState({
87
- highlightIndex: highlightIndex + 1
88
- }, () => {
89
- if (highlightIndex >= maxItemNum) {
90
- this.container.scrollTop += itemHeight;
91
- }
92
- });
93
- }
94
- };
95
- this.onValueChanged = searchValue => {
96
- const {
97
- searchValue: oldSearchVal
98
- } = this.state;
99
- const {
100
- options
101
- } = this.props;
102
- if (oldSearchVal === searchValue) return;
103
- this.setState({
104
- searchValue
105
- });
106
- let val = searchValue.toLowerCase();
107
- this.filteredOptions = val ? options.filter(item => item.name && item.name.toLowerCase().indexOf(val) > -1) : options;
108
- this.setState({
109
- highlightIndex: this.filteredOptions.length > 0 ? 0 : -1
110
- });
111
- };
112
- this.onAddNewOption = () => {
113
- let name = this.state.searchValue.trim();
114
- this.props.onAddNewOption(name);
115
- };
116
- this.onOptionItemToggle = item => {
117
- this.props.onCommit(item);
118
- };
119
- this.onMenuMouseEnter = index => {
120
- this.setState({
121
- highlightIndex: index
122
- });
123
- };
124
- this.onMenuMouseLeave = index => {
125
- this.timer = setTimeout(() => {
126
- if (this.state.highlightIndex === index) {
127
- this.setState({
128
- highlightIndex: -1
129
- });
130
- }
131
- }, 300);
132
- };
133
- this.getOptionStyle = option => {
134
- const {
135
- optionWidth
136
- } = this.props;
137
- const textColor = option.textColor || null;
138
- return {
139
- display: 'inline-block',
140
- padding: '0px 10px',
141
- height: '20px',
142
- lineHeight: '20px',
143
- borderRadius: '10px',
144
- fontSize: '13px',
145
- backgroundColor: option.color,
146
- color: textColor,
147
- maxWidth: optionWidth || 138
148
- };
149
- };
150
- this.onKeyDown = e => {
151
- if (e.keyCode === _constants.KeyCodes.ChineseInputMethod || e.keyCode === _constants.KeyCodes.Enter || e.keyCode === _constants.KeyCodes.LeftArrow || e.keyCode === _constants.KeyCodes.RightArrow) {
152
- e.stopPropagation();
153
- }
154
- };
155
- this.getMaxItemNum = () => {
156
- let selectContainerStyle = getComputedStyle(this.container, null);
157
- let selectItemStyle = getComputedStyle(this.selectItem, null);
158
- let maxSelectItemNum = Math.floor(parseInt(selectContainerStyle.maxHeight) / parseInt(selectItemStyle.height));
159
- return maxSelectItemNum - 1;
160
- };
161
- this.state = {
162
- searchValue: '',
163
- highlightIndex: -1,
164
- maxItemNum: 0,
165
- itemHeight: 0
166
- };
167
- this.filteredOptions = props.options;
168
- this.timer = null;
169
- this.parent = null;
170
- this.ref = null;
171
- this.container = null;
172
- this.selectItem = null;
173
- }
174
- componentDidMount() {
175
- if (this.props.isInModal && this.parent) {
176
- if (this.parent.getBoundingClientRect().top > 330) {
177
- this.ref.style.top = '-200px';
178
- }
179
- }
180
- const {
181
- bottom
182
- } = this.ref.getBoundingClientRect();
183
- if (bottom > window.innerHeight) {
184
- this.ref.style.top = parseInt(this.ref.style.top) - bottom + window.innerHeight + 'px';
185
- }
186
- if (this.container && this.selectItem) {
187
- this.setState({
188
- maxItemNum: this.getMaxItemNum(),
189
- itemHeight: parseInt(getComputedStyle(this.selectItem, null).height)
190
- });
191
- }
192
- document.addEventListener('keydown', this.onHotKey, true);
193
- }
194
- componentWillUnmount() {
195
- document.removeEventListener('keydown', this.onHotKey, true);
196
- if (this.timer) {
197
- clearTimeout(this.timer);
198
- this.timer = null;
199
- }
200
- }
201
- render() {
202
- const {
203
- isInModal,
204
- className,
205
- value,
206
- column,
207
- valueKey,
208
- isSupportNewOption,
209
- target
210
- } = this.props;
211
- const {
212
- searchValue,
213
- highlightIndex
214
- } = this.state;
215
-
216
- // maxWidth = single-selects-container's width - single-selects-container's padding-left and padding-right - single-select-container's padding-left - single-select-check-icon's width - The gap between the single-select-check-icon and single-select-name or scroll's width
217
- // maxWidth = column.width > 200 ? column.width - 20 - 12 - 20 - 10 : 200 - 20 - 12 - 20 - 10
218
- // maxWidth = column.width > 200 ? column.width - 62 : 200 - 62
219
- let maxWidth = isInModal ? 250 : (column === null || column === void 0 ? void 0 : column.width) > 200 ? column.width - 62 : 138;
220
- const dom = /*#__PURE__*/_react.default.createElement("div", {
221
- className: (0, _classnames.default)('dtable-ui-editor-container dtable-ui-select-editor-container', className),
222
- ref: ref => this.ref = ref
223
- }, /*#__PURE__*/_react.default.createElement("div", {
224
- className: "select-options-search"
225
- }, /*#__PURE__*/_react.default.createElement(_DTableSearchInput.default, {
226
- placeholder: (0, _lang.getLocale)('Search_option'),
227
- onKeyDown: this.onKeyDown,
228
- onChange: this.onValueChanged,
229
- autoFocus: true
230
- })), /*#__PURE__*/_react.default.createElement("div", {
231
- className: "select-options-container",
232
- ref: ref => this.container = ref
233
- }, this.filteredOptions.length > 0 && this.filteredOptions.map((option, index) => {
234
- let optionStyle = this.getOptionStyle(option);
235
- optionStyle = {
236
- ...optionStyle,
237
- maxWidth
238
- };
239
- let isSelected = value.includes(option[valueKey]);
240
- return /*#__PURE__*/_react.default.createElement("div", {
241
- key: option.id,
242
- className: "select-option-item",
243
- ref: ref => this.selectItem = ref
244
- }, /*#__PURE__*/_react.default.createElement("div", {
245
- className: (0, _classnames.default)('select-option-item-container', {
246
- 'select-option-item-container-highlight': index === highlightIndex
247
- }),
248
- onMouseDown: this.onOptionItemToggle.bind(this, option),
249
- onMouseEnter: this.onMenuMouseEnter.bind(this, index),
250
- onMouseLeave: this.onMenuMouseLeave.bind(this, index)
251
- }, /*#__PURE__*/_react.default.createElement("div", {
252
- className: "option-info"
253
- }, /*#__PURE__*/_react.default.createElement("div", {
254
- className: "option-name",
255
- style: optionStyle,
256
- title: option.name
257
- }, option.name)), /*#__PURE__*/_react.default.createElement("div", {
258
- className: "option-checked"
259
- }, isSelected && /*#__PURE__*/_react.default.createElement("i", {
260
- className: "dtable-font dtable-icon-check-mark"
261
- }))));
262
- }), this.filteredOptions.length === 0 && /*#__PURE__*/_react.default.createElement("div", {
263
- className: "dtable-ui-editor-no-search-result"
264
- }, (0, _lang.getLocale)('No_options_available'))), isSupportNewOption && !!searchValue && /*#__PURE__*/_react.default.createElement("div", {
265
- className: "select-options-add",
266
- onClick: this.onAddNewOption
267
- }, /*#__PURE__*/_react.default.createElement("i", {
268
- className: "dtable-font dtable-icon-add-table"
269
- }), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_an_option'), ' ', searchValue)));
270
- if (isInModal) {
271
- return /*#__PURE__*/_react.default.createElement("div", {
272
- ref: ref => this.parent = ref
273
- }, /*#__PURE__*/_react.default.createElement(_reactstrap.Popover, {
274
- placement: "bottom-start",
275
- isOpen: true,
276
- target: target,
277
- hideArrow: true,
278
- fade: false,
279
- className: "dtable-ui-row-expand-select-editor-popover"
280
- }, dom));
281
- }
282
- return dom;
283
- }
284
- }
285
- PCSelectEditor.defaultProps = {
286
- options: [],
287
- value: [],
288
- valueKey: 'id'
289
- };
290
- var _default = exports.default = PCSelectEditor;
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.isCellValueChanged = void 0;
8
- var _dtableUtils = require("dtable-utils");
9
- var _objectUtils = _interopRequireDefault(require("./object-utils"));
10
- const isCellValueChanged = (oldVal, newVal, columnType) => {
11
- if (oldVal === newVal) {
12
- return false;
13
- }
14
- if (oldVal === undefined || oldVal === null) {
15
- if (columnType === _dtableUtils.CellType.GEOLOCATION && (0, _dtableUtils.isEmptyObject)(newVal)) {
16
- return false;
17
- }
18
- if ((columnType === _dtableUtils.CellType.DATE || columnType === _dtableUtils.CellType.NUMBER || columnType === _dtableUtils.CellType.AUTO_NUMBER) && newVal === null) {
19
- return false;
20
- }
21
- if (Array.isArray(newVal)) {
22
- return newVal.length !== 0;
23
- }
24
- return newVal !== false && newVal !== '';
25
- }
26
- if (Array.isArray(oldVal) && Array.isArray(newVal)) {
27
- // [{}].toString(): [object Object]
28
- return JSON.stringify(oldVal) !== JSON.stringify(newVal);
29
- }
30
- if (typeof oldVal === 'object' && typeof newVal === 'object' && newVal !== null) {
31
- return !_objectUtils.default.isSameObject(oldVal, newVal);
32
- }
33
- return oldVal !== newVal;
34
- };
35
- exports.isCellValueChanged = isCellValueChanged;
package/lib/utils/cell.js DELETED
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isValidPosition = exports.isLongTextValueExceedLimit = exports.checkValueConformityFormat = exports.checkNumberValidation = void 0;
7
- var _constants = require("../constants");
8
- var _utils = require("./utils");
9
- const checkValueConformityFormat = (columnData, value) => {
10
- const {
11
- format_specification_value,
12
- format_check_type
13
- } = columnData || {};
14
- let isMatched = false;
15
- if (format_check_type !== 'custom_format') {
16
- const reg = _constants.FORMAT_REG_EXP_LIST[format_check_type];
17
- isMatched = reg && reg.test((0, _utils.getTrimmedString)(value));
18
- } else {
19
- const reg = new RegExp(format_specification_value);
20
- isMatched = reg.test((0, _utils.getTrimmedString)(value));
21
- }
22
- return isMatched;
23
- };
24
- exports.checkValueConformityFormat = checkValueConformityFormat;
25
- const checkNumberValidation = (columnData, value) => {
26
- const {
27
- format_max_value,
28
- format_min_value
29
- } = columnData || {};
30
- const num = parseFloat(value);
31
- if (isNaN(num) || !num && num !== 0) {
32
- return false;
33
- }
34
- if ((format_max_value || format_max_value === 0) && num > format_max_value) {
35
- return false;
36
- }
37
- if ((format_min_value || format_min_value === 0) && num < format_min_value) {
38
- return false;
39
- }
40
- return true;
41
- };
42
- exports.checkNumberValidation = checkNumberValidation;
43
- const isLongTextValueExceedLimit = value => {
44
- if (!value) return false;
45
- if (typeof value === 'string') return value.length >= _constants.LONG_TEXT_LENGTH_LIMIT;
46
- const {
47
- text
48
- } = value || {};
49
- return text ? text.length >= _constants.LONG_TEXT_LENGTH_LIMIT : false;
50
- };
51
- exports.isLongTextValueExceedLimit = isLongTextValueExceedLimit;
52
- const isValidPosition = (lng, lat) => {
53
- return (lng || lng === 0) && (lat || lat === 0);
54
- };
55
- exports.isValidPosition = isValidPosition;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isEnableCheckFormat = exports.getDateColumnFormat = void 0;
7
- var _dtableUtils = require("dtable-utils");
8
- const isEnableCheckFormat = column => {
9
- if (!column) return false;
10
- const {
11
- data
12
- } = column;
13
- const {
14
- enable_check_format
15
- } = data || {};
16
- if (enable_check_format) return true;
17
- return false;
18
- };
19
- exports.isEnableCheckFormat = isEnableCheckFormat;
20
- const getDateColumnFormat = column => {
21
- const format = column && column.data && column.data.format ? column.data.format : _dtableUtils.DEFAULT_DATE_FORMAT;
22
- // Old Europe format is D/M/YYYY new format is DD/MM/YYYY
23
- return format;
24
- };
25
- exports.getDateColumnFormat = getDateColumnFormat;