@alfresco/aca-shared 2.0.1 → 4.0.0-4895381898

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