Skip to content

Commit

Permalink
separating entity data into a different file
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitakinger committed Sep 11, 2024
1 parent 43f350c commit 39ed64a
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 250 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"controlType": "SECTION_V2",
"identifier": "ENTITY_SELECTOR",
"children": [
{
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "ENTITY-SELECTOR-Z1",
"children": [
{
"label": "Entity",
"tooltipText": "The entity to query on the datasource",
"description": "Select the entity that you would like to work with",
"propertyName": "entityType",
"configProperty": "actionConfiguration.formData.entityType.data",
"controlType": "DROP_DOWN",
"initialValue": "ROWS",
"isRequired": true,
"setFirstOptionAsDefault": true,
"options": [
{
"disabled": "{{ ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'UPDATE_MANY', 'INSERT_MANY'].includes(actionConfiguration.formData.command.data) === false }}",
"label": "Sheet Row(s)",
"value": "ROWS"
},
{
"disabled": "{{ ['FETCH_MANY', 'FETCH_DETAILS', 'INSERT_ONE', 'DELETE_ONE'].includes(actionConfiguration.formData.command.data) === false || (['INSERT_ONE', 'DELETE_ONE'].includes(actionConfiguration.formData.command.data) === true && ['https://www.googleapis.com/auth/drive.file'].includes(datasourceConfiguration.authentication.scopeString) === true)}}",
"label": "Spreadsheet",
"value": "SPREADSHEET"
},
{
"disabled": "{{ ['DELETE_ONE'].includes(actionConfiguration.formData.command.data) === false }}",
"label": "Sheet",
"value": "SHEET"
}
],
"conditionals": {
"evaluateFormConfig": {
"condition": "{{true}}",
"paths": ["options"]
}
}
},
{
"label": "Spreadsheet",
"tooltipText": "The URL of the spreadsheet in your Google Drive",
"propertyName": "rows_get_spreadsheetUrl",
"configProperty": "actionConfiguration.formData.sheetUrl.data",
"controlType": "DROP_DOWN",
"isSearchable": true,
"isRequired": true,
"-placeholderText": "https://docs.google.com/spreadsheets/d/xyz/edit#gid=0",
"fetchOptionsConditionally": true,
"alternateViewTypes": ["json"],
"conditionals": {
"show": "{{ !!actionConfiguration.formData.entityType.data && (new Object({ 'SPREADSHEET': ['FETCH_DETAILS', 'DELETE_ONE'], 'SHEET': ['DELETE_ONE'], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data)) }}",
"fetchDynamicValues": {
"condition": "{{true}}",
"config": {
"params": {
"requestType": "SPREADSHEET_SELECTOR",
"displayType": "DROP_DOWN"
}
}
}
}
},
{
"label": "Sheet name",
"propertyName": "rows_get_sheetName",
"tooltipText": "The name of the sheet inside the spreadsheet",
"configProperty": "actionConfiguration.formData.sheetName.data",
"controlType": "DROP_DOWN",
"isSearchable": true,
"isRequired": true,
"fetchOptionsConditionally": true,
"alternateViewTypes": ["json"],
"conditionals": {
"show": "{{ new Object({ 'SPREADSHEET': [], 'SHEET': ['DELETE_ONE'], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data) && !!actionConfiguration.formData.sheetUrl.data }}",
"fetchDynamicValues": {
"condition": "{{ !!actionConfiguration.formData.sheetUrl.data }}",
"config": {
"params": {
"requestType": "SHEET_SELECTOR",
"displayType": "DROP_DOWN",
"parameters": {
"sheetUrl": "{{actionConfiguration.formData.sheetUrl.data}}"
}
}
}
}
}
},
{
"label": "Table heading row index",
"tooltipText": "The index of the column names in the sheet (starts from 1)",
"propertyName": "rows_get_tableHeadingRowIndex",
"configProperty": "actionConfiguration.formData.tableHeaderIndex.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"initialValue": "1",
"isRequired": true,
"conditionals": {
"show": "{{ new Object({ 'SPREADSHEET': [], 'SHEET': [], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data) && !!actionConfiguration.formData.sheetName.data }}"
}
}
]
}
]
}
Loading

0 comments on commit 39ed64a

Please sign in to comment.