@saltcorn/server 0.6.1 → 0.6.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/app.js +9 -13
  2. package/auth/admin.js +8 -24
  3. package/auth/index.js +15 -2
  4. package/auth/roleadmin.js +6 -16
  5. package/auth/routes.js +113 -59
  6. package/index.js +17 -1
  7. package/locales/en.json +30 -1
  8. package/markup/admin.js +17 -0
  9. package/markup/index.js +14 -1
  10. package/package.json +22 -9
  11. package/public/ckeditor/adapters/jquery.js +10 -0
  12. package/public/ckeditor/ckeditor.js +1286 -0
  13. package/public/ckeditor/config.js +38 -0
  14. package/public/ckeditor/contents.css +208 -0
  15. package/public/ckeditor/lang/af.js +5 -0
  16. package/public/ckeditor/lang/ar.js +5 -0
  17. package/public/ckeditor/lang/az.js +5 -0
  18. package/public/ckeditor/lang/bg.js +5 -0
  19. package/public/ckeditor/lang/bn.js +5 -0
  20. package/public/ckeditor/lang/bs.js +5 -0
  21. package/public/ckeditor/lang/ca.js +5 -0
  22. package/public/ckeditor/lang/cs.js +5 -0
  23. package/public/ckeditor/lang/cy.js +5 -0
  24. package/public/ckeditor/lang/da.js +5 -0
  25. package/public/ckeditor/lang/de-ch.js +5 -0
  26. package/public/ckeditor/lang/de.js +5 -0
  27. package/public/ckeditor/lang/el.js +5 -0
  28. package/public/ckeditor/lang/en-au.js +5 -0
  29. package/public/ckeditor/lang/en-ca.js +5 -0
  30. package/public/ckeditor/lang/en-gb.js +5 -0
  31. package/public/ckeditor/lang/en.js +5 -0
  32. package/public/ckeditor/lang/eo.js +5 -0
  33. package/public/ckeditor/lang/es-mx.js +5 -0
  34. package/public/ckeditor/lang/es.js +5 -0
  35. package/public/ckeditor/lang/et.js +5 -0
  36. package/public/ckeditor/lang/eu.js +5 -0
  37. package/public/ckeditor/lang/fa.js +5 -0
  38. package/public/ckeditor/lang/fi.js +5 -0
  39. package/public/ckeditor/lang/fo.js +5 -0
  40. package/public/ckeditor/lang/fr-ca.js +5 -0
  41. package/public/ckeditor/lang/fr.js +5 -0
  42. package/public/ckeditor/lang/gl.js +5 -0
  43. package/public/ckeditor/lang/gu.js +5 -0
  44. package/public/ckeditor/lang/he.js +5 -0
  45. package/public/ckeditor/lang/hi.js +5 -0
  46. package/public/ckeditor/lang/hr.js +5 -0
  47. package/public/ckeditor/lang/hu.js +5 -0
  48. package/public/ckeditor/lang/id.js +5 -0
  49. package/public/ckeditor/lang/is.js +5 -0
  50. package/public/ckeditor/lang/it.js +5 -0
  51. package/public/ckeditor/lang/ja.js +5 -0
  52. package/public/ckeditor/lang/ka.js +5 -0
  53. package/public/ckeditor/lang/km.js +5 -0
  54. package/public/ckeditor/lang/ko.js +5 -0
  55. package/public/ckeditor/lang/ku.js +5 -0
  56. package/public/ckeditor/lang/lt.js +5 -0
  57. package/public/ckeditor/lang/lv.js +5 -0
  58. package/public/ckeditor/lang/mk.js +5 -0
  59. package/public/ckeditor/lang/mn.js +5 -0
  60. package/public/ckeditor/lang/ms.js +5 -0
  61. package/public/ckeditor/lang/nb.js +5 -0
  62. package/public/ckeditor/lang/nl.js +5 -0
  63. package/public/ckeditor/lang/no.js +5 -0
  64. package/public/ckeditor/lang/oc.js +5 -0
  65. package/public/ckeditor/lang/pl.js +5 -0
  66. package/public/ckeditor/lang/pt-br.js +5 -0
  67. package/public/ckeditor/lang/pt.js +5 -0
  68. package/public/ckeditor/lang/ro.js +5 -0
  69. package/public/ckeditor/lang/ru.js +5 -0
  70. package/public/ckeditor/lang/si.js +5 -0
  71. package/public/ckeditor/lang/sk.js +5 -0
  72. package/public/ckeditor/lang/sl.js +5 -0
  73. package/public/ckeditor/lang/sq.js +5 -0
  74. package/public/ckeditor/lang/sr-latn.js +5 -0
  75. package/public/ckeditor/lang/sr.js +5 -0
  76. package/public/ckeditor/lang/sv.js +5 -0
  77. package/public/ckeditor/lang/th.js +5 -0
  78. package/public/ckeditor/lang/tr.js +5 -0
  79. package/public/ckeditor/lang/tt.js +5 -0
  80. package/public/ckeditor/lang/ug.js +5 -0
  81. package/public/ckeditor/lang/uk.js +5 -0
  82. package/public/ckeditor/lang/vi.js +5 -0
  83. package/public/ckeditor/lang/zh-cn.js +5 -0
  84. package/public/ckeditor/lang/zh.js +5 -0
  85. package/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  86. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  87. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  88. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  89. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  90. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  91. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
  92. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
  93. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  94. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  95. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +13 -0
  96. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
  97. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  98. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
  99. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  100. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  101. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
  102. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
  103. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
  104. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  105. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
  106. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  107. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
  108. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
  109. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
  110. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  111. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  112. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  113. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  114. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  115. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  116. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
  117. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  118. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  119. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  120. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  121. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  122. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
  123. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  124. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
  125. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  126. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  127. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
  128. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  129. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  130. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
  131. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  132. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
  133. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  134. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  135. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  136. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  137. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
  138. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
  139. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
  140. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +12 -0
  141. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +12 -0
  142. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
  143. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  144. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  145. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  146. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
  147. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  148. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  149. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  150. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  151. package/public/ckeditor/plugins/about/dialogs/about.js +8 -0
  152. package/public/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  153. package/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  154. package/public/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  155. package/public/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  156. package/public/ckeditor/plugins/dialog/styles/dialog.css +18 -0
  157. package/public/ckeditor/plugins/icons.png +0 -0
  158. package/public/ckeditor/plugins/icons_hidpi.png +0 -0
  159. package/public/ckeditor/plugins/image/dialogs/image.js +44 -0
  160. package/public/ckeditor/plugins/image/images/noimage.png +0 -0
  161. package/public/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  162. package/public/ckeditor/plugins/link/dialogs/link.js +30 -0
  163. package/public/ckeditor/plugins/link/images/anchor.png +0 -0
  164. package/public/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  165. package/public/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  166. package/public/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  167. package/public/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  168. package/public/ckeditor/plugins/magicline/images/icon.png +0 -0
  169. package/public/ckeditor/plugins/pastefromgdocs/filter/default.js +8 -0
  170. package/public/ckeditor/plugins/pastefromlibreoffice/filter/default.js +11 -0
  171. package/public/ckeditor/plugins/pastefromword/filter/default.js +42 -0
  172. package/public/ckeditor/plugins/pastetools/filter/common.js +24 -0
  173. package/public/ckeditor/plugins/pastetools/filter/image.js +12 -0
  174. package/public/ckeditor/plugins/scayt/CHANGELOG.md +4 -0
  175. package/public/ckeditor/plugins/scayt/LICENSE.md +28 -0
  176. package/public/ckeditor/plugins/scayt/README.md +81 -0
  177. package/public/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  178. package/public/ckeditor/plugins/scayt/dialogs/options.js +32 -0
  179. package/public/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  180. package/public/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
  181. package/public/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  182. package/public/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
  183. package/public/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  184. package/public/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
  185. package/public/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  186. package/public/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  187. package/public/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  188. package/public/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  189. package/public/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
  190. package/public/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
  191. package/public/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  192. package/public/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  193. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
  194. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
  195. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  196. package/public/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  197. package/public/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  198. package/public/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
  199. package/public/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  200. package/public/ckeditor/plugins/specialchar/dialogs/lang/et.js +11 -0
  201. package/public/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
  202. package/public/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  203. package/public/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  204. package/public/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  205. package/public/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
  206. package/public/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  207. package/public/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  208. package/public/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  209. package/public/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  210. package/public/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  211. package/public/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  212. package/public/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  213. package/public/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  214. package/public/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
  215. package/public/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  216. package/public/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
  217. package/public/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  218. package/public/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  219. package/public/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  220. package/public/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  221. package/public/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
  222. package/public/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  223. package/public/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  224. package/public/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  225. package/public/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
  226. package/public/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  227. package/public/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  228. package/public/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  229. package/public/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  230. package/public/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  231. package/public/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js +13 -0
  232. package/public/ckeditor/plugins/specialchar/dialogs/lang/sr.js +13 -0
  233. package/public/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  234. package/public/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  235. package/public/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  236. package/public/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  237. package/public/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  238. package/public/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  239. package/public/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  240. package/public/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  241. package/public/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
  242. package/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  243. package/public/ckeditor/plugins/table/dialogs/table.js +22 -0
  244. package/public/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
  245. package/public/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
  246. package/public/ckeditor/plugins/widget/images/handle.png +0 -0
  247. package/public/ckeditor/plugins/wsc/LICENSE.md +28 -0
  248. package/public/ckeditor/plugins/wsc/README.md +84 -0
  249. package/public/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  250. package/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  251. package/public/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  252. package/public/ckeditor/plugins/wsc/dialogs/wsc.js +90 -0
  253. package/public/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  254. package/public/ckeditor/plugins/wsc/icons/hidpi/spellchecker.png +0 -0
  255. package/public/ckeditor/plugins/wsc/icons/spellchecker.png +0 -0
  256. package/public/ckeditor/plugins/wsc/lang/af.js +2 -0
  257. package/public/ckeditor/plugins/wsc/lang/ar.js +2 -0
  258. package/public/ckeditor/plugins/wsc/lang/bg.js +2 -0
  259. package/public/ckeditor/plugins/wsc/lang/bn.js +2 -0
  260. package/public/ckeditor/plugins/wsc/lang/bs.js +2 -0
  261. package/public/ckeditor/plugins/wsc/lang/ca.js +2 -0
  262. package/public/ckeditor/plugins/wsc/lang/cs.js +2 -0
  263. package/public/ckeditor/plugins/wsc/lang/cy.js +2 -0
  264. package/public/ckeditor/plugins/wsc/lang/da.js +2 -0
  265. package/public/ckeditor/plugins/wsc/lang/de.js +2 -0
  266. package/public/ckeditor/plugins/wsc/lang/el.js +2 -0
  267. package/public/ckeditor/plugins/wsc/lang/en-au.js +2 -0
  268. package/public/ckeditor/plugins/wsc/lang/en-ca.js +2 -0
  269. package/public/ckeditor/plugins/wsc/lang/en-gb.js +2 -0
  270. package/public/ckeditor/plugins/wsc/lang/en.js +2 -0
  271. package/public/ckeditor/plugins/wsc/lang/eo.js +2 -0
  272. package/public/ckeditor/plugins/wsc/lang/es.js +2 -0
  273. package/public/ckeditor/plugins/wsc/lang/et.js +2 -0
  274. package/public/ckeditor/plugins/wsc/lang/eu.js +2 -0
  275. package/public/ckeditor/plugins/wsc/lang/fa.js +2 -0
  276. package/public/ckeditor/plugins/wsc/lang/fi.js +2 -0
  277. package/public/ckeditor/plugins/wsc/lang/fo.js +2 -0
  278. package/public/ckeditor/plugins/wsc/lang/fr-ca.js +2 -0
  279. package/public/ckeditor/plugins/wsc/lang/fr.js +2 -0
  280. package/public/ckeditor/plugins/wsc/lang/gl.js +2 -0
  281. package/public/ckeditor/plugins/wsc/lang/gu.js +2 -0
  282. package/public/ckeditor/plugins/wsc/lang/he.js +2 -0
  283. package/public/ckeditor/plugins/wsc/lang/hi.js +2 -0
  284. package/public/ckeditor/plugins/wsc/lang/hr.js +2 -0
  285. package/public/ckeditor/plugins/wsc/lang/hu.js +2 -0
  286. package/public/ckeditor/plugins/wsc/lang/is.js +2 -0
  287. package/public/ckeditor/plugins/wsc/lang/it.js +2 -0
  288. package/public/ckeditor/plugins/wsc/lang/ja.js +2 -0
  289. package/public/ckeditor/plugins/wsc/lang/ka.js +2 -0
  290. package/public/ckeditor/plugins/wsc/lang/km.js +2 -0
  291. package/public/ckeditor/plugins/wsc/lang/ko.js +2 -0
  292. package/public/ckeditor/plugins/wsc/lang/ku.js +2 -0
  293. package/public/ckeditor/plugins/wsc/lang/lt.js +2 -0
  294. package/public/ckeditor/plugins/wsc/lang/lv.js +2 -0
  295. package/public/ckeditor/plugins/wsc/lang/mk.js +2 -0
  296. package/public/ckeditor/plugins/wsc/lang/mn.js +2 -0
  297. package/public/ckeditor/plugins/wsc/lang/ms.js +2 -0
  298. package/public/ckeditor/plugins/wsc/lang/nb.js +2 -0
  299. package/public/ckeditor/plugins/wsc/lang/nl.js +2 -0
  300. package/public/ckeditor/plugins/wsc/lang/no.js +2 -0
  301. package/public/ckeditor/plugins/wsc/lang/pl.js +2 -0
  302. package/public/ckeditor/plugins/wsc/lang/pt-br.js +2 -0
  303. package/public/ckeditor/plugins/wsc/lang/pt.js +2 -0
  304. package/public/ckeditor/plugins/wsc/lang/ro.js +2 -0
  305. package/public/ckeditor/plugins/wsc/lang/ru.js +2 -0
  306. package/public/ckeditor/plugins/wsc/lang/sk.js +2 -0
  307. package/public/ckeditor/plugins/wsc/lang/sl.js +2 -0
  308. package/public/ckeditor/plugins/wsc/lang/sr-latn.js +2 -0
  309. package/public/ckeditor/plugins/wsc/lang/sr.js +2 -0
  310. package/public/ckeditor/plugins/wsc/lang/sv.js +2 -0
  311. package/public/ckeditor/plugins/wsc/lang/th.js +2 -0
  312. package/public/ckeditor/plugins/wsc/lang/tr.js +2 -0
  313. package/public/ckeditor/plugins/wsc/lang/ug.js +2 -0
  314. package/public/ckeditor/plugins/wsc/lang/uk.js +2 -0
  315. package/public/ckeditor/plugins/wsc/lang/vi.js +2 -0
  316. package/public/ckeditor/plugins/wsc/lang/zh-cn.js +1 -0
  317. package/public/ckeditor/plugins/wsc/lang/zh.js +1 -0
  318. package/public/ckeditor/plugins/wsc/plugin.js +5 -0
  319. package/public/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
  320. package/public/ckeditor/skins/moono-lisa/dialog.css +5 -0
  321. package/public/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
  322. package/public/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
  323. package/public/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
  324. package/public/ckeditor/skins/moono-lisa/editor.css +5 -0
  325. package/public/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
  326. package/public/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
  327. package/public/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
  328. package/public/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
  329. package/public/ckeditor/skins/moono-lisa/icons.png +0 -0
  330. package/public/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  331. package/public/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
  332. package/public/ckeditor/skins/moono-lisa/images/close.png +0 -0
  333. package/public/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
  334. package/public/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  335. package/public/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
  336. package/public/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  337. package/public/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
  338. package/public/ckeditor/skins/moono-lisa/images/lock.png +0 -0
  339. package/public/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
  340. package/public/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
  341. package/public/ckeditor/skins/moono-lisa/readme.md +46 -0
  342. package/public/ckeditor/styles.js +137 -0
  343. package/public/ckeditor/vendor/promise.js +13 -0
  344. package/public/saltcorn.css +20 -3
  345. package/public/saltcorn.js +15 -0
  346. package/restart_watcher.js +156 -0
  347. package/routes/actions.js +1 -15
  348. package/routes/admin.js +6 -23
  349. package/routes/api.js +51 -60
  350. package/routes/config.js +0 -1
  351. package/routes/crashlog.js +1 -4
  352. package/routes/delete.js +1 -2
  353. package/routes/edit.js +1 -2
  354. package/routes/eventlog.js +2 -15
  355. package/routes/events.js +0 -1
  356. package/routes/fields.js +14 -22
  357. package/routes/files.js +144 -64
  358. package/routes/homepage.js +8 -2
  359. package/routes/index.js +37 -0
  360. package/routes/infoarch.js +12 -19
  361. package/routes/library.js +1 -4
  362. package/routes/list.js +50 -6
  363. package/routes/menu.js +118 -32
  364. package/routes/packs.js +2 -8
  365. package/routes/page.js +7 -8
  366. package/routes/pageedit.js +18 -30
  367. package/routes/plugins.js +21 -34
  368. package/routes/scapi.js +155 -184
  369. package/routes/search.js +6 -10
  370. package/routes/settings.js +1 -2
  371. package/routes/tables.js +1 -22
  372. package/routes/tenant.js +1 -9
  373. package/routes/utils.js +19 -19
  374. package/routes/view.js +11 -9
  375. package/routes/viewedit.js +18 -29
  376. package/s3storage.js +167 -0
  377. package/serve.js +10 -2
  378. package/tests/admin.test.js +4 -2
  379. package/wrapper.js +8 -1
@@ -0,0 +1,46 @@
1
+ "Moono-lisa" Skin
2
+ =================
3
+
4
+ This skin has been made a **default skin** starting from CKEditor 4.6.0 and is maintained by the core developers.
5
+
6
+ For more information about skins, please check the [CKEditor Skin SDK](https://ckeditor.com/docs/ckeditor4/latest/guide/skin_sdk_intro.html)
7
+ documentation.
8
+
9
+ Features
10
+ -------------------
11
+ "Moono-lisa" is a monochromatic skin, which offers a modern, flat and minimalistic look which blends very well in modern design.
12
+ It comes with the following features:
13
+
14
+ - Chameleon feature with brightness.
15
+ - High-contrast compatibility.
16
+ - Graphics source provided in SVG.
17
+
18
+ Directory Structure
19
+ -------------------
20
+
21
+ CSS parts:
22
+ - **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance,
23
+ - **mainui.css**: the file contains styles of entire editor outline structures,
24
+ - **toolbar.css**: the file contains styles of the editor toolbar space (top),
25
+ - **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar,
26
+ - **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded
27
+ until the first panel open up,
28
+ - **elementspath.css**: the file contains styles of the editor elements path bar (bottom),
29
+ - **menu.css**: the file contains styles of all editor menus including context menu and button drop-down,
30
+ it's not loaded until the first menu open up,
31
+ - **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open,
32
+ - **reset.css**: the file defines the basis of style resets among all editor UI spaces,
33
+ - **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference,
34
+ - **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks.
35
+
36
+ Other parts:
37
+ - **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature,
38
+ - **images/**: contains a fill general used images,
39
+ - **dev/**: contains SVG and PNG source of the skin icons.
40
+
41
+ License
42
+ -------
43
+
44
+ Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
45
+
46
+ For licensing, see LICENSE.md or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license)
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ // This file contains style definitions that can be used by CKEditor plugins.
7
+ //
8
+ // The most common use for it is the "stylescombo" plugin which shows the Styles drop-down
9
+ // list containing all styles in the editor toolbar. Other plugins, like
10
+ // the "div" plugin, use a subset of the styles for their features.
11
+ //
12
+ // If you do not have plugins that depend on this file in your editor build, you can simply
13
+ // ignore it. Otherwise it is strongly recommended to customize this file to match your
14
+ // website requirements and design properly.
15
+ //
16
+ // For more information refer to: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#style-rules
17
+
18
+ CKEDITOR.stylesSet.add( 'default', [
19
+ /* Block styles */
20
+
21
+ // These styles are already available in the "Format" drop-down list ("format" plugin),
22
+ // so they are not needed here by default. You may enable them to avoid
23
+ // placing the "Format" combo in the toolbar, maintaining the same features.
24
+ /*
25
+ { name: 'Paragraph', element: 'p' },
26
+ { name: 'Heading 1', element: 'h1' },
27
+ { name: 'Heading 2', element: 'h2' },
28
+ { name: 'Heading 3', element: 'h3' },
29
+ { name: 'Heading 4', element: 'h4' },
30
+ { name: 'Heading 5', element: 'h5' },
31
+ { name: 'Heading 6', element: 'h6' },
32
+ { name: 'Preformatted Text',element: 'pre' },
33
+ { name: 'Address', element: 'address' },
34
+ */
35
+
36
+ { name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } },
37
+ { name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } },
38
+ {
39
+ name: 'Special Container',
40
+ element: 'div',
41
+ styles: {
42
+ padding: '5px 10px',
43
+ background: '#eee',
44
+ border: '1px solid #ccc'
45
+ }
46
+ },
47
+
48
+ /* Inline styles */
49
+
50
+ // These are core styles available as toolbar buttons. You may opt enabling
51
+ // some of them in the Styles drop-down list, removing them from the toolbar.
52
+ // (This requires the "stylescombo" plugin.)
53
+ /*
54
+ { name: 'Strong', element: 'strong', overrides: 'b' },
55
+ { name: 'Emphasis', element: 'em' , overrides: 'i' },
56
+ { name: 'Underline', element: 'u' },
57
+ { name: 'Strikethrough', element: 'strike' },
58
+ { name: 'Subscript', element: 'sub' },
59
+ { name: 'Superscript', element: 'sup' },
60
+ */
61
+
62
+ { name: 'Marker', element: 'span', attributes: { 'class': 'marker' } },
63
+
64
+ { name: 'Big', element: 'big' },
65
+ { name: 'Small', element: 'small' },
66
+ { name: 'Typewriter', element: 'tt' },
67
+
68
+ { name: 'Computer Code', element: 'code' },
69
+ { name: 'Keyboard Phrase', element: 'kbd' },
70
+ { name: 'Sample Text', element: 'samp' },
71
+ { name: 'Variable', element: 'var' },
72
+
73
+ { name: 'Deleted Text', element: 'del' },
74
+ { name: 'Inserted Text', element: 'ins' },
75
+
76
+ { name: 'Cited Work', element: 'cite' },
77
+ { name: 'Inline Quotation', element: 'q' },
78
+
79
+ { name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } },
80
+ { name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } },
81
+
82
+ /* Object styles */
83
+
84
+ {
85
+ name: 'Styled Image (left)',
86
+ element: 'img',
87
+ attributes: { 'class': 'left' }
88
+ },
89
+
90
+ {
91
+ name: 'Styled Image (right)',
92
+ element: 'img',
93
+ attributes: { 'class': 'right' }
94
+ },
95
+
96
+ {
97
+ name: 'Compact Table',
98
+ element: 'table',
99
+ attributes: {
100
+ cellpadding: '5',
101
+ cellspacing: '0',
102
+ border: '1',
103
+ bordercolor: '#ccc'
104
+ },
105
+ styles: {
106
+ 'border-collapse': 'collapse'
107
+ }
108
+ },
109
+
110
+ { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
111
+ { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } },
112
+
113
+ /* Widget styles */
114
+
115
+ { name: 'Clean Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-clean' } },
116
+ { name: 'Grayscale Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-grayscale' } },
117
+
118
+ { name: 'Featured Snippet', type: 'widget', widget: 'codeSnippet', attributes: { 'class': 'code-featured' } },
119
+
120
+ { name: 'Featured Formula', type: 'widget', widget: 'mathjax', attributes: { 'class': 'math-featured' } },
121
+
122
+ { name: '240p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-240p' }, group: 'size' },
123
+ { name: '360p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-360p' }, group: 'size' },
124
+ { name: '480p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-480p' }, group: 'size' },
125
+ { name: '720p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-720p' }, group: 'size' },
126
+ { name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-1080p' }, group: 'size' },
127
+
128
+ // Adding space after the style name is an intended workaround. For now, there
129
+ // is no option to create two styles with the same name for different widget types. See https://dev.ckeditor.com/ticket/16664.
130
+ { name: '240p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-240p' }, group: 'size' },
131
+ { name: '360p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-360p' }, group: 'size' },
132
+ { name: '480p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-480p' }, group: 'size' },
133
+ { name: '720p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-720p' }, group: 'size' },
134
+ { name: '1080p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-1080p' }, group: 'size' }
135
+
136
+ ] );
137
+
@@ -0,0 +1,13 @@
1
+ (function(v,w){"object"===typeof exports&&"undefined"!==typeof module?module.exports=w():"function"===typeof define&&define.amd?define(w):v.ES6Promise=w()})(this,function(){function v(a){return"function"===typeof a}function w(){return function(){return process.nextTick(n)}}function R(){return"undefined"!==typeof B?function(){B(n)}:C()}function S(){var a=0,b=new J(n),c=document.createTextNode("");b.observe(c,{characterData:!0});return function(){c.data=a=++a%2}}function T(){var a=new MessageChannel;
2
+ a.port1.onmessage=n;return function(){return a.port2.postMessage(0)}}function C(){var a=setTimeout;return function(){return a(n,1)}}function n(){for(var a=0;a<k;a+=2)(0,q[a])(q[a+1]),q[a]=void 0,q[a+1]=void 0;k=0}function U(){try{var a=Function("return this")().require("vertx");B=a.runOnLoop||a.runOnContext;return R()}catch(b){return C()}}function D(a,b){var c=this,d=new this.constructor(r);void 0===d[z]&&K(d);var e=c._state;if(e){var f=arguments[e-1];l(function(){return L(e,d,f,c._result)})}else E(c,
3
+ d,a,b);return d}function F(a){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(r);x(b,a);return b}function r(){}function M(a){try{return a.then}catch(b){return p.error=b,p}}function V(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function W(a,b,c){l(function(a){var e=!1,f=V(c,b,function(c){e||(e=!0,b!==c?x(a,c):m(a,c))},function(b){e||(e=!0,g(a,b))},"Settle: "+(a._label||" unknown promise"));!e&&f&&(e=!0,g(a,f))},a)}function X(a,b){b._state===y?m(a,b._result):b._state===t?g(a,
4
+ b._result):E(b,void 0,function(b){return x(a,b)},function(b){return g(a,b)})}function N(a,b,c){b.constructor===a.constructor&&c===D&&b.constructor.resolve===F?X(a,b):c===p?(g(a,p.error),p.error=null):void 0===c?m(a,b):v(c)?W(a,b,c):m(a,b)}function x(a,b){if(a===b)g(a,new TypeError("You cannot resolve a promise with itself"));else{var c=typeof b;null===b||"object"!==c&&"function"!==c?m(a,b):N(a,b,M(b))}}function Y(a){a._onerror&&a._onerror(a._result);G(a)}function m(a,b){a._state===u&&(a._result=b,
5
+ a._state=y,0!==a._subscribers.length&&l(G,a))}function g(a,b){a._state===u&&(a._state=t,a._result=b,l(Y,a))}function E(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null;e[f]=b;e[f+y]=c;e[f+t]=d;0===f&&a._state&&l(G,a)}function G(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d=void 0,e=void 0,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?L(c,d,e,f):e(f);a._subscribers.length=0}}function L(a,b,c,d){var e=v(c),f=void 0,h=void 0,k=void 0,l=void 0;if(e){try{f=c(d)}catch(n){p.error=
6
+ n,f=p}f===p?(l=!0,h=f.error,f.error=null):k=!0;if(b===f){g(b,new TypeError("A promises callback cannot return that same promise."));return}}else f=d,k=!0;b._state===u&&(e&&k?x(b,f):l?g(b,h):a===y?m(b,f):a===t&&g(b,f))}function Z(a,b){try{b(function(b){x(a,b)},function(b){g(a,b)})}catch(c){g(a,c)}}function K(a){a[z]=O++;a._state=void 0;a._result=void 0;a._subscribers=[]}var H=void 0,P=H=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},k=0,B=void 0,
7
+ I=void 0,l=function(a,b){q[k]=a;q[k+1]=b;k+=2;2===k&&(I?I(n):Q())},A=(H="undefined"!==typeof window?window:void 0)||{},J=A.MutationObserver||A.WebKitMutationObserver,A="undefined"===typeof self&&"undefined"!==typeof process&&"[object process]"==={}.toString.call(process),aa="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,q=Array(1E3),Q=void 0,Q=A?w():J?S():aa?T():void 0===H&&"function"===typeof require?U():C(),z=Math.random().toString(36).substring(2),
8
+ u=void 0,y=1,t=2,p={error:null},O=0,ba=function(){function a(a,c){this._instanceConstructor=a;this.promise=new a(r);this.promise[z]||K(this.promise);P(c)?(this._remaining=this.length=c.length,this._result=Array(this.length),0===this.length?m(this.promise,this._result):(this.length=this.length||0,this._enumerate(c),0===this._remaining&&m(this.promise,this._result))):g(this.promise,Error("Array Methods must be provided an Array"))}a.prototype._enumerate=function(a){for(var c=0;this._state===u&&c<a.length;c++)this._eachEntry(a[c],
9
+ c)};a.prototype._eachEntry=function(a,c){var d=this._instanceConstructor,e=d.resolve;e===F?(e=M(a),e===D&&a._state!==u?this._settledAt(a._state,c,a._result):"function"!==typeof e?(this._remaining--,this._result[c]=a):d===h?(d=new d(r),N(d,a,e),this._willSettleAt(d,c)):this._willSettleAt(new d(function(c){return c(a)}),c)):this._willSettleAt(e(a),c)};a.prototype._settledAt=function(a,c,d){var e=this.promise;e._state===u&&(this._remaining--,a===t?g(e,d):this._result[c]=d);0===this._remaining&&m(e,this._result)};
10
+ a.prototype._willSettleAt=function(a,c){var d=this;E(a,void 0,function(a){return d._settledAt(y,c,a)},function(a){return d._settledAt(t,c,a)})};return a}(),h=function(){function a(b){this[z]=O++;this._result=this._state=void 0;this._subscribers=[];if(r!==b){if("function"!==typeof b)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof a)Z(this,b);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
11
+ }}a.prototype["catch"]=function(a){return this.then(null,a)};a.prototype["finally"]=function(a){var c=this.constructor;return v(a)?this.then(function(d){return c.resolve(a()).then(function(){return d})},function(d){return c.resolve(a()).then(function(){throw d;})}):this.then(a,a)};return a}();h.prototype.then=D;h.all=function(a){return(new ba(this,a)).promise};h.race=function(a){var b=this;return P(a)?new b(function(c,d){for(var e=a.length,f=0;f<e;f++)b.resolve(a[f]).then(c,d)}):new b(function(a,
12
+ b){return b(new TypeError("You must pass an array to race."))})};h.resolve=F;h.reject=function(a){var b=new this(r);g(b,a);return b};h._setScheduler=function(a){I=a};h._setAsap=function(a){l=a};h._asap=l;h.polyfill=function(){var a=void 0;if("undefined"!==typeof global)a=global;else if("undefined"!==typeof self)a=self;else try{a=Function("return this")()}catch(b){throw Error("polyfill failed because global object is unavailable in this environment");}var c=a.Promise;if(c){var d=null;try{d=Object.prototype.toString.call(c.resolve())}catch(e){}if("[object Promise]"===
13
+ d&&!c.cast)return}a.Promise=h};return h.Promise=h});
@@ -65,11 +65,11 @@ div.testrunoutput code {
65
65
  }
66
66
 
67
67
  div[data-inline-edit-dest-url] .editicon {
68
- display: none;
68
+ visibility: hidden;
69
69
  }
70
70
 
71
71
  div[data-inline-edit-dest-url]:hover .editicon {
72
- display: inline;
72
+ visibility: visible;
73
73
  }
74
74
  .searchbar-dropdown {
75
75
  left: unset;
@@ -81,13 +81,19 @@ div[data-inline-edit-dest-url]:hover .editicon {
81
81
 
82
82
  border-color: #95a5a6;
83
83
  }
84
- .search-bar input[type="search"] {
84
+ .search-bar input[type="search"]:not(.hasbl) {
85
85
  border-left: none;
86
86
  border-color: #95a5a6;
87
87
  padding-left: 0.3rem;
88
88
  background-color: #ffffff;
89
89
  }
90
90
 
91
+ .search-bar input[type="search"] {
92
+ border-color: #95a5a6;
93
+ padding-left: 0.3rem;
94
+ background-color: #ffffff;
95
+ }
96
+
91
97
  .search-bar button.search-bar {
92
98
  border-color: #95a5a6;
93
99
  background-color: #ffffff;
@@ -95,10 +101,21 @@ div[data-inline-edit-dest-url]:hover .editicon {
95
101
  .search-bar button.dropdown-toggle {
96
102
  border-left: none;
97
103
  }
104
+
98
105
  #button-search-submit {
99
106
  border-right: none;
100
107
  padding-right: 0.3rem;
101
108
  }
109
+
110
+ form.menusearch button {
111
+ border-left: none;
112
+ padding-right: 0.3rem;
113
+ }
114
+
115
+ .pl-2p5 {
116
+ padding-left: 0.75rem !important;
117
+ }
118
+
102
119
  .br-none {
103
120
  border-right: none;
104
121
  }
@@ -306,6 +306,18 @@ function select_id(id) {
306
306
  function set_state_field(key, value) {
307
307
  pjax_to(updateQueryStringParameter(window.location.href, key, value));
308
308
  }
309
+
310
+ function check_state_field(that) {
311
+ const checked = that.checked;
312
+ const name = that.name;
313
+ const value = that.value;
314
+ var separator = window.location.href.indexOf("?") !== -1 ? "&" : "?";
315
+ let dest;
316
+ if (checked) dest = window.location.href + `${separator}${name}=${value}`;
317
+ else dest = window.location.href.replace(`${name}=${value}`, "");
318
+ pjax_to(dest.replace("&&", "&").replace("?&", "?"));
319
+ }
320
+
309
321
  function set_state_fields(kvs) {
310
322
  var newhref = window.location.href;
311
323
  Object.entries(kvs).forEach((kv) => {
@@ -626,3 +638,6 @@ function room_older(viewname, room_id, btn) {
626
638
  }
627
639
  );
628
640
  }
641
+ function showHideCol(nm, e) {
642
+ $("#jsGrid").jsGrid("fieldOption", nm, "visible", e.checked);
643
+ }
@@ -0,0 +1,156 @@
1
+ /**
2
+ * @category server
3
+ * @module restart_watcher
4
+ */
5
+
6
+ const path = require("path");
7
+ const { spawnSync } = require("child_process");
8
+ const watch = require("node-watch");
9
+ const Plugin = require("@saltcorn/data/models/plugin");
10
+ const db = require("@saltcorn/data/db");
11
+ const { eachTenant } = require("@saltcorn/data/models/tenant");
12
+
13
+ /**
14
+ * packages that should trigger a server re-start
15
+ */
16
+ const relevantPackages = [
17
+ "db-common",
18
+ "postgres",
19
+ "saltcorn-data",
20
+ "saltcorn-markup",
21
+ "saltcorn-sbadmin2",
22
+ "server",
23
+ "sqlite",
24
+ ];
25
+
26
+ /**
27
+ * excluded directories or file name patterns
28
+ */
29
+ const excludePatterns = [
30
+ /\/node_modules/,
31
+ /\/public/,
32
+ /\.git/,
33
+ /\.docs/,
34
+ /\.docs/,
35
+ /\migrations/,
36
+ /.*test.js/,
37
+ ];
38
+
39
+ /**
40
+ * get the root directory of the saltcorn project
41
+ * @returns {string} project root path
42
+ */
43
+ const getProjectRoot = () => {
44
+ return path.normalize(`${__dirname}/../../`);
45
+ };
46
+
47
+ /**
48
+ * get the packages directory of the saltcorn project
49
+ * @returns {string} packages path
50
+ */
51
+ const getPackagesDirectory = () => {
52
+ return `${getProjectRoot()}/packages`;
53
+ };
54
+
55
+ /**
56
+ * get all package directories that should trigger a server re-start
57
+ * @returns {string[]} list of paths to relevant directories
58
+ */
59
+ const getRelevantPackages = () => {
60
+ const packagesDir = getPackagesDirectory();
61
+ return relevantPackages.map((packageName) => `${packagesDir}/${packageName}`);
62
+ };
63
+
64
+ /**
65
+ * get all plugin directories that should trigger a server re-start
66
+ * @returns {string[]} list of paths to relevant directories
67
+ */
68
+ const getPluginDirectories = async () => {
69
+ const getDirs = async () => {
70
+ const local_plugins = await Plugin.find({ source: "local" });
71
+ return local_plugins.map((p) => p.location);
72
+ };
73
+ const listOfDirs = [];
74
+ await eachTenant(async () => {
75
+ listOfDirs.push(await getDirs());
76
+ });
77
+ return [...new Set(listOfDirs.flat(1))];
78
+ };
79
+
80
+ const projectRoot = getProjectRoot();
81
+
82
+ const watchCfg = {
83
+ recursive: true,
84
+ filter(file, skip) {
85
+ for (const excludePattern of excludePatterns) {
86
+ if (excludePattern.test(file)) return skip;
87
+ }
88
+ return /(\.js|\.ts)$/.test(file);
89
+ },
90
+ };
91
+
92
+ let activeWatchers = [];
93
+
94
+ /**
95
+ * close all open file watchers
96
+ */
97
+ const closeWatchers = () => {
98
+ for (const activeWatcher of activeWatchers) {
99
+ if (!activeWatcher.isClosed()) {
100
+ activeWatcher.close();
101
+ }
102
+ }
103
+ };
104
+
105
+ /**
106
+ * register many file change listener and do re-starts on changes
107
+ * The listener calls process.exit() and assumes
108
+ * that pm2 does the actual re-start.
109
+ * @param {string[]} projectDirs package paths that should trigger re-starts.
110
+ * @param {string[]} pluginDirs plugin paths that should trigger re-starts.
111
+ */
112
+ const listenForChanges = (projectDirs, pluginDirs) => {
113
+ // watch project dirs
114
+ for (const projectDir of projectDirs) {
115
+ activeWatchers.push(
116
+ watch(
117
+ projectDir,
118
+ watchCfg,
119
+ // event is either 'update' or 'remove'
120
+ (event, file) => {
121
+ console.log("'%s' changed \n re-starting now", file);
122
+ closeWatchers();
123
+ spawnSync("npm", ["run", "tsc"], {
124
+ stdio: "inherit",
125
+ cwd: projectRoot,
126
+ });
127
+ process.exit();
128
+ }
129
+ )
130
+ );
131
+ }
132
+ // watch plugin dirs
133
+ for (const pluginDir of pluginDirs) {
134
+ activeWatchers.push(
135
+ watch(
136
+ pluginDir,
137
+ watchCfg,
138
+ // event is either 'update' or 'remove'
139
+ (event, file) => {
140
+ console.log("'%s' changed \n re-starting now", file);
141
+ closeWatchers();
142
+ process.exit();
143
+ }
144
+ )
145
+ );
146
+ }
147
+ };
148
+
149
+ module.exports = {
150
+ listenForChanges,
151
+ getProjectRoot,
152
+ getPackagesDirectory,
153
+ getRelevantPackages,
154
+ getPluginDirectories,
155
+ closeWatchers,
156
+ };
package/routes/actions.js CHANGED
@@ -5,12 +5,7 @@
5
5
  * @subcategory routes
6
6
  */
7
7
  const Router = require("express-promise-router");
8
- const {
9
- isAdmin,
10
- setTenant,
11
- error_catcher,
12
- get_base_url,
13
- } = require("./utils.js");
8
+ const { isAdmin, error_catcher, get_base_url } = require("./utils.js");
14
9
  const { getState } = require("@saltcorn/data/db/state");
15
10
  const Trigger = require("@saltcorn/data/models/trigger");
16
11
 
@@ -87,7 +82,6 @@ const getActions = async () => {
87
82
  */
88
83
  router.get(
89
84
  "/",
90
- setTenant,
91
85
  isAdmin,
92
86
  error_catcher(async (req, res) => {
93
87
  const triggers = await Trigger.findAllWithTableName();
@@ -288,7 +282,6 @@ const triggerForm = async (req, trigger) => {
288
282
  */
289
283
  router.get(
290
284
  "/new",
291
- setTenant,
292
285
  isAdmin,
293
286
  error_catcher(async (req, res) => {
294
287
  const form = await triggerForm(req);
@@ -314,7 +307,6 @@ router.get(
314
307
  */
315
308
  router.get(
316
309
  "/edit/:id",
317
- setTenant,
318
310
  isAdmin,
319
311
  error_catcher(async (req, res) => {
320
312
  const { id } = req.params;
@@ -344,7 +336,6 @@ router.get(
344
336
  */
345
337
  router.post(
346
338
  "/new",
347
- setTenant,
348
339
  isAdmin,
349
340
  error_catcher(async (req, res) => {
350
341
  const form = await triggerForm(req);
@@ -384,7 +375,6 @@ router.post(
384
375
  */
385
376
  router.post(
386
377
  "/edit/:id",
387
- setTenant,
388
378
  isAdmin,
389
379
  error_catcher(async (req, res) => {
390
380
  const { id } = req.params;
@@ -427,7 +417,6 @@ router.post(
427
417
  */
428
418
  router.get(
429
419
  "/configure/:id",
430
- setTenant,
431
420
  isAdmin,
432
421
  error_catcher(async (req, res) => {
433
422
  const { id } = req.params;
@@ -543,7 +532,6 @@ router.get(
543
532
  */
544
533
  router.post(
545
534
  "/configure/:id",
546
- setTenant,
547
535
  isAdmin,
548
536
  error_catcher(async (req, res) => {
549
537
  const { id } = req.params;
@@ -585,7 +573,6 @@ router.post(
585
573
  */
586
574
  router.post(
587
575
  "/delete/:id",
588
- setTenant,
589
576
  isAdmin,
590
577
  error_catcher(async (req, res) => {
591
578
  const { id } = req.params;
@@ -602,7 +589,6 @@ router.post(
602
589
  */
603
590
  router.get(
604
591
  "/testrun/:id",
605
- setTenant,
606
592
  isAdmin,
607
593
  error_catcher(async (req, res) => {
608
594
  const { id } = req.params;
package/routes/admin.js CHANGED
@@ -5,12 +5,7 @@
5
5
  */
6
6
  const Router = require("express-promise-router");
7
7
 
8
- const {
9
- setTenant,
10
- isAdmin,
11
- error_catcher,
12
- getGitRevision,
13
- } = require("./utils.js");
8
+ const { isAdmin, error_catcher, getGitRevision } = require("./utils.js");
14
9
  const Table = require("@saltcorn/data/models/table");
15
10
  const Plugin = require("@saltcorn/data/models/plugin");
16
11
  const File = require("@saltcorn/data/models/file");
@@ -52,6 +47,7 @@ const load_plugins = require("../load_plugins");
52
47
  const {
53
48
  restore_backup,
54
49
  send_admin_page,
50
+ send_files_page,
55
51
  config_fields_form,
56
52
  save_config_from_form,
57
53
  flash_restart_if_required,
@@ -66,6 +62,7 @@ const {
66
62
  is_hsts_tld,
67
63
  } = require("../markup/admin");
68
64
  const moment = require("moment");
65
+ const View = require("@saltcorn/data/models/view");
69
66
 
70
67
  /**
71
68
  * @type {object}
@@ -78,7 +75,7 @@ const router = new Router();
78
75
  module.exports = router;
79
76
 
80
77
  /**
81
- * @param {object} req
78
+ * @param {object} req
82
79
  * @returns {Promise<Form>}
83
80
  */
84
81
  const site_id_form = (req) =>
@@ -131,7 +128,6 @@ const email_form = async (req) => {
131
128
  */
132
129
  router.get(
133
130
  "/",
134
- setTenant,
135
131
  isAdmin,
136
132
  error_catcher(async (req, res) => {
137
133
  const isRoot = db.getTenantSchema() === db.connectObj.default_schema;
@@ -156,7 +152,6 @@ router.get(
156
152
  */
157
153
  router.post(
158
154
  "/",
159
- setTenant,
160
155
  isAdmin,
161
156
  error_catcher(async (req, res) => {
162
157
  const form = await site_id_form(req);
@@ -189,7 +184,6 @@ router.post(
189
184
  */
190
185
  router.get(
191
186
  "/email",
192
- setTenant,
193
187
  isAdmin,
194
188
  error_catcher(async (req, res) => {
195
189
  const form = await email_form(req);
@@ -223,7 +217,6 @@ router.get(
223
217
  */
224
218
  router.get(
225
219
  "/send-test-email",
226
- setTenant,
227
220
  isAdmin,
228
221
  error_catcher(async (req, res) => {
229
222
  const from = getState().getConfig("email_from");
@@ -254,7 +247,6 @@ router.get(
254
247
  */
255
248
  router.post(
256
249
  "/email",
257
- setTenant,
258
250
  isAdmin,
259
251
  error_catcher(async (req, res) => {
260
252
  const form = await email_form(req);
@@ -285,7 +277,6 @@ router.post(
285
277
  */
286
278
  router.get(
287
279
  "/backup",
288
- setTenant,
289
280
  isAdmin,
290
281
  error_catcher(async (req, res) => {
291
282
  send_admin_page({
@@ -330,7 +321,6 @@ router.get(
330
321
  */
331
322
  router.get(
332
323
  "/system",
333
- setTenant,
334
324
  isAdmin,
335
325
  error_catcher(async (req, res) => {
336
326
  const isRoot = db.getTenantSchema() === db.connectObj.default_schema;
@@ -450,7 +440,6 @@ router.get(
450
440
  */
451
441
  router.post(
452
442
  "/restart",
453
- setTenant,
454
443
  isAdmin,
455
444
  error_catcher(async (req, res) => {
456
445
  if (db.getTenantSchema() === db.connectObj.default_schema) {
@@ -473,7 +462,6 @@ router.post(
473
462
  */
474
463
  router.post(
475
464
  "/upgrade",
476
- setTenant,
477
465
  isAdmin,
478
466
  error_catcher(async (req, res) => {
479
467
  if (db.getTenantSchema() !== db.connectObj.default_schema) {
@@ -510,7 +498,6 @@ router.post(
510
498
  */
511
499
  router.post(
512
500
  "/backup",
513
- setTenant,
514
501
  isAdmin,
515
502
  error_catcher(async (req, res) => {
516
503
  const fileName = await create_backup();
@@ -531,7 +518,6 @@ router.post(
531
518
  */
532
519
  router.post(
533
520
  "/restore",
534
- setTenant,
535
521
  isAdmin,
536
522
  error_catcher(async (req, res) => {
537
523
  const newPath = File.get_new_path();
@@ -547,7 +533,7 @@ router.post(
547
533
  );
548
534
 
549
535
  /**
550
- * @param {object} req
536
+ * @param {object} req
551
537
  * @returns {Form}
552
538
  */
553
539
  const clearAllForm = (req) =>
@@ -628,7 +614,6 @@ const clearAllForm = (req) =>
628
614
  */
629
615
  router.post(
630
616
  "/enable-letsencrypt",
631
- setTenant,
632
617
  isAdmin,
633
618
  error_catcher(async (req, res) => {
634
619
  if (db.getTenantSchema() === db.connectObj.default_schema) {
@@ -706,7 +691,6 @@ router.post(
706
691
  */
707
692
  router.get(
708
693
  "/clear-all",
709
- setTenant,
710
694
  isAdmin,
711
695
  error_catcher(async (req, res) => {
712
696
  res.sendWrap(req.__(`Admin`), {
@@ -736,7 +720,6 @@ router.get(
736
720
  */
737
721
  router.post(
738
722
  "/clear-all",
739
- setTenant,
740
723
  isAdmin,
741
724
  error_catcher(async (req, res) => {
742
725
  const form = clearAllForm(req);
@@ -746,7 +729,7 @@ router.post(
746
729
  await db.deleteWhere("_sc_pages");
747
730
  }
748
731
  if (form.values.views) {
749
- await db.deleteWhere("_sc_views");
732
+ await View.delete({});
750
733
  }
751
734
  //user fields
752
735
  const users = await Table.findOne({ name: "users" });