import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { BehaviorSubject, ReplaySubject, Subscription } from 'rxjs'; import { MtnaPopoverConfig } from '@mtna/lib-ui'; import { Variable, VariableSummary } from '@mtna/pojo-consumer-ui'; import { BaseFilter } from '../core/models/filter/base-filter.model'; import { MeasureSelection } from '../measure-select/measure-selection.model'; export interface RdsTabulationDimensionsForm { columns?: Array; filters?: Array>; rows: Array; weights?: Array; measures?: MeasureSelection[]; } export declare const DEFAULT_RDS_MEASURES: MeasureSelection[]; export declare class RdsDimensionSelectionComponent implements OnDestroy, OnInit { private cdr; private fb; /** Selected column dimensions */ get columns(): Array; set columns(columns: Array); private _columns; /** Popover config for column selection */ columnsConfig: MtnaPopoverConfig; /** * NgStyle config for the dialog content's filter component, defaults to `{ height: '300px' }` * @example * { 'maxHeight': '300px' } */ dialogFilterStyles: { [key: string]: string; }; /** Optional filter dialog min-width */ dialogMinWidth: string; /** Optional filter */ get filters(): Array>; set filters(filters: Array>); private _filters; /** Popover config for filter select */ filterConfig: MtnaPopoverConfig; /** Maximum number of column dimensions */ maxColumns: number; /** Maximum number of row dimensions */ maxRows: number; /** Selected meausre */ get measures(): MeasureSelection[]; set measures(measures: MeasureSelection[]); private _measures; /** Popover config for measure select */ measureConfig: MtnaPopoverConfig; /** Optional array of measure variables to choose from */ get measureVariables(): Array | null; set measureVariables(variables: Array | null); private _measureVariables; /** Whether the user can select multiple filter codes */ multiFilterCodes: boolean; /** Whether the user can select multiple filter variables */ multiFilterVariables: boolean; /** Selected row dimensions */ get rows(): Array; set rows(rows: Array); private _rows; /** Popover config for row selecttion */ rowsConfig: MtnaPopoverConfig; /** Whether currently tabulating */ get tabulating(): boolean; set tabulating(tabulating: boolean); private _tabulating; /** List of variables available to select */ get variables(): Array; set variables(variables: Array); private _variables; /** Selected variable weights */ get weights(): Array; set weights(weights: Array); private _weights; /** Popover config for weight select */ weightsConfig: MtnaPopoverConfig; /** Optional array of weighted variables to choose from */ get weightedVariables(): Array | null; set weightedVariables(variables: Array | null); private _weightedVariables; /** The selected TabulationDimensions to be tabulated */ tabulate: EventEmitter>; disabledColumnOptions$: BehaviorSubject; disabledRowOptions$: BehaviorSubject; form: FormGroup; formValueChangeSub: Subscription; /** * Subject that emits the latest selected variables accross all dimension controls. * Used to prevent variables from being selected multiple times. */ selectedVariables$: ReplaySubject; _allMeasureTypes: ("COUNT" | "PERCENT" | "SUM" | "AVG" | "MIN" | "MAX")[]; _countAndPercentMeasureTypes: string[]; constructor(cdr: ChangeDetectorRef, fb: FormBuilder); ngOnDestroy(): void; ngOnInit(): void; submitForm(): void; /** * Get all the selected variable IDs and put them in the selected array * to disable these from being selected multiple times. * exclude filter and weights */ private _emitSelectedVariables; }