From a52cd691f0404169c5e687f4181c0de93c5987a7 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Wed, 2 Dec 2020 08:20:00 +0200 Subject: [PATCH] feat: native filter components (#840) * feat: add AntD filter components * add missing files * add filter hook * fix hook name * required thumbnail * add native filters to where clause * add isNativeFilter flag to ChartMetadata * rename native_filters to extra_form_data * lint * move hook to SuperChart props * add NOOP default to setSelectedValues * replace extra_form_data with override_ and append_ * add support for appending freeform where * address review comments * Add default values * Update packages/superset-ui-core/test/query/processExtraFormData.test.ts Co-authored-by: Evan Rusackas * Update packages/superset-ui-core/test/query/processExtraFormData.test.ts Co-authored-by: Evan Rusackas * add storybook entry and change width to 100% * add placeholder * add default thumbnails Co-authored-by: Evan Rusackas --- .../superset-ui/README.md | 1 + .../superset-ui-core/src/chart/index.ts | 1 + .../src/chart/models/ChartMetadata.ts | 6 + .../src/chart/models/ChartProps.ts | 6 +- .../superset-ui-core/src/chart/types/Base.ts | 6 + .../src/query/buildQueryObject.ts | 9 +- .../src/query/processExtraFormData.ts | 70 ++ .../src/query/processFilters.ts | 71 +-- .../superset-ui-core/src/query/types/Query.ts | 4 +- .../src/query/types/QueryFormData.ts | 7 + .../test/query/DatasourceKey.test.ts | 18 + .../test/query/buildQueryContext.test.ts | 18 + .../test/query/buildQueryObject.test.ts | 18 + .../test/query/convertFilter.test.ts | 18 + .../test/query/convertMetric.test.ts | 18 + .../test/query/extractExtras.test.ts | 18 + .../test/query/extractQueryFields.test.ts | 18 + .../test/query/processExtraFormData.test.ts | 183 ++++++ .../test/query/processFilters.test.ts | 22 +- .../test/query/processGroupby.test.ts | 18 + .../plugin-chart-echarts/BoxPlot/Stories.tsx | 3 +- .../plugin-chart-echarts/Pie/Stories.tsx | 3 +- .../Timeseries/Stories.tsx | 3 +- .../plugin-filter-antd/Select/Stories.tsx | 35 + .../plugins/plugin-filter-antd/Select/data.ts | 216 +++++++ .../plugins/plugin-filter-antd/README.md | 35 + .../plugins/plugin-filter-antd/package.json | 40 ++ .../src/Range/AntdRangeFilter.tsx | 55 ++ .../src/Range/buildQuery.ts | 70 ++ .../src/Range/controlPanel.ts | 42 ++ .../src/Range/images/thumbnail.png | Bin 0 -> 5658 bytes .../plugin-filter-antd/src/Range/index.ts | 42 ++ .../src/Range/transformProps.ts | 33 + .../plugin-filter-antd/src/Range/types.ts | 35 + .../src/Select/AntdSelectFilter.tsx | 104 +++ .../src/Select/buildQuery.ts | 43 ++ .../src/Select/controlPanel.ts | 112 ++++ .../src/Select/images/thumbnail.png | Bin 0 -> 5658 bytes .../plugin-filter-antd/src/Select/index.ts | 42 ++ .../src/Select/transformProps.ts | 36 ++ .../plugin-filter-antd/src/Select/types.ts | 48 ++ .../plugins/plugin-filter-antd/src/index.ts | 20 + .../plugins/plugin-filter-antd/src/types.ts | 22 + .../plugin-filter-antd/test/index.test.ts | 34 + .../plugins/plugin-filter-antd/tsconfig.json | 25 + .../plugin-filter-antd/types/external.d.ts | 4 + .../superset-ui/yarn.lock | 598 +++++++++++++++++- 47 files changed, 2173 insertions(+), 57 deletions(-) create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processExtraFormData.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processExtraFormData.test.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/Stories.tsx create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/data.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/README.md create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/package.json create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/AntdRangeFilter.tsx create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/buildQuery.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/controlPanel.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/images/thumbnail.png create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/index.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/transformProps.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/types.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/AntdSelectFilter.tsx create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/buildQuery.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/controlPanel.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/images/thumbnail.png create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/index.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/transformProps.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/types.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/index.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/types.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/test/index.test.ts create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/tsconfig.json create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/types/external.d.ts diff --git a/superset-frontend/temporary_superset_ui/superset-ui/README.md b/superset-frontend/temporary_superset_ui/superset-ui/README.md index c57061e2bee4..fc27c5ac1a6b 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/README.md +++ b/superset-frontend/temporary_superset_ui/superset-ui/README.md @@ -68,6 +68,7 @@ should be written in Typescript. | [@superset-ui/plugin-chart-table](https://github.com/apache-superset/superset-ui/tree/master/plugins/plugin-chart-table) | [![Version](https://img.shields.io/npm/v/@superset-ui/plugin-chart-table.svg?style=flat-square)](https://www.npmjs.com/package/@superset-ui/plugin-chart-table) | | | [@superset-ui/preset-chart-xy](https://github.com/apache-superset/superset-ui/tree/master/plugins/preset-chart-xy) | [![Version](https://img.shields.io/npm/v/@superset-ui/preset-chart-xy.svg?style=flat-square)](https://www.npmjs.com/package/@superset-ui/preset-chart-xy) | | | [@superset-ui/plugin-chart-echarts](https://github.com/apache-superset/superset-ui/tree/master/plugins/plugin-chart-echarts) | [![Version](https://img.shields.io/npm/v/@superset-ui/plugin-chart-echarts.svg?style=flat-square)](https://www.npmjs.com/package/@superset-ui/plugin-chart-echarts) | | +| [@superset-ui/plugin-filter-antd](https://github.com/apache-superset/superset-ui/tree/master/plugins/plugin-filter-antd) | [![Version](https://img.shields.io/npm/v/@superset-ui/plugin-chart-echarts.svg?style=flat-square)](https://www.npmjs.com/package/@superset-ui/plugin-filter-antd) | | ## Contribution and development guide diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/index.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/index.ts index a19e7bbfc00c..02488b61b446 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/index.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/index.ts @@ -15,5 +15,6 @@ export { default as getChartTransformPropsRegistry } from './registries/ChartTra export { default as ChartDataProvider } from './components/ChartDataProvider'; +export { SetExtraFormDataHook } from './types/Base'; export * from './types/TransformFunction'; export * from './types/QueryResponse'; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartMetadata.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartMetadata.ts index c9b39bd14da2..4562b454baa5 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartMetadata.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartMetadata.ts @@ -11,6 +11,7 @@ export interface ChartMetadataConfig { supportedAnnotationTypes?: string[]; thumbnail: string; useLegacyApi?: boolean; + isNativeFilter?: boolean; } export default class ChartMetadata { @@ -32,6 +33,8 @@ export default class ChartMetadata { useLegacyApi: boolean; + isNativeFilter: boolean; + constructor(config: ChartMetadataConfig) { const { name, @@ -42,6 +45,7 @@ export default class ChartMetadata { supportedAnnotationTypes = [], thumbnail, useLegacyApi = false, + isNativeFilter = false, } = config; this.name = name; @@ -61,6 +65,7 @@ export default class ChartMetadata { this.supportedAnnotationTypes = supportedAnnotationTypes; this.thumbnail = thumbnail; this.useLegacyApi = useLegacyApi; + this.isNativeFilter = isNativeFilter; } canBeAnnotationType(type: string): boolean { @@ -77,6 +82,7 @@ export default class ChartMetadata { supportedAnnotationTypes: this.supportedAnnotationTypes, thumbnail: this.thumbnail, useLegacyApi: this.useLegacyApi, + isNativeFilter: this.isNativeFilter, }); } } diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartProps.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartProps.ts index 160b1c7af092..849a9e9894cb 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartProps.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/models/ChartProps.ts @@ -1,7 +1,7 @@ import { createSelector } from 'reselect'; import { convertKeysToCamelCase, Datasource } from '../..'; -import { HandlerFunction, PlainObject } from '../types/Base'; -import { QueryData, DataRecordFilters } from '../types/QueryResponse'; +import { HandlerFunction, PlainObject, SetExtraFormDataHook } from '../types/Base'; +import { QueryData, DataRecordFilters } from '..'; // TODO: more specific typing for these fields of ChartProps type AnnotationData = PlainObject; @@ -23,6 +23,8 @@ type Hooks = { onError?: HandlerFunction; /** use the vis as control to update state */ setControlValue?: HandlerFunction; + /** handle native filters */ + setExtraFormData?: SetExtraFormDataHook; /** handle tooltip */ setTooltip?: HandlerFunction; } & PlainObject; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/types/Base.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/types/Base.ts index 70573a48a25c..f206aec5cb7f 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/types/Base.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/chart/types/Base.ts @@ -1,5 +1,11 @@ +import { ExtraFormData } from '../../query'; + export type HandlerFunction = (...args: unknown[]) => void; +export type SetExtraFormDataHook = { + (extraFormData: ExtraFormData): void; +}; + export interface PlainObject { // eslint-disable-next-line @typescript-eslint/no-explicit-any [key: string]: any; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/buildQueryObject.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/buildQueryObject.ts index 9e0e7a43fc50..3defc6411331 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/buildQueryObject.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/buildQueryObject.ts @@ -6,6 +6,7 @@ import convertMetric from './convertMetric'; import processFilters from './processFilters'; import extractExtras from './extractExtras'; import extractQueryFields from './extractQueryFields'; +import { appendExtraFormData, overrideExtraFormData } from './processExtraFormData'; export const DTTM_ALIAS = '__timestamp'; @@ -19,6 +20,7 @@ export const DTTM_ALIAS = '__timestamp'; export default function buildQueryObject(formData: T): QueryObject { const { annotation_layers = [], + extra_form_data = {}, time_range, since, until, @@ -32,6 +34,7 @@ export default function buildQueryObject(formData: T): url_params = {}, ...residualFormData } = formData; + const { append_form_data = {}, override_form_data = {} } = extra_form_data; const numericRowLimit = Number(row_limit); const numericRowOffset = Number(row_offset); @@ -44,7 +47,7 @@ export default function buildQueryObject(formData: T): ...extras, }); - return { + let queryObject: QueryObject = { time_range, since, until, @@ -65,4 +68,8 @@ export default function buildQueryObject(formData: T): : null, url_params, }; + // append and override extra form data used by native filters + queryObject = appendExtraFormData(queryObject, append_form_data); + queryObject = overrideExtraFormData(queryObject, override_form_data); + return queryObject; } diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processExtraFormData.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processExtraFormData.ts new file mode 100644 index 000000000000..6a6137c636e8 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processExtraFormData.ts @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { QueryObject } from './types/Query'; + +const ALLOWED_OVERRIDES = ['time_grain_sqla', 'time_range', 'since', 'until']; +const ALLOWED_APPENDS = ['adhoc_filters', 'filters', 'groupby']; + +export function overrideExtraFormData( + queryObject: QueryObject, + overrideFormData: Partial, +): QueryObject { + const overriddenFormData = { ...queryObject }; + ALLOWED_OVERRIDES.forEach(key => { + if (key in overrideFormData) { + overriddenFormData[key] = overrideFormData[key]; + } + }); + return overriddenFormData; +} + +export function appendExtraFormData( + queryObject: QueryObject, + appendFormData: Partial, +): QueryObject { + const appendedFormData = { ...queryObject }; + ALLOWED_APPENDS.forEach(key => { + if (key in appendFormData) { + const append = appendFormData[key]; + const currentValue = appendedFormData[key] || []; + // @ts-ignore + currentValue.push(...append); + appendedFormData[key] = currentValue; + } + }); + + // Add freeform where + const { extras = {} } = appendedFormData; + const { where = '' } = extras; + extras.where = where; + + const { extras: appendExtras = {} } = appendFormData; + let { where: appendWhere } = appendExtras; + + if (appendWhere) { + appendedFormData.extras = extras; + appendWhere = `(${appendWhere})`; + } + if (where) { + appendWhere = `(${where}) AND ${appendWhere}`; + } + extras.where = appendWhere; + + return appendedFormData; +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processFilters.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processFilters.ts index c77a3e7c53c2..8d3e7ab85eb0 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processFilters.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/processFilters.ts @@ -5,53 +5,46 @@ import { isSimpleAdhocFilter } from './types/Filter'; import convertFilter from './convertFilter'; /** Logic formerly in viz.py's process_query_filters */ -export default function processFilters(formData: QueryFormData) { +export default function processFilters(formData: QueryFormData): Partial { // Split adhoc_filters into four fields according to // (1) clause (WHERE or HAVING) // (2) expressionType // 2.1 SIMPLE (subject + operator + comparator) // 2.2 SQL (freeform SQL expression)) - const { adhoc_filters } = formData; - if (Array.isArray(adhoc_filters)) { - const simpleWhere: QueryObjectFilterClause[] = formData.filters || []; - const simpleHaving: QueryObjectFilterClause[] = []; - const freeformWhere: string[] = []; - if (formData.where) freeformWhere.push(formData.where); - const freeformHaving: string[] = []; + const { adhoc_filters = [], extras = {}, filters = [], where } = formData; + const simpleWhere: QueryObjectFilterClause[] = filters; - adhoc_filters.forEach(filter => { - const { clause } = filter; - if (isSimpleAdhocFilter(filter)) { - const filterClause = convertFilter(filter); - if (clause === 'WHERE') { - simpleWhere.push(filterClause); - } else { - simpleHaving.push(filterClause); - } + const simpleHaving: QueryObjectFilterClause[] = []; + const freeformWhere: string[] = []; + if (where) freeformWhere.push(where); + const freeformHaving: string[] = []; + + adhoc_filters.forEach(filter => { + const { clause } = filter; + if (isSimpleAdhocFilter(filter)) { + const filterClause = convertFilter(filter); + if (clause === 'WHERE') { + simpleWhere.push(filterClause); } else { - const { sqlExpression } = filter; - if (clause === 'WHERE') { - freeformWhere.push(sqlExpression); - } else { - freeformHaving.push(sqlExpression); - } + simpleHaving.push(filterClause); } - }); - - // some filter-related fields need to go in `extras` - const extras = { - having: freeformHaving.map(exp => `(${exp})`).join(' AND '), - having_druid: simpleHaving, - where: freeformWhere.map(exp => `(${exp})`).join(' AND '), - ...formData.extras, - }; + } else { + const { sqlExpression } = filter; + if (clause === 'WHERE') { + freeformWhere.push(sqlExpression); + } else { + freeformHaving.push(sqlExpression); + } + } + }); - return { - // eslint-disable-next-line @typescript-eslint/no-unsafe-call - filters: simpleWhere, - extras, - }; - } + // some filter-related fields need to go in `extras` + extras.having = freeformHaving.map(exp => `(${exp})`).join(' AND '); + extras.having_druid = simpleHaving; + extras.where = freeformWhere.map(exp => `(${exp})`).join(' AND '); - return {}; + return { + filters: simpleWhere, + extras, + }; } diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/Query.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/Query.ts index 1a2780c032ae..342f149eae03 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/Query.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/Query.ts @@ -11,11 +11,11 @@ export type QueryObjectFilterClause = { } & ( | { op: BinaryOperator; - val: string; + val: string | number | boolean; } | { op: SetOperator; - val: string[]; + val: (string | number | boolean)[]; } | { op: UnaryOperator; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/QueryFormData.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/QueryFormData.ts index 6c4c6ac8e67f..8355ab6a7913 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/QueryFormData.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/src/query/types/QueryFormData.ts @@ -5,6 +5,7 @@ import { TimeRange } from './Time'; import { AdhocFilter } from './Filter'; import { BinaryOperator, SetOperator } from './Operator'; import { AnnotationLayer } from './AnnotationLayer'; +import { QueryObject } from './Query'; export type QueryFormDataMetric = string | AdhocMetric; export type QueryFormResidualDataValue = string | AdhocMetric; @@ -33,6 +34,11 @@ export type QueryFormExtraFilter = { } ); +export type ExtraFormData = { + append_form_data?: Partial; + override_form_data?: Partial; +}; + // Type signature for formData shared by all viz types // It will be gradually filled out as we build out the query object @@ -76,6 +82,7 @@ export type BaseFormData = { annotation_layers?: AnnotationLayer[]; url_params?: Record; } & TimeRange & + ExtraFormData & QueryFormResidualData; // FormData is either sqla-based or druid-based diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/DatasourceKey.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/DatasourceKey.test.ts index 70beafb2c052..d0faab462582 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/DatasourceKey.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/DatasourceKey.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { DatasourceKey } from '@superset-ui/core/src/query'; describe('DatasourceKey', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryContext.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryContext.test.ts index 56436c537dfb..4e93a47768b1 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryContext.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryContext.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { buildQueryContext } from '@superset-ui/core/src/query'; describe('buildQueryContext', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts index 602592276f62..24195a683124 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { AnnotationLayer, buildQueryObject, QueryObject } from '@superset-ui/core/src/query'; describe('buildQueryObject', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertFilter.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertFilter.test.ts index db7bf85c0721..9869c1e139f6 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertFilter.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertFilter.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { convertFilter } from '@superset-ui/core/src/query'; describe('convertFilter', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertMetric.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertMetric.test.ts index 08cc397a8fa6..23a02c111dd1 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertMetric.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/convertMetric.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { ColumnType, convertMetric } from '@superset-ui/core/src/query'; describe('convertMetric', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractExtras.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractExtras.test.ts index f9097d0bbbb6..e483666c8256 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractExtras.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractExtras.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import extractExtras from '@superset-ui/core/src/query/extractExtras'; describe('extractExtras', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractQueryFields.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractQueryFields.test.ts index 74a341717744..0efdecd2c098 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractQueryFields.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractQueryFields.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import extractQueryFields from '@superset-ui/core/src/query/extractQueryFields'; describe('extractQueryFields', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processExtraFormData.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processExtraFormData.test.ts new file mode 100644 index 000000000000..1557236630da --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processExtraFormData.test.ts @@ -0,0 +1,183 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { + appendExtraFormData, + overrideExtraFormData, +} from '@superset-ui/core/src/query/processExtraFormData'; + +describe('appendExtraFormData', () => { + it('should add allowed values to non-existent value', () => { + expect( + appendExtraFormData( + { + datasource: 'table_1', + granularity: 'something', + viz_type: 'custom', + }, + { + filters: [{ col: 'my_col', op: '==', val: 'my value' }], + }, + ), + ).toEqual({ + datasource: 'table_1', + filters: [{ col: 'my_col', op: '==', val: 'my value' }], + granularity: 'something', + viz_type: 'custom', + }); + }); + + it('should add allowed values to preexisting value(s)', () => { + expect( + appendExtraFormData( + { + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + filters: [{ col: 'my_col', op: '==', val: 'my value' }], + }, + { + filters: [{ col: 'my_other_col', op: '!=', val: 'my other value' }], + }, + ), + ).toEqual({ + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + filters: [ + { col: 'my_col', op: '==', val: 'my value' }, + { col: 'my_other_col', op: '!=', val: 'my other value' }, + ], + }); + }); + + it('should add new freeform where', () => { + expect( + appendExtraFormData( + { + datasource: 'table_1', + granularity: 'something', + viz_type: 'custom', + }, + { + extras: { + where: '1 = 0', + }, + }, + ), + ).toEqual({ + datasource: 'table_1', + granularity: 'something', + viz_type: 'custom', + extras: { + where: '(1 = 0)', + }, + }); + }); + + it('should add new freeform where to existing where clause', () => { + expect( + appendExtraFormData( + { + datasource: 'table_1', + granularity: 'something', + viz_type: 'custom', + extras: { + where: 'abc = 1', + }, + }, + { + extras: { + where: '1 = 0', + }, + }, + ), + ).toEqual({ + datasource: 'table_1', + granularity: 'something', + viz_type: 'custom', + extras: { + where: '(abc = 1) AND (1 = 0)', + }, + }); + }); +}); + +describe('overrideExtraFormData', () => { + it('should assign allowed non-existent value', () => { + expect( + overrideExtraFormData( + { + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + }, + { + time_grain_sqla: 'PT1H', + }, + ), + ).toEqual({ + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + time_grain_sqla: 'PT1H', + }); + }); + + it('should override allowed preexisting value', () => { + expect( + overrideExtraFormData( + { + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + time_grain_sqla: 'PT1H', + }, + { + time_grain_sqla: 'PT2H', + }, + ), + ).toEqual({ + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + time_grain_sqla: 'PT2H', + }); + }); + + it('should not override non-allowed value', () => { + expect( + overrideExtraFormData( + { + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + time_grain_sqla: 'PT1H', + }, + { + viz_type: 'other custom viz', + }, + ), + ).toEqual({ + granularity: 'something', + viz_type: 'custom', + datasource: 'table_1', + time_grain_sqla: 'PT1H', + }); + }); +}); diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processFilters.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processFilters.test.ts index 05bb46150bb1..2ae7fa26ae1e 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processFilters.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processFilters.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import processFilters from '@superset-ui/core/src/query/processFilters'; describe('processFilters', () => { @@ -8,7 +26,9 @@ describe('processFilters', () => { viz_type: 'custom', datasource: 'boba', }), - ).toEqual({}); + ).toEqual( + expect.objectContaining({ extras: { having: '', having_druid: [], where: '' }, filters: [] }), + ); }); it('should merge simple adhoc_filters and filters', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processGroupby.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processGroupby.test.ts index 390f2509fcc4..198b3dc4f8e7 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processGroupby.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/processGroupby.test.ts @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import processGroupby from '@superset-ui/core/src/query/processGroupby'; describe('processGroupby', () => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/BoxPlot/Stories.tsx b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/BoxPlot/Stories.tsx index 35d8b4b0b635..b3e2bf88810b 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/BoxPlot/Stories.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/BoxPlot/Stories.tsx @@ -4,6 +4,7 @@ import { select, withKnobs } from '@storybook/addon-knobs'; import { EchartsBoxPlotChartPlugin } from '@superset-ui/plugin-chart-echarts'; import transformProps from '@superset-ui/plugin-chart-echarts/lib/BoxPlot/transformProps'; import data from './data'; +import { withResizableChartDemo } from '../../../../shared/components/ResizableChartDemo'; new EchartsBoxPlotChartPlugin().configure({ key: 'echarts-boxplot' }).register(); @@ -11,7 +12,7 @@ getChartTransformPropsRegistry().registerValue('echarts-boxplot', transformProps export default { title: 'Chart Plugins|plugin-chart-echarts/BoxPlot', - decorators: [withKnobs], + decorators: [withKnobs, withResizableChartDemo], }; export const BoxPlot = ({ width, height }) => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Pie/Stories.tsx b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Pie/Stories.tsx index ebf18d9963a8..1f05e67cf888 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Pie/Stories.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Pie/Stories.tsx @@ -4,6 +4,7 @@ import { boolean, number, select, withKnobs } from '@storybook/addon-knobs'; import { EchartsPieChartPlugin } from '@superset-ui/plugin-chart-echarts'; import transformProps from '@superset-ui/plugin-chart-echarts/lib/Pie/transformProps'; import { weekday, population } from './data'; +import { withResizableChartDemo } from '../../../../shared/components/ResizableChartDemo'; new EchartsPieChartPlugin().configure({ key: 'echarts-pie' }).register(); @@ -11,7 +12,7 @@ getChartTransformPropsRegistry().registerValue('echarts-pie', transformProps); export default { title: 'Chart Plugins|plugin-chart-echarts/Pie', - decorators: [withKnobs], + decorators: [withKnobs, withResizableChartDemo], }; export const WeekdayPie = ({ width, height }) => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Timeseries/Stories.tsx b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Timeseries/Stories.tsx index 629f17798e48..e74f7f820b10 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Timeseries/Stories.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Timeseries/Stories.tsx @@ -4,6 +4,7 @@ import { boolean, number, select, withKnobs } from '@storybook/addon-knobs'; import { EchartsTimeseriesChartPlugin } from '@superset-ui/plugin-chart-echarts'; import transformProps from '@superset-ui/plugin-chart-echarts/lib/Timeseries/transformProps'; import data from './data'; +import { withResizableChartDemo } from '../../../../shared/components/ResizableChartDemo'; new EchartsTimeseriesChartPlugin().configure({ key: 'echarts-timeseries' }).register(); @@ -11,7 +12,7 @@ getChartTransformPropsRegistry().registerValue('echarts-timeseries', transformPr export default { title: 'Chart Plugins|plugin-chart-echarts/Timeseries', - decorators: [withKnobs], + decorators: [withKnobs, withResizableChartDemo], }; export const Timeseries = ({ width, height }) => { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/Stories.tsx b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/Stories.tsx new file mode 100644 index 000000000000..9181b0454d34 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/Stories.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { SuperChart, getChartTransformPropsRegistry } from '@superset-ui/core'; +import { AntdSelectFilterPlugin } from '@superset-ui/plugin-filter-antd'; +import transformProps from '@superset-ui/plugin-filter-antd/lib/Select/transformProps'; +import data from './data'; +import { withResizableChartDemo } from '../../../../shared/components/ResizableChartDemo'; + +new AntdSelectFilterPlugin().configure({ key: 'filter_select' }).register(); + +getChartTransformPropsRegistry().registerValue('filter_select', transformProps); + +export default { + title: 'Filter Plugins|plugin-filter-antd/Select', + decorators: [withResizableChartDemo], +}; + +export const Select = ({ width, height }) => { + return ( + + ); +}; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/data.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/data.ts new file mode 100644 index 000000000000..c2e5fa07083a --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-filter-antd/Select/data.ts @@ -0,0 +1,216 @@ +export default [ + { country_name: 'Afghanistan', 'SUM(SP_POP_TOTL)': 887557752 }, + { country_name: 'Albania', 'SUM(SP_POP_TOTL)': 148154320 }, + { country_name: 'Algeria', 'SUM(SP_POP_TOTL)': 1317290647 }, + { country_name: 'American Samoa', 'SUM(SP_POP_TOTL)': 2294886 }, + { country_name: 'Andorra', 'SUM(SP_POP_TOTL)': 2704725 }, + { country_name: 'Angola', 'SUM(SP_POP_TOTL)': 641906296 }, + { country_name: 'Antigua and Barbuda', 'SUM(SP_POP_TOTL)': 3887170 }, + { country_name: 'Argentina', 'SUM(SP_POP_TOTL)': 1728332290 }, + { country_name: 'Armenia', 'SUM(SP_POP_TOTL)': 160782905 }, + { country_name: 'Aruba', 'SUM(SP_POP_TOTL)': 4048374 }, + { country_name: 'Australia', 'SUM(SP_POP_TOTL)': 903260509 }, + { country_name: 'Austria', 'SUM(SP_POP_TOTL)': 426785647 }, + { country_name: 'Azerbaijan', 'SUM(SP_POP_TOTL)': 374210660 }, + { country_name: 'Bahamas, The', 'SUM(SP_POP_TOTL)': 13446111 }, + { country_name: 'Bahrain', 'SUM(SP_POP_TOTL)': 29724096 }, + { country_name: 'Bangladesh', 'SUM(SP_POP_TOTL)': 5549261462 }, + { country_name: 'Barbados', 'SUM(SP_POP_TOTL)': 14146501 }, + { country_name: 'Belarus', 'SUM(SP_POP_TOTL)': 524490000 }, + { country_name: 'Belgium', 'SUM(SP_POP_TOTL)': 551921585 }, + { country_name: 'Belize', 'SUM(SP_POP_TOTL)': 10571460 }, + { country_name: 'Benin', 'SUM(SP_POP_TOTL)': 290736360 }, + { country_name: 'Bermuda', 'SUM(SP_POP_TOTL)': 3159267 }, + { country_name: 'Bhutan', 'SUM(SP_POP_TOTL)': 25987074 }, + { country_name: 'Bolivia', 'SUM(SP_POP_TOTL)': 368308373 }, + { country_name: 'Bosnia and Herzegovina', 'SUM(SP_POP_TOTL)': 215521543 }, + { country_name: 'Botswana', 'SUM(SP_POP_TOTL)': 70510085 }, + { country_name: 'Brazil', 'SUM(SP_POP_TOTL)': 7752058955 }, + { country_name: 'Brunei Darussalam', 'SUM(SP_POP_TOTL)': 13322318 }, + { country_name: 'Bulgaria', 'SUM(SP_POP_TOTL)': 456247765 }, + { country_name: 'Burkina Faso', 'SUM(SP_POP_TOTL)': 505122912 }, + { country_name: 'Burundi', 'SUM(SP_POP_TOTL)': 305731834 }, + { country_name: 'Cabo Verde', 'SUM(SP_POP_TOTL)': 19178461 }, + { country_name: 'Cambodia', 'SUM(SP_POP_TOTL)': 523555378 }, + { country_name: 'Cameroon', 'SUM(SP_POP_TOTL)': 664127790 }, + { country_name: 'Canada', 'SUM(SP_POP_TOTL)': 1470276931 }, + { country_name: 'Cayman Islands', 'SUM(SP_POP_TOTL)': 1480956 }, + { country_name: 'Central African Republic', 'SUM(SP_POP_TOTL)': 158650217 }, + { country_name: 'Chad', 'SUM(SP_POP_TOTL)': 355875809 }, + { country_name: 'Channel Islands', 'SUM(SP_POP_TOTL)': 7515697 }, + { country_name: 'Chile', 'SUM(SP_POP_TOTL)': 696739897 }, + { country_name: 'China', 'SUM(SP_POP_TOTL)': 58345455000 }, + { country_name: 'Colombia', 'SUM(SP_POP_TOTL)': 1776189608 }, + { country_name: 'Comoros', 'SUM(SP_POP_TOTL)': 22692936 }, + { country_name: 'Congo, Dem. Rep.', 'SUM(SP_POP_TOTL)': 2015439254 }, + { country_name: 'Congo, Rep.', 'SUM(SP_POP_TOTL)': 130701144 }, + { country_name: 'Costa Rica', 'SUM(SP_POP_TOTL)': 163515714 }, + { country_name: "Cote d'Ivoire", 'SUM(SP_POP_TOTL)': 634194484 }, + { country_name: 'Croatia', 'SUM(SP_POP_TOTL)': 246197511 }, + { country_name: 'Cuba', 'SUM(SP_POP_TOTL)': 550461345 }, + { country_name: 'Curacao', 'SUM(SP_POP_TOTL)': 7898637 }, + { country_name: 'Cyprus', 'SUM(SP_POP_TOTL)': 43711039 }, + { country_name: 'Czech Republic', 'SUM(SP_POP_TOTL)': 559416359 }, + { country_name: 'Denmark', 'SUM(SP_POP_TOTL)': 283435789 }, + { country_name: 'Djibouti', 'SUM(SP_POP_TOTL)': 26324244 }, + { country_name: 'Dominica', 'SUM(SP_POP_TOTL)': 3881071 }, + { country_name: 'Dominican Republic', 'SUM(SP_POP_TOTL)': 373939753 }, + { country_name: 'Ecuador', 'SUM(SP_POP_TOTL)': 537148542 }, + { country_name: 'Egypt, Arab Rep.', 'SUM(SP_POP_TOTL)': 2967887581 }, + { country_name: 'El Salvador', 'SUM(SP_POP_TOTL)': 266413287 }, + { country_name: 'Equatorial Guinea', 'SUM(SP_POP_TOTL)': 22627794 }, + { country_name: 'Eritrea', 'SUM(SP_POP_TOTL)': 161125877 }, + { country_name: 'Estonia', 'SUM(SP_POP_TOTL)': 77119567 }, + { country_name: 'Ethiopia', 'SUM(SP_POP_TOTL)': 2750952916 }, + { country_name: 'Faeroe Islands', 'SUM(SP_POP_TOTL)': 2399439 }, + { country_name: 'Fiji', 'SUM(SP_POP_TOTL)': 37505227 }, + { country_name: 'Finland', 'SUM(SP_POP_TOTL)': 271585488 }, + { country_name: 'France', 'SUM(SP_POP_TOTL)': 3151638853 }, + { country_name: 'French Polynesia', 'SUM(SP_POP_TOTL)': 9974982 }, + { country_name: 'Gabon', 'SUM(SP_POP_TOTL)': 52489952 }, + { country_name: 'Gambia, The', 'SUM(SP_POP_TOTL)': 50232086 }, + { country_name: 'Georgia', 'SUM(SP_POP_TOTL)': 241070850 }, + { country_name: 'Germany', 'SUM(SP_POP_TOTL)': 4361793335 }, + { country_name: 'Ghana', 'SUM(SP_POP_TOTL)': 801844889 }, + { country_name: 'Greece', 'SUM(SP_POP_TOTL)': 547065293 }, + { country_name: 'Greenland', 'SUM(SP_POP_TOTL)': 2807533 }, + { country_name: 'Grenada', 'SUM(SP_POP_TOTL)': 5366107 }, + { country_name: 'Guam', 'SUM(SP_POP_TOTL)': 6647797 }, + { country_name: 'Guatemala', 'SUM(SP_POP_TOTL)': 498361800 }, + { country_name: 'Guinea', 'SUM(SP_POP_TOTL)': 362469063 }, + { country_name: 'Guinea-Bissau', 'SUM(SP_POP_TOTL)': 58400669 }, + { country_name: 'Guyana', 'SUM(SP_POP_TOTL)': 39868752 }, + { country_name: 'Haiti', 'SUM(SP_POP_TOTL)': 377521290 }, + { country_name: 'Honduras', 'SUM(SP_POP_TOTL)': 257791863 }, + { country_name: 'Hong Kong SAR, China', 'SUM(SP_POP_TOTL)': 298353905 }, + { country_name: 'Hungary', 'SUM(SP_POP_TOTL)': 566995908 }, + { country_name: 'Iceland', 'SUM(SP_POP_TOTL)': 13716537 }, + { country_name: 'India', 'SUM(SP_POP_TOTL)': 46023037597 }, + { country_name: 'Indonesia', 'SUM(SP_POP_TOTL)': 9357861231 }, + { country_name: 'Iran, Islamic Rep.', 'SUM(SP_POP_TOTL)': 2717528355 }, + { country_name: 'Iraq', 'SUM(SP_POP_TOTL)': 983604177 }, + { country_name: 'Ireland', 'SUM(SP_POP_TOTL)': 196019322 }, + { country_name: 'Isle of Man', 'SUM(SP_POP_TOTL)': 3728525 }, + { country_name: 'Israel', 'SUM(SP_POP_TOTL)': 263866720 }, + { country_name: 'Italy', 'SUM(SP_POP_TOTL)': 3082869665 }, + { country_name: 'Jamaica', 'SUM(SP_POP_TOTL)': 124779119 }, + { country_name: 'Japan', 'SUM(SP_POP_TOTL)': 6454620759 }, + { country_name: 'Jordan', 'SUM(SP_POP_TOTL)': 180850641 }, + { country_name: 'Kazakhstan', 'SUM(SP_POP_TOTL)': 797168043 }, + { country_name: 'Kenya', 'SUM(SP_POP_TOTL)': 1253201109 }, + { country_name: 'Kiribati', 'SUM(SP_POP_TOTL)': 3874990 }, + { country_name: 'Korea, Dem. Rep.', 'SUM(SP_POP_TOTL)': 1047335229 }, + { country_name: 'Korea, Rep.', 'SUM(SP_POP_TOTL)': 2216456927 }, + { country_name: 'Kosovo', 'SUM(SP_POP_TOTL)': 86627232 }, + { country_name: 'Kuwait', 'SUM(SP_POP_TOTL)': 84737006 }, + { country_name: 'Kyrgyz Republic', 'SUM(SP_POP_TOTL)': 222809200 }, + { country_name: 'Lao PDR', 'SUM(SP_POP_TOTL)': 227340983 }, + { country_name: 'Latvia', 'SUM(SP_POP_TOTL)': 130544986 }, + { country_name: 'Lebanon', 'SUM(SP_POP_TOTL)': 162031498 }, + { country_name: 'Lesotho', 'SUM(SP_POP_TOTL)': 81971241 }, + { country_name: 'Liberia', 'SUM(SP_POP_TOTL)': 125666085 }, + { country_name: 'Libya', 'SUM(SP_POP_TOTL)': 217716251 }, + { country_name: 'Liechtenstein', 'SUM(SP_POP_TOTL)': 1527171 }, + { country_name: 'Lithuania', 'SUM(SP_POP_TOTL)': 182416949 }, + { country_name: 'Luxembourg', 'SUM(SP_POP_TOTL)': 21852156 }, + { country_name: 'Macao SAR, China', 'SUM(SP_POP_TOTL)': 18882494 }, + { country_name: 'Macedonia, FYR', 'SUM(SP_POP_TOTL)': 104100695 }, + { country_name: 'Madagascar', 'SUM(SP_POP_TOTL)': 656478313 }, + { country_name: 'Malawi', 'SUM(SP_POP_TOTL)': 470725354 }, + { country_name: 'Malaysia', 'SUM(SP_POP_TOTL)': 978122682 }, + { country_name: 'Maldives', 'SUM(SP_POP_TOTL)': 11478624 }, + { country_name: 'Mali', 'SUM(SP_POP_TOTL)': 500758830 }, + { country_name: 'Malta', 'SUM(SP_POP_TOTL)': 19363458 }, + { country_name: 'Marshall Islands', 'SUM(SP_POP_TOTL)': 2086174 }, + { country_name: 'Mauritania', 'SUM(SP_POP_TOTL)': 113489314 }, + { country_name: 'Mauritius', 'SUM(SP_POP_TOTL)': 56066051 }, + { country_name: 'Mexico', 'SUM(SP_POP_TOTL)': 4444653964 }, + { country_name: 'Micronesia, Fed. Sts.', 'SUM(SP_POP_TOTL)': 4627492 }, + { country_name: 'Moldova', 'SUM(SP_POP_TOTL)': 186156257 }, + { country_name: 'Monaco', 'SUM(SP_POP_TOTL)': 1595554 }, + { country_name: 'Mongolia', 'SUM(SP_POP_TOTL)': 106717826 }, + { country_name: 'Montenegro', 'SUM(SP_POP_TOTL)': 31652512 }, + { country_name: 'Morocco', 'SUM(SP_POP_TOTL)': 1277441301 }, + { country_name: 'Mozambique', 'SUM(SP_POP_TOTL)': 807229371 }, + { country_name: 'Myanmar', 'SUM(SP_POP_TOTL)': 2126848982 }, + { country_name: 'Namibia', 'SUM(SP_POP_TOTL)': 75238033 }, + { country_name: 'Nepal', 'SUM(SP_POP_TOTL)': 1007162709 }, + { country_name: 'Netherlands', 'SUM(SP_POP_TOTL)': 803013980 }, + { country_name: 'New Caledonia', 'SUM(SP_POP_TOTL)': 9225822 }, + { country_name: 'New Zealand', 'SUM(SP_POP_TOTL)': 187593600 }, + { country_name: 'Nicaragua', 'SUM(SP_POP_TOTL)': 213048662 }, + { country_name: 'Niger', 'SUM(SP_POP_TOTL)': 471910464 }, + { country_name: 'Nigeria', 'SUM(SP_POP_TOTL)': 5259800493 }, + { country_name: 'Northern Mariana Islands', 'SUM(SP_POP_TOTL)': 2015842 }, + { country_name: 'Norway', 'SUM(SP_POP_TOTL)': 233337059 }, + { country_name: 'Oman', 'SUM(SP_POP_TOTL)': 93132249 }, + { country_name: 'Pakistan', 'SUM(SP_POP_TOTL)': 5696041480 }, + { country_name: 'Palau', 'SUM(SP_POP_TOTL)': 833299 }, + { country_name: 'Panama', 'SUM(SP_POP_TOTL)': 130974461 }, + { country_name: 'Papua New Guinea', 'SUM(SP_POP_TOTL)': 228299012 }, + { country_name: 'Paraguay', 'SUM(SP_POP_TOTL)': 221768661 }, + { country_name: 'Peru', 'SUM(SP_POP_TOTL)': 1121937313 }, + { country_name: 'Philippines', 'SUM(SP_POP_TOTL)': 3272015554 }, + { country_name: 'Poland', 'SUM(SP_POP_TOTL)': 1976772515 }, + { country_name: 'Portugal', 'SUM(SP_POP_TOTL)': 536945679 }, + { country_name: 'Puerto Rico', 'SUM(SP_POP_TOTL)': 181515497 }, + { country_name: 'Qatar', 'SUM(SP_POP_TOTL)': 30075210 }, + { country_name: 'Romania', 'SUM(SP_POP_TOTL)': 1171333228 }, + { country_name: 'Russian Federation', 'SUM(SP_POP_TOTL)': 7667188460 }, + { country_name: 'Rwanda', 'SUM(SP_POP_TOTL)': 347121852 }, + { country_name: 'Samoa', 'SUM(SP_POP_TOTL)': 8770470 }, + { country_name: 'San Marino', 'SUM(SP_POP_TOTL)': 1298411 }, + { country_name: 'Sao Tome and Principe', 'SUM(SP_POP_TOTL)': 6169644 }, + { country_name: 'Saudi Arabia', 'SUM(SP_POP_TOTL)': 828451525 }, + { country_name: 'Senegal', 'SUM(SP_POP_TOTL)': 414475224 }, + { country_name: 'Serbia', 'SUM(SP_POP_TOTL)': 186596480 }, + { country_name: 'Seychelles', 'SUM(SP_POP_TOTL)': 3761184 }, + { country_name: 'Sierra Leone', 'SUM(SP_POP_TOTL)': 203443826 }, + { country_name: 'Singapore', 'SUM(SP_POP_TOTL)': 173168000 }, + { country_name: 'Sint Maarten (Dutch part)', 'SUM(SP_POP_TOTL)': 597781 }, + { country_name: 'Slovak Republic', 'SUM(SP_POP_TOTL)': 276228375 }, + { country_name: 'Slovenia', 'SUM(SP_POP_TOTL)': 104119695 }, + { country_name: 'Solomon Islands', 'SUM(SP_POP_TOTL)': 16859526 }, + { country_name: 'Somalia', 'SUM(SP_POP_TOTL)': 332677926 }, + { country_name: 'South Africa', 'SUM(SP_POP_TOTL)': 1871083248 }, + { country_name: 'South Sudan', 'SUM(SP_POP_TOTL)': 319024522 }, + { country_name: 'Spain', 'SUM(SP_POP_TOTL)': 2115316751 }, + { country_name: 'Sri Lanka', 'SUM(SP_POP_TOTL)': 881137000 }, + { country_name: 'St. Kitts and Nevis', 'SUM(SP_POP_TOTL)': 2535482 }, + { country_name: 'St. Lucia', 'SUM(SP_POP_TOTL)': 7336842 }, + { country_name: 'St. Martin (French part)', 'SUM(SP_POP_TOTL)': 1020457 }, + { country_name: 'St. Vincent and the Grenadines', 'SUM(SP_POP_TOTL)': 5557117 }, + { country_name: 'Sudan', 'SUM(SP_POP_TOTL)': 1118903636 }, + { country_name: 'Suriname', 'SUM(SP_POP_TOTL)': 22687861 }, + { country_name: 'Swaziland', 'SUM(SP_POP_TOTL)': 42858935 }, + { country_name: 'Sweden', 'SUM(SP_POP_TOTL)': 468210684 }, + { country_name: 'Switzerland', 'SUM(SP_POP_TOTL)': 369360744 }, + { country_name: 'Syrian Arab Republic', 'SUM(SP_POP_TOTL)': 663924524 }, + { country_name: 'Tajikistan', 'SUM(SP_POP_TOTL)': 267603756 }, + { country_name: 'Tanzania', 'SUM(SP_POP_TOTL)': 1413734053 }, + { country_name: 'Thailand', 'SUM(SP_POP_TOTL)': 2827157965 }, + { country_name: 'Timor-Leste', 'SUM(SP_POP_TOTL)': 41694123 }, + { country_name: 'Togo', 'SUM(SP_POP_TOTL)': 204624027 }, + { country_name: 'Tonga', 'SUM(SP_POP_TOTL)': 5038574 }, + { country_name: 'Trinidad and Tobago', 'SUM(SP_POP_TOTL)': 62771502 }, + { country_name: 'Tunisia', 'SUM(SP_POP_TOTL)': 415992799 }, + { country_name: 'Turkey', 'SUM(SP_POP_TOTL)': 2805220683 }, + { country_name: 'Turkmenistan', 'SUM(SP_POP_TOTL)': 189687365 }, + { country_name: 'Turks and Caicos Islands', 'SUM(SP_POP_TOTL)': 775185 }, + { country_name: 'Tuvalu', 'SUM(SP_POP_TOTL)': 466709 }, + { country_name: 'Uganda', 'SUM(SP_POP_TOTL)': 987376102 }, + { country_name: 'Ukraine', 'SUM(SP_POP_TOTL)': 2657782543 }, + { country_name: 'United Arab Emirates', 'SUM(SP_POP_TOTL)': 134952923 }, + { country_name: 'United Kingdom', 'SUM(SP_POP_TOTL)': 3169118137 }, + { country_name: 'United States', 'SUM(SP_POP_TOTL)': 13604468357 }, + { country_name: 'Uruguay', 'SUM(SP_POP_TOTL)': 167612670 }, + { country_name: 'Uzbekistan', 'SUM(SP_POP_TOTL)': 1053380227 }, + { country_name: 'Vanuatu', 'SUM(SP_POP_TOTL)': 7966814 }, + { country_name: 'Venezuela, RB', 'SUM(SP_POP_TOTL)': 1036057583 }, + { country_name: 'Vietnam', 'SUM(SP_POP_TOTL)': 3420037000 }, + { country_name: 'Virgin Islands (U.S.)', 'SUM(SP_POP_TOTL)': 5006756 }, + { country_name: 'West Bank and Gaza', 'SUM(SP_POP_TOTL)': 77390117 }, + { country_name: 'Yemen, Rep.', 'SUM(SP_POP_TOTL)': 695646128 }, + { country_name: 'Zambia', 'SUM(SP_POP_TOTL)': 438847085 }, + { country_name: 'Zimbabwe', 'SUM(SP_POP_TOTL)': 509866860 }, +]; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/README.md b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/README.md new file mode 100644 index 000000000000..5f8347804f0b --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/README.md @@ -0,0 +1,35 @@ +## @superset-ui/plugin-filter-antd + +[![Version](https://img.shields.io/npm/v/@superset-ui/plugin-filter-antd.svg?style=flat-square)](https://www.npmjs.com/package/@superset-ui/plugin-filter-antd) + +This plugin provides native filter plugins based on AntD. + +### Usage + +Configure `key`, which can be any `string`, and register the plugin. This `key` will be used to lookup this chart throughout the app. + +Below is an example of how to use the Select filter plugin. + +```js +import { AntdFilterSelectPlugin } from '@superset-ui/plugin-filter-antd'; + +new AntdFilterSelectPlugin() + .configure({ key: 'plugin-filter-select' }) + .register(); +``` + +Then use it via `SuperChart`. + +```js + console.log(extraFormData) }, + }} +/> +``` diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/package.json b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/package.json new file mode 100644 index 000000000000..8714465194a7 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/package.json @@ -0,0 +1,40 @@ +{ + "name": "@superset-ui/plugin-filter-antd", + "version": "0.0.0", + "description": "Superset Filter - Plugin Filter AntD", + "sideEffects": false, + "main": "lib/index.js", + "module": "esm/index.js", + "files": [ + "esm", + "lib" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/apache-superset/superset-ui.git" + }, + "keywords": [ + "superset" + ], + "author": "Superset", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/apache-superset/superset-ui/issues" + }, + "homepage": "https://github.com/apache-superset/superset-ui#readme", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@superset-ui/chart-controls": "^0.15.13", + "@superset-ui/core": "^0.15.13", + "antd": "^4.9.1" + }, + "peerDependencies": { + "react": "^16.13.1" + }, + "devDependencies": { + "@types/jest": "^26.0.0", + "jest": "^26.0.1" + } +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/AntdRangeFilter.tsx b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/AntdRangeFilter.tsx new file mode 100644 index 000000000000..62cf2810e554 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/AntdRangeFilter.tsx @@ -0,0 +1,55 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { QueryObjectFilterClause, styled } from '@superset-ui/core'; +import React from 'react'; +import { Slider } from 'antd'; +import { AntdPluginFilterRangeProps } from './types'; +import { AntdPluginFilterStylesProps } from '../types'; + +const Styles = styled.div` + height: ${({ height }) => height}; + width: ${({ width }) => width}; +`; + +export default function AntdRangeFilter(props: AntdPluginFilterRangeProps) { + const { data, formData, height, width, setExtraFormData } = props; + const [row] = data; + // @ts-ignore + const { min, max }: { min: number; max: number } = row; + const { groupby } = formData; + const [col] = groupby || []; + + const handleChange = (value: [number, number]) => { + const [lower, upper] = value; + const filters: QueryObjectFilterClause[] = []; + if (lower !== undefined && lower !== null) filters.push({ col, op: '>=', val: lower }); + if (upper !== undefined && upper !== null) filters.push({ col, op: '>=', val: upper }); + setExtraFormData({ + append_form_data: { + filters, + }, + }); + }; + + return ( + + + + ); +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/buildQuery.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/buildQuery.ts new file mode 100644 index 000000000000..cf98d7f5b66c --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/buildQuery.ts @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { buildQueryContext, ColumnType, QueryFormData } from '@superset-ui/core'; + +/** + * The buildQuery function is used to create an instance of QueryContext that's + * sent to the chart data endpoint. In addition to containing information of which + * datasource to use, it specifies the type (e.g. full payload, samples, query) and + * format (e.g. CSV or JSON) of the result and whether or not to force refresh the data from + * the datasource as opposed to using a cached copy of the data, if available. + * + * More importantly though, QueryContext contains a property `queries`, which is an array of + * QueryObjects specifying individual data requests to be made. A QueryObject specifies which + * columns, metrics and filters, among others, to use during the query. Usually it will be enough + * to specify just one query based on the baseQueryObject, but for some more advanced use cases + * it is possible to define post processing operations in the QueryObject, or multiple queries + * if a viz needs multiple different result sets. + */ +export default function buildQuery(formData: QueryFormData) { + const { groupby } = formData; + const [column] = groupby || []; + return buildQueryContext(formData, baseQueryObject => { + return [ + { + ...baseQueryObject, + groupby: [], + metrics: [ + { + aggregate: 'MIN', + column: { + columnName: column, + id: 1, + type: ColumnType.FLOAT, + }, + expressionType: 'SIMPLE', + hasCustomLabel: true, + label: 'min', + }, + { + aggregate: 'MAX', + column: { + columnName: column, + id: 2, + type: ColumnType.FLOAT, + }, + expressionType: 'SIMPLE', + hasCustomLabel: true, + label: 'max', + }, + ], + }, + ]; + }); +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/controlPanel.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/controlPanel.ts new file mode 100644 index 000000000000..604948e37571 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/controlPanel.ts @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { t, validateNonEmpty } from '@superset-ui/core'; +import { ControlPanelConfig } from '@superset-ui/chart-controls'; + +const config: ControlPanelConfig = { + // For control input types, see: superset-frontend/src/explore/components/controls/index.js + controlPanelSections: [ + { + label: t('Query'), + expanded: true, + controlSetRows: [['groupby'], ['adhoc_filters']], + }, + ], + controlOverrides: { + groupby: { + validators: [validateNonEmpty], + clearable: false, + }, + row_limit: { + default: 100, + }, + }, +}; + +export default config; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/images/thumbnail.png b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/images/thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..7afef30bd4e6e4f85723208bf9f429647d03d3e5 GIT binary patch literal 5658 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 literal 0 HcmV?d00001 diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/index.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/index.ts new file mode 100644 index 000000000000..4a77fbb97c41 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/index.ts @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import buildQuery from './buildQuery'; +import controlPanel from './controlPanel'; +import transformProps from './transformProps'; +import thumbnail from './images/thumbnail.png'; + +export default class AntdRangeFilterPlugin extends ChartPlugin { + constructor() { + const metadata = new ChartMetadata({ + name: t('Range Filter Plugin'), + description: 'Range Filter Plugin using AntD', + isNativeFilter: true, + thumbnail, + }); + + super({ + buildQuery, + controlPanel, + loadChart: () => import('./AntdRangeFilter'), + metadata, + transformProps, + }); + } +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/transformProps.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/transformProps.ts new file mode 100644 index 000000000000..5736f1660353 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/transformProps.ts @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { ChartProps, DataRecord } from '@superset-ui/core'; + +export default function transformProps(chartProps: ChartProps) { + const { formData, height, hooks, queryData, width } = chartProps; + const { setExtraFormData } = hooks; + const data = queryData.data as DataRecord[]; + + return { + data, + formData, + height, + setExtraFormData, + width, + }; +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/types.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/types.ts new file mode 100644 index 000000000000..e095c364b2b4 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Range/types.ts @@ -0,0 +1,35 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { DataRecord, QueryFormData, SetExtraFormDataHook } from '@superset-ui/core'; +import { AntdPluginFilterStylesProps } from '../types'; + +interface AntdPluginFilterSelectCustomizeProps { + max?: number; + min?: number; +} + +export type PluginFilterRangeQueryFormData = QueryFormData & + AntdPluginFilterStylesProps & + AntdPluginFilterSelectCustomizeProps; + +export type AntdPluginFilterRangeProps = AntdPluginFilterStylesProps & { + data: DataRecord[]; + formData: PluginFilterRangeQueryFormData; + setExtraFormData: SetExtraFormDataHook; +}; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/AntdSelectFilter.tsx b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/AntdSelectFilter.tsx new file mode 100644 index 000000000000..a65dfd1d2f0c --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/AntdSelectFilter.tsx @@ -0,0 +1,104 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { styled } from '@superset-ui/core'; +import React, { useEffect, useState } from 'react'; +import { Select } from 'antd'; +import { DEFAULT_FORM_DATA, AntdPluginFilterSelectProps } from './types'; +import { AntdPluginFilterStylesProps } from '../types'; + +const Styles = styled.div` + height: ${({ height }) => height}; + width: ${({ width }) => width}; +`; + +const { Option } = Select; + +export default function AntdPluginFilterSelect(props: AntdPluginFilterSelectProps) { + const [values, setValues] = useState<(string | number)[]>([]); + const DELIMITER = '!^&@%#*!@'; + const { data, formData, height, width, setExtraFormData } = props; + const { defaultValues, enableEmptyFilter, multiSelect, showSearch, inverseSelection } = { + ...DEFAULT_FORM_DATA, + ...formData, + }; + + useEffect(() => { + setValues(defaultValues || []); + }, [defaultValues]); + + let { groupby = [] } = formData; + groupby = Array.isArray(groupby) ? groupby : [groupby]; + + function handleChange(value?: number[] | string[] | null) { + setValues(value || []); + const [col] = groupby; + const emptyFilter = + enableEmptyFilter && + !inverseSelection && + (value === undefined || value === null || value.length === 0); + console.log(enableEmptyFilter, emptyFilter); + setExtraFormData({ + append_form_data: emptyFilter + ? { + extras: { + where: '1 = 0', + }, + } + : { + filters: + value === undefined || value === null || value.length === 0 + ? [] + : [ + { + col, + op: inverseSelection ? 'NOT IN' : 'IN', + val: value, + }, + ], + }, + }); + } + const placeholderText = + (data || []).length === 0 ? 'No data' : `${data.length} option${data.length > 1 ? 's' : 0}`; + return ( + + + + ); +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/buildQuery.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/buildQuery.ts new file mode 100644 index 000000000000..cc5447225bf6 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/buildQuery.ts @@ -0,0 +1,43 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { buildQueryContext, QueryFormData } from '@superset-ui/core'; + +/** + * The buildQuery function is used to create an instance of QueryContext that's + * sent to the chart data endpoint. In addition to containing information of which + * datasource to use, it specifies the type (e.g. full payload, samples, query) and + * format (e.g. CSV or JSON) of the result and whether or not to force refresh the data from + * the datasource as opposed to using a cached copy of the data, if available. + * + * More importantly though, QueryContext contains a property `queries`, which is an array of + * QueryObjects specifying individual data requests to be made. A QueryObject specifies which + * columns, metrics and filters, among others, to use during the query. Usually it will be enough + * to specify just one query based on the baseQueryObject, but for some more advanced use cases + * it is possible to define post processing operations in the QueryObject, or multiple queries + * if a viz needs multiple different result sets. + */ +export default function buildQuery(formData: QueryFormData) { + return buildQueryContext(formData, baseQueryObject => { + return [ + { + ...baseQueryObject, + }, + ]; + }); +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/controlPanel.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/controlPanel.ts new file mode 100644 index 000000000000..2016ba35a582 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/controlPanel.ts @@ -0,0 +1,112 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { t, validateNonEmpty } from '@superset-ui/core'; +import { ControlPanelConfig } from '@superset-ui/chart-controls'; +import { DEFAULT_FORM_DATA } from './types'; + +const { + enableEmptyFilter, + fetchPredicate, + inverseSelection, + multiSelect, + showSearch, +} = DEFAULT_FORM_DATA; + +const config: ControlPanelConfig = { + controlPanelSections: [ + { + label: t('Query'), + expanded: true, + controlSetRows: [ + ['groupby'], + ['metrics'], + ['adhoc_filters'], + [ + { + name: 'multiSelect', + config: { + type: 'CheckboxControl', + label: t('Multiple Select'), + default: multiSelect, + description: t('Allow selecting multiple values'), + }, + }, + ], + [ + { + name: 'enableEmptyFilter', + config: { + type: 'CheckboxControl', + label: t('Enable Empty Filter'), + default: enableEmptyFilter, + description: t( + 'When selection is empty, should an always false filter event be emitted', + ), + }, + }, + ], + [ + { + name: 'inverseSelection', + config: { + type: 'CheckboxControl', + label: t('Inverse Selection'), + default: inverseSelection, + description: t('Exclude selected values'), + }, + }, + ], + [ + { + name: 'showSearch', + config: { + type: 'CheckboxControl', + label: t('Search Field'), + default: showSearch, + description: t('Allow typing search terms'), + }, + }, + ], + [ + { + name: 'fetchPredicate', + config: { + type: 'TextControl', + label: t('Fetch predicate'), + default: fetchPredicate, + description: t( + 'Predicate applied when fetching distinct value to populate the filter control component.', + ), + }, + }, + null, + ], + ['row_limit', null], + ], + }, + ], + controlOverrides: { + groupby: { + multi: false, + validators: [validateNonEmpty], + }, + }, +}; + +export default config; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/images/thumbnail.png b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/images/thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..7afef30bd4e6e4f85723208bf9f429647d03d3e5 GIT binary patch literal 5658 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 literal 0 HcmV?d00001 diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/index.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/index.ts new file mode 100644 index 000000000000..f0d05c373924 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/index.ts @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import buildQuery from './buildQuery'; +import controlPanel from './controlPanel'; +import transformProps from './transformProps'; +import thumbnail from './images/thumbnail.png'; + +export default class AntdFilterSelectPlugin extends ChartPlugin { + constructor() { + const metadata = new ChartMetadata({ + name: t('Select Filter Plugin'), + description: 'Select Filter Plugin using AntD', + isNativeFilter: true, + thumbnail, + }); + + super({ + buildQuery, + controlPanel, + loadChart: () => import('./AntdSelectFilter'), + metadata, + transformProps, + }); + } +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/transformProps.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/transformProps.ts new file mode 100644 index 000000000000..f10994d24b04 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/transformProps.ts @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { ChartProps, DataRecord } from '@superset-ui/core'; +import { DEFAULT_FORM_DATA } from './types'; + +export default function transformProps(chartProps: ChartProps) { + const { formData, height, hooks, queryData, width } = chartProps; + const newFormData = { ...DEFAULT_FORM_DATA, ...formData }; + const { setExtraFormData = () => {} } = hooks; + const data = queryData.data as DataRecord[]; + + // console.log('formData via TransformProps.ts', formData); + return { + width, + height, + data, + formData: newFormData, + setExtraFormData, + }; +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/types.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/types.ts new file mode 100644 index 000000000000..f485685f9579 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/Select/types.ts @@ -0,0 +1,48 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { QueryFormData, DataRecord, SetExtraFormDataHook } from '@superset-ui/core'; +import { AntdPluginFilterStylesProps } from '../types'; + +interface AntdPluginFilterSelectCustomizeProps { + defaultValues?: (string | number)[]; + enableEmptyFilter: boolean; + fetchPredicate?: string; + inverseSelection: boolean; + multiSelect: boolean; + showSearch: boolean; +} + +export type AntdPluginFilterSelectQueryFormData = QueryFormData & + AntdPluginFilterStylesProps & + AntdPluginFilterSelectCustomizeProps; + +export type AntdPluginFilterSelectProps = AntdPluginFilterStylesProps & { + data: DataRecord[]; + setExtraFormData: SetExtraFormDataHook; + formData: AntdPluginFilterSelectQueryFormData; +}; + +export const DEFAULT_FORM_DATA: AntdPluginFilterSelectCustomizeProps = { + defaultValues: [], + enableEmptyFilter: false, + fetchPredicate: '', + inverseSelection: false, + multiSelect: true, + showSearch: true, +}; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/index.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/index.ts new file mode 100644 index 000000000000..fadaf1cdec12 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/index.ts @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +export { default as AntdSelectFilterPlugin } from './Select'; +export { default as AntdRangeFilterPlugin } from './Range'; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/types.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/types.ts new file mode 100644 index 000000000000..869dc79e3216 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/src/types.ts @@ -0,0 +1,22 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +export interface AntdPluginFilterStylesProps { + height: number; + width: number; +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/test/index.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/test/index.test.ts new file mode 100644 index 000000000000..72fcfba90397 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/test/index.test.ts @@ -0,0 +1,34 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { AntdSelectFilterPlugin, AntdRangeFilterPlugin } from '../src'; + +/** + * The example tests in this file act as a starting point, and + * we encourage you to build more. These tests check that the + * plugin loads properly, and focus on `transformProps` + * to ake sure that data, controls, and props are all + * treated correctly (e.g. formData from plugin controls + * properly transform the data and/or any resulting props). + */ +describe('@superset-ui/plugin-filter-antd', () => { + it('exists', () => { + expect(AntdSelectFilterPlugin).toBeDefined(); + expect(AntdRangeFilterPlugin).toBeDefined(); + }); +}); diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/tsconfig.json b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/tsconfig.json new file mode 100644 index 000000000000..f164c580609c --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declarationDir": "lib", + "outDir": "lib", + "rootDir": "src" + }, + "exclude": [ + "lib", + "test" + ], + "extends": "../../tsconfig.options.json", + "include": [ + "src/**/*", + "types/**/*", + "../../types/**/*" + ], + "references": [ + { + "path": "../../packages/superset-ui-chart-controls" + }, + { + "path": "../../packages/superset-ui-core" + } + ] +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/types/external.d.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/types/external.d.ts new file mode 100644 index 000000000000..0935dbbd8066 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd/types/external.d.ts @@ -0,0 +1,4 @@ +declare module '*.png' { + const value: any; + export default value; +} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/yarn.lock b/superset-frontend/temporary_superset_ui/superset-ui/yarn.lock index d9cec9f4a68f..7860b1d815c3 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/yarn.lock +++ b/superset-frontend/temporary_superset_ui/superset-ui/yarn.lock @@ -106,6 +106,53 @@ enquirer "^2.3.4" execa "^4.0.0" +"@ant-design/colors@^3.1.0": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@ant-design/colors/-/colors-3.2.2.tgz#5ad43d619e911f3488ebac303d606e66a8423903" + integrity sha512-YKgNbG2dlzqMhA9NtI3/pbY16m3Yl/EeWBRa+lB1X1YaYxHrxNexiQYCLTWO/uDvAjLFMEDU+zR901waBtMtjQ== + dependencies: + tinycolor2 "^1.4.1" + +"@ant-design/colors@^4.0.5": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@ant-design/colors/-/colors-4.0.5.tgz#d7d100d7545cca8f624954604a6892fc48ba5aae" + integrity sha512-3mnuX2prnWOWvpFTS2WH2LoouWlOgtnIpc6IarWN6GOzzLF8dW/U8UctuvIPhoboETehZfJ61XP+CGakBEPJ3Q== + dependencies: + tinycolor2 "^1.4.1" + +"@ant-design/css-animation@^1.7.2": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@ant-design/css-animation/-/css-animation-1.7.3.tgz#60a1c970014e86b28f940510d69e503e428f1136" + integrity sha512-LrX0OGZtW+W6iLnTAqnTaoIsRelYeuLZWsrmBJFUXDALQphPsN8cE5DCsmoSlL0QYb94BQxINiuS70Ar/8BNgA== + +"@ant-design/icons-svg@^4.0.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@ant-design/icons-svg/-/icons-svg-4.1.0.tgz#480b025f4b20ef7fe8f47d4a4846e4fee84ea06c" + integrity sha512-Fi03PfuUqRs76aI3UWYpP864lkrfPo0hluwGqh7NJdLhvH4iRDc3jbJqZIvRDLHKbXrvAfPPV3+zjUccfFvWOQ== + +"@ant-design/icons@^4.2.1", "@ant-design/icons@^4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@ant-design/icons/-/icons-4.2.2.tgz#6533c5a02aec49238ec4748074845ad7d85a4f5e" + integrity sha512-DrVV+wcupnHS7PehJ6KiTcJtAR5c25UMgjGECCc6pUT9rsvw0AuYG+a4HDjfxEQuDqKTHwW+oX/nIvCymyLE8Q== + dependencies: + "@ant-design/colors" "^3.1.0" + "@ant-design/icons-svg" "^4.0.0" + "@babel/runtime" "^7.10.4" + classnames "^2.2.6" + insert-css "^2.0.0" + rc-util "^5.0.1" + +"@ant-design/react-slick@~0.27.0": + version "0.27.11" + resolved "https://registry.yarnpkg.com/@ant-design/react-slick/-/react-slick-0.27.11.tgz#ce788312ed8e64fcba2f7bb4556f47486b407c6e" + integrity sha512-KPJ1lleHW11bameFauI77Lb9N7O/4ulT1kplVdRQykWLv3oKVSGKVaekC3DM/Z0MYmKfCXCucpFnfgGMEHNM+w== + dependencies: + "@babel/runtime" "^7.10.4" + classnames "^2.2.5" + json2mq "^0.2.0" + lodash "^4.17.15" + resize-observer-polyfill "^1.5.0" + "@babel/cli@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.8.4.tgz#505fb053721a98777b2b175323ea4f090b7d3c1c" @@ -1131,6 +1178,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/standalone@^7.4.5": version "7.9.4" resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.9.4.tgz#078025ada03c3d8e60b4abfb042326ad9bfb035d" @@ -5328,6 +5382,13 @@ acorn@^7.1.0, acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== +add-dom-event-listener@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/add-dom-event-listener/-/add-dom-event-listener-1.1.0.tgz#6a92db3a0dd0abc254e095c0f1dc14acbbaae310" + integrity sha512-WCxx1ixHT0GQU9hb0KI/mhgRQhnU+U3GvwY6ZvVjYq8rsihIGoaIOUbY0yMPBxLH5MDtr0kz3fisWGNcbWW7Jw== + dependencies: + object-assign "4.x" + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -5507,6 +5568,58 @@ ansicolors@~0.2.1: resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" integrity sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8= +antd@^4.8.2: + version "4.8.2" + resolved "https://registry.yarnpkg.com/antd/-/antd-4.8.2.tgz#8cad882ddb5b18bafacd009cb0096f5b20c8a2f3" + integrity sha512-qxagKsiPVO+2rcAdX8WA3TPqiv5TS4FDGoaETVgCCln3x7ap1nqHkBC+Fr3CSNg8MxwQ+6m5BSBLcs5uDQg0Qw== + dependencies: + "@ant-design/colors" "^4.0.5" + "@ant-design/css-animation" "^1.7.2" + "@ant-design/icons" "^4.2.1" + "@ant-design/react-slick" "~0.27.0" + "@babel/runtime" "^7.11.2" + array-tree-filter "^2.1.0" + classnames "^2.2.6" + copy-to-clipboard "^3.2.0" + lodash "^4.17.20" + moment "^2.25.3" + omit.js "^2.0.2" + raf "^3.4.1" + rc-animate "~3.1.0" + rc-cascader "~1.4.0" + rc-checkbox "~2.3.0" + rc-collapse "~2.0.0" + rc-dialog "~8.4.0" + rc-drawer "~4.1.0" + rc-dropdown "~3.2.0" + rc-field-form "~1.13.0" + rc-image "~4.0.0" + rc-input-number "~6.1.0" + rc-mentions "~1.5.0" + rc-menu "~8.8.2" + rc-motion "^2.2.0" + rc-notification "~4.5.2" + rc-pagination "~3.1.0" + rc-picker "~2.3.0" + rc-progress "~3.1.0" + rc-rate "~2.9.0" + rc-resize-observer "^0.2.3" + rc-select "~11.4.0" + rc-slider "~9.6.1" + rc-steps "~4.1.0" + rc-switch "~3.2.0" + rc-table "~7.11.0" + rc-tabs "~11.7.0" + rc-textarea "~0.3.0" + rc-tooltip "~5.0.0" + rc-tree "~3.11.0" + rc-tree-select "~4.1.1" + rc-trigger "~5.0.3" + rc-upload "~3.3.1" + rc-util "^5.1.0" + scroll-into-view-if-needed "^2.2.25" + warning "^4.0.3" + any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -5639,6 +5752,11 @@ array-includes@^3.0.3, array-includes@^3.1.1: es-abstract "^1.17.0" is-string "^1.0.5" +array-tree-filter@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-tree-filter/-/array-tree-filter-2.1.0.tgz#873ac00fec83749f255ac8dd083814b4f6329190" + integrity sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw== + array-union@^1.0.1, array-union@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -5775,6 +5893,11 @@ async-each@^1.0.1: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== +async-validator@^3.0.3: + version "3.4.1" + resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-3.4.1.tgz#ce1d72593925d55964b254a952d77a90f6e31697" + integrity sha512-Nq4Bh/XniZzPCmyXEs36R7FYg9erEspNDPOjSOeX9Axz49mWZaFgBF7TrvLlVOKb5waxmjC86i05ZunfiZ/t2Q== + async@^2.6.1, async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" @@ -7003,7 +7126,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@^2.2.4, classnames@^2.2.5: +classnames@2.x, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.4, classnames@^2.2.5, classnames@^2.2.6: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== @@ -7312,6 +7435,11 @@ component-emitter@^1.2.1: resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== +compute-scroll-into-view@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.16.tgz#5b7bf4f7127ea2c19b750353d7ce6776a90ee088" + integrity sha512-a85LHKY81oQnikatZYA90pufpZ6sQx++BoCxOEMsjpZx+ZnaKGQnCyCehTRr/1p9GBIAHTjcU9k71kSYWloLiQ== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -7645,7 +7773,7 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-to-clipboard@^3.0.8: +copy-to-clipboard@^3.0.8, copy-to-clipboard@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae" integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== @@ -8269,11 +8397,21 @@ datatables.net@1.10.21: dependencies: jquery ">=1.7" +date-fns@^2.15.0: + version "2.16.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.16.1.tgz#05775792c3f3331da812af253e1a935851d3834b" + integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ== + dateformat@^3.0.0, dateformat@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== +dayjs@^1.8.30: + version "1.9.6" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.9.6.tgz#6f0c77d76ac1ff63720dd1197e5cb87b67943d70" + integrity sha512-HngNLtPEBWRo8EFVmHFmSXAjtCX8rGNqeXQI0Gh7wCTSqwaKgPIDqu9m07wABVopNwzvOeCb+2711vQhDlcIXw== + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -8586,6 +8724,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-align@^1.7.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.12.0.tgz#56fb7156df0b91099830364d2d48f88963f5a29c" + integrity sha512-YkoezQuhp3SLFGdOlr5xkqZ640iXrnHAwVYcDg8ZKRUtO7mSzSC2BA5V0VuyAwPSJA4CLIc6EDDJh4bEsD2+zA== + dom-converter@^0.2: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" @@ -10965,7 +11108,7 @@ hoist-non-react-statics@^1.0.0, hoist-non-react-statics@^1.2.0: resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" integrity sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs= -hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -11466,6 +11609,11 @@ inquirer@^7.0.0, inquirer@^7.1.0: strip-ansi "^6.0.0" through "^2.3.6" +insert-css@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/insert-css/-/insert-css-2.0.0.tgz#eb5d1097b7542f4c79ea3060d3aee07d053880f4" + integrity sha1-610Ql7dUL0x56jBg067gfQU4gPQ= + internal-slot@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.2.tgz#9c2e9fb3cd8e5e4256c6f45fe310067fcfa378a3" @@ -12961,6 +13109,13 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= +json2mq@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/json2mq/-/json2mq-0.2.0.tgz#b637bd3ba9eabe122c83e9720483aeb10d2c904a" + integrity sha1-tje9O6nqvhIsg+lyBIOusQ0skEo= + dependencies: + string-convert "^0.2.0" + json3@^3.3.2: version "3.3.3" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" @@ -13401,7 +13556,7 @@ lodash@4.17.14: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== -lodash@^4.0.1, lodash@^4.0.8, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.2.1: +lodash@^4.0.1, lodash@^4.0.8, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.2.1: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== @@ -14000,6 +14155,14 @@ mini-css-extract-plugin@^0.7.0: schema-utils "^1.0.0" webpack-sources "^1.1.0" +mini-store@^3.0.1: + version "3.0.6" + resolved "https://registry.yarnpkg.com/mini-store/-/mini-store-3.0.6.tgz#44b86be5b2877271224ce0689b3a35a2dffb1ca9" + integrity sha512-YzffKHbYsMQGUWQRKdsearR79QsMzzJcDDmZKlJBqt5JNkqpyJHYlK6gP61O36X+sLf76sO9G6mhKBe83gIZIQ== + dependencies: + hoist-non-react-statics "^3.3.2" + shallowequal "^1.0.2" + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -14162,6 +14325,11 @@ moment@^2.15.1, moment@^2.20.1, moment@^2.24.0, moment@^2.26.0: resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d" integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== +moment@^2.25.3: + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + moo@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4" @@ -14633,7 +14801,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@4.x, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -14739,6 +14907,11 @@ octokit-pagination-methods@^1.1.0: resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== +omit.js@^2.0.0, omit.js@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/omit.js/-/omit.js-2.0.2.tgz#dd9b8436fab947a5f3ff214cb2538631e313ec2f" + integrity sha512-hJmu9D+bNB40YpL9jYebQl4lsTW6yEHRTroJzNLqQJYHm7c+NQnJGfZmIWh8S3q3KoaxV1aLhV6B3+0N0/kyJg== + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -15849,7 +16022,7 @@ r-json@^1.2.5: resolved "https://registry.yarnpkg.com/r-json/-/r-json-1.2.9.tgz#0637da3485b0b4492e9ffae85796f8b2f373f600" integrity sha512-E5u25XBE7PpZmH5XwtthAmNvSLMTygDQMpcPtCTUBdvwPaqgIYJrxlRQJhG55Sgz7uC0Tuyh5nqNrsDT3uiefA== -raf@^3.4.1: +raf@^3.4.0, raf@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== @@ -15912,6 +16085,401 @@ raw-loader@^3.1.0: loader-utils "^1.1.0" schema-utils "^2.0.1" +rc-align@^4.0.0: + version "4.0.9" + resolved "https://registry.yarnpkg.com/rc-align/-/rc-align-4.0.9.tgz#46d8801c4a139ff6a65ad1674e8efceac98f85f2" + integrity sha512-myAM2R4qoB6LqBul0leaqY8gFaiECDJ3MtQDmzDo9xM9NRT/04TvWOYd2YHU9zvGzqk9QXF6S9/MifzSKDZeMw== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + dom-align "^1.7.0" + rc-util "^5.3.0" + resize-observer-polyfill "^1.5.1" + +rc-animate@3.x, rc-animate@~3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/rc-animate/-/rc-animate-3.1.1.tgz#defdd863f56816c222534e4dc68feddecd081386" + integrity sha512-8wg2Zg3EETy0k/9kYuis30NJNQg1D6/WSQwnCiz6SvyxQXNet/rVraRz3bPngwY6rcU2nlRvoShiYOorXyF7Sg== + dependencies: + "@ant-design/css-animation" "^1.7.2" + classnames "^2.2.6" + raf "^3.4.0" + rc-util "^4.15.3" + +rc-cascader@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/rc-cascader/-/rc-cascader-1.4.0.tgz#d731ea8e07433558627941036091a2820e895474" + integrity sha512-6kgQljDQEKjVAVRkZtvvoi+2qv4u42M6oLuvt4ZDBa16r3X9ZN8TAq3atVyC840ivbGKlHT50OcdVx/iwiHc1w== + dependencies: + array-tree-filter "^2.1.0" + rc-trigger "^5.0.4" + rc-util "^5.0.1" + warning "^4.0.1" + +rc-checkbox@~2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/rc-checkbox/-/rc-checkbox-2.3.1.tgz#2a61bc43017c783bd2e9f1a67553bf8efe7aa4d3" + integrity sha512-i290/iTqmZ0WtI2UPIryqT9rW6O99+an4KeZIyZDH3r+Jbb6YdddaWNdzq7g5m9zaNhJvgjf//wJtC4fvve2Tg== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.1" + +rc-collapse@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/rc-collapse/-/rc-collapse-2.0.1.tgz#99e7655acd9c237b72369a39dcb5c713451e1e92" + integrity sha512-sRNqwQovzQoptTh7dCwj3kfxrdor2oNXrGSBz+QJxSFS7N3Ujgf8X/KlN2ElCkwBKf7nNv36t9dwH0HEku4wJg== + dependencies: + "@ant-design/css-animation" "^1.7.2" + classnames "2.x" + rc-animate "3.x" + rc-util "^5.2.1" + shallowequal "^1.1.0" + +rc-dialog@~8.4.0: + version "8.4.3" + resolved "https://registry.yarnpkg.com/rc-dialog/-/rc-dialog-8.4.3.tgz#de8650ce7d1fcb6c1f7e065b94a6894b9a5a54a4" + integrity sha512-LHsWXb+2Cy4vEOeJcPvk9M0WSr80Gi438ov5rXt3E6XB4j+53Z+vMFRr+TagnVuOVQRCLmmzT4qutfm2U1OK6w== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.6" + rc-motion "^2.3.0" + rc-util "^5.0.1" + +rc-drawer@~4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/rc-drawer/-/rc-drawer-4.1.0.tgz#d7bf0bc030300b62d282bc04e053b9acad6b08b4" + integrity sha512-kjeQFngPjdzAFahNIV0EvEBoIKMOnvUsAxpkSPELoD/1DuR4nLafom5ryma+TIxGwkFJ92W6yjsMi1U9aiOTeQ== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.6" + rc-util "^5.0.1" + +rc-dropdown@^3.1.3, rc-dropdown@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/rc-dropdown/-/rc-dropdown-3.2.0.tgz#da6c2ada403842baee3a9e909a0b1a91ba3e1090" + integrity sha512-j1HSw+/QqlhxyTEF6BArVZnTmezw2LnSmRk6I9W7BCqNCKaRwleRmMMs1PHbuaG8dKHVqP6e21RQ7vPBLVnnNw== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.6" + rc-trigger "^5.0.4" + +rc-field-form@~1.13.0: + version "1.13.2" + resolved "https://registry.yarnpkg.com/rc-field-form/-/rc-field-form-1.13.2.tgz#c33a0372fd9c5ae2c2a1ce0d1ce5a9f26a0b8fea" + integrity sha512-sskFsJkEmK6wUXNVxVaXRq4jYhKFKQyVrKxHQkvCI0l2ENg8ujjT8oOV2X4aa7+tLV0FNJLKdD+LuHlnTxEeSg== + dependencies: + "@babel/runtime" "^7.8.4" + async-validator "^3.0.3" + rc-util "^5.0.0" + +rc-image@~4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/rc-image/-/rc-image-4.0.1.tgz#b54534684a01dcf8cb477f5ac6dda72545a9541f" + integrity sha512-1GxjwgtONtJjlvd7sM9VSLTAlDQhkqHI0wl72YSDpdm24w5zmDsTYLgTNh/vToFa9qAml10Gaidy03qpkTAQ+A== + dependencies: + "@ant-design/icons" "^4.2.2" + "@babel/runtime" "^7.11.2" + classnames "^2.2.6" + rc-dialog "~8.4.0" + rc-util "^5.0.6" + +rc-input-number@~6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/rc-input-number/-/rc-input-number-6.1.1.tgz#818c426942d1b4dc4d6d2639d741ca67773a9118" + integrity sha512-9t2xf1G0YEism7FAXAvF1huBk7ZNABPBf6NL+3/aDL123WiT/vhhod4cldiDWTM1Yb2EDKR//ZIa546ScdsUaA== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.5" + rc-util "^5.0.1" + +rc-mentions@~1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rc-mentions/-/rc-mentions-1.5.2.tgz#94559a369de73e7cc92f343badaf94499fb410a7" + integrity sha512-GqV0tOtHY3pLpOsFCxJ2i6Ad8AVfxFmz0NlD/8rb8IG8pMpthJKcdfnXlNZRx3Fa9O4YEgJpdSY1WEbmlx2DWQ== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.6" + rc-menu "^8.0.1" + rc-textarea "^0.3.0" + rc-trigger "^5.0.4" + rc-util "^5.0.1" + +rc-menu@^8.0.1, rc-menu@^8.6.1: + version "8.10.0" + resolved "https://registry.yarnpkg.com/rc-menu/-/rc-menu-8.10.0.tgz#f14ff6456073bcf29603da818774543a73e44e92" + integrity sha512-mafcLoKtVlH9HDW52NmwenQ9vjvgxtR46NfYAexJEIUTZ9Ze2veZUkEKjhOJlzrUHEYtCoNslpqyy4iVN08Glw== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + mini-store "^3.0.1" + omit.js "^2.0.0" + rc-motion "^2.0.1" + rc-trigger "^5.1.2" + rc-util "^5.0.1" + resize-observer-polyfill "^1.5.0" + shallowequal "^1.1.0" + +rc-menu@~8.8.2: + version "8.8.3" + resolved "https://registry.yarnpkg.com/rc-menu/-/rc-menu-8.8.3.tgz#feb8ba0371dd342fbf1052d4fcca7b669b0bf66a" + integrity sha512-C9sT0SBXmUbVWRUseXASousacRVPnOm5aXdyJR569WIvZwbs2IncpGNmAcft1R5ZuFE3Y+SZZ5FYvtGtbCzkIQ== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + mini-store "^3.0.1" + omit.js "^2.0.0" + rc-motion "^2.0.1" + rc-trigger "^5.0.4" + rc-util "^5.0.1" + resize-observer-polyfill "^1.5.0" + shallowequal "^1.1.0" + +rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.2.0, rc-motion@^2.3.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/rc-motion/-/rc-motion-2.3.4.tgz#69fe1313754ee1e746e42ec971e361cbc755456e" + integrity sha512-La9JjfM58Vrwds1wM9OAkRTWsGeVqNnftI1YFti2WtaA2Ernk2vjbVio9hGbzhF0EvGrEvrzS96Mx/6lGT6Z0w== + dependencies: + "@babel/runtime" "^7.11.1" + classnames "^2.2.1" + rc-util "^5.2.1" + +rc-notification@~4.5.2: + version "4.5.4" + resolved "https://registry.yarnpkg.com/rc-notification/-/rc-notification-4.5.4.tgz#1292e163003db4b9162c856a4630e5d0f1359356" + integrity sha512-VsN0ouF4uglE5g3C9oDsXLNYX0Sz++ZNUFYCswkxhpImYJ9u6nJOpyA71uOYDVCu6bAF54Y5Hi/b+EcnMzkepg== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + rc-motion "^2.2.0" + rc-util "^5.0.1" + +rc-pagination@~3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rc-pagination/-/rc-pagination-3.1.2.tgz#ab5eacd9c51f869e350d2245064babe91bc1f046" + integrity sha512-KbJvkTvRiD51vTIAi0oTARPUHNb0iV6njbDBe8yLkc3PWYDJaszASfuss6YJ98EIxEeGzuEk6xsUAEKWRJgz2g== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.1" + +rc-picker@~2.3.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/rc-picker/-/rc-picker-2.3.4.tgz#3c42f54b6389e205b0ce0b8257e380864429192d" + integrity sha512-UdeqTzR9E5KHOGMjWfsMpE3VU+3VR3J5/wMrwuIRmL8orv9Tm+Gew3NPfs7djcuTrfnu+hL+lwCWp7VftZcSng== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.1" + date-fns "^2.15.0" + dayjs "^1.8.30" + moment "^2.24.0" + rc-trigger "^5.0.4" + rc-util "^5.4.0" + shallowequal "^1.1.0" + +rc-progress@~3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/rc-progress/-/rc-progress-3.1.1.tgz#f7ba5eb33cc438862513ab5a71739feaf6b3ef4f" + integrity sha512-1ns3pW7ll9bHfdXtlVLF+vngdvlxiCDtiqwXnZFEdurst11JTiPxVdeqnCNbhWx5hP4kCKkAPqG1N0FVfTSUGA== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.6" + +rc-rate@~2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/rc-rate/-/rc-rate-2.9.0.tgz#33b07732e2f145ce1cbc2c46d8ede84319eefe6d" + integrity sha512-DqXWWpA3+oQfHVBYfk5Myhl1YoNYYX9roYYIF7mLiDBI5SCErOYpLaCV8PdZ3IUN+F0AtejXxy4fuHgp1cDtwQ== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.5" + rc-util "^5.0.1" + +rc-resize-observer@^0.2.0, rc-resize-observer@^0.2.1, rc-resize-observer@^0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/rc-resize-observer/-/rc-resize-observer-0.2.6.tgz#c1b642f6d1293e34c4e3715f47f69443a167b825" + integrity sha512-YX6nYnd6fk7zbuvT6oSDMKiZjyngjHoy+fz+vL3Tez38d/G5iGdaDJa2yE7345G6sc4Mm1IGRUIwclvltddhmA== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.1" + rc-util "^5.0.0" + resize-observer-polyfill "^1.5.1" + +rc-select@^11.1.1: + version "11.5.0" + resolved "https://registry.yarnpkg.com/rc-select/-/rc-select-11.5.0.tgz#360d2762207c2fef2622e7fcc542fc94dfc9d10f" + integrity sha512-izVcxMMo64ZbuYDaB+zsybPjli5Ub6fKM4OeChDqn4MwrHnPjCEsO3bXjeSEXK2LCC2DXQAdr1oYvHGw9QAGVw== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + rc-motion "^2.0.1" + rc-trigger "^5.0.4" + rc-util "^5.0.1" + rc-virtual-list "^3.2.0" + warning "^4.0.3" + +rc-select@~11.4.0: + version "11.4.2" + resolved "https://registry.yarnpkg.com/rc-select/-/rc-select-11.4.2.tgz#5b431ee7b2cc6e439886ca855774fc116e6fe6fb" + integrity sha512-DQHYwMcvAajnnlahKkYIW47AVTXgxpGj9CWbe+juXgvxawQRFUdd8T8L2Q05aOkMy02UTG0Qrs7EZfHmn5QHbA== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + rc-motion "^2.0.1" + rc-trigger "^5.0.4" + rc-util "^5.0.1" + rc-virtual-list "^3.2.0" + warning "^4.0.3" + +rc-slider@~9.6.1: + version "9.6.2" + resolved "https://registry.yarnpkg.com/rc-slider/-/rc-slider-9.6.2.tgz#7ea1e9494ed90f602e871c43bccfe3057a0c59f6" + integrity sha512-uctdE1768ZmSjCcRmx6ffm/uoW/zl/SOvanvoilWyZ1NRlwkZCa1R20AIJlU9VDJo/FswWnqXqt6iDp2CnDVig== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.5" + rc-tooltip "^5.0.1" + rc-util "^5.0.0" + shallowequal "^1.1.0" + +rc-steps@~4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/rc-steps/-/rc-steps-4.1.3.tgz#208580e22db619e3830ddb7fa41bc886c65d9803" + integrity sha512-GXrMfWQOhN3sVze3JnzNboHpQdNHcdFubOETUHyDpa/U3HEKBZC3xJ8XK4paBgF4OJ3bdUVLC+uBPc6dCxvDYA== + dependencies: + "@babel/runtime" "^7.10.2" + classnames "^2.2.3" + rc-util "^5.0.1" + +rc-switch@~3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/rc-switch/-/rc-switch-3.2.2.tgz#d001f77f12664d52595b4f6fb425dd9e66fba8e8" + integrity sha512-+gUJClsZZzvAHGy1vZfnwySxj+MjLlGRyXKXScrtCTcmiYNPzxDFOxdQ/3pK1Kt/0POvwJ/6ALOR8gwdXGhs+A== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.1" + rc-util "^5.0.1" + +rc-table@~7.11.0: + version "7.11.1" + resolved "https://registry.yarnpkg.com/rc-table/-/rc-table-7.11.1.tgz#b31f548feeb0fc03a2b650cb1fedbed0a8926bb7" + integrity sha512-Xq7ibC/a2kj8ywLeKhGcv689JZaldjPxxe15h89qGho6/sR9YkIUD07KjLCGFaJ0LkhGBNY1XYv2VOUFGOQuYg== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.5" + rc-resize-observer "^0.2.0" + rc-util "^5.4.0" + shallowequal "^1.1.0" + +rc-tabs@~11.7.0: + version "11.7.0" + resolved "https://registry.yarnpkg.com/rc-tabs/-/rc-tabs-11.7.0.tgz#e03a03fbf5b8d04a1c9f12f24a621b1d7ff6a093" + integrity sha512-nYwQcgML2drM0iau4aa6HI4qyyZSW0WpspCAtO5KGjXwHzUJcvv3qgLVuoQOWQaDDHXkI9Jj8U7Y/Hcrdyj1Kw== + dependencies: + "@babel/runtime" "^7.11.2" + classnames "2.x" + raf "^3.4.1" + rc-dropdown "^3.1.3" + rc-menu "^8.6.1" + rc-resize-observer "^0.2.1" + rc-util "^5.0.0" + +rc-textarea@^0.3.0, rc-textarea@~0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/rc-textarea/-/rc-textarea-0.3.1.tgz#e81e1ef6f0e29729f9f80bb266cf6769dd7ab69a" + integrity sha512-bO5Ol5uD6A++aWI6BJ0Pa/8OZcGeacP9LxIGkUqkCwPyOG3kaLOsWb8ya4xCfrsC2P4vDTsHsJmmmG5wuXGFRg== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.1" + omit.js "^2.0.0" + rc-resize-observer "^0.2.3" + +rc-tooltip@^5.0.1, rc-tooltip@~5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/rc-tooltip/-/rc-tooltip-5.0.1.tgz#b82c4259604d2cb62ca610ed7932dd37fc6ef61d" + integrity sha512-3AnxhUS0j74xAV3khrKw8o6rg+Ima3nw09DJBezMPnX3ImQUAnayWsPSlN1mEnihjA43rcFkGM1emiKE+CXyMQ== + dependencies: + "@babel/runtime" "^7.11.2" + rc-trigger "^5.0.0" + +rc-tree-select@~4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/rc-tree-select/-/rc-tree-select-4.1.2.tgz#bf012c3c32cf2e82fc7ffbdd60cb596163a290a0" + integrity sha512-2tRwZ4ChY+BarVKHoPR65kSZtopgwKCig6ngJiiTVgYfRdAhfdQp2j2+L8YW9TkosYGmwgTOhmlphlG3QNy7Pg== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + rc-select "^11.1.1" + rc-tree "^3.8.0" + rc-util "^5.0.5" + +rc-tree@^3.8.0, rc-tree@~3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/rc-tree/-/rc-tree-3.11.0.tgz#87edf01842bd88a05519e30dd7312bee3f7e2618" + integrity sha512-3RxA6fckbzX7WOk7g4gvO6AOad0znc8QW2nsv1IXSiljQaIMiyx1AK0zhzIEtABgWKbIs9QkhnBvIAHS4Rn9LA== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "2.x" + rc-motion "^2.0.1" + rc-util "^5.0.0" + rc-virtual-list "^3.0.1" + +rc-trigger@^5.0.0, rc-trigger@^5.0.4, rc-trigger@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-5.1.2.tgz#f0f89bba2318699e704492bddb20506ecd8f8916" + integrity sha512-A6UdDy95masAEIaNmazPtqHW1EOFDWi2C2bJGDpr9OYpmObDpWKdxyNijVbFb6l1viTkAU9d3FyStgNPddgFzw== + dependencies: + "@babel/runtime" "^7.11.2" + classnames "^2.2.6" + rc-align "^4.0.0" + rc-motion "^2.0.0" + rc-util "^5.5.0" + +rc-trigger@~5.0.3: + version "5.0.9" + resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-5.0.9.tgz#6956c31ab1a2def65f0630957ea75bdaa4b2cc4c" + integrity sha512-N+q/ur2dpJSPDWbZQ34ztpGorms1QIphtmFpxKE5z+wMJw2BIASkMDEfwHJ/ssvZQxScjQza0/eQ0CWUI0e+EQ== + dependencies: + "@babel/runtime" "^7.11.2" + classnames "^2.2.6" + rc-align "^4.0.0" + rc-motion "^2.0.0" + rc-util "^5.3.4" + +rc-upload@~3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/rc-upload/-/rc-upload-3.3.1.tgz#ad8658b2a796031930b35d2b07ab312b7cd4c9ed" + integrity sha512-KWkJbVM9BwU8qi/2jZwmZpAcdRzDkuyfn/yAOLu+nm47dyd6//MtxzQD3XZDFkC6jQ6D5FmlKn6DhmOfV3v43w== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.5" + rc-util "^5.2.0" + +rc-util@^4.15.3: + version "4.21.1" + resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-4.21.1.tgz#88602d0c3185020aa1053d9a1e70eac161becb05" + integrity sha512-Z+vlkSQVc1l8O2UjR3WQ+XdWlhj5q9BMQNLk2iOBch75CqPfrJyGtcWMcnhRlNuDu0Ndtt4kLVO8JI8BrABobg== + dependencies: + add-dom-event-listener "^1.1.0" + prop-types "^15.5.10" + react-is "^16.12.0" + react-lifecycles-compat "^3.0.4" + shallowequal "^1.1.0" + +rc-util@^5.0.0, rc-util@^5.0.1, rc-util@^5.0.5, rc-util@^5.0.6, rc-util@^5.0.7, rc-util@^5.1.0, rc-util@^5.2.0, rc-util@^5.2.1, rc-util@^5.3.0, rc-util@^5.3.4, rc-util@^5.4.0, rc-util@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-5.5.0.tgz#76321bcb5c12f01f42bff9b971f170ff19506e5a" + integrity sha512-YJB+zZGvCll/bhxXRVLAekr7lOvTgqMlRIhgINoINfUek7wQvi5sft46NOi3yYUYhocpuW4k8+5okW46sBsZAQ== + dependencies: + react-is "^16.12.0" + shallowequal "^1.1.0" + +rc-virtual-list@^3.0.1, rc-virtual-list@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/rc-virtual-list/-/rc-virtual-list-3.2.2.tgz#95f8f0c4238e081f4a998354492632eed6d71924" + integrity sha512-OepvZDQGUbQQBFk5m2Ds32rfO/tSj9gZkLbzwaIw/hwGgvatDmW+j97YQvFkUQp/XDgdSGcfFfj/6XTKpz0J4g== + dependencies: + classnames "^2.2.6" + rc-resize-observer "^0.2.3" + rc-util "^5.0.7" + react-addons-create-fragment@^15.6.2: version "15.6.2" resolved "https://registry.yarnpkg.com/react-addons-create-fragment/-/react-addons-create-fragment-15.6.2.tgz#a394de7c2c7becd6b5475ba1b97ac472ce7c74f8" @@ -16827,7 +17395,7 @@ resize-observer-polyfill@1.5.0: resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.0.tgz#660ff1d9712a2382baa2cad450a4716209f9ca69" integrity sha512-M2AelyJDVR/oLnToJLtuDJRBBWUGUvvGigj1411hXhAdyFWqMaqHp7TixW3FpiLuVaikIcR1QL+zqoJoZlOgpg== -resize-observer-polyfill@1.5.1, resize-observer-polyfill@^1.5.1: +resize-observer-polyfill@1.5.1, resize-observer-polyfill@^1.5.0, resize-observer-polyfill@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== @@ -17129,6 +17697,13 @@ scoped-regex@^1.0.0: resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" integrity sha1-o0a7Gs1CB65wvXwMfKnlZra63bg= +scroll-into-view-if-needed@^2.2.25: + version "2.2.26" + resolved "https://registry.yarnpkg.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.26.tgz#e4917da0c820135ff65ad6f7e4b7d7af568c4f13" + integrity sha512-SQ6AOKfABaSchokAmmaxVnL9IArxEnLEX9j4wAZw+x4iUTb40q7irtHG3z4GtAWz5veVZcCnubXDBRyLVQaohw== + dependencies: + compute-scroll-into-view "^1.0.16" + seedrandom@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" @@ -17309,7 +17884,7 @@ shallow-equal@^1.1.0: resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da" integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA== -shallowequal@^1.1.0: +shallowequal@^1.0.2, shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== @@ -17840,6 +18415,11 @@ string-argv@0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== +string-convert@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-convert/-/string-convert-0.2.1.tgz#6982cc3049fbb4cd85f8b24568b9d9bf39eeff97" + integrity sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c= + string-hash@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" @@ -19167,7 +19747,7 @@ warning@^3.0.0: dependencies: loose-envify "^1.0.0" -warning@^4.0.0, warning@^4.0.2, warning@^4.0.3: +warning@^4.0.0, warning@^4.0.1, warning@^4.0.2, warning@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==