diff --git a/UPDATING.md b/UPDATING.md index 3e2d5da22604e..6cb3c83ebf7e5 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -26,11 +26,14 @@ assists people when migrating to a new version. ### Breaking Changes +- [17290](https://github.com/apache/superset/pull/17290): Bumps pandas to `1.3.4` and pyarrow to `5.0.0` - [16660](https://github.com/apache/incubator-superset/pull/16660): The `columns` Jinja parameter has been renamed `table_columns` to make the `columns` query object parameter available in the Jinja context. - [16711](https://github.com/apache/incubator-superset/pull/16711): The `url_param` Jinja function will now by default escape the result. For instance, the value `O'Brien` will now be changed to `O''Brien`. To disable this behavior, call `url_param` with `escape_result` set to `False`: `url_param("my_key", "my default", escape_result=False)`. ### Potential Downtime +- [16756](https://github.com/apache/incubator-superset/pull/16756): a change which renames the `dbs.allow_csv_upload` column to `dbs.allow_file_upload` via a (potentially locking) DDL operation. + ### Deprecations ### Other diff --git a/docs/src/pages/docs/Connecting to Databases/firebolt.mdx b/docs/src/pages/docs/Connecting to Databases/firebolt.mdx index c1d11ff10e3be..39ef6c8a233b3 100644 --- a/docs/src/pages/docs/Connecting to Databases/firebolt.mdx +++ b/docs/src/pages/docs/Connecting to Databases/firebolt.mdx @@ -14,11 +14,15 @@ Superset has been tested on `firebolt-sqlalchemy>=0.0.1`. The recommended connection string is: ``` -firebolt://{username}:{password}@{host}/{database} +firebolt://{username}:{password}@{database} +or +firebolt://{username}:{password}@{database}/{engine_name} ``` Here's a connection string example of Superset connecting to a Firebolt database: ``` -firebolt://email@domain:password@host/sample_database +firebolt://email@domain:password@sample_database +or +firebolt://email@domain:password@sample_database/sample_engine ``` diff --git a/docs/src/pages/docs/Connecting to Databases/google-bigquery.mdx b/docs/src/pages/docs/Connecting to Databases/google-bigquery.mdx index c6a8aa5749cc9..3e3fefcfef749 100644 --- a/docs/src/pages/docs/Connecting to Databases/google-bigquery.mdx +++ b/docs/src/pages/docs/Connecting to Databases/google-bigquery.mdx @@ -11,31 +11,55 @@ version: 1 The recommended connector library for BigQuery is [pybigquery](https://github.com/mxmzdlv/pybigquery). -The connection string for BigQuery looks like: - +### Install BigQuery Driver +Follow the steps [here](/docs/databases/dockeradddrivers) about how to +install new database drivers when setting up Superset locally via docker-compose. ``` -bigquery://{project_id} +echo "pybigquery" >> ./docker/requirements-local.txt ``` - -When adding a new BigQuery connection in Superset, you'll also need to add the GCP Service Account +### Connecting to BigQuery +When adding a new BigQuery connection in Superset, you'll need to add the GCP Service Account credentials file (as a JSON). 1. Create your Service Account via the Google Cloud Platform control panel, provide it access to the appropriate BigQuery datasets, and download the JSON configuration file for the service account. - -2. n Superset, Add a JSON blob to the **Secure Extra** field in the database configuration form with - the following format: - +2. In Superset, you can either upload that JSON or add the JSON blob in the following format (this should be the content of your credential JSON file): ``` { - "credentials_info": -} -``` + "type": "service_account", + "project_id": "...", + "private_key_id": "...", + "private_key": "...", + "client_email": "...", + "client_id": "...", + "auth_uri": "...", + "token_uri": "...", + "auth_provider_x509_cert_url": "...", + "client_x509_cert_url": "..." + } + ``` -The resulting file should have this structure: +![CleanShot 2021-10-22 at 04 18 11](https://user-images.githubusercontent.com/52086618/138352958-a18ef9cb-8880-4ef1-88c1-452a9f1b8105.gif) -``` -{ + +3. Additionally, can connect via SQLAlchemy URI instead + + The connection string for BigQuery looks like: + + ``` + bigquery://{project_id} + ``` + Go to the **Advanced** tab, Add a JSON blob to the **Secure Extra** field in the database configuration form with + the following format: + ``` + { + "credentials_info": + } + ``` + + The resulting file should have this structure: + ``` + { "credentials_info": { "type": "service_account", "project_id": "...", @@ -47,11 +71,15 @@ The resulting file should have this structure: "token_uri": "...", "auth_provider_x509_cert_url": "...", "client_x509_cert_url": "..." + } } -} -``` + ``` You should then be able to connect to your BigQuery datasets. +![CleanShot 2021-10-22 at 04 47 08](https://user-images.githubusercontent.com/52086618/138354340-df57f477-d3e5-42d4-b032-d901c69d2213.gif) + + + To be able to upload CSV or Excel files to BigQuery in Superset, you'll need to also add the [pandas_gbq](https://github.com/pydata/pandas-gbq) library. diff --git a/docs/src/pages/docs/Connecting to Databases/index.mdx b/docs/src/pages/docs/Connecting to Databases/index.mdx index 5d7ec9f38e237..d2d2cd6a77eba 100644 --- a/docs/src/pages/docs/Connecting to Databases/index.mdx +++ b/docs/src/pages/docs/Connecting to Databases/index.mdx @@ -42,7 +42,7 @@ A list of some of the recommended packages. |[Elasticsearch](/docs/databases/elasticsearch)|```pip install elasticsearch-dbapi```|```elasticsearch+http://{user}:{password}@{host}:9200/```| |[Exasol](/docs/databases/exasol)|```pip install sqlalchemy-exasol```|```exa+pyodbc://{username}:{password}@{hostname}:{port}/my_schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC```| |[Google Sheets](/docs/databases/google-sheets)|```pip install shillelagh[gsheetsapi]```|```gsheets://```| -|[Firebolt](/docs/databases/firebolt)|```pip install firebolt-sqlalchemy```|```firebolt://{username}:{password}@{host}/{database}```| +|[Firebolt](/docs/databases/firebolt)|```pip install firebolt-sqlalchemy```|```firebolt://{username}:{password}@{database} or firebolt://{username}:{password}@{database}/{engine_name}```| |[Hologres](/docs/databases/hologres)|```pip install psycopg2```|```postgresql+psycopg2://:@/```| |[IBM Db2](/docs/databases/ibm-db2)|```pip install ibm_db_sa```|```db2+ibm_db://```| |[IBM Netezza Performance Server](/docs/databases/netezza)|```pip install nzalchemy```|```netezza+nzpy://:@/```| diff --git a/docs/src/pages/docs/installation/kubernetes.mdx b/docs/src/pages/docs/installation/kubernetes.mdx index 5f249a28a69a7..e491491f85bfe 100644 --- a/docs/src/pages/docs/installation/kubernetes.mdx +++ b/docs/src/pages/docs/installation/kubernetes.mdx @@ -24,14 +24,14 @@ helm repo add superset https://apache.github.io/superset "superset" has been added to your repositories ``` -1. View charts in repo +2. View charts in repo ```sh helm search repo superset NAME CHART VERSION APP VERSION DESCRIPTION superset/superset 0.1.1 1.0 Apache Superset is a modern, enterprise-ready b... ``` -1. Configure your setting overrides +3. Configure your setting overrides Just like any typical Helm chart, you'll need to craft a `values.yaml` file that would define/override any of the values exposed into the default [values.yaml](https://github.com/apache/superset/tree/master/helm/superset/values.yaml), or from any of the dependent charts it depends on: @@ -40,7 +40,7 @@ Just like any typical Helm chart, you'll need to craft a `values.yaml` file that More info down below on some important overrides you might need. -1. Install and run +4. Install and run ```sh helm upgrade --install --values my-values.yaml superset superset/superset diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 0c5b6a15af601..d62a0f5b6ee51 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -22,7 +22,7 @@ maintainers: - name: craig-rueda email: craig@craigrueda.com url: https://github.com/craig-rueda -version: 0.3.11 +version: 0.3.12 dependencies: - name: postgresql version: 10.2.0 diff --git a/helm/superset/templates/ingress.yaml b/helm/superset/templates/ingress.yaml index 7c1dd72f0ebeb..2a151ccc2e3e9 100644 --- a/helm/superset/templates/ingress.yaml +++ b/helm/superset/templates/ingress.yaml @@ -30,6 +30,9 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{- if .Values.ingress.ingressClassName }} + ingressClassName: {{ .Values.ingress.ingressClassName }} +{{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index 72c515aa3a615..eeecea7d1705e 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -165,8 +165,8 @@ service: ingress: enabled: false + # ingressClassName: nginx annotations: {} - # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" ## Extend timeout to allow long running queries. # nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" diff --git a/requirements/base.txt b/requirements/base.txt index c8b9c69b01257..3192eeda61111 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -168,7 +168,7 @@ packaging==21.0 # via # bleach # deprecation -pandas==1.2.5 +pandas==1.3.4 # via apache-superset parsedatetime==2.6 # via apache-superset @@ -178,7 +178,7 @@ polyline==1.4.0 # via apache-superset prison==0.2.1 # via flask-appbuilder -pyarrow==4.0.1 +pyarrow==5.0.0 # via apache-superset pycparser==2.20 # via cffi diff --git a/requirements/development.in b/requirements/development.in index d53e0509f54c8..a0dae01f050b8 100644 --- a/requirements/development.in +++ b/requirements/development.in @@ -17,11 +17,11 @@ # under the License. -r base.in flask-cors>=2.0.0 -mysqlclient==1.4.2.post1 +mysqlclient==2.0.3 pillow>=8.3.1,<9 pydruid>=0.6.1,<0.7 pyhive[hive]>=0.6.1 -psycopg2-binary==2.8.5 +psycopg2-binary==2.9.1 tableschema thrift>=0.11.0,<1.0.0 progress>=1.5,<2 diff --git a/requirements/development.txt b/requirements/development.txt index 3a62a283865a7..dc993897636e7 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -1,4 +1,4 @@ -# SHA1:dbd3e93a11a36fc6b18d6194ac96ba29bd0ad2a8 +# SHA1:a2fe77c9b8bffc8c8f3de4df6709c8be957c2f87 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -36,7 +36,7 @@ jsonlines==2.0.0 # via tabulator linear-tsv==1.1.0 # via tabulator -mysqlclient==1.4.2.post1 +mysqlclient==2.0.3 # via -r requirements/development.in openpyxl==3.0.7 # via tabulator @@ -44,7 +44,7 @@ pillow==8.3.1 # via -r requirements/development.in progress==1.6 # via -r requirements/development.in -psycopg2-binary==2.8.5 +psycopg2-binary==2.9.1 # via -r requirements/development.in pure-sasl==0.6.2 # via thrift-sasl diff --git a/requirements/testing.in b/requirements/testing.in index 5dbb3194787f0..c172de6f26a00 100644 --- a/requirements/testing.in +++ b/requirements/testing.in @@ -19,13 +19,16 @@ docker flask-testing freezegun +google-cloud-bigquery ipdb # pinning ipython as pip-compile-multi was bringing higher version # of the ipython that was not found in CI ipython openapi-spec-validator openpyxl +pandas_gbq parameterized +pybigquery pyfakefs pyhive[presto]>=0.6.3 pylint==2.9.6 diff --git a/requirements/testing.txt b/requirements/testing.txt index 8c542e0056d26..ef84e6973c4ea 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -1,4 +1,4 @@ -# SHA1:a36e63b551290f1060a819fe4f1f50bc6200403c +# SHA1:4aabffca9a6688f2911d6f8697495e7045a529d0 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -31,7 +31,7 @@ flask-testing==0.8.1 # via -r requirements/testing.in freezegun==1.1.0 # via -r requirements/testing.in -google-api-core[grpc]==2.1.0 +google-api-core[grpc]==2.2.1 # via # google-cloud-bigquery # google-cloud-bigquery-storage @@ -49,8 +49,9 @@ google-auth-oauthlib==0.4.6 # via # pandas-gbq # pydata-google-auth -google-cloud-bigquery[bqstorage,pandas]==2.28.0 +google-cloud-bigquery[bqstorage,pandas]==2.29.0 # via + # -r requirements/testing.in # apache-superset # pandas-gbq # pybigquery @@ -60,14 +61,19 @@ google-cloud-core==2.1.0 # via google-cloud-bigquery google-crc32c==1.3.0 # via google-resumable-media -google-resumable-media==2.0.3 +google-resumable-media==2.1.0 # via google-cloud-bigquery googleapis-common-protos==1.53.0 - # via google-api-core -grpcio==1.41.0 + # via + # google-api-core + # grpcio-status +grpcio==1.41.1 # via # google-api-core # google-cloud-bigquery + # grpcio-status +grpcio-status==1.41.1 + # via google-api-core iniconfig==1.1.1 # via pytest ipdb==0.13.9 @@ -99,7 +105,9 @@ openapi-schema-validator==0.1.5 openapi-spec-validator==0.3.1 # via -r requirements/testing.in pandas-gbq==0.15.0 - # via apache-superset + # via + # -r requirements/testing.in + # apache-superset parameterized==0.8.1 # via -r requirements/testing.in parso==0.8.2 @@ -110,15 +118,16 @@ pickleshare==0.7.5 # via ipython prompt-toolkit==3.0.19 # via ipython -proto-plus==1.19.2 +proto-plus==1.19.7 # via # google-cloud-bigquery # google-cloud-bigquery-storage -protobuf==3.18.1 +protobuf==3.19.1 # via # google-api-core # google-cloud-bigquery # googleapis-common-protos + # grpcio-status # proto-plus ptyprocess==0.7.0 # via pexpect @@ -129,7 +138,9 @@ pyasn1==0.4.8 pyasn1-modules==0.2.8 # via google-auth pybigquery==0.10.2 - # via apache-superset + # via + # -r requirements/testing.in + # apache-superset pydata-google-auth==1.2.0 # via pandas-gbq pyfakefs==4.5.0 diff --git a/setup.py b/setup.py index 72bc4adc2b9e2..ce21f9ababf17 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ def get_git_sha() -> str: setup( name="apache-superset", - description=("A modern, enterprise-ready business intelligence web application"), + description="A modern, enterprise-ready business intelligence web application", long_description=long_description, long_description_content_type="text/markdown", version=version_string, @@ -90,7 +90,7 @@ def get_git_sha() -> str: "isodate", "markdown>=3.0", "msgpack>=1.0.0, <1.1", - "pandas>=1.2.2, <1.3", + "pandas>=1.3.0, <1.4", "parsedatetime", "pgsanity", "polyline", @@ -98,7 +98,7 @@ def get_git_sha() -> str: "python-dateutil", "python-dotenv", "python-geohash", - "pyarrow>=4.0.1, <4.1", + "pyarrow>=5.0.0, <6.0", "pyyaml>=5.4", "PyJWT>=1.7.1, <2", "redis", diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts index 123c7779b091b..1458fc7d5982d 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts @@ -21,6 +21,13 @@ import { getChartAlias, Slice } from 'cypress/utils/vizPlugins'; export const WORLD_HEALTH_DASHBOARD = '/superset/dashboard/world_health/'; export const TABBED_DASHBOARD = '/superset/dashboard/tabbed_dash/'; +export const testItems = { + dashboard: 'Cypress Sales Dashboard', + dataset: 'Vehicle Sales', + chart: 'Cypress chart', + defaultNameDashboard: '[ untitled dashboard ]', +}; + export const CHECK_DASHBOARD_FAVORITE_ENDPOINT = '/superset/favstar/Dashboard/*/count'; diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts index c5cbfb7bba663..9e2fe49288625 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts @@ -24,10 +24,10 @@ import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper'; function selectColorScheme(color: string) { // open color scheme dropdown - cy.get('.modal-body') - .contains('Color Scheme') + cy.get('.ant-modal-body') + .contains('Color scheme') .parents('.ControlHeader') - .next('.Select') + .next('.ant-select') .click() .then($colorSelect => { // select a new color scheme @@ -37,7 +37,7 @@ function selectColorScheme(color: string) { function assertMetadata(text: string) { const regex = new RegExp(text); - cy.get('.modal-body') + cy.get('.ant-modal-body') .find('#json_metadata') .should('be.visible') .then(() => { @@ -50,12 +50,15 @@ function assertMetadata(text: string) { } function typeMetadata(text: string) { - cy.get('.modal-body').find('#json_metadata').should('be.visible').type(text); + cy.get('.ant-modal-body') + .find('#json_metadata') + .should('be.visible') + .type(text); } function openAdvancedProperties() { return cy - .get('.modal-body') + .get('.ant-modal-body') .contains('Advanced') .should('be.visible') .click(); @@ -94,6 +97,10 @@ describe('Dashboard edit action', () => { .get('[data-test="dashboard-title-input"]') .type(`{selectall}{backspace}${dashboardTitle}`); + cy.wait('@dashboardGet').then(() => { + selectColorScheme('d3Category20b'); + }); + // save edit changes cy.get('.ant-modal-footer') .contains('Save') @@ -146,7 +153,7 @@ describe('Dashboard edit action', () => { .click() .then(() => { // assert that modal edit window has closed - cy.get('.modal-body').should('not.exist'); + cy.get('.ant-modal-body').should('not.exist'); // assert color has been updated openDashboardEditProperties(); @@ -177,7 +184,7 @@ describe('Dashboard edit action', () => { .click() .then(() => { // assert that modal edit window has closed - cy.get('.modal-body') + cy.get('.ant-modal-body') .contains('A valid color scheme is required') .should('be.visible'); }); diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts index 5d18c355ed4ad..35e3f013c9f58 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts @@ -16,12 +16,187 @@ * specific language governing permissions and limitations * under the License. */ -import { CHART_LIST } from '../chart_list/chart_list.helper'; +import { dashboardView, nativeFilters } from 'cypress/support/directories'; +import { testItems } from './dashboard.helper'; import { DASHBOARD_LIST } from '../dashboard_list/dashboard_list.helper'; +const getTestTitle = ( + test: Mocha.Suite = (Cypress as any).mocha.getRunner().suite.ctx.test, +): string => + test.parent?.title + ? `${getTestTitle(test.parent)} -- ${test.title}` + : test.title; + // TODO: fix flaky init logic and re-enable const milliseconds = new Date().getTime(); const dashboard = `Test Dashboard${milliseconds}`; + +describe('Nativefilters Sanity test', () => { + before(() => { + cy.login(); + cy.intercept('/api/v1/dashboard/?q=**').as('dashboardsList'); + cy.intercept('POST', '**/copy_dash/*').as('copy'); + cy.intercept('/api/v1/dashboard/*').as('dashboard'); + cy.request( + 'api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:100)', + ).then(xhr => { + const dashboards = xhr.body.result; + const worldBankDashboard = dashboards.find( + d => d.dashboard_title === "World Bank's Data", + ); + cy.visit(worldBankDashboard.url); + }); + cy.get(dashboardView.threeDotsMenuIcon).should('be.visible').click(); + cy.get(dashboardView.saveAsMenuOption).should('be.visible').click(); + cy.get(dashboardView.saveModal.dashboardNameInput) + .should('be.visible') + .clear() + .type(testItems.dashboard); + cy.get(dashboardView.saveModal.saveButton).click(); + cy.wait('@copy', { timeout: 45000 }) + .its('response.statusCode') + .should('eq', 200); + }); + beforeEach(() => { + cy.login(); + cy.request( + 'api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:100)', + ).then(xhr => { + const dashboards = xhr.body.result; + const testDashboard = dashboards.find( + d => d.dashboard_title === testItems.dashboard, + ); + cy.visit(testDashboard.url); + }); + }); + it('User can expand / retract native filter sidebar on a dashboard', () => { + cy.get(nativeFilters.createFilterButton).should('not.exist'); + cy.get(nativeFilters.filterFromDashboardView.expand) + .should('be.visible') + .click(); + cy.get(nativeFilters.createFilterButton).should('be.visible'); + cy.get(nativeFilters.filterFromDashboardView.expand).should( + 'not.be.visible', + ); + cy.get(nativeFilters.filterFromDashboardView.collapse) + .should('be.visible') + .click(); + cy.get(nativeFilters.filterFromDashboardView.collapse).should( + 'not.be.visible', + ); + }); + it('User can enter filter edit pop-up by clicking on pencil icon', () => { + cy.get(nativeFilters.filterFromDashboardView.expand) + .should('be.visible') + .click(); + cy.get(nativeFilters.createFilterButton).should('be.visible').click(); + cy.get(nativeFilters.modal.container).should('be.visible'); + }); + it('User can add a new native filter', () => { + cy.get(nativeFilters.filterFromDashboardView.expand) + .should('be.visible') + .click(); + cy.get(nativeFilters.createFilterButton).should('be.visible').click(); + cy.get(nativeFilters.modal.container) + .find(nativeFilters.filtersPanel.filterName) + .click() + .type('Country name'); + cy.get(nativeFilters.modal.container) + .find(nativeFilters.filtersPanel.datasetName) + .click() + .type('wb_health_population{enter}'); + + // Add following step to avoid flaky enter value in line 177 + cy.get(nativeFilters.filtersPanel.inputDropdown) + .should('be.visible', { timeout: 20000 }) + .last() + .click(); + + cy.get('.loading inline-centered css-101mkpk').should('not.exist'); + // hack for unclickable country_name + cy.wait(5000); + cy.get(nativeFilters.filtersPanel.filterInfoInput) + .last() + .should('be.visible') + .click({ force: true }); + cy.get(nativeFilters.filtersPanel.filterInfoInput) + .last() + .type('country_name'); + cy.get(nativeFilters.filtersPanel.inputDropdown) + .should('be.visible', { timeout: 20000 }) + .last() + .click(); + cy.get(nativeFilters.modal.footer) + .contains('Save') + .should('be.visible') + .click(); + cy.get(nativeFilters.modal.container).should('not.exist'); + }); + it('User can delete a native filter', () => { + cy.get(nativeFilters.createFilterButton).click({ force: true }); + cy.get(nativeFilters.modal.container).should('be.visible'); + + cy.get(nativeFilters.filtersList.removeIcon).first().click(); + cy.contains('Restore Filter').should('not.exist', { timeout: 10000 }); + + cy.get(nativeFilters.modal.footer) + .contains('Save') + .should('be.visible') + .click(); + }); + it('User can cancel changes in native filter', () => { + cy.get(nativeFilters.createFilterButton).click({ force: true }); + cy.get(nativeFilters.modal.container) + .find(nativeFilters.filtersPanel.filterName) + .click() + .type('suffix'); + cy.get(nativeFilters.modal.container) + .find(nativeFilters.filtersPanel.datasetName) + .should('be.visible'); + cy.get(nativeFilters.modal.footer) + .find(nativeFilters.modal.cancelButton) + .should('be.visible') + .click(); + cy.get(nativeFilters.modal.alertXUnsavedFilters).should('be.visible'); + // remove native filter + cy.get(nativeFilters.modal.footer) + .find(nativeFilters.modal.yesCancelButton) + .contains('cancel') + .should('be.visible') + .click({ force: true }); + + cy.get(nativeFilters.createFilterButton).click({ force: true }); + cy.get(nativeFilters.filtersList.removeIcon).first().click(); + cy.contains('You have removed this filter.').should('be.visible'); + cy.get(nativeFilters.modal.footer) + .find(nativeFilters.modal.saveButton) + .should('be.visible') + .click(); + cy.get(nativeFilters.filtersPanel.filterName).should('not.exist'); + }); + it('User can cancel creating a new filter', () => { + cy.get(nativeFilters.filterFromDashboardView.expand) + .should('be.visible') + .click(); + cy.get(nativeFilters.createFilterButton).should('be.visible').click(); + cy.get(nativeFilters.modal.container).should('be.visible'); + + cy.get(nativeFilters.modal.footer) + .find(nativeFilters.modal.cancelButton) + .should('be.visible') + .click(); + cy.get(nativeFilters.modal.alertXUnsavedFilters) + .should('have.text', 'There are unsaved changes.') + .should('be.visible'); + cy.get(nativeFilters.modal.footer) + .find(nativeFilters.modal.yesCancelButton) + .contains('cancel') + .should('be.visible') + .click(); + cy.get(nativeFilters.modal.container).should('not.exist'); + }); +}); + xdescribe('Nativefilters', () => { before(() => { cy.login(); diff --git a/superset-frontend/cypress-base/cypress/support/directories.ts b/superset-frontend/cypress-base/cypress/support/directories.ts new file mode 100644 index 0000000000000..62871d7f1d102 --- /dev/null +++ b/superset-frontend/cypress-base/cypress/support/directories.ts @@ -0,0 +1,646 @@ +/** + * 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. + */ + +const dataTestLocator = (value: string) => `[data-test='${value}']`; + +export const pageHeader = { + logo: '.navbar-brand > img', + headerNavigationItem: '.ant-menu-submenu-title', + headerNavigationDropdown: "[aria-label='triangle-down']", + headerNavigationItemMenu: '.ant-menu-item-group-list', + plusIcon: ':nth-child(2) > .ant-menu-submenu-title', + plusIconMenuOptions: { + sqlQueryOption: dataTestLocator('menu-item-SQL query'), + chartOption: dataTestLocator('menu-item-Chart'), + dashboardOption: dataTestLocator('menu-item-Dashboard'), + }, + plusMenu: '.ant-menu-submenu-popup', + barButtons: '[role="presentation"]', + sqlLabMenu: '[id="item_3$Menu"]', + dataMenu: '[id="item_4$Menu"]', +}; + +export const profile = { + activeTab: '.ant-tabs-tab-active', + inactiveTab: '.ant-tabs-tab', + emptyFavoritedPlaceholder: '.ant-empty-normal', + tableRow: '.table-row', + favoritesSpace: '#rc-tabs-0-panel-2', +}; +export const securityAccess = { + rolesBubble: '.ant-badge-count', +}; +export const homePage = { + homeSection: { + sectionArea: '.ant-collapse-content-box', + sectionElement: '.ant-card-meta-title', + }, + sections: { + expandedSection: '.ant-collapse-item-active', + expandedSectionHeader: '[aria-expanded="true"]', + collapseExpandButton: '.ant-collapse-arrow', + collapsedSection: '[class="ant-collapse-item"]', + collapsedSectionHeader: '[aria-expanded="false"]', + section: '[class^="ant-collapse-item"]', + sectionsMenuContainer: "[role='navigation']", + sectionsMenuItem: "[role='menuitem']", + card: dataTestLocator('styled-card'), + }, + thumbnailsSection: { + container: "[class='switch']", + toggle: "[role ='switch']", + }, +}; +export const databasesPage = { + addDatabaseButton: dataTestLocator('btn-create-database'), + searchInput: dataTestLocator('search-input'), + table: { + tableRow: dataTestLocator('table-row'), + tableCell: dataTestLocator('table-row-cell'), + editButton: dataTestLocator('edit-alt'), + }, + modal: { + header: '#rcDialogTitle0 > h4', + step: '.helper-top', + selectDbStepTitle: '.select-db > h4', + preferredBlockBigQuery: '.preferred > :nth-child(1)', + prefferedBlockPostgreSQL: '.preferred > :nth-child(2)', + prefferedBlockSnowflake: '.preferred > :nth-child(3)', + prefferedBlockMySQL: '.preferred > :nth-child(4)', + prefferedBlockAthena: '.preferred > :nth-child(5)', + prefferedBlockSheets: '.preferred > :nth-child(6)', + supportedDatabasesText: '.control-label', + orChoose: '.available-label', + dbDropdown: '[class="ant-select-selection-search-input"]', + dbDropdownMenu: '.rc-virtual-list-holder-inner', + dbDropdownMenuItem: '[class="ant-select-item-option-content"]', + infoAlert: '.ant-alert', + serviceAccountInput: '[name="credentials_info"]', + connectionStep: { + modal: '.ant-modal-content', + modalBody: '.ant-modal-body', + stepTitle: '.css-7x6kk > h4', + helperBottom: '.helper-bottom', + postgresDatabase: '[name="database"]', + dbInput: '[name="database_name"]', + alertMessage: '.ant-alert-message', + errorField: '[role="alert"]', + uploadJson: '[title="Upload JSON file"]', + chooseFile: '[class="ant-btn input-upload-btn"]', + additionalParameters: '[name="query_input"]', + sqlAlchemyUriInput: dataTestLocator('sqlalchemy-uri-input'), + advancedTab: '#rc-tabs-0-tab-2', + activeTab: '.ant-tabs-tab-active', + securitySubMenu: + ':nth-child(3) > .ant-collapse-header > .anticon > svg > path', + aceTextInput: '.ace_text-input', + aceContent: '.ace_content', + connectButton: '.css-16i3wh7', + hostInput: '[name="host"]', + portInput: '[name="port"]', + usernameInput: '[name="username"]', + passwordInput: '[name="password"]', + switch: '.ant-switch', + }, + }, +}; + +export const sqlLabView = { + sqlEditorLeftBar: { + sqlEditorLeftBar: '[class="SqlEditorLeftBar"]', + databaseSchemaTableSection: '[class="SqlEditorLeftBar"] > :nth-child(1)', + tableSchemaSection: + '[class="SqlEditorLeftBar"] > :nth-child(1) > :nth-child(3) > :nth-child(1)', + tableSchemaInputEmpty: '[aria-label="Select table or type table name"]', + }, + databaseInput: '[data-test=DatabaseSelector] > :nth-child(1)', + emptyMenuOptionsPlaceholder: '[class="ant-empty-img-simple"]', + removeTabButton: '.ant-tabs-tab-remove > .anticon > svg', + tabsNavList: "[class='ant-tabs-nav-list']", + tab: "[class='ant-tabs-tab-btn']", + addTabButton: dataTestLocator('add-tab-icon'), + tooltip: '.ant-tooltip-content', + tabName: '.css-1suejie', + schemaInput: '[data-test=DatabaseSelector] > :nth-child(2)', + loadingIndicator: '.Select__loading-indicator', + menuItem: '[class="ant-select-item-option-content"]', + examplesMenuItem: '[title="examples"]', + tableInput: ':nth-child(4) > .select > :nth-child(1)', + sqlEditor: '#brace-editor textarea', + saveAsButton: '.SaveQuery > .ant-btn', + saveAsModal: { + footer: '.ant-modal-footer', + queryNameInput: 'input[class^="ant-input"]', + }, + sqlToolbar: { + toolbar: '#js-sql-toolbar', + runButton: '.css-d3dxop', + }, + rowsLimit: { + dropdown: '.ant-dropdown-menu', + limitButton: '.ant-dropdown-menu-item', + limitButtonText: '.css-151uxnz', + limitTextWithValue: '[class="ant-dropdown-trigger"]', + }, + renderedTableHeader: '.ReactVirtualized__Table__headerRow', + renderedTableRow: '.ReactVirtualized__Table__row', + errorBody: '.error-body', + alertMessage: '.ant-alert-message', + historyTable: { + header: '[role=columnheader]', + table: '.QueryTable', + row: dataTestLocator('table-row'), + failureMarkIcon: '[aria-label=x-small]', + successMarkIcon: '[aria-label=check]', + }, +}; +export const queryHistory = { + tableHeader: dataTestLocator('sort-header'), + row: dataTestLocator('table-row'), + cell: dataTestLocator('table-row-cell'), + action: '[aria-label=full]', +}; +export const savedQuery = { + tableHeader: dataTestLocator('sort-header'), + row: dataTestLocator('table-row'), + cell: dataTestLocator('table-row-cell'), + trash: dataTestLocator('delete-action'), + deleteQueryIcon: '[data-test="delete-action"]', + deleteModal: { + deleteInput: dataTestLocator('delete-modal-input'), + deleteButton: dataTestLocator('modal-confirm-button'), + }, +}; +export const annotationLayersView = { + emptyDescription: { + description: '.ant-empty-description', + addAnnotationLayerButton: '.ant-empty-footer > .ant-btn', + }, + modal: { + content: { + content: '.ant-modal-body', + title: '.ant-modal-body > :nth-child(2) > input', + description: "[name='descr']", + }, + footer: { + footer: '.ant-modal-footer', + addButton: dataTestLocator('modal-confirm-button'), + cancelButton: dataTestLocator('modal-cancel-button'), + }, + }, +}; +export const datasetsList = { + newDatasetButton: '.css-yff34v', + searchInput: dataTestLocator('filters-search'), + newDatasetModal: { + inputField: '[class="section"]', + addButton: dataTestLocator('modal-confirm-button'), + body: '.ant-modal-body', + }, + table: { + tableRow: { + row: dataTestLocator('table-row'), + rowText: dataTestLocator('cell-text'), + rowCell: dataTestLocator('table-row-cell'), + }, + tableRowHeader: { + header: dataTestLocator('sort-header'), + unsorted: '[aria-label="sort"]', + sortAsc: '[aria-label="sort-asc"]', + sortDesc: '[aria-label="sort-desc"]', + }, + rowActionItems: dataTestLocator('table-row-cell'), + actionButton: '.action-button', + editButton: '[aria-label="edit-alt"]', + }, + editDatasetModal: { + modal: dataTestLocator('edit-dataset-tabs'), + sourceNavigationTab: '#table-tabs-tab-0', + metricsNavigationTab: dataTestLocator('collection-tab-Metrics'), + columnsNavigationTab: dataTestLocator('collection-tab-Columns'), + calculatedColumnsNavigationTab: dataTestLocator( + 'collection-tab-Calculated columns', + ), + settingsNavigationTab: '#table-tabs-tab-4', + saveButton: dataTestLocator('datasource-modal-save'), + sourceContent: '#table-tabs-panel-0', + metricsContent: '#table-tabs-panel-1', + columnsContent: '#table-tabs-panel-2', + calculatedColumnsContent: '#table-tabs-panel-3', + settingsContent: '#table-tabs-panel-4', + aceTextInput: '.ace_text-input', + sourceSQLInput: '.ace_content', + sourceVirtualSQLRadio: ':nth-child(2) > .ant-radio > .ant-radio-inner', + sourcePadlock: '[aria-label=lock-locked]', + legacy: { + panel: '.panel-body', + sqlInput: '#sql', + save: '.well > .btn-primary', + description: '#description', + }, + }, + deleteDatasetModal: { + modal: '.ant-modal-content', + deleteInput: dataTestLocator('delete-modal-input'), + deleteButton: dataTestLocator('modal-confirm-button'), + text: '.css-kxmt87', + }, +}; +export const chartListView = { + filtersBar: { + searchField: dataTestLocator('filters-search'), + }, + top: { + bulkSelect: dataTestLocator('bulk-select'), + }, + header: { + cardView: '[aria-label="card-view"]', + listView: '[aria-label="list-view"]', + sort: '[class="ant-select-selection-search-input"][aria-label="Sort"]', + sortRecentlyModifiedMenuOption: '[label="Recently modified"]', + sortAlphabeticalMenuOption: '[label="Alphabetical"]', + sortDropdown: '.Select__menu', + }, + card: { + card: dataTestLocator('styled-card'), + cardCover: '[class="ant-card-cover"]', + cardImage: '[class="gradient-container"]', + selectedStarIcon: "[aria-label='favorite-selected']", + unselectedStarIcon: "[aria-label='favorite-unselected']", + starIcon: dataTestLocator('fave-unfave-icon'), + }, + deleteModal: { + deleteInput: dataTestLocator('delete-modal-input'), + deleteButton: dataTestLocator('modal-confirm-button'), + }, + table: { + bulkSelect: { + checkboxOff: '[aria-label="checkbox-off"]', + checkboxOn: '[aria-label="checkbox-on"]', + action: dataTestLocator('bulk-select-action'), + }, + tableList: dataTestLocator('listview-table'), + table: '[role="rowgroup"]', + tableRowHeader: { + header: dataTestLocator('sort-header'), + unsorted: '[aria-label="sort"]', + sortAsc: '[aria-label="sort-asc"]', + sortDesc: '[aria-label="sort-desc"]', + }, + tableRow: { + row: dataTestLocator('table-row'), + rowText: dataTestLocator('cell-text'), + rowCell: dataTestLocator('table-row-cell'), + }, + }, + addChartButton: '.css-yff34v', +}; +export const nativeFilters = { + modal: { + container: '.ant-modal', + footer: '.ant-modal-footer', + saveButton: dataTestLocator('native-filter-modal-save-button'), + cancelButton: dataTestLocator('native-filter-modal-cancel-button'), + yesCancelButton: '[type="button"]', + alertXUnsavedFilters: '.ant-alert-message', + tabsList: { + tabsContainer: '[class="ant-tabs-nav-list"]', + tab: '.ant-tabs-tab', + removeTab: '[aria-label="trash"]', + }, + addFilter: dataTestLocator('add-filter-button'), + }, + filtersPanel: { + filterName: dataTestLocator('filters-config-modal__name-input'), + datasetName: dataTestLocator('filters-config-modal__datasource-input'), + filterInfoInput: '.ant-select-selection-search-input', + inputDropdown: '.ant-select-item-option-content', + columnEmptyInput: '.ant-select-selection-placeholder', + filterTypeInput: dataTestLocator('filters-config-modal__filter-type'), + fieldInput: dataTestLocator('field-input'), + }, + filterFromDashboardView: { + expand: dataTestLocator('filter-bar__expand-button'), + collapse: dataTestLocator('filter-bar__collapse-button'), + filterName: dataTestLocator('filter-control-name'), + }, + createFilterButton: dataTestLocator('filter-bar__create-filter'), + removeFilter: '[aria-label="remove"]', + filterConfigurationSections: { + collapseExpandButton: '.ant-collapse-arrow', + checkedCheckbox: '.ant-checkbox-wrapper-checked', + infoTooltip: '[aria-label="Show info tooltip"]', + parentFilterInput: dataTestLocator('parent-filter-input'), + }, + filtersList: { + list: '.ant-tabs-nav-list', + listItemNotActive: '[class="ant-tabs-tab ant-tabs-tab-with-remove"]', + listItemActive: + '[class="ant-tabs-tab ant-tabs-tab-with-remove ant-tabs-tab-active"]', + removeIcon: '[aria-label="trash"]', + }, + filterItem: dataTestLocator('form-item-value'), + filterItemDropdown: '.ant-select-selection-search', + applyFilter: dataTestLocator('filter-bar__apply-button'), + defaultInput: dataTestLocator('default-input'), + filterIcon: dataTestLocator('filter-icon'), +}; +export const dashboardListView = { + dashboardListView: dataTestLocator('dashboard-list-view'), + editItemAction: dataTestLocator('edit-alt'), + filtersBar: { + searchField: dataTestLocator('filters-search'), + }, + top: { + bulkSelect: dataTestLocator('bulk-select'), + }, + card: { + card: dataTestLocator('styled-card'), + cardCover: '[class="ant-card-cover"]', + cardImage: '[class="gradient-container"]', + selectedStarIcon: "[aria-label='favorite-selected']", + unselectedStarIcon: "[aria-label='favorite-unselected']", + starIcon: dataTestLocator('fave-unfave-icon'), + }, + deleteModal: { + deleteInput: dataTestLocator('delete-modal-input'), + deleteButton: dataTestLocator('modal-confirm-button'), + }, + table: { + starIcon: dataTestLocator('fave-unfave-icon'), + selectedStarIcon: "[aria-label='favorite-selected']", + unselectedStarIcon: "[aria-label='favorite-unselected']", + bulkSelect: { + checkboxOff: '[aria-label="checkbox-off"]', + checkboxOn: '[aria-label="checkbox-on"]', + action: dataTestLocator('bulk-select-action'), + }, + tableRow: { + sortHeader: dataTestLocator('sort-header'), + row: dataTestLocator('table-row'), + rowText: dataTestLocator('cell-text'), + rowCell: dataTestLocator('table-row-cell'), + }, + tableRowList: '[role="rowgroup"]', + tableList: dataTestLocator('listview-table'), + trashIcon: dataTestLocator('dashboard-list-trash-icon'), + }, + actions: { + importButton: dataTestLocator('import-button'), + newDashboardButton: '.css-yff34v', + }, + importModal: { + selectFileButton: '.ant-upload > .ant-btn > span', + importButton: dataTestLocator('modal-confirm-button'), + }, + header: { + cardView: '[aria-label="card-view"]', + listView: '[aria-label="list-view"]', + sort: dataTestLocator('sort-header'), + sortDropdown: '.Select__menu', + statusFilterInput: `${dataTestLocator( + 'filters-select', + )}[aria-label='Status']`, + ownerFilterInput: `${dataTestLocator( + 'filters-select', + )}[aria-label='Owner']`, + createdByFilterInput: `${dataTestLocator( + 'filters-select', + )}[aria-label='Created by']`, + FavoriteFilterInput: `${dataTestLocator( + 'filters-select', + )}[aria-label='Favorite']`, + searchFilterInput: `${dataTestLocator( + 'filters-search', + )}[name='dashboard_title']`, + draftStatusFilterOption: "[title='Draft']", + }, +}; +export const exploreView = { + openDatasourceMenu: dataTestLocator('open-datasource-tab'), + sectionsHeader: '.ant-collapse-header', + datasourceMenuThreeDots: dataTestLocator('datasource-menu-trigger'), + threeDotsMenuDropdown: { + editDataset: dataTestLocator('edit-dataset'), + }, + chartContainer: dataTestLocator('chart-container'), + chartHeading: { + queryMenu: '#query', + viewQueryButton: dataTestLocator('view-query-menu-item'), + shortLinkButton: dataTestLocator('short-link-button'), + embedCodeButton: dataTestLocator('embed-code-button'), + }, + chartAreaItem: '.nv-legend-text', + viewQueryModal: { + container: '.ant-modal-content', + closeButton: 'button.ant-modal-close', + }, + embedCodeModal: { + container: dataTestLocator('embed-code-popover'), + textfield: dataTestLocator('embed-code-textarea'), + }, + saveModal: { + modal: '.ant-modal-content', + chartNameInput: dataTestLocator('new-chart-name'), + dashboardNameInput: '#dashboard-creatable-select', + addToDashboardInput: dataTestLocator( + 'save-chart-modal-select-dashboard-form', + ), + saveButton: dataTestLocator('btn-modal-save'), + saveAsCircle: dataTestLocator('saveas-radio'), + overwriteCircle: dataTestLocator('save-overwrite-radio'), + }, + controlPanel: { + panel: dataTestLocator('control-tabs'), + categoryArea: '.ant-collapse-content-box', + dragField: dataTestLocator('datasource'), + metricsField: dataTestLocator('metrics'), + optionField: dataTestLocator('option-label'), + fieldInput: '.Select__control input', + removeFieldValue: dataTestLocator('remove-control-button'), + addFieldValue: '[aria-label="plus-small"]', + vizType: dataTestLocator('visualization-type'), + runButton: dataTestLocator('run-query-button'), + saveQuery: dataTestLocator('query-save-button'), + fieldValue: dataTestLocator('control-label'), + addMetricModal: { + container: dataTestLocator('metrics-edit-popover'), + metricNameEdit: { + editButton: dataTestLocator('AdhocMetricEditTitle#trigger'), + input: dataTestLocator('AdhocMetricEditTitle#input'), + }, + simpleTab: { + tab: '#adhoc-metric-edit-tabs-tab-SIMPLE', + columnInput: '[name="select-column"]', + aggregateInput: '[name="select-aggregate"]', + }, + customSQLTab: { + tab: '#adhoc-metric-edit-tabs-tab-SQL', + inputContainerField: '.ace_content', + input: '.ace_text-input', + }, + saveButton: dataTestLocator('AdhocMetricEdit#save'), + }, + querySection: { + groupByField: dataTestLocator('groupby'), + filtersField: dataTestLocator('adhoc_filters'), + filterValue: dataTestLocator('adhoc-filter-simple-value'), + filterModal: { + customSQL: { + tab: '#adhoc-filter-edit-tabs-tab-SQL', + inputArea: '.ace_content', + input: '.ace_text-input', + }, + simple: { + tab: '#adhoc-filter-edit-tabs-tab-SIMPLE', + }, + container: dataTestLocator('filter-edit-popover'), + saveButton: dataTestLocator('adhoc-filter-edit-popover-save-button'), + }, + }, + annotationLayerSection: { + addAnnotationLayer: dataTestLocator('annotation_layers'), + addAnnotationLayerModal: { + container: dataTestLocator('popover-content'), + name: dataTestLocator('annotation-layer-name-header'), + formula: dataTestLocator('annotation-layer-value-header'), + input: dataTestLocator(''), + }, + }, + timeSection: { + timeRangeFilter: dataTestLocator('time-range-trigger'), + timeRangeFilterModal: { + container: '.ant-popover-content', + footer: '.footer', + cancelButton: dataTestLocator('cancel-button'), + configureLastTimeRange: { + container: '.ant-radio-group', + checkedItem: '.ant-radio-checked + span', + }, + configureCustomTimeRange: { + container: dataTestLocator('custom-frame'), + timeInput: '.ant-input-number-input-wrap > input', + }, + configureNoFilterTimeRange: { + container: dataTestLocator('no-filter'), + }, + }, + }, + advancedAnalyticsSection: { + timeShift: { + container: dataTestLocator('time_compare'), + input: 'input[type=text]', + selectedValues: '.Select__multi-value__label', + }, + }, + }, + editDatasetModal: { + container: '.ant-modal-content', + datasetTabsContainer: dataTestLocator('edit-dataset-tabs'), + saveButton: dataTestLocator('datasource-modal-save'), + metricsTab: { + addItem: dataTestLocator('crud-add-table-item'), + rowsContainer: dataTestLocator('table-content-rows'), + }, + confirmModal: { + okButton: '.ant-modal-confirm-btns .ant-btn-primary', + }, + }, + vizualizationTypeModal: { + vizTypeButton: dataTestLocator('viztype-selector-container'), + }, +}; +export const createChartView = { + chooseDatasetInput: '.ant-select-selection-search-input', + chooseDatasetOption: '.ant-select-item-option-content', + chooseDatasetList: '.rc-virtual-list-holder-inner', + tableVizType: "[alt='Table']", +}; +export const editDashboardView = { + dashboardName: dataTestLocator('dashboard-title-input'), + dashboardEditingContainer: dataTestLocator('dashboard-content'), + editComponent: dataTestLocator('new-component'), + discardChanges: dataTestLocator('discard-changes-button'), + chartBox: dataTestLocator('chart-grid-component'), + tabsList: { + tabsContainer: '[class="ant-tabs-nav-list"]', + tab: '.ant-tabs-tab', + }, +}; +export const dashboardView = { + dashboardContainer: dataTestLocator('grid-container'), + saveModal: { + modal: '.ant-modal-content', + dashboardNameInput: '.ant-input', + saveButton: dataTestLocator('modal-save-dashboard-button'), + }, + dashboardProperties: { + modal: '.ant-modal-content', + dashboardTitleInput: dataTestLocator('dashboard-title-input'), + modalButton: '[type="button"]', + }, + chart: { + trashIcon: dataTestLocator('dashboard-delete-component-button'), + refreshChart: dataTestLocator('refresh-chart-menu-item'), + }, + threeDotsMenuIcon: '#save-dash-split-button', + threeDotsMenuDropdown: dataTestLocator('header-actions-menu'), + refreshDashboard: dataTestLocator('refresh-dashboard-menu-item'), + saveAsMenuOption: dataTestLocator('save-as-menu-item'), + dashboardTab: dataTestLocator('dragdroppable-object'), + salesDashboardSpecific: { + vehicleSalesFilterTimeRange: dataTestLocator('time-range-trigger'), + secondTabSalesDashboard: dataTestLocator('dragdroppable-object'), + }, + timeRangeModal: { + rangeTypeField: '.ant-select-selection-item', + startTimeInputNumber: '.ant-input-number-input', + datePicker: '.ant-picker-input', + applyButton: dataTestLocator('date-filter-control__apply-button'), + radioGroup: '.ant-radio-group', + radioButton: '.ant-radio', + finalFilterRangePreviewCustom: + '.css-c2bup7 > :nth-child(6) > :nth-child(2)', + finalFilterRangePreviewLast: '.css-c2bup7 > :nth-child(7) > :nth-child(2)', + finalFilterRangePreviewPrevious: + '.css-c2bup7 > :nth-child(7) > :nth-child(2)', + }, + treeMapChartModal: { + selectItem: '.Select_control', + selectItemInput: '.Select__control input[type=text]', + applyButton: '.filter_box button:not(:disabled)', + clearItemIcon: '.Select__clear-indicator', + }, + sliceThreeDots: '[aria-label="More Options"]', + sliceThreeDotsDropdown: '[role="menu"]', + editDashboardButton: '[aria-label=edit-alt]', + starIcon: dataTestLocator('fave-unfave-icon'), + dashboardHeader: dataTestLocator('dashboard-header'), + dashboardSectionContainer: dataTestLocator( + 'grid-row-background--transparent', + ), + markdownEditor: dataTestLocator('dashboard-markdown-editor'), + dashboardComponent: dataTestLocator('dashboard-component-chart-holder'), + tabsList: { + tabsContainer: dataTestLocator('dashboard-component-tabs'), + tabsNavList: dataTestLocator('nav-list'), + tabs: '.ant-tabs-nav-list', + tab: '.ant-tabs-tab', + }, +}; diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index e4356c6d2a1b9..c7566d34c4fe1 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -16,35 +16,35 @@ "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@superset-ui/chart-controls": "^0.18.15", - "@superset-ui/core": "^0.18.15", - "@superset-ui/legacy-plugin-chart-calendar": "^0.18.15", - "@superset-ui/legacy-plugin-chart-chord": "^0.18.15", - "@superset-ui/legacy-plugin-chart-country-map": "^0.18.15", - "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.15", - "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.15", - "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.15", - "@superset-ui/legacy-plugin-chart-histogram": "^0.18.15", - "@superset-ui/legacy-plugin-chart-horizon": "^0.18.15", - "@superset-ui/legacy-plugin-chart-map-box": "^0.18.15", - "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.15", - "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.15", - "@superset-ui/legacy-plugin-chart-partition": "^0.18.15", - "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.15", - "@superset-ui/legacy-plugin-chart-rose": "^0.18.15", - "@superset-ui/legacy-plugin-chart-sankey": "^0.18.15", - "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.15", - "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.15", - "@superset-ui/legacy-plugin-chart-treemap": "^0.18.15", - "@superset-ui/legacy-plugin-chart-world-map": "^0.18.15", - "@superset-ui/legacy-preset-chart-big-number": "^0.18.15", - "@superset-ui/legacy-preset-chart-deckgl": "^0.4.12", - "@superset-ui/legacy-preset-chart-nvd3": "^0.18.15", - "@superset-ui/plugin-chart-echarts": "^0.18.15", - "@superset-ui/plugin-chart-pivot-table": "^0.18.15", - "@superset-ui/plugin-chart-table": "^0.18.15", - "@superset-ui/plugin-chart-word-cloud": "^0.18.15", - "@superset-ui/preset-chart-xy": "^0.18.15", + "@superset-ui/chart-controls": "^0.18.19", + "@superset-ui/core": "^0.18.19", + "@superset-ui/legacy-plugin-chart-calendar": "^0.18.19", + "@superset-ui/legacy-plugin-chart-chord": "^0.18.19", + "@superset-ui/legacy-plugin-chart-country-map": "^0.18.19", + "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.19", + "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.19", + "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-histogram": "^0.18.19", + "@superset-ui/legacy-plugin-chart-horizon": "^0.18.19", + "@superset-ui/legacy-plugin-chart-map-box": "^0.18.19", + "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.19", + "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.19", + "@superset-ui/legacy-plugin-chart-partition": "^0.18.19", + "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/legacy-plugin-chart-rose": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.19", + "@superset-ui/legacy-plugin-chart-treemap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-world-map": "^0.18.19", + "@superset-ui/legacy-preset-chart-big-number": "^0.18.19", + "@superset-ui/legacy-preset-chart-deckgl": "^0.4.13", + "@superset-ui/legacy-preset-chart-nvd3": "^0.18.19", + "@superset-ui/plugin-chart-echarts": "^0.18.19", + "@superset-ui/plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/plugin-chart-table": "^0.18.19", + "@superset-ui/plugin-chart-word-cloud": "^0.18.19", + "@superset-ui/preset-chart-xy": "^0.18.19", "@vx/responsive": "^0.0.195", "abortcontroller-polyfill": "^1.1.9", "antd": "^4.9.4", @@ -87,7 +87,7 @@ "query-string": "^6.13.7", "re-resizable": "^6.6.1", "react": "^16.13.1", - "react-ace": "^5.10.0", + "react-ace": "^9.4.4", "react-checkbox-tree": "^1.5.1", "react-color": "^2.13.8", "react-datetime": "^3.0.4", @@ -11788,12 +11788,12 @@ } }, "node_modules/@superset-ui/chart-controls": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.15.tgz", - "integrity": "sha512-vIZTmQO9hlv7ZE4wpU02MTMiCD37h9tmu0gyV7ug+5ZYAPDUfpbLtX7nRblhklOSH+cNGFYvM9augAO5pwS9KQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.19.tgz", + "integrity": "sha512-Bn8FW9EhxivnRf/EBVjdjRHhDUzAB6mbUDgmthgKXn8u8un/W2R/SrV1kOKYDNn+BGM/ijZuqX439UZeNv70Ug==", "dependencies": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/core": "0.18.15", + "@superset-ui/core": "0.18.19", "lodash": "^4.17.15", "prop-types": "^15.7.2" }, @@ -11806,9 +11806,9 @@ } }, "node_modules/@superset-ui/core": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.15.tgz", - "integrity": "sha512-LddEzL6T0xH/JOTWXls6tKYg6KXlUG1RQYCm8ijCarOhKVQ6JOxhVFwYn3Df2msaKBpsByItLzepct0u8y5P6g==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.19.tgz", + "integrity": "sha512-DDdf1KNYkUl+xerZpb6H8KYp+2rDcSEdSEOSSMJFeCd7j183ZSz7UNIGpjjRnz3GInqC9ypTNboxmR7mWoXb1w==", "dependencies": { "@babel/runtime": "^7.1.2", "@types/d3-format": "^1.3.0", @@ -11893,12 +11893,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-calendar": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.15.tgz", - "integrity": "sha512-tFGANSjDj25UXQ6X+y9kl+/0Wcer8LafGd1+JO/e3KuUgY2qu5Cm+Akg+mTgju4c9Kvl1V5dD0HvgsZd+/6fSQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.19.tgz", + "integrity": "sha512-nYWM35/2eoJQ8IKKUZ0XdDngm7E3DX+IjvTlZGcqhN8p2qq7mSLhrQ3QB+oyMBfC6wKMBd2UET9ncRGPRjjbLQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-selection": "^1.4.0", "d3-tip": "^0.9.1", @@ -11917,24 +11917,24 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-chord": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.15.tgz", - "integrity": "sha512-wdmgiB9mMnhZ1lPzAt6iRtsh8hierJri+QlwFI9yZitQjibWCm1STTaLGNJP7ldjmeR6KWFExI8XFIgFf75rqw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.19.tgz", + "integrity": "sha512-phLNZU4lTvMLb0Q45bVxQ3V+xLbCmpHRZ0yWCaR7WQmaU2ExtQmuKSPjKcyhCahqZE6l4T5RLSpWGDBcatJ5hQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2", "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-country-map": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.15.tgz", - "integrity": "sha512-Saw1rhuw1QVS+OJE0ThY8o+W6IE2VzP8OkSLxKCU5GItPUpNZLCUGGKCeIMJMZT+iFHCHolL/lkiGFq4gdY1+g==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.19.tgz", + "integrity": "sha512-UEKSvR5prV2KYnpm0REgRhFidNTuQ6NUCyZhmNQBZu68pQ93ePhUqI2UtZTdHmRnRxBZYEHOpbZpVLlGezlV0A==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.0.3", "prop-types": "^15.6.2" @@ -11949,13 +11949,13 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-event-flow": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.15.tgz", - "integrity": "sha512-VohJMgUwqLtTGQ+r/A45iOTONiy9jnY1j9RaijmMzpUqUKwZcVuNiVKTnBN1GgkYkQITCvhBzN6DPNwxHtfDMA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.19.tgz", + "integrity": "sha512-zdyKIYh5CdOXHiO4C0Nhkn7CMV6+UqmL8r4RawM3H6Xc1eqajdrOgu9iGPSYKYDqLwlZR3EWuUMZIxTYTM1gpA==", "dependencies": { "@data-ui/event-flow": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "prop-types": "^15.6.2" }, "peerDependencies": { @@ -11963,12 +11963,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-force-directed": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.15.tgz", - "integrity": "sha512-gFto+V7b3TVNGtxcQOXg6Zd/0CCsG+gQc7mSXZlW6aOhf9+6l7qH4SN2k3cFT1NkgH/tynGk0sFIO+hkk/x75g==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.19.tgz", + "integrity": "sha512-i3CzVzxYZ8R9soAOytan4brlTs1Oo2n//IJmhXYT45PZI6m0mf4T2TBtGU7hAIyKLx3zFe1/OYTXRbaBLrM5Jw==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" }, @@ -11977,12 +11977,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-heatmap": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.15.tgz", - "integrity": "sha512-tEp9LJ4pnjDFge2E8medlTURJ7YQaQBNfT+s37XW9ux2tYVxICtzDxWdhti1hoz5Zfgy10qdjt2cIDqKFrANwA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.19.tgz", + "integrity": "sha512-TJ8ri24VKq67XiGjTapeGN1Tq//h6DnnCGvQUxdnwBwhKzTKqglxf9t2MOO+GnKVm4LTtXAM1gVXXZDzZClA/g==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-svg-legend": "^1.x", "d3-tip": "^0.9.1", @@ -11990,14 +11990,14 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-histogram": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.15.tgz", - "integrity": "sha512-uClETJ4P/nPWD8A4CBQOUAyGI86mpsV+Jg/gMV3SiHxtGrOr4WYHP3nH9UygQ/Z3vW1lFD4Wz7yt1VKoiUxi0A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.19.tgz", + "integrity": "sha512-nrV1as8N0xsITaGxjDtaFTj95Hgzd8kcdxF/hxU/ZeFG5poo67DIqY21IGACL4nyx4yviwqkOBJEJ2/eSso4Eg==", "dependencies": { "@data-ui/histogram": "^0.0.84", "@data-ui/theme": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/legend": "^0.0.198", "@vx/responsive": "^0.0.199", "@vx/scale": "^0.0.197", @@ -12075,12 +12075,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-horizon": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.15.tgz", - "integrity": "sha512-9SFEx3dijyifwlLRby3uzW1tdmWUw4ZhfPgageg6l3G6a9qgs1uUyv8kb+LZJqu4t4Ppy3HT4RyGlhlc/jCyqw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.19.tgz", + "integrity": "sha512-GEUeeEuBVN2fA7g0oDmKijWI3y+H+DWmX5WMr76CyTL0mKcQ3k2HvtV4N1mULugtnXDCnGO74Lae1Uhbrk2BwQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-scale": "^3.0.1", "prop-types": "^15.6.2" @@ -12118,12 +12118,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-map-box": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.15.tgz", - "integrity": "sha512-E5uIj4xX9j5wheQ5fOA8i2MEoP1SoTqWQnnjoxLOO8YzACbXoFZNk0SSg4aEJeShhheOHvC9rH0l05QGzDX41A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.19.tgz", + "integrity": "sha512-kATV3Wg39GSgi8WQtIXrYyyZA8AXY2rSPNsYjL/OtlJFsmLVwoo8gLRPNs2w8NwKz5M2nx4iL9mEUcSsm4n+FQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "mapbox-gl": "^0.53.0", "prop-types": "^15.6.2", "react-map-gl": "^4.0.10", @@ -12135,12 +12135,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-paired-t-test": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.15.tgz", - "integrity": "sha512-X9G07mKTzOSyIfhkuX58esjsnelM6qFQy7/w9TID0IZ07G1PIfZ9hluboX60cfS9cRi1NTIJ/tlAVcugafxPgw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.19.tgz", + "integrity": "sha512-9gmNLLdu4hV03NbzlTWZwO2JoF3IA67WP/9nzAG1vchRoIBKWvapjFrbqIb3D6acmLIjB9Trujk2oMVvIQhBnQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "distributions": "^1.0.0", "prop-types": "^15.6.2", "reactable": "^1.1.0" @@ -12150,12 +12150,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-parallel-coordinates": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.15.tgz", - "integrity": "sha512-DAULeh1X25AYoci2x8v5ImImKnKkecits8/qZTSp/7uc5On+T/y27nWk1f+rEqDqO1Pz0MfgSWC0On0fKSPHVA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.19.tgz", + "integrity": "sha512-T5YBNoBEIy3JxRZKgYPc8mXVTqrXjLanz5MQIpbogwNljhxKhASPBVKTlfChnv8oASAs0rxDqFHUWd48egaa5A==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" }, @@ -12164,12 +12164,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-partition": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.15.tgz", - "integrity": "sha512-WpXmNcKIUuPJyHXSq033PKN/6TFgJtk1MD/GbXgTJPeFgBEbrvwJ1fC4qoEsOO9UcVegXvBtl7lgMiUuJb6smQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.19.tgz", + "integrity": "sha512-YHXAR2XF3PLS50KKin8ou2HaVLPsSVwaQ0WXkA+iW2thVCf6OP1BGXBwEDDHtSdL0A46UE8PLCEh5y20AP/eDw==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-hierarchy": "^1.1.8", "prop-types": "^15.6.2" @@ -12179,24 +12179,24 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-pivot-table": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.15.tgz", - "integrity": "sha512-FkhCGBa91LCljFBM/jNi0CcDUTFYE5Kw43YN7VzYJVA/IvGZqkCm9UZaamOk/itGxd2liRW4LpXv6XbDoOZWwg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-OVTQ/+lKL0F8/cxviLGtXUlMhhv+Lxpt1sFP1xDf39IOMZIcI4YYHdKJmTQiBDXG9+gTKkLhMnylfvPzDPGkng==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "datatables.net-bs": "^1.11.3", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-rose": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.15.tgz", - "integrity": "sha512-omsWIbne4Z5NNNUS9oF4K6VWspeiEw/pRmvLGyOlTedIl1B32P9/yQIvsItHGSU56XuK9E0ZMHdlzJ+TbANwgw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.19.tgz", + "integrity": "sha512-s4vfSeYUoI7dU1Zl7B7ddUDzZsahVwYJMXjQUY2NtpE71HGBCMINwnVGIc8hIHXwv2NyfdgAS2pzP9A0wv0TvA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "nvd3": "1.8.6", "prop-types": "^15.6.2" @@ -12206,12 +12206,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-sankey": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.15.tgz", - "integrity": "sha512-KEtc0YzdHyVXj3yQeDGX20Bn0voov2mH+LZtSiZWUTe43Y/BqVoKKyzTRH+NX77kb2CYehByHQYIJDUeag8KtA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.19.tgz", + "integrity": "sha512-0GUZARVhX5CEv8DY0YXMRm/4zttJOh77tP2wT7jWXHZtUdhYh6MjP08U4hZ98WuNpk/A6/dQtCkXE4Dy2GlPYQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-sankey": "^0.4.2", "prop-types": "^15.6.2" @@ -12221,47 +12221,47 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-sankey-loop": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.15.tgz", - "integrity": "sha512-Uog6FJYiIJVxIq36RbBRBUAwq52/LJHKvulBKCi2/0Xs9pTd/lkdYZGIyV9bZ4os8rn5fo5Ymn3zODniUUpabA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.19.tgz", + "integrity": "sha512-Do+K8ouCPLSLuILMpwm1FffPW/m0mRXtczjUjglpphajzdYjKh03dR1cMBc31AzOFQ2JBSbOLDKfT5cYYELTng==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-sankey-diagram": "^0.7.3", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-sunburst": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.15.tgz", - "integrity": "sha512-dnqS0iiny2YMyG6fiVC8JJNVz4iIyfM6fosX9szprYh/E0gJyJb5nVqBFlO2Z67FH98lIY4IxWeJieHhm60jvA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.19.tgz", + "integrity": "sha512-V3auS9QP61ewFaFcjUVQbo4ejb6hKV52eWZcAOIeelfPP+3OOGd78ZUvV/0ubk3llVexfP49Oq51Xj13smLRjA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-treemap": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.15.tgz", - "integrity": "sha512-bAu/IVUtGvapPADqBht1pMifeAiyufgeT8NtIgqLKt/aOCQxSQusu6vzb/3a0iHOw/ahLV74f1EbzaoS5dA98w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.19.tgz", + "integrity": "sha512-M4njV3Fu1dDzo3zB47CKV2A3UY9//ucjndY4mqRJk6MoI+4DKMXyJV+9vLYApmsEX30enRSHwTTXb1koCS971g==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-hierarchy": "^1.1.8", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-world-map": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.15.tgz", - "integrity": "sha512-+adqw5xMRJSJQwRkdFyZQmDgrFSF8aoGHQxUuoJW9rTI+M2m96cI8Icd7RytRAiTrAf/osKsXgaA06i/MPBUPQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.19.tgz", + "integrity": "sha512-YrUJZ82IGSyU4VKOJ3cPRT5hBDGBgxY6FmFwN0R4RClZ4ftj9i11BqvpWYHnI9zUwk3nu0HH2Yd7NfDGWuCzTQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.4.0", "d3-color": "^1.4.1", @@ -12281,13 +12281,13 @@ } }, "node_modules/@superset-ui/legacy-preset-chart-big-number": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.15.tgz", - "integrity": "sha512-/7DL6914g47+X/ruTnJQ7sXHCsYpTdbmspq8fhiIGCf/YUtkmjAZGv+2nsXbck9MFGCjFNsXm0LWnf6SxHZyKQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.19.tgz", + "integrity": "sha512-8ujIoWDX39yV5nsh5iVQSvM5sbVrEX0j+zvohp0QzXkTa1tFFz1Qd4FrD0jhg3z0IzoeFWHzUMTHoVuDVzAbig==", "dependencies": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-color": "^1.2.2", "@types/shortid": "^0.0.29", "d3-color": "^1.2.3", @@ -12298,9 +12298,9 @@ } }, "node_modules/@superset-ui/legacy-preset-chart-deckgl": { - "version": "0.4.12", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-deckgl/-/legacy-preset-chart-deckgl-0.4.12.tgz", - "integrity": "sha512-CUsByr8rBlgtMHFMVcnHdhn4jv8yB1WB+Q6uMmqLSo44d3cziFuw3oq4Ura/OpZXeUhJMfOcBhh6mV62EC67qQ==", + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-deckgl/-/legacy-preset-chart-deckgl-0.4.13.tgz", + "integrity": "sha512-SRyAQ5NgcqCkhkOXsnzX7+GdapUzEgD5eFEvkC+4DHgUuxQv2M1nxWhDIQ31mq3MCfygqdaY8GwR74vsHHg5Zg==", "dependencies": { "@math.gl/web-mercator": "^3.2.2", "@types/d3-array": "^2.0.0", @@ -12463,13 +12463,13 @@ } }, "node_modules/@superset-ui/legacy-preset-chart-nvd3": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.15.tgz", - "integrity": "sha512-etydJRsfLgp/19sndbirb2ZXFvaiJEOxLZ5gjWvIQA4HXdFN9Nd0B/VQw4+GW3yH7gxNrLgKOAARcdGSErIaUw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.19.tgz", + "integrity": "sha512-cCiCWmkDY09bBHrB/VT4S/2NQt5uQhiBorYwrCYc7Jx3nqfZQu81xQ1r4zzu/FETQaH4OLj+qK8iTYqP2pvnAg==", "dependencies": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-tip": "^0.9.1", "dompurify": "^2.0.6", @@ -12485,14 +12485,14 @@ } }, "node_modules/@superset-ui/plugin-chart-echarts": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.15.tgz", - "integrity": "sha512-GB7MHb4rNNSNDDG0So1AhF3Q3NB+aobIZKd/HegDHecONsA0AR9oq2oMA3Uq1XozUBsWIHvUdVaUFxArAdn4rw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.19.tgz", + "integrity": "sha512-qYNM//6b5+EewIejs+jSn76plahDFPlwHtyX1v0k2+WaSZM6GguT7sYW8a2dFG6mW4Jz7EchCSHwk7fs5DN7Iw==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^1.2.0", - "echarts": "^5.2.1", + "echarts": "^5.2.2", "lodash": "^4.17.15" }, "peerDependencies": { @@ -12500,12 +12500,12 @@ } }, "node_modules/@superset-ui/plugin-chart-pivot-table": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.15.tgz", - "integrity": "sha512-MacxTyeRUg4TgOOPLH6ZJgMAFsSBkJAcp2kHsbTYO93gYSxv8VM3GEaI2GWMkd9IvGDnlU3DS/ZVwYP+gi8rBg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-O3uqG6MSUaz/znxVeVI/fy8pzc72RHX5yCW7zn13Mny4bi1pZ76tgQ/JqGThwhuQC4U2fPM8ss6/fMoAyO0TJA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@superset-ui/react-pivottable": "^0.12.12" }, "peerDependencies": { @@ -12515,13 +12515,13 @@ } }, "node_modules/@superset-ui/plugin-chart-table": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.15.tgz", - "integrity": "sha512-fVNqUVNTob9wam4rbSFFcLZh/gqgtsA2RPnFTV8kLcrty3dBQLb/rIL9W1TYWsLGPzfbYc7j3ubcCyL0H69Mgw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.19.tgz", + "integrity": "sha512-0lLvaYK4KHd6IX8DnWY20Oh2nzGbNDX6cJF3+C/w+S26xYGhYS6Ie8O1r6XxrL8YQdZPCY+oBWEAhIm7dKCtnw==", "dependencies": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-array": "^2.9.0", "@types/react-table": "^7.0.29", "d3-array": "^2.4.0", @@ -12546,12 +12546,12 @@ } }, "node_modules/@superset-ui/plugin-chart-word-cloud": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.15.tgz", - "integrity": "sha512-Pmnyg8Ho1pZHmVlNQLknPeUNMJsKKDYypBIpuR+2RP5oQUoJniBJmfSIusgvVS5/RhWrJQSXAPD3quaw12XgeQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.19.tgz", + "integrity": "sha512-5VUg/rW2dAvYfcKC0cDCQtzebDExhdGAs9qlZfZIo3pqLBU0gVHleKP6ZVaw5cDUIKNjfyXifZdIn73EC0cdPA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-cloud": "^1.2.1", "@types/d3-scale": "^2.0.2", "d3-cloud": "^1.2.5", @@ -12592,14 +12592,14 @@ } }, "node_modules/@superset-ui/preset-chart-xy": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.15.tgz", - "integrity": "sha512-MP6dyO3l0tiPsPdGN5KJkeHPekG1akvgdBrRZCHzHDAlHaVeC2x797Rj5TXUyxFI/Fsw4SlBZ2Ro/swuk3bLOg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.19.tgz", + "integrity": "sha512-7DBTnd4x0jRyxMW0hhdjHKyRpH1odXJWiwbMdUIPMyd1xMiOnYMo22vfiU3u9Iz+wdsBzfCIWE7g2eFEkA+NiA==", "dependencies": { "@data-ui/theme": "^0.0.84", "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/axis": "^0.0.198", "@vx/legend": "^0.0.198", "@vx/scale": "^0.0.197", @@ -15643,6 +15643,11 @@ "node": ">= 0.6" } }, + "node_modules/ace-builds": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.4.13.tgz", + "integrity": "sha512-SOLzdaQkY6ecPKYRDDg+MY1WoGgXA34cIvYJNNoBMGGUswHmlauU2Hy0UL96vW0Fs/LgFbMUjD+6vqzWTldIYQ==" + }, "node_modules/acorn": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", @@ -22158,6 +22163,11 @@ "node": ">=0.3.1" } }, + "node_modules/diff-match-patch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", + "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==" + }, "node_modules/diff-sequences": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", @@ -22514,9 +22524,9 @@ } }, "node_modules/echarts": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.2.1.tgz", - "integrity": "sha512-OJ79b22eqRfbSV8vYmDKmA+XWfNbr0Uk/OafWcFNIGDWti2Uw9A6eVCiJLmqPa9Sk+EWL+t5v26aak0z3gxiZw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.2.2.tgz", + "integrity": "sha512-yxuBfeIH5c+0FsoRP60w4De6omXhA06c7eUYBsC1ykB6Ys2yK5fSteIYWvkJ4xJVLQgCvAdO8C4mN6MLeJpBaw==", "dependencies": { "tslib": "2.3.0", "zrender": "5.2.1" @@ -35716,18 +35726,19 @@ } }, "node_modules/react-ace": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-5.10.0.tgz", - "integrity": "sha512-aEK/XZCowP8IXq91e2DYqOtGhabk1bbjt+fyeW0UBcIkzDzP/RX/MeJKeyW7wsZcwElACVwyy9nnwXBTqgky3A==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-9.5.0.tgz", + "integrity": "sha512-4l5FgwGh6K7A0yWVMQlPIXDItM4Q9zzXRqOae8KkCl6MkOob7sC1CzHxZdOGvV+QioKWbX2p5HcdOVUv6cAdSg==", "dependencies": { - "brace": "^0.11.0", + "ace-builds": "^1.4.13", + "diff-match-patch": "^1.0.5", "lodash.get": "^4.4.2", - "lodash.isequal": "^4.1.1", - "prop-types": "^15.5.8" + "lodash.isequal": "^4.5.0", + "prop-types": "^15.7.2" }, "peerDependencies": { - "react": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0", - "react-dom": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" + "react": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0", + "react-dom": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0" } }, "node_modules/react-base16-styling": { @@ -53110,20 +53121,20 @@ } }, "@superset-ui/chart-controls": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.15.tgz", - "integrity": "sha512-vIZTmQO9hlv7ZE4wpU02MTMiCD37h9tmu0gyV7ug+5ZYAPDUfpbLtX7nRblhklOSH+cNGFYvM9augAO5pwS9KQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.19.tgz", + "integrity": "sha512-Bn8FW9EhxivnRf/EBVjdjRHhDUzAB6mbUDgmthgKXn8u8un/W2R/SrV1kOKYDNn+BGM/ijZuqX439UZeNv70Ug==", "requires": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/core": "0.18.15", + "@superset-ui/core": "0.18.19", "lodash": "^4.17.15", "prop-types": "^15.7.2" } }, "@superset-ui/core": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.15.tgz", - "integrity": "sha512-LddEzL6T0xH/JOTWXls6tKYg6KXlUG1RQYCm8ijCarOhKVQ6JOxhVFwYn3Df2msaKBpsByItLzepct0u8y5P6g==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.19.tgz", + "integrity": "sha512-DDdf1KNYkUl+xerZpb6H8KYp+2rDcSEdSEOSSMJFeCd7j183ZSz7UNIGpjjRnz3GInqC9ypTNboxmR7mWoXb1w==", "requires": { "@babel/runtime": "^7.1.2", "@types/d3-format": "^1.3.0", @@ -53200,12 +53211,12 @@ } }, "@superset-ui/legacy-plugin-chart-calendar": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.15.tgz", - "integrity": "sha512-tFGANSjDj25UXQ6X+y9kl+/0Wcer8LafGd1+JO/e3KuUgY2qu5Cm+Akg+mTgju4c9Kvl1V5dD0HvgsZd+/6fSQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.19.tgz", + "integrity": "sha512-nYWM35/2eoJQ8IKKUZ0XdDngm7E3DX+IjvTlZGcqhN8p2qq7mSLhrQ3QB+oyMBfC6wKMBd2UET9ncRGPRjjbLQ==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-selection": "^1.4.0", "d3-tip": "^0.9.1", @@ -53223,24 +53234,24 @@ } }, "@superset-ui/legacy-plugin-chart-chord": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.15.tgz", - "integrity": "sha512-wdmgiB9mMnhZ1lPzAt6iRtsh8hierJri+QlwFI9yZitQjibWCm1STTaLGNJP7ldjmeR6KWFExI8XFIgFf75rqw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.19.tgz", + "integrity": "sha512-phLNZU4lTvMLb0Q45bVxQ3V+xLbCmpHRZ0yWCaR7WQmaU2ExtQmuKSPjKcyhCahqZE6l4T5RLSpWGDBcatJ5hQ==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2", "react": "^16.13.1" } }, "@superset-ui/legacy-plugin-chart-country-map": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.15.tgz", - "integrity": "sha512-Saw1rhuw1QVS+OJE0ThY8o+W6IE2VzP8OkSLxKCU5GItPUpNZLCUGGKCeIMJMZT+iFHCHolL/lkiGFq4gdY1+g==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.19.tgz", + "integrity": "sha512-UEKSvR5prV2KYnpm0REgRhFidNTuQ6NUCyZhmNQBZu68pQ93ePhUqI2UtZTdHmRnRxBZYEHOpbZpVLlGezlV0A==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.0.3", "prop-types": "^15.6.2" @@ -53257,34 +53268,34 @@ } }, "@superset-ui/legacy-plugin-chart-event-flow": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.15.tgz", - "integrity": "sha512-VohJMgUwqLtTGQ+r/A45iOTONiy9jnY1j9RaijmMzpUqUKwZcVuNiVKTnBN1GgkYkQITCvhBzN6DPNwxHtfDMA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.19.tgz", + "integrity": "sha512-zdyKIYh5CdOXHiO4C0Nhkn7CMV6+UqmL8r4RawM3H6Xc1eqajdrOgu9iGPSYKYDqLwlZR3EWuUMZIxTYTM1gpA==", "requires": { "@data-ui/event-flow": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-force-directed": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.15.tgz", - "integrity": "sha512-gFto+V7b3TVNGtxcQOXg6Zd/0CCsG+gQc7mSXZlW6aOhf9+6l7qH4SN2k3cFT1NkgH/tynGk0sFIO+hkk/x75g==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.19.tgz", + "integrity": "sha512-i3CzVzxYZ8R9soAOytan4brlTs1Oo2n//IJmhXYT45PZI6m0mf4T2TBtGU7hAIyKLx3zFe1/OYTXRbaBLrM5Jw==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" } }, "@superset-ui/legacy-plugin-chart-heatmap": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.15.tgz", - "integrity": "sha512-tEp9LJ4pnjDFge2E8medlTURJ7YQaQBNfT+s37XW9ux2tYVxICtzDxWdhti1hoz5Zfgy10qdjt2cIDqKFrANwA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.19.tgz", + "integrity": "sha512-TJ8ri24VKq67XiGjTapeGN1Tq//h6DnnCGvQUxdnwBwhKzTKqglxf9t2MOO+GnKVm4LTtXAM1gVXXZDzZClA/g==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-svg-legend": "^1.x", "d3-tip": "^0.9.1", @@ -53292,14 +53303,14 @@ } }, "@superset-ui/legacy-plugin-chart-histogram": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.15.tgz", - "integrity": "sha512-uClETJ4P/nPWD8A4CBQOUAyGI86mpsV+Jg/gMV3SiHxtGrOr4WYHP3nH9UygQ/Z3vW1lFD4Wz7yt1VKoiUxi0A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.19.tgz", + "integrity": "sha512-nrV1as8N0xsITaGxjDtaFTj95Hgzd8kcdxF/hxU/ZeFG5poo67DIqY21IGACL4nyx4yviwqkOBJEJ2/eSso4Eg==", "requires": { "@data-ui/histogram": "^0.0.84", "@data-ui/theme": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/legend": "^0.0.198", "@vx/responsive": "^0.0.199", "@vx/scale": "^0.0.197", @@ -53367,12 +53378,12 @@ } }, "@superset-ui/legacy-plugin-chart-horizon": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.15.tgz", - "integrity": "sha512-9SFEx3dijyifwlLRby3uzW1tdmWUw4ZhfPgageg6l3G6a9qgs1uUyv8kb+LZJqu4t4Ppy3HT4RyGlhlc/jCyqw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.19.tgz", + "integrity": "sha512-GEUeeEuBVN2fA7g0oDmKijWI3y+H+DWmX5WMr76CyTL0mKcQ3k2HvtV4N1mULugtnXDCnGO74Lae1Uhbrk2BwQ==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-scale": "^3.0.1", "prop-types": "^15.6.2" @@ -53409,12 +53420,12 @@ } }, "@superset-ui/legacy-plugin-chart-map-box": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.15.tgz", - "integrity": "sha512-E5uIj4xX9j5wheQ5fOA8i2MEoP1SoTqWQnnjoxLOO8YzACbXoFZNk0SSg4aEJeShhheOHvC9rH0l05QGzDX41A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.19.tgz", + "integrity": "sha512-kATV3Wg39GSgi8WQtIXrYyyZA8AXY2rSPNsYjL/OtlJFsmLVwoo8gLRPNs2w8NwKz5M2nx4iL9mEUcSsm4n+FQ==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "mapbox-gl": "^0.53.0", "prop-types": "^15.6.2", "react-map-gl": "^4.0.10", @@ -53423,118 +53434,118 @@ } }, "@superset-ui/legacy-plugin-chart-paired-t-test": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.15.tgz", - "integrity": "sha512-X9G07mKTzOSyIfhkuX58esjsnelM6qFQy7/w9TID0IZ07G1PIfZ9hluboX60cfS9cRi1NTIJ/tlAVcugafxPgw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.19.tgz", + "integrity": "sha512-9gmNLLdu4hV03NbzlTWZwO2JoF3IA67WP/9nzAG1vchRoIBKWvapjFrbqIb3D6acmLIjB9Trujk2oMVvIQhBnQ==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "distributions": "^1.0.0", "prop-types": "^15.6.2", "reactable": "^1.1.0" } }, "@superset-ui/legacy-plugin-chart-parallel-coordinates": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.15.tgz", - "integrity": "sha512-DAULeh1X25AYoci2x8v5ImImKnKkecits8/qZTSp/7uc5On+T/y27nWk1f+rEqDqO1Pz0MfgSWC0On0fKSPHVA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.19.tgz", + "integrity": "sha512-T5YBNoBEIy3JxRZKgYPc8mXVTqrXjLanz5MQIpbogwNljhxKhASPBVKTlfChnv8oASAs0rxDqFHUWd48egaa5A==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" } }, "@superset-ui/legacy-plugin-chart-partition": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.15.tgz", - "integrity": "sha512-WpXmNcKIUuPJyHXSq033PKN/6TFgJtk1MD/GbXgTJPeFgBEbrvwJ1fC4qoEsOO9UcVegXvBtl7lgMiUuJb6smQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.19.tgz", + "integrity": "sha512-YHXAR2XF3PLS50KKin8ou2HaVLPsSVwaQ0WXkA+iW2thVCf6OP1BGXBwEDDHtSdL0A46UE8PLCEh5y20AP/eDw==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-hierarchy": "^1.1.8", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-pivot-table": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.15.tgz", - "integrity": "sha512-FkhCGBa91LCljFBM/jNi0CcDUTFYE5Kw43YN7VzYJVA/IvGZqkCm9UZaamOk/itGxd2liRW4LpXv6XbDoOZWwg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-OVTQ/+lKL0F8/cxviLGtXUlMhhv+Lxpt1sFP1xDf39IOMZIcI4YYHdKJmTQiBDXG9+gTKkLhMnylfvPzDPGkng==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "datatables.net-bs": "^1.11.3", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-rose": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.15.tgz", - "integrity": "sha512-omsWIbne4Z5NNNUS9oF4K6VWspeiEw/pRmvLGyOlTedIl1B32P9/yQIvsItHGSU56XuK9E0ZMHdlzJ+TbANwgw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.19.tgz", + "integrity": "sha512-s4vfSeYUoI7dU1Zl7B7ddUDzZsahVwYJMXjQUY2NtpE71HGBCMINwnVGIc8hIHXwv2NyfdgAS2pzP9A0wv0TvA==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "nvd3": "1.8.6", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sankey": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.15.tgz", - "integrity": "sha512-KEtc0YzdHyVXj3yQeDGX20Bn0voov2mH+LZtSiZWUTe43Y/BqVoKKyzTRH+NX77kb2CYehByHQYIJDUeag8KtA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.19.tgz", + "integrity": "sha512-0GUZARVhX5CEv8DY0YXMRm/4zttJOh77tP2wT7jWXHZtUdhYh6MjP08U4hZ98WuNpk/A6/dQtCkXE4Dy2GlPYQ==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-sankey": "^0.4.2", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sankey-loop": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.15.tgz", - "integrity": "sha512-Uog6FJYiIJVxIq36RbBRBUAwq52/LJHKvulBKCi2/0Xs9pTd/lkdYZGIyV9bZ4os8rn5fo5Ymn3zODniUUpabA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.19.tgz", + "integrity": "sha512-Do+K8ouCPLSLuILMpwm1FffPW/m0mRXtczjUjglpphajzdYjKh03dR1cMBc31AzOFQ2JBSbOLDKfT5cYYELTng==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-sankey-diagram": "^0.7.3", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sunburst": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.15.tgz", - "integrity": "sha512-dnqS0iiny2YMyG6fiVC8JJNVz4iIyfM6fosX9szprYh/E0gJyJb5nVqBFlO2Z67FH98lIY4IxWeJieHhm60jvA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.19.tgz", + "integrity": "sha512-V3auS9QP61ewFaFcjUVQbo4ejb6hKV52eWZcAOIeelfPP+3OOGd78ZUvV/0ubk3llVexfP49Oq51Xj13smLRjA==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-treemap": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.15.tgz", - "integrity": "sha512-bAu/IVUtGvapPADqBht1pMifeAiyufgeT8NtIgqLKt/aOCQxSQusu6vzb/3a0iHOw/ahLV74f1EbzaoS5dA98w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.19.tgz", + "integrity": "sha512-M4njV3Fu1dDzo3zB47CKV2A3UY9//ucjndY4mqRJk6MoI+4DKMXyJV+9vLYApmsEX30enRSHwTTXb1koCS971g==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-hierarchy": "^1.1.8", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-world-map": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.15.tgz", - "integrity": "sha512-+adqw5xMRJSJQwRkdFyZQmDgrFSF8aoGHQxUuoJW9rTI+M2m96cI8Icd7RytRAiTrAf/osKsXgaA06i/MPBUPQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.19.tgz", + "integrity": "sha512-YrUJZ82IGSyU4VKOJ3cPRT5hBDGBgxY6FmFwN0R4RClZ4ftj9i11BqvpWYHnI9zUwk3nu0HH2Yd7NfDGWuCzTQ==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.4.0", "d3-color": "^1.4.1", @@ -53553,13 +53564,13 @@ } }, "@superset-ui/legacy-preset-chart-big-number": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.15.tgz", - "integrity": "sha512-/7DL6914g47+X/ruTnJQ7sXHCsYpTdbmspq8fhiIGCf/YUtkmjAZGv+2nsXbck9MFGCjFNsXm0LWnf6SxHZyKQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.19.tgz", + "integrity": "sha512-8ujIoWDX39yV5nsh5iVQSvM5sbVrEX0j+zvohp0QzXkTa1tFFz1Qd4FrD0jhg3z0IzoeFWHzUMTHoVuDVzAbig==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-color": "^1.2.2", "@types/shortid": "^0.0.29", "d3-color": "^1.2.3", @@ -53567,9 +53578,9 @@ } }, "@superset-ui/legacy-preset-chart-deckgl": { - "version": "0.4.12", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-deckgl/-/legacy-preset-chart-deckgl-0.4.12.tgz", - "integrity": "sha512-CUsByr8rBlgtMHFMVcnHdhn4jv8yB1WB+Q6uMmqLSo44d3cziFuw3oq4Ura/OpZXeUhJMfOcBhh6mV62EC67qQ==", + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-deckgl/-/legacy-preset-chart-deckgl-0.4.13.tgz", + "integrity": "sha512-SRyAQ5NgcqCkhkOXsnzX7+GdapUzEgD5eFEvkC+4DHgUuxQv2M1nxWhDIQ31mq3MCfygqdaY8GwR74vsHHg5Zg==", "requires": { "@math.gl/web-mercator": "^3.2.2", "@types/d3-array": "^2.0.0", @@ -53714,13 +53725,13 @@ } }, "@superset-ui/legacy-preset-chart-nvd3": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.15.tgz", - "integrity": "sha512-etydJRsfLgp/19sndbirb2ZXFvaiJEOxLZ5gjWvIQA4HXdFN9Nd0B/VQw4+GW3yH7gxNrLgKOAARcdGSErIaUw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.19.tgz", + "integrity": "sha512-cCiCWmkDY09bBHrB/VT4S/2NQt5uQhiBorYwrCYc7Jx3nqfZQu81xQ1r4zzu/FETQaH4OLj+qK8iTYqP2pvnAg==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-tip": "^0.9.1", "dompurify": "^2.0.6", @@ -53733,35 +53744,35 @@ } }, "@superset-ui/plugin-chart-echarts": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.15.tgz", - "integrity": "sha512-GB7MHb4rNNSNDDG0So1AhF3Q3NB+aobIZKd/HegDHecONsA0AR9oq2oMA3Uq1XozUBsWIHvUdVaUFxArAdn4rw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.19.tgz", + "integrity": "sha512-qYNM//6b5+EewIejs+jSn76plahDFPlwHtyX1v0k2+WaSZM6GguT7sYW8a2dFG6mW4Jz7EchCSHwk7fs5DN7Iw==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^1.2.0", - "echarts": "^5.2.1", + "echarts": "^5.2.2", "lodash": "^4.17.15" } }, "@superset-ui/plugin-chart-pivot-table": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.15.tgz", - "integrity": "sha512-MacxTyeRUg4TgOOPLH6ZJgMAFsSBkJAcp2kHsbTYO93gYSxv8VM3GEaI2GWMkd9IvGDnlU3DS/ZVwYP+gi8rBg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-O3uqG6MSUaz/znxVeVI/fy8pzc72RHX5yCW7zn13Mny4bi1pZ76tgQ/JqGThwhuQC4U2fPM8ss6/fMoAyO0TJA==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@superset-ui/react-pivottable": "^0.12.12" } }, "@superset-ui/plugin-chart-table": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.15.tgz", - "integrity": "sha512-fVNqUVNTob9wam4rbSFFcLZh/gqgtsA2RPnFTV8kLcrty3dBQLb/rIL9W1TYWsLGPzfbYc7j3ubcCyL0H69Mgw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.19.tgz", + "integrity": "sha512-0lLvaYK4KHd6IX8DnWY20Oh2nzGbNDX6cJF3+C/w+S26xYGhYS6Ie8O1r6XxrL8YQdZPCY+oBWEAhIm7dKCtnw==", "requires": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-array": "^2.9.0", "@types/react-table": "^7.0.29", "d3-array": "^2.4.0", @@ -53783,12 +53794,12 @@ } }, "@superset-ui/plugin-chart-word-cloud": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.15.tgz", - "integrity": "sha512-Pmnyg8Ho1pZHmVlNQLknPeUNMJsKKDYypBIpuR+2RP5oQUoJniBJmfSIusgvVS5/RhWrJQSXAPD3quaw12XgeQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.19.tgz", + "integrity": "sha512-5VUg/rW2dAvYfcKC0cDCQtzebDExhdGAs9qlZfZIo3pqLBU0gVHleKP6ZVaw5cDUIKNjfyXifZdIn73EC0cdPA==", "requires": { - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-cloud": "^1.2.1", "@types/d3-scale": "^2.0.2", "d3-cloud": "^1.2.5", @@ -53827,14 +53838,14 @@ } }, "@superset-ui/preset-chart-xy": { - "version": "0.18.15", - "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.15.tgz", - "integrity": "sha512-MP6dyO3l0tiPsPdGN5KJkeHPekG1akvgdBrRZCHzHDAlHaVeC2x797Rj5TXUyxFI/Fsw4SlBZ2Ro/swuk3bLOg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.19.tgz", + "integrity": "sha512-7DBTnd4x0jRyxMW0hhdjHKyRpH1odXJWiwbMdUIPMyd1xMiOnYMo22vfiU3u9Iz+wdsBzfCIWE7g2eFEkA+NiA==", "requires": { "@data-ui/theme": "^0.0.84", "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.15", - "@superset-ui/core": "0.18.15", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/axis": "^0.0.198", "@vx/legend": "^0.0.198", "@vx/scale": "^0.0.197", @@ -56312,6 +56323,11 @@ "negotiator": "0.6.1" } }, + "ace-builds": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.4.13.tgz", + "integrity": "sha512-SOLzdaQkY6ecPKYRDDg+MY1WoGgXA34cIvYJNNoBMGGUswHmlauU2Hy0UL96vW0Fs/LgFbMUjD+6vqzWTldIYQ==" + }, "acorn": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", @@ -61409,6 +61425,11 @@ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, + "diff-match-patch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", + "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==" + }, "diff-sequences": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", @@ -61745,9 +61766,9 @@ } }, "echarts": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.2.1.tgz", - "integrity": "sha512-OJ79b22eqRfbSV8vYmDKmA+XWfNbr0Uk/OafWcFNIGDWti2Uw9A6eVCiJLmqPa9Sk+EWL+t5v26aak0z3gxiZw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.2.2.tgz", + "integrity": "sha512-yxuBfeIH5c+0FsoRP60w4De6omXhA06c7eUYBsC1ykB6Ys2yK5fSteIYWvkJ4xJVLQgCvAdO8C4mN6MLeJpBaw==", "requires": { "tslib": "2.3.0", "zrender": "5.2.1" @@ -72156,14 +72177,15 @@ } }, "react-ace": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-5.10.0.tgz", - "integrity": "sha512-aEK/XZCowP8IXq91e2DYqOtGhabk1bbjt+fyeW0UBcIkzDzP/RX/MeJKeyW7wsZcwElACVwyy9nnwXBTqgky3A==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-9.5.0.tgz", + "integrity": "sha512-4l5FgwGh6K7A0yWVMQlPIXDItM4Q9zzXRqOae8KkCl6MkOob7sC1CzHxZdOGvV+QioKWbX2p5HcdOVUv6cAdSg==", "requires": { - "brace": "^0.11.0", + "ace-builds": "^1.4.13", + "diff-match-patch": "^1.0.5", "lodash.get": "^4.4.2", - "lodash.isequal": "^4.1.1", - "prop-types": "^15.5.8" + "lodash.isequal": "^4.5.0", + "prop-types": "^15.7.2" } }, "react-base16-styling": { diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 55f35c79c76ef..243a71935388c 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -68,35 +68,35 @@ "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@superset-ui/chart-controls": "^0.18.15", - "@superset-ui/core": "^0.18.15", - "@superset-ui/legacy-plugin-chart-calendar": "^0.18.15", - "@superset-ui/legacy-plugin-chart-chord": "^0.18.15", - "@superset-ui/legacy-plugin-chart-country-map": "^0.18.15", - "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.15", - "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.15", - "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.15", - "@superset-ui/legacy-plugin-chart-histogram": "^0.18.15", - "@superset-ui/legacy-plugin-chart-horizon": "^0.18.15", - "@superset-ui/legacy-plugin-chart-map-box": "^0.18.15", - "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.15", - "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.15", - "@superset-ui/legacy-plugin-chart-partition": "^0.18.15", - "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.15", - "@superset-ui/legacy-plugin-chart-rose": "^0.18.15", - "@superset-ui/legacy-plugin-chart-sankey": "^0.18.15", - "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.15", - "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.15", - "@superset-ui/legacy-plugin-chart-treemap": "^0.18.15", - "@superset-ui/legacy-plugin-chart-world-map": "^0.18.15", - "@superset-ui/legacy-preset-chart-big-number": "^0.18.15", - "@superset-ui/legacy-preset-chart-deckgl": "^0.4.12", - "@superset-ui/legacy-preset-chart-nvd3": "^0.18.15", - "@superset-ui/plugin-chart-echarts": "^0.18.15", - "@superset-ui/plugin-chart-pivot-table": "^0.18.15", - "@superset-ui/plugin-chart-table": "^0.18.15", - "@superset-ui/plugin-chart-word-cloud": "^0.18.15", - "@superset-ui/preset-chart-xy": "^0.18.15", + "@superset-ui/chart-controls": "^0.18.19", + "@superset-ui/core": "^0.18.19", + "@superset-ui/legacy-plugin-chart-calendar": "^0.18.19", + "@superset-ui/legacy-plugin-chart-chord": "^0.18.19", + "@superset-ui/legacy-plugin-chart-country-map": "^0.18.19", + "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.19", + "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.19", + "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-histogram": "^0.18.19", + "@superset-ui/legacy-plugin-chart-horizon": "^0.18.19", + "@superset-ui/legacy-plugin-chart-map-box": "^0.18.19", + "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.19", + "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.19", + "@superset-ui/legacy-plugin-chart-partition": "^0.18.19", + "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/legacy-plugin-chart-rose": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.19", + "@superset-ui/legacy-plugin-chart-treemap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-world-map": "^0.18.19", + "@superset-ui/legacy-preset-chart-big-number": "^0.18.19", + "@superset-ui/legacy-preset-chart-deckgl": "^0.4.13", + "@superset-ui/legacy-preset-chart-nvd3": "^0.18.19", + "@superset-ui/plugin-chart-echarts": "^0.18.19", + "@superset-ui/plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/plugin-chart-table": "^0.18.19", + "@superset-ui/plugin-chart-word-cloud": "^0.18.19", + "@superset-ui/preset-chart-xy": "^0.18.19", "@vx/responsive": "^0.0.195", "abortcontroller-polyfill": "^1.1.9", "antd": "^4.9.4", @@ -139,7 +139,7 @@ "query-string": "^6.13.7", "re-resizable": "^6.6.1", "react": "^16.13.1", - "react-ace": "^5.10.0", + "react-ace": "^9.4.4", "react-checkbox-tree": "^1.5.1", "react-color": "^2.13.8", "react-datetime": "^3.0.4", diff --git a/superset-frontend/spec/fixtures/mockNativeFilters.ts b/superset-frontend/spec/fixtures/mockNativeFilters.ts index d912545d14586..1381ff4322e0e 100644 --- a/superset-frontend/spec/fixtures/mockNativeFilters.ts +++ b/superset-frontend/spec/fixtures/mockNativeFilters.ts @@ -52,6 +52,7 @@ export const nativeFilters: NativeFiltersState = { inverseSelection: false, }, type: NativeFilterType.NATIVE_FILTER, + description: '', }, 'NATIVE_FILTER-x9QPw0so1': { id: 'NATIVE_FILTER-x9QPw0so1', @@ -81,6 +82,7 @@ export const nativeFilters: NativeFiltersState = { inverseSelection: false, }, type: NativeFilterType.NATIVE_FILTER, + description: '2 letter code', }, }, }; diff --git a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx index df2a03637fa5b..efd33802f057b 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx @@ -94,10 +94,12 @@ describe('PropertiesModal', () => { describe('without metadata', () => { const wrapper = setup({ colorScheme: 'SUPERSET_DEFAULT' }); const modalInstance = wrapper.find('PropertiesModal').instance(); - it('does not update the color scheme in the metadata', () => { + it('updates the color scheme in the metadata', () => { const spy = jest.spyOn(modalInstance, 'onMetadataChange'); modalInstance.onColorSchemeChange('SUPERSET_DEFAULT'); - expect(spy).not.toHaveBeenCalled(); + expect(spy).toHaveBeenCalledWith( + '{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}', + ); }); }); describe('with metadata', () => { @@ -125,10 +127,12 @@ describe('PropertiesModal', () => { json_metadata: '{"timed_refresh_immune_slices": []}', }, }); - it('will not update the metadata', () => { + it('will update the metadata', () => { const spy = jest.spyOn(modalInstance, 'onMetadataChange'); modalInstance.onColorSchemeChange('SUPERSET_DEFAULT'); - expect(spy).not.toHaveBeenCalled(); + expect(spy).toHaveBeenCalledWith( + '{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}', + ); }); }); }); diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockNativeFilters.ts b/superset-frontend/spec/javascripts/dashboard/fixtures/mockNativeFilters.ts index 7feba639fd357..f6766cfb70baf 100644 --- a/superset-frontend/spec/javascripts/dashboard/fixtures/mockNativeFilters.ts +++ b/superset-frontend/spec/javascripts/dashboard/fixtures/mockNativeFilters.ts @@ -68,6 +68,7 @@ export const nativeFiltersInfo: NativeFiltersState = { isRequired: false, }, type: NativeFilterType.NATIVE_FILTER, + description: 'test description', }, }, }; diff --git a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx index ec64b9daf4505..e663704ba21b8 100644 --- a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx +++ b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx @@ -51,7 +51,7 @@ describe('TemplateParamsEditor', () => { const spy = jest.spyOn(brace, 'acequire'); spy.mockReturnValue({ setCompleters: () => 'foo' }); await waitFor(() => { - expect(baseElement.querySelector('#brace-editor')).toBeInTheDocument(); + expect(baseElement.querySelector('#ace-editor')).toBeInTheDocument(); }); }); }); diff --git a/superset-frontend/src/SqlLab/main.less b/superset-frontend/src/SqlLab/main.less index a6c473889710e..7822b91d3cc86 100644 --- a/superset-frontend/src/SqlLab/main.less +++ b/superset-frontend/src/SqlLab/main.less @@ -207,7 +207,7 @@ div.Workspace { flex-direction: column; } - #brace-editor { + #ace-editor { height: calc(100% - 51px); flex-grow: 1; } diff --git a/superset-frontend/src/chart/Chart.jsx b/superset-frontend/src/chart/Chart.jsx index e5cfd72585ed2..106cfcdcfaae6 100644 --- a/superset-frontend/src/chart/Chart.jsx +++ b/superset-frontend/src/chart/Chart.jsx @@ -44,6 +44,7 @@ const propTypes = { // formData contains chart's own filter parameter // and merged with extra filter that current dashboard applying formData: PropTypes.object.isRequired, + labelColors: PropTypes.object, width: PropTypes.number, height: PropTypes.number, setControlValue: PropTypes.func, diff --git a/superset-frontend/src/chart/ChartRenderer.jsx b/superset-frontend/src/chart/ChartRenderer.jsx index bbc4213817c30..ac8b8db2ddeea 100644 --- a/superset-frontend/src/chart/ChartRenderer.jsx +++ b/superset-frontend/src/chart/ChartRenderer.jsx @@ -29,6 +29,7 @@ const propTypes = { datasource: PropTypes.object, initialValues: PropTypes.object, formData: PropTypes.object.isRequired, + labelColors: PropTypes.object, height: PropTypes.number, width: PropTypes.number, setControlValue: PropTypes.func, @@ -100,6 +101,7 @@ class ChartRenderer extends React.Component { nextProps.height !== this.props.height || nextProps.width !== this.props.width || nextProps.triggerRender || + nextProps.labelColors !== this.props.labelColors || nextProps.formData.color_scheme !== this.props.formData.color_scheme || nextProps.cacheBusterProp !== this.props.cacheBusterProp ); diff --git a/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx b/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx index 08ddf2f87ad1e..6d07fd7032760 100644 --- a/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx +++ b/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx @@ -30,7 +30,7 @@ import AsyncAceEditor, { AsyncAceEditorOptions, } from 'src/components/AsyncAceEditor'; -const selector = '[id="brace-editor"]'; +const selector = '[id="ace-editor"]'; test('renders SQLEditor', async () => { const { container } = render(); diff --git a/superset-frontend/src/components/AsyncAceEditor/index.tsx b/superset-frontend/src/components/AsyncAceEditor/index.tsx index 2a5683574a85d..412872cc48aea 100644 --- a/superset-frontend/src/components/AsyncAceEditor/index.tsx +++ b/superset-frontend/src/components/AsyncAceEditor/index.tsx @@ -23,7 +23,7 @@ import { Position, TextMode as OrigTextMode, } from 'brace'; -import AceEditor, { AceEditorProps } from 'react-ace'; +import AceEditor, { IAceEditorProps } from 'react-ace'; import AsyncEsmComponent, { PlaceholderProps, } from 'src/components/AsyncEsmComponent'; @@ -72,7 +72,7 @@ const aceModuleLoaders = { export type AceModule = keyof typeof aceModuleLoaders; -export type AsyncAceEditorProps = AceEditorProps & { +export type AsyncAceEditorProps = IAceEditorProps & { keywords?: AceCompleterKeyword[]; }; @@ -83,7 +83,7 @@ export type AsyncAceEditorOptions = { defaultTheme?: AceEditorTheme; defaultTabSize?: number; placeholder?: React.ComponentType< - PlaceholderProps & Partial + PlaceholderProps & Partial > | null; }; @@ -120,7 +120,6 @@ export default function AsyncAceEditor( theme = inferredTheme, tabSize = defaultTabSize, defaultValue = '', - value = '', ...props }, ref, @@ -153,7 +152,6 @@ export default function AsyncAceEditor( theme={theme} tabSize={tabSize} defaultValue={defaultValue} - value={value || ''} {...props} /> ); diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx index e80e402ec07a4..6c6ae9854cb62 100644 --- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx @@ -25,7 +25,7 @@ import Card from 'src/components/Card'; import Alert from 'src/components/Alert'; import Badge from 'src/components/Badge'; import shortid from 'shortid'; -import { styled, SupersetClient, t, supersetTheme } from '@superset-ui/core'; +import { styled, SupersetClient, t, withTheme } from '@superset-ui/core'; import { Select } from 'src/components'; import { FormLabel } from 'src/components/Form'; import Button from 'src/components/Button'; @@ -97,7 +97,7 @@ const StyledBadge = styled(Badge)` `; const EditLockContainer = styled.div` - font-size: ${supersetTheme.typography.sizes.s}px; + font-size: ${({ theme }) => theme.typography.sizes.s}px; display: flex; align-items: center; a { @@ -471,7 +471,6 @@ class DatasourceEditor extends React.PureComponent { const { datasourceType, datasource } = this.state; const sql = datasourceType === DATASOURCE_TYPES.physical.key ? '' : datasource.sql; - const newDatasource = { ...this.state.datasource, sql, @@ -489,6 +488,7 @@ class DatasourceEditor extends React.PureComponent { } onDatasourcePropChange(attr, value) { + if (value === undefined) return; // if value is undefined do not update state const datasource = { ...this.state.datasource, [attr]: value }; this.setState( prevState => ({ @@ -828,7 +828,7 @@ class DatasourceEditor extends React.PureComponent { ); } - renderSourceFieldset() { + renderSourceFieldset(theme) { const { datasource } = this.state; return (
@@ -989,13 +989,9 @@ class DatasourceEditor extends React.PureComponent { {this.state.isEditMode ? ( - + ) : ( - + )} {!this.state.isEditMode && ( @@ -1166,6 +1162,8 @@ class DatasourceEditor extends React.PureComponent { const { datasource, activeTabKey } = this.state; const { metrics } = datasource; const sortedMetrics = metrics?.length ? this.sortMetrics(metrics) : []; + const { theme } = this.props; + return ( {this.renderErrors()} @@ -1190,7 +1188,7 @@ class DatasourceEditor extends React.PureComponent { defaultActiveKey={activeTabKey} > - {this.renderSourceFieldset()} + {this.renderSourceFieldset(theme)} { - const mockStore = configureStore([thunk]); - const store = mockStore({}); fetchMock.get(DATASOURCE_ENDPOINT, []); - let wrapper; let el; - let inst; let isFeatureEnabledMock; beforeEach(() => { - el = ; - wrapper = shallow(el).dive(); - inst = wrapper.instance(); - }); - - afterEach(() => { - wrapper.unmount(); + el = ; + render(el, { useRedux: true }); }); it('is valid', () => { @@ -67,15 +48,18 @@ describe('DatasourceEditor', () => { }); it('renders Tabs', () => { - expect(wrapper.find('#table-tabs')).toExist(); + expect(screen.getByTestId('edit-dataset-tabs')).toBeInTheDocument(); }); it('makes an async request', () => new Promise(done => { - wrapper.setState({ activeTabKey: 2 }); - const syncButton = wrapper.find('.sync-from-source'); - expect(syncButton).toHaveLength(1); - syncButton.simulate('click'); + const columnsTab = screen.getByTestId('collection-tab-Columns'); + + userEvent.click(columnsTab); + const syncButton = screen.getByText(/sync columns from source/i); + expect(syncButton).toBeInTheDocument(); + + userEvent.click(syncButton); setTimeout(() => { expect(fetchMock.calls(DATASOURCE_ENDPOINT)).toHaveLength(1); @@ -84,76 +68,77 @@ describe('DatasourceEditor', () => { }, 0); })); - it('to add, remove and modify columns accordingly', () => { - const columns = [ - { - name: 'ds', - type: 'DATETIME', - nullable: true, - default: '', - primary_key: false, - is_dttm: true, - }, - { - name: 'gender', - type: 'VARCHAR(32)', - nullable: true, - default: '', - primary_key: false, - is_dttm: false, - }, - { - name: 'new_column', - type: 'VARCHAR(10)', - nullable: true, - default: '', - primary_key: false, - is_dttm: false, - }, - ]; - - const numCols = props.datasource.columns.length; - expect(inst.state.databaseColumns).toHaveLength(numCols); - inst.updateColumns(columns); - expect(inst.state.databaseColumns).toEqual( - expect.arrayContaining([ - { - type: 'DATETIME', - description: null, - filterable: false, - verbose_name: null, - is_dttm: true, - expression: '', - groupby: false, - column_name: 'ds', - }, - { - type: 'VARCHAR(32)', - description: null, - filterable: true, - verbose_name: null, - is_dttm: false, - expression: '', - groupby: true, - column_name: 'gender', - }, - expect.objectContaining({ - column_name: 'new_column', - type: 'VARCHAR(10)', - }), - ]), - ); - expect(inst.state.databaseColumns).not.toEqual( - expect.arrayContaining([expect.objectContaining({ name: 'name' })]), + // to add, remove and modify columns accordingly + it('can modify columns', async () => { + const columnsTab = screen.getByTestId('collection-tab-Columns'); + userEvent.click(columnsTab); + + const getToggles = screen.getAllByRole('button', { + name: /toggle expand/i, + }); + userEvent.click(getToggles[0]); + const getTextboxes = screen.getAllByRole('textbox'); + expect(getTextboxes.length).toEqual(5); + + const inputLabel = screen.getByPlaceholderText('Label'); + const inputDescription = screen.getByPlaceholderText('Description'); + const inputDtmFormat = screen.getByPlaceholderText('%Y/%m/%d'); + const inputCertifiedBy = screen.getByPlaceholderText('Certified by'); + const inputCertDetails = screen.getByPlaceholderText( + 'Certification details', ); + + userEvent.type(await inputLabel, 'test_lable'); + userEvent.type(await inputDescription, 'test'); + userEvent.type(await inputDtmFormat, 'test'); + userEvent.type(await inputCertifiedBy, 'test'); + userEvent.type(await inputCertDetails, 'test'); + }); + + it('can delete columns', async () => { + const columnsTab = screen.getByTestId('collection-tab-Columns'); + userEvent.click(columnsTab); + + const getToggles = screen.getAllByRole('button', { + name: /toggle expand/i, + }); + + userEvent.click(getToggles[0]); + screen.logTestingPlaygroundURL(); + const deleteButtons = screen.getAllByRole('button', { + name: /delete item/i, + }); + expect(deleteButtons.length).toEqual(7); + userEvent.click(deleteButtons[0]); + const countRows = screen.getAllByRole('button', { name: /delete item/i }); + expect(countRows.length).toEqual(6); + }); + + it('can add new columns', async () => { + const calcColsTab = screen.getByTestId('collection-tab-Calculated columns'); + userEvent.click(calcColsTab); + const addBtn = screen.getByRole('button', { + name: /add item/i, + }); + expect(addBtn).toBeInTheDocument(); + userEvent.click(addBtn); + const newColumn = screen.getByRole('button', { + name: //i, + }); + expect(newColumn).toBeInTheDocument(); }); it('renders isSqla fields', () => { - wrapper.setState({ activeTabKey: 4 }); - expect(wrapper.state('isSqla')).toBe(true); + const columnsTab = screen.getByRole('tab', { + name: /settings/i, + }); + userEvent.click(columnsTab); + const extraField = screen.getAllByText(/extra/i); + expect(extraField.length).toEqual(2); expect( - wrapper.find(Field).find({ fieldKey: 'fetch_values_predicate' }).exists(), - ).toBe(true); + screen.getByText(/autocomplete query predicate/i), + ).toBeInTheDocument(); + expect(screen.getByText(/template parameters/i)).toBeInTheDocument(); }); describe('enable edit Source tab', () => { @@ -161,7 +146,6 @@ describe('DatasourceEditor', () => { isFeatureEnabledMock = jest .spyOn(featureFlags, 'isFeatureEnabled') .mockImplementation(() => false); - wrapper = shallow(el, { context: { store } }).dive(); }); afterAll(() => { @@ -169,50 +153,49 @@ describe('DatasourceEditor', () => { }); it('Source Tab: edit mode', () => { - wrapper.setState({ activeTabKey: 0, isEditMode: true }); - const sourceTab = wrapper.find(Tabs.TabPane).first(); - expect(sourceTab.find(Radio).first().prop('disabled')).toBe(false); - - const icon = wrapper.find(Icons.LockUnlocked); - expect(icon).toExist(); - - const tableSelector = sourceTab.find(Field).shallow().find(TableSelector); - expect(tableSelector.length).toBe(1); - expect(tableSelector.prop('readOnly')).toBe(false); + const getLockBtn = screen.getByRole('img', { name: /lock-locked/i }); + userEvent.click(getLockBtn); + const physicalRadioBtn = screen.getByRole('radio', { + name: /physical \(table or view\)/i, + }); + const vituralRadioBtn = screen.getByRole('radio', { + name: /virtual \(sql\)/i, + }); + expect(physicalRadioBtn).toBeEnabled(); + expect(vituralRadioBtn).toBeEnabled(); }); it('Source Tab: readOnly mode', () => { - const sourceTab = wrapper.find(Tabs.TabPane).first(); - expect(sourceTab.find(Radio).length).toBe(2); - expect(sourceTab.find(Radio).first().prop('disabled')).toBe(true); - - const icon = wrapper.find(Icons.LockLocked); - expect(icon).toExist(); - icon.parent().simulate('click'); - expect(wrapper.state('isEditMode')).toBe(true); - - const tableSelector = sourceTab.find(Field).shallow().find(TableSelector); - expect(tableSelector.length).toBe(1); - expect(tableSelector.prop('readOnly')).toBe(true); + const getLockBtn = screen.getByRole('img', { name: /lock-locked/i }); + expect(getLockBtn).toBeInTheDocument(); + const physicalRadioBtn = screen.getByRole('radio', { + name: /physical \(table or view\)/i, + }); + const vituralRadioBtn = screen.getByRole('radio', { + name: /virtual \(sql\)/i, + }); + expect(physicalRadioBtn).toBeDisabled(); + expect(vituralRadioBtn).toBeDisabled(); }); }); - it('disable edit Source tab', () => { - // when edit is disabled, show readOnly controls and no padlock - isFeatureEnabledMock = jest - .spyOn(featureFlags, 'isFeatureEnabled') - .mockImplementation(() => true); - wrapper = shallow(el, { context: { store } }).dive(); - wrapper.setState({ activeTabKey: 0 }); - - const sourceTab = wrapper.find(Tabs.TabPane).first(); - expect(sourceTab.find(Radio).length).toBe(2); - expect(sourceTab.find(Radio).first().prop('disabled')).toBe(true); + describe('render editor with feature flag false', () => { + beforeAll(() => { + isFeatureEnabledMock = jest + .spyOn(featureFlags, 'isFeatureEnabled') + .mockImplementation(() => true); + }); - const icon = sourceTab.find(Icons.LockLocked); - expect(icon).toHaveLength(0); + beforeEach(() => { + render(el, { useRedux: true }); + }); - isFeatureEnabledMock.mockRestore(); + it('disable edit Source tab', () => { + expect( + screen.queryByRole('img', { name: /lock-locked/i }), + ).not.toBeInTheDocument(); + isFeatureEnabledMock.mockRestore(); + }); }); }); @@ -227,9 +210,7 @@ describe('DatasourceEditor RTL', () => { /certification details/i, ); expect(certificationDetails.value).toEqual('foo'); - const warningMarkdown = await await screen.findByPlaceholderText( - /certified by/i, - ); + const warningMarkdown = await screen.findByPlaceholderText(/certified by/i); expect(warningMarkdown.value).toEqual('someone'); }); it('properly updates the metric information', async () => { diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index 3aa30936dcedd..4bc1c79843437 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -17,13 +17,32 @@ * under the License. */ import { Dispatch } from 'redux'; -import { makeApi } from '@superset-ui/core'; +import { makeApi, CategoricalColorNamespace } from '@superset-ui/core'; +import { isString } from 'lodash'; import { ChartConfiguration, DashboardInfo } from '../reducers/types'; export const DASHBOARD_INFO_UPDATED = 'DASHBOARD_INFO_UPDATED'; // updates partially changed dashboard info export function dashboardInfoChanged(newInfo: { metadata: any }) { + const { metadata } = newInfo; + + const categoricalNamespace = CategoricalColorNamespace.getNamespace( + metadata?.color_namespace, + ); + + categoricalNamespace.resetColors(); + + if (metadata?.label_colors) { + const labelColors = metadata.label_colors; + const colorMap = isString(labelColors) + ? JSON.parse(labelColors) + : labelColors; + Object.keys(colorMap).forEach(label => { + categoricalNamespace.setColor(label, colorMap[label]); + }); + } + return { type: DASHBOARD_INFO_UPDATED, newInfo }; } export const SET_CHART_CONFIG_BEGIN = 'SET_CHART_CONFIG_BEGIN'; diff --git a/superset-frontend/src/dashboard/actions/hydrate.js b/superset-frontend/src/dashboard/actions/hydrate.js index 2868c74814c21..6dfe64bcb9f17 100644 --- a/superset-frontend/src/dashboard/actions/hydrate.js +++ b/superset-frontend/src/dashboard/actions/hydrate.js @@ -88,16 +88,16 @@ export const hydrateDashboard = (dashboardData, chartData) => ( // Priming the color palette with user's label-color mapping provided in // the dashboard's JSON metadata if (metadata?.label_colors) { - const scheme = metadata.color_scheme; const namespace = metadata.color_namespace; const colorMap = isString(metadata.label_colors) ? JSON.parse(metadata.label_colors) : metadata.label_colors; + const categoricalNamespace = CategoricalColorNamespace.getNamespace( + namespace, + ); + Object.keys(colorMap).forEach(label => { - CategoricalColorNamespace.getScale(scheme, namespace).setColor( - label, - colorMap[label], - ); + categoricalNamespace.setColor(label, colorMap[label]); }); } diff --git a/superset-frontend/src/dashboard/components/BuilderComponentPane.tsx b/superset-frontend/src/dashboard/components/BuilderComponentPane.tsx index b09fe729498cd..1628269a37f43 100644 --- a/superset-frontend/src/dashboard/components/BuilderComponentPane.tsx +++ b/superset-frontend/src/dashboard/components/BuilderComponentPane.tsx @@ -35,31 +35,66 @@ import dashboardComponents from '../../visualizations/presets/dashboardComponent import NewDynamicComponent from './gridComponents/new/NewDynamicComponent'; export interface BCPProps { + isStandalone: boolean; topOffset: number; } const SUPERSET_HEADER_HEIGHT = 59; +const SIDEPANE_ADJUST_OFFSET = 4; +const SIDEPANE_HEADER_HEIGHT = 64; // including margins +const SIDEPANE_FILTERBAR_HEIGHT = 56; const BuilderComponentPaneTabs = styled(Tabs)` line-height: inherit; margin-top: ${({ theme }) => theme.gridUnit * 2}px; `; -const BuilderComponentPane: React.FC = ({ topOffset = 0 }) => ( -
` + height: 100%; + position: fixed; + right: 0; + top: 0; + + .ReactVirtualized__List { + padding-bottom: ${({ topOffset }) => + `${ + SIDEPANE_HEADER_HEIGHT + + SIDEPANE_FILTERBAR_HEIGHT + + SIDEPANE_ADJUST_OFFSET + + topOffset + }px`}; + } +`; + +const BuilderComponentPane: React.FC = ({ + isStandalone, + topOffset = 0, +}) => ( + {({ height }) => ( - {({ style, isSticky }: { style: any; isSticky: boolean }) => ( -
{ + const { pageYOffset } = window; + const hasHeader = + pageYOffset < SUPERSET_HEADER_HEIGHT && !isStandalone; + const withHeaderTopOffset = + topOffset + + (SUPERSET_HEADER_HEIGHT - pageYOffset - SIDEPANE_ADJUST_OFFSET); + + return ( +
= ({ topOffset = 0 }) => (
- )} + ); + }} )} -
+
); export default BuilderComponentPane; diff --git a/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx b/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx index e96291c9b64c0..16b2a1afbb7c7 100644 --- a/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx +++ b/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx @@ -19,12 +19,12 @@ import React from 'react'; import { render, screen, waitFor } from 'spec/helpers/testing-library'; import { CssEditor as AceCssEditor } from 'src/components/AsyncAceEditor'; -import { AceEditorProps } from 'react-ace'; +import { IAceEditorProps } from 'react-ace'; import userEvent from '@testing-library/user-event'; import CssEditor from '.'; jest.mock('src/components/AsyncAceEditor', () => ({ - CssEditor: ({ value, onChange }: AceEditorProps) => ( + CssEditor: ({ value, onChange }: IAceEditorProps) => (