@alfresco/aca-shared 1.12.0 → 4.0.0-A.2-9919

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