@alfresco/aca-shared 2.0.1 → 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 (220) hide show
  1. package/README.md +2 -1
  2. package/{esm2015/alfresco-aca-shared.js → esm2020/alfresco-aca-shared.mjs} +0 -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/esm2020/lib/components/page-layout/page-layout-error.component.mjs +41 -0
  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/info-drawer/shared-info-drawer.module.js → esm2020/lib/directives/contextmenu/contextmenu.module.mjs} +17 -15
  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/{esm2015/lib/models/types.js → esm2020/lib/models/types.mjs} +1 -0
  28. package/{esm2015/lib/models/viewer.rules.js → esm2020/lib/models/viewer.rules.mjs} +2 -1
  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/{esm2015/lib/services/node-permission.service.js → esm2020/lib/services/node-permission.service.mjs} +9 -7
  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/{esm2015/store/actions/contextmenu.actions.js → esm2020/lib/testing/translation.service.mjs} +19 -9
  40. package/{esm2015/lib/utils/node.utils.js → esm2020/lib/utils/node.utils.mjs} +0 -0
  41. package/esm2020/public-api.mjs +63 -0
  42. package/{esm2015/rules/alfresco-aca-shared-rules.js → esm2020/rules/alfresco-aca-shared-rules.mjs} +0 -0
  43. package/esm2020/rules/app.rules.mjs +503 -0
  44. package/esm2020/rules/navigation.rules.mjs +152 -0
  45. package/{esm2015/rules/public-api.js → esm2020/rules/public-api.mjs} +0 -0
  46. package/{esm2015/store/states/app.state.js → esm2020/rules/repository.rules.mjs} +10 -1
  47. package/esm2020/rules/user.rules.mjs +30 -0
  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/{esm2015/store/actions/metadata-aspect.actions.js → esm2020/store/actions/metadata-aspect.actions.mjs} +0 -0
  54. package/esm2020/store/actions/node.actions.mjs +189 -0
  55. package/{esm2015/lib/components/generic-error/generic-error.module.js → esm2020/store/actions/router-action-types.mjs} +9 -15
  56. package/esm2020/store/actions/router.actions.mjs +55 -0
  57. package/esm2020/store/actions/search.actions.mjs +36 -0
  58. package/esm2020/store/actions/snackbar.actions.mjs +58 -0
  59. package/esm2020/store/actions/template-action-types.mjs +32 -0
  60. package/{esm2015/lib/components/generic-error/generic-error.component.js → esm2020/store/actions/template.actions.mjs} +21 -17
  61. package/esm2020/store/actions/upload.actions.mjs +50 -0
  62. package/esm2020/store/actions/viewer.actions.mjs +82 -0
  63. package/{esm2015/store/alfresco-aca-shared-store.js → esm2020/store/alfresco-aca-shared-store.mjs} +0 -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/{esm2015/store/models/delete-status.model.js → esm2020/store/models/delete-status.model.mjs} +1 -0
  68. package/{esm2015/store/models/deleted-node-info.model.js → esm2020/store/models/deleted-node-info.model.mjs} +1 -0
  69. package/esm2020/store/models/modal-configuration.mjs +2 -0
  70. package/{esm2015/store/models/node-info.model.js → esm2020/store/models/node-info.model.mjs} +1 -0
  71. package/{esm2015/store/models/search-option.model.js → esm2020/store/models/search-option.model.mjs} +0 -0
  72. package/esm2020/store/public-api.mjs +50 -0
  73. package/esm2020/store/selectors/app.selectors.mjs +60 -0
  74. package/esm2020/store/states/app.state.mjs +27 -0
  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.js → alfresco-aca-shared-store.mjs} +302 -276
  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} +220 -150
  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/{alfresco-aca-shared.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 +13 -7
  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 +30 -45
  118. package/lib/services/app.service.d.ts +42 -6
  119. package/lib/services/content-api.service.d.ts +34 -25
  120. package/lib/services/node-permission.service.d.ts +3 -24
  121. package/lib/services/router.extension.service.d.ts +3 -24
  122. package/lib/shared.module.d.ts +5 -0
  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 +57 -18
  126. package/public-api.d.ts +7 -1
  127. package/rules/app.rules.d.ts +104 -30
  128. package/rules/{alfresco-aca-shared-rules.d.ts → 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 +19 -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 +6 -0
  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/{alfresco-aca-shared-store.d.ts → index.d.ts} +1 -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 +6 -1
  153. package/store/states/app.state.d.ts +8 -1
  154. package/store/store.module.d.ts +5 -24
  155. package/alfresco-aca-shared.metadata.json +0 -1
  156. package/bundles/alfresco-aca-shared-rules.umd.js +0 -745
  157. package/bundles/alfresco-aca-shared-rules.umd.js.map +0 -1
  158. package/bundles/alfresco-aca-shared-rules.umd.min.js +0 -125
  159. package/bundles/alfresco-aca-shared-rules.umd.min.js.map +0 -1
  160. package/bundles/alfresco-aca-shared-store.umd.js +0 -1784
  161. package/bundles/alfresco-aca-shared-store.umd.js.map +0 -1
  162. package/bundles/alfresco-aca-shared-store.umd.min.js +0 -462
  163. package/bundles/alfresco-aca-shared-store.umd.min.js.map +0 -1
  164. package/bundles/alfresco-aca-shared.umd.js +0 -2523
  165. package/bundles/alfresco-aca-shared.umd.js.map +0 -1
  166. package/bundles/alfresco-aca-shared.umd.min.js +0 -740
  167. package/bundles/alfresco-aca-shared.umd.min.js.map +0 -1
  168. package/esm2015/lib/adf-extensions/extensions-data-loader.guard.js +0 -74
  169. package/esm2015/lib/components/info-drawer/info-drawer.component.js +0 -105
  170. package/esm2015/lib/components/locked-by/locked-by.component.js +0 -54
  171. package/esm2015/lib/components/locked-by/locked-by.module.js +0 -38
  172. package/esm2015/lib/components/page-layout/page-layout-content.component.js +0 -43
  173. package/esm2015/lib/components/page-layout/page-layout-error.component.js +0 -37
  174. package/esm2015/lib/components/page-layout/page-layout-header.component.js +0 -37
  175. package/esm2015/lib/components/page-layout/page-layout.component.js +0 -44
  176. package/esm2015/lib/components/page-layout/page-layout.module.js +0 -40
  177. package/esm2015/lib/components/tool-bar/shared-toolbar.module.js +0 -42
  178. package/esm2015/lib/components/tool-bar/toolbar-action/toolbar-action.component.js +0 -57
  179. package/esm2015/lib/components/tool-bar/toolbar-button/toolbar-button.component.js +0 -66
  180. package/esm2015/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.js +0 -55
  181. package/esm2015/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.js +0 -65
  182. package/esm2015/lib/directives/contextmenu/contextmenu.directive.js +0 -97
  183. package/esm2015/lib/directives/contextmenu/contextmenu.module.js +0 -38
  184. package/esm2015/lib/directives/pagination.directive.js +0 -55
  185. package/esm2015/lib/directives/shared.directives.module.js +0 -37
  186. package/esm2015/lib/routing/app.routes.strategy.js +0 -105
  187. package/esm2015/lib/routing/shared.guard.js +0 -50
  188. package/esm2015/lib/services/app.extension.service.js +0 -398
  189. package/esm2015/lib/services/app.service.js +0 -69
  190. package/esm2015/lib/services/content-api.service.js +0 -205
  191. package/esm2015/lib/services/router.extension.service.js +0 -110
  192. package/esm2015/lib/shared.module.js +0 -44
  193. package/esm2015/public-api.js +0 -57
  194. package/esm2015/rules/app.rules.js +0 -420
  195. package/esm2015/rules/navigation.rules.js +0 -164
  196. package/esm2015/rules/repository.rules.js +0 -32
  197. package/esm2015/rules/user.rules.js +0 -32
  198. package/esm2015/store/actions/app.actions.js +0 -130
  199. package/esm2015/store/actions/library.actions.js +0 -63
  200. package/esm2015/store/actions/node.actions.js +0 -161
  201. package/esm2015/store/actions/router.actions.js +0 -56
  202. package/esm2015/store/actions/search.actions.js +0 -54
  203. package/esm2015/store/actions/snackbar.actions.js +0 -61
  204. package/esm2015/store/actions/template.actions.js +0 -54
  205. package/esm2015/store/actions/upload.actions.js +0 -49
  206. package/esm2015/store/actions/viewer.actions.js +0 -75
  207. package/esm2015/store/effects/dialog.effects.js +0 -49
  208. package/esm2015/store/effects/router.effects.js +0 -132
  209. package/esm2015/store/effects/snackbar.effects.js +0 -90
  210. package/esm2015/store/public-api.js +0 -46
  211. package/esm2015/store/selectors/app.selectors.js +0 -80
  212. package/esm2015/store/store.module.js +0 -37
  213. package/fesm2015/alfresco-aca-shared-rules.js.map +0 -1
  214. package/fesm2015/alfresco-aca-shared-store.js.map +0 -1
  215. package/fesm2015/alfresco-aca-shared.js +0 -2167
  216. package/fesm2015/alfresco-aca-shared.js.map +0 -1
  217. package/rules/alfresco-aca-shared-rules.metadata.json +0 -1
  218. package/rules/package.json +0 -11
  219. package/store/alfresco-aca-shared-store.metadata.json +0 -1
  220. package/store/package.json +0 -11
@@ -1 +0,0 @@
1
- {"version":3,"file":"alfresco-aca-shared-rules.umd.js","sources":["../../../../projects/aca-shared/rules/src/navigation.rules.ts","../../../../projects/aca-shared/rules/src/repository.rules.ts","../../../../projects/aca-shared/rules/src/app.rules.ts","../../../../projects/aca-shared/rules/src/user.rules.ts","../../../../projects/aca-shared/rules/src/public-api.ts","../../../../projects/aca-shared/rules/src/alfresco-aca-shared-rules.ts"],"sourcesContent":["/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if a Preview route is activated.\n * JSON ref: `app.navigation.isPreview`\n */\nexport function isPreview(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.includes('/preview/') || url.includes('viewer:view') || url.includes('/view/'));\n}\n\n/**\n * Checks if a **Favorites** route is activated.\n * JSON ref: `app.navigation.isFavorites`\n */\nexport function isFavorites(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/favorites') && !isPreview(context);\n}\n\n/**\n * Checks if the activated route is not **Favorites**.\n * JSON ref: `app.navigation.isNotFavorites`\n */\nexport function isNotFavorites(context: RuleContext): boolean {\n return !isFavorites(context);\n}\n\n/**\n * Checks if a **Shared Files** route is activated.\n * JSON ref: `app.navigation.isSharedFiles`\n */\nexport function isSharedFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/shared') && !isPreview(context);\n}\n\n/**\n * Checks if the activated route is not **Shared Files**.\n * JSON ref: `app.navigation.isNotSharedFiles`\n */\nexport function isNotSharedFiles(context: RuleContext): boolean {\n return !isSharedFiles(context);\n}\n\n/**\n * Checks if a **Trashcan** route is activated.\n * JSON ref: `app.navigation.isTrashcan`\n */\nexport function isTrashcan(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/trashcan');\n}\n\n/**\n * Checks if the activated route is not **Trashcan**.\n * JSON ref: `app.navigation.isNotTrashcan`\n */\nexport function isNotTrashcan(context: RuleContext): boolean {\n return !isTrashcan(context);\n}\n\n/**\n * Checks if a **Personal Files** route is activated.\n * JSON ref: `app.navigation.isPersonalFiles`\n */\nexport function isPersonalFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/personal-files');\n}\n\n/**\n * Checks if a **Library Files** route is activated.\n * JSON ref: `app.navigation.isLibraryFiles`\n */\nexport function isLibraryFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/libraries');\n}\n\n/**\n * Checks if a **Library Files** or **Library Search Result** route is activated.\n * JSON ref: `app.navigation.isLibraryFiles`\n */\nexport function isLibraries(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.endsWith('/libraries') || url.startsWith('/search-libraries'));\n}\n\n/**\n * Checks if the activated route is neither **Libraries** nor **Library Search Results**.\n * JSON ref: `app.navigation.isNotLibraries`\n */\nexport function isNotLibraries(context: RuleContext): boolean {\n return !isLibraries(context);\n}\n\n/**\n * Checks if a **Recent Files** route is activated.\n * JSON ref: `app.navigation.isRecentFiles`\n */\nexport function isRecentFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/recent-files');\n}\n\n/**\n * Checks if the activated route is not **Recent Files**.\n * JSON ref: `app.navigation.isNotRecentFiles`\n */\nexport function isNotRecentFiles(context: RuleContext): boolean {\n return !isRecentFiles(context);\n}\n\n/**\n * Checks if a **Search Results** route is activated.\n * JSON ref: `app.navigation.isSearchResults`\n */\nexport function isSearchResults(context: RuleContext /*,\n ...args: RuleParameter[]*/): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/search');\n}\n\n/**\n * Checks if the activated route is not **Search Results**.\n * JSON ref: `app.navigation.isNotSearchResults`\n */\nexport function isNotSearchResults(context: RuleContext): boolean {\n return !isSearchResults(context);\n}\n\n/**\n * Checks if a **Shared Preview** route is activated.\n * JSON ref: `app.navigation.isSharedPreview`\n */\nexport function isSharedPreview(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.startsWith('/shared/preview/') || (url.startsWith('/shared') && url.includes('viewer:view')));\n}\n\n/**\n * Checks if a **Favorites Preview** route is activated.\n * JSON ref: `app.navigation.isFavoritesPreview`\n */\nexport function isFavoritesPreview(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.startsWith('/favorites/preview/') || (url.startsWith('/favorites') && url.includes('viewer:view')));\n}\n\n/**\n * Checks if a **Shared File Preview** route is activated.\n * JSON ref: `app.navigation.isFavoritesPreview`\n */\nexport function isSharedFileViewer(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/preview/s/');\n}\n","/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if the quick share repository option is enabled or not.\n * JSON ref: `repository.isQuickShareEnabled`\n */\nexport function hasQuickShareEnabled(context: RuleContext): boolean {\n return context.repository.status.isQuickShareEnabled;\n}\n","/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\nimport * as navigation from './navigation.rules';\nimport * as repository from './repository.rules';\n\nexport interface AcaRuleContext extends RuleContext {\n languagePicker: boolean;\n withCredentials: boolean;\n}\n\n/**\n * Checks if user can copy selected node.\n * JSON ref: `app.canCopyNode`\n * @param context Rule execution context\n */\nexport function canCopyNode(context: RuleContext): boolean {\n return [hasSelection(context), navigation.isNotTrashcan(context), navigation.isNotLibraries(context)].every(Boolean);\n}\n\n/**\n * Checks if user can mark selected nodes as **Favorite**.\n * JSON ref: `app.selection.canAddFavorite`\n */\nexport function canAddFavorite(context: RuleContext): boolean {\n if (!context.selection.isEmpty) {\n if (navigation.isFavorites(context) || navigation.isLibraries(context) || navigation.isTrashcan(context)) {\n return false;\n }\n return context.selection.nodes.some((node) => !node.entry.isFavorite);\n }\n return false;\n}\n\n/**\n * Checks if user can un-mark selected nodes as **Favorite**.\n * JSON ref: `app.selection.canRemoveFavorite`\n */\nexport function canRemoveFavorite(context: RuleContext): boolean {\n if (!context.selection.isEmpty && !navigation.isTrashcan(context)) {\n if (navigation.isFavorites(context)) {\n return true;\n }\n return context.selection.nodes.every((node) => node.entry.isFavorite);\n }\n return false;\n}\n\n/**\n * Checks if user can share selected file.\n * JSON ref: `app.selection.file.canShare`\n */\nexport function canShareFile(context: RuleContext): boolean {\n return [context.selection.file, navigation.isNotTrashcan(context), repository.hasQuickShareEnabled(context), !isShared(context)].every(Boolean);\n}\n\n/**\n * Checks if user can perform \"Join\" or \"Cancel Join Request\" on a library.\n * JSON ref: `canToggleJoinLibrary`\n */\nexport function canToggleJoinLibrary(context: RuleContext): boolean {\n return [hasLibrarySelected(context), !isPrivateLibrary(context), hasNoLibraryRole(context)].every(Boolean);\n}\n\n/**\n * Checks if user can edit the selected folder.\n * JSON ref: `canEditFolder`\n * @param context Rule execution context\n */\nexport function canEditFolder(context: RuleContext): boolean {\n return [canUpdateSelectedFolder(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if the selected file is already shared.\n * JSON ref: `app.selection.file.isShared`\n */\nexport function isShared(context: RuleContext): boolean {\n if (navigation.isSharedFiles(context) && context.selection.file) {\n return true;\n }\n\n if ((navigation.isNotTrashcan(context), !context.selection.isEmpty && context.selection.file)) {\n return !!(context.selection.file.entry && context.selection.file.entry.properties && context.selection.file.entry.properties['qshare:sharedId']);\n }\n\n return false;\n}\n\n/**\n * Checks if user can delete selected nodes.\n * JSON ref: `app.selection.canDelete`\n */\nexport function canDeleteSelection(context: RuleContext): boolean {\n if (\n navigation.isNotTrashcan(context) &&\n navigation.isNotLibraries(context) &&\n navigation.isNotSearchResults(context) &&\n !context.selection.isEmpty\n ) {\n if (hasLockedFiles(context)) {\n return false;\n }\n\n // temp workaround for Favorites api\n if (navigation.isFavorites(context)) {\n return true;\n }\n\n if (navigation.isPreview(context)) {\n return context.permissions.check(context.selection.nodes, ['delete']);\n }\n\n // workaround for Shared Files\n if (navigation.isSharedFiles(context)) {\n return context.permissions.check(context.selection.nodes, ['delete'], {\n target: 'allowableOperationsOnTarget'\n });\n }\n\n return context.permissions.check(context.selection.nodes, ['delete']);\n }\n return false;\n}\n\n/**\n * Checks if user can un-share selected nodes.\n * JSON ref: `app.selection.canUnshare`\n */\nexport function canUnshareNodes(context: RuleContext): boolean {\n if (!context.selection.isEmpty) {\n return context.permissions.check(context.selection.nodes, ['delete'], {\n target: 'allowableOperationsOnTarget'\n });\n }\n return false;\n}\n\n/**\n * Checks if user selected anything.\n * JSON ref: `app.selection.notEmpty`\n */\nexport function hasSelection(context: RuleContext): boolean {\n return !context.selection.isEmpty;\n}\n\n/**\n * Checks if user can create a new folder with current path.\n * JSON ref: `app.navigation.folder.canCreate`\n */\nexport function canCreateFolder(context: RuleContext): boolean {\n const { currentFolder } = context.navigation;\n if (currentFolder) {\n return context.permissions.check(currentFolder, ['create']);\n }\n return false;\n}\n\n/**\n * Checks if user can upload content to current folder.\n * JSON ref: `app.navigation.folder.canUpload`\n */\nexport function canUpload(context: RuleContext): boolean {\n const { currentFolder } = context.navigation;\n if (currentFolder) {\n return context.permissions.check(currentFolder, ['create']);\n }\n return false;\n}\n\n/**\n * Checks if user can download selected nodes (either files or folders).\n * JSON ref: `app.selection.canDownload`\n */\nexport function canDownloadSelection(context: RuleContext): boolean {\n if (!context.selection.isEmpty && navigation.isNotTrashcan(context)) {\n return context.selection.nodes.every((node: any) => {\n return node.entry && (node.entry.isFile || node.entry.isFolder || !!node.entry.nodeId);\n });\n }\n return false;\n}\n\n/**\n * Checks if user has selected a folder.\n * JSON ref: `app.selection.folder`\n */\nexport function hasFolderSelected(context: RuleContext): boolean {\n const folder = context.selection.folder;\n return folder ? true : false;\n}\n\n/**\n * Checks if user has selected a library (site).\n * JSON ref: `app.selection.library`\n */\nexport function hasLibrarySelected(context: RuleContext): boolean {\n const library = context.selection.library;\n return library ? true : false;\n}\n\n/**\n * Checks if user has selected a **private** library (site)\n * JSON ref: `app.selection.isPrivateLibrary`\n */\nexport function isPrivateLibrary(context: RuleContext): boolean {\n const library = context.selection.library;\n return library ? !!(library.entry && library.entry.visibility && library.entry.visibility === 'PRIVATE') : false;\n}\n\n/**\n * Checks if the selected library has a **role** property defined.\n * JSON ref: `app.selection.hasLibraryRole`\n */\nexport function hasLibraryRole(context: RuleContext): boolean {\n const library = context.selection.library;\n return library ? !!(library.entry && library.entry.role) : false;\n}\n\n/**\n * Checks if the selected library has no **role** property defined.\n * JSON ref: `app.selection.hasNoLibraryRole`\n */\nexport function hasNoLibraryRole(context: RuleContext): boolean {\n return !hasLibraryRole(context);\n}\n\n/**\n * Checks if user has selected a file.\n * JSON ref: `app.selection.file`\n */\nexport function hasFileSelected(context: RuleContext): boolean {\n if (context && context.selection && context.selection.file) {\n return true;\n }\n return false;\n}\n\n/**\n * Checks if user can update the first selected node.\n * JSON ref: `app.selection.first.canUpdate`\n */\nexport function canUpdateSelectedNode(context: RuleContext): boolean {\n if (context.selection && !context.selection.isEmpty) {\n const node = context.selection.first;\n\n if (node.entry.isFile && hasLockedFiles(context)) {\n return false;\n }\n\n return context.permissions.check(node, ['update']);\n }\n return false;\n}\n\n/**\n * Checks if user can update the first selected folder.\n * JSON ref: `app.selection.folder.canUpdate`\n */\nexport function canUpdateSelectedFolder(context: RuleContext): boolean {\n const { folder } = context.selection;\n if (folder) {\n return (\n // workaround for Favorites Api\n navigation.isFavorites(context) || context.permissions.check(folder.entry, ['update'])\n );\n }\n return false;\n}\n\n/**\n * Checks if user has selected a **locked** file node.\n * JSON ref: `app.selection.file.isLocked`\n */\nexport function hasLockedFiles(context: RuleContext): boolean {\n if (context && context.selection && context.selection.nodes) {\n return context.selection.nodes.some((node) => {\n if (!node.entry.isFile) {\n return false;\n }\n\n return node.entry.isLocked || (node.entry.properties && node.entry.properties['cm:lockType'] === 'READ_ONLY_LOCK');\n });\n }\n\n return false;\n}\n\n/**\n * Checks if the selected file has **write** or **read-only** locks specified.\n * JSON ref: `app.selection.file.isLocked`\n */\nexport function isWriteLocked(context: RuleContext): boolean {\n return !!(\n context &&\n context.selection &&\n context.selection.file &&\n context.selection.file.entry &&\n context.selection.file.entry.properties &&\n (context.selection.file.entry.properties['cm:lockType'] === 'WRITE_LOCK' ||\n context.selection.file.entry.properties['cm:lockType'] === 'READ_ONLY_LOCK')\n );\n}\n\n/**\n * Checks if the selected file has **write** or **read-only** locks specified,\n * and that current user is the owner of the lock.\n * JSON ref: `app.selection.file.isLockOwner`\n */\nexport function isUserWriteLockOwner(context: RuleContext): boolean {\n return (\n isWriteLocked(context) &&\n context.selection.file.entry.properties['cm:lockOwner'] &&\n context.selection.file.entry.properties['cm:lockOwner'].id === context.profile.id\n );\n}\n\n/**\n * Checks if user can lock selected file.\n * JSON ref: `app.selection.file.canLock`\n */\nexport function canLockFile(context: RuleContext): boolean {\n return !isWriteLocked(context) && canUpdateSelectedNode(context);\n}\n\n/**\n * Checks if user can unlock selected file.\n * JSON ref: `app.selection.file.canUnlock`\n */\nexport function canUnlockFile(context: RuleContext): boolean {\n const { file } = context.selection;\n return isWriteLocked(context) && (context.permissions.check(file.entry, ['delete']) || isUserWriteLockOwner(context));\n}\n\n/**\n * Checks if user can upload a new version of the file.\n * JSON ref: `app.selection.file.canUploadVersion`\n */\nexport function canUploadVersion(context: RuleContext): boolean {\n if (navigation.isFavorites(context) || navigation.isSharedFiles(context)) {\n return hasFileSelected(context);\n }\n\n return [\n hasFileSelected(context),\n navigation.isNotTrashcan(context),\n isWriteLocked(context) ? isUserWriteLockOwner(context) : canUpdateSelectedNode(context)\n ].every(Boolean);\n}\n\n/**\n * Checks if user has trashcan item selected.\n * JSON ref: `isTrashcanItemSelected`\n * @param context Rule execution context\n */\nexport function isTrashcanItemSelected(context: RuleContext): boolean {\n return [navigation.isTrashcan(context), hasSelection(context)].every(Boolean);\n}\n\n/**\n * Checks if user can view the file.\n * JSON ref: `canViewFile`\n * @param context Rule execution context\n */\nexport function canViewFile(context: RuleContext): boolean {\n return [hasFileSelected(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if user can **Leave** selected library.\n * JSON ref: `canLeaveLibrary`\n * @param context Rule execution context\n */\nexport function canLeaveLibrary(context: RuleContext): boolean {\n return [hasLibrarySelected(context), hasLibraryRole(context)].every(Boolean);\n}\n\n/**\n * Checks if user can toggle shared link mode.\n * JSON ref: `canToggleSharedLink`\n * @param context Rule execution context\n */\nexport function canToggleSharedLink(context: RuleContext): boolean {\n return [hasFileSelected(context), [canShareFile(context), isShared(context)].some(Boolean)].every(Boolean);\n}\n\n/**\n * Checks if user can show **Info Drawer** for the selected node.\n * JSON ref: `canShowInfoDrawer`\n * @param context Rule execution context\n */\nexport function canShowInfoDrawer(context: RuleContext): boolean {\n return [hasSelection(context), navigation.isNotLibraries(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if user can manage file versions for the selected node.\n * JSON ref: `canManageFileVersions`\n * @param context Rule execution context\n */\nexport function canManageFileVersions(context: RuleContext): boolean {\n return [hasFileSelected(context), navigation.isNotTrashcan(context), !hasLockedFiles(context)].every(Boolean);\n}\n\n/**\n * Checks if user can manage permissions for the selected node.\n * JSON ref: `canManagePermissions`\n * @param context Rule execution context\n */\nexport function canManagePermissions(context: RuleContext): boolean {\n return [canUpdateSelectedNode(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if user can toggle **Edit Offline** mode for selected node.\n * JSON ref: `canToggleEditOffline`\n * @param context Rule execution context\n */\nexport function canToggleEditOffline(context: RuleContext): boolean {\n return [hasFileSelected(context), navigation.isNotTrashcan(context), canLockFile(context) || canUnlockFile(context)].every(Boolean);\n}\n\n/**\n * @deprecated Uses workarounds for for recent files and search api issues.\n * Checks if user can toggle **Favorite** state for a node.\n * @param context Rule execution context\n */\nexport function canToggleFavorite(context: RuleContext): boolean {\n return [\n [canAddFavorite(context), canRemoveFavorite(context)].some(Boolean),\n [navigation.isRecentFiles(context), navigation.isSharedFiles(context), navigation.isSearchResults(context), navigation.isFavorites(context)].some(\n Boolean\n )\n ].every(Boolean);\n}\n\n/**\n * Checks if application should render language picker menu.\n * JSON ref: `canShowLanguagePicker`\n * @param context Rule execution context\n */\nexport function canShowLanguagePicker(context: AcaRuleContext): boolean {\n return context.languagePicker;\n}\n\n/**\n * Checks if application should render logout option.\n * JSON ref: `canShowLogout`\n * @param context Rule execution context\n */\nexport function canShowLogout(context: AcaRuleContext): boolean {\n return !context.withCredentials;\n}\n\n/**\n * Checks if user is library manager\n * JSON ref: `isLibraryManager`\n * @param context Rule execution context\n */\nexport function isLibraryManager(context: RuleContext): boolean {\n return hasLibrarySelected(context) && context.selection.library.entry && context.selection.library.entry.role === 'SiteManager';\n}\n","/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if user is admin.\n * JSON ref: `user.isAdmin`\n */\nexport function isAdmin(context: RuleContext): boolean {\n return context.profile.isAdmin;\n}\n","/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './app.rules';\nexport * from './navigation.rules';\nexport * from './repository.rules';\nexport * from './user.rules';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["navigation.isNotTrashcan","navigation.isNotLibraries","navigation.isFavorites","navigation.isLibraries","navigation.isTrashcan","repository.hasQuickShareEnabled","navigation.isSharedFiles","navigation.isNotSearchResults","navigation.isPreview","navigation.isRecentFiles","navigation.isSearchResults"],"mappings":";;;;;;EAAA;;;;;;;;;;;;;;;;;;;;;;;;EA2BA;;;;WAIgB,SAAS,CAAC,OAAoB;MACpC,IAAA,GAAG,GAAK,OAAO,CAAC,UAAU,IAAvB,CAAwB;MACnC,OAAO,GAAG,K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;;;;;;;;;;;;;;;;;;EA2BA;;;;WAIgB,OAAO,CAAC,OAAoB;MAC1C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;EACjC;;ECjCA;;;;;;;;;;;;;;;;;;;;;;;;;ECAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,125 +0,0 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define("@alfresco/aca-shared/rules",["exports"],n):n(((e=e||self).alfresco=e.alfresco||{},e.alfresco["aca-shared"]=e.alfresco["aca-shared"]||{},e.alfresco["aca-shared"].rules={}))}(this,(function(e){"use strict";
2
- /*!
3
- * @license
4
- * Alfresco Example Content Application
5
- *
6
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
7
- *
8
- * This file is part of the Alfresco Example Content Application.
9
- * If the software was purchased under a paid Alfresco license, the terms of
10
- * the paid license agreement will prevail. Otherwise, the software is
11
- * provided under the following open source license terms:
12
- *
13
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
14
- * it under the terms of the GNU Lesser General Public License as published by
15
- * the Free Software Foundation, either version 3 of the License, or
16
- * (at your option) any later version.
17
- *
18
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU Lesser General Public License for more details.
22
- *
23
- * You should have received a copy of the GNU Lesser General Public License
24
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
25
- */function n(e){var n=e.navigation.url;return n&&(n.includes("/preview/")||n.includes("viewer:view")||n.includes("/view/"))}function r(e){var r=e.navigation.url;return r&&r.startsWith("/favorites")&&!n(e)}function i(e){var r=e.navigation.url;return r&&r.startsWith("/shared")&&!n(e)}function t(e){var n=e.navigation.url;return n&&n.startsWith("/trashcan")}function o(e){return!t(e)}function s(e){var n=e.navigation.url;return n&&(n.endsWith("/libraries")||n.startsWith("/search-libraries"))}function a(e){return!s(e)}function c(e){var n=e.navigation.url;return n&&n.startsWith("/recent-files")}function l(e){var n=e.navigation.url;return n&&n.startsWith("/search")}function u(e){return!l(e)}
26
- /*!
27
- * @license
28
- * Alfresco Example Content Application
29
- *
30
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
31
- *
32
- * This file is part of the Alfresco Example Content Application.
33
- * If the software was purchased under a paid Alfresco license, the terms of
34
- * the paid license agreement will prevail. Otherwise, the software is
35
- * provided under the following open source license terms:
36
- *
37
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
38
- * it under the terms of the GNU Lesser General Public License as published by
39
- * the Free Software Foundation, either version 3 of the License, or
40
- * (at your option) any later version.
41
- *
42
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
43
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
44
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45
- * GNU Lesser General Public License for more details.
46
- *
47
- * You should have received a copy of the GNU Lesser General Public License
48
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
49
- */
50
- function f(e){return e.repository.status.isQuickShareEnabled}
51
- /*!
52
- * @license
53
- * Alfresco Example Content Application
54
- *
55
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
56
- *
57
- * This file is part of the Alfresco Example Content Application.
58
- * If the software was purchased under a paid Alfresco license, the terms of
59
- * the paid license agreement will prevail. Otherwise, the software is
60
- * provided under the following open source license terms:
61
- *
62
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
63
- * it under the terms of the GNU Lesser General Public License as published by
64
- * the Free Software Foundation, either version 3 of the License, or
65
- * (at your option) any later version.
66
- *
67
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
68
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
69
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
70
- * GNU Lesser General Public License for more details.
71
- *
72
- * You should have received a copy of the GNU Lesser General Public License
73
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
74
- */function d(e){return!e.selection.isEmpty&&(!(r(e)||s(e)||t(e))&&e.selection.nodes.some((function(e){return!e.entry.isFavorite})))}function v(e){return!e.selection.isEmpty&&!t(e)&&(!!r(e)||e.selection.nodes.every((function(e){return e.entry.isFavorite})))}function y(e){return[e.selection.file,o(e),f(e),!h(e)].every(Boolean)}function h(e){return!(!i(e)||!e.selection.file)||(o(e),!(e.selection.isEmpty||!e.selection.file)&&!!(e.selection.file.entry&&e.selection.file.entry.properties&&e.selection.file.entry.properties["qshare:sharedId"]))}function p(e){return!e.selection.isEmpty}function g(e){return!!e.selection.library}function m(e){var n=e.selection.library;return!!n&&!(!n.entry||!n.entry.visibility||"PRIVATE"!==n.entry.visibility)}function F(e){var n=e.selection.library;return!!n&&!(!n.entry||!n.entry.role)}function w(e){return!F(e)}function b(e){return!!(e&&e.selection&&e.selection.file)}function k(e){if(e.selection&&!e.selection.isEmpty){var n=e.selection.first;return(!n.entry.isFile||!S(e))&&e.permissions.check(n,["update"])}return!1}function L(e){var n=e.selection.folder;return!!n&&(r(e)||e.permissions.check(n.entry,["update"]))}function S(e){return!!(e&&e.selection&&e.selection.nodes)&&e.selection.nodes.some((function(e){return!!e.entry.isFile&&(e.entry.isLocked||e.entry.properties&&"READ_ONLY_LOCK"===e.entry.properties["cm:lockType"])}))}function B(e){return!(!(e&&e.selection&&e.selection.file&&e.selection.file.entry&&e.selection.file.entry.properties)||"WRITE_LOCK"!==e.selection.file.entry.properties["cm:lockType"]&&"READ_ONLY_LOCK"!==e.selection.file.entry.properties["cm:lockType"])}function W(e){return B(e)&&e.selection.file.entry.properties["cm:lockOwner"]&&e.selection.file.entry.properties["cm:lockOwner"].id===e.profile.id}function E(e){return!B(e)&&k(e)}function O(e){var n=e.selection.file;return B(e)&&(e.permissions.check(n.entry,["delete"])||W(e))}
75
- /*!
76
- * @license
77
- * Alfresco Example Content Application
78
- *
79
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
80
- *
81
- * This file is part of the Alfresco Example Content Application.
82
- * If the software was purchased under a paid Alfresco license, the terms of
83
- * the paid license agreement will prevail. Otherwise, the software is
84
- * provided under the following open source license terms:
85
- *
86
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
87
- * it under the terms of the GNU Lesser General Public License as published by
88
- * the Free Software Foundation, either version 3 of the License, or
89
- * (at your option) any later version.
90
- *
91
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
92
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
93
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94
- * GNU Lesser General Public License for more details.
95
- *
96
- * You should have received a copy of the GNU Lesser General Public License
97
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
98
- */
99
- e.canAddFavorite=d,e.canCopyNode=function(e){return[p(e),o(e),a(e)].every(Boolean)},e.canCreateFolder=function(e){var n=e.navigation.currentFolder;return!!n&&e.permissions.check(n,["create"])},e.canDeleteSelection=function(e){return!(!(o(e)&&a(e)&&u(e))||e.selection.isEmpty)&&(!S(e)&&(!!r(e)||(n(e)?e.permissions.check(e.selection.nodes,["delete"]):i(e)?e.permissions.check(e.selection.nodes,["delete"],{target:"allowableOperationsOnTarget"}):e.permissions.check(e.selection.nodes,["delete"]))))},e.canDownloadSelection=function(e){return!(e.selection.isEmpty||!o(e))&&e.selection.nodes.every((function(e){return e.entry&&(e.entry.isFile||e.entry.isFolder||!!e.entry.nodeId)}))},e.canEditFolder=function(e){return[L(e),o(e)].every(Boolean)},e.canLeaveLibrary=function(e){return[g(e),F(e)].every(Boolean)},e.canLockFile=E,e.canManageFileVersions=function(e){return[b(e),o(e),!S(e)].every(Boolean)},e.canManagePermissions=function(e){return[k(e),o(e)].every(Boolean)},e.canRemoveFavorite=v,e.canShareFile=y,e.canShowInfoDrawer=function(e){return[p(e),a(e),o(e)].every(Boolean)},e.canShowLanguagePicker=function(e){return e.languagePicker},e.canShowLogout=function(e){return!e.withCredentials},e.canToggleEditOffline=function(e){return[b(e),o(e),E(e)||O(e)].every(Boolean)},e.canToggleFavorite=function(e){return[[d(e),v(e)].some(Boolean),[c(e),i(e),l(e),r(e)].some(Boolean)].every(Boolean)},e.canToggleJoinLibrary=function(e){return[g(e),!m(e),w(e)].every(Boolean)},e.canToggleSharedLink=function(e){return[b(e),[y(e),h(e)].some(Boolean)].every(Boolean)},e.canUnlockFile=O,e.canUnshareNodes=function(e){return!e.selection.isEmpty&&e.permissions.check(e.selection.nodes,["delete"],{target:"allowableOperationsOnTarget"})},e.canUpdateSelectedFolder=L,e.canUpdateSelectedNode=k,e.canUpload=function(e){var n=e.navigation.currentFolder;return!!n&&e.permissions.check(n,["create"])},e.canUploadVersion=function(e){return r(e)||i(e)?b(e):[b(e),o(e),B(e)?W(e):k(e)].every(Boolean)},e.canViewFile=function(e){return[b(e),o(e)].every(Boolean)},e.hasFileSelected=b,e.hasFolderSelected=function(e){return!!e.selection.folder},e.hasLibraryRole=F,e.hasLibrarySelected=g,e.hasLockedFiles=S,e.hasNoLibraryRole=w,e.hasQuickShareEnabled=f,e.hasSelection=p,e.isAdmin=
100
- /*!
101
- * @license
102
- * Alfresco Example Content Application
103
- *
104
- * Copyright (C) 2005 - 2020 Alfresco Software Limited
105
- *
106
- * This file is part of the Alfresco Example Content Application.
107
- * If the software was purchased under a paid Alfresco license, the terms of
108
- * the paid license agreement will prevail. Otherwise, the software is
109
- * provided under the following open source license terms:
110
- *
111
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
112
- * it under the terms of the GNU Lesser General Public License as published by
113
- * the Free Software Foundation, either version 3 of the License, or
114
- * (at your option) any later version.
115
- *
116
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
117
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
118
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
119
- * GNU Lesser General Public License for more details.
120
- *
121
- * You should have received a copy of the GNU Lesser General Public License
122
- * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
123
- */
124
- function(e){return e.profile.isAdmin},e.isFavorites=r,e.isFavoritesPreview=function(e){var n=e.navigation.url;return n&&(n.startsWith("/favorites/preview/")||n.startsWith("/favorites")&&n.includes("viewer:view"))},e.isLibraries=s,e.isLibraryFiles=function(e){var n=e.navigation.url;return n&&n.startsWith("/libraries")},e.isLibraryManager=function(e){return g(e)&&e.selection.library.entry&&"SiteManager"===e.selection.library.entry.role},e.isNotFavorites=function(e){return!r(e)},e.isNotLibraries=a,e.isNotRecentFiles=function(e){return!c(e)},e.isNotSearchResults=u,e.isNotSharedFiles=function(e){return!i(e)},e.isNotTrashcan=o,e.isPersonalFiles=function(e){var n=e.navigation.url;return n&&n.startsWith("/personal-files")},e.isPreview=n,e.isPrivateLibrary=m,e.isRecentFiles=c,e.isSearchResults=l,e.isShared=h,e.isSharedFileViewer=function(e){var n=e.navigation.url;return n&&n.startsWith("/preview/s/")},e.isSharedFiles=i,e.isSharedPreview=function(e){var n=e.navigation.url;return n&&(n.startsWith("/shared/preview/")||n.startsWith("/shared")&&n.includes("viewer:view"))},e.isTrashcan=t,e.isTrashcanItemSelected=function(e){return[t(e),p(e)].every(Boolean)},e.isUserWriteLockOwner=W,e.isWriteLocked=B,Object.defineProperty(e,"__esModule",{value:!0})}));
125
- //# sourceMappingURL=alfresco-aca-shared-rules.umd.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../projects/aca-shared/rules/src/navigation.rules.ts","../../../../projects/aca-shared/rules/src/repository.rules.ts","../../../../projects/aca-shared/rules/src/app.rules.ts","../../../../projects/aca-shared/rules/src/user.rules.ts"],"names":["isPreview","context","url","navigation","includes","isFavorites","startsWith","isSharedFiles","isTrashcan","isNotTrashcan","isLibraries","endsWith","isNotLibraries","isRecentFiles","isSearchResults","isNotSearchResults","hasQuickShareEnabled","repository","status","isQuickShareEnabled","canAddFavorite","selection","isEmpty","navigation.isFavorites","navigation.isLibraries","navigation.isTrashcan","nodes","some","node","entry","isFavorite","canRemoveFavorite","every","canShareFile","file","navigation.isNotTrashcan","repository.hasQuickShareEnabled","isShared","Boolean","navigation.isSharedFiles","properties","hasSelection","hasLibrarySelected","library","isPrivateLibrary","visibility","hasLibraryRole","role","hasNoLibraryRole","hasFileSelected","canUpdateSelectedNode","first","isFile","hasLockedFiles","permissions","check","canUpdateSelectedFolder","folder","isLocked","isWriteLocked","isUserWriteLockOwner","id","profile","canLockFile","canUnlockFile","navigation.isNotLibraries","currentFolder","navigation.isNotSearchResults","navigation.isPreview","target","isFolder","nodeId","languagePicker","withCredentials","navigation.isRecentFiles","navigation.isSearchResults","isAdmin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;cA+BgBA,EAAUC,GAChB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,IAAQA,EAAIE,SAAS,cAAgBF,EAAIE,SAAS,gBAAkBF,EAAIE,SAAS,oBAO1EC,EAAYJ,GAClB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA,EAAII,WAAW,gBAAkBN,EAAUC,YAe3CM,EAAcN,GACpB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA,EAAII,WAAW,aAAeN,EAAUC,YAexCO,EAAWP,GACjB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA,EAAII,WAAW,sBAOfG,EAAcR,GAC5B,OAAQO,EAAWP,YAyBLS,EAAYT,GAClB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,IAAQA,EAAIS,SAAS,eAAiBT,EAAII,WAAW,+BAO9CM,EAAeX,GAC7B,OAAQS,EAAYT,YAONY,EAAcZ,GACpB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA,EAAII,WAAW,0BAefQ,EAAgBb,GAEtB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA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,WAAW,wBAA2BJ,EAAII,WAAW,eAAiBJ,EAAIE,SAAS,2DAxEzEH,GACrB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA,EAAII,WAAW,2CE4XEL,GAC/B,OAAOyC,EAAmBzC,IAAYA,EAAQoB,UAAUsB,QAAQd,OAAkD,gBAAzC5B,EAAQoB,UAAUsB,QAAQd,MAAMkB,gCFlb5E9C,GAC7B,OAAQI,EAAYJ,mDAqFWA,GAC/B,OAAQY,EAAcZ,uDAtESA,GAC/B,OAAQM,EAAcN,iDAwBQA,GACtB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA,EAAII,WAAW,wIAsFIL,GACzB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,GAAOA,EAAII,WAAW,6DApBCL,GACtB,IAAAC,EAAQD,EAAQE,WAAUD,IAClC,OAAOA,IAAQA,EAAII,WAAW,qBAAwBJ,EAAII,WAAW,YAAcJ,EAAIE,SAAS,kEEuN3DH,GACrC,MAAO,CAACwB,EAAsBxB,GAAUwC,EAAaxC,IAAU+B,MAAMM","sourcesContent":["/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if a Preview route is activated.\n * JSON ref: `app.navigation.isPreview`\n */\nexport function isPreview(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.includes('/preview/') || url.includes('viewer:view') || url.includes('/view/'));\n}\n\n/**\n * Checks if a **Favorites** route is activated.\n * JSON ref: `app.navigation.isFavorites`\n */\nexport function isFavorites(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/favorites') && !isPreview(context);\n}\n\n/**\n * Checks if the activated route is not **Favorites**.\n * JSON ref: `app.navigation.isNotFavorites`\n */\nexport function isNotFavorites(context: RuleContext): boolean {\n return !isFavorites(context);\n}\n\n/**\n * Checks if a **Shared Files** route is activated.\n * JSON ref: `app.navigation.isSharedFiles`\n */\nexport function isSharedFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/shared') && !isPreview(context);\n}\n\n/**\n * Checks if the activated route is not **Shared Files**.\n * JSON ref: `app.navigation.isNotSharedFiles`\n */\nexport function isNotSharedFiles(context: RuleContext): boolean {\n return !isSharedFiles(context);\n}\n\n/**\n * Checks if a **Trashcan** route is activated.\n * JSON ref: `app.navigation.isTrashcan`\n */\nexport function isTrashcan(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/trashcan');\n}\n\n/**\n * Checks if the activated route is not **Trashcan**.\n * JSON ref: `app.navigation.isNotTrashcan`\n */\nexport function isNotTrashcan(context: RuleContext): boolean {\n return !isTrashcan(context);\n}\n\n/**\n * Checks if a **Personal Files** route is activated.\n * JSON ref: `app.navigation.isPersonalFiles`\n */\nexport function isPersonalFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/personal-files');\n}\n\n/**\n * Checks if a **Library Files** route is activated.\n * JSON ref: `app.navigation.isLibraryFiles`\n */\nexport function isLibraryFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/libraries');\n}\n\n/**\n * Checks if a **Library Files** or **Library Search Result** route is activated.\n * JSON ref: `app.navigation.isLibraryFiles`\n */\nexport function isLibraries(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.endsWith('/libraries') || url.startsWith('/search-libraries'));\n}\n\n/**\n * Checks if the activated route is neither **Libraries** nor **Library Search Results**.\n * JSON ref: `app.navigation.isNotLibraries`\n */\nexport function isNotLibraries(context: RuleContext): boolean {\n return !isLibraries(context);\n}\n\n/**\n * Checks if a **Recent Files** route is activated.\n * JSON ref: `app.navigation.isRecentFiles`\n */\nexport function isRecentFiles(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/recent-files');\n}\n\n/**\n * Checks if the activated route is not **Recent Files**.\n * JSON ref: `app.navigation.isNotRecentFiles`\n */\nexport function isNotRecentFiles(context: RuleContext): boolean {\n return !isRecentFiles(context);\n}\n\n/**\n * Checks if a **Search Results** route is activated.\n * JSON ref: `app.navigation.isSearchResults`\n */\nexport function isSearchResults(context: RuleContext /*,\n ...args: RuleParameter[]*/): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/search');\n}\n\n/**\n * Checks if the activated route is not **Search Results**.\n * JSON ref: `app.navigation.isNotSearchResults`\n */\nexport function isNotSearchResults(context: RuleContext): boolean {\n return !isSearchResults(context);\n}\n\n/**\n * Checks if a **Shared Preview** route is activated.\n * JSON ref: `app.navigation.isSharedPreview`\n */\nexport function isSharedPreview(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.startsWith('/shared/preview/') || (url.startsWith('/shared') && url.includes('viewer:view')));\n}\n\n/**\n * Checks if a **Favorites Preview** route is activated.\n * JSON ref: `app.navigation.isFavoritesPreview`\n */\nexport function isFavoritesPreview(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && (url.startsWith('/favorites/preview/') || (url.startsWith('/favorites') && url.includes('viewer:view')));\n}\n\n/**\n * Checks if a **Shared File Preview** route is activated.\n * JSON ref: `app.navigation.isFavoritesPreview`\n */\nexport function isSharedFileViewer(context: RuleContext): boolean {\n const { url } = context.navigation;\n return url && url.startsWith('/preview/s/');\n}\n","/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if the quick share repository option is enabled or not.\n * JSON ref: `repository.isQuickShareEnabled`\n */\nexport function hasQuickShareEnabled(context: RuleContext): boolean {\n return context.repository.status.isQuickShareEnabled;\n}\n","/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\nimport * as navigation from './navigation.rules';\nimport * as repository from './repository.rules';\n\nexport interface AcaRuleContext extends RuleContext {\n languagePicker: boolean;\n withCredentials: boolean;\n}\n\n/**\n * Checks if user can copy selected node.\n * JSON ref: `app.canCopyNode`\n * @param context Rule execution context\n */\nexport function canCopyNode(context: RuleContext): boolean {\n return [hasSelection(context), navigation.isNotTrashcan(context), navigation.isNotLibraries(context)].every(Boolean);\n}\n\n/**\n * Checks if user can mark selected nodes as **Favorite**.\n * JSON ref: `app.selection.canAddFavorite`\n */\nexport function canAddFavorite(context: RuleContext): boolean {\n if (!context.selection.isEmpty) {\n if (navigation.isFavorites(context) || navigation.isLibraries(context) || navigation.isTrashcan(context)) {\n return false;\n }\n return context.selection.nodes.some((node) => !node.entry.isFavorite);\n }\n return false;\n}\n\n/**\n * Checks if user can un-mark selected nodes as **Favorite**.\n * JSON ref: `app.selection.canRemoveFavorite`\n */\nexport function canRemoveFavorite(context: RuleContext): boolean {\n if (!context.selection.isEmpty && !navigation.isTrashcan(context)) {\n if (navigation.isFavorites(context)) {\n return true;\n }\n return context.selection.nodes.every((node) => node.entry.isFavorite);\n }\n return false;\n}\n\n/**\n * Checks if user can share selected file.\n * JSON ref: `app.selection.file.canShare`\n */\nexport function canShareFile(context: RuleContext): boolean {\n return [context.selection.file, navigation.isNotTrashcan(context), repository.hasQuickShareEnabled(context), !isShared(context)].every(Boolean);\n}\n\n/**\n * Checks if user can perform \"Join\" or \"Cancel Join Request\" on a library.\n * JSON ref: `canToggleJoinLibrary`\n */\nexport function canToggleJoinLibrary(context: RuleContext): boolean {\n return [hasLibrarySelected(context), !isPrivateLibrary(context), hasNoLibraryRole(context)].every(Boolean);\n}\n\n/**\n * Checks if user can edit the selected folder.\n * JSON ref: `canEditFolder`\n * @param context Rule execution context\n */\nexport function canEditFolder(context: RuleContext): boolean {\n return [canUpdateSelectedFolder(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if the selected file is already shared.\n * JSON ref: `app.selection.file.isShared`\n */\nexport function isShared(context: RuleContext): boolean {\n if (navigation.isSharedFiles(context) && context.selection.file) {\n return true;\n }\n\n if ((navigation.isNotTrashcan(context), !context.selection.isEmpty && context.selection.file)) {\n return !!(context.selection.file.entry && context.selection.file.entry.properties && context.selection.file.entry.properties['qshare:sharedId']);\n }\n\n return false;\n}\n\n/**\n * Checks if user can delete selected nodes.\n * JSON ref: `app.selection.canDelete`\n */\nexport function canDeleteSelection(context: RuleContext): boolean {\n if (\n navigation.isNotTrashcan(context) &&\n navigation.isNotLibraries(context) &&\n navigation.isNotSearchResults(context) &&\n !context.selection.isEmpty\n ) {\n if (hasLockedFiles(context)) {\n return false;\n }\n\n // temp workaround for Favorites api\n if (navigation.isFavorites(context)) {\n return true;\n }\n\n if (navigation.isPreview(context)) {\n return context.permissions.check(context.selection.nodes, ['delete']);\n }\n\n // workaround for Shared Files\n if (navigation.isSharedFiles(context)) {\n return context.permissions.check(context.selection.nodes, ['delete'], {\n target: 'allowableOperationsOnTarget'\n });\n }\n\n return context.permissions.check(context.selection.nodes, ['delete']);\n }\n return false;\n}\n\n/**\n * Checks if user can un-share selected nodes.\n * JSON ref: `app.selection.canUnshare`\n */\nexport function canUnshareNodes(context: RuleContext): boolean {\n if (!context.selection.isEmpty) {\n return context.permissions.check(context.selection.nodes, ['delete'], {\n target: 'allowableOperationsOnTarget'\n });\n }\n return false;\n}\n\n/**\n * Checks if user selected anything.\n * JSON ref: `app.selection.notEmpty`\n */\nexport function hasSelection(context: RuleContext): boolean {\n return !context.selection.isEmpty;\n}\n\n/**\n * Checks if user can create a new folder with current path.\n * JSON ref: `app.navigation.folder.canCreate`\n */\nexport function canCreateFolder(context: RuleContext): boolean {\n const { currentFolder } = context.navigation;\n if (currentFolder) {\n return context.permissions.check(currentFolder, ['create']);\n }\n return false;\n}\n\n/**\n * Checks if user can upload content to current folder.\n * JSON ref: `app.navigation.folder.canUpload`\n */\nexport function canUpload(context: RuleContext): boolean {\n const { currentFolder } = context.navigation;\n if (currentFolder) {\n return context.permissions.check(currentFolder, ['create']);\n }\n return false;\n}\n\n/**\n * Checks if user can download selected nodes (either files or folders).\n * JSON ref: `app.selection.canDownload`\n */\nexport function canDownloadSelection(context: RuleContext): boolean {\n if (!context.selection.isEmpty && navigation.isNotTrashcan(context)) {\n return context.selection.nodes.every((node: any) => {\n return node.entry && (node.entry.isFile || node.entry.isFolder || !!node.entry.nodeId);\n });\n }\n return false;\n}\n\n/**\n * Checks if user has selected a folder.\n * JSON ref: `app.selection.folder`\n */\nexport function hasFolderSelected(context: RuleContext): boolean {\n const folder = context.selection.folder;\n return folder ? true : false;\n}\n\n/**\n * Checks if user has selected a library (site).\n * JSON ref: `app.selection.library`\n */\nexport function hasLibrarySelected(context: RuleContext): boolean {\n const library = context.selection.library;\n return library ? true : false;\n}\n\n/**\n * Checks if user has selected a **private** library (site)\n * JSON ref: `app.selection.isPrivateLibrary`\n */\nexport function isPrivateLibrary(context: RuleContext): boolean {\n const library = context.selection.library;\n return library ? !!(library.entry && library.entry.visibility && library.entry.visibility === 'PRIVATE') : false;\n}\n\n/**\n * Checks if the selected library has a **role** property defined.\n * JSON ref: `app.selection.hasLibraryRole`\n */\nexport function hasLibraryRole(context: RuleContext): boolean {\n const library = context.selection.library;\n return library ? !!(library.entry && library.entry.role) : false;\n}\n\n/**\n * Checks if the selected library has no **role** property defined.\n * JSON ref: `app.selection.hasNoLibraryRole`\n */\nexport function hasNoLibraryRole(context: RuleContext): boolean {\n return !hasLibraryRole(context);\n}\n\n/**\n * Checks if user has selected a file.\n * JSON ref: `app.selection.file`\n */\nexport function hasFileSelected(context: RuleContext): boolean {\n if (context && context.selection && context.selection.file) {\n return true;\n }\n return false;\n}\n\n/**\n * Checks if user can update the first selected node.\n * JSON ref: `app.selection.first.canUpdate`\n */\nexport function canUpdateSelectedNode(context: RuleContext): boolean {\n if (context.selection && !context.selection.isEmpty) {\n const node = context.selection.first;\n\n if (node.entry.isFile && hasLockedFiles(context)) {\n return false;\n }\n\n return context.permissions.check(node, ['update']);\n }\n return false;\n}\n\n/**\n * Checks if user can update the first selected folder.\n * JSON ref: `app.selection.folder.canUpdate`\n */\nexport function canUpdateSelectedFolder(context: RuleContext): boolean {\n const { folder } = context.selection;\n if (folder) {\n return (\n // workaround for Favorites Api\n navigation.isFavorites(context) || context.permissions.check(folder.entry, ['update'])\n );\n }\n return false;\n}\n\n/**\n * Checks if user has selected a **locked** file node.\n * JSON ref: `app.selection.file.isLocked`\n */\nexport function hasLockedFiles(context: RuleContext): boolean {\n if (context && context.selection && context.selection.nodes) {\n return context.selection.nodes.some((node) => {\n if (!node.entry.isFile) {\n return false;\n }\n\n return node.entry.isLocked || (node.entry.properties && node.entry.properties['cm:lockType'] === 'READ_ONLY_LOCK');\n });\n }\n\n return false;\n}\n\n/**\n * Checks if the selected file has **write** or **read-only** locks specified.\n * JSON ref: `app.selection.file.isLocked`\n */\nexport function isWriteLocked(context: RuleContext): boolean {\n return !!(\n context &&\n context.selection &&\n context.selection.file &&\n context.selection.file.entry &&\n context.selection.file.entry.properties &&\n (context.selection.file.entry.properties['cm:lockType'] === 'WRITE_LOCK' ||\n context.selection.file.entry.properties['cm:lockType'] === 'READ_ONLY_LOCK')\n );\n}\n\n/**\n * Checks if the selected file has **write** or **read-only** locks specified,\n * and that current user is the owner of the lock.\n * JSON ref: `app.selection.file.isLockOwner`\n */\nexport function isUserWriteLockOwner(context: RuleContext): boolean {\n return (\n isWriteLocked(context) &&\n context.selection.file.entry.properties['cm:lockOwner'] &&\n context.selection.file.entry.properties['cm:lockOwner'].id === context.profile.id\n );\n}\n\n/**\n * Checks if user can lock selected file.\n * JSON ref: `app.selection.file.canLock`\n */\nexport function canLockFile(context: RuleContext): boolean {\n return !isWriteLocked(context) && canUpdateSelectedNode(context);\n}\n\n/**\n * Checks if user can unlock selected file.\n * JSON ref: `app.selection.file.canUnlock`\n */\nexport function canUnlockFile(context: RuleContext): boolean {\n const { file } = context.selection;\n return isWriteLocked(context) && (context.permissions.check(file.entry, ['delete']) || isUserWriteLockOwner(context));\n}\n\n/**\n * Checks if user can upload a new version of the file.\n * JSON ref: `app.selection.file.canUploadVersion`\n */\nexport function canUploadVersion(context: RuleContext): boolean {\n if (navigation.isFavorites(context) || navigation.isSharedFiles(context)) {\n return hasFileSelected(context);\n }\n\n return [\n hasFileSelected(context),\n navigation.isNotTrashcan(context),\n isWriteLocked(context) ? isUserWriteLockOwner(context) : canUpdateSelectedNode(context)\n ].every(Boolean);\n}\n\n/**\n * Checks if user has trashcan item selected.\n * JSON ref: `isTrashcanItemSelected`\n * @param context Rule execution context\n */\nexport function isTrashcanItemSelected(context: RuleContext): boolean {\n return [navigation.isTrashcan(context), hasSelection(context)].every(Boolean);\n}\n\n/**\n * Checks if user can view the file.\n * JSON ref: `canViewFile`\n * @param context Rule execution context\n */\nexport function canViewFile(context: RuleContext): boolean {\n return [hasFileSelected(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if user can **Leave** selected library.\n * JSON ref: `canLeaveLibrary`\n * @param context Rule execution context\n */\nexport function canLeaveLibrary(context: RuleContext): boolean {\n return [hasLibrarySelected(context), hasLibraryRole(context)].every(Boolean);\n}\n\n/**\n * Checks if user can toggle shared link mode.\n * JSON ref: `canToggleSharedLink`\n * @param context Rule execution context\n */\nexport function canToggleSharedLink(context: RuleContext): boolean {\n return [hasFileSelected(context), [canShareFile(context), isShared(context)].some(Boolean)].every(Boolean);\n}\n\n/**\n * Checks if user can show **Info Drawer** for the selected node.\n * JSON ref: `canShowInfoDrawer`\n * @param context Rule execution context\n */\nexport function canShowInfoDrawer(context: RuleContext): boolean {\n return [hasSelection(context), navigation.isNotLibraries(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if user can manage file versions for the selected node.\n * JSON ref: `canManageFileVersions`\n * @param context Rule execution context\n */\nexport function canManageFileVersions(context: RuleContext): boolean {\n return [hasFileSelected(context), navigation.isNotTrashcan(context), !hasLockedFiles(context)].every(Boolean);\n}\n\n/**\n * Checks if user can manage permissions for the selected node.\n * JSON ref: `canManagePermissions`\n * @param context Rule execution context\n */\nexport function canManagePermissions(context: RuleContext): boolean {\n return [canUpdateSelectedNode(context), navigation.isNotTrashcan(context)].every(Boolean);\n}\n\n/**\n * Checks if user can toggle **Edit Offline** mode for selected node.\n * JSON ref: `canToggleEditOffline`\n * @param context Rule execution context\n */\nexport function canToggleEditOffline(context: RuleContext): boolean {\n return [hasFileSelected(context), navigation.isNotTrashcan(context), canLockFile(context) || canUnlockFile(context)].every(Boolean);\n}\n\n/**\n * @deprecated Uses workarounds for for recent files and search api issues.\n * Checks if user can toggle **Favorite** state for a node.\n * @param context Rule execution context\n */\nexport function canToggleFavorite(context: RuleContext): boolean {\n return [\n [canAddFavorite(context), canRemoveFavorite(context)].some(Boolean),\n [navigation.isRecentFiles(context), navigation.isSharedFiles(context), navigation.isSearchResults(context), navigation.isFavorites(context)].some(\n Boolean\n )\n ].every(Boolean);\n}\n\n/**\n * Checks if application should render language picker menu.\n * JSON ref: `canShowLanguagePicker`\n * @param context Rule execution context\n */\nexport function canShowLanguagePicker(context: AcaRuleContext): boolean {\n return context.languagePicker;\n}\n\n/**\n * Checks if application should render logout option.\n * JSON ref: `canShowLogout`\n * @param context Rule execution context\n */\nexport function canShowLogout(context: AcaRuleContext): boolean {\n return !context.withCredentials;\n}\n\n/**\n * Checks if user is library manager\n * JSON ref: `isLibraryManager`\n * @param context Rule execution context\n */\nexport function isLibraryManager(context: RuleContext): boolean {\n return hasLibrarySelected(context) && context.selection.library.entry && context.selection.library.entry.role === 'SiteManager';\n}\n","/*!\n * @license\n * Alfresco Example Content Application\n *\n * Copyright (C) 2005 - 2020 Alfresco Software Limited\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { RuleContext } from '@alfresco/adf-extensions';\n\n/**\n * Checks if user is admin.\n * JSON ref: `user.isAdmin`\n */\nexport function isAdmin(context: RuleContext): boolean {\n return context.profile.isAdmin;\n}\n"]}