Merge pull request #10001 from ToolJet/fix/lts-marketplace

LTS: Marketplace fixes ( v2.50.3 )

Fix: Target and actions section getting overlap in fk drawer 
Fix: Disable resource-name input and change placeholder text in resource-body on Salesforce plugin
This commit is contained in:
Akshay 2024-06-06 15:06:15 +05:30 committed by GitHub
commit 2ed45cce86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 59 additions and 28 deletions

View file

@ -1 +1 @@
2.50.2
2.50.3

View file

@ -1 +1 @@
2.50.2
2.50.3

View file

@ -18,7 +18,7 @@ const CODE_EDITOR_TYPE = {
extendedSingleLine: SingleLineCodeEditor,
};
const CodeHinter = ({ type = 'basic', initialValue, componentName, ...restProps }) => {
const CodeHinter = ({ type = 'basic', initialValue, componentName, disabled, ...restProps }) => {
const { suggestions } = useResolveStore(
(state) => ({
suggestions: state.suggestions,
@ -75,6 +75,7 @@ const CodeHinter = ({ type = 'basic', initialValue, componentName, ...restProps
forceUpdate,
}}
componentName={componentName}
disabled={disabled}
{...restProps}
/>
);
@ -136,6 +137,7 @@ CodeHinter.DepericatedAlert = DepericatedAlertForWorkspaceVariable;
CodeHinter.propTypes = {
type: PropTypes.string.isRequired,
disabled: PropTypes.bool,
};
export default CodeHinter;

View file

@ -136,6 +136,7 @@ const EditorInput = ({
type,
delayOnChange = true, // Added this prop to immediately update the onBlurUpdate callback
paramLabel = '',
disabled = false,
}) => {
function autoCompleteExtensionConfig(context) {
let word = context.matchBefore(/\w*/);
@ -224,6 +225,7 @@ const EditorInput = ({
focused: isFocused,
'focus-box-shadow-active': firstTimeFocus,
'widget-code-editor': componentId,
'disabled-pointerevents': disabled,
});
const currentEditorHeightRef = useRef(null);
@ -241,7 +243,7 @@ const EditorInput = ({
return (
<div
ref={currentEditorHeightRef}
className={`cm-codehinter ${darkMode && 'cm-codehinter-dark-themed'}`}
className={`cm-codehinter ${darkMode && 'cm-codehinter-dark-themed'} ${disabled ? 'disabled-cursor' : ''}`}
data-cy={`${cyLabel}-input-field`}
>
{usePortalEditor && (
@ -292,6 +294,7 @@ const EditorInput = ({
className={customClassNames}
theme={theme}
indentWithTab={true}
readOnly={disabled}
/>
</ErrorBoundary>
</CodeHinter.Portal>

View file

@ -531,4 +531,11 @@
max-width: 100% !important;
}
}
}
.disabled-cursor{
cursor: not-allowed;
}
.disabled-pointerevents{
pointer-events: none;
}

View file

@ -265,7 +265,7 @@ function SourceKeyRelation({
onTableClick={false}
/>
</div>
<div className="target mt-4">
<div className="target-section mt-4">
<div>
<div className="d-flex align-items-center mb-1">
<Target width={18} height={18} />

View file

@ -195,6 +195,7 @@ const DynamicForm = ({
encrypted,
editorType = 'basic',
placeholders = {},
disabled = false,
}) => {
const source = schema?.source?.kind;
const darkMode = localStorage.getItem('darkMode') === 'true';
@ -340,6 +341,7 @@ const DynamicForm = ({
componentName: queryName ? `${queryName}::${key ?? ''}` : null,
cyLabel: key ? `${String(key).toLocaleLowerCase().replace(/\s+/g, '-')}` : '',
delayOnChange: false,
disabled,
};
case 'react-component-openapi-validator':
return {

View file

@ -38,28 +38,27 @@ export default class Salesforce implements QueryService {
}
case 'crud': {
const actiontype = queryOptions.actiontype;
const resource_name = queryOptions.resource_name;
const resource_id = queryOptions.resource_id;
const resource_body = queryOptions.resource_body;
switch (actiontype) {
case 'retrieve':
response = await conn.sobject(resource_name).retrieve(resource_id);
response = await conn.sobject('Account').retrieve(resource_id);
result = response;
break;
case 'create':
response = await conn.sobject(resource_name).create(resource_body);
response = await conn.sobject('Account').create(resource_body);
result = response;
break;
case 'update':
response = await conn.sobject(resource_name).update({ Id: resource_id, ...resource_body });
response = await conn.sobject('Account').update({ Id: resource_id, ...resource_body });
result = response;
break;
case 'delete':
response = await conn.sobject(resource_name).destroy(resource_id);
response = await conn.sobject('Account').destroy(resource_id);
result = response;
break;

View file

@ -13,11 +13,31 @@
"rawData": {}
},
"options": {
"api_version":{
"type":"string"
"client_id": {
"type": "string"
},
"redirect_url":{
"type":"string"
"client_secret": {
"type": "string",
"encrypted": true
},
"code": {
"type": "string",
"encrypted": true
},
"redirect_url": {
"type": "string"
},
"api_version": {
"type": "string"
},
"provider": {
"type": "string"
},
"oauth2": {
"type": "boolean"
},
"plugin_id": {
"type": "string"
}
},
"customTesting": true,
@ -38,4 +58,4 @@
},
"required": []
}
}

View file

@ -73,24 +73,19 @@
"resource_name": {
"label": "Resource Name",
"key": "resource_name",
"type": "dropdown",
"type": "codehinter",
"lineNumbers": false,
"height": "36px",
"className": "codehinter-plugins",
"placeholder": "Account",
"list": [
{
"value": "Account",
"name": "Account"
}
]
"disabled": true
},
"resource_body": {
"label": "Resource Body",
"key": "resource_body",
"type": "codehinter",
"lineNumbers": true,
"placeholder": "{{ name : “ToolJet” }}",
"placeholder": "{{ {name: “ToolJet”} }}",
"description": "Enter the resource body",
"height": "100px"
}
@ -103,13 +98,14 @@
"lineNumbers": false,
"height": "36px",
"className": "codehinter-plugins",
"placeholder": "Account"
"placeholder": "Account",
"disabled": true
},
"resource_body": {
"label": "Resource Body",
"key": "resource_body",
"type": "codehinter",
"placeholder": "{{ Id:”0012F3E4R56487900N” , name : “ToolJet” }}",
"placeholder": "{{ {Id:”0012F3E4R56487900N”, name: “ToolJet”} }}",
"description": "Enter the resource body",
"height": "100px"
}
@ -122,7 +118,8 @@
"lineNumbers": false,
"height": "36px",
"className": "codehinter-plugins",
"placeholder": "Account"
"placeholder": "Account",
"disabled": true
},
"resource_id": {
"label": "Resource ID",
@ -143,7 +140,8 @@
"lineNumbers": false,
"height": "36px",
"className": "codehinter-plugins",
"placeholder": "Account"
"placeholder": "Account",
"disabled": true
},
"resource_id": {
"label": "Resource ID",

View file

@ -1 +1 @@
2.50.2
2.50.3