@alfresco/adf-content-services
Version:
Alfresco ADF content services
79 lines (78 loc) • 3.5 kB
TypeScript
/*!
* @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.
*/
import { EventEmitter, OnInit } from '@angular/core';
import { AuthenticationService } from '@alfresco/adf-core';
import { SitePaging, SiteEntry } from '@alfresco/js-api';
import { MatSelectChange } from '@angular/material/select';
import { LiveAnnouncer } from '@angular/cdk/a11y';
import { TranslateService } from '@ngx-translate/core';
import { SitesService } from '../../common/services/sites.service';
import * as i0 from "@angular/core";
export declare enum Relations {
Members = "members",
Containers = "containers"
}
export declare class DropdownSitesComponent implements OnInit {
private authService;
private sitesService;
private liveAnnouncer;
private translateService;
/** Hide the "My Files" option. */
hideMyFiles: boolean;
/**
* A custom list of sites to be displayed by the dropdown. If no value
* is given, the sites of the current user are displayed by default. A
* list of objects only with properties 'title' and 'guid' is enough to
* be able to display the dropdown.
*/
siteList: SitePaging;
/** Id of the selected site */
value: string;
/**
* Text or a translation key to act as a placeholder. Default value is the
* key "DROPDOWN.PLACEHOLDER_LABEL".
*/
placeholder: string;
/**
* Filter for the results of the sites query. Possible values are
* "members" and "containers". When "members" is used, the site list
* will be restricted to the sites that the user is a member of.
*/
relations: string;
/**
* Emitted when the user selects a site. When the default option is selected,
* an empty model is emitted.
*/
change: EventEmitter<SiteEntry>;
error: EventEmitter<any>;
private loading;
private skipCount;
selected: SiteEntry;
MY_FILES_VALUE: string;
constructor(authService: AuthenticationService, sitesService: SitesService, liveAnnouncer: LiveAnnouncer, translateService: TranslateService);
ngOnInit(): void;
loadAllOnScroll(): void;
selectedSite(event: MatSelectChange): void;
private loadSiteList;
showLoading(): boolean;
isInfiniteScrollingEnabled(): boolean;
private siteListHasMoreItems;
private filteredResultsByMember;
private isCurrentUserMember;
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownSitesComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownSitesComponent, "adf-sites-dropdown", never, { "hideMyFiles": { "alias": "hideMyFiles"; "required": false; }; "siteList": { "alias": "siteList"; "required": false; }; "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "relations": { "alias": "relations"; "required": false; }; }, { "change": "change"; "error": "error"; }, never, never, true, never>;
}