@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,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