From 8b3d7ede3050323cf126c627dc1f52fd7cb44075 Mon Sep 17 00:00:00 2001 From: Paul Engel Date: Wed, 6 Mar 2024 17:04:03 +0100 Subject: [PATCH 1/3] chore: exclude VABI zone from production release workflow --- .github/workflows/publish_production.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish_production.yml b/.github/workflows/publish_production.yml index cc75e743d..5cb25f2e6 100644 --- a/.github/workflows/publish_production.yml +++ b/.github/workflows/publish_production.yml @@ -68,11 +68,6 @@ jobs: AZURE_BLOB_ACCOUNT: ${{ secrets.AZURE_BLOB_ACCOUNT_US2 }} AZURE_BLOB_ACCOUNT_KEY: ${{ secrets.AZURE_BLOB_ACCOUNT_KEY_US2 }} run: yarn upload - - name: upload vabi - env: - AZURE_BLOB_ACCOUNT: ${{ secrets.AZURE_BLOB_ACCOUNT_VABI }} - AZURE_BLOB_ACCOUNT_KEY: ${{ secrets.AZURE_BLOB_ACCOUNT_KEY_VABI }} - run: yarn upload - name: upload vvv env: AZURE_BLOB_ACCOUNT: ${{ secrets.AZURE_BLOB_ACCOUNT_VVV }} From 365831587307934ebeef96e0ff19e53f56e1c23b Mon Sep 17 00:00:00 2001 From: Joris Pannekeet Date: Thu, 7 Mar 2024 15:56:13 +0100 Subject: [PATCH 2/3] feat: added pagevariable belongsto support for radio, select and autocomplete components --- src/components/autocompleteInput.js | 4 ++++ src/components/radioinput.js | 10 ++++++++++ src/components/selectInput.js | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/src/components/autocompleteInput.js b/src/components/autocompleteInput.js index 7ddd34f3d..86241822c 100644 --- a/src/components/autocompleteInput.js +++ b/src/components/autocompleteInput.js @@ -142,6 +142,10 @@ (hasDefaultLabelProperty && defaultLabelProperty) || idProperty; + useEffect(() => { + setValue(defaultValue.replace(/\n/g, '')); + }, [defaultValue]); + /* * This component only works with relational or list properties. * the value of a list property is the list item itself. diff --git a/src/components/radioinput.js b/src/components/radioinput.js index 9bd2bab7f..63b24c655 100644 --- a/src/components/radioinput.js +++ b/src/components/radioinput.js @@ -62,6 +62,9 @@ const isListProperty = kind === 'list' || kind === 'LIST'; const isObjectProperty = kind === 'object' || kind === 'OBJECT'; + const isPageVariableProperty = prefabValue.find( + (item) => item.type === 'PAGE_VARIABLE_MODEL_PROPERTY', + ); const isPropertyArray = Boolean( prefabValue.length && prefabValue.some((p) => p.type === 'PROPERTY'), @@ -76,7 +79,10 @@ resolvedCurrentValue = defaultValueText; } else if (isPropertyArray && !isObjectProperty) { resolvedCurrentValue = parseInt(defaultValueText, 10) || ''; + } else if (isPageVariableProperty) { + resolvedCurrentValue = getValue(defaultValueText); } else if (kind === undefined) { + console.log('d'); // if kind is undefined, it is non property based resolvedCurrentValue = ''; } else { @@ -84,6 +90,10 @@ } const [currentValue, setCurrentValue] = useState(resolvedCurrentValue); + useEffect(() => { + setCurrentValue(resolvedCurrentValue); + }, [defaultValueText]); + B.defineFunction('Clear', () => setCurrentValue('')); B.defineFunction('Enable', () => setIsDisabled(false)); B.defineFunction('Disable', () => setIsDisabled(true)); diff --git a/src/components/selectInput.js b/src/components/selectInput.js index 3202e39bb..eee16f701 100644 --- a/src/components/selectInput.js +++ b/src/components/selectInput.js @@ -63,6 +63,11 @@ : defaultValueText || placeholderLabelText; const [currentValue, setCurrentValue] = useState(resolvedCurrentValue); + + useEffect(() => { + setCurrentValue(resolvedCurrentValue); + }, [defaultValueText]); + B.defineFunction('Clear', () => setCurrentValue('')); B.defineFunction('Enable', () => setIsDisabled(false)); B.defineFunction('Disable', () => setIsDisabled(true)); From 91dd925faa0cd93a1c367f7a5491799739ce22c5 Mon Sep 17 00:00:00 2001 From: Joris Pannekeet Date: Thu, 7 Mar 2024 15:58:59 +0100 Subject: [PATCH 3/3] fix: remove console --- src/components/radioinput.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/radioinput.js b/src/components/radioinput.js index 63b24c655..2428ef14f 100644 --- a/src/components/radioinput.js +++ b/src/components/radioinput.js @@ -82,7 +82,6 @@ } else if (isPageVariableProperty) { resolvedCurrentValue = getValue(defaultValueText); } else if (kind === undefined) { - console.log('d'); // if kind is undefined, it is non property based resolvedCurrentValue = ''; } else {