diff --git a/api/.DS_Store b/api/.DS_Store deleted file mode 100644 index 43f2c405..00000000 Binary files a/api/.DS_Store and /dev/null differ diff --git a/api/src/config/dev.config.ts b/api/src/config/dev.config.ts index cdd2363d..64c42480 100644 --- a/api/src/config/dev.config.ts +++ b/api/src/config/dev.config.ts @@ -3,12 +3,14 @@ export const devConfig = { NA: "https://stag-api.csnonprod.com/v3", EU: "https://stag-eu-api.csnonprod.com/v3", AZURE_NA: "https://stag-azure-na-api.csnonprod.com/v3", + GCP_NA: "https://stag-gcp-na-api.csnonprod.com/v3", }, CS_URL: { NA: "https://app.contentstack.com/#!", EU: "https://eu-app.contentstack.com/#!", AZURE_NA: "https://azure-na-app.contentstack.com/#!", AZURE_EU: "https://azure-eu-app.contentstack.com/#!", + GCP_NA: "https://gcp-na-app.contentstack.com/#!", }, LOG_FILE_PATH: process.platform === "win32" ? ".\\combine.log" : "./combine.log", // Replace with the actual path to your log file diff --git a/api/src/config/index.ts b/api/src/config/index.ts index 11f43c75..12b3e538 100644 --- a/api/src/config/index.ts +++ b/api/src/config/index.ts @@ -25,12 +25,14 @@ export type ConfigType = { EU: string; AZURE_NA: string; AZURE_EU?: string; + GCP_NA?: string; }; CS_URL: { NA: string; EU: string; AZURE_NA: string; AZURE_EU?: string; + GCP_NA?: string; }; }; diff --git a/api/src/config/prod.config.ts b/api/src/config/prod.config.ts index 7a49fdbd..a873b12a 100644 --- a/api/src/config/prod.config.ts +++ b/api/src/config/prod.config.ts @@ -4,12 +4,14 @@ export const prodConfig = { EU: "https://eu-api.contentstack.com/v3", AZURE_NA: "https://azure-na-api.contentstack.com/v3", AZURE_EU: "https://azure-eu-api.contentstack.com/v3", + GCP_NA: "https://gcp-na-api.contentstack.com/v3", }, CS_URL: { NA: "https://app.contentstack.com/#!", EU: "https://eu-app.contentstack.com/#!", AZURE_NA: "https://azure-na-app.contentstack.com/#!", AZURE_EU: "https://azure-eu-app.contentstack.com/#!", + GCP_NA: "https://gcp-na-app.contentstack.com/#!", }, LOG_FILE_PATH: process.platform === "win32" ? ".\\combine.log" : "./combine.log", // Replace with the actual path to your log file diff --git a/api/src/constants/index.ts b/api/src/constants/index.ts index 19e712e4..b99b19b9 100644 --- a/api/src/constants/index.ts +++ b/api/src/constants/index.ts @@ -1,4 +1,4 @@ -export const CS_REGIONS = ["NA", "EU", "AZURE_NA", "AZURE_EU"]; +export const CS_REGIONS = ["NA", "EU", "AZURE_NA", "AZURE_EU", "GCP_NA"]; export const MODULES = [ "Project", "Migration", diff --git a/api/src/validators/index.ts b/api/src/validators/index.ts index f0b862fb..c63f1a39 100644 --- a/api/src/validators/index.ts +++ b/api/src/validators/index.ts @@ -27,7 +27,7 @@ export default (route: string = "") => affix: affixValidator, affix_confirmation_validator: affixConfirmationValidator, fileformat_confirmation_validator: fileformatConfirmationValidator, - stack: stackValidator + stack: stackValidator, }; const validator = appValidators[route as keyof typeof appValidators]; diff --git a/api/src/validators/project.validator.ts b/api/src/validators/project.validator.ts index 2df47ac1..33da05d7 100644 --- a/api/src/validators/project.validator.ts +++ b/api/src/validators/project.validator.ts @@ -6,6 +6,7 @@ import { VALIDATION_ERRORS } from "../constants/index.js"; * * @returns {Object} The validation schema for the project data. */ + export default checkSchema({ name: { in: "body", diff --git a/api/src/validators/stack.validator.ts b/api/src/validators/stack.validator.ts index 9938217b..c993c656 100644 --- a/api/src/validators/stack.validator.ts +++ b/api/src/validators/stack.validator.ts @@ -37,10 +37,10 @@ export default checkSchema({ isLength: { errorMessage: VALIDATION_ERRORS.LENGTH_LIMIT.replace("$", "Description"), options: { - min: 1, + min: 0, max: 512, }, bail: true, }, }, -}); \ No newline at end of file +}); diff --git a/ui/src/cmsData/add_stack.json b/ui/src/cmsData/add_stack.json index 1c0c0206..77daf4fc 100644 --- a/ui/src/cmsData/add_stack.json +++ b/ui/src/cmsData/add_stack.json @@ -9,7 +9,7 @@ "secondary_cta": { "title": "Cancel" }, "stack_description": "Description", "stack_description_placeholder": "Enter a description", - "stack_locale_description": "Select a Language", + "stack_locale_description": "Select a language", "stack_locales": "Set Master Language", "stack_name": "Name", "stack_name_placeholder": "Enter stack Name", diff --git a/ui/src/cmsData/region_login.json b/ui/src/cmsData/region_login.json index 1d0ecbd4..6b1d5ce1 100644 --- a/ui/src/cmsData/region_login.json +++ b/ui/src/cmsData/region_login.json @@ -2,7 +2,7 @@ "title": "Account Login", "url": "/region-login", "heading": "Account Login", - "description": "Please select Contentstack North America (AWS or Azure) or Contentstack Europe (AWS or Azure) to continue.", + "description": "Please select Contentstack North America (AWS, Azure or GCP) or Contentstack Europe (AWS or Azure) to continue.", "regions": [ { "service_icon": { @@ -50,6 +50,34 @@ "cta": { "title": "Continue", "url": "/login" }, "_metadata": { "uid": "cs77a3bf15c456afbb" } }, + { + "service_icon": { + "uid": "blt57dafa9c1472b46f", + "created_at": "2024-07-29T10:57:59.058Z", + "updated_at": "2024-07-29T10:57:59.058Z", + "created_by": "blt181afddb6080e3df", + "updated_by": "blt181afddb6080e3df", + "content_type": "image/svg+xml", + "file_size": "1622", + "tags": [], + "filename": "google-cloud_1.svg", + "url": "https://images.contentstack.io/v3/assets/bltd3620ec6418ad3ad/blt57dafa9c1472b46f/66a775b7d14106640a554ec7/google-cloud_1.svg", + "ACL": [], + "is_dir": false, + "parent_uid": null, + "_version": 1, + "title": "google-cloud_1.svg" + }, + "service_title": "Google Cloud Platform", + "region_title": "North America", + "cta": { + "title": "Continue", + "url": "/login" + }, + "_metadata": { + "uid": "cs14bce3c329a87986" + } + }, { "service_icon": { "uid": "bltbe45879eac0025d8", diff --git a/ui/src/components/AdvancePropertise/advanceProperties.interface.ts b/ui/src/components/AdvancePropertise/advanceProperties.interface.ts index 3c5be031..0e5a15db 100644 --- a/ui/src/components/AdvancePropertise/advanceProperties.interface.ts +++ b/ui/src/components/AdvancePropertise/advanceProperties.interface.ts @@ -149,20 +149,82 @@ export interface Props { handleToggle?: (field: string, value: boolean, checkBoxChanged: boolean) => void; } +/** + * Represents the state type for advanced properties. + */ export interface StateType { + /** + * The minimum number of characters allowed. + */ minChars?: string; + + /** + * The maximum number of characters allowed. + */ maxChars?: number; + + /** + * The minimum range allowed. + */ minRange?: number; + + /** + * The maximum range allowed. + */ maxRange?: number; + + /** + * The minimum size allowed. + */ minSize?: string; + + /** + * The maximum size allowed. + */ maxSize?: number; + + /** + * The default value. + */ defaultValue?: string; + + /** + * The validation regular expression. + */ validationRegex?: string; + + /** + * The title. + */ title?: string; + + /** + * The URL. + */ url?: string; + + /** + * Indicates if the field is mandatory. + */ mandatory?: boolean; + + /** + * Indicates if only images are allowed. + */ allowImagesOnly?: boolean; + + /** + * Indicates if the field is non-localizable. + */ nonLocalizable?: boolean; + + /** + * Indicates if the object should be embedded. + */ embedObject?: boolean; + + /** + * Indicates if the assets should be embedded. + */ embedAssests?: boolean; } \ No newline at end of file diff --git a/ui/src/components/Common/ProgressBar/index.tsx b/ui/src/components/Common/ProgressBar/index.tsx index f15ae7d4..47ecd2e1 100644 --- a/ui/src/components/Common/ProgressBar/index.tsx +++ b/ui/src/components/Common/ProgressBar/index.tsx @@ -2,28 +2,56 @@ import React from 'react' import './progressBar.scss' import cn from 'classnames' - +/** + * Props for the ProgressBar component. + */ type ProgressBarProps = { + /** + * The percentage value for the progress. + */ percentage: number + /** + * The color of the progress bar. + */ color?: string /** - * Height of the Progress bar in pixel + * The height of the progress bar in pixels. */ height?: number /** - * Border radius in pixel + * The border radius of the progress bar in pixels. */ borderRadius?: number + /** + * The type of progress bar. Can be 'bar' or 'circle'. + */ type?: 'bar' | 'circle', + /** + * The stroke width of the circle progress bar. + */ stroke?: number + /** + * The radius of the circle progress bar. + */ radius?: number | undefined + /** + * The background color of the circle progress bar. + */ bgColor?: string } +/** + * Interface for defining CSS styles. + */ type IStyle = { [key: string]: string } +/** + * A customizable progress bar component. + * @param props - The props for the ProgressBar component. + * @returns The rendered ProgressBar component. + */ const ProgressBar = (props: ProgressBarProps) => { const { percentage, color, height, borderRadius, type, radius, stroke, bgColor } = props diff --git a/ui/src/components/Common/SaveChangesModal/index.tsx b/ui/src/components/Common/SaveChangesModal/index.tsx index 42207bde..e0b76001 100644 --- a/ui/src/components/Common/SaveChangesModal/index.tsx +++ b/ui/src/components/Common/SaveChangesModal/index.tsx @@ -14,6 +14,7 @@ interface Props { saveContentType: () => void; openContentType?: () => void; changeStep?: () => void; + dropdownStateChange: () => void; } const SaveChangesModal = (props: Props) => { @@ -37,6 +38,7 @@ const SaveChangesModal = (props: Props) => {