@paroicms/server 0.146.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 (659) hide show
  1. package/README.md +3 -0
  2. package/ddl/main.ddl.sql +84 -0
  3. package/dist/backup/site/archiver.helper.d.ts +12 -0
  4. package/dist/backup/site/archiver.helper.js +46 -0
  5. package/dist/backup/site/archiver.helper.js.map +1 -0
  6. package/dist/backup/site/backup.d.ts +5 -0
  7. package/dist/backup/site/backup.js +118 -0
  8. package/dist/backup/site/backup.js.map +1 -0
  9. package/dist/cli.d.ts +2 -0
  10. package/dist/cli.js +5 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/common/child-ordering-query.d.ts +13 -0
  13. package/dist/common/child-ordering-query.js +107 -0
  14. package/dist/common/child-ordering-query.js.map +1 -0
  15. package/dist/common/data-format.d.ts +19 -0
  16. package/dist/common/data-format.js +86 -0
  17. package/dist/common/data-format.js.map +1 -0
  18. package/dist/common/mail/html-helpers.d.ts +7 -0
  19. package/dist/common/mail/html-helpers.js +46 -0
  20. package/dist/common/mail/html-helpers.js.map +1 -0
  21. package/dist/common/mail/sendMail.helpers.d.ts +14 -0
  22. package/dist/common/mail/sendMail.helpers.js +51 -0
  23. package/dist/common/mail/sendMail.helpers.js.map +1 -0
  24. package/dist/common/media-handles.helpers.d.ts +19 -0
  25. package/dist/common/media-handles.helpers.js +52 -0
  26. package/dist/common/media-handles.helpers.js.map +1 -0
  27. package/dist/common/serve-html-or.d.ts +16 -0
  28. package/dist/common/serve-html-or.js +72 -0
  29. package/dist/common/serve-html-or.js.map +1 -0
  30. package/dist/common/text-cache.d.ts +57 -0
  31. package/dist/common/text-cache.js +87 -0
  32. package/dist/common/text-cache.js.map +1 -0
  33. package/dist/common/tracker-report.d.ts +2 -0
  34. package/dist/common/tracker-report.js +27 -0
  35. package/dist/common/tracker-report.js.map +1 -0
  36. package/dist/context.d.ts +29 -0
  37. package/dist/context.js +60 -0
  38. package/dist/context.js.map +1 -0
  39. package/dist/express/http-helpers.d.ts +16 -0
  40. package/dist/express/http-helpers.js +44 -0
  41. package/dist/express/http-helpers.js.map +1 -0
  42. package/dist/express/static-middlewares.d.ts +3 -0
  43. package/dist/express/static-middlewares.js +114 -0
  44. package/dist/express/static-middlewares.js.map +1 -0
  45. package/dist/helpers/configuration.helpers.d.ts +2 -0
  46. package/dist/helpers/configuration.helpers.js +8 -0
  47. package/dist/helpers/configuration.helpers.js.map +1 -0
  48. package/dist/helpers/excerpt.helpers.d.ts +2 -0
  49. package/dist/helpers/excerpt.helpers.js +31 -0
  50. package/dist/helpers/excerpt.helpers.js.map +1 -0
  51. package/dist/helpers/excerpt.helpers.spec.d.ts +1 -0
  52. package/dist/helpers/excerpt.helpers.spec.js +133 -0
  53. package/dist/helpers/excerpt.helpers.spec.js.map +1 -0
  54. package/dist/helpers/jwt-secret.helpers.d.ts +2 -0
  55. package/dist/helpers/jwt-secret.helpers.js +30 -0
  56. package/dist/helpers/jwt-secret.helpers.js.map +1 -0
  57. package/dist/helpers/label-translator.helper.d.ts +9 -0
  58. package/dist/helpers/label-translator.helper.js +14 -0
  59. package/dist/helpers/label-translator.helper.js.map +1 -0
  60. package/dist/helpers/passwordEncrypt-helper.d.ts +2 -0
  61. package/dist/helpers/passwordEncrypt-helper.js +37 -0
  62. package/dist/helpers/passwordEncrypt-helper.js.map +1 -0
  63. package/dist/helpers/relative-id-helper.d.ts +10 -0
  64. package/dist/helpers/relative-id-helper.js +37 -0
  65. package/dist/helpers/relative-id-helper.js.map +1 -0
  66. package/dist/helpers/search-text-helper.d.ts +7 -0
  67. package/dist/helpers/search-text-helper.js +27 -0
  68. package/dist/helpers/search-text-helper.js.map +1 -0
  69. package/dist/helpers/simple-i18n.d.ts +14 -0
  70. package/dist/helpers/simple-i18n.js +82 -0
  71. package/dist/helpers/simple-i18n.js.map +1 -0
  72. package/dist/helpers/special-account.helpers.d.ts +9 -0
  73. package/dist/helpers/special-account.helpers.js +43 -0
  74. package/dist/helpers/special-account.helpers.js.map +1 -0
  75. package/dist/helpers/url.helpers.d.ts +2 -0
  76. package/dist/helpers/url.helpers.js +12 -0
  77. package/dist/helpers/url.helpers.js.map +1 -0
  78. package/dist/helpers/utils-helper.d.ts +4 -0
  79. package/dist/helpers/utils-helper.js +32 -0
  80. package/dist/helpers/utils-helper.js.map +1 -0
  81. package/dist/index.d.ts +7 -0
  82. package/dist/index.js +67 -0
  83. package/dist/index.js.map +1 -0
  84. package/dist/maintenance/maintenance-task.d.ts +4 -0
  85. package/dist/maintenance/maintenance-task.js +27 -0
  86. package/dist/maintenance/maintenance-task.js.map +1 -0
  87. package/dist/maintenance/shutdown.d.ts +7 -0
  88. package/dist/maintenance/shutdown.js +51 -0
  89. package/dist/maintenance/shutdown.js.map +1 -0
  90. package/dist/modules/app.controller.d.ts +5 -0
  91. package/dist/modules/app.controller.js +89 -0
  92. package/dist/modules/app.controller.js.map +1 -0
  93. package/dist/modules/app.module.d.ts +2 -0
  94. package/dist/modules/app.module.js +48 -0
  95. package/dist/modules/app.module.js.map +1 -0
  96. package/dist/modules/core/account/account.model.d.ts +18 -0
  97. package/dist/modules/core/account/account.model.js +59 -0
  98. package/dist/modules/core/account/account.model.js.map +1 -0
  99. package/dist/modules/core/account/account.module.d.ts +2 -0
  100. package/dist/modules/core/account/account.module.js +20 -0
  101. package/dist/modules/core/account/account.module.js.map +1 -0
  102. package/dist/modules/core/account/account.queries.d.ts +18 -0
  103. package/dist/modules/core/account/account.queries.js +150 -0
  104. package/dist/modules/core/account/account.queries.js.map +1 -0
  105. package/dist/modules/core/account/account.resolver.d.ts +11 -0
  106. package/dist/modules/core/account/account.resolver.js +107 -0
  107. package/dist/modules/core/account/account.resolver.js.map +1 -0
  108. package/dist/modules/core/account/account.schema.d.ts +24 -0
  109. package/dist/modules/core/account/account.schema.js +114 -0
  110. package/dist/modules/core/account/account.schema.js.map +1 -0
  111. package/dist/modules/core/account-auth/account-auth.controller.d.ts +5 -0
  112. package/dist/modules/core/account-auth/account-auth.controller.js +46 -0
  113. package/dist/modules/core/account-auth/account-auth.controller.js.map +1 -0
  114. package/dist/modules/core/account-auth/account-auth.module.d.ts +2 -0
  115. package/dist/modules/core/account-auth/account-auth.module.js +24 -0
  116. package/dist/modules/core/account-auth/account-auth.module.js.map +1 -0
  117. package/dist/modules/core/account-auth/account-auth.service.d.ts +5 -0
  118. package/dist/modules/core/account-auth/account-auth.service.js +41 -0
  119. package/dist/modules/core/account-auth/account-auth.service.js.map +1 -0
  120. package/dist/modules/core/account-auth/account-auth.strategy.d.ts +10 -0
  121. package/dist/modules/core/account-auth/account-auth.strategy.js +49 -0
  122. package/dist/modules/core/account-auth/account-auth.strategy.js.map +1 -0
  123. package/dist/modules/core/auth/auth.module.d.ts +2 -0
  124. package/dist/modules/core/auth/auth.module.js +35 -0
  125. package/dist/modules/core/auth/auth.module.js.map +1 -0
  126. package/dist/modules/core/auth/auth.service.d.ts +11 -0
  127. package/dist/modules/core/auth/auth.service.js +164 -0
  128. package/dist/modules/core/auth/auth.service.js.map +1 -0
  129. package/dist/modules/core/auth/auth.types.d.ts +27 -0
  130. package/dist/modules/core/auth/auth.types.js +3 -0
  131. package/dist/modules/core/auth/auth.types.js.map +1 -0
  132. package/dist/modules/core/auth/jwt.auth.guard.d.ts +6 -0
  133. package/dist/modules/core/auth/jwt.auth.guard.js +23 -0
  134. package/dist/modules/core/auth/jwt.auth.guard.js.map +1 -0
  135. package/dist/modules/core/auth/jwt.strategy.d.ts +10 -0
  136. package/dist/modules/core/auth/jwt.strategy.js +35 -0
  137. package/dist/modules/core/auth/jwt.strategy.js.map +1 -0
  138. package/dist/modules/core/backup/backup.controller.d.ts +7 -0
  139. package/dist/modules/core/backup/backup.controller.js +61 -0
  140. package/dist/modules/core/backup/backup.controller.js.map +1 -0
  141. package/dist/modules/core/backup/backup.module.d.ts +2 -0
  142. package/dist/modules/core/backup/backup.module.js +22 -0
  143. package/dist/modules/core/backup/backup.module.js.map +1 -0
  144. package/dist/modules/core/backup/backup.resolver.d.ts +8 -0
  145. package/dist/modules/core/backup/backup.resolver.js +54 -0
  146. package/dist/modules/core/backup/backup.resolver.js.map +1 -0
  147. package/dist/modules/core/backup/backup.shema.d.ts +4 -0
  148. package/dist/modules/core/backup/backup.shema.js +30 -0
  149. package/dist/modules/core/backup/backup.shema.js.map +1 -0
  150. package/dist/modules/core/core.module.d.ts +2 -0
  151. package/dist/modules/core/core.module.js +50 -0
  152. package/dist/modules/core/core.module.js.map +1 -0
  153. package/dist/modules/core/document/document.helper.d.ts +2 -0
  154. package/dist/modules/core/document/document.helper.js +10 -0
  155. package/dist/modules/core/document/document.helper.js.map +1 -0
  156. package/dist/modules/core/document/document.model.d.ts +9 -0
  157. package/dist/modules/core/document/document.model.js +59 -0
  158. package/dist/modules/core/document/document.model.js.map +1 -0
  159. package/dist/modules/core/document/document.module.d.ts +2 -0
  160. package/dist/modules/core/document/document.module.js +25 -0
  161. package/dist/modules/core/document/document.module.js.map +1 -0
  162. package/dist/modules/core/document/document.resolver.d.ts +12 -0
  163. package/dist/modules/core/document/document.resolver.extend.d.ts +10 -0
  164. package/dist/modules/core/document/document.resolver.extend.js +69 -0
  165. package/dist/modules/core/document/document.resolver.extend.js.map +1 -0
  166. package/dist/modules/core/document/document.resolver.js +154 -0
  167. package/dist/modules/core/document/document.resolver.js.map +1 -0
  168. package/dist/modules/core/document/document.schema.d.ts +39 -0
  169. package/dist/modules/core/document/document.schema.js +181 -0
  170. package/dist/modules/core/document/document.schema.js.map +1 -0
  171. package/dist/modules/core/document/load-documents.queries.d.ts +17 -0
  172. package/dist/modules/core/document/load-documents.queries.js +119 -0
  173. package/dist/modules/core/document/load-documents.queries.js.map +1 -0
  174. package/dist/modules/core/document/save-documents.queries.d.ts +18 -0
  175. package/dist/modules/core/document/save-documents.queries.js +199 -0
  176. package/dist/modules/core/document/save-documents.queries.js.map +1 -0
  177. package/dist/modules/core/document/search-document-item.resolver.d.ts +7 -0
  178. package/dist/modules/core/document/search-document-item.resolver.js +58 -0
  179. package/dist/modules/core/document/search-document-item.resolver.js.map +1 -0
  180. package/dist/modules/core/fields/_fields.helpers.d.ts +2 -0
  181. package/dist/modules/core/fields/_fields.helpers.js +12 -0
  182. package/dist/modules/core/fields/_fields.helpers.js.map +1 -0
  183. package/dist/modules/core/fields/fields.model.d.ts +17 -0
  184. package/dist/modules/core/fields/fields.model.js +99 -0
  185. package/dist/modules/core/fields/fields.model.js.map +1 -0
  186. package/dist/modules/core/fields/fields.module.d.ts +2 -0
  187. package/dist/modules/core/fields/fields.module.js +20 -0
  188. package/dist/modules/core/fields/fields.module.js.map +1 -0
  189. package/dist/modules/core/fields/fields.resolver.d.ts +14 -0
  190. package/dist/modules/core/fields/fields.resolver.js +165 -0
  191. package/dist/modules/core/fields/fields.resolver.js.map +1 -0
  192. package/dist/modules/core/fields/load-fields.queries.d.ts +20 -0
  193. package/dist/modules/core/fields/load-fields.queries.js +233 -0
  194. package/dist/modules/core/fields/load-fields.queries.js.map +1 -0
  195. package/dist/modules/core/fields/quill-delta.d.ts +1 -0
  196. package/dist/modules/core/fields/quill-delta.js +40 -0
  197. package/dist/modules/core/fields/quill-delta.js.map +1 -0
  198. package/dist/modules/core/fields/save-fields.queries.d.ts +9 -0
  199. package/dist/modules/core/fields/save-fields.queries.js +135 -0
  200. package/dist/modules/core/fields/save-fields.queries.js.map +1 -0
  201. package/dist/modules/core/leaf/leaf.model.d.ts +9 -0
  202. package/dist/modules/core/leaf/leaf.model.js +61 -0
  203. package/dist/modules/core/leaf/leaf.model.js.map +1 -0
  204. package/dist/modules/core/leaf/leaf.module.d.ts +2 -0
  205. package/dist/modules/core/leaf/leaf.module.js +21 -0
  206. package/dist/modules/core/leaf/leaf.module.js.map +1 -0
  207. package/dist/modules/core/leaf/leaf.queries.d.ts +21 -0
  208. package/dist/modules/core/leaf/leaf.queries.js +143 -0
  209. package/dist/modules/core/leaf/leaf.queries.js.map +1 -0
  210. package/dist/modules/core/leaf/leaf.resolver.d.ts +9 -0
  211. package/dist/modules/core/leaf/leaf.resolver.extend.d.ts +6 -0
  212. package/dist/modules/core/leaf/leaf.resolver.extend.js +42 -0
  213. package/dist/modules/core/leaf/leaf.resolver.extend.js.map +1 -0
  214. package/dist/modules/core/leaf/leaf.resolver.js +84 -0
  215. package/dist/modules/core/leaf/leaf.resolver.js.map +1 -0
  216. package/dist/modules/core/leaf/leaf.schema.d.ts +7 -0
  217. package/dist/modules/core/leaf/leaf.schema.js +45 -0
  218. package/dist/modules/core/leaf/leaf.schema.js.map +1 -0
  219. package/dist/modules/core/leaf-item/leaf-item.model.d.ts +6 -0
  220. package/dist/modules/core/leaf-item/leaf-item.model.js +44 -0
  221. package/dist/modules/core/leaf-item/leaf-item.model.js.map +1 -0
  222. package/dist/modules/core/leaf-item/leaf-item.queries.d.ts +9 -0
  223. package/dist/modules/core/leaf-item/leaf-item.queries.js +120 -0
  224. package/dist/modules/core/leaf-item/leaf-item.queries.js.map +1 -0
  225. package/dist/modules/core/login/login.controller.d.ts +8 -0
  226. package/dist/modules/core/login/login.controller.js +54 -0
  227. package/dist/modules/core/login/login.controller.js.map +1 -0
  228. package/dist/modules/core/login/login.module.d.ts +2 -0
  229. package/dist/modules/core/login/login.module.js +22 -0
  230. package/dist/modules/core/login/login.module.js.map +1 -0
  231. package/dist/modules/core/media/media-upload.controller.d.ts +21 -0
  232. package/dist/modules/core/media/media-upload.controller.js +160 -0
  233. package/dist/modules/core/media/media-upload.controller.js.map +1 -0
  234. package/dist/modules/core/media/media.d.ts +22 -0
  235. package/dist/modules/core/media/media.js +53 -0
  236. package/dist/modules/core/media/media.js.map +1 -0
  237. package/dist/modules/core/media/media.module.d.ts +2 -0
  238. package/dist/modules/core/media/media.module.js +22 -0
  239. package/dist/modules/core/media/media.module.js.map +1 -0
  240. package/dist/modules/core/media/media.resolver.d.ts +14 -0
  241. package/dist/modules/core/media/media.resolver.js +199 -0
  242. package/dist/modules/core/media/media.resolver.js.map +1 -0
  243. package/dist/modules/core/media/media.schema.d.ts +30 -0
  244. package/dist/modules/core/media/media.schema.js +144 -0
  245. package/dist/modules/core/media/media.schema.js.map +1 -0
  246. package/dist/modules/core/part/part.model.d.ts +6 -0
  247. package/dist/modules/core/part/part.model.js +44 -0
  248. package/dist/modules/core/part/part.model.js.map +1 -0
  249. package/dist/modules/core/part/part.module.d.ts +2 -0
  250. package/dist/modules/core/part/part.module.js +21 -0
  251. package/dist/modules/core/part/part.module.js.map +1 -0
  252. package/dist/modules/core/part/part.queries.d.ts +22 -0
  253. package/dist/modules/core/part/part.queries.js +167 -0
  254. package/dist/modules/core/part/part.queries.js.map +1 -0
  255. package/dist/modules/core/part/part.resolver.d.ts +14 -0
  256. package/dist/modules/core/part/part.resolver.extend.d.ts +5 -0
  257. package/dist/modules/core/part/part.resolver.extend.js +49 -0
  258. package/dist/modules/core/part/part.resolver.extend.js.map +1 -0
  259. package/dist/modules/core/part/part.resolver.js +135 -0
  260. package/dist/modules/core/part/part.resolver.js.map +1 -0
  261. package/dist/modules/core/part/part.schema.d.ts +12 -0
  262. package/dist/modules/core/part/part.schema.js +66 -0
  263. package/dist/modules/core/part/part.schema.js.map +1 -0
  264. package/dist/modules/core/section/section-wrap.resolver.d.ts +11 -0
  265. package/dist/modules/core/section/section-wrap.resolver.js +168 -0
  266. package/dist/modules/core/section/section-wrap.resolver.js.map +1 -0
  267. package/dist/modules/core/section/section.model.d.ts +6 -0
  268. package/dist/modules/core/section/section.model.js +44 -0
  269. package/dist/modules/core/section/section.model.js.map +1 -0
  270. package/dist/modules/core/section/section.module.d.ts +2 -0
  271. package/dist/modules/core/section/section.module.js +21 -0
  272. package/dist/modules/core/section/section.module.js.map +1 -0
  273. package/dist/modules/core/section/section.queries.d.ts +51 -0
  274. package/dist/modules/core/section/section.queries.js +228 -0
  275. package/dist/modules/core/section/section.queries.js.map +1 -0
  276. package/dist/modules/core/section/section.resolver.d.ts +7 -0
  277. package/dist/modules/core/section/section.resolver.js +78 -0
  278. package/dist/modules/core/section/section.resolver.js.map +1 -0
  279. package/dist/modules/core/section/section.schema.d.ts +27 -0
  280. package/dist/modules/core/section/section.schema.js +129 -0
  281. package/dist/modules/core/section/section.schema.js.map +1 -0
  282. package/dist/modules/core/site-fields/site-fields.model.d.ts +4 -0
  283. package/dist/modules/core/site-fields/site-fields.model.js +30 -0
  284. package/dist/modules/core/site-fields/site-fields.model.js.map +1 -0
  285. package/dist/modules/core/site-fields/site-fields.module.d.ts +2 -0
  286. package/dist/modules/core/site-fields/site-fields.module.js +20 -0
  287. package/dist/modules/core/site-fields/site-fields.module.js.map +1 -0
  288. package/dist/modules/core/site-fields/site-fields.queries.d.ts +9 -0
  289. package/dist/modules/core/site-fields/site-fields.queries.js +123 -0
  290. package/dist/modules/core/site-fields/site-fields.queries.js.map +1 -0
  291. package/dist/modules/core/site-fields/site-fields.resolver.d.ts +5 -0
  292. package/dist/modules/core/site-fields/site-fields.resolver.js +56 -0
  293. package/dist/modules/core/site-fields/site-fields.resolver.js.map +1 -0
  294. package/dist/modules/core/site-info/site-info.module.d.ts +2 -0
  295. package/dist/modules/core/site-info/site-info.module.js +20 -0
  296. package/dist/modules/core/site-info/site-info.module.js.map +1 -0
  297. package/dist/modules/core/site-info/site-info.resolver.d.ts +5 -0
  298. package/dist/modules/core/site-info/site-info.resolver.js +44 -0
  299. package/dist/modules/core/site-info/site-info.resolver.js.map +1 -0
  300. package/dist/modules/core/site-info/site-info.schema.d.ts +6 -0
  301. package/dist/modules/core/site-info/site-info.schema.js +36 -0
  302. package/dist/modules/core/site-info/site-info.schema.js.map +1 -0
  303. package/dist/modules/core/site-schema/site-schema.module.d.ts +2 -0
  304. package/dist/modules/core/site-schema/site-schema.module.js +20 -0
  305. package/dist/modules/core/site-schema/site-schema.module.js.map +1 -0
  306. package/dist/modules/core/site-schema/site-schema.resolver.d.ts +4 -0
  307. package/dist/modules/core/site-schema/site-schema.resolver.js +35 -0
  308. package/dist/modules/core/site-schema/site-schema.resolver.js.map +1 -0
  309. package/dist/modules/core/term-flag/term-flag.model.d.ts +6 -0
  310. package/dist/modules/core/term-flag/term-flag.model.js +45 -0
  311. package/dist/modules/core/term-flag/term-flag.model.js.map +1 -0
  312. package/dist/modules/core/term-flag/term-flag.module.d.ts +2 -0
  313. package/dist/modules/core/term-flag/term-flag.module.js +20 -0
  314. package/dist/modules/core/term-flag/term-flag.module.js.map +1 -0
  315. package/dist/modules/core/term-flag/term-flag.queries.d.ts +7 -0
  316. package/dist/modules/core/term-flag/term-flag.queries.js +44 -0
  317. package/dist/modules/core/term-flag/term-flag.queries.js.map +1 -0
  318. package/dist/modules/core/term-flag/term-flag.resolver.d.ts +5 -0
  319. package/dist/modules/core/term-flag/term-flag.resolver.js +47 -0
  320. package/dist/modules/core/term-flag/term-flag.resolver.js.map +1 -0
  321. package/dist/modules/core/term-flag/term-flag.schema.d.ts +9 -0
  322. package/dist/modules/core/term-flag/term-flag.schema.js +51 -0
  323. package/dist/modules/core/term-flag/term-flag.schema.js.map +1 -0
  324. package/dist/modules/core/term-flag/term-flag.service.d.ts +9 -0
  325. package/dist/modules/core/term-flag/term-flag.service.js +50 -0
  326. package/dist/modules/core/term-flag/term-flag.service.js.map +1 -0
  327. package/dist/modules/core/unprotected/unprotected.module.d.ts +2 -0
  328. package/dist/modules/core/unprotected/unprotected.module.js +20 -0
  329. package/dist/modules/core/unprotected/unprotected.module.js.map +1 -0
  330. package/dist/modules/core/unprotected/unprotected.resolver.d.ts +8 -0
  331. package/dist/modules/core/unprotected/unprotected.resolver.js +106 -0
  332. package/dist/modules/core/unprotected/unprotected.resolver.js.map +1 -0
  333. package/dist/modules/core/unprotected/unprotected.schema.d.ts +19 -0
  334. package/dist/modules/core/unprotected/unprotected.schema.js +93 -0
  335. package/dist/modules/core/unprotected/unprotected.schema.js.map +1 -0
  336. package/dist/modules/graphql.types.d.ts +6 -0
  337. package/dist/modules/graphql.types.js +3 -0
  338. package/dist/modules/graphql.types.js.map +1 -0
  339. package/dist/modules/private-api.module.d.ts +2 -0
  340. package/dist/modules/private-api.module.js +50 -0
  341. package/dist/modules/private-api.module.js.map +1 -0
  342. package/dist/modules/public-api/class-validator-options.d.ts +7 -0
  343. package/dist/modules/public-api/class-validator-options.js +11 -0
  344. package/dist/modules/public-api/class-validator-options.js.map +1 -0
  345. package/dist/modules/public-api/mail/contact-form-mail.d.ts +8 -0
  346. package/dist/modules/public-api/mail/contact-form-mail.js +96 -0
  347. package/dist/modules/public-api/mail/contact-form-mail.js.map +1 -0
  348. package/dist/modules/public-api/mail/mail.dto.d.ts +8 -0
  349. package/dist/modules/public-api/mail/mail.dto.js +56 -0
  350. package/dist/modules/public-api/mail/mail.dto.js.map +1 -0
  351. package/dist/modules/public-api/partials/partials-params.dto.d.ts +6 -0
  352. package/dist/modules/public-api/partials/partials-params.dto.js +45 -0
  353. package/dist/modules/public-api/partials/partials-params.dto.js.map +1 -0
  354. package/dist/modules/public-api/password-reset/password-reset.controller.d.ts +11 -0
  355. package/dist/modules/public-api/password-reset/password-reset.controller.js +59 -0
  356. package/dist/modules/public-api/password-reset/password-reset.controller.js.map +1 -0
  357. package/dist/modules/public-api/password-reset/password-reset.dto.d.ts +9 -0
  358. package/dist/modules/public-api/password-reset/password-reset.dto.js +55 -0
  359. package/dist/modules/public-api/password-reset/password-reset.dto.js.map +1 -0
  360. package/dist/modules/public-api/password-reset/password-reset.module.d.ts +2 -0
  361. package/dist/modules/public-api/password-reset/password-reset.module.js +22 -0
  362. package/dist/modules/public-api/password-reset/password-reset.module.js.map +1 -0
  363. package/dist/modules/public-api/password-reset/password-reset.service.d.ts +14 -0
  364. package/dist/modules/public-api/password-reset/password-reset.service.js +56 -0
  365. package/dist/modules/public-api/password-reset/password-reset.service.js.map +1 -0
  366. package/dist/modules/public-api/public-api-controller.d.ts +32 -0
  367. package/dist/modules/public-api/public-api-controller.js +198 -0
  368. package/dist/modules/public-api/public-api-controller.js.map +1 -0
  369. package/dist/modules/public-api/public-api.module.d.ts +2 -0
  370. package/dist/modules/public-api/public-api.module.js +22 -0
  371. package/dist/modules/public-api/public-api.module.js.map +1 -0
  372. package/dist/modules/public-api/search-text/search-text.dto.d.ts +7 -0
  373. package/dist/modules/public-api/search-text/search-text.dto.js +50 -0
  374. package/dist/modules/public-api/search-text/search-text.dto.js.map +1 -0
  375. package/dist/modules/public-api/search-text/search-text.queries.d.ts +14 -0
  376. package/dist/modules/public-api/search-text/search-text.queries.js +58 -0
  377. package/dist/modules/public-api/search-text/search-text.queries.js.map +1 -0
  378. package/dist/modules/public-site/app-exception-filter.d.ts +4 -0
  379. package/dist/modules/public-site/app-exception-filter.js +41 -0
  380. package/dist/modules/public-site/app-exception-filter.js.map +1 -0
  381. package/dist/modules/public-site/google-auth.controller.d.ts +10 -0
  382. package/dist/modules/public-site/google-auth.controller.js +127 -0
  383. package/dist/modules/public-site/google-auth.controller.js.map +1 -0
  384. package/dist/modules/public-site/helpers/format-date.helper.d.ts +3 -0
  385. package/dist/modules/public-site/helpers/format-date.helper.js +35 -0
  386. package/dist/modules/public-site/helpers/format-date.helper.js.map +1 -0
  387. package/dist/modules/public-site/helpers/format-date.helper.spec.d.ts +1 -0
  388. package/dist/modules/public-site/helpers/format-date.helper.spec.js +37 -0
  389. package/dist/modules/public-site/helpers/format-date.helper.spec.js.map +1 -0
  390. package/dist/modules/public-site/helpers/medias.helpers.d.ts +3 -0
  391. package/dist/modules/public-site/helpers/medias.helpers.js +16 -0
  392. package/dist/modules/public-site/helpers/medias.helpers.js.map +1 -0
  393. package/dist/modules/public-site/helpers/obfuscate.helper.d.ts +2 -0
  394. package/dist/modules/public-site/helpers/obfuscate.helper.js +27 -0
  395. package/dist/modules/public-site/helpers/obfuscate.helper.js.map +1 -0
  396. package/dist/modules/public-site/helpers/public-field-values.d.ts +10 -0
  397. package/dist/modules/public-site/helpers/public-field-values.js +76 -0
  398. package/dist/modules/public-site/helpers/public-field-values.js.map +1 -0
  399. package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +2 -0
  400. package/dist/modules/public-site/liquidjs-filters/format-date.js +14 -0
  401. package/dist/modules/public-site/liquidjs-filters/format-date.js.map +1 -0
  402. package/dist/modules/public-site/liquidjs-filters/format-number.d.ts +2 -0
  403. package/dist/modules/public-site/liquidjs-filters/format-number.js +18 -0
  404. package/dist/modules/public-site/liquidjs-filters/format-number.js.map +1 -0
  405. package/dist/modules/public-site/liquidjs-filters/info-filter.d.ts +2 -0
  406. package/dist/modules/public-site/liquidjs-filters/info-filter.js +144 -0
  407. package/dist/modules/public-site/liquidjs-filters/info-filter.js.map +1 -0
  408. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.d.ts +2 -0
  409. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +38 -0
  410. package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js.map +1 -0
  411. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.d.ts +3 -0
  412. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +21 -0
  413. package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js.map +1 -0
  414. package/dist/modules/public-site/liquidjs-filters/make-excerpt.d.ts +2 -0
  415. package/dist/modules/public-site/liquidjs-filters/make-excerpt.js +10 -0
  416. package/dist/modules/public-site/liquidjs-filters/make-excerpt.js.map +1 -0
  417. package/dist/modules/public-site/liquidjs-filters/obfuscate.d.ts +3 -0
  418. package/dist/modules/public-site/liquidjs-filters/obfuscate.js +15 -0
  419. package/dist/modules/public-site/liquidjs-filters/obfuscate.js.map +1 -0
  420. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.d.ts +4 -0
  421. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +39 -0
  422. package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +1 -0
  423. package/dist/modules/public-site/liquidjs-filters/translate-filter.1.d.ts +3 -0
  424. package/dist/modules/public-site/liquidjs-filters/translate-filter.1.js +12 -0
  425. package/dist/modules/public-site/liquidjs-filters/translate-filter.1.js.map +1 -0
  426. package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +3 -0
  427. package/dist/modules/public-site/liquidjs-filters/translate-filter.js +12 -0
  428. package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +1 -0
  429. package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.d.ts +1 -0
  430. package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.js +18 -0
  431. package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.js.map +1 -0
  432. package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.d.ts +15 -0
  433. package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.js +40 -0
  434. package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.js.map +1 -0
  435. package/dist/modules/public-site/liquidjs-rendering/render-clone/render.d.ts +13 -0
  436. package/dist/modules/public-site/liquidjs-rendering/render-clone/render.js +108 -0
  437. package/dist/modules/public-site/liquidjs-rendering/render-clone/render.js.map +1 -0
  438. package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.d.ts +6 -0
  439. package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.js +40 -0
  440. package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.js.map +1 -0
  441. package/dist/modules/public-site/liquidjs-rendering/rendering-context.d.ts +27 -0
  442. package/dist/modules/public-site/liquidjs-rendering/rendering-context.js +46 -0
  443. package/dist/modules/public-site/liquidjs-rendering/rendering-context.js.map +1 -0
  444. package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.d.ts +13 -0
  445. package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.js +49 -0
  446. package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.js.map +1 -0
  447. package/dist/modules/public-site/liquidjs-tags/get-page-tag.d.ts +13 -0
  448. package/dist/modules/public-site/liquidjs-tags/get-page-tag.js +68 -0
  449. package/dist/modules/public-site/liquidjs-tags/get-page-tag.js.map +1 -0
  450. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.d.ts +13 -0
  451. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js +94 -0
  452. package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +1 -0
  453. package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-tag.d.ts +13 -0
  454. package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-tag.js +61 -0
  455. package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-tag.js.map +1 -0
  456. package/dist/modules/public-site/liquidjs-tags/use-image-tag.d.ts +13 -0
  457. package/dist/modules/public-site/liquidjs-tags/use-image-tag.js +53 -0
  458. package/dist/modules/public-site/liquidjs-tags/use-image-tag.js.map +1 -0
  459. package/dist/modules/public-site/media-serve/_media-serve-helpers.d.ts +11 -0
  460. package/dist/modules/public-site/media-serve/_media-serve-helpers.js +26 -0
  461. package/dist/modules/public-site/media-serve/_media-serve-helpers.js.map +1 -0
  462. package/dist/modules/public-site/media-serve/media-serve.controller.d.ts +4 -0
  463. package/dist/modules/public-site/media-serve/media-serve.controller.js +140 -0
  464. package/dist/modules/public-site/media-serve/media-serve.controller.js.map +1 -0
  465. package/dist/modules/public-site/media-serve/media-serve.module.d.ts +2 -0
  466. package/dist/modules/public-site/media-serve/media-serve.module.js +20 -0
  467. package/dist/modules/public-site/media-serve/media-serve.module.js.map +1 -0
  468. package/dist/modules/public-site/oauth2-client.controller.d.ts +10 -0
  469. package/dist/modules/public-site/oauth2-client.controller.js +144 -0
  470. package/dist/modules/public-site/oauth2-client.controller.js.map +1 -0
  471. package/dist/modules/public-site/public-route/make-url.d.ts +11 -0
  472. package/dist/modules/public-site/public-route/make-url.js +150 -0
  473. package/dist/modules/public-site/public-route/make-url.js.map +1 -0
  474. package/dist/modules/public-site/public-route/public-route-parser.d.ts +16 -0
  475. package/dist/modules/public-site/public-route/public-route-parser.js +154 -0
  476. package/dist/modules/public-site/public-route/public-route-parser.js.map +1 -0
  477. package/dist/modules/public-site/public-route/raw-document-payload.d.ts +8 -0
  478. package/dist/modules/public-site/public-route/raw-document-payload.js +86 -0
  479. package/dist/modules/public-site/public-route/raw-document-payload.js.map +1 -0
  480. package/dist/modules/public-site/public-site.controller.d.ts +7 -0
  481. package/dist/modules/public-site/public-site.controller.js +58 -0
  482. package/dist/modules/public-site/public-site.controller.js.map +1 -0
  483. package/dist/modules/public-site/public-site.middleware.d.ts +5 -0
  484. package/dist/modules/public-site/public-site.middleware.js +67 -0
  485. package/dist/modules/public-site/public-site.middleware.js.map +1 -0
  486. package/dist/modules/public-site/public-site.module.d.ts +4 -0
  487. package/dist/modules/public-site/public-site.module.js +27 -0
  488. package/dist/modules/public-site/public-site.module.js.map +1 -0
  489. package/dist/modules/public-site/serve-document/serve-document.d.ts +20 -0
  490. package/dist/modules/public-site/serve-document/serve-document.js +60 -0
  491. package/dist/modules/public-site/serve-document/serve-document.js.map +1 -0
  492. package/dist/modules/security/app-throttler-guard.d.ts +8 -0
  493. package/dist/modules/security/app-throttler-guard.js +18 -0
  494. package/dist/modules/security/app-throttler-guard.js.map +1 -0
  495. package/dist/modules/security/complexity-plugin.d.ts +8 -0
  496. package/dist/modules/security/complexity-plugin.js +46 -0
  497. package/dist/modules/security/complexity-plugin.js.map +1 -0
  498. package/dist/modules/security/gqlThrottlerGuard.d.ts +8 -0
  499. package/dist/modules/security/gqlThrottlerGuard.js +24 -0
  500. package/dist/modules/security/gqlThrottlerGuard.js.map +1 -0
  501. package/dist/nest-custom-logger.d.ts +8 -0
  502. package/dist/nest-custom-logger.js +23 -0
  503. package/dist/nest-custom-logger.js.map +1 -0
  504. package/dist/public-payload/breadcrumb.queries.d.ts +5 -0
  505. package/dist/public-payload/breadcrumb.queries.js +26 -0
  506. package/dist/public-payload/breadcrumb.queries.js.map +1 -0
  507. package/dist/public-payload/create-page-drop.d.ts +11 -0
  508. package/dist/public-payload/create-page-drop.js +160 -0
  509. package/dist/public-payload/create-page-drop.js.map +1 -0
  510. package/dist/public-payload/create-page-part-drop.d.ts +7 -0
  511. package/dist/public-payload/create-page-part-drop.js +39 -0
  512. package/dist/public-payload/create-page-part-drop.js.map +1 -0
  513. package/dist/public-payload/create-page-payload-drop.d.ts +10 -0
  514. package/dist/public-payload/create-page-payload-drop.js +143 -0
  515. package/dist/public-payload/create-page-payload-drop.js.map +1 -0
  516. package/dist/public-payload/excerpt.queries.d.ts +10 -0
  517. package/dist/public-payload/excerpt.queries.js +38 -0
  518. package/dist/public-payload/excerpt.queries.js.map +1 -0
  519. package/dist/public-payload/field-values.d.ts +9 -0
  520. package/dist/public-payload/field-values.js +99 -0
  521. package/dist/public-payload/field-values.js.map +1 -0
  522. package/dist/public-payload/get-siblings.queries.d.ts +5 -0
  523. package/dist/public-payload/get-siblings.queries.js +117 -0
  524. package/dist/public-payload/get-siblings.queries.js.map +1 -0
  525. package/dist/public-payload/liquidjs-drop.d.ts +31 -0
  526. package/dist/public-payload/liquidjs-drop.js +45 -0
  527. package/dist/public-payload/liquidjs-drop.js.map +1 -0
  528. package/dist/public-payload/load-default-image.d.ts +8 -0
  529. package/dist/public-payload/load-default-image.js +52 -0
  530. package/dist/public-payload/load-default-image.js.map +1 -0
  531. package/dist/public-payload/make-basic-payload.d.ts +6 -0
  532. package/dist/public-payload/make-basic-payload.js +19 -0
  533. package/dist/public-payload/make-basic-payload.js.map +1 -0
  534. package/dist/public-payload/make-image-available.d.ts +26 -0
  535. package/dist/public-payload/make-image-available.js +38 -0
  536. package/dist/public-payload/make-image-available.js.map +1 -0
  537. package/dist/public-payload/page-values.queries.d.ts +27 -0
  538. package/dist/public-payload/page-values.queries.js +110 -0
  539. package/dist/public-payload/page-values.queries.js.map +1 -0
  540. package/dist/public-payload/parts.queries.d.ts +6 -0
  541. package/dist/public-payload/parts.queries.js +123 -0
  542. package/dist/public-payload/parts.queries.js.map +1 -0
  543. package/dist/public-payload/public-payload.types.d.ts +130 -0
  544. package/dist/public-payload/public-payload.types.js +3 -0
  545. package/dist/public-payload/public-payload.types.js.map +1 -0
  546. package/dist/public-payload/site-payload.d.ts +4 -0
  547. package/dist/public-payload/site-payload.js +43 -0
  548. package/dist/public-payload/site-payload.js.map +1 -0
  549. package/dist/public-payload/taxonomies.queries.d.ts +13 -0
  550. package/dist/public-payload/taxonomies.queries.js +45 -0
  551. package/dist/public-payload/taxonomies.queries.js.map +1 -0
  552. package/dist/public-payload/translations.queries.d.ts +7 -0
  553. package/dist/public-payload/translations.queries.js +62 -0
  554. package/dist/public-payload/translations.queries.js.map +1 -0
  555. package/dist/public.types.d.ts +5 -0
  556. package/dist/public.types.js +3 -0
  557. package/dist/public.types.js.map +1 -0
  558. package/dist/share/pino-app-log.d.ts +26 -0
  559. package/dist/share/pino-app-log.js +138 -0
  560. package/dist/share/pino-app-log.js.map +1 -0
  561. package/dist/share/read-configuration.d.ts +7 -0
  562. package/dist/share/read-configuration.js +31 -0
  563. package/dist/share/read-configuration.js.map +1 -0
  564. package/dist/site-backup/archiver.helper.d.ts +12 -0
  565. package/dist/site-backup/archiver.helper.js +43 -0
  566. package/dist/site-backup/archiver.helper.js.map +1 -0
  567. package/dist/site-backup/backup-tasks.d.ts +11 -0
  568. package/dist/site-backup/backup-tasks.js +98 -0
  569. package/dist/site-backup/backup-tasks.js.map +1 -0
  570. package/dist/site-backup/backup.d.ts +11 -0
  571. package/dist/site-backup/backup.helper.d.ts +3 -0
  572. package/dist/site-backup/backup.helper.js +13 -0
  573. package/dist/site-backup/backup.helper.js.map +1 -0
  574. package/dist/site-backup/backup.js +34 -0
  575. package/dist/site-backup/backup.js.map +1 -0
  576. package/dist/site-backup/default-data/default-config.d.ts +1 -0
  577. package/dist/site-backup/default-data/default-config.js +50 -0
  578. package/dist/site-backup/default-data/default-config.js.map +1 -0
  579. package/dist/site-backup/default-data/default-readme.d.ts +1 -0
  580. package/dist/site-backup/default-data/default-readme.js +8 -0
  581. package/dist/site-backup/default-data/default-readme.js.map +1 -0
  582. package/dist/site-context/db-init/db-init.d.ts +11 -0
  583. package/dist/site-context/db-init/db-init.js +37 -0
  584. package/dist/site-context/db-init/db-init.js.map +1 -0
  585. package/dist/site-context/db-init/ddl-migration.d.ts +13 -0
  586. package/dist/site-context/db-init/ddl-migration.js +26 -0
  587. package/dist/site-context/db-init/ddl-migration.js.map +1 -0
  588. package/dist/site-context/db-init/init-routing-points.d.ts +4 -0
  589. package/dist/site-context/db-init/init-routing-points.js +147 -0
  590. package/dist/site-context/db-init/init-routing-points.js.map +1 -0
  591. package/dist/site-context/site-conf.d.ts +17 -0
  592. package/dist/site-context/site-conf.js +103 -0
  593. package/dist/site-context/site-conf.js.map +1 -0
  594. package/dist/site-context/site-context.d.ts +11 -0
  595. package/dist/site-context/site-context.js +234 -0
  596. package/dist/site-context/site-context.js.map +1 -0
  597. package/dist/site-context/site-context.types.d.ts +46 -0
  598. package/dist/site-context/site-context.types.js +3 -0
  599. package/dist/site-context/site-context.types.js.map +1 -0
  600. package/dist/site-context/theme-conf-reader.d.ts +4 -0
  601. package/dist/site-context/theme-conf-reader.js +33 -0
  602. package/dist/site-context/theme-conf-reader.js.map +1 -0
  603. package/dist/site-context/theme-conf-types.d.ts +4 -0
  604. package/dist/site-context/theme-conf-types.js +3 -0
  605. package/dist/site-context/theme-conf-types.js.map +1 -0
  606. package/dist/site-schema/common-schema-reader.d.ts +6 -0
  607. package/dist/site-schema/common-schema-reader.js +29 -0
  608. package/dist/site-schema/common-schema-reader.js.map +1 -0
  609. package/dist/site-schema/merged-schema-lib.d.ts +30 -0
  610. package/dist/site-schema/merged-schema-lib.js +118 -0
  611. package/dist/site-schema/merged-schema-lib.js.map +1 -0
  612. package/dist/site-schema/read-locales.d.ts +24 -0
  613. package/dist/site-schema/read-locales.js +171 -0
  614. package/dist/site-schema/read-locales.js.map +1 -0
  615. package/dist/site-schema/site-schema-factory.d.ts +2 -0
  616. package/dist/site-schema/site-schema-factory.js +382 -0
  617. package/dist/site-schema/site-schema-factory.js.map +1 -0
  618. package/dist/site-schema/site-schema-helpers.d.ts +5 -0
  619. package/dist/site-schema/site-schema-helpers.js +27 -0
  620. package/dist/site-schema/site-schema-helpers.js.map +1 -0
  621. package/dist/site-schema/site-schema-lib-reader.d.ts +14 -0
  622. package/dist/site-schema/site-schema-lib-reader.js +48 -0
  623. package/dist/site-schema/site-schema-lib-reader.js.map +1 -0
  624. package/dist/start.d.ts +1 -0
  625. package/dist/start.js +5 -0
  626. package/dist/start.js.map +1 -0
  627. package/dist/types.to.json +1 -0
  628. package/locales/en.json +18 -0
  629. package/locales/fr.json +18 -0
  630. package/package.json +99 -0
  631. package/schema.gql +293 -0
  632. package/site-schema-lib/common-schema.json +36 -0
  633. package/site-schema-lib/common-schema.l10n.en.json +10 -0
  634. package/site-schema-lib/common-schema.l10n.fr.json +10 -0
  635. package/site-schema-lib/fields.site-schema.json +79 -0
  636. package/site-schema-lib/fields.site-schema.l10n.en.json +26 -0
  637. package/site-schema-lib/fields.site-schema.l10n.fr.json +26 -0
  638. package/site-schema-lib/gallery-page.site-schema.json +19 -0
  639. package/site-schema-lib/gallery-page.site-schema.l10n.en.json +11 -0
  640. package/site-schema-lib/gallery-page.site-schema.l10n.fr.json +11 -0
  641. package/site-schema-lib/lowcost.site-schema.json +84 -0
  642. package/site-schema-lib/lowcost.site-schema.l10n.en.json +30 -0
  643. package/site-schema-lib/lowcost.site-schema.l10n.fr.json +30 -0
  644. package/site-schema-lib/media-policies.site-schema.json +26 -0
  645. package/site-schema-lib/portfolio.site-schema.json +28 -0
  646. package/site-schema-lib/portfolio.site-schema.l10n.en.json +16 -0
  647. package/site-schema-lib/portfolio.site-schema.l10n.fr.json +16 -0
  648. package/site-schema-lib/post.site-schema.json +48 -0
  649. package/site-schema-lib/post.site-schema.l10n.en.json +28 -0
  650. package/site-schema-lib/post.site-schema.l10n.fr.json +27 -0
  651. package/site-schema-lib/simple-pages.site-schema.json +19 -0
  652. package/site-schema-lib/simple-pages.site-schema.l10n.en.json +11 -0
  653. package/site-schema-lib/simple-pages.site-schema.l10n.fr.json +11 -0
  654. package/site-schema-lib/special-page.site-schema.json +42 -0
  655. package/site-schema-lib/special-page.site-schema.l10n.en.json +16 -0
  656. package/site-schema-lib/special-page.site-schema.l10n.fr.json +16 -0
  657. package/site-schema-lib/tour.site-schema.json +70 -0
  658. package/site-schema-lib/tour.site-schema.l10n.en.json +37 -0
  659. package/site-schema-lib/tour.site-schema.l10n.fr.json +37 -0
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.injectFacebookChatLiquidJsFilter = void 0;
4
+ function injectFacebookChatLiquidJsFilter(str, ctx, args) {
5
+ if (str)
6
+ return generateFacebookChatWidget(str);
7
+ }
8
+ exports.injectFacebookChatLiquidJsFilter = injectFacebookChatLiquidJsFilter;
9
+ function generateFacebookChatWidget(pageId) {
10
+ return `
11
+ <div id="fb-root"></div>
12
+ <div id="fb-customer-chat" class="fb-customerchat"></div>
13
+
14
+ <script>
15
+ var chatbox = document.getElementById('fb-customer-chat');
16
+ chatbox.setAttribute("page_id", "${pageId}");
17
+ chatbox.setAttribute("attribution", "biz_inbox");
18
+ </script>
19
+
20
+ <script>
21
+ window.fbAsyncInit = function() {
22
+ FB.init({
23
+ xfbml: true,
24
+ version: 'v18.0'
25
+ });
26
+ };
27
+
28
+ (function(d, s, id) {
29
+ var js, fjs = d.getElementsByTagName(s)[0];
30
+ if (d.getElementById(id)) return;
31
+ js = d.createElement(s); js.id = id;
32
+ js.src = 'https://connect.facebook.net/fr_FR/sdk/xfbml.customerchat.js';
33
+ fjs.parentNode.insertBefore(js, fjs);
34
+ }(document, 'script', 'facebook-jssdk'));
35
+ </script>
36
+ `;
37
+ }
38
+ //# sourceMappingURL=inject-facebook-chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-facebook-chat.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-filters/inject-facebook-chat.ts"],"names":[],"mappings":";;;AAEA,SAAgB,gCAAgC,CAC9C,GAAuB,EACvB,GAAY,EACZ,IAAW;IAEX,IAAI,GAAG;QAAE,OAAO,0BAA0B,CAAC,GAAG,CAAC,CAAC;AAClD,CAAC;AAND,4EAMC;AAED,SAAS,0BAA0B,CAAC,MAAc;IAChD,OAAO;;;;;;mCAM0B,MAAM;;;;;;;;;;;;;;;;;;;;CAoBxC,CAAC;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Context } from "liquidjs";
2
+ import { SiteContext } from "../../../site-context/site-context.types";
3
+ export declare function injectMenuItemsData(this: any, siteContext: SiteContext, value: string, ctx: Context): Promise<string>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.injectMenuItemsData = void 0;
4
+ const anywhere_lib_1 = require("@paroicms/anywhere-lib");
5
+ const section_queries_1 = require("../../core/section/section.queries");
6
+ const rendering_context_1 = require("../liquidjs-rendering/rendering-context");
7
+ async function injectMenuItemsData(siteContext, value, ctx) {
8
+ const renderingContext = (0, rendering_context_1.getRenderingContext)(ctx);
9
+ const documentId = (0, anywhere_lib_1.parseSectionId)(value);
10
+ const breadcrumb = await (0, section_queries_1.getBreadcrumb)(siteContext, renderingContext.tracker, documentId, {
11
+ ensurePublished: true,
12
+ });
13
+ breadcrumb.shift();
14
+ const content = {
15
+ id: (0, anywhere_lib_1.encodeSectionId)(documentId),
16
+ parents: breadcrumb.map((item) => (0, anywhere_lib_1.encodeSectionId)(item.documentId)),
17
+ };
18
+ return JSON.stringify(content);
19
+ }
20
+ exports.injectMenuItemsData = injectMenuItemsData;
21
+ //# sourceMappingURL=inject-menu-items-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-menu-items-data.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-filters/inject-menu-items-data.ts"],"names":[],"mappings":";;;AAAA,yDAAyE;AAGzE,wEAAmE;AACnE,+EAA8E;AAEvE,KAAK,UAAU,mBAAmB,CAEvC,WAAwB,EACxB,KAAa,EACb,GAAY;IAEZ,MAAM,gBAAgB,GAAG,IAAA,uCAAmB,EAAC,GAAG,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,IAAA,6BAAc,EAAC,KAAK,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,MAAM,IAAA,+BAAa,EAAC,WAAW,EAAE,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE;QACxF,eAAe,EAAE,IAAI;KACtB,CAAC,CAAC;IAEH,UAAU,CAAC,KAAK,EAAE,CAAC;IACnB,MAAM,OAAO,GAAG;QACd,EAAE,EAAE,IAAA,8BAAe,EAAC,UAAU,CAAC;QAC/B,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,8BAAe,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACpE,CAAC;IAIF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AArBD,kDAqBC"}
@@ -0,0 +1,2 @@
1
+ import { Context } from "liquidjs";
2
+ export declare function makeExcerptLiquidJsFilter(str: string | undefined, ctx: Context, args: any[]): string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeExcerptLiquidJsFilter = void 0;
4
+ const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
5
+ const excerpt_helpers_1 = require("../../../helpers/excerpt.helpers");
6
+ function makeExcerptLiquidJsFilter(str, ctx, args) {
7
+ return (0, excerpt_helpers_1.truncExcerptToWord)(str ?? "", (0, data_formatters_lib_1.nbVal)(args[0]));
8
+ }
9
+ exports.makeExcerptLiquidJsFilter = makeExcerptLiquidJsFilter;
10
+ //# sourceMappingURL=make-excerpt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"make-excerpt.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-filters/make-excerpt.ts"],"names":[],"mappings":";;;AAAA,oEAAmD;AAEnD,sEAAsE;AAEtE,SAAgB,yBAAyB,CAAC,GAAuB,EAAE,GAAY,EAAE,IAAW;IAC1F,OAAO,IAAA,oCAAkB,EAAC,GAAG,IAAI,EAAE,EAAE,IAAA,2BAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,CAAC;AAFD,8DAEC"}
@@ -0,0 +1,3 @@
1
+ import { Context } from "liquidjs";
2
+ export declare function obfuscateLiquidJsFilter(str: string | undefined, ctx: Context, args: any[]): string | undefined;
3
+ export declare function obfuscateAsLinkLiquidJsFilter(str: string | undefined, ctx: Context, args: any[]): string | undefined;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.obfuscateAsLinkLiquidJsFilter = exports.obfuscateLiquidJsFilter = void 0;
4
+ const obfuscate_helper_1 = require("../helpers/obfuscate.helper");
5
+ function obfuscateLiquidJsFilter(str, ctx, args) {
6
+ if (str)
7
+ return (0, obfuscate_helper_1.generateObfuscatedHtml)(str);
8
+ }
9
+ exports.obfuscateLiquidJsFilter = obfuscateLiquidJsFilter;
10
+ function obfuscateAsLinkLiquidJsFilter(str, ctx, args) {
11
+ if (str)
12
+ return (0, obfuscate_helper_1.obfuscateAsHtmlLink)(str);
13
+ }
14
+ exports.obfuscateAsLinkLiquidJsFilter = obfuscateAsLinkLiquidJsFilter;
15
+ //# sourceMappingURL=obfuscate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"obfuscate.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-filters/obfuscate.ts"],"names":[],"mappings":";;;AACA,kEAA0F;AAE1F,SAAgB,uBAAuB,CAAC,GAAuB,EAAE,GAAY,EAAE,IAAW;IACxF,IAAI,GAAG;QAAE,OAAO,IAAA,yCAAsB,EAAC,GAAG,CAAC,CAAC;AAC9C,CAAC;AAFD,0DAEC;AAED,SAAgB,6BAA6B,CAAC,GAAuB,EAAE,GAAY,EAAE,IAAW;IAC9F,IAAI,GAAG;QAAE,OAAO,IAAA,sCAAmB,EAAC,GAAG,CAAC,CAAC;AAC3C,CAAC;AAFD,sEAEC"}
@@ -0,0 +1,4 @@
1
+ import { Context } from "liquidjs";
2
+ import { OgValues } from "../../../public-payload/public-payload.types";
3
+ import { SiteContext } from "../../../site-context/site-context.types";
4
+ export declare function injectOpenGraphTagsLiquidJsFilter(this: any, siteContext: SiteContext, values: OgValues, ctx: Context, _args: any[]): "" | Promise<string>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.injectOpenGraphTagsLiquidJsFilter = void 0;
4
+ const html_helpers_1 = require("../../../common/mail/html-helpers");
5
+ const make_image_available_1 = require("../../../public-payload/make-image-available");
6
+ const rendering_context_1 = require("../liquidjs-rendering/rendering-context");
7
+ function injectOpenGraphTagsLiquidJsFilter(siteContext, values, ctx, _args) {
8
+ const renderingContext = (0, rendering_context_1.getRenderingContext)(ctx);
9
+ return values ? generateOpenGraphTags(siteContext, renderingContext, values) : "";
10
+ }
11
+ exports.injectOpenGraphTagsLiquidJsFilter = injectOpenGraphTagsLiquidJsFilter;
12
+ async function generateOpenGraphTags(siteContext, renderingContext, { description, title, imageUid, url, type, siteName, locale }) {
13
+ let ogImage;
14
+ if (imageUid) {
15
+ ogImage = await (0, make_image_available_1.makeImageAvailable)(siteContext, renderingContext, {
16
+ imageSel: { uid: imageUid },
17
+ size: "1200x630",
18
+ });
19
+ }
20
+ const tags = [];
21
+ if (url)
22
+ tags.push(`<meta property="og:url" content="${(0, html_helpers_1.escapeHtml)(url)}">`);
23
+ if (locale)
24
+ tags.push(`<meta property="og:locale" content="${(0, html_helpers_1.escapeHtml)(locale)}">`);
25
+ if (siteName)
26
+ tags.push(`<meta property="og:site_name" content="${(0, html_helpers_1.escapeHtml)(siteName)}">`);
27
+ if (title)
28
+ tags.push(`<meta property="og:title" content="${(0, html_helpers_1.escapeHtml)(title)}">`);
29
+ if (type)
30
+ tags.push(`<meta property="og:type" content="${(0, html_helpers_1.escapeHtml)(type)}">`);
31
+ if (ogImage) {
32
+ tags.push(`<meta property="og:image" content="${(0, html_helpers_1.escapeHtml)(ogImage.url)}">`, `<meta property="og:image:width" content="${ogImage.width}">`, `<meta property="og:image:height" content="${ogImage.height}">`, `<meta property="og:image:type" content="${(0, html_helpers_1.escapeHtml)(ogImage.mediaType)}">`);
33
+ }
34
+ if (description) {
35
+ tags.push(`<meta property="og:description" content="${(0, html_helpers_1.escapeHtml)(description)}">`);
36
+ }
37
+ return tags.length === 0 ? "" : `${tags.join("\n")}\n`;
38
+ }
39
+ //# sourceMappingURL=open-graph-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-graph-filter.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-filters/open-graph-filter.ts"],"names":[],"mappings":";;;AACA,oEAA+D;AAC/D,uFAAkF;AAGlF,+EAAgG;AAEhG,SAAgB,iCAAiC,CAE/C,WAAwB,EACxB,MAAgB,EAChB,GAAY,EACZ,KAAY;IAEZ,MAAM,gBAAgB,GAAG,IAAA,uCAAmB,EAAC,GAAG,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,WAAW,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpF,CAAC;AATD,8EASC;AAED,KAAK,UAAU,qBAAqB,CAClC,WAAwB,EACxB,gBAAkC,EAClC,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAqB;IAEhF,IAAI,OAAsF,CAAC;IAE3F,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,GAAG,MAAM,IAAA,yCAAkB,EAAC,WAAW,EAAE,gBAAgB,EAAE;YAChE,QAAQ,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;YAC3B,IAAI,EAAE,UAAU;SACjB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,IAAI,GAAG;QAAE,IAAI,CAAC,IAAI,CAAC,oCAAoC,IAAA,yBAAU,EAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5E,IAAI,MAAM;QAAE,IAAI,CAAC,IAAI,CAAC,uCAAuC,IAAA,yBAAU,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrF,IAAI,QAAQ;QAAE,IAAI,CAAC,IAAI,CAAC,0CAA0C,IAAA,yBAAU,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5F,IAAI,KAAK;QAAE,IAAI,CAAC,IAAI,CAAC,sCAAsC,IAAA,yBAAU,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClF,IAAI,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,qCAAqC,IAAA,yBAAU,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/E,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,CAAC,IAAI,CACP,sCAAsC,IAAA,yBAAU,EAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EACjE,4CAA4C,OAAO,CAAC,KAAK,IAAI,EAC7D,6CAA6C,OAAO,CAAC,MAAM,IAAI,EAC/D,2CAA2C,IAAA,yBAAU,EAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAC7E,CAAC;IACJ,CAAC;IACD,IAAI,WAAW,EAAE,CAAC;QAChB,IAAI,CAAC,IAAI,CAAC,4CAA4C,IAAA,yBAAU,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACrF,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACzD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Context } from "liquidjs";
2
+ import { SiteContext } from "../../../site-context/site-context.types";
3
+ export declare function translateLiquidJsFilter(siteContext: SiteContext, str: string, ctx: Context, args: any[]): string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.translateLiquidJsFilter = void 0;
4
+ const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
5
+ const liquidjs_drop_1 = require("../../../public-payload/liquidjs-drop");
6
+ function translateLiquidJsFilter(siteContext, str, ctx, args) {
7
+ const page = ctx.getSync(["page"]);
8
+ const lang = (0, data_formatters_lib_1.strValOrUndef)(page?.[liquidjs_drop_1.valuesSymbol]?.lang) ?? "en";
9
+ return siteContext.themeTranslator.translate({ lang, key: str, args });
10
+ }
11
+ exports.translateLiquidJsFilter = translateLiquidJsFilter;
12
+ //# sourceMappingURL=translate-filter.1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translate-filter.1.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-filters/translate-filter.1.ts"],"names":[],"mappings":";;;AAAA,oEAA2D;AAE3D,yEAAqE;AAGrE,SAAgB,uBAAuB,CACrC,WAAwB,EACxB,GAAW,EACX,GAAY,EACZ,IAAW;IAEX,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAQ,CAAC;IAC1C,MAAM,IAAI,GAAG,IAAA,mCAAa,EAAC,IAAI,EAAE,CAAC,4BAAY,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC/D,OAAO,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AACzE,CAAC;AATD,0DASC"}
@@ -0,0 +1,3 @@
1
+ import { Context } from "liquidjs";
2
+ import { SiteContext } from "../../../site-context/site-context.types";
3
+ export declare function translateLiquidJsFilter(siteContext: SiteContext, str: string, ctx: Context, args: any[]): string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.translateLiquidJsFilter = void 0;
4
+ const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
5
+ const liquidjs_drop_1 = require("../../../public-payload/liquidjs-drop");
6
+ function translateLiquidJsFilter(siteContext, str, ctx, args) {
7
+ const page = ctx.getSync(["page"]);
8
+ const lang = (0, data_formatters_lib_1.strValOrUndef)(page?.[liquidjs_drop_1.valuesSymbol]?.lang) ?? "en";
9
+ return siteContext.themeTranslator.translate({ lang, key: str, args });
10
+ }
11
+ exports.translateLiquidJsFilter = translateLiquidJsFilter;
12
+ //# sourceMappingURL=translate-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translate-filter.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-filters/translate-filter.ts"],"names":[],"mappings":";;;AAAA,oEAA2D;AAE3D,yEAAqE;AAGrE,SAAgB,uBAAuB,CACrC,WAAwB,EACxB,GAAW,EACX,GAAY,EACZ,IAAW;IAEX,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAQ,CAAC;IAC1C,MAAM,IAAI,GAAG,IAAA,mCAAa,EAAC,IAAI,EAAE,CAAC,4BAAY,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC/D,OAAO,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AACzE,CAAC;AATD,0DASC"}
@@ -0,0 +1 @@
1
+ export declare function toEnumerable<T = unknown>(val: any): T[];
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toEnumerable = void 0;
4
+ function toEnumerable(val) {
5
+ if (val === null || val === undefined)
6
+ return [];
7
+ if (Array.isArray(val))
8
+ return val;
9
+ if (typeof val === "string" && val.length > 0)
10
+ return [val];
11
+ if (typeof val[Symbol.iterator] === "function")
12
+ return Array.from(val);
13
+ if (typeof val === "object")
14
+ return Object.keys(val).map((key) => [key, val[key]]);
15
+ return [];
16
+ }
17
+ exports.toEnumerable = toEnumerable;
18
+ //# sourceMappingURL=collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../../../src/modules/public-site/liquidjs-rendering/render-clone/collection.ts"],"names":[],"mappings":";;;AAIA,SAAgB,YAAY,CAAc,GAAQ;IAChD,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,GAAG,CAAmB,CAAC;IAC9E,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvE,IAAI,OAAO,GAAG,KAAK,QAAQ;QACzB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAmB,CAAC;IAC1E,OAAO,EAAE,CAAC;AACZ,CAAC;AARD,oCAQC"}
@@ -0,0 +1,15 @@
1
+ import { Drop } from "liquidjs";
2
+ export declare class ForloopDrop extends Drop {
3
+ protected i: number;
4
+ name: string;
5
+ length: number;
6
+ constructor(length: number, collection: string, variable: string);
7
+ next(): void;
8
+ index0(): number;
9
+ index(): number;
10
+ first(): boolean;
11
+ last(): boolean;
12
+ rindex(): number;
13
+ rindex0(): number;
14
+ valueOf(): string;
15
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ForloopDrop = void 0;
4
+ const liquidjs_1 = require("liquidjs");
5
+ class ForloopDrop extends liquidjs_1.Drop {
6
+ i = 0;
7
+ name;
8
+ length;
9
+ constructor(length, collection, variable) {
10
+ super();
11
+ this.length = length;
12
+ this.name = `${variable}-${collection}`;
13
+ }
14
+ next() {
15
+ this.i++;
16
+ }
17
+ index0() {
18
+ return this.i;
19
+ }
20
+ index() {
21
+ return this.i + 1;
22
+ }
23
+ first() {
24
+ return this.i === 0;
25
+ }
26
+ last() {
27
+ return this.i === this.length - 1;
28
+ }
29
+ rindex() {
30
+ return this.length - this.i;
31
+ }
32
+ rindex0() {
33
+ return this.length - this.i - 1;
34
+ }
35
+ valueOf() {
36
+ return JSON.stringify(this);
37
+ }
38
+ }
39
+ exports.ForloopDrop = ForloopDrop;
40
+ //# sourceMappingURL=forloop-drop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forloop-drop.js","sourceRoot":"","sources":["../../../../../src/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.ts"],"names":[],"mappings":";;;AAAA,uCAAgC;AAMhC,MAAa,WAAY,SAAQ,eAAI;IACzB,CAAC,GAAG,CAAC,CAAC;IACT,IAAI,CAAS;IACb,MAAM,CAAS;IACtB,YAAmB,MAAc,EAAE,UAAkB,EAAE,QAAgB;QACrE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,GAAG,QAAQ,IAAI,UAAU,EAAE,CAAC;IAC1C,CAAC;IACM,IAAI;QACT,IAAI,CAAC,CAAC,EAAE,CAAC;IACX,CAAC;IACM,MAAM;QACX,OAAO,IAAI,CAAC,CAAC,CAAC;IAChB,CAAC;IACM,KAAK;QACV,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IACM,KAAK;QACV,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IACM,IAAI;QACT,OAAO,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;IACM,MAAM;QACX,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAC9B,CAAC;IACM,OAAO;QACZ,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IACM,OAAO;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF;AAjCD,kCAiCC"}
@@ -0,0 +1,13 @@
1
+ import { Context, Emitter, Liquid, Tag, TagToken, Template, Token, Tokenizer, TopLevelToken } from 'liquidjs';
2
+ type ParsedFileName = Template[] | Token | string | undefined;
3
+ export default class RenderTag extends Tag {
4
+ static passThroughSymbol: symbol;
5
+ private file;
6
+ private currentFile?;
7
+ private hash;
8
+ constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
9
+ render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
10
+ }
11
+ export declare function parseFilePath(tokenizer: Tokenizer, liquid: Liquid): ParsedFileName;
12
+ export declare function renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown>;
13
+ export {};
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderFilePath = exports.parseFilePath = void 0;
4
+ const liquidjs_1 = require("liquidjs");
5
+ const collection_1 = require("./collection");
6
+ const forloop_drop_1 = require("./forloop-drop");
7
+ class RenderTag extends liquidjs_1.Tag {
8
+ static passThroughSymbol = Symbol("passThrough");
9
+ file;
10
+ currentFile;
11
+ hash;
12
+ constructor(token, remainTokens, liquid) {
13
+ super(token, remainTokens, liquid);
14
+ const tokenizer = this.tokenizer;
15
+ this.file = parseFilePath(tokenizer, this.liquid);
16
+ this.currentFile = token.file;
17
+ while (!tokenizer.end()) {
18
+ tokenizer.skipBlank();
19
+ const begin = tokenizer.p;
20
+ const keyword = tokenizer.readIdentifier();
21
+ if (keyword.content === 'with' || keyword.content === 'for') {
22
+ tokenizer.skipBlank();
23
+ if (tokenizer.peek() !== ':') {
24
+ const value = tokenizer.readValue();
25
+ if (value) {
26
+ const beforeAs = tokenizer.p;
27
+ const asStr = tokenizer.readIdentifier();
28
+ let alias;
29
+ if (asStr.content === 'as')
30
+ alias = tokenizer.readIdentifier();
31
+ else
32
+ tokenizer.p = beforeAs(this)[keyword.content] = { value, alias: alias && alias.content };
33
+ tokenizer.skipBlank();
34
+ if (tokenizer.peek() === ',')
35
+ tokenizer.advance();
36
+ continue;
37
+ }
38
+ }
39
+ }
40
+ tokenizer.p = begin;
41
+ break;
42
+ }
43
+ this.hash = new liquidjs_1.Hash(tokenizer.remaining());
44
+ }
45
+ *render(ctx, emitter) {
46
+ const { liquid, hash } = this;
47
+ let filepath = (yield renderFilePath(this['file'], ctx, liquid));
48
+ (0, liquidjs_1.assert)(filepath, () => `illegal file path "${filepath}"`);
49
+ if (!filepath.endsWith(".liquid")) {
50
+ filepath += ".liquid";
51
+ }
52
+ const env = { [RenderTag.passThroughSymbol]: (ctx.environments ?? {})[RenderTag.passThroughSymbol] };
53
+ const childCtx = new liquidjs_1.Context(env, ctx.opts, { sync: ctx.sync, globals: ctx.globals, strictVariables: ctx.strictVariables });
54
+ const scope = childCtx.bottom();
55
+ Object.assign(scope, yield hash.render(ctx));
56
+ if (this['with']) {
57
+ const { value, alias } = this['with'];
58
+ scope[alias || filepath] = yield (0, liquidjs_1.evalToken)(value, ctx);
59
+ }
60
+ if (this['for']) {
61
+ const { value, alias } = this['for'];
62
+ const collection = (0, collection_1.toEnumerable)(yield (0, liquidjs_1.evalToken)(value, ctx));
63
+ scope['forloop'] = new forloop_drop_1.ForloopDrop(collection.length, value.getText(), alias);
64
+ for (const item of collection) {
65
+ scope[alias] = item;
66
+ const templates = (yield liquid._parsePartialFile(filepath, childCtx.sync, this['currentFile']));
67
+ yield liquid.renderer.renderTemplates(templates, childCtx, emitter);
68
+ scope['forloop'].next();
69
+ }
70
+ }
71
+ else {
72
+ const templates = (yield liquid._parsePartialFile(filepath, childCtx.sync, this['currentFile']));
73
+ yield liquid.renderer.renderTemplates(templates, childCtx, emitter);
74
+ }
75
+ }
76
+ }
77
+ exports.default = RenderTag;
78
+ function parseFilePath(tokenizer, liquid) {
79
+ if (liquid.options.dynamicPartials) {
80
+ const file = tokenizer.readValue();
81
+ tokenizer.assert(file, 'illegal file path');
82
+ if (file.getText() === 'none')
83
+ return;
84
+ if (liquidjs_1.TypeGuards.isQuotedToken(file)) {
85
+ const templates = liquid.parse((0, liquidjs_1.evalQuotedToken)(file));
86
+ return optimize(templates);
87
+ }
88
+ return file;
89
+ }
90
+ const tokens = [...tokenizer.readFileNameTemplate(liquid.options)];
91
+ const templates = optimize(liquid.parser.parseTokens(tokens));
92
+ return templates === 'none' ? undefined : templates;
93
+ }
94
+ exports.parseFilePath = parseFilePath;
95
+ function optimize(templates) {
96
+ if (templates.length === 1 && liquidjs_1.TypeGuards.isHTMLToken(templates[0].token))
97
+ return templates[0].token.getContent();
98
+ return templates;
99
+ }
100
+ function* renderFilePath(file, ctx, liquid) {
101
+ if (typeof file === 'string')
102
+ return file;
103
+ if (Array.isArray(file))
104
+ return liquid.renderer.renderTemplates(file, ctx);
105
+ return yield (0, liquidjs_1.evalToken)(file, ctx);
106
+ }
107
+ exports.renderFilePath = renderFilePath;
108
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../../src/modules/public-site/liquidjs-rendering/render-clone/render.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import { SiteContext } from "../../../site-context/site-context.types";
2
+ import { RenderingContext } from "./rendering-context";
3
+ export declare function renderLiquidTemplate(siteContext: SiteContext, renderingContext: RenderingContext, { templateNames, payload }: {
4
+ templateNames: string[];
5
+ payload: object;
6
+ }): Promise<string>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.renderLiquidTemplate = void 0;
7
+ const html_minifier_terser_1 = require("html-minifier-terser");
8
+ const render_1 = __importDefault(require("./render-clone/render"));
9
+ async function renderLiquidTemplate(siteContext, renderingContext, { templateNames, payload }) {
10
+ let html;
11
+ let usedTemplate;
12
+ for (const templateName of templateNames) {
13
+ try {
14
+ html = await siteContext.liquidEngine.renderFile(templateName, {
15
+ ...payload,
16
+ [render_1.default.passThroughSymbol]: renderingContext,
17
+ });
18
+ usedTemplate = templateName;
19
+ }
20
+ catch (err) {
21
+ if (err.code === "ENOENT")
22
+ continue;
23
+ throw err;
24
+ }
25
+ }
26
+ if (!html)
27
+ throw new Error(`missing template '${templateNames[0]}'`);
28
+ try {
29
+ return await (0, html_minifier_terser_1.minify)(html, {
30
+ collapseWhitespace: true,
31
+ removeComments: true,
32
+ });
33
+ }
34
+ catch {
35
+ siteContext.siteLog.warn(`[${siteContext.fqdn}] invalid HTML generated by '${usedTemplate}'`);
36
+ }
37
+ return html;
38
+ }
39
+ exports.renderLiquidTemplate = renderLiquidTemplate;
40
+ //# sourceMappingURL=render-liquidjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-liquidjs.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-rendering/render-liquidjs.ts"],"names":[],"mappings":";;;;;;AAAA,+DAA8C;AAE9C,mEAA8C;AAGvC,KAAK,UAAU,oBAAoB,CACxC,WAAwB,EACxB,gBAAkC,EAClC,EAAE,aAAa,EAAE,OAAO,EAAgD;IAExE,IAAI,IAAwB,CAAC;IAC7B,IAAI,YAAgC,CAAC;IACrC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,IAAI,GAAG,MAAM,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,EAAE;gBAC7D,GAAG,OAAO;gBACV,CAAC,gBAAS,CAAC,iBAAiB,CAAC,EAAE,gBAAgB;aAChD,CAAC,CAAC;YACH,YAAY,GAAG,YAAY,CAAC;QAC9B,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;gBAAE,SAAS;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IACD,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrE,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,6BAAM,EAAC,IAAI,EAAE;YACxB,kBAAkB,EAAE,IAAI;YACxB,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,IAAI,gCAAgC,YAAY,GAAG,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AA7BD,oDA6BC"}
@@ -0,0 +1,27 @@
1
+ import { Tracker } from "@paroicms/server-lib";
2
+ import { Context } from "liquidjs";
3
+ import { SiteContext } from "../../../site-context/site-context.types";
4
+ export interface RenderingContext {
5
+ renderingId: bigint;
6
+ cacheKey: string;
7
+ tracker: Tracker;
8
+ getDependencyKeys: () => string[];
9
+ addDependencyKey: (...dependencyKeys: string[]) => void;
10
+ getValueFromCache: (key: string) => RenderingCacheResult;
11
+ setValueIntoCache: (key: string, val: any) => void;
12
+ }
13
+ export type RenderingCacheResult = {
14
+ found: false;
15
+ } | {
16
+ found: true;
17
+ val: any;
18
+ };
19
+ export declare function createRenderingContext(siteContext: Pick<SiteContext, "imageCache">, options: {
20
+ cacheKey: string;
21
+ tracker: Tracker;
22
+ dependencyKey?: string;
23
+ }): Promise<RenderingContext>;
24
+ export declare function getRenderingContext(ctx: Context): RenderingContext;
25
+ export declare function makeTagCacheKeyForRendering(cacheKey: string, { tagParameters }: {
26
+ tagParameters?: any;
27
+ }): string;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.makeTagCacheKeyForRendering = exports.getRenderingContext = exports.createRenderingContext = void 0;
7
+ const render_1 = __importDefault(require("./render-clone/render"));
8
+ let renderingSeq = 0n;
9
+ async function createRenderingContext(siteContext, options) {
10
+ await siteContext.imageCache.resetCacheKey({ cacheKey: options.cacheKey });
11
+ const { cacheKey, tracker } = options;
12
+ const cache = new Map();
13
+ const dependencies = new Set(options.dependencyKey ? [options.dependencyKey] : undefined);
14
+ return {
15
+ renderingId: ++renderingSeq,
16
+ cacheKey,
17
+ tracker,
18
+ getDependencyKeys() {
19
+ return Array.from(dependencies);
20
+ },
21
+ addDependencyKey(...dependencyKeys) {
22
+ for (const key of dependencyKeys)
23
+ dependencies.add(key);
24
+ },
25
+ getValueFromCache(key) {
26
+ const val = cache.get(key);
27
+ return val ?? { found: false };
28
+ },
29
+ setValueIntoCache(key, val) {
30
+ cache.set(key, { found: true, val });
31
+ },
32
+ };
33
+ }
34
+ exports.createRenderingContext = createRenderingContext;
35
+ function getRenderingContext(ctx) {
36
+ const found = ctx.environments?.[render_1.default.passThroughSymbol];
37
+ if (!found)
38
+ throw new Error("missing rendering context");
39
+ return found;
40
+ }
41
+ exports.getRenderingContext = getRenderingContext;
42
+ function makeTagCacheKeyForRendering(cacheKey, { tagParameters }) {
43
+ return `${cacheKey}:${tagParameters === undefined ? "-" : JSON.stringify(tagParameters)}`;
44
+ }
45
+ exports.makeTagCacheKeyForRendering = makeTagCacheKeyForRendering;
46
+ //# sourceMappingURL=rendering-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rendering-context.js","sourceRoot":"","sources":["../../../../src/modules/public-site/liquidjs-rendering/rendering-context.ts"],"names":[],"mappings":";;;;;;AAGA,mEAA8C;AAE9C,IAAI,YAAY,GAAG,EAAE,CAAC;AAmBf,KAAK,UAAU,sBAAsB,CAC1C,WAA4C,EAC5C,OAIC;IAED,MAAM,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE3E,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACtC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAgC,CAAC;IACtD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAS,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClG,OAAO;QACL,WAAW,EAAE,EAAE,YAAY;QAC3B,QAAQ;QACR,OAAO;QACP,iBAAiB;YACf,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAClC,CAAC;QACD,gBAAgB,CAAC,GAAG,cAAc;YAChC,KAAK,MAAM,GAAG,IAAI,cAAc;gBAAE,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1D,CAAC;QACD,iBAAiB,CAAC,GAAG;YACnB,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAE3B,OAAO,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACjC,CAAC;QACD,iBAAiB,CAAC,GAAG,EAAE,GAAG;YACxB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACvC,CAAC;KACF,CAAC;AACJ,CAAC;AAhCD,wDAgCC;AAED,SAAgB,mBAAmB,CAAC,GAAY;IAC9C,MAAM,KAAK,GAAI,GAAG,CAAC,YAAoB,EAAE,CAAC,gBAAS,CAAC,iBAAiB,CAAC,CAAC;IACvE,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACzD,OAAO,KAAK,CAAC;AACf,CAAC;AAJD,kDAIC;AAED,SAAgB,2BAA2B,CACzC,QAAgB,EAChB,EAAE,aAAa,EAA2B;IAE1C,OAAO,GAAG,QAAQ,IAAI,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;AAC5F,CAAC;AALD,kEAKC"}
@@ -0,0 +1,13 @@
1
+ import { Context, Hash, Liquid, TagToken, TopLevelToken } from "liquidjs";
2
+ import { SiteContext } from "../../../site-context/site-context.types";
3
+ export declare function createGetBreadcrumbLiquidJsTag(siteContext: SiteContext): {
4
+ new (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid): {
5
+ tokenizer: any;
6
+ "__#4@#varName": string;
7
+ "__#4@#args": Hash;
8
+ render(ctx: Context): Generator<unknown, void, any>;
9
+ name: string;
10
+ liquid: Liquid;
11
+ token: TagToken;
12
+ };
13
+ };