@etsoo/smarterp-core 1.0.1 → 1.0.3

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 (342) hide show
  1. package/__tests__/OrgApi.ts +6 -3
  2. package/__tests__/PublicApi.ts +3 -1
  3. package/__tests__/UserApi.ts +1 -1
  4. package/__tests__/app/TestApp.ts +4 -3
  5. package/__tests__/tsconfig.json +4 -3
  6. package/lib/cjs/AppApi.d.ts +106 -0
  7. package/lib/cjs/AppApi.js +117 -0
  8. package/lib/cjs/AuthCodeApi.d.ts +29 -0
  9. package/lib/cjs/AuthCodeApi.js +50 -0
  10. package/lib/cjs/CoreApp.d.ts +164 -0
  11. package/lib/cjs/CoreApp.js +134 -0
  12. package/lib/cjs/CoreUtils.d.ts +4 -0
  13. package/lib/cjs/CoreUtils.js +2 -0
  14. package/lib/cjs/ICoreServiceApp.d.ts +30 -0
  15. package/lib/cjs/ICoreServiceApp.js +49 -0
  16. package/lib/cjs/MemberApi.d.ts +78 -0
  17. package/lib/cjs/MemberApi.js +91 -0
  18. package/lib/{OrgApi.d.ts → cjs/OrgApi.d.ts} +9 -2
  19. package/lib/cjs/OrgApi.js +119 -0
  20. package/lib/{PublicApi.d.ts → cjs/PublicApi.d.ts} +17 -1
  21. package/lib/cjs/PublicApi.js +161 -0
  22. package/lib/{UserApi.d.ts → cjs/UserApi.d.ts} +30 -1
  23. package/lib/cjs/UserApi.js +103 -0
  24. package/lib/cjs/components/DefaultUI.d.ts +21 -0
  25. package/lib/cjs/components/DefaultUI.js +34 -0
  26. package/lib/cjs/components/app/AppSwitchPopover.d.ts +4 -0
  27. package/lib/cjs/components/app/AppSwitchPopover.js +43 -0
  28. package/lib/cjs/components/index.d.ts +4 -0
  29. package/lib/cjs/components/index.js +23 -0
  30. package/lib/cjs/components/org/OrgSwitchPopover.d.ts +4 -0
  31. package/lib/cjs/components/org/OrgSwitchPopover.js +49 -0
  32. package/lib/{components → cjs/components}/org/OrgTiplist.d.ts +3 -16
  33. package/lib/cjs/components/org/OrgTiplist.js +28 -0
  34. package/lib/cjs/dto/IdentityType.js +25 -0
  35. package/lib/cjs/dto/app/AppData.js +2 -0
  36. package/lib/cjs/dto/app/AppListDto.js +2 -0
  37. package/lib/cjs/dto/app/AppPurchasedQueryData.js +2 -0
  38. package/lib/{dto → cjs/dto}/app/AppQueryData.d.ts +5 -0
  39. package/lib/cjs/dto/app/AppQueryData.js +2 -0
  40. package/lib/cjs/dto/app/AppReadDto.d.ts +62 -0
  41. package/lib/cjs/dto/app/AppReadDto.js +2 -0
  42. package/lib/cjs/dto/app/AppUpdateReadDto.d.ts +35 -0
  43. package/lib/cjs/dto/app/AppUpdateReadDto.js +2 -0
  44. package/lib/cjs/dto/app/CreateApiKeyData.d.ts +16 -0
  45. package/lib/cjs/dto/app/CreateApiKeyData.js +2 -0
  46. package/lib/cjs/dto/authCode/AuthCodeAction.d.ts +12 -0
  47. package/lib/cjs/dto/authCode/AuthCodeAction.js +16 -0
  48. package/lib/cjs/dto/member/MemberListDto.js +2 -0
  49. package/lib/{dto → cjs/dto}/member/MemberQueryDto.d.ts +4 -0
  50. package/lib/cjs/dto/member/MemberQueryDto.js +2 -0
  51. package/lib/cjs/dto/member/MemberReadDto.d.ts +56 -0
  52. package/lib/cjs/dto/member/MemberReadDto.js +2 -0
  53. package/lib/cjs/dto/member/MemberUpdateReadDto.d.ts +39 -0
  54. package/lib/cjs/dto/member/MemberUpdateReadDto.js +2 -0
  55. package/lib/cjs/dto/org/OrgGetMyData.js +2 -0
  56. package/lib/cjs/dto/org/OrgListDto.js +2 -0
  57. package/lib/{dto → cjs/dto}/org/OrgQueryDto.d.ts +8 -0
  58. package/lib/cjs/dto/org/OrgQueryDto.js +2 -0
  59. package/lib/{dto → cjs/dto}/org/OrgReadDto.d.ts +16 -0
  60. package/lib/cjs/dto/org/OrgReadDto.js +2 -0
  61. package/lib/{dto → cjs/dto}/org/OrgUpdateReadDto.d.ts +0 -4
  62. package/lib/cjs/dto/org/OrgUpdateReadDto.js +2 -0
  63. package/lib/cjs/dto/public/CurrencyItem.js +2 -0
  64. package/lib/cjs/dto/public/MemberInvitationDto.d.ts +29 -0
  65. package/lib/cjs/dto/public/MemberInvitationDto.js +2 -0
  66. package/lib/cjs/dto/public/PlaceCommon.js +2 -0
  67. package/lib/cjs/dto/public/PlaceLocation.js +2 -0
  68. package/lib/cjs/dto/public/RegionData.js +2 -0
  69. package/lib/{dto → cjs/dto}/user/AuditHistoryDto.d.ts +8 -4
  70. package/lib/cjs/dto/user/AuditHistoryDto.js +2 -0
  71. package/lib/cjs/dto/user/DeviceListDto.js +2 -0
  72. package/lib/cjs/dto/user/UserIdentifierData.d.ts +27 -0
  73. package/lib/cjs/dto/user/UserIdentifierData.js +2 -0
  74. package/lib/cjs/i18n/CoreCulture.js +52 -0
  75. package/lib/{i18n → cjs/i18n}/en.json +30 -2
  76. package/lib/{i18n → cjs/i18n}/zh-Hans.json +30 -2
  77. package/lib/{i18n → cjs/i18n}/zh-Hant.json +30 -2
  78. package/lib/{index.d.ts → cjs/index.d.ts} +22 -0
  79. package/lib/cjs/index.js +81 -0
  80. package/lib/cjs/rq/app/AppBuyNewRQ.d.ts +26 -0
  81. package/lib/cjs/rq/app/AppBuyNewRQ.js +2 -0
  82. package/lib/cjs/rq/app/AppBuyRQ.d.ts +16 -0
  83. package/lib/cjs/rq/app/AppBuyRQ.js +2 -0
  84. package/lib/cjs/rq/app/AppCreateApiKeyRQ.d.ts +16 -0
  85. package/lib/cjs/rq/app/AppCreateApiKeyRQ.js +2 -0
  86. package/lib/{rq → cjs/rq}/app/AppGetMyRQ.d.ts +1 -1
  87. package/lib/cjs/rq/app/AppGetMyRQ.js +2 -0
  88. package/lib/cjs/rq/app/AppListRQ.js +2 -0
  89. package/lib/cjs/rq/app/AppPurchasedQueryRQ.js +2 -0
  90. package/lib/cjs/rq/app/AppQueryRQ.js +2 -0
  91. package/lib/cjs/rq/app/AppRenewRQ.d.ts +16 -0
  92. package/lib/cjs/rq/app/AppRenewRQ.js +2 -0
  93. package/lib/cjs/rq/app/AppUpdateRQ.d.ts +31 -0
  94. package/lib/cjs/rq/app/AppUpdateRQ.js +2 -0
  95. package/lib/cjs/rq/authCode/SendEmailRQ.d.ts +31 -0
  96. package/lib/cjs/rq/authCode/SendEmailRQ.js +2 -0
  97. package/lib/cjs/rq/authCode/SendSMSRQ.d.ts +27 -0
  98. package/lib/cjs/rq/authCode/SendSMSRQ.js +2 -0
  99. package/lib/cjs/rq/authCode/ValidateRQ.d.ts +17 -0
  100. package/lib/cjs/rq/authCode/ValidateRQ.js +2 -0
  101. package/lib/cjs/rq/member/MemberInviteRQ.d.ts +22 -0
  102. package/lib/cjs/rq/member/MemberInviteRQ.js +2 -0
  103. package/lib/cjs/rq/member/MemberListRQ.js +2 -0
  104. package/lib/cjs/rq/member/MemberQueryRQ.js +2 -0
  105. package/lib/cjs/rq/member/MemberUpdateRQ.d.ts +32 -0
  106. package/lib/cjs/rq/member/MemberUpdateRQ.js +2 -0
  107. package/lib/{rq → cjs/rq}/org/OrgCreateRQ.d.ts +5 -0
  108. package/lib/cjs/rq/org/OrgCreateRQ.js +2 -0
  109. package/lib/cjs/rq/org/OrgGetMyRQ.js +2 -0
  110. package/lib/cjs/rq/org/OrgListRQ.js +2 -0
  111. package/lib/cjs/rq/org/OrgQueryRQ.js +2 -0
  112. package/lib/cjs/rq/org/OrgUpdateRQ.js +2 -0
  113. package/lib/cjs/rq/public/AcceptInvitationRQ.d.ts +16 -0
  114. package/lib/cjs/rq/public/AcceptInvitationRQ.js +2 -0
  115. package/lib/cjs/rq/public/CreateBarcodeRQ.js +2 -0
  116. package/lib/cjs/rq/public/PinyinRQ.js +21 -0
  117. package/lib/cjs/rq/public/PlaceQueryRQ.js +21 -0
  118. package/lib/{rq → cjs/rq}/user/AuditHistoryRQ.d.ts +8 -0
  119. package/lib/cjs/rq/user/AuditHistoryRQ.js +2 -0
  120. package/lib/mjs/AppApi.d.ts +106 -0
  121. package/lib/mjs/AppApi.js +113 -0
  122. package/lib/mjs/AuthCodeApi.d.ts +29 -0
  123. package/lib/mjs/AuthCodeApi.js +46 -0
  124. package/lib/mjs/CoreApp.d.ts +164 -0
  125. package/lib/mjs/CoreApp.js +130 -0
  126. package/lib/mjs/CoreUtils.d.ts +4 -0
  127. package/lib/mjs/ICoreServiceApp.d.ts +30 -0
  128. package/lib/mjs/ICoreServiceApp.js +41 -0
  129. package/lib/mjs/MemberApi.d.ts +78 -0
  130. package/lib/mjs/MemberApi.js +87 -0
  131. package/lib/mjs/OrgApi.d.ts +102 -0
  132. package/lib/{OrgApi.js → mjs/OrgApi.js} +12 -3
  133. package/lib/mjs/PublicApi.d.ts +121 -0
  134. package/lib/{PublicApi.js → mjs/PublicApi.js} +18 -0
  135. package/lib/mjs/UserApi.d.ts +82 -0
  136. package/lib/{UserApi.js → mjs/UserApi.js} +35 -0
  137. package/lib/mjs/components/DefaultUI.d.ts +21 -0
  138. package/lib/mjs/components/DefaultUI.js +31 -0
  139. package/lib/mjs/components/app/AppSwitchPopover.d.ts +4 -0
  140. package/lib/mjs/components/app/AppSwitchPopover.js +37 -0
  141. package/lib/mjs/components/index.d.ts +4 -0
  142. package/lib/mjs/components/index.js +7 -0
  143. package/lib/mjs/components/org/OrgSwitchPopover.d.ts +4 -0
  144. package/lib/mjs/components/org/OrgSwitchPopover.js +43 -0
  145. package/lib/mjs/components/org/OrgTiplist.d.ts +23 -0
  146. package/lib/mjs/components/org/OrgTiplist.js +25 -0
  147. package/lib/mjs/dto/IdentityType.d.ts +21 -0
  148. package/lib/mjs/dto/app/AppData.d.ts +31 -0
  149. package/lib/mjs/dto/app/AppListDto.d.ts +6 -0
  150. package/lib/mjs/dto/app/AppPurchasedQueryData.d.ts +28 -0
  151. package/lib/mjs/dto/app/AppQueryData.d.ts +47 -0
  152. package/lib/mjs/dto/app/AppReadDto.d.ts +62 -0
  153. package/lib/mjs/dto/app/AppUpdateReadDto.d.ts +35 -0
  154. package/lib/mjs/dto/app/CreateApiKeyData.d.ts +16 -0
  155. package/lib/mjs/dto/authCode/AuthCodeAction.d.ts +12 -0
  156. package/lib/mjs/dto/authCode/AuthCodeAction.js +13 -0
  157. package/lib/mjs/dto/member/MemberListDto.d.ts +6 -0
  158. package/lib/mjs/dto/member/MemberQueryDto.d.ts +39 -0
  159. package/lib/mjs/dto/member/MemberReadDto.d.ts +56 -0
  160. package/lib/mjs/dto/member/MemberUpdateReadDto.d.ts +39 -0
  161. package/lib/mjs/dto/org/OrgGetMyData.d.ts +21 -0
  162. package/lib/mjs/dto/org/OrgListDto.d.ts +12 -0
  163. package/lib/mjs/dto/org/OrgQueryDto.d.ts +47 -0
  164. package/lib/mjs/dto/org/OrgReadDto.d.ts +63 -0
  165. package/lib/mjs/dto/org/OrgUpdateReadDto.d.ts +35 -0
  166. package/lib/mjs/dto/public/CurrencyItem.d.ts +31 -0
  167. package/lib/mjs/dto/public/MemberInvitationDto.d.ts +29 -0
  168. package/lib/mjs/dto/public/PlaceCommon.d.ts +43 -0
  169. package/lib/mjs/dto/public/PlaceLocation.d.ts +14 -0
  170. package/lib/mjs/dto/public/RegionData.d.ts +36 -0
  171. package/lib/mjs/dto/user/AuditHistoryDto.d.ts +30 -0
  172. package/lib/mjs/dto/user/DeviceListDto.d.ts +8 -0
  173. package/lib/mjs/dto/user/UserIdentifierData.d.ts +27 -0
  174. package/lib/mjs/i18n/CoreCulture.d.ts +44 -0
  175. package/lib/mjs/i18n/en.json +78 -0
  176. package/lib/mjs/i18n/zh-Hans.json +78 -0
  177. package/lib/mjs/i18n/zh-Hant.json +78 -0
  178. package/lib/mjs/index.d.ts +61 -0
  179. package/lib/{index.js → mjs/index.js} +22 -0
  180. package/lib/mjs/rq/app/AppBuyNewRQ.d.ts +26 -0
  181. package/lib/mjs/rq/app/AppBuyRQ.d.ts +16 -0
  182. package/lib/mjs/rq/app/AppCreateApiKeyRQ.d.ts +16 -0
  183. package/lib/mjs/rq/app/AppGetMyRQ.d.ts +19 -0
  184. package/lib/mjs/rq/app/AppListRQ.d.ts +18 -0
  185. package/lib/mjs/rq/app/AppPurchasedQueryRQ.d.ts +17 -0
  186. package/lib/mjs/rq/app/AppPurchasedQueryRQ.js +1 -0
  187. package/lib/mjs/rq/app/AppQueryRQ.d.ts +6 -0
  188. package/lib/mjs/rq/app/AppQueryRQ.js +1 -0
  189. package/lib/mjs/rq/app/AppRenewRQ.d.ts +16 -0
  190. package/lib/mjs/rq/app/AppRenewRQ.js +1 -0
  191. package/lib/mjs/rq/app/AppUpdateRQ.d.ts +31 -0
  192. package/lib/mjs/rq/app/AppUpdateRQ.js +1 -0
  193. package/lib/mjs/rq/authCode/SendEmailRQ.d.ts +31 -0
  194. package/lib/mjs/rq/authCode/SendEmailRQ.js +1 -0
  195. package/lib/mjs/rq/authCode/SendSMSRQ.d.ts +27 -0
  196. package/lib/mjs/rq/authCode/SendSMSRQ.js +1 -0
  197. package/lib/mjs/rq/authCode/ValidateRQ.d.ts +17 -0
  198. package/lib/mjs/rq/authCode/ValidateRQ.js +1 -0
  199. package/lib/mjs/rq/member/MemberInviteRQ.d.ts +22 -0
  200. package/lib/mjs/rq/member/MemberInviteRQ.js +1 -0
  201. package/lib/mjs/rq/member/MemberListRQ.d.ts +18 -0
  202. package/lib/mjs/rq/member/MemberListRQ.js +1 -0
  203. package/lib/mjs/rq/member/MemberQueryRQ.d.ts +10 -0
  204. package/lib/mjs/rq/member/MemberQueryRQ.js +1 -0
  205. package/lib/mjs/rq/member/MemberUpdateRQ.d.ts +32 -0
  206. package/lib/mjs/rq/member/MemberUpdateRQ.js +1 -0
  207. package/lib/mjs/rq/org/OrgCreateRQ.d.ts +42 -0
  208. package/lib/mjs/rq/org/OrgCreateRQ.js +1 -0
  209. package/lib/mjs/rq/org/OrgGetMyRQ.d.ts +11 -0
  210. package/lib/mjs/rq/org/OrgGetMyRQ.js +1 -0
  211. package/lib/mjs/rq/org/OrgListRQ.d.ts +12 -0
  212. package/lib/mjs/rq/org/OrgListRQ.js +1 -0
  213. package/lib/mjs/rq/org/OrgQueryRQ.d.ts +11 -0
  214. package/lib/mjs/rq/org/OrgQueryRQ.js +1 -0
  215. package/lib/mjs/rq/org/OrgUpdateRQ.d.ts +37 -0
  216. package/lib/mjs/rq/org/OrgUpdateRQ.js +1 -0
  217. package/lib/mjs/rq/public/AcceptInvitationRQ.d.ts +16 -0
  218. package/lib/mjs/rq/public/AcceptInvitationRQ.js +1 -0
  219. package/lib/mjs/rq/public/CreateBarcodeRQ.d.ts +56 -0
  220. package/lib/mjs/rq/public/CreateBarcodeRQ.js +1 -0
  221. package/lib/mjs/rq/public/PinyinRQ.d.ts +38 -0
  222. package/lib/mjs/rq/public/PlaceQueryRQ.d.ts +58 -0
  223. package/lib/mjs/rq/user/AuditHistoryRQ.d.ts +27 -0
  224. package/lib/mjs/rq/user/AuditHistoryRQ.js +1 -0
  225. package/package.json +29 -49
  226. package/src/AppApi.ts +88 -1
  227. package/src/AuthCodeApi.ts +51 -0
  228. package/src/CoreApp.ts +139 -5
  229. package/src/CoreUtils.ts +4 -0
  230. package/src/ICoreServiceApp.ts +62 -0
  231. package/src/MemberApi.ts +61 -2
  232. package/src/OrgApi.ts +13 -3
  233. package/src/PublicApi.ts +24 -1
  234. package/src/UserApi.ts +53 -1
  235. package/src/components/DefaultUI.tsx +37 -0
  236. package/src/components/app/AppSwitchPopover.tsx +83 -0
  237. package/src/components/index.ts +7 -0
  238. package/src/components/org/OrgSwitchPopover.tsx +99 -0
  239. package/src/components/org/OrgTiplist.tsx +29 -33
  240. package/src/dto/app/AppQueryData.ts +6 -0
  241. package/src/dto/app/AppReadDto.ts +75 -0
  242. package/src/dto/app/AppUpdateReadDto.ts +42 -0
  243. package/src/dto/app/CreateApiKeyData.ts +17 -0
  244. package/src/dto/authCode/AuthCodeAction.ts +13 -0
  245. package/src/dto/member/MemberQueryDto.ts +5 -0
  246. package/src/dto/member/MemberReadDto.ts +68 -0
  247. package/src/dto/member/MemberUpdateReadDto.ts +47 -0
  248. package/src/dto/org/OrgQueryDto.ts +10 -0
  249. package/src/dto/org/OrgReadDto.ts +20 -0
  250. package/src/dto/org/OrgUpdateReadDto.ts +0 -5
  251. package/src/dto/public/MemberInvitationDto.ts +34 -0
  252. package/src/dto/user/AuditHistoryDto.ts +9 -4
  253. package/src/dto/user/UserIdentifierData.ts +31 -0
  254. package/src/i18n/en.json +30 -2
  255. package/src/i18n/zh-Hans.json +30 -2
  256. package/src/i18n/zh-Hant.json +30 -2
  257. package/src/index.ts +24 -0
  258. package/src/rq/app/AppBuyNewRQ.ts +29 -0
  259. package/src/rq/app/AppBuyRQ.ts +17 -0
  260. package/src/rq/app/AppCreateApiKeyRQ.ts +17 -0
  261. package/src/rq/app/AppGetMyRQ.ts +1 -1
  262. package/src/rq/app/AppRenewRQ.ts +17 -0
  263. package/src/rq/app/AppUpdateRQ.ts +36 -0
  264. package/src/rq/authCode/SendEmailRQ.ts +36 -0
  265. package/src/rq/authCode/SendSMSRQ.ts +31 -0
  266. package/src/rq/authCode/ValidateRQ.ts +19 -0
  267. package/src/rq/member/MemberInviteRQ.ts +25 -0
  268. package/src/rq/member/MemberUpdateRQ.ts +37 -0
  269. package/src/rq/org/OrgCreateRQ.ts +6 -0
  270. package/src/rq/public/AcceptInvitationRQ.ts +17 -0
  271. package/src/rq/user/AuditHistoryRQ.ts +10 -0
  272. package/tsconfig.cjs.json +20 -0
  273. package/tsconfig.json +1 -1
  274. package/vite.config.mts +12 -0
  275. package/lib/AppApi.d.ts +0 -48
  276. package/lib/AppApi.js +0 -50
  277. package/lib/CoreApp.d.ts +0 -63
  278. package/lib/CoreApp.js +0 -80
  279. package/lib/MemberApi.d.ts +0 -38
  280. package/lib/MemberApi.js +0 -41
  281. package/lib/components/index.d.ts +0 -1
  282. package/lib/components/index.js +0 -2
  283. package/lib/components/org/OrgTiplist.js +0 -22
  284. /package/lib/{dto → cjs/dto}/IdentityType.d.ts +0 -0
  285. /package/lib/{dto → cjs/dto}/app/AppData.d.ts +0 -0
  286. /package/lib/{dto → cjs/dto}/app/AppListDto.d.ts +0 -0
  287. /package/lib/{dto → cjs/dto}/app/AppPurchasedQueryData.d.ts +0 -0
  288. /package/lib/{dto → cjs/dto}/member/MemberListDto.d.ts +0 -0
  289. /package/lib/{dto → cjs/dto}/org/OrgGetMyData.d.ts +0 -0
  290. /package/lib/{dto → cjs/dto}/org/OrgListDto.d.ts +0 -0
  291. /package/lib/{dto → cjs/dto}/public/CurrencyItem.d.ts +0 -0
  292. /package/lib/{dto → cjs/dto}/public/PlaceCommon.d.ts +0 -0
  293. /package/lib/{dto → cjs/dto}/public/PlaceLocation.d.ts +0 -0
  294. /package/lib/{dto → cjs/dto}/public/RegionData.d.ts +0 -0
  295. /package/lib/{dto → cjs/dto}/user/DeviceListDto.d.ts +0 -0
  296. /package/lib/{i18n → cjs/i18n}/CoreCulture.d.ts +0 -0
  297. /package/lib/{rq → cjs/rq}/app/AppListRQ.d.ts +0 -0
  298. /package/lib/{rq → cjs/rq}/app/AppPurchasedQueryRQ.d.ts +0 -0
  299. /package/lib/{rq → cjs/rq}/app/AppQueryRQ.d.ts +0 -0
  300. /package/lib/{rq → cjs/rq}/member/MemberListRQ.d.ts +0 -0
  301. /package/lib/{rq → cjs/rq}/member/MemberQueryRQ.d.ts +0 -0
  302. /package/lib/{rq → cjs/rq}/org/OrgGetMyRQ.d.ts +0 -0
  303. /package/lib/{rq → cjs/rq}/org/OrgListRQ.d.ts +0 -0
  304. /package/lib/{rq → cjs/rq}/org/OrgQueryRQ.d.ts +0 -0
  305. /package/lib/{rq → cjs/rq}/org/OrgUpdateRQ.d.ts +0 -0
  306. /package/lib/{rq → cjs/rq}/public/CreateBarcodeRQ.d.ts +0 -0
  307. /package/lib/{rq → cjs/rq}/public/PinyinRQ.d.ts +0 -0
  308. /package/lib/{rq → cjs/rq}/public/PlaceQueryRQ.d.ts +0 -0
  309. /package/lib/{dto/app/AppData.js → mjs/CoreUtils.js} +0 -0
  310. /package/lib/{dto → mjs/dto}/IdentityType.js +0 -0
  311. /package/lib/{dto/app/AppListDto.js → mjs/dto/app/AppData.js} +0 -0
  312. /package/lib/{dto/app/AppPurchasedQueryData.js → mjs/dto/app/AppListDto.js} +0 -0
  313. /package/lib/{dto/app/AppQueryData.js → mjs/dto/app/AppPurchasedQueryData.js} +0 -0
  314. /package/lib/{dto/member/MemberListDto.js → mjs/dto/app/AppQueryData.js} +0 -0
  315. /package/lib/{dto/member/MemberQueryDto.js → mjs/dto/app/AppReadDto.js} +0 -0
  316. /package/lib/{dto/org/OrgGetMyData.js → mjs/dto/app/AppUpdateReadDto.js} +0 -0
  317. /package/lib/{dto/org/OrgListDto.js → mjs/dto/app/CreateApiKeyData.js} +0 -0
  318. /package/lib/{dto/org/OrgQueryDto.js → mjs/dto/member/MemberListDto.js} +0 -0
  319. /package/lib/{dto/org/OrgReadDto.js → mjs/dto/member/MemberQueryDto.js} +0 -0
  320. /package/lib/{dto/org/OrgUpdateReadDto.js → mjs/dto/member/MemberReadDto.js} +0 -0
  321. /package/lib/{dto/public/CurrencyItem.js → mjs/dto/member/MemberUpdateReadDto.js} +0 -0
  322. /package/lib/{dto/public/PlaceCommon.js → mjs/dto/org/OrgGetMyData.js} +0 -0
  323. /package/lib/{dto/public/PlaceLocation.js → mjs/dto/org/OrgListDto.js} +0 -0
  324. /package/lib/{dto/public/RegionData.js → mjs/dto/org/OrgQueryDto.js} +0 -0
  325. /package/lib/{dto/user/AuditHistoryDto.js → mjs/dto/org/OrgReadDto.js} +0 -0
  326. /package/lib/{dto/user/DeviceListDto.js → mjs/dto/org/OrgUpdateReadDto.js} +0 -0
  327. /package/lib/{rq/app/AppGetMyRQ.js → mjs/dto/public/CurrencyItem.js} +0 -0
  328. /package/lib/{rq/app/AppListRQ.js → mjs/dto/public/MemberInvitationDto.js} +0 -0
  329. /package/lib/{rq/app/AppPurchasedQueryRQ.js → mjs/dto/public/PlaceCommon.js} +0 -0
  330. /package/lib/{rq/app/AppQueryRQ.js → mjs/dto/public/PlaceLocation.js} +0 -0
  331. /package/lib/{rq/member/MemberListRQ.js → mjs/dto/public/RegionData.js} +0 -0
  332. /package/lib/{rq/member/MemberQueryRQ.js → mjs/dto/user/AuditHistoryDto.js} +0 -0
  333. /package/lib/{rq/org/OrgCreateRQ.js → mjs/dto/user/DeviceListDto.js} +0 -0
  334. /package/lib/{rq/org/OrgGetMyRQ.js → mjs/dto/user/UserIdentifierData.js} +0 -0
  335. /package/lib/{i18n → mjs/i18n}/CoreCulture.js +0 -0
  336. /package/lib/{rq/org/OrgListRQ.js → mjs/rq/app/AppBuyNewRQ.js} +0 -0
  337. /package/lib/{rq/org/OrgQueryRQ.js → mjs/rq/app/AppBuyRQ.js} +0 -0
  338. /package/lib/{rq/org/OrgUpdateRQ.js → mjs/rq/app/AppCreateApiKeyRQ.js} +0 -0
  339. /package/lib/{rq/public/CreateBarcodeRQ.js → mjs/rq/app/AppGetMyRQ.js} +0 -0
  340. /package/lib/{rq/user/AuditHistoryRQ.js → mjs/rq/app/AppListRQ.js} +0 -0
  341. /package/lib/{rq → mjs/rq}/public/PinyinRQ.js +0 -0
  342. /package/lib/{rq → mjs/rq}/public/PlaceQueryRQ.js +0 -0
@@ -0,0 +1,83 @@
1
+ import React from "react";
2
+ import { Button, Stack, Typography } from "@mui/material";
3
+ import { useNavigate } from "react-router-dom";
4
+ import { ButtonPopover } from "@etsoo/materialui";
5
+ import { AppQueryData } from "../../dto/app/AppQueryData";
6
+ import { useRequiredAppContext } from "../../ICoreServiceApp";
7
+ import { IdentityType } from "../../dto/IdentityType";
8
+
9
+ export type AppSwitchPopoverProps = {
10
+ appName: string;
11
+ };
12
+
13
+ export function AppSwitchPopover(props: AppSwitchPopoverProps) {
14
+ // Destruct
15
+ const { appName } = props;
16
+
17
+ // Route
18
+ const navigate = useNavigate();
19
+
20
+ // App
21
+ const app = useRequiredAppContext();
22
+
23
+ // Labels
24
+ const labels = app.getLabels("more", "switchApp");
25
+
26
+ // Max items to read
27
+ const maxItems = 10;
28
+
29
+ // Current app
30
+ const currentApp = app.settings.appId;
31
+
32
+ // Layout
33
+ return (
34
+ <ButtonPopover<AppQueryData[]>
35
+ button={(callback) => (
36
+ <Typography
37
+ variant="h6"
38
+ sx={{
39
+ color: (theme) => theme.palette.primary.main,
40
+ fontWeight: "700",
41
+ ml: 0.5,
42
+ whiteSpace: "nowrap",
43
+ cursor: "pointer"
44
+ }}
45
+ title={labels.switchApp}
46
+ onClick={(e) => callback(e.currentTarget)}
47
+ >
48
+ {appName}
49
+ </Typography>
50
+ )}
51
+ loadData={() =>
52
+ app.core.appApi.getMy(
53
+ { maxItems, identityType: IdentityType.User },
54
+ { showLoading: false }
55
+ )
56
+ }
57
+ position="left"
58
+ >
59
+ {(data) => {
60
+ if (data == null) return <React.Fragment />;
61
+
62
+ // Remove the current app
63
+ const index = data.findIndex((a) => a.id === currentApp);
64
+ if (index >= 0) data.splice(index, 1);
65
+
66
+ return (
67
+ <Stack direction="column" margin={2}>
68
+ {data.map((appData) => (
69
+ <Button key={appData.id} onClick={async () => {}}>
70
+ {app.core.getAppName(appData)}
71
+ </Button>
72
+ ))}
73
+ {(data.length === 0 || data.length === maxItems) && (
74
+ <Button onClick={() => navigate("./app/my")}>
75
+ {labels.more}...
76
+ </Button>
77
+ )}
78
+ </Stack>
79
+ );
80
+ }}
81
+ </ButtonPopover>
82
+ );
83
+ }
@@ -1,2 +1,9 @@
1
1
  // Components
2
+ export * from "./DefaultUI";
3
+
4
+ // app
5
+ export * from "./app/AppSwitchPopover";
6
+
7
+ // org
8
+ export * from "./org/OrgSwitchPopover";
2
9
  export * from "./org/OrgTiplist";
@@ -0,0 +1,99 @@
1
+ import React from "react";
2
+ import { Button, ButtonGroup, Stack } from "@mui/material";
3
+ import AccountTreeIcon from "@mui/icons-material/AccountTree";
4
+ import { useNavigate } from "react-router-dom";
5
+ import { ButtonPopover } from "@etsoo/materialui";
6
+ import { OrgGetMyData } from "../../dto/org/OrgGetMyData";
7
+ import { useRequiredAppContext } from "../../ICoreServiceApp";
8
+
9
+ export type OrgSwitchPopoverProps = {
10
+ organizationName?: string;
11
+ };
12
+
13
+ export function OrgSwitchPopover(props: OrgSwitchPopoverProps) {
14
+ // Destruct
15
+ const { organizationName } = props;
16
+
17
+ // Route
18
+ const navigate = useNavigate();
19
+
20
+ // App
21
+ const app = useRequiredAppContext();
22
+
23
+ // Labels
24
+ const labels = app.getLabels("currentOrg", "more", "switchOrg");
25
+
26
+ // Refs
27
+ const anchorRef = React.useRef<HTMLButtonElement>(null);
28
+
29
+ // Max items to read
30
+ const maxItems = 10;
31
+
32
+ // Current organization
33
+ const currentOrg = app.userData?.organization;
34
+
35
+ // Layout
36
+ return (
37
+ <ButtonPopover<OrgGetMyData[]>
38
+ button={(callback) => (
39
+ <React.Fragment>
40
+ <ButtonGroup variant="text">
41
+ <Button
42
+ sx={{ display: { xs: "none", md: "block" } }}
43
+ title={labels.currentOrg}
44
+ onClick={() => callback(anchorRef.current!)}
45
+ >
46
+ {organizationName ?? labels.switchOrg}
47
+ </Button>
48
+ <Button
49
+ title={labels.switchOrg}
50
+ onClick={(e) => callback(e.currentTarget)}
51
+ ref={anchorRef}
52
+ >
53
+ <AccountTreeIcon />
54
+ </Button>
55
+ </ButtonGroup>
56
+ </React.Fragment>
57
+ )}
58
+ loadData={() =>
59
+ app.core.orgApi.getMy({ maxItems }, { showLoading: false })
60
+ }
61
+ >
62
+ {(data) => {
63
+ if (data == null) return <React.Fragment />;
64
+
65
+ // Remove the current organization
66
+ if (currentOrg != null) {
67
+ const index = data.findIndex((org) => org.id === currentOrg);
68
+ if (index >= 0) data.splice(index, 1);
69
+ }
70
+
71
+ return (
72
+ <Stack direction="column" margin={2}>
73
+ {data.map((org) => (
74
+ <Button
75
+ key={org.id}
76
+ onClick={async () => {
77
+ const result = await app.switchOrg(org.id);
78
+ if (result == null) return;
79
+
80
+ if (!result.ok) {
81
+ app.alertResult(result);
82
+ return;
83
+ }
84
+ }}
85
+ >
86
+ {org.name}
87
+ </Button>
88
+ ))}
89
+ {(data.length === 0 || data.length === maxItems) && (
90
+ <Button onClick={() => navigate("./org/my")}>
91
+ {labels.more}...
92
+ </Button>
93
+ )}
94
+ </Stack>
95
+ );
96
+ }}
97
+ </ButtonPopover>
98
+ );
99
+ }
@@ -1,35 +1,22 @@
1
- import { Tiplist } from "@etsoo/materialui";
1
+ import { Tiplist, TiplistProps } from "@etsoo/materialui";
2
2
  import { OrgListDto } from "../../dto/org/OrgListDto";
3
- import { CoreApp } from "../../CoreApp";
3
+ import { useRequiredAppContext } from "../../ICoreServiceApp";
4
4
 
5
5
  /**
6
6
  * Organization tiplist properties
7
7
  * 机构提示列表属性
8
8
  */
9
- export type OrgTiplistProps = {
10
- /**
11
- * API Application
12
- * 接口应用
13
- */
14
- api: CoreApp;
15
-
9
+ export type OrgTiplistProps = Omit<
10
+ TiplistProps<OrgListDto, "id">,
11
+ "loadData" | "label" | "name"
12
+ > & {
16
13
  /**
17
14
  * Label
18
- * 标签
19
15
  */
20
16
  label?: string;
21
17
 
22
- /**
23
- * Max items
24
- * 最大项目
25
- * @default 10
26
- */
27
- maxItems?: number;
28
-
29
18
  /**
30
19
  * Name
31
- * 名称
32
- * @default 'organizationId'
33
20
  */
34
21
  name?: string;
35
22
  };
@@ -41,33 +28,42 @@ export type OrgTiplistProps = {
41
28
  * @returns Component
42
29
  */
43
30
  export function OrgTiplist(props: OrgTiplistProps) {
31
+ // App
32
+ const app = useRequiredAppContext();
33
+
44
34
  // Destruct
45
35
  const {
46
- api,
47
- label = api.app.get("org")!,
36
+ fullWidth = true,
37
+ label = app.get("org")!,
48
38
  maxItems = 10,
49
- name = "organizationId"
39
+ getOptionLabel = (data) => data.name + "(" + data.pin + ")",
40
+ name = "organizationId",
41
+ ...rest
50
42
  } = props;
51
43
 
52
44
  // Layout
53
45
  return (
54
46
  <Tiplist<OrgListDto>
55
47
  label={label}
56
- getOptionLabel={(data) => data.name + "(" + data.pin + ")"}
48
+ getOptionLabel={getOptionLabel}
57
49
  name={name}
58
- fullWidth
50
+ fullWidth={fullWidth}
59
51
  maxItems={maxItems}
60
52
  loadData={(keyword, id, maxItems) =>
61
- api.orgApi.list({
62
- enabled: true,
63
- keyword,
64
- id,
65
- queryPaging: {
66
- batchSize: maxItems,
67
- orderBy: [{ field: "name" }]
68
- }
69
- })
53
+ app.core.orgApi.list(
54
+ {
55
+ enabled: true,
56
+ keyword,
57
+ id,
58
+ queryPaging: {
59
+ batchSize: maxItems,
60
+ orderBy: [{ field: "CoreOrganization.Name" }]
61
+ }
62
+ },
63
+ { showLoading: false, defaultValue: [] }
64
+ )
70
65
  }
66
+ {...rest}
71
67
  />
72
68
  );
73
69
  }
@@ -17,6 +17,12 @@ export type AppQueryData = {
17
17
  */
18
18
  name: string;
19
19
 
20
+ /**
21
+ * Local name
22
+ * 本地名称
23
+ */
24
+ localName?: string;
25
+
20
26
  /**
21
27
  * Identity type
22
28
  * 身份类型
@@ -0,0 +1,75 @@
1
+ import { EntityStatus } from "@etsoo/appscript";
2
+ import { IdentityType } from "../IdentityType";
3
+
4
+ /**
5
+ * App read data
6
+ * 应用读取数据
7
+ */
8
+ export type AppReadDto = {
9
+ /**
10
+ * Id
11
+ */
12
+ id: number;
13
+
14
+ /**
15
+ * App global name
16
+ */
17
+ name: string;
18
+
19
+ /**
20
+ * Global app id
21
+ */
22
+ appId: number;
23
+
24
+ /**
25
+ * App key
26
+ */
27
+ appKey?: string;
28
+
29
+ /**
30
+ * Local name
31
+ */
32
+ localName?: string;
33
+
34
+ /**
35
+ * Local URL
36
+ */
37
+ localUrl?: string;
38
+
39
+ /**
40
+ * Local help URL
41
+ */
42
+ localHelpUrl?: string;
43
+
44
+ /**
45
+ * Local APIs
46
+ */
47
+ localApis?: string[];
48
+
49
+ /**
50
+ * Expiry
51
+ */
52
+ expiry?: Date | string;
53
+
54
+ /**
55
+ * Expiry days
56
+ */
57
+ expiryDays?: number;
58
+
59
+ /**
60
+ * Identity type
61
+ * 身份类型
62
+ */
63
+ identityType: IdentityType;
64
+
65
+ /**
66
+ * Status
67
+ */
68
+ status: EntityStatus;
69
+
70
+ /**
71
+ * Creation
72
+ * 创建时间
73
+ */
74
+ creation: string | Date;
75
+ };
@@ -0,0 +1,42 @@
1
+ import { EntityStatus } from "@etsoo/appscript";
2
+
3
+ /**
4
+ * App read for update data
5
+ * 应用更新数据
6
+ */
7
+ export type AppUpdateReadDto = {
8
+ /**
9
+ * Id
10
+ */
11
+ id: number;
12
+
13
+ /**
14
+ * App global name
15
+ */
16
+ name: string;
17
+
18
+ /**
19
+ * Local name
20
+ */
21
+ localName?: string;
22
+
23
+ /**
24
+ * Local URL
25
+ */
26
+ localUrl?: string;
27
+
28
+ /**
29
+ * Local help URL
30
+ */
31
+ localHelpUrl?: string;
32
+
33
+ /**
34
+ * Local APIs
35
+ */
36
+ localApis?: string[];
37
+
38
+ /**
39
+ * Status
40
+ */
41
+ status: EntityStatus;
42
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Result of creating an API key
3
+ * 创建API密钥结果
4
+ */
5
+ export type CreateApiKeyData = {
6
+ /**
7
+ * App key
8
+ * 应用键
9
+ */
10
+ appKey: string;
11
+
12
+ /**
13
+ * App secret
14
+ * 应用密钥
15
+ */
16
+ appSecret: string;
17
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Enum for auth code action
3
+ */
4
+ export enum AuthCodeAction {
5
+ UserRegistrationSMSCode = 1,
6
+ UserRegistrationEmailCode = 2,
7
+ UserCallbackSMSCode = 3,
8
+ UserCallbackEmailCode = 4,
9
+ UserVerificationSMSCode = 5,
10
+ UserVerificationEmailCode = 6,
11
+
12
+ MemberInvitationEmailCode = 20
13
+ }
@@ -36,6 +36,11 @@ export type MemberQueryDto = {
36
36
  */
37
37
  isOwner: boolean;
38
38
 
39
+ /**
40
+ * Is editable
41
+ */
42
+ isEditable: boolean;
43
+
39
44
  /**
40
45
  * Creation
41
46
  */
@@ -0,0 +1,68 @@
1
+ import { EntityStatus, UserRole } from "@etsoo/appscript";
2
+ import { IdentityType } from "../IdentityType";
3
+
4
+ /**
5
+ * Member read for view data
6
+ * 读取成员查看数据
7
+ */
8
+ export type MemberReadDto = {
9
+ /**
10
+ * Id
11
+ */
12
+ id: number;
13
+
14
+ /**
15
+ * Name
16
+ */
17
+ name: string;
18
+
19
+ /**
20
+ * User role
21
+ */
22
+ userRole: UserRole;
23
+
24
+ /**
25
+ * Identity type
26
+ */
27
+ identityType: IdentityType;
28
+
29
+ /**
30
+ * Custom name
31
+ */
32
+ localName?: string;
33
+
34
+ /**
35
+ * Custom avatar
36
+ */
37
+ localAvatar?: string;
38
+
39
+ /**
40
+ * Assigned id
41
+ */
42
+ assignedId?: string;
43
+
44
+ /**
45
+ * Creation
46
+ */
47
+ creation: string | Date;
48
+
49
+ /**
50
+ * Expiry
51
+ */
52
+ expiry?: string | Date;
53
+
54
+ /**
55
+ * Refresh time
56
+ */
57
+ refreshTime: string | Date;
58
+
59
+ /**
60
+ * Status
61
+ */
62
+ status: EntityStatus;
63
+
64
+ /**
65
+ * Inviter
66
+ */
67
+ inviter?: string;
68
+ };
@@ -0,0 +1,47 @@
1
+ import { EntityStatus, UserRole } from "@etsoo/appscript";
2
+
3
+ /**
4
+ * Member read for update data
5
+ * 读取成员更新数据
6
+ */
7
+ export type MemberUpdateReadDto = {
8
+ /**
9
+ * Id
10
+ */
11
+ id: number;
12
+
13
+ /**
14
+ * Name
15
+ */
16
+ name: string;
17
+
18
+ /**
19
+ * Is self
20
+ */
21
+ isSelf: boolean;
22
+
23
+ /**
24
+ * User role
25
+ */
26
+ userRole: UserRole;
27
+
28
+ /**
29
+ * Custom name
30
+ */
31
+ localName?: string;
32
+
33
+ /**
34
+ * Assigned id
35
+ */
36
+ assignedId?: string;
37
+
38
+ /**
39
+ * Expiry
40
+ */
41
+ expiry?: string | Date;
42
+
43
+ /**
44
+ * Status
45
+ */
46
+ status: EntityStatus;
47
+ };
@@ -44,4 +44,14 @@ export type OrgQueryDto = {
44
44
  * Creation
45
45
  */
46
46
  creation: Date | string;
47
+
48
+ /**
49
+ * User status
50
+ */
51
+ userStatus: EntityStatus;
52
+
53
+ /**
54
+ * Is user expired
55
+ */
56
+ isUserExpired: boolean;
47
57
  };
@@ -10,6 +10,11 @@ export type OrgReadDto = {
10
10
  */
11
11
  id: number;
12
12
 
13
+ /**
14
+ * Current user is the owner of the organization
15
+ */
16
+ isOwner: boolean;
17
+
13
18
  /**
14
19
  * Owner name
15
20
  */
@@ -35,6 +40,11 @@ export type OrgReadDto = {
35
40
  */
36
41
  pin?: string;
37
42
 
43
+ /**
44
+ * Parent id
45
+ */
46
+ parentId?: number;
47
+
38
48
  /**
39
49
  * Parent name
40
50
  */
@@ -54,4 +64,14 @@ export type OrgReadDto = {
54
64
  * Query Keyword
55
65
  */
56
66
  queryKeyword?: string;
67
+
68
+ /**
69
+ * User status
70
+ */
71
+ userStatus: EntityStatus;
72
+
73
+ /**
74
+ * User expiry
75
+ */
76
+ userExpiry?: string | Date;
57
77
  };
@@ -20,11 +20,6 @@ export type OrgUpdateReadDto = {
20
20
  */
21
21
  brand?: string;
22
22
 
23
- /**
24
- * Logo
25
- */
26
- logo?: string;
27
-
28
23
  /**
29
24
  * PIN
30
25
  */
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Member invitation data
3
+ */
4
+ export type MemberInvitationDto = {
5
+ /**
6
+ * Email
7
+ */
8
+ email: string;
9
+
10
+ /**
11
+ * Inviter's name
12
+ */
13
+ inviter: string;
14
+
15
+ /**
16
+ * Organization name
17
+ */
18
+ orgName: string;
19
+
20
+ /**
21
+ * Is expired or not
22
+ */
23
+ isExpired: boolean;
24
+
25
+ /**
26
+ * Is accepted or not
27
+ */
28
+ isAccepted: boolean;
29
+
30
+ /**
31
+ * User exists or not
32
+ */
33
+ userExists: boolean;
34
+ };