/** * Controller for the query grid. * * @param {angular.IScope} $scope Angular scope. * @param {import('ngeo/query/MapQuerent').QueryResult} ngeoQueryResult ngeo query result. * @param {import('ngeo/query/MapQuerent').MapQuerent} ngeoMapQuerent ngeo map querent service. * @param {angular.ITimeoutService} $timeout Angular timeout service. * @param {import('ngeo/options').ngeoQueryOptions} ngeoQueryOptions The options. * @param {import('gmf/options').gmfCsvFilename} gmfCsvFilename The CSV file name. * @param {JQuery} $element Element. * @param {import('gmf/options').gmfDisplayQueryGridOptions} gmfDisplayQueryGridOptions The options. * @class * @hidden * @ngdoc controller * @ngname GmfDisplayquerygridController */ export function QueryGridController($scope: angular.IScope, ngeoQueryResult: import("ngeo/query/MapQuerent").QueryResult, ngeoMapQuerent: import("ngeo/query/MapQuerent").MapQuerent, $timeout: angular.ITimeoutService, ngeoQueryOptions: import("ngeo/options").ngeoQueryOptions, gmfCsvFilename: import("gmf/options").gmfCsvFilename, $element: JQuery, gmfDisplayQueryGridOptions: import("gmf/options").gmfDisplayQueryGridOptions): void; export class QueryGridController { /** * Controller for the query grid. * * @param {angular.IScope} $scope Angular scope. * @param {import('ngeo/query/MapQuerent').QueryResult} ngeoQueryResult ngeo query result. * @param {import('ngeo/query/MapQuerent').MapQuerent} ngeoMapQuerent ngeo map querent service. * @param {angular.ITimeoutService} $timeout Angular timeout service. * @param {import('ngeo/options').ngeoQueryOptions} ngeoQueryOptions The options. * @param {import('gmf/options').gmfCsvFilename} gmfCsvFilename The CSV file name. * @param {JQuery} $element Element. * @param {import('gmf/options').gmfDisplayQueryGridOptions} gmfDisplayQueryGridOptions The options. * @class * @hidden * @ngdoc controller * @ngname GmfDisplayquerygridController */ constructor($scope: angular.IScope, ngeoQueryResult: import("ngeo/query/MapQuerent").QueryResult, ngeoMapQuerent: import("ngeo/query/MapQuerent").MapQuerent, $timeout: angular.ITimeoutService, ngeoQueryOptions: import("ngeo/options").ngeoQueryOptions, gmfCsvFilename: import("gmf/options").gmfCsvFilename, $element: JQuery, gmfDisplayQueryGridOptions: import("gmf/options").gmfDisplayQueryGridOptions); /** * @type {import('gmf/options').gmfDisplayQueryGridOptions} */ options: import("gmf/options").gmfDisplayQueryGridOptions; /** * @type {angular.IScope} */ $scope_: angular.IScope; /** * @type {angular.ITimeoutService} */ $timeout_: angular.ITimeoutService; /** * @type {import('ngeo/query/MapQuerent').QueryResult} */ ngeoQueryResult: import("ngeo/query/MapQuerent").QueryResult; /** * @type {import('ngeo/query/MapQuerent').MapQuerent} */ ngeoMapQuerent_: import("ngeo/query/MapQuerent").MapQuerent; /** * @type {import('ngeo/download/Csv').DownloadCsvService} */ ngeoCsvDownload_: import("ngeo/download/Csv").DownloadCsvService; /** * @type {JQuery} */ $element_: JQuery; /** * @type {number} */ maxResults: number; /** * @type {boolean} */ active: boolean; /** * @type {boolean} */ pending: boolean; /** * @type {Object} */ gridSources: { [x: string]: GridSource; }; /** * IDs of the grid sources in the order they were loaded. * * @type {string[]} */ loadedGridSources: string[]; /** * The id of the currently shown query source. * * @type {?string|number} */ selectedTab: (string | number) | null; /** * A mapping between row uid and the corresponding feature for each * source. * * @type {Object>>} */ featuresForSources_: { [x: string]: { [x: string]: import("ol/Feature").default; }; }; /** * @type {import('ol/Collection').default>} */ features_: import("ol/Collection").default>; /** * @type {import('ol/Collection').default>} */ highlightFeatures_: import("ol/Collection").default>; /** * Filename * * @type {import('gmf/options').gmfCsvFilename} */ filename_: import("gmf/options").gmfCsvFilename; /** * @type {?import('ol/Map').default} */ map_: import("ol/Map").default | null; /** * Sum over all tabs of the obtained results * * @type {number} */ sumOfFeatures: number; /** * Sum over all tabs of the available results * * @type {number} */ sumOfAvailableResults: number; /** * An unregister function returned from `$scope.$watchCollection` for * "on-select" changes (when rows are selected/unselected). * * @type {?function(): void} */ unregisterSelectWatcher_: (() => void) | null; /** * @type {?() => olMap} */ getMapFn: (() => olMap) | null; /** * Init the controller */ $onInit(): void; /** * Returns a list of grid sources in the order they were loaded. * * @returns {GridSource[]} Grid sources. */ getGridSources(): GridSource[]; updateData_(): void; /** * @returns {boolean} If one of the source has too many results. */ hasOneWithTooManyResults_(): boolean; /** * Returns the value with all symbols and spaces replaced by an underscore. * * @param {string|number} value A value to escape. * @returns {string|number} value An escaped value. */ escapeValue(value: string | number): string | number; /** * Returns if the given grid source is selected? * * @param {GridSource} gridSource Grid source. * @returns {boolean} Is selected? */ isSelected(gridSource: GridSource): boolean; /** * Try to merge the mergeable sources. * * @param {import('ngeo/statemanager/WfsPermalink').QueryResultSource[]} sources Sources. * @returns {import('ngeo/statemanager/WfsPermalink').QueryResultSource[]} The merged sources. */ getMergedSources_(sources: import("ngeo/statemanager/WfsPermalink").QueryResultSource[]): import("ngeo/statemanager/WfsPermalink").QueryResultSource[]; /** * Check if the given source should be merged. If so, an artificial source * that will contain the features of all mergeable sources is returned. If not, * `null` is returned. * * @param {import('ngeo/statemanager/WfsPermalink').QueryResultSource} source Source. * @param {Object} mergedSources * Merged sources. * @returns {?import('ngeo/statemanager/WfsPermalink').QueryResultSource} A merged source of null if the * source should not be merged. */ getMergedSource_(source: import("ngeo/statemanager/WfsPermalink").QueryResultSource, mergedSources: { [x: string]: import("ngeo/statemanager/WfsPermalink").QueryResultSource; }): import("ngeo/statemanager/WfsPermalink").QueryResultSource | null; /** * Collect all features in the queryResult object. * * @param {import('ngeo/statemanager/WfsPermalink').QueryResultSource} source Result source. */ collectData_(source: import("ngeo/statemanager/WfsPermalink").QueryResultSource): void; /** * Remove all unwanted columns. * * @param {Object[]} allProperties A row. * @param {string[]} featureGeometriesNames Geometry names. */ cleanProperties_(allProperties: { [x: string]: string | number | boolean; }[], featureGeometriesNames: string[]): void; /** * Remove columns that will be completely empty between each properties. * * @param {Object[]} allProperties A row. */ removeEmptyColumnsFn_(allProperties: { [x: string]: string | number | boolean; }[]): void; /** * @param {?Object[]} data Grid rows. * @param {import('ngeo/statemanager/WfsPermalink').QueryResultSource} source Query source. * @returns {boolean} Returns true if a grid was created. */ makeGrid_(data: { [x: string]: string | number | boolean; }[] | null, source: import("ngeo/statemanager/WfsPermalink").QueryResultSource): boolean; /** * @param {Object[]} data Grid rows. * @returns {?import('ngeo/grid/Config').default} Grid config. */ getGridConfiguration_(data: { [x: string]: string | number | boolean; }[]): import("ngeo/grid/Config").default | null; /** * Get the currently shown grid source. * * @returns {GridSource|null} Grid source. */ getActiveGridSource(): GridSource | null; /** * Remove the current selected feature and source and remove all features * from the map. */ clear(): void; tooManyResults: boolean; /** * Select the tab for the given grid source. * * @param {GridSource} gridSource Grid source. */ selectTab(gridSource: GridSource): void; reflowGrid_(): void; /** * Called when the row selection has changed. */ onSelectionChanged_(): void; /** * @param {GridSource} gridSource Grid source */ updateFeatures_(gridSource: GridSource): void; /** * Returns if a row of the currently active grid is selected? * * @returns {boolean} Is one selected? */ isOneSelected(): boolean; /** * Returns the number of selected rows of the currently active grid. * * @returns {number} The number of selected rows. */ getSelectedRowCount(): number; /** * Select all rows of the currently active grid. */ selectAll(): void; /** * Deselect all rows of the currently active grid. */ unselectAll(): void; /** * Invert the selection of the currently active grid. */ invertSelection(): void; /** * Zoom to the selected features. */ zoomToSelection(): void; /** * Start a CSV download for the selected features. */ downloadCsv(): void; } export namespace QueryGridController { let $inject: string[]; } export default myModule; /** * Configuration for a grid tab. */ export type GridSource = { /** * Configuration used to initialize a grid. */ configuration?: import("ngeo/grid/Config").default; /** * Results of the query * source. */ source: import("ngeo/statemanager/WfsPermalink").QueryResultSource; }; import angular from 'angular'; import olMap from 'ol/Map'; /** * Configuration for a grid tab. * * @typedef {Object} GridSource * @property {import('ngeo/grid/Config').default} [configuration] Configuration used to initialize a grid. * @property {import('ngeo/statemanager/WfsPermalink').QueryResultSource} source Results of the query * source. */ /** * @type {angular.IModule} * @hidden */ declare const myModule: angular.IModule;