From cbb71e9c01edcc273ccbde1ebe5aa279ded48f19 Mon Sep 17 00:00:00 2001 From: Aqib Mirza Date: Thu, 18 May 2023 14:07:56 +0530 Subject: [PATCH 1/4] fix: packages version reverted --- server/node-service/package.json | 2 +- server/node-service/yarn.lock | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/node-service/package.json b/server/node-service/package.json index 58b3956e9c..a5d80f226c 100644 --- a/server/node-service/package.json +++ b/server/node-service/package.json @@ -35,7 +35,7 @@ "@aws-sdk/client-s3": "^3.332.0", "@aws-sdk/s3-request-presigner": "^3.332.0", "@google-cloud/bigquery": "^6.1.0", - "@google-cloud/storage": "^6.10.1", + "@google-cloud/storage": "^6.9.3", "@supabase/supabase-js": "^2.10.0", "@types/axios": "^0.14.0", "@types/express": "^4.17.14", diff --git a/server/node-service/yarn.lock b/server/node-service/yarn.lock index a0f65cadd3..1d065efd1f 100644 --- a/server/node-service/yarn.lock +++ b/server/node-service/yarn.lock @@ -2017,7 +2017,6 @@ __metadata: languageName: node linkType: hard - "@google-cloud/storage@npm:^6.9.3, @google-cloud/storage@npm:^6.9.5": version: 6.10.1 resolution: "@google-cloud/storage@npm:6.10.1" @@ -8940,7 +8939,7 @@ __metadata: "@aws-sdk/client-s3": ^3.332.0 "@aws-sdk/s3-request-presigner": ^3.332.0 "@google-cloud/bigquery": ^6.1.0 - "@google-cloud/storage": ^6.10.1 + "@google-cloud/storage": ^6.9.3 "@supabase/supabase-js": ^2.10.0 "@types/axios": ^0.14.0 "@types/express": ^4.17.14 From 8833e9c7e80df2ced4b78eec0822ba5145a4cbf8 Mon Sep 17 00:00:00 2001 From: Aqib Mirza Date: Thu, 18 May 2023 19:07:33 +0530 Subject: [PATCH 2/4] fix: package-version and mermaid integration --- client/packages/lowcoder-comps/package.json | 10 +- client/packages/lowcoder-comps/src/index.ts | 2 + .../lowcoder-design/src/icons/index.ts | 1 + client/packages/lowcoder/src/comps/index.tsx | 27 +- .../lowcoder/src/comps/uiCompRegistry.ts | 11 +- .../packages/lowcoder/src/i18n/locales/en.ts | 258 ++++++++++++------ .../src/pages/editor/editorConstants.tsx | 4 +- client/yarn.lock | 43 ++- 8 files changed, 249 insertions(+), 107 deletions(-) diff --git a/client/packages/lowcoder-comps/package.json b/client/packages/lowcoder-comps/package.json index 00ad0621b8..769d654e79 100644 --- a/client/packages/lowcoder-comps/package.json +++ b/client/packages/lowcoder-comps/package.json @@ -16,7 +16,7 @@ "big.js": "^6.2.1", "lowcoder-cli": "workspace:^", "lowcoder-sdk": "workspace:^", - "mermaid": "^10.0.2", + "mermaid": "^10.1.x0", "react": "17", "react-dom": "17", "typescript": "4.8.4" @@ -47,6 +47,14 @@ "w": 15, "h": 60 } + }, + "mermaid": { + "name": "Mermaid", + "icon": "./icons/icon-chart.svg", + "layoutInfo": { + "w": 15, + "h": 60 + } } } }, diff --git a/client/packages/lowcoder-comps/src/index.ts b/client/packages/lowcoder-comps/src/index.ts index 0efaccd880..c4d7a1a893 100644 --- a/client/packages/lowcoder-comps/src/index.ts +++ b/client/packages/lowcoder-comps/src/index.ts @@ -1,9 +1,11 @@ import { ChartCompWithDefault } from "./comps/chartComp/chartComp"; import { ImageEditorComp } from "./comps/imageEditorComp/index"; import { CalendarComp } from "./comps/calendarComp/calendarComp"; +import { MermaidComp } from "./comps/mermaidComp"; export default { chart: ChartCompWithDefault, imageEditor: ImageEditorComp, calendar: CalendarComp, + mermaid: MermaidComp, }; diff --git a/client/packages/lowcoder-design/src/icons/index.ts b/client/packages/lowcoder-design/src/icons/index.ts index 8a3a9c6a22..75390b003d 100644 --- a/client/packages/lowcoder-design/src/icons/index.ts +++ b/client/packages/lowcoder-design/src/icons/index.ts @@ -230,6 +230,7 @@ export { ReactComponent as HelpDiscordIcon } from "./icon-help-discord.svg"; export { ReactComponent as LeftAudio } from "./icon-left-comp-audio.svg"; export { ReactComponent as LeftButton } from "./icon-left-comp-button.svg"; export { ReactComponent as LeftChart } from "./icon-left-comp-chart.svg"; +export { ReactComponent as LeftMermaid } from "./icon-left-comp-chart.svg"; export { ReactComponent as LeftCheckbox } from "./icon-left-comp-checkbox.svg"; export { ReactComponent as LeftCommon } from "./icon-left-comp-common.svg"; export { ReactComponent as LeftContainer } from "./icon-left-comp-container.svg"; diff --git a/client/packages/lowcoder/src/comps/index.tsx b/client/packages/lowcoder/src/comps/index.tsx index c0d172d0d5..48af497843 100644 --- a/client/packages/lowcoder/src/comps/index.tsx +++ b/client/packages/lowcoder/src/comps/index.tsx @@ -4,7 +4,10 @@ import { ModalComp } from "comps/hooks/modalComp"; import { ButtonComp } from "./comps/buttonComp/buttonComp"; import { DropdownComp } from "./comps/buttonComp/dropdownComp"; import { LinkComp } from "./comps/buttonComp/linkComp"; -import { ContainerComp, defaultContainerData } from "./comps/containerComp/containerComp"; +import { + ContainerComp, + defaultContainerData, +} from "./comps/containerComp/containerComp"; import { CustomComp } from "./comps/customComp/customComp"; import { DatePickerComp, DateRangeComp } from "./comps/dateComp/dateComp"; import { DividerComp } from "./comps/dividerComp"; @@ -95,7 +98,12 @@ import { import { defaultFormData, FormComp } from "./comps/formComp/formComp"; import { IFrameComp } from "./comps/iframeComp"; -import { defaultGridData, defaultListViewData, GridComp, ListViewComp } from "./comps/listViewComp"; +import { + defaultGridData, + defaultListViewData, + GridComp, + ListViewComp, +} from "./comps/listViewComp"; import { ModuleComp } from "./comps/moduleComp/moduleComp"; import { NavComp } from "./comps/navComp/navComp"; import { TableComp } from "./comps/tableComp"; @@ -774,6 +782,19 @@ const uiCompMap: Registry = { h: 35, }, }, + mermaid: { + name: trans("uiComp.mermaidCompName"), + enName: "Mermaid", + description: trans("uiComp.mermaidCompDesc"), + categories: ["dataDisplay", "common"], + icon: ChartCompIcon, + comp: remoteComp({ ...builtInRemoteComps, compName: "mermaid" }), + keywords: trans("uiComp.mermaidCompKeywords"), + layoutInfo: { + w: 11, + h: 35, + }, + }, imageEditor: { name: trans("uiComp.imageEditorCompName"), enName: "Image Editor", @@ -807,7 +828,7 @@ const uiCompMap: Registry = { layoutInfo: { w: 24, h: 60, - } + }, }, signature: { name: trans("uiComp.signatureCompName"), diff --git a/client/packages/lowcoder/src/comps/uiCompRegistry.ts b/client/packages/lowcoder/src/comps/uiCompRegistry.ts index 60f68035f5..1dfb7f06a8 100644 --- a/client/packages/lowcoder/src/comps/uiCompRegistry.ts +++ b/client/packages/lowcoder/src/comps/uiCompRegistry.ts @@ -5,7 +5,9 @@ import { JSONValue } from "util/jsonTypes"; import { EditorState } from "./editorState"; import { trans } from "i18n"; -export type ExposingMultiCompConstructor = ReturnType; +export type ExposingMultiCompConstructor = ReturnType< + typeof withExposingConfigs +>; // Required when the container generates default child comps type CompDefaultDataFunction = ( compName: string, @@ -53,6 +55,7 @@ export type UICompType = | "moduleContainer" | "textArea" | "chart" + | "mermaid" | "imageEditor" | "calendar" | "password" @@ -83,6 +86,7 @@ export type UICompType = | "progress" | "progressCircle" | "chart" + | "mermaid" | "fileViewer" | "divider" | "qrCode" @@ -113,7 +117,10 @@ export type UICompType = export const uiCompRegistry = {} as Record; -export function registerComp(compType: UICompType | string, manifest: UICompManifest) { +export function registerComp( + compType: UICompType | string, + manifest: UICompManifest +) { uiCompRegistry[compType] = { ...manifest, keywords: [manifest.name, manifest.enName, manifest.keywords] diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index 4d820d84b8..58fbdc540b 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -47,7 +47,8 @@ export const en = { api: { publishSuccess: "Published", recoverFailed: "Recover failed", - needUpdate: "Your current version is too old, please upgrade to the latest version.", + needUpdate: + "Your current version is too old, please upgrade to the latest version.", }, codeEditor: { notSupportAutoFormat: "Current code editor not supports auto formatting", @@ -64,16 +65,20 @@ export const en = { blur: "Remove focus", click: "Click", select: "Select all the text", - setSelectionRange: "Set the start and end positions of the current text selection", + setSelectionRange: + "Set the start and end positions of the current text selection", selectionStart: "The 0-based index of the first selected character.", - selectionEnd: "The 0-based index of the character after the last selected character.", + selectionEnd: + "The 0-based index of the character after the last selected character.", setRangeText: "Replace a range of text", replacement: "The string to insert.", replaceStart: "The 0-based index of the first character to replace.", - replaceEnd: "The 0-based index of the character after the last character to replace.", + replaceEnd: + "The 0-based index of the character after the last character to replace.", }, errorBoundary: { - encounterError: "Loading component failed. Please check your configuration. ", + encounterError: + "Loading component failed. Please check your configuration. ", clickToReload: "Click to reload", errorMsg: "Error: ", }, @@ -88,8 +93,10 @@ export const en = { noContainerSelected: "[bug] No selected container", deleteCompsSuccess: "Delete success. You can use {undoKey} to undo.", deleteCompsTitle: "Delete components", - deleteCompsBody: "Are you sure you want to delete {compNum} selected components?", - cutCompsSuccess: "Cut success. You can use {pasteKey} to paste, or use {undoKey} to undo.", + deleteCompsBody: + "Are you sure you want to delete {compNum} selected components?", + cutCompsSuccess: + "Cut success. You can use {pasteKey} to paste, or use {undoKey} to undo.", }, leftPanel: { queries: "Queries", @@ -234,10 +241,12 @@ export const en = { export: "Export data", exportNoFileType: "No select (optional)", fileName: "File name", - fileNameTooltip: "Support extension to specify the file type, like image.png.", + fileNameTooltip: + "Support extension to specify the file type, like image.png.", fileType: "File type", condition: "Only run when", - conditionTooltip: "Only run the event handler when this condition evaluates to 'true'", + conditionTooltip: + "Only run the event handler when this condition evaluates to 'true'", debounce: "Debounce", throttle: "Throttle", slowdownTooltip: @@ -273,7 +282,8 @@ export const en = { canvas: "Canvas color", canvasDesc: "The default background color of the app", primarySurface: "Container color", - primarySurfaceDesc: "The default background color for components such as tables", + primarySurfaceDesc: + "The default background color for components such as tables", borderRadius: "Border radius", borderRadiusDesc: "Most components use the default border radius", chart: "Chart style", @@ -281,7 +291,8 @@ export const en = { echartsJson: "Theme JSON", }, style: { - resetTooltip: "Reset styles. Delete the input's value to reset an individual field.", + resetTooltip: + "Reset styles. Delete the input's value to reset an individual field.", contrastText: "Contrast text color", generated: "Generated", customize: "Customize", @@ -324,7 +335,8 @@ export const en = { }, export: { hiddenDesc: "If true, the component is hidden", - disabledDesc: "If true, the component will be greyed out and non-interactive", + disabledDesc: + "If true, the component will be greyed out and non-interactive", visibleDesc: "If true, the component is visible", inputValueDesc: "Current value of the input", invalidDesc: "Whether the value is invalid", @@ -343,22 +355,32 @@ export const en = { ratingValueDesc: "The currently selected score", ratingMaxDesc: "The maximum score currently set", datePickerValueDesc: "Currently selected date", - datePickerFormattedValueDesc: "Formatted selected date according to the specified format", + datePickerFormattedValueDesc: + "Formatted selected date according to the specified format", datePickerTimestampDesc: "The currently selected timestamp of the date (s)", dateRangeStartDesc: "Currently selected start date", dateRangeEndDesc: "Currently selected end date", - dateRangeStartTimestampDesc: "The currently selected timestamp of the start date (s)", - dateRangeEndTimestampDesc: "The currently selected timestamp of the end date (s)", - dateRangeFormattedValueDesc: "Formatted selected date according to the specified format", - dateRangeFormattedStartValueDesc: "Formatted start date according to the specified format", - dateRangeFormattedEndValueDesc: "Formatted end date according to the specified format", + dateRangeStartTimestampDesc: + "The currently selected timestamp of the start date (s)", + dateRangeEndTimestampDesc: + "The currently selected timestamp of the end date (s)", + dateRangeFormattedValueDesc: + "Formatted selected date according to the specified format", + dateRangeFormattedStartValueDesc: + "Formatted start date according to the specified format", + dateRangeFormattedEndValueDesc: + "Formatted end date according to the specified format", timePickerValueDesc: "Currently selected time", - timePickerFormattedValueDesc: "Formatted selected time according to the specified format", + timePickerFormattedValueDesc: + "Formatted selected time according to the specified format", timeRangeStartDesc: "Currently selected start time", timeRangeEndDesc: "Currently selected end time", - timeRangeFormattedValueDesc: "Formatted selected time according to the specified format", - timeRangeFormattedStartValueDesc: "Formatted start time according to the specified format", - timeRangeFormattedEndValueDesc: "Formatted end time according to the specified format", + timeRangeFormattedValueDesc: + "Formatted selected time according to the specified format", + timeRangeFormattedStartValueDesc: + "Formatted start time according to the specified format", + timeRangeFormattedEndValueDesc: + "Formatted end time according to the specified format", }, validationDesc: { email: "Please enter a valid email address", @@ -370,10 +392,14 @@ export const en = { "Insufficient number of characters, current length {length}, minimum length {minLength}", maxValue: "Greater than the maximum, current {value}, maximum {max}", minValue: "Less than the minimum, current {value}, minimum {min}", - maxTime: "Greater than the maximum time, current time {time}, the maximum time {maxTime}", - minTime: "Less than the minimum time, current time {time}, the minimum time {minTime}", - maxDate: "Greater than maximum date, current time {date}, maximum date {maxDate}", - minDate: "Less than minimum date, current time {date}, minimum date {minDate}", + maxTime: + "Greater than the maximum time, current time {time}, the maximum time {maxTime}", + minTime: + "Less than the minimum time, current time {time}, the minimum time {minTime}", + maxDate: + "Greater than maximum date, current time {date}, maximum date {maxDate}", + minDate: + "Less than minimum date, current time {date}, minimum date {minDate}", }, query: { noQueries: "No queries available. ", @@ -385,7 +411,8 @@ export const en = { advancedTab: "Advanced", showFailNotification: "Show notification on failure", failCondition: "Failure conditions", - failConditionTooltip1: "Customizes failure condition and corresponding notification.", + failConditionTooltip1: + "Customizes failure condition and corresponding notification.", failConditionTooltip2: "If any condition returns true, the query will be marked as failure and triggers corresponding notification.", showSuccessNotification: "Show notification on success", @@ -454,7 +481,8 @@ export const en = { execSuccess: "run success", execFail: "run failed", execIgnored: "The results of this query was ignored.", - deleteSuccessMessage: "Successfully deleted. You can use {undoKey} to undo.", + deleteSuccessMessage: + "Successfully deleted. You can use {undoKey} to undo.", dataExportDesc: "Data obtained by the current query", codeExportDesc: "Current query status code", successExportDesc: "Whether the current query was executed successfully", @@ -499,7 +527,8 @@ export const en = { sslCertVerificationTypeDisabled: "Disabled", selfSignedCert: "Self-signed Cert", selfSignedCertRequireMsg: "Please enter your Certificate", - enableTurnOffPreparedStatement: "Enable toggling prepared statements for queries", + enableTurnOffPreparedStatement: + "Enable toggling prepared statements for queries", enableTurnOffPreparedStatementTooltip: "You can enable or disable prepared statements in query Advanced tab", serviceName: "Service name", @@ -587,11 +616,13 @@ export const en = { publish: "Publish", historyVersion: "History version", deleteQueryLabel: "Delete query", - deleteQueryContent: "The query can't be recovered after being deleted. Delete the query?", + deleteQueryContent: + "The query can't be recovered after being deleted. Delete the query?", run: "Run", readOnly: "Read only", exit: "Exit", - recoverAppSnapshotContent: "Restore the current query to the version {version}", + recoverAppSnapshotContent: + "Restore the current query to the version {version}", searchPlaceholder: "Search query", allQuery: "All queries", deleteQueryTitle: "Delete query", @@ -625,8 +656,10 @@ export const en = { }, smtpQuery: { attachment: "Attachment", - attachmentTooltip: "Can use with file upload component, need convert data to: ", - MIMETypeUrl: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types", + attachmentTooltip: + "Can use with file upload component, need convert data to: ", + MIMETypeUrl: + "https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types", sender: "Sender", recipient: "Recipient", carbonCopy: "Carbon copy", @@ -806,6 +839,9 @@ export const en = { chartCompName: "Chart", chartCompDesc: "Chart component", chartCompKeywords: "", + mermaidCompName: "Mermaid", + mermaidCompDesc: "Mermaid component", + mermaidCompKeywords: "", carouselCompName: "Carousel", carouselCompDesc: "Carousel component", carouselCompKeywords: "", @@ -823,13 +859,16 @@ export const en = { menuViewDocs: "View documentation", menuUpgradeToLatest: "Upgrade to latest version", nameNotEmpty: "Can not be empty", - nameRegex: "Must start with a letter and contain only letters, digits, and underscores (_)", + nameRegex: + "Must start with a letter and contain only letters, digits, and underscores (_)", nameJSKeyword: "Can not be a Javascript keyword", nameGlobalVariable: "Can not be global variable name", nameExists: "Name {name} already exist", - getLatestVersionMetaError: "Failed to fetch latest version, please try later.", + getLatestVersionMetaError: + "Failed to fetch latest version, please try later.", needNotUpgrade: "Current version is already latest.", - compNotFoundInLatestVersion: "Current component not found in the latest version.", + compNotFoundInLatestVersion: + "Current component not found in the latest version.", upgradeSuccess: "Successfully upgraded to latest version.", searchProp: "Search", }, @@ -950,9 +989,11 @@ export const en = { radio: { options: "Options", horizontal: "Horizontal", - horizontalTooltip: "The horizontal layout wraps itself when it runs out of space", + horizontalTooltip: + "The horizontal layout wraps itself when it runs out of space", vertical: "Vertical", - verticalTooltip: "The vertical layout will always be displayed in a single column", + verticalTooltip: + "The vertical layout will always be displayed in a single column", autoColumns: "Auto column", autoColumnsTooltip: "The auto column layout automatically rearranges the order as space permits and displays as multiple columns", @@ -962,11 +1003,13 @@ export const en = { }, selectInput: { valueDesc: "Currently selected value", - selectedIndexDesc: "The index of the currently selected value, or -1 if no value is selected", + selectedIndexDesc: + "The index of the currently selected value, or -1 if no value is selected", selectedLabelDesc: "The label of the currently selected value", }, file: { - typeErrorMsg: "Must be a number with a valid file size unit, or a unitless number of bytes.", + typeErrorMsg: + "Must be a number with a valid file size unit, or a unitless number of bytes.", fileEmptyErrorMsg: "upload failed. The file size is empty.", fileSizeExceedErrorMsg: "upload failed. The file size exceeds the limit.", minSize: "Min size", @@ -985,7 +1028,8 @@ export const en = { uploadType: "Upload type", showUploadList: "Show upload list", maxFiles: "Max files", - filesValueDesc: "The contents of the currently uploaded file are Base64 encoded", + filesValueDesc: + "The contents of the currently uploaded file are Base64 encoded", filesDesc: "List of the current uploaded files. For details, refer to", clearValueDesc: "Clear all files", parseFiles: "Parse files", @@ -1028,13 +1072,15 @@ export const en = { default: "Default", submit: "Submit", textDesc: "Text currently displayed on button", - loadingDesc: "Is the button in loading state? If true the current button is loading", + loadingDesc: + "Is the button in loading state? If true the current button is loading", formButtonEvent: "event", }, link: { link: "Link", textDesc: "Text currently displayed on link", - loadingDesc: "Is the link in loading state? If true the current link is loading", + loadingDesc: + "Is the link in loading state? If true the current link is loading", }, scanner: { text: "Click scan", @@ -1130,7 +1176,8 @@ export const en = { optionList: "Operation list", option1: "Operation 1", status: "Status", - statusTooltip: "Optional values: success, error, default, warning, processing", + statusTooltip: + "Optional values: success, error, default, warning, processing", primaryButton: "Primary", defaultButton: "Default", type: "Type", @@ -1142,7 +1189,8 @@ export const en = { small: "S", middle: "M", large: "L", - refreshButtonTooltip: "The current data changes, click to regenerate the column.", + refreshButtonTooltip: + "The current data changes, click to regenerate the column.", changeSetDesc: "An object representing changes to an editable table, only contains the changed cell. Rows go first and columns go second.", selectedRowDesc: @@ -1184,7 +1232,8 @@ export const en = { showValue: "Show Value", expandable: "Expandable", configExpandedView: "Configure expanded view", - toUpdateRowsDesc: "An array of objects for rows to be updated in editable tables.", + toUpdateRowsDesc: + "An array of objects for rows to be updated in editable tables.", empty: "Empty", falseValues: "Text when false", allColumn: "All", @@ -1232,7 +1281,8 @@ export const en = { M: "M (Medium)", Q: "Q (Quartile)", H: "H (High)", - maxLength: "The content is too long. Set the length to less than 2953 characters", + maxLength: + "The content is too long. Set the length to less than 2953 characters", }, jsonExplorer: { indent: "Indent", @@ -1291,8 +1341,10 @@ export const en = { media: { playDesc: "Begins playback of the media.", pauseDesc: "Pauses the media playback.", - loadDesc: "Resets the media to the beginning and restart selecting the media resource.", - seekTo: "Seek to the given number of seconds, or fraction if amount is between 0 and 1", + loadDesc: + "Resets the media to the beginning and restart selecting the media resource.", + seekTo: + "Seek to the given number of seconds, or fraction if amount is between 0 and 1", seekToAmount: "Number of seconds, or fraction if it is between 0 and 1", showPreview: "Show preview", }, @@ -1309,8 +1361,10 @@ export const en = { insertImage: "Insert an image or ", }, millisecondsControl: { - timeoutTypeError: "Please enter the correct timeout period, the current input is: {value}", - timeoutLessThanMinError: "Input must greater than {left}, the current input is: {value}", + timeoutTypeError: + "Please enter the correct timeout period, the current input is: {value}", + timeoutLessThanMinError: + "Input must greater than {left}, the current input is: {value}", }, selectionControl: { single: "Single", @@ -1360,7 +1414,8 @@ export const en = { newGroupPrefix: "New group ", allMembers: "All members", deleteModalTitle: "Delete this group", - deleteModalContent: "The deleted group cannot be restored. Are you sure to delete the group?", + deleteModalContent: + "The deleted group cannot be restored. Are you sure to delete the group?", addMember: "Add members", nameColumn: "User name", joinTimeColumn: "Joining time", @@ -1372,9 +1427,12 @@ export const en = { exitOrg: "Leave", exitOrgDesc: "Are you sure you want to leave this workspace.", moveOutOrg: "Remove", - moveOutOrgDescSaasMode: "Are you sure you want to remove user {name} from this workspace?", - moveOutOrgDesc: "Are you sure you want to remove user {name}? This action cannot be recovered.", - devGroupTip: "Members of the developer group have privileges to create apps and data sources.", + moveOutOrgDescSaasMode: + "Are you sure you want to remove user {name} from this workspace?", + moveOutOrgDesc: + "Are you sure you want to remove user {name}? This action cannot be recovered.", + devGroupTip: + "Members of the developer group have privileges to create apps and data sources.", lastAdminQuit: "The last administrator cannot exit.", organizationNotExist: "The current workspace does not exist", inviteUserHelp: "You can copy the invitation link to send to the user", @@ -1387,7 +1445,8 @@ export const en = { manageBtn: "Manage", userDetail: "Detail", syncDeleteTip: "This group has been deleted from the address book source", - syncGroupTip: "This group is an address book synchronization group and cannot be edited", + syncGroupTip: + "This group is an address book synchronization group and cannot be edited", }, orgSettings: { newOrg: "New workspace", @@ -1398,7 +1457,8 @@ export const en = { "You are about to delete this workspace {permanentlyDelete}. Once deleted, the workspace {notRestored}.", permanentlyDelete: "permanently", notRestored: "cannot be restored", - deleteModalLabel: "Please enter workspace name{name}to confirm the operation:", + deleteModalLabel: + "Please enter workspace name{name}to confirm the operation:", deleteModalTip: "Please enter workspace name", deleteModalErr: "Workspace name is incorrect", deleteModalBtn: "Delete", @@ -1444,9 +1504,12 @@ export const en = { noTableSelected: "No table selected", noColumn: "No column", noColumnSelected: "No column selected", - noDataSourceFound: "No supported data source found. Create a new data source", - noTableFound: "No tables were found in this data source, please select another data source", - noColumnFound: "No supported column was found in this table. Please select another table", + noDataSourceFound: + "No supported data source found. Create a new data source", + noTableFound: + "No tables were found in this data source, please select another data source", + noColumnFound: + "No supported column was found in this table. Please select another table", formTitle: "Form title", name: "Name", nameTooltip: @@ -1478,9 +1541,11 @@ export const en = { "Number of rows in the list - This is usually set to a variable (for example, '{{query1.data.length}}') if you need to present the results of a query.", noOfColumns: "Column count", itemIndexName: "Item index name", - itemIndexNameDesc: "the variable name refer to the item's index, default as {default}", + itemIndexNameDesc: + "the variable name refer to the item's index, default as {default}", itemDataName: "Item data name", - itemDataNameDesc: "the variable name refer to the item's data object, default as {default}", + itemDataNameDesc: + "the variable name refer to the item's data object, default as {default}", itemsDesc: "Exposing data of Comps in list", dataDesc: "The raw data used in the current list", dataTooltip: @@ -1550,19 +1615,23 @@ export const en = { }, temporaryState: { value: "Init value", - valueTooltip: "The initial Value stored in the temporary state can be any valid JSON Value.", + valueTooltip: + "The initial Value stored in the temporary state can be any valid JSON Value.", docLink: "About temporary state", pathTypeError: "Path must be either a string or an array of values", unStructuredError: "Unstructured data {prev} can't be updated by {path}", valueDesc: "Temporary state value", - deleteMessage: "The temporary state is deleted successfully. You can use {undoKey} to undo.", + deleteMessage: + "The temporary state is deleted successfully. You can use {undoKey} to undo.", }, dataResponder: { data: "Data", dataDesc: "Data of current data responder", - dataTooltip: "When this data is changed, it will trigger subsequent actions.", + dataTooltip: + "When this data is changed, it will trigger subsequent actions.", docLink: "About the Data responder", - deleteMessage: "The data responder is deleted successfully. You can use {undoKey} to undo.", + deleteMessage: + "The data responder is deleted successfully. You can use {undoKey} to undo.", }, theme: { title: "Themes", @@ -1600,7 +1669,8 @@ export const en = { defaultTheme: "Default", yellow: "Yellow", green: "Green", - previewTitle: "Theme preview\nExample components that use your theme colors", + previewTitle: + "Theme preview\nExample components that use your theme colors", dateColumn: "Date", emailColumn: "Email", phoneColumn: "Phone", @@ -1638,7 +1708,8 @@ export const en = { pluginSetting: { title: "Plugins", npmPluginTitle: "npm plugins", - npmPluginDesc: "Set up npm plugins for all applications in the current workspace.", + npmPluginDesc: + "Set up npm plugins for all applications in the current workspace.", npmPluginEmpty: "No npm plugins were added.", npmPluginAddButton: "Add a npm plugin", saveSuccess: "Saved successfully", @@ -1651,9 +1722,11 @@ export const en = { defaultHomePlaceholder: "Select the default homepage", saveBtn: "Save", preloadJSTitle: "Preload JavaScript", - preloadJSHelp: "Set up preloaded JavaScript code for all apps in the current workspace.", + preloadJSHelp: + "Set up preloaded JavaScript code for all apps in the current workspace.", preloadCSSTitle: "Preload CSS", - preloadCSSHelp: " Set up preloaded CSS code for all apps in the current workspace.", + preloadCSSHelp: + " Set up preloaded CSS code for all apps in the current workspace.", preloadCSSApply: "Apply to the homepage of the workspace", preloadLibsTitle: "JavaScript library", preloadLibsHelp: @@ -1695,7 +1768,8 @@ export const en = { }, module: { emptyText: "No data", - circularReference: "Circular reference, current module/application cannot be used!", + circularReference: + "Circular reference, current module/application cannot be used!", emptyTestInput: "The current module has no input to test", emptyTestMethod: "The current module has no method to test", name: "Name", @@ -1718,7 +1792,8 @@ export const en = { output: "Output", nameExists: "Name {name} already exist", eventTriggered: "Event {name} is triggered", - globalPromptWhenEventTriggered: "Displays a global prompt when an event is triggered", + globalPromptWhenEventTriggered: + "Displays a global prompt when an event is triggered", emptyEventTest: "The current module has no events to test", emptyEvent: "No event has been added", event: "Event", @@ -1854,7 +1929,8 @@ export const en = { videoText: "Overview", onBtnText: "OK", // eslint-disable-next-line only-ascii/only-ascii - permissionDenyTitle: "💡 Unable to create a new application or data source?", + permissionDenyTitle: + "Unable to create a new application or data source?", permissionDenyContent: "You don't have permission to create the application and data source. Please contact the administrator to join the developer group.", appName: "Tutorial application", @@ -1870,7 +1946,8 @@ export const en = { nameCheckMessage: "The name cannot be empty", viewOnly: "View only", recoverAppSnapshotTitle: "Restore this version?", - recoverAppSnapshotContent: "Restore current app to the version created at {time}.", + recoverAppSnapshotContent: + "Restore current app to the version created at {time}.", recoverAppSnapshotMessage: "Restore this version", returnEdit: "Return to editor", deploy: "Publish", @@ -1914,7 +1991,8 @@ export const en = { resetPasswordDesc: "Reset user {name}'s password. A new password will be generated after reset.", resetSuccess: "Reset succeeded", - resetSuccessDesc: "Password reset succeeded. The new password is: {password}", + resetSuccessDesc: + "Password reset succeeded. The new password is: {password}", copyPassword: "Copy password", }, preLoad: { @@ -2007,7 +2085,8 @@ export const en = { resCardSubTitle: "{time} by {creator}", trashEmpty: "Trash is empty.", projectEmpty: "Nothing here.", - projectEmptyCanAdd: "You don't have any apps yet. Click New to get started.", + projectEmptyCanAdd: + "You don't have any apps yet. Click New to get started.", name: "Name", type: "Type", creator: "Created by", @@ -2019,7 +2098,8 @@ export const en = { nameCheckMessage: "The name cannot be empty", deleteElementTitle: "Delete permanently", moveToTrashSubTitle: "{type} {name} will be moved to trash.", - deleteElementSubTitle: "Delete {type} {name} permanently, it cannot be recovered.", + deleteElementSubTitle: + "Delete {type} {name} permanently, it cannot be recovered.", deleteSuccessMsg: "Deleted successfully", deleteErrorMsg: "Deleted error", recoverSuccessMsg: "Recovered successfully", @@ -2092,12 +2172,15 @@ export const en = { aboutUs: "", changeLog: "", introVideo: "", - devNpmPlugin: "https://docs.lowcoder.dev/build-plugins/develop-your-first-plugin", + devNpmPlugin: + "https://docs.lowcoder.dev/build-plugins/develop-your-first-plugin", devNpmPluginText: "How to develop npm plugin", - useHost: "https://docs.lowcoder.dev/self-hosting/access-local-database-or-api", + useHost: + "https://docs.lowcoder.dev/self-hosting/access-local-database-or-api", eventHandlerSlowdown: "https://docs.lowcoder.dev/build-apps/event-handlers#debounce-and-throttle", - thirdLib: "https://docs.lowcoder.dev/build-apps/write-javascript/use-third-party-libraries", + thirdLib: + "https://docs.lowcoder.dev/build-apps/write-javascript/use-third-party-libraries", thirdLibUrlText: "Use third-party libraries", }, datasourceTutorial: { @@ -2111,8 +2194,10 @@ export const en = { }, queryTutorial: { js: "", - transformer: "https://docs.lowcoder.dev/build-apps/write-javascript/transformers", - tempState: "https://docs.lowcoder.dev/build-apps/write-javascript/temporary-state", + transformer: + "https://docs.lowcoder.dev/build-apps/write-javascript/transformers", + tempState: + "https://docs.lowcoder.dev/build-apps/write-javascript/temporary-state", }, customComponent: { entryUrl: "https://custom-component.lowcoder.dev/index.html", @@ -2182,7 +2267,8 @@ export const en = { defaultStartDateValue: "Default Start Date", defaultEndDateValue: "Default End Date", basicUsage: "Basic Usage", - basicDemoDescription: "The following examples show the basic usage of the component.", + basicDemoDescription: + "The following examples show the basic usage of the component.", noDefaultValue: "No Default Value", forbid: "Forbidden", placeholder: "Placeholder", @@ -2254,7 +2340,8 @@ export const en = { styleColor: "Font color", selectionMode: "Row selection mode", paginationSetting: "Pagination setting", - paginationShowSizeChanger: "Support users to modify the number of entries per page", + paginationShowSizeChanger: + "Support users to modify the number of entries per page", paginationShowSizeChangerButton: "Show size changer button", paginationShowQuickJumper: "Show quick jumper", paginationHideOnSinglePage: "Hide when there is only one page", @@ -2387,7 +2474,8 @@ export const en = { disableContent: "Disabling this ID provider may result in some users being unable to log in. Are you sure to proceed?", manualTip: "", - lockTip: "The content is locked. To make changes, please click the{icon}to unlock.", + lockTip: + "The content is locked. To make changes, please click the{icon}to unlock.", lockModalContent: "Changing the 'ID attribute' field can have significant impacts on user identification. Please confirm that you understand the implications of this change before proceeding.", payUserTag: "Premium", diff --git a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx index 2f9fabf2fe..17f1e92fc6 100644 --- a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx +++ b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx @@ -3,6 +3,7 @@ import { LeftAudio, LeftButton, LeftChart, + LeftMermaid, LeftCheckbox, LeftCommon, LeftContainer, @@ -35,7 +36,7 @@ import { LeftTime, LeftTree, LeftVideo, - LeftSignature + LeftSignature, } from "lowcoder-design"; export const CompStateIcon: { @@ -73,6 +74,7 @@ export const CompStateIcon: { progress: , progressCircle: , chart: , + mermaid: , fileViewer: , divider: , qrCode: , diff --git a/client/yarn.lock b/client/yarn.lock index a29bf25b2f..57c5973ac1 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -3651,6 +3651,18 @@ __metadata: languageName: node linkType: hard +"@khanacademy/simple-markdown@npm:^0.8.6": + version: 0.8.6 + resolution: "@khanacademy/simple-markdown@npm:0.8.6" + dependencies: + "@types/react": ">=16.0.0" + peerDependencies: + react: 16.14.0 + react-dom: 16.14.0 + checksum: 19f4c79f6648813f9fba922fc8d0e3175eaafe345b8647fe835477528ed13e680c150a4e1a687fa208972ebceaea9dff6066c83de753eb26a8eaec769efe5c07 + languageName: node + linkType: hard + "@lezer/common@npm:^0.16.0, @lezer/common@npm:^0.16.1": version: 0.16.1 resolution: "@lezer/common@npm:0.16.1" @@ -8046,13 +8058,13 @@ __metadata: languageName: node linkType: hard -"dagre-d3-es@npm:7.0.9": - version: 7.0.9 - resolution: "dagre-d3-es@npm:7.0.9" +"dagre-d3-es@npm:7.0.10": + version: 7.0.10 + resolution: "dagre-d3-es@npm:7.0.10" dependencies: d3: ^7.8.2 lodash-es: ^4.17.21 - checksum: 5f24ad9558e84066e70cfa6979320d93079979ac8b0a3b033e5330742aeeba74e205f66794ab6e0a82354b061a4e29c10a291590d7b2cf82b5780fab5443f5ba + checksum: 25194e80dfad48db0dc2e0a273a7c9fcbfdc4cf993b219eaa1e0e0ce0cbb8c63be42fa2aa0c5f9bf9b324c34b8b2e300bb2a1606d5ae35c2de00f9c4ac317d8e languageName: node linkType: hard @@ -8540,10 +8552,10 @@ __metadata: languageName: node linkType: hard -"dompurify@npm:2.4.3": - version: 2.4.3 - resolution: "dompurify@npm:2.4.3" - checksum: b440981f2a38cada2085759cc3d1e2f94571afc34343d011a8a6aa1ad91ae6abf651adbfa4994b0e2283f0ce81f7891cdb04b67d0b234c8d190cb70e9691f026 +"dompurify@npm:2.4.5": + version: 2.4.5 + resolution: "dompurify@npm:2.4.5" + checksum: d6d3c3b320f15cdb5b26aa1902c3275a3ab2c3705a9df4420bb94691d7c4df67959ec7b91e486c308320791b0ee000456f042734c45d76721e61c2768eac706e languageName: node linkType: hard @@ -12845,7 +12857,7 @@ __metadata: jest: 29.3.0 lowcoder-cli: "workspace:^" lowcoder-sdk: "workspace:^" - mermaid: ^10.0.2 + mermaid: ^10.1.0 react: 17 react-dom: 17 typescript: 4.8.4 @@ -13458,18 +13470,19 @@ __metadata: languageName: node linkType: hard -"mermaid@npm:^10.0.2": - version: 10.0.2 - resolution: "mermaid@npm:10.0.2" +"mermaid@npm:^10.1.0": + version: 10.1.0 + resolution: "mermaid@npm:10.1.0" dependencies: "@braintree/sanitize-url": ^6.0.0 + "@khanacademy/simple-markdown": ^0.8.6 cytoscape: ^3.23.0 cytoscape-cose-bilkent: ^4.1.0 cytoscape-fcose: ^2.1.0 d3: ^7.4.0 - dagre-d3-es: 7.0.9 + dagre-d3-es: 7.0.10 dayjs: ^1.11.7 - dompurify: 2.4.3 + dompurify: 2.4.5 elkjs: ^0.8.2 khroma: ^2.0.0 lodash-es: ^4.17.21 @@ -13478,7 +13491,7 @@ __metadata: ts-dedent: ^2.2.0 uuid: ^9.0.0 web-worker: ^1.2.0 - checksum: 930e8509ba928b3598dcd7f7512e4d60c0d252a95fa7bd4f5c2cdf055409febc75d71909419151301f64012e699dd964419c50200808aff1770cc4014ece82c6 + checksum: d38c72aee917948491e782aac885ac0c71eb5f51f904a6d4bf1ceeb97d502b77da41524ee04de6cd1b0f9b645ad8853319f5ac60a7cce248de2484c2fd616b8e languageName: node linkType: hard From ce564a9e5a20be9576f5d357f13530b670631fe9 Mon Sep 17 00:00:00 2001 From: Aqib Mirza Date: Thu, 18 May 2023 20:21:36 +0530 Subject: [PATCH 3/4] fix: mermaid version in package json --- client/packages/lowcoder-comps/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/packages/lowcoder-comps/package.json b/client/packages/lowcoder-comps/package.json index 769d654e79..73d728112f 100644 --- a/client/packages/lowcoder-comps/package.json +++ b/client/packages/lowcoder-comps/package.json @@ -16,7 +16,7 @@ "big.js": "^6.2.1", "lowcoder-cli": "workspace:^", "lowcoder-sdk": "workspace:^", - "mermaid": "^10.1.x0", + "mermaid": "^10.1.0", "react": "17", "react-dom": "17", "typescript": "4.8.4" From ad55345594bd411e28006c81e4b37fd4987d433e Mon Sep 17 00:00:00 2001 From: Aqib Mirza Date: Mon, 22 May 2023 13:58:16 +0530 Subject: [PATCH 4/4] fix : code formatting reverted --- client/packages/lowcoder/src/comps/index.tsx | 14 +- .../lowcoder/src/comps/uiCompRegistry.ts | 9 +- .../packages/lowcoder/src/i18n/locales/en.ts | 257 ++++++------------ .../src/pages/editor/editorConstants.tsx | 2 +- 4 files changed, 92 insertions(+), 190 deletions(-) diff --git a/client/packages/lowcoder/src/comps/index.tsx b/client/packages/lowcoder/src/comps/index.tsx index 48af497843..f85bce6598 100644 --- a/client/packages/lowcoder/src/comps/index.tsx +++ b/client/packages/lowcoder/src/comps/index.tsx @@ -4,10 +4,7 @@ import { ModalComp } from "comps/hooks/modalComp"; import { ButtonComp } from "./comps/buttonComp/buttonComp"; import { DropdownComp } from "./comps/buttonComp/dropdownComp"; import { LinkComp } from "./comps/buttonComp/linkComp"; -import { - ContainerComp, - defaultContainerData, -} from "./comps/containerComp/containerComp"; +import { ContainerComp, defaultContainerData } from "./comps/containerComp/containerComp"; import { CustomComp } from "./comps/customComp/customComp"; import { DatePickerComp, DateRangeComp } from "./comps/dateComp/dateComp"; import { DividerComp } from "./comps/dividerComp"; @@ -98,12 +95,7 @@ import { import { defaultFormData, FormComp } from "./comps/formComp/formComp"; import { IFrameComp } from "./comps/iframeComp"; -import { - defaultGridData, - defaultListViewData, - GridComp, - ListViewComp, -} from "./comps/listViewComp"; +import { defaultGridData, defaultListViewData, GridComp, ListViewComp } from "./comps/listViewComp"; import { ModuleComp } from "./comps/moduleComp/moduleComp"; import { NavComp } from "./comps/navComp/navComp"; import { TableComp } from "./comps/tableComp"; @@ -828,7 +820,7 @@ const uiCompMap: Registry = { layoutInfo: { w: 24, h: 60, - }, + } }, signature: { name: trans("uiComp.signatureCompName"), diff --git a/client/packages/lowcoder/src/comps/uiCompRegistry.ts b/client/packages/lowcoder/src/comps/uiCompRegistry.ts index 1dfb7f06a8..14c3686bd7 100644 --- a/client/packages/lowcoder/src/comps/uiCompRegistry.ts +++ b/client/packages/lowcoder/src/comps/uiCompRegistry.ts @@ -5,9 +5,7 @@ import { JSONValue } from "util/jsonTypes"; import { EditorState } from "./editorState"; import { trans } from "i18n"; -export type ExposingMultiCompConstructor = ReturnType< - typeof withExposingConfigs ->; +export type ExposingMultiCompConstructor = ReturnType; // Required when the container generates default child comps type CompDefaultDataFunction = ( compName: string, @@ -117,10 +115,7 @@ export type UICompType = export const uiCompRegistry = {} as Record; -export function registerComp( - compType: UICompType | string, - manifest: UICompManifest -) { +export function registerComp(compType: UICompType | string, manifest: UICompManifest) { uiCompRegistry[compType] = { ...manifest, keywords: [manifest.name, manifest.enName, manifest.keywords] diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index 58fbdc540b..399e2589e3 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -47,8 +47,7 @@ export const en = { api: { publishSuccess: "Published", recoverFailed: "Recover failed", - needUpdate: - "Your current version is too old, please upgrade to the latest version.", + needUpdate: "Your current version is too old, please upgrade to the latest version.", }, codeEditor: { notSupportAutoFormat: "Current code editor not supports auto formatting", @@ -65,20 +64,16 @@ export const en = { blur: "Remove focus", click: "Click", select: "Select all the text", - setSelectionRange: - "Set the start and end positions of the current text selection", + setSelectionRange: "Set the start and end positions of the current text selection", selectionStart: "The 0-based index of the first selected character.", - selectionEnd: - "The 0-based index of the character after the last selected character.", + selectionEnd: "The 0-based index of the character after the last selected character.", setRangeText: "Replace a range of text", replacement: "The string to insert.", replaceStart: "The 0-based index of the first character to replace.", - replaceEnd: - "The 0-based index of the character after the last character to replace.", + replaceEnd: "The 0-based index of the character after the last character to replace.", }, errorBoundary: { - encounterError: - "Loading component failed. Please check your configuration. ", + encounterError: "Loading component failed. Please check your configuration. ", clickToReload: "Click to reload", errorMsg: "Error: ", }, @@ -93,10 +88,8 @@ export const en = { noContainerSelected: "[bug] No selected container", deleteCompsSuccess: "Delete success. You can use {undoKey} to undo.", deleteCompsTitle: "Delete components", - deleteCompsBody: - "Are you sure you want to delete {compNum} selected components?", - cutCompsSuccess: - "Cut success. You can use {pasteKey} to paste, or use {undoKey} to undo.", + deleteCompsBody: "Are you sure you want to delete {compNum} selected components?", + cutCompsSuccess: "Cut success. You can use {pasteKey} to paste, or use {undoKey} to undo.", }, leftPanel: { queries: "Queries", @@ -241,12 +234,10 @@ export const en = { export: "Export data", exportNoFileType: "No select (optional)", fileName: "File name", - fileNameTooltip: - "Support extension to specify the file type, like image.png.", + fileNameTooltip: "Support extension to specify the file type, like image.png.", fileType: "File type", condition: "Only run when", - conditionTooltip: - "Only run the event handler when this condition evaluates to 'true'", + conditionTooltip: "Only run the event handler when this condition evaluates to 'true'", debounce: "Debounce", throttle: "Throttle", slowdownTooltip: @@ -282,8 +273,7 @@ export const en = { canvas: "Canvas color", canvasDesc: "The default background color of the app", primarySurface: "Container color", - primarySurfaceDesc: - "The default background color for components such as tables", + primarySurfaceDesc: "The default background color for components such as tables", borderRadius: "Border radius", borderRadiusDesc: "Most components use the default border radius", chart: "Chart style", @@ -291,8 +281,7 @@ export const en = { echartsJson: "Theme JSON", }, style: { - resetTooltip: - "Reset styles. Delete the input's value to reset an individual field.", + resetTooltip: "Reset styles. Delete the input's value to reset an individual field.", contrastText: "Contrast text color", generated: "Generated", customize: "Customize", @@ -335,8 +324,7 @@ export const en = { }, export: { hiddenDesc: "If true, the component is hidden", - disabledDesc: - "If true, the component will be greyed out and non-interactive", + disabledDesc: "If true, the component will be greyed out and non-interactive", visibleDesc: "If true, the component is visible", inputValueDesc: "Current value of the input", invalidDesc: "Whether the value is invalid", @@ -355,32 +343,22 @@ export const en = { ratingValueDesc: "The currently selected score", ratingMaxDesc: "The maximum score currently set", datePickerValueDesc: "Currently selected date", - datePickerFormattedValueDesc: - "Formatted selected date according to the specified format", + datePickerFormattedValueDesc: "Formatted selected date according to the specified format", datePickerTimestampDesc: "The currently selected timestamp of the date (s)", dateRangeStartDesc: "Currently selected start date", dateRangeEndDesc: "Currently selected end date", - dateRangeStartTimestampDesc: - "The currently selected timestamp of the start date (s)", - dateRangeEndTimestampDesc: - "The currently selected timestamp of the end date (s)", - dateRangeFormattedValueDesc: - "Formatted selected date according to the specified format", - dateRangeFormattedStartValueDesc: - "Formatted start date according to the specified format", - dateRangeFormattedEndValueDesc: - "Formatted end date according to the specified format", + dateRangeStartTimestampDesc: "The currently selected timestamp of the start date (s)", + dateRangeEndTimestampDesc: "The currently selected timestamp of the end date (s)", + dateRangeFormattedValueDesc: "Formatted selected date according to the specified format", + dateRangeFormattedStartValueDesc: "Formatted start date according to the specified format", + dateRangeFormattedEndValueDesc: "Formatted end date according to the specified format", timePickerValueDesc: "Currently selected time", - timePickerFormattedValueDesc: - "Formatted selected time according to the specified format", + timePickerFormattedValueDesc: "Formatted selected time according to the specified format", timeRangeStartDesc: "Currently selected start time", timeRangeEndDesc: "Currently selected end time", - timeRangeFormattedValueDesc: - "Formatted selected time according to the specified format", - timeRangeFormattedStartValueDesc: - "Formatted start time according to the specified format", - timeRangeFormattedEndValueDesc: - "Formatted end time according to the specified format", + timeRangeFormattedValueDesc: "Formatted selected time according to the specified format", + timeRangeFormattedStartValueDesc: "Formatted start time according to the specified format", + timeRangeFormattedEndValueDesc: "Formatted end time according to the specified format", }, validationDesc: { email: "Please enter a valid email address", @@ -392,14 +370,10 @@ export const en = { "Insufficient number of characters, current length {length}, minimum length {minLength}", maxValue: "Greater than the maximum, current {value}, maximum {max}", minValue: "Less than the minimum, current {value}, minimum {min}", - maxTime: - "Greater than the maximum time, current time {time}, the maximum time {maxTime}", - minTime: - "Less than the minimum time, current time {time}, the minimum time {minTime}", - maxDate: - "Greater than maximum date, current time {date}, maximum date {maxDate}", - minDate: - "Less than minimum date, current time {date}, minimum date {minDate}", + maxTime: "Greater than the maximum time, current time {time}, the maximum time {maxTime}", + minTime: "Less than the minimum time, current time {time}, the minimum time {minTime}", + maxDate: "Greater than maximum date, current time {date}, maximum date {maxDate}", + minDate: "Less than minimum date, current time {date}, minimum date {minDate}", }, query: { noQueries: "No queries available. ", @@ -411,8 +385,7 @@ export const en = { advancedTab: "Advanced", showFailNotification: "Show notification on failure", failCondition: "Failure conditions", - failConditionTooltip1: - "Customizes failure condition and corresponding notification.", + failConditionTooltip1: "Customizes failure condition and corresponding notification.", failConditionTooltip2: "If any condition returns true, the query will be marked as failure and triggers corresponding notification.", showSuccessNotification: "Show notification on success", @@ -481,8 +454,7 @@ export const en = { execSuccess: "run success", execFail: "run failed", execIgnored: "The results of this query was ignored.", - deleteSuccessMessage: - "Successfully deleted. You can use {undoKey} to undo.", + deleteSuccessMessage: "Successfully deleted. You can use {undoKey} to undo.", dataExportDesc: "Data obtained by the current query", codeExportDesc: "Current query status code", successExportDesc: "Whether the current query was executed successfully", @@ -527,8 +499,7 @@ export const en = { sslCertVerificationTypeDisabled: "Disabled", selfSignedCert: "Self-signed Cert", selfSignedCertRequireMsg: "Please enter your Certificate", - enableTurnOffPreparedStatement: - "Enable toggling prepared statements for queries", + enableTurnOffPreparedStatement: "Enable toggling prepared statements for queries", enableTurnOffPreparedStatementTooltip: "You can enable or disable prepared statements in query Advanced tab", serviceName: "Service name", @@ -616,13 +587,11 @@ export const en = { publish: "Publish", historyVersion: "History version", deleteQueryLabel: "Delete query", - deleteQueryContent: - "The query can't be recovered after being deleted. Delete the query?", + deleteQueryContent: "The query can't be recovered after being deleted. Delete the query?", run: "Run", readOnly: "Read only", exit: "Exit", - recoverAppSnapshotContent: - "Restore the current query to the version {version}", + recoverAppSnapshotContent: "Restore the current query to the version {version}", searchPlaceholder: "Search query", allQuery: "All queries", deleteQueryTitle: "Delete query", @@ -656,10 +625,8 @@ export const en = { }, smtpQuery: { attachment: "Attachment", - attachmentTooltip: - "Can use with file upload component, need convert data to: ", - MIMETypeUrl: - "https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types", + attachmentTooltip: "Can use with file upload component, need convert data to: ", + MIMETypeUrl: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types", sender: "Sender", recipient: "Recipient", carbonCopy: "Carbon copy", @@ -859,16 +826,13 @@ export const en = { menuViewDocs: "View documentation", menuUpgradeToLatest: "Upgrade to latest version", nameNotEmpty: "Can not be empty", - nameRegex: - "Must start with a letter and contain only letters, digits, and underscores (_)", + nameRegex: "Must start with a letter and contain only letters, digits, and underscores (_)", nameJSKeyword: "Can not be a Javascript keyword", nameGlobalVariable: "Can not be global variable name", nameExists: "Name {name} already exist", - getLatestVersionMetaError: - "Failed to fetch latest version, please try later.", + getLatestVersionMetaError: "Failed to fetch latest version, please try later.", needNotUpgrade: "Current version is already latest.", - compNotFoundInLatestVersion: - "Current component not found in the latest version.", + compNotFoundInLatestVersion: "Current component not found in the latest version.", upgradeSuccess: "Successfully upgraded to latest version.", searchProp: "Search", }, @@ -989,11 +953,9 @@ export const en = { radio: { options: "Options", horizontal: "Horizontal", - horizontalTooltip: - "The horizontal layout wraps itself when it runs out of space", + horizontalTooltip: "The horizontal layout wraps itself when it runs out of space", vertical: "Vertical", - verticalTooltip: - "The vertical layout will always be displayed in a single column", + verticalTooltip: "The vertical layout will always be displayed in a single column", autoColumns: "Auto column", autoColumnsTooltip: "The auto column layout automatically rearranges the order as space permits and displays as multiple columns", @@ -1003,13 +965,11 @@ export const en = { }, selectInput: { valueDesc: "Currently selected value", - selectedIndexDesc: - "The index of the currently selected value, or -1 if no value is selected", + selectedIndexDesc: "The index of the currently selected value, or -1 if no value is selected", selectedLabelDesc: "The label of the currently selected value", }, file: { - typeErrorMsg: - "Must be a number with a valid file size unit, or a unitless number of bytes.", + typeErrorMsg: "Must be a number with a valid file size unit, or a unitless number of bytes.", fileEmptyErrorMsg: "upload failed. The file size is empty.", fileSizeExceedErrorMsg: "upload failed. The file size exceeds the limit.", minSize: "Min size", @@ -1028,8 +988,7 @@ export const en = { uploadType: "Upload type", showUploadList: "Show upload list", maxFiles: "Max files", - filesValueDesc: - "The contents of the currently uploaded file are Base64 encoded", + filesValueDesc: "The contents of the currently uploaded file are Base64 encoded", filesDesc: "List of the current uploaded files. For details, refer to", clearValueDesc: "Clear all files", parseFiles: "Parse files", @@ -1072,15 +1031,13 @@ export const en = { default: "Default", submit: "Submit", textDesc: "Text currently displayed on button", - loadingDesc: - "Is the button in loading state? If true the current button is loading", + loadingDesc: "Is the button in loading state? If true the current button is loading", formButtonEvent: "event", }, link: { link: "Link", textDesc: "Text currently displayed on link", - loadingDesc: - "Is the link in loading state? If true the current link is loading", + loadingDesc: "Is the link in loading state? If true the current link is loading", }, scanner: { text: "Click scan", @@ -1176,8 +1133,7 @@ export const en = { optionList: "Operation list", option1: "Operation 1", status: "Status", - statusTooltip: - "Optional values: success, error, default, warning, processing", + statusTooltip: "Optional values: success, error, default, warning, processing", primaryButton: "Primary", defaultButton: "Default", type: "Type", @@ -1189,8 +1145,7 @@ export const en = { small: "S", middle: "M", large: "L", - refreshButtonTooltip: - "The current data changes, click to regenerate the column.", + refreshButtonTooltip: "The current data changes, click to regenerate the column.", changeSetDesc: "An object representing changes to an editable table, only contains the changed cell. Rows go first and columns go second.", selectedRowDesc: @@ -1232,8 +1187,7 @@ export const en = { showValue: "Show Value", expandable: "Expandable", configExpandedView: "Configure expanded view", - toUpdateRowsDesc: - "An array of objects for rows to be updated in editable tables.", + toUpdateRowsDesc: "An array of objects for rows to be updated in editable tables.", empty: "Empty", falseValues: "Text when false", allColumn: "All", @@ -1281,8 +1235,7 @@ export const en = { M: "M (Medium)", Q: "Q (Quartile)", H: "H (High)", - maxLength: - "The content is too long. Set the length to less than 2953 characters", + maxLength: "The content is too long. Set the length to less than 2953 characters", }, jsonExplorer: { indent: "Indent", @@ -1341,10 +1294,8 @@ export const en = { media: { playDesc: "Begins playback of the media.", pauseDesc: "Pauses the media playback.", - loadDesc: - "Resets the media to the beginning and restart selecting the media resource.", - seekTo: - "Seek to the given number of seconds, or fraction if amount is between 0 and 1", + loadDesc: "Resets the media to the beginning and restart selecting the media resource.", + seekTo: "Seek to the given number of seconds, or fraction if amount is between 0 and 1", seekToAmount: "Number of seconds, or fraction if it is between 0 and 1", showPreview: "Show preview", }, @@ -1361,10 +1312,8 @@ export const en = { insertImage: "Insert an image or ", }, millisecondsControl: { - timeoutTypeError: - "Please enter the correct timeout period, the current input is: {value}", - timeoutLessThanMinError: - "Input must greater than {left}, the current input is: {value}", + timeoutTypeError: "Please enter the correct timeout period, the current input is: {value}", + timeoutLessThanMinError: "Input must greater than {left}, the current input is: {value}", }, selectionControl: { single: "Single", @@ -1414,8 +1363,7 @@ export const en = { newGroupPrefix: "New group ", allMembers: "All members", deleteModalTitle: "Delete this group", - deleteModalContent: - "The deleted group cannot be restored. Are you sure to delete the group?", + deleteModalContent: "The deleted group cannot be restored. Are you sure to delete the group?", addMember: "Add members", nameColumn: "User name", joinTimeColumn: "Joining time", @@ -1427,12 +1375,9 @@ export const en = { exitOrg: "Leave", exitOrgDesc: "Are you sure you want to leave this workspace.", moveOutOrg: "Remove", - moveOutOrgDescSaasMode: - "Are you sure you want to remove user {name} from this workspace?", - moveOutOrgDesc: - "Are you sure you want to remove user {name}? This action cannot be recovered.", - devGroupTip: - "Members of the developer group have privileges to create apps and data sources.", + moveOutOrgDescSaasMode: "Are you sure you want to remove user {name} from this workspace?", + moveOutOrgDesc: "Are you sure you want to remove user {name}? This action cannot be recovered.", + devGroupTip: "Members of the developer group have privileges to create apps and data sources.", lastAdminQuit: "The last administrator cannot exit.", organizationNotExist: "The current workspace does not exist", inviteUserHelp: "You can copy the invitation link to send to the user", @@ -1445,8 +1390,7 @@ export const en = { manageBtn: "Manage", userDetail: "Detail", syncDeleteTip: "This group has been deleted from the address book source", - syncGroupTip: - "This group is an address book synchronization group and cannot be edited", + syncGroupTip: "This group is an address book synchronization group and cannot be edited", }, orgSettings: { newOrg: "New workspace", @@ -1457,8 +1401,7 @@ export const en = { "You are about to delete this workspace {permanentlyDelete}. Once deleted, the workspace {notRestored}.", permanentlyDelete: "permanently", notRestored: "cannot be restored", - deleteModalLabel: - "Please enter workspace name{name}to confirm the operation:", + deleteModalLabel: "Please enter workspace name{name}to confirm the operation:", deleteModalTip: "Please enter workspace name", deleteModalErr: "Workspace name is incorrect", deleteModalBtn: "Delete", @@ -1504,12 +1447,9 @@ export const en = { noTableSelected: "No table selected", noColumn: "No column", noColumnSelected: "No column selected", - noDataSourceFound: - "No supported data source found. Create a new data source", - noTableFound: - "No tables were found in this data source, please select another data source", - noColumnFound: - "No supported column was found in this table. Please select another table", + noDataSourceFound: "No supported data source found. Create a new data source", + noTableFound: "No tables were found in this data source, please select another data source", + noColumnFound: "No supported column was found in this table. Please select another table", formTitle: "Form title", name: "Name", nameTooltip: @@ -1541,11 +1481,9 @@ export const en = { "Number of rows in the list - This is usually set to a variable (for example, '{{query1.data.length}}') if you need to present the results of a query.", noOfColumns: "Column count", itemIndexName: "Item index name", - itemIndexNameDesc: - "the variable name refer to the item's index, default as {default}", + itemIndexNameDesc: "the variable name refer to the item's index, default as {default}", itemDataName: "Item data name", - itemDataNameDesc: - "the variable name refer to the item's data object, default as {default}", + itemDataNameDesc: "the variable name refer to the item's data object, default as {default}", itemsDesc: "Exposing data of Comps in list", dataDesc: "The raw data used in the current list", dataTooltip: @@ -1615,23 +1553,19 @@ export const en = { }, temporaryState: { value: "Init value", - valueTooltip: - "The initial Value stored in the temporary state can be any valid JSON Value.", + valueTooltip: "The initial Value stored in the temporary state can be any valid JSON Value.", docLink: "About temporary state", pathTypeError: "Path must be either a string or an array of values", unStructuredError: "Unstructured data {prev} can't be updated by {path}", valueDesc: "Temporary state value", - deleteMessage: - "The temporary state is deleted successfully. You can use {undoKey} to undo.", + deleteMessage: "The temporary state is deleted successfully. You can use {undoKey} to undo.", }, dataResponder: { data: "Data", dataDesc: "Data of current data responder", - dataTooltip: - "When this data is changed, it will trigger subsequent actions.", + dataTooltip: "When this data is changed, it will trigger subsequent actions.", docLink: "About the Data responder", - deleteMessage: - "The data responder is deleted successfully. You can use {undoKey} to undo.", + deleteMessage: "The data responder is deleted successfully. You can use {undoKey} to undo.", }, theme: { title: "Themes", @@ -1669,8 +1603,7 @@ export const en = { defaultTheme: "Default", yellow: "Yellow", green: "Green", - previewTitle: - "Theme preview\nExample components that use your theme colors", + previewTitle: "Theme preview\nExample components that use your theme colors", dateColumn: "Date", emailColumn: "Email", phoneColumn: "Phone", @@ -1708,8 +1641,7 @@ export const en = { pluginSetting: { title: "Plugins", npmPluginTitle: "npm plugins", - npmPluginDesc: - "Set up npm plugins for all applications in the current workspace.", + npmPluginDesc: "Set up npm plugins for all applications in the current workspace.", npmPluginEmpty: "No npm plugins were added.", npmPluginAddButton: "Add a npm plugin", saveSuccess: "Saved successfully", @@ -1722,11 +1654,9 @@ export const en = { defaultHomePlaceholder: "Select the default homepage", saveBtn: "Save", preloadJSTitle: "Preload JavaScript", - preloadJSHelp: - "Set up preloaded JavaScript code for all apps in the current workspace.", + preloadJSHelp: "Set up preloaded JavaScript code for all apps in the current workspace.", preloadCSSTitle: "Preload CSS", - preloadCSSHelp: - " Set up preloaded CSS code for all apps in the current workspace.", + preloadCSSHelp: " Set up preloaded CSS code for all apps in the current workspace.", preloadCSSApply: "Apply to the homepage of the workspace", preloadLibsTitle: "JavaScript library", preloadLibsHelp: @@ -1768,8 +1698,7 @@ export const en = { }, module: { emptyText: "No data", - circularReference: - "Circular reference, current module/application cannot be used!", + circularReference: "Circular reference, current module/application cannot be used!", emptyTestInput: "The current module has no input to test", emptyTestMethod: "The current module has no method to test", name: "Name", @@ -1792,8 +1721,7 @@ export const en = { output: "Output", nameExists: "Name {name} already exist", eventTriggered: "Event {name} is triggered", - globalPromptWhenEventTriggered: - "Displays a global prompt when an event is triggered", + globalPromptWhenEventTriggered: "Displays a global prompt when an event is triggered", emptyEventTest: "The current module has no events to test", emptyEvent: "No event has been added", event: "Event", @@ -1929,8 +1857,7 @@ export const en = { videoText: "Overview", onBtnText: "OK", // eslint-disable-next-line only-ascii/only-ascii - permissionDenyTitle: - "Unable to create a new application or data source?", + permissionDenyTitle: "💡 Unable to create a new application or data source?", permissionDenyContent: "You don't have permission to create the application and data source. Please contact the administrator to join the developer group.", appName: "Tutorial application", @@ -1946,8 +1873,7 @@ export const en = { nameCheckMessage: "The name cannot be empty", viewOnly: "View only", recoverAppSnapshotTitle: "Restore this version?", - recoverAppSnapshotContent: - "Restore current app to the version created at {time}.", + recoverAppSnapshotContent: "Restore current app to the version created at {time}.", recoverAppSnapshotMessage: "Restore this version", returnEdit: "Return to editor", deploy: "Publish", @@ -1991,8 +1917,7 @@ export const en = { resetPasswordDesc: "Reset user {name}'s password. A new password will be generated after reset.", resetSuccess: "Reset succeeded", - resetSuccessDesc: - "Password reset succeeded. The new password is: {password}", + resetSuccessDesc: "Password reset succeeded. The new password is: {password}", copyPassword: "Copy password", }, preLoad: { @@ -2085,8 +2010,7 @@ export const en = { resCardSubTitle: "{time} by {creator}", trashEmpty: "Trash is empty.", projectEmpty: "Nothing here.", - projectEmptyCanAdd: - "You don't have any apps yet. Click New to get started.", + projectEmptyCanAdd: "You don't have any apps yet. Click New to get started.", name: "Name", type: "Type", creator: "Created by", @@ -2098,8 +2022,7 @@ export const en = { nameCheckMessage: "The name cannot be empty", deleteElementTitle: "Delete permanently", moveToTrashSubTitle: "{type} {name} will be moved to trash.", - deleteElementSubTitle: - "Delete {type} {name} permanently, it cannot be recovered.", + deleteElementSubTitle: "Delete {type} {name} permanently, it cannot be recovered.", deleteSuccessMsg: "Deleted successfully", deleteErrorMsg: "Deleted error", recoverSuccessMsg: "Recovered successfully", @@ -2172,15 +2095,12 @@ export const en = { aboutUs: "", changeLog: "", introVideo: "", - devNpmPlugin: - "https://docs.lowcoder.dev/build-plugins/develop-your-first-plugin", + devNpmPlugin: "https://docs.lowcoder.dev/build-plugins/develop-your-first-plugin", devNpmPluginText: "How to develop npm plugin", - useHost: - "https://docs.lowcoder.dev/self-hosting/access-local-database-or-api", + useHost: "https://docs.lowcoder.dev/self-hosting/access-local-database-or-api", eventHandlerSlowdown: "https://docs.lowcoder.dev/build-apps/event-handlers#debounce-and-throttle", - thirdLib: - "https://docs.lowcoder.dev/build-apps/write-javascript/use-third-party-libraries", + thirdLib: "https://docs.lowcoder.dev/build-apps/write-javascript/use-third-party-libraries", thirdLibUrlText: "Use third-party libraries", }, datasourceTutorial: { @@ -2194,10 +2114,8 @@ export const en = { }, queryTutorial: { js: "", - transformer: - "https://docs.lowcoder.dev/build-apps/write-javascript/transformers", - tempState: - "https://docs.lowcoder.dev/build-apps/write-javascript/temporary-state", + transformer: "https://docs.lowcoder.dev/build-apps/write-javascript/transformers", + tempState: "https://docs.lowcoder.dev/build-apps/write-javascript/temporary-state", }, customComponent: { entryUrl: "https://custom-component.lowcoder.dev/index.html", @@ -2267,8 +2185,7 @@ export const en = { defaultStartDateValue: "Default Start Date", defaultEndDateValue: "Default End Date", basicUsage: "Basic Usage", - basicDemoDescription: - "The following examples show the basic usage of the component.", + basicDemoDescription: "The following examples show the basic usage of the component.", noDefaultValue: "No Default Value", forbid: "Forbidden", placeholder: "Placeholder", @@ -2340,8 +2257,7 @@ export const en = { styleColor: "Font color", selectionMode: "Row selection mode", paginationSetting: "Pagination setting", - paginationShowSizeChanger: - "Support users to modify the number of entries per page", + paginationShowSizeChanger: "Support users to modify the number of entries per page", paginationShowSizeChangerButton: "Show size changer button", paginationShowQuickJumper: "Show quick jumper", paginationHideOnSinglePage: "Hide when there is only one page", @@ -2474,8 +2390,7 @@ export const en = { disableContent: "Disabling this ID provider may result in some users being unable to log in. Are you sure to proceed?", manualTip: "", - lockTip: - "The content is locked. To make changes, please click the{icon}to unlock.", + lockTip: "The content is locked. To make changes, please click the{icon}to unlock.", lockModalContent: "Changing the 'ID attribute' field can have significant impacts on user identification. Please confirm that you understand the implications of this change before proceeding.", payUserTag: "Premium", @@ -2483,4 +2398,4 @@ export const en = { slotControl: { configSlotView: "Configure slot view", }, -}; +}; \ No newline at end of file diff --git a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx index 17f1e92fc6..d90e290703 100644 --- a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx +++ b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx @@ -36,7 +36,7 @@ import { LeftTime, LeftTree, LeftVideo, - LeftSignature, + LeftSignature } from "lowcoder-design"; export const CompStateIcon: {