@voplus/morpho-document 1.0.0-dev301 → 1.0.0-dev303

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 (343) hide show
  1. package/es/Modules.js +1 -1
  2. package/es/Modules.js.map +1 -1
  3. package/es/components/ActivityLog/ActivityLog2/index.js.map +1 -1
  4. package/es/components/ActivityLog/index.js.map +1 -1
  5. package/es/components/ActivityLog/state.d.ts +1 -1
  6. package/es/components/ActivityLog/state.js.map +1 -1
  7. package/es/components/AvatarList/AvatarItem/index.js +2 -2
  8. package/es/components/AvatarList/AvatarItem/index.js.map +1 -1
  9. package/es/components/AvatarList/index.js +2 -2
  10. package/es/components/AvatarList/index.js.map +1 -1
  11. package/es/components/DocumentSortableTree/themes/FileExplorerTheme/node-content-renderer.less +13 -2
  12. package/es/components/QuickAccessSearch/ObjectItem/index.js +1 -1
  13. package/es/controls/DescriptionEditor/index.d.ts +1 -0
  14. package/es/controls/DescriptionEditor/index.js +3 -2
  15. package/es/controls/DescriptionEditor/index.js.map +1 -1
  16. package/es/controls/DescriptionEditor/index.less +5 -0
  17. package/es/controls/DescriptionEditor/state.d.ts +2 -0
  18. package/es/controls/DescriptionEditor/state.js.map +1 -1
  19. package/es/controls/ToolBar/index.js +1 -1
  20. package/es/controls/ToolBar/index.js.map +1 -1
  21. package/es/controls/ToolBar/menus/Access.js +1 -1
  22. package/es/controls/ToolBar/menus/Access.js.map +1 -1
  23. package/es/pages/Page/PageDefaultView/index.js +1 -1
  24. package/es/pages/Page/PageDefaultView/index.js.map +1 -1
  25. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js +9 -5
  26. package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js.map +1 -1
  27. package/es/pages/Signature/Letter/LetterContentView/index.d.ts +2 -7
  28. package/es/pages/Signature/Letter/LetterContentView/index.js +11 -6
  29. package/es/pages/Signature/Letter/LetterContentView/index.js.map +1 -1
  30. package/es/pages/Signature/Letter/LetterContentView/state.d.ts +19 -0
  31. package/es/pages/Signature/Letter/LetterContentView/state.js +27 -0
  32. package/es/pages/Signature/Letter/LetterContentView/state.js.map +1 -0
  33. package/es/pages/Signature/SignatureDialog/index.d.ts +2 -0
  34. package/es/pages/Signature/SignatureDialog/index.js +11 -8
  35. package/es/pages/Signature/SignatureDialog/index.js.map +1 -1
  36. package/es/pages/Signature/SignatureDialog/index.less +15 -1
  37. package/es/pages/Signature/SignatureRecipient/index.js +4 -10
  38. package/es/pages/Signature/SignatureRecipient/index.js.map +1 -1
  39. package/es/pages/Signature/SignatureTable/index.less +1 -1
  40. package/es/pages/Signature/SignerSelect/index.js +24 -12
  41. package/es/pages/Signature/SignerSelect/index.js.map +1 -1
  42. package/es/pages/Signature/SignerSelect/state.d.ts +2 -2
  43. package/es/pages/Signature/SignerSelect/state.js.map +1 -1
  44. package/es/pages/VSubmit/components/EmailRecipients/index.d.ts +1 -1
  45. package/es/pages/VSubmit/components/EmailRecipients/index.js +1 -1
  46. package/es/pages/VSubmit/components/EmailRecipients/index.js.map +1 -1
  47. package/es/pages/VSubmit/components/EmailRecipients/state.d.ts +1 -1
  48. package/es/routes.js +3 -3
  49. package/es/routes.js.map +1 -1
  50. package/package.json +4 -4
  51. package/es/components/PeopleAccess/NewAccessSelector.d.ts +0 -19
  52. package/es/components/PeopleAccess/NewAccessSelector.js +0 -117
  53. package/es/components/PeopleAccess/NewAccessSelector.js.map +0 -1
  54. package/es/components/PeopleAccess/PeopleAccess.d.ts +0 -8
  55. package/es/components/PeopleAccess/PeopleAccess.js +0 -95
  56. package/es/components/PeopleAccess/PeopleAccess.js.map +0 -1
  57. package/es/components/PeopleAccess/PeopleAccessState.d.ts +0 -25
  58. package/es/components/PeopleAccess/PeopleAccessState.js +0 -145
  59. package/es/components/PeopleAccess/PeopleAccessState.js.map +0 -1
  60. package/es/components/PeopleAccess/RoleSelector.d.ts +0 -13
  61. package/es/components/PeopleAccess/RoleSelector.js +0 -50
  62. package/es/components/PeopleAccess/RoleSelector.js.map +0 -1
  63. package/es/components/PeopleAccess/constants.d.ts +0 -14
  64. package/es/components/PeopleAccess/constants.js +0 -15
  65. package/es/components/PeopleAccess/constants.js.map +0 -1
  66. package/es/components/PeopleAccess/index.d.ts +0 -1
  67. package/es/components/PeopleAccess/index.js +0 -2
  68. package/es/components/PeopleAccess/index.js.map +0 -1
  69. package/es/components/PeopleAccess/index.less +0 -65
  70. package/es/controls/PermissionModal/index.d.ts +0 -6
  71. package/es/controls/PermissionModal/index.js +0 -10
  72. package/es/controls/PermissionModal/index.js.map +0 -1
  73. package/es/controls/PermissionModal/index.less +0 -7
  74. package/es/modules/unit/UnitUIService.d.ts +0 -6
  75. package/es/modules/unit/UnitUIService.js +0 -13
  76. package/es/modules/unit/UnitUIService.js.map +0 -1
  77. package/es/modules/unit/components/ActivityLog/index.d.ts +0 -6
  78. package/es/modules/unit/components/ActivityLog/index.js +0 -62
  79. package/es/modules/unit/components/ActivityLog/index.js.map +0 -1
  80. package/es/modules/unit/components/ActivityLog/index.less +0 -64
  81. package/es/modules/unit/components/ActivityLog/state.d.ts +0 -14
  82. package/es/modules/unit/components/ActivityLog/state.js +0 -51
  83. package/es/modules/unit/components/ActivityLog/state.js.map +0 -1
  84. package/es/modules/unit/components/AddUnitDropdown/index.d.ts +0 -10
  85. package/es/modules/unit/components/AddUnitDropdown/index.js +0 -41
  86. package/es/modules/unit/components/AddUnitDropdown/index.js.map +0 -1
  87. package/es/modules/unit/components/AddUnitDropdown/index.less +0 -58
  88. package/es/modules/unit/components/AddUnitDropdown/state.d.ts +0 -28
  89. package/es/modules/unit/components/AddUnitDropdown/state.js +0 -86
  90. package/es/modules/unit/components/AddUnitDropdown/state.js.map +0 -1
  91. package/es/modules/unit/components/BreadCrumbsHeader/index.d.ts +0 -6
  92. package/es/modules/unit/components/BreadCrumbsHeader/index.js +0 -27
  93. package/es/modules/unit/components/BreadCrumbsHeader/index.js.map +0 -1
  94. package/es/modules/unit/components/BreadCrumbsHeader/index.less +0 -10
  95. package/es/modules/unit/components/BreadCrumbsHeader/state.d.ts +0 -5
  96. package/es/modules/unit/components/BreadCrumbsHeader/state.js +0 -19
  97. package/es/modules/unit/components/BreadCrumbsHeader/state.js.map +0 -1
  98. package/es/modules/unit/components/ChangeUserPassword/index.d.ts +0 -6
  99. package/es/modules/unit/components/ChangeUserPassword/index.js +0 -37
  100. package/es/modules/unit/components/ChangeUserPassword/index.js.map +0 -1
  101. package/es/modules/unit/components/ChangeUserPassword/index.less +0 -13
  102. package/es/modules/unit/components/ContactUserInfoView/index.d.ts +0 -6
  103. package/es/modules/unit/components/ContactUserInfoView/index.js +0 -43
  104. package/es/modules/unit/components/ContactUserInfoView/index.js.map +0 -1
  105. package/es/modules/unit/components/ContactUserInfoView/index.less +0 -30
  106. package/es/modules/unit/components/ContactUserInfoView/state.d.ts +0 -5
  107. package/es/modules/unit/components/ContactUserInfoView/state.js +0 -14
  108. package/es/modules/unit/components/ContactUserInfoView/state.js.map +0 -1
  109. package/es/modules/unit/components/Members/index.d.ts +0 -4
  110. package/es/modules/unit/components/Members/index.js +0 -67
  111. package/es/modules/unit/components/Members/index.js.map +0 -1
  112. package/es/modules/unit/components/Members/index.less +0 -19
  113. package/es/modules/unit/components/Members/state.d.ts +0 -16
  114. package/es/modules/unit/components/Members/state.js +0 -25
  115. package/es/modules/unit/components/Members/state.js.map +0 -1
  116. package/es/modules/unit/components/NewUnitForm/index.d.ts +0 -12
  117. package/es/modules/unit/components/NewUnitForm/index.js +0 -51
  118. package/es/modules/unit/components/NewUnitForm/index.js.map +0 -1
  119. package/es/modules/unit/components/NewUnitForm/index.less +0 -33
  120. package/es/modules/unit/components/NewUnitForm/state.d.ts +0 -22
  121. package/es/modules/unit/components/NewUnitForm/state.js +0 -49
  122. package/es/modules/unit/components/NewUnitForm/state.js.map +0 -1
  123. package/es/modules/unit/components/SubUnitList/index.d.ts +0 -9
  124. package/es/modules/unit/components/SubUnitList/index.js +0 -68
  125. package/es/modules/unit/components/SubUnitList/index.js.map +0 -1
  126. package/es/modules/unit/components/SubUnitList/index.less +0 -28
  127. package/es/modules/unit/components/SubUnitList/state.d.ts +0 -33
  128. package/es/modules/unit/components/SubUnitList/state.js +0 -67
  129. package/es/modules/unit/components/SubUnitList/state.js.map +0 -1
  130. package/es/modules/unit/components/UnitAvatar/index.d.ts +0 -16
  131. package/es/modules/unit/components/UnitAvatar/index.js +0 -30
  132. package/es/modules/unit/components/UnitAvatar/index.js.map +0 -1
  133. package/es/modules/unit/components/UnitAvatar/index.less +0 -7
  134. package/es/modules/unit/components/UnitDetails/index.d.ts +0 -5
  135. package/es/modules/unit/components/UnitDetails/index.js +0 -123
  136. package/es/modules/unit/components/UnitDetails/index.js.map +0 -1
  137. package/es/modules/unit/components/UnitDetails/index.less +0 -63
  138. package/es/modules/unit/components/UnitDetails/state.d.ts +0 -8
  139. package/es/modules/unit/components/UnitDetails/state.js +0 -24
  140. package/es/modules/unit/components/UnitDetails/state.js.map +0 -1
  141. package/es/modules/unit/components/UnitHead/index.d.ts +0 -7
  142. package/es/modules/unit/components/UnitHead/index.js +0 -38
  143. package/es/modules/unit/components/UnitHead/index.js.map +0 -1
  144. package/es/modules/unit/components/UnitHead/index.less +0 -26
  145. package/es/modules/unit/components/UnitHead/state.d.ts +0 -11
  146. package/es/modules/unit/components/UnitHead/state.js +0 -8
  147. package/es/modules/unit/components/UnitHead/state.js.map +0 -1
  148. package/es/modules/unit/components/UnitItem/Item.d.ts +0 -18
  149. package/es/modules/unit/components/UnitItem/Item.js +0 -34
  150. package/es/modules/unit/components/UnitItem/Item.js.map +0 -1
  151. package/es/modules/unit/components/UnitItem/index.d.ts +0 -9
  152. package/es/modules/unit/components/UnitItem/index.js +0 -46
  153. package/es/modules/unit/components/UnitItem/index.js.map +0 -1
  154. package/es/modules/unit/components/UnitItem/index.less +0 -46
  155. package/es/modules/unit/components/UnitItem/state.d.ts +0 -25
  156. package/es/modules/unit/components/UnitItem/state.js +0 -20
  157. package/es/modules/unit/components/UnitItem/state.js.map +0 -1
  158. package/es/modules/unit/components/UnitList/index.d.ts +0 -4
  159. package/es/modules/unit/components/UnitList/index.js +0 -37
  160. package/es/modules/unit/components/UnitList/index.js.map +0 -1
  161. package/es/modules/unit/components/UnitList/index.less +0 -0
  162. package/es/modules/unit/components/UnitList/state.d.ts +0 -15
  163. package/es/modules/unit/components/UnitList/state.js +0 -31
  164. package/es/modules/unit/components/UnitList/state.js.map +0 -1
  165. package/es/modules/unit/components/UnitName/index.d.ts +0 -5
  166. package/es/modules/unit/components/UnitName/index.js +0 -20
  167. package/es/modules/unit/components/UnitName/index.js.map +0 -1
  168. package/es/modules/unit/components/UnitPropertiesView/index.d.ts +0 -6
  169. package/es/modules/unit/components/UnitPropertiesView/index.js +0 -22
  170. package/es/modules/unit/components/UnitPropertiesView/index.js.map +0 -1
  171. package/es/modules/unit/components/UnitPropertiesView/index.less +0 -0
  172. package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.d.ts +0 -15
  173. package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.js +0 -50
  174. package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.js.map +0 -1
  175. package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.less +0 -22
  176. package/es/modules/unit/components/UnitQuickView/index.d.ts +0 -9
  177. package/es/modules/unit/components/UnitQuickView/index.js +0 -30
  178. package/es/modules/unit/components/UnitQuickView/index.js.map +0 -1
  179. package/es/modules/unit/components/UnitQuickView/index.less +0 -63
  180. package/es/modules/unit/components/UnitQuickView/state.d.ts +0 -8
  181. package/es/modules/unit/components/UnitQuickView/state.js +0 -26
  182. package/es/modules/unit/components/UnitQuickView/state.js.map +0 -1
  183. package/es/modules/unit/components/UnitSortableTree/index.d.ts +0 -10
  184. package/es/modules/unit/components/UnitSortableTree/index.js +0 -70
  185. package/es/modules/unit/components/UnitSortableTree/index.js.map +0 -1
  186. package/es/modules/unit/components/UnitSortableTree/state.d.ts +0 -55
  187. package/es/modules/unit/components/UnitSortableTree/state.js +0 -166
  188. package/es/modules/unit/components/UnitSortableTree/state.js.map +0 -1
  189. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.d.ts +0 -3
  190. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.js +0 -22
  191. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.js.map +0 -1
  192. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.d.ts +0 -3
  193. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +0 -82
  194. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +0 -1
  195. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +0 -316
  196. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.d.ts +0 -3
  197. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +0 -21
  198. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +0 -1
  199. package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +0 -4
  200. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/index.d.ts +0 -4
  201. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/index.js +0 -23
  202. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +0 -1
  203. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +0 -3
  204. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js +0 -58
  205. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +0 -1
  206. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.less +0 -45
  207. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +0 -3
  208. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js +0 -73
  209. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +0 -1
  210. package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.less +0 -12
  211. package/es/modules/unit/components/UnitTabs/index.d.ts +0 -6
  212. package/es/modules/unit/components/UnitTabs/index.js +0 -35
  213. package/es/modules/unit/components/UnitTabs/index.js.map +0 -1
  214. package/es/modules/unit/components/UnitsSelectDialog/index.d.ts +0 -9
  215. package/es/modules/unit/components/UnitsSelectDialog/index.js +0 -35
  216. package/es/modules/unit/components/UnitsSelectDialog/index.js.map +0 -1
  217. package/es/modules/unit/components/UnitsSelectDialog/index.less +0 -36
  218. package/es/modules/unit/components/UnitsSelectDialog/state.d.ts +0 -22
  219. package/es/modules/unit/components/UnitsSelectDialog/state.js +0 -73
  220. package/es/modules/unit/components/UnitsSelectDialog/state.js.map +0 -1
  221. package/es/modules/unit/controls/ContactSelect/index.d.ts +0 -9
  222. package/es/modules/unit/controls/ContactSelect/index.js +0 -78
  223. package/es/modules/unit/controls/ContactSelect/index.js.map +0 -1
  224. package/es/modules/unit/controls/ContactSelect/state.d.ts +0 -23
  225. package/es/modules/unit/controls/ContactSelect/state.js +0 -43
  226. package/es/modules/unit/controls/ContactSelect/state.js.map +0 -1
  227. package/es/modules/unit/controls/QuickDataIcon/UnitTeamsIcon/index.d.ts +0 -6
  228. package/es/modules/unit/controls/QuickDataIcon/UnitTeamsIcon/index.js +0 -32
  229. package/es/modules/unit/controls/QuickDataIcon/UnitTeamsIcon/index.js.map +0 -1
  230. package/es/modules/unit/controls/QuickDataIcon/UnitTeamsIcon/index.less +0 -21
  231. package/es/modules/unit/controls/QuickDataIcon/index.d.ts +0 -21
  232. package/es/modules/unit/controls/QuickDataIcon/index.js +0 -36
  233. package/es/modules/unit/controls/QuickDataIcon/index.js.map +0 -1
  234. package/es/modules/unit/controls/QuickDataIcon/index.less +0 -12
  235. package/es/modules/unit/controls/ToolBar/ContactMenu/index.d.ts +0 -13
  236. package/es/modules/unit/controls/ToolBar/ContactMenu/index.js +0 -66
  237. package/es/modules/unit/controls/ToolBar/ContactMenu/index.js.map +0 -1
  238. package/es/modules/unit/controls/ToolBar/ContactMenu/index.less +0 -20
  239. package/es/modules/unit/controls/ToolBar/ContactMenu/state.d.ts +0 -36
  240. package/es/modules/unit/controls/ToolBar/ContactMenu/state.js +0 -78
  241. package/es/modules/unit/controls/ToolBar/ContactMenu/state.js.map +0 -1
  242. package/es/modules/unit/controls/ToolBar/index.d.ts +0 -12
  243. package/es/modules/unit/controls/ToolBar/index.js +0 -56
  244. package/es/modules/unit/controls/ToolBar/index.js.map +0 -1
  245. package/es/modules/unit/controls/ToolBar/index.less +0 -18
  246. package/es/modules/unit/controls/ToolBar/state.d.ts +0 -42
  247. package/es/modules/unit/controls/ToolBar/state.js +0 -62
  248. package/es/modules/unit/controls/ToolBar/state.js.map +0 -1
  249. package/es/modules/unit/controls/UnitTypeFilter/index.d.ts +0 -3
  250. package/es/modules/unit/controls/UnitTypeFilter/index.js +0 -21
  251. package/es/modules/unit/controls/UnitTypeFilter/index.js.map +0 -1
  252. package/es/modules/unit/controls/UnitTypeFilter/state.d.ts +0 -18
  253. package/es/modules/unit/controls/UnitTypeFilter/state.js +0 -63
  254. package/es/modules/unit/controls/UnitTypeFilter/state.js.map +0 -1
  255. package/es/modules/unit/data/StoreContext/index.d.ts +0 -3
  256. package/es/modules/unit/data/StoreContext/index.js +0 -4
  257. package/es/modules/unit/data/StoreContext/index.js.map +0 -1
  258. package/es/modules/unit/data/UnitContext/index.d.ts +0 -18
  259. package/es/modules/unit/data/UnitContext/index.js +0 -32
  260. package/es/modules/unit/data/UnitContext/index.js.map +0 -1
  261. package/es/modules/unit/data/UnitStore.d.ts +0 -124
  262. package/es/modules/unit/data/UnitStore.js +0 -226
  263. package/es/modules/unit/data/UnitStore.js.map +0 -1
  264. package/es/modules/unit/data/UnitType.d.ts +0 -1
  265. package/es/modules/unit/data/UnitType.js +0 -18
  266. package/es/modules/unit/data/UnitType.js.map +0 -1
  267. package/es/modules/unit/data/UserStore.d.ts +0 -33
  268. package/es/modules/unit/data/UserStore.js +0 -53
  269. package/es/modules/unit/data/UserStore.js.map +0 -1
  270. package/es/modules/unit/data/hooks/index.d.ts +0 -7
  271. package/es/modules/unit/data/hooks/index.js +0 -8
  272. package/es/modules/unit/data/hooks/index.js.map +0 -1
  273. package/es/modules/unit/data/hooks/member-events/index.d.ts +0 -3
  274. package/es/modules/unit/data/hooks/member-events/index.js +0 -4
  275. package/es/modules/unit/data/hooks/member-events/index.js.map +0 -1
  276. package/es/modules/unit/data/hooks/member-events/useAutoUpdateMemberListData.d.ts +0 -4
  277. package/es/modules/unit/data/hooks/member-events/useAutoUpdateMemberListData.js +0 -13
  278. package/es/modules/unit/data/hooks/member-events/useAutoUpdateMemberListData.js.map +0 -1
  279. package/es/modules/unit/data/hooks/member-events/useOnDeleteMember.d.ts +0 -4
  280. package/es/modules/unit/data/hooks/member-events/useOnDeleteMember.js +0 -17
  281. package/es/modules/unit/data/hooks/member-events/useOnDeleteMember.js.map +0 -1
  282. package/es/modules/unit/data/hooks/member-events/useOnNewMember.d.ts +0 -4
  283. package/es/modules/unit/data/hooks/member-events/useOnNewMember.js +0 -17
  284. package/es/modules/unit/data/hooks/member-events/useOnNewMember.js.map +0 -1
  285. package/es/modules/unit/data/hooks/unit-events/index.d.ts +0 -3
  286. package/es/modules/unit/data/hooks/unit-events/index.js +0 -4
  287. package/es/modules/unit/data/hooks/unit-events/index.js.map +0 -1
  288. package/es/modules/unit/data/hooks/unit-events/useAutoUpdateUnitListData.d.ts +0 -4
  289. package/es/modules/unit/data/hooks/unit-events/useAutoUpdateUnitListData.js +0 -13
  290. package/es/modules/unit/data/hooks/unit-events/useAutoUpdateUnitListData.js.map +0 -1
  291. package/es/modules/unit/data/hooks/unit-events/useOnDeleteUnit.d.ts +0 -4
  292. package/es/modules/unit/data/hooks/unit-events/useOnDeleteUnit.js +0 -17
  293. package/es/modules/unit/data/hooks/unit-events/useOnDeleteUnit.js.map +0 -1
  294. package/es/modules/unit/data/hooks/unit-events/useOnNewUnit.d.ts +0 -4
  295. package/es/modules/unit/data/hooks/unit-events/useOnNewUnit.js +0 -17
  296. package/es/modules/unit/data/hooks/unit-events/useOnNewUnit.js.map +0 -1
  297. package/es/modules/unit/data/hooks/useTeamListEffect.d.ts +0 -8
  298. package/es/modules/unit/data/hooks/useTeamListEffect.js +0 -27
  299. package/es/modules/unit/data/hooks/useTeamListEffect.js.map +0 -1
  300. package/es/modules/unit/data/hooks/useUnit.d.ts +0 -6
  301. package/es/modules/unit/data/hooks/useUnit.js +0 -12
  302. package/es/modules/unit/data/hooks/useUnit.js.map +0 -1
  303. package/es/modules/unit/data/hooks/useUnitActivityListEffect.d.ts +0 -8
  304. package/es/modules/unit/data/hooks/useUnitActivityListEffect.js +0 -16
  305. package/es/modules/unit/data/hooks/useUnitActivityListEffect.js.map +0 -1
  306. package/es/modules/unit/data/hooks/useUnitListEffect.d.ts +0 -8
  307. package/es/modules/unit/data/hooks/useUnitListEffect.js +0 -28
  308. package/es/modules/unit/data/hooks/useUnitListEffect.js.map +0 -1
  309. package/es/modules/unit/data/hooks/useUserInfo.d.ts +0 -6
  310. package/es/modules/unit/data/hooks/useUserInfo.js +0 -12
  311. package/es/modules/unit/data/hooks/useUserInfo.js.map +0 -1
  312. package/es/modules/unit/data/index.d.ts +0 -4
  313. package/es/modules/unit/data/index.js +0 -5
  314. package/es/modules/unit/data/index.js.map +0 -1
  315. package/es/modules/unit/data/interfaces/IAddress.d.ts +0 -14
  316. package/es/modules/unit/data/interfaces/IAddress.js +0 -1
  317. package/es/modules/unit/data/interfaces/IAddress.js.map +0 -1
  318. package/es/modules/unit/data/interfaces/IEntityName.d.ts +0 -6
  319. package/es/modules/unit/data/interfaces/IEntityName.js +0 -1
  320. package/es/modules/unit/data/interfaces/IEntityName.js.map +0 -1
  321. package/es/modules/unit/data/interfaces/IUnit.d.ts +0 -51
  322. package/es/modules/unit/data/interfaces/IUnit.js +0 -1
  323. package/es/modules/unit/data/interfaces/IUnit.js.map +0 -1
  324. package/es/modules/unit/data/interfaces/IUserInfo.d.ts +0 -12
  325. package/es/modules/unit/data/interfaces/IUserInfo.js +0 -1
  326. package/es/modules/unit/data/interfaces/IUserInfo.js.map +0 -1
  327. package/es/modules/unit/data/interfaces/index.d.ts +0 -4
  328. package/es/modules/unit/data/interfaces/index.js +0 -5
  329. package/es/modules/unit/data/interfaces/index.js.map +0 -1
  330. package/es/modules/unit/pages/UnitDefaultView/index.d.ts +0 -3
  331. package/es/modules/unit/pages/UnitDefaultView/index.js +0 -47
  332. package/es/modules/unit/pages/UnitDefaultView/index.js.map +0 -1
  333. package/es/modules/unit/pages/UnitDefaultView/index.less +0 -17
  334. package/es/modules/unit/pages/UnitListView/index.d.ts +0 -3
  335. package/es/modules/unit/pages/UnitListView/index.js +0 -10
  336. package/es/modules/unit/pages/UnitListView/index.js.map +0 -1
  337. package/es/modules/unit/pages/UnitTreeView/index.d.ts +0 -3
  338. package/es/modules/unit/pages/UnitTreeView/index.js +0 -47
  339. package/es/modules/unit/pages/UnitTreeView/index.js.map +0 -1
  340. package/es/modules/unit/pages/UnitTreeView/index.less +0 -31
  341. package/es/modules/unit/pages/UnitTreeView/state.d.ts +0 -5
  342. package/es/modules/unit/pages/UnitTreeView/state.js +0 -14
  343. package/es/modules/unit/pages/UnitTreeView/state.js.map +0 -1
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { State } from "./state";
3
- import classnames from "classnames";
4
- import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
5
- import { useObserver } from "mobx-react-lite";
6
- const UnitTypeFilter = () => {
7
- /** 引入父組件的 FilterOptionsContextState */
8
- const context = useFilterOptionsContext();
9
- /** 尝试从 context 取得 Type, 如果没有的话context会使用第二个factory参数创建一个State. */
10
- const state = context.getFilterState("Type", () => new State());
11
- return useObserver(() => (React.createElement("div", null,
12
- React.createElement("div", { className: "menu-item-title" }, "Types"),
13
- state.menus.map(item => (React.createElement("div", { key: item.value, className: classnames("filter-menu-item", {
14
- bold: state.types.has(item.value)
15
- }), onClick: () => state.changeType(item.value) },
16
- React.createElement("div", { className: "filter-name" },
17
- item.icon,
18
- item.name)))))));
19
- };
20
- export default UnitTypeFilter;
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/controls/UnitTypeFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,uCAAuC;IACvC,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,kEAAkE;IAClE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAEhE,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB;QACC,6BAAK,SAAS,EAAC,iBAAiB,YAAY;QAC3C,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACxB,6BACC,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE;gBACzC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aACjC,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;YAE3C,6BAAK,SAAS,EAAC,aAAa;gBAC1B,IAAI,CAAC,IAAI;gBACT,IAAI,CAAC,IAAI,CACL,CACD,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,cAAc,CAAC"}
@@ -1,18 +0,0 @@
1
- /// <reference types="react" />
2
- import { FilterOption } from "@voplus/morpho-data";
3
- import { IFilterState } from "@voplus/morpho-ui/es/data";
4
- /** TypeFilter的 State, 实现 IFilterState 接口 */
5
- export declare class State implements IFilterState {
6
- /** Types of unit of filter */
7
- types: Map<string, boolean>;
8
- /** Alter unit type */
9
- changeType(value: string): void;
10
- get menus(): {
11
- name: string;
12
- value: string;
13
- icon: JSX.Element;
14
- }[];
15
- /** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
16
- get filters(): FilterOption[];
17
- reset(): void;
18
- }
@@ -1,63 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { action, observable } from "mobx";
3
- import { faSitemap, faUser, faUserCircle, faUsers } from "@fortawesome/free-solid-svg-icons";
4
- import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
5
- import React from "react";
6
- /** TypeFilter的 State, 实现 IFilterState 接口 */
7
- export class State {
8
- constructor() {
9
- /** Types of unit of filter */
10
- this.types = new Map();
11
- }
12
- /** Alter unit type */
13
- changeType(value) {
14
- this.types.has(value) ? this.types.delete(value) : this.types.set(value, true);
15
- }
16
- get menus() {
17
- return [
18
- {
19
- name: "Account",
20
- value: "Account",
21
- icon: React.createElement(FAIcon, { icon: faUserCircle, color: "#fd7e14", className: "icon" })
22
- },
23
- {
24
- name: "Organization",
25
- value: "Organization",
26
- icon: React.createElement(FAIcon, { icon: faSitemap, color: "#ff4d4f", className: "icon" })
27
- },
28
- {
29
- name: "User",
30
- value: "User",
31
- icon: React.createElement(FAIcon, { icon: faUser, color: "#ff4d4f", className: "icon" })
32
- },
33
- {
34
- name: "Team",
35
- value: "Team",
36
- icon: React.createElement(FAIcon, { icon: faUsers, color: "#ff4d4f", className: "icon" })
37
- }
38
- ];
39
- }
40
- /** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
41
- get filters() {
42
- if (this.types.size === 0)
43
- return [];
44
- return [
45
- {
46
- c: "Type",
47
- o: "contains",
48
- v1: JSON.stringify(Array.from(this.types.keys())),
49
- l: "And"
50
- }
51
- ];
52
- }
53
- reset() {
54
- this.types.clear();
55
- }
56
- }
57
- __decorate([
58
- observable
59
- ], State.prototype, "types", void 0);
60
- __decorate([
61
- action
62
- ], State.prototype, "changeType", null);
63
- //# sourceMappingURL=state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/unit/controls/UnitTypeFilter/state.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAE7F,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAG3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,4CAA4C;AAC5C,MAAM,OAAO,KAAK;IAAlB;QACC,8BAA8B;QACX,UAAK,GAAyB,IAAI,GAAG,EAAE,CAAC;IAiD5D,CAAC;IA/CA,sBAAsB;IAEf,UAAU,CAAC,KAAa;QAC9B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAED,IAAW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- export declare const localFormat: (time?: any, format?: string | undefined) => string;
3
- export declare const toLocal: (time: any) => moment.Moment;
@@ -1,4 +0,0 @@
1
- import moment from "moment";
2
- export const localFormat = (time, format) => moment(moment.utc(time).toDate()).format(format);
3
- export const toLocal = (time) => moment(moment.utc(time).valueOf());
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/StoreContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAU,EAAE,MAAe,EAAE,EAAE,CAC1D,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- /// <reference types="react" />
2
- export declare class UnitContextState {
3
- onUnitSelected?: (params?: any) => void;
4
- /** Construct a new UnitContextState
5
- * @param options - Optional initial Unit options values.
6
- */
7
- constructor(options?: {
8
- onUnitSelected?: (params?: any) => void;
9
- });
10
- /** Retrieve a clean OptionsObject */
11
- get options(): {
12
- UnitSelected: ((params?: any) => void) | undefined;
13
- };
14
- }
15
- /** React context for ContextState. */
16
- export declare const UnitContext: import("react").Context<UnitContextState>;
17
- /** React hook to retrieve the nearest ContextState. */
18
- export declare function useUnitContext(): UnitContextState;
@@ -1,32 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { computed, observable, toJS } from "mobx";
3
- import { createContext, useContext } from "react";
4
- export class UnitContextState {
5
- /** Construct a new UnitContextState
6
- * @param options - Optional initial Unit options values.
7
- */
8
- constructor(options) {
9
- if (options) {
10
- this.onUnitSelected = options.onUnitSelected;
11
- }
12
- }
13
- /** Retrieve a clean OptionsObject */
14
- get options() {
15
- return {
16
- UnitSelected: toJS(this.onUnitSelected)
17
- };
18
- }
19
- }
20
- __decorate([
21
- observable
22
- ], UnitContextState.prototype, "onUnitSelected", void 0);
23
- __decorate([
24
- computed
25
- ], UnitContextState.prototype, "options", null);
26
- /** React context for ContextState. */
27
- export const UnitContext = createContext(null);
28
- /** React hook to retrieve the nearest ContextState. */
29
- export function useUnitContext() {
30
- return useContext(UnitContext);
31
- }
32
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/UnitContext/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,OAAO,gBAAgB;IAG5B;;OAEG;IACH,YAAmB,OAAqD;QACvE,IAAI,OAAO,EAAE;YACZ,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;SAC7C;IACF,CAAC;IAED,qCAAqC;IAErC,IAAW,OAAO;QACjB,OAAO;YACN,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AAlBY;IAAX,UAAU;wDAAgD;AAa3D;IADC,QAAQ;+CAKR;AAGF,sCAAsC;AACtC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAmB,IAAW,CAAC,CAAC;AAExE,uDAAuD;AACvD,MAAM,UAAU,cAAc;IAC7B,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC"}
@@ -1,124 +0,0 @@
1
- import { ApiEndPoint } from "@voplus/api";
2
- import { CountedMap, LoadOptions, Store } from "@voplus/morpho-data";
3
- import { FilterOption, PageParameters } from "@voplus/morpho-data/es/types";
4
- import { IAddress, IUnit } from "./interfaces";
5
- import { IActivityLog } from "@voplus/morpho-collaboration/es/data/interfaces/IActivityLog";
6
- /** Custom load contact list options type */
7
- export declare type LoadUnitListOptions = {
8
- Includes?: string;
9
- reload?: boolean;
10
- /** Parent id of of the units to be loaded */
11
- parent?: string;
12
- Filters?: FilterOption[];
13
- Page?: PageParameters;
14
- };
15
- /** Custom load contact options type */
16
- export declare type LoadUnitOptions = {
17
- /** Comma separated include options e.g. path */
18
- includes?: string;
19
- } & LoadOptions<IUnit>;
20
- export declare type EditUnitOptions = {
21
- /** New name of the contact. */
22
- Name?: string;
23
- /** New Size of the contact. */
24
- Size?: string;
25
- /** New Gender of the contact. */
26
- Gender?: "Male" | "Female";
27
- /** New Email of the contact. */
28
- Email?: string;
29
- /** New Address of the contact. */
30
- Address?: IAddress;
31
- /** New Phone of the contact. */
32
- Phone?: string;
33
- /** New Nationality of the contact. */
34
- Nationality?: string;
35
- /** New Birthday of the contact. */
36
- Birthday?: string;
37
- };
38
- /** Custom load contact list options type. */
39
- export declare type DeleteUnitOptions = {
40
- DeleteChilds?: boolean;
41
- };
42
- export declare class UnitStore extends Store {
43
- private readonly _api;
44
- readonly name: string;
45
- /** Contac created event dispatcher */
46
- private readonly _created;
47
- private readonly _deleted;
48
- private readonly _memberCreated;
49
- private readonly _memberDeleted;
50
- constructor(_api: ApiEndPoint);
51
- /** Id of documents to be moved. */
52
- moveIds: string[];
53
- /** Event fires when a new unit has been created. */
54
- get UnitCreatedEvent(): import("strongly-typed-events").IEvent<UnitStore, IUnit>;
55
- /** Event fires when a delete contact has been deleted. */
56
- get UnitDeletedEvent(): import("strongly-typed-events").IEvent<UnitStore, IUnit>;
57
- /** Event fires when a new member has been created. */
58
- get MemberCreatedEvent(): import("strongly-typed-events").IEvent<UnitStore, IUnit>;
59
- /** Event fires when a delete member has been deleted. */
60
- get MemberDeletedEvent(): import("strongly-typed-events").IEvent<UnitStore, IUnit>;
61
- readonly items: CountedMap<string, IUnit>;
62
- /** Create a default contact object with optional default values. */
63
- static createDefaultContact(defaultValues?: Partial<IUnit>): IUnit;
64
- /** Create a new contact base on type. */
65
- create(options: {
66
- name: string;
67
- type?: string;
68
- email?: string;
69
- }): Promise<IUnit>;
70
- /** Create a sub unit under parent. */
71
- createSubUnit(options: {
72
- name: string;
73
- parentId: string;
74
- type: string;
75
- }): Promise<IUnit>;
76
- /** 新增用戶至Group.
77
- * pid是小組id type必须是Team
78
- * id 是現有用戶id (必须是用户)
79
- */
80
- addUserFromGroup(options: {
81
- pid: string;
82
- id: string;
83
- }): Promise<IUnit>;
84
- /** Load a task from server.
85
- * @param {string} id - id of the task.
86
- * @param {LoadTaskOptions} options - Optional load options.
87
- */
88
- load(id: string, options: LoadUnitOptions): Promise<IUnit>;
89
- /** Refresh a loaded unit. */
90
- refresh(id: string, options: LoadUnitOptions): Promise<void>;
91
- private _listCache;
92
- /** Load a list of contacts from server.
93
- * @param {LoadTaskListOptions}
94
- */
95
- loadList(options?: LoadUnitListOptions): Promise<any>;
96
- private loadUnitsFromServer;
97
- /** Load a list of team of a contact from server.
98
- * @param id - id of the contact.
99
- * @param {LoadUnitListOptions}
100
- */
101
- loadTeamList(id: string, options?: LoadUnitListOptions): Promise<IUnit[]>;
102
- /** Load a list of activities of a contact from server.
103
- * @param id - id of the contact.
104
- * @param {LoadUnitListOptions}
105
- */
106
- loadActivityList(id: string, options?: LoadUnitListOptions): Promise<IActivityLog[]>;
107
- /** Edit an existing item on server. */
108
- edit(id: string, options: EditUnitOptions): Promise<void>;
109
- delete(id: string): Promise<IUnit>;
110
- /** 把用戶從Group移除
111
- * pid是小組id
112
- * id 是現有用戶id (必须是用户)
113
- */
114
- deleteUser(options: {
115
- pid: string;
116
- id: string;
117
- }): Promise<IUnit>;
118
- moveAfter(id: string, afterId?: string): Promise<void>;
119
- cut(ids: string[]): void;
120
- paste(target: string): void;
121
- move(ids: string[], targetId?: string): Promise<any>;
122
- }
123
- /** React hook to retrieve ContactStore */
124
- export declare const useUnitStore: () => UnitStore;
@@ -1,226 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { RequestBuilder } from "@voplus/api";
3
- import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
4
- import { action, observable, toJS } from "mobx";
5
- import { EventDispatcher } from "strongly-typed-events";
6
- import hash from "object-hash";
7
- import invariant from "invariant";
8
- import { setTimeout } from "timers";
9
- const StoreName = "UnitStore";
10
- export class UnitStore extends Store {
11
- constructor(_api) {
12
- super();
13
- this._api = _api;
14
- this.name = StoreName;
15
- /** Contac created event dispatcher */
16
- this._created = new EventDispatcher();
17
- this._deleted = new EventDispatcher();
18
- this._memberCreated = new EventDispatcher();
19
- this._memberDeleted = new EventDispatcher();
20
- /** Id of documents to be moved. */
21
- this.moveIds = [];
22
- this.items = new CountedMap((key) => UnitStore.createDefaultContact({ id: key }), observable.map([], { deep: true }));
23
- this._listCache = new Map();
24
- invariant(_api, `API cannot be ${_api}.`);
25
- }
26
- /** Event fires when a new unit has been created. */
27
- get UnitCreatedEvent() {
28
- return this._created.asEvent();
29
- }
30
- /** Event fires when a delete contact has been deleted. */
31
- get UnitDeletedEvent() {
32
- return this._deleted.asEvent();
33
- }
34
- /** Event fires when a new member has been created. */
35
- get MemberCreatedEvent() {
36
- return this._memberCreated.asEvent();
37
- }
38
- /** Event fires when a delete member has been deleted. */
39
- get MemberDeletedEvent() {
40
- return this._memberDeleted.asEvent();
41
- }
42
- /** Create a default contact object with optional default values. */
43
- static createDefaultContact(defaultValues) {
44
- const v = { loaded: false, address: {}, primaryLegalIdentity: {} };
45
- if (defaultValues)
46
- Object.assign(v, defaultValues);
47
- return v;
48
- }
49
- /** Create a new contact base on type. */
50
- async create(options) {
51
- invariant(options.name, "Name cannot be empty.");
52
- const r = await this._api.post(`api/units/create`, new RequestBuilder().form(options));
53
- const t = (await r.json());
54
- this._created.dispatch(this, t);
55
- console.log("create", t);
56
- return t;
57
- }
58
- /** Create a sub unit under parent. */
59
- async createSubUnit(options) {
60
- invariant(options.name, "Name cannot be empty.");
61
- const r = await this._api.post(`api/groups/create`, new RequestBuilder().form(options));
62
- const t = (await r.json());
63
- this._created.dispatch(this, t);
64
- console.log("createFromType", t);
65
- return t;
66
- }
67
- /** 新增用戶至Group.
68
- * pid是小組id type必须是Team
69
- * id 是現有用戶id (必须是用户)
70
- */
71
- async addUserFromGroup(options) {
72
- // invariant(options.name, "Name cannot be empty.");
73
- const r = await this._api.post(`/api/groups/${options.pid}/add/${options.id}`);
74
- const t = (await r.json());
75
- t.parentNodeId = options.pid;
76
- this._memberCreated.dispatch(this, t);
77
- console.log("addUserFromGroup", t);
78
- return t;
79
- }
80
- /** Load a task from server.
81
- * @param {string} id - id of the task.
82
- * @param {LoadTaskOptions} options - Optional load options.
83
- */
84
- async load(id, options) {
85
- let query = "";
86
- if (options.includes)
87
- query = query.concat(`includes=${options.includes}`);
88
- if (query)
89
- query = "?".concat(query);
90
- const r = await this._api.get(`/units/${id}${query}`);
91
- return (await r.json());
92
- }
93
- /** Refresh a loaded unit. */
94
- async refresh(id, options) {
95
- if (!this.items.has(id))
96
- return;
97
- const c = await this.load(id, options);
98
- this.items.overwrite(id, c);
99
- }
100
- /** Load a list of contacts from server.
101
- * @param {LoadTaskListOptions}
102
- */
103
- async loadList(options) {
104
- options = options !== null && options !== void 0 ? options : { Filters: [] };
105
- // skip local cache with paging.
106
- if (options === null || options === void 0 ? void 0 : options.Page)
107
- return await this.loadUnitsFromServer(options);
108
- // const reload = options.reload;
109
- delete options["reload"];
110
- // Calculate hash code for load options.
111
- const hc = hash(options);
112
- // load from server if not cached
113
- if (!this._listCache.has(hc)) {
114
- const result = await this.loadUnitsFromServer(options);
115
- // Save cache and clear time out.
116
- this._listCache.set(hc, result);
117
- setTimeout(() => {
118
- this._listCache.delete(hc);
119
- }, 5 * 60 * 1000);
120
- }
121
- return this._listCache.get(hc);
122
- }
123
- async loadUnitsFromServer(options) {
124
- const urlPostFix = options.parent ? `/${options.parent}/units` : "";
125
- const r = await this._api.post(`/units${urlPostFix}`, new RequestBuilder().json(options));
126
- const result = await r.json();
127
- return result;
128
- }
129
- /** Load a list of team of a contact from server.
130
- * @param id - id of the contact.
131
- * @param {LoadUnitListOptions}
132
- */
133
- async loadTeamList(id, options) {
134
- invariant(id, "id cannot be empty");
135
- const r = await this._api.post(`/api/groups/${id}/members`, new RequestBuilder().json(options ? options : {}));
136
- return (await r.json());
137
- }
138
- /** Load a list of activities of a contact from server.
139
- * @param id - id of the contact.
140
- * @param {LoadUnitListOptions}
141
- */
142
- async loadActivityList(id, options) {
143
- invariant(id, "id cannot be empty");
144
- let query = "";
145
- if (options === null || options === void 0 ? void 0 : options.Includes) {
146
- query = query.concat(`includes=${options.Includes}`);
147
- }
148
- if (query)
149
- query = "?".concat(query);
150
- const r = await this._api.post(`/units/${id}/activities${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
151
- return (await r.json());
152
- }
153
- /** Edit an existing item on server. */
154
- async edit(id, options) {
155
- const r = await this._api.post(`api/units/${id}/info`, new RequestBuilder().json(options));
156
- const t = await r.json();
157
- this.items.overwrite(t.id, t);
158
- }
159
- async delete(id) {
160
- await this._api.delete(`api/groups/${id}`);
161
- const item = this.items.peek(id);
162
- this._deleted.dispatch(this, item);
163
- return item;
164
- }
165
- /** 把用戶從Group移除
166
- * pid是小組id
167
- * id 是現有用戶id (必须是用户)
168
- */
169
- async deleteUser(options) {
170
- await this._api.delete(`api/groups/${options.pid}/remove/${options.id}`);
171
- const item = this.items.peek(options.id);
172
- item.parentNodeId = options.pid;
173
- this._memberDeleted.dispatch(this, item);
174
- return item;
175
- }
176
- async moveAfter(id, afterId) {
177
- await this._api.post(`api/units/${id}/move?afterId=${afterId}`);
178
- }
179
- cut(ids) {
180
- invariant(ids, "Ids cannot be empty.");
181
- this.moveIds = ids;
182
- }
183
- paste(target) {
184
- this.move(toJS(this.moveIds), target);
185
- this.moveIds = [];
186
- }
187
- async move(ids, targetId) {
188
- const result = await this._api.post(`api/units/move`, new RequestBuilder().json({ Ids: ids, TargetId: targetId }));
189
- const moved = await result.json();
190
- for (const item of moved) {
191
- this._created.dispatch(this, item);
192
- }
193
- this._deleted.dispatch(this, moved);
194
- return moved;
195
- }
196
- }
197
- __decorate([
198
- observable
199
- ], UnitStore.prototype, "moveIds", void 0);
200
- __decorate([
201
- observable
202
- ], UnitStore.prototype, "items", void 0);
203
- __decorate([
204
- action
205
- ], UnitStore.prototype, "delete", null);
206
- __decorate([
207
- action
208
- ], UnitStore.prototype, "moveAfter", null);
209
- __decorate([
210
- action
211
- ], UnitStore.prototype, "cut", null);
212
- __decorate([
213
- action
214
- ], UnitStore.prototype, "paste", null);
215
- __decorate([
216
- action
217
- ], UnitStore.prototype, "move", null);
218
- /** React hook to retrieve ContactStore */
219
- export const useUnitStore = () => {
220
- const context = useApplicationContext();
221
- if (!context.getStore(StoreName)) {
222
- context.addStore(new UnitStore(context.api.currentEndPoint));
223
- }
224
- return context.getStore(StoreName);
225
- };
226
- //# sourceMappingURL=UnitStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnitStore.js","sourceRoot":"","sources":["../../../../src/modules/unit/data/UnitStore.ts"],"names":[],"mappings":";AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAe,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG5F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,SAAS,GAAG,WAAW,CAAC;AAqD9B,MAAM,OAAO,SAAU,SAAQ,KAAK;IAQnC,YAAoC,IAAiB;QACpD,KAAK,EAAE,CAAC;QAD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Organization" | "Team" | "Account" | "User";
@@ -1,18 +0,0 @@
1
- // export const DocumentType = {
2
- // Default: "Document",
3
- // Container: "Container",
4
- // Folder: "Document",
5
- // Task: "Task",
6
- // Project: "Project",
7
- // File: "File",
8
- // Text: "Text",
9
- // Meeting: "Meeting",
10
- // Agenda: "Agenda",
11
- // Board: "Board",
12
- // Graph: "Graph",
13
- // Quotation: "Quotation",
14
- // Dashboard: "Dashboard",
15
- // Invoice: "Invoice",
16
- // Journal: "Journal"
17
- // };
18
- //# sourceMappingURL=UnitType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnitType.js","sourceRoot":"","sources":["../../../../src/modules/unit/data/UnitType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,wBAAwB;AACxB,2BAA2B;AAC3B,uBAAuB;AACvB,iBAAiB;AACjB,uBAAuB;AACvB,iBAAiB;AACjB,iBAAiB;AACjB,uBAAuB;AACvB,qBAAqB;AACrB,mBAAmB;AACnB,mBAAmB;AACnB,2BAA2B;AAC3B,2BAA2B;AAC3B,uBAAuB;AACvB,sBAAsB;AACtB,KAAK"}
@@ -1,33 +0,0 @@
1
- import { ApiEndPoint } from "@voplus/api";
2
- import { CountedMap, LoadOptions, Store } from "@voplus/morpho-data";
3
- import { IUserInfo } from "./interfaces";
4
- /** Custom load contact options type */
5
- export declare type LoadUserOptions = {
6
- /** Comma separated include options e.g. path */
7
- includes?: string;
8
- } & LoadOptions<IUserInfo>;
9
- export declare type EditUserOptions = {
10
- Activate?: boolean;
11
- Password?: {
12
- Current?: string;
13
- New: string;
14
- Confirm: string;
15
- };
16
- };
17
- export declare class UserStore extends Store {
18
- private readonly _api;
19
- readonly name: string;
20
- constructor(_api: ApiEndPoint);
21
- readonly items: CountedMap<string, IUserInfo>;
22
- /** Create a default contact object with optional default values. */
23
- static createDefaultContact(defaultValues?: Partial<IUserInfo>): IUserInfo;
24
- /** Load a task from server.
25
- * @param {string} id - id of the task.
26
- * @param {LoadTaskOptions} options - Optional load options.
27
- */
28
- load(id: string, options: LoadUserOptions): Promise<IUserInfo>;
29
- /** Edit an existing item on server. */
30
- edit(id: string, options: EditUserOptions): Promise<void>;
31
- }
32
- /** React hook to retrieve ContactStore */
33
- export declare const useUserStore: () => UserStore;