UNPKG

@alfresco/adf-content-services

Version:

Alfresco ADF content services

804 lines (794 loc) 1.81 MB
import * as i0 from '@angular/core'; import { Component, InjectionToken, inject, Injectable, DestroyRef, EventEmitter, Output, Input, ViewChild, ViewEncapsulation, ViewContainerRef, Directive, NgZone, ElementRef, TemplateRef, ContentChild, ChangeDetectorRef, HostBinding, HostListener, ContentChildren, effect, Injector, ChangeDetectionStrategy, Renderer2, NgModule, runInInjectionContext, signal, computed, ViewChildren, Pipe, APP_INITIALIZER } from '@angular/core'; import { AlfrescoApiConfig, AlfrescoApi, LazyApi, ContentApi, TrashcanApi, NodesApi, SEARCH_LANGUAGE, SiteMemberPaging, PeopleApi, SitesApi, SearchApi, SharedlinksApi, FavoritesApi, DiscoveryApi, AboutApi, SystemPropertiesApi, UploadApi, VersionsApi, RenditionsApi, PreferencesApi, DownloadsApi, FileDownloadStatus, TagBody, TagsApi, CategoriesApi, QueriesApi, Pagination, SiteEntry, Site, NodePagingList, Node, UserInfo, ContentInfo, Category, SitePaging, ClassesApi, TypesApi, CategoryLinkBody, AspectsApi, GroupsApi, NodeEntry, CommentsApi, SecurityGroupsApi, SecurityMarksApi, AuthorityClearanceApi, LegalHoldApi } from '@alfresco/js-api'; import { ReplaySubject, Subject, from, throwError, Observable, of, forkJoin, merge, take as take$1, switchMap as switchMap$1, tap as tap$1, catchError as catchError$1, map as map$1, BehaviorSubject, timer, EMPTY, Subscription, defer, zip, iif } from 'rxjs'; import * as i5 from '@alfresco/adf-core'; import { AppConfigService, StorageService, AppConfigValues, AuthenticationService, ThumbnailService, UserPreferencesService, IconModule, TranslationService, FileUtils, NotificationService, FileSizePipe, CardViewUpdateService, ViewUtilService, ObjectUtils, DataSorting, DownloadService, BaseEvent, DateFnsUtils, ADF_DATE_FORMATS, ADF_DATETIME_FORMATS, AdfDateFnsAdapter, AdfDateTimeFnsAdapter, HeaderFilterTemplateDirective, DataTableSchema, DataTableService, ShowHeaderMode, UserPreferenceValues, DataTableComponent, NoContentTemplateDirective, EmptyListComponent, NoPermissionTemplateDirective, LoadingContentTemplateDirective, MainMenuDataTableTemplateDirective, ColumnsSelectorComponent, DataColumnListComponent, CustomLoadingContentTemplateDirective, CustomNoPermissionTemplateDirective, CustomEmptyContentTemplateDirective, InfiniteSelectScrollDirective, ToolbarTitleComponent, ToolbarComponent, HighlightDirective, DataColumnComponent, InfinitePaginationComponent, DynamicChipListComponent, SearchTextInputComponent, HighlightPipe, ConfirmDialogComponent, FileTypePipe, ContextMenuDirective, CardViewTextItemModel, CardViewDateItemModel, CardViewItemMatchValidator, LogService, CardViewSelectItemModel, CardViewBoolItemModel, CardViewDatetimeItemModel, CardViewFloatItemModel, CardViewLongItemModel, CardViewIntItemModel, DecimalNumberPipe, CardViewComponent, User, InitialUsernamePipe, DateColumnHeaderComponent, EmptyContentComponent, ClipboardDirective, CommentModel, CommentsComponent, ADF_COMMENTS_SERVICE, CloseButtonPosition, ViewerToolbarComponent, ViewerSidebarComponent, ViewerToolbarActionsComponent, ViewerMoreActionsComponent, ViewerOpenWithComponent, VIEWER_DIRECTIVES, BasicAlfrescoAuthService, provideTranslations } from '@alfresco/adf-core'; import * as i2$3 from '@angular/material/dialog'; import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog'; import { map, catchError, filter, take, switchMap, delay, tap, first, concatMap, startWith, debounce, debounceTime, retry, mergeMap, distinctUntilChanged, takeUntil, finalize, toArray, expand, reduce } from 'rxjs/operators'; import { Minimatch } from 'minimatch'; import { OverlayContainer, Overlay, ConnectionPositionPair } from '@angular/cdk/overlay'; import * as i1$1 from '@angular/common'; import { NgTemplateOutlet, CommonModule, AsyncPipe } from '@angular/common'; import * as i3$2 from '@angular/material/tabs'; import { MatTabsModule, MatTabGroup } from '@angular/material/tabs'; import { TranslateService, TranslatePipe } from '@ngx-translate/core'; import * as i3 from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import * as i4$1 from '@angular/cdk/a11y'; import { LiveAnnouncer, A11yModule, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y'; import * as i4 from '@angular/material/icon'; import { MatIconRegistry, MatIconModule } from '@angular/material/icon'; import * as i7 from '@angular/material/autocomplete'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; import * as i2$2 from '@angular/material/button'; import { MatButtonModule, MatIconButton } from '@angular/material/button'; import * as i2 from '@angular/material/list'; import { MatListModule, MatListItem, MatSelectionList } from '@angular/material/list'; import * as i2$1 from '@angular/material/chips'; import { MatChipsModule } from '@angular/material/chips'; import * as i2$4 from '@angular/forms'; import { FormsModule, Validators, UntypedFormControl, UntypedFormGroup, ReactiveFormsModule, FormControl, FormGroup, FormBuilder, UntypedFormBuilder } from '@angular/forms'; import { isAfter, parseISO, startOfMinute, endOfMinute, isValid, isBefore, endOfDay, parse, startOfMonth, subMonths, startOfWeek, subWeeks, startOfDay, subDays, endOfToday, formatISO, format, differenceInSeconds, add } from 'date-fns'; import * as i1 from '@angular/material/progress-bar'; import { MatProgressBarModule } from '@angular/material/progress-bar'; import { Router, ActivatedRoute } from '@angular/router'; import * as i3$1 from '@angular/material/form-field'; import { MatFormFieldModule } from '@angular/material/form-field'; import * as i4$2 from '@angular/material/input'; import { MatInputModule } from '@angular/material/input'; import * as i2$5 from '@angular/material/radio'; import { MatRadioModule } from '@angular/material/radio'; import * as i2$6 from '@angular/material/slider'; import { MatSliderModule } from '@angular/material/slider'; import * as i2$7 from '@angular/material/checkbox'; import { MatCheckboxModule, MatCheckbox } from '@angular/material/checkbox'; import * as i5$1 from '@mat-datetimepicker/core'; import { DatetimeAdapter, MatDatetimepickerModule, MAT_DATETIME_FORMATS, MatNativeDatetimeModule } from '@mat-datetimepicker/core'; import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core'; import { ENTER } from '@angular/cdk/keycodes'; import { DateFnsAdapter, MAT_DATE_FNS_FORMATS } from '@angular/material-date-fns-adapter'; import * as i8 from '@angular/material/datepicker'; import { MatDatepickerModule } from '@angular/material/datepicker'; import * as i3$3 from '@angular/material/menu'; import { MatMenuModule } from '@angular/material/menu'; import { DomSanitizer } from '@angular/platform-browser'; import * as i3$4 from '@angular/material/progress-spinner'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import * as i2$8 from '@angular/material/expansion'; import { MatExpansionModule } from '@angular/material/expansion'; import * as i4$3 from '@angular/material/divider'; import { MatDividerModule } from '@angular/material/divider'; import { DataSource, SelectionModel } from '@angular/cdk/collections'; import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling'; import { trigger, state, style, transition, animate } from '@angular/animations'; import { FlatTreeControl } from '@angular/cdk/tree'; import * as i2$9 from '@angular/material/tree'; import { MatTreeModule, MatTreeNode } from '@angular/material/tree'; import * as i4$4 from '@angular/material/table'; import { MatTableModule } from '@angular/material/table'; import { DynamicExtensionComponent } from '@alfresco/adf-extensions'; import * as i2$a from '@angular/material/card'; import { MatCardModule } from '@angular/material/card'; import * as i6 from '@angular/material/slide-toggle'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { TemplatePortal } from '@angular/cdk/portal'; import { AdfHttpClient } from '@alfresco/adf-core/api'; /*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class AlfrescoIconComponent { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlfrescoIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: AlfrescoIconComponent, isStandalone: true, selector: "adf-alfresco-icon", ngImport: i0, template: "<svg width=\"24\" height=\"24\" viewBox=\"0 0 316 316\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M159.2 162.346L152.375 169.174L114.409 207.15L114.41 207.151C95.0944 226.491 91.3457 255.445 103.066 278.58L105.601 283.58L100.048 284.35C97.5523 284.696 95.002 284.89 92.4004 284.89C58.599 284.89 31.2188 257.426 31.2188 223.6C31.2189 189.771 58.6023 162.346 92.4004 162.346H159.2Z\" fill=\"#F1CB60\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M161.863 223.528C161.863 250.858 179.632 273.984 204.244 282.042L209.613 283.799L206.171 288.28C204.697 290.199 203.069 292.185 201.168 294.053L201.169 294.054C177.272 317.982 138.527 317.982 114.63 294.054C90.7354 270.129 90.7354 231.344 114.63 207.419L114.737 207.312L155.033 166.965L161.863 160.126V223.528Z\" fill=\"#52A1FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M168.975 163.484L206.938 201.495C226.257 220.806 255.17 224.584 278.189 212.857L283.198 210.306L283.968 215.873C284.313 218.371 284.508 220.924 284.508 223.528C284.508 257.357 257.124 284.783 223.326 284.783C189.528 284.783 162.145 257.357 162.145 223.528V156.646L168.975 163.484Z\" fill=\"#52A1FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M287.968 109.621C289.701 110.956 291.383 112.384 293.011 113.93L293.705 114.6L293.721 114.615L293.735 114.629C317.63 138.554 317.63 177.339 293.735 201.264C269.838 225.192 231.094 225.192 207.196 201.264L207.089 201.157L166.793 160.809L159.975 153.983H223.291C250.543 153.983 273.676 136.196 281.725 111.548L283.482 106.166L287.968 109.621Z\" fill=\"#06C9A4\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M223.29 31.1108C257.091 31.1108 284.472 58.5754 284.472 92.4009C284.472 126.23 257.088 153.655 223.29 153.655H156.496L163.314 146.829L201.28 108.814C220.562 89.5077 224.344 60.5534 212.624 37.4214L210.09 32.4214L215.643 31.6509C218.138 31.3049 220.688 31.1108 223.29 31.1108Z\" fill=\"#06C9A4\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M114.521 21.9453C138.419 -1.98214 177.163 -1.98201 201.061 21.9453C224.953 45.8676 224.956 84.6509 201.062 108.542L201.062 108.543L200.953 108.652L160.657 148.999L153.827 155.838V92.4365C153.827 65.1407 136.058 41.9797 111.447 33.9229L106.023 32.1465L109.542 27.6543C111.031 25.7534 112.682 23.7871 114.521 21.9453Z\" fill=\"#6E33FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M92.3301 31.2173C126.128 31.2174 153.512 58.6426 153.512 92.4712V153.69H147.817L146.646 152.516L110.4 116.225L110.37 116.195L110.34 116.164L108.773 114.526C89.4526 95.1918 60.4773 91.3832 37.4277 103.108L32.3408 105.696L31.6445 100.031C31.3429 97.577 31.1484 95.0763 31.1484 92.4712C31.1486 58.6426 58.532 31.2173 92.3301 31.2173Z\" fill=\"#6E33FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M21.9209 114.737C45.8182 90.8094 84.5627 90.8094 108.46 114.737L148.863 155.192L155.682 162.019H92.3652C90.8311 162.019 89.3122 162.086 87.7979 162.189L87.6611 162.198H87.5254C87.4492 162.198 87.2902 162.209 86.9639 162.246L86.9277 162.25L86.8926 162.252C85.408 162.391 83.9689 162.56 82.5908 162.79L82.5107 162.803L82.4297 162.813C82.4583 162.809 82.4593 162.807 82.3359 162.833C82.29 162.842 82.1909 162.863 82.0977 162.881C82.0291 162.895 81.945 162.908 81.8506 162.923L81.8516 162.925C80.5313 163.163 79.241 163.434 77.9443 163.742L77.8125 163.773L77.6797 163.794C77.6455 163.8 77.6113 163.806 77.585 163.81C77.5563 163.815 77.5338 163.818 77.5127 163.822C77.5041 163.823 77.4963 163.824 77.4893 163.826L77.4492 163.839L77.2891 163.878C75.9507 164.205 74.6195 164.604 73.2402 165.053C73.1272 165.091 73.0137 165.131 72.8691 165.182C72.735 165.23 72.5701 165.286 72.3916 165.346L72.3926 165.347C71.0135 165.83 69.646 166.344 68.3232 166.887L68.1299 166.966C66.862 167.502 65.6611 168.056 64.5137 168.663L64.4746 168.683L64.4355 168.703C64.3466 168.747 64.2575 168.795 64.1172 168.87C64.0059 168.929 63.8551 169.008 63.6885 169.092L63.6895 169.093C62.4463 169.75 61.2522 170.416 60.1152 171.131L60.1143 171.13C59.9666 171.227 59.8284 171.315 59.7422 171.368C59.6129 171.447 59.5605 171.48 59.5244 171.504L59.4756 171.537L59.4248 171.568C58.4258 172.193 57.4061 172.892 56.3779 173.62C56.2243 173.749 56.0938 173.847 56.0088 173.909C55.9378 173.96 55.8634 174.012 55.8408 174.028C55.8034 174.054 55.8117 174.048 55.833 174.032L55.7861 174.067C54.7178 174.845 53.6631 175.701 52.6191 176.612L52.6074 176.623L52.5947 176.633C52.4695 176.741 52.3441 176.848 52.2188 176.956C52.1013 177.056 51.9828 177.156 51.8652 177.257L51.8662 177.258C50.8262 178.165 49.7815 179.144 48.8047 180.122L48.5537 180.373C47.6777 181.25 46.8437 182.176 45.9697 183.183C45.8135 183.387 45.6703 183.554 45.5732 183.665C45.3997 183.862 45.4018 183.855 45.3564 183.91L45.3486 183.919C44.4388 185.006 43.5746 186.073 42.7939 187.148C42.7312 187.236 42.6712 187.323 42.5967 187.431C42.5177 187.545 42.4206 187.685 42.3115 187.838L42.3047 187.847C41.5605 188.884 40.8682 189.937 40.1514 191.063C40.1001 191.151 40.0531 191.227 40.0127 191.289C39.98 191.339 39.9466 191.385 39.9199 191.423C39.1621 192.724 38.4678 193.918 37.8467 195.129C37.7813 195.26 37.7157 195.391 37.6504 195.522C37.5787 195.665 37.5072 195.809 37.4355 195.953C36.7984 197.228 36.2384 198.388 35.7441 199.573C35.6963 199.727 35.6486 199.856 35.6094 199.958C35.5728 200.052 35.5371 200.136 35.5205 200.175C35.4987 200.227 35.4954 200.237 35.4922 200.245L35.4707 200.297C34.9663 201.509 34.5042 202.735 34.1133 203.942L34.0723 204.069L34.0225 204.193C33.9639 204.339 33.7844 204.809 33.4883 205.303L31.1553 209.196L27.5869 206.393C25.6385 204.863 23.7246 203.178 21.9209 201.372C-1.97351 177.447 -1.97359 138.662 21.9209 114.737Z\" fill=\"#F1CB60\" stroke=\"white\" stroke-width=\"8\"/>\n <ellipse cx=\"157.5\" cy=\"158\" rx=\"5.5\" ry=\"5\" fill=\"white\"/>\n</svg>\n" }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlfrescoIconComponent, decorators: [{ type: Component, args: [{ selector: 'adf-alfresco-icon', template: "<svg width=\"24\" height=\"24\" viewBox=\"0 0 316 316\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M159.2 162.346L152.375 169.174L114.409 207.15L114.41 207.151C95.0944 226.491 91.3457 255.445 103.066 278.58L105.601 283.58L100.048 284.35C97.5523 284.696 95.002 284.89 92.4004 284.89C58.599 284.89 31.2188 257.426 31.2188 223.6C31.2189 189.771 58.6023 162.346 92.4004 162.346H159.2Z\" fill=\"#F1CB60\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M161.863 223.528C161.863 250.858 179.632 273.984 204.244 282.042L209.613 283.799L206.171 288.28C204.697 290.199 203.069 292.185 201.168 294.053L201.169 294.054C177.272 317.982 138.527 317.982 114.63 294.054C90.7354 270.129 90.7354 231.344 114.63 207.419L114.737 207.312L155.033 166.965L161.863 160.126V223.528Z\" fill=\"#52A1FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M168.975 163.484L206.938 201.495C226.257 220.806 255.17 224.584 278.189 212.857L283.198 210.306L283.968 215.873C284.313 218.371 284.508 220.924 284.508 223.528C284.508 257.357 257.124 284.783 223.326 284.783C189.528 284.783 162.145 257.357 162.145 223.528V156.646L168.975 163.484Z\" fill=\"#52A1FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M287.968 109.621C289.701 110.956 291.383 112.384 293.011 113.93L293.705 114.6L293.721 114.615L293.735 114.629C317.63 138.554 317.63 177.339 293.735 201.264C269.838 225.192 231.094 225.192 207.196 201.264L207.089 201.157L166.793 160.809L159.975 153.983H223.291C250.543 153.983 273.676 136.196 281.725 111.548L283.482 106.166L287.968 109.621Z\" fill=\"#06C9A4\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M223.29 31.1108C257.091 31.1108 284.472 58.5754 284.472 92.4009C284.472 126.23 257.088 153.655 223.29 153.655H156.496L163.314 146.829L201.28 108.814C220.562 89.5077 224.344 60.5534 212.624 37.4214L210.09 32.4214L215.643 31.6509C218.138 31.3049 220.688 31.1108 223.29 31.1108Z\" fill=\"#06C9A4\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M114.521 21.9453C138.419 -1.98214 177.163 -1.98201 201.061 21.9453C224.953 45.8676 224.956 84.6509 201.062 108.542L201.062 108.543L200.953 108.652L160.657 148.999L153.827 155.838V92.4365C153.827 65.1407 136.058 41.9797 111.447 33.9229L106.023 32.1465L109.542 27.6543C111.031 25.7534 112.682 23.7871 114.521 21.9453Z\" fill=\"#6E33FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M92.3301 31.2173C126.128 31.2174 153.512 58.6426 153.512 92.4712V153.69H147.817L146.646 152.516L110.4 116.225L110.37 116.195L110.34 116.164L108.773 114.526C89.4526 95.1918 60.4773 91.3832 37.4277 103.108L32.3408 105.696L31.6445 100.031C31.3429 97.577 31.1484 95.0763 31.1484 92.4712C31.1486 58.6426 58.532 31.2173 92.3301 31.2173Z\" fill=\"#6E33FF\" stroke=\"white\" stroke-width=\"8\"/>\n <path d=\"M21.9209 114.737C45.8182 90.8094 84.5627 90.8094 108.46 114.737L148.863 155.192L155.682 162.019H92.3652C90.8311 162.019 89.3122 162.086 87.7979 162.189L87.6611 162.198H87.5254C87.4492 162.198 87.2902 162.209 86.9639 162.246L86.9277 162.25L86.8926 162.252C85.408 162.391 83.9689 162.56 82.5908 162.79L82.5107 162.803L82.4297 162.813C82.4583 162.809 82.4593 162.807 82.3359 162.833C82.29 162.842 82.1909 162.863 82.0977 162.881C82.0291 162.895 81.945 162.908 81.8506 162.923L81.8516 162.925C80.5313 163.163 79.241 163.434 77.9443 163.742L77.8125 163.773L77.6797 163.794C77.6455 163.8 77.6113 163.806 77.585 163.81C77.5563 163.815 77.5338 163.818 77.5127 163.822C77.5041 163.823 77.4963 163.824 77.4893 163.826L77.4492 163.839L77.2891 163.878C75.9507 164.205 74.6195 164.604 73.2402 165.053C73.1272 165.091 73.0137 165.131 72.8691 165.182C72.735 165.23 72.5701 165.286 72.3916 165.346L72.3926 165.347C71.0135 165.83 69.646 166.344 68.3232 166.887L68.1299 166.966C66.862 167.502 65.6611 168.056 64.5137 168.663L64.4746 168.683L64.4355 168.703C64.3466 168.747 64.2575 168.795 64.1172 168.87C64.0059 168.929 63.8551 169.008 63.6885 169.092L63.6895 169.093C62.4463 169.75 61.2522 170.416 60.1152 171.131L60.1143 171.13C59.9666 171.227 59.8284 171.315 59.7422 171.368C59.6129 171.447 59.5605 171.48 59.5244 171.504L59.4756 171.537L59.4248 171.568C58.4258 172.193 57.4061 172.892 56.3779 173.62C56.2243 173.749 56.0938 173.847 56.0088 173.909C55.9378 173.96 55.8634 174.012 55.8408 174.028C55.8034 174.054 55.8117 174.048 55.833 174.032L55.7861 174.067C54.7178 174.845 53.6631 175.701 52.6191 176.612L52.6074 176.623L52.5947 176.633C52.4695 176.741 52.3441 176.848 52.2188 176.956C52.1013 177.056 51.9828 177.156 51.8652 177.257L51.8662 177.258C50.8262 178.165 49.7815 179.144 48.8047 180.122L48.5537 180.373C47.6777 181.25 46.8437 182.176 45.9697 183.183C45.8135 183.387 45.6703 183.554 45.5732 183.665C45.3997 183.862 45.4018 183.855 45.3564 183.91L45.3486 183.919C44.4388 185.006 43.5746 186.073 42.7939 187.148C42.7312 187.236 42.6712 187.323 42.5967 187.431C42.5177 187.545 42.4206 187.685 42.3115 187.838L42.3047 187.847C41.5605 188.884 40.8682 189.937 40.1514 191.063C40.1001 191.151 40.0531 191.227 40.0127 191.289C39.98 191.339 39.9466 191.385 39.9199 191.423C39.1621 192.724 38.4678 193.918 37.8467 195.129C37.7813 195.26 37.7157 195.391 37.6504 195.522C37.5787 195.665 37.5072 195.809 37.4355 195.953C36.7984 197.228 36.2384 198.388 35.7441 199.573C35.6963 199.727 35.6486 199.856 35.6094 199.958C35.5728 200.052 35.5371 200.136 35.5205 200.175C35.4987 200.227 35.4954 200.237 35.4922 200.245L35.4707 200.297C34.9663 201.509 34.5042 202.735 34.1133 203.942L34.0723 204.069L34.0225 204.193C33.9639 204.339 33.7844 204.809 33.4883 205.303L31.1553 209.196L27.5869 206.393C25.6385 204.863 23.7246 203.178 21.9209 201.372C-1.97351 177.447 -1.97359 138.662 21.9209 114.737Z\" fill=\"#F1CB60\" stroke=\"white\" stroke-width=\"8\"/>\n <ellipse cx=\"157.5\" cy=\"158\" rx=\"5.5\" ry=\"5\" fill=\"white\"/>\n</svg>\n" }] }] }); /*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* spellchecker: disable */ class PermissionsEnum extends String { static { this.CONTRIBUTOR = 'Contributor'; } static { this.CONSUMER = 'Consumer'; } static { this.COLLABORATOR = 'Collaborator'; } static { this.MANAGER = 'Manager'; } static { this.EDITOR = 'Editor'; } static { this.COORDINATOR = 'Coordinator'; } static { this.NOT_CONTRIBUTOR = '!Contributor'; } static { this.NOT_CONSUMER = '!Consumer'; } static { this.NOT_COLLABORATOR = '!Collaborator'; } static { this.NOT_MANAGER = '!Manager'; } static { this.NOT_EDITOR = '!Editor'; } static { this.NOT_COORDINATOR = '!Coordinator'; } } /*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* spellchecker: disable */ class AllowableOperationsEnum extends String { static { this.DELETE = 'delete'; } static { this.UPDATE = 'update'; } static { this.CREATE = 'create'; } static { this.COPY = 'copy'; } static { this.LOCK = 'lock'; } static { this.UPDATEPERMISSIONS = 'updatePermissions'; } static { this.NOT_DELETE = '!delete'; } static { this.NOT_UPDATE = '!update'; } static { this.NOT_CREATE = '!create'; } static { this.NOT_UPDATEPERMISSIONS = '!updatePermissions'; } } /*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const ALFRESCO_API_FACTORY = new InjectionToken('ALFRESCO_API_FACTORY'); class AlfrescoApiService { constructor() { this.appConfig = inject(AppConfigService); this.storageService = inject(StorageService); this.alfrescoApiFactory = inject(ALFRESCO_API_FACTORY, { optional: true }); this.alfrescoApiInitialized = new ReplaySubject(1); this.excludedErrorUrl = ['api/enterprise/system/properties']; } getInstance() { return this.alfrescoApi; } async load(config) { this.currentAppConfig = config; if (config.authType === 'OAUTH') { await this.mapAlfrescoApiOpenIdConfig(); } this.initAlfrescoApi(); this.alfrescoApiInitialized.next(true); } async reset() { this.getCurrentAppConfig(); if (this.currentAppConfig.authType === 'OAUTH') { await this.mapAlfrescoApiOpenIdConfig(); } this.initAlfrescoApiWithConfig(); } getAuthWithFixedOriginLocation() { const oauth = this.appConfig.oauth2; if (oauth) { oauth.redirectUri = window.location.origin + window.location.pathname; oauth.redirectUriLogout = window.location.origin + window.location.pathname; } return oauth; } async mapAlfrescoApiOpenIdConfig() { this.idpConfig = await this.appConfig.loadWellKnown(this.currentAppConfig.oauth2.host); this.currentAppConfig.oauth2.tokenUrl = this.idpConfig.token_endpoint; this.currentAppConfig.oauth2.authorizationUrl = this.idpConfig.authorization_endpoint; this.currentAppConfig.oauth2.logoutUrl = this.idpConfig.end_session_endpoint; this.currentAppConfig.oauth2.userinfoEndpoint = this.idpConfig.userinfo_endpoint; } getCurrentAppConfig() { const oauth = this.getAuthWithFixedOriginLocation(); this.currentAppConfig = new AlfrescoApiConfig({ provider: this.appConfig.get(AppConfigValues.PROVIDERS), hostEcm: this.appConfig.get(AppConfigValues.ECMHOST), hostBpm: this.appConfig.get(AppConfigValues.BPMHOST), authType: this.appConfig.get(AppConfigValues.AUTHTYPE, 'BASIC'), contextRootBpm: this.appConfig.get(AppConfigValues.CONTEXTROOTBPM), contextRoot: this.appConfig.get(AppConfigValues.CONTEXTROOTECM), disableCsrf: this.appConfig.get(AppConfigValues.DISABLECSRF), withCredentials: this.appConfig.get(AppConfigValues.AUTH_WITH_CREDENTIALS, false), domainPrefix: this.appConfig.get(AppConfigValues.STORAGE_PREFIX), oauth2: oauth }); } initAlfrescoApi() { this.getCurrentAppConfig(); this.initAlfrescoApiWithConfig(); } initAlfrescoApiWithConfig() { if (this.alfrescoApi && this.isDifferentConfig(this.lastConfig, this.currentAppConfig)) { this.alfrescoApi.setConfig(this.currentAppConfig); } else { this.alfrescoApi = this.createInstance(this.currentAppConfig); } this.lastConfig = this.currentAppConfig; } createInstance(config) { if (this.alfrescoApiFactory) { return this.alfrescoApiFactory.createAlfrescoApi(config); } return new AlfrescoApi(config); } isDifferentConfig(lastConfig, newConfig) { return JSON.stringify(lastConfig) !== JSON.stringify(newConfig); } isExcludedErrorListener(currentFullPath) { const formattedPath = currentFullPath.replace(this.lastConfig.hostBpm + '/' + this.lastConfig.contextRootBpm, ''); return this.excludedErrorUrl.includes(formattedPath); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlfrescoApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); } static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlfrescoApiService, providedIn: 'root' }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlfrescoApiService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }] }); var __decorate$D = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; class ContentService { constructor() { this.authService = inject(AuthenticationService); this.apiService = inject(AlfrescoApiService); this.thumbnailService = inject(ThumbnailService); this.folderCreated = new Subject(); this.folderCreate = new Subject(); this.folderEdit = new Subject(); } /** * Gets a content URL for the given node. * * @param node Node or Node ID to get URL for. * @param attachment Toggles whether to retrieve content as an attachment for download * @param ticket Custom ticket to use for authentication * @returns URL string or `null` */ getContentUrl(node, attachment, ticket) { if (node) { let nodeId; if (typeof node === 'string') { nodeId = node; } else if (node.entry) { nodeId = node.entry.id; } return this.contentApi.getContentUrl(nodeId, attachment, ticket); } return null; } getDocumentThumbnailUrl(nodeId, attachment, ticket) { return this.contentApi.getDocumentThumbnailUrl(nodeId, attachment, ticket); } /** * Checks if the user has permission on that node * * @param node Node to check permissions * @param permission Required permission type * @param userId Optional current user id will be taken by default * @returns True if the user has the required permissions, false otherwise */ hasPermissions(node, permission, userId) { let hasPermissions = false; userId = userId ?? this.authService.getUsername(); const permissions = [...(node.permissions?.locallySet || []), ...(node.permissions?.inherited || [])].filter((currentPermission) => currentPermission.authorityId === userId); if (permissions.length) { if (permission?.startsWith('!')) { hasPermissions = !permissions.find((currentPermission) => currentPermission.name === permission.replace('!', '')); } else { hasPermissions = !!permissions.find((currentPermission) => currentPermission.name === permission); } } else { if (permission === PermissionsEnum.CONSUMER) { hasPermissions = true; } else if (permission === PermissionsEnum.NOT_CONSUMER) { hasPermissions = false; } else if (permission?.startsWith('!')) { hasPermissions = true; } } return hasPermissions; } /** * Checks if the user has permissions on that node * * @param node Node to check allowableOperations * @param allowableOperation Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions * @returns True if the user has the required permissions, false otherwise */ hasAllowableOperations(node, allowableOperation) { let hasAllowableOperations = false; if (node?.allowableOperations) { if (allowableOperation?.startsWith('!')) { hasAllowableOperations = !node.allowableOperations.find((currentOperation) => currentOperation === allowableOperation.replace('!', '')); } else { hasAllowableOperations = !!node.allowableOperations.find((currentOperation) => currentOperation === allowableOperation); } } else { if (allowableOperation?.startsWith('!')) { hasAllowableOperations = true; } } if (allowableOperation === AllowableOperationsEnum.COPY) { hasAllowableOperations = true; } if (allowableOperation === AllowableOperationsEnum.LOCK) { hasAllowableOperations = node.isFile; if (node.isLocked && node.allowableOperations) { hasAllowableOperations = !!~node.allowableOperations.indexOf('updatePermissions'); } } return hasAllowableOperations; } getNodeIcon(node) { if (node?.isFolder) { return this.getFolderIcon(node); } if (node?.isFile) { if (node?.nodeType === 'app:filelink') { return this.thumbnailService.getMimeTypeIcon('fileLink'); } return this.thumbnailService.getMimeTypeIcon(node?.content?.mimeType); } return this.thumbnailService.getDefaultMimeTypeIcon(); } getFolderIcon(node) { if (this.isSmartFolder(node)) { return this.thumbnailService.getMimeTypeIcon('smartFolder'); } else if (this.isRuleFolder(node)) { return this.thumbnailService.getMimeTypeIcon('ruleFolder'); } else if (this.isLinkFolder(node)) { return this.thumbnailService.getMimeTypeIcon('linkFolder'); } else { return this.thumbnailService.getMimeTypeIcon('folder'); } } isSmartFolder(node) { if (node) { return this.hasAspect(node, 'smf:customConfigSmartFolder') || this.hasAspect(node, 'smf:systemConfigSmartFolder'); } return false; } isRuleFolder(node) { if (node) { return this.hasAspect(node, 'rule:rules'); } return false; } isLinkFolder(node) { return node?.nodeType === 'app:folderlink'; } hasAspect(node, aspectName) { return node?.aspectNames?.includes(aspectName); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); } static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ContentService, providedIn: 'root' }); } } __decorate$D([ LazyApi((self) => new ContentApi(self.apiService.getInstance())) ], ContentService.prototype, "contentApi", void 0); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ContentService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], propDecorators: { contentApi: [] } }); /*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class NodeMetadata { constructor(metadata, nodeType) { this.metadata = metadata; this.nodeType = nodeType; } } var __decorate$C = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; class NodesApiService { constructor() { this.apiService = inject(AlfrescoApiService); this.preferences = inject(UserPreferencesService); /** * Publish/subscribe to events related to node updates. */ this.nodeUpdated = new Subject(); } getEntryFromEntity(entity) { return entity.entry; } /** * Gets the stored information about a node. * * @param nodeId ID of the target node * @param options Optional parameters supported by JS-API * @returns Node information */ getNode(nodeId, options = {}) { const defaults = { include: ['path', 'properties', 'allowableOperations', 'permissions'] }; const queryOptions = Object.assign(defaults, options); return from(this.nodesApi.getNode(nodeId, queryOptions)).pipe(map(this.getEntryFromEntity), catchError((err) => throwError(err))); } /** * Gets the items contained in a folder node. * * @param nodeId ID of the target node * @param options Optional parameters supported by JS-API * @returns List of child items from the folder */ getNodeChildren(nodeId, options = {}) { const defaults = { maxItems: this.preferences.paginationSize, skipCount: 0, include: ['path', 'properties', 'allowableOperations', 'permissions'] }; const queryOptions = Object.assign(defaults, options); return from(this.nodesApi.listNodeChildren(nodeId, queryOptions)).pipe(catchError((err) => throwError(err))); } /** * Creates a new document node inside a folder. * * @param parentNodeId ID of the parent folder node * @param nodeBody Data for the new node * @param options Optional parameters supported by JS-API * @returns Details of the new node */ createNode(parentNodeId, nodeBody, options = {}) { return from(this.nodesApi.createNode(parentNodeId, nodeBody, options)).pipe(map(this.getEntryFromEntity), catchError((err) => throwError(err))); } /** * Creates a new folder node inside a parent folder. * * @param parentNodeId ID of the parent folder node * @param nodeBody Data for the new folder * @param options Optional parameters supported by JS-API * @returns Details of the new folder */ createFolder(parentNodeId, nodeBody, options = {}) { const body = Object.assign({ nodeType: 'cm:folder' }, nodeBody); return this.createNode(parentNodeId, body, options); } /** * Updates the information about a node. * * @param nodeId ID of the target node * @param nodeBody New data for the node * @param options Optional parameters supported by JS-API * @returns Updated node information */ updateNode(nodeId, nodeBody, options = {}) { const defaults = { include: ['path', 'properties', 'allowableOperations', 'permissions', 'definition'] }; const queryOptions = Object.assign(defaults, options); return from(this.nodesApi.updateNode(nodeId, nodeBody, queryOptions)).pipe(map(this.getEntryFromEntity), catchError((err) => throwError(err))); } /** * Moves a node to the trashcan. * * @param nodeId ID of the target node * @param options Optional parameters supported by JS-API * @returns Empty result that notifies when the deletion is complete */ deleteNode(nodeId, options = {}) { return from(this.nodesApi.deleteNode(nodeId, options)).pipe(catchError((err) => throwError(err))); } /** * Restores a node previously moved to the trashcan. * * @param nodeId ID of the node to restore * @returns Details of the restored node */ restoreNode(nodeId) { return from(this.trashcanApi.restoreDeletedNode(nodeId)).pipe(map(this.getEntryFromEntity), catchError((err) => throwError(err))); } /** * Get the metadata and the nodeType for a nodeId cleaned by the prefix. * * @param nodeId ID of the target node * @returns Node metadata */ getNodeMetadata(nodeId) { return from(this.nodesApi.getNode(nodeId)).pipe(map(this.cleanMetadataFromSemicolon)); } /** * Gets the list of holds assigned to the node. * * @param nodeId ID of the target node * @param options Optional parameters supported by JS-API * @param options.includeSource Also include **source** (in addition to **entries**) with folder information on **nodeId** * @returns List of assigned holds Observable<Hold[]> */ getNodeAssignedHolds(nodeId, options) { const queryOptions = Object.assign({ where: `(assocType='rma:frozenContent')` }, options); return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(map(({ list }) => list.entries?.map(({ entry }) => ({ id: entry.id, name: entry.name })))); } /** * Gets content for the given node. * * @param nodeId ID of the target node * @returns Content data */ getNodeContent(nodeId) { return from(this.nodesApi.getNodeContent(nodeId)).pipe(catchError((err) => throwError(err))); } /** * Create a new Node inside `-root-` folder * * @param name Node name * @param nodeType Node type * @param properties Node body properties * @param path Path to the node * @returns The created node */ createNodeInsideRoot(name, nodeType, properties, path) { const body = { name, nodeType, properties, relativePath: path }; return from(this.nodesApi.createNode('-root-', body, {})); } /** * Create a new Node from form metadata. * * @param nodeType Node type * @param nameSpace Namespace for properties * @param data Property data to store in the node under namespace * @param path Path to the node * @param name Node name * @returns The created node */ createNodeMetadata(nodeType, nameSpace, data, path, name) { const properties = {}; for (const key in data) { if (data[key]) { properties[nameSpace + ':' + key] = data[key]; } } return this.createNodeInsideRoot(name || this.randomNodeName(), nodeType, properties, path); } /** * Initiate a new request to calculate folder size. * * @param nodeId Node Id * @returns The job id which can be used to track request status */ initiateFolderSizeCalculation(nodeId) { return from(this.nodesApi.initiateFolderSizeCalculation(nodeId)); } /** * Gets the size of a folder. * * @param nodeId Node Id * @param jobId Job Id * @returns Folder details */ getFolderSizeInfo(nodeId, jobId) { return from(this.nodesApi.getFolderSizeInfo(nodeId, jobId)); } /** * Lists parents of a given node. * * @param nodeId Node ID * @param opts Optional parameters * @returns List of parent nodes */ listParents(nodeId, opts) { return from(this.nodesApi.listParents(nodeId, opts)); } randomNodeName() { return `node_${Date.now()}`; } cleanMetadataFromSemicolon(nodeEntry) { const metadata = {}; if (nodeEntry?.entry.properties) { for (const key in nodeEntry.entry.properties) { if (key) { if (key.indexOf(':') !== -1) { metadata[key.split(':')[1]] = nodeEntry.entry.properties[key]; } else { metadata[key] = nodeEntry.entry.properties[key]; } } } } return new NodeMetadata(metadata, nodeEntry.entry.nodeType); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NodesApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); } static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NodesApiService, providedIn: 'root' }); } } __decorate$C([ LazyApi((self) => new TrashcanApi(self.apiService.getInstance())) ], NodesApiService.prototype, "trashcanApi", void 0); __decorate$C([ LazyApi((self) => new NodesApi(self.apiService.getInstance())) ], NodesApiService.prototype, "nodesApi", void 0); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NodesApiService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], propDecorators: { trashcanApi: [], nodesApi: [] } }); /*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class DocumentLoaderNode { constructor(currentNode, children) { this.currentNode = currentNode; this.children = children; } } var __decorate$B = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; const CREATE_PERMISSION = 'create'; class CustomResourcesService { constructor() { this.apiService = inject(AlfrescoApiService); } /** * Gets files recently accessed by a user. * * @param personId ID of the user * @param pagination Specifies how to paginate the results * @param filters Specifies additional filters to apply (joined with **AND**) * @param includeFields List of data field names to include in the results * @returns List of nodes for the recently used files */ getRecentFiles(personId, pagination, filters, includeFields = []) { const defaultFilter = [ 'TYPE:"content"', '-PATH:"//cm:wiki/*"', '-TYPE:"app:filelink"', '-TYPE:"cm:thumbnail"', '-TYPE:"cm:failedThumbnail"', '-TYPE:"cm:rating"', '-TYPE:"dl:dataList"', '-TYPE:"dl:todoList"', '-TYPE:"dl:issue"', '-TYPE:"dl:contact"', '-TYPE:"dl:eventAgenda"', '-TYPE:"dl:event"', '-TYPE:"dl:task"', '-TYPE:"dl:simpletask"', '-TYPE:"dl:meetingAgenda"', '-TYPE:"dl:location"', '-TYPE:"fm:topic"', '-TYPE:"fm:post"', '-TYPE:"ia:calendarEvent"', '-TYPE:"lnk:link"' ]; return new Observable((observer) => { this.peopleApi.getPerson(personId).then((person) => { const username = person.entry.id; const filterQueries = [ { query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` }, { query: `cm:modifier:'${username}' OR cm:creator:'${username}'` }, { query: defaultFilter.join(' AND ') } ]; if (filters && filters.length > 0) { filterQueries.push({ query: filters.join() }); } const query = { query: { query: '*', language: SEARCH_LANGUAGE.AFTS }, filterQueries, include: [...new Set(['path', 'properties', 'allowableOperations', 'aspectNames', ...includeFields])], sort: [ { type: 'FIELD', field: 'cm:modified', ascending: false } ], paging: { maxItems: pagination.maxItems, skipCount: pagination.skipCount } }; return this.searchApi.search(query).then((searchResult) => { observer.next(searchResult); observer.complete(); }, (err) => { observer.error(err); observer.complete();