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