diff --git a/frontend/src/lib/components/ActionSelectBox.js b/frontend/src/lib/components/ActionSelectBox.js index e74d2ba1aa324..c23511ad360db 100644 --- a/frontend/src/lib/components/ActionSelectBox.js +++ b/frontend/src/lib/components/ActionSelectBox.js @@ -1,9 +1,8 @@ import React, { Component, useState } from 'react' -import Select, { components } from 'react-select' import { ActionSelectInfo } from 'scenes/trends/ActionSelectInfo' -import { selectStyle } from '../utils' import PropTypes from 'prop-types' import ActionSelectTab from './ActionSelectTab' +import { Select } from 'antd' const determineActiveTab = props => { if (props.selected) { @@ -46,28 +45,14 @@ export class ActionSelectPanel extends Component { } } - Option = props => { - return ( -
- this.setState({ - infoOpen: true, - infoBoundingRect: e.target.getBoundingClientRect(), - infoActionId: props.value, - }) - } - onMouseOut={() => { - this.setState({ infoOpen: false }) - }} - > - -
- ) + determineValue = active => { + if (active && active.filter && active.filter.type === this.props.title) return active.filter.id + return null } render() { return ( -
+
{this.props.redirect} {this.state.infoOpen && ( )} {this.props.message}
) diff --git a/frontend/src/lib/components/PropertyFilters/PropertyFilter.js b/frontend/src/lib/components/PropertyFilters/PropertyFilter.js index bc080e9308661..ece7b28652adb 100644 --- a/frontend/src/lib/components/PropertyFilters/PropertyFilter.js +++ b/frontend/src/lib/components/PropertyFilters/PropertyFilter.js @@ -17,12 +17,14 @@ export function PropertyFilter({ index, onComplete, logic }) { defaultOpen={!key} placeholder="Property key" value={key} - filterOption={(input, option) => option.children?.toLowerCase().indexOf(input.toLowerCase()) >= 0} + filterOption={(input, option) => + option.children && option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 + } onChange={(_, new_key) => setFilter(index, new_key.children, undefined, operator, new_key.type)} style={{ width: '100%' }} > {eventProperties.length > 0 && ( - + {eventProperties.map((item, index) => ( )} {personProperties && ( - + {personProperties.map((item, index) => ( Event name + onChange={value => this.sendStep({ ...step, - event: item.value, + event: value, }) } /> diff --git a/frontend/src/scenes/actions/ActionsTable.js b/frontend/src/scenes/actions/ActionsTable.js index dfcde3e52dd38..eda95d857a419 100644 --- a/frontend/src/scenes/actions/ActionsTable.js +++ b/frontend/src/scenes/actions/ActionsTable.js @@ -22,7 +22,6 @@ export function ActionsTable() { { title: 'Volume', render: function RenderVolume(_, action) { - console.log(action) return {action.count} }, }, diff --git a/frontend/src/scenes/actions/EventName.js b/frontend/src/scenes/actions/EventName.js index fb79315453136..ebd0b9e73b243 100644 --- a/frontend/src/scenes/actions/EventName.js +++ b/frontend/src/scenes/actions/EventName.js @@ -1,20 +1,38 @@ import React from 'react' -import Select from 'react-select' +import { Select } from 'antd' import { useValues } from 'kea' import { userLogic } from 'scenes/userLogic' export function EventName({ value, onChange }) { const { eventNamesGrouped } = useValues(userLogic) + return (
{eventNamesGrouped[0].options.length === 0 && "You haven't sent any custom events."}{' '} diff --git a/frontend/src/scenes/trends/ActionFilter/ActionFilterDropdown.js b/frontend/src/scenes/trends/ActionFilter/ActionFilterDropdown.js index 461620581e87e..b0078121d6ab7 100644 --- a/frontend/src/scenes/trends/ActionFilter/ActionFilterDropdown.js +++ b/frontend/src/scenes/trends/ActionFilter/ActionFilterDropdown.js @@ -56,7 +56,7 @@ export function ActionPanelContainer({ entityType, panelIndex, options, logic }) const { entities, selectedFilter, filters } = useValues(logic) const { updateFilter } = useActions(logic) - const dropDownOnSelect = item => updateFilter({ type: entityType, value: item.value, index: selectedFilter.index }) + const dropDownOnSelect = value => updateFilter({ type: entityType, value: value, index: selectedFilter.index }) const dropDownOnHover = value => entities[entityType].filter(a => a.id === value)[0] const redirect = () => { @@ -92,7 +92,6 @@ export function ActionPanelContainer({ entityType, panelIndex, options, logic }) return null } } - return ( diff --git a/frontend/src/scenes/users/CohortGroup.js b/frontend/src/scenes/users/CohortGroup.js index e6cbba984b409..f7d77cd4d0b8e 100644 --- a/frontend/src/scenes/users/CohortGroup.js +++ b/frontend/src/scenes/users/CohortGroup.js @@ -1,7 +1,7 @@ import React, { useState } from 'react' import { Card, CloseButton } from '../../lib/utils' import { PropertyFilters } from '../../lib/components/PropertyFilters/PropertyFilters' -import Select from 'react-select' +import { Select } from 'antd' import { actionsModel } from '~/models/actionsModel' import { useValues } from 'kea' @@ -24,9 +24,8 @@ function DayChoice({ days, name, group, onChange }) { } export function CohortGroup({ onChange, onRemove, group, index }) { - const { actionsGrouped, actions } = useValues(actionsModel) + const { actionsGrouped } = useValues(actionsModel) const [selected, setSelected] = useState((group.action_id && 'action') || (group.properties && 'property')) - return (
@@ -81,17 +80,30 @@ export function CohortGroup({ onChange, onRemove, group, index }) { {selected == 'action' && (
)}
diff --git a/package.json b/package.json index 13610dadd6fbe..52eea8dbb863b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "react-dom": ">= 16.8", "react-draggable": "^4.2.0", "react-redux": "^7.2.0", - "react-select": "^3.0.8", "react-shadow": "^17.4.0", "react-stripe-elements": "^6.0.1", "react-toastify": "^5.5.0", diff --git a/yarn.lock b/yarn.lock index b57b674cef1ce..a05bf984d6799 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1025,7 +1025,7 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2": +"@babel/runtime@^7.4.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308" integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ== @@ -1180,42 +1180,6 @@ debug "^3.1.0" lodash.once "^4.1.1" -"@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.27.tgz#7895db204e2c1a991ae33d51262a3a44f6737303" - integrity sha512-Zp8BEpbMunFsTcqAK4D7YTm3MvCp1SekflSLJH8lze2fCcSZ/yMkXHo8kb3t1/1Tdd3hAqf3Fb7z9VZ+FMiC9w== - dependencies: - "@emotion/sheet" "0.9.4" - "@emotion/stylis" "0.8.5" - "@emotion/utils" "0.11.3" - "@emotion/weak-memoize" "0.2.5" - -"@emotion/core@^10.0.9": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.27.tgz#7c3f78be681ab2273f3bf11ca3e2edc4a9dd1fdc" - integrity sha512-XbD5R36pVbohQMnKfajHv43g8EbN4NHdF6Zh9zg/C0nr0jqwOw3gYnC07Xj3yG43OYSRyrGsoQ5qPwc8ycvLZw== - dependencies: - "@babel/runtime" "^7.5.5" - "@emotion/cache" "^10.0.27" - "@emotion/css" "^10.0.27" - "@emotion/serialize" "^0.11.15" - "@emotion/sheet" "0.9.4" - "@emotion/utils" "0.11.3" - -"@emotion/css@^10.0.27", "@emotion/css@^10.0.9": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" - integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== - dependencies: - "@emotion/serialize" "^0.11.15" - "@emotion/utils" "0.11.3" - babel-plugin-emotion "^10.0.27" - -"@emotion/hash@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.4.tgz#f14932887422c9056b15a8d222a9074a7dfa2831" - integrity sha512-fxfMSBMX3tlIbKUdtGKxqB1fyrH6gVrX39Gsv3y8lRYKUqlgDt3UMqQyGnR1bQMa2B8aGnhLZokZgg8vT0Le+A== - "@emotion/is-prop-valid@^0.8.3": version "0.8.8" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" @@ -1228,42 +1192,16 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== -"@emotion/serialize@^0.11.15": - version "0.11.15" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.15.tgz#9a0f5873fb458d87d4f23e034413c12ed60a705a" - integrity sha512-YE+qnrmGwyR+XB5j7Bi+0GT1JWsdcjM/d4POu+TXkcnrRs4RFCCsi3d/Ebf+wSStHqAlTT2+dfd+b9N9EO2KBg== - dependencies: - "@emotion/hash" "0.7.4" - "@emotion/memoize" "0.7.4" - "@emotion/unitless" "0.7.5" - "@emotion/utils" "0.11.3" - csstype "^2.5.7" - -"@emotion/sheet@0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" - integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== - -"@emotion/stylis@0.8.5", "@emotion/stylis@^0.8.4": +"@emotion/stylis@^0.8.4": version "0.8.5" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== -"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4": +"@emotion/unitless@^0.7.4": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== -"@emotion/utils@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" - integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== - -"@emotion/weak-memoize@0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" - integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== - "@iarna/toml@^2.2.0": version "2.2.3" resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.3.tgz#f060bf6eaafae4d56a7dac618980838b0696e2ab" @@ -2016,22 +1954,6 @@ babel-plugin-dynamic-import-node@^2.3.0: dependencies: object.assign "^4.1.0" -babel-plugin-emotion@^10.0.27: - version "10.0.27" - resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.27.tgz#59001cf5de847c1d61f2079cd906a90a00d3184f" - integrity sha512-SUNYcT4FqhOqvwv0z1oeYhqgheU8qrceLojuHyX17ngo7WtWqN5I9l3IGHzf21Xraj465CVzF4IvOlAF+3ed0A== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@emotion/hash" "0.7.4" - "@emotion/memoize" "0.7.4" - "@emotion/serialize" "^0.11.15" - babel-plugin-macros "^2.0.0" - babel-plugin-syntax-jsx "^6.18.0" - convert-source-map "^1.5.0" - escape-string-regexp "^1.0.5" - find-root "^1.1.0" - source-map "^0.5.7" - babel-plugin-import@^1.13.0: version "1.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-import/-/babel-plugin-import-1.13.0.tgz#c532fd533df9db53b47d4d4db3676090fc5c07a5" @@ -2045,15 +1967,6 @@ babel-plugin-kea@^0.1.0: resolved "https://registry.yarnpkg.com/babel-plugin-kea/-/babel-plugin-kea-0.1.0.tgz#e48f50d1981082b53111a3f59c3abef9a6c3e51e" integrity sha512-vZLD1yM4BLAFwJKIMPyWezljsqsp1OWsW8vQBW57G+d1k2hODwd3wtXD/f/j7aXDxeV/v2a7hHDN2UH8QyapPA== -babel-plugin-macros@^2.0.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" - integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== - dependencies: - "@babel/runtime" "^7.7.2" - cosmiconfig "^6.0.0" - resolve "^1.12.0" - "babel-plugin-styled-components@>= 1": version "1.10.7" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz#3494e77914e9989b33cc2d7b3b29527a949d635c" @@ -2892,7 +2805,7 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: +convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -3277,7 +3190,7 @@ csstype@^2.2.0: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== -csstype@^2.5.7, csstype@^2.6.7: +csstype@^2.6.7: version "2.6.8" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.8.tgz#0fb6fc2417ffd2816a418c9336da74d7f07db431" integrity sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA== @@ -3784,13 +3697,6 @@ dom-align@^1.7.0: resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.11.1.tgz#7592be99a660a36cdedc1d6eeb22b8109d758cae" integrity sha512-hN42DmUgtweBx0iBjDLO4WtKOMcK8yBmPx/fgdsgQadLuzPu/8co3oLdK5yMmeM/vnUd3yDyV6qV8/NzxBexQg== -dom-helpers@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" - integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA== - dependencies: - "@babel/runtime" "^7.1.2" - dom-helpers@^5.0.1: version "5.1.3" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.1.3.tgz#7233248eb3a2d1f74aafca31e52c5299cc8ce821" @@ -4508,11 +4414,6 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-root@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" - integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== - find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -6036,7 +5937,7 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memoize-one@^5.0.0, memoize-one@^5.1.1: +memoize-one@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== @@ -8188,13 +8089,6 @@ react-draggable@^4.2.0: classnames "^2.2.5" prop-types "^15.6.0" -react-input-autosize@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2" - integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== - dependencies: - prop-types "^15.5.8" - react-is@^16.12.0, react-is@^16.7.0, react-is@^16.8.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -8259,20 +8153,6 @@ react-resizable@^1.10.0: prop-types "15.x" react-draggable "^4.0.3" -react-select@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.0.8.tgz#06ff764e29db843bcec439ef13e196865242e0c1" - integrity sha512-v9LpOhckLlRmXN5A6/mGGEft4FMrfaBFTGAnuPHcUgVId7Je42kTq9y0Z+Ye5z8/j0XDT3zUqza8gaRaI1PZIg== - dependencies: - "@babel/runtime" "^7.4.4" - "@emotion/cache" "^10.0.9" - "@emotion/core" "^10.0.9" - "@emotion/css" "^10.0.9" - memoize-one "^5.0.0" - prop-types "^15.6.0" - react-input-autosize "^2.2.2" - react-transition-group "^2.2.1" - react-shadow@^17.4.0: version "17.4.0" resolved "https://registry.yarnpkg.com/react-shadow/-/react-shadow-17.4.0.tgz#e8490ade388a89c08a5b678d9deab778188190cc" @@ -8297,16 +8177,6 @@ react-toastify@^5.5.0: prop-types "^15.7.2" react-transition-group "^4" -react-transition-group@^2.2.1: - version "2.9.0" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d" - integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg== - dependencies: - dom-helpers "^3.4.0" - loose-envify "^1.4.0" - prop-types "^15.6.2" - react-lifecycles-compat "^3.0.4" - react-transition-group@^4: version "4.3.0" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683" @@ -9004,7 +8874,7 @@ source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=