From 2f99dfbe88a2158f1469955f60fec9102d669596 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:47:47 +0000 Subject: [PATCH 01/40] Bump es5-ext from 0.10.62 to 0.10.64 Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.64. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.64) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index fcb9b0188..647480b32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7188,12 +7188,13 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" es5-ext@^0.10.12, es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.49, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== dependencies: es6-iterator "^2.0.3" es6-symbol "^3.1.3" + esniff "^2.0.1" next-tick "^1.1.0" es6-error@^4.0.1: @@ -7424,6 +7425,16 @@ esniff@^1.1.0: d "1" es5-ext "^0.10.12" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^9.4.0: version "9.4.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" From a9668d8ecb3d72794c25ea3ad7a57c0d18d6f9a8 Mon Sep 17 00:00:00 2001 From: Monish <139316519+m-o-n-i-s-h@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:30:21 +0530 Subject: [PATCH 02/40] Disable form button until all parameters in given --- src/extensions/forms/chart/NeoForm.tsx | 11 ++++++++++- src/utils/parameterUtils.ts | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/utils/parameterUtils.ts diff --git a/src/extensions/forms/chart/NeoForm.tsx b/src/extensions/forms/chart/NeoForm.tsx index 9ae9c9109..b1608c644 100644 --- a/src/extensions/forms/chart/NeoForm.tsx +++ b/src/extensions/forms/chart/NeoForm.tsx @@ -7,6 +7,7 @@ import { REPORT_LOADING_ICON } from '../../../report/Report'; import debounce from 'lodash/debounce'; import { RUN_QUERY_DELAY_MS } from '../../../config/ReportConfig'; import NeoParameterSelectionChart from '../../../chart/parameter/ParameterSelectionChart'; +import { checkParametersNameInGlobalParameter, extractAllParameterNames } from '../../../utils/parameterUtils'; enum FormStatus { DATA_ENTRY = 0, // The user is filling in the form. @@ -42,6 +43,14 @@ const NeoForm = (props: ChartProps) => { }); } + const isParametersDefined = (cypherQuery: string | undefined) => { + const parameterNames = extractAllParameterNames(cypherQuery); + if (props.parameters) { + return checkParametersNameInGlobalParameter(parameterNames, props.parameters); + } + return false; + }; + useEffect(() => { // If the parameters change after the form is completed, reset it, as there might be another submission. if (status == FormStatus.SUBMITTED) { @@ -77,7 +86,7 @@ const NeoForm = (props: ChartProps) => {