diff --git a/CHANGELOG.md b/CHANGELOG.md index 4221369fb..465c504d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Not released +- Export FilterTypes enum [#314](https://github.com/CartoDB/carto-react/pull/314) - Improve lasso tool copies [#313](https://github.com/CartoDB/carto-react/pull/313) ## 1.2 diff --git a/packages/react-core/src/filters/FilterQueryBuilder.d.ts b/packages/react-core/src/filters/FilterQueryBuilder.d.ts new file mode 100644 index 000000000..ba2cafec6 --- /dev/null +++ b/packages/react-core/src/filters/FilterQueryBuilder.d.ts @@ -0,0 +1,6 @@ +export enum FilterTypes { + IN = 'in', + BETWEEN = 'between', // [a, b] both are included + CLOSED_OPEN = 'closed_open', // [a, b) a is included, b is not + TIME = 'time' +} diff --git a/packages/react-core/src/index.d.ts b/packages/react-core/src/index.d.ts index 0f16f9d5b..3605ae50a 100644 --- a/packages/react-core/src/index.d.ts +++ b/packages/react-core/src/index.d.ts @@ -19,6 +19,8 @@ export { groupValuesByColumn } from './operations/groupby'; export { histogram } from './operations/histogram'; export { scatterPlot } from './operations/scatterPlot'; +export { FilterTypes as _FilterTypes } from './filters/FilterQueryBuilder'; + export { tileFeatures } from './filters/tileFeatures'; export { geojsonFeatures } from './filters/geojsonFeatures'; diff --git a/packages/react-core/src/types.d.ts b/packages/react-core/src/types.d.ts index 7d695e36e..f70d498dd 100644 --- a/packages/react-core/src/types.d.ts +++ b/packages/react-core/src/types.d.ts @@ -1,9 +1,6 @@ import { TILE_FORMATS } from '@deck.gl/carto' import { AggregationTypes } from './operations/aggregation/AggregationTypes'; import { Geometry } from 'geojson'; -import { - FilterTypes -} from './filters/FilterQueryBuilder'; export type AggregationFunctions = { [AggregationTypes.COUNT]: Function, @@ -31,5 +28,3 @@ export type TileFeatures = { } export type TileFeaturesResponse = Record[] | [] - -export type _FilterTypes = typeof FilterTypes; diff --git a/packages/react-redux/src/slices/cartoSlice.d.ts b/packages/react-redux/src/slices/cartoSlice.d.ts index e3f6902de..2b76f2b9f 100644 --- a/packages/react-redux/src/slices/cartoSlice.d.ts +++ b/packages/react-redux/src/slices/cartoSlice.d.ts @@ -1,6 +1,6 @@ import { Credentials } from '@carto/react-api/'; import { SourceProps } from '@carto/react-api/types'; -import { _FilterTypes } from '@carto/react-core/types'; +import { _FilterTypes } from '@carto/react-core'; import { CartoBasemapsNames, GMapsBasemapsNames } from '@carto/react-basemaps/'; import { InitialCartoState, CartoState, ViewState } from '../types'; import { AnyAction, Reducer } from 'redux';