nested-option.d.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*!
  2. * devextreme-angular
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. *
  8. * This software may be modified and distributed under the terms
  9. * of the MIT license. See the LICENSE file in the root of the project for details.
  10. *
  11. * https://github.com/DevExpress/devextreme-angular
  12. */
  13. import { QueryList, ElementRef, Renderer2, EventEmitter } from '@angular/core';
  14. export interface INestedOptionContainer {
  15. instance: any;
  16. isLinked: boolean;
  17. optionChangedHandlers: EventEmitter<any>;
  18. }
  19. export interface IOptionPathGetter {
  20. (): string;
  21. }
  22. export declare abstract class BaseNestedOption implements INestedOptionContainer, ICollectionNestedOptionContainer {
  23. protected _host: INestedOptionContainer;
  24. protected _hostOptionPath: IOptionPathGetter;
  25. private _collectionContainerImpl;
  26. protected _initialOptions: {};
  27. protected readonly abstract _optionPath: string;
  28. protected abstract _fullOptionPath(): string;
  29. constructor();
  30. protected _optionChangedHandler(e: any): void;
  31. protected _createEventEmitters(events: any): void;
  32. protected _getOption(name: string): any;
  33. protected _setOption(name: string, value: any): void;
  34. setHost(host: INestedOptionContainer, optionPath: IOptionPathGetter): void;
  35. setChildren<T extends ICollectionNestedOption>(propertyName: string, items: QueryList<T>): any;
  36. _filterItems(items: QueryList<BaseNestedOption>): BaseNestedOption[];
  37. readonly instance: any;
  38. readonly isLinked: boolean;
  39. readonly optionChangedHandlers: EventEmitter<any>;
  40. }
  41. export interface ICollectionNestedOptionContainer {
  42. setChildren<T extends ICollectionNestedOption>(propertyName: string, items: QueryList<T>): any;
  43. }
  44. export declare class CollectionNestedOptionContainerImpl implements ICollectionNestedOptionContainer {
  45. private _setOption;
  46. private _filterItems;
  47. private _activatedQueries;
  48. constructor(_setOption: Function, _filterItems?: Function);
  49. setChildren<T extends ICollectionNestedOption>(propertyName: string, items: QueryList<T>): void;
  50. }
  51. export declare abstract class NestedOption extends BaseNestedOption {
  52. setHost(host: INestedOptionContainer, optionPath: IOptionPathGetter): void;
  53. protected _fullOptionPath(): string;
  54. }
  55. export interface ICollectionNestedOption {
  56. _index: number;
  57. _value: Object;
  58. }
  59. export declare abstract class CollectionNestedOption extends BaseNestedOption implements ICollectionNestedOption {
  60. _index: number;
  61. protected _fullOptionPath(): string;
  62. readonly _value: {};
  63. readonly isLinked: boolean;
  64. }
  65. export interface IOptionWithTemplate extends BaseNestedOption {
  66. template: any;
  67. }
  68. export declare function extractTemplate(option: IOptionWithTemplate, element: ElementRef, renderer: Renderer2, document: any): void;
  69. export declare class NestedOptionHost {
  70. private _host;
  71. private _optionPath;
  72. getHost(): INestedOptionContainer;
  73. setHost(host: INestedOptionContainer, optionPath?: IOptionPathGetter): void;
  74. setNestedOption(nestedOption: BaseNestedOption): void;
  75. }