From 17a4fd9a80bb8c1a8e75beee62d8a7ce637b9e5b Mon Sep 17 00:00:00 2001 From: Bree Hall Date: Tue, 8 Feb 2022 15:37:52 -0500 Subject: [PATCH 01/23] Upgraded the version of EUI to 47.0.0 and react-beautiful-dnd (an EUI dependancy) to 13.1.0 --- package.json | 4 +- src/dev/license_checker/config.ts | 2 +- yarn.lock | 247 +++++++++++++++++------------- 3 files changed, 147 insertions(+), 106 deletions(-) diff --git a/package.json b/package.json index 9ea3e8335f8861..9a6fa48d81c2cc 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.1.0-canary.2", "@elastic/ems-client": "8.0.0", - "@elastic/eui": "46.1.0", + "@elastic/eui": "47.0.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", @@ -335,7 +335,7 @@ "re2": "^1.16.0", "react": "^16.12.0", "react-ace": "^7.0.5", - "react-beautiful-dnd": "^13.0.0", + "react-beautiful-dnd": "^13.1.0", "react-color": "^2.13.8", "react-dom": "^16.12.0", "react-dropzone": "^4.2.9", diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index 6e05cf6d3f6b03..cff3a524d21ba9 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -77,6 +77,6 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.0.0': ['Elastic License 2.0'], - '@elastic/eui@46.1.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@47.0.0': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry }; diff --git a/yarn.lock b/yarn.lock index ad5df52a1655c7..b6b2361ae2b258 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1992,7 +1992,7 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.0", "@babel/runtime@^7.16.0", "@babel/runtime@^7.16.7", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.0", "@babel/runtime@^7.16.0", "@babel/runtime@^7.16.7", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa" integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ== @@ -2357,18 +2357,18 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@46.1.0": - version "46.1.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-46.1.0.tgz#b1d77a56d529001858b7fc91f6c2953288549336" - integrity sha512-j65NMzqKluVPtk3b6UYdVVaBha74Y8Y/N6QaHin9MmqUKoAPgevqHWvi0n/OmMpADdRCI0ldxkse6tgAvdaEHQ== +"@elastic/eui@47.0.0": + version "47.0.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-47.0.0.tgz#48fecf2e02246eb390b877d0cedb4d8d4e5e7853" + integrity sha512-5byiLBLR1ZFomkqaXcH1TyxRJ3s+qthCWlsOLLuskJCm6dhymcsyUKOONMdAmEwWZeczbzbAdTkJBP4ZPlTCpw== dependencies: "@types/chroma-js" "^2.0.0" "@types/lodash" "^4.14.160" "@types/numeral" "^0.0.28" - "@types/react-beautiful-dnd" "^13.0.0" - "@types/react-input-autosize" "^2.2.0" - "@types/react-virtualized-auto-sizer" "^1.0.0" - "@types/react-window" "^1.8.2" + "@types/react-beautiful-dnd" "^13.1.2" + "@types/react-input-autosize" "^2.2.1" + "@types/react-virtualized-auto-sizer" "^1.0.1" + "@types/react-window" "^1.8.5" "@types/refractor" "^3.0.0" "@types/resize-observer-browser" "^0.1.5" "@types/vfile-message" "^2.0.0" @@ -2378,13 +2378,13 @@ mdast-util-to-hast "^10.0.0" numeral "^2.0.6" prop-types "^15.6.0" - react-beautiful-dnd "^13.0.0" - react-dropzone "^11.2.0" - react-focus-on "^3.5.0" - react-input-autosize "^2.2.2" - react-is "~16.3.0" - react-virtualized-auto-sizer "^1.0.2" - react-window "^1.8.5" + react-beautiful-dnd "^13.1.0" + react-dropzone "^11.5.3" + react-focus-on "^3.5.4" + react-input-autosize "^3.0.0" + react-is "^17.0.2" + react-virtualized-auto-sizer "^1.0.6" + react-window "^1.8.6" refractor "^3.5.0" rehype-raw "^5.0.0" rehype-react "^6.0.0" @@ -7334,6 +7334,13 @@ dependencies: "@types/react" "*" +"@types/react-beautiful-dnd@^13.1.2": + version "13.1.2" + resolved "https://registry.yarnpkg.com/@types/react-beautiful-dnd/-/react-beautiful-dnd-13.1.2.tgz#510405abb09f493afdfd898bf83995dc6385c130" + integrity sha512-+OvPkB8CdE/bGdXKyIhc/Lm2U7UAYCCJgsqmopFmh9gbAudmslkI8eOrPDjg4JhwSE6wytz4a3/wRjKtovHVJg== + dependencies: + "@types/react" "*" + "@types/react-dom@>=16.9.0", "@types/react-dom@^16.9.8": version "16.9.8" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.8.tgz#fe4c1e11dfc67155733dfa6aa65108b4971cb423" @@ -7348,10 +7355,10 @@ dependencies: "@types/react" "*" -"@types/react-input-autosize@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@types/react-input-autosize/-/react-input-autosize-2.2.0.tgz#d62b07567088e547500f4693ae25dce0639c1b4e" - integrity sha512-8NO64XLmdRKUHeteXnweVnXuuSQr5HMSa4vRyNBUKOeZlimvgHPMtRchFHVHO9k7VpDoufCFYMJ6XHJ44qMTBQ== +"@types/react-input-autosize@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@types/react-input-autosize/-/react-input-autosize-2.2.1.tgz#6a335212e7fce1e1a4da56ae2095c8c5c35fbfe6" + integrity sha512-RxzEjd4gbLAAdLQ92Q68/AC+TfsAKTc4evsArUH1aIShIMqQMIMjsxoSnwyjtbFTO/AGIW/RQI94XSdvOxCz/w== dependencies: "@types/react" "*" @@ -7425,10 +7432,10 @@ dependencies: "@types/react" "*" -"@types/react-virtualized-auto-sizer@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.0.tgz#fc32f30a8dab527b5816f3a757e1e1d040c8f272" - integrity sha512-NMErdIdSnm2j/7IqMteRiRvRulpjoELnXWUwdbucYCz84xG9PHcoOrr7QfXwB/ku7wd6egiKFrzt/+QK4Imeeg== +"@types/react-virtualized-auto-sizer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.1.tgz#b3187dae1dfc4c15880c9cfc5b45f2719ea6ebd4" + integrity sha512-GH8sAnBEM5GV9LTeiz56r4ZhMOUSrP43tAQNSRVxNexDjcNKLCEtnxusAItg1owFUFE6k0NslV26gqVClVvong== dependencies: "@types/react" "*" @@ -7447,10 +7454,10 @@ dependencies: "@types/react" "*" -"@types/react-window@^1.8.2": - version "1.8.2" - resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.2.tgz#a5a6b2762ce73ffaab7911ee1397cf645f2459fe" - integrity sha512-gP1xam68Wc4ZTAee++zx6pTdDAH08rAkQrWm4B4F/y6hhmlT9Mgx2q8lTCXnrPHXsr15XjRN9+K2DLKcz44qEQ== +"@types/react-window@^1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.5.tgz#285fcc5cea703eef78d90f499e1457e9b5c02fc1" + integrity sha512-V9q3CvhC9Jk9bWBOysPGaWy/Z0lxYcTXLtLipkt2cnRj1JOSFNF7wqGpkScSXMgBwC+fnVRg/7shwgddBG5ICw== dependencies: "@types/react" "*" @@ -8742,10 +8749,10 @@ argsplit@^1.0.5: resolved "https://registry.yarnpkg.com/argsplit/-/argsplit-1.0.5.tgz#9319a6ef63411716cfeb216c45ec1d13b35c5e99" integrity sha1-kxmm72NBFxbP6yFsRewdE7NcXpk= -aria-hidden@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.1.1.tgz#0c356026d3f65e2bd487a3adb73f0c586be2c37e" - integrity sha512-M7zYxCcOQPOaxGHoMTKUFD2UNcVFTp9ycrdStLcTPLf8zgTXC3+YcGe+UuzSh5X1BX/0/PtS8xTNy4xyH/6xtw== +aria-hidden@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.1.3.tgz#bb48de18dc84787a3c6eee113709c473c64ec254" + integrity sha512-RhVWFtKH5BiGMycI72q2RAFMLQi8JP9bLuQXgR5a8Znp7P5KOIADSJeyfI8PCVxLEp067B2HbP5JIiI/PXIZeA== dependencies: tslib "^1.0.0" @@ -9148,10 +9155,10 @@ attr-accept@^1.1.3: dependencies: core-js "^2.5.0" -attr-accept@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/attr-accept/-/attr-accept-2.2.1.tgz#89b48de019ed4342f1865626b4389c666b3ed231" - integrity sha512-GpefLMsbH5ojNgfTW+OBin2xKzuHfyeNA+qCktzZojBhbA/lPZdCFMWdwk5ajb989Ok7ZT+EADqvW3TAFNMjhA== +attr-accept@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/attr-accept/-/attr-accept-2.2.2.tgz#646613809660110749e92f2c10833b70968d929b" + integrity sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg== autoprefixer@^9.7.4: version "9.8.5" @@ -13061,6 +13068,11 @@ detect-newline@3.1.0, detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== +detect-node-es@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" + integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== + detect-node@2.1.0, detect-node@^2.0.4, detect-node@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" @@ -15069,12 +15081,12 @@ file-saver@^1.3.8: resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-1.3.8.tgz#e68a30c7cb044e2fb362b428469feb291c2e09d8" integrity sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== -file-selector@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/file-selector/-/file-selector-0.1.12.tgz#fe726547be219a787a9dcc640575a04a032b1fd0" - integrity sha512-Kx7RTzxyQipHuiqyZGf+Nz4vY9R1XGxuQl/hLoJwq+J4avk/9wxxgZyHKtbyIPJmbD4A66DWGYfyykWNpcYutQ== +file-selector@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/file-selector/-/file-selector-0.4.0.tgz#59ec4f27aa5baf0841e9c6385c8386bef4d18b17" + integrity sha512-iACCiXeMYOvZqlF1kTiYINzgepRBymz1wwjiuup9u9nayhb6g4fSwiyJ/6adli+EPwrWtpgQAh2PoS7HukEGEg== dependencies: - tslib "^1.9.0" + tslib "^2.0.3" file-system-cache@^1.0.5: version "1.0.5" @@ -15286,10 +15298,12 @@ fn.name@1.x.x: resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== -focus-lock@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.7.0.tgz#b2bfb0ca7beacc8710a1ff74275fe0dc60a1d88a" - integrity sha512-LI7v2mH02R55SekHYdv9pRHR9RajVNyIJ2N5IEkWbg7FT5ZmJ9Hw4mWxHeEUcd+dJo0QmzztHvDvWcc7prVFsw== +focus-lock@^0.9.2: + version "0.9.2" + resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.9.2.tgz#9d30918aaa99b1b97677731053d017f82a540d5b" + integrity sha512-YtHxjX7a0IC0ZACL5wsX8QdncXofWpGPNoVMuI/nZUrPGp6LmNI6+D5j0pPj+v8Kw5EpweA+T5yImK0rnWf7oQ== + dependencies: + tslib "^2.0.3" folktale@2.0.1: version "2.0.1" @@ -23817,6 +23831,15 @@ prop-types@15.x, prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.7, pr object-assign "^4.1.1" react-is "^16.8.1" +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + propagate@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" @@ -24263,25 +24286,25 @@ react-ace@^7.0.5: lodash.isequal "^4.5.0" prop-types "^15.7.2" -react-beautiful-dnd@^13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-13.0.0.tgz#f70cc8ff82b84bc718f8af157c9f95757a6c3b40" - integrity sha512-87It8sN0ineoC3nBW0SbQuTFXM6bUqM62uJGY4BtTf0yzPl8/3+bHMWkgIe0Z6m8e+gJgjWxefGRVfpE3VcdEg== +react-beautiful-dnd@^13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.0.tgz#ec97c81093593526454b0de69852ae433783844d" + integrity sha512-aGvblPZTJowOWUNiwd6tNfEpgkX5OxmpqxHKNW/4VmvZTNTbeiq7bA3bn5T+QSF2uibXB0D1DmJsb1aC/+3cUA== dependencies: - "@babel/runtime" "^7.8.4" + "@babel/runtime" "^7.9.2" css-box-model "^1.2.0" memoize-one "^5.1.1" raf-schd "^4.0.2" - react-redux "^7.1.1" + react-redux "^7.2.0" redux "^4.0.4" use-memo-one "^1.1.1" -react-clientside-effect@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.2.tgz#6212fb0e07b204e714581dd51992603d1accc837" - integrity sha512-nRmoyxeok5PBO6ytPvSjKp9xwXg9xagoTK1mMjwnQxqM9Hd7MNPl+LS1bOSOe+CV2+4fnEquc7H/S8QD3q697A== +react-clientside-effect@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.5.tgz#e2c4dc3c9ee109f642fac4f5b6e9bf5bcd2219a3" + integrity sha512-2bL8qFW1TGBHozGGbVeyvnggRpMjibeZM2536AKNENLECutp2yfs44IL8Hmpn8qjFQ2K7A9PnYf3vc7aQq/cPA== dependencies: - "@babel/runtime" "^7.0.0" + "@babel/runtime" "^7.12.13" react-color@^2.13.8: version "2.17.0" @@ -24375,14 +24398,14 @@ react-draggable@^4.0.3, react-draggable@^4.4.3: clsx "^1.1.1" prop-types "^15.6.0" -react-dropzone@^11.2.0: - version "11.2.0" - resolved "https://registry.yarnpkg.com/react-dropzone/-/react-dropzone-11.2.0.tgz#4e54fa3479e6b6bb93f67914e4a27f1260807fdb" - integrity sha512-S/qaXQHCCg7MVlcrhqd05MLC6DupITLUB0CFn3iCLs6OTjzxdGDF1WTktTe5Jyq8jZdxYfMHNUZOHL0mg+K0Dw== +react-dropzone@^11.5.3: + version "11.7.1" + resolved "https://registry.yarnpkg.com/react-dropzone/-/react-dropzone-11.7.1.tgz#3851bb75b26af0bf1b17ce1449fd980e643b9356" + integrity sha512-zxCMwhfPy1olUEbw3FLNPLhAm/HnaYH5aELIEglRbqabizKAdHs0h+WuyOpmA+v1JXn0++fpQDdNfUagWt5hJQ== dependencies: - attr-accept "^2.0.0" - file-selector "^0.1.12" - prop-types "^15.7.2" + attr-accept "^2.2.2" + file-selector "^0.4.0" + prop-types "^15.8.1" react-dropzone@^4.2.9: version "4.3.0" @@ -24423,29 +24446,30 @@ react-fast-compare@^3.0.1, react-fast-compare@^3.2.0: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== -react-focus-lock@^2.3.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.4.1.tgz#e842cc93da736b5c5d331799012544295cbcee4f" - integrity sha512-c5ZP56KSpj9EAxzScTqQO7bQQNPltf/W1ZEBDqNDOV1XOIwvAyHX0O7db9ekiAtxyKgnqZjQlLppVg94fUeL9w== +react-focus-lock@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.6.0.tgz#97345c7abe439bf2974410b45529c2e208b1a633" + integrity sha512-2yB5KWyaefbvFDgqvsg/KpIjbqVlhIY2c/dyDcokDLhB3Ib7I4bjsrta5OkI5euUoIu5xBTyBwIQZPykUJAr1g== dependencies: "@babel/runtime" "^7.0.0" - focus-lock "^0.7.0" + focus-lock "^0.9.2" prop-types "^15.6.2" - react-clientside-effect "^1.2.2" - use-callback-ref "^1.2.1" - use-sidecar "^1.0.1" + react-clientside-effect "^1.2.5" + use-callback-ref "^1.2.5" + use-sidecar "^1.0.5" -react-focus-on@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/react-focus-on/-/react-focus-on-3.5.0.tgz#3cdebbefee26a083976e1700ba75f7377040f7f1" - integrity sha512-RqGAHOxhRAaMSVHIN5IpY7YL6AJkD/DMa/+iPDV7aB6XWRQfg3v2q35egIZgMWP2xhXaRVai3B80dpVWyj4Rcw== +react-focus-on@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/react-focus-on/-/react-focus-on-3.5.4.tgz#be45a9d0495f3bb6f5249704c85362df94980ecf" + integrity sha512-HnU0YGKhNSUsC4k6K8L+2wk8mC/qdg+CsS7A1bWLMgK7UuBphdECs2esnS6cLmBoVNjsFnCm/vMypeezKOdK3A== dependencies: - aria-hidden "^1.1.1" - react-focus-lock "^2.3.1" - react-remove-scroll "^2.4.0" - react-style-singleton "^2.1.0" - use-callback-ref "^1.2.3" - use-sidecar "^1.0.1" + aria-hidden "^1.1.3" + react-focus-lock "^2.6.0" + react-remove-scroll "^2.4.1" + react-style-singleton "^2.1.1" + tslib "^2.3.1" + use-callback-ref "^1.2.5" + use-sidecar "^1.0.5" react-grid-layout@^0.16.2: version "0.16.6" @@ -24469,7 +24493,7 @@ react-helmet-async@^1.0.7: react-fast-compare "^3.2.0" shallowequal "^1.1.0" -react-input-autosize@^2.2.1, react-input-autosize@^2.2.2: +react-input-autosize@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2" integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== @@ -24503,7 +24527,7 @@ react-intl@^2.8.0: intl-relativeformat "^2.1.0" invariant "^2.1.1" -react-is@17.0.2: +react-is@17.0.2, react-is@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== @@ -24518,11 +24542,6 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== -react-is@~16.3.0: - version "16.3.2" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.2.tgz#f4d3d0e2f5fbb6ac46450641eb2e25bf05d36b22" - integrity sha512-ybEM7YOr4yBgFd6w8dJqwxegqZGJNBZl6U27HnGKuTZmDvVrD5quWOK/wAnMywiZzW+Qsk+l4X2c70+thp/A8Q== - react-lib-adler32@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/react-lib-adler32/-/react-lib-adler32-1.0.3.tgz#63df1aed274eabcc1c5067077ea281ec30888ba7" @@ -24619,7 +24638,7 @@ react-query@^3.34.0: broadcast-channel "^3.4.1" match-sorter "^6.0.2" -react-redux@^7.1.0, react-redux@^7.1.1, react-redux@^7.2.0: +react-redux@^7.1.0, react-redux@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.0.tgz#f970f62192b3981642fec46fd0db18a074fe879d" integrity sha512-EvCAZYGfOLqwV7gh849xy9/pt55rJXPwmYvI4lilPM5rUT/1NxuuN59ipdBksRVSvz0KInbPnp4IfoXJXCqiDA== @@ -24643,10 +24662,10 @@ react-remove-scroll-bar@^2.1.0: react-style-singleton "^2.1.0" tslib "^1.0.0" -react-remove-scroll@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.4.0.tgz#190c16eb508c5927595935499e8f5dd9ab0e75cf" - integrity sha512-BZIO3GaEs0Or1OhA5C//n1ibUP1HdjJmqUVUsOCMxwoIpaCocbB9TFKwHOkBa/nyYy3slirqXeiPYGwdSDiseA== +react-remove-scroll@^2.4.1: + version "2.4.3" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.4.3.tgz#83d19b02503b04bd8141ed6e0b9e6691a2e935a6" + integrity sha512-lGWYXfV6jykJwbFpsuPdexKKzp96f3RbvGapDSIdcyGvHb7/eqyn46C7/6h+rUzYar1j5mdU+XECITHXCKBk9Q== dependencies: react-remove-scroll-bar "^2.1.0" react-style-singleton "^2.1.0" @@ -24794,6 +24813,15 @@ react-style-singleton@^2.1.0: invariant "^2.2.4" tslib "^1.0.0" +react-style-singleton@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.1.1.tgz#ce7f90b67618be2b6b94902a30aaea152ce52e66" + integrity sha512-jNRp07Jza6CBqdRKNgGhT3u9umWvils1xsuMOjZlghBDH2MU0PL2WZor4PGYjXpnRCa9DQSlHMs/xnABWOwYbA== + dependencies: + get-nonce "^1.0.0" + invariant "^2.2.4" + tslib "^1.0.0" + react-syntax-highlighter@^13.5.3, react-syntax-highlighter@^15.3.1: version "15.3.1" resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-15.3.1.tgz#ba16ae8705f191956b73d0e11ae938fd255f2579" @@ -24876,10 +24904,10 @@ react-use@^15.3.8: ts-easing "^0.2.0" tslib "^2.0.0" -react-virtualized-auto-sizer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.2.tgz#a61dd4f756458bbf63bd895a92379f9b70f803bd" - integrity sha512-MYXhTY1BZpdJFjUovvYHVBmkq79szK/k7V3MO+36gJkWGkrXKtyr4vCPtpphaTLRAdDNoYEYFZWE8LjN+PIHNg== +react-virtualized-auto-sizer@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.6.tgz#66c5b1c9278064c5ef1699ed40a29c11518f97ca" + integrity sha512-7tQ0BmZqfVF6YYEWcIGuoR3OdYe8I/ZFbNclFlGOC3pMqunkYF/oL30NCjSGl9sMEb17AnzixDz98Kqc3N76HQ== react-virtualized@^9.21.2: version "9.21.2" @@ -24922,10 +24950,10 @@ react-visibility-sensor@^5.1.1: dependencies: prop-types "^15.7.2" -react-window@^1.8.5: - version "1.8.5" - resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.5.tgz#a56b39307e79979721021f5d06a67742ecca52d1" - integrity sha512-HeTwlNa37AFa8MDZFZOKcNEkuF2YflA0hpGPiTT9vR7OawEt+GZbfM6wqkBahD3D3pUjIabQYzsnY/BSJbgq6Q== +react-window@^1.8.6: + version "1.8.6" + resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.6.tgz#d011950ac643a994118632665aad0c6382e2a112" + integrity sha512-8VwEEYyjz6DCnGBsd+MgkD0KJ2/OXFULyDtorIiTz+QzwoP94tBoA7CnbtyXMm+cCeAUER5KJcPtWl9cpKbOBg== dependencies: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6" @@ -28784,7 +28812,7 @@ tsd@^0.13.1: read-pkg-up "^7.0.0" update-notifier "^4.1.0" -tslib@2.3.1, tslib@^2.3.0, tslib@~2.3.1: +tslib@2.3.1, tslib@^2.0.3, tslib@^2.3.0, tslib@^2.3.1, tslib@~2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== @@ -29543,11 +29571,16 @@ url@^0.11.0, url@~0.11.0: punycode "1.3.2" querystring "0.2.0" -use-callback-ref@^1.2.1, use-callback-ref@^1.2.3: +use-callback-ref@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.4.tgz#d86d1577bfd0b955b6e04aaf5971025f406bea3c" integrity sha512-rXpsyvOnqdScyied4Uglsp14qzag1JIemLeTWGKbwpotWht57hbP78aNT+Q4wdFKQfQibbUX4fb6Qb4y11aVOQ== +use-callback-ref@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.5.tgz#6115ed242cfbaed5915499c0a9842ca2912f38a5" + integrity sha512-gN3vgMISAgacF7sqsLPByqoePooY3n2emTH59Ur5d/M8eg4WTWu1xp8i8DHjohftIyEx0S08RiYxbffr4j8Peg== + use-composed-ref@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.0.0.tgz#bb13e8f4a0b873632cde4940abeb88b92d03023a" @@ -29587,6 +29620,14 @@ use-sidecar@^1.0.1: detect-node "^2.0.4" tslib "^1.9.3" +use-sidecar@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.0.5.tgz#ffff2a17c1df42e348624b699ba6e5c220527f2b" + integrity sha512-k9jnrjYNwN6xYLj1iaGhonDghfvmeTmYjAiGvOr7clwKfPjMXJf4/HOr7oT5tJwYafgp2tG2l3eZEOfoELiMcA== + dependencies: + detect-node-es "^1.1.0" + tslib "^1.9.3" + use@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" From 705bed67befef0990907993fafdcd0f45c5f6077 Mon Sep 17 00:00:00 2001 From: Bree Hall Date: Tue, 8 Feb 2022 16:44:58 -0500 Subject: [PATCH 02/23] Update i18n mappings with required changes --- src/core/public/i18n/i18n_eui_mapping.tsx | 34 +++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/core/public/i18n/i18n_eui_mapping.tsx b/src/core/public/i18n/i18n_eui_mapping.tsx index 4603a2074c4d9f..296bcae21ee546 100644 --- a/src/core/public/i18n/i18n_eui_mapping.tsx +++ b/src/core/public/i18n/i18n_eui_mapping.tsx @@ -954,13 +954,37 @@ export const getEuiContextMapping = (): EuiTokensObject => { values={{ searchValue }} /> ), + 'euiSelectable.screenReaderInstructions': i18n.translate( + 'core.euiSelectable.screenReaderInstructions', + { + defaultMessage: + 'Use up and down arrows to move focus over options. Enter to select. Escape to collapse options.', + } + ), + 'euiSelectable.searchResults': ({ resultsLength }: EuiValues) => + i18n.translate('core.euiSelectable.searchResults', { + defaultMessage: '{resultsLength, plural, one {# result} other {# results}}', + values: { resultsLength }, + }), 'euiSelectable.placeholderName': i18n.translate('core.euiSelectable.placeholderName', { defaultMessage: 'Filter options', }), + 'euiSelectableListItem.checkedOption': i18n.translate( + 'core.euiSelectableListItem.checkedOption', + { + defaultMessage: 'Checked option.', + } + ), + 'euiSelectableListItem.checkedOptionInstructions': i18n.translate( + 'core.euiSelectableListItem.checkedOptionInstructions', + { + defaultMessage: 'To uncheck this option, press enter.', + } + ), 'euiSelectableListItem.includedOption': i18n.translate( 'core.euiSelectableListItem.includedOption', { - defaultMessage: 'Included option.', + defaultMessage: 'Selected option.', } ), 'euiSelectableListItem.includedOptionInstructions': i18n.translate( @@ -978,7 +1002,13 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiSelectableListItem.excludedOptionInstructions': i18n.translate( 'core.euiSelectableListItem.excludedOptionInstructions', { - defaultMessage: 'To deselect this option, press enter.', + defaultMessage: 'To uncheck this option, press enter.', + } + ), + 'euiSelectableListItem.unckeckedOptionInstructions': i18n.translate( + 'core.euiSelectableListItem.unckeckedOptionInstructions', + { + defaultMessage: 'To select this option, press enter.', } ), 'euiSelectableTemplateSitewide.loadingResults': i18n.translate( From 87e64a7c981b09869cf50b17c2e6e2c3398280a3 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 9 Feb 2022 09:58:07 -0800 Subject: [PATCH 03/23] Fix all data grid types/tests missing the new `colIndex` prop passed by renderCellValue and cellActions --- .../discover_grid_cell_actions.test.tsx | 6 ++++-- .../discover_grid_document_selection.test.tsx | 4 ++++ .../discover_grid_expand_button.test.tsx | 3 +++ .../discover_grid/get_render_cell_value.test.tsx | 16 ++++++++++++++++ .../components/cell_value.test.tsx | 3 +++ .../render_cell_value/render_cell_value.test.tsx | 1 + .../render_cell_value.test.tsx | 1 + .../render_cell_value.test.tsx | 1 + .../render_cell_value.test.tsx | 1 + .../render_cell_value.tsx | 2 ++ .../default_cell_renderer.test.tsx | 7 +++++++ .../public/components/t_grid/body/index.tsx | 2 ++ 12 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.test.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.test.tsx index 651004638a85eb..80fc27b50b40a1 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.test.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.test.tsx @@ -40,7 +40,8 @@ describe('Discover cell actions ', function () { // eslint-disable-next-line @typescript-eslint/no-explicit-any Component={(props: any) => } rowIndex={1} - columnId={'extension'} + colIndex={1} + columnId="extension" isExpanded={false} closePopover={jest.fn()} /> @@ -68,7 +69,8 @@ describe('Discover cell actions ', function () { // eslint-disable-next-line @typescript-eslint/no-explicit-any Component={(props: any) => } rowIndex={1} - columnId={'extension'} + colIndex={1} + columnId="extension" isExpanded={false} closePopover={jest.fn()} /> diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.test.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.test.tsx index 2afee7a6a48a32..d416372ac183fd 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.test.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.test.tsx @@ -57,6 +57,7 @@ describe('document selection', () => { { { { { > {}} isExpandable={false} @@ -76,6 +77,7 @@ describe('datatable cell renderer', () => { > {}} isExpandable={false} @@ -154,6 +156,7 @@ describe('datatable cell renderer', () => { > { isExpanded: false, linkValues, rowIndex, + colIndex: 0, setCellProps: jest.fn(), timelineId, }; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx index f9dfc0625ac17d..2070a620183d65 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx @@ -46,6 +46,7 @@ describe('RenderCellValue', () => { isExpanded: false, linkValues, rowIndex, + colIndex: 0, setCellProps: jest.fn(), timelineId, }; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx index 6087553522eb88..f2e4ea342d0e5b 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx @@ -46,6 +46,7 @@ describe('RenderCellValue', () => { isExpanded: false, linkValues, rowIndex, + colIndex: 0, setCellProps: jest.fn(), timelineId, }; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx index d5f7ed0ee2e1e6..4454653f6bc5ce 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx @@ -32,6 +32,7 @@ export const RenderCellValue: React.FC< isExpanded, linkValues, rowIndex, + colIndex, rowRenderers, setCellProps, timelineId, @@ -51,6 +52,7 @@ export const RenderCellValue: React.FC< isExpanded={isExpanded} linkValues={linkValues} rowIndex={rowIndex} + colIndex={colIndex} rowRenderers={rowRenderers} setCellProps={setCellProps} timelineId={timelineId} diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx index 30b4582096322f..9e74fa84a5adcf 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx @@ -34,6 +34,7 @@ describe('DefaultCellRenderer', () => { const isExpanded = true; const linkValues = ['foo', 'bar', '@baz']; const rowIndex = 3; + const colIndex = 0; const setCellProps = jest.fn(); const timelineId = 'test'; const ecsData = {} as Ecs; @@ -66,6 +67,7 @@ describe('DefaultCellRenderer', () => { isExpanded={isExpanded} linkValues={linkValues} rowIndex={rowIndex} + colIndex={colIndex} setCellProps={setCellProps} timelineId={timelineId} /> @@ -100,6 +102,7 @@ describe('DefaultCellRenderer', () => { isExpanded={isExpanded} linkValues={linkValues} rowIndex={rowIndex} + colIndex={colIndex} setCellProps={setCellProps} timelineId={timelineId} truncate={truncate} @@ -148,6 +151,7 @@ describe('DefaultCellRenderer', () => { isExpanded={isExpanded} linkValues={linkValues} rowIndex={rowIndex} + colIndex={colIndex} setCellProps={setCellProps} timelineId={timelineId} /> @@ -196,6 +200,7 @@ describe('host link rendering', () => { isTimeline={isTimeline} linkValues={[]} rowIndex={3} + colIndex={0} setCellProps={jest.fn()} timelineId={'timeline-1-query'} /> @@ -229,6 +234,7 @@ describe('host link rendering', () => { isTimeline={isTimeline} linkValues={[]} rowIndex={3} + colIndex={0} setCellProps={jest.fn()} timelineId={'timeline-1-query'} /> @@ -263,6 +269,7 @@ describe('host link rendering', () => { isTimeline={isTimeline} linkValues={[]} rowIndex={3} + colIndex={0} setCellProps={jest.fn()} timelineId={'timeline-1-query'} /> diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx index d2c8f22b1d3ac8..5b060b96d252f1 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx @@ -729,6 +729,7 @@ export const BodyComponent = React.memo( const Cell: React.FC = ({ columnId, rowIndex, + colIndex, setCellProps, isDetails, }): React.ReactElement | null => { @@ -767,6 +768,7 @@ export const BodyComponent = React.memo( isExpanded: false, linkValues: getOr([], header.linkField ?? '', ecs), rowIndex, + colIndex, rowRenderers, setCellProps, timelineId: id, From c45937fba7417e5c8b8dee0c116c5adcccf5ab30 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 9 Feb 2022 09:59:01 -0800 Subject: [PATCH 04/23] Fix cellActions closePopover type to indicate conditionality (only passed when popover is open) --- .../vis_types/table/public/components/table_vis_columns.tsx | 4 ++-- .../public/datatable_visualization/components/columns.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/vis_types/table/public/components/table_vis_columns.tsx b/src/plugins/vis_types/table/public/components/table_vis_columns.tsx index 23918e7df3f8e0..2abeae31fbea9b 100644 --- a/src/plugins/vis_types/table/public/components/table_vis_columns.tsx +++ b/src/plugins/vis_types/table/public/components/table_vis_columns.tsx @@ -83,7 +83,7 @@ export const createGridColumns = ( data-test-subj="tbvChartCell__filterForCellValue" onClick={() => { onFilterClick({ row: rowIndex, column: colIndex, value: rowValue }, false); - closePopover(); + closePopover?.(); }} iconType="plusInCircle" > @@ -119,7 +119,7 @@ export const createGridColumns = ( aria-label={filterOutAriaLabel} onClick={() => { onFilterClick({ row: rowIndex, column: colIndex, value: rowValue }, true); - closePopover(); + closePopover?.(); }} iconType="minusInCircle" > diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/columns.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/columns.tsx index 67d95f04869f87..7d05e820598510 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/columns.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/columns.tsx @@ -99,7 +99,7 @@ export const createGridColumns = ( data-test-subj="lensDatatableFilterFor" onClick={() => { handleFilterClick(field, rowValue, colIndex, rowIndex); - closePopover(); + closePopover?.(); }} iconType="plusInCircle" > @@ -137,7 +137,7 @@ export const createGridColumns = ( aria-label={filterOutAriaLabel} onClick={() => { handleFilterClick(field, rowValue, colIndex, rowIndex, true); - closePopover(); + closePopover?.(); }} iconType="minusInCircle" > From 0fc44c97f58112e4b9a3845b5faa08d2b783cfeb Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 9 Feb 2022 10:26:54 -0800 Subject: [PATCH 05/23] Fix more datagrid colIndex errors - pass more missing `colIndex`s - pass RowAction colIndex, because it's inheriting types from EUI - omit colIndex from the leading controls column renderer, because it doesn't need them --- .../examples/observablity_alerts/render_cell_value.tsx | 2 ++ .../examples/security_solution_rac/render_cell_value.tsx | 2 ++ .../plugins/timelines/public/components/t_grid/body/index.tsx | 2 ++ .../public/components/t_grid/event_rendered_view/index.tsx | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx index 443aeef5f4f81a..39ca4c207b230b 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx @@ -39,6 +39,7 @@ export const RenderCellValue: React.FC< isExpanded, linkValues, rowIndex, + colIndex, setCellProps, timelineId, }) => { @@ -81,6 +82,7 @@ export const RenderCellValue: React.FC< isExpanded={isExpanded} linkValues={linkValues} rowIndex={rowIndex} + colIndex={colIndex} setCellProps={setCellProps} timelineId={timelineId} /> diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx index 3ee8b2fbee54df..7e8cd20724c0e9 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx @@ -36,6 +36,7 @@ export const RenderCellValue: React.FC< isExpanded, linkValues, rowIndex, + colIndex, setCellProps, timelineId, }) => { @@ -75,6 +76,7 @@ export const RenderCellValue: React.FC< isExpanded={isExpanded} linkValues={linkValues} rowIndex={rowIndex} + colIndex={colIndex} setCellProps={setCellProps} timelineId={timelineId} /> diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx index 5b060b96d252f1..2ae0146f80f7e5 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx @@ -229,6 +229,7 @@ const transformControlColumns = ({ isExpandable, isExpanded, rowIndex, + colIndex, setCellProps, }: EuiDataGridCellValueElementProps) => { const pageRowIndex = getPageRowIndex(rowIndex, pageSize); @@ -269,6 +270,7 @@ const transformControlColumns = ({ onRowSelected={onRowSelected} onRuleChange={onRuleChange} rowIndex={rowIndex} + colIndex={colIndex} pageRowIndex={pageRowIndex} selectedEventIds={selectedEventIds} setCellProps={setCellProps} diff --git a/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx index 178edc17c7c0ab..5bef7b368d9487 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx @@ -127,7 +127,7 @@ const EventRenderedViewComponent = ({ {leadingControlColumns.length > 0 ? leadingControlColumns.map((action) => { const getActions = action.rowCellRender as ( - props: EuiDataGridCellValueElementProps + props: Omit ) => React.ReactNode; return getActions({ columnId: 'actions', From 455cc18ba5525b82cc9ba7b9af881677ec963302 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 9 Feb 2022 10:35:46 -0800 Subject: [PATCH 06/23] Improve StatefulCell typing - pass colIndex (which fixes EUI type match issue) - DRY out ariaColIndex logic - rename ariaRowindex passed to StatefulCell to rowIndex --- .../body/data_driven_columns/index.tsx | 8 ++++--- .../stateful_cell.test.tsx | 21 ++++++++++++------- .../data_driven_columns/stateful_cell.tsx | 9 +++++--- .../t_grid/body/data_driven_columns/index.tsx | 8 ++++--- .../stateful_cell.test.tsx | 21 ++++++++++++------- .../data_driven_columns/stateful_cell.tsx | 9 +++++--- 6 files changed, 50 insertions(+), 26 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx index a2638c7b8eb0b5..d9879cc2e12af0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx @@ -240,9 +240,10 @@ const TgridTdCell = ({ tabType, timelineId, }: CellProps) => { + const ariaColIndex = index + ARIA_COLUMN_INDEX_OFFSET; return ( <> -

{i18n.YOU_ARE_IN_A_TABLE_CELL({ row: ariaRowindex, column: index + 2 })}

+

{i18n.YOU_ARE_IN_A_TABLE_CELL({ row: ariaRowindex, column: ariaColIndex })}

= ({ columnId, data, setC }; describe('StatefulCell', () => { - const ariaRowindex = 123; + const rowIndex = 123; + const colIndex = 0; const eventId = '_id-123'; const linkValues = ['foo', 'bar', '@baz']; const tabType = TimelineTabs.query; @@ -69,7 +70,8 @@ describe('StatefulCell', () => { mount( { isExpanded: false, isDetails: false, linkValues, - rowIndex: ariaRowindex - 1, + rowIndex, + colIndex, timelineId: `${timelineId}-${tabType}`, }) ); @@ -101,7 +104,8 @@ describe('StatefulCell', () => { mount( { isExpanded: false, isDetails: false, linkValues, - rowIndex: ariaRowindex - 1, + rowIndex, + colIndex, timelineId, }) ); @@ -132,7 +137,8 @@ describe('StatefulCell', () => { const wrapper = mount( { test("it renders a div with the styles set by `renderCellValue`'s `setCellProps` argument", () => { const wrapper = mount( { + const ariaColIndex = index + ARIA_COLUMN_INDEX_OFFSET; return ( <> -

{i18n.YOU_ARE_IN_A_TABLE_CELL({ row: ariaRowindex, column: index + 2 })}

+

{i18n.YOU_ARE_IN_A_TABLE_CELL({ row: ariaRowindex, column: ariaColIndex })}

= ({ columnId, data, setC }; describe('StatefulCell', () => { - const ariaRowindex = 123; + const rowIndex = 123; + const colIndex = 0; const eventId = '_id-123'; const linkValues = ['foo', 'bar', '@baz']; const tabType = TimelineTabs.query; @@ -77,7 +78,8 @@ describe('StatefulCell', () => { mount( { isExpanded: false, isDetails: false, linkValues, - rowIndex: ariaRowindex - 1, + rowIndex, + colIndex, timelineId: `${timelineId}-${tabType}`, }) ); @@ -109,7 +112,8 @@ describe('StatefulCell', () => { mount( { isExpanded: false, isDetails: false, linkValues, - rowIndex: ariaRowindex - 1, + rowIndex, + colIndex, timelineId, }) ); @@ -140,7 +145,8 @@ describe('StatefulCell', () => { const wrapper = mount( { test("it renders a div with the styles set by `renderCellValue`'s `setCellProps` argument", () => { const wrapper = mount( Date: Wed, 9 Feb 2022 14:55:08 -0500 Subject: [PATCH 07/23] Updated i18n_eui_mapping tests to add euiSelectable.searchResults to the tokensToSkip array --- src/core/public/i18n/i18n_eui_mapping.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/public/i18n/i18n_eui_mapping.test.ts b/src/core/public/i18n/i18n_eui_mapping.test.ts index d8d48a8e5f1d5a..2b29fa4d0d66c9 100644 --- a/src/core/public/i18n/i18n_eui_mapping.test.ts +++ b/src/core/public/i18n/i18n_eui_mapping.test.ts @@ -76,7 +76,7 @@ describe('@elastic/eui i18n tokens', () => { test('defaultMessage is in sync with defString', () => { // Certain complex tokens (e.g. ones that have a function as a defaultMessage) // need custom i18n handling, and can't be checked for basic defString equality - const tokensToSkip = ['euiColumnSorting.buttonActive']; + const tokensToSkip = ['euiColumnSorting.buttonActive', 'euiSelectable.searchResults']; if (tokensToSkip.includes(token)) return; // Clean up typical errors from the `@elastic/eui` extraction token tool From 08cea5e166e3224c312fd48f71d75e74b8dc115e Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 9 Feb 2022 12:27:47 -0800 Subject: [PATCH 08/23] Fix failing ML datagrid FTR test - `visibleRowIndex` is not a prop passed back by `popoverContents` (see `EuiDataGridCellValueElementProps`), but `rowIndex` is --- .../ml/public/application/components/data_grid/data_grid.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx index a77f43e68daef7..7610773fa9582c 100644 --- a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx +++ b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx @@ -17,6 +17,7 @@ import { EuiCodeBlock, EuiCopy, EuiDataGrid, + EuiDataGridPopoverContentProps, EuiFlexGroup, EuiFlexItem, EuiMutationObserver, @@ -119,8 +120,8 @@ export const DataGrid: FC = memo( analysisType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION || analysisType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION ? { - featureImportance: ({ children }: { cellContentsElement: any; children: any }) => { - const rowIndex = children?.props?.visibleRowIndex; + featureImportance: ({ children }: EuiDataGridPopoverContentProps) => { + const rowIndex = children?.props?.rowIndex; const row = data[rowIndex]; if (!row) return
; // if resultsField for some reason is not available then use ml From 4f9ecf6ee4e6a846099eb5f085ee7df1672efba7 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 9 Feb 2022 13:34:53 -0800 Subject: [PATCH 09/23] Revert attempted ML type change - in actuality this is an EUI typing issue, children is a ReactElement, not a ReactNode. However we'll shortly be deprecationg popoverContents, so this isn't worth fixing right now --- .../ml/public/application/components/data_grid/data_grid.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx index 7610773fa9582c..d78c03c98fb1b9 100644 --- a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx +++ b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx @@ -17,7 +17,6 @@ import { EuiCodeBlock, EuiCopy, EuiDataGrid, - EuiDataGridPopoverContentProps, EuiFlexGroup, EuiFlexItem, EuiMutationObserver, @@ -120,7 +119,7 @@ export const DataGrid: FC = memo( analysisType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION || analysisType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION ? { - featureImportance: ({ children }: EuiDataGridPopoverContentProps) => { + featureImportance: ({ children }: { children: any }) => { const rowIndex = children?.props?.rowIndex; const row = data[rowIndex]; if (!row) return
; From 62debfcf6aa1996e84cf4161c4b4ed30be6c1aa9 Mon Sep 17 00:00:00 2001 From: Bree Hall Date: Thu, 10 Feb 2022 10:10:55 -0500 Subject: [PATCH 10/23] Update test files to include up to date snapshots of code samples --- .../__snapshots__/i18n_service.test.tsx.snap | 9 ++++-- .../url/__snapshots__/url.test.tsx.snap | 5 ++++ .../__snapshots__/cron_editor.test.tsx.snap | 30 +++++++++++++++++++ .../extended_template.stories.storyshot | 2 ++ .../custom_element_modal.stories.storyshot | 12 ++++++++ .../workpad_table.stories.storyshot | 2 +- .../__snapshots__/edit_var.stories.storyshot | 12 ++++++++ .../extended_template.stories.storyshot | 21 +++++++++++++ .../extended_template.stories.storyshot | 4 +++ .../__snapshots__/settings.test.tsx.snap | 1 + .../autoplay_settings.stories.storyshot | 3 ++ .../__snapshots__/index.test.tsx.snap | 8 ++--- 12 files changed, 102 insertions(+), 7 deletions(-) diff --git a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap index d4a3bd3a7ea742..a6ec20940e1597 100644 --- a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap +++ b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap @@ -206,10 +206,15 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiSelectable.noAvailableOptions": "No options available", "euiSelectable.noMatchingOptions": [Function], "euiSelectable.placeholderName": "Filter options", + "euiSelectable.screenReaderInstructions": "Use up and down arrows to move focus over options. Enter to select. Escape to collapse options.", + "euiSelectable.searchResults": [Function], + "euiSelectableListItem.checkedOption": "Checked option.", + "euiSelectableListItem.checkedOptionInstructions": "To uncheck this option, press enter.", "euiSelectableListItem.excludedOption": "Excluded option.", - "euiSelectableListItem.excludedOptionInstructions": "To deselect this option, press enter.", - "euiSelectableListItem.includedOption": "Included option.", + "euiSelectableListItem.excludedOptionInstructions": "To uncheck this option, press enter.", + "euiSelectableListItem.includedOption": "Selected option.", "euiSelectableListItem.includedOptionInstructions": "To exclude this option, press enter.", + "euiSelectableListItem.unckeckedOptionInstructions": "To select this option, press enter.", "euiSelectableTemplateSitewide.loadingResults": "Loading results", "euiSelectableTemplateSitewide.noResults": "No results available", "euiSelectableTemplateSitewide.onFocusBadgeGoTo": "Go to", diff --git a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap index f2f3666d4528df..aa8eefe523b822 100644 --- a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap +++ b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap @@ -12,6 +12,7 @@ exports[`UrlFormatEditor should render normally 1`] = `