@limetech/lime-web-components 4.48.2 → 4.49.1-alpha.4

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 (360) hide show
  1. package/CHANGELOG.md +145 -1
  2. package/README.md +1 -1
  3. package/dist/application/decorators/application.d.ts +8 -0
  4. package/dist/application/decorators/application.js +18 -0
  5. package/dist/application/decorators/index.d.ts +3 -0
  6. package/dist/application/decorators/index.js +3 -0
  7. package/dist/application/decorators/session.d.ts +8 -0
  8. package/dist/application/decorators/session.js +18 -0
  9. package/dist/application/decorators/user.d.ts +8 -0
  10. package/dist/application/decorators/user.js +18 -0
  11. package/dist/application/index.d.ts +4 -0
  12. package/dist/application/index.js +4 -0
  13. package/dist/application/session.d.ts +67 -0
  14. package/dist/application/session.js +1 -0
  15. package/dist/application/types.d.ts +14 -0
  16. package/dist/application/types.js +3 -0
  17. package/dist/application/user.d.ts +59 -0
  18. package/dist/application/user.js +1 -0
  19. package/dist/commandbus/commandbus.d.ts +112 -0
  20. package/dist/commandbus/commandbus.js +63 -0
  21. package/dist/commandbus/index.d.ts +2 -0
  22. package/dist/commandbus/index.js +2 -0
  23. package/dist/commandbus/types.d.ts +14 -0
  24. package/dist/commandbus/types.js +3 -0
  25. package/dist/config/decorator.d.ts +14 -0
  26. package/dist/config/decorator.js +14 -0
  27. package/dist/config/index.d.ts +3 -0
  28. package/dist/config/index.js +3 -0
  29. package/dist/config/repository.d.ts +17 -0
  30. package/dist/config/repository.js +1 -0
  31. package/dist/config/types.d.ts +14 -0
  32. package/dist/config/types.js +3 -0
  33. package/dist/core/context.d.ts +17 -0
  34. package/dist/core/context.js +1 -0
  35. package/dist/core/decorators/factory.d.ts +29 -0
  36. package/dist/core/decorators/factory.js +243 -0
  37. package/dist/core/decorators/factory.spec.d.ts +1 -0
  38. package/dist/core/decorators/factory.spec.js +337 -0
  39. package/dist/core/decorators/index.d.ts +1 -0
  40. package/dist/core/decorators/index.js +1 -0
  41. package/dist/core/index.d.ts +6 -0
  42. package/dist/core/index.js +6 -0
  43. package/dist/core/lime-web-component.d.ts +15 -0
  44. package/dist/core/lime-web-component.js +1 -0
  45. package/dist/core/platform.d.ts +38 -0
  46. package/dist/core/platform.js +6 -0
  47. package/dist/core/plugin-loader.d.ts +28 -0
  48. package/dist/core/plugin-loader.js +1 -0
  49. package/dist/core/state.d.ts +39 -0
  50. package/dist/core/state.js +1 -0
  51. package/dist/device/decorator.d.ts +16 -0
  52. package/dist/device/decorator.js +16 -0
  53. package/dist/device/device.d.ts +21 -0
  54. package/dist/device/device.js +1 -0
  55. package/dist/device/index.d.ts +3 -0
  56. package/dist/device/index.js +3 -0
  57. package/dist/device/types.d.ts +14 -0
  58. package/dist/device/types.js +3 -0
  59. package/dist/dialog/dialog.d.ts +41 -0
  60. package/dist/dialog/dialog.js +1 -0
  61. package/dist/dialog/index.d.ts +2 -0
  62. package/dist/dialog/index.js +2 -0
  63. package/dist/dialog/types.d.ts +14 -0
  64. package/dist/dialog/types.js +3 -0
  65. package/dist/es5/application/decorators/application.js +18 -0
  66. package/dist/es5/application/decorators/index.js +6 -0
  67. package/dist/es5/application/decorators/session.js +18 -0
  68. package/dist/es5/application/decorators/user.js +18 -0
  69. package/dist/es5/application/index.js +7 -0
  70. package/dist/es5/application/session.js +2 -0
  71. package/dist/es5/application/types.js +5 -0
  72. package/dist/es5/application/user.js +2 -0
  73. package/dist/es5/commandbus/commandbus.js +31 -0
  74. package/dist/es5/commandbus/index.js +5 -0
  75. package/dist/es5/commandbus/types.js +5 -0
  76. package/dist/es5/config/decorator.js +12 -0
  77. package/dist/es5/config/index.js +6 -0
  78. package/dist/es5/config/repository.js +2 -0
  79. package/dist/es5/config/types.js +5 -0
  80. package/dist/es5/core/context.js +2 -0
  81. package/dist/es5/core/decorators/factory.js +213 -0
  82. package/dist/es5/core/decorators/factory.spec.js +495 -0
  83. package/dist/es5/core/decorators/index.js +2 -0
  84. package/dist/es5/core/index.js +9 -0
  85. package/dist/es5/core/lime-web-component.js +2 -0
  86. package/dist/es5/core/platform.js +6 -0
  87. package/dist/es5/core/plugin-loader.js +2 -0
  88. package/dist/es5/core/state.js +2 -0
  89. package/dist/es5/device/decorator.js +13 -0
  90. package/dist/es5/device/device.js +2 -0
  91. package/dist/es5/device/index.js +6 -0
  92. package/dist/es5/device/types.js +5 -0
  93. package/dist/es5/dialog/dialog.js +2 -0
  94. package/dist/es5/dialog/index.js +5 -0
  95. package/dist/es5/dialog/types.js +5 -0
  96. package/dist/es5/eventdispatcher/eventdispatcher.js +2 -0
  97. package/dist/es5/eventdispatcher/index.js +5 -0
  98. package/dist/es5/eventdispatcher/types.js +5 -0
  99. package/dist/es5/filter/decorator.js +13 -0
  100. package/dist/es5/filter/index.js +6 -0
  101. package/dist/es5/filter/repository.js +2 -0
  102. package/dist/es5/filter/types.js +5 -0
  103. package/dist/es5/http/http.js +2 -0
  104. package/dist/es5/http/index.js +5 -0
  105. package/dist/es5/http/types.js +5 -0
  106. package/dist/es5/index.js +22 -0
  107. package/dist/es5/keybindings/index.js +5 -0
  108. package/dist/es5/keybindings/registry.js +2 -0
  109. package/dist/es5/keybindings/types.js +5 -0
  110. package/dist/es5/limeobject/commands/bulk-create-dialog.js +17 -0
  111. package/dist/es5/limeobject/commands/create-dialog.js +17 -0
  112. package/dist/es5/limeobject/commands/delete-object.js +16 -0
  113. package/dist/es5/limeobject/commands/index.js +8 -0
  114. package/dist/es5/limeobject/commands/object-access.js +16 -0
  115. package/dist/es5/limeobject/commands/save-object.js +17 -0
  116. package/dist/es5/limeobject/decorator.js +38 -0
  117. package/dist/es5/limeobject/error.js +2 -0
  118. package/dist/es5/limeobject/index.js +9 -0
  119. package/dist/es5/limeobject/limeobject.js +2 -0
  120. package/dist/es5/limeobject/repository.js +2 -0
  121. package/dist/es5/limeobject/types.js +5 -0
  122. package/dist/es5/limetype/acl.js +2 -0
  123. package/dist/es5/limetype/decorator.js +28 -0
  124. package/dist/es5/limetype/index.js +8 -0
  125. package/dist/es5/limetype/limetype.js +2 -0
  126. package/dist/es5/limetype/property.js +40 -0
  127. package/dist/es5/limetype/types.js +5 -0
  128. package/dist/es5/navigator/decorator.js +13 -0
  129. package/dist/es5/navigator/index.js +6 -0
  130. package/dist/es5/navigator/navigator.js +2 -0
  131. package/dist/es5/navigator/types.js +5 -0
  132. package/dist/es5/notifications/index.js +5 -0
  133. package/dist/es5/notifications/notifications.js +2 -0
  134. package/dist/es5/notifications/types.js +5 -0
  135. package/dist/es5/query/index.js +6 -0
  136. package/dist/es5/query/query.js +17 -0
  137. package/dist/es5/query/service.js +2 -0
  138. package/dist/es5/query/types.js +5 -0
  139. package/dist/es5/routeregistry/index.js +5 -0
  140. package/dist/es5/routeregistry/registry.js +2 -0
  141. package/dist/es5/routeregistry/types.js +5 -0
  142. package/dist/es5/task/index.js +5 -0
  143. package/dist/es5/task/repository.js +17 -0
  144. package/dist/es5/task/types.js +5 -0
  145. package/dist/es5/testing/component-testing.js +102 -0
  146. package/dist/es5/testing/index.js +10 -0
  147. package/dist/es5/testing/limeobjects/company.js +660 -0
  148. package/dist/es5/testing/limeobjects/coworker.js +110 -0
  149. package/dist/es5/testing/limeobjects/deal.js +447 -0
  150. package/dist/es5/testing/limeobjects/document.js +82 -0
  151. package/dist/es5/testing/limeobjects/index.js +55 -0
  152. package/dist/es5/testing/limeobjects/person.js +1162 -0
  153. package/dist/es5/testing/limetypes/campaign.js +486 -0
  154. package/dist/es5/testing/limetypes/company.js +621 -0
  155. package/dist/es5/testing/limetypes/consent.js +237 -0
  156. package/dist/es5/testing/limetypes/consenttype.js +194 -0
  157. package/dist/es5/testing/limetypes/coworker.js +579 -0
  158. package/dist/es5/testing/limetypes/deal.js +422 -0
  159. package/dist/es5/testing/limetypes/document.js +343 -0
  160. package/dist/es5/testing/limetypes/helpdesk.js +426 -0
  161. package/dist/es5/testing/limetypes/helpdesktype.js +142 -0
  162. package/dist/es5/testing/limetypes/history.js +349 -0
  163. package/dist/es5/testing/limetypes/index.js +69 -0
  164. package/dist/es5/testing/limetypes/infotiles.js +514 -0
  165. package/dist/es5/testing/limetypes/localize.js +287 -0
  166. package/dist/es5/testing/limetypes/mailing.js +218 -0
  167. package/dist/es5/testing/limetypes/office.js +388 -0
  168. package/dist/es5/testing/limetypes/participant.js +195 -0
  169. package/dist/es5/testing/limetypes/person.js +535 -0
  170. package/dist/es5/testing/limetypes/recipient.js +175 -0
  171. package/dist/es5/testing/limetypes/solutionimprovement.js +353 -0
  172. package/dist/es5/testing/limetypes/successplan.js +215 -0
  173. package/dist/es5/testing/limetypes/target.js +181 -0
  174. package/dist/es5/testing/limetypes/todo.js +429 -0
  175. package/dist/es5/testing/platform/index.js +53 -0
  176. package/dist/es5/testing/platform/platform.spec.js +44 -0
  177. package/dist/es5/translator/index.js +5 -0
  178. package/dist/es5/translator/translator.js +2 -0
  179. package/dist/es5/translator/types.js +5 -0
  180. package/dist/es5/userdata/decorator.js +13 -0
  181. package/dist/es5/userdata/index.js +6 -0
  182. package/dist/es5/userdata/repository.js +2 -0
  183. package/dist/es5/userdata/types.js +5 -0
  184. package/dist/eventdispatcher/eventdispatcher.d.ts +26 -0
  185. package/dist/eventdispatcher/eventdispatcher.js +1 -0
  186. package/dist/eventdispatcher/index.d.ts +2 -0
  187. package/dist/eventdispatcher/index.js +2 -0
  188. package/dist/eventdispatcher/types.d.ts +14 -0
  189. package/dist/eventdispatcher/types.js +3 -0
  190. package/dist/filter/decorator.d.ts +15 -0
  191. package/dist/filter/decorator.js +14 -0
  192. package/dist/filter/index.d.ts +3 -0
  193. package/dist/filter/index.js +3 -0
  194. package/dist/filter/repository.d.ts +18 -0
  195. package/dist/filter/repository.js +1 -0
  196. package/dist/filter/types.d.ts +14 -0
  197. package/dist/filter/types.js +3 -0
  198. package/dist/http/http.d.ts +72 -0
  199. package/dist/http/http.js +1 -0
  200. package/dist/http/index.d.ts +2 -0
  201. package/dist/http/index.js +2 -0
  202. package/dist/http/types.d.ts +14 -0
  203. package/dist/http/types.js +3 -0
  204. package/dist/index.d.ts +19 -0
  205. package/dist/index.js +19 -0
  206. package/dist/keybindings/index.d.ts +2 -0
  207. package/dist/keybindings/index.js +2 -0
  208. package/dist/keybindings/registry.d.ts +79 -0
  209. package/dist/keybindings/registry.js +1 -0
  210. package/dist/keybindings/types.d.ts +17 -0
  211. package/dist/keybindings/types.js +3 -0
  212. package/dist/limeobject/commands/bulk-create-dialog.d.ts +49 -0
  213. package/dist/limeobject/commands/bulk-create-dialog.js +48 -0
  214. package/dist/limeobject/commands/create-dialog.d.ts +28 -0
  215. package/dist/limeobject/commands/create-dialog.js +26 -0
  216. package/dist/limeobject/commands/delete-object.d.ts +10 -0
  217. package/dist/limeobject/commands/delete-object.js +15 -0
  218. package/dist/limeobject/commands/index.d.ts +5 -0
  219. package/dist/limeobject/commands/index.js +5 -0
  220. package/dist/limeobject/commands/object-access.d.ts +10 -0
  221. package/dist/limeobject/commands/object-access.js +15 -0
  222. package/dist/limeobject/commands/save-object.d.ts +16 -0
  223. package/dist/limeobject/commands/save-object.js +21 -0
  224. package/dist/limeobject/decorator.d.ts +32 -0
  225. package/dist/limeobject/decorator.js +42 -0
  226. package/dist/limeobject/error.d.ts +4 -0
  227. package/dist/limeobject/error.js +1 -0
  228. package/dist/limeobject/index.d.ts +6 -0
  229. package/dist/limeobject/index.js +6 -0
  230. package/dist/limeobject/limeobject.d.ts +43 -0
  231. package/dist/limeobject/limeobject.js +1 -0
  232. package/dist/limeobject/repository.d.ts +113 -0
  233. package/dist/limeobject/repository.js +1 -0
  234. package/dist/limeobject/types.d.ts +14 -0
  235. package/dist/limeobject/types.js +3 -0
  236. package/dist/limetype/acl.d.ts +6 -0
  237. package/dist/limetype/acl.js +1 -0
  238. package/dist/limetype/decorator.d.ts +21 -0
  239. package/dist/limetype/decorator.js +32 -0
  240. package/dist/limetype/index.d.ts +5 -0
  241. package/dist/limetype/index.js +5 -0
  242. package/dist/limetype/limetype.d.ts +25 -0
  243. package/dist/limetype/limetype.js +1 -0
  244. package/dist/limetype/property.d.ts +32 -0
  245. package/dist/limetype/property.js +32 -0
  246. package/dist/limetype/types.d.ts +14 -0
  247. package/dist/limetype/types.js +3 -0
  248. package/dist/navigator/decorator.d.ts +18 -0
  249. package/dist/navigator/decorator.js +15 -0
  250. package/dist/navigator/index.d.ts +3 -0
  251. package/dist/navigator/index.js +3 -0
  252. package/dist/navigator/navigator.d.ts +158 -0
  253. package/dist/navigator/navigator.js +1 -0
  254. package/dist/navigator/types.d.ts +17 -0
  255. package/dist/navigator/types.js +3 -0
  256. package/dist/notifications/index.d.ts +2 -0
  257. package/dist/notifications/index.js +2 -0
  258. package/dist/notifications/notifications.d.ts +101 -0
  259. package/dist/notifications/notifications.js +1 -0
  260. package/dist/notifications/types.d.ts +14 -0
  261. package/dist/notifications/types.js +3 -0
  262. package/dist/query/index.d.ts +3 -0
  263. package/dist/query/index.js +3 -0
  264. package/dist/query/query.d.ts +46 -0
  265. package/dist/query/query.js +14 -0
  266. package/dist/query/service.d.ts +12 -0
  267. package/dist/query/service.js +1 -0
  268. package/dist/query/types.d.ts +14 -0
  269. package/dist/query/types.js +3 -0
  270. package/dist/routeregistry/index.d.ts +2 -0
  271. package/dist/routeregistry/index.js +2 -0
  272. package/dist/routeregistry/registry.d.ts +92 -0
  273. package/dist/routeregistry/registry.js +1 -0
  274. package/dist/routeregistry/types.d.ts +17 -0
  275. package/dist/routeregistry/types.js +3 -0
  276. package/dist/task/index.d.ts +2 -0
  277. package/dist/task/index.js +2 -0
  278. package/dist/task/repository.d.ts +82 -0
  279. package/dist/task/repository.js +49 -0
  280. package/dist/task/types.d.ts +14 -0
  281. package/dist/task/types.js +3 -0
  282. package/dist/testing/component-testing.d.ts +53 -0
  283. package/dist/testing/component-testing.js +162 -0
  284. package/dist/testing/index.d.ts +4 -0
  285. package/dist/testing/index.js +4 -0
  286. package/dist/testing/limeobjects/company.d.ts +55 -0
  287. package/dist/testing/limeobjects/company.js +656 -0
  288. package/dist/testing/limeobjects/coworker.d.ts +22 -0
  289. package/dist/testing/limeobjects/coworker.js +106 -0
  290. package/dist/testing/limeobjects/deal.d.ts +41 -0
  291. package/dist/testing/limeobjects/deal.js +443 -0
  292. package/dist/testing/limeobjects/document.d.ts +20 -0
  293. package/dist/testing/limeobjects/document.js +78 -0
  294. package/dist/testing/limeobjects/index.d.ts +177 -0
  295. package/dist/testing/limeobjects/index.js +50 -0
  296. package/dist/testing/limeobjects/person.d.ts +20 -0
  297. package/dist/testing/limeobjects/person.js +1158 -0
  298. package/dist/testing/limetypes/campaign.d.ts +417 -0
  299. package/dist/testing/limetypes/campaign.js +477 -0
  300. package/dist/testing/limetypes/company.d.ts +591 -0
  301. package/dist/testing/limetypes/company.js +614 -0
  302. package/dist/testing/limetypes/consent.d.ts +199 -0
  303. package/dist/testing/limetypes/consent.js +232 -0
  304. package/dist/testing/limetypes/consenttype.d.ts +188 -0
  305. package/dist/testing/limetypes/consenttype.js +189 -0
  306. package/dist/testing/limetypes/coworker.d.ts +563 -0
  307. package/dist/testing/limetypes/coworker.js +564 -0
  308. package/dist/testing/limetypes/deal.d.ts +391 -0
  309. package/dist/testing/limetypes/deal.js +419 -0
  310. package/dist/testing/limetypes/document.d.ts +309 -0
  311. package/dist/testing/limetypes/document.js +332 -0
  312. package/dist/testing/limetypes/helpdesk.d.ts +394 -0
  313. package/dist/testing/limetypes/helpdesk.js +417 -0
  314. package/dist/testing/limetypes/helpdesktype.d.ts +136 -0
  315. package/dist/testing/limetypes/helpdesktype.js +137 -0
  316. package/dist/testing/limetypes/history.d.ts +308 -0
  317. package/dist/testing/limetypes/history.js +346 -0
  318. package/dist/testing/limetypes/index.d.ts +5 -0
  319. package/dist/testing/limetypes/index.js +63 -0
  320. package/dist/testing/limetypes/infotiles.d.ts +387 -0
  321. package/dist/testing/limetypes/infotiles.js +509 -0
  322. package/dist/testing/limetypes/localize.d.ts +283 -0
  323. package/dist/testing/limetypes/localize.js +284 -0
  324. package/dist/testing/limetypes/mailing.d.ts +212 -0
  325. package/dist/testing/limetypes/mailing.js +213 -0
  326. package/dist/testing/limetypes/office.d.ts +384 -0
  327. package/dist/testing/limetypes/office.js +385 -0
  328. package/dist/testing/limetypes/participant.d.ts +165 -0
  329. package/dist/testing/limetypes/participant.js +188 -0
  330. package/dist/testing/limetypes/person.d.ts +472 -0
  331. package/dist/testing/limetypes/person.js +530 -0
  332. package/dist/testing/limetypes/recipient.d.ts +147 -0
  333. package/dist/testing/limetypes/recipient.js +170 -0
  334. package/dist/testing/limetypes/solutionimprovement.d.ts +302 -0
  335. package/dist/testing/limetypes/solutionimprovement.js +344 -0
  336. package/dist/testing/limetypes/successplan.d.ts +209 -0
  337. package/dist/testing/limetypes/successplan.js +210 -0
  338. package/dist/testing/limetypes/target.d.ts +160 -0
  339. package/dist/testing/limetypes/target.js +178 -0
  340. package/dist/testing/limetypes/todo.d.ts +386 -0
  341. package/dist/testing/limetypes/todo.js +426 -0
  342. package/dist/testing/platform/index.d.ts +8 -0
  343. package/dist/testing/platform/index.js +61 -0
  344. package/dist/testing/platform/platform.spec.d.ts +1 -0
  345. package/dist/testing/platform/platform.spec.js +41 -0
  346. package/dist/translator/index.d.ts +2 -0
  347. package/dist/translator/index.js +2 -0
  348. package/dist/translator/translator.d.ts +13 -0
  349. package/dist/translator/translator.js +1 -0
  350. package/dist/translator/types.d.ts +14 -0
  351. package/dist/translator/types.js +3 -0
  352. package/dist/userdata/decorator.d.ts +17 -0
  353. package/dist/userdata/decorator.js +14 -0
  354. package/dist/userdata/index.d.ts +3 -0
  355. package/dist/userdata/index.js +3 -0
  356. package/dist/userdata/repository.d.ts +29 -0
  357. package/dist/userdata/repository.js +1 -0
  358. package/dist/userdata/types.d.ts +14 -0
  359. package/dist/userdata/types.js +3 -0
  360. package/package.json +11 -6
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './context';
2
+ export * from './platform';
3
+ export * from './lime-web-component';
4
+ export * from './plugin-loader';
5
+ export * from './state';
6
+ export * from './decorators';
@@ -0,0 +1,6 @@
1
+ export * from './context';
2
+ export * from './platform';
3
+ export * from './lime-web-component';
4
+ export * from './plugin-loader';
5
+ export * from './state';
6
+ export * from './decorators';
@@ -0,0 +1,15 @@
1
+ import { LimeWebComponentContext } from './context';
2
+ import { LimeWebComponentPlatform } from './platform';
3
+ /**
4
+ * Interface that Lime Web Components must implement
5
+ */
6
+ export interface LimeWebComponent {
7
+ /**
8
+ * Reference to the platform
9
+ */
10
+ platform: LimeWebComponentPlatform;
11
+ /**
12
+ * The context this component belongs to
13
+ */
14
+ context: LimeWebComponentContext;
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Service container for the Lime CRM platform
3
+ */
4
+ export interface LimeWebComponentPlatform {
5
+ type: 'LimeCRMWebClient' | 'LimeCRMDesktopClient';
6
+ /**
7
+ * Get a service
8
+ *
9
+ * @param name the name of the service
10
+ */
11
+ get(name: string): any;
12
+ /**
13
+ * Check if a service is currently registered on the platform
14
+ *
15
+ * @param name the name of the service
16
+ */
17
+ has(name: string): boolean;
18
+ /**
19
+ * Register a service on the platform
20
+ *
21
+ * Core platform service names are defined by the enum `PlatformServiceName`. Third parties that wants to register
22
+ * a service should add a prefix to the service name, e.g. the plugin name.
23
+ *
24
+ * @param name the name of the service
25
+ * @param service the service
26
+ */
27
+ register(name: string, service: any): void;
28
+ }
29
+ /**
30
+ * Core platform service names
31
+ */
32
+ export declare const PlatformServiceName: PlatformServiceName;
33
+ export interface PlatformServiceName {
34
+ /**
35
+ * @deprecated use the new {@link PlatformServiceName.Navigator} instead
36
+ */
37
+ Route: 'route';
38
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Core platform service names
3
+ */
4
+ export const PlatformServiceName = {
5
+ Route: 'route',
6
+ };
@@ -0,0 +1,28 @@
1
+ import { LimeWebComponent } from './lime-web-component';
2
+ /**
3
+ * Interface for the loader component that is loaded when the app starts
4
+ */
5
+ export interface LimePluginLoader extends LimeWebComponent {
6
+ /**
7
+ * This method will be invoked every time the component is inserted into
8
+ * the DOM. For a plugin loader component, it should happen only once. The
9
+ * method must be present on the component for technical reasons.
10
+ */
11
+ connectedCallback(): void | Promise<any>;
12
+ /**
13
+ * Do any initializations required for the plugin in this method
14
+ */
15
+ componentWillLoad(): void | Promise<any>;
16
+ /**
17
+ * This method will never be called since the component will never
18
+ * be updated. It must still be present on the component though.
19
+ */
20
+ componentWillUpdate(): void | Promise<any>;
21
+ /**
22
+ * This method will be invoked every time the component is removed from
23
+ * the DOM. For a plugin loader component, it should never happen since
24
+ * the component will live during the whole lifespan of the application.
25
+ * The method must be present on the component for technical reasons.
26
+ */
27
+ disconnectedCallback(): void | Promise<any>;
28
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ import { Subscribable } from 'rxjs';
2
+ import { LimeWebComponentContext } from './context';
3
+ /**
4
+ * Base service for letting a Lime web component subscribe to state changes
5
+ */
6
+ export interface StateRepository {
7
+ /**
8
+ * Subscribe to state changes
9
+ *
10
+ * @param {Function} callback function to call when subscription updates
11
+ * @param {StateOptions} [options] options for the state selector
12
+ * @returns {Function} unsubscribe callback
13
+ */
14
+ subscribe(callback: () => void, options?: StateOptions): () => void;
15
+ }
16
+ /**
17
+ * Options for the state selector
18
+ */
19
+ export interface StateOptions {
20
+ /**
21
+ * List of functions that will be used to map the state.
22
+ * The functions will be bound to the web component instance
23
+ */
24
+ map?: Array<(state: any) => any>;
25
+ /**
26
+ * List of functions that will be used to filter any changes to the state.
27
+ * The functions will be bound to the web component instance
28
+ */
29
+ filter?: Array<(state: any) => boolean>;
30
+ }
31
+ export interface ContextAwareStateOptions extends StateOptions {
32
+ /**
33
+ * An observable that emits a new value when the context of the component
34
+ * is changed. If set, the corresponding state service will emit a new value
35
+ * when the context has changed as well. Only applies to states that are
36
+ * aware of the context, e.g. `CurrentLimetype` and `CurrentLimeobject`
37
+ */
38
+ context?: Subscribable<LimeWebComponentContext> | null;
39
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { StateOptions } from '../core';
2
+ /**
3
+ * DeviceType
4
+ *
5
+ * @type {string}
6
+ */
7
+ export declare type DeviceType = 'desktop' | 'tablet' | 'phone';
8
+ /**
9
+ * Get the current device type
10
+ *
11
+ * The device will only indicate roughly how big the viewport is, not what actual device is being used
12
+ *
13
+ * @param {StateOptions} [options] state decorator options
14
+ * @returns {Function} state decorator
15
+ */
16
+ export declare function SelectDevice(options?: StateOptions): PropertyDecorator;
@@ -0,0 +1,16 @@
1
+ import { PlatformServiceName, } from '../core';
2
+ import { createStateDecorator } from '../core/decorators/factory';
3
+ /**
4
+ * Get the current device type
5
+ *
6
+ * The device will only indicate roughly how big the viewport is, not what actual device is being used
7
+ *
8
+ * @param {StateOptions} [options] state decorator options
9
+ * @returns {Function} state decorator
10
+ */
11
+ export function SelectDevice(options = {}) {
12
+ const config = {
13
+ name: PlatformServiceName.Device,
14
+ };
15
+ return createStateDecorator(options, config);
16
+ }
@@ -0,0 +1,21 @@
1
+ import { StateRepository } from '../core';
2
+ export interface Device extends StateRepository {
3
+ /**
4
+ * Check if the device type is 'desktop'
5
+ *
6
+ * @returns {boolean} true/false
7
+ */
8
+ isDesktopSize(): boolean;
9
+ /**
10
+ * Check if the device type is 'tablet'
11
+ *
12
+ * @returns {boolean} true/false
13
+ */
14
+ isTabletSize(): boolean;
15
+ /**
16
+ * Check if the device type is 'phone'
17
+ *
18
+ * @returns {boolean} true/false
19
+ */
20
+ isPhoneSize(): boolean;
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './device';
2
+ export * from './types';
3
+ export * from './decorator';
@@ -0,0 +1,3 @@
1
+ export * from './device';
2
+ export * from './types';
3
+ export * from './decorator';
@@ -0,0 +1,14 @@
1
+ import { Device as Service } from './device';
2
+ declare const SERVICE_NAME = "state.device";
3
+ declare module '../core/platform' {
4
+ interface PlatformServiceName {
5
+ /**
6
+ * @see {@link Service Device}
7
+ */
8
+ Device: typeof SERVICE_NAME;
9
+ }
10
+ interface LimeWebComponentPlatform {
11
+ get(name: PlatformServiceName['Device']): Service;
12
+ }
13
+ }
14
+ export {};
@@ -0,0 +1,3 @@
1
+ import { PlatformServiceName } from '../core/platform';
2
+ const SERVICE_NAME = 'state.device';
3
+ PlatformServiceName.Device = SERVICE_NAME;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Service for creating and displaying dialogs containing a web component
3
+ *
4
+ * @emits dialog.destroyed - When the dialog is beeing externally destroyed,
5
+ * e.g. by closing a popup window (depending on platform), a
6
+ * {@link DialogDestroyedEvent} will be emitted using
7
+ * {@link EventDispatcher}
8
+ */
9
+ export interface DialogRenderer {
10
+ /**
11
+ * Create a new dialog and render its contents. Depending on what kind of
12
+ * platform the service is used on, the dialog might be rendered in the
13
+ * current {@link Document} or opened in a new popup window.
14
+ *
15
+ * @param name the name of the web component representing the dialog
16
+ * @param properties any properties to send to the dialog
17
+ * @param listeners any event listeners to register on the dialog
18
+ * @returns id representing the dialog
19
+ */
20
+ create(name: string, properties?: DialogProperties, listeners?: DialogListeners): number;
21
+ /**
22
+ * Update an existing dialog with new properties
23
+ *
24
+ * @param id the dialog identifier
25
+ * @param properties any properties to send to the dialog
26
+ */
27
+ update?(id: number, properties?: DialogProperties): void;
28
+ /**
29
+ * Destroy a dialog
30
+ *
31
+ * @param id id representing the dialog
32
+ */
33
+ destroy(id: number): void;
34
+ }
35
+ export declare type DialogProperties = Record<string, any>;
36
+ export declare type DialogListeners = Record<string, (event?: CustomEvent<any>) => void>;
37
+ /**
38
+ * @event dialog.destroyed - Emitted when a dialog is externally destroyed, e.g.
39
+ * by closing a popup window
40
+ */
41
+ export declare type DialogDestroyedEvent = CustomEvent<number>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './dialog';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './dialog';
2
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ import { DialogRenderer } from './dialog';
2
+ declare const SERVICE_NAME = "dialog";
3
+ declare module '../core/platform' {
4
+ interface PlatformServiceName {
5
+ /**
6
+ * @see {@link DialogRenderer}
7
+ */
8
+ Dialog: typeof SERVICE_NAME;
9
+ }
10
+ interface LimeWebComponentPlatform {
11
+ get(name: PlatformServiceName['Dialog']): DialogRenderer;
12
+ }
13
+ }
14
+ export {};
@@ -0,0 +1,3 @@
1
+ import { PlatformServiceName } from '../core/platform';
2
+ const SERVICE_NAME = 'dialog';
3
+ PlatformServiceName.Dialog = SERVICE_NAME;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelectApplicationName = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var core_1 = require("../../core");
6
+ var factory_1 = require("../../core/decorators/factory");
7
+ function SelectApplicationName(options) {
8
+ if (options === void 0) { options = {}; }
9
+ var config = {
10
+ name: core_1.PlatformServiceName.Application,
11
+ };
12
+ options.map = tslib_1.__spreadArray([getApplicationName], (options.map || []), true);
13
+ return (0, factory_1.createStateDecorator)(options, config);
14
+ }
15
+ exports.SelectApplicationName = SelectApplicationName;
16
+ function getApplicationName(applicationData) {
17
+ return applicationData.applicationName;
18
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./application"), exports);
5
+ tslib_1.__exportStar(require("./user"), exports);
6
+ tslib_1.__exportStar(require("./session"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelectSession = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var core_1 = require("../../core");
6
+ var factory_1 = require("../../core/decorators/factory");
7
+ function SelectSession(options) {
8
+ if (options === void 0) { options = {}; }
9
+ var config = {
10
+ name: core_1.PlatformServiceName.Application,
11
+ };
12
+ options.map = tslib_1.__spreadArray([getSession], (options.map || []), true);
13
+ return (0, factory_1.createStateDecorator)(options, config);
14
+ }
15
+ exports.SelectSession = SelectSession;
16
+ function getSession(applicationData) {
17
+ return applicationData.session;
18
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelectCurrentUser = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var core_1 = require("../../core");
6
+ var factory_1 = require("../../core/decorators/factory");
7
+ function SelectCurrentUser(options) {
8
+ if (options === void 0) { options = {}; }
9
+ var config = {
10
+ name: core_1.PlatformServiceName.Application,
11
+ };
12
+ options.map = tslib_1.__spreadArray([getCurrentUser], (options.map || []), true);
13
+ return (0, factory_1.createStateDecorator)(options, config);
14
+ }
15
+ exports.SelectCurrentUser = SelectCurrentUser;
16
+ function getCurrentUser(applicationData) {
17
+ return applicationData.currentUser;
18
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./types"), exports);
5
+ tslib_1.__exportStar(require("./decorators"), exports);
6
+ tslib_1.__exportStar(require("./session"), exports);
7
+ tslib_1.__exportStar(require("./user"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var platform_1 = require("../core/platform");
4
+ var SERVICE_NAME = 'state.application';
5
+ platform_1.PlatformServiceName.Application = SERVICE_NAME;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCommandId = exports.Command = exports.CommandEventName = void 0;
4
+ var CommandEventName;
5
+ (function (CommandEventName) {
6
+ CommandEventName["Received"] = "command.received";
7
+ CommandEventName["Handled"] = "command.handled";
8
+ CommandEventName["Failed"] = "command.failed";
9
+ })(CommandEventName = exports.CommandEventName || (exports.CommandEventName = {}));
10
+ function Command(options) {
11
+ return function (commandClass) {
12
+ setCommandId(commandClass, options.id);
13
+ };
14
+ }
15
+ exports.Command = Command;
16
+ function setCommandId(commandClass, id) {
17
+ commandClass['commandId'] = id;
18
+ }
19
+ function getCommandId(value) {
20
+ if (typeof value === 'string') {
21
+ return value;
22
+ }
23
+ if (value && value.constructor && value.constructor['commandId']) {
24
+ return value.constructor['commandId'];
25
+ }
26
+ if (value && value['commandId']) {
27
+ return value['commandId'];
28
+ }
29
+ return null;
30
+ }
31
+ exports.getCommandId = getCommandId;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./commandbus"), exports);
5
+ tslib_1.__exportStar(require("./types"), exports);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var platform_1 = require("../core/platform");
4
+ var SERVICE_NAME = 'commandBus';
5
+ platform_1.PlatformServiceName.CommandBus = SERVICE_NAME;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelectConfig = void 0;
4
+ var core_1 = require("../core");
5
+ var factory_1 = require("../core/decorators/factory");
6
+ function SelectConfig(options) {
7
+ var config = {
8
+ name: core_1.PlatformServiceName.ConfigRepository,
9
+ };
10
+ return (0, factory_1.createStateDecorator)(options, config);
11
+ }
12
+ exports.SelectConfig = SelectConfig;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./repository"), exports);
5
+ tslib_1.__exportStar(require("./types"), exports);
6
+ tslib_1.__exportStar(require("./decorator"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var platform_1 = require("../core/platform");
4
+ var SERVICE_NAME = 'state.configs';
5
+ platform_1.PlatformServiceName.ConfigRepository = SERVICE_NAME;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });