@alfresco/aca-shared 1.12.0 → 4.0.0-4895233349

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 (321) hide show
  1. package/README.md +7 -6
  2. package/esm2020/alfresco-aca-shared.mjs +5 -0
  3. package/esm2020/lib/adf-extensions/extensions-data-loader.guard.mjs +73 -0
  4. package/esm2020/lib/components/document-base-page/document-base-page.component.mjs +176 -0
  5. package/esm2020/lib/components/document-base-page/document-base-page.service.mjs +26 -0
  6. package/esm2020/lib/components/generic-error/generic-error.component.mjs +41 -0
  7. package/esm2020/lib/components/generic-error/generic-error.module.mjs +44 -0
  8. package/esm2020/lib/components/info-drawer/info-drawer.component.mjs +123 -0
  9. package/esm2020/lib/components/info-drawer/shared-info-drawer.module.mjs +46 -0
  10. package/esm2020/lib/components/locked-by/locked-by.component.mjs +52 -0
  11. package/esm2020/lib/components/locked-by/locked-by.module.mjs +44 -0
  12. package/esm2020/lib/components/open-in-app/open-in-app.component.mjs +58 -0
  13. package/esm2020/lib/components/page-layout/page-layout-content.component.mjs +48 -0
  14. package/esm2020/lib/components/page-layout/page-layout-error.component.mjs +40 -0
  15. package/esm2020/lib/components/page-layout/page-layout-header.component.mjs +40 -0
  16. package/esm2020/lib/components/page-layout/page-layout.component.mjs +57 -0
  17. package/esm2020/lib/components/page-layout/page-layout.module.mjs +47 -0
  18. package/esm2020/lib/components/tool-bar/shared-toolbar.module.mjs +46 -0
  19. package/esm2020/lib/components/tool-bar/toolbar-action/toolbar-action.component.mjs +59 -0
  20. package/esm2020/lib/components/tool-bar/toolbar-button/toolbar-button.component.mjs +69 -0
  21. package/esm2020/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.mjs +82 -0
  22. package/esm2020/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.mjs +68 -0
  23. package/esm2020/lib/directives/contextmenu/contextmenu.directive.mjs +106 -0
  24. package/esm2020/lib/directives/contextmenu/contextmenu.module.mjs +42 -0
  25. package/esm2020/lib/directives/pagination.directive.mjs +54 -0
  26. package/esm2020/lib/directives/shared.directives.module.mjs +41 -0
  27. package/esm2020/lib/models/modal-configuration.mjs +25 -0
  28. package/esm2020/lib/models/types.mjs +25 -0
  29. package/esm2020/lib/models/viewer.rules.mjs +25 -0
  30. package/esm2020/lib/routing/shared.guard.mjs +48 -0
  31. package/esm2020/lib/services/aca-file-auto-download.service.mjs +55 -0
  32. package/esm2020/lib/services/aca-mobile-app-switcher.service.mjs +107 -0
  33. package/esm2020/lib/services/alfresco-office-extension.service.mjs +63 -0
  34. package/esm2020/lib/services/app-hook.service.mjs +87 -0
  35. package/esm2020/lib/services/app.extension.service.mjs +444 -0
  36. package/esm2020/lib/services/app.service.mjs +223 -0
  37. package/esm2020/lib/services/content-api.service.mjs +266 -0
  38. package/esm2020/lib/services/node-permission.service.mjs +89 -0
  39. package/esm2020/lib/services/router.extension.service.mjs +105 -0
  40. package/esm2020/lib/shared.module.mjs +54 -0
  41. package/esm2020/lib/testing/lib-testing-module.mjs +115 -0
  42. package/esm2020/lib/utils/node.utils.mjs +42 -0
  43. package/esm2020/public-api.mjs +62 -0
  44. package/esm2020/rules/alfresco-aca-shared-rules.mjs +5 -0
  45. package/esm2020/rules/app.rules.mjs +526 -0
  46. package/esm2020/rules/navigation.rules.mjs +156 -0
  47. package/esm2020/rules/public-api.mjs +28 -0
  48. package/esm2020/rules/repository.rules.mjs +33 -0
  49. package/esm2020/rules/user.rules.mjs +29 -0
  50. package/esm2020/store/actions/app-action-types.mjs +46 -0
  51. package/esm2020/store/actions/app.actions.mjs +128 -0
  52. package/esm2020/store/actions/context-menu-action-types.mjs +28 -0
  53. package/esm2020/store/actions/contextmenu.actions.mjs +31 -0
  54. package/esm2020/store/actions/library.actions.mjs +63 -0
  55. package/esm2020/store/actions/metadata-aspect.actions.mjs +31 -0
  56. package/esm2020/store/actions/node.actions.mjs +188 -0
  57. package/esm2020/store/actions/router-action-types.mjs +32 -0
  58. package/esm2020/store/actions/router.actions.mjs +54 -0
  59. package/esm2020/store/actions/search.actions.mjs +41 -0
  60. package/esm2020/store/actions/snackbar.actions.mjs +57 -0
  61. package/esm2020/store/actions/template-action-types.mjs +31 -0
  62. package/esm2020/store/actions/template.actions.mjs +47 -0
  63. package/esm2020/store/actions/upload.actions.mjs +49 -0
  64. package/esm2020/store/actions/viewer.actions.mjs +81 -0
  65. package/esm2020/store/alfresco-aca-shared-store.mjs +5 -0
  66. package/esm2020/store/effects/dialog.effects.mjs +44 -0
  67. package/esm2020/store/effects/router.effects.mjs +116 -0
  68. package/esm2020/store/effects/snackbar.effects.mjs +85 -0
  69. package/esm2020/store/models/delete-status.model.mjs +25 -0
  70. package/esm2020/store/models/deleted-node-info.model.mjs +25 -0
  71. package/esm2020/store/models/modal-configuration.mjs +25 -0
  72. package/esm2020/store/models/node-info.model.mjs +25 -0
  73. package/esm2020/store/models/search-option.model.mjs +30 -0
  74. package/esm2020/store/public-api.mjs +49 -0
  75. package/esm2020/store/selectors/app.selectors.mjs +56 -0
  76. package/esm2020/store/states/app.state.mjs +26 -0
  77. package/esm2020/store/store.module.mjs +42 -0
  78. package/fesm2015/alfresco-aca-shared-rules.mjs +775 -0
  79. package/fesm2015/alfresco-aca-shared-rules.mjs.map +1 -0
  80. package/fesm2015/alfresco-aca-shared-store.mjs +1300 -0
  81. package/fesm2015/alfresco-aca-shared-store.mjs.map +1 -0
  82. package/fesm2015/alfresco-aca-shared.mjs +2902 -0
  83. package/fesm2015/alfresco-aca-shared.mjs.map +1 -0
  84. package/fesm2020/alfresco-aca-shared-rules.mjs +771 -0
  85. package/fesm2020/alfresco-aca-shared-rules.mjs.map +1 -0
  86. package/fesm2020/alfresco-aca-shared-store.mjs +1376 -0
  87. package/fesm2020/alfresco-aca-shared-store.mjs.map +1 -0
  88. package/fesm2020/alfresco-aca-shared.mjs +3049 -0
  89. package/fesm2020/alfresco-aca-shared.mjs.map +1 -0
  90. package/{rules/alfresco-aca-shared-rules.d.ts → index.d.ts} +1 -0
  91. package/lib/adf-extensions/extensions-data-loader.guard.d.ts +9 -7
  92. package/lib/components/document-base-page/document-base-page.component.d.ts +76 -0
  93. package/lib/components/document-base-page/document-base-page.service.d.ts +28 -0
  94. package/lib/components/generic-error/generic-error.component.d.ts +3 -24
  95. package/lib/components/generic-error/generic-error.module.d.ts +8 -24
  96. package/lib/components/info-drawer/info-drawer.component.d.ts +11 -6
  97. package/lib/components/info-drawer/shared-info-drawer.module.d.ts +11 -24
  98. package/lib/components/locked-by/locked-by.component.d.ts +5 -30
  99. package/lib/components/locked-by/locked-by.module.d.ts +8 -24
  100. package/lib/components/open-in-app/open-in-app.component.d.ts +16 -0
  101. package/lib/components/page-layout/page-layout-content.component.d.ts +3 -24
  102. package/lib/components/page-layout/page-layout-error.component.d.ts +3 -24
  103. package/lib/components/page-layout/page-layout-header.component.d.ts +3 -24
  104. package/lib/components/page-layout/page-layout.component.d.ts +18 -7
  105. package/lib/components/page-layout/page-layout.module.d.ts +12 -24
  106. package/lib/components/tool-bar/shared-toolbar.module.d.ts +11 -24
  107. package/lib/components/tool-bar/toolbar-action/toolbar-action.component.d.ts +16 -8
  108. package/lib/components/tool-bar/toolbar-button/toolbar-button.component.d.ts +10 -25
  109. package/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.d.ts +25 -12
  110. package/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.d.ts +7 -27
  111. package/lib/directives/contextmenu/contextmenu.directive.d.ts +10 -7
  112. package/lib/directives/contextmenu/contextmenu.module.d.ts +5 -24
  113. package/lib/directives/pagination.directive.d.ts +8 -6
  114. package/lib/directives/shared.directives.module.d.ts +6 -24
  115. package/lib/models/modal-configuration.d.ts +26 -0
  116. package/lib/models/types.d.ts +5 -6
  117. package/lib/models/viewer.rules.d.ts +9 -6
  118. package/lib/routing/shared.guard.d.ts +5 -26
  119. package/lib/services/aca-file-auto-download.service.d.ts +13 -0
  120. package/lib/services/aca-mobile-app-switcher.service.d.ts +48 -0
  121. package/lib/services/alfresco-office-extension.service.d.ts +11 -0
  122. package/lib/services/app-hook.service.d.ts +55 -0
  123. package/lib/services/app.extension.service.d.ts +31 -53
  124. package/lib/services/app.service.d.ts +52 -13
  125. package/lib/services/content-api.service.d.ts +35 -25
  126. package/lib/services/node-permission.service.d.ts +3 -24
  127. package/lib/services/router.extension.service.d.ts +21 -0
  128. package/lib/shared.module.d.ts +16 -7
  129. package/lib/testing/lib-testing-module.d.ts +41 -0
  130. package/lib/utils/node.utils.d.ts +5 -6
  131. package/package.json +61 -21
  132. package/public-api.d.ts +24 -11
  133. package/rules/app.rules.d.ts +128 -36
  134. package/{store/alfresco-aca-shared-store.d.ts → rules/index.d.ts} +1 -0
  135. package/rules/navigation.rules.d.ts +12 -12
  136. package/rules/public-api.d.ts +5 -6
  137. package/rules/repository.rules.d.ts +7 -7
  138. package/rules/user.rules.d.ts +6 -7
  139. package/store/actions/app-action-types.d.ts +44 -0
  140. package/store/actions/app.actions.d.ts +30 -29
  141. package/store/actions/context-menu-action-types.d.ts +26 -0
  142. package/store/actions/contextmenu.actions.d.ts +6 -9
  143. package/store/actions/library.actions.d.ts +8 -7
  144. package/store/actions/metadata-aspect.actions.d.ts +5 -6
  145. package/store/actions/node.actions.d.ts +38 -13
  146. package/store/actions/router-action-types.d.ts +30 -0
  147. package/store/actions/router.actions.d.ts +10 -12
  148. package/store/actions/search.actions.d.ts +11 -19
  149. package/store/actions/snackbar.actions.d.ts +13 -17
  150. package/store/actions/template-action-types.d.ts +29 -0
  151. package/store/actions/template.actions.d.ts +6 -12
  152. package/store/actions/upload.actions.d.ts +8 -7
  153. package/store/actions/viewer.actions.d.ts +27 -7
  154. package/store/effects/dialog.effects.d.ts +9 -7
  155. package/store/effects/router.effects.d.ts +11 -29
  156. package/store/effects/snackbar.effects.d.ts +11 -9
  157. package/store/index.d.ts +5 -0
  158. package/store/models/delete-status.model.d.ts +5 -6
  159. package/store/models/deleted-node-info.model.d.ts +5 -6
  160. package/store/models/modal-configuration.d.ts +26 -0
  161. package/store/models/node-info.model.d.ts +5 -6
  162. package/store/models/search-option.model.d.ts +5 -6
  163. package/store/public-api.d.ts +9 -6
  164. package/store/selectors/app.selectors.d.ts +35 -25
  165. package/store/states/app.state.d.ts +14 -10
  166. package/store/store.module.d.ts +5 -24
  167. package/alfresco-aca-shared.d.ts +0 -11
  168. package/alfresco-aca-shared.metadata.json +0 -1
  169. package/bundles/alfresco-aca-shared-rules.umd.js +0 -895
  170. package/bundles/alfresco-aca-shared-rules.umd.js.map +0 -1
  171. package/bundles/alfresco-aca-shared-rules.umd.min.js +0 -75
  172. package/bundles/alfresco-aca-shared-rules.umd.min.js.map +0 -1
  173. package/bundles/alfresco-aca-shared-store.umd.js +0 -1399
  174. package/bundles/alfresco-aca-shared-store.umd.js.map +0 -1
  175. package/bundles/alfresco-aca-shared-store.umd.min.js +0 -26
  176. package/bundles/alfresco-aca-shared-store.umd.min.js.map +0 -1
  177. package/bundles/alfresco-aca-shared.umd.js +0 -2845
  178. package/bundles/alfresco-aca-shared.umd.js.map +0 -1
  179. package/bundles/alfresco-aca-shared.umd.min.js +0 -27
  180. package/bundles/alfresco-aca-shared.umd.min.js.map +0 -1
  181. package/esm2015/alfresco-aca-shared.js +0 -16
  182. package/esm2015/lib/adf-extensions/extensions-data-loader.guard.js +0 -106
  183. package/esm2015/lib/components/generic-error/generic-error.component.js +0 -52
  184. package/esm2015/lib/components/generic-error/generic-error.module.js +0 -43
  185. package/esm2015/lib/components/info-drawer/info-drawer.component.js +0 -179
  186. package/esm2015/lib/components/info-drawer/shared-info-drawer.module.js +0 -52
  187. package/esm2015/lib/components/locked-by/locked-by.component.js +0 -74
  188. package/esm2015/lib/components/locked-by/locked-by.module.js +0 -42
  189. package/esm2015/lib/components/page-layout/page-layout-content.component.js +0 -53
  190. package/esm2015/lib/components/page-layout/page-layout-error.component.js +0 -43
  191. package/esm2015/lib/components/page-layout/page-layout-header.component.js +0 -41
  192. package/esm2015/lib/components/page-layout/page-layout.component.js +0 -52
  193. package/esm2015/lib/components/page-layout/page-layout.module.js +0 -54
  194. package/esm2015/lib/components/tool-bar/shared-toolbar.module.js +0 -56
  195. package/esm2015/lib/components/tool-bar/toolbar-action/toolbar-action.component.js +0 -81
  196. package/esm2015/lib/components/tool-bar/toolbar-button/toolbar-button.component.js +0 -96
  197. package/esm2015/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.js +0 -69
  198. package/esm2015/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.js +0 -95
  199. package/esm2015/lib/directives/contextmenu/contextmenu.directive.js +0 -156
  200. package/esm2015/lib/directives/contextmenu/contextmenu.module.js +0 -42
  201. package/esm2015/lib/directives/pagination.directive.js +0 -93
  202. package/esm2015/lib/directives/shared.directives.module.js +0 -41
  203. package/esm2015/lib/models/types.js +0 -67
  204. package/esm2015/lib/models/viewer.rules.js +0 -40
  205. package/esm2015/lib/routing/app.routes.strategy.js +0 -207
  206. package/esm2015/lib/routing/shared.guard.js +0 -70
  207. package/esm2015/lib/services/app.extension.service.js +0 -686
  208. package/esm2015/lib/services/app.service.js +0 -95
  209. package/esm2015/lib/services/content-api.service.js +0 -331
  210. package/esm2015/lib/services/node-permission.service.js +0 -133
  211. package/esm2015/lib/shared.module.js +0 -51
  212. package/esm2015/lib/utils/node.utils.js +0 -53
  213. package/esm2015/public-api.js +0 -53
  214. package/esm2015/rules/alfresco-aca-shared-rules.js +0 -9
  215. package/esm2015/rules/app.rules.js +0 -563
  216. package/esm2015/rules/navigation.rules.js +0 -211
  217. package/esm2015/rules/public-api.js +0 -33
  218. package/esm2015/rules/repository.rules.js +0 -38
  219. package/esm2015/rules/user.rules.js +0 -38
  220. package/esm2015/store/actions/app.actions.js +0 -234
  221. package/esm2015/store/actions/contextmenu.actions.js +0 -49
  222. package/esm2015/store/actions/library.actions.js +0 -111
  223. package/esm2015/store/actions/metadata-aspect.actions.js +0 -46
  224. package/esm2015/store/actions/node.actions.js +0 -337
  225. package/esm2015/store/actions/router.actions.js +0 -97
  226. package/esm2015/store/actions/search.actions.js +0 -83
  227. package/esm2015/store/actions/snackbar.actions.js +0 -138
  228. package/esm2015/store/actions/template.actions.js +0 -85
  229. package/esm2015/store/actions/upload.actions.js +0 -81
  230. package/esm2015/store/actions/viewer.actions.js +0 -115
  231. package/esm2015/store/alfresco-aca-shared-store.js +0 -9
  232. package/esm2015/store/effects/dialog.effects.js +0 -72
  233. package/esm2015/store/effects/router.effects.js +0 -192
  234. package/esm2015/store/effects/snackbar.effects.js +0 -144
  235. package/esm2015/store/models/delete-status.model.js +0 -55
  236. package/esm2015/store/models/deleted-node-info.model.js +0 -41
  237. package/esm2015/store/models/node-info.model.js +0 -45
  238. package/esm2015/store/models/search-option.model.js +0 -52
  239. package/esm2015/store/public-api.js +0 -50
  240. package/esm2015/store/selectors/app.selectors.js +0 -82
  241. package/esm2015/store/states/app.state.js +0 -71
  242. package/esm2015/store/store.module.js +0 -43
  243. package/esm5/alfresco-aca-shared.js +0 -16
  244. package/esm5/lib/adf-extensions/extensions-data-loader.guard.js +0 -115
  245. package/esm5/lib/components/generic-error/generic-error.component.js +0 -54
  246. package/esm5/lib/components/generic-error/generic-error.module.js +0 -47
  247. package/esm5/lib/components/info-drawer/info-drawer.component.js +0 -209
  248. package/esm5/lib/components/info-drawer/shared-info-drawer.module.js +0 -56
  249. package/esm5/lib/components/locked-by/locked-by.component.js +0 -80
  250. package/esm5/lib/components/locked-by/locked-by.module.js +0 -46
  251. package/esm5/lib/components/page-layout/page-layout-content.component.js +0 -53
  252. package/esm5/lib/components/page-layout/page-layout-error.component.js +0 -45
  253. package/esm5/lib/components/page-layout/page-layout-header.component.js +0 -45
  254. package/esm5/lib/components/page-layout/page-layout.component.js +0 -54
  255. package/esm5/lib/components/page-layout/page-layout.module.js +0 -58
  256. package/esm5/lib/components/tool-bar/shared-toolbar.module.js +0 -60
  257. package/esm5/lib/components/tool-bar/toolbar-action/toolbar-action.component.js +0 -88
  258. package/esm5/lib/components/tool-bar/toolbar-button/toolbar-button.component.js +0 -103
  259. package/esm5/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.js +0 -80
  260. package/esm5/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.js +0 -103
  261. package/esm5/lib/directives/contextmenu/contextmenu.directive.js +0 -187
  262. package/esm5/lib/directives/contextmenu/contextmenu.module.js +0 -46
  263. package/esm5/lib/directives/pagination.directive.js +0 -97
  264. package/esm5/lib/directives/shared.directives.module.js +0 -45
  265. package/esm5/lib/models/types.js +0 -67
  266. package/esm5/lib/models/viewer.rules.js +0 -40
  267. package/esm5/lib/routing/app.routes.strategy.js +0 -268
  268. package/esm5/lib/routing/shared.guard.js +0 -77
  269. package/esm5/lib/services/app.extension.service.js +0 -835
  270. package/esm5/lib/services/app.service.js +0 -100
  271. package/esm5/lib/services/content-api.service.js +0 -495
  272. package/esm5/lib/services/node-permission.service.js +0 -161
  273. package/esm5/lib/shared.module.js +0 -58
  274. package/esm5/lib/utils/node.utils.js +0 -53
  275. package/esm5/public-api.js +0 -53
  276. package/esm5/rules/alfresco-aca-shared-rules.js +0 -9
  277. package/esm5/rules/app.rules.js +0 -563
  278. package/esm5/rules/navigation.rules.js +0 -211
  279. package/esm5/rules/public-api.js +0 -33
  280. package/esm5/rules/repository.rules.js +0 -38
  281. package/esm5/rules/user.rules.js +0 -38
  282. package/esm5/store/actions/app.actions.js +0 -232
  283. package/esm5/store/actions/contextmenu.actions.js +0 -48
  284. package/esm5/store/actions/library.actions.js +0 -108
  285. package/esm5/store/actions/metadata-aspect.actions.js +0 -45
  286. package/esm5/store/actions/node.actions.js +0 -322
  287. package/esm5/store/actions/router.actions.js +0 -93
  288. package/esm5/store/actions/search.actions.js +0 -87
  289. package/esm5/store/actions/snackbar.actions.js +0 -130
  290. package/esm5/store/actions/template.actions.js +0 -87
  291. package/esm5/store/actions/upload.actions.js +0 -78
  292. package/esm5/store/actions/viewer.actions.js +0 -109
  293. package/esm5/store/alfresco-aca-shared-store.js +0 -9
  294. package/esm5/store/effects/dialog.effects.js +0 -71
  295. package/esm5/store/effects/router.effects.js +0 -207
  296. package/esm5/store/effects/snackbar.effects.js +0 -154
  297. package/esm5/store/models/delete-status.model.js +0 -55
  298. package/esm5/store/models/deleted-node-info.model.js +0 -41
  299. package/esm5/store/models/node-info.model.js +0 -45
  300. package/esm5/store/models/search-option.model.js +0 -52
  301. package/esm5/store/public-api.js +0 -50
  302. package/esm5/store/selectors/app.selectors.js +0 -82
  303. package/esm5/store/states/app.state.js +0 -71
  304. package/esm5/store/store.module.js +0 -47
  305. package/fesm2015/alfresco-aca-shared-rules.js +0 -827
  306. package/fesm2015/alfresco-aca-shared-rules.js.map +0 -1
  307. package/fesm2015/alfresco-aca-shared-store.js +0 -1354
  308. package/fesm2015/alfresco-aca-shared-store.js.map +0 -1
  309. package/fesm2015/alfresco-aca-shared.js +0 -2096
  310. package/fesm2015/alfresco-aca-shared.js.map +0 -1
  311. package/fesm5/alfresco-aca-shared-rules.js +0 -827
  312. package/fesm5/alfresco-aca-shared-rules.js.map +0 -1
  313. package/fesm5/alfresco-aca-shared-store.js +0 -1278
  314. package/fesm5/alfresco-aca-shared-store.js.map +0 -1
  315. package/fesm5/alfresco-aca-shared.js +0 -2637
  316. package/fesm5/alfresco-aca-shared.js.map +0 -1
  317. package/lib/routing/app.routes.strategy.d.ts +0 -40
  318. package/rules/alfresco-aca-shared-rules.metadata.json +0 -1
  319. package/rules/package.json +0 -13
  320. package/store/alfresco-aca-shared-store.metadata.json +0 -1
  321. package/store/package.json +0 -13
@@ -1,827 +0,0 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
- /*!
6
- * @license
7
- * Alfresco Example Content Application
8
- *
9
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
10
- *
11
- * This file is part of the Alfresco Example Content Application.
12
- * If the software was purchased under a paid Alfresco license, the terms of
13
- * the paid license agreement will prevail. Otherwise, the software is
14
- * provided under the following open source license terms:
15
- *
16
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
17
- * it under the terms of the GNU Lesser General Public License as published by
18
- * the Free Software Foundation, either version 3 of the License, or
19
- * (at your option) any later version.
20
- *
21
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
22
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
- * GNU Lesser General Public License for more details.
25
- *
26
- * You should have received a copy of the GNU Lesser General Public License
27
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
28
- */
29
- /**
30
- * Checks if a Preview route is activated.
31
- * JSON ref: `app.navigation.isPreview`
32
- * @param {?} context
33
- * @return {?}
34
- */
35
- function isPreview(context) {
36
- var url = context.navigation.url;
37
- return (url &&
38
- (url.includes('/preview/') ||
39
- url.includes('viewer:view') ||
40
- url.includes('/view/')));
41
- }
42
- /**
43
- * Checks if a **Favorites** route is activated.
44
- * JSON ref: `app.navigation.isFavorites`
45
- * @param {?} context
46
- * @return {?}
47
- */
48
- function isFavorites(context) {
49
- var url = context.navigation.url;
50
- return url && url.startsWith('/favorites') && !isPreview(context);
51
- }
52
- /**
53
- * Checks if the activated route is not **Favorites**.
54
- * JSON ref: `app.navigation.isNotFavorites`
55
- * @param {?} context
56
- * @return {?}
57
- */
58
- function isNotFavorites(context) {
59
- return !isFavorites(context);
60
- }
61
- /**
62
- * Checks if a **Shared Files** route is activated.
63
- * JSON ref: `app.navigation.isSharedFiles`
64
- * @param {?} context
65
- * @return {?}
66
- */
67
- function isSharedFiles(context) {
68
- var url = context.navigation.url;
69
- return url && url.startsWith('/shared') && !isPreview(context);
70
- }
71
- /**
72
- * Checks if the activated route is not **Shared Files**.
73
- * JSON ref: `app.navigation.isNotSharedFiles`
74
- * @param {?} context
75
- * @return {?}
76
- */
77
- function isNotSharedFiles(context) {
78
- return !isSharedFiles(context);
79
- }
80
- /**
81
- * Checks if a **Trashcan** route is activated.
82
- * JSON ref: `app.navigation.isTrashcan`
83
- * @param {?} context
84
- * @return {?}
85
- */
86
- function isTrashcan(context) {
87
- var url = context.navigation.url;
88
- return url && url.startsWith('/trashcan');
89
- }
90
- /**
91
- * Checks if the activated route is not **Trashcan**.
92
- * JSON ref: `app.navigation.isNotTrashcan`
93
- * @param {?} context
94
- * @return {?}
95
- */
96
- function isNotTrashcan(context) {
97
- return !isTrashcan(context);
98
- }
99
- /**
100
- * Checks if a **Personal Files** route is activated.
101
- * JSON ref: `app.navigation.isPersonalFiles`
102
- * @param {?} context
103
- * @return {?}
104
- */
105
- function isPersonalFiles(context) {
106
- var url = context.navigation.url;
107
- return url && url.startsWith('/personal-files');
108
- }
109
- /**
110
- * Checks if a **Library Files** route is activated.
111
- * JSON ref: `app.navigation.isLibraryFiles`
112
- * @param {?} context
113
- * @return {?}
114
- */
115
- function isLibraryFiles(context) {
116
- var url = context.navigation.url;
117
- return url && url.startsWith('/libraries');
118
- }
119
- /**
120
- * Checks if a **Library Files** or **Library Search Result** route is activated.
121
- * JSON ref: `app.navigation.isLibraryFiles`
122
- * @param {?} context
123
- * @return {?}
124
- */
125
- function isLibraries(context) {
126
- var url = context.navigation.url;
127
- return (url && (url.endsWith('/libraries') || url.startsWith('/search-libraries')));
128
- }
129
- /**
130
- * Checks if the activated route is neither **Libraries** nor **Library Search Results**.
131
- * JSON ref: `app.navigation.isNotLibraries`
132
- * @param {?} context
133
- * @return {?}
134
- */
135
- function isNotLibraries(context) {
136
- return !isLibraries(context);
137
- }
138
- /**
139
- * Checks if a **Recent Files** route is activated.
140
- * JSON ref: `app.navigation.isRecentFiles`
141
- * @param {?} context
142
- * @return {?}
143
- */
144
- function isRecentFiles(context) {
145
- var url = context.navigation.url;
146
- return url && url.startsWith('/recent-files');
147
- }
148
- /**
149
- * Checks if the activated route is not **Recent Files**.
150
- * JSON ref: `app.navigation.isNotRecentFiles`
151
- * @param {?} context
152
- * @return {?}
153
- */
154
- function isNotRecentFiles(context) {
155
- return !isRecentFiles(context);
156
- }
157
- /**
158
- * Checks if a **Search Results** route is activated.
159
- * JSON ref: `app.navigation.isSearchResults`
160
- * @param {?} context
161
- * @return {?}
162
- */
163
- function isSearchResults(context /*,
164
- ...args: RuleParameter[]*/) {
165
- var url = context.navigation.url;
166
- return url && url.startsWith('/search');
167
- }
168
- /**
169
- * Checks if the activated route is not **Search Results**.
170
- * JSON ref: `app.navigation.isNotSearchResults`
171
- * @param {?} context
172
- * @return {?}
173
- */
174
- function isNotSearchResults(context) {
175
- return !isSearchResults(context);
176
- }
177
- /**
178
- * Checks if a **Shared Preview** route is activated.
179
- * JSON ref: `app.navigation.isSharedPreview`
180
- * @param {?} context
181
- * @return {?}
182
- */
183
- function isSharedPreview(context) {
184
- var url = context.navigation.url;
185
- return (url &&
186
- (url.startsWith('/shared/preview/') ||
187
- (url.startsWith('/shared') && url.includes('viewer:view'))));
188
- }
189
- /**
190
- * Checks if a **Favorites Preview** route is activated.
191
- * JSON ref: `app.navigation.isFavoritesPreview`
192
- * @param {?} context
193
- * @return {?}
194
- */
195
- function isFavoritesPreview(context) {
196
- var url = context.navigation.url;
197
- return (url &&
198
- (url.startsWith('/favorites/preview/') ||
199
- (url.startsWith('/favorites') && url.includes('viewer:view'))));
200
- }
201
- /**
202
- * Checks if a **Shared File Preview** route is activated.
203
- * JSON ref: `app.navigation.isFavoritesPreview`
204
- * @param {?} context
205
- * @return {?}
206
- */
207
- function isSharedFileViewer(context) {
208
- var url = context.navigation.url;
209
- return url && url.startsWith('/preview/s/');
210
- }
211
-
212
- /**
213
- * @fileoverview added by tsickle
214
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
215
- */
216
- /*!
217
- * @license
218
- * Alfresco Example Content Application
219
- *
220
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
221
- *
222
- * This file is part of the Alfresco Example Content Application.
223
- * If the software was purchased under a paid Alfresco license, the terms of
224
- * the paid license agreement will prevail. Otherwise, the software is
225
- * provided under the following open source license terms:
226
- *
227
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
228
- * it under the terms of the GNU Lesser General Public License as published by
229
- * the Free Software Foundation, either version 3 of the License, or
230
- * (at your option) any later version.
231
- *
232
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
233
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
234
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
235
- * GNU Lesser General Public License for more details.
236
- *
237
- * You should have received a copy of the GNU Lesser General Public License
238
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
239
- */
240
- /**
241
- * Checks if the quick share repository option is enabled or not.
242
- * JSON ref: `repository.isQuickShareEnabled`
243
- * @param {?} context
244
- * @return {?}
245
- */
246
- function hasQuickShareEnabled(context) {
247
- return context.repository.status.isQuickShareEnabled;
248
- }
249
-
250
- /**
251
- * @fileoverview added by tsickle
252
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
253
- */
254
- /**
255
- * Checks if user can copy selected node.
256
- * JSON ref: `app.canCopyNode`
257
- * @param {?} context Rule execution context
258
- * @return {?}
259
- */
260
- function canCopyNode(context) {
261
- return [
262
- hasSelection(context),
263
- isNotTrashcan(context),
264
- isNotLibraries(context)
265
- ].every(Boolean);
266
- }
267
- /**
268
- * Checks if user can mark selected nodes as **Favorite**.
269
- * JSON ref: `app.selection.canAddFavorite`
270
- * @param {?} context
271
- * @return {?}
272
- */
273
- function canAddFavorite(context) {
274
- if (!context.selection.isEmpty) {
275
- if (isFavorites(context) ||
276
- isLibraries(context) ||
277
- isTrashcan(context)) {
278
- return false;
279
- }
280
- return context.selection.nodes.some(function (node) { return !node.entry.isFavorite; });
281
- }
282
- return false;
283
- }
284
- /**
285
- * Checks if user can un-mark selected nodes as **Favorite**.
286
- * JSON ref: `app.selection.canRemoveFavorite`
287
- * @param {?} context
288
- * @return {?}
289
- */
290
- function canRemoveFavorite(context) {
291
- if (!context.selection.isEmpty && !isTrashcan(context)) {
292
- if (isFavorites(context)) {
293
- return true;
294
- }
295
- return context.selection.nodes.every(function (node) { return node.entry.isFavorite; });
296
- }
297
- return false;
298
- }
299
- /**
300
- * Checks if user can share selected file.
301
- * JSON ref: `app.selection.file.canShare`
302
- * @param {?} context
303
- * @return {?}
304
- */
305
- function canShareFile(context) {
306
- return [
307
- context.selection.file,
308
- isNotTrashcan(context),
309
- hasQuickShareEnabled(context),
310
- !isShared(context)
311
- ].every(Boolean);
312
- }
313
- /**
314
- * Checks if user can perform "Join" or "Cancel Join Request" on a library.
315
- * JSON ref: `canToggleJoinLibrary`
316
- * @param {?} context
317
- * @return {?}
318
- */
319
- function canToggleJoinLibrary(context) {
320
- return [
321
- hasLibrarySelected(context),
322
- !isPrivateLibrary(context),
323
- hasNoLibraryRole(context)
324
- ].every(Boolean);
325
- }
326
- /**
327
- * Checks if user can edit the selected folder.
328
- * JSON ref: `canEditFolder`
329
- * @param {?} context Rule execution context
330
- * @return {?}
331
- */
332
- function canEditFolder(context) {
333
- return [
334
- canUpdateSelectedFolder(context),
335
- isNotTrashcan(context)
336
- ].every(Boolean);
337
- }
338
- /**
339
- * Checks if the selected file is already shared.
340
- * JSON ref: `app.selection.file.isShared`
341
- * @param {?} context
342
- * @return {?}
343
- */
344
- function isShared(context) {
345
- if (isSharedFiles(context) && context.selection.file) {
346
- return true;
347
- }
348
- if ((isNotTrashcan(context),
349
- !context.selection.isEmpty && context.selection.file)) {
350
- return !!(context.selection.file.entry &&
351
- context.selection.file.entry.properties &&
352
- context.selection.file.entry.properties['qshare:sharedId']);
353
- }
354
- return false;
355
- }
356
- /**
357
- * Checks if user can delete selected nodes.
358
- * JSON ref: `app.selection.canDelete`
359
- * @param {?} context
360
- * @return {?}
361
- */
362
- function canDeleteSelection(context) {
363
- if (isNotTrashcan(context) &&
364
- isNotLibraries(context) &&
365
- isNotSearchResults(context) &&
366
- !context.selection.isEmpty) {
367
- if (hasLockedFiles(context)) {
368
- return false;
369
- }
370
- // temp workaround for Favorites api
371
- if (isFavorites(context)) {
372
- return true;
373
- }
374
- if (isPreview(context)) {
375
- return context.permissions.check(context.selection.nodes, ['delete']);
376
- }
377
- // workaround for Shared Files
378
- if (isSharedFiles(context)) {
379
- return context.permissions.check(context.selection.nodes, ['delete'], {
380
- target: 'allowableOperationsOnTarget'
381
- });
382
- }
383
- return context.permissions.check(context.selection.nodes, ['delete']);
384
- }
385
- return false;
386
- }
387
- /**
388
- * Checks if user can un-share selected nodes.
389
- * JSON ref: `app.selection.canUnshare`
390
- * @param {?} context
391
- * @return {?}
392
- */
393
- function canUnshareNodes(context) {
394
- if (!context.selection.isEmpty) {
395
- return context.permissions.check(context.selection.nodes, ['delete'], {
396
- target: 'allowableOperationsOnTarget'
397
- });
398
- }
399
- return false;
400
- }
401
- /**
402
- * Checks if user selected anything.
403
- * JSON ref: `app.selection.notEmpty`
404
- * @param {?} context
405
- * @return {?}
406
- */
407
- function hasSelection(context) {
408
- return !context.selection.isEmpty;
409
- }
410
- /**
411
- * Checks if user can create a new folder with current path.
412
- * JSON ref: `app.navigation.folder.canCreate`
413
- * @param {?} context
414
- * @return {?}
415
- */
416
- function canCreateFolder(context) {
417
- var currentFolder = context.navigation.currentFolder;
418
- if (currentFolder) {
419
- return context.permissions.check(currentFolder, ['create']);
420
- }
421
- return false;
422
- }
423
- /**
424
- * Checks if user can upload content to current folder.
425
- * JSON ref: `app.navigation.folder.canUpload`
426
- * @param {?} context
427
- * @return {?}
428
- */
429
- function canUpload(context) {
430
- var currentFolder = context.navigation.currentFolder;
431
- if (currentFolder) {
432
- return context.permissions.check(currentFolder, ['create']);
433
- }
434
- return false;
435
- }
436
- /**
437
- * Checks if user can download selected nodes (either files or folders).
438
- * JSON ref: `app.selection.canDownload`
439
- * @param {?} context
440
- * @return {?}
441
- */
442
- function canDownloadSelection(context) {
443
- if (!context.selection.isEmpty && isNotTrashcan(context)) {
444
- return context.selection.nodes.every(function (node) {
445
- return (node.entry &&
446
- (node.entry.isFile || node.entry.isFolder || !!node.entry.nodeId));
447
- });
448
- }
449
- return false;
450
- }
451
- /**
452
- * Checks if user has selected a folder.
453
- * JSON ref: `app.selection.folder`
454
- * @param {?} context
455
- * @return {?}
456
- */
457
- function hasFolderSelected(context) {
458
- /** @type {?} */
459
- var folder = context.selection.folder;
460
- return folder ? true : false;
461
- }
462
- /**
463
- * Checks if user has selected a library (site).
464
- * JSON ref: `app.selection.library`
465
- * @param {?} context
466
- * @return {?}
467
- */
468
- function hasLibrarySelected(context) {
469
- /** @type {?} */
470
- var library = context.selection.library;
471
- return library ? true : false;
472
- }
473
- /**
474
- * Checks if user has selected a **private** library (site)
475
- * JSON ref: `app.selection.isPrivateLibrary`
476
- * @param {?} context
477
- * @return {?}
478
- */
479
- function isPrivateLibrary(context) {
480
- /** @type {?} */
481
- var library = context.selection.library;
482
- return library
483
- ? !!(library.entry &&
484
- library.entry.visibility &&
485
- library.entry.visibility === 'PRIVATE')
486
- : false;
487
- }
488
- /**
489
- * Checks if the selected library has a **role** property defined.
490
- * JSON ref: `app.selection.hasLibraryRole`
491
- * @param {?} context
492
- * @return {?}
493
- */
494
- function hasLibraryRole(context) {
495
- /** @type {?} */
496
- var library = context.selection.library;
497
- return library ? !!(library.entry && library.entry.role) : false;
498
- }
499
- /**
500
- * Checks if the selected library has no **role** property defined.
501
- * JSON ref: `app.selection.hasNoLibraryRole`
502
- * @param {?} context
503
- * @return {?}
504
- */
505
- function hasNoLibraryRole(context) {
506
- return !hasLibraryRole(context);
507
- }
508
- /**
509
- * Checks if user has selected a file.
510
- * JSON ref: `app.selection.file`
511
- * @param {?} context
512
- * @return {?}
513
- */
514
- function hasFileSelected(context) {
515
- if (context && context.selection && context.selection.file) {
516
- return true;
517
- }
518
- return false;
519
- }
520
- /**
521
- * Checks if user can update the first selected node.
522
- * JSON ref: `app.selection.first.canUpdate`
523
- * @param {?} context
524
- * @return {?}
525
- */
526
- function canUpdateSelectedNode(context) {
527
- if (context.selection && !context.selection.isEmpty) {
528
- /** @type {?} */
529
- var node = context.selection.first;
530
- if (node.entry.isFile && hasLockedFiles(context)) {
531
- return false;
532
- }
533
- return context.permissions.check(node, ['update']);
534
- }
535
- return false;
536
- }
537
- /**
538
- * Checks if user can update the first selected folder.
539
- * JSON ref: `app.selection.folder.canUpdate`
540
- * @param {?} context
541
- * @return {?}
542
- */
543
- function canUpdateSelectedFolder(context) {
544
- var folder = context.selection.folder;
545
- if (folder) {
546
- return (
547
- // workaround for Favorites Api
548
- isFavorites(context) ||
549
- context.permissions.check(folder.entry, ['update']));
550
- }
551
- return false;
552
- }
553
- /**
554
- * Checks if user has selected a **locked** file node.
555
- * JSON ref: `app.selection.file.isLocked`
556
- * @param {?} context
557
- * @return {?}
558
- */
559
- function hasLockedFiles(context) {
560
- if (context && context.selection && context.selection.nodes) {
561
- return context.selection.nodes.some(function (node) {
562
- if (!node.entry.isFile) {
563
- return false;
564
- }
565
- return (node.entry.isLocked ||
566
- (node.entry.properties &&
567
- node.entry.properties['cm:lockType'] === 'READ_ONLY_LOCK'));
568
- });
569
- }
570
- return false;
571
- }
572
- /**
573
- * Checks if the selected file has **write** or **read-only** locks specified.
574
- * JSON ref: `app.selection.file.isLocked`
575
- * @param {?} context
576
- * @return {?}
577
- */
578
- function isWriteLocked(context) {
579
- return !!(context &&
580
- context.selection &&
581
- context.selection.file &&
582
- context.selection.file.entry &&
583
- context.selection.file.entry.properties &&
584
- (context.selection.file.entry.properties['cm:lockType'] === 'WRITE_LOCK' ||
585
- context.selection.file.entry.properties['cm:lockType'] ===
586
- 'READ_ONLY_LOCK'));
587
- }
588
- /**
589
- * Checks if the selected file has **write** or **read-only** locks specified,
590
- * and that current user is the owner of the lock.
591
- * JSON ref: `app.selection.file.isLockOwner`
592
- * @param {?} context
593
- * @return {?}
594
- */
595
- function isUserWriteLockOwner(context) {
596
- return (isWriteLocked(context) &&
597
- (context.selection.file.entry.properties['cm:lockOwner'] &&
598
- context.selection.file.entry.properties['cm:lockOwner'].id ===
599
- context.profile.id));
600
- }
601
- /**
602
- * Checks if user can lock selected file.
603
- * JSON ref: `app.selection.file.canLock`
604
- * @param {?} context
605
- * @return {?}
606
- */
607
- function canLockFile(context) {
608
- return !isWriteLocked(context) && canUpdateSelectedNode(context);
609
- }
610
- /**
611
- * Checks if user can unlock selected file.
612
- * JSON ref: `app.selection.file.canUnlock`
613
- * @param {?} context
614
- * @return {?}
615
- */
616
- function canUnlockFile(context) {
617
- var file = context.selection.file;
618
- return (isWriteLocked(context) &&
619
- (context.permissions.check(file.entry, ['delete']) ||
620
- isUserWriteLockOwner(context)));
621
- }
622
- /**
623
- * Checks if user can upload a new version of the file.
624
- * JSON ref: `app.selection.file.canUploadVersion`
625
- * @param {?} context
626
- * @return {?}
627
- */
628
- function canUploadVersion(context) {
629
- if (isFavorites(context) || isSharedFiles(context)) {
630
- return hasFileSelected(context);
631
- }
632
- return [
633
- hasFileSelected(context),
634
- isNotTrashcan(context),
635
- isWriteLocked(context)
636
- ? isUserWriteLockOwner(context)
637
- : canUpdateSelectedNode(context)
638
- ].every(Boolean);
639
- }
640
- /**
641
- * Checks if user has trashcan item selected.
642
- * JSON ref: `isTrashcanItemSelected`
643
- * @param {?} context Rule execution context
644
- * @return {?}
645
- */
646
- function isTrashcanItemSelected(context) {
647
- return [isTrashcan(context), hasSelection(context)].every(Boolean);
648
- }
649
- /**
650
- * Checks if user can view the file.
651
- * JSON ref: `canViewFile`
652
- * @param {?} context Rule execution context
653
- * @return {?}
654
- */
655
- function canViewFile(context) {
656
- return [hasFileSelected(context), isNotTrashcan(context)].every(Boolean);
657
- }
658
- /**
659
- * Checks if user can **Leave** selected library.
660
- * JSON ref: `canLeaveLibrary`
661
- * @param {?} context Rule execution context
662
- * @return {?}
663
- */
664
- function canLeaveLibrary(context) {
665
- return [hasLibrarySelected(context), hasLibraryRole(context)].every(Boolean);
666
- }
667
- /**
668
- * Checks if user can toggle shared link mode.
669
- * JSON ref: `canToggleSharedLink`
670
- * @param {?} context Rule execution context
671
- * @return {?}
672
- */
673
- function canToggleSharedLink(context) {
674
- return [
675
- hasFileSelected(context),
676
- [canShareFile(context), isShared(context)].some(Boolean)
677
- ].every(Boolean);
678
- }
679
- /**
680
- * Checks if user can show **Info Drawer** for the selected node.
681
- * JSON ref: `canShowInfoDrawer`
682
- * @param {?} context Rule execution context
683
- * @return {?}
684
- */
685
- function canShowInfoDrawer(context) {
686
- return [
687
- hasSelection(context),
688
- isNotLibraries(context),
689
- isNotTrashcan(context)
690
- ].every(Boolean);
691
- }
692
- /**
693
- * Checks if user can manage file versions for the selected node.
694
- * JSON ref: `canManageFileVersions`
695
- * @param {?} context Rule execution context
696
- * @return {?}
697
- */
698
- function canManageFileVersions(context) {
699
- return [
700
- hasFileSelected(context),
701
- isNotTrashcan(context),
702
- !hasLockedFiles(context)
703
- ].every(Boolean);
704
- }
705
- /**
706
- * Checks if user can manage permissions for the selected node.
707
- * JSON ref: `canManagePermissions`
708
- * @param {?} context Rule execution context
709
- * @return {?}
710
- */
711
- function canManagePermissions(context) {
712
- return [
713
- canUpdateSelectedNode(context),
714
- isNotTrashcan(context)
715
- ].every(Boolean);
716
- }
717
- /**
718
- * Checks if user can toggle **Edit Offline** mode for selected node.
719
- * JSON ref: `canToggleEditOffline`
720
- * @param {?} context Rule execution context
721
- * @return {?}
722
- */
723
- function canToggleEditOffline(context) {
724
- return [
725
- hasFileSelected(context),
726
- isNotTrashcan(context),
727
- canLockFile(context) || canUnlockFile(context)
728
- ].every(Boolean);
729
- }
730
- /**
731
- * @deprecated Uses workarounds for for recent files and search api issues.
732
- * Checks if user can toggle **Favorite** state for a node.
733
- * @param {?} context Rule execution context
734
- * @return {?}
735
- */
736
- function canToggleFavorite(context) {
737
- return [
738
- [canAddFavorite(context), canRemoveFavorite(context)].some(Boolean),
739
- [
740
- isRecentFiles(context),
741
- isSharedFiles(context),
742
- isSearchResults(context),
743
- isFavorites(context)
744
- ].some(Boolean)
745
- ].every(Boolean);
746
- }
747
- /**
748
- * Checks if application should render language picker menu.
749
- * JSON ref: `canShowLanguagePicker`
750
- * @param {?} context Rule execution context
751
- * @return {?}
752
- */
753
- function canShowLanguagePicker(context) {
754
- return context.languagePicker;
755
- }
756
- /**
757
- * Checks if application should render logout option.
758
- * JSON ref: `canShowLogout`
759
- * @param {?} context Rule execution context
760
- * @return {?}
761
- */
762
- function canShowLogout(context) {
763
- return !context.withCredentials;
764
- }
765
- /**
766
- * Checks if user is library manager
767
- * JSON ref: `isLibraryManager`
768
- * @param {?} context Rule execution context
769
- * @return {?}
770
- */
771
- function isLibraryManager(context) {
772
- return (hasLibrarySelected(context) &&
773
- context.selection.library.entry &&
774
- context.selection.library.entry.role === 'SiteManager');
775
- }
776
-
777
- /**
778
- * @fileoverview added by tsickle
779
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
780
- */
781
- /*!
782
- * @license
783
- * Alfresco Example Content Application
784
- *
785
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
786
- *
787
- * This file is part of the Alfresco Example Content Application.
788
- * If the software was purchased under a paid Alfresco license, the terms of
789
- * the paid license agreement will prevail. Otherwise, the software is
790
- * provided under the following open source license terms:
791
- *
792
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
793
- * it under the terms of the GNU Lesser General Public License as published by
794
- * the Free Software Foundation, either version 3 of the License, or
795
- * (at your option) any later version.
796
- *
797
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
798
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
799
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
800
- * GNU Lesser General Public License for more details.
801
- *
802
- * You should have received a copy of the GNU Lesser General Public License
803
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
804
- */
805
- /**
806
- * Checks if user is admin.
807
- * JSON ref: `user.isAdmin`
808
- * @param {?} context
809
- * @return {?}
810
- */
811
- function isAdmin(context) {
812
- return context.profile.isAdmin;
813
- }
814
-
815
- /**
816
- * @fileoverview added by tsickle
817
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
818
- */
819
-
820
- /**
821
- * @fileoverview added by tsickle
822
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
823
- */
824
-
825
- export { canCopyNode, canAddFavorite, canRemoveFavorite, canShareFile, canToggleJoinLibrary, canEditFolder, isShared, canDeleteSelection, canUnshareNodes, hasSelection, canCreateFolder, canUpload, canDownloadSelection, hasFolderSelected, hasLibrarySelected, isPrivateLibrary, hasLibraryRole, hasNoLibraryRole, hasFileSelected, canUpdateSelectedNode, canUpdateSelectedFolder, hasLockedFiles, isWriteLocked, isUserWriteLockOwner, canLockFile, canUnlockFile, canUploadVersion, isTrashcanItemSelected, canViewFile, canLeaveLibrary, canToggleSharedLink, canShowInfoDrawer, canManageFileVersions, canManagePermissions, canToggleEditOffline, canToggleFavorite, canShowLanguagePicker, canShowLogout, isLibraryManager, isPreview, isFavorites, isNotFavorites, isSharedFiles, isNotSharedFiles, isTrashcan, isNotTrashcan, isPersonalFiles, isLibraryFiles, isLibraries, isNotLibraries, isRecentFiles, isNotRecentFiles, isSearchResults, isNotSearchResults, isSharedPreview, isFavoritesPreview, isSharedFileViewer, hasQuickShareEnabled, isAdmin };
826
-
827
- //# sourceMappingURL=alfresco-aca-shared-rules.js.map