diff --git a/ui/src/components/AdvancePropertise/index.tsx b/ui/src/components/AdvancePropertise/index.tsx index 04b77428..2988dbd4 100644 --- a/ui/src/components/AdvancePropertise/index.tsx +++ b/ui/src/components/AdvancePropertise/index.tsx @@ -666,6 +666,10 @@ const AdvancePropertise = (props: SchemaProps) => { props?.updateFieldSettings( props?.rowId, { + ...props?.value, + mandatory: toggleStates?.mandatory, + nonLocalizable: toggleStates?.nonLocalizable, + referenedItems: toggleStates?.referenedItems, validationRegex: toggleStates?.validationRegex ?? '', embedObjects: embedObject, embedObject: !shouldToggleOff diff --git a/ui/src/components/ContentMapper/index.scss b/ui/src/components/ContentMapper/index.scss index 0bd80e97..97feac81 100644 --- a/ui/src/components/ContentMapper/index.scss +++ b/ui/src/components/ContentMapper/index.scss @@ -59,7 +59,6 @@ overflow-x: hidden; } .ct-list { - border-right: 1px solid $color-brand-secondary-lightest; list-style-type: none; padding: 15px 0 15px 0; li { @@ -151,7 +150,7 @@ } .Table { border-left: 0 none; - min-height: 26.25rem; + min-height: 24.25rem; .Table__body__row { .Table-select-body { >.checkbox-wrapper { diff --git a/ui/src/components/ContentMapper/index.tsx b/ui/src/components/ContentMapper/index.tsx index 71dbd7b3..be54bb0b 100644 --- a/ui/src/components/ContentMapper/index.tsx +++ b/ui/src/components/ContentMapper/index.tsx @@ -1324,20 +1324,15 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref: options={option} menuPlacement="auto" isDisabled={ - data?.contentstackFieldType === 'group' || - (data?.contentstackFieldType === 'text') || - (data?.contentstackFieldType === 'url') || - data?.backupFieldType === 'reference' || - data?.contentstackFieldType === "global_field" || + !(data?.contentstackFieldType === 'single_line_text' || + data?.contentstackFieldType === 'multi_line_text' || data?.contentstackFieldType === 'html' || data?.contentstackFieldType === 'json') || data?.otherCmsType === undefined || - newMigrationData?.project_current_step > 4 || - data?.backupFieldType === 'extension' || - data?.backupFieldType === 'app' + newMigrationData?.project_current_step > 4 } /> {!( - data?.contentstackFieldType === 'Group' || + data?.contentstackFieldType === 'group' || data?.contentstackFieldType === 'text' || data?.contentstackFieldType === 'url' || data?.contentstackFieldType === 'global_field' || @@ -1792,14 +1787,10 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref: ? { label: Fields[data?.contentstackFieldType]?.label ?? 'No Option', value: Fields[data?.contentstackFieldType]?.label ?? 'No Option', - isDisabled: data?.contentstackFieldType === 'text' || - data?.contentstackFieldType === 'group' || - data?.contentstackFieldType === 'url' || - data?.backupFieldType === "reference" || - data?.contentstackFieldType === "global_field" || - data?.otherCmsType === undefined || - data?.backupFieldType === 'app' || - data?.backupFieldType === 'extension' + isDisabled: !(data?.contentstackFieldType === 'single_line_text' || + data?.contentstackFieldType === 'multi_line_text' || data?.contentstackFieldType === 'html' || data?.contentstackFieldType === 'json') || + data?.otherCmsType === undefined + } : { label: `${selectedOption} matches`, diff --git a/upload-api/src/routes/index.ts b/upload-api/src/routes/index.ts index 455c275a..fb3d8416 100644 --- a/upload-api/src/routes/index.ts +++ b/upload-api/src/routes/index.ts @@ -168,7 +168,21 @@ router.get('/validator', express.json(), fileOperationLimiter, async function (r res.status(data?.status || 200).json(data); if (data?.status === 200) { - const filePath = path.join(__dirname, '..', '..', 'extracted_files', name); + let filePath = path.join(__dirname, '..', '..', 'extracted_files', name); + + // Define excluded directories that should not be used in file paths + const EXCLUDED_DIRECTORIES = ['blob', 'installer', 'items', 'metadata', 'properties']; + + // Check if data.file is a valid, non-excluded directory + const isValidFile = data?.file && + typeof data?.file === 'string' && + data?.file?.trim() !== '' && + !EXCLUDED_DIRECTORIES.includes(data?.file?.toLowerCase()); + + if (isValidFile && data?.file) { + filePath = path.join(__dirname, '..', '..', 'extracted_files', name, data?.file); + } + createMapper(filePath, projectId, app_token, affix, config); } } catch (error) {