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