From 7b370e6f17f7b86b5abd7a583d798ba7dec52b8c Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Sun, 7 Mar 2021 10:54:08 +0100 Subject: [PATCH] feat: Implement drag and drop columns for filters (#13340) * Implement DnD feature for filters * minor refactor * Fix types * Fix undefined error * Refactor * Fix ts errors * Fix conflicting dnd types * Bump superset-ui packages * Change DndItemType case to PascalCase * Remove redundant null check * Fix * Fix csrf mock api call --- superset-frontend/package-lock.json | 670 ++++++++++-------- superset-frontend/package.json | 54 +- .../spec/helpers/setupSupersetClient.js | 2 +- .../DatasourcePanel/DatasourcePanel.tsx | 10 +- .../DatasourcePanelDragWrapper.tsx | 2 +- .../components/DatasourcePanel/types.ts | 15 +- .../{optionTypes.ts => DndItemType.ts} | 26 +- .../src/explore/components/OptionControls.tsx | 21 +- .../DndColumnSelect.tsx | 83 +++ .../DndColumnSelectLabel.tsx | 119 ---- .../DndFilterSelect.tsx | 334 +++++++++ .../DndColumnSelectControl/DndSelectLabel.tsx | 73 ++ .../components/Option.tsx | 10 +- .../components/OptionWrapper.tsx | 35 +- .../controls/DndColumnSelectControl/index.ts | 4 +- .../controls/DndColumnSelectControl/types.ts | 44 +- .../utils/optionSelector.ts | 35 +- .../FilterControl/AdhocFilterOption.jsx | 6 +- .../AdhocFilterPopoverTrigger.tsx | 36 +- .../MetricControl/AdhocMetricOption.jsx | 7 +- .../MetricControl/MetricDefinitionValue.jsx | 4 +- .../src/explore/components/controls/index.js | 7 +- superset-frontend/src/explore/types.ts | 12 +- 23 files changed, 1069 insertions(+), 540 deletions(-) rename superset-frontend/src/explore/components/{optionTypes.ts => DndItemType.ts} (57%) create mode 100644 superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx delete mode 100644 superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectLabel.tsx create mode 100644 superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx create mode 100644 superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 1cfbff4f4e4d0..e963ef23d0131 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -13,34 +13,34 @@ "@babel/runtime-corejs3": "^7.12.5", "@data-ui/sparkline": "^0.0.84", "@emotion/core": "^10.0.35", - "@superset-ui/chart-controls": "^0.17.13", - "@superset-ui/core": "^0.17.13", - "@superset-ui/legacy-plugin-chart-calendar": "^0.17.13", - "@superset-ui/legacy-plugin-chart-chord": "^0.17.13", - "@superset-ui/legacy-plugin-chart-country-map": "^0.17.13", - "@superset-ui/legacy-plugin-chart-event-flow": "^0.17.13", - "@superset-ui/legacy-plugin-chart-force-directed": "^0.17.13", - "@superset-ui/legacy-plugin-chart-heatmap": "^0.17.13", - "@superset-ui/legacy-plugin-chart-histogram": "^0.17.13", - "@superset-ui/legacy-plugin-chart-horizon": "^0.17.13", - "@superset-ui/legacy-plugin-chart-map-box": "^0.17.13", - "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.17.13", - "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.17.13", - "@superset-ui/legacy-plugin-chart-partition": "^0.17.13", - "@superset-ui/legacy-plugin-chart-pivot-table": "^0.17.13", - "@superset-ui/legacy-plugin-chart-rose": "^0.17.13", - "@superset-ui/legacy-plugin-chart-sankey": "^0.17.13", - "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.17.13", - "@superset-ui/legacy-plugin-chart-sunburst": "^0.17.13", - "@superset-ui/legacy-plugin-chart-treemap": "^0.17.13", - "@superset-ui/legacy-plugin-chart-world-map": "^0.17.13", - "@superset-ui/legacy-preset-chart-big-number": "^0.17.13", + "@superset-ui/chart-controls": "^0.17.14", + "@superset-ui/core": "^0.17.14", + "@superset-ui/legacy-plugin-chart-calendar": "^0.17.14", + "@superset-ui/legacy-plugin-chart-chord": "^0.17.14", + "@superset-ui/legacy-plugin-chart-country-map": "^0.17.14", + "@superset-ui/legacy-plugin-chart-event-flow": "^0.17.14", + "@superset-ui/legacy-plugin-chart-force-directed": "^0.17.14", + "@superset-ui/legacy-plugin-chart-heatmap": "^0.17.14", + "@superset-ui/legacy-plugin-chart-histogram": "^0.17.14", + "@superset-ui/legacy-plugin-chart-horizon": "^0.17.14", + "@superset-ui/legacy-plugin-chart-map-box": "^0.17.14", + "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.17.14", + "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.17.14", + "@superset-ui/legacy-plugin-chart-partition": "^0.17.14", + "@superset-ui/legacy-plugin-chart-pivot-table": "^0.17.14", + "@superset-ui/legacy-plugin-chart-rose": "^0.17.14", + "@superset-ui/legacy-plugin-chart-sankey": "^0.17.14", + "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.17.14", + "@superset-ui/legacy-plugin-chart-sunburst": "^0.17.14", + "@superset-ui/legacy-plugin-chart-treemap": "^0.17.14", + "@superset-ui/legacy-plugin-chart-world-map": "^0.17.14", + "@superset-ui/legacy-preset-chart-big-number": "^0.17.14", "@superset-ui/legacy-preset-chart-deckgl": "^0.4.6", - "@superset-ui/legacy-preset-chart-nvd3": "^0.17.13", - "@superset-ui/plugin-chart-echarts": "^0.17.13", - "@superset-ui/plugin-chart-table": "^0.17.13", - "@superset-ui/plugin-chart-word-cloud": "^0.17.13", - "@superset-ui/preset-chart-xy": "^0.17.13", + "@superset-ui/legacy-preset-chart-nvd3": "^0.17.14", + "@superset-ui/plugin-chart-echarts": "^0.17.14", + "@superset-ui/plugin-chart-table": "^0.17.14", + "@superset-ui/plugin-chart-word-cloud": "^0.17.14", + "@superset-ui/preset-chart-xy": "^0.17.14", "@vx/responsive": "^0.0.195", "abortcontroller-polyfill": "^1.1.9", "antd": "^4.9.4", @@ -15967,19 +15967,26 @@ } }, "node_modules/@superset-ui/chart-controls": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.13.tgz", - "integrity": "sha512-FwIPvkDSm/Qewx3IRQId4+8JdO/UcsfznSntzOZ3Syb+awyZbfNdF7OjqZOv501bMcXOrbMqiTqH6Kxoy4Y+8g==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.14.tgz", + "integrity": "sha512-YY9Gn40bRbZr4ivCQcP8E+9+maWcpoENtCQm3dPNgwVaa8wmZ03dR+VMkIsM5G3VWOHl6T+nSCyo5R/qTFlh5g==", "dependencies": { - "@superset-ui/core": "0.17.13", + "@superset-ui/core": "0.17.14", "lodash": "^4.17.15", "prop-types": "^15.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-bootstrap": "*", + "antd": "^4.9.1", + "react": "^16.13.1", + "react-bootstrap": "^0.33.1" } }, "node_modules/@superset-ui/core": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.13.tgz", - "integrity": "sha512-kY9wR2WKCHfbab7gVWFNpZrsYELSWPUZZUBUIduEvfmxWYVTkl98nv926Hle5bQk64OfuDbM0QzrxOApVJ3Sdg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.14.tgz", + "integrity": "sha512-wdzCaDG8DO02wheBWyVd1q5EUV0RuEUjVSNKVm0aiZzBxcv95mlS62mgN24VdxDiL1Zca1+MJ4/bCz/K3wZ08w==", "dependencies": { "@babel/runtime": "^7.1.2", "@emotion/core": "^10.0.28", @@ -16009,6 +16016,14 @@ "rison": "^0.1.1", "seedrandom": "^3.0.5", "whatwg-fetch": "^3.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-bootstrap": "*", + "@types/react-loadable": "*", + "react": "^16.13.1", + "react-bootstrap": "^0.33.1", + "react-loadable": "^5.5.0" } }, "node_modules/@superset-ui/core/node_modules/@vx/responsive": { @@ -16060,16 +16075,19 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-calendar": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.17.13.tgz", - "integrity": "sha512-98JTVEZ08xA6PPte1GrOvtTICk3Q0U1zQNrJZPwwXtPyet0/J9vQwOE8g399KaHb6+mND2ECUfKR++NOtXaC3w==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.17.14.tgz", + "integrity": "sha512-+xykD1FdquEfcmSvtDkR/NuiPlu6QYEIFLZ3H41U/AdzQb5n+kkgCG0M883qdfkQlbaGsZtjnjIoqotWclmwMQ==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3-array": "^2.0.3", "d3-selection": "^1.4.0", "d3-tip": "^0.9.1", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-calendar/node_modules/d3-array": { @@ -16081,24 +16099,24 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-chord": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.17.13.tgz", - "integrity": "sha512-jdSY6uTIpsO5G6DE0sFOYfiWw+uVyzhNsM68L5QsW1DgbbGbZtr9+Uig0Ec4niQqzntjpCctNFEaeOPhs5QBmw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.17.14.tgz", + "integrity": "sha512-QNeUnUR9Z/TDb2Q+lYIzUtCyKVM/tG0iLceE6kWHtlxCH3QI0aw43bhDS6wK9LLbBzURQezGStxLeJaIwmsmuA==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.6.2", "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-country-map": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.17.13.tgz", - "integrity": "sha512-2wwoVNZtxH7UXOdRjhqCj0BLBQ8GQTt0V8v1+VphqV6jlDCEQaJmSdSnfB0kbwjZ7bR5rmO4XmFxEHJnNUb/IA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.17.14.tgz", + "integrity": "sha512-qtjWyxPwWNEhNzXxx1h81u7DBdr44UP41JPHRkLsWoWQweecR9Q8nWCSFEVcE9+7ehAxGigtbXEHVoix4L1mzw==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-array": "^2.0.3", "prop-types": "^15.6.2" @@ -16113,34 +16131,40 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-event-flow": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.17.13.tgz", - "integrity": "sha512-4cUAueJw/Te3pw73fNObkHeEeXNRwxNObkE6Z4M/9Z7qXAXNvIdhakgelnO9wcM19vcMXhS1cr0rdu37q4IgwA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.17.14.tgz", + "integrity": "sha512-A/4XpGJtBDQ1qEj5sS/wuMI4McF8XLW2h3gV6HNLga6H3Z2SV6OLb4mP15frQlCQ8Rmvf3DALT5hy5afnI2K4w==", "dependencies": { "@data-ui/event-flow": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^15 || ^16" } }, "node_modules/@superset-ui/legacy-plugin-chart-force-directed": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.17.13.tgz", - "integrity": "sha512-A3UWjqzWxYBI7aS2c11452kn50K4L4wc5/moKJo6jJgcxZtn/qBb4hjJ5CybYrvS+b4KKrbgTJY5850iVgg3Kg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.17.14.tgz", + "integrity": "sha512-If1y45YKtQZbqc+XPJYtrgAZVuQgWgIjvQa9eQe09J+tAJQuLO9bo0SeqhuHRXUJQzge3AkItURdu+zdi/Z/3A==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-heatmap": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.17.13.tgz", - "integrity": "sha512-9Er9FmnUIyKuHPn8FmJsLBiXHpJaqjPH5utLQM+zCeGm3PLkJuM8PI5bHF/mNMnJRtqdMx4uWTmwoM+A4LLsag==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.17.14.tgz", + "integrity": "sha512-6DClVIQNUtmqIuhlq9JrSjm8OmcEp0YHN4yNT0yTxoV16LYA+T8SCcMt3nJB8DjpZwJLd/JKLcuE2ijxe8qGxQ==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-svg-legend": "^1.x", "d3-tip": "^0.9.1", @@ -16148,18 +16172,21 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-histogram": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.17.13.tgz", - "integrity": "sha512-pQFZuotoPvLuA93sfm+23/hIQL/CcawIEUaR4p+mkGvNpsFOf+FVjfI3wjk5Is9O7FJdD+zTSaZC73av1OjmkA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.17.14.tgz", + "integrity": "sha512-zmcxm92huKldnDFj+Wi2L0Swpf4vPXO4Bx3rMxLguDVkmXpGl++axmaSl8V0Wkmvx/80cPYBWcwO/pUxY8m1XA==", "dependencies": { "@data-ui/histogram": "^0.0.84", "@data-ui/theme": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@vx/legend": "^0.0.198", "@vx/responsive": "^0.0.199", "@vx/scale": "^0.0.197", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^15 || ^16" } }, "node_modules/@superset-ui/legacy-plugin-chart-histogram/node_modules/@vx/group": { @@ -16221,15 +16248,18 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-horizon": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.17.13.tgz", - "integrity": "sha512-9bVKRikN6zDd2UcgJTo5dtk2LkAyFrGX7/RVAxC0/GmUyhKwPL7XgoK278myB9c5DL1K2lPhHTz7s1/nQatbcA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.17.14.tgz", + "integrity": "sha512-qxO1SklS6UX3OzM8RmnXYDvhEwMeU7ptidZbknBBmyA66JUn2ewwym4kWnbi0QT+v5ModMZpiLiEme1ZmfExhA==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3-array": "^2.0.3", "d3-scale": "^3.0.1", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^15 || ^16" } }, "node_modules/@superset-ui/legacy-plugin-chart-horizon/node_modules/d3-array": { @@ -16253,18 +16283,21 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-map-box": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.17.13.tgz", - "integrity": "sha512-o+oR7FSH7Ep+jTxTOQb445RB8sNPBqs0o8BEOf8loEUlgSZUClQx8dQYSoxRpw6YjtWVD0J+4HtUzX2HQt++Ng==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.17.14.tgz", + "integrity": "sha512-rOeybfBISuiWYtxsv52CPlgb0cAdjIFahS1W8Y8U8a0idYCNoypBmsa9WLrG4v+MBXCB2l4cgELMW8lurRBcCQ==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "immutable": "^3.8.2", "mapbox-gl": "^0.53.0", "prop-types": "^15.6.2", "react-map-gl": "^4.0.10", "supercluster": "^4.1.1", "viewport-mercator-project": "^6.1.1" + }, + "peerDependencies": { + "react": "^15 || ^16" } }, "node_modules/@superset-ui/legacy-plugin-chart-map-box/node_modules/immutable": { @@ -16276,123 +16309,141 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-paired-t-test": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.17.13.tgz", - "integrity": "sha512-5evYJLS7/yVlA7OI8n3ioQEpsIz+8lSUaZo8n2wWbvRlqvApVNAx+ofppf5O9RqRgLfheYPT6FESUqTOAdRv+Q==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.17.14.tgz", + "integrity": "sha512-co4UG6dYMbZk1hhsI5JgbFHw3lLGmA2nG46T3nbn2ySJa23CYyQg8yCQHiJa/7SSKP0I5jFkmgD0JAOcvI9bHg==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "distributions": "^1.0.0", "prop-types": "^15.6.2", "reactable": "^1.1.0" + }, + "peerDependencies": { + "react": "^15 || ^16" } }, "node_modules/@superset-ui/legacy-plugin-chart-parallel-coordinates": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.17.13.tgz", - "integrity": "sha512-alRR+psEv0chVuwLGemlhBM8+UwnO9nWQsFvV8IblL0rSGKMsuofeutljp5BOXiJu/rpumWXn3HpriMri0ABDg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.17.14.tgz", + "integrity": "sha512-9xmCLtfHF9pYSEz4RwydhiXU3xNkw2ZirMGa4CTWSXVZlEWr794lnUNtWvlunFNz4JhJClKoTNiZXHIFa+kBzg==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-partition": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.17.13.tgz", - "integrity": "sha512-lkcWo2d47GPgmSxOyVGKRcNd5rm1EhNnbTN/vLVrRCkBJ1u3aOcWdm3xbAQBZNXk2LPFnZM5l9px3Q301znPew==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.17.14.tgz", + "integrity": "sha512-avTFsI7VWv9yxOkgAtl7ov85t4bZj57bjj8ivZrSyeWQOuQerHBVlNQr3Hb+C5uG4aUgjez5jXEOEB/iBbyfUA==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-hierarchy": "^1.1.8", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-pivot-table": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.17.13.tgz", - "integrity": "sha512-tsL+98WeQCeAbTkm6IdA0f/XlBX6pNnFH4MIrb4cw0GNSsJ/Yz5PiA+NUptnTMSX3k+DV10vtV/T2HtuhpDK4g==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.17.14.tgz", + "integrity": "sha512-Os0rESFeXH3BpBc8XNuf0LH1zfhS+kLoI3WxLGxn7dD9M/gXhYjz05Rpby95rFDiPr6/CpJBJS4zrWlxDF3qIg==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "datatables.net-bs": "^1.10.15", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-rose": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.17.13.tgz", - "integrity": "sha512-Hz2nq14TzbUg8ynMi7zfbK5blgx4XBB25dRMvpv1jyQeTYw/IAPdMb3y0/61ouQItpCImjGWJt7ixCSYoIMJIg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.17.14.tgz", + "integrity": "sha512-GpGfJx/aXKiqKo5TqpgzUA50OKKnzVq4rR11scByxVYazTmHOL37MQIqyf8n/mCixzCvh3jSQ64PFMyum/aFsQ==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "nvd3": "1.8.6", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-sankey": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.17.13.tgz", - "integrity": "sha512-DDqS5zMKNtssZemaqetSc1Wm/Ymg7TayK34SmHAXzFJ0ZbzlWsUs6gSwY38MtTwfT/Yy/g+Cp6HfJjBsu//gdw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.17.14.tgz", + "integrity": "sha512-0tbnzevrQ3dp6YJ1oMa0+Ho+LxXke/thsnq6p4XbsRgujdJ98/1wMSkt7U4OAK+K8RW1eQYZiJivnJW6kisemw==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-sankey": "^0.4.2", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-sankey-loop": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.17.13.tgz", - "integrity": "sha512-cfTrYKWu02TV31a4N3g7i8+JlpvTQUD8SQWV8bWfGqenCfaYXnEtLcT7a06AZD84c7xPVIJ3ri+e1levxyCi/Q==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.17.14.tgz", + "integrity": "sha512-dnoEOMXhYiVU/dAL4P+Sd1ZsxwSUlqKMSj9TJtG2J7Kke8/GvTNz6/RDB4ndjB+DyKNFEfNhsFF13VKD0YvuRQ==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "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.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.17.13.tgz", - "integrity": "sha512-rpc91+qtAZAjxmJyuK39GJBnzyVPVVSA8XZ3iYHFPTYooiIM0QuRbYY8RVIsDqwIJ2gNCaCxD8ymA9OhIQjAEw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.17.14.tgz", + "integrity": "sha512-P8FW+wdrLN5uC/br52/ykLxKsdV12FCbjXyL+6LnVAYU9KWLttS+fhtsCTrOKf9od1cXUDuZKJ8KKt/ktRy9ag==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-treemap": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.17.13.tgz", - "integrity": "sha512-60zgDGCbj0o6x8vJeRNyPp1jpHFOBmpza2xrHshaAWef6tyI7btaiWyDAk1+1sm+f5gHuVWI4uP8J6rE7xeuBQ==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.17.14.tgz", + "integrity": "sha512-T4qLlLUs/1PIT8Hf4iEMvR8h4Mbz8sWxLvvZTOPWtsgX/uqh11yMKNO4qR5O5kavVsOnepJI0msOWccRXNHQdQ==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "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.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.17.13.tgz", - "integrity": "sha512-xxN0roJlvSqVYJpXAMkCbNgscCN5skazLlxRa+M4LYT7C3XAigcUwR8SwhP6FN9lrDaupiGaxiygrCZ2JTZhKg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.17.14.tgz", + "integrity": "sha512-ZGYSMsmsY1QJpflqKxYHI+elq94cKLwizoID6wCV7/wHA0nAcqHiDyisRnzmOmS+x7msZx5VH0XbVoiyGAgp+g==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-array": "^2.4.0", "d3-color": "^1.4.1", "datamaps": "^0.5.8", "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-world-map/node_modules/d3-array": { @@ -16409,17 +16460,20 @@ "integrity": "sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==" }, "node_modules/@superset-ui/legacy-preset-chart-big-number": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.17.13.tgz", - "integrity": "sha512-GqFG/BS2370GgxOm5mjXqjUMYW3eZGkj9jNxZgeKLPzftXIZ1CglLO6jZw6xU6jpgEhzKpQomOjGBbD+Kdc/Mg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.17.14.tgz", + "integrity": "sha512-4zPlW2cLHr0PZBc15/3IdJshLG2HfR29qkiS8aEwiUkuyqt/6leaVldaLBrHFqFRJQTF5to0gf+H/X9r5ceV2g==", "dependencies": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/d3-color": "^1.2.2", "@types/shortid": "^0.0.29", "d3-color": "^1.2.3", "shortid": "^2.2.14" + }, + "peerDependencies": { + "react": "^15 || ^16" } }, "node_modules/@superset-ui/legacy-preset-chart-deckgl": { @@ -16448,13 +16502,13 @@ } }, "node_modules/@superset-ui/legacy-preset-chart-nvd3": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.17.13.tgz", - "integrity": "sha512-TQyMdtP34pXG9wO5LtfNhg1ZWOD4HIfhLzED+/jvkf2GTl5DY4hUHPlO1h3h4PRKz62tsSOMMSI3+RepiEHjsA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.17.14.tgz", + "integrity": "sha512-0Fxh4RfT8x+jXrHp39xMRW8MCmMQvjxykTrBwRAeykGBsueGC5aeqOieCk1OTDtbmn+vgw7cUKUyR22JegZlug==", "dependencies": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-tip": "^0.9.1", "dompurify": "^2.0.6", @@ -16465,29 +16519,35 @@ "nvd3-fork": "^2.0.5", "prop-types": "^15.6.2", "urijs": "^1.18.10" + }, + "peerDependencies": { + "react": "^15 || ^16" } }, "node_modules/@superset-ui/plugin-chart-echarts": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.17.13.tgz", - "integrity": "sha512-QVxbvsNjlT+L2T1WFmoTWM5aryZ++sHFNUIUX3i4hTAV/Di7obt2k6ps0vVdPBVpwmjjWzMuTCJX5Ppqs9n3Pg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.17.14.tgz", + "integrity": "sha512-WwK6L4G+9bCUFOW1LRrNupSQP0qo8u1uQsjA1ZjLIxZmJr765ltFqgDDOVCZRtzyuhB6uXGs6nWkoytoMIZ1mQ==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/mathjs": "^6.0.7", "d3-array": "^1.2.0", "echarts": "^5.0.2", "mathjs": "^8.0.1" + }, + "peerDependencies": { + "react": "^16.13.1" } }, "node_modules/@superset-ui/plugin-chart-table": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.17.13.tgz", - "integrity": "sha512-ofh+g2ozHmlvd42BZvlRrcfU4i9FstMGrDCecSP4WKzMmrgbJbfW1zwpLE8CPGGV+6NaET/fIVWw2p+sj1CEig==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.17.14.tgz", + "integrity": "sha512-RjXt95yUmBJJ5P1xk3fH1orKEqBYFPlUdcDFQuDnv0R6E3V3K09ObT/umJ+jXqZ+XPBMfbbUivaIJrpT2S38Uw==", "dependencies": { "@emotion/core": "^10.0.28", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/d3-array": "^2.0.0", "@types/react-table": "^7.0.19", "d3-array": "^2.4.0", @@ -16497,6 +16557,11 @@ "react-table": "^7.2.1", "regenerator-runtime": "^0.13.5", "xss": "^1.0.6" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.13.1", + "react-dom": "^16.13.1" } }, "node_modules/@superset-ui/plugin-chart-table/node_modules/d3-array": { @@ -16508,18 +16573,22 @@ } }, "node_modules/@superset-ui/plugin-chart-word-cloud": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.17.13.tgz", - "integrity": "sha512-TVD5emY7sEljAuhk4da4uAEBlNPyjabzlMapP4Jjrulwy9rnYPXiyf6L6Z8BxoSY8RD09jdl7TRxQ/jTzCp+bg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.17.14.tgz", + "integrity": "sha512-1WZam4x8rNrdtqCxUNami0jijKv2OAvX2XJF7IXq+Hb9+8PXBEHCRgwUIzf3iOjdujtFE+INHcQyeAmJV4uEXA==", "dependencies": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/d3-cloud": "^1.2.1", "@types/d3-scale": "^2.0.2", "d3-cloud": "^1.2.5", "d3-scale": "^3.0.1", "emotion-theming": "^10.0.27", "encodable": "^0.7.6" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.13.1" } }, "node_modules/@superset-ui/plugin-chart-word-cloud/node_modules/d3-array": { @@ -16543,14 +16612,14 @@ } }, "node_modules/@superset-ui/preset-chart-xy": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.17.13.tgz", - "integrity": "sha512-NJ5ACYe1AlZ9hb24NdntNx1CFVRyOAQtpvWWfKfEnQc26t0A8Bl68WL05pMazwHQ6fkthseRXlpUEzdVVyB7Lw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.17.14.tgz", + "integrity": "sha512-jYKzITop6knzh9262ZwsYMv2URFB9s69wx6n+wxUqzj7wQgpOARtmyo43tGU0UPkYAJD5c70jbROlyUD/Xr5cg==", "dependencies": { "@data-ui/theme": "^0.0.84", "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@vx/axis": "^0.0.198", "@vx/legend": "^0.0.198", "@vx/scale": "^0.0.197", @@ -16558,6 +16627,9 @@ "encodable": "^0.7.6", "lodash": "^4.17.11", "reselect": "^4.0.0" + }, + "peerDependencies": { + "react": "^16.2" } }, "node_modules/@superset-ui/preset-chart-xy/node_modules/@vx/axis": { @@ -18708,7 +18780,6 @@ "version": "0.32.22", "resolved": "https://registry.npmjs.org/@types/react-bootstrap/-/react-bootstrap-0.32.22.tgz", "integrity": "sha512-pjUVcJzogMxns3lbvMqnnU+I8EOYxl3aI13tS2vvRm0RdAe1rs7Ds/VZA29GI6p8p3Un6NqKUpW3+dgwAjyzxg==", - "dev": true, "dependencies": { "@types/react": "*" } @@ -18754,7 +18825,6 @@ "version": "5.5.4", "resolved": "https://registry.npmjs.org/@types/react-loadable/-/react-loadable-5.5.4.tgz", "integrity": "sha512-otKcjNCfVUzdBMdwOqFITTmBruIXw6GeoZitTBvJ6BMrif8Utu2JLy42GWukNnYI7ewJdncUCooz5Y/1dBz4+w==", - "dev": true, "dependencies": { "@types/react": "*", "@types/webpack": "*" @@ -18985,8 +19055,7 @@ "node_modules/@types/tapable": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz", - "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==", - "dev": true + "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==" }, "node_modules/@types/testing-library__jest-dom": { "version": "5.9.5", @@ -19022,7 +19091,6 @@ "version": "4.39.1", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.1.tgz", "integrity": "sha512-rgO9ihNu/l72Sjx3shqwc9r6gi+tOMsqxhMEZhOEVIZt82GFOeUyEdpTk1BO2HqEHLS/XJW8ldUTIIfIMMyYFQ==", - "dev": true, "dependencies": { "@types/anymatch": "*", "@types/node": "*", @@ -19060,7 +19128,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -71944,19 +72011,19 @@ } }, "@superset-ui/chart-controls": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.13.tgz", - "integrity": "sha512-FwIPvkDSm/Qewx3IRQId4+8JdO/UcsfznSntzOZ3Syb+awyZbfNdF7OjqZOv501bMcXOrbMqiTqH6Kxoy4Y+8g==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.14.tgz", + "integrity": "sha512-YY9Gn40bRbZr4ivCQcP8E+9+maWcpoENtCQm3dPNgwVaa8wmZ03dR+VMkIsM5G3VWOHl6T+nSCyo5R/qTFlh5g==", "requires": { - "@superset-ui/core": "0.17.13", + "@superset-ui/core": "0.17.14", "lodash": "^4.17.15", "prop-types": "^15.7.2" } }, "@superset-ui/core": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.13.tgz", - "integrity": "sha512-kY9wR2WKCHfbab7gVWFNpZrsYELSWPUZZUBUIduEvfmxWYVTkl98nv926Hle5bQk64OfuDbM0QzrxOApVJ3Sdg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.14.tgz", + "integrity": "sha512-wdzCaDG8DO02wheBWyVd1q5EUV0RuEUjVSNKVm0aiZzBxcv95mlS62mgN24VdxDiL1Zca1+MJ4/bCz/K3wZ08w==", "requires": { "@babel/runtime": "^7.1.2", "@emotion/core": "^10.0.28", @@ -72039,12 +72106,12 @@ } }, "@superset-ui/legacy-plugin-chart-calendar": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.17.13.tgz", - "integrity": "sha512-98JTVEZ08xA6PPte1GrOvtTICk3Q0U1zQNrJZPwwXtPyet0/J9vQwOE8g399KaHb6+mND2ECUfKR++NOtXaC3w==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.17.14.tgz", + "integrity": "sha512-+xykD1FdquEfcmSvtDkR/NuiPlu6QYEIFLZ3H41U/AdzQb5n+kkgCG0M883qdfkQlbaGsZtjnjIoqotWclmwMQ==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3-array": "^2.0.3", "d3-selection": "^1.4.0", "d3-tip": "^0.9.1", @@ -72062,24 +72129,24 @@ } }, "@superset-ui/legacy-plugin-chart-chord": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.17.13.tgz", - "integrity": "sha512-jdSY6uTIpsO5G6DE0sFOYfiWw+uVyzhNsM68L5QsW1DgbbGbZtr9+Uig0Ec4niQqzntjpCctNFEaeOPhs5QBmw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.17.14.tgz", + "integrity": "sha512-QNeUnUR9Z/TDb2Q+lYIzUtCyKVM/tG0iLceE6kWHtlxCH3QI0aw43bhDS6wK9LLbBzURQezGStxLeJaIwmsmuA==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.6.2", "react": "^16.13.1" } }, "@superset-ui/legacy-plugin-chart-country-map": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.17.13.tgz", - "integrity": "sha512-2wwoVNZtxH7UXOdRjhqCj0BLBQ8GQTt0V8v1+VphqV6jlDCEQaJmSdSnfB0kbwjZ7bR5rmO4XmFxEHJnNUb/IA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.17.14.tgz", + "integrity": "sha512-qtjWyxPwWNEhNzXxx1h81u7DBdr44UP41JPHRkLsWoWQweecR9Q8nWCSFEVcE9+7ehAxGigtbXEHVoix4L1mzw==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-array": "^2.0.3", "prop-types": "^15.6.2" @@ -72096,34 +72163,34 @@ } }, "@superset-ui/legacy-plugin-chart-event-flow": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.17.13.tgz", - "integrity": "sha512-4cUAueJw/Te3pw73fNObkHeEeXNRwxNObkE6Z4M/9Z7qXAXNvIdhakgelnO9wcM19vcMXhS1cr0rdu37q4IgwA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.17.14.tgz", + "integrity": "sha512-A/4XpGJtBDQ1qEj5sS/wuMI4McF8XLW2h3gV6HNLga6H3Z2SV6OLb4mP15frQlCQ8Rmvf3DALT5hy5afnI2K4w==", "requires": { "@data-ui/event-flow": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-force-directed": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.17.13.tgz", - "integrity": "sha512-A3UWjqzWxYBI7aS2c11452kn50K4L4wc5/moKJo6jJgcxZtn/qBb4hjJ5CybYrvS+b4KKrbgTJY5850iVgg3Kg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.17.14.tgz", + "integrity": "sha512-If1y45YKtQZbqc+XPJYtrgAZVuQgWgIjvQa9eQe09J+tAJQuLO9bo0SeqhuHRXUJQzge3AkItURdu+zdi/Z/3A==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.7.2" } }, "@superset-ui/legacy-plugin-chart-heatmap": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.17.13.tgz", - "integrity": "sha512-9Er9FmnUIyKuHPn8FmJsLBiXHpJaqjPH5utLQM+zCeGm3PLkJuM8PI5bHF/mNMnJRtqdMx4uWTmwoM+A4LLsag==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.17.14.tgz", + "integrity": "sha512-6DClVIQNUtmqIuhlq9JrSjm8OmcEp0YHN4yNT0yTxoV16LYA+T8SCcMt3nJB8DjpZwJLd/JKLcuE2ijxe8qGxQ==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-svg-legend": "^1.x", "d3-tip": "^0.9.1", @@ -72131,14 +72198,14 @@ } }, "@superset-ui/legacy-plugin-chart-histogram": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.17.13.tgz", - "integrity": "sha512-pQFZuotoPvLuA93sfm+23/hIQL/CcawIEUaR4p+mkGvNpsFOf+FVjfI3wjk5Is9O7FJdD+zTSaZC73av1OjmkA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.17.14.tgz", + "integrity": "sha512-zmcxm92huKldnDFj+Wi2L0Swpf4vPXO4Bx3rMxLguDVkmXpGl++axmaSl8V0Wkmvx/80cPYBWcwO/pUxY8m1XA==", "requires": { "@data-ui/histogram": "^0.0.84", "@data-ui/theme": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@vx/legend": "^0.0.198", "@vx/responsive": "^0.0.199", "@vx/scale": "^0.0.197", @@ -72206,12 +72273,12 @@ } }, "@superset-ui/legacy-plugin-chart-horizon": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.17.13.tgz", - "integrity": "sha512-9bVKRikN6zDd2UcgJTo5dtk2LkAyFrGX7/RVAxC0/GmUyhKwPL7XgoK278myB9c5DL1K2lPhHTz7s1/nQatbcA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.17.14.tgz", + "integrity": "sha512-qxO1SklS6UX3OzM8RmnXYDvhEwMeU7ptidZbknBBmyA66JUn2ewwym4kWnbi0QT+v5ModMZpiLiEme1ZmfExhA==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3-array": "^2.0.3", "d3-scale": "^3.0.1", "prop-types": "^15.6.2" @@ -72240,12 +72307,12 @@ } }, "@superset-ui/legacy-plugin-chart-map-box": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.17.13.tgz", - "integrity": "sha512-o+oR7FSH7Ep+jTxTOQb445RB8sNPBqs0o8BEOf8loEUlgSZUClQx8dQYSoxRpw6YjtWVD0J+4HtUzX2HQt++Ng==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.17.14.tgz", + "integrity": "sha512-rOeybfBISuiWYtxsv52CPlgb0cAdjIFahS1W8Y8U8a0idYCNoypBmsa9WLrG4v+MBXCB2l4cgELMW8lurRBcCQ==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "immutable": "^3.8.2", "mapbox-gl": "^0.53.0", "prop-types": "^15.6.2", @@ -72262,118 +72329,118 @@ } }, "@superset-ui/legacy-plugin-chart-paired-t-test": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.17.13.tgz", - "integrity": "sha512-5evYJLS7/yVlA7OI8n3ioQEpsIz+8lSUaZo8n2wWbvRlqvApVNAx+ofppf5O9RqRgLfheYPT6FESUqTOAdRv+Q==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.17.14.tgz", + "integrity": "sha512-co4UG6dYMbZk1hhsI5JgbFHw3lLGmA2nG46T3nbn2ySJa23CYyQg8yCQHiJa/7SSKP0I5jFkmgD0JAOcvI9bHg==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "distributions": "^1.0.0", "prop-types": "^15.6.2", "reactable": "^1.1.0" } }, "@superset-ui/legacy-plugin-chart-parallel-coordinates": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.17.13.tgz", - "integrity": "sha512-alRR+psEv0chVuwLGemlhBM8+UwnO9nWQsFvV8IblL0rSGKMsuofeutljp5BOXiJu/rpumWXn3HpriMri0ABDg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.17.14.tgz", + "integrity": "sha512-9xmCLtfHF9pYSEz4RwydhiXU3xNkw2ZirMGa4CTWSXVZlEWr794lnUNtWvlunFNz4JhJClKoTNiZXHIFa+kBzg==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.7.2" } }, "@superset-ui/legacy-plugin-chart-partition": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.17.13.tgz", - "integrity": "sha512-lkcWo2d47GPgmSxOyVGKRcNd5rm1EhNnbTN/vLVrRCkBJ1u3aOcWdm3xbAQBZNXk2LPFnZM5l9px3Q301znPew==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.17.14.tgz", + "integrity": "sha512-avTFsI7VWv9yxOkgAtl7ov85t4bZj57bjj8ivZrSyeWQOuQerHBVlNQr3Hb+C5uG4aUgjez5jXEOEB/iBbyfUA==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-hierarchy": "^1.1.8", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-pivot-table": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.17.13.tgz", - "integrity": "sha512-tsL+98WeQCeAbTkm6IdA0f/XlBX6pNnFH4MIrb4cw0GNSsJ/Yz5PiA+NUptnTMSX3k+DV10vtV/T2HtuhpDK4g==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.17.14.tgz", + "integrity": "sha512-Os0rESFeXH3BpBc8XNuf0LH1zfhS+kLoI3WxLGxn7dD9M/gXhYjz05Rpby95rFDiPr6/CpJBJS4zrWlxDF3qIg==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "datatables.net-bs": "^1.10.15", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-rose": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.17.13.tgz", - "integrity": "sha512-Hz2nq14TzbUg8ynMi7zfbK5blgx4XBB25dRMvpv1jyQeTYw/IAPdMb3y0/61ouQItpCImjGWJt7ixCSYoIMJIg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.17.14.tgz", + "integrity": "sha512-GpGfJx/aXKiqKo5TqpgzUA50OKKnzVq4rR11scByxVYazTmHOL37MQIqyf8n/mCixzCvh3jSQ64PFMyum/aFsQ==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "nvd3": "1.8.6", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sankey": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.17.13.tgz", - "integrity": "sha512-DDqS5zMKNtssZemaqetSc1Wm/Ymg7TayK34SmHAXzFJ0ZbzlWsUs6gSwY38MtTwfT/Yy/g+Cp6HfJjBsu//gdw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.17.14.tgz", + "integrity": "sha512-0tbnzevrQ3dp6YJ1oMa0+Ho+LxXke/thsnq6p4XbsRgujdJ98/1wMSkt7U4OAK+K8RW1eQYZiJivnJW6kisemw==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-sankey": "^0.4.2", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sankey-loop": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.17.13.tgz", - "integrity": "sha512-cfTrYKWu02TV31a4N3g7i8+JlpvTQUD8SQWV8bWfGqenCfaYXnEtLcT7a06AZD84c7xPVIJ3ri+e1levxyCi/Q==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.17.14.tgz", + "integrity": "sha512-dnoEOMXhYiVU/dAL4P+Sd1ZsxwSUlqKMSj9TJtG2J7Kke8/GvTNz6/RDB4ndjB+DyKNFEfNhsFF13VKD0YvuRQ==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3-sankey-diagram": "^0.7.3", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sunburst": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.17.13.tgz", - "integrity": "sha512-rpc91+qtAZAjxmJyuK39GJBnzyVPVVSA8XZ3iYHFPTYooiIM0QuRbYY8RVIsDqwIJ2gNCaCxD8ymA9OhIQjAEw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.17.14.tgz", + "integrity": "sha512-P8FW+wdrLN5uC/br52/ykLxKsdV12FCbjXyL+6LnVAYU9KWLttS+fhtsCTrOKf9od1cXUDuZKJ8KKt/ktRy9ag==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-treemap": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.17.13.tgz", - "integrity": "sha512-60zgDGCbj0o6x8vJeRNyPp1jpHFOBmpza2xrHshaAWef6tyI7btaiWyDAk1+1sm+f5gHuVWI4uP8J6rE7xeuBQ==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.17.14.tgz", + "integrity": "sha512-T4qLlLUs/1PIT8Hf4iEMvR8h4Mbz8sWxLvvZTOPWtsgX/uqh11yMKNO4qR5O5kavVsOnepJI0msOWccRXNHQdQ==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3-hierarchy": "^1.1.8", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-world-map": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.17.13.tgz", - "integrity": "sha512-xxN0roJlvSqVYJpXAMkCbNgscCN5skazLlxRa+M4LYT7C3XAigcUwR8SwhP6FN9lrDaupiGaxiygrCZ2JTZhKg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.17.14.tgz", + "integrity": "sha512-ZGYSMsmsY1QJpflqKxYHI+elq94cKLwizoID6wCV7/wHA0nAcqHiDyisRnzmOmS+x7msZx5VH0XbVoiyGAgp+g==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-array": "^2.4.0", "d3-color": "^1.4.1", @@ -72397,13 +72464,13 @@ } }, "@superset-ui/legacy-preset-chart-big-number": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.17.13.tgz", - "integrity": "sha512-GqFG/BS2370GgxOm5mjXqjUMYW3eZGkj9jNxZgeKLPzftXIZ1CglLO6jZw6xU6jpgEhzKpQomOjGBbD+Kdc/Mg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.17.14.tgz", + "integrity": "sha512-4zPlW2cLHr0PZBc15/3IdJshLG2HfR29qkiS8aEwiUkuyqt/6leaVldaLBrHFqFRJQTF5to0gf+H/X9r5ceV2g==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/d3-color": "^1.2.2", "@types/shortid": "^0.0.29", "d3-color": "^1.2.3", @@ -72436,13 +72503,13 @@ } }, "@superset-ui/legacy-preset-chart-nvd3": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.17.13.tgz", - "integrity": "sha512-TQyMdtP34pXG9wO5LtfNhg1ZWOD4HIfhLzED+/jvkf2GTl5DY4hUHPlO1h3h4PRKz62tsSOMMSI3+RepiEHjsA==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.17.14.tgz", + "integrity": "sha512-0Fxh4RfT8x+jXrHp39xMRW8MCmMQvjxykTrBwRAeykGBsueGC5aeqOieCk1OTDtbmn+vgw7cUKUyR22JegZlug==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "d3": "^3.5.17", "d3-tip": "^0.9.1", "dompurify": "^2.0.6", @@ -72456,12 +72523,12 @@ } }, "@superset-ui/plugin-chart-echarts": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.17.13.tgz", - "integrity": "sha512-QVxbvsNjlT+L2T1WFmoTWM5aryZ++sHFNUIUX3i4hTAV/Di7obt2k6ps0vVdPBVpwmjjWzMuTCJX5Ppqs9n3Pg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.17.14.tgz", + "integrity": "sha512-WwK6L4G+9bCUFOW1LRrNupSQP0qo8u1uQsjA1ZjLIxZmJr765ltFqgDDOVCZRtzyuhB6uXGs6nWkoytoMIZ1mQ==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/mathjs": "^6.0.7", "d3-array": "^1.2.0", "echarts": "^5.0.2", @@ -72469,13 +72536,13 @@ } }, "@superset-ui/plugin-chart-table": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.17.13.tgz", - "integrity": "sha512-ofh+g2ozHmlvd42BZvlRrcfU4i9FstMGrDCecSP4WKzMmrgbJbfW1zwpLE8CPGGV+6NaET/fIVWw2p+sj1CEig==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.17.14.tgz", + "integrity": "sha512-RjXt95yUmBJJ5P1xk3fH1orKEqBYFPlUdcDFQuDnv0R6E3V3K09ObT/umJ+jXqZ+XPBMfbbUivaIJrpT2S38Uw==", "requires": { "@emotion/core": "^10.0.28", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/d3-array": "^2.0.0", "@types/react-table": "^7.0.19", "d3-array": "^2.4.0", @@ -72498,12 +72565,12 @@ } }, "@superset-ui/plugin-chart-word-cloud": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.17.13.tgz", - "integrity": "sha512-TVD5emY7sEljAuhk4da4uAEBlNPyjabzlMapP4Jjrulwy9rnYPXiyf6L6Z8BxoSY8RD09jdl7TRxQ/jTzCp+bg==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.17.14.tgz", + "integrity": "sha512-1WZam4x8rNrdtqCxUNami0jijKv2OAvX2XJF7IXq+Hb9+8PXBEHCRgwUIzf3iOjdujtFE+INHcQyeAmJV4uEXA==", "requires": { - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@types/d3-cloud": "^1.2.1", "@types/d3-scale": "^2.0.2", "d3-cloud": "^1.2.5", @@ -72535,14 +72602,14 @@ } }, "@superset-ui/preset-chart-xy": { - "version": "0.17.13", - "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.17.13.tgz", - "integrity": "sha512-NJ5ACYe1AlZ9hb24NdntNx1CFVRyOAQtpvWWfKfEnQc26t0A8Bl68WL05pMazwHQ6fkthseRXlpUEzdVVyB7Lw==", + "version": "0.17.14", + "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.17.14.tgz", + "integrity": "sha512-jYKzITop6knzh9262ZwsYMv2URFB9s69wx6n+wxUqzj7wQgpOARtmyo43tGU0UPkYAJD5c70jbROlyUD/Xr5cg==", "requires": { "@data-ui/theme": "^0.0.84", "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.13", - "@superset-ui/core": "0.17.13", + "@superset-ui/chart-controls": "0.17.14", + "@superset-ui/core": "0.17.14", "@vx/axis": "^0.0.198", "@vx/legend": "^0.0.198", "@vx/scale": "^0.0.197", @@ -74538,7 +74605,6 @@ "version": "0.32.22", "resolved": "https://registry.npmjs.org/@types/react-bootstrap/-/react-bootstrap-0.32.22.tgz", "integrity": "sha512-pjUVcJzogMxns3lbvMqnnU+I8EOYxl3aI13tS2vvRm0RdAe1rs7Ds/VZA29GI6p8p3Un6NqKUpW3+dgwAjyzxg==", - "dev": true, "requires": { "@types/react": "*" } @@ -74584,7 +74650,6 @@ "version": "5.5.4", "resolved": "https://registry.npmjs.org/@types/react-loadable/-/react-loadable-5.5.4.tgz", "integrity": "sha512-otKcjNCfVUzdBMdwOqFITTmBruIXw6GeoZitTBvJ6BMrif8Utu2JLy42GWukNnYI7ewJdncUCooz5Y/1dBz4+w==", - "dev": true, "requires": { "@types/react": "*", "@types/webpack": "*" @@ -74821,8 +74886,7 @@ "@types/tapable": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz", - "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==", - "dev": true + "integrity": "sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==" }, "@types/testing-library__jest-dom": { "version": "5.9.5", @@ -74857,7 +74921,6 @@ "version": "4.39.1", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.1.tgz", "integrity": "sha512-rgO9ihNu/l72Sjx3shqwc9r6gi+tOMsqxhMEZhOEVIZt82GFOeUyEdpTk1BO2HqEHLS/XJW8ldUTIIfIMMyYFQ==", - "dev": true, "requires": { "@types/anymatch": "*", "@types/node": "*", @@ -74870,8 +74933,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, diff --git a/superset-frontend/package.json b/superset-frontend/package.json index aaf0c048c2114..43128294c1729 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -65,34 +65,34 @@ "@babel/runtime-corejs3": "^7.12.5", "@data-ui/sparkline": "^0.0.84", "@emotion/core": "^10.0.35", - "@superset-ui/chart-controls": "^0.17.13", - "@superset-ui/core": "^0.17.13", - "@superset-ui/legacy-plugin-chart-calendar": "^0.17.13", - "@superset-ui/legacy-plugin-chart-chord": "^0.17.13", - "@superset-ui/legacy-plugin-chart-country-map": "^0.17.13", - "@superset-ui/legacy-plugin-chart-event-flow": "^0.17.13", - "@superset-ui/legacy-plugin-chart-force-directed": "^0.17.13", - "@superset-ui/legacy-plugin-chart-heatmap": "^0.17.13", - "@superset-ui/legacy-plugin-chart-histogram": "^0.17.13", - "@superset-ui/legacy-plugin-chart-horizon": "^0.17.13", - "@superset-ui/legacy-plugin-chart-map-box": "^0.17.13", - "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.17.13", - "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.17.13", - "@superset-ui/legacy-plugin-chart-partition": "^0.17.13", - "@superset-ui/legacy-plugin-chart-pivot-table": "^0.17.13", - "@superset-ui/legacy-plugin-chart-rose": "^0.17.13", - "@superset-ui/legacy-plugin-chart-sankey": "^0.17.13", - "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.17.13", - "@superset-ui/legacy-plugin-chart-sunburst": "^0.17.13", - "@superset-ui/legacy-plugin-chart-treemap": "^0.17.13", - "@superset-ui/legacy-plugin-chart-world-map": "^0.17.13", - "@superset-ui/legacy-preset-chart-big-number": "^0.17.13", + "@superset-ui/chart-controls": "^0.17.14", + "@superset-ui/core": "^0.17.14", + "@superset-ui/legacy-plugin-chart-calendar": "^0.17.14", + "@superset-ui/legacy-plugin-chart-chord": "^0.17.14", + "@superset-ui/legacy-plugin-chart-country-map": "^0.17.14", + "@superset-ui/legacy-plugin-chart-event-flow": "^0.17.14", + "@superset-ui/legacy-plugin-chart-force-directed": "^0.17.14", + "@superset-ui/legacy-plugin-chart-heatmap": "^0.17.14", + "@superset-ui/legacy-plugin-chart-histogram": "^0.17.14", + "@superset-ui/legacy-plugin-chart-horizon": "^0.17.14", + "@superset-ui/legacy-plugin-chart-map-box": "^0.17.14", + "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.17.14", + "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.17.14", + "@superset-ui/legacy-plugin-chart-partition": "^0.17.14", + "@superset-ui/legacy-plugin-chart-pivot-table": "^0.17.14", + "@superset-ui/legacy-plugin-chart-rose": "^0.17.14", + "@superset-ui/legacy-plugin-chart-sankey": "^0.17.14", + "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.17.14", + "@superset-ui/legacy-plugin-chart-sunburst": "^0.17.14", + "@superset-ui/legacy-plugin-chart-treemap": "^0.17.14", + "@superset-ui/legacy-plugin-chart-world-map": "^0.17.14", + "@superset-ui/legacy-preset-chart-big-number": "^0.17.14", "@superset-ui/legacy-preset-chart-deckgl": "^0.4.6", - "@superset-ui/legacy-preset-chart-nvd3": "^0.17.13", - "@superset-ui/plugin-chart-echarts": "^0.17.13", - "@superset-ui/plugin-chart-table": "^0.17.13", - "@superset-ui/plugin-chart-word-cloud": "^0.17.13", - "@superset-ui/preset-chart-xy": "^0.17.13", + "@superset-ui/legacy-preset-chart-nvd3": "^0.17.14", + "@superset-ui/plugin-chart-echarts": "^0.17.14", + "@superset-ui/plugin-chart-table": "^0.17.14", + "@superset-ui/plugin-chart-word-cloud": "^0.17.14", + "@superset-ui/preset-chart-xy": "^0.17.14", "@vx/responsive": "^0.0.195", "abortcontroller-polyfill": "^1.1.9", "antd": "^4.9.4", diff --git a/superset-frontend/spec/helpers/setupSupersetClient.js b/superset-frontend/spec/helpers/setupSupersetClient.js index a5f4740ba208e..6b316319b8a07 100644 --- a/superset-frontend/spec/helpers/setupSupersetClient.js +++ b/superset-frontend/spec/helpers/setupSupersetClient.js @@ -23,6 +23,6 @@ export default function setupSupersetClient() { // The following is needed to mock out SupersetClient requests // including CSRF authentication and initialization global.FormData = window.FormData; // used by SupersetClient - fetchMock.get('glob:*superset/csrf_token/*', { csrf_token: '1234' }); + fetchMock.get('glob:*/api/v1/security/csrf_token/*', { result: '1234' }); SupersetClient.configure({ protocol: 'http', host: 'localhost' }).init(); } diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.tsx index bd76a4d67326b..cd195d63d3f98 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.tsx @@ -32,7 +32,7 @@ import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; import { ExploreActions } from 'src/explore/actions/exploreActions'; import Control from 'src/explore/components/Control'; import DatasourcePanelDragWrapper from './DatasourcePanelDragWrapper'; -import { DatasourcePanelDndType } from './types'; +import { DndItemType } from '../DndItemType'; interface DatasourceControl extends ControlConfig { datasource?: DatasourceMeta; @@ -213,8 +213,8 @@ export default function DataSourcePanel({ {enableExploreDnd ? ( @@ -235,8 +235,8 @@ export default function DataSourcePanel({ {enableExploreDnd ? ( diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragWrapper.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragWrapper.tsx index d5a346d735e3c..4c8e2aaed685f 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragWrapper.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragWrapper.tsx @@ -42,7 +42,7 @@ export default function DatasourcePanelDragWrapper( ) { const [, drag] = useDrag({ item: { - metricOrColumnName: props.metricOrColumnName, + value: props.value, type: props.type, }, }); diff --git a/superset-frontend/src/explore/components/DatasourcePanel/types.ts b/superset-frontend/src/explore/components/DatasourcePanel/types.ts index d426f787de947..2dcc51732cd1f 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/types.ts +++ b/superset-frontend/src/explore/components/DatasourcePanel/types.ts @@ -16,15 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -export enum DatasourcePanelDndType { - // todo: The new `metric` conflicts with the existing metric type - METRIC = 'datasource-panel-metric', - COLUMN = 'column', -} +import { ColumnMeta, Metric } from '@superset-ui/chart-controls'; +import { DndItemType } from '../DndItemType'; + +export type DndItemValue = ColumnMeta | Metric; export interface DatasourcePanelDndItem { - metricOrColumnName: string; - type: - | typeof DatasourcePanelDndType.METRIC - | typeof DatasourcePanelDndType.COLUMN; + value: DndItemValue; + type: DndItemType; } diff --git a/superset-frontend/src/explore/components/optionTypes.ts b/superset-frontend/src/explore/components/DndItemType.ts similarity index 57% rename from superset-frontend/src/explore/components/optionTypes.ts rename to superset-frontend/src/explore/components/DndItemType.ts index 4d86a8fd12319..9fe3aa556cde3 100644 --- a/superset-frontend/src/explore/components/optionTypes.ts +++ b/superset-frontend/src/explore/components/DndItemType.ts @@ -16,7 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -export const OPTION_TYPES = { - metric: 'metric', - filter: 'filter', -}; + +/** + * All possible draggable items for the chart controls. + */ +export enum DndItemType { + // an existing column in table + Column = 'column', + // a selected column option in ColumnSelectControl + ColumnOption = 'columnOption', + // an adhoc column option in ColumnSelectControl + AdhocColumnOption = 'adhocColumn', + + // a saved metric + Metric = 'metric', + // a selected saved metric in MetricsControl + MetricOption = 'metricOption', + // an adhoc metric option in MetricsControl + AdhocMetricOption = 'adhocMetric', + + // an adhoc filter option + FilterOption = 'filterOption', +} diff --git a/superset-frontend/src/explore/components/OptionControls.tsx b/superset-frontend/src/explore/components/OptionControls.tsx index d0053f41790a8..0e8f777efc05f 100644 --- a/superset-frontend/src/explore/components/OptionControls.tsx +++ b/superset-frontend/src/explore/components/OptionControls.tsx @@ -26,6 +26,7 @@ import { import { Tooltip } from 'src/common/components/Tooltip'; import Icon from 'src/components/Icon'; import { savedMetricType } from 'src/explore/components/controls/MetricControl/types'; +import AdhocMetric from './controls/MetricControl/AdhocMetric'; export const DragContainer = styled.div` margin-bottom: ${({ theme }) => theme.gridUnit}px; @@ -35,7 +36,7 @@ export const DragContainer = styled.div` `; export const OptionControlContainer = styled.div<{ - isAdhoc?: boolean; + withCaret?: boolean; }>` display: flex; align-items: center; @@ -44,7 +45,7 @@ export const OptionControlContainer = styled.div<{ height: ${({ theme }) => theme.gridUnit * 6}px; background-color: ${({ theme }) => theme.colors.grayscale.light3}; border-radius: 3px; - cursor: ${({ isAdhoc }) => (isAdhoc ? 'pointer' : 'default')}; + cursor: ${({ withCaret }) => (withCaret ? 'pointer' : 'default')}; `; export const Label = styled.div` @@ -159,10 +160,11 @@ interface DragItem { export const OptionControlLabel = ({ label, savedMetric, + adhocMetric, onRemove, onMoveLabel, onDropLabel, - isAdhoc, + withCaret, isFunction, type, index, @@ -171,10 +173,11 @@ export const OptionControlLabel = ({ }: { label: string | React.ReactNode; savedMetric?: savedMetricType; + adhocMetric?: AdhocMetric; onRemove: () => void; onMoveLabel: (dragIndex: number, hoverIndex: number) => void; onDropLabel: () => void; - isAdhoc?: boolean; + withCaret?: boolean; isFunction?: boolean; isDraggable?: boolean; type: string; @@ -231,7 +234,11 @@ export const OptionControlLabel = ({ }, }); const [, drag] = useDrag({ - item: { type, index }, + item: { + type, + index, + value: savedMetric?.metric_name ? savedMetric : adhocMetric, + }, collect: monitor => ({ isDragging: monitor.isDragging(), }), @@ -246,7 +253,7 @@ export const OptionControlLabel = ({ const getOptionControlContent = () => ( @@ -272,7 +279,7 @@ export const OptionControlLabel = ({ `)} /> )} - {isAdhoc && ( + {withCaret && ( diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx new file mode 100644 index 0000000000000..130f44b0543e6 --- /dev/null +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx @@ -0,0 +1,83 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import React, { useState } from 'react'; +import { ColumnMeta, ColumnOption } from '@superset-ui/chart-controls'; +import { isEmpty } from 'lodash'; +import { LabelProps } from './types'; +import DndSelectLabel from './DndSelectLabel'; +import OptionWrapper from './components/OptionWrapper'; +import { OptionSelector } from './utils'; +import { DatasourcePanelDndItem } from '../../DatasourcePanel/types'; +import { DndItemType } from '../../DndItemType'; + +export const DndColumnSelect = (props: LabelProps) => { + const { value, options } = props; + const optionSelector = new OptionSelector(options, value); + const [values, setValues] = useState(optionSelector.values); + + const onDrop = (item: DatasourcePanelDndItem) => { + const column = item.value as ColumnMeta; + if (!optionSelector.isArray && !isEmpty(optionSelector.values)) { + optionSelector.replace(0, column.column_name); + } else { + optionSelector.add(column.column_name); + } + setValues(optionSelector.values); + props.onChange(optionSelector.getValues()); + }; + + const canDrop = (item: DatasourcePanelDndItem) => + !optionSelector.has((item.value as ColumnMeta).column_name); + + const onClickClose = (index: number) => { + optionSelector.del(index); + setValues(optionSelector.values); + props.onChange(optionSelector.getValues()); + }; + + const onShiftOptions = (dragIndex: number, hoverIndex: number) => { + optionSelector.swap(dragIndex, hoverIndex); + setValues(optionSelector.values); + props.onChange(optionSelector.getValues()); + }; + + const valuesRenderer = () => + values.map((column, idx) => ( + + + + )); + + return ( + + values={values} + onDrop={onDrop} + canDrop={canDrop} + valuesRenderer={valuesRenderer} + accept={DndItemType.Column} + {...props} + /> + ); +}; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectLabel.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectLabel.tsx deleted file mode 100644 index a08ef9eddd4f5..0000000000000 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectLabel.tsx +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React, { useState } from 'react'; -import { useDrop } from 'react-dnd'; -import { isEmpty } from 'lodash'; -import { t, useTheme } from '@superset-ui/core'; -import { BaseControlConfig, ColumnMeta } from '@superset-ui/chart-controls'; -import ControlHeader from 'src/explore/components/ControlHeader'; -import { - AddControlLabel, - DndLabelsContainer, - HeaderContainer, -} from 'src/explore/components/OptionControls'; -import { - DatasourcePanelDndItem, - DatasourcePanelDndType, -} from 'src/explore/components/DatasourcePanel/types'; -import Icon from 'src/components/Icon'; -import OptionWrapper from './components/OptionWrapper'; -import { OptionSelector } from './utils'; - -interface LabelProps extends BaseControlConfig { - name: string; - value: string[] | string | null; - onChange: (value: string[] | string | null) => void; - options: { string: ColumnMeta }; -} - -export default function DndColumnSelectLabel(props: LabelProps) { - const theme = useTheme(); - const { value, options } = props; - const optionSelector = new OptionSelector(options, value); - const [groupByOptions, setGroupByOptions] = useState( - optionSelector.groupByOptions, - ); - - const [{ isOver, canDrop }, datasourcePanelDrop] = useDrop({ - accept: DatasourcePanelDndType.COLUMN, - - drop: (item: DatasourcePanelDndItem) => { - if (!optionSelector.isArray && !isEmpty(optionSelector.groupByOptions)) { - optionSelector.replace(0, item.metricOrColumnName); - } else { - optionSelector.add(item.metricOrColumnName); - } - setGroupByOptions(optionSelector.groupByOptions); - props.onChange(optionSelector.getValues()); - }, - - canDrop: (item: DatasourcePanelDndItem) => - !optionSelector.has(item.metricOrColumnName), - - collect: monitor => ({ - isOver: monitor.isOver(), - canDrop: monitor.canDrop(), - type: monitor.getItemType(), - }), - }); - - function onClickClose(index: number) { - optionSelector.del(index); - setGroupByOptions(optionSelector.groupByOptions); - props.onChange(optionSelector.getValues()); - } - - function onShiftOptions(dragIndex: number, hoverIndex: number) { - optionSelector.swap(dragIndex, hoverIndex); - setGroupByOptions(optionSelector.groupByOptions); - props.onChange(optionSelector.getValues()); - } - - function renderPlaceHolder() { - return ( - - - {t('Drop Columns')} - - ); - } - - function renderOptions() { - return groupByOptions.map((column, idx) => ( - - )); - } - - return ( -
- - - - - {isEmpty(groupByOptions) ? renderPlaceHolder() : renderOptions()} - -
- ); -} diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx new file mode 100644 index 0000000000000..5b148883ec8d4 --- /dev/null +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx @@ -0,0 +1,334 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with work for additional information + * regarding copyright ownership. The ASF licenses file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import React, { useEffect, useMemo, useState } from 'react'; +import { logging, SupersetClient } from '@superset-ui/core'; +import { ColumnMeta, Metric } from '@superset-ui/chart-controls'; +import { Tooltip } from 'src/common/components/Tooltip'; +import { OPERATORS } from 'src/explore/constants'; +import { OptionSortType } from 'src/explore/types'; +import { DndFilterSelectProps, FilterOptionValueType } from './types'; +import AdhocFilterPopoverTrigger from '../FilterControl/AdhocFilterPopoverTrigger'; +import OptionWrapper from './components/OptionWrapper'; +import DndSelectLabel from './DndSelectLabel'; +import AdhocFilter, { + CLAUSES, + EXPRESSION_TYPES, +} from '../FilterControl/AdhocFilter'; +import AdhocMetric from '../MetricControl/AdhocMetric'; +import { + DatasourcePanelDndItem, + DndItemValue, +} from '../../DatasourcePanel/types'; +import { DndItemType } from '../../DndItemType'; + +const isDictionaryForAdhocFilter = (value: FilterOptionValueType) => + !(value instanceof AdhocFilter) && value?.expressionType; + +export const DndFilterSelect = (props: DndFilterSelectProps) => { + const propsValues = Array.from(props.value ?? []); + const [values, setValues] = useState( + propsValues.map((filter: FilterOptionValueType) => + isDictionaryForAdhocFilter(filter) ? new AdhocFilter(filter) : filter, + ), + ); + const [partitionColumn, setPartitionColumn] = useState(undefined); + const [newFilterPopoverVisible, setNewFilterPopoverVisible] = useState(false); + const [droppedItem, setDroppedItem] = useState(null); + + const optionsForSelect = ( + columns: ColumnMeta[], + formData: Record, + ) => { + const options: OptionSortType[] = [ + ...columns, + ...[...(formData?.metrics || []), formData?.metric].map( + metric => + metric && + (typeof metric === 'string' + ? { saved_metric_name: metric } + : new AdhocMetric(metric)), + ), + ].filter(option => option); + + return options + .reduce( + ( + results: (OptionSortType & { filterOptionName: string })[], + option, + ) => { + if ('saved_metric_name' in option && option.saved_metric_name) { + results.push({ + ...option, + filterOptionName: option.saved_metric_name, + }); + } else if ('column_name' in option && option.column_name) { + results.push({ + ...option, + filterOptionName: `_col_${option.column_name}`, + }); + } else if (option instanceof AdhocMetric) { + results.push({ + ...option, + filterOptionName: `_adhocmetric_${option.label}`, + }); + } + return results; + }, + [], + ) + .sort( + (a: OptionSortType, b: OptionSortType) => + (a.saved_metric_name || a.column_name || a.label)?.localeCompare( + b.saved_metric_name || b.column_name || b.label || '', + ) ?? 0, + ); + }; + const [options, setOptions] = useState( + optionsForSelect(props.columns, props.formData), + ); + + useEffect(() => { + const { datasource } = props; + if (datasource && datasource.type === 'table') { + const dbId = datasource.database?.id; + const { + datasource_name: name, + schema, + is_sqllab_view: isSqllabView, + } = datasource; + + if (!isSqllabView && dbId && name && schema) { + SupersetClient.get({ + endpoint: `/superset/extra_table_metadata/${dbId}/${name}/${schema}/`, + }) + .then(({ json }: { json: Record }) => { + if (json && json.partitions) { + const { partitions } = json; + // for now only show latest_partition option + // when table datasource has only 1 partition key. + if ( + partitions && + partitions.cols && + Object.keys(partitions.cols).length === 1 + ) { + setPartitionColumn(partitions.cols[0]); + } + } + }) + .catch((error: Record) => { + logging.error('fetch extra_table_metadata:', error.statusText); + }); + } + } + }, []); + + useEffect(() => { + setOptions(optionsForSelect(props.columns, props.formData)); + }, [props.columns, props.formData]); + + useEffect(() => { + setValues( + (props.value || []).map((filter: FilterOptionValueType) => + isDictionaryForAdhocFilter(filter) ? new AdhocFilter(filter) : filter, + ), + ); + }, [props.value]); + + const onClickClose = (index: number) => { + const valuesCopy = [...values]; + valuesCopy.splice(index, 1); + setValues(valuesCopy); + props.onChange(valuesCopy); + }; + + const onShiftOptions = (dragIndex: number, hoverIndex: number) => { + const newValues = [...values]; + [newValues[hoverIndex], newValues[dragIndex]] = [ + newValues[dragIndex], + newValues[hoverIndex], + ]; + setValues(newValues); + }; + + const getMetricExpression = (savedMetricName: string) => + props.savedMetrics.find( + (savedMetric: Metric) => savedMetric.metric_name === savedMetricName, + )?.expression; + + const mapOption = (option: FilterOptionValueType) => { + // already a AdhocFilter, skip + if (option instanceof AdhocFilter) { + return option; + } + const filterOptions = option as Record; + // via datasource saved metric + if (filterOptions.saved_metric_name) { + return new AdhocFilter({ + expressionType: + props.datasource.type === 'druid' + ? EXPRESSION_TYPES.SIMPLE + : EXPRESSION_TYPES.SQL, + subject: + props.datasource.type === 'druid' + ? filterOptions.saved_metric_name + : getMetricExpression(filterOptions.saved_metric_name), + operator: OPERATORS['>'], + comparator: 0, + clause: CLAUSES.HAVING, + }); + } + // has a custom label, meaning it's custom column + if (filterOptions.label) { + return new AdhocFilter({ + expressionType: + props.datasource.type === 'druid' + ? EXPRESSION_TYPES.SIMPLE + : EXPRESSION_TYPES.SQL, + subject: + props.datasource.type === 'druid' + ? filterOptions.label + : new AdhocMetric(option).translateToSql(), + operator: OPERATORS['>'], + comparator: 0, + clause: CLAUSES.HAVING, + }); + } + // add a new filter item + if (filterOptions.column_name) { + return new AdhocFilter({ + expressionType: EXPRESSION_TYPES.SIMPLE, + subject: filterOptions.column_name, + operator: OPERATORS['=='], + comparator: '', + clause: CLAUSES.WHERE, + isNew: true, + }); + } + return null; + }; + + const onFilterEdit = (changedFilter: AdhocFilter) => { + props.onChange( + values.map((value: AdhocFilter) => { + if (value.filterOptionName === changedFilter.filterOptionName) { + return changedFilter; + } + return value; + }), + ); + }; + + const onNewFilter = (newFilter: AdhocFilter) => { + const mappedOption = mapOption(newFilter); + if (mappedOption) { + const newValues = [...values, mappedOption]; + setValues(newValues); + props.onChange(newValues); + } + }; + + const togglePopover = (visible: boolean) => { + setNewFilterPopoverVisible(visible); + }; + + const closePopover = () => { + togglePopover(false); + }; + + const valuesRenderer = () => + values.map((adhocFilter: AdhocFilter, index: number) => { + const label = adhocFilter.getDefaultLabel(); + return ( + + + {label} + + + ); + }); + + const adhocFilter = useMemo(() => { + if (droppedItem?.metric_name) { + return new AdhocFilter({ + expressionType: EXPRESSION_TYPES.SQL, + clause: CLAUSES.HAVING, + sqlExpression: droppedItem?.expression, + }); + } + if (droppedItem instanceof AdhocMetric) { + return new AdhocFilter({ + expressionType: EXPRESSION_TYPES.SQL, + clause: CLAUSES.HAVING, + sqlExpression: (droppedItem as AdhocMetric)?.translateToSql(), + }); + } + return new AdhocFilter({ + subject: (droppedItem as ColumnMeta)?.column_name, + }); + }, [droppedItem]); + + return ( + <> + + values={values} + onDrop={(item: DatasourcePanelDndItem) => { + setDroppedItem(item.value); + togglePopover(true); + }} + canDrop={() => true} + valuesRenderer={valuesRenderer} + accept={[ + DndItemType.Column, + DndItemType.Metric, + DndItemType.MetricOption, + DndItemType.AdhocMetricOption, + ]} + {...props} + /> + +
+ + + ); +}; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx new file mode 100644 index 0000000000000..820ae31135458 --- /dev/null +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx @@ -0,0 +1,73 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import React from 'react'; +import { useDrop } from 'react-dnd'; +import { isEmpty } from 'lodash'; +import { t, useTheme } from '@superset-ui/core'; +import ControlHeader from 'src/explore/components/ControlHeader'; +import { + AddControlLabel, + DndLabelsContainer, + HeaderContainer, +} from 'src/explore/components/OptionControls'; +import { DatasourcePanelDndItem } from 'src/explore/components/DatasourcePanel/types'; +import Icon from 'src/components/Icon'; +import { DndColumnSelectProps } from './types'; + +export default function DndSelectLabel( + props: DndColumnSelectProps, +) { + const theme = useTheme(); + + const [{ isOver, canDrop }, datasourcePanelDrop] = useDrop({ + accept: props.accept, + + drop: (item: DatasourcePanelDndItem) => { + props.onDrop(item); + }, + + canDrop: (item: DatasourcePanelDndItem) => props.canDrop(item), + + collect: monitor => ({ + isOver: monitor.isOver(), + canDrop: monitor.canDrop(), + type: monitor.getItemType(), + }), + }); + + function renderPlaceHolder() { + return ( + + + {t('Drop Columns')} + + ); + } + + return ( +
+ + + + + {isEmpty(props.values) ? renderPlaceHolder() : props.valuesRenderer()} + +
+ ); +} diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/Option.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/Option.tsx index 22cbb037a13a8..ce7cba099eefb 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/Option.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/Option.tsx @@ -18,7 +18,6 @@ */ import React from 'react'; import { useTheme } from '@superset-ui/core'; -import { ColumnOption } from '@superset-ui/chart-controls'; import Icon from 'src/components/Icon'; import { CaretContainer, @@ -32,7 +31,10 @@ export default function Option(props: OptionProps) { const theme = useTheme(); return ( - + - + {props.withCaret && ( diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/OptionWrapper.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/OptionWrapper.tsx index 13e18aadcfb0a..be700bfbe2ce8 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/OptionWrapper.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/components/OptionWrapper.tsx @@ -25,15 +25,25 @@ import { } from 'react-dnd'; import { DragContainer } from 'src/explore/components/OptionControls'; import Option from './Option'; -import { OptionProps, GroupByItemInterface, GroupByItemType } from '../types'; +import { OptionProps, OptionItemInterface } from '../types'; +import { DndItemType } from '../../../DndItemType'; -export default function OptionWrapper(props: OptionProps) { - const { index, onShiftOptions } = props; +export default function OptionWrapper( + props: OptionProps & { type: DndItemType }, +) { + const { + index, + type, + onShiftOptions, + clickClose, + withCaret, + children, + } = props; const ref = useRef(null); - const item: GroupByItemInterface = { + const item: OptionItemInterface = { dragIndex: index, - type: GroupByItemType, + type, }; const [, drag] = useDrag({ item, @@ -43,9 +53,9 @@ export default function OptionWrapper(props: OptionProps) { }); const [, drop] = useDrop({ - accept: GroupByItemType, + accept: type, - hover: (item: GroupByItemInterface, monitor: DropTargetMonitor) => { + hover: (item: OptionItemInterface, monitor: DropTargetMonitor) => { if (!ref.current) { return; } @@ -89,8 +99,15 @@ export default function OptionWrapper(props: OptionProps) { drag(drop(ref)); return ( - -