@tsed/formio 6.88.1 → 6.89.0

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 (302) hide show
  1. package/lib/{FormioModule.d.ts → cjs/FormioModule.d.ts} +0 -0
  2. package/lib/{FormioModule.js → cjs/FormioModule.js} +34 -34
  3. package/lib/cjs/FormioModule.js.map +1 -0
  4. package/lib/{builder → cjs/builder}/FormioMapper.d.ts +0 -0
  5. package/lib/{builder → cjs/builder}/FormioMapper.js +0 -0
  6. package/lib/cjs/builder/FormioMapper.js.map +1 -0
  7. package/lib/{components → cjs/components}/AlterActions.d.ts +0 -0
  8. package/lib/{components → cjs/components}/AlterActions.js +8 -8
  9. package/lib/cjs/components/AlterActions.js.map +1 -0
  10. package/lib/{components → cjs/components}/AlterAudit.d.ts +0 -0
  11. package/lib/{components → cjs/components}/AlterAudit.js +2 -2
  12. package/lib/cjs/components/AlterAudit.js.map +1 -0
  13. package/lib/{components → cjs/components}/AlterHost.d.ts +0 -0
  14. package/lib/{components → cjs/components}/AlterHost.js +2 -2
  15. package/lib/cjs/components/AlterHost.js.map +1 -0
  16. package/lib/{components → cjs/components}/AlterLog.d.ts +0 -0
  17. package/lib/{components → cjs/components}/AlterLog.js +2 -2
  18. package/lib/cjs/components/AlterLog.js.map +1 -0
  19. package/lib/{components → cjs/components}/AlterSkip.d.ts +0 -0
  20. package/lib/{components → cjs/components}/AlterSkip.js +9 -9
  21. package/lib/cjs/components/AlterSkip.js.map +1 -0
  22. package/lib/{components → cjs/components}/AlterTemplateExportSteps.d.ts +0 -0
  23. package/lib/{components → cjs/components}/AlterTemplateExportSteps.js +6 -6
  24. package/lib/cjs/components/AlterTemplateExportSteps.js.map +1 -0
  25. package/lib/{components → cjs/components}/AlterTemplateImportSteps.d.ts +0 -0
  26. package/lib/{components → cjs/components}/AlterTemplateImportSteps.js +5 -5
  27. package/lib/cjs/components/AlterTemplateImportSteps.js.map +1 -0
  28. package/lib/{decorators → cjs/decorators}/action.d.ts +0 -0
  29. package/lib/{decorators → cjs/decorators}/action.js +3 -3
  30. package/lib/cjs/decorators/action.js.map +1 -0
  31. package/lib/{decorators → cjs/decorators}/actionCtx.d.ts +0 -0
  32. package/lib/{decorators → cjs/decorators}/actionCtx.js +1 -1
  33. package/lib/cjs/decorators/actionCtx.js.map +1 -0
  34. package/lib/{decorators → cjs/decorators}/alter.d.ts +0 -0
  35. package/lib/{decorators → cjs/decorators}/alter.js +3 -3
  36. package/lib/cjs/decorators/alter.js.map +1 -0
  37. package/lib/{decorators → cjs/decorators}/on.d.ts +0 -0
  38. package/lib/{decorators → cjs/decorators}/on.js +3 -3
  39. package/lib/cjs/decorators/on.js.map +1 -0
  40. package/lib/{decorators → cjs/decorators}/useFormioAuth.d.ts +0 -0
  41. package/lib/{decorators → cjs/decorators}/useFormioAuth.js +1 -1
  42. package/lib/cjs/decorators/useFormioAuth.js.map +1 -0
  43. package/lib/{domain → cjs/domain}/AlterHook.d.ts +0 -0
  44. package/lib/{domain → cjs/domain}/AlterHook.js +0 -0
  45. package/lib/cjs/domain/AlterHook.js.map +1 -0
  46. package/lib/{domain → cjs/domain}/Formio.d.ts +0 -0
  47. package/lib/{domain → cjs/domain}/Formio.js +0 -0
  48. package/lib/cjs/domain/Formio.js.map +1 -0
  49. package/lib/{domain → cjs/domain}/FormioAction.d.ts +0 -0
  50. package/lib/{domain → cjs/domain}/FormioAction.js +0 -0
  51. package/lib/cjs/domain/FormioAction.js.map +1 -0
  52. package/lib/{domain → cjs/domain}/FormioActionsIndex.d.ts +0 -0
  53. package/lib/{domain → cjs/domain}/FormioActionsIndex.js +0 -0
  54. package/lib/cjs/domain/FormioActionsIndex.js.map +1 -0
  55. package/lib/{domain → cjs/domain}/FormioAuth.d.ts +0 -0
  56. package/lib/{domain → cjs/domain}/FormioAuth.js +0 -0
  57. package/lib/cjs/domain/FormioAuth.js.map +1 -0
  58. package/lib/{domain → cjs/domain}/FormioBaseModel.d.ts +0 -0
  59. package/lib/{domain → cjs/domain}/FormioBaseModel.js +0 -0
  60. package/lib/cjs/domain/FormioBaseModel.js.map +1 -0
  61. package/lib/{domain → cjs/domain}/FormioConfig.d.ts +0 -0
  62. package/lib/{domain → cjs/domain}/FormioConfig.js +0 -0
  63. package/lib/cjs/domain/FormioConfig.js.map +1 -0
  64. package/lib/{domain → cjs/domain}/FormioCtxMapper.d.ts +0 -0
  65. package/lib/{domain → cjs/domain}/FormioCtxMapper.js +0 -0
  66. package/lib/cjs/domain/FormioCtxMapper.js.map +1 -0
  67. package/lib/{domain → cjs/domain}/FormioDecodedToken.d.ts +0 -0
  68. package/lib/{domain → cjs/domain}/FormioDecodedToken.js +0 -0
  69. package/lib/cjs/domain/FormioDecodedToken.js.map +1 -0
  70. package/lib/{domain → cjs/domain}/FormioErrors.d.ts +0 -0
  71. package/lib/{domain → cjs/domain}/FormioErrors.js +0 -0
  72. package/lib/cjs/domain/FormioErrors.js.map +1 -0
  73. package/lib/{domain → cjs/domain}/FormioHooks.d.ts +0 -0
  74. package/lib/{domain → cjs/domain}/FormioHooks.js +0 -0
  75. package/lib/cjs/domain/FormioHooks.js.map +1 -0
  76. package/lib/{domain → cjs/domain}/FormioJs.d.ts +0 -0
  77. package/lib/{domain → cjs/domain}/FormioJs.js +0 -0
  78. package/lib/cjs/domain/FormioJs.js.map +1 -0
  79. package/lib/{domain → cjs/domain}/FormioModels.d.ts +0 -0
  80. package/lib/{domain → cjs/domain}/FormioModels.js +1 -1
  81. package/lib/cjs/domain/FormioModels.js.map +1 -0
  82. package/lib/{domain → cjs/domain}/FormioRouter.d.ts +0 -0
  83. package/lib/{domain → cjs/domain}/FormioRouter.js +0 -0
  84. package/lib/cjs/domain/FormioRouter.js.map +1 -0
  85. package/lib/{domain → cjs/domain}/FormioSettings.d.ts +0 -0
  86. package/lib/{domain → cjs/domain}/FormioSettings.js +0 -0
  87. package/lib/cjs/domain/FormioSettings.js.map +1 -0
  88. package/lib/{domain → cjs/domain}/FormioTemplate.d.ts +0 -0
  89. package/lib/{domain → cjs/domain}/FormioTemplate.js +0 -0
  90. package/lib/cjs/domain/FormioTemplate.js.map +1 -0
  91. package/lib/{domain → cjs/domain}/FormioTemplateUtil.d.ts +0 -0
  92. package/lib/{domain → cjs/domain}/FormioTemplateUtil.js +0 -0
  93. package/lib/cjs/domain/FormioTemplateUtil.js.map +1 -0
  94. package/lib/{domain → cjs/domain}/FormioUpdate.d.ts +0 -0
  95. package/lib/{domain → cjs/domain}/FormioUpdate.js +0 -0
  96. package/lib/cjs/domain/FormioUpdate.js.map +1 -0
  97. package/lib/{domain → cjs/domain}/FormioUtils.d.ts +0 -0
  98. package/lib/{domain → cjs/domain}/FormioUtils.js +0 -0
  99. package/lib/cjs/domain/FormioUtils.js.map +1 -0
  100. package/lib/{domain → cjs/domain}/OnHook.d.ts +0 -0
  101. package/lib/{domain → cjs/domain}/OnHook.js +0 -0
  102. package/lib/cjs/domain/OnHook.js.map +1 -0
  103. package/lib/{domain → cjs/domain}/Resource.d.ts +0 -0
  104. package/lib/{domain → cjs/domain}/Resource.js +0 -0
  105. package/lib/cjs/domain/Resource.js.map +1 -0
  106. package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
  107. package/lib/cjs/index.js +46 -0
  108. package/lib/cjs/index.js.map +1 -0
  109. package/lib/{middlewares → cjs/middlewares}/FormioAuthMiddleware.d.ts +0 -0
  110. package/lib/{middlewares → cjs/middlewares}/FormioAuthMiddleware.js +12 -12
  111. package/lib/cjs/middlewares/FormioAuthMiddleware.js.map +1 -0
  112. package/lib/{services → cjs/services}/FormioAuthService.d.ts +1 -1
  113. package/lib/{services → cjs/services}/FormioAuthService.js +13 -13
  114. package/lib/cjs/services/FormioAuthService.js.map +1 -0
  115. package/lib/{services → cjs/services}/FormioDatabase.d.ts +0 -0
  116. package/lib/{services → cjs/services}/FormioDatabase.js +10 -10
  117. package/lib/cjs/services/FormioDatabase.js.map +1 -0
  118. package/lib/{services → cjs/services}/FormioHooksService.d.ts +0 -0
  119. package/lib/{services → cjs/services}/FormioHooksService.js +9 -9
  120. package/lib/cjs/services/FormioHooksService.js.map +1 -0
  121. package/lib/{services → cjs/services}/FormioInstaller.d.ts +0 -0
  122. package/lib/{services → cjs/services}/FormioInstaller.js +8 -8
  123. package/lib/cjs/services/FormioInstaller.js.map +1 -0
  124. package/lib/{services → cjs/services}/FormioService.d.ts +0 -0
  125. package/lib/{services → cjs/services}/FormioService.js +8 -8
  126. package/lib/cjs/services/FormioService.js.map +1 -0
  127. package/lib/{utils → cjs/utils}/isMongoId.d.ts +0 -0
  128. package/lib/{utils → cjs/utils}/isMongoId.js +0 -0
  129. package/lib/cjs/utils/isMongoId.js.map +1 -0
  130. package/lib/esm/FormioModule.js +147 -0
  131. package/lib/{FormioModule.js.map → esm/FormioModule.js.map} +1 -1
  132. package/lib/esm/builder/FormioMapper.js +49 -0
  133. package/lib/esm/builder/FormioMapper.js.map +1 -0
  134. package/lib/esm/components/AlterActions.js +63 -0
  135. package/lib/esm/components/AlterActions.js.map +1 -0
  136. package/lib/esm/components/AlterAudit.js +13 -0
  137. package/lib/esm/components/AlterAudit.js.map +1 -0
  138. package/lib/esm/components/AlterHost.js +12 -0
  139. package/lib/esm/components/AlterHost.js.map +1 -0
  140. package/lib/esm/components/AlterLog.js +13 -0
  141. package/lib/esm/components/AlterLog.js.map +1 -0
  142. package/lib/esm/components/AlterSkip.js +29 -0
  143. package/lib/esm/components/AlterSkip.js.map +1 -0
  144. package/lib/esm/components/AlterTemplateExportSteps.js +49 -0
  145. package/lib/esm/components/AlterTemplateExportSteps.js.map +1 -0
  146. package/lib/esm/components/AlterTemplateImportSteps.js +42 -0
  147. package/lib/esm/components/AlterTemplateImportSteps.js.map +1 -0
  148. package/lib/esm/decorators/action.js +16 -0
  149. package/lib/esm/decorators/action.js.map +1 -0
  150. package/lib/esm/decorators/actionCtx.js +19 -0
  151. package/lib/esm/decorators/actionCtx.js.map +1 -0
  152. package/lib/esm/decorators/alter.js +16 -0
  153. package/lib/esm/decorators/alter.js.map +1 -0
  154. package/lib/esm/decorators/on.js +16 -0
  155. package/lib/esm/decorators/on.js.map +1 -0
  156. package/lib/esm/decorators/useFormioAuth.js +11 -0
  157. package/lib/esm/decorators/useFormioAuth.js.map +1 -0
  158. package/lib/esm/domain/AlterHook.js +2 -0
  159. package/lib/esm/domain/AlterHook.js.map +1 -0
  160. package/lib/esm/domain/Formio.js +2 -0
  161. package/lib/esm/domain/Formio.js.map +1 -0
  162. package/lib/esm/domain/FormioAction.js +2 -0
  163. package/lib/esm/domain/FormioAction.js.map +1 -0
  164. package/lib/esm/domain/FormioActionsIndex.js +2 -0
  165. package/lib/esm/domain/FormioActionsIndex.js.map +1 -0
  166. package/lib/esm/domain/FormioAuth.js +2 -0
  167. package/lib/esm/domain/FormioAuth.js.map +1 -0
  168. package/lib/esm/domain/FormioBaseModel.js +2 -0
  169. package/lib/esm/domain/FormioBaseModel.js.map +1 -0
  170. package/lib/esm/domain/FormioConfig.js +2 -0
  171. package/lib/esm/domain/FormioConfig.js.map +1 -0
  172. package/lib/esm/domain/FormioCtxMapper.js +2 -0
  173. package/lib/esm/domain/FormioCtxMapper.js.map +1 -0
  174. package/lib/esm/domain/FormioDecodedToken.js +2 -0
  175. package/lib/esm/domain/FormioDecodedToken.js.map +1 -0
  176. package/lib/esm/domain/FormioErrors.js +2 -0
  177. package/lib/esm/domain/FormioErrors.js.map +1 -0
  178. package/lib/esm/domain/FormioHooks.js +2 -0
  179. package/lib/esm/domain/FormioHooks.js.map +1 -0
  180. package/lib/esm/domain/FormioJs.js +2 -0
  181. package/lib/esm/domain/FormioJs.js.map +1 -0
  182. package/lib/esm/domain/FormioModels.js +2 -0
  183. package/lib/esm/domain/FormioModels.js.map +1 -0
  184. package/lib/esm/domain/FormioRouter.js +2 -0
  185. package/lib/esm/domain/FormioRouter.js.map +1 -0
  186. package/lib/esm/domain/FormioSettings.js +2 -0
  187. package/lib/esm/domain/FormioSettings.js.map +1 -0
  188. package/lib/esm/domain/FormioTemplate.js +2 -0
  189. package/lib/esm/domain/FormioTemplate.js.map +1 -0
  190. package/lib/esm/domain/FormioTemplateUtil.js +2 -0
  191. package/lib/esm/domain/FormioTemplateUtil.js.map +1 -0
  192. package/lib/esm/domain/FormioUpdate.js +2 -0
  193. package/lib/esm/domain/FormioUpdate.js.map +1 -0
  194. package/lib/esm/domain/FormioUtils.js +2 -0
  195. package/lib/esm/domain/FormioUtils.js.map +1 -0
  196. package/lib/esm/domain/OnHook.js +2 -0
  197. package/lib/esm/domain/OnHook.js.map +1 -0
  198. package/lib/esm/domain/Resource.js +2 -0
  199. package/lib/esm/domain/Resource.js.map +1 -0
  200. package/lib/esm/index.js +43 -0
  201. package/lib/esm/index.js.map +1 -0
  202. package/lib/esm/middlewares/FormioAuthMiddleware.js +38 -0
  203. package/lib/esm/middlewares/FormioAuthMiddleware.js.map +1 -0
  204. package/lib/esm/services/FormioAuthService.js +179 -0
  205. package/lib/esm/services/FormioAuthService.js.map +1 -0
  206. package/lib/esm/services/FormioDatabase.js +100 -0
  207. package/lib/{services → esm/services}/FormioDatabase.js.map +1 -1
  208. package/lib/esm/services/FormioHooksService.js +78 -0
  209. package/lib/esm/services/FormioHooksService.js.map +1 -0
  210. package/lib/esm/services/FormioInstaller.js +47 -0
  211. package/lib/esm/services/FormioInstaller.js.map +1 -0
  212. package/lib/esm/services/FormioService.js +97 -0
  213. package/lib/esm/services/FormioService.js.map +1 -0
  214. package/lib/esm/utils/isMongoId.js +4 -0
  215. package/lib/esm/utils/isMongoId.js.map +1 -0
  216. package/lib/types/FormioModule.d.ts +24 -0
  217. package/lib/types/builder/FormioMapper.d.ts +11 -0
  218. package/lib/types/components/AlterActions.d.ts +15 -0
  219. package/lib/types/components/AlterAudit.d.ts +5 -0
  220. package/lib/types/components/AlterHost.d.ts +5 -0
  221. package/lib/types/components/AlterLog.d.ts +5 -0
  222. package/lib/types/components/AlterSkip.d.ts +7 -0
  223. package/lib/types/components/AlterTemplateExportSteps.d.ts +12 -0
  224. package/lib/types/components/AlterTemplateImportSteps.d.ts +11 -0
  225. package/lib/types/decorators/action.d.ts +7 -0
  226. package/lib/types/decorators/actionCtx.d.ts +23 -0
  227. package/lib/types/decorators/alter.d.ts +6 -0
  228. package/lib/types/decorators/on.d.ts +6 -0
  229. package/lib/types/decorators/useFormioAuth.d.ts +6 -0
  230. package/lib/types/domain/AlterHook.d.ts +3 -0
  231. package/lib/types/domain/Formio.d.ts +112 -0
  232. package/lib/types/domain/FormioAction.d.ts +20 -0
  233. package/lib/types/domain/FormioActionsIndex.d.ts +15 -0
  234. package/lib/types/domain/FormioAuth.d.ts +67 -0
  235. package/lib/types/domain/FormioBaseModel.d.ts +11 -0
  236. package/lib/types/domain/FormioConfig.d.ts +59 -0
  237. package/lib/types/domain/FormioCtxMapper.d.ts +7 -0
  238. package/lib/types/domain/FormioDecodedToken.d.ts +12 -0
  239. package/lib/types/domain/FormioErrors.d.ts +53 -0
  240. package/lib/types/domain/FormioHooks.d.ts +194 -0
  241. package/lib/types/domain/FormioJs.d.ts +17 -0
  242. package/lib/types/domain/FormioModels.d.ts +42 -0
  243. package/lib/types/domain/FormioRouter.d.ts +7 -0
  244. package/lib/types/domain/FormioSettings.d.ts +53 -0
  245. package/lib/types/domain/FormioTemplate.d.ts +8 -0
  246. package/lib/types/domain/FormioTemplateUtil.d.ts +13 -0
  247. package/lib/types/domain/FormioUpdate.d.ts +19 -0
  248. package/lib/types/domain/FormioUtils.d.ts +307 -0
  249. package/lib/types/domain/OnHook.d.ts +3 -0
  250. package/lib/types/domain/Resource.d.ts +18 -0
  251. package/lib/types/index.d.ts +38 -0
  252. package/lib/types/middlewares/FormioAuthMiddleware.d.ts +11 -0
  253. package/lib/types/services/FormioAuthService.d.ts +54 -0
  254. package/lib/types/services/FormioDatabase.d.ts +24 -0
  255. package/lib/types/services/FormioHooksService.d.ts +17 -0
  256. package/lib/types/services/FormioInstaller.d.ts +14 -0
  257. package/lib/types/services/FormioService.d.ts +36 -0
  258. package/lib/types/utils/isMongoId.d.ts +1 -0
  259. package/package.json +22 -14
  260. package/tsconfig.compile.esm.json +23 -0
  261. package/lib/builder/FormioMapper.js.map +0 -1
  262. package/lib/components/AlterActions.js.map +0 -1
  263. package/lib/components/AlterAudit.js.map +0 -1
  264. package/lib/components/AlterHost.js.map +0 -1
  265. package/lib/components/AlterLog.js.map +0 -1
  266. package/lib/components/AlterSkip.js.map +0 -1
  267. package/lib/components/AlterTemplateExportSteps.js.map +0 -1
  268. package/lib/components/AlterTemplateImportSteps.js.map +0 -1
  269. package/lib/decorators/action.js.map +0 -1
  270. package/lib/decorators/actionCtx.js.map +0 -1
  271. package/lib/decorators/alter.js.map +0 -1
  272. package/lib/decorators/on.js.map +0 -1
  273. package/lib/decorators/useFormioAuth.js.map +0 -1
  274. package/lib/domain/AlterHook.js.map +0 -1
  275. package/lib/domain/Formio.js.map +0 -1
  276. package/lib/domain/FormioAction.js.map +0 -1
  277. package/lib/domain/FormioActionsIndex.js.map +0 -1
  278. package/lib/domain/FormioAuth.js.map +0 -1
  279. package/lib/domain/FormioBaseModel.js.map +0 -1
  280. package/lib/domain/FormioConfig.js.map +0 -1
  281. package/lib/domain/FormioCtxMapper.js.map +0 -1
  282. package/lib/domain/FormioDecodedToken.js.map +0 -1
  283. package/lib/domain/FormioErrors.js.map +0 -1
  284. package/lib/domain/FormioHooks.js.map +0 -1
  285. package/lib/domain/FormioJs.js.map +0 -1
  286. package/lib/domain/FormioModels.js.map +0 -1
  287. package/lib/domain/FormioRouter.js.map +0 -1
  288. package/lib/domain/FormioSettings.js.map +0 -1
  289. package/lib/domain/FormioTemplate.js.map +0 -1
  290. package/lib/domain/FormioTemplateUtil.js.map +0 -1
  291. package/lib/domain/FormioUpdate.js.map +0 -1
  292. package/lib/domain/FormioUtils.js.map +0 -1
  293. package/lib/domain/OnHook.js.map +0 -1
  294. package/lib/domain/Resource.js.map +0 -1
  295. package/lib/index.js +0 -46
  296. package/lib/index.js.map +0 -1
  297. package/lib/middlewares/FormioAuthMiddleware.js.map +0 -1
  298. package/lib/services/FormioAuthService.js.map +0 -1
  299. package/lib/services/FormioHooksService.js.map +0 -1
  300. package/lib/services/FormioInstaller.js.map +0 -1
  301. package/lib/services/FormioService.js.map +0 -1
  302. package/lib/utils/isMongoId.js.map +0 -1
File without changes
@@ -18,7 +18,7 @@ const FormioInstaller_1 = require("./services/FormioInstaller");
18
18
  const FormioService_1 = require("./services/FormioService");
19
19
  let FormioModule = class FormioModule {
20
20
  $onInit() {
21
- return this.init(core_1.deepClone(this.settings));
21
+ return this.init((0, core_1.deepClone)(this.settings));
22
22
  }
23
23
  async init(options) {
24
24
  return this.formio.init(options, this.hooks.getHooks());
@@ -50,7 +50,7 @@ let FormioModule = class FormioModule {
50
50
  return {
51
51
  method,
52
52
  name: operation.operationId,
53
- url: common_1.normalizePath(baseUrl, path.replace(/\/{(.*)}/gi, "/:$1")),
53
+ url: (0, common_1.normalizePath)(baseUrl, path.replace(/\/{(.*)}/gi, "/:$1")),
54
54
  className: "formio",
55
55
  methodClassName: operation.operationId,
56
56
  parameters: [],
@@ -90,48 +90,48 @@ let FormioModule = class FormioModule {
90
90
  return this.template && !(hasForms || this.skipInstall);
91
91
  }
92
92
  };
93
- tslib_1.__decorate([
94
- common_1.Inject(),
95
- tslib_1.__metadata("design:type", FormioService_1.FormioService)
93
+ (0, tslib_1.__decorate)([
94
+ (0, common_1.Inject)(),
95
+ (0, tslib_1.__metadata)("design:type", FormioService_1.FormioService)
96
96
  ], FormioModule.prototype, "formio", void 0);
97
- tslib_1.__decorate([
98
- common_1.Inject(),
99
- tslib_1.__metadata("design:type", FormioHooksService_1.FormioHooksService)
97
+ (0, tslib_1.__decorate)([
98
+ (0, common_1.Inject)(),
99
+ (0, tslib_1.__metadata)("design:type", FormioHooksService_1.FormioHooksService)
100
100
  ], FormioModule.prototype, "hooks", void 0);
101
- tslib_1.__decorate([
102
- common_1.Inject(),
103
- tslib_1.__metadata("design:type", FormioInstaller_1.FormioInstaller)
101
+ (0, tslib_1.__decorate)([
102
+ (0, common_1.Inject)(),
103
+ (0, tslib_1.__metadata)("design:type", FormioInstaller_1.FormioInstaller)
104
104
  ], FormioModule.prototype, "installer", void 0);
105
- tslib_1.__decorate([
106
- common_1.Inject(),
107
- tslib_1.__metadata("design:type", common_1.PlatformApplication)
105
+ (0, tslib_1.__decorate)([
106
+ (0, common_1.Inject)(),
107
+ (0, tslib_1.__metadata)("design:type", common_1.PlatformApplication)
108
108
  ], FormioModule.prototype, "app", void 0);
109
- tslib_1.__decorate([
110
- common_1.Inject(),
111
- tslib_1.__metadata("design:type", common_1.InjectorService)
109
+ (0, tslib_1.__decorate)([
110
+ (0, common_1.Inject)(),
111
+ (0, tslib_1.__metadata)("design:type", common_1.InjectorService)
112
112
  ], FormioModule.prototype, "injector", void 0);
113
- tslib_1.__decorate([
114
- common_1.Constant("formio", {}),
115
- tslib_1.__metadata("design:type", Object)
113
+ (0, tslib_1.__decorate)([
114
+ (0, common_1.Constant)("formio", {}),
115
+ (0, tslib_1.__metadata)("design:type", Object)
116
116
  ], FormioModule.prototype, "settings", void 0);
117
- tslib_1.__decorate([
118
- common_1.Constant("formio.baseUrl", "/"),
119
- tslib_1.__metadata("design:type", String)
117
+ (0, tslib_1.__decorate)([
118
+ (0, common_1.Constant)("formio.baseUrl", "/"),
119
+ (0, tslib_1.__metadata)("design:type", String)
120
120
  ], FormioModule.prototype, "baseUrl", void 0);
121
- tslib_1.__decorate([
122
- common_1.Constant("formio.skipInstall", false),
123
- tslib_1.__metadata("design:type", Boolean)
121
+ (0, tslib_1.__decorate)([
122
+ (0, common_1.Constant)("formio.skipInstall", false),
123
+ (0, tslib_1.__metadata)("design:type", Boolean)
124
124
  ], FormioModule.prototype, "skipInstall", void 0);
125
- tslib_1.__decorate([
126
- common_1.Constant("formio.template"),
127
- tslib_1.__metadata("design:type", Object)
125
+ (0, tslib_1.__decorate)([
126
+ (0, common_1.Constant)("formio.template"),
127
+ (0, tslib_1.__metadata)("design:type", Object)
128
128
  ], FormioModule.prototype, "template", void 0);
129
- tslib_1.__decorate([
130
- common_1.Constant("formio.root"),
131
- tslib_1.__metadata("design:type", Object)
129
+ (0, tslib_1.__decorate)([
130
+ (0, common_1.Constant)("formio.root"),
131
+ (0, tslib_1.__metadata)("design:type", Object)
132
132
  ], FormioModule.prototype, "root", void 0);
133
- FormioModule = tslib_1.__decorate([
134
- di_1.Module({
133
+ FormioModule = (0, tslib_1.__decorate)([
134
+ (0, di_1.Module)({
135
135
  imports: [
136
136
  FormioService_1.FormioService,
137
137
  FormioHooksService_1.FormioHooksService,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioModule.js","sourceRoot":"","sources":["../../src/FormioModule.ts"],"names":[],"mappings":";;;;AAAA,yCASsB;AACtB,qCAAqC;AACrC,iCAAgC;AAChC,4DAAuD;AACvD,wDAAmD;AACnD,sDAAiD;AACjD,oDAA+C;AAC/C,sDAAiD;AACjD,oFAA+E;AAC/E,oFAA+E;AAG/E,oEAA+D;AAC/D,sEAAiE;AACjE,gEAA2D;AAC3D,4DAAuD;AAgBvD,IAAa,YAAY,GAAzB,MAAa,YAAY;IA+BvB,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAqB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE;YACxB,MAAM,MAAM,GAAQ,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;YAEzC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAA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,KAAK,CAAC,aAAa;QAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAEjD,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1D,CAAC;CACF,CAAA;AApHC;IADC,IAAA,eAAM,GAAE;2CACS,6BAAa;4CAAC;AAGhC;IADC,IAAA,eAAM,GAAE;2CACQ,uCAAkB;2CAAC;AAGpC;IADC,IAAA,eAAM,GAAE;2CACY,iCAAe;+CAAC;AAGrC;IADC,IAAA,eAAM,GAAE;2CACM,4BAAmB;yCAAC;AAGnC;IADC,IAAA,eAAM,GAAE;2CACW,wBAAe;8CAAC;AAGpC;IADC,IAAA,iBAAQ,EAAC,QAAQ,EAAE,EAAE,CAAC;;8CACU;AAGjC;IADC,IAAA,iBAAQ,EAAC,gBAAgB,EAAE,GAAG,CAAC;;6CACN;AAG1B;IADC,IAAA,iBAAQ,EAAC,oBAAoB,EAAE,KAAK,CAAC;;iDACP;AAG/B;IADC,IAAA,iBAAQ,EAAC,iBAAiB,CAAC;;8CACQ;AAGpC;IADC,IAAA,iBAAQ,EAAC,aAAa,CAAC;;0CACH;AA7BV,YAAY;IAdxB,IAAA,WAAM,EAAC;QACN,OAAO,EAAE;YACP,6BAAa;YACb,uCAAkB;YAClB,qCAAiB;YACjB,2BAAY;YACZ,qBAAS;YACT,uBAAU;YACV,mBAAQ;YACR,qBAAS;YACT,mDAAwB;YACxB,mDAAwB;SACzB;KACF,CAAC;GACW,YAAY,CAsHxB;AAtHY,oCAAY","sourcesContent":["import {\n Constant,\n Inject,\n InjectorService,\n OnReady,\n OnRoutesInit,\n PlatformApplication,\n PlatformRouteDetails,\n normalizePath\n} from \"@tsed/common\";\nimport {deepClone} from \"@tsed/core\";\nimport {Module} from \"@tsed/di\";\nimport {AlterActions} from \"./components/AlterActions\";\nimport {AlterAudit} from \"./components/AlterAudit\";\nimport {AlterHost} from \"./components/AlterHost\";\nimport {AlterLog} from \"./components/AlterLog\";\nimport {AlterSkip} from \"./components/AlterSkip\";\nimport {AlterTemplateExportSteps} from \"./components/AlterTemplateExportSteps\";\nimport {AlterTemplateImportSteps} from \"./components/AlterTemplateImportSteps\";\nimport {FormioConfig} from \"./domain/FormioConfig\";\nimport {FormioTemplate} from \"./domain/FormioTemplate\";\nimport {FormioAuthService} from \"./services/FormioAuthService\";\nimport {FormioHooksService} from \"./services/FormioHooksService\";\nimport {FormioInstaller} from \"./services/FormioInstaller\";\nimport {FormioService} from \"./services/FormioService\";\n\n@Module({\n imports: [\n FormioService,\n FormioHooksService,\n FormioAuthService,\n AlterActions,\n AlterHost,\n AlterAudit,\n AlterLog,\n AlterSkip,\n AlterTemplateImportSteps,\n AlterTemplateExportSteps\n ]\n})\nexport class FormioModule implements OnRoutesInit, OnReady {\n @Inject()\n protected formio: FormioService;\n\n @Inject()\n protected hooks: FormioHooksService;\n\n @Inject()\n protected installer: FormioInstaller;\n\n @Inject()\n protected app: PlatformApplication;\n\n @Inject()\n protected injector: InjectorService;\n\n @Constant(\"formio\", {})\n protected settings: FormioConfig;\n\n @Constant(\"formio.baseUrl\", \"/\")\n protected baseUrl: string;\n\n @Constant(\"formio.skipInstall\", false)\n protected skipInstall: boolean;\n\n @Constant(\"formio.template\")\n protected template?: FormioTemplate;\n\n @Constant(\"formio.root\")\n protected root?: any;\n\n $onInit() {\n return this.init(deepClone(this.settings));\n }\n\n async init(options: FormioConfig) {\n return this.formio.init(options, this.hooks.getHooks());\n }\n\n async $onRoutesInit() {\n if (this.formio.isInit()) {\n const router: any = this.app.getRouter();\n\n router.use(this.baseUrl, this.formio.middleware.restrictRequestTypes, this.formio.router);\n\n if (await this.shouldInstall()) {\n await this.installer.install(this.template!, this.root);\n }\n }\n }\n\n async $logRoutes(routes: PlatformRouteDetails[]): Promise<PlatformRouteDetails[]> {\n if (this.formio.isInit()) {\n const spec = (await this.formio.swagger(\n {\n $ctx: {\n request: {\n protocol: \"http\",\n host: \"localhost\"\n }\n }\n },\n this.formio.router\n )) as any;\n const {baseUrl} = this;\n\n Object.entries(spec.paths).forEach(([path, methods]: [string, any]) => {\n Object.entries(methods).forEach(([method, operation]: [string, any]) => {\n routes.push({\n toJSON() {\n return {\n method,\n name: operation.operationId,\n url: normalizePath(baseUrl, path.replace(/\\/{(.*)}/gi, \"/:$1\")),\n className: \"formio\",\n methodClassName: operation.operationId,\n parameters: [],\n rawBody: false\n };\n }\n } as any);\n });\n });\n }\n\n return routes;\n }\n\n // istanbul ignore next\n async $onReady(): Promise<void> {\n if (this.formio.isInit()) {\n const {injector} = this;\n const {httpsPort, httpPort} = injector.settings;\n\n const displayLog = (host: any) => {\n const url = [`${host.protocol}://${host.address}`, typeof host.port === \"number\" && host.port].filter(Boolean).join(\":\");\n\n injector.logger.info(`Form.io API is available on ${url}${this.baseUrl || \"/\"}`);\n };\n\n /* istanbul ignore next */\n if (httpsPort) {\n (this.formio.config as any).protocol = \"https\";\n const host = injector.settings.getHttpsPort();\n displayLog({protocol: \"https\", ...host});\n } else if (httpPort) {\n (this.formio.config as any).protocol = \"http\";\n const host = injector.settings.getHttpPort();\n displayLog({protocol: \"http\", ...host});\n }\n }\n }\n\n protected async shouldInstall() {\n const hasForms = await this.installer.hasForms();\n\n return this.template && !(hasForms || this.skipInstall);\n }\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioMapper.js","sourceRoot":"","sources":["../../../src/builder/FormioMapper.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IACvB,YAAqB,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;IAAG,CAAC;IAEjD,IAAI,CAAC,GAAW;QACd,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAA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AO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;SACJ;QAED,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAEzC,IAAI,GAAG,EAAE;YACP,OAAO,GAAG,CAAC;SACZ;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,YAAY,IAAI,CAAC,EAAE;YACvD,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;gBACvD,OAAO;oBACL,GAAG,GAAG;oBACN,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC;iBACrC,CAAC;YACJ,CAAC,EAAE,EAAE,CAAC,CAAC;SACR;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA3DD,oCA2DC","sourcesContent":["import {FormioCtxMapper} from \"../domain/FormioCtxMapper\";\n\nexport class FormioMapper {\n constructor(readonly ctxData: FormioCtxMapper) {}\n\n find(key: string) {\n const store = Object.values(this.ctxData).find((store) => store.get(key));\n\n return store?.get(key);\n }\n\n findId(data: string) {\n const key = String(data).startsWith(\"$machineName:\") ? String(data) : `$machineName:${String(data)}`;\n const item = this.find(key);\n\n return item ? item._id : undefined;\n }\n\n findMachineName(data: any) {\n const key = String(data);\n const item: any = this.find(key);\n\n return item ? `$machineName:${item.machineName}` : undefined;\n }\n\n mapToExport(data: any) {\n return this.mapData(data, this.findMachineName.bind(this));\n }\n\n mapToImport(data: any) {\n return this.mapData(data, this.findId.bind(this));\n }\n\n mapData(data: any, resolver: any): any {\n if (!data) {\n return data;\n }\n\n if (Array.isArray(data)) {\n return data.map((item) => {\n return this.mapData(item, resolver);\n });\n }\n\n const key = resolver(data, this.ctxData);\n\n if (key) {\n return key;\n }\n\n if (typeof data === \"object\" && !(data instanceof Date)) {\n return Object.entries(data).reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: this.mapData(value, resolver)\n };\n }, {});\n }\n\n return data;\n }\n}\n"]}
@@ -51,16 +51,16 @@ let AlterActions = class AlterActions {
51
51
  };
52
52
  }
53
53
  };
54
- tslib_1.__decorate([
55
- di_1.Inject(),
56
- tslib_1.__metadata("design:type", di_1.InjectorService)
54
+ (0, tslib_1.__decorate)([
55
+ (0, di_1.Inject)(),
56
+ (0, tslib_1.__metadata)("design:type", di_1.InjectorService)
57
57
  ], AlterActions.prototype, "injector", void 0);
58
- tslib_1.__decorate([
59
- di_1.Inject(),
60
- tslib_1.__metadata("design:type", FormioService_1.FormioService)
58
+ (0, tslib_1.__decorate)([
59
+ (0, di_1.Inject)(),
60
+ (0, tslib_1.__metadata)("design:type", FormioService_1.FormioService)
61
61
  ], AlterActions.prototype, "formio", void 0);
62
- AlterActions = tslib_1.__decorate([
63
- alter_1.Alter("actions")
62
+ AlterActions = (0, tslib_1.__decorate)([
63
+ (0, alter_1.Alter)("actions")
64
64
  ], AlterActions);
65
65
  exports.AlterActions = AlterActions;
66
66
  //# sourceMappingURL=AlterActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterActions.js","sourceRoot":"","sources":["../../../src/components/AlterActions.ts"],"names":[],"mappings":";;;;AAAA,yCAAgF;AAChF,iCAA2D;AAE3D,+CAA0C;AAI1C,6DAAwD;AAGxD,IAAa,YAAY,GAAzB,MAAa,YAAY;IAOvB,SAAS,CAAC,OAAsB;QAC9B,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;;YACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;YA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AAI,CAAC,QAAQ,CAAC,GAAG,CAAkB,wBAAe,CAAE,CAAC;QAC7E,MAAM,UAAU,GAAG,eAAe,CAAC,mBAAmB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAE5E,OAAO,CACL,MAAW,EACX,OAAe,EACf,MAAc,EACd,GAA4B,EAC5B,GAAa,EACb,IAAS,EACT,oBAA0C,EAC1C,EAAE;YACF,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAC,CAAC,CAAC;YAC5E,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,yBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;YAEvE,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;iBACjB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;iBACrF,KAAK,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,CAAC;IACJ,CAAC;CACF,CAAA;AAhEC;IADC,IAAA,WAAM,GAAE;2CACW,oBAAe;8CAAC;AAGpC;IADC,IAAA,WAAM,GAAE;2CACS,6BAAa;4CAAC;AALrB,YAAY;IADxB,IAAA,aAAK,EAAC,SAAS,CAAC;GACJ,YAAY,CAkExB;AAlEY,oCAAY","sourcesContent":["import {EndpointMetadata, PlatformContext, PlatformHandler} from \"@tsed/common\";\nimport {Inject, InjectorService, Provider} from \"@tsed/di\";\nimport {FormioActionInfo} from \"@tsed/formio-types\";\nimport {Alter} from \"../decorators/alter\";\nimport {AlterHook} from \"../domain/AlterHook\";\nimport {SetActionItemMessage} from \"../domain/FormioAction\";\nimport {FormioActions} from \"../domain/FormioActionsIndex\";\nimport {FormioService} from \"../services/FormioService\";\n\n@Alter(\"actions\")\nexport class AlterActions implements AlterHook {\n @Inject()\n protected injector: InjectorService;\n\n @Inject()\n protected formio: FormioService;\n\n transform(actions: FormioActions): FormioActions {\n const {Action} = this.formio;\n\n return this.getActions().reduce((actions, provider) => {\n const instance = this.injector.invoke<any>(provider.token);\n const options = provider.store.get<FormioActionInfo>(\"formio:action\");\n const resolveHandler = this.createResolveHandler(provider);\n\n return {\n ...actions,\n [options.name]: class extends Action {\n static access = options.access;\n static async info(req: any, res: any, next: Function) {\n let opts = {...options};\n\n if (instance.info) {\n opts = await instance.info(opts, req, res);\n }\n\n next(null, opts);\n }\n\n static async settingsForm(req: any, res: any, next: Function) {\n next(null, await instance.settingsForm(req, res));\n }\n\n resolve(handler: string, method: string, req: any, res: any, next: Function, setActionItemMessage: SetActionItemMessage): void {\n resolveHandler(this, handler, method, req, res, next, setActionItemMessage);\n }\n }\n };\n }, actions);\n }\n\n protected getActions() {\n return this.injector.getProviders(\"formio:action\");\n }\n\n protected createResolveHandler(provider: Provider<any>) {\n const platformHandler = this.injector.get<PlatformHandler>(PlatformHandler)!;\n const middleware = platformHandler.createCustomHandler(provider, \"resolve\");\n\n return (\n action: any,\n handler: string,\n method: string,\n req: {$ctx: PlatformContext},\n res: Response,\n next: any,\n setActionItemMessage: SetActionItemMessage\n ) => {\n req.$ctx.set(\"ACTION_CTX\", {handler, method, setActionItemMessage, action});\n req.$ctx.endpoint = EndpointMetadata.get(provider.useClass, \"resolve\");\n\n middleware(req.$ctx)\n .then(() => (req.$ctx.data ? platformHandler.flush(req.$ctx.data, req.$ctx) : next()))\n .catch(next);\n };\n }\n}\n"]}
@@ -9,8 +9,8 @@ let AlterAudit = class AlterAudit {
9
9
  return false;
10
10
  }
11
11
  };
12
- AlterAudit = tslib_1.__decorate([
13
- alter_1.Alter("audit")
12
+ AlterAudit = (0, tslib_1.__decorate)([
13
+ (0, alter_1.Alter)("audit")
14
14
  ], AlterAudit);
15
15
  exports.AlterAudit = AlterAudit;
16
16
  //# sourceMappingURL=AlterAudit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterAudit.js","sourceRoot":"","sources":["../../../src/components/AlterAudit.ts"],"names":[],"mappings":";;;;AACA,+CAA0C;AAI1C,IAAa,UAAU,GAAvB,MAAa,UAAU;IACrB,SAAS,CAAC,IAAW,EAAE,KAAa,EAAE,GAAoB;QACxD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/B,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAA;AALY,UAAU;IADtB,IAAA,aAAK,EAAC,OAAO,CAAC;GACF,UAAU,CAKtB;AALY,gCAAU","sourcesContent":["import {PlatformContext} from \"@tsed/common\";\nimport {Alter} from \"../decorators/alter\";\nimport {AlterHook} from \"../domain/AlterHook\";\n\n@Alter(\"audit\")\nexport class AlterAudit implements AlterHook {\n transform(info: any[], event: string, ctx: PlatformContext): boolean {\n ctx.logger.info({event, info});\n return false;\n }\n}\n"]}
@@ -8,8 +8,8 @@ let AlterHost = class AlterHost {
8
8
  return `${ctx.request.protocol}://${ctx.request.host}${baseUrl}`;
9
9
  }
10
10
  };
11
- AlterHost = tslib_1.__decorate([
12
- alter_1.Alter("host")
11
+ AlterHost = (0, tslib_1.__decorate)([
12
+ (0, alter_1.Alter)("host")
13
13
  ], AlterHost);
14
14
  exports.AlterHost = AlterHost;
15
15
  //# sourceMappingURL=AlterHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterHost.js","sourceRoot":"","sources":["../../../src/components/AlterHost.ts"],"names":[],"mappings":";;;;AACA,+CAA0C;AAI1C,IAAa,SAAS,GAAtB,MAAa,SAAS;IACpB,SAAS,CAAC,OAAe,EAAE,GAAoB;QAC7C,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,EAAE,CAAC;IACnE,CAAC;CACF,CAAA;AAJY,SAAS;IADrB,IAAA,aAAK,EAAC,MAAM,CAAC;GACD,SAAS,CAIrB;AAJY,8BAAS","sourcesContent":["import {PlatformContext} from \"@tsed/common\";\nimport {Alter} from \"../decorators/alter\";\nimport {AlterHook} from \"../domain/AlterHook\";\n\n@Alter(\"host\")\nexport class AlterHost implements AlterHook<string> {\n transform(baseUrl: string, ctx: PlatformContext) {\n return `${ctx.request.protocol}://${ctx.request.host}${baseUrl}`;\n }\n}\n"]}
File without changes
@@ -9,8 +9,8 @@ let AlterLog = class AlterLog {
9
9
  return false;
10
10
  }
11
11
  };
12
- AlterLog = tslib_1.__decorate([
13
- alter_1.Alter("log")
12
+ AlterLog = (0, tslib_1.__decorate)([
13
+ (0, alter_1.Alter)("log")
14
14
  ], AlterLog);
15
15
  exports.AlterLog = AlterLog;
16
16
  //# sourceMappingURL=AlterLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterLog.js","sourceRoot":"","sources":["../../../src/components/AlterLog.ts"],"names":[],"mappings":";;;;AACA,+CAA0C;AAI1C,IAAa,QAAQ,GAArB,MAAa,QAAQ;IACnB,SAAS,CAAC,KAAa,EAAE,GAAoB,EAAE,GAAG,IAAW;QAC3D,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;QAChC,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAA;AALY,QAAQ;IADpB,IAAA,aAAK,EAAC,KAAK,CAAC;GACA,QAAQ,CAKpB;AALY,4BAAQ","sourcesContent":["import {PlatformContext} from \"@tsed/common\";\nimport {Alter} from \"../decorators/alter\";\nimport {AlterHook} from \"../domain/AlterHook\";\n\n@Alter(\"log\")\nexport class AlterLog implements AlterHook {\n transform(event: string, ctx: PlatformContext, ...info: any[]): boolean {\n ctx.logger.debug({event, info});\n return false;\n }\n}\n"]}
@@ -13,20 +13,20 @@ let AlterSkip = class AlterSkip {
13
13
  const { request } = ctx;
14
14
  const url = request.url.split("?")[0];
15
15
  return !!this.whiteList.find((entry) => {
16
- return common_2.normalizePath(this.baseUrl, entry) === url;
16
+ return (0, common_2.normalizePath)(this.baseUrl, entry) === url;
17
17
  });
18
18
  }
19
19
  };
20
- tslib_1.__decorate([
21
- common_1.Constant("formio.baseUrl", "/"),
22
- tslib_1.__metadata("design:type", String)
20
+ (0, tslib_1.__decorate)([
21
+ (0, common_1.Constant)("formio.baseUrl", "/"),
22
+ (0, tslib_1.__metadata)("design:type", String)
23
23
  ], AlterSkip.prototype, "baseUrl", void 0);
24
- tslib_1.__decorate([
25
- common_1.Constant("formio.whiteList", ["/spec.json"]),
26
- tslib_1.__metadata("design:type", Array)
24
+ (0, tslib_1.__decorate)([
25
+ (0, common_1.Constant)("formio.whiteList", ["/spec.json"]),
26
+ (0, tslib_1.__metadata)("design:type", Array)
27
27
  ], AlterSkip.prototype, "whiteList", void 0);
28
- AlterSkip = tslib_1.__decorate([
29
- alter_1.Alter("skip")
28
+ AlterSkip = (0, tslib_1.__decorate)([
29
+ (0, alter_1.Alter)("skip")
30
30
  ], AlterSkip);
31
31
  exports.AlterSkip = AlterSkip;
32
32
  //# sourceMappingURL=AlterSkip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterSkip.js","sourceRoot":"","sources":["../../../src/components/AlterSkip.ts"],"names":[],"mappings":";;;;AAAA,yCAAuD;AACvD,yCAA2C;AAC3C,+CAA0C;AAI1C,IAAa,SAAS,GAAtB,MAAa,SAAS;IAOpB,SAAS,CAAC,KAAU,EAAE,GAAoB;QACxC,IAAI,KAAK,EAAE;YACT,OAAO,IAAI,CAAC;SACb;QAED,MAAM,EAAC,OAAO,EAAC,GAAG,GAAG,CAAC;QACtB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;YACrC,OAAO,IAAA,sBAAa,EAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,GAAG,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAjBC;IADC,IAAA,iBAAQ,EAAC,gBAAgB,EAAE,GAAG,CAAC;;0CAChB;AAGhB;IADC,IAAA,iBAAQ,EAAC,kBAAkB,EAAE,CAAC,YAAY,CAAC,CAAC;;4CACzB;AALT,SAAS;IADrB,IAAA,aAAK,EAAC,MAAM,CAAC;GACD,SAAS,CAmBrB;AAnBY,8BAAS","sourcesContent":["import {Constant, PlatformContext} from \"@tsed/common\";\nimport {normalizePath} from \"@tsed/common\";\nimport {Alter} from \"../decorators/alter\";\nimport {AlterHook} from \"../domain/AlterHook\";\n\n@Alter(\"skip\")\nexport class AlterSkip implements AlterHook {\n @Constant(\"formio.baseUrl\", \"/\")\n baseUrl: string;\n\n @Constant(\"formio.whiteList\", [\"/spec.json\"])\n whiteList: string[];\n\n transform(value: any, ctx: PlatformContext): any {\n if (value) {\n return true;\n }\n\n const {request} = ctx;\n const url = request.url.split(\"?\")[0];\n\n return !!this.whiteList.find((entry) => {\n return normalizePath(this.baseUrl, entry) === url;\n });\n }\n}\n"]}
@@ -28,7 +28,7 @@ let AlterTemplateExportSteps = class AlterTemplateExportSteps {
28
28
  .reduce((acc, { _id, created, updated, modified, __v, owner, roles, form, metadata, ...submission }) => {
29
29
  const machineName = mapper.mapToExport(form.toString());
30
30
  const key = machineName.replace("$machineName:", "");
31
- acc[key] = core_1.getValue(acc, key, []);
31
+ acc[key] = (0, core_1.getValue)(acc, key, []);
32
32
  acc[key].push({
33
33
  ...submission,
34
34
  created: created && created.toString(),
@@ -41,12 +41,12 @@ let AlterTemplateExportSteps = class AlterTemplateExportSteps {
41
41
  }, {});
42
42
  }
43
43
  };
44
- tslib_1.__decorate([
45
- di_1.Inject(),
46
- tslib_1.__metadata("design:type", FormioDatabase_1.FormioDatabase)
44
+ (0, tslib_1.__decorate)([
45
+ (0, di_1.Inject)(),
46
+ (0, tslib_1.__metadata)("design:type", FormioDatabase_1.FormioDatabase)
47
47
  ], AlterTemplateExportSteps.prototype, "database", void 0);
48
- AlterTemplateExportSteps = tslib_1.__decorate([
49
- alter_1.Alter("templateExportSteps")
48
+ AlterTemplateExportSteps = (0, tslib_1.__decorate)([
49
+ (0, alter_1.Alter)("templateExportSteps")
50
50
  ], AlterTemplateExportSteps);
51
51
  exports.AlterTemplateExportSteps = AlterTemplateExportSteps;
52
52
  //# sourceMappingURL=AlterTemplateExportSteps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterTemplateExportSteps.js","sourceRoot":"","sources":["../../../src/components/AlterTemplateExportSteps.ts"],"names":[],"mappings":";;;;AAAA,qCAAoC;AACpC,iCAAgC;AAGhC,+CAA0C;AAI1C,+DAA0D;AAE1D,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAG/B,IAAa,wBAAwB,GAArC,MAAa,wBAAwB;IAInC,SAAS,CAAC,KAAY,EAAE,QAAwB,EAAE,GAAQ,EAAE,OAAY;QACtE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;QAEnF,OAAO,KAAK,CAAC;IACf,CAAC;IAES,KAAK,CAAC,iBAAiB,CAAC,QAAwB,EAAE,GAAQ,EAAE,OAAY,EAAE,IAAS;QAC3F,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YAC9C,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE;YAC/B,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC;gBACjC,OAAO,EAAE,EAAC,GAAG,EAAE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E,CAAC,CAAC;IACX,CAAC;CACF,CAAA;AA1CC;IADC,IAAA,WAAM,GAAE;2CACW,+BAAc;0DAAC;AAFxB,wBAAwB;IADpC,IAAA,aAAK,EAAC,qBAAqB,CAAC;GAChB,wBAAwB,CA4CpC;AA5CY,4DAAwB","sourcesContent":["import {getValue} from \"@tsed/core\";\nimport {Inject} from \"@tsed/di\";\nimport {MongooseDocument} from \"@tsed/mongoose\";\nimport {FormioMapper} from \"../builder/FormioMapper\";\nimport {Alter} from \"../decorators/alter\";\nimport {AlterHook} from \"../domain/AlterHook\";\nimport {FormioSubmission} from \"../domain/FormioModels\";\nimport {FormioTemplate} from \"../domain/FormioTemplate\";\nimport {FormioDatabase} from \"../services/FormioDatabase\";\n\nconst async = require(\"async\");\n\n@Alter(\"templateExportSteps\")\nexport class AlterTemplateExportSteps implements AlterHook {\n @Inject()\n protected database: FormioDatabase;\n\n transform(queue: any[], template: FormioTemplate, map: any, options: any): any {\n queue.push(async.apply(this.exportSubmissions.bind(this), template, map, options));\n\n return queue;\n }\n\n protected async exportSubmissions(template: FormioTemplate, map: any, options: any, next: any) {\n const [mapper, submissions] = await Promise.all([\n this.database.getFormioMapper(),\n this.database.submissionModel.find({\n deleted: {$eq: null}\n })\n ]);\n\n template.submissions = await this.mapSubmissions(submissions, mapper);\n\n next(null, template);\n }\n\n protected mapSubmissions(submissions: MongooseDocument<FormioSubmission>[], mapper: FormioMapper) {\n return submissions\n .map((submission) => submission.toObject())\n .reduce((acc: any, {_id, created, updated, modified, __v, owner, roles, form, metadata, ...submission}) => {\n const machineName = mapper.mapToExport(form.toString());\n const key = machineName.replace(\"$machineName:\", \"\");\n\n acc[key] = getValue(acc, key, []);\n\n acc[key].push({\n ...submission,\n created: created && created.toString(),\n modified: modified && modified.toString(),\n data: mapper.mapToExport(submission.data),\n roles: mapper.mapToExport(roles).filter(Boolean),\n form: mapper.mapToExport(form)\n });\n\n return acc;\n }, {});\n }\n}\n"]}
@@ -34,12 +34,12 @@ let AlterTemplateImportSteps = class AlterTemplateImportSteps {
34
34
  return value;
35
35
  }
36
36
  };
37
- tslib_1.__decorate([
38
- di_1.Inject(),
39
- tslib_1.__metadata("design:type", FormioDatabase_1.FormioDatabase)
37
+ (0, tslib_1.__decorate)([
38
+ (0, di_1.Inject)(),
39
+ (0, tslib_1.__metadata)("design:type", FormioDatabase_1.FormioDatabase)
40
40
  ], AlterTemplateImportSteps.prototype, "database", void 0);
41
- AlterTemplateImportSteps = tslib_1.__decorate([
42
- alter_1.Alter("templateImportSteps")
41
+ AlterTemplateImportSteps = (0, tslib_1.__decorate)([
42
+ (0, alter_1.Alter)("templateImportSteps")
43
43
  ], AlterTemplateImportSteps);
44
44
  exports.AlterTemplateImportSteps = AlterTemplateImportSteps;
45
45
  //# sourceMappingURL=AlterTemplateImportSteps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterTemplateImportSteps.js","sourceRoot":"","sources":["../../../src/components/AlterTemplateImportSteps.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAEhC,+CAA0C;AAI1C,+DAA0D;AAE1D,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAG/B,IAAa,wBAAwB,GAArC,MAAa,wBAAwB;IAInC,SAAS,CAAC,KAAY,EAAE,OAAiB,EAAE,QAAiC;QAC1E,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;QAErE,OAAO,KAAK,CAAC;IACf,CAAC;IAES,KAAK,CAAC,iBAAiB,CAAC,QAAiC,EAAE,IAAS;QAC5E,IAAI,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE;YACpC,wBAAwB;YACxB,MAAM,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAEnD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC;YACtD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAErD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;gBAC3B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;oBACjC,MAAM,IAAI,CAAC,gBAAgB,CAAC,EAAC,GAAG,UAAU,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,EAAC,EAAE,OAAO,CAAC,CAAC;iBAC1F;aACF;SACF;QAED,IAAI,EAAE,CAAC;IACT,CAAC;IAES,KAAK,CAAC,gBAAgB,CAAC,UAAqC,EAAE,MAAoB;QAC1F,MAAM,KAAK,GAAG;YACZ,GAAG,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;YACjC,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;SAChF,CAAC;QAEF,MAAM,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAElD,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAA;AApCC;IADC,IAAA,WAAM,GAAE;2CACW,+BAAc;0DAAC;AAFxB,wBAAwB;IADpC,IAAA,aAAK,EAAC,qBAAqB,CAAC;GAChB,wBAAwB,CAsCpC;AAtCY,4DAAwB","sourcesContent":["import {Inject} from \"@tsed/di\";\nimport {FormioMapper} from \"../builder/FormioMapper\";\nimport {Alter} from \"../decorators/alter\";\nimport {AlterHook} from \"../domain/AlterHook\";\nimport {FormioSubmission} from \"../domain/FormioModels\";\nimport {FormioTemplate} from \"../domain/FormioTemplate\";\nimport {FormioDatabase} from \"../services/FormioDatabase\";\n\nconst async = require(\"async\");\n\n@Alter(\"templateImportSteps\")\nexport class AlterTemplateImportSteps implements AlterHook {\n @Inject()\n protected database: FormioDatabase;\n\n transform(queue: any[], install: Function, template: Partial<FormioTemplate>): any {\n queue.push(async.apply(this.importSubmissions.bind(this), template));\n\n return queue;\n }\n\n protected async importSubmissions(template: Partial<FormioTemplate>, done: any) {\n if (template && template.submissions) {\n // clean all submissions\n await this.database.submissionModel.deleteMany({});\n\n const ctxData = await this.database.getFormioMapper();\n const entries = Object.entries(template.submissions);\n\n for (const entry of entries) {\n for (const submission of entry[1]) {\n await this.importSubmission({...submission, form: submission.form || entry[0]}, ctxData);\n }\n }\n }\n\n done();\n }\n\n protected async importSubmission(submission: Partial<FormioSubmission>, mapper: FormioMapper) {\n const value = {\n ...mapper.mapToImport(submission),\n roles: [...new Set(mapper.mapToImport(submission.roles || []))].filter(Boolean)\n };\n\n await this.database.submissionModel.create(value);\n\n return value;\n }\n}\n"]}
File without changes
@@ -9,12 +9,12 @@ const di_1 = require("@tsed/di");
9
9
  * @decorator
10
10
  */
11
11
  function Action(options) {
12
- return core_1.useDecorators((target) => {
13
- di_1.registerProvider({
12
+ return (0, core_1.useDecorators)((target) => {
13
+ (0, di_1.registerProvider)({
14
14
  provide: target,
15
15
  type: "formio:action"
16
16
  });
17
- }, core_1.StoreSet("formio:action", options));
17
+ }, (0, core_1.StoreSet)("formio:action", options));
18
18
  }
19
19
  exports.Action = Action;
20
20
  //# sourceMappingURL=action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.js","sourceRoot":"","sources":["../../../src/decorators/action.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,iCAA0C;AAG1C;;;;GAIG;AACH,SAAgB,MAAM,CAAC,OAAyB;IAC9C,OAAO,IAAA,oBAAa,EAAC,CAAC,MAAW,EAAE,EAAE;QACnC,IAAA,qBAAgB,EAAC;YACf,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,eAAe;SACtB,CAAC,CAAC;IACL,CAAC,EAAE,IAAA,eAAQ,EAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;AACzC,CAAC;AAPD,wBAOC","sourcesContent":["import {StoreSet, useDecorators} from \"@tsed/core\";\nimport {registerProvider} from \"@tsed/di\";\nimport {FormioActionInfo} from \"@tsed/formio-types\";\n\n/**\n * Create a new FormIO Action.\n * @param options\n * @decorator\n */\nexport function Action(options: FormioActionInfo): ClassDecorator {\n return useDecorators((target: any) => {\n registerProvider({\n provide: target,\n type: \"formio:action\"\n });\n }, StoreSet(\"formio:action\", options));\n}\n"]}
@@ -17,7 +17,7 @@ const common_1 = require("@tsed/common");
17
17
  * @constructor
18
18
  */
19
19
  function ActionCtx(expression) {
20
- return common_1.Context(["ACTION_CTX", expression].filter(Boolean).join("."));
20
+ return (0, common_1.Context)(["ACTION_CTX", expression].filter(Boolean).join("."));
21
21
  }
22
22
  exports.ActionCtx = ActionCtx;
23
23
  //# sourceMappingURL=actionCtx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionCtx.js","sourceRoot":"","sources":["../../../src/decorators/actionCtx.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAIrC;;;;;;;;;;;;;GAaG;AACH,SAAgB,SAAS,CAAC,UAAmB;IAC3C,OAAO,IAAA,gBAAO,EAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC;AAFD,8BAEC","sourcesContent":["import {Context} from \"@tsed/common\";\nimport {SetActionItemMessage} from \"../domain/FormioAction\";\nimport {FormioAction} from \"@tsed/formio-types\";\n\n/**\n * Return the current action context with the following data:\n *\n * ```typescript\n * export type ActionCtx = {\n * handler: string;\n * method: string;\n * setActionItemMessage: SetActionItemMessage;\n * action: FormioAction;\n * };\n * ```\n * @param expression\n * @constructor\n */\nexport function ActionCtx(expression?: string): ParameterDecorator {\n return Context([\"ACTION_CTX\", expression].filter(Boolean).join(\".\"));\n}\n\nexport type ActionCtx = {\n handler: string;\n method: string;\n setActionItemMessage: SetActionItemMessage;\n action: FormioAction;\n};\n"]}
File without changes
@@ -9,12 +9,12 @@ const di_1 = require("@tsed/di");
9
9
  * @constructor
10
10
  */
11
11
  function Alter(name) {
12
- return core_1.useDecorators((target) => {
13
- di_1.registerProvider({
12
+ return (0, core_1.useDecorators)((target) => {
13
+ (0, di_1.registerProvider)({
14
14
  provide: target,
15
15
  type: "formio:alter"
16
16
  });
17
- }, core_1.StoreSet("formio:alter:name", name));
17
+ }, (0, core_1.StoreSet)("formio:alter:name", name));
18
18
  }
19
19
  exports.Alter = Alter;
20
20
  //# sourceMappingURL=alter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alter.js","sourceRoot":"","sources":["../../../src/decorators/alter.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,iCAA0C;AAE1C;;;;GAIG;AACH,SAAgB,KAAK,CAAC,IAAY;IAChC,OAAO,IAAA,oBAAa,EAAC,CAAC,MAAW,EAAE,EAAE;QACnC,IAAA,qBAAgB,EAAC;YACf,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,cAAc;SACrB,CAAC,CAAC;IACL,CAAC,EAAE,IAAA,eAAQ,EAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC;AAPD,sBAOC","sourcesContent":["import {StoreSet, useDecorators} from \"@tsed/core\";\nimport {registerProvider} from \"@tsed/di\";\n\n/**\n *\n * @param name\n * @constructor\n */\nexport function Alter(name: string): ClassDecorator {\n return useDecorators((target: any) => {\n registerProvider({\n provide: target,\n type: \"formio:alter\"\n });\n }, StoreSet(\"formio:alter:name\", name));\n}\n"]}
File without changes
@@ -9,12 +9,12 @@ const di_1 = require("@tsed/di");
9
9
  * @constructor
10
10
  */
11
11
  function On(name) {
12
- return core_1.useDecorators((target) => {
13
- di_1.registerProvider({
12
+ return (0, core_1.useDecorators)((target) => {
13
+ (0, di_1.registerProvider)({
14
14
  provide: target,
15
15
  type: "formio:on"
16
16
  });
17
- }, core_1.StoreSet("formio:on:name", name));
17
+ }, (0, core_1.StoreSet)("formio:on:name", name));
18
18
  }
19
19
  exports.On = On;
20
20
  //# sourceMappingURL=on.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on.js","sourceRoot":"","sources":["../../../src/decorators/on.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,iCAA0C;AAE1C;;;;GAIG;AACH,SAAgB,EAAE,CAAC,IAAY;IAC7B,OAAO,IAAA,oBAAa,EAAC,CAAC,MAAW,EAAE,EAAE;QACnC,IAAA,qBAAgB,EAAC;YACf,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,WAAW;SAClB,CAAC,CAAC;IACL,CAAC,EAAE,IAAA,eAAQ,EAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC;AACvC,CAAC;AAPD,gBAOC","sourcesContent":["import {StoreSet, useDecorators} from \"@tsed/core\";\nimport {registerProvider} from \"@tsed/di\";\n\n/**\n * Create a Form io hook event listener\n * @param name\n * @constructor\n */\nexport function On(name: string): ClassDecorator {\n return useDecorators((target: any) => {\n registerProvider({\n provide: target,\n type: \"formio:on\"\n });\n }, StoreSet(\"formio:on:name\", name));\n}\n"]}
@@ -9,7 +9,7 @@ const FormioAuthMiddleware_1 = require("../middlewares/FormioAuthMiddleware");
9
9
  * @formio
10
10
  */
11
11
  function UseFormioAuth() {
12
- return common_1.UseAuth(FormioAuthMiddleware_1.FormioAuthMiddleware);
12
+ return (0, common_1.UseAuth)(FormioAuthMiddleware_1.FormioAuthMiddleware);
13
13
  }
14
14
  exports.UseFormioAuth = UseFormioAuth;
15
15
  //# sourceMappingURL=useFormioAuth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormioAuth.js","sourceRoot":"","sources":["../../../src/decorators/useFormioAuth.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AACrC,8EAAyE;AAEzE;;;;GAIG;AACH,SAAgB,aAAa;IAC3B,OAAO,IAAA,gBAAO,EAAC,2CAAoB,CAAC,CAAC;AACvC,CAAC;AAFD,sCAEC","sourcesContent":["import {UseAuth} from \"@tsed/common\";\nimport {FormioAuthMiddleware} from \"../middlewares/FormioAuthMiddleware\";\n\n/**\n * Check if a user is connected by using the Formio Auth middleware\n * @decorator\n * @formio\n */\nexport function UseFormioAuth(): Function {\n return UseAuth(FormioAuthMiddleware);\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlterHook.js","sourceRoot":"","sources":["../../../src/domain/AlterHook.ts"],"names":[],"mappings":"","sourcesContent":["export interface AlterHook<T = any> {\n transform(...args: any[]): T;\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Formio.js","sourceRoot":"","sources":["../../../src/domain/Formio.ts"],"names":[],"mappings":"","sourcesContent":["import {EventEmitter} from \"events\";\nimport {NextFunction, Request, Response} from \"express\";\nimport {Db} from \"mongodb\";\nimport {Mongoose, Schema} from \"mongoose\";\nimport {FormioActionModelCtor} from \"./FormioAction\";\nimport {FormioActionsIndex} from \"./FormioActionsIndex\";\nimport {FormioAuth} from \"./FormioAuth\";\nimport {FormioBaseModel} from \"./FormioBaseModel\";\nimport {FormioConfig} from \"./FormioConfig\";\nimport {FormioHook, FormioHooks} from \"./FormioHooks\";\nimport {FormioModels, FormioSchemas} from \"./FormioModels\";\nimport {FormioTemplateUtil} from \"./FormioTemplateUtil\";\nimport {FormioUpdate} from \"./FormioUpdate\";\nimport {FormioUtil} from \"./FormioUtils\";\n\nexport interface FormioBase {\n /**\n * Auth\n */\n auth: FormioAuth;\n /**\n * Event emitter\n */\n events: EventEmitter;\n /**\n * Formio configuration\n */\n config: FormioConfig & {schema: string};\n\n /**\n * Emit alter `log` event. Return false to disable event logging.\n * @param event\n * @param req\n * @param info\n */\n log(event: string, req: Request, ...info: any[]): void;\n\n /**\n * Emit alter `audit` event if `config.audit` is enabled. Return false to disable event logging.\n * Use `console.log`.\n * @param event\n * @param req\n * @param info\n */\n audit(event: string, req: Request, ...info: any[]): void;\n}\n\nexport interface FormioMiddlewares {\n alias(req: Request, res: Response, next: NextFunction): void;\n\n params(req: Request, res: Response, next: NextFunction): void;\n\n accessHandler(req: Request, res: Response, next: NextFunction): void;\n\n /**\n * Authorize all urls based on roles and permissions.\n * @param req\n * @param res\n * @param next\n */\n permissionHandler(req: Request, res: Response, next: NextFunction): void;\n\n restrictRequestTypes(req: Request, res: Response, next: NextFunction): void;\n tokenHandler(req: Request, res: Response, next: NextFunction): void;\n}\n\nexport interface Formio extends FormioBase {\n Action: FormioActionModelCtor;\n BaseModel: FormioBaseModel;\n actions: FormioActionsIndex;\n resources: any;\n /**\n * Database connection\n */\n db: Db;\n\n schemas: FormioSchemas & {\n AccessSchema: Schema;\n PermissionSchema: Schema;\n FieldMatchAccessPermissionSchema: Schema;\n };\n\n models: FormioModels;\n /**\n * Mongoose lib.\n */\n mongoose: Mongoose;\n /**\n * Exported formio middlewares\n */\n readonly middleware: FormioMiddlewares;\n /**\n * Hooks.\n */\n hooks: FormioHooks;\n /**\n * Plugins.\n */\n plugins: any;\n /**\n * Formio hook util.\n */\n readonly hook: FormioHook;\n /**\n * The formio utils.\n */\n readonly util: FormioUtil;\n /**\n * Update system.\n */\n readonly update: FormioUpdate;\n /**\n * Template export/import\n */\n readonly template: FormioTemplateUtil;\n\n /**\n * Encryption system.\n */\n encrypt(text: string, next: (err: null | Error, hash: string) => void): void;\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioAction.js","sourceRoot":"","sources":["../../../src/domain/FormioAction.ts"],"names":[],"mappings":"","sourcesContent":["import {Request, Response} from \"express\";\nimport {FormioMongooseSchema} from \"./FormioBaseModel\";\nimport {FormioComponent} from \"./FormioModels\";\nimport {FormioAction, FormioActionInfo} from \"@tsed/formio-types\";\n\nexport interface FormioActionModel extends FormioAction {\n resolve(handler: string, method: string, req: Request, res: Response, next: Function, setActionItemMessage: SetActionItemMessage): void;\n}\n\nexport type FormioActionMongooseSchema = FormioMongooseSchema<FormioAction>;\nexport type SetActionItemMessage = (message: string, data?: any, state?: any) => void;\n\nexport interface FormioActionModelCtor {\n schema?: FormioActionMongooseSchema;\n\n info(req: Request, response: Response, next: (err: any, info: FormioActionInfo) => void): void;\n\n settingsForm(req: Request, response: Response, next: (err: any, info: FormioComponent[]) => void): void;\n\n new (data: FormioAction, req: Request, res: Response): FormioActionModel;\n}\n\nexport interface ActionMethods {\n info?(req: Request, response: Response): Promise<FormioAction>;\n\n settingsForm(req: Request, response: Response): Promise<FormioComponent[]>;\n\n resolve(...args: any[]): Promise<any>;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioActionsIndex.js","sourceRoot":"","sources":["../../../src/domain/FormioActionsIndex.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {FormioActionModelCtor} from \"./FormioAction\";\n\nexport interface FormioActions {\n email: FormioActionModelCtor;\n login: FormioActionModelCtor;\n resetpass: FormioActionModelCtor;\n role: FormioActionModelCtor;\n save: FormioActionModelCtor;\n sql: FormioActionModelCtor;\n webhook: FormioActionModelCtor;\n\n [key: string]: FormioActionModelCtor;\n}\n\nexport interface FormioActionsIndex {\n actions: FormioActions & Record<string, Type<FormioActionModelCtor>>;\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioAuth.js","sourceRoot":"","sources":["../../../src/domain/FormioAuth.ts"],"names":[],"mappings":"","sourcesContent":["import {Next, Req, Res} from \"@tsed/common\";\nimport {FormioDecodedToken, FormioPayloadToken} from \"./FormioDecodedToken\";\nimport {FormioForm} from \"./FormioModels\";\n\nexport interface FormioAuth {\n /**\n * Send the current user.\n *\n * @param req\n * @param res\n * @param next\n */\n currentUser(req: Req, res: Res, next: Function): void;\n\n /**\n * Checks to see if a decoded token is allowed to access this path.\n * @param req\n * @param decoded\n * @return {boolean}\n */\n isTokenAllowed(req: Req, decoded: FormioDecodedToken): boolean;\n\n /**\n * Generate our JWT with the given payload, and pass it to the given callback function.\n *\n * @param payload {Object}\n * The decoded JWT.\n *\n * @return {String|Boolean}\n * The JWT from the given payload, or false if the jwt payload is still valid.\n */\n getToken(payload: FormioPayloadToken): string | boolean;\n\n /**\n * Generate a temporary token for a specific path and expiration.\n *\n * @param req\n * @param res\n * @param allow\n * @param expire\n * @param admin\n * @param cb\n */\n getTempToken(req: Req, res: Res, allow: boolean, expire: number, admin: boolean, cb: Function): void;\n\n tempToken(req: Req, res: Res): void;\n\n /**\n * Authenticate a user.\n *\n * @param req\n * @param forms {Mixed}\n * A single form or an array of forms to authenticate against.\n * @param userField {String}\n * The user submission field that contains the username.\n * @param passField {String}\n * The user submission field that contains the password.\n * @param username {String}\n * The user submission username to login with.\n * @param password {String}\n * The user submission password to login with.\n * @param next {Function}\n * The callback function to call after authentication.\n */\n authenticate(\n req: Req,\n forms: FormioForm | FormioForm[],\n userField: string,\n passField: string,\n username: string,\n password: string,\n next: Function\n ): void;\n\n /**\n * Interception logout request.\n * @param req\n * @param res\n * @param next\n */\n logout(req: Req, res: Res, next: Next): void;\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioBaseModel.js","sourceRoot":"","sources":["../../../src/domain/FormioBaseModel.ts"],"names":[],"mappings":"","sourcesContent":["import {MongooseDocument} from \"@tsed/mongoose\";\nimport {Schema, Document} from \"mongoose\";\n\nexport type FormioMongooseSchema<T> = Schema<Document<T>> & {\n machineName(document: MongooseDocument<T>, done: Function): void;\n};\n\nexport interface FormioBaseModel<T = any> {\n schema: Schema<Document<T>>;\n}\n\nexport interface FormioModel<T = any> extends FormioBaseModel<T> {\n schema: FormioMongooseSchema<T>;\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioConfig.js","sourceRoot":"","sources":["../../../src/domain/FormioConfig.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioSettings} from \"./FormioSettings\";\nimport {FormioTemplate} from \"./FormioTemplate\";\n\nexport interface FormioJwtConfig {\n secret: string;\n expireTime?: number;\n}\n\nexport interface FormioEmailConfig {\n type: string;\n username: string;\n password: string;\n}\n\nexport interface FormioConfig {\n /**\n * Base url to mount the formio endpoints with Ts.ED server. Default: '/'\n */\n baseUrl: string;\n /**\n * Skip installation process\n */\n skipInstall?: boolean;\n\n template?: FormioTemplate;\n /**\n * Cors allowed origin configuration. Default: `[\"*\"]`.\n */\n allowedOrigins?: string[];\n /**\n *\n */\n mongoCA?: any;\n mongo?: string;\n mongoConfig?: string;\n /**\n * Reserved keywords form name list\n */\n reservedForms?: string[];\n /**\n * Jwt configuration\n */\n jwt: FormioJwtConfig;\n /**\n * Email sendgrid settings\n */\n email?: FormioEmailConfig;\n /**\n * Settings of external formio services\n */\n settings?: FormioSettings;\n /**\n * Enable audit log. Default: false\n */\n audit?: boolean;\n /**\n * User root credentials\n */\n root: {\n email: string;\n password: string;\n };\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioCtxMapper.js","sourceRoot":"","sources":["../../../src/domain/FormioCtxMapper.ts"],"names":[],"mappings":"","sourcesContent":["import {MongooseDocument} from \"@tsed/mongoose\";\nimport {FormioAction, FormioForm, FormioRole} from \"@tsed/formio-types\";\n\nexport interface FormioCtxMapper {\n forms: Map<string, MongooseDocument<FormioForm>>;\n actions: Map<string, MongooseDocument<FormioAction>>;\n roles: Map<string, MongooseDocument<FormioRole>>;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioDecodedToken.js","sourceRoot":"","sources":["../../../src/domain/FormioDecodedToken.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioDecodedToken extends Record<string, unknown> {\n user: {\n _id: string;\n };\n form: {\n _id: string;\n };\n}\n\nexport interface FormioPayloadToken {\n token: string;\n decoded: FormioDecodedToken;\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioErrors.js","sourceRoot":"","sources":["../../../src/domain/FormioErrors.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioErrors {\n app: {\n ESETTINGSLOAD: \"Cannot load app settings.\";\n EDBCONFIG: \"Database settings is missing.\";\n EDBHOST: \"Invalid SQL Host.\";\n };\n db: {\n EINVQUERY: \"Invalid query.\";\n EDBCONN: \"Connection error.\";\n EQUERY: \"Query request error.\";\n };\n emailer: {\n ENOTRANSP: \"Cannot get emailer transports.\";\n ESENDMAIL: \"Email sending failed.\";\n ESUBPARAMS: \"Failed to get substitution parameters.\";\n };\n cache: {\n EFORMLOAD: \"Cannot load form.\";\n };\n form: {\n ENOFORM: \"Form not found.\";\n };\n auth: {\n EAUTH: \"Authentication failed.\";\n EPASSFIELD: \"Invalid password field.\";\n EPASSRESET: \"Unable to change password.\";\n ERESETTOKEN: \"Invalid reset password token.\";\n ENOPASSP: \"No password provided.\";\n ELOGINCOUNT: \"Unable to update login count.\";\n };\n submission: {\n ENOSUB: \"Submission not found.\";\n ESUBLOAD: \"Cannot load submission.\";\n ESUBSAVE: \"Cannot save submission.\";\n };\n user: {\n ENOUSER: \"User not found.\";\n ENONAMEP: \"No user name provided.\";\n };\n role: {\n EROLESLOAD: \"Cannot load the Roles.\";\n ENOROLE: \"Role not found.\";\n EROLELOAD: \"Cannot load role.\";\n EROLEEXIST: \"Provided role already exists.\";\n };\n request: {\n EREQRECUR: \"Too many recursive requests.\";\n };\n resource: {\n ENOIDP: \"Resource id is missing.\";\n ENOHANDLER: \"Resource handler not found.\";\n };\n}\n"]}
File without changes
File without changes