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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/README.md +2 -1
  2. package/esm2020/alfresco-aca-shared.mjs +5 -0
  3. package/esm2020/lib/adf-extensions/extensions-data-loader.guard.mjs +74 -0
  4. package/esm2020/lib/components/document-base-page/document-base-page.component.mjs +160 -0
  5. package/esm2020/lib/components/document-base-page/document-base-page.service.mjs +10 -0
  6. package/esm2020/lib/components/generic-error/generic-error.component.mjs +42 -0
  7. package/esm2020/lib/components/generic-error/generic-error.module.mjs +45 -0
  8. package/esm2020/lib/components/info-drawer/info-drawer.component.mjs +124 -0
  9. package/esm2020/lib/components/info-drawer/shared-info-drawer.module.mjs +47 -0
  10. package/esm2020/lib/components/locked-by/locked-by.component.mjs +53 -0
  11. package/esm2020/lib/components/locked-by/locked-by.module.mjs +45 -0
  12. package/esm2020/lib/components/page-layout/page-layout-content.component.mjs +49 -0
  13. package/{esm2015/lib/models/types.js → esm2020/lib/components/page-layout/page-layout-error.component.mjs} +16 -42
  14. package/esm2020/lib/components/page-layout/page-layout-header.component.mjs +41 -0
  15. package/esm2020/lib/components/page-layout/page-layout.component.mjs +41 -0
  16. package/esm2020/lib/components/page-layout/page-layout.module.mjs +45 -0
  17. package/esm2020/lib/components/tool-bar/shared-toolbar.module.mjs +47 -0
  18. package/esm2020/lib/components/tool-bar/toolbar-action/toolbar-action.component.mjs +58 -0
  19. package/esm2020/lib/components/tool-bar/toolbar-button/toolbar-button.component.mjs +67 -0
  20. package/esm2020/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.mjs +78 -0
  21. package/esm2020/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.mjs +69 -0
  22. package/esm2020/lib/directives/contextmenu/contextmenu.directive.mjs +107 -0
  23. package/{esm2015/lib/components/locked-by/locked-by.module.js → esm2020/lib/directives/contextmenu/contextmenu.module.mjs} +17 -16
  24. package/esm2020/lib/directives/pagination.directive.mjs +55 -0
  25. package/esm2020/lib/directives/shared.directives.module.mjs +42 -0
  26. package/esm2020/lib/models/modal-configuration.mjs +2 -0
  27. package/esm2020/lib/models/types.mjs +26 -0
  28. package/esm2020/lib/models/viewer.rules.mjs +26 -0
  29. package/esm2020/lib/routing/shared.guard.mjs +49 -0
  30. package/esm2020/lib/services/alfresco-office-extension.service.mjs +64 -0
  31. package/esm2020/lib/services/app-hook.service.mjs +88 -0
  32. package/esm2020/lib/services/app.extension.service.mjs +453 -0
  33. package/esm2020/lib/services/app.service.mjs +213 -0
  34. package/esm2020/lib/services/content-api.service.mjs +268 -0
  35. package/esm2020/lib/services/node-permission.service.mjs +90 -0
  36. package/esm2020/lib/services/router.extension.service.mjs +106 -0
  37. package/esm2020/lib/shared.module.mjs +49 -0
  38. package/esm2020/lib/testing/lib-testing-module.mjs +118 -0
  39. package/esm2020/lib/testing/translation.service.mjs +45 -0
  40. package/esm2020/lib/utils/node.utils.mjs +34 -0
  41. package/esm2020/public-api.mjs +63 -0
  42. package/esm2020/rules/alfresco-aca-shared-rules.mjs +5 -0
  43. package/esm2020/rules/app.rules.mjs +503 -0
  44. package/esm2020/rules/navigation.rules.mjs +152 -0
  45. package/{esm5/store/store.module.js → esm2020/rules/public-api.mjs} +5 -23
  46. package/{esm5/store/actions/metadata-aspect.actions.js → esm2020/rules/repository.rules.mjs} +9 -20
  47. package/{esm2015/rules/repository.rules.js → esm2020/rules/user.rules.mjs} +4 -12
  48. package/esm2020/store/actions/app-action-types.mjs +48 -0
  49. package/esm2020/store/actions/app.actions.mjs +135 -0
  50. package/esm2020/store/actions/context-menu-action-types.mjs +29 -0
  51. package/esm2020/store/actions/contextmenu.actions.mjs +32 -0
  52. package/esm2020/store/actions/library.actions.mjs +64 -0
  53. package/{esm5/lib/components/locked-by/locked-by.module.js → esm2020/store/actions/metadata-aspect.actions.mjs} +7 -21
  54. package/esm2020/store/actions/node.actions.mjs +189 -0
  55. package/esm2020/store/actions/router-action-types.mjs +33 -0
  56. package/esm2020/store/actions/router.actions.mjs +55 -0
  57. package/{esm2015/lib/components/page-layout/page-layout-content.component.js → esm2020/store/actions/search.actions.mjs} +10 -27
  58. package/esm2020/store/actions/snackbar.actions.mjs +58 -0
  59. package/esm2020/store/actions/template-action-types.mjs +32 -0
  60. package/esm2020/store/actions/template.actions.mjs +48 -0
  61. package/esm2020/store/actions/upload.actions.mjs +50 -0
  62. package/esm2020/store/actions/viewer.actions.mjs +82 -0
  63. package/esm2020/store/alfresco-aca-shared-store.mjs +5 -0
  64. package/esm2020/store/effects/dialog.effects.mjs +45 -0
  65. package/esm2020/store/effects/router.effects.mjs +117 -0
  66. package/esm2020/store/effects/snackbar.effects.mjs +86 -0
  67. package/esm2020/store/models/delete-status.model.mjs +26 -0
  68. package/esm2020/store/models/deleted-node-info.model.mjs +26 -0
  69. package/esm2020/store/models/modal-configuration.mjs +2 -0
  70. package/{esm2015/lib/components/page-layout/page-layout-error.component.js → esm2020/store/models/node-info.model.mjs} +2 -19
  71. package/{esm5/lib/components/page-layout/page-layout-error.component.js → esm2020/store/models/search-option.model.mjs} +7 -21
  72. package/esm2020/store/public-api.mjs +50 -0
  73. package/esm2020/store/selectors/app.selectors.mjs +60 -0
  74. package/{esm5/lib/directives/shared.directives.module.js → esm2020/store/states/app.state.mjs} +3 -21
  75. package/esm2020/store/store.module.mjs +43 -0
  76. package/fesm2015/alfresco-aca-shared-rules.mjs +751 -0
  77. package/fesm2015/alfresco-aca-shared-rules.mjs.map +1 -0
  78. package/fesm2015/alfresco-aca-shared-store.mjs +1327 -0
  79. package/fesm2015/alfresco-aca-shared-store.mjs.map +1 -0
  80. package/fesm2015/alfresco-aca-shared.mjs +2726 -0
  81. package/fesm2015/alfresco-aca-shared.mjs.map +1 -0
  82. package/{fesm2015/alfresco-aca-shared-rules.js → fesm2020/alfresco-aca-shared-rules.mjs} +273 -353
  83. package/fesm2020/alfresco-aca-shared-rules.mjs.map +1 -0
  84. package/fesm2020/alfresco-aca-shared-store.mjs +1406 -0
  85. package/fesm2020/alfresco-aca-shared-store.mjs.map +1 -0
  86. package/fesm2020/alfresco-aca-shared.mjs +2841 -0
  87. package/fesm2020/alfresco-aca-shared.mjs.map +1 -0
  88. package/{rules/alfresco-aca-shared-rules.d.ts → index.d.ts} +1 -0
  89. package/lib/adf-extensions/extensions-data-loader.guard.d.ts +4 -1
  90. package/lib/components/document-base-page/document-base-page.component.d.ts +74 -0
  91. package/lib/components/document-base-page/document-base-page.service.d.ts +5 -0
  92. package/lib/components/generic-error/generic-error.component.d.ts +3 -24
  93. package/lib/components/generic-error/generic-error.module.d.ts +8 -24
  94. package/lib/components/info-drawer/info-drawer.component.d.ts +6 -0
  95. package/lib/components/info-drawer/shared-info-drawer.module.d.ts +11 -24
  96. package/lib/components/locked-by/locked-by.component.d.ts +5 -30
  97. package/lib/components/locked-by/locked-by.module.d.ts +8 -24
  98. package/lib/components/page-layout/page-layout-content.component.d.ts +3 -24
  99. package/lib/components/page-layout/page-layout-error.component.d.ts +3 -24
  100. package/lib/components/page-layout/page-layout-header.component.d.ts +3 -24
  101. package/lib/components/page-layout/page-layout.component.d.ts +3 -24
  102. package/lib/components/page-layout/page-layout.module.d.ts +9 -24
  103. package/lib/components/tool-bar/shared-toolbar.module.d.ts +11 -24
  104. package/lib/components/tool-bar/toolbar-action/toolbar-action.component.d.ts +7 -2
  105. package/lib/components/tool-bar/toolbar-button/toolbar-button.component.d.ts +5 -25
  106. package/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.d.ts +15 -6
  107. package/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.d.ts +7 -27
  108. package/lib/directives/contextmenu/contextmenu.directive.d.ts +5 -1
  109. package/lib/directives/contextmenu/contextmenu.module.d.ts +5 -24
  110. package/lib/directives/pagination.directive.d.ts +3 -0
  111. package/lib/directives/shared.directives.module.d.ts +6 -24
  112. package/lib/models/modal-configuration.d.ts +3 -0
  113. package/lib/models/viewer.rules.d.ts +4 -0
  114. package/lib/routing/shared.guard.d.ts +3 -24
  115. package/lib/services/alfresco-office-extension.service.d.ts +11 -0
  116. package/lib/services/app-hook.service.d.ts +55 -0
  117. package/lib/services/app.extension.service.d.ts +31 -53
  118. package/lib/services/app.service.d.ts +43 -7
  119. package/lib/services/content-api.service.d.ts +35 -25
  120. package/lib/services/node-permission.service.d.ts +3 -24
  121. package/lib/services/router.extension.service.d.ts +21 -0
  122. package/lib/shared.module.d.ts +6 -1
  123. package/lib/testing/lib-testing-module.d.ts +43 -0
  124. package/lib/testing/translation.service.d.ts +10 -0
  125. package/package.json +58 -21
  126. package/public-api.d.ts +19 -5
  127. package/rules/app.rules.d.ts +104 -30
  128. package/{store/alfresco-aca-shared-store.d.ts → rules/index.d.ts} +1 -0
  129. package/rules/navigation.rules.d.ts +6 -6
  130. package/rules/repository.rules.d.ts +2 -1
  131. package/rules/user.rules.d.ts +1 -1
  132. package/store/actions/app-action-types.d.ts +46 -0
  133. package/store/actions/app.actions.d.ts +25 -18
  134. package/{lib/routing/app.routes.strategy.d.ts → store/actions/context-menu-action-types.d.ts} +2 -15
  135. package/store/actions/contextmenu.actions.d.ts +1 -3
  136. package/store/actions/library.actions.d.ts +3 -1
  137. package/store/actions/node.actions.d.ts +33 -7
  138. package/store/actions/router-action-types.d.ts +31 -0
  139. package/store/actions/router.actions.d.ts +5 -6
  140. package/store/actions/search.actions.d.ts +1 -13
  141. package/store/actions/snackbar.actions.d.ts +8 -11
  142. package/store/actions/template-action-types.d.ts +30 -0
  143. package/store/actions/template.actions.d.ts +1 -6
  144. package/store/actions/upload.actions.d.ts +3 -1
  145. package/store/actions/viewer.actions.d.ts +22 -1
  146. package/store/effects/dialog.effects.d.ts +4 -1
  147. package/store/effects/router.effects.d.ts +11 -29
  148. package/store/effects/snackbar.effects.d.ts +6 -3
  149. package/store/index.d.ts +5 -0
  150. package/store/models/modal-configuration.d.ts +3 -0
  151. package/store/public-api.d.ts +4 -0
  152. package/store/selectors/app.selectors.d.ts +33 -19
  153. package/store/states/app.state.d.ts +10 -2
  154. package/store/store.module.d.ts +5 -24
  155. package/alfresco-aca-shared.d.ts +0 -11
  156. package/alfresco-aca-shared.metadata.json +0 -1
  157. package/bundles/alfresco-aca-shared-rules.umd.js +0 -895
  158. package/bundles/alfresco-aca-shared-rules.umd.js.map +0 -1
  159. package/bundles/alfresco-aca-shared-rules.umd.min.js +0 -75
  160. package/bundles/alfresco-aca-shared-rules.umd.min.js.map +0 -1
  161. package/bundles/alfresco-aca-shared-store.umd.js +0 -1399
  162. package/bundles/alfresco-aca-shared-store.umd.js.map +0 -1
  163. package/bundles/alfresco-aca-shared-store.umd.min.js +0 -26
  164. package/bundles/alfresco-aca-shared-store.umd.min.js.map +0 -1
  165. package/bundles/alfresco-aca-shared.umd.js +0 -2845
  166. package/bundles/alfresco-aca-shared.umd.js.map +0 -1
  167. package/bundles/alfresco-aca-shared.umd.min.js +0 -27
  168. package/bundles/alfresco-aca-shared.umd.min.js.map +0 -1
  169. package/esm2015/alfresco-aca-shared.js +0 -16
  170. package/esm2015/lib/adf-extensions/extensions-data-loader.guard.js +0 -106
  171. package/esm2015/lib/components/generic-error/generic-error.component.js +0 -52
  172. package/esm2015/lib/components/generic-error/generic-error.module.js +0 -43
  173. package/esm2015/lib/components/info-drawer/info-drawer.component.js +0 -179
  174. package/esm2015/lib/components/info-drawer/shared-info-drawer.module.js +0 -52
  175. package/esm2015/lib/components/locked-by/locked-by.component.js +0 -74
  176. package/esm2015/lib/components/page-layout/page-layout-header.component.js +0 -41
  177. package/esm2015/lib/components/page-layout/page-layout.component.js +0 -52
  178. package/esm2015/lib/components/page-layout/page-layout.module.js +0 -54
  179. package/esm2015/lib/components/tool-bar/shared-toolbar.module.js +0 -56
  180. package/esm2015/lib/components/tool-bar/toolbar-action/toolbar-action.component.js +0 -81
  181. package/esm2015/lib/components/tool-bar/toolbar-button/toolbar-button.component.js +0 -96
  182. package/esm2015/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.js +0 -69
  183. package/esm2015/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.js +0 -95
  184. package/esm2015/lib/directives/contextmenu/contextmenu.directive.js +0 -156
  185. package/esm2015/lib/directives/contextmenu/contextmenu.module.js +0 -42
  186. package/esm2015/lib/directives/pagination.directive.js +0 -93
  187. package/esm2015/lib/directives/shared.directives.module.js +0 -41
  188. package/esm2015/lib/models/viewer.rules.js +0 -40
  189. package/esm2015/lib/routing/app.routes.strategy.js +0 -207
  190. package/esm2015/lib/routing/shared.guard.js +0 -70
  191. package/esm2015/lib/services/app.extension.service.js +0 -686
  192. package/esm2015/lib/services/app.service.js +0 -95
  193. package/esm2015/lib/services/content-api.service.js +0 -331
  194. package/esm2015/lib/services/node-permission.service.js +0 -133
  195. package/esm2015/lib/shared.module.js +0 -51
  196. package/esm2015/lib/utils/node.utils.js +0 -53
  197. package/esm2015/public-api.js +0 -53
  198. package/esm2015/rules/alfresco-aca-shared-rules.js +0 -9
  199. package/esm2015/rules/app.rules.js +0 -563
  200. package/esm2015/rules/navigation.rules.js +0 -211
  201. package/esm2015/rules/public-api.js +0 -33
  202. package/esm2015/rules/user.rules.js +0 -38
  203. package/esm2015/store/actions/app.actions.js +0 -234
  204. package/esm2015/store/actions/contextmenu.actions.js +0 -49
  205. package/esm2015/store/actions/library.actions.js +0 -111
  206. package/esm2015/store/actions/metadata-aspect.actions.js +0 -46
  207. package/esm2015/store/actions/node.actions.js +0 -337
  208. package/esm2015/store/actions/router.actions.js +0 -97
  209. package/esm2015/store/actions/search.actions.js +0 -83
  210. package/esm2015/store/actions/snackbar.actions.js +0 -138
  211. package/esm2015/store/actions/template.actions.js +0 -85
  212. package/esm2015/store/actions/upload.actions.js +0 -81
  213. package/esm2015/store/actions/viewer.actions.js +0 -115
  214. package/esm2015/store/alfresco-aca-shared-store.js +0 -9
  215. package/esm2015/store/effects/dialog.effects.js +0 -72
  216. package/esm2015/store/effects/router.effects.js +0 -192
  217. package/esm2015/store/effects/snackbar.effects.js +0 -144
  218. package/esm2015/store/models/delete-status.model.js +0 -55
  219. package/esm2015/store/models/deleted-node-info.model.js +0 -41
  220. package/esm2015/store/models/node-info.model.js +0 -45
  221. package/esm2015/store/models/search-option.model.js +0 -52
  222. package/esm2015/store/public-api.js +0 -50
  223. package/esm2015/store/selectors/app.selectors.js +0 -82
  224. package/esm2015/store/states/app.state.js +0 -71
  225. package/esm2015/store/store.module.js +0 -43
  226. package/esm5/alfresco-aca-shared.js +0 -16
  227. package/esm5/lib/adf-extensions/extensions-data-loader.guard.js +0 -115
  228. package/esm5/lib/components/generic-error/generic-error.component.js +0 -54
  229. package/esm5/lib/components/generic-error/generic-error.module.js +0 -47
  230. package/esm5/lib/components/info-drawer/info-drawer.component.js +0 -209
  231. package/esm5/lib/components/info-drawer/shared-info-drawer.module.js +0 -56
  232. package/esm5/lib/components/locked-by/locked-by.component.js +0 -80
  233. package/esm5/lib/components/page-layout/page-layout-content.component.js +0 -53
  234. package/esm5/lib/components/page-layout/page-layout-header.component.js +0 -45
  235. package/esm5/lib/components/page-layout/page-layout.component.js +0 -54
  236. package/esm5/lib/components/page-layout/page-layout.module.js +0 -58
  237. package/esm5/lib/components/tool-bar/shared-toolbar.module.js +0 -60
  238. package/esm5/lib/components/tool-bar/toolbar-action/toolbar-action.component.js +0 -88
  239. package/esm5/lib/components/tool-bar/toolbar-button/toolbar-button.component.js +0 -103
  240. package/esm5/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.js +0 -80
  241. package/esm5/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.js +0 -103
  242. package/esm5/lib/directives/contextmenu/contextmenu.directive.js +0 -187
  243. package/esm5/lib/directives/contextmenu/contextmenu.module.js +0 -46
  244. package/esm5/lib/directives/pagination.directive.js +0 -97
  245. package/esm5/lib/models/types.js +0 -67
  246. package/esm5/lib/models/viewer.rules.js +0 -40
  247. package/esm5/lib/routing/app.routes.strategy.js +0 -268
  248. package/esm5/lib/routing/shared.guard.js +0 -77
  249. package/esm5/lib/services/app.extension.service.js +0 -835
  250. package/esm5/lib/services/app.service.js +0 -100
  251. package/esm5/lib/services/content-api.service.js +0 -495
  252. package/esm5/lib/services/node-permission.service.js +0 -161
  253. package/esm5/lib/shared.module.js +0 -58
  254. package/esm5/lib/utils/node.utils.js +0 -53
  255. package/esm5/public-api.js +0 -53
  256. package/esm5/rules/alfresco-aca-shared-rules.js +0 -9
  257. package/esm5/rules/app.rules.js +0 -563
  258. package/esm5/rules/navigation.rules.js +0 -211
  259. package/esm5/rules/public-api.js +0 -33
  260. package/esm5/rules/repository.rules.js +0 -38
  261. package/esm5/rules/user.rules.js +0 -38
  262. package/esm5/store/actions/app.actions.js +0 -232
  263. package/esm5/store/actions/contextmenu.actions.js +0 -48
  264. package/esm5/store/actions/library.actions.js +0 -108
  265. package/esm5/store/actions/node.actions.js +0 -322
  266. package/esm5/store/actions/router.actions.js +0 -93
  267. package/esm5/store/actions/search.actions.js +0 -87
  268. package/esm5/store/actions/snackbar.actions.js +0 -130
  269. package/esm5/store/actions/template.actions.js +0 -87
  270. package/esm5/store/actions/upload.actions.js +0 -78
  271. package/esm5/store/actions/viewer.actions.js +0 -109
  272. package/esm5/store/alfresco-aca-shared-store.js +0 -9
  273. package/esm5/store/effects/dialog.effects.js +0 -71
  274. package/esm5/store/effects/router.effects.js +0 -207
  275. package/esm5/store/effects/snackbar.effects.js +0 -154
  276. package/esm5/store/models/delete-status.model.js +0 -55
  277. package/esm5/store/models/deleted-node-info.model.js +0 -41
  278. package/esm5/store/models/node-info.model.js +0 -45
  279. package/esm5/store/models/search-option.model.js +0 -52
  280. package/esm5/store/public-api.js +0 -50
  281. package/esm5/store/selectors/app.selectors.js +0 -82
  282. package/esm5/store/states/app.state.js +0 -71
  283. package/fesm2015/alfresco-aca-shared-rules.js.map +0 -1
  284. package/fesm2015/alfresco-aca-shared-store.js +0 -1354
  285. package/fesm2015/alfresco-aca-shared-store.js.map +0 -1
  286. package/fesm2015/alfresco-aca-shared.js +0 -2096
  287. package/fesm2015/alfresco-aca-shared.js.map +0 -1
  288. package/fesm5/alfresco-aca-shared-rules.js +0 -827
  289. package/fesm5/alfresco-aca-shared-rules.js.map +0 -1
  290. package/fesm5/alfresco-aca-shared-store.js +0 -1278
  291. package/fesm5/alfresco-aca-shared-store.js.map +0 -1
  292. package/fesm5/alfresco-aca-shared.js +0 -2637
  293. package/fesm5/alfresco-aca-shared.js.map +0 -1
  294. package/rules/alfresco-aca-shared-rules.metadata.json +0 -1
  295. package/rules/package.json +0 -13
  296. package/store/alfresco-aca-shared-store.metadata.json +0 -1
  297. package/store/package.json +0 -13
@@ -0,0 +1,2841 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, HostBinding, NgModule, ViewChild, QueryList, ViewChildren, HostListener, Directive } from '@angular/core';
3
+ import { of, forkJoin, BehaviorSubject, from, Subject } from 'rxjs';
4
+ import { map, tap, catchError, filter, takeUntil, debounceTime, take } from 'rxjs/operators';
5
+ import * as i1 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+ import { NodesApi, TrashcanApi, SharedlinksApi, DiscoveryApi, FavoritesApi, ContentApi, SitesApi, SearchApi, PeopleApi, VersionsApi } from '@alfresco/js-api';
8
+ import * as i1$1 from '@angular/material/icon';
9
+ import { MatIconModule } from '@angular/material/icon';
10
+ import * as i2 from '@ngx-translate/core';
11
+ import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';
12
+ import * as i1$3 from '@ngrx/store';
13
+ import { StoreModule } from '@ngrx/store';
14
+ import * as i6 from '@angular/platform-browser';
15
+ import { getRuleContext, infoDrawerPreview, SetInfoDrawerStateAction, ToggleInfoDrawerAction, getSharedUrl, isInfoDrawerOpened, getDocumentDisplayMode, getAppSelection, getCurrentFolder, SetSelectedNodesAction, ViewNodeAction, ReloadDocumentListAction, ContextMenu, isQuickShareEnabled, CloseModalDialogsAction, SetCurrentUrlAction, ResetSelectionAction, SnackbarErrorAction, SetRepositoryInfoAction, SetUserProfileAction, SetInitialStateAction, getCustomCssPath, getCustomWebFontPath, STORE_INITIAL_APP_DATA } from '@alfresco/aca-shared/store';
16
+ import * as i3 from '@alfresco/adf-extensions';
17
+ import { sortByOrder, reduceEmptyMenus, mergeObjects, mergeArrays, ContentActionType, reduceSeparators, ExtensionsModule } from '@alfresco/adf-extensions';
18
+ import * as i1$2 from '@alfresco/adf-core';
19
+ import { CoreModule, InfoDrawerModule, ToolbarModule, ShowHeaderMode, PipeModule, AlfrescoApiService, AlfrescoApiServiceMock, TranslationService, TranslationMock, TranslateLoaderService } from '@alfresco/adf-core';
20
+ import * as i4 from '@angular/material/menu';
21
+ import { MatMenuItem, MatMenu } from '@angular/material/menu';
22
+ import * as i3$1 from '@angular/material/divider';
23
+ import * as i2$1 from '@angular/material/button';
24
+ import * as i6$1 from '@angular/material/progress-bar';
25
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
26
+ import * as i6$2 from '@alfresco/adf-content-services';
27
+ import { DocumentListComponent } from '@alfresco/adf-content-services';
28
+ import * as i7 from '@angular/cdk/overlay';
29
+ import * as i3$2 from '@angular/router';
30
+ import { ActivationEnd, NavigationStart } from '@angular/router';
31
+ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
32
+ import { HttpClientModule } from '@angular/common/http';
33
+ import { RouterTestingModule } from '@angular/router/testing';
34
+ import * as i1$4 from '@ngrx/effects';
35
+ import { EffectsModule } from '@ngrx/effects';
36
+
37
+ /*!
38
+ * @license
39
+ * Alfresco Example Content Application
40
+ *
41
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
42
+ *
43
+ * This file is part of the Alfresco Example Content Application.
44
+ * If the software was purchased under a paid Alfresco license, the terms of
45
+ * the paid license agreement will prevail. Otherwise, the software is
46
+ * provided under the following open source license terms:
47
+ *
48
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
49
+ * it under the terms of the GNU Lesser General Public License as published by
50
+ * the Free Software Foundation, either version 3 of the License, or
51
+ * (at your option) any later version.
52
+ *
53
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
54
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
55
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56
+ * GNU Lesser General Public License for more details.
57
+ *
58
+ * You should have received a copy of the GNU Lesser General Public License
59
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
60
+ */
61
+ const DefaultExtensionLoaderFactory = () => [];
62
+ const EXTENSION_DATA_LOADERS = new InjectionToken('EXTENSION_DATA_LOADERS', {
63
+ providedIn: 'root',
64
+ factory: DefaultExtensionLoaderFactory
65
+ });
66
+ class ExtensionsDataLoaderGuard {
67
+ constructor(extensionDataLoaders) {
68
+ this.extensionDataLoaders = extensionDataLoaders;
69
+ this.invoked = false;
70
+ }
71
+ canActivate(route) {
72
+ if (!this.invoked) {
73
+ if (!this.extensionDataLoaders.length) {
74
+ this.invoked = true;
75
+ return of(true);
76
+ }
77
+ const dataLoaderCallbacks = this.extensionDataLoaders.map((callback) => callback(route));
78
+ // Undocumented forkJoin behaviour/bug:
79
+ // https://github.com/ReactiveX/rxjs/issues/3246
80
+ // So all callbacks need to emit before completion, otherwise forkJoin will short circuit
81
+ return forkJoin(...dataLoaderCallbacks).pipe(map(() => true), tap(() => (this.invoked = true)), catchError((e) => {
82
+ // eslint-disable-next-line no-console
83
+ console.error('Some of the extension data loader guards has been errored.');
84
+ // eslint-disable-next-line no-console
85
+ console.error(e);
86
+ return of(true);
87
+ }));
88
+ }
89
+ else {
90
+ return of(true);
91
+ }
92
+ }
93
+ canActivateChild() {
94
+ return of(true);
95
+ }
96
+ }
97
+ ExtensionsDataLoaderGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ExtensionsDataLoaderGuard, deps: [{ token: EXTENSION_DATA_LOADERS }], target: i0.ɵɵFactoryTarget.Injectable });
98
+ ExtensionsDataLoaderGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ExtensionsDataLoaderGuard, providedIn: 'root' });
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ExtensionsDataLoaderGuard, decorators: [{
100
+ type: Injectable,
101
+ args: [{ providedIn: 'root' }]
102
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
103
+ type: Inject,
104
+ args: [EXTENSION_DATA_LOADERS]
105
+ }] }]; } });
106
+
107
+ /*!
108
+ * @license
109
+ * Alfresco Example Content Application
110
+ *
111
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
112
+ *
113
+ * This file is part of the Alfresco Example Content Application.
114
+ * If the software was purchased under a paid Alfresco license, the terms of
115
+ * the paid license agreement will prevail. Otherwise, the software is
116
+ * provided under the following open source license terms:
117
+ *
118
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
119
+ * it under the terms of the GNU Lesser General Public License as published by
120
+ * the Free Software Foundation, either version 3 of the License, or
121
+ * (at your option) any later version.
122
+ *
123
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
124
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
125
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
126
+ * GNU Lesser General Public License for more details.
127
+ *
128
+ * You should have received a copy of the GNU Lesser General Public License
129
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
130
+ */
131
+ class PageLayoutContentComponent {
132
+ constructor() {
133
+ this.scrollable = false;
134
+ }
135
+ }
136
+ PageLayoutContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
137
+ PageLayoutContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutContentComponent, selector: "aca-page-layout-content", inputs: { scrollable: "scrollable" }, host: { properties: { "class.scrollable": "this.scrollable" }, classAttribute: "aca-page-layout-content" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutContentComponent, decorators: [{
139
+ type: Component,
140
+ args: [{
141
+ selector: 'aca-page-layout-content',
142
+ template: `<ng-content></ng-content>`,
143
+ encapsulation: ViewEncapsulation.None,
144
+ changeDetection: ChangeDetectionStrategy.OnPush,
145
+ host: { class: 'aca-page-layout-content' }
146
+ }]
147
+ }], propDecorators: { scrollable: [{
148
+ type: Input
149
+ }, {
150
+ type: HostBinding,
151
+ args: ['class.scrollable']
152
+ }] } });
153
+
154
+ /*!
155
+ * @license
156
+ * Alfresco Example Content Application
157
+ *
158
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
159
+ *
160
+ * This file is part of the Alfresco Example Content Application.
161
+ * If the software was purchased under a paid Alfresco license, the terms of
162
+ * the paid license agreement will prevail. Otherwise, the software is
163
+ * provided under the following open source license terms:
164
+ *
165
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
166
+ * it under the terms of the GNU Lesser General Public License as published by
167
+ * the Free Software Foundation, either version 3 of the License, or
168
+ * (at your option) any later version.
169
+ *
170
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
171
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
172
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
173
+ * GNU Lesser General Public License for more details.
174
+ *
175
+ * You should have received a copy of the GNU Lesser General Public License
176
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
177
+ */
178
+ class PageLayoutErrorComponent {
179
+ }
180
+ PageLayoutErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
+ PageLayoutErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutErrorComponent, selector: "aca-page-layout-error", host: { classAttribute: "aca-page-layout-error" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutErrorComponent, decorators: [{
183
+ type: Component,
184
+ args: [{
185
+ selector: 'aca-page-layout-error',
186
+ template: `<ng-content></ng-content>`,
187
+ encapsulation: ViewEncapsulation.None,
188
+ changeDetection: ChangeDetectionStrategy.OnPush,
189
+ host: { class: 'aca-page-layout-error' }
190
+ }]
191
+ }] });
192
+
193
+ /*!
194
+ * @license
195
+ * Alfresco Example Content Application
196
+ *
197
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
198
+ *
199
+ * This file is part of the Alfresco Example Content Application.
200
+ * If the software was purchased under a paid Alfresco license, the terms of
201
+ * the paid license agreement will prevail. Otherwise, the software is
202
+ * provided under the following open source license terms:
203
+ *
204
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
205
+ * it under the terms of the GNU Lesser General Public License as published by
206
+ * the Free Software Foundation, either version 3 of the License, or
207
+ * (at your option) any later version.
208
+ *
209
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
210
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
211
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
212
+ * GNU Lesser General Public License for more details.
213
+ *
214
+ * You should have received a copy of the GNU Lesser General Public License
215
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
216
+ */
217
+ class PageLayoutHeaderComponent {
218
+ }
219
+ PageLayoutHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
220
+ PageLayoutHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutHeaderComponent, selector: "aca-page-layout-header", host: { classAttribute: "aca-page-layout-header" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutHeaderComponent, decorators: [{
222
+ type: Component,
223
+ args: [{
224
+ selector: 'aca-page-layout-header',
225
+ template: '<ng-content></ng-content>',
226
+ encapsulation: ViewEncapsulation.None,
227
+ changeDetection: ChangeDetectionStrategy.OnPush,
228
+ host: { class: 'aca-page-layout-header' }
229
+ }]
230
+ }] });
231
+
232
+ /*!
233
+ * @license
234
+ * Alfresco Example Content Application
235
+ *
236
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
237
+ *
238
+ * This file is part of the Alfresco Example Content Application.
239
+ * If the software was purchased under a paid Alfresco license, the terms of
240
+ * the paid license agreement will prevail. Otherwise, the software is
241
+ * provided under the following open source license terms:
242
+ *
243
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
244
+ * it under the terms of the GNU Lesser General Public License as published by
245
+ * the Free Software Foundation, either version 3 of the License, or
246
+ * (at your option) any later version.
247
+ *
248
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
249
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
250
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
251
+ * GNU Lesser General Public License for more details.
252
+ *
253
+ * You should have received a copy of the GNU Lesser General Public License
254
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
255
+ */
256
+ class PageLayoutComponent {
257
+ constructor() {
258
+ this.hasError = false;
259
+ }
260
+ }
261
+ PageLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
262
+ PageLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutComponent, selector: "aca-page-layout", inputs: { hasError: "hasError" }, host: { classAttribute: "aca-page-layout" }, ngImport: i0, template: "<ng-content select=\"aca-page-layout-header\"></ng-content>\n<ng-content select=\"aca-page-layout-error\" *ngIf=\"hasError\"></ng-content>\n<ng-content select=\"aca-page-layout-content\" *ngIf=\"!hasError\"></ng-content>\n", styles: [".aca-page-layout{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .aca-page-layout-header{display:flex;align-items:center;flex:0 0 65px;flex-basis:48px;background:var(--theme-background-color);border-bottom:1px solid var(--theme-border-color, rgba(0, 0, 0, .07));padding:0 24px}.aca-page-layout .aca-page-layout-content,.aca-page-layout .aca-page-layout-error{display:flex;flex-direction:row;flex:1;height:100%;overflow:hidden}.aca-page-layout .main-content{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .scrollable,.aca-page-layout .scrollable .main-content{overflow:auto!important}.aca-page-layout .sidebar{display:block;height:100%;overflow-y:scroll;max-width:350px;width:350px}[dir=rtl] .aca-page-layout .main-content{border-left:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}[dir=ltr] .aca-page-layout .main-content{border-right:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutComponent, decorators: [{
264
+ type: Component,
265
+ args: [{ selector: 'aca-page-layout', encapsulation: ViewEncapsulation.None, host: { class: 'aca-page-layout' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"aca-page-layout-header\"></ng-content>\n<ng-content select=\"aca-page-layout-error\" *ngIf=\"hasError\"></ng-content>\n<ng-content select=\"aca-page-layout-content\" *ngIf=\"!hasError\"></ng-content>\n", styles: [".aca-page-layout{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .aca-page-layout-header{display:flex;align-items:center;flex:0 0 65px;flex-basis:48px;background:var(--theme-background-color);border-bottom:1px solid var(--theme-border-color, rgba(0, 0, 0, .07));padding:0 24px}.aca-page-layout .aca-page-layout-content,.aca-page-layout .aca-page-layout-error{display:flex;flex-direction:row;flex:1;height:100%;overflow:hidden}.aca-page-layout .main-content{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .scrollable,.aca-page-layout .scrollable .main-content{overflow:auto!important}.aca-page-layout .sidebar{display:block;height:100%;overflow-y:scroll;max-width:350px;width:350px}[dir=rtl] .aca-page-layout .main-content{border-left:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}[dir=ltr] .aca-page-layout .main-content{border-right:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}\n"] }]
266
+ }], propDecorators: { hasError: [{
267
+ type: Input
268
+ }] } });
269
+
270
+ /*!
271
+ * @license
272
+ * Alfresco Example Content Application
273
+ *
274
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
275
+ *
276
+ * This file is part of the Alfresco Example Content Application.
277
+ * If the software was purchased under a paid Alfresco license, the terms of
278
+ * the paid license agreement will prevail. Otherwise, the software is
279
+ * provided under the following open source license terms:
280
+ *
281
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
282
+ * it under the terms of the GNU Lesser General Public License as published by
283
+ * the Free Software Foundation, either version 3 of the License, or
284
+ * (at your option) any later version.
285
+ *
286
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
287
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
288
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289
+ * GNU Lesser General Public License for more details.
290
+ *
291
+ * You should have received a copy of the GNU Lesser General Public License
292
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
293
+ */
294
+ class PageLayoutModule {
295
+ }
296
+ PageLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
297
+ PageLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, declarations: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent], imports: [CommonModule], exports: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent] });
298
+ PageLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, imports: [CommonModule] });
299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, decorators: [{
300
+ type: NgModule,
301
+ args: [{
302
+ imports: [CommonModule],
303
+ declarations: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent],
304
+ exports: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent]
305
+ }]
306
+ }] });
307
+
308
+ /*!
309
+ * @license
310
+ * Alfresco Example Content Application
311
+ *
312
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
313
+ *
314
+ * This file is part of the Alfresco Example Content Application.
315
+ * If the software was purchased under a paid Alfresco license, the terms of
316
+ * the paid license agreement will prevail. Otherwise, the software is
317
+ * provided under the following open source license terms:
318
+ *
319
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
320
+ * it under the terms of the GNU Lesser General Public License as published by
321
+ * the Free Software Foundation, either version 3 of the License, or
322
+ * (at your option) any later version.
323
+ *
324
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
325
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
326
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
327
+ * GNU Lesser General Public License for more details.
328
+ *
329
+ * You should have received a copy of the GNU Lesser General Public License
330
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
331
+ */
332
+ class LockedByComponent {
333
+ get text() {
334
+ return (this.node && this.node.entry.properties && this.node.entry.properties['cm:lockOwner'] && this.node.entry.properties['cm:lockOwner'].displayName);
335
+ }
336
+ }
337
+ LockedByComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
338
+ LockedByComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: LockedByComponent, selector: "aca-locked-by", inputs: { node: "node" }, host: { classAttribute: "aca-locked-by" }, ngImport: i0, template: `
339
+ <mat-icon class="locked_by--icon">lock</mat-icon>
340
+ <span class="locked_by--label">{{ 'APP.LOCKED_BY' | translate }}</span>
341
+ <span class="locked_by--name">{{ text }}</span>
342
+ `, isInline: true, styles: [".aca-locked-by{display:flex;align-items:center;color:var(--theme-text-color, rgba(0, 0, 0, .54))}.aca-locked-by .locked_by--icon{font-size:14px;width:14px;height:14px}.aca-locked-by .locked_by--label,.aca-locked-by .locked_by--name{font-size:12px;padding:0 2px}\n"], dependencies: [{ kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByComponent, decorators: [{
344
+ type: Component,
345
+ args: [{ selector: 'aca-locked-by', template: `
346
+ <mat-icon class="locked_by--icon">lock</mat-icon>
347
+ <span class="locked_by--label">{{ 'APP.LOCKED_BY' | translate }}</span>
348
+ <span class="locked_by--name">{{ text }}</span>
349
+ `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
350
+ class: 'aca-locked-by'
351
+ }, styles: [".aca-locked-by{display:flex;align-items:center;color:var(--theme-text-color, rgba(0, 0, 0, .54))}.aca-locked-by .locked_by--icon{font-size:14px;width:14px;height:14px}.aca-locked-by .locked_by--label,.aca-locked-by .locked_by--name{font-size:12px;padding:0 2px}\n"] }]
352
+ }], propDecorators: { node: [{
353
+ type: Input
354
+ }] } });
355
+
356
+ /*!
357
+ * @license
358
+ * Alfresco Example Content Application
359
+ *
360
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
361
+ *
362
+ * This file is part of the Alfresco Example Content Application.
363
+ * If the software was purchased under a paid Alfresco license, the terms of
364
+ * the paid license agreement will prevail. Otherwise, the software is
365
+ * provided under the following open source license terms:
366
+ *
367
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
368
+ * it under the terms of the GNU Lesser General Public License as published by
369
+ * the Free Software Foundation, either version 3 of the License, or
370
+ * (at your option) any later version.
371
+ *
372
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
373
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
374
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
375
+ * GNU Lesser General Public License for more details.
376
+ *
377
+ * You should have received a copy of the GNU Lesser General Public License
378
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
379
+ */
380
+ class LockedByModule {
381
+ }
382
+ LockedByModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
383
+ LockedByModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, declarations: [LockedByComponent], imports: [CommonModule, MatIconModule, i2.TranslateModule], exports: [LockedByComponent] });
384
+ LockedByModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, imports: [CommonModule, MatIconModule, TranslateModule.forChild()] });
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, decorators: [{
386
+ type: NgModule,
387
+ args: [{
388
+ imports: [CommonModule, MatIconModule, TranslateModule.forChild()],
389
+ declarations: [LockedByComponent],
390
+ exports: [LockedByComponent]
391
+ }]
392
+ }] });
393
+
394
+ /*!
395
+ * @license
396
+ * Alfresco Example Content Application
397
+ *
398
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
399
+ *
400
+ * This file is part of the Alfresco Example Content Application.
401
+ * If the software was purchased under a paid Alfresco license, the terms of
402
+ * the paid license agreement will prevail. Otherwise, the software is
403
+ * provided under the following open source license terms:
404
+ *
405
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
406
+ * it under the terms of the GNU Lesser General Public License as published by
407
+ * the Free Software Foundation, either version 3 of the License, or
408
+ * (at your option) any later version.
409
+ *
410
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
411
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
412
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
413
+ * GNU Lesser General Public License for more details.
414
+ *
415
+ * You should have received a copy of the GNU Lesser General Public License
416
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
417
+ */
418
+ class GenericErrorComponent {
419
+ constructor() {
420
+ this.text = 'APP.MESSAGES.ERRORS.MISSING_CONTENT';
421
+ }
422
+ }
423
+ GenericErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
424
+ GenericErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: GenericErrorComponent, selector: "aca-generic-error", inputs: { text: "text" }, host: { classAttribute: "aca-generic-error" }, ngImport: i0, template: "<mat-icon>error</mat-icon>\n<p class=\"generic-error__title\">\n {{ text | translate }}\n</p>\n", styles: [".aca-generic-error{color:var(--theme-text-color, rgba(0, 0, 0, .54));display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%}.aca-generic-error__title{font-size:16px}.aca-generic-error mat-icon{color:var(--theme-warn-color, #f44336);font-size:52px;height:52px;width:52px}\n"], dependencies: [{ kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorComponent, decorators: [{
426
+ type: Component,
427
+ args: [{ selector: 'aca-generic-error', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'aca-generic-error' }, template: "<mat-icon>error</mat-icon>\n<p class=\"generic-error__title\">\n {{ text | translate }}\n</p>\n", styles: [".aca-generic-error{color:var(--theme-text-color, rgba(0, 0, 0, .54));display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%}.aca-generic-error__title{font-size:16px}.aca-generic-error mat-icon{color:var(--theme-warn-color, #f44336);font-size:52px;height:52px;width:52px}\n"] }]
428
+ }], propDecorators: { text: [{
429
+ type: Input
430
+ }] } });
431
+
432
+ /*!
433
+ * @license
434
+ * Alfresco Example Content Application
435
+ *
436
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
437
+ *
438
+ * This file is part of the Alfresco Example Content Application.
439
+ * If the software was purchased under a paid Alfresco license, the terms of
440
+ * the paid license agreement will prevail. Otherwise, the software is
441
+ * provided under the following open source license terms:
442
+ *
443
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
444
+ * it under the terms of the GNU Lesser General Public License as published by
445
+ * the Free Software Foundation, either version 3 of the License, or
446
+ * (at your option) any later version.
447
+ *
448
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
449
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
450
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
451
+ * GNU Lesser General Public License for more details.
452
+ *
453
+ * You should have received a copy of the GNU Lesser General Public License
454
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
455
+ */
456
+ class GenericErrorModule {
457
+ }
458
+ GenericErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
459
+ GenericErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, declarations: [GenericErrorComponent], imports: [CommonModule, MatIconModule, i2.TranslateModule], exports: [GenericErrorComponent] });
460
+ GenericErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, imports: [CommonModule, MatIconModule, TranslateModule.forChild()] });
461
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, decorators: [{
462
+ type: NgModule,
463
+ args: [{
464
+ imports: [CommonModule, MatIconModule, TranslateModule.forChild()],
465
+ declarations: [GenericErrorComponent],
466
+ exports: [GenericErrorComponent]
467
+ }]
468
+ }] });
469
+
470
+ /*!
471
+ * @license
472
+ * Alfresco Example Content Application
473
+ *
474
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
475
+ *
476
+ * This file is part of the Alfresco Example Content Application.
477
+ * If the software was purchased under a paid Alfresco license, the terms of
478
+ * the paid license agreement will prevail. Otherwise, the software is
479
+ * provided under the following open source license terms:
480
+ *
481
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
482
+ * it under the terms of the GNU Lesser General Public License as published by
483
+ * the Free Software Foundation, either version 3 of the License, or
484
+ * (at your option) any later version.
485
+ *
486
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
487
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
488
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
489
+ * GNU Lesser General Public License for more details.
490
+ *
491
+ * You should have received a copy of the GNU Lesser General Public License
492
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
493
+ */
494
+ class NodePermissionService {
495
+ constructor() {
496
+ this.defaultOptions = {
497
+ operation: NodePermissionService.DEFAULT_OPERATION,
498
+ target: null
499
+ };
500
+ }
501
+ check(source, permissions, options) {
502
+ const opts = Object.assign({}, this.defaultOptions, options || {});
503
+ if (!source) {
504
+ return false;
505
+ }
506
+ if (Array.isArray(source)) {
507
+ source = source.filter((item) => item);
508
+ if (source.length > 0) {
509
+ return source.every((node) => this.isOperationAllowed(node, permissions, opts));
510
+ }
511
+ return false;
512
+ }
513
+ else {
514
+ return this.isOperationAllowed(source, permissions, opts);
515
+ }
516
+ }
517
+ isOperationAllowed(node, permissions, options) {
518
+ const allowableOperations = this.getAllowableOperations(node, options.target);
519
+ if (allowableOperations.length) {
520
+ if (options.operation === NodePermissionService.DEFAULT_OPERATION) {
521
+ return permissions.some((permission) => allowableOperations.includes(permission));
522
+ }
523
+ else {
524
+ return permissions.every((permission) => allowableOperations.includes(permission));
525
+ }
526
+ }
527
+ return false;
528
+ }
529
+ getAllowableOperations(node, property) {
530
+ let entry;
531
+ if ('entry' in node) {
532
+ entry = node.entry;
533
+ }
534
+ else {
535
+ entry = node;
536
+ }
537
+ if (property) {
538
+ return entry[property] || [];
539
+ }
540
+ if ('allowableOperationsOnTarget' in entry) {
541
+ return entry.allowableOperationsOnTarget || [];
542
+ }
543
+ else {
544
+ return entry.allowableOperations || [];
545
+ }
546
+ }
547
+ }
548
+ NodePermissionService.DEFAULT_OPERATION = 'OR';
549
+ NodePermissionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NodePermissionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
550
+ NodePermissionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NodePermissionService, providedIn: 'root' });
551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NodePermissionService, decorators: [{
552
+ type: Injectable,
553
+ args: [{
554
+ providedIn: 'root'
555
+ }]
556
+ }] });
557
+
558
+ /*!
559
+ * @license
560
+ * Alfresco Example Content Application
561
+ *
562
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
563
+ *
564
+ * This file is part of the Alfresco Example Content Application.
565
+ * If the software was purchased under a paid Alfresco license, the terms of
566
+ * the paid license agreement will prevail. Otherwise, the software is
567
+ * provided under the following open source license terms:
568
+ *
569
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
570
+ * it under the terms of the GNU Lesser General Public License as published by
571
+ * the Free Software Foundation, either version 3 of the License, or
572
+ * (at your option) any later version.
573
+ *
574
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
575
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
576
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
577
+ * GNU Lesser General Public License for more details.
578
+ *
579
+ * You should have received a copy of the GNU Lesser General Public License
580
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
581
+ */
582
+ class AppExtensionService {
583
+ constructor(auth, store, loader, extensions, permissions, appConfig, matIconRegistry, sanitizer, logger) {
584
+ this.auth = auth;
585
+ this.store = store;
586
+ this.loader = loader;
587
+ this.extensions = extensions;
588
+ this.permissions = permissions;
589
+ this.appConfig = appConfig;
590
+ this.matIconRegistry = matIconRegistry;
591
+ this.sanitizer = sanitizer;
592
+ this.logger = logger;
593
+ this._references = new BehaviorSubject([]);
594
+ this.navbar = [];
595
+ this.sidebarTabs = [];
596
+ this.viewerRules = {};
597
+ this.settingGroups = [];
598
+ this._headerActions = new BehaviorSubject([]);
599
+ this._toolbarActions = new BehaviorSubject([]);
600
+ this._viewerToolbarActions = new BehaviorSubject([]);
601
+ this._sharedLinkViewerToolbarActions = new BehaviorSubject([]);
602
+ this._contextMenuActions = new BehaviorSubject([]);
603
+ this._openWithActions = new BehaviorSubject([]);
604
+ this._createActions = new BehaviorSubject([]);
605
+ this._mainActions = new BehaviorSubject(null);
606
+ this._sidebarActions = new BehaviorSubject([]);
607
+ this.documentListPresets = {
608
+ files: [],
609
+ libraries: [],
610
+ favoriteLibraries: [],
611
+ shared: [],
612
+ recent: [],
613
+ favorites: [],
614
+ trashcan: [],
615
+ searchLibraries: []
616
+ };
617
+ this.references$ = this._references.asObservable();
618
+ this.store.select(getRuleContext).subscribe((result) => {
619
+ this.selection = result.selection;
620
+ this.navigation = result.navigation;
621
+ this.profile = result.profile;
622
+ this.repository = result.repository;
623
+ if (this.config) {
624
+ this.setup(this.config);
625
+ }
626
+ });
627
+ }
628
+ async load() {
629
+ this.config = await this.extensions.load();
630
+ this.setup(this.config);
631
+ }
632
+ setup(config) {
633
+ if (!config) {
634
+ this.logger.error('Extension configuration not found');
635
+ return;
636
+ }
637
+ this.settingGroups = this.loader.getElements(config, 'settings');
638
+ this._headerActions.next(this.loader.getContentActions(config, 'features.header'));
639
+ this._sidebarActions.next(this.loader.getContentActions(config, 'features.sidebar.toolbar'));
640
+ this._toolbarActions.next(this.loader.getContentActions(config, 'features.toolbar'));
641
+ this._viewerToolbarActions.next(this.loader.getContentActions(config, 'features.viewer.toolbarActions'));
642
+ this._sharedLinkViewerToolbarActions.next(this.loader.getContentActions(config, 'features.viewer.shared.toolbarActions'));
643
+ this._contextMenuActions.next(this.loader.getContentActions(config, 'features.contextMenu'));
644
+ this._openWithActions.next(this.loader.getContentActions(config, 'features.viewer.openWith'));
645
+ this._createActions.next(this.loader.getElements(config, 'features.create'));
646
+ this._mainActions.next(this.loader.getFeatures(config).mainAction);
647
+ this.navbar = this.loadNavBar(config);
648
+ this.sidebarTabs = this.loader.getElements(config, 'features.sidebar.tabs');
649
+ this.contentMetadata = this.loadContentMetadata(config);
650
+ this.search = this.loadSearchForms(config);
651
+ this.documentListPresets = {
652
+ files: this.getDocumentListPreset(config, 'files'),
653
+ libraries: this.getDocumentListPreset(config, 'libraries'),
654
+ favoriteLibraries: this.getDocumentListPreset(config, 'favoriteLibraries'),
655
+ shared: this.getDocumentListPreset(config, 'shared'),
656
+ recent: this.getDocumentListPreset(config, 'recent'),
657
+ favorites: this.getDocumentListPreset(config, 'favorites'),
658
+ trashcan: this.getDocumentListPreset(config, 'trashcan'),
659
+ searchLibraries: this.getDocumentListPreset(config, 'search-libraries')
660
+ };
661
+ this.withCredentials = this.appConfig.get('auth.withCredentials', false);
662
+ if (config.features && config.features.viewer) {
663
+ this.viewerRules = config.features.viewer['rules'] || {};
664
+ }
665
+ this.registerIcons(config);
666
+ const references = (config.$references || []).filter((entry) => typeof entry === 'object').map((entry) => entry);
667
+ this._references.next(references);
668
+ }
669
+ registerIcons(config) {
670
+ const icons = this.loader.getElements(config, 'features.icons').filter((entry) => !entry.disabled);
671
+ for (const icon of icons) {
672
+ const [ns, id] = icon.id.split(':');
673
+ const value = icon.value;
674
+ if (!value) {
675
+ console.warn(`Missing icon value for "${icon.id}".`);
676
+ }
677
+ else if (!ns || !id) {
678
+ console.warn(`Incorrect icon id format: "${icon.id}".`);
679
+ }
680
+ else {
681
+ this.matIconRegistry.addSvgIconInNamespace(ns, id, this.sanitizer.bypassSecurityTrustResourceUrl(value));
682
+ }
683
+ }
684
+ }
685
+ loadNavBar(config) {
686
+ return this.loader.getElements(config, 'features.navbar');
687
+ }
688
+ getDocumentListPreset(config, key) {
689
+ return this.loader
690
+ .getElements(config, `features.documentList.${key}`)
691
+ .filter((group) => this.filterVisible(group))
692
+ .filter((entry) => !entry.disabled)
693
+ .sort(sortByOrder);
694
+ }
695
+ getApplicationNavigation(elements) {
696
+ return elements
697
+ .filter((group) => this.filterVisible(group))
698
+ .map((group) => ({
699
+ ...group,
700
+ items: (group.items || [])
701
+ .filter((entry) => !entry.disabled)
702
+ .filter((item) => this.filterVisible(item))
703
+ .sort(sortByOrder)
704
+ .map((item) => {
705
+ if (item.children && item.children.length > 0) {
706
+ item.children = item.children
707
+ .filter((entry) => !entry.disabled)
708
+ .filter((child) => this.filterVisible(child))
709
+ .sort(sortByOrder)
710
+ .map((child) => {
711
+ if (child.component) {
712
+ return {
713
+ ...child
714
+ };
715
+ }
716
+ if (!child.click) {
717
+ const childRouteRef = this.extensions.getRouteById(child.route);
718
+ const childUrl = `/${childRouteRef ? childRouteRef.path : child.route}`;
719
+ return {
720
+ ...child,
721
+ url: childUrl
722
+ };
723
+ }
724
+ return {
725
+ ...child,
726
+ action: child.click
727
+ };
728
+ });
729
+ return {
730
+ ...item
731
+ };
732
+ }
733
+ if (item.component) {
734
+ return { ...item };
735
+ }
736
+ if (!item.click) {
737
+ const routeRef = this.extensions.getRouteById(item.route);
738
+ const url = `/${routeRef ? routeRef.path : item.route}`;
739
+ return {
740
+ ...item,
741
+ url
742
+ };
743
+ }
744
+ return {
745
+ ...item,
746
+ action: item.click
747
+ };
748
+ })
749
+ .reduce(reduceEmptyMenus, [])
750
+ }));
751
+ }
752
+ loadContentMetadata(config) {
753
+ const elements = this.loader.getElements(config, 'features.content-metadata-presets');
754
+ if (!elements.length) {
755
+ return null;
756
+ }
757
+ let presets = {};
758
+ presets = this.filterDisabled(mergeObjects(presets, ...elements));
759
+ try {
760
+ this.appConfig.config['content-metadata'].presets = presets;
761
+ }
762
+ catch (error) {
763
+ this.logger.error(error, '- could not change content-metadata presets from app.config -');
764
+ }
765
+ return { presets };
766
+ }
767
+ loadSearchForms(config) {
768
+ const elements = this.loader.getElements(config, 'features.search');
769
+ if (!elements.length) {
770
+ return null;
771
+ }
772
+ const search = mergeArrays([], elements)
773
+ .filter((entry) => !entry.disabled)
774
+ .filter((entry) => this.filterVisible(entry))
775
+ .sort(sortByOrder);
776
+ try {
777
+ this.appConfig.config['search'] = search;
778
+ }
779
+ catch (error) {
780
+ this.logger.error(error, '- could not change search from app.config -');
781
+ }
782
+ return search;
783
+ }
784
+ filterDisabled(object) {
785
+ if (Array.isArray(object)) {
786
+ return object.filter((item) => !item.disabled).map((item) => this.filterDisabled(item));
787
+ }
788
+ else if (typeof object === 'object') {
789
+ if (!object.disabled) {
790
+ Object.keys(object).forEach((prop) => {
791
+ object[prop] = this.filterDisabled(object[prop]);
792
+ });
793
+ return object;
794
+ }
795
+ }
796
+ else {
797
+ return object;
798
+ }
799
+ }
800
+ getNavigationGroups() {
801
+ return this.navbar;
802
+ }
803
+ getSidebarTabs() {
804
+ return this.sidebarTabs.filter((action) => this.filterVisible(action));
805
+ }
806
+ setActionDisabledFromRule(action) {
807
+ let disabled = false;
808
+ if (action && action.rules && action.rules.enabled) {
809
+ disabled = !this.extensions.evaluateRule(action.rules.enabled, this);
810
+ }
811
+ return {
812
+ ...action,
813
+ disabled
814
+ };
815
+ }
816
+ getCreateActions() {
817
+ return this._createActions.pipe(map((createActions) => createActions
818
+ .filter((action) => this.filterVisible(action))
819
+ .map((action) => this.copyAction(action))
820
+ .map((action) => this.buildMenu(action))
821
+ .map((action) => this.setActionDisabledFromRule(action))));
822
+ }
823
+ getMainAction() {
824
+ return this._mainActions.pipe(filter((mainAction) => mainAction && this.filterVisible(mainAction)), map((mainAction) => {
825
+ let actionCopy = this.copyAction(mainAction);
826
+ actionCopy = this.setActionDisabledFromRule(actionCopy);
827
+ return actionCopy;
828
+ }));
829
+ }
830
+ buildMenu(actionRef) {
831
+ if (actionRef.type === ContentActionType.menu && actionRef.children && actionRef.children.length > 0) {
832
+ const children = actionRef.children.filter((action) => this.filterVisible(action)).map((action) => this.buildMenu(action));
833
+ actionRef.children = children
834
+ .map((action) => this.setActionDisabledFromRule(action))
835
+ .sort(sortByOrder)
836
+ .reduce(reduceEmptyMenus, [])
837
+ .reduce(reduceSeparators, []);
838
+ }
839
+ return actionRef;
840
+ }
841
+ getAllowedActions(actions) {
842
+ return (actions || [])
843
+ .filter((action) => this.filterVisible(action))
844
+ .map((action) => {
845
+ if (action.type === ContentActionType.menu) {
846
+ const copy = this.copyAction(action);
847
+ if (copy.children && copy.children.length > 0) {
848
+ copy.children = copy.children
849
+ .filter((entry) => !entry.disabled)
850
+ .filter((childAction) => this.filterVisible(childAction))
851
+ .sort(sortByOrder)
852
+ .reduce(reduceSeparators, []);
853
+ }
854
+ return copy;
855
+ }
856
+ return action;
857
+ })
858
+ .map((action) => this.setActionDisabledFromRule(action))
859
+ .reduce(reduceEmptyMenus, [])
860
+ .reduce(reduceSeparators, []);
861
+ }
862
+ getAllowedSidebarActions() {
863
+ return this._sidebarActions.pipe(map((sidebarActions) => this.getAllowedActions(sidebarActions)));
864
+ }
865
+ getAllowedToolbarActions() {
866
+ return this._toolbarActions.pipe(map((toolbarActions) => this.getAllowedActions(toolbarActions)));
867
+ }
868
+ getViewerToolbarActions() {
869
+ return this._viewerToolbarActions.pipe(map((viewerToolbarActions) => this.getAllowedActions(viewerToolbarActions)));
870
+ }
871
+ getOpenWithActions() {
872
+ return this._openWithActions.pipe(map((openWithActions) => this.getAllowedActions(openWithActions)));
873
+ }
874
+ getSharedLinkViewerToolbarActions() {
875
+ return this._sharedLinkViewerToolbarActions.pipe(map((sharedLinkViewerToolbarActions) => (!this.selection.isEmpty ? this.getAllowedActions(sharedLinkViewerToolbarActions) : [])));
876
+ }
877
+ getHeaderActions() {
878
+ return this._headerActions.pipe(map((headerActions) => headerActions
879
+ .filter((action) => this.filterVisible(action))
880
+ .map((action) => {
881
+ if (action.type === ContentActionType.menu) {
882
+ const copy = this.copyAction(action);
883
+ if (copy.children && copy.children.length > 0) {
884
+ copy.children = copy.children
885
+ .filter((childAction) => this.filterVisible(childAction))
886
+ .sort(sortByOrder)
887
+ .reduce(reduceEmptyMenus, [])
888
+ .reduce(reduceSeparators, []);
889
+ }
890
+ return copy;
891
+ }
892
+ return action;
893
+ })
894
+ .map((action) => this.setActionDisabledFromRule(action))
895
+ .sort(sortByOrder)
896
+ .reduce(reduceEmptyMenus, [])
897
+ .reduce(reduceSeparators, [])));
898
+ }
899
+ getAllowedContextMenuActions() {
900
+ return this._contextMenuActions.pipe(map((contextMenuActions) => (!this.selection.isEmpty ? this.getAllowedActions(contextMenuActions) : [])));
901
+ }
902
+ getSettingsGroups() {
903
+ return this.settingGroups.filter((group) => this.filterVisible(group));
904
+ }
905
+ copyAction(action) {
906
+ return {
907
+ ...action,
908
+ children: (action.children || []).map((child) => this.copyAction(child))
909
+ };
910
+ }
911
+ filterVisible(action) {
912
+ if (action && action.rules && action.rules.visible) {
913
+ return this.extensions.evaluateRule(action.rules.visible, this);
914
+ }
915
+ return true;
916
+ }
917
+ isViewerExtensionDisabled(extension) {
918
+ if (extension) {
919
+ if (extension.disabled) {
920
+ return true;
921
+ }
922
+ if (extension.rules && extension.rules.disabled) {
923
+ return this.extensions.evaluateRule(extension.rules.disabled, this);
924
+ }
925
+ }
926
+ return false;
927
+ }
928
+ runActionById(id, additionalPayload) {
929
+ const action = this.extensions.getActionById(id);
930
+ if (action) {
931
+ const { type, payload } = action;
932
+ const context = {
933
+ selection: this.selection
934
+ };
935
+ const expression = this.extensions.runExpression(payload, context);
936
+ this.store.dispatch({
937
+ type,
938
+ payload: expression,
939
+ configuration: additionalPayload
940
+ });
941
+ }
942
+ else {
943
+ this.store.dispatch({
944
+ type: id,
945
+ configuration: additionalPayload
946
+ });
947
+ }
948
+ }
949
+ // todo: move to ADF/RuleService
950
+ isRuleDefined(ruleId) {
951
+ return !!(ruleId && this.getEvaluator(ruleId));
952
+ }
953
+ // todo: move to ADF/RuleService
954
+ evaluateRule(ruleId, ...args) {
955
+ const evaluator = this.getEvaluator(ruleId);
956
+ if (evaluator) {
957
+ return evaluator(this, ...args);
958
+ }
959
+ return false;
960
+ }
961
+ getEvaluator(key) {
962
+ return this.extensions.getEvaluator(key);
963
+ }
964
+ canPreviewNode(node) {
965
+ const rules = this.viewerRules;
966
+ if (this.isRuleDefined(rules.canPreview)) {
967
+ const canPreview = this.evaluateRule(rules.canPreview, node);
968
+ if (!canPreview) {
969
+ return false;
970
+ }
971
+ }
972
+ return true;
973
+ }
974
+ canShowViewerNavigation(node) {
975
+ const rules = this.viewerRules;
976
+ if (this.isRuleDefined(rules.showNavigation)) {
977
+ const showNavigation = this.evaluateRule(rules.showNavigation, node);
978
+ if (!showNavigation) {
979
+ return false;
980
+ }
981
+ }
982
+ return true;
983
+ }
984
+ }
985
+ AppExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppExtensionService, deps: [{ token: i1$2.AuthenticationService }, { token: i1$3.Store }, { token: i3.ExtensionLoaderService }, { token: i3.ExtensionService }, { token: NodePermissionService }, { token: i1$2.AppConfigService }, { token: i1$1.MatIconRegistry }, { token: i6.DomSanitizer }, { token: i1$2.LogService }], target: i0.ɵɵFactoryTarget.Injectable });
986
+ AppExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppExtensionService, providedIn: 'root' });
987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppExtensionService, decorators: [{
988
+ type: Injectable,
989
+ args: [{
990
+ providedIn: 'root'
991
+ }]
992
+ }], ctorParameters: function () { return [{ type: i1$2.AuthenticationService }, { type: i1$3.Store }, { type: i3.ExtensionLoaderService }, { type: i3.ExtensionService }, { type: NodePermissionService }, { type: i1$2.AppConfigService }, { type: i1$1.MatIconRegistry }, { type: i6.DomSanitizer }, { type: i1$2.LogService }]; } });
993
+
994
+ /*!
995
+ * @license
996
+ * Alfresco Example Content Application
997
+ *
998
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
999
+ *
1000
+ * This file is part of the Alfresco Example Content Application.
1001
+ * If the software was purchased under a paid Alfresco license, the terms of
1002
+ * the paid license agreement will prevail. Otherwise, the software is
1003
+ * provided under the following open source license terms:
1004
+ *
1005
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1006
+ * it under the terms of the GNU Lesser General Public License as published by
1007
+ * the Free Software Foundation, either version 3 of the License, or
1008
+ * (at your option) any later version.
1009
+ *
1010
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1011
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1012
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1013
+ * GNU Lesser General Public License for more details.
1014
+ *
1015
+ * You should have received a copy of the GNU Lesser General Public License
1016
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1017
+ */
1018
+ class ToolbarMenuItemComponent {
1019
+ constructor(extensions) {
1020
+ this.extensions = extensions;
1021
+ }
1022
+ runAction() {
1023
+ if (this.hasClickAction(this.actionRef)) {
1024
+ this.extensions.runActionById(this.actionRef.actions.click, this.menuId
1025
+ ? {
1026
+ focusedElementOnCloseSelector: `#${this.menuId.replace(/\./g, '\\.')}`
1027
+ }
1028
+ : undefined);
1029
+ }
1030
+ }
1031
+ hasClickAction(actionRef) {
1032
+ return !!(actionRef && actionRef.actions && actionRef.actions.click);
1033
+ }
1034
+ trackByActionId(_, obj) {
1035
+ return obj.id;
1036
+ }
1037
+ }
1038
+ ToolbarMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuItemComponent, deps: [{ token: AppExtensionService }], target: i0.ɵɵFactoryTarget.Component });
1039
+ ToolbarMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: { actionRef: "actionRef", menuId: "menuId" }, host: { classAttribute: "app-toolbar-menu-item" }, viewQueries: [{ propertyName: "menuItem", first: true, predicate: MatMenuItem, descendants: true }], ngImport: i0, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'menu'\">\n <button [id]=\"actionRef.id\" mat-menu-item role=\"menuitem\" tabindex=\"0\" [disabled]=\"actionRef.disabled\" [matMenuTriggerFor]=\"childMenu\">\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n\n <mat-menu #childMenu=\"matMenu\" class=\"app-create-menu__sub-menu\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"child\"></app-toolbar-menu-item>\n </ng-container>\n </mat-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'separator'\">\n <mat-divider></mat-divider>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button\n [id]=\"actionRef.id\"\n role=\"menuitem\"\n mat-menu-item\n [role]=\"'menuitem'\"\n tabindex=\"0\"\n [disabled]=\"actionRef.disabled\"\n [attr.title]=\"(actionRef.disabled ? actionRef['description-disabled'] : actionRef.description || actionRef.title) | translate\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n </ng-container>\n</ng-container>\n", styles: [".app-toolbar-menu-item:last-child>.mat-divider-horizontal{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i3$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$2.IconComponent, selector: "adf-icon", inputs: ["color", "value"] }, { kind: "component", type: i3.DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1040
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuItemComponent, decorators: [{
1041
+ type: Component,
1042
+ args: [{ selector: 'app-toolbar-menu-item', encapsulation: ViewEncapsulation.None, host: { class: 'app-toolbar-menu-item' }, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'menu'\">\n <button [id]=\"actionRef.id\" mat-menu-item role=\"menuitem\" tabindex=\"0\" [disabled]=\"actionRef.disabled\" [matMenuTriggerFor]=\"childMenu\">\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n\n <mat-menu #childMenu=\"matMenu\" class=\"app-create-menu__sub-menu\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"child\"></app-toolbar-menu-item>\n </ng-container>\n </mat-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'separator'\">\n <mat-divider></mat-divider>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button\n [id]=\"actionRef.id\"\n role=\"menuitem\"\n mat-menu-item\n [role]=\"'menuitem'\"\n tabindex=\"0\"\n [disabled]=\"actionRef.disabled\"\n [attr.title]=\"(actionRef.disabled ? actionRef['description-disabled'] : actionRef.description || actionRef.title) | translate\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n </ng-container>\n</ng-container>\n", styles: [".app-toolbar-menu-item:last-child>.mat-divider-horizontal{display:none}\n"] }]
1043
+ }], ctorParameters: function () { return [{ type: AppExtensionService }]; }, propDecorators: { actionRef: [{
1044
+ type: Input
1045
+ }], menuId: [{
1046
+ type: Input
1047
+ }], menuItem: [{
1048
+ type: ViewChild,
1049
+ args: [MatMenuItem]
1050
+ }] } });
1051
+
1052
+ /*!
1053
+ * @license
1054
+ * Alfresco Example Content Application
1055
+ *
1056
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1057
+ *
1058
+ * This file is part of the Alfresco Example Content Application.
1059
+ * If the software was purchased under a paid Alfresco license, the terms of
1060
+ * the paid license agreement will prevail. Otherwise, the software is
1061
+ * provided under the following open source license terms:
1062
+ *
1063
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1064
+ * it under the terms of the GNU Lesser General Public License as published by
1065
+ * the Free Software Foundation, either version 3 of the License, or
1066
+ * (at your option) any later version.
1067
+ *
1068
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1069
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1070
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1071
+ * GNU Lesser General Public License for more details.
1072
+ *
1073
+ * You should have received a copy of the GNU Lesser General Public License
1074
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1075
+ */
1076
+ class ToolbarMenuComponent {
1077
+ handleKeydownEscape() {
1078
+ this.matTrigger.closeMenu();
1079
+ }
1080
+ ngAfterViewInit() {
1081
+ const menuItems = [];
1082
+ this.toolbarMenuItems.forEach((toolbarMenuItem) => {
1083
+ if (toolbarMenuItem.menuItem !== undefined) {
1084
+ menuItems.push(toolbarMenuItem.menuItem);
1085
+ }
1086
+ });
1087
+ const menuItemsQueryList = new QueryList();
1088
+ menuItemsQueryList.reset(menuItems);
1089
+ this.menu._allItems = menuItemsQueryList;
1090
+ this.menu.ngAfterContentInit();
1091
+ }
1092
+ trackByActionId(_, obj) {
1093
+ return obj.id;
1094
+ }
1095
+ }
1096
+ ToolbarMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1097
+ ToolbarMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarMenuComponent, selector: "app-toolbar-menu", inputs: { actionRef: "actionRef", color: "color" }, host: { listeners: { "document:keydown.Escape": "handleKeydownEscape()" }, classAttribute: "app-toolbar-menu" }, viewQueries: [{ propertyName: "matTrigger", first: true, predicate: ["matTrigger"], descendants: true }, { propertyName: "menu", first: true, predicate: MatMenu, descendants: true }, { propertyName: "toolbarMenuItems", predicate: ToolbarMenuItemComponent, descendants: true }], ngImport: i0, template: "<button\n [id]=\"actionRef.id\"\n [color]=\"color\"\n mat-icon-button\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"actionRef.disabled\"\n #matTrigger=\"matMenuTrigger\"\n>\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" [overlapTrigger]=\"false\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <ng-container [ngSwitch]=\"child.type\">\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"child.component\" [data]=\"child.data\"></adf-dynamic-component>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <app-toolbar-menu-item [actionRef]=\"child\" [menuId]=\"actionRef.id\"></app-toolbar-menu-item>\n </ng-container>\n </ng-container>\n </ng-container>\n</mat-menu>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$2.IconComponent, selector: "adf-icon", inputs: ["color", "value"] }, { kind: "component", type: i3.DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1098
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuComponent, decorators: [{
1099
+ type: Component,
1100
+ args: [{ selector: 'app-toolbar-menu', encapsulation: ViewEncapsulation.None, host: { class: 'app-toolbar-menu' }, template: "<button\n [id]=\"actionRef.id\"\n [color]=\"color\"\n mat-icon-button\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"actionRef.disabled\"\n #matTrigger=\"matMenuTrigger\"\n>\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" [overlapTrigger]=\"false\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <ng-container [ngSwitch]=\"child.type\">\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"child.component\" [data]=\"child.data\"></adf-dynamic-component>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <app-toolbar-menu-item [actionRef]=\"child\" [menuId]=\"actionRef.id\"></app-toolbar-menu-item>\n </ng-container>\n </ng-container>\n </ng-container>\n</mat-menu>\n" }]
1101
+ }], propDecorators: { actionRef: [{
1102
+ type: Input
1103
+ }], color: [{
1104
+ type: Input
1105
+ }], matTrigger: [{
1106
+ type: ViewChild,
1107
+ args: ['matTrigger']
1108
+ }], menu: [{
1109
+ type: ViewChild,
1110
+ args: [MatMenu]
1111
+ }], toolbarMenuItems: [{
1112
+ type: ViewChildren,
1113
+ args: [ToolbarMenuItemComponent]
1114
+ }], handleKeydownEscape: [{
1115
+ type: HostListener,
1116
+ args: ['document:keydown.Escape']
1117
+ }] } });
1118
+
1119
+ /*!
1120
+ * @license
1121
+ * Alfresco Example Content Application
1122
+ *
1123
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1124
+ *
1125
+ * This file is part of the Alfresco Example Content Application.
1126
+ * If the software was purchased under a paid Alfresco license, the terms of
1127
+ * the paid license agreement will prevail. Otherwise, the software is
1128
+ * provided under the following open source license terms:
1129
+ *
1130
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1131
+ * it under the terms of the GNU Lesser General Public License as published by
1132
+ * the Free Software Foundation, either version 3 of the License, or
1133
+ * (at your option) any later version.
1134
+ *
1135
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1136
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1137
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1138
+ * GNU Lesser General Public License for more details.
1139
+ *
1140
+ * You should have received a copy of the GNU Lesser General Public License
1141
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1142
+ */
1143
+ var ToolbarButtonType;
1144
+ (function (ToolbarButtonType) {
1145
+ ToolbarButtonType["ICON_BUTTON"] = "icon-button";
1146
+ ToolbarButtonType["MENU_ITEM"] = "menu-item";
1147
+ })(ToolbarButtonType || (ToolbarButtonType = {}));
1148
+ class ToolbarButtonComponent {
1149
+ constructor(extensions) {
1150
+ this.extensions = extensions;
1151
+ this.type = ToolbarButtonType.ICON_BUTTON;
1152
+ }
1153
+ runAction() {
1154
+ if (this.hasClickAction(this.actionRef)) {
1155
+ this.extensions.runActionById(this.actionRef.actions.click, {
1156
+ focusedElementOnCloseSelector: `#${this.actionRef.id.replace(/\./g, '\\.')}`
1157
+ });
1158
+ }
1159
+ }
1160
+ hasClickAction(actionRef) {
1161
+ return !!(actionRef && actionRef.actions && actionRef.actions.click);
1162
+ }
1163
+ }
1164
+ ToolbarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarButtonComponent, deps: [{ token: AppExtensionService }], target: i0.ɵɵFactoryTarget.Component });
1165
+ ToolbarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarButtonComponent, selector: "app-toolbar-button", inputs: { type: "type", color: "color", actionRef: "actionRef" }, host: { classAttribute: "app-toolbar-button" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'icon-button'\">\n <button\n [id]=\"actionRef.id\"\n mat-icon-button\n [color]=\"color\"\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [disabled]=\"actionRef.disabled\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"'menu-item'\">\n <app-toolbar-menu-item [actionRef]=\"actionRef\"></app-toolbar-menu-item>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1$2.IconComponent, selector: "adf-icon", inputs: ["color", "value"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarButtonComponent, decorators: [{
1167
+ type: Component,
1168
+ args: [{ selector: 'app-toolbar-button', encapsulation: ViewEncapsulation.None, host: { class: 'app-toolbar-button' }, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'icon-button'\">\n <button\n [id]=\"actionRef.id\"\n mat-icon-button\n [color]=\"color\"\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [disabled]=\"actionRef.disabled\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"'menu-item'\">\n <app-toolbar-menu-item [actionRef]=\"actionRef\"></app-toolbar-menu-item>\n </ng-container>\n</ng-container>\n" }]
1169
+ }], ctorParameters: function () { return [{ type: AppExtensionService }]; }, propDecorators: { type: [{
1170
+ type: Input
1171
+ }], color: [{
1172
+ type: Input
1173
+ }], actionRef: [{
1174
+ type: Input
1175
+ }] } });
1176
+
1177
+ /*!
1178
+ * @license
1179
+ * Alfresco Example Content Application
1180
+ *
1181
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1182
+ *
1183
+ * This file is part of the Alfresco Example Content Application.
1184
+ * If the software was purchased under a paid Alfresco license, the terms of
1185
+ * the paid license agreement will prevail. Otherwise, the software is
1186
+ * provided under the following open source license terms:
1187
+ *
1188
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1189
+ * it under the terms of the GNU Lesser General Public License as published by
1190
+ * the Free Software Foundation, either version 3 of the License, or
1191
+ * (at your option) any later version.
1192
+ *
1193
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1194
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1195
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1196
+ * GNU Lesser General Public License for more details.
1197
+ *
1198
+ * You should have received a copy of the GNU Lesser General Public License
1199
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1200
+ */
1201
+ class ToolbarActionComponent {
1202
+ constructor(cd) {
1203
+ this.cd = cd;
1204
+ this.type = ToolbarButtonType.ICON_BUTTON;
1205
+ }
1206
+ // todo: review after ADF 2.6
1207
+ // preview component : change detection workaround for children without input
1208
+ ngDoCheck() {
1209
+ if (this.actionRef.id.includes('app.viewer')) {
1210
+ this.cd.markForCheck();
1211
+ }
1212
+ }
1213
+ }
1214
+ ToolbarActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarActionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1215
+ ToolbarActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarActionComponent, selector: "aca-toolbar-action", inputs: { type: "type", color: "color", actionRef: "actionRef" }, host: { classAttribute: "aca-toolbar-action" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <adf-toolbar-divider *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\"></adf-toolbar-divider>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"], dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i1$2.ToolbarDividerComponent, selector: "adf-toolbar-divider" }, { kind: "component", type: i3.DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }, { kind: "component", type: ToolbarButtonComponent, selector: "app-toolbar-button", inputs: ["type", "color", "actionRef"] }, { kind: "component", type: ToolbarMenuComponent, selector: "app-toolbar-menu", inputs: ["actionRef", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarActionComponent, decorators: [{
1217
+ type: Component,
1218
+ args: [{ selector: 'aca-toolbar-action', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'aca-toolbar-action' }, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <adf-toolbar-divider *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\"></adf-toolbar-divider>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"] }]
1219
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { type: [{
1220
+ type: Input
1221
+ }], color: [{
1222
+ type: Input
1223
+ }], actionRef: [{
1224
+ type: Input
1225
+ }] } });
1226
+
1227
+ /*!
1228
+ * @license
1229
+ * Alfresco Example Content Application
1230
+ *
1231
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1232
+ *
1233
+ * This file is part of the Alfresco Example Content Application.
1234
+ * If the software was purchased under a paid Alfresco license, the terms of
1235
+ * the paid license agreement will prevail. Otherwise, the software is
1236
+ * provided under the following open source license terms:
1237
+ *
1238
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1239
+ * it under the terms of the GNU Lesser General Public License as published by
1240
+ * the Free Software Foundation, either version 3 of the License, or
1241
+ * (at your option) any later version.
1242
+ *
1243
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1244
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1245
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1246
+ * GNU Lesser General Public License for more details.
1247
+ *
1248
+ * You should have received a copy of the GNU Lesser General Public License
1249
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1250
+ */
1251
+ class SharedToolbarModule {
1252
+ }
1253
+ SharedToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1254
+ SharedToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, declarations: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent], imports: [CommonModule, CoreModule, ExtensionsModule], exports: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent] });
1255
+ SharedToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, imports: [CommonModule, CoreModule, ExtensionsModule] });
1256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, decorators: [{
1257
+ type: NgModule,
1258
+ args: [{
1259
+ imports: [CommonModule, CoreModule, ExtensionsModule],
1260
+ declarations: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent],
1261
+ exports: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent]
1262
+ }]
1263
+ }] });
1264
+
1265
+ /*!
1266
+ * @license
1267
+ * Alfresco Example Content Application
1268
+ *
1269
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1270
+ *
1271
+ * This file is part of the Alfresco Example Content Application.
1272
+ * If the software was purchased under a paid Alfresco license, the terms of
1273
+ * the paid license agreement will prevail. Otherwise, the software is
1274
+ * provided under the following open source license terms:
1275
+ *
1276
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1277
+ * it under the terms of the GNU Lesser General Public License as published by
1278
+ * the Free Software Foundation, either version 3 of the License, or
1279
+ * (at your option) any later version.
1280
+ *
1281
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1282
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1283
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1284
+ * GNU Lesser General Public License for more details.
1285
+ *
1286
+ * You should have received a copy of the GNU Lesser General Public License
1287
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1288
+ */
1289
+ class ContentApiService {
1290
+ constructor(api, preferences) {
1291
+ this.api = api;
1292
+ this.preferences = preferences;
1293
+ }
1294
+ get nodesApi() {
1295
+ this._nodesApi = this._nodesApi ?? new NodesApi(this.api.getInstance());
1296
+ return this._nodesApi;
1297
+ }
1298
+ get trashcanApi() {
1299
+ this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.api.getInstance());
1300
+ return this._trashcanApi;
1301
+ }
1302
+ get sharedLinksApi() {
1303
+ this._sharedLinksApi = this._sharedLinksApi ?? new SharedlinksApi(this.api.getInstance());
1304
+ return this._sharedLinksApi;
1305
+ }
1306
+ get discoveryApi() {
1307
+ this._discoveryApi = this._discoveryApi ?? new DiscoveryApi(this.api.getInstance());
1308
+ return this._discoveryApi;
1309
+ }
1310
+ get favoritesApi() {
1311
+ this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.api.getInstance());
1312
+ return this._favoritesApi;
1313
+ }
1314
+ get contentApi() {
1315
+ this._contentApi = this._contentApi ?? new ContentApi(this.api.getInstance());
1316
+ return this._contentApi;
1317
+ }
1318
+ get sitesApi() {
1319
+ this._sitesApi = this._sitesApi ?? new SitesApi(this.api.getInstance());
1320
+ return this._sitesApi;
1321
+ }
1322
+ get searchApi() {
1323
+ this._searchApi = this._searchApi ?? new SearchApi(this.api.getInstance());
1324
+ return this._searchApi;
1325
+ }
1326
+ get peopleApi() {
1327
+ this._peopleApi = this._peopleApi ?? new PeopleApi(this.api.getInstance());
1328
+ return this._peopleApi;
1329
+ }
1330
+ get versionsApi() {
1331
+ this._versionsApi = this._versionsApi ?? new VersionsApi(this.api.getInstance());
1332
+ return this._versionsApi;
1333
+ }
1334
+ /**
1335
+ * Moves a node to the trashcan.
1336
+ *
1337
+ * @param nodeId ID of the target node
1338
+ * @param options Optional parameters supported by JS-API
1339
+ * @returns Empty result that notifies when the deletion is complete
1340
+ */
1341
+ deleteNode(nodeId, options = {}) {
1342
+ return from(this.nodesApi.deleteNode(nodeId, options));
1343
+ }
1344
+ /**
1345
+ * Gets the stored information about a node.
1346
+ *
1347
+ * @param nodeId ID of the target node
1348
+ * @param options Optional parameters supported by JS-API
1349
+ * @returns Node information
1350
+ */
1351
+ getNode(nodeId, options = {}) {
1352
+ const defaults = {
1353
+ include: ['path', 'properties', 'allowableOperations', 'permissions', 'definition']
1354
+ };
1355
+ const queryOptions = Object.assign(defaults, options);
1356
+ return from(this.nodesApi.getNode(nodeId, queryOptions));
1357
+ }
1358
+ getNodeInfo(nodeId, options) {
1359
+ const defaults = {
1360
+ include: ['isFavorite', 'allowableOperations', 'path', 'definition']
1361
+ };
1362
+ const queryOptions = Object.assign(defaults, options || {});
1363
+ // @ts-ignore
1364
+ return from(new Promise((resolve, reject) => {
1365
+ this.nodesApi.getNode(nodeId, queryOptions).then((nodeEntry) => {
1366
+ resolve(nodeEntry.entry);
1367
+ }, (error) => {
1368
+ reject(error);
1369
+ });
1370
+ }));
1371
+ }
1372
+ /**
1373
+ * Gets the items contained in a folder node.
1374
+ *
1375
+ * @param nodeId ID of the target node
1376
+ * @param options Optional parameters supported by JS-API
1377
+ * @returns List of child items from the folder
1378
+ */
1379
+ getNodeChildren(nodeId, options = {}) {
1380
+ const defaults = {
1381
+ maxItems: this.preferences.paginationSize,
1382
+ skipCount: 0,
1383
+ include: ['isLocked', 'path', 'properties', 'allowableOperations', 'permissions']
1384
+ };
1385
+ const queryOptions = Object.assign(defaults, options);
1386
+ return from(this.nodesApi.listNodeChildren(nodeId, queryOptions));
1387
+ }
1388
+ deleteSharedLink(linkId) {
1389
+ return from(this.sharedLinksApi.deleteSharedLink(linkId));
1390
+ }
1391
+ getDeletedNodes(options = {}) {
1392
+ const defaults = {
1393
+ include: ['path']
1394
+ };
1395
+ const queryOptions = Object.assign(defaults, options);
1396
+ return from(this.trashcanApi.listDeletedNodes(queryOptions));
1397
+ }
1398
+ restoreNode(nodeId) {
1399
+ return from(this.trashcanApi.restoreDeletedNode(nodeId));
1400
+ }
1401
+ purgeDeletedNode(nodeId) {
1402
+ return from(this.trashcanApi.deleteDeletedNode(nodeId));
1403
+ }
1404
+ /**
1405
+ * Gets information about a user identified by their username.
1406
+ *
1407
+ * @param personId ID of the target user
1408
+ * @param options Api options
1409
+ * @returns User information
1410
+ */
1411
+ getPerson(personId, options) {
1412
+ return from(this.peopleApi.getPerson(personId, options));
1413
+ }
1414
+ /**
1415
+ * Copy a node to destination node
1416
+ *
1417
+ * @param nodeId The id of the node to be copied
1418
+ * @param targetParentId The id of the folder-node where the node have to be copied to
1419
+ * @param name The new name for the copy that would be added on the destination folder
1420
+ * @param opts Api options
1421
+ */
1422
+ copyNode(nodeId, targetParentId, name, opts) {
1423
+ return from(this.nodesApi.copyNode(nodeId, { targetParentId, name }, opts));
1424
+ }
1425
+ /**
1426
+ * Gets product information for Content Services.
1427
+ *
1428
+ * @returns ProductVersionModel containing product details
1429
+ */
1430
+ getRepositoryInformation() {
1431
+ return from(this.discoveryApi.getRepositoryInformation());
1432
+ }
1433
+ getFavorites(personId, opts) {
1434
+ return from(this.favoritesApi.listFavorites(personId, opts));
1435
+ }
1436
+ getFavoriteLibraries(personId = '-me-', opts) {
1437
+ return this.getFavorites(personId, {
1438
+ ...opts,
1439
+ where: '(EXISTS(target/site))'
1440
+ }).pipe(map((response) => ({
1441
+ list: {
1442
+ entries: response.list.entries.map(({ entry }) => {
1443
+ entry.target.site.createdAt = entry.createdAt;
1444
+ return {
1445
+ entry: entry.target.site
1446
+ };
1447
+ }),
1448
+ pagination: response.list.pagination
1449
+ }
1450
+ })));
1451
+ }
1452
+ findSharedLinks(opts) {
1453
+ return from(this.sharedLinksApi.listSharedLinks(opts));
1454
+ }
1455
+ getSharedLinkContent(sharedId, attachment) {
1456
+ return this.contentApi.getSharedLinkContentUrl(sharedId, attachment);
1457
+ }
1458
+ search(request) {
1459
+ return from(this.searchApi.search(request));
1460
+ }
1461
+ getContentUrl(nodeId, attachment) {
1462
+ return this.contentApi.getContentUrl(nodeId, attachment);
1463
+ }
1464
+ getVersionContentUrl(nodeId, versionId, attachment) {
1465
+ return this.contentApi.getVersionContentUrl(nodeId, versionId, attachment);
1466
+ }
1467
+ deleteSite(siteId, opts) {
1468
+ return from(this.sitesApi.deleteSite(siteId, opts));
1469
+ }
1470
+ leaveSite(siteId) {
1471
+ return from(this.sitesApi.deleteSiteMembership(siteId, '-me-'));
1472
+ }
1473
+ createSite(siteBody, opts) {
1474
+ return from(this.sitesApi.createSite(siteBody, opts));
1475
+ }
1476
+ getSite(siteId, opts) {
1477
+ return from(this.sitesApi.getSite(siteId, opts));
1478
+ }
1479
+ updateLibrary(siteId, siteBody) {
1480
+ return from(this.sitesApi.updateSite(siteId, siteBody));
1481
+ }
1482
+ addFavorite(nodes) {
1483
+ const payload = nodes.map((node) => {
1484
+ const { isFolder, nodeId, id } = node.entry;
1485
+ const siteId = node.entry['guid'];
1486
+ const type = siteId ? 'site' : isFolder ? 'folder' : 'file';
1487
+ const guid = siteId || nodeId || id;
1488
+ return {
1489
+ target: {
1490
+ [type]: {
1491
+ guid
1492
+ }
1493
+ }
1494
+ };
1495
+ });
1496
+ return from(this.favoritesApi.createFavorite('-me-', payload));
1497
+ }
1498
+ removeFavorite(nodes) {
1499
+ return from(Promise.all(nodes.map((node) => {
1500
+ const id = node.entry.nodeId || node.entry.id;
1501
+ return this.favoritesApi.deleteFavorite('-me-', id);
1502
+ })));
1503
+ }
1504
+ unlockNode(nodeId, opts) {
1505
+ return this.nodesApi.unlockNode(nodeId, opts);
1506
+ }
1507
+ getNodeVersions(nodeId, opts) {
1508
+ return from(this.versionsApi.listVersionHistory(nodeId, opts));
1509
+ }
1510
+ requestNodeDirectAccessUrl(nodeId) {
1511
+ return from(this.nodesApi.requestDirectAccessUrl(nodeId));
1512
+ }
1513
+ requestVersionDirectAccessUrl(nodeId, versionId) {
1514
+ return from(this.versionsApi.requestDirectAccessUrl(nodeId, versionId));
1515
+ }
1516
+ }
1517
+ ContentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentApiService, deps: [{ token: i1$2.AlfrescoApiService }, { token: i1$2.UserPreferencesService }], target: i0.ɵɵFactoryTarget.Injectable });
1518
+ ContentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentApiService, providedIn: 'root' });
1519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentApiService, decorators: [{
1520
+ type: Injectable,
1521
+ args: [{
1522
+ providedIn: 'root'
1523
+ }]
1524
+ }], ctorParameters: function () { return [{ type: i1$2.AlfrescoApiService }, { type: i1$2.UserPreferencesService }]; } });
1525
+
1526
+ /*!
1527
+ * @license
1528
+ * Alfresco Example Content Application
1529
+ *
1530
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1531
+ *
1532
+ * This file is part of the Alfresco Example Content Application.
1533
+ * If the software was purchased under a paid Alfresco license, the terms of
1534
+ * the paid license agreement will prevail. Otherwise, the software is
1535
+ * provided under the following open source license terms:
1536
+ *
1537
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1538
+ * it under the terms of the GNU Lesser General Public License as published by
1539
+ * the Free Software Foundation, either version 3 of the License, or
1540
+ * (at your option) any later version.
1541
+ *
1542
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1543
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1544
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1545
+ * GNU Lesser General Public License for more details.
1546
+ *
1547
+ * You should have received a copy of the GNU Lesser General Public License
1548
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1549
+ */
1550
+ class InfoDrawerComponent {
1551
+ constructor(store, contentApi, extensions) {
1552
+ this.store = store;
1553
+ this.contentApi = contentApi;
1554
+ this.extensions = extensions;
1555
+ this.isLoading = false;
1556
+ this.tabs = [];
1557
+ this.actions = [];
1558
+ this.onDestroy$ = new Subject();
1559
+ this.preventFromClosing = false;
1560
+ }
1561
+ onEscapeKeyboardEvent() {
1562
+ this.close();
1563
+ }
1564
+ ngOnInit() {
1565
+ this.tabs = this.extensions.getSidebarTabs();
1566
+ this.extensions
1567
+ .getAllowedSidebarActions()
1568
+ .pipe(takeUntil(this.onDestroy$))
1569
+ .subscribe((actions) => {
1570
+ this.actions = actions;
1571
+ });
1572
+ this.store
1573
+ .select(infoDrawerPreview)
1574
+ .pipe(takeUntil(this.onDestroy$))
1575
+ .subscribe((isInfoDrawerPreviewOpened) => {
1576
+ this.preventFromClosing = isInfoDrawerPreviewOpened;
1577
+ });
1578
+ }
1579
+ ngOnDestroy() {
1580
+ this.onDestroy$.next(true);
1581
+ this.onDestroy$.complete();
1582
+ if (!this.preventFromClosing) {
1583
+ this.store.dispatch(new SetInfoDrawerStateAction(false));
1584
+ }
1585
+ }
1586
+ ngOnChanges() {
1587
+ if (this.node) {
1588
+ if (this.node['isLibrary']) {
1589
+ return this.setDisplayNode(this.node);
1590
+ }
1591
+ const entry = this.node.entry;
1592
+ const id = entry.nodeId || entry.id;
1593
+ return this.loadNodeInfo(id);
1594
+ }
1595
+ }
1596
+ trackByActionId(_, action) {
1597
+ return action.id;
1598
+ }
1599
+ getEntryColor(entry) {
1600
+ return entry?.color;
1601
+ }
1602
+ close() {
1603
+ this.store.dispatch(new ToggleInfoDrawerAction());
1604
+ }
1605
+ loadNodeInfo(nodeId) {
1606
+ if (nodeId) {
1607
+ this.isLoading = true;
1608
+ this.contentApi.getNodeInfo(nodeId).subscribe((entity) => {
1609
+ this.setDisplayNode(entity);
1610
+ this.isLoading = false;
1611
+ }, () => (this.isLoading = false));
1612
+ }
1613
+ }
1614
+ setDisplayNode(node) {
1615
+ this.displayNode = node;
1616
+ }
1617
+ }
1618
+ InfoDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: InfoDrawerComponent, deps: [{ token: i1$3.Store }, { token: ContentApiService }, { token: AppExtensionService }], target: i0.ɵɵFactoryTarget.Component });
1619
+ InfoDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: InfoDrawerComponent, selector: "aca-info-drawer", inputs: { nodeId: "nodeId", node: "node" }, host: { listeners: { "keydown.escape": "onEscapeKeyboardEvent()" } }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [title]=\"'APP.INFO_DRAWER.TITLE'\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <adf-toolbar class=\"adf-toolbar--inline\" info-drawer-buttons>\n <ng-container *ngFor=\"let entry of actions; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"entry\" [color]=\"getEntryColor(entry)\"></aca-toolbar-action>\n </ng-container>\n </adf-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.InfoDrawerTabComponent, selector: "adf-info-drawer-tab", inputs: ["label", "icon"] }, { kind: "component", type: i1$2.InfoDrawerComponent, selector: "adf-info-drawer", inputs: ["title", "selectedIndex", "showHeader"], outputs: ["currentTab"] }, { kind: "directive", type: i1$2.InfoDrawerButtonsDirective, selector: "[adf-info-drawer-buttons], [info-drawer-buttons]" }, { kind: "component", type: i6$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i3.DynamicTabComponent, selector: "adf-dynamic-tab", inputs: ["id", "node"] }, { kind: "component", type: i1$2.ToolbarComponent, selector: "adf-toolbar", inputs: ["title", "color"] }, { kind: "component", type: ToolbarActionComponent, selector: "aca-toolbar-action", inputs: ["type", "color", "actionRef"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
1620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: InfoDrawerComponent, decorators: [{
1621
+ type: Component,
1622
+ args: [{ selector: 'aca-info-drawer', template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [title]=\"'APP.INFO_DRAWER.TITLE'\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <adf-toolbar class=\"adf-toolbar--inline\" info-drawer-buttons>\n <ng-container *ngFor=\"let entry of actions; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"entry\" [color]=\"getEntryColor(entry)\"></aca-toolbar-action>\n </ng-container>\n </adf-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n" }]
1623
+ }], ctorParameters: function () { return [{ type: i1$3.Store }, { type: ContentApiService }, { type: AppExtensionService }]; }, propDecorators: { nodeId: [{
1624
+ type: Input
1625
+ }], node: [{
1626
+ type: Input
1627
+ }], onEscapeKeyboardEvent: [{
1628
+ type: HostListener,
1629
+ args: ['keydown.escape']
1630
+ }] } });
1631
+
1632
+ /*!
1633
+ * @license
1634
+ * Alfresco Example Content Application
1635
+ *
1636
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1637
+ *
1638
+ * This file is part of the Alfresco Example Content Application.
1639
+ * If the software was purchased under a paid Alfresco license, the terms of
1640
+ * the paid license agreement will prevail. Otherwise, the software is
1641
+ * provided under the following open source license terms:
1642
+ *
1643
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1644
+ * it under the terms of the GNU Lesser General Public License as published by
1645
+ * the Free Software Foundation, either version 3 of the License, or
1646
+ * (at your option) any later version.
1647
+ *
1648
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1649
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1650
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1651
+ * GNU Lesser General Public License for more details.
1652
+ *
1653
+ * You should have received a copy of the GNU Lesser General Public License
1654
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1655
+ */
1656
+ class SharedInfoDrawerModule {
1657
+ }
1658
+ SharedInfoDrawerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1659
+ SharedInfoDrawerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, declarations: [InfoDrawerComponent], imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule, TranslateModule], exports: [InfoDrawerComponent] });
1660
+ SharedInfoDrawerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule, TranslateModule] });
1661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, decorators: [{
1662
+ type: NgModule,
1663
+ args: [{
1664
+ imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule, TranslateModule],
1665
+ declarations: [InfoDrawerComponent],
1666
+ exports: [InfoDrawerComponent]
1667
+ }]
1668
+ }] });
1669
+
1670
+ /*
1671
+ * Copyright © 2005 - 2021 Alfresco Software, Ltd. All rights reserved.
1672
+ *
1673
+ * License rights for this program may be obtained from Alfresco Software, Ltd.
1674
+ * pursuant to a written agreement and any use of this program without such an
1675
+ * agreement is prohibited.
1676
+ */
1677
+ class DocumentBasePageService {
1678
+ }
1679
+
1680
+ /*!
1681
+ * @license
1682
+ * Alfresco Example Content Application
1683
+ *
1684
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1685
+ *
1686
+ * This file is part of the Alfresco Example Content Application.
1687
+ * If the software was purchased under a paid Alfresco license, the terms of
1688
+ * the paid license agreement will prevail. Otherwise, the software is
1689
+ * provided under the following open source license terms:
1690
+ *
1691
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1692
+ * it under the terms of the GNU Lesser General Public License as published by
1693
+ * the Free Software Foundation, either version 3 of the License, or
1694
+ * (at your option) any later version.
1695
+ *
1696
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1697
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1698
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1699
+ * GNU Lesser General Public License for more details.
1700
+ *
1701
+ * You should have received a copy of the GNU Lesser General Public License
1702
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1703
+ */
1704
+ function isLocked(node) {
1705
+ const { entry } = node;
1706
+ return ((entry && entry.isLocked) ||
1707
+ (entry.properties && (entry.properties['cm:lockType'] === 'READ_ONLY_LOCK' || entry.properties['cm:lockType'] === 'WRITE_LOCK')));
1708
+ }
1709
+ function isLibrary(node) {
1710
+ const { entry } = node;
1711
+ return (entry.guid && entry.id && entry.preset && entry.title && entry.visibility) || entry.nodeType === 'st:site';
1712
+ }
1713
+
1714
+ /*!
1715
+ * @license
1716
+ * Alfresco Example Content Application
1717
+ *
1718
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1719
+ *
1720
+ * This file is part of the Alfresco Example Content Application.
1721
+ * If the software was purchased under a paid Alfresco license, the terms of
1722
+ * the paid license agreement will prevail. Otherwise, the software is
1723
+ * provided under the following open source license terms:
1724
+ *
1725
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1726
+ * it under the terms of the GNU Lesser General Public License as published by
1727
+ * the Free Software Foundation, either version 3 of the License, or
1728
+ * (at your option) any later version.
1729
+ *
1730
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1731
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1732
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1733
+ * GNU Lesser General Public License for more details.
1734
+ *
1735
+ * You should have received a copy of the GNU Lesser General Public License
1736
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1737
+ */
1738
+ /* eslint-disable @angular-eslint/directive-class-suffix */
1739
+ class PageComponent {
1740
+ constructor(store, extensions, content) {
1741
+ this.store = store;
1742
+ this.extensions = extensions;
1743
+ this.content = content;
1744
+ this.onDestroy$ = new Subject();
1745
+ this.title = 'Page';
1746
+ this.actions = [];
1747
+ this.viewerToolbarActions = [];
1748
+ this.canUpdateNode = false;
1749
+ this.canUpload = false;
1750
+ this.showHeader = ShowHeaderMode.Data;
1751
+ this.filterSorting = 'name-asc';
1752
+ this.subscriptions = [];
1753
+ }
1754
+ ngOnInit() {
1755
+ this.sharedPreviewUrl$ = this.store.select(getSharedUrl);
1756
+ this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened).pipe(map((infoDrawerState) => !this.isOutletPreviewUrl() && infoDrawerState));
1757
+ this.documentDisplayMode$ = this.store.select(getDocumentDisplayMode);
1758
+ this.store
1759
+ .select(getAppSelection)
1760
+ .pipe(takeUntil(this.onDestroy$))
1761
+ .subscribe((selection) => {
1762
+ this.selection = selection;
1763
+ this.canUpdateNode = this.selection.count === 1 && this.content.canUpdateNode(selection.first);
1764
+ });
1765
+ this.extensions
1766
+ .getAllowedToolbarActions()
1767
+ .pipe(takeUntil(this.onDestroy$))
1768
+ .subscribe((actions) => {
1769
+ this.actions = actions;
1770
+ });
1771
+ this.extensions
1772
+ .getViewerToolbarActions()
1773
+ .pipe(takeUntil(this.onDestroy$))
1774
+ .subscribe((actions) => {
1775
+ this.viewerToolbarActions = actions;
1776
+ });
1777
+ this.store
1778
+ .select(getCurrentFolder)
1779
+ .pipe(takeUntil(this.onDestroy$))
1780
+ .subscribe((node) => {
1781
+ this.canUpload = node && this.content.canUploadContent(node);
1782
+ });
1783
+ }
1784
+ ngOnChanges(changes) {
1785
+ if (changes.nodeResult && changes.nodeResult.currentValue) {
1786
+ this.nodeResult = changes.nodeResult.currentValue;
1787
+ }
1788
+ }
1789
+ ngOnDestroy() {
1790
+ this.subscriptions.forEach((subscription) => subscription.unsubscribe());
1791
+ this.subscriptions = [];
1792
+ this.onDestroy$.next(true);
1793
+ this.onDestroy$.complete();
1794
+ this.store.dispatch(new SetSelectedNodesAction([]));
1795
+ }
1796
+ showPreview(node, extras) {
1797
+ if (node && node.entry) {
1798
+ let id;
1799
+ if (node.entry.nodeType === 'app:filelink') {
1800
+ id = node.entry.properties['cm:destination'];
1801
+ }
1802
+ else {
1803
+ id = node.entry.nodeId || node.entry.guid || node.entry.id;
1804
+ }
1805
+ this.store.dispatch(new ViewNodeAction(id, extras));
1806
+ }
1807
+ }
1808
+ getParentNodeId() {
1809
+ return this.node ? this.node.id : null;
1810
+ }
1811
+ imageResolver(row) {
1812
+ if (isLocked(row.node)) {
1813
+ return 'assets/images/baseline-lock-24px.svg';
1814
+ }
1815
+ if (isLibrary(row.node)) {
1816
+ return 'assets/images/baseline-library_books-24px.svg';
1817
+ }
1818
+ return null;
1819
+ }
1820
+ reload(selectedNode) {
1821
+ if (this.isOutletPreviewUrl()) {
1822
+ return;
1823
+ }
1824
+ this.store.dispatch(new ReloadDocumentListAction());
1825
+ if (selectedNode) {
1826
+ this.store.dispatch(new SetSelectedNodesAction([selectedNode]));
1827
+ }
1828
+ }
1829
+ trackByActionId(_, action) {
1830
+ return action.id;
1831
+ }
1832
+ trackById(_, obj) {
1833
+ return obj.id;
1834
+ }
1835
+ trackByColumnId(_, obj) {
1836
+ return obj.id;
1837
+ }
1838
+ isOutletPreviewUrl() {
1839
+ return location.href.includes('viewer:view');
1840
+ }
1841
+ onSortingChanged(event) {
1842
+ this.filterSorting = event.detail.key + '-' + event.detail.direction;
1843
+ }
1844
+ onAllFilterCleared() {
1845
+ if (!this.isOutletPreviewUrl()) {
1846
+ this.documentList.node = null;
1847
+ this.store.dispatch(new ReloadDocumentListAction());
1848
+ }
1849
+ }
1850
+ }
1851
+ PageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageComponent, deps: [{ token: i1$3.Store }, { token: AppExtensionService }, { token: DocumentBasePageService }], target: i0.ɵɵFactoryTarget.Directive });
1852
+ PageComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: PageComponent, viewQueries: [{ propertyName: "documentList", first: true, predicate: DocumentListComponent, descendants: true }], usesOnChanges: true, ngImport: i0 });
1853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageComponent, decorators: [{
1854
+ type: Directive
1855
+ }], ctorParameters: function () { return [{ type: i1$3.Store }, { type: AppExtensionService }, { type: DocumentBasePageService }]; }, propDecorators: { documentList: [{
1856
+ type: ViewChild,
1857
+ args: [DocumentListComponent]
1858
+ }] } });
1859
+
1860
+ /*!
1861
+ * @license
1862
+ * Alfresco Example Content Application
1863
+ *
1864
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1865
+ *
1866
+ * This file is part of the Alfresco Example Content Application.
1867
+ * If the software was purchased under a paid Alfresco license, the terms of
1868
+ * the paid license agreement will prevail. Otherwise, the software is
1869
+ * provided under the following open source license terms:
1870
+ *
1871
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1872
+ * it under the terms of the GNU Lesser General Public License as published by
1873
+ * the Free Software Foundation, either version 3 of the License, or
1874
+ * (at your option) any later version.
1875
+ *
1876
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1877
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1878
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1879
+ * GNU Lesser General Public License for more details.
1880
+ *
1881
+ * You should have received a copy of the GNU Lesser General Public License
1882
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1883
+ */
1884
+ class ContextActionsDirective {
1885
+ constructor(store) {
1886
+ this.store = store;
1887
+ this.execute$ = new Subject();
1888
+ this.onDestroy$ = new Subject();
1889
+ // eslint-disable-next-line
1890
+ this.enabled = true;
1891
+ }
1892
+ onContextMenuEvent(event) {
1893
+ if (event) {
1894
+ event.preventDefault();
1895
+ if (this.enabled) {
1896
+ const target = this.getTarget(event);
1897
+ if (target) {
1898
+ this.execute(event, target);
1899
+ }
1900
+ }
1901
+ }
1902
+ }
1903
+ ngOnInit() {
1904
+ this.execute$.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((event) => {
1905
+ this.store.dispatch(new ContextMenu(event));
1906
+ });
1907
+ }
1908
+ ngOnDestroy() {
1909
+ this.onDestroy$.next(true);
1910
+ this.onDestroy$.complete();
1911
+ }
1912
+ execute(event, target) {
1913
+ if (!this.isSelected(target)) {
1914
+ target.dispatchEvent(new MouseEvent('click'));
1915
+ }
1916
+ if (this.isEmptyTable(target)) {
1917
+ return null;
1918
+ }
1919
+ this.execute$.next(event);
1920
+ }
1921
+ getTarget(event) {
1922
+ const target = event.target;
1923
+ return this.findAncestor(target, 'adf-datatable-cell');
1924
+ }
1925
+ isSelected(target) {
1926
+ if (!target) {
1927
+ return false;
1928
+ }
1929
+ return this.findAncestor(target, 'adf-datatable-row').classList.contains('adf-is-selected');
1930
+ }
1931
+ isEmptyTable(target) {
1932
+ return this.findAncestor(target, 'adf-datatable-cell').classList.contains('adf-no-content-container');
1933
+ }
1934
+ findAncestor(el, className) {
1935
+ if (el.classList.contains(className)) {
1936
+ return el;
1937
+ }
1938
+ // eslint-disable-next-line curly
1939
+ while ((el = el.parentElement) && !el.classList.contains(className))
1940
+ ;
1941
+ return el;
1942
+ }
1943
+ }
1944
+ ContextActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsDirective, deps: [{ token: i1$3.Store }], target: i0.ɵɵFactoryTarget.Directive });
1945
+ ContextActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: ContextActionsDirective, selector: "[acaContextActions]", inputs: { enabled: ["acaContextEnable", "enabled"] }, host: { listeners: { "contextmenu": "onContextMenuEvent($event)" } }, exportAs: ["acaContextActions"], ngImport: i0 });
1946
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsDirective, decorators: [{
1947
+ type: Directive,
1948
+ args: [{
1949
+ selector: '[acaContextActions]',
1950
+ exportAs: 'acaContextActions'
1951
+ }]
1952
+ }], ctorParameters: function () { return [{ type: i1$3.Store }]; }, propDecorators: { enabled: [{
1953
+ type: Input,
1954
+ args: ['acaContextEnable']
1955
+ }], onContextMenuEvent: [{
1956
+ type: HostListener,
1957
+ args: ['contextmenu', ['$event']]
1958
+ }] } });
1959
+
1960
+ /*!
1961
+ * @license
1962
+ * Alfresco Example Content Application
1963
+ *
1964
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
1965
+ *
1966
+ * This file is part of the Alfresco Example Content Application.
1967
+ * If the software was purchased under a paid Alfresco license, the terms of
1968
+ * the paid license agreement will prevail. Otherwise, the software is
1969
+ * provided under the following open source license terms:
1970
+ *
1971
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1972
+ * it under the terms of the GNU Lesser General Public License as published by
1973
+ * the Free Software Foundation, either version 3 of the License, or
1974
+ * (at your option) any later version.
1975
+ *
1976
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1977
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1978
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1979
+ * GNU Lesser General Public License for more details.
1980
+ *
1981
+ * You should have received a copy of the GNU Lesser General Public License
1982
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
1983
+ */
1984
+ /**
1985
+ * @deprecated in 1.11.0, use SharedDirectivesModule instead.
1986
+ */
1987
+ class ContextActionsModule {
1988
+ }
1989
+ ContextActionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1990
+ ContextActionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule, declarations: [ContextActionsDirective], exports: [ContextActionsDirective] });
1991
+ ContextActionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule });
1992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule, decorators: [{
1993
+ type: NgModule,
1994
+ args: [{
1995
+ declarations: [ContextActionsDirective],
1996
+ exports: [ContextActionsDirective]
1997
+ }]
1998
+ }] });
1999
+
2000
+ /*!
2001
+ * @license
2002
+ * Alfresco Example Content Application
2003
+ *
2004
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2005
+ *
2006
+ * This file is part of the Alfresco Example Content Application.
2007
+ * If the software was purchased under a paid Alfresco license, the terms of
2008
+ * the paid license agreement will prevail. Otherwise, the software is
2009
+ * provided under the following open source license terms:
2010
+ *
2011
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2012
+ * it under the terms of the GNU Lesser General Public License as published by
2013
+ * the Free Software Foundation, either version 3 of the License, or
2014
+ * (at your option) any later version.
2015
+ *
2016
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2017
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2018
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2019
+ * GNU Lesser General Public License for more details.
2020
+ *
2021
+ * You should have received a copy of the GNU Lesser General Public License
2022
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2023
+ */
2024
+ class PaginationDirective {
2025
+ constructor(pagination, preferences, config) {
2026
+ this.pagination = pagination;
2027
+ this.preferences = preferences;
2028
+ this.config = config;
2029
+ this.subscriptions = [];
2030
+ }
2031
+ ngOnInit() {
2032
+ this.pagination.supportedPageSizes = this.config.get('pagination.supportedPageSizes');
2033
+ this.subscriptions.push(this.pagination.changePageSize.subscribe((event) => {
2034
+ this.preferences.paginationSize = event.maxItems;
2035
+ }));
2036
+ }
2037
+ ngOnDestroy() {
2038
+ this.subscriptions.forEach((subscription) => subscription.unsubscribe());
2039
+ this.subscriptions = [];
2040
+ }
2041
+ }
2042
+ PaginationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PaginationDirective, deps: [{ token: i1$2.PaginationComponent }, { token: i1$2.UserPreferencesService }, { token: i1$2.AppConfigService }], target: i0.ɵɵFactoryTarget.Directive });
2043
+ PaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: PaginationDirective, selector: "[acaPagination]", ngImport: i0 });
2044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PaginationDirective, decorators: [{
2045
+ type: Directive,
2046
+ args: [{
2047
+ selector: '[acaPagination]'
2048
+ }]
2049
+ }], ctorParameters: function () { return [{ type: i1$2.PaginationComponent }, { type: i1$2.UserPreferencesService }, { type: i1$2.AppConfigService }]; } });
2050
+
2051
+ /*!
2052
+ * @license
2053
+ * Alfresco Example Content Application
2054
+ *
2055
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2056
+ *
2057
+ * This file is part of the Alfresco Example Content Application.
2058
+ * If the software was purchased under a paid Alfresco license, the terms of
2059
+ * the paid license agreement will prevail. Otherwise, the software is
2060
+ * provided under the following open source license terms:
2061
+ *
2062
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2063
+ * it under the terms of the GNU Lesser General Public License as published by
2064
+ * the Free Software Foundation, either version 3 of the License, or
2065
+ * (at your option) any later version.
2066
+ *
2067
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2068
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2069
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2070
+ * GNU Lesser General Public License for more details.
2071
+ *
2072
+ * You should have received a copy of the GNU Lesser General Public License
2073
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2074
+ */
2075
+ class SharedDirectivesModule {
2076
+ }
2077
+ SharedDirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2078
+ SharedDirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, declarations: [PaginationDirective], imports: [ContextActionsModule], exports: [PaginationDirective, ContextActionsModule] });
2079
+ SharedDirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, imports: [ContextActionsModule, ContextActionsModule] });
2080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, decorators: [{
2081
+ type: NgModule,
2082
+ args: [{
2083
+ imports: [ContextActionsModule],
2084
+ declarations: [PaginationDirective],
2085
+ exports: [PaginationDirective, ContextActionsModule]
2086
+ }]
2087
+ }] });
2088
+
2089
+ /*!
2090
+ * @license
2091
+ * Alfresco Example Content Application
2092
+ *
2093
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2094
+ *
2095
+ * This file is part of the Alfresco Example Content Application.
2096
+ * If the software was purchased under a paid Alfresco license, the terms of
2097
+ * the paid license agreement will prevail. Otherwise, the software is
2098
+ * provided under the following open source license terms:
2099
+ *
2100
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2101
+ * it under the terms of the GNU Lesser General Public License as published by
2102
+ * the Free Software Foundation, either version 3 of the License, or
2103
+ * (at your option) any later version.
2104
+ *
2105
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2106
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2107
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2108
+ * GNU Lesser General Public License for more details.
2109
+ *
2110
+ * You should have received a copy of the GNU Lesser General Public License
2111
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2112
+ */
2113
+
2114
+ /*!
2115
+ * @license
2116
+ * Alfresco Example Content Application
2117
+ *
2118
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2119
+ *
2120
+ * This file is part of the Alfresco Example Content Application.
2121
+ * If the software was purchased under a paid Alfresco license, the terms of
2122
+ * the paid license agreement will prevail. Otherwise, the software is
2123
+ * provided under the following open source license terms:
2124
+ *
2125
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2126
+ * it under the terms of the GNU Lesser General Public License as published by
2127
+ * the Free Software Foundation, either version 3 of the License, or
2128
+ * (at your option) any later version.
2129
+ *
2130
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2131
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2132
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2133
+ * GNU Lesser General Public License for more details.
2134
+ *
2135
+ * You should have received a copy of the GNU Lesser General Public License
2136
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2137
+ */
2138
+
2139
+ /*!
2140
+ * @license
2141
+ * Alfresco Example Content Application
2142
+ *
2143
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2144
+ *
2145
+ * This file is part of the Alfresco Example Content Application.
2146
+ * If the software was purchased under a paid Alfresco license, the terms of
2147
+ * the paid license agreement will prevail. Otherwise, the software is
2148
+ * provided under the following open source license terms:
2149
+ *
2150
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2151
+ * it under the terms of the GNU Lesser General Public License as published by
2152
+ * the Free Software Foundation, either version 3 of the License, or
2153
+ * (at your option) any later version.
2154
+ *
2155
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2156
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2157
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2158
+ * GNU Lesser General Public License for more details.
2159
+ *
2160
+ * You should have received a copy of the GNU Lesser General Public License
2161
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2162
+ */
2163
+ class AppSharedRuleGuard {
2164
+ constructor(store) {
2165
+ this.isQuickShareEnabled$ = store.select(isQuickShareEnabled);
2166
+ }
2167
+ canActivate(_) {
2168
+ return this.isQuickShareEnabled$;
2169
+ }
2170
+ canActivateChild(route) {
2171
+ return this.canActivate(route);
2172
+ }
2173
+ }
2174
+ AppSharedRuleGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppSharedRuleGuard, deps: [{ token: i1$3.Store }], target: i0.ɵɵFactoryTarget.Injectable });
2175
+ AppSharedRuleGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppSharedRuleGuard, providedIn: 'root' });
2176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppSharedRuleGuard, decorators: [{
2177
+ type: Injectable,
2178
+ args: [{
2179
+ providedIn: 'root'
2180
+ }]
2181
+ }], ctorParameters: function () { return [{ type: i1$3.Store }]; } });
2182
+
2183
+ /*!
2184
+ * @license
2185
+ * Alfresco Example Content Application
2186
+ *
2187
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2188
+ *
2189
+ * This file is part of the Alfresco Example Content Application.
2190
+ * If the software was purchased under a paid Alfresco license, the terms of
2191
+ * the paid license agreement will prevail. Otherwise, the software is
2192
+ * provided under the following open source license terms:
2193
+ *
2194
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2195
+ * it under the terms of the GNU Lesser General Public License as published by
2196
+ * the Free Software Foundation, either version 3 of the License, or
2197
+ * (at your option) any later version.
2198
+ *
2199
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2200
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2201
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2202
+ * GNU Lesser General Public License for more details.
2203
+ *
2204
+ * You should have received a copy of the GNU Lesser General Public License
2205
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2206
+ */
2207
+ class RouterExtensionService {
2208
+ constructor(router, extensions) {
2209
+ this.router = router;
2210
+ this.extensions = extensions;
2211
+ this.defaults = {
2212
+ layout: 'app.layout.main',
2213
+ auth: ['app.auth']
2214
+ };
2215
+ }
2216
+ mapExtensionRoutes() {
2217
+ const routesWithoutParent = [];
2218
+ this.getApplicationRoutes().forEach((extensionRoute) => {
2219
+ if (this.extensionRouteHasChild(extensionRoute)) {
2220
+ const parentRoute = this.findRoute(extensionRoute.parentRoute);
2221
+ if (parentRoute) {
2222
+ this.convertExtensionRouteToRoute(extensionRoute);
2223
+ parentRoute.children.unshift(extensionRoute);
2224
+ }
2225
+ }
2226
+ else {
2227
+ routesWithoutParent.push(extensionRoute);
2228
+ }
2229
+ });
2230
+ this.router.config.unshift(...routesWithoutParent);
2231
+ }
2232
+ getApplicationRoutes() {
2233
+ return this.extensions.routes.map((route) => {
2234
+ const guards = this.extensions.getAuthGuards(route.auth && route.auth.length > 0 ? route.auth : this.defaults.auth);
2235
+ return {
2236
+ path: route.path,
2237
+ component: this.getComponentById(route.layout ?? this.defaults.layout),
2238
+ canActivateChild: guards,
2239
+ canActivate: guards,
2240
+ parentRoute: route.parentRoute,
2241
+ children: [
2242
+ ...(route['children']
2243
+ ? route['children'].map(({ path, component, outlet, data }) => ({
2244
+ path,
2245
+ outlet,
2246
+ data,
2247
+ component: this.getComponentById(component)
2248
+ }))
2249
+ : []),
2250
+ {
2251
+ path: '',
2252
+ component: this.getComponentById(route.component),
2253
+ data: route.data
2254
+ }
2255
+ ]
2256
+ };
2257
+ });
2258
+ }
2259
+ getComponentById(id) {
2260
+ return this.extensions.getComponentById(id);
2261
+ }
2262
+ extensionRouteHasChild(route) {
2263
+ return route.parentRoute !== undefined;
2264
+ }
2265
+ convertExtensionRouteToRoute(extensionRoute) {
2266
+ delete extensionRoute.parentRoute;
2267
+ delete extensionRoute.component;
2268
+ }
2269
+ findRoute(parentRoute) {
2270
+ const routeIndex = this.router.config.findIndex((route) => route.path === parentRoute);
2271
+ return this.router.config[routeIndex];
2272
+ }
2273
+ }
2274
+ RouterExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RouterExtensionService, deps: [{ token: i3$2.Router }, { token: i3.ExtensionService }], target: i0.ɵɵFactoryTarget.Injectable });
2275
+ RouterExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RouterExtensionService, providedIn: 'root' });
2276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RouterExtensionService, decorators: [{
2277
+ type: Injectable,
2278
+ args: [{
2279
+ providedIn: 'root'
2280
+ }]
2281
+ }], ctorParameters: function () { return [{ type: i3$2.Router }, { type: i3.ExtensionService }]; } });
2282
+
2283
+ /*!
2284
+ * @license
2285
+ * Alfresco Example Content Application
2286
+ *
2287
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2288
+ *
2289
+ * This file is part of the Alfresco Example Content Application.
2290
+ * If the software was purchased under a paid Alfresco license, the terms of
2291
+ * the paid license agreement will prevail. Otherwise, the software is
2292
+ * provided under the following open source license terms:
2293
+ *
2294
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2295
+ * it under the terms of the GNU Lesser General Public License as published by
2296
+ * the Free Software Foundation, either version 3 of the License, or
2297
+ * (at your option) any later version.
2298
+ *
2299
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2300
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2301
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2302
+ * GNU Lesser General Public License for more details.
2303
+ *
2304
+ * You should have received a copy of the GNU Lesser General Public License
2305
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2306
+ */
2307
+ // After moving shell to ADF to core, AppService will implement ShellAppService
2308
+ class AppService {
2309
+ constructor(preferencesService, authenticationService, store, router, activatedRoute, config, pageTitle, alfrescoApiService, uploadService, routerExtensionService, contentApi, sharedLinksApiService, groupService, overlayContainer, initialAppState, searchQueryBuilderService) {
2310
+ this.preferencesService = preferencesService;
2311
+ this.authenticationService = authenticationService;
2312
+ this.store = store;
2313
+ this.router = router;
2314
+ this.activatedRoute = activatedRoute;
2315
+ this.config = config;
2316
+ this.pageTitle = pageTitle;
2317
+ this.alfrescoApiService = alfrescoApiService;
2318
+ this.uploadService = uploadService;
2319
+ this.routerExtensionService = routerExtensionService;
2320
+ this.contentApi = contentApi;
2321
+ this.sharedLinksApiService = sharedLinksApiService;
2322
+ this.groupService = groupService;
2323
+ this.overlayContainer = overlayContainer;
2324
+ this.initialAppState = initialAppState;
2325
+ this.hideSidenavConditions = ['/preview/'];
2326
+ this.minimizeSidenavConditions = ['search'];
2327
+ this.onDestroy$ = new Subject();
2328
+ this.ready = new BehaviorSubject(this.authenticationService.isLoggedIn() || this.withCredentials);
2329
+ this.ready$ = this.ready.asObservable();
2330
+ this.authenticationService.onLogin.subscribe(() => {
2331
+ this.ready.next(true);
2332
+ });
2333
+ this.authenticationService.onLogout.subscribe(() => {
2334
+ searchQueryBuilderService.resetToDefaults();
2335
+ });
2336
+ this.pageHeading$ = this.router.events.pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0), map((event) => event.snapshot?.data?.title ?? ''), tap((title) => this.pageTitle.setTitle(title)));
2337
+ }
2338
+ /**
2339
+ * Whether `withCredentials` mode is enabled.
2340
+ * Usually means that `Kerberos` mode is used.
2341
+ */
2342
+ get withCredentials() {
2343
+ return this.config.get('auth.withCredentials', false);
2344
+ }
2345
+ ngOnDestroy() {
2346
+ this.onDestroy$.next(true);
2347
+ this.onDestroy$.complete();
2348
+ }
2349
+ init() {
2350
+ this.alfrescoApiService.getInstance().on('error', (error) => {
2351
+ if (error.status === 401 && !this.alfrescoApiService.isExcludedErrorListener(error?.response?.req?.url)) {
2352
+ if (!this.authenticationService.isLoggedIn()) {
2353
+ this.store.dispatch(new CloseModalDialogsAction());
2354
+ let redirectUrl = this.activatedRoute.snapshot.queryParams['redirectUrl'];
2355
+ if (!redirectUrl) {
2356
+ redirectUrl = this.router.url;
2357
+ }
2358
+ this.router.navigate(['/login'], {
2359
+ queryParams: { redirectUrl }
2360
+ });
2361
+ }
2362
+ }
2363
+ });
2364
+ this.loadAppSettings();
2365
+ this.loadCustomCss();
2366
+ this.loadCustomWebFont();
2367
+ const { router } = this;
2368
+ this.router.events
2369
+ .pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0))
2370
+ .subscribe((_event) => {
2371
+ this.store.dispatch(new SetCurrentUrlAction(router.url));
2372
+ });
2373
+ this.router.events
2374
+ .pipe(filter((event) => event instanceof NavigationStart), takeUntil(this.onDestroy$))
2375
+ .subscribe(() => {
2376
+ this.store.dispatch(new ResetSelectionAction());
2377
+ });
2378
+ this.routerExtensionService.mapExtensionRoutes();
2379
+ this.uploadService.fileUploadError.subscribe((error) => this.onFileUploadedError(error));
2380
+ this.sharedLinksApiService.error.pipe(takeUntil(this.onDestroy$)).subscribe((err) => {
2381
+ this.store.dispatch(new SnackbarErrorAction(err.message));
2382
+ });
2383
+ this.ready$.pipe(takeUntil(this.onDestroy$)).subscribe((isReady) => {
2384
+ if (isReady) {
2385
+ this.loadRepositoryStatus();
2386
+ this.loadUserProfile();
2387
+ }
2388
+ });
2389
+ this.overlayContainer.getContainerElement().setAttribute('role', 'region');
2390
+ }
2391
+ loadRepositoryStatus() {
2392
+ this.contentApi.getRepositoryInformation().subscribe((response) => {
2393
+ this.store.dispatch(new SetRepositoryInfoAction(response.entry.repository));
2394
+ });
2395
+ }
2396
+ async loadUserProfile() {
2397
+ const groupsEntries = await this.groupService.listAllGroupMembershipsForPerson('-me-', { maxItems: 250 });
2398
+ const groups = [];
2399
+ if (groupsEntries) {
2400
+ groups.push(...groupsEntries.map((obj) => obj.entry));
2401
+ }
2402
+ this.contentApi.getPerson('-me-').subscribe((person) => {
2403
+ this.store.dispatch(new SetUserProfileAction({ person: person.entry, groups }));
2404
+ });
2405
+ }
2406
+ loadAppSettings() {
2407
+ let baseShareUrl = this.config.get('baseShareUrl');
2408
+ if (!baseShareUrl.endsWith('/')) {
2409
+ baseShareUrl += '/';
2410
+ }
2411
+ const state = {
2412
+ ...this.initialAppState,
2413
+ appName: this.config.get('application.name'),
2414
+ headerColor: this.config.get('headerColor'),
2415
+ headerTextColor: this.config.get('headerTextColor', '#000000'),
2416
+ logoPath: this.config.get('application.logo'),
2417
+ headerImagePath: this.config.get('application.headerImagePath'),
2418
+ customCssPath: this.config.get('customCssPath'),
2419
+ webFontPath: this.config.get('webFontPath'),
2420
+ sharedUrl: baseShareUrl
2421
+ };
2422
+ this.store.dispatch(new SetInitialStateAction(state));
2423
+ }
2424
+ onFileUploadedError(error) {
2425
+ let message = 'APP.MESSAGES.UPLOAD.ERROR.GENERIC';
2426
+ if (error.error.status === 403) {
2427
+ message = 'APP.MESSAGES.UPLOAD.ERROR.403';
2428
+ }
2429
+ if (error.error.status === 404) {
2430
+ message = 'APP.MESSAGES.UPLOAD.ERROR.404';
2431
+ }
2432
+ if (error.error.status === 409) {
2433
+ message = 'APP.MESSAGES.UPLOAD.ERROR.CONFLICT';
2434
+ }
2435
+ if (error.error.status === 500) {
2436
+ message = 'APP.MESSAGES.UPLOAD.ERROR.500';
2437
+ }
2438
+ if (error.error.status === 504) {
2439
+ message = 'APP.MESSAGES.UPLOAD.ERROR.504';
2440
+ }
2441
+ this.store.dispatch(new SnackbarErrorAction(message));
2442
+ }
2443
+ loadCustomCss() {
2444
+ this.store.select(getCustomCssPath).subscribe((cssPath) => {
2445
+ if (cssPath) {
2446
+ this.createLink(cssPath);
2447
+ }
2448
+ });
2449
+ }
2450
+ loadCustomWebFont() {
2451
+ this.store.select(getCustomWebFontPath).subscribe((fontUrl) => {
2452
+ if (fontUrl) {
2453
+ this.createLink(fontUrl);
2454
+ }
2455
+ });
2456
+ }
2457
+ createLink(url) {
2458
+ const cssLinkElement = document.createElement('link');
2459
+ cssLinkElement.setAttribute('rel', 'stylesheet');
2460
+ cssLinkElement.setAttribute('type', 'text/css');
2461
+ cssLinkElement.setAttribute('href', url);
2462
+ document.head.appendChild(cssLinkElement);
2463
+ }
2464
+ }
2465
+ AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppService, deps: [{ token: i1$2.UserPreferencesService }, { token: i1$2.AuthenticationService }, { token: i1$3.Store }, { token: i3$2.Router }, { token: i3$2.ActivatedRoute }, { token: i1$2.AppConfigService }, { token: i1$2.PageTitleService }, { token: i1$2.AlfrescoApiService }, { token: i1$2.UploadService }, { token: RouterExtensionService }, { token: ContentApiService }, { token: i6$2.SharedLinksApiService }, { token: i6$2.GroupService }, { token: i7.OverlayContainer }, { token: STORE_INITIAL_APP_DATA }, { token: i6$2.SearchQueryBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
2466
+ AppService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppService, providedIn: 'root' });
2467
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppService, decorators: [{
2468
+ type: Injectable,
2469
+ args: [{
2470
+ providedIn: 'root'
2471
+ }]
2472
+ }], ctorParameters: function () { return [{ type: i1$2.UserPreferencesService }, { type: i1$2.AuthenticationService }, { type: i1$3.Store }, { type: i3$2.Router }, { type: i3$2.ActivatedRoute }, { type: i1$2.AppConfigService }, { type: i1$2.PageTitleService }, { type: i1$2.AlfrescoApiService }, { type: i1$2.UploadService }, { type: RouterExtensionService }, { type: ContentApiService }, { type: i6$2.SharedLinksApiService }, { type: i6$2.GroupService }, { type: i7.OverlayContainer }, { type: undefined, decorators: [{
2473
+ type: Inject,
2474
+ args: [STORE_INITIAL_APP_DATA]
2475
+ }] }, { type: i6$2.SearchQueryBuilderService }]; } });
2476
+
2477
+ /*!
2478
+ * @license
2479
+ * Alfresco Example Content Application
2480
+ *
2481
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2482
+ *
2483
+ * This file is part of the Alfresco Example Content Application.
2484
+ * If the software was purchased under a paid Alfresco license, the terms of
2485
+ * the paid license agreement will prevail. Otherwise, the software is
2486
+ * provided under the following open source license terms:
2487
+ *
2488
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2489
+ * it under the terms of the GNU Lesser General Public License as published by
2490
+ * the Free Software Foundation, either version 3 of the License, or
2491
+ * (at your option) any later version.
2492
+ *
2493
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2494
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2495
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2496
+ * GNU Lesser General Public License for more details.
2497
+ *
2498
+ * You should have received a copy of the GNU Lesser General Public License
2499
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2500
+ */
2501
+ class AppHookService {
2502
+ constructor() {
2503
+ /**
2504
+ * Gets emitted when reloads event fired
2505
+ */
2506
+ this.reload = new Subject();
2507
+ /**
2508
+ * Gets emitted when user reset the node
2509
+ */
2510
+ this.reset = new Subject();
2511
+ /**
2512
+ * Gets emitted when user delete the node
2513
+ */
2514
+ this.nodesDeleted = new Subject();
2515
+ /**
2516
+ * Gets emitted when user delete the library
2517
+ */
2518
+ this.libraryDeleted = new Subject();
2519
+ /**
2520
+ * Gets emitted when user create the library
2521
+ */
2522
+ this.libraryCreated = new Subject();
2523
+ /**
2524
+ * Gets emitted when user update the library
2525
+ */
2526
+ this.libraryUpdated = new Subject();
2527
+ /**
2528
+ * Gets emitted when user join the library
2529
+ */
2530
+ this.libraryJoined = new Subject();
2531
+ /**
2532
+ * Gets emitted when user left the library
2533
+ */
2534
+ this.libraryLeft = new Subject();
2535
+ /**
2536
+ * Gets emitted when library throws 400 error code
2537
+ */
2538
+ this.library400Error = new Subject();
2539
+ /**
2540
+ * Gets emitted when user join the library
2541
+ */
2542
+ this.joinLibraryToggle = new Subject();
2543
+ /**
2544
+ * Gets emitted when user unlink the node
2545
+ */
2546
+ this.linksUnshared = new Subject();
2547
+ /**
2548
+ * Gets emitted when user mark the the favorite library
2549
+ */
2550
+ this.favoriteLibraryToggle = new Subject();
2551
+ }
2552
+ }
2553
+ AppHookService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppHookService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2554
+ AppHookService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppHookService, providedIn: 'root' });
2555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppHookService, decorators: [{
2556
+ type: Injectable,
2557
+ args: [{
2558
+ providedIn: 'root'
2559
+ }]
2560
+ }] });
2561
+
2562
+ /*!
2563
+ * @license
2564
+ * Alfresco Example Content Application
2565
+ *
2566
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2567
+ *
2568
+ * This file is part of the Alfresco Example Content Application.
2569
+ * If the software was purchased under a paid Alfresco license, the terms of
2570
+ * the paid license agreement will prevail. Otherwise, the software is
2571
+ * provided under the following open source license terms:
2572
+ *
2573
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2574
+ * it under the terms of the GNU Lesser General Public License as published by
2575
+ * the Free Software Foundation, either version 3 of the License, or
2576
+ * (at your option) any later version.
2577
+ *
2578
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2579
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2580
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2581
+ * GNU Lesser General Public License for more details.
2582
+ *
2583
+ * You should have received a copy of the GNU Lesser General Public License
2584
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2585
+ */
2586
+ class AlfrescoOfficeExtensionService {
2587
+ constructor(appConfigService) {
2588
+ this.appConfigService = appConfigService;
2589
+ this.appConfigService.onLoad
2590
+ .pipe(take(1), map((appConfig) => appConfig.plugins && appConfig.plugins.aosPlugin))
2591
+ .subscribe((aosPlugin) => {
2592
+ if (aosPlugin) {
2593
+ this.enablePlugin();
2594
+ }
2595
+ else {
2596
+ this.disablePlugin();
2597
+ }
2598
+ });
2599
+ }
2600
+ enablePlugin() {
2601
+ if (localStorage && localStorage.getItem('aosPlugin') === null) {
2602
+ localStorage.setItem('aosPlugin', 'true');
2603
+ }
2604
+ }
2605
+ disablePlugin() {
2606
+ localStorage.removeItem('aosPlugin');
2607
+ }
2608
+ isAosPluginEnabled() {
2609
+ return localStorage && localStorage.getItem('aosPlugin') === 'true';
2610
+ }
2611
+ }
2612
+ AlfrescoOfficeExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlfrescoOfficeExtensionService, deps: [{ token: i1$2.AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2613
+ AlfrescoOfficeExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlfrescoOfficeExtensionService, providedIn: 'root' });
2614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlfrescoOfficeExtensionService, decorators: [{
2615
+ type: Injectable,
2616
+ args: [{
2617
+ providedIn: 'root'
2618
+ }]
2619
+ }], ctorParameters: function () { return [{ type: i1$2.AppConfigService }]; } });
2620
+
2621
+ /*!
2622
+ * @license
2623
+ * Alfresco Example Content Application
2624
+ *
2625
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2626
+ *
2627
+ * This file is part of the Alfresco Example Content Application.
2628
+ * If the software was purchased under a paid Alfresco license, the terms of
2629
+ * the paid license agreement will prevail. Otherwise, the software is
2630
+ * provided under the following open source license terms:
2631
+ *
2632
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2633
+ * it under the terms of the GNU Lesser General Public License as published by
2634
+ * the Free Software Foundation, either version 3 of the License, or
2635
+ * (at your option) any later version.
2636
+ *
2637
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2638
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2639
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2640
+ * GNU Lesser General Public License for more details.
2641
+ *
2642
+ * You should have received a copy of the GNU Lesser General Public License
2643
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2644
+ */
2645
+ class SharedModule {
2646
+ static forRoot() {
2647
+ return {
2648
+ ngModule: SharedModule,
2649
+ providers: [ContentApiService, NodePermissionService, AppService]
2650
+ };
2651
+ }
2652
+ }
2653
+ SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2654
+ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, imports: [ContextActionsModule], exports: [ContextActionsModule] });
2655
+ SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, imports: [ContextActionsModule, ContextActionsModule] });
2656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, decorators: [{
2657
+ type: NgModule,
2658
+ args: [{
2659
+ imports: [ContextActionsModule],
2660
+ exports: [ContextActionsModule]
2661
+ }]
2662
+ }] });
2663
+
2664
+ /*!
2665
+ * @license
2666
+ * Alfresco Example Content Application
2667
+ *
2668
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2669
+ *
2670
+ * This file is part of the Alfresco Example Content Application.
2671
+ * If the software was purchased under a paid Alfresco license, the terms of
2672
+ * the paid license agreement will prevail. Otherwise, the software is
2673
+ * provided under the following open source license terms:
2674
+ *
2675
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2676
+ * it under the terms of the GNU Lesser General Public License as published by
2677
+ * the Free Software Foundation, either version 3 of the License, or
2678
+ * (at your option) any later version.
2679
+ *
2680
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2681
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2682
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2683
+ * GNU Lesser General Public License for more details.
2684
+ *
2685
+ * You should have received a copy of the GNU Lesser General Public License
2686
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2687
+ */
2688
+ const initialState = {
2689
+ app: {
2690
+ appName: 'Alfresco Content Application',
2691
+ headerColor: '#ffffff',
2692
+ logoPath: 'assets/images/alfresco-logo-white.svg',
2693
+ headerImagePath: 'assets/images/mastHead-bg-shapesPattern.svg',
2694
+ sharedUrl: '',
2695
+ user: {
2696
+ isAdmin: null,
2697
+ id: null,
2698
+ firstName: '',
2699
+ lastName: ''
2700
+ },
2701
+ selection: {
2702
+ nodes: [],
2703
+ libraries: [],
2704
+ isEmpty: true,
2705
+ count: 0
2706
+ },
2707
+ navigation: {
2708
+ currentFolder: null
2709
+ },
2710
+ infoDrawerOpened: false,
2711
+ infoDrawerMetadataAspect: '',
2712
+ showFacetFilter: true,
2713
+ documentDisplayMode: 'list',
2714
+ repository: {
2715
+ status: {
2716
+ isQuickShareEnabled: true
2717
+ }
2718
+ }
2719
+ }
2720
+ };
2721
+ class LibTestingModule {
2722
+ }
2723
+ LibTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2724
+ LibTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, imports: [NoopAnimationsModule,
2725
+ CommonModule,
2726
+ HttpClientModule,
2727
+ RouterTestingModule,
2728
+ StoreModule, i1$4.EffectsRootModule, i2.TranslateModule, PipeModule] });
2729
+ LibTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, providers: [
2730
+ { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
2731
+ { provide: TranslationService, useClass: TranslationMock }
2732
+ ], imports: [NoopAnimationsModule,
2733
+ CommonModule,
2734
+ HttpClientModule,
2735
+ RouterTestingModule,
2736
+ StoreModule,
2737
+ EffectsModule.forRoot([]),
2738
+ TranslateModule.forRoot({
2739
+ loader: {
2740
+ provide: TranslateLoader,
2741
+ useClass: TranslateLoaderService
2742
+ }
2743
+ }),
2744
+ PipeModule] });
2745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, decorators: [{
2746
+ type: NgModule,
2747
+ args: [{
2748
+ imports: [
2749
+ NoopAnimationsModule,
2750
+ CommonModule,
2751
+ HttpClientModule,
2752
+ RouterTestingModule,
2753
+ StoreModule,
2754
+ EffectsModule.forRoot([]),
2755
+ TranslateModule.forRoot({
2756
+ loader: {
2757
+ provide: TranslateLoader,
2758
+ useClass: TranslateLoaderService
2759
+ }
2760
+ }),
2761
+ PipeModule
2762
+ ],
2763
+ providers: [
2764
+ { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
2765
+ { provide: TranslationService, useClass: TranslationMock }
2766
+ ]
2767
+ }]
2768
+ }] });
2769
+
2770
+ /*!
2771
+ * @license
2772
+ * Alfresco Example Content Application
2773
+ *
2774
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2775
+ *
2776
+ * This file is part of the Alfresco Example Content Application.
2777
+ * If the software was purchased under a paid Alfresco license, the terms of
2778
+ * the paid license agreement will prevail. Otherwise, the software is
2779
+ * provided under the following open source license terms:
2780
+ *
2781
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2782
+ * it under the terms of the GNU Lesser General Public License as published by
2783
+ * the Free Software Foundation, either version 3 of the License, or
2784
+ * (at your option) any later version.
2785
+ *
2786
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2787
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2788
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2789
+ * GNU Lesser General Public License for more details.
2790
+ *
2791
+ * You should have received a copy of the GNU Lesser General Public License
2792
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2793
+ */
2794
+ class TranslateServiceMock extends TranslateService {
2795
+ constructor() {
2796
+ super(null, null, null, null, null, null, true, null, null);
2797
+ }
2798
+ get(key) {
2799
+ return of(key);
2800
+ }
2801
+ instant(key) {
2802
+ return key;
2803
+ }
2804
+ }
2805
+ TranslateServiceMock.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TranslateServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2806
+ TranslateServiceMock.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TranslateServiceMock });
2807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TranslateServiceMock, decorators: [{
2808
+ type: Injectable
2809
+ }], ctorParameters: function () { return []; } });
2810
+
2811
+ /*!
2812
+ * @license
2813
+ * Alfresco Example Content Application
2814
+ *
2815
+ * Copyright (C) 2005 - 2020 Alfresco Software Limited
2816
+ *
2817
+ * This file is part of the Alfresco Example Content Application.
2818
+ * If the software was purchased under a paid Alfresco license, the terms of
2819
+ * the paid license agreement will prevail. Otherwise, the software is
2820
+ * provided under the following open source license terms:
2821
+ *
2822
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2823
+ * it under the terms of the GNU Lesser General Public License as published by
2824
+ * the Free Software Foundation, either version 3 of the License, or
2825
+ * (at your option) any later version.
2826
+ *
2827
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2828
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2829
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2830
+ * GNU Lesser General Public License for more details.
2831
+ *
2832
+ * You should have received a copy of the GNU Lesser General Public License
2833
+ * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
2834
+ */
2835
+
2836
+ /**
2837
+ * Generated bundle index. Do not edit.
2838
+ */
2839
+
2840
+ export { AlfrescoOfficeExtensionService, AppExtensionService, AppHookService, AppService, AppSharedRuleGuard, ContentApiService, ContextActionsDirective, ContextActionsModule, DefaultExtensionLoaderFactory, DocumentBasePageService, EXTENSION_DATA_LOADERS, ExtensionsDataLoaderGuard, GenericErrorComponent, GenericErrorModule, InfoDrawerComponent, LibTestingModule, LockedByComponent, LockedByModule, NodePermissionService, PageComponent, PageLayoutComponent, PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutModule, PaginationDirective, RouterExtensionService, SharedDirectivesModule, SharedInfoDrawerModule, SharedModule, SharedToolbarModule, ToolbarActionComponent, ToolbarButtonComponent, ToolbarButtonType, ToolbarMenuComponent, ToolbarMenuItemComponent, TranslateServiceMock, initialState, isLibrary, isLocked };
2841
+ //# sourceMappingURL=alfresco-aca-shared.mjs.map