UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

117 lines 4.95 kB
import { ActivatedRouteSnapshot, Router } from '@angular/router'; import { IManagedObject, IResult, InventoryService, QueriesUtil, UserService } from '@c8y/client'; import { AlertService, AppStateService, BreadcrumbService, GroupFragment, ModalService, NavigatorNode, NavigatorNodeData, OptionsService } from '@c8y/ngx-components'; import { ApiService } from '@c8y/ngx-components/api'; import { AssetNode } from './asset-node'; import { AssetNavigatorConfig } from './asset-node-config.model'; import { DynamicGroupNode } from './dynamic-group-node'; import { DeviceGroupService } from './group.service'; import { TranslateService } from '@ngx-translate/core'; import * as i0 from "@angular/core"; export interface AssetNodeMo { id: string; type: string; } export declare class AssetNodeService { rootNode: AssetNode; firstUrl: boolean; draggedData: AssetNode; queriesUtil: QueriesUtil; protected PAGE_SIZE: number; inventory: InventoryService; apiService: ApiService; modal: ModalService; alert: AlertService; translateService: TranslateService; protected breadcrumbService: BreadcrumbService; protected user: UserService; protected appState: AppStateService; protected optionsService: OptionsService; moduleConfig: AssetNavigatorConfig; protected deviceGroupService: DeviceGroupService; protected router: Router; constructor(); /** * Expands the navigator nodes on first navigation. * @param snapshot The current navigation snapshot. */ expandNodesOnStart(snapshot: ActivatedRouteSnapshot): Promise<void>; /** * Expands all the given ids recursively. Stops if it does not find any. * @param node The node where the expanding should be started * @param ids The ids that should be expanded. */ expandAll(node: AssetNode, ids: string[]): void; label(mo: IManagedObject): string; icon(mo: IManagedObject, open?: boolean): Promise<string>; isGroup(mo: IManagedObject): boolean; isDynamicGroup(mo: IManagedObject): boolean; isDataBroker(mo: IManagedObject): boolean; isDataBrokerActive(mo: IManagedObject): boolean; isAsset(mo: IManagedObject): boolean; isAnyGroup(mo: IManagedObject): boolean; isDevice(mo: IManagedObject): boolean; createRootNode(config?: NavigatorNodeData): AssetNode; createDynamicGroupNode(config: any): DynamicGroupNode; createAssetNode(config: Partial<AssetNode>): AssetNode; createChildNode(managedObject: any, config: Partial<AssetNode>): AssetNode | DynamicGroupNode; getRootNodes(customFilter?: any): Promise<any>; getAllInventories(customFilter?: any): Promise<any>; getGroupItems(moId: string, extraFilter?: object, withChildren?: boolean, filterQuery?: string): Promise<import("@c8y/client").IResultList<IManagedObject>>; getUnassignedDevices(withChildren?: boolean, filterQuery?: string): Promise<import("@c8y/client").IResultList<IManagedObject>>; getDynamicGroupItems(groupQuery: string, filterObj?: any): Promise<import("@c8y/client").IResultList<IManagedObject>>; getDeviceChildren(moId: string, extraFilter?: object, filterQuery?: string, withChildren?: boolean): Promise<import("@c8y/client").IResultList<IManagedObject>>; getUnassignedDevicesQueryStr(filterQuery: any): string; groupQueryFilter(moId: string, filterQuery?: string): string; navRootQueryFilter(): { __filter: { type: GroupFragment; __has?: undefined; }; __orderby: any[]; } | { __filter: { __has: GroupFragment; type?: undefined; }; __orderby: any[]; }; rootQueryFilter(): { __filter: { type: GroupFragment; __has?: undefined; }; __orderby: any[]; } | { __filter: { __has: GroupFragment; type?: undefined; }; __orderby: any[]; }; onUpdate({ mo, root }: { mo: any; root: any; }): import("rxjs").Observable<{ data: IManagedObject; method: string; url: string; }>; isNewManagedObjectRoot(response?: Partial<IResult<IManagedObject>>): boolean; /** * Check if it is possible to drop a node after dragging. * @param dropOnRoot Is the drop performed on the root node */ canDropNode(dropOnRoot: boolean): boolean; /** * There could be multiple breadcrumbs for devices, * so we set a preferred one on click on a device. * @param parents The parent nodes of the device to select the prefered one. */ preferBreadcrumb(parents: NavigatorNode[]): void; protected createFilter(extraParams?: any): any; private buildCombinedQuery; static ɵfac: i0.ɵɵFactoryDeclaration<AssetNodeService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AssetNodeService>; } //# sourceMappingURL=asset-node.service.d.ts.map