@alfresco/aca-shared 1.12.0 → 4.0.0-4895233349

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